Seqanswers Leaderboard Ad

Collapse

Announcement

Collapse
No announcement yet.
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • bbduk.sh masking shorter than k-mer size

    I've come across a situation using bbduk to mask the k-mers from one genome assembly in another where the resulting number of masked bases is some sequences is shorter than the k value.

    I am running the command like this:
    Code:
    # version 37.something.  
    bbduk.sh in=mygenome.fa out=mygenome_masked.fa ref=ecoli.fasta k=15 
    qkmask=X maskfullycovered=t maskmiddle=f
    In mygenome_masked.fa (a multisequence fasta file), there are a sizable number of sequences with a total of 0 < bases_masked < k(=15). It seems strange to have 3 nucleotides masked when k=15, and I am wondering if anyone can point out what options I should be using to prevent this from happening

  • #2
    That would be the "maskfullycovered" flag. That means only bases covered entirely by reference kmers will be masked.

    For example, take this sequence you want to mask:

    Code:
    ACGTTGCA
    And this reference:

    Code:
    CGTTG
    The ref kmers (ignoring reverse complement, at K=3) are CGT, GTT, and TTG. They line up like:
    Code:
       TTG
      GTT
     CGT
    ACGTTGCA
    Every based is covered by 3 kmers, but only the first T is "fully covered" - covered by 3 ref kmers. So it's the only one masked. Whereas without "maskfullycovered", the entire CGTTG would be masked.

    Incidentally, it depends on what your goal is, but normally I find K=15 to be very short for masking... typically I use K=31.

    Comment


    • #3
      Thanks! I had been thinking about maskfullycovered incorrectly.

      Incidentally, it depends on what your goal is, but normally I find K=15 to be very short for masking... typically I use K=31.
      The sequences I was trying to mask were from a very rough (initial) assembly of 10-20x worth of uncorrected 1d Minion reads. The assembly probably has a fair few errors, so I tried a range of k values to see if I could find any obvious contamination. K=15 turned out to be way too sensitive, like you say.

      Are there parameter values you'd recommend (for either bbduk or seal) for identifying contaminants in high-error-rate (~15%) reads?

      Comment

      Latest Articles

      Collapse

      • seqadmin
        Strategies for Sequencing Challenging Samples
        by seqadmin


        Despite advancements in sequencing platforms and related sample preparation technologies, certain sample types continue to present significant challenges that can compromise sequencing results. Pedro Echave, Senior Manager of the Global Business Segment at Revvity, explained that the success of a sequencing experiment ultimately depends on the amount and integrity of the nucleic acid template (RNA or DNA) obtained from a sample. “The better the quality of the nucleic acid isolated...
        03-22-2024, 06:39 AM
      • seqadmin
        Techniques and Challenges in Conservation Genomics
        by seqadmin



        The field of conservation genomics centers on applying genomics technologies in support of conservation efforts and the preservation of biodiversity. This article features interviews with two researchers who showcase their innovative work and highlight the current state and future of conservation genomics.

        Avian Conservation
        Matthew DeSaix, a recent doctoral graduate from Kristen Ruegg’s lab at The University of Colorado, shared that most of his research...
        03-08-2024, 10:41 AM

      ad_right_rmr

      Collapse

      News

      Collapse

      Topics Statistics Last Post
      Started by seqadmin, 03-27-2024, 06:37 PM
      0 responses
      12 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, 03-27-2024, 06:07 PM
      0 responses
      11 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, 03-22-2024, 10:03 AM
      0 responses
      53 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, 03-21-2024, 07:32 AM
      0 responses
      68 views
      0 likes
      Last Post seqadmin  
      Working...
      X