Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Rammaria
    Junior Member
    • Nov 2013
    • 7

    #1

    Fast tool for finding a subsequences?

    Hello!
    I'm new to bioinformatics and I have faced with such a problem.
    I'm looking for a fast, desirably multithreading (or which can be parallelized) tool, that can find all the occurences of certain short subsequence with several mismatches in every read in NGS output. Most of all mismatches are substitutions, not indels.
    For example, I have a lot (thousands) of sequences like this: "fdsjfsjdkdfjSPARjdskfjdskSPAMfddjskdsfjkSPAMdkdsfjk", and I need to get a matrix with positions of all the entries of "SPAM" in every sequence.
    I tried to use the patternMatch from R-Bioconductor and the Python package fuzzysearch, but they are not actually fast. "Motif" from Biopython does not seem quite right for my goals and also is not very fast.

    Do you know any suitable tool for me?

    I believe it exits and I do not need to reinvent the wheel.

    Thank you in advance.
    Last edited by Rammaria; 09-09-2014, 04:29 AM.
  • GenoMax
    Senior Member
    • Feb 2008
    • 7142

    #2
    Do you know the pattern you want to look for (e.g. SPAM in the example above) then fuzznuc from EMBOSS may be an option.

    If you are looking for patterns de novo then a k-mer search (of the length you want) may work.

    Having to allow for mismatches would make this job lot more difficult.

    Then there may be the possibility of using "grep" in some creative ways (if you know the pattern you want to search for).

    Comment

    • Brian Bushnell
      Super Moderator
      • Jan 2014
      • 2709

      #3
      BBDuk can find all instances of a string (up to 31 bp) allowing a set number of mismatches. It will not return a matrix of positions, but it can replace all instances with some symbol that is then easy to find with a different tool that is not capable of handling mismatches. For example:

      bbduk.sh -Xmx1g in=reads.fa out=masked.fa literal=ACGT k=4 ktrim=x hdist=1 rcomp=f

      For the input file:
      Code:
      >1
      GGGGGACGTGGGGGGGACGT
      the output would be
      Code:
      >1
      GGGGGxxxxGGGGGGGxxxx
      You can use the "hdist" flag to specify a hamming distance. And you can use the "rcomp" flag to determine whether only forward or both forward and reverse sequences will be replaced. It's fast and multithreaded.

      Edit - the functionality I suggested seems to be broken; I will investigate.
      Edit2 - Fixed now as of v33.40b.
      Last edited by Brian Bushnell; 09-04-2014, 09:27 AM.

      Comment

      • maubp
        Peter (Biopython etc)
        • Jul 2009
        • 1544

        #4
        Another k-mer based approach would be mirabait from the MIRA v4 assembler. This assumes you pattern SPAM is short enough that you can use it directly as a k-mer to search for.

        Comment

        • Rammaria
          Junior Member
          • Nov 2013
          • 7

          #5
          Many thanks to you all for your great solutions!

          I know the pattern exactly (it must be strictly 'SPAM' in my example), so fuzznuc and bbduk seem to be right for me.
          Last edited by Rammaria; 09-09-2014, 03:33 AM.

          Comment

          • Rammaria
            Junior Member
            • Nov 2013
            • 7

            #6
            Brian, how can I cite bbduk and other bbtools if I use them?
            Last edited by Rammaria; 09-09-2014, 04:28 AM.

            Comment

            • Brian Bushnell
              Super Moderator
              • Jan 2014
              • 2709

              #7
              They're not yet published, so you can just cite my name and the Sourceforge website (https://sourceforge.net/projects/bbmap/).

              Comment

              • Rammaria
                Junior Member
                • Nov 2013
                • 7

                #8
                Ok, thank you!

                Comment

                Latest Articles

                Collapse

                • SEQadmin2
                  Beyond CRISPR/Cas9: Understand, Choose, and Use the Right Genome Editing Tool
                  by SEQadmin2



                  CRISPR/Cas9 sparked the gene editing revolution for both research and therapeutics.1 But this system still showed severe issues that limited its applications. The most prominent were the heavy reliance on PAM sequences, delivery limitations, double-stranded breaks that prompt unintended edits and cell death, and editing inefficiency (both in targeting and in knock-in reliability).

                  Despite this, “CRISPR helped turn genome editing from a specialized technique into
                  ...
                  07-31-2026, 11:01 AM
                • SEQadmin2
                  Proteomic Platforms: How to Choose the Right Analytical Strategy to Improve Detection and Clinical Applications
                  by SEQadmin2


                  Proteomics platforms are evolving rapidly, with advances in mass spectrometry and affinity-based approaches expanding what researchers can detect and at what scale. As the field moves toward deeper proteome coverage and clinical applications, scientists face an increasingly complex landscape of tools. This article will explore how researchers are navigating these choices to find the right platform for their work.

                  The systematic characterization of the human proteome has
                  ...
                  07-20-2026, 11:48 AM
                • 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.
                  ...
                  07-09-2026, 11:10 AM

                ad_right_rmr

                Collapse

                News

                Collapse

                Topics Statistics Last Post
                Started by SEQadmin2, Yesterday, 07:41 AM
                0 responses
                12 views
                0 reactions
                Last Post SEQadmin2  
                Started by SEQadmin2, 08-03-2026, 10:13 AM
                0 responses
                25 views
                0 reactions
                Last Post SEQadmin2  
                Started by SEQadmin2, 07-31-2026, 02:55 AM
                0 responses
                38 views
                0 reactions
                Last Post SEQadmin2  
                Started by SEQadmin2, 07-24-2026, 12:17 PM
                0 responses
                25 views
                0 reactions
                Last Post SEQadmin2  
                Working...