nedialkova-lab / mim-tRNAseq

Modification-induced misincorporation tRNA sequencing
GNU General Public License v3.0
19 stars 14 forks source link

bug: out_dir is a boolean in modsToSNPIndex() #56

Closed kelly-sovacool closed 1 year ago

kelly-sovacool commented 1 year ago

Using the latest development version of mimseq from the master branch:

mimseq --species Hsap --cluster-id 0.97 --threads 15 --min-cov 0.0005 --max-mismatches 0.075 --control-condition HEK293T -n hg38_test --out-dir hg38_HEK239vsK562 --max-multi 4 --remap --remap-mismatches 0.05 sampleData_HEKvsK562.txt
           _                 _   ____  _   _    _                   
 _ __ ___ (_)_ __ ___       | |_|  _ \| \ | |  / \   ___  ___  __ _ 
| '_ ` _ \| | '_ ` _ \ _____| __| |_) |  \| | / _ \ / __|/ _ \/ _` |
| | | | | | | | | | | |_____| |_|  _ <| |\  |/ ___ \\__ \  __/ (_| |
|_| |_| |_|_|_| |_| |_|      \__|_| \_\_| \_/_/   \_\___/\___|\__, |
                                                                 |_|

 Modification-induced misincorporation analysis of tRNA sequencing data

2023-10-31 14:34:52,933 [INFO ] mim-tRNAseq v1.3.7-dev run with command:
2023-10-31 14:34:52,933 [INFO ] /opt/homebrew/bin/mimseq --species Hsap --cluster-id 0.97 --threads 15 --min-cov 0.0005 --max-mismatches 0.075 --control-condition HEK293T -n hg38_test --out-dir hg38_HEK239vsK562 --max-multi 4 --remap --remap-mismatches 0.05 sampleData_HEKvsK562.txt
Traceback (most recent call last):
  File "/opt/homebrew/bin/mimseq", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/mimseq/mimseq.py", line 419, in main
    mimseq(args.trnas, args.trnaout, args.name, args.species, args.out, args.cluster, args.cluster_id, args.cov_diff, \
  File "/opt/homebrew/lib/python3.11/site-packages/mimseq/mimseq.py", line 100, in mimseq
    = modsToSNPIndex(trnas, trnaout, mito_trnas, plastid_trnas, name, out, double_cca, threads, snp_tolerance, cluster, cluster_id, posttrans, pretrnas, local_mod)
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/mimseq/tRNAtools.py", line 376, in modsToSNPIndex
    tRNAbed = open(out_dir + experiment_name + "_maturetRNA.bed","w")
                   ~~~~~~~~^~~~~~~~~~~~~~~~~
TypeError: unsupported operand type(s) for +: 'bool' and 'str'

Oddly, the out variable in mimseq.py is correctly set by --out-dir, but if I print out the value of out_dir in modsToSNPIndex(), it's False

Edit: it turns out the modifications_table argument is missing

https://github.com/nedialkova-lab/mim-tRNAseq/blob/8a91726021647ac654b6041dbb91fee9e2d17c58/mimseq/mimseq.py#L100

https://github.com/nedialkova-lab/mim-tRNAseq/blob/8a91726021647ac654b6041dbb91fee9e2d17c58/mimseq/tRNAtools.py#L366