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
        Best Practices for Single-Cell Sequencing Analysis
        by seqadmin



        While isolating and preparing single cells for sequencing was historically the bottleneck, recent technological advancements have shifted the challenge to data analysis. This highlights the rapidly evolving nature of single-cell sequencing. The inherent complexity of single-cell analysis has intensified with the surge in data volume and the incorporation of diverse and more complex datasets. This article explores the challenges in analysis, examines common pitfalls, offers...
        Yesterday, 07:15 AM
      • seqadmin
        Latest Developments in Precision Medicine
        by seqadmin



        Technological advances have led to drastic improvements in the field of precision medicine, enabling more personalized approaches to treatment. This article explores four leading groups that are overcoming many of the challenges of genomic profiling and precision medicine through their innovative platforms and technologies.

        Somatic Genomics
        “We have such a tremendous amount of genetic diversity that exists within each of us, and not just between us as individuals,”...
        05-24-2024, 01:16 PM

      ad_right_rmr

      Collapse

      News

      Collapse

      Topics Statistics Last Post
      Started by seqadmin, Today, 06:58 AM
      0 responses
      11 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, Yesterday, 08:18 AM
      0 responses
      17 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, Yesterday, 08:04 AM
      0 responses
      16 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, 06-03-2024, 06:55 AM
      0 responses
      13 views
      0 likes
      Last Post seqadmin  
      Working...
      X