Question: Paired-end reads that span a position in an assembly
gravatar for saladi1
11 months ago by
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 11 months ago by Pierre Lindenbaum129k • written 11 months ago by saladi130
gravatar for Pierre Lindenbaum
11 months ago by
France/Nantes/Institut du Thorax - INSERM UMR1087
Pierre Lindenbaum129k wrote:

using samjdk. 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 11 months ago by Pierre Lindenbaum129k
Please log in to add an answer.


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