Thank you for your reply, maybe my expression is unclear. For example, a 2x150bp read pair, the overlap is 50bp in the middle, I want this 50bp double-end sequence, and I want this 50bp R1 to be completely match 50bp R2. If the reads of R1R2 are not exactly matched, remove it.
I have a sample of double-end sequencing 18-R-001_R1._fastq.gz,18-R-001_R2._fastq.gz, how to get the overlap of R1 and R2, and filter out the reads that R1 and R2 perfectly matched.(without mismatch)
1 answer
You can use BBMerge from BBTools or FLASH to do the actual merging of the reads allowing for no mismatches.
You can then use
reformat.shfrom BBMap suite to filter your data where the merged read is exactly the same length as R1/R2 (I am assuming your reads are all identical length to begin with and have not been trimmed, e.g. you could setminlength=n+1,n = length of R1/R2). That will filter out all reads where R1 and R2 perfectly match (your requirement).If R1/R2 perfectly match but have a shorter insert than the length of sequencing, those reads would also be removed by filter above.
This can be done with bbmerge to which genomax have linked.
$ bbmerge.sh in1=18-R-001_R1._fastq.gz in2=18-R-001_R2._fastq.gz out=overlap.fastq.gz pfilter=1 trimnonoverlapping=t
in1andin2define the input filesoutdefine the output filepfilter=1leads to merging only if there is no mismatchtrimnonoverlapping=ttrimm the parts of the reads that not overlap
Log in to answer this question.
Hello 190444373 ,
could you please explain why do you think this is a good idea?
fin swimmer
maybe my expression is unclear.so it looks a little bad.