bactopia icon indicating copy to clipboard operation
bactopia copied to clipboard

[question] mapping directory

Open Svnipni opened this issue 2 years ago • 7 comments

Hello Robert!

I'm having a lot of fun with this pipeline. Right now I'm trying to have bactopia output the mapping files (.bam) too. Thusfar, I hadn't really needed it but I'm trying out a few new tools.

I must be missing something of course. What parameters do I need to provide for bactopia to output and keep the mapping .bam files?

Cheers!

Svnipni avatar Nov 16 '23 15:11 Svnipni

Hi @Svnipni

Glad you are having fun! Are you wanting to get BAM files based alignments to a reference?

Cheers, Robert

rpetit3 avatar Nov 16 '23 15:11 rpetit3

Hi Robert! No, preferably aligned to the assembled genome. Amongst other things, I mean to wrap several samples up to construct a pangenome with anvio. If I understand correctly, it needs the .bam file mapped to the fasta and contig.db it constructs.

Svnipni avatar Nov 16 '23 15:11 Svnipni

If you are using Illumina data one thing you could consider is running Snippy with --skip_phylogeny then make use of the BAM files output from Snippy.

rpetit3 avatar Nov 16 '23 15:11 rpetit3

Thank you! I tried running snippy before, but it didn't recognize the genbank reference file downloaded from NCBI.

echo "ERROR: Reference file (GCA_012767755.2.gb) does not appear to be a GenBank file"
      exit 1

Just for giggles, I tried it with the annotated .gbk.gz output from bactopia but got the same error.

Svnipni avatar Nov 20 '23 10:11 Svnipni

I ran into this issue with snippy. Snippy doesn't like zipped reference files. Unzip the gbk file and it should work.

Caitgwill avatar Nov 28 '23 02:11 Caitgwill

Should we fix this? In other words, should a compressed Genbank file be an allowed input? (I personally think it should be, and am failing to remember why I didn't allow it.)

rpetit3 avatar Nov 28 '23 03:11 rpetit3

Yes, I think it would be good to allow compressed gbk and fna files as inputs.

Caitgwill avatar Nov 28 '23 16:11 Caitgwill

Hi everyone,

I don't remember when I added it, but the snippy tool will now allow uncompressed and compressed reference files.

Cheers, Robert

rpetit3 avatar Mar 21 '25 19:03 rpetit3