Skip to content

srinivasramachandran/sam2bed

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sam2bed

Converting sam to bed files with paired end data

To convert sam file to bedpe:

samtools sort -n <SAM_FILE> -o <BAM_FILE>

samtools view -bf 0x2 <BAM_FILE> | bedtools bamtobed -i stdin -bedpe > <BEDPE_FILE>

perl bedpe2bed.pl <BEDPE_FILE> > <BED_FILE>

The BED_FILE from above will have the fragment start and end from paired end read pair. We limit fragment size to less than 700 to throw out unexpected fragments from MNase experiments.

EXAMPLE:

perl bedpe2bed.pl test.bedpe > test_pe.bed

About

Converting sam to bed files with paired end data

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages