ablab / IsoQuant

Transcript discovery and quantification with long RNA reads (Nanopores and PacBio)
https://ablab.github.io/IsoQuant/
Other
144 stars 13 forks source link

JSONDecodeError while running #182

Closed abhijitcbio closed 2 months ago

abhijitcbio commented 4 months ago

Hi,

I am facing the following error while running the code -

Command line: ./IsoQuant/isoquant.py --reference Homo_sapiens.GRCh38.dna.primary_assembly.fa.gz --genedb Homo_sapiens.GRCh38.111.gtf.gz --fastq ../data/Nalm6_EV_full_length_reads.fastq --labels Nalm6_EV --data_type nanopore --output Nalm6_EV_isoquant --threads 4 --count_exons --check_canonical --splice_correction_strategy default_ont --model_construction_strategy default_ont --report_novel_unspliced true --gene_quantification with_ambiguous --min_mapq 5
2024-05-05 11:19:09,368 - INFO - Running IsoQuant version 3.3.1
2024-05-05 11:19:09,378 - INFO -  === IsoQuant pipeline started ===
2024-05-05 11:19:09,379 - INFO - Converting gene annotation file to .db format (takes a while)...
2024-05-05 18:36:49,345 - INFO - Gene database written to /mnt/bioadhoc/Groups/vd-ay/abhijit/overflow/proj_overflow/ONTData/isoform/sampleWiseRuns/Nalm6_EV_isoquant/Homo_sapiens.GRCh38.111.gtf.db
2024-05-05 18:36:49,345 - INFO - Provide this database next time to avoid excessive conversion
2024-05-05 18:36:49,512 - INFO - Indexing reference
2024-05-05 18:38:45,623 - CRITICAL - IsoQuant failed with the following error, please, submit this issue to https://github.com/ablab/IsoQuant/issuesTraceback (most recent call last):
  File "/mnt/bioadhoc/Groups/vd-ay/abhijit/overflow/proj_overflow/ONTData/isoform/sampleWiseRuns/./IsoQuant/isoquant.py", line 772, in <module>
    main(sys.argv[1:])
  File "/mnt/bioadhoc/Groups/vd-ay/abhijit/overflow/proj_overflow/ONTData/isoform/sampleWiseRuns/./IsoQuant/isoquant.py", line 766, in main
    run_pipeline(args)
  File "/mnt/bioadhoc/Groups/vd-ay/abhijit/overflow/proj_overflow/ONTData/isoform/sampleWiseRuns/./IsoQuant/isoquant.py", line 712, in run_pipeline
    args.input_data = dataset_mapper.map_reads(args)
  File "/mnt/bioadhoc/Groups/vd-ay/abhijit/overflow/proj_overflow/ONTData/isoform/IsoQuant/src/read_mapper.py", line 51, in map_reads
    annotation_file = find_annotation(self.aligner, args)
  File "/mnt/bioadhoc/Groups/vd-ay/abhijit/overflow/proj_overflow/ONTData/isoform/IsoQuant/src/read_mapper.py", line 258, in find_annotation
    bed_fname = find_stored_bed(args)
  File "/mnt/bioadhoc/Groups/vd-ay/abhijit/overflow/proj_overflow/ONTData/isoform/IsoQuant/src/read_mapper.py", line 121, in find_stored_bed
    converted_beds = json.load(f_in)
  File "/mnt/hpc-apps/python/3.10.10/lib/python3.10/json/__init__.py", line 293, in load
    return loads(fp.read(),
  File "/mnt/hpc-apps/python/3.10.10/lib/python3.10/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "/mnt/hpc-apps/python/3.10.10/lib/python3.10/json/decoder.py", line 340, in decode
    raise JSONDecodeError("Extra data", s, end)
json.decoder.JSONDecodeError: Extra data: line 1 column 1784 (char 1783)

Your help will be greatly appreciated.

andrewprzh commented 4 months ago

Dear @abhijitcbio

This is quite odd, as JSON configs are created and loaded by the same library. It may be possible that there is some discrepancies between different IsoQuant versions and old contigs become unreadable. I'd suggest to remove .config/IsoQuant/ directory in you home folder and try running again.

P.S. To speed up next run, provide .db file you got during this run (/mnt/bioadhoc/Groups/vd-ay/abhijit/overflow/proj_overflow/ONTData/isoform/sampleWiseRuns/Nalm6_EV_isoquant/Homo_sapiens.GRCh38.111.gtf.db) via --genedb option. Usually, IsoQuant finds it automatically using those JSON configs, but in this case all JSON configs will be removed.

Best Andrey

andrewprzh commented 2 months ago

Please, reopen if this issue still appears in 3.4.2.