CFSAN-Biostatistics / snp-pipeline

SNP Pipeline is a pipeline for the production of SNP matrices from sequence data used in the phylogenetic analysis of pathogenic organisms sequenced from samples of interest to food safety.
Other
57 stars 31 forks source link

snp_filter.py fail #6

Closed gotero closed 7 years ago

gotero commented 7 years ago

Hi- I can't seem to get snp_filter.py to work. This is the error I get: $ snp_filter.py -n var.flt.vcf sampleDirectories.txt reference.fa Traceback (most recent call last): File "/Users/gotero/local/snp-pipeline/scripts/snp_filter.py", line 48, in snppipeline.remove_bad_snp(args_dict) AttributeError: 'module' object has no attribute 'remove_bad_snp'

The rest of the pipeline works fine, although I've only been running step-by-step workflows, not the all-in-one workflows. Here's the error I get when running "$setup.py test":

====================================================================== FAIL: test_1_snp_filter (test.test_snppipeline.SnpPipelineLambdaVirusTest) Run snp_filter and verify var.flt_preserved.vcf and var.flt_removed.vcf contains expected contents for each sample.

Traceback (most recent call last): File "/Users/gotero/local/snp-pipeline/test/test_snppipeline.py", line 168, in test_1_snp_filter self.run_function_test(snppipeline.remove_bad_snp, args_dict, os.path.join(dir, 'var.flt_removed.vcf')) File "/Users/gotero/local/snp-pipeline/test/test_snppipeline.py", line 98, in run_function_test self.assertTrue(new_timestamp > old_timestamp, "Old file was not overwritten with newer timestamp: %s" % file_to_compare) AssertionError: Old file was not overwritten with newer timestamp: samples/sample1/var.flt_removed.vcf


Ran 12 tests in 25.649s

FAILED (failures=1)

My environment: OS X v10.11.6 Python version = 2.7.12 |Anaconda 2.4.1 biopython 1.65 psutil 5.0.1 setuptools 27.2.0 PyVCF 0.6.8 Bowtie2 v2.2.6 samtools 1.3.1 varscan 2.3.7

Suggestions?

Thanks for creating and sharing a fantastic variant calling framework!

Glen

stevendavis commented 7 years ago

This smells like an install problem. I think you may have an old version of the snppipeline module. I recommend either upgrading or re-installing.

Upgrade

pip install --user --upgrade snp-pipeline

Reinstall

pip uninstall snp-pipeline pip install --user snp-pipeline

gotero commented 7 years ago

Looks like it was an install problem. I ran:

pip install --user --upgrade snp-pipeline

and it upgraded Biopython and setuptools. Initially I ran "$python setup.py developer", thinking that would do a complete install as well. Clearly not.

Thanks for the quick reply!

Glen

stevendavis commented 7 years ago

Happy to help. By the way, be sure to notice the new files generated in version 0.7.0. Closing this issue.