vice87 / gam-ngs

Genomic Assemblies Merger for NGS
GNU General Public License v3.0
26 stars 10 forks source link

Bam files not found #16

Closed Tetrajf closed 10 years ago

Tetrajf commented 10 years ago

Dear Ricardo

I'm really stuck with just getting the block construction going. I keep getting errors saying that my bam file doesn't exist- which of course it does. I'm probably just doing something stupid....

I don't quite understand how I should be pointing to the bai file and the bam file.

This is my master bam PE file:

This is my master.PE.bams.txt file:

/scratch/sysusers/src/gam-ngs-master/bin/SOAP35.bam 200 600

Should it be:

/scratch/sysusers/src/gam-ngs-master/bin/SOAP35.bam 200 600 /scratch/sysusers/src/gam-ngs-master/bin/SOAP35.bam.bai 200 600

Obviously I have tried both ways and they haven't worked.

My command is:

gam-create --master-bam SOAP35.txt --slave-bam SOAP110.txt --min-block-size 10 --output SOAPmerged

Pretty simple.

I created my bam file using bwa mem, then samtools view to create a bam file , then samtools sort and finally samtools index to create the bai file.

I feel like this error would be due to something being wrong with my bam file but I don't see why.

Your help would be greatly appreciated. Jonathan

vice87 commented 10 years ago

That is really strange. First of all, the correct version of the input file is the first one (you don't need to specify the path of the *.bai file). Could you please provide the exact command and output that gives you the error? Are you sure the file is accessible from where you run gam-create command?

Tetrajf commented 10 years ago

Dear Ricardo

Thank you for the prompt reply. Apologies that mine in turn was slow.

The file is accessible from where I run it. In fact I have simply kept the files in the gam-ngs-master/bin folder. But I tried it elsewhere as well obviously with those paths defined.

Here is the exact command I ran now:

[Jonathan@cn06 bin]$ ./gam-create --master-bam SOAP35ass.txt --slave-bam SOAP110ass.txt --min-block-size 10 --output gammergedsoap [main] opening BAM files [error] master BAM file "/scratch/sysusers/Jonathan/src/gam-ngs-master/bin/SOAP35.bam " doesn't exist

I wonder if it's not a file system problem. Im running this on a cluster with red hat linux and a lustre file system. The lustre file system has been a problem for me in the past, for example celera doesn't work on it so I can't run masurca. I'm going to try it on a different system where I know it works as well.

Regards Jonathan

Tetrajf commented 10 years ago

Ok I tried it on a different system and now I get this error:

solexa2:bin admin$ ./gam-create --master-bam /Users/admin/NGS/Jonathan/Forgam/SOAP35/SOAP35.bam --slave-bam /Users/admin/NGS/Jonathan/Forgam/SOAP110/SOAP110.bam --min-block-size 10 --output gamtetsoap [main] opening BAM files <??|????f?????????˿????o????????/??????????????????????????????h?O??????o??1???߆???c?x??|????????9???{???$V?4????A????]?V??.n?8???J?O?]?M??>?:???:<???N????ެ,????;?+????c???{??1f?OC3`????S>f??Yf??t???/????p? ??Z?C? v???-??? ??u??Xu ???ms???|??:1J???׭?;?ym9??u???gb???1??˔?q" doesn't exist

vice87 commented 10 years ago

This last error is due to the fact you provided the *.bam files directly as --master-bam/--slave-bam parameters. As written in the readme file, you should provide a file which contains a list of bam files.

About the previous one I've just found a bug in GAM-NGS regarding file paths. If there are white spaces at the end of them, they are not found. So you should run your previous command, deleting the trailing space in the path "/scratch/sysusers/Jonathan/src/gam-ngs-master/bin/SOAP35.bam " in your SOAP35.txt file.

vice87 commented 10 years ago

I've also updated the repository, so the last version does not have this problem.

Tetrajf commented 10 years ago

Oops yes apologies. I know I musn't run the bam files directly. As you can see from the first example I used the txt file to describe the file locations and PE distribution. Ok I will remove whitespace characters and then if that doesn't work I'll try the new version! Thank you so much!

Tetrajf commented 10 years ago

Apologies for wasting your time for something like a whitespace character!

vice87 commented 10 years ago

You should not. Instead, I have to apologize for not caring much about these details :P