Question: Paired-end reads that span a position in an assembly
1
gravatar for saladi1
6 days ago by
saladi130
United States
saladi130 wrote:

I need to find pairs of reads that span a certain position in an assembly. However, neither needs to necessarily correspond to that position. To be clear, here is an example:

assembly: ----------------------[=====================]----------------------------

pair A:   -----[<<<<<]------------------------------------[>>>>>]------------------

pair B:   -------------------------[<<<<<]------------------------[>>>>>]----------

I am interested in the positions [=====] in the assembly. I am looking for pairs of reads like read pair A. I can find reads like read pair B using bedtools intersect, but I am not interested in these.

ADD COMMENTlink modified 6 days ago by Pierre Lindenbaum122k • written 6 days ago by saladi130
1
gravatar for Pierre Lindenbaum
6 days ago by
France/Nantes/Institut du Thorax - INSERM UMR1087
Pierre Lindenbaum122k wrote:

using samjdk. http://lindenb.github.io/jvarkit/SamJdk.html Say you want spanning RF01:1000-2000.

samtools view -u S1.bam RF01 | java -jar dist/samjdk.jar -e 'if(record.getReadUnmappedFlag() || !record.getReadPairedFlag() || record.getMateUnmappedFlag() || !record.getContig().equals(record.getMateReferenceName()) || !record.getContig().equals("RF01")) return false;  return(Math.min(record.getStart(),record.getMateAlignmentStart()) < 1000 && Math.max(record.getStart(),record.getMateAlignmentStart())>2000) ;'
ADD COMMENTlink written 6 days ago by Pierre Lindenbaum122k
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: 1073 users visited in the last hour