Unconfigured Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • yaximik
    Senior Member
    • Apr 2011
    • 199

    removing N inserts

    I am trying to build a comprehensive database of prokaryotic (bacteria and archea) and fungal genomes to be used for screening ancient DNA reads for contamination. What I found unfortunately that many of genomes in NCBI or EMBL databases have a lot of poly-N inserts, which obviously need to be eliminated. This can be done either by removing inserts from each FASTA record, which may be difficult, or by splitting records at poly-N inserts and trimming Ns from the ends. Is there a tool/sctipt to do this? Alternatively, I may have to abandon genomes and just concatenate GenBank relevant records, but I first will have to extract FASTA from them. Any advice?
  • swbarnes2
    Senior Member
    • May 2008
    • 910

    #2
    It's not obvious to me that they have to be taken out. Reads just won't align there, that's all.

    You could use sed to get rid of all the N's, or write a script in something to trim out sequences of Ns that are more than a certain length.

    Comment

    • yaximik
      Senior Member
      • Apr 2011
      • 199

      #3
      Well, dowloaded data files need to be preprocessed by BWA-SW to make databases for local install of DeconSeq, and the author removed Ns by splitting, as BWA-SW replaces Ns with either of A, G, C, T at random (citing the paper). But it does not say in the paper how this was done...

      Comment

      • jimmybee
        Senior Member
        • Sep 2010
        • 119

        #4
        Why do you need to remove the poly-N regions? These are gap regions that could be useful

        Comment

        • maasha
          Senior Member
          • Apr 2009
          • 153

          #5
          I am also not convinced that you should remove N's, but if you must, you can with Biopieces (www.biopieces.org):

          Code:
          read_fasta -i in.fna | transliterate_seq -d 'nN' | write_fasta -o out.fna -x

          Comment

          • yaximik
            Senior Member
            • Apr 2011
            • 199

            #6
            Wow, i did not think biopieces can do this. Gotta try!

            Comment

            • maasha
              Senior Member
              • Apr 2009
              • 153

              #7
              @yaximik

              For more finegrained control you can use substitute_vals to remove blocks of N's longer than 25:

              Code:
              read_fasta -i in.fna | substitute_vals -k SEQ -s 'N{25,}' -r '' -ig | write_fasta -o out.fna -x

              Comment

              Latest Articles

              Collapse

              • GATTACAT
                Reply to Nine Things a Sample Prep Scientist Thinks About Before Sequencing
                by GATTACAT
                Love this - good data definitely starts from good input, and poor input can only give relatively poor data. I particularly like the mention of Nanodrop/absorbance based methods for quantification. It's such a toss up if you'll get an accurate reading or what amounts to a randomly generated number, and a lot of library/sequencing related issues can be traced back to poor quant.
                07-01-2026, 11:43 AM
              • SEQadmin2
                Nine Things a Sample Prep Scientist Thinks About Before Sequencing
                by SEQadmin2


                I’m not a sequencing expert. I’m a purification scientist who uses NGS to evaluate workflows my group develops. With this perspective, we think about the sample first and the NGS workflow second. The sequencer is an exceptionally honest reporter, but it can only report on what you give it, so whether you get clean, interpretable data from an NGS workflow is largely determined before you begin.

                Here are nine questions we think about, in roughly the order they matter, before...
                06-18-2026, 07:11 AM

              ad_right_rmr

              Collapse

              News

              Collapse

              Topics Statistics Last Post
              Started by SEQadmin2, 07-02-2026, 11:08 AM
              0 responses
              18 views
              0 reactions
              Last Post SEQadmin2  
              Started by SEQadmin2, 06-30-2026, 05:37 AM
              0 responses
              19 views
              0 reactions
              Last Post SEQadmin2  
              Started by SEQadmin2, 06-26-2026, 11:10 AM
              0 responses
              21 views
              0 reactions
              Last Post SEQadmin2  
              Started by SEQadmin2, 06-17-2026, 06:09 AM
              0 responses
              54 views
              0 reactions
              Last Post SEQadmin2  
              Working...