IOError
markymarkfb90 opened this issue · comments
Hi,
I was wondering if you could please help. Have attempted to install and run Optitype as per the guidance. Unfortunately this error is generated:
python /Users/markg14/software/OptiType-master/OptiTypePipeline.py -i ./test/rna/CRC_81_N_1_fished.fastq ./test/rna/CRC_81_N_2_fished.fastq --rna -v -o ./test/rna/
mapping with 4 threads...
0:00:02.83 Mapping CRC_81_N_1_fished.fastq to NUC reference...
0:00:04.49 Mapping CRC_81_N_2_fished.fastq to NUC reference...
0:00:05.09 Generating binary hit matrix.
Traceback (most recent call last):
File "/Users/markg14/software/OptiType-master/OptiTypePipeline.py", line 298, in
pos, read_details = ht.pysam_to_hdf(bam_paths[0])
File "/Users/markg14/software/OptiType-master/hlatyper.py", line 186, in pysam_to_hdf
sam = pysam.AlignmentFile(samfile, sam_or_bam)
File "pysam/libcalignmentfile.pyx", line 351, in pysam.libcalignmentfile.AlignmentFile.cinit (pysam/libcalignmentfile.c:5200)
File "pysam/libcalignmentfile.pyx", line 544, in pysam.libcalignmentfile.AlignmentFile._open (pysam/libcalignmentfile.c:7366)
IOError: file ./test/rna/2017_03_02_15_59_39/2017_03_02_15_59_39_1.bam
not found
Any help would be greatly appreciated.
Thank you
Mark
Hi Mark,
I suspect that RazerS3 is not properly configured. Did you add the Razer binary path to the config file and is RazerS3 working when calling it directly?
Also, could you perhaps post or send your config file?
Best,
Benni
Hi Benni,
Thanks for the quick response. Please see my config file:
[mapping]
Absolute path to RazerS3 binary, and number of threads to use for mapping
razers3= /Users/markg14/software/razers3
threads=16
[ilp]
A Pyomo-supported ILP solver. The solver must be globally accessible in the
environment OptiType is run, so make sure to include it in PATH.
Note: this is NOT a path to the solver binary, but a keyword argument for
Pyomo. Examples: glpk, cplex, cbc.
solver=glpk
threads=1
[behavior]
tempdir=/path/to/tempdir # we may enable this setting later. Not used now.
Delete intermediate bam files produced by RazerS3 after OptiType finished
loading them. If you plan to re-analyze your samples with different settings
disabling this option can be a time-saver, as you'll be able to pass the bam
files to OptiType directly as input and spare the expensive read mapping
step.
deletebam=true
In paired-end mode one might want to use reads with just one mapped end (e.g.,
the other end falls outside the reference region). This setting allows the
user to keep them with an optionally reduced weight. A value of 0 means they
are discarded for typing, 0.2 means single reads are "worth" 20% of paired
reads, and a value of 1 means they are treated as valuable as properly mapped
read pairs. Note: unpaired reads will be reported on the result coverage plots
for completeness, regardless of this setting.
unpaired_weight=0
We call a read pair discordant if its two ends best-map to two disjoint sets
of alleles. Such reads can be either omitted or either of their ends treated
as unpaired hits. Note: discordant read pairs are reported on the coverage
plots as unpaired reads, regardless of this setting.
use_discordant=false
Best wishes
Mark
razers3= /Users/markg14/software/razers3
this path has to point to the razers3 binary.
I would recommend using CBC (open source) or CPLEX (academic free license available) as ILP solver.
These solvers also have multicore support.
Hope that resolves the problem.
Best,
benni
Many thanks, all resolved and working now
great :-)
Hi!
In case someone runs into the same error, I wanted to mention that in my case, razers3 worked perfectly when called alone, paths were correct, OptiType run successfully with the sample files etc, and it turned out that the bam files were not created because I was not allocating enough memory (around 18GB were needed for my samples).
Cheers
Hi!
In case someone runs into the same error, I wanted to mention that in my case, razers3 worked perfectly when called alone, paths were correct, OptiType run successfully with the sample files etc, and it turned out that the bam files were not created because I was not allocating enough memory (around 18GB were needed for my samples).
Cheers
hi, I also can run successfully with the sample files, but I get the error when I run my fq.gz files. How do you allocate enough memory for your data?