From 895e4caec9511ae1261be8c6bd267cd0a8828eaa Mon Sep 17 00:00:00 2001 From: boasvdp Date: Fri, 18 Feb 2022 12:20:42 +0100 Subject: [PATCH] Add extra test for flanking sequence extraction --- .github/workflows/main.yml | 7 +++++-- test/correct/correct_flanking_15bp.out | 17 +++++++++++++++++ test/correct/correct_flanking_5bp.out | 16 ++++++++++++++++ test/genomes/flanking.fasta | 3 ++- 4 files changed, 40 insertions(+), 3 deletions(-) create mode 100644 test/correct/correct_flanking_15bp.out create mode 100644 test/correct/correct_flanking_5bp.out diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ece9453..b1b5063 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -51,8 +51,11 @@ jobs: python extract_genes_abricate.py -a test/input/test.tsv -g test/genomes -o test/out_genecluster -s .fasta --genecluster cmp test/correct/correct_genecluster.fasta test/out_genecluster/input_ncbi.out # Testing with flanking sequences - python extract_genes_abricate.py -a test/input/flanking.tsv -g test/genomes -o test/out_flanking --flanking --flanking-bp 5 - cmp test/correct/correct_flanking.out test/out_flanking/flanking_blaCTX-M-15.out + python extract_genes_abricate.py -a test/input/flanking.tsv -g test/genomes -o test/out_flanking_5bp --flanking --flanking-bp 5 + cmp test/correct/correct_flanking_5bp.out test/out_flanking_5bp/flanking_blaCTX-M-15.out + # Testing with flanking sequences which run off the contig end + python extract_genes_abricate.py -a test/input/flanking.tsv -g test/genomes -o test/out_flanking_15bp --flanking --flanking-bp 15 + cmp test/correct/correct_flanking_15bp.out test/out_flanking_15bp/flanking_blaCTX-M-15.out - name: Tests with combined ABRicate files from multiple genomes run: | # Normal gene extraction should work for files with multiple genomes diff --git a/test/correct/correct_flanking_15bp.out b/test/correct/correct_flanking_15bp.out new file mode 100644 index 0000000..d997166 --- /dev/null +++ b/test/correct/correct_flanking_15bp.out @@ -0,0 +1,17 @@ +>flanking_blaCTX-M-15 +GGGGGGGGGGATGGTTAAAAAATCACTGCGCCAGTTCACGCTGATGGCGACGGCAACCGT +CACGCTGTTGTTAGGAAGTGTGCCGCTGTATGCGCAAACGGCGGACGTACAGCAAAAACT +TGCCGAATTAGAGCGGCAGTCGGGAGGCAGACTGGGTGTGGCATTGATTAACACAGCAGA +TAATTCGCAAATACTTTATCGTGCTGATGAGCGCTTTGCGATGTGCAGCACCAGTAAAGT +GATGGCCGCGGCCGCGGTGCTGAAGAAAAGTGAAAGCGAACCGAATCTGTTAAATCAGCG +AGTTGAGATCAAAAAATCTGACCTTGTTAACTATAATCCGATTGCGGAAAAGCACGTCAA +TGGGACGATGTCACTGGCTGAGCTTAGCGCGGCCGCGCTACAGTACAGCGATAACGTGGC +GATGAATAAGCTGATTGCTCACGTTGGCGGCCCGGCTAGCGTCACCGCGTTCGCCCGACA +GCTGGGAGACGAAACGTTCCGTCTCGACCGTACCGAGCCGACGTTAAACACCGCCATTCC +GGGCGATCCGCGTGATACCACTTCACCTCGGGCAATGGCGCAAACTCTGCGGAATCTGAC +GCTGGGTAAAGCATTGGGCGACAGCCAACGGGCGCAGCTGGTGACATGGATGAAAGGCAA +TACCACCGGTGCAGCGAGCATTCAGGCTGGACTGCCTGCTTCCTGGGTTGTGGGGGATAA +AACCGGCAGCGGTGGCTATGGCACCACCAACGATATCGCGGTGATCTGGCCAAAAGATCG +TGCGCCGCTGATTCTGGTCACTTACTTCACCCAGCCTCAACCTAAGGCAGAAAGCCGTCG +CGATGTATTAGCGTCGGCGGCTAAAATCGTCACCGACGGTTTGTAACCCCCCCCCCCCCC +C diff --git a/test/correct/correct_flanking_5bp.out b/test/correct/correct_flanking_5bp.out new file mode 100644 index 0000000..6dd26d0 --- /dev/null +++ b/test/correct/correct_flanking_5bp.out @@ -0,0 +1,16 @@ +>flanking_blaCTX-M-15 +GGGGGATGGTTAAAAAATCACTGCGCCAGTTCACGCTGATGGCGACGGCAACCGTCACGC +TGTTGTTAGGAAGTGTGCCGCTGTATGCGCAAACGGCGGACGTACAGCAAAAACTTGCCG +AATTAGAGCGGCAGTCGGGAGGCAGACTGGGTGTGGCATTGATTAACACAGCAGATAATT +CGCAAATACTTTATCGTGCTGATGAGCGCTTTGCGATGTGCAGCACCAGTAAAGTGATGG +CCGCGGCCGCGGTGCTGAAGAAAAGTGAAAGCGAACCGAATCTGTTAAATCAGCGAGTTG +AGATCAAAAAATCTGACCTTGTTAACTATAATCCGATTGCGGAAAAGCACGTCAATGGGA +CGATGTCACTGGCTGAGCTTAGCGCGGCCGCGCTACAGTACAGCGATAACGTGGCGATGA +ATAAGCTGATTGCTCACGTTGGCGGCCCGGCTAGCGTCACCGCGTTCGCCCGACAGCTGG +GAGACGAAACGTTCCGTCTCGACCGTACCGAGCCGACGTTAAACACCGCCATTCCGGGCG +ATCCGCGTGATACCACTTCACCTCGGGCAATGGCGCAAACTCTGCGGAATCTGACGCTGG +GTAAAGCATTGGGCGACAGCCAACGGGCGCAGCTGGTGACATGGATGAAAGGCAATACCA +CCGGTGCAGCGAGCATTCAGGCTGGACTGCCTGCTTCCTGGGTTGTGGGGGATAAAACCG +GCAGCGGTGGCTATGGCACCACCAACGATATCGCGGTGATCTGGCCAAAAGATCGTGCGC +CGCTGATTCTGGTCACTTACTTCACCCAGCCTCAACCTAAGGCAGAAAGCCGTCGCGATG +TATTAGCGTCGGCGGCTAAAATCGTCACCGACGGTTTGTAACCCCC diff --git a/test/genomes/flanking.fasta b/test/genomes/flanking.fasta index c71212e..45b2c11 100644 --- a/test/genomes/flanking.fasta +++ b/test/genomes/flanking.fasta @@ -13,4 +13,5 @@ GCTGGGTAAAGCATTGGGCGACAGCCAACGGGCGCAGCTGGTGACATGGATGAAAGGCAA TACCACCGGTGCAGCGAGCATTCAGGCTGGACTGCCTGCTTCCTGGGTTGTGGGGGATAA AACCGGCAGCGGTGGCTATGGCACCACCAACGATATCGCGGTGATCTGGCCAAAAGATCG TGCGCCGCTGATTCTGGTCACTTACTTCACCCAGCCTCAACCTAAGGCAGAAAGCCGTCG -CGATGTATTAGCGTCGGCGGCTAAAATCGTCACCGACGGTTTGTAACCCCCCCCCC +CGATGTATTAGCGTCGGCGGCTAAAATCGTCACCGACGGTTTGTAACCCCCCCCCCCCCC +CCCCCC