Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts

  • PoorSeq
    replied
    Good point gringer! however, because I have already flash-stitched the reads, I expect that the sequence I'm looking for will be in the same orientation in all reads. Still, I would see if I have any potholes. Also, I chose 14nt because my samples are from a bacteria with a genome size of 4.2 million, so I expect anything equal or more than 12nt will be unique.

    Leave a comment:


  • gringer
    replied
    Originally posted by PoorSeq View Post
    bioawk -c fastx '/SEQUENCE/ {print "@"$name; print $seq; print "+"; print $qual }' inut.fq > output.fq
    Hmm, bioawk seems pretty neat.

    Note that what you've got there won't work for reverse complement orientation, so you'll need to have both forward and reverse included. Also, picking any 14+nt substring of SEQUENCE (or its reverse-complement) will be a bit trickier to implement.

    Leave a comment:


  • PoorSeq
    replied
    Thanks all for the answers, specially dariober for the code. I have also developed a bioawk code later which I was able to use. The code is:

    bioawk -c fastx '/SEQUENCE/ {print "@"$name; print $seq; print "+"; print $qual }' inut.fq > output.fq

    Yes, my aim is to collect all the reads that contains a sequence (or subsequence, at least 14nt) and make a new file.

    Leave a comment:


  • dariober
    replied
    Originally posted by PoorSeq View Post
    I'm pretty new to bioinformatics and sorry if it's not worthy of asking here.

    I have a FLASH stitched fastq file from my paired end data, from which I want to sort the reads containing a particular sequence or part of that sequence in any orientation, and make a new fastq file with them. Is there any easy tool/code to do that?
    Hi- As gringer pointed out, you should clarify what you are trying to do. Anyway... This sequence of unix commands reads a fastq file and outputs the reads in fastq format matching a regular expression. See if it helps:

    Code:
    ## Get reads containing substring AAA or its revcomp TTT
    gunzip -c fastq.fq.gz \
    | paste - - - - \
    | grep -P '^@.*?\t(.*?AAA.*?)|(.*?TTT.*?)\t\+' \
    | tr '\t' '\n' \
    | gzip > sub.fq.gz
    
    ## Example input fastq:
    @seq1
    ACTGAAACTG
    +comment
    IIIIIIIIII
    @seq2
    ACTGNNNCTGTTT
    +comment
    BBBBBBBBBBBBB
    @seq3
    CCCCCCCCCCCCC
    +comment
    BBBBBBBBBBTTT
    @seq4
    AAACCCCCCCCCC
    +comment
    BBBBBBBBBBTTT
    
    ## Output sub.fq.gz
    @seq1
    ACTGAAACTG
    +comment
    IIIIIIIIII
    @seq2
    ACTGNNNCTGTTT
    +comment
    BBBBBBBBBBBBB
    @seq4
    AAACCCCCCCCCC
    +comment
    BBBBBBBBBBTTT
    If your input is unzipped use "paste - - - - < fastq.fq" instead of "gunzip -c fastq.fq.gz \
    | paste - - - -"

    Leave a comment:


  • yueluo
    replied
    If you are trying to get reads that align to a particular sequence, try bowtie2. Not sure if that's your purpose though?

    Leave a comment:


  • gringer
    replied
    I have a FLASH stitched fastq file from my paired end data, from which I want to sort the reads containing a particular sequence
    Okay, that's doable with grep, and very quick.

    or part of that sequence
    Wait, what? You want any subsequence? Will one base pair do? What are your limits?

    Leave a comment:


  • how to parse reads containing a particular sequence in any orientation

    I'm pretty new to bioinformatics and sorry if it's not worthy of asking here.

    I have a FLASH stitched fastq file from my paired end data, from which I want to sort the reads containing a particular sequence or part of that sequence in any orientation, and make a new fastq file with them. Is there any easy tool/code to do that?
    Last edited by PoorSeq; 10-30-2013, 10:25 PM.

Latest Articles

Collapse

  • 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
    ...
    Yesterday, 10:25 AM
  • SEQadmin2
    How Immunogenomics Decodes Immunity’s Genetic Blueprint
    by SEQadmin2




    The immune system’s power comes from its genetic diversity, allowing myriad threats to be neutralized through first recognizing foreign antigens. That diversity is also what makes the immune system so difficult to study. Recent advances in sequencing technology and computational biology, however, are giving researchers new tools to understand immune responses and immune-related diseases in greater detail.

    This convergence of genetics, immunology, and computation...
    09-01-2026, 05:41 AM

ad_right_rmr

Collapse

News

Collapse

Topics Statistics Last Post
Started by SEQadmin2, Today, 09:51 AM
0 responses
10 views
0 reactions
Last Post SEQadmin2  
Started by SEQadmin2, 09-25-2026, 09:06 AM
0 responses
32 views
0 reactions
Last Post SEQadmin2  
Started by SEQadmin2, 09-23-2026, 11:05 AM
0 responses
27 views
0 reactions
Last Post SEQadmin2  
Started by SEQadmin2, 09-18-2026, 11:37 AM
1 response
48 views
0 reactions
Last Post pekgio
by pekgio
 
Working...