Skip to content

Commit

Permalink
Add extra test for flanking sequence extraction
Browse files Browse the repository at this point in the history
  • Loading branch information
boasvdp committed Feb 18, 2022
1 parent 8d10a44 commit 895e4ca
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 3 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
17 changes: 17 additions & 0 deletions test/correct/correct_flanking_15bp.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
>flanking_blaCTX-M-15
GGGGGGGGGGATGGTTAAAAAATCACTGCGCCAGTTCACGCTGATGGCGACGGCAACCGT
CACGCTGTTGTTAGGAAGTGTGCCGCTGTATGCGCAAACGGCGGACGTACAGCAAAAACT
TGCCGAATTAGAGCGGCAGTCGGGAGGCAGACTGGGTGTGGCATTGATTAACACAGCAGA
TAATTCGCAAATACTTTATCGTGCTGATGAGCGCTTTGCGATGTGCAGCACCAGTAAAGT
GATGGCCGCGGCCGCGGTGCTGAAGAAAAGTGAAAGCGAACCGAATCTGTTAAATCAGCG
AGTTGAGATCAAAAAATCTGACCTTGTTAACTATAATCCGATTGCGGAAAAGCACGTCAA
TGGGACGATGTCACTGGCTGAGCTTAGCGCGGCCGCGCTACAGTACAGCGATAACGTGGC
GATGAATAAGCTGATTGCTCACGTTGGCGGCCCGGCTAGCGTCACCGCGTTCGCCCGACA
GCTGGGAGACGAAACGTTCCGTCTCGACCGTACCGAGCCGACGTTAAACACCGCCATTCC
GGGCGATCCGCGTGATACCACTTCACCTCGGGCAATGGCGCAAACTCTGCGGAATCTGAC
GCTGGGTAAAGCATTGGGCGACAGCCAACGGGCGCAGCTGGTGACATGGATGAAAGGCAA
TACCACCGGTGCAGCGAGCATTCAGGCTGGACTGCCTGCTTCCTGGGTTGTGGGGGATAA
AACCGGCAGCGGTGGCTATGGCACCACCAACGATATCGCGGTGATCTGGCCAAAAGATCG
TGCGCCGCTGATTCTGGTCACTTACTTCACCCAGCCTCAACCTAAGGCAGAAAGCCGTCG
CGATGTATTAGCGTCGGCGGCTAAAATCGTCACCGACGGTTTGTAACCCCCCCCCCCCCC
C
16 changes: 16 additions & 0 deletions test/correct/correct_flanking_5bp.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
>flanking_blaCTX-M-15
GGGGGATGGTTAAAAAATCACTGCGCCAGTTCACGCTGATGGCGACGGCAACCGTCACGC
TGTTGTTAGGAAGTGTGCCGCTGTATGCGCAAACGGCGGACGTACAGCAAAAACTTGCCG
AATTAGAGCGGCAGTCGGGAGGCAGACTGGGTGTGGCATTGATTAACACAGCAGATAATT
CGCAAATACTTTATCGTGCTGATGAGCGCTTTGCGATGTGCAGCACCAGTAAAGTGATGG
CCGCGGCCGCGGTGCTGAAGAAAAGTGAAAGCGAACCGAATCTGTTAAATCAGCGAGTTG
AGATCAAAAAATCTGACCTTGTTAACTATAATCCGATTGCGGAAAAGCACGTCAATGGGA
CGATGTCACTGGCTGAGCTTAGCGCGGCCGCGCTACAGTACAGCGATAACGTGGCGATGA
ATAAGCTGATTGCTCACGTTGGCGGCCCGGCTAGCGTCACCGCGTTCGCCCGACAGCTGG
GAGACGAAACGTTCCGTCTCGACCGTACCGAGCCGACGTTAAACACCGCCATTCCGGGCG
ATCCGCGTGATACCACTTCACCTCGGGCAATGGCGCAAACTCTGCGGAATCTGACGCTGG
GTAAAGCATTGGGCGACAGCCAACGGGCGCAGCTGGTGACATGGATGAAAGGCAATACCA
CCGGTGCAGCGAGCATTCAGGCTGGACTGCCTGCTTCCTGGGTTGTGGGGGATAAAACCG
GCAGCGGTGGCTATGGCACCACCAACGATATCGCGGTGATCTGGCCAAAAGATCGTGCGC
CGCTGATTCTGGTCACTTACTTCACCCAGCCTCAACCTAAGGCAGAAAGCCGTCGCGATG
TATTAGCGTCGGCGGCTAAAATCGTCACCGACGGTTTGTAACCCCC
3 changes: 2 additions & 1 deletion test/genomes/flanking.fasta
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ GCTGGGTAAAGCATTGGGCGACAGCCAACGGGCGCAGCTGGTGACATGGATGAAAGGCAA
TACCACCGGTGCAGCGAGCATTCAGGCTGGACTGCCTGCTTCCTGGGTTGTGGGGGATAA
AACCGGCAGCGGTGGCTATGGCACCACCAACGATATCGCGGTGATCTGGCCAAAAGATCG
TGCGCCGCTGATTCTGGTCACTTACTTCACCCAGCCTCAACCTAAGGCAGAAAGCCGTCG
CGATGTATTAGCGTCGGCGGCTAAAATCGTCACCGACGGTTTGTAACCCCCCCCCC
CGATGTATTAGCGTCGGCGGCTAAAATCGTCACCGACGGTTTGTAACCCCCCCCCCCCCC
CCCCCC

0 comments on commit 895e4ca

Please sign in to comment.