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
        Essential Discoveries and Tools in Epitranscriptomics
        by seqadmin


        The field of epigenetics has traditionally concentrated more on DNA and how changes like methylation and phosphorylation of histones impact gene expression and regulation. However, our increased understanding of RNA modifications and their importance in cellular processes has led to a rise in epitranscriptomics research. “Epitranscriptomics brings together the concepts of epigenetics and gene expression,” explained Adrien Leger, PhD, Principal Research Scientist on Modified Bases...
        Yesterday, 07:01 AM
      • seqadmin
        Current Approaches to Protein Sequencing
        by seqadmin


        Proteins are often described as the workhorses of the cell, and identifying their sequences is key to understanding their role in biological processes and disease. Currently, the most common technique used to determine protein sequences is mass spectrometry. While still a valuable tool, mass spectrometry faces several limitations and requires a highly experienced scientist familiar with the equipment to operate it. Additionally, other proteomic methods, like affinity assays, are constrained...
        04-04-2024, 04:25 PM

      ad_right_rmr

      Collapse

      News

      Collapse

      Topics Statistics Last Post
      Started by seqadmin, 04-11-2024, 12:08 PM
      0 responses
      39 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, 04-10-2024, 10:19 PM
      0 responses
      41 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, 04-10-2024, 09:21 AM
      0 responses
      35 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, 04-04-2024, 09:00 AM
      0 responses
      55 views
      0 likes
      Last Post seqadmin  
      Working...
      X