Russel88 / CRISPRCasTyper

CCTyper: Automatic detection and subtyping of CRISPR-Cas operons
https://typer.crispr.dk
MIT License
94 stars 17 forks source link

castyping.py having an issue with positional arguments. #40

Open jamesrgurney opened 1 year ago

jamesrgurney commented 1 year ago

I've had cctyper working before on another machine. Not sure if you have seen this error before.

(cctyper)user assembly % cctype CIA1\ copy.fna CIA1_cctyper zsh: command not found: cctype (cctyper)user assembly % cctyper CIA1\ copy.fna CIA1_cctyper /Users/user/miniconda3/envs/cctyper/lib/python3.9/site-packages/Bio/pairwise2.py:278: BiopythonDeprecationWarning: Bio.pairwise2 has been deprecated, and we intend to remove it in a future release of Biopython. As an alternative, please consider using Bio.Align.PairwiseAligner as a replacement, and contact the Biopython developers if you still need the Bio.pairwise2 module. warnings.warn( [2023-05-18 10:59:17] INFO: Running CRISPRCasTyper version 1.3.0 [2023-05-18 10:59:18] INFO: Predicting ORFs with prodigal [2023-05-18 10:59:28] INFO: Running HMMER against Cas profiles 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 691/691 [01:11<00:00, 9.65it/s] [2023-05-18 11:01:14] INFO: Parsing HMMER output [2023-05-18 11:01:14] INFO: Subtyping putative operons Traceback (most recent call last): File "/Users/user/miniconda3/envs/cctyper/bin/cctyper", line 80, in castyper.typing() File "/Users/user/miniconda3/envs/cctyper/lib/python3.9/site-packages/cctyper/castyping.py", line 294, in typing single_effector_hmms = self.scores[self.scores['Hmm'].isin(list(specifics))].drop('Hmm', 1) TypeError: drop() takes from 1 to 2 positional arguments but 3 were given

jamesrgurney commented 1 year ago

Fixed it by changing single_effector_hmms = self.scores[self.scores['Hmm'].isin(list(specifics))].drop('Hmm', 1) to single_effector_hmms = self.scores[self.scores['Hmm'].isin(list(specifics))].drop('Hmm', axis=1)

Russel88 commented 1 year ago

Thank you for reporting this. Looks like I have to be more restrictive on the pandas and biopython versions