Dear all,
I downloaded a file in .BAM format and want to transform it into .BED format. What can I do? Thanks a lot!
Zhen
I downloaded a file in .BAM format and want to transform it into .BED format. What can I do? Thanks a lot!
Zhen
You are currently viewing the SEQanswers forums as a guest, which limits your access. Click here to register now, and join the discussion
$ bamToBed -i reads.bam > reads.bed
$ bamToBed -i reads.bam -ed > reads.bed
$ bamToBed -i reads.bam -bedpe > reads.bedpe
$ pairToBed -abam reads.bam -b SSRs.bed -type neither > reads.noSSRs.bam
$ pairToBed -abam reads.bam -b segdups.bed -type both > reads.SSRs.bam
$ pairToBed -abam reads.bam -b segdups.bed -type notboth > reads.notbothSSRs.bam
samtools view -F 0x0004 $filein | awk '{OFS="\t"; if (and($2, 16)) print $3,$4,$4+length($10),$1,$5,"-"; else print $3,$4,$4+length($10),$1,$5,"+" }
samtools view in.bam | awk '{split ($6,a,"[MIDNSHP]"); bp=$4-1; n=0; for (i=1; i<=length(a); i++) { n+=1+length(a[i]); if (substr($6,n,1)=="M") print $3"\t"bp"\t"(bp+=a[i]); if (substr($6,n,1)=="D") bp+=a[i]; } }' > out.bed
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by seqadmin, Yesterday, 02:45 PM
|
0 responses
9 views
0 likes
|
Last Post
by seqadmin
Yesterday, 02:45 PM
|
||
Started by seqadmin, 03-22-2023, 12:26 PM
|
0 responses
12 views
0 likes
|
Last Post
by seqadmin
03-22-2023, 12:26 PM
|
||
Started by seqadmin, 03-17-2023, 12:32 PM
|
0 responses
16 views
0 likes
|
Last Post
by seqadmin
03-17-2023, 12:32 PM
|
||
Started by seqadmin, 03-15-2023, 12:42 PM
|
0 responses
21 views
0 likes
|
Last Post
by seqadmin
03-15-2023, 12:42 PM
|
Comment