Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

consensus.pl cannot open file #1

Open
tallnuttcsiro opened this issue Jun 30, 2015 · 3 comments
Open

consensus.pl cannot open file #1

tallnuttcsiro opened this issue Jun 30, 2015 · 3 comments

Comments

@tallnuttcsiro
Copy link

Hi,

definitely have the correct file name and path, the always get this error:

home> ~/bin/fasta_utils/consensus.pl test_sorted.bam
Use of uninitialized value $filename in string at /OSM/HOME-MEL/all29c/bin/fasta_utils/consensus.pl line 101.
Use of uninitialized value $filename in concatenation (.) or string at home/bin/fasta_utils/consensus.pl line 101.
No such file or directory:Could not open

Thanks,

Theo

@westerman
Copy link

Just started exploring consensus.pl myself. Looks to be suspect. Help documentation is wrong. From what I can tell the program expects (1) reference file, (2) bed file, (3) bam file which explains tallnuttcsiro's errors. Program does not catch missing files. Even when files are given it can not open gzipped file. Has not been updated since 2013 thus my confidence in the program is low,

@jimhester
Copy link
Owner

No need to be inflammatory @westerman.

As you say the script needs three input files, I apologize for the documentation inconsistency.

It can open a gzipped or bzipped file if you have pigz or pbzip on your PATH. (see scripts/consensus.pl#L25-L29).

It also requires that wrap.pl is in ~/fu which it will not be most cases. (scripts/consensus.pl#L87) and is likely the reason you are both having difficulty. That line should be changed to look for wrap.pl on the PATH rather than hard-coded.

This also assumes mpileup output from ~2013, which is pre-HTSlib, so I cannot be sure the format has remained the same.

I would probably not recommend using this script directly, but instead use it as a reference on parsing the output and adapt to your needs.

@westerman
Copy link

Wasn't trying to be inflammatory. Just pointing out that the help is not correct, that I did not (and cannot) get a gzip file to open, and that the program hasn't been updated since 2013. Thus, for all I know, the program may be unusable and abandoned. Heavens knows I have some programs of my own like that -- still in my overall path but ones I never use because they are broken.

As for the gzip file, below is my command line, the response, and where pigz is located:

]> consensus.pl Carpophilus.fa 017150_c-yuc-GATK-HaplotypeCaller.vcf.gz 017150_c-yuc.sorted.bam

No such file or directory:Could not open pigz -dc < 017150_c-yuc-GATK-HaplotypeCaller.vcf.gz|

which pigz
/usr/bin/pigz

Running the command 'pigz -dc < 017150_c-yuc-GATK-HaplotypeCaller.vcf.gz' without the pipe outside of 'consensus.pl' works fine. Also works with 'more' or 'cat' after the pipe. But is not working within consensus.pl.

Thanks for your work on the rest of the utilities.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants