Hello! I have a problem with samtools. I need to sort a BAM file, so I wrote:
"samtools sort -o file.bam sorted" on the terminal.
At first it seemed worked but after it has stopped. So I pressed enter button and appeared the following error message:
"bash:syntax error near unespected token"https://postimg.org/image/b089q3xzl/
I decided to try again and, in this second case, it worked for a while and then appeared another error message (I didn't press any button!): https://postimg.org/image/984n6g3r5/ https://postimg.org/image/on60mc1br/
I really don't know how to solve this problem...Is there someone that can help me? Thanks for the attention!
You did not attach/include the images for the errors correctly in your post but at a higher level you should be using
samtools sort -o myfile_sorted.bam myfile.bam
as the command for sorting.Thank you! I'll try this solution! However if you click right mouse button on the "error image" and then open in another page you probably will see the image!
Fixed the links in your original post for the images.
Ouch! Your bash shell is crashing .. pretty unusual. It also appears that you are using an external drive to hold/process the data. Is that correct? Virtual machine plus external storage does not appear to be a good combination here.
I do "samtools sort" in shared folder beacause the virtual machine that I have it was provided by the teacher of my course in bioinformatics and it haven't a lot of memory... in fact if I do the sort in a folder of the virtual maching the merging is impossible. During the sort a certain number of little folders are created and then they are merged but cause the memory of the virtual machine is not to big, it don't create the correct number of little folders and so no merging occurs!