zjshi / Maast

Microbial agile accurate SNP Typer
MIT License
24 stars 2 forks source link

maast tree --input-list option #9

Closed snayfach closed 1 year ago

snayfach commented 2 years ago

Looks like the --input-list flag requires user to prepare a custom input file containing paths to files in the <outdir>/temp/genotype/aln/ directory. Right?

It would be nice if users only needed to provide the path to the maast output directory and (optionally) a list of genomes to include in the tree (default=all)

Is that doable?

zjshi commented 2 years ago

Yes, changes have been made

snayfach commented 2 years ago

Looks like there's a bug:

$ Maast/maast tree --input-dir ./101346_out --out-dir test

SNP tree building; start skip ./101346_out/temp: not exist skip ./101346_out/gt_results: not exist Traceback (most recent call last): File "/global/cscratch1/sd/snayfach/test/Maast/bin/Maast.py", line 1355, in main() File "/global/cscratch1/sd/snayfach/test/Maast/bin/Maast.py", line 1348, in main tree_main(args) File "/global/cscratch1/sd/snayfach/test/Maast/bin/Maast.py", line 1299, in tree_main concat_alleles.concat_allele_tree(args) File "/global/cscratch1/sd/snayfach/test/Maast/snps_io/concat_alleles.py", line 340, in concat_allele_tree input_rec = read_gtp(path, min_depth) File "/global/cscratch1/sd/snayfach/test/Maast/snps_io/concat_alleles.py", line 148, in read_gtp contig_pos = items[1] IndexError: list index out of range

Note that ./101346_out/temp and ./101346_out/gt_results do exist

zjshi commented 2 years ago

--input-dir can use ./101346_out/gt_results here. Let me know please if the problem persists.