Unconfigured Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • mb492
    Junior Member
    • Sep 2011
    • 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

    • mylaser
      Reply to Advanced Sequencing Platforms Tackle Neuroscience’s Toughest Genomics Problems
      by mylaser
      Kheloyaar: The Complete Guide to Kheloyaar Loginand Kheloyaar ID
      The online gaming industry has transformed the way people enjoy digital entertainment. As technology continues to improve, players are looking for platforms that offer convenience, security, and a seamless user experience. Kheloyaarhas gained attention among users who value an easy-to-use platform, quick account access, and a simple registration process.
      Whether you're exploring Kheloyaar for the first time or want to understand...
      Yesterday, 09:27 PM
    • SEQadmin2
      Advanced Sequencing Platforms Tackle Neuroscience’s Toughest Genomics Problems
      by SEQadmin2



      Genomics studies in neuroscience face a special challenge due to the brain’s complexity and scarcity of samples. Mapping changes in cell type and state using conventional next-generation sequencing methods remains challenging. Advances in technologies like single-cell sequencing, spatial transcriptomics, and long-read sequencing have opened the door to deeper studies of the brain and diseases like Alzheimer’s, amyotrophic lateral sclerosis (ALS), and schizophrenia.
      ...
      Yesterday, 11:10 AM
    • SEQadmin2
      Cancer Drug Resistance: The Lingering Barrier to Rising Survival
      by SEQadmin2



      Cancer survival rates have significantly increased in the last few decades in the United States, reaching a combined 70% 5-year survival rate by 2021. Behind this number, there are years of research to find new therapies, drug targets, and early detection methods. But there is one core challenge that keeps slowing down these advances, and it’s about drug resistance.

      There is no single reason why many patients don’t respond to treatment as expected. Cancer is...
      07-08-2026, 05:17 AM

    ad_right_rmr

    Collapse

    News

    Collapse

    Topics Statistics Last Post
    Started by SEQadmin2, Yesterday, 10:04 AM
    0 responses
    8 views
    0 reactions
    Last Post SEQadmin2  
    Started by SEQadmin2, 07-08-2026, 10:08 AM
    0 responses
    7 views
    0 reactions
    Last Post SEQadmin2  
    Started by SEQadmin2, 07-07-2026, 11:05 AM
    0 responses
    12 views
    0 reactions
    Last Post SEQadmin2  
    Started by SEQadmin2, 07-02-2026, 11:08 AM
    0 responses
    31 views
    0 reactions
    Last Post SEQadmin2  
    Working...