Skip to content

Commit

Permalink
make anvi-self-test --suite workflow-contigs work
Browse files Browse the repository at this point in the history
  • Loading branch information
meren committed Aug 3, 2023
1 parent 98b9011 commit 14c8c67
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 6 deletions.
19 changes: 16 additions & 3 deletions anvio/tests/run_workflow_tests_for_contigs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,25 @@ SETUP_WITH_OUTPUT_DIR $1 $2

INFO "Setting up the pan analysis directory"
mkdir $output_dir/workflow_test
cp $files/mock_data_for_pangenomics/*.fa $output_dir/workflow_test/
cp $files/mock_data_for_pangenomics/*.db $output_dir/workflow_test/
cp $files/workflows/contigs/* $output_dir/workflow_test/
cd $output_dir/workflow_test

INFO "compressing sample 1"
gzip 01.fa
# all we need a FASTA file here to get things to work, so we
# will start by migrating the anvi'o contigs-db files
anvi-migrate *.db --migrate-quickly --quiet

# then generate some files as expected by the test:
anvi-export-contigs -c E_faecalis_6240.db -o E_faecalis_6240.fa
anvi-export-contigs -c E_faecalis_6255.db -o E_faecalis_6255.fa
anvi-export-contigs -c E_faecalis_6512.db -o E_faecalis_6512.fa

# compressing one of the FASTA files to match the `fasta.txt` coming
# from `$files/workflows/contigs/fasta.txt`
gzip E_faecalis_6240.fa

# and get rid of the contigs-db files, and resume normal operations
rm -rf E_fa*.db

INFO "Creating a default config for contigs workflow"
anvi-run-workflow -w contigs --get-default-config default-config.json
Expand Down
6 changes: 3 additions & 3 deletions anvio/tests/sandbox/workflows/contigs/fasta.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name path
s01 01.fa.gz
s02 02.fa
s03 03.fa
E_faecalis_6240 E_faecalis_6240.fa.gz
E_faecalis_6255 E_faecalis_6255.fa
E_faecalis_6512 E_faecalis_6512.fa

0 comments on commit 14c8c67

Please sign in to comment.