Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • HSV-1
    Member
    • Jul 2012
    • 38

    #1

    How to count the repeating times of a certain 11bp long sequence

    Hi, all
    I want to count the repeating times of an 11bp long sequence(for example: tcgtgacggta ) in human and mouse genome. Further I need know the positions of this sequence located in. This 11bp sequence is a potential motif . First I need know how many copies of this sequence in human and moue genomes. And then to know where they are.

    Is there any tool for this?

    Thanks .
  • rboettcher
    Member
    • Oct 2010
    • 71

    #2
    Hi HSV-1,

    You can use bowtie with option -c TCGTGACGGTA
    and specify that you want to output all alignments via option -a.
    However, in this case you also need to specify that only perfect matches are allowed via -v 0.

    See http://bowtie-bio.sourceforge.net/manual.shtml for more details.

    Regards
    Last edited by rboettcher; 02-05-2013, 07:48 AM.

    Comment

    • Richard Finney
      Senior Member
      • Feb 2009
      • 701

      #3
      Here's a fast C solution ... output is 0 based (so add one).

      This takes about 2 minutes on my 2000 bogomips machine for hg19 ...

      ______ begin code _______
      // this program finds short patterns and reverse complemented patterns in *.fa fasta (genome) files
      // how to compile: gcc -Wall -O3 -o patmatch patmach.c
      // how to use : for i in *.fa; do cat $i | ./patmatch; done

      #include <stdio.h>
      #include <string.h>
      #include <stdlib.h>
      #include <ctype.h>

      // put your pattern in pat1 and the reverse complement in pat2 ...
      char pat1[] = "TCGTGACGGTA"; // use upper case - NB: this should be a parameter but you can do it
      char pat2[] = "TACCGTCACGA"; // reverse complement of pat1

      #define MAXCHROMSIZE 254235640 // maximum chromsome size - edit as necessary - you will need to fix this IF you're using a whole genome FASTA
      char chr[MAXCHROMSIZE + 50];

      int main()
      {
      long int i,len;
      int j;
      char header[5012];
      char s[5012];
      char *spot = &chr[0];

      memset(chr,0,sizeof(chr));
      while (gets(s))
      {
      if (s[0] == '>') { strcpy (header,s); continue;}
      for (i=0;s[i];i++) s[i] = toupper(s[i]);
      strcat(spot,s);
      for ( ; *spot ; spot++) ;
      }
      len = spot-chr;
      spot = chr;
      for (i=0;i<len;i++)
      {
      if (chr[i] == (char)0) break;
      for (j=0;pat1[j]==chr[i+j];j++);
      if (j == 11) printf("F %s at %ld\n",header,i);
      for (j=0;pat2[j]==chr[i+j];j++);
      if (j == 11) printf("R %s at %ld\n",header,i);
      }
      return 0;
      }

      _______ end code ______

      Example for hg19 fastas ...

      -bash-3.00$ for i in *.fa; do cat $i | ./patmatch; done
      R >chr10 at 111870831
      F >chr11 at 36061863
      R >chr11 at 77190239
      R >chr12 at 119747880
      R >chr14 at 81206117
      R >chr14 at 95419269
      R >chr16 at 11844841
      F >chr16 at 78553508
      R >chr17 at 45266108
      F >chr1 at 17428420
      F >chr1 at 52442586
      F >chr2 at 25065131
      R >chr2 at 53867779
      R >chr2 at 114616666
      F >chr3 at 55121176
      F >chr4 at 1412897
      R >chr4 at 136465390
      R >chr5 at 84661141
      R >chr5 at 103058499
      F >chr7 at 2875412
      R >chr9 at 75467056
      Last edited by Richard Finney; 02-05-2013, 11:28 AM.

      Comment

      • maasha
        Senior Member
        • Apr 2009
        • 153

        #4
        This can be done with Biopieces (www.biopieces.org) like this:

        Code:
        read_fasta -i genome.fna | patscan_seq -p tcgtgacggta | write_bed -o out.bed -x

        Comment

        Latest Articles

        Collapse

        • SEQadmin2
          Multiomic Liquid Biopsy: What DNA/RNA Panels Reveal That DNA Alone Can’t
          by SEQadmin2



          Tumors contain complex mixtures of cell populations that evolve in response to treatment and host-specific factors. Tissue biopsies provide only static snapshots of a tumor’s state. But what if we could follow that evolution over time using a minimally invasive technique?

          Liquid biopsies can detect tumor-derived material circulating in the bloodstream, providing a way to study treatment response, detect emerging resistance, and discover new biomarkers. Circulating
          ...
          10-14-2026, 09:55 AM
        • SEQadmin2
          New Genomics Technologies Take Aim at Long-Standing Limits
          by SEQadmin2


          Researchers using sequencing and genomics tools often have to make trade-offs. They can choose between speed or scale, short reads or long-range information, or targeted panels or a view of the whole transcriptome. New technologies that have been released this year are built to address those tough choices.

          We asked six companies the same four questions to learn about their latest products. The new technologies bring a lot to the table, including rethinking sequencing
          ...
          09-28-2026, 10:25 AM

        ad_right_rmr

        Collapse

        News

        Collapse

        Topics Statistics Last Post
        Started by SEQadmin2, 10-15-2026, 10:52 AM
        0 responses
        18 views
        0 reactions
        Last Post SEQadmin2  
        Started by SEQadmin2, 10-14-2026, 05:39 AM
        0 responses
        26 views
        0 reactions
        Last Post SEQadmin2  
        Started by SEQadmin2, 10-13-2026, 09:56 AM
        0 responses
        22 views
        0 reactions
        Last Post SEQadmin2  
        Started by SEQadmin2, 10-09-2026, 11:14 AM
        0 responses
        28 views
        0 reactions
        Last Post SEQadmin2  
        Working...