czbiohub-sf / MIDAS

Metagenomic Intra-Species Diversity Analysis (MIDAS)
MIT License
35 stars 10 forks source link

How to keep the alignment? #120

Closed FranckLejzerowicz closed 11 months ago

FranckLejzerowicz commented 11 months ago

Hello,

In this ReadTheDocs page, it is shown in the anatomy of the per-sample run_snps outputs, that the alignments are present:

|- temp
     |- snps
        |- repgenomes.bam              run_snps        Rep-genome alignment file
        |- {species}/snps_XX.tsv.lz4
  |- bt2_indexes
     |- snps/repgenomes.*              run_snps        Sample-specific rep-genome database

However, both the temp and bt_indexes folder turn out empty after a successful run of run_snps.

I do not remove these files and I do see in the stdout:

I consider hacking the tool for not-removing these files that would be useful to my work.

Please, is there a way/flag to tell midas2 to keep these output files?

Thanks, Franck

FranckLejzerowicz commented 11 months ago

Probably answering to myself here, but the code seems to allow for --debug to get me where I want - correct? https://github.com/czbiohub-sf/MIDAS2/blob/a293ce62355e88dc0f12145871ff47110bc8f712/midas2/subcommands/run_snps.py#L850-L853 Thanks

zhaoc1 commented 11 months ago

Yes! --debug is the way to go for keeping all the temp files, including the alignment files.