error in bam to bed
4
0
Entering edit mode
6.4 years ago
A ★ 4.0k

sorry friends, 

i have a sorted bam file, i entered 

[izadi@lbox161 izadi]$ $BED/bamToBed  -i eg1_highquality.sorted > eg1_highquality.bed
Failed to open BAM file eg1_highquality.sorted
[izadi@lbox161 izadi]$ 

what i did wrong please?

 

bam bed bowties • 1.9k views
ADD COMMENT
1
Entering edit mode
6.4 years ago
A ★ 4.0k

guys we should tried

$BED/bamToBed -i eg1_highquality_sorted.bam > eg1_highquality.bed
--------------------------------^

thanks a lot

ADD COMMENT
2
Entering edit mode
6.4 years ago
h.mon 33k

Try:

$BED/bamToBed -i eg1_highquality.sorted.bam > eg1_highquality.bed

But really, try paying some attention, try reading the help and man pages, and try ls on the folder your files reside.

ADD COMMENT
0
Entering edit mode

thank you i tried but the same error i got...although nonsense but i am working since early morning and really too tired then thought about biostars...

ADD REPLY
3
Entering edit mode

So go get some rest before you do something really catastrophic, like erasing your home folder - talking from experience here.

When you are this tired, best case is when you review all your work and see you made tons of small mistakes. Worst case is when you do not see the small mistakes you made right away, only weeks or months later.

ADD REPLY
2
Entering edit mode
6.4 years ago

Or just use convert2bed, which uses standard Unix streams:

$ bam2bed < reads.bam > reads.bed

Much simpler.

ADD COMMENT
0
Entering edit mode

thank you Alex

ADD REPLY
0
Entering edit mode

sorry Alex, I dowloaded bedops_linux_i386-v2.4.14.tar.bz2, then I after unzipping with tar -xvf file.tar a file named bin was produced which is in the same folder in where I placed my sorted.bam file...

I tried to convert bam to bed

[izadi@lbox161 ~]$ bash
[izadi@lbox161 ~]$ cd /usr/data/nfs6/izadi
[izadi@lbox161 izadi]$ pwd
/usr/data/nfs6/izadi
[izadi@lbox161 izadi]$ bam2bed < eg11_highquality_sorted.bam >eg11_highquality_sorted.bed
bash: eg11_highquality_sorted.bam: No such file or directory
[izadi@lbox161 izadi]$

what is my fault here please?

ADD REPLY
0
Entering edit mode

It looks like eg11_highquality_sorted.bam isn't present in the current directory (/usr/data/nfs6/izadi).

ADD REPLY
0
Entering edit mode

Make sure that BEDOPS binaries can be found in your environment's PATH and, also, that your BAM file is where you think it is.

ADD REPLY
1
Entering edit mode
6.4 years ago
Danielk ▴ 620

Typo? Should it be " eg1_highquality.sorted.bam"? (.bam is missing in your command). 

ADD COMMENT
0
Entering edit mode

Maybe this whole thread could be deleted as it's only fixing a typo?

ADD REPLY

Login before adding your answer.

Traffic: 2153 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6