Installation issue: AttributeError: module 'pysam.libcalignmentfile' has no attribute 'IteratorColumnAll'
laijen000 opened this issue · 11 comments
Hello,
I have tried to install RNAindel using pip, and was able to successfully install: "Successfully installed rnaindel-3.0.2"
However, when I try "rnaindel -h", I get the error:
Traceback (most recent call last):
File "/home/ch196471/.local/bin/rnaindel", line 6, in
from rnaindel.rnaindel import main
File "/home/ch196471/.local/lib/python3.7/site-packages/rnaindel/init.py", line 1, in
from .analysis import *
File "/home/ch196471/.local/lib/python3.7/site-packages/rnaindel/analysis/init.py", line 1, in
from .analyzer import *
File "/home/ch196471/.local/lib/python3.7/site-packages/rnaindel/analysis/analyzer.py", line 9, in
from .preprocessor import preprocess
File "/home/ch196471/.local/lib/python3.7/site-packages/rnaindel/analysis/preprocessor.py", line 8, in
from indelpost import Variant, VariantAlignment
File "/home/ch196471/.local/lib/python3.7/site-packages/indelpost/init.py", line 2, in
from indelpost.varaln import *
File "indelpost/varaln.pyx", line 1, in init indelpost.varaln
AttributeError: module 'pysam.libcalignmentfile' has no attribute 'IteratorColumnAll'
I would greatly appreciate any advice on this issue!
Please try the following steps:
- pip uninstall cython pysam indelpost
- pip install indelpost --no-binary indelpost --no-build-isolation
- pip install rnaindel
Thank you so much, this helped with installation.
However, now I am encountering an issue when running PredictIndels:
rnaindel PredictIndels -i test.sorted.bam -o output.vcf -r genome.fa -d data_dir_grch38 -p 4
Traceback (most recent call last):
File "/home/ch196471/.local/bin/rnaindel", line 8, in
sys.exit(main())
File "/home/ch196471/.local/lib/python3.7/site-packages/rnaindel/rnaindel.py", line 12, in main
Commands()
File "/home/ch196471/.local/lib/python3.7/site-packages/rnaindel/rnaindel.py", line 44, in init
getattr(self, args.subcommand)()
File "/home/ch196471/.local/lib/python3.7/site-packages/rnaindel/rnaindel.py", line 47, in PredictIndels
ra.analyze("PredictIndels", version=version)
File "/home/ch196471/.local/lib/python3.7/site-packages/rnaindel/analysis/analyzer.py", line 41, in analyze
args.pass_only,
File "/home/ch196471/.local/lib/python3.7/site-packages/rnaindel/analysis/preprocessor.py", line 54, in preprocess
df = pd.concat(dfs)
File "/home/ch196471/.conda/envs/rnaindel/lib/python3.7/site-packages/pandas/util/_decorators.py", line 311, in wrapper
return func(*args, **kwargs)
File "/home/ch196471/.conda/envs/rnaindel/lib/python3.7/site-packages/pandas/core/reshape/concat.py", line 304, in concat
sort=sort,
File "/home/ch196471/.conda/envs/rnaindel/lib/python3.7/site-packages/pandas/core/reshape/concat.py", line 351, in init
raise ValueError("No objects to concatenate")
ValueError: No objects to concatenate
Have you encountered this before?
Thank you!
It looks like no callsets have been passed. I will look into this issue. Can you please see if the same error happens with the sample dataset?
https://github.com/stjude/RNAIndel/blob/master/docs/walkthrough/README.md
The same error occurs with the sample dataset, both when no -v is passed, and also when -v is sample.gatk.vcf.gz
rnaindel PredictIndels -i ./sampledateaset/sample.bam -o testout.vcf -r ./sampledateaset/chr10.fa -d data_dir_grch38 -p 4 -v ./sampledateaset/sample.gatk.vcf.gz
Traceback (most recent call last):
File "/home/ch196471/.local/bin/rnaindel", line 8, in
sys.exit(main())
File "/home/ch196471/.local/lib/python3.7/site-packages/rnaindel/rnaindel.py", line 12, in main
Commands()
File "/home/ch196471/.local/lib/python3.7/site-packages/rnaindel/rnaindel.py", line 44, in init
getattr(self, args.subcommand)()
File "/home/ch196471/.local/lib/python3.7/site-packages/rnaindel/rnaindel.py", line 47, in PredictIndels
ra.analyze("PredictIndels", version=version)
File "/home/ch196471/.local/lib/python3.7/site-packages/rnaindel/analysis/analyzer.py", line 41, in analyze
args.pass_only,
File "/home/ch196471/.local/lib/python3.7/site-packages/rnaindel/analysis/preprocessor.py", line 54, in preprocess
df = pd.concat(dfs)
File "/home/ch196471/.conda/envs/rnaindel/lib/python3.7/site-packages/pandas/util/_decorators.py", line 311, in wrapper
return func(*args, **kwargs)
File "/home/ch196471/.conda/envs/rnaindel/lib/python3.7/site-packages/pandas/core/reshape/concat.py", line 304, in concat
sort=sort,
File "/home/ch196471/.conda/envs/rnaindel/lib/python3.7/site-packages/pandas/core/reshape/concat.py", line 351, in init
raise ValueError("No objects to concatenate")
ValueError: No objects to concatenate
Thanks for checking with the sample data. Hmm, you system has Java?
Yes, I think so:
java -version
java version "1.6.0_27"
Java(TM) SE Runtime Environment (build 1.6.0_27-b07)
Java HotSpot(TM) 64-Bit Server VM (build 20.2-b06, mixed mode)
RNAIndel needs java 1.8. as specified https://github.com/stjude/RNAIndel#pypi
Would you mind updating your version?
I have tried java 1.6.0_30 to reproduce your error. I got a similar (not the same) error.
Follow-up. I was able to reproduce the error with the parallelism option (-p 4) with Java 1.6.0_30. When updating the Java version to 8, 10, 11, or 13 (I don't have the other versions on my system), this does not happen. I suspect the old Java version is the root cause for this issue.
Thank you. I updated my java version and now I am able to run the sample dataset, but I get the same errors when I run my own dataset. My bam file was generated using Cell Ranger and is from 10x single cell data. Cell Ranger uses STAR for alignment. I also ran picard MarkDuplicates on the bam file. I get the error ValueError: No objects to concatenate.
example line:
MG01HX03:297:H7NV7CCX2:4:1111:18558:53785 16 1 14554 1 91M * GCTCCTTGAAGCTGGTCTCCACACAGTGCTGGTTCCGTCACCCCCTCCCAAGGAAGTAGGTCTGAGCAGCTTGTCCTGGCTGTGTCCATGT JF7JFA<JJFJJAF7<JJJJJJJJJF-FJAJJJAJFA7FFJJJJJFJFJJJJJJJJJJJJJJJJJJJJJJJJJJFJFJJJJJJFFJFFFAA CB:Z:ACGGGTCCATTGCCTC-1 UB:Z:GCTTGTATATTA BC:Z:CAATACCC RE:A:I PG:Z:MarkDuplicates RG:Z:1459CER_A_10000:0:1:H7NV7CCX2:4 NH:i:3 HI:i:1 nM:i:0 CR:Z:ACGGGTCCATTGCCTC UR:Z:GCTTGTATATTA AS:i:89 QT:Z:AAFFFJJJ CY:Z:AAFFFFFJJJJJJJJJ UY:Z:JJFJFJJJJJJJ xf:i:0li:i:0
My bam file does not have "chr" in front of the chromosome number, so I modified it to add "chr" but it still gives the same error.
Are 10x bam files compatible with rnaindel? Would it help if I email you a copy of my bam file? Thank you for your help!
RNAIndel has been developed using Illumina BAM files. Please email me the test 10x BAM file (https://github.com/stjude/RNAIndel#contact). I will check what I can do to make RNAIndel compatible with 10X BAM files. Many thanks to your cooperation.
Use a reference FASTA indexed by samtools, instead of a reference built by cellranger.