Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mb492
    Junior Member
    • Sep 2011
    • 1

    #1

    Backspaces in Chip-Seq data file

    Hi,

    I am new to NGS data analysis and I have got some ELAND output files (specificially the sorted.txt file) which I am planning to analyse using MACS. However, MACS keeps falling over due to a "Strand information can not be recognized in this line" error. I have deduced that this is due to a backspace characters which have appeared between some characters in my file and because MACS can't find a tab between the characters it complains that the line is not in the correct format.

    Here is the offending line: (see the '^H' between the 0 and 1)

    HWI-EAS486 23 1 97 11471 15019 0^H1 CAGGGTCACCCAGAGTGAGTGTGAAGCCAGCCTGAGATC hhYghhhhhhhggfhhghhhgghghghhhghghhhdfch chr10.fa 80424503 F 34G1C1A 6

    Here is the same line as output by the MACS error: (backspace represented as x08 (HEX I think)
    HWI-EAS486\t23\t1\t97\t11471\t15019\t0\x081\tCAGGGTCACCCAGAGTGAGTGTGAAGCCAGCCTGAGATC\thhYghhhhhhhggfhhghhhgghghghhhghghhhdfch\tchr10.fa\t\t80424503\tF\t34G1C1A\t6","34G1C1A


    Does anyone have any idea how to replace these ^H (x08) backspace characters with tabs? the problem I have is that there are numerous occurances of ^H in the file which are legitimate.

    Any help of advice would be very useful.

    Thanks
  • dpryan
    Devon Ryan
    • Jul 2011
    • 3478

    #2
    regular expressions

    I would assume that you're running into a software bug in ELAND. I've only used data coming from it a couple times and don't recall ever running into backspaces.

    Anyway, you could just remove the backspaces with regular expressions in your preferred programming language (or even perl from the command line, if you're into that sort of thing).

    For example, in python, something like the following would replace all backspaces with tabs. A small amount of editing would restrict it to only the ones you want.
    Code:
    import re
    
    f = open("your_file.txt","r")
    of = open("a_new_file.txt","w")
    for line in f:
        of.write(re.sub('\b','\t',line))
    f.close()
    of.close()
    Assuming that the backspaces are only ever replacing a single character and you know (or can look up the ELAND file format), you could instead just use regex to parse the various fields:
    Code:
    re.search("(HWI\-EAS[\d]+)\.{1}([\d]+)\.{1}([\d]+)\.{1}([\d]+)\.{1}([\d]+)\.{1}([\d]+)\.{1}([\d]+)\.{1}([\d]+)\.{1}([ACGT]+)...",line)
    Or something along those lines. There are a lot of ways one could do that. If you're uncomfortable doing that sort of thing yourself then you can probably find someone to write a short script for you in return for a pint or two of decent beer.

    Comment

    Latest Articles

    Collapse

    • SEQadmin2
      Multiomic Liquid Biopsy: What DNA/RNA Panels Reveal That DNA Alone Can’t
      by SEQadmin2



      Tumors contain complex mixtures of cell populations that evolve in response to treatment and host-specific factors. Tissue biopsies provide only static snapshots of a tumor’s state. But what if we could follow that evolution over time using a minimally invasive technique?

      Liquid biopsies can detect tumor-derived material circulating in the bloodstream, providing a way to study treatment response, detect emerging resistance, and discover new biomarkers. Circulating
      ...
      10-14-2026, 09:55 AM
    • SEQadmin2
      New Genomics Technologies Take Aim at Long-Standing Limits
      by SEQadmin2


      Researchers using sequencing and genomics tools often have to make trade-offs. They can choose between speed or scale, short reads or long-range information, or targeted panels or a view of the whole transcriptome. New technologies that have been released this year are built to address those tough choices.

      We asked six companies the same four questions to learn about their latest products. The new technologies bring a lot to the table, including rethinking sequencing
      ...
      09-28-2026, 10:25 AM

    ad_right_rmr

    Collapse

    News

    Collapse

    Topics Statistics Last Post
    Started by SEQadmin2, 10-22-2026, 11:13 AM
    0 responses
    23 views
    0 reactions
    Last Post SEQadmin2  
    Started by SEQadmin2, 10-22-2026, 10:48 AM
    0 responses
    20 views
    0 reactions
    Last Post SEQadmin2  
    Started by SEQadmin2, 10-15-2026, 10:52 AM
    0 responses
    36 views
    0 reactions
    Last Post SEQadmin2  
    Started by SEQadmin2, 10-14-2026, 05:39 AM
    0 responses
    42 views
    0 reactions
    Last Post SEQadmin2  
    Working...