Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] anvi-merge error (can I put multiple contigs.db in the code?) #2204

Closed
soojunglee98 opened this issue Jan 23, 2024 · 1 comment
Closed

Comments

@soojunglee98
Copy link

soojunglee98 commented Jan 23, 2024

Trying to merge profile-db from different configs.db

I have 12 samples but each one has each contigs.db
But I can't merge profile.db from each contigs.db..
Does someone knows how to fix this problem?

anvi'o version

anvi-self-test --version

Anvi'o .......................................: marie (v8)
Python .......................................: 3.10.13
Profile database .............................: 38
Contigs database .............................: 21
Pan database .................................: 16
Genome data storage ..........................: 7
Auxiliary data storage .......................: 2
Structure database ...........................: 2
Metabolic modules database ...................: 4
tRNA-seq database ............................: 2

This is the code

source ~/.bashrc
source activate /home/lsoojung/miniconda3/envs/anvio-7

cd /scratch/raskin_root/raskin1/lsoojung/metaspades_bin/coassembly_bin/4_bam_files

anvi-merge s*_sorted/PROFILE.db -o SAMPLES-MERGED -c Sample1_contigs.db Sample2_contigs.db Sample3_contigs.db Sample4_contigs.db Sample5_contigs.db Sample6_contigs.db Sample7_contigs.db Sample8_contigs.db Sample9_contigs.db Sample10_contigs.db Sample12_contigs.db Sample14_contigs.db

The error

usage: anvi-merge [-h] -c CONTIGS_DB [-o DIR_PATH] [-S NAME]
[--description TEXT_FILE] [--skip-hierarchical-clustering]
[--enforce-hierarchical-clustering]
[--distance DISTANCE_METRIC] [--linkage LINKAGE_METHOD] [-W]
[--version] [--debug] [--force] [--fix-sad-tables] [--quiet]
[--no-progress] [--as-markdown] [--display-db-calls]
[--force-use-my-tree] [--force-overwrite]
[--tmp-dir TMP_DIR] [--I-know-this-is-not-a-good-idea]
SINGLE_PROFILE(S) [SINGLE_PROFILE(S) ...]
anvi-merge: error: unrecognized arguments: Sample2_contigs.db Sample3_contigs.db Sample4_contigs.db Sample5_contigs.db Sample6_contigs.db Sample7_contigs.db Sample8_contigs.db Sample9_contigs.db Sample10_contigs.db Sample12_contigs.db Sample14_contigs.db

@ivagljiva
Copy link
Contributor

ivagljiva commented Jan 23, 2024

Hi @soojunglee98, you cannot merge multiple contigs DBs, and you also cannot merge profile DBs that are not associated with the same contigs database. Merging profiles only works if the read recruitment for each was done on the same reference contigs.

So if you want to merge everything into one contigs DB-profile DB pair, you would need to start your workflow from the beginning by combining all contigs into the same reference FASTA, create a single contigs DB from that reference, and then do read recruitment on that reference to get several profile DBs all linked to the same set of contigs, and then run anvi-merge.

I hope this makes sense.

(The error from anvi-merge is happening because you cannot provide more than one contigs db to the -c parameter)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants