I have BAM files in the external hard drive. Want to convert them into BED. Am using
cd /media/usr/LaCie/work/client/pool1/bam
for x in *.bam ; do
echo "print current:$x";
bedtools bamToBed -i "$x" > "${x%.bam}.bed";
done
echo "done"
it writes the BED files in the directory, but they are all empty. My BEDtools is installed in
/home/usr/miniconda3/bin/bedtools
Can someone tell me where I am going wrong? And the BAM files have reads, so there is no problem there. regards.
any error message on your screen ?
error: unrecognized command: bamToBed
change
bamToBed
tobamtobed
(small letters).Hello amitpande74!
It appears that your post has been cross-posted to another site: https://stackoverflow.com/questions/64860327
This is typically not recommended as it runs the risk of annoying people in both communities.
after I added a fake header to your sam, it worked fine on my machine.
Is there a header? What does
show?
OP would have told us that there is an error message ...
Thanks @Pierre. I changed the cable of my external hard drive and now it works. Thanks to all for the kind support.