dnanexus-archive / parliament2

Runs a combination of tools to generate structural variant calls on whole-genome sequencing data
Apache License 2.0
102 stars 39 forks source link

Error: ERROR: An invalid (nonexistent) input file has been specified. #43

Closed rahulk87 closed 5 years ago

rahulk87 commented 5 years ago

Hi,

I am trying to run on a ubuntu machine and this is my command:

"sudo docker run -v /home/ubuntu/data:/home/dnanexus/in -v /home/ubuntu/data/output:/home/dnanexus/out dnanexus/parliament2:0.1.9 --bam test.bam --bai test.bam.bai --fai hg19/hg19.fa.fai -r hg19/hg19.fa --breakdancer --cnvnator --manta --genotype"

I am getting this error: "ERROR: An invalid (nonexistent) input file has been specified." But I can see all the inputs are valid and present in current directory. But somehow parliament taking this path by default "/home/dnanexus/in/input.bam" which is obviously not presnt, it shoud take this path "/home/ubuntu/data/input.bam" which I defined in my command.

Its is adding "/home/dnanexus/in" before every input file.

Can you please help me with that.

Thanks, Rahul

MaestSi commented 5 years ago

I don't know if it could be of help, but in my experience I had a similar issue when the bam file was not phisically copied in the input directory, but only referenced through a soft (symbolic) link. As for the error messages, I think that it is normal that Parliament2 specifies home/dnanexus/in/ as the directory where the inputs are being looked for, because you are mounting that directory on /home/ubuntu/data. In version 0.1.9, when the input bam file is found, it is renamed to 'input.bam' (probably a bug). Your bam file is /home/ubuntu/data/test.bam, right?

rahulk87 commented 5 years ago

Thanks MaestSi for your comment. Yes, my input is /home/ubuntu/data/test.bam. I copied the bam files physically in that directory not just symlinked, still getting this error. When I changed the "/home/dnanexus/in/{0}" to {0} in parliament2.py, it started doing things, which suggest that it is adding "/home/dnanexus/in" as absolute path. But hen i got some other errors.

slzarate commented 5 years ago

Hi @rahulk87, I'm glad this got resolved. If you have questions about your other errors, feel free to open another issue. I'll close this specific issue as it's been resolved.

slzarate commented 5 years ago

@rahulk87 I forgot to add that the "/home/dnanexus/in" is hard-coded as an absolute path to allow for this Docker image to effectively run on DNAnexus as an app. I plan on removing this in future releases to avoid issues like yours. Thank you!

snashraf commented 5 years ago

My command is :

docker run -v /gpfs/projects/hs37d5/bwa.7.1.2/:/home/dnanexus/in -v /gpfs/projects/bioinfo/najeeb/playGround/parliament2/:/home/dnanexus/out dnanexus/parliament2 --bam 0200285501.bwa.bam --bai 0200285501.bwa.bam.bai --fai hs37d5.fa.fai -r hs37d5.fa --breakdancer --cnvnator --manta --genotype

and I am getting below error. Traceback (most recent call last): File "/home/dnanexus/parliament2.py", line 80, in main() File "/home/dnanexus/parliament2.py", line 76, in main run_parliament(args.bam, args.bai, ref_genome_name, args.fai, prefix, args.filter_short_contigs, args.breakdancer, args.breakseq, args.manta, args.cnvnator, args.lumpy, args.delly_deletion, args.delly_insertion, args.delly_inversion, args.delly_duplication, args.genotype, args.svviz, args.svviz_only_validated_candidates, args.dnanexus) File "/home/dnanexus/parliament2.py", line 49, in run_parliament subprocess.check_call(['bash', 'parliament2.sh', bam, bai, ref_genome, fai, prefix, str(filter_short_contigs), str(breakdancer), str(breakseq), str(manta), str(cnvnator), str(lumpy), str(delly_deletion), str(delly_insertion), str(delly_inversion), str(delly_duplication), str(genotype), str(svviz), str(svviz_only_validated_candidates), str(dnanexus)]) File "/miniconda/lib/python2.7/subprocess.py", line 190, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['bash', 'parliament2.sh', '/home/dnanexus/in/0200285501.bwa.bam', '/home/dnanexus/in/0200285501.bwa.bam.bai', '/home/dnanexus/in/hs37d5.fa', '/home/dnanexus/in/hs37d5.fa.fai', '0200285501.bwa', 'False', 'True', 'False', 'True', 'True', 'False', 'False', 'False', 'False', 'False', 'True', 'False', 'False', 'False']' returned non-zero exit status 1

Do I need to have the same mount point for INPUT BAM and REF data? Can't we add more mount point for REF_DATA. I mean I can't have BAM file and REF data as the same mount point.

MaestSi commented 5 years ago

Hi @snashraf , yes, I think that the BAM file, the reference genome and its index should all be in /gpfs/projects/hs37d5/bwa.7.1.2/ directory. If the reference and the BAM are in different folders but on the same disk you could try to hard link them with something like: cd /gpfs/projects/hs37d5/bwa.7.1.2/ ; ln /path/to/bam ; ln /path/to/reference ; ln /path/to/fai ; ln /path/to/bai. Moreover, probably it is not going to be an issue, but after dnanexus/parliament2 I also specified the Parliament2 version, so I had dnanexus/parliament2:0.1.9. Simone