I did correct it, yet it does not work.
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.
1 answer
error: unrecognized command: bamToBed
bedtools bamtobed ....
has the error message changed?
Now there is no error message...giving an impression that it works. But still cannot see it in the top command.It has made an empty file in the folder titled .bed....am waiting to see if the script writes anything there. Shall keep you all updated. Thanks for the patience you people have shown.
show us a few reads from a bam please.
Log in to answer this question.
any error message on your screen ?
error: unrecognized command: bamToBed
change
bamToBedtobamtobed(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.