Unconfigured Ad
Collapse
X
-
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.
-
Hmm, bioawk seems pretty neat.Originally posted by PoorSeq View Postbioawk -c fastx '/SEQUENCE/ {print "@"$name; print $seq; print "+"; print $qual }' inut.fq > output.fq
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:
-
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:
-
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:Originally posted by PoorSeq View PostI'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?
If your input is unzipped use "paste - - - - < fastq.fq" instead of "gunzip -c fastq.fq.gz \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
| paste - - - -"
Leave a comment:
-
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:
-
Okay, that's doable with grep, and very quick.I have a FLASH stitched fastq file from my paired end data, from which I want to sort the reads containing a particular sequence
Wait, what? You want any subsequence? Will one base pair do? What are your limits?or part of that sequence
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
-
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...-
Channel: Articles
-
-
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...-
Channel: Articles
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
by SEQadmin2
Today, 09:51 AM
|
||
|
Started by SEQadmin2, 09-25-2026, 09:06 AM
|
0 responses
32 views
0 reactions
|
Last Post
by SEQadmin2
09-25-2026, 09:06 AM
|
||
|
Started by SEQadmin2, 09-23-2026, 11:05 AM
|
0 responses
27 views
0 reactions
|
Last Post
by SEQadmin2
09-23-2026, 11:05 AM
|
||
|
Started by SEQadmin2, 09-18-2026, 11:37 AM
|
1 response
48 views
0 reactions
|
Last Post
by pekgio
09-21-2026, 02:04 AM
|
Leave a comment: