Question: Read detection with pattern in paired end FASTQ file
0
gravatar for amitpande74
4 days ago by
amitpande7410
amitpande7410 wrote:

HI, I have paired end reads, and want to extract reads which have the insert TGTATGTAAACTTCCGACTTCAACTGTAin them. I tried with grep -A2 -B1 "TGTATGTAAACTTCCGACTTCAACTGTA" input.fq |grep -v "^\-\-$" > 1.fq and 2.fq But they dont align with Bowtie2 anymore, because the reads have differing headers. I even tried using bbduk.sh in1=input_1.fq in2=input_2.fq out1=matched_1.fq out2=matched_2.fq k=28 literal=TGTATGTAAACTTCCGACTTCAACTGTA rcomp=f but it is of no avail. Can someone help. Regards.

awk paired end fastq • 59 views
ADD COMMENTlink modified 4 days ago by GenoMax94k • written 4 days ago by amitpande7410
1
gravatar for Pierre Lindenbaum
4 days ago by
France/Nantes/Institut du Thorax - INSERM UMR1087
Pierre Lindenbaum133k wrote:
paste <(cat fq1 | paste - - - - )  <(cat fq2 | paste - - - - )  |  grep  TGTATGTAAACTTCCGACTTCAACTGTA | tr "\t" "\n" > interleaved.fastq
ADD COMMENTlink written 4 days ago by Pierre Lindenbaum133k
1
gravatar for GenoMax
4 days ago by
GenoMax94k
United States
GenoMax94k wrote:

but it is of no avail.

You should set the value of k= to something less than 1/2 of the length of string you are trying to search. Unless you do that the initial seed matches may not be found. I would try k=9 with your bbduk.sh command.

because the reads have differing headers.

That is a different issue. Are your reads out of sync in R1/R2 files? If so you need to repair.sh them.

ADD COMMENTlink modified 4 days ago • written 4 days ago by GenoMax94k
0
gravatar for cpad0112
4 days ago by
cpad011214k
Hyderabad India
cpad011214k wrote:

With seqkit:

$ seqkit grep -srip "TGTATGTAAACTTCCGACTTCAACTGTA"  input.fq(.gz)
ADD COMMENTlink written 4 days ago by cpad011214k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 2217 users visited in the last hour
_