Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
SwiftSeal committed Jan 15, 2025
1 parent ac4181c commit 0b152c4
Show file tree
Hide file tree
Showing 20 changed files with 494 additions and 9 deletions.
4 changes: 2 additions & 2 deletions pixi.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 2 additions & 5 deletions resistify/coconat.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,16 +183,13 @@ def coconat(sequences, models_path: str):

nterminal_seq = sequence.nterminal_sequence

# Exit this loop if there isn't a valid N-terminal sequence
if nterminal_seq is None:
logger.debug(f"{sequence.id} has no N-terminus, skipping...")
continue

nterminal_len = len(nterminal_seq)

if nterminal_seq is None:
logger.debug(f"{sequence.id} has no N-terminus, skipping...")
continue
elif nterminal_len < 5:
if nterminal_len < 5:
logger.debug(f"{sequence.id} N-terminus too short for CoCoNat")
continue
elif nterminal_len >= 1022:
Expand Down
2 changes: 2 additions & 0 deletions tests/data/fls2.fa
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
>fls2
MKLLSKTFLILTLTFFFFGIALAKQSFEPEIEALKSFKNGISNDPLGVLSDWTIIGSLRHCNWTGITCDSTGHVVSVSLLEKQLEGVLSPAIANLTYLQVLDLTSNSFTGKIPAEIGKLTELNQLILYLNYFSGSIPSGIWELKNIFYLDLRNNLLSGDVPEEICKTSSLVLIGFDYNNLTGKIPECLGDLVHLQMFVAAGNHLTGSIPVSIGTLANLTDLDLSGNQLTGKIPRDFGNLLNLQSLVLTENLLEGDIPAEIGNCSSLVQLELYDNQLTGKIPAELGNLVQLQALRIYKNKLTSSIPSSLFRLTQLTHLGLSENHLVGPISEEIGFLESLEVLTLHSNNFTGEFPQSITNLRNLTVLTVGFNNISGELPADLGLLTNLRNLSAHDNLLTGPIPSSISNCTGLKLLDLSHNQMTGEIPRGFGRMNLTFISIGRNHFTGEIPDDIFNCSNLETLSVADNNLTGTLKPLIGKLQKLRILQVSYNSLTGPIPREIGNL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LTDGSSKGNGGDISVPQTDVKRVRI
8 changes: 8 additions & 0 deletions tests/data/nlr_coconat_expected/annotations.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Sequence Domain Start End E_value Score Source
zar1 MADA 1 20 5e-07 16.2 HMM
zar1 CC 5 129 7.8e-24 70.0 HMM
zar1 CC 27 48 coconat
zar1 CC 60 75 coconat
zar1 CC 113 129 coconat
zar1 NB-ARC 164 410 4.6e-90 287.2 HMM
zar1 LRR 511 817 nlrexpress
165 changes: 165 additions & 0 deletions tests/data/nlr_coconat_expected/coconat.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
Sequence Position Probability
zar1 0 0.07309027589652095
zar1 1 0.039178277060142985
zar1 2 0.020360309712584956
zar1 3 0.016814381417675994
zar1 4 0.02420380628486196
zar1 5 0.03375698909431901
zar1 6 0.037148244487306026
zar1 7 0.05077282293549601
zar1 8 0.06475596763648095
zar1 9 0.08228371800463896
zar1 10 0.09515718692292296
zar1 11 0.10975499350385998
zar1 12 0.12462239541462605
zar1 13 0.126377920432585
zar1 14 0.11767588808683005
zar1 15 0.10755764421629399
zar1 16 0.09324464078411498
zar1 17 0.07364815485721399
zar1 18 0.062678805280166
zar1 19 0.058385936444592
zar1 20 0.05020491491113499
zar1 21 0.04613353690560995
zar1 22 0.06149774514241502
zar1 23 0.13342717203959098
zar1 24 0.15140659390549205
zar1 25 0.20953280069688296
zar1 26 0.44464751248675205
zar1 27 0.523453193680814
zar1 28 0.619175234957458
zar1 29 0.762087491212623
zar1 30 0.970036766988637
zar1 31 0.9862239194786
zar1 32 0.993541180882314
zar1 33 0.998854677795842
zar1 34 0.99753864227415
zar1 35 0.997816355058583
zar1 36 0.998041400374783
zar1 37 0.99958875562144
zar1 38 0.998348623616691
zar1 39 0.998447628364825
zar1 40 0.999095146987673
zar1 41 0.994712397047199
zar1 42 0.993124792866704
zar1 43 0.991652606288613
zar1 44 0.986739278482926
zar1 45 0.911840269007919
zar1 46 0.851006830711564
zar1 47 0.767762173076288
zar1 48 0.27057541763177295
zar1 49 0.10448356970142203
zar1 50 0.06303629399732402
zar1 51 0.051209351803844005
zar1 52 0.023623271586733052
zar1 53 0.020656144015707034
zar1 54 0.018806480300037953
zar1 55 0.020995825876994
zar1 56 0.05414647161791797
zar1 57 0.17192940608499796
zar1 58 0.20322209452100803
zar1 59 0.286855318810885
zar1 60 0.5400060712908941
zar1 61 0.61108482969945
zar1 62 0.7095442148522639
zar1 63 0.851856974155608
zar1 64 0.984681591188093
zar1 65 0.99370401342634
zar1 66 0.997285719470776
zar1 67 0.998905088552133
zar1 68 0.99614455762763
zar1 69 0.994115193666229
zar1 70 0.992496662898216
zar1 71 0.987468805814868
zar1 72 0.922236809475939
zar1 73 0.868410416955417
zar1 74 0.813332284524542
zar1 75 0.374815014152752
zar1 76 0.17667621114573795
zar1 77 0.12926546640707703
zar1 78 0.11105004446114897
zar1 79 0.047574492313357974
zar1 80 0.03206761011019299
zar1 81 0.029847686604507984
zar1 82 0.023699590651268032
zar1 83 0.021248195963361027
zar1 84 0.021454464669257045
zar1 85 0.022093862588958957
zar1 86 0.022134155208690998
zar1 87 0.022267415352337006
zar1 88 0.022489046206809027
zar1 89 0.02261469687704698
zar1 90 0.02263045640918704
zar1 91 0.022654745012425037
zar1 92 0.02268656173816097
zar1 93 0.022699045064958012
zar1 94 0.022697778674811042
zar1 95 0.02270090839693195
zar1 96 0.022697324763522042
zar1 97 0.022665058342192013
zar1 98 0.022632962709345006
zar1 99 0.02263497124146796
zar1 100 0.02252317427652495
zar1 101 0.022250651219900996
zar1 102 0.022045544483699997
zar1 103 0.022094325995600017
zar1 104 0.02072199106719197
zar1 105 0.019478977527103036
zar1 106 0.02101310258602096
zar1 107 0.029270151112455012
zar1 108 0.02905143437398905
zar1 109 0.03703198566363497
zar1 110 0.079124867135274
zar1 111 0.09601449548915897
zar1 112 0.153288133537671
zar1 113 0.36494484731297505
zar1 114 0.902459345742861
zar1 115 0.964361956516494
zar1 116 0.98843969668322
zar1 117 0.999116063387472
zar1 118 0.999453099573798
zar1 119 0.999662362061768
zar1 120 0.999785709203051
zar1 121 0.999948048015177
zar1 122 0.999540158260799
zar1 123 0.999023268171988
zar1 124 0.997039528127059
zar1 125 0.937920865515851
zar1 126 0.880971108140148
zar1 127 0.840522256399115
zar1 128 0.79225882591917
zar1 129 0.45736628520991995
zar1 130 0.33636001168475305
zar1 131 0.282359156026351
zar1 132 0.08585726878187305
zar1 133 0.03781508235971598
zar1 134 0.030303877167216053
zar1 135 0.02980851803286999
zar1 136 0.023593908613885994
zar1 137 0.022815701486381013
zar1 138 0.023326340014098945
zar1 139 0.023217202530322
zar1 140 0.02271551877307998
zar1 141 0.022703879883985034
zar1 142 0.02278660988277903
zar1 143 0.022752248900520966
zar1 144 0.022705742851916955
zar1 145 0.022704069944670002
zar1 146 0.022704218535127052
zar1 147 0.022687239682572025
zar1 148 0.02266571784877902
zar1 149 0.02264397260208295
zar1 150 0.022599168667014946
zar1 151 0.02249992492914399
zar1 152 0.022368605847757017
zar1 153 0.022187018873726982
zar1 154 0.021755973393740025
zar1 155 0.020811837773584974
zar1 156 0.019483016792854024
zar1 157 0.017429333288486948
zar1 158 0.011576846956136033
zar1 159 0.01024192452528705
zar1 160 0.015144647097046993
zar1 161 0.03012245356215404
zar1 162 0.09373453136796095
zar1 163 0.45000719847320003
5 changes: 5 additions & 0 deletions tests/data/nlr_coconat_expected/domains.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Sequence Domain Start End
zar1 MADA 1 20
zar1 CC 5 129
zar1 NB-ARC 164 410
zar1 LRR 511 817
21 changes: 21 additions & 0 deletions tests/data/nlr_coconat_expected/motifs.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Sequence Motif Position Probability Downstream_sequence Motif_sequence Upstream_sequence
zar1 extEDVID 65 0.9974 LVADL RELVYEAEDILV DCQLA
zar1 VG 159 0.9924 YDHTQ VVGLE GDKRK
zar1 P-loop 188 1.0 IMAFV GMGGLGKTT IAQEV
zar1 RNSB-A 211 0.9981 EIEHR FERRIWVSVS QTFTE
zar1 Walker-B 259 0.973 QYLLG KRYLIVMD DVWDK
zar1 RNSB-B 290 0.9846 RGQGG SVIVTTR SESVA
zar1 RNSB-C 317 0.9994 HRPEL LSPDNSWLLF CNVAF
zar1 RNSB-D 417 0.9875 SHLKS CILTLSLYP EDCVI
zar1 GLPL 356 0.9998 VTKCK GLPLT IKAVG
zar1 MHD 486 0.9965 IITCK IHD MVRDL
zar1 LxxLxL 511 0.9398 PEGLN CRHLGI SGNFD
zar1 LxxLxL 560 0.9973 TDCKY LRVLDI SKSIF
zar1 LxxLxL 587 0.9993 ASLQH LACLSL SNTHP
zar1 LxxLxL 611 0.9995 EDLHN LQILDA SYCQN
zar1 LxxLxL 635 0.999 VLFKK LLVLDM TNCGS
zar1 LxxLxL 685 0.9987 KNLTN LRKLGL SLTRG
zar1 LxxLxL 712 0.9723 INLSK LMSISI NCYDS
zar1 LxxLxL 740 0.9995 TPPHQ LHELSL QFYPG
zar1 LxxLxL 765 0.9976 HKLPM LRYMSI CSGNL
zar1 LxxLxL 817 0.9391 QSMPY LRTVTA NWCPE
5 changes: 5 additions & 0 deletions tests/data/nlr_coconat_expected/nbarc.fasta
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
>zar1_1
GDKRKIKEWLFRSNDSQLLIMAFVGMGGLGKTTIAQEVFNDKEIEHRFERRIWVSVSQTFTEEQIMRSILRNLGDASVGD
DIGTLLRKIQQYLLGKRYLIVMDDVWDKNLSWWDKIYQGLPRGQGGSVIVTTRSESVAKRVQARDDKTHRPELLSPDNSW
LLFCNVAFAANDGTCERPELEDVGKEIVTKCKGLPLTIKAVGGLLLCKDHVYHEWRRIAEHFQDELRGNTSETDNVMSSL
QLSYDE
12 changes: 12 additions & 0 deletions tests/data/nlr_coconat_expected/nlr.fasta
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
>zar1
MVDAVVTVFLEKTLNILEEKGRTVSDYRKQLEDLQSELKYMQSFLKDAERQKRTNETLRTLVADLRELVYEAEDILVDCQ
LADGDDGNEQRSSNAWLSRLHPARVPLQYKKSKRLQEINERITKIKSQVEPYFEFITPSNVGRDNGTDRWSSPVYDHTQV
VGLEGDKRKIKEWLFRSNDSQLLIMAFVGMGGLGKTTIAQEVFNDKEIEHRFERRIWVSVSQTFTEEQIMRSILRNLGDA
SVGDDIGTLLRKIQQYLLGKRYLIVMDDVWDKNLSWWDKIYQGLPRGQGGSVIVTTRSESVAKRVQARDDKTHRPELLSP
DNSWLLFCNVAFAANDGTCERPELEDVGKEIVTKCKGLPLTIKAVGGLLLCKDHVYHEWRRIAEHFQDELRGNTSETDNV
MSSLQLSYDELPSHLKSCILTLSLYPEDCVIPKQQLVHGWIGEGFVMWRNGRSATESGEDCFSGLTNRCLIEVVDKTYSG
TIITCKIHDMVRDLVIDIAKKDSFSNPEGLNCRHLGISGNFDEKQIKVNHKLRGVVSTTKTGEVNKLNSDLAKKFTDCKY
LRVLDISKSIFDAPLSEILDEIASLQHLACLSLSNTHPLIQFPRSMEDLHNLQILDASYCQNLKQLQPCIVLFKKLLVLD
MTNCGSLECFPKGIGSLVKLEVLLGFKPARSNNGCKLSEVKNLTNLRKLGLSLTRGDQIEEEELDSLINLSKLMSISINC
YDSYGDDLITKIDALTPPHQLHELSLQFYPGKSSPSWLSPHKLPMLRYMSICSGNLVKMQEPFWGNENTHWRIEGLMLSS
LSDLDMDWEVLQQSMPYLRTVTANWCPELESFAIEDVGFRGGVWMKTPLHRT
2 changes: 2 additions & 0 deletions tests/data/nlr_coconat_expected/results.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Sequence Length LRR_Length Motifs Domains Classification NBARC_motifs MADA MADAL CJID
zar1 852 307 CNNNNNNNNNLLLLLLLLLL mCNL CNL 9 False True False
8 changes: 8 additions & 0 deletions tests/data/nlr_retain_coconat_expected/annotations.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Sequence Domain Start End E_value Score Source
zar1 MADA 1 20 5e-07 16.2 HMM
zar1 CC 5 129 7.8e-24 70.0 HMM
zar1 CC 27 48 coconat
zar1 CC 60 75 coconat
zar1 CC 113 129 coconat
zar1 NB-ARC 164 410 4.6e-90 287.2 HMM
zar1 LRR 511 817 nlrexpress
Loading

0 comments on commit 0b152c4

Please sign in to comment.