yfukasawa / LongQC

LongQC is a tool for the data quality control of the PacBio and ONT long reads.
MIT License
147 stars 18 forks source link

AttributeError: module 'pysam' has no attribute 'FastxFile' #66

Open Rhia15 opened 9 months ago

Rhia15 commented 9 months ago

Hi, thank you very much for this tool. I have been trying to run this for a while now and I keep receiving the same error message:

I ran the command:

python longQC.py sampleqc -x pb-hifi -o /gpfs01/home/mbxrs14/project/0_Genome_Cochlearia_groenlandica/Groenlandica_HiFi/LongQC/results /gpfs01/home/mbxrs14/project/0_Genome_Cochlearia_groenlandica/Groenlandica_HiFi/ERR12383513.fastq.gz

and also tried it with the uncompressed version, however I keep getting the error:

longQC:2024-02-10 16:50:56,637:233:INFO:Preset "pb-hifi" was applied. Options --pb(--ont) is overwritten. Traceback (most recent call last): File "longQC.py", line 956, in main(args) File "longQC.py", line 62, in main args.handler(args) File "longQC.py", line 299, in command_sample for (reads, n_seqs, n_bases) in open_seq_chunk(args.input, file_format_code, chunk_size=args.mem*1024**3, is_upper=True): File "/gpfs01/home/mbxrs14/project/0_Genome_Cochlearia_groenlandica/Groenlandica_HiFi/LongQC/lq_utils.py", line 65, in open_seq_chunk yield from parse_fastx_chunk(fn, chunk_size, is_upper=is_upper) File "/gpfs01/home/mbxrs14/project/0_Genome_Cochlearia_groenlandica/Groenlandica_HiFi/LongQC/lq_utils.py", line 268, in parse_fastx_chunk with pysam.FastxFile(fn) as f: AttributeError: module 'pysam' has no attribute 'FastxFile'

I have also updated pysam to version: 0.8.3 in my conda environment but it is still happening, so just wondering if you have any insights into this, any help would be much appreciated. Thank you very much

yfukasawa commented 9 months ago

Hi @Rhia15,

Thank you for your interests in our tool. Regarding the error, is it possible for you to (still) use an older version of pysam? It's maintained by a different group, so I cannot comment very in details.

import pysam
pysam.__version__

The above short code should tell you which version of pysam is loaded.

Best, Yoshinori