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, 04-11-2024, 12:08 PM
|
0 responses
31 views
0 likes
|
Last Post
by seqadmin
04-11-2024, 12:08 PM
|
||
Started by seqadmin, 04-10-2024, 10:19 PM
|
0 responses
32 views
0 likes
|
Last Post
by seqadmin
04-10-2024, 10:19 PM
|
||
Started by seqadmin, 04-10-2024, 09:21 AM
|
0 responses
28 views
0 likes
|
Last Post
by seqadmin
04-10-2024, 09:21 AM
|
||
Started by seqadmin, 04-04-2024, 09:00 AM
|
0 responses
53 views
0 likes
|
Last Post
by seqadmin
04-04-2024, 09:00 AM
|
Comment