katerinakazantseva / strainy

Graph-based assembly phasing
Other
43 stars 4 forks source link

Output directory as a parameter. #2

Closed mikolmogorov closed 1 year ago

mikolmogorov commented 1 year ago

Currently if I run freshly cloned metaphase, I get:

Traceback (most recent call last):
  File "/Users/kolmogorovma/Work/projects/metaPhase/metaPhase.phase.py", line 8, in <module>
    from cluster import cluster
  File "/Users/kolmogorovma/Work/projects/metaPhase/cluster.py", line 112, in <module>
    stats = open('output/stats.txt', 'a')
FileNotFoundError: [Errno 2] No such file or directory: 'output/stats.txt'

Output directory should be command line parameter, and it should be created if not exist.

katerinakazantseva commented 1 year ago

usage: metaPhase.phase.py [-h] -o OUTPUT -b BAM -g GFA -f FA [-s SNP]

optional arguments: -h, --help show this help message and exit -s SNP, --snp SNP vcf file

required named arguments: -o OUTPUT, --output OUTPUT output dir -b BAM, --bam BAM bam file -g GFA, --gfa GFA gfa file -f FA, --fa FA fa file