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, 12-17-2024, 10:28 AM
|
0 responses
33 views
0 likes
|
Last Post
by seqadmin
12-17-2024, 10:28 AM
|
||
Started by seqadmin, 12-13-2024, 08:24 AM
|
0 responses
49 views
0 likes
|
Last Post
by seqadmin
12-13-2024, 08:24 AM
|
||
Started by seqadmin, 12-12-2024, 07:41 AM
|
0 responses
34 views
0 likes
|
Last Post
by seqadmin
12-12-2024, 07:41 AM
|
||
Started by seqadmin, 12-11-2024, 07:45 AM
|
0 responses
46 views
0 likes
|
Last Post
by seqadmin
12-11-2024, 07:45 AM
|
Comment