churchill-lab / alntools

Preprocess bam file into a compressed alignment incidence matrix (equivalence class)
https://churchill-lab.github.io/alntools/
MIT License
2 stars 1 forks source link

bam2emase execution errors #11

Open Argonvi opened 2 years ago

Argonvi commented 2 years ago

Hello everyone,

I want to process some bam files in order to get the files to perform ASE with EMASE-zero on cancer RNA-seq samples. After installing alntools through a conda environment I tried executing with this command: alntools bam2emase FER15_processed.bam FER15_processed.bam.emase

getting the following error message:

[alntools] [04/28/2022 02:13:04 PM] Error: Append mode is not implemented yet
[alntools] [04/28/2022 02:13:04 PM] Error: Append mode is not implemented yet
[alntools] [04/28/2022 02:13:04 PM] Error: Append mode is not implemented yet
[alntools] [04/28/2022 02:13:04 PM] Error: Append mode is not implemented yet
[alntools] [04/28/2022 02:13:04 PM] Error: Append mode is not implemented yet
[alntools] [04/28/2022 02:13:04 PM] Error: Append mode is not implemented yet
[alntools] [04/28/2022 02:13:04 PM] Error: Append mode is not implemented yet
[alntools] [04/28/2022 02:13:04 PM] Error: Append mode is not implemented yet
[alntools] [04/28/2022 02:13:04 PM] Error: Append mode is not implemented yet
[alntools] [04/28/2022 02:13:04 PM] Error: Append mode is not implemented yet
[alntools] [04/28/2022 02:13:04 PM] Error: Append mode is not implemented yet
[alntools] [04/28/2022 02:13:04 PM] Error: Append mode is not implemented yet
[alntools] [04/28/2022 02:13:04 PM] Error: Append mode is not implemented yet
[alntools] [04/28/2022 02:13:04 PM] Error: Append mode is not implemented yet
[alntools] [04/28/2022 02:13:04 PM] Error: Append mode is not implemented yet
[alntools] [04/28/2022 02:13:06 PM] Error: Append mode is not implemented yet
Traceback (most recent call last):
  File "/home/agonzalez/.conda/envs/alntools/bin/alntools", line 4, in <module>
    __import__('pkg_resources').run_script('alntools==0.1.1', 'alntools')
  File "/home/agonzalez/.conda/envs/alntools/lib/python2.7/site-packages/pkg_resources/__init__.py", line 666, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/home/agonzalez/.conda/envs/alntools/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1462, in run_script
    exec(code, namespace, namespace)
  File "/home/agonzalez/.conda/envs/alntools/lib/python2.7/site-packages/alntools-0.1.1-py2.7.egg/EGG-INFO/scripts/alntools", line 29, in <module>
    cli()
  File "/home/agonzalez/.conda/envs/alntools/lib/python2.7/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/home/agonzalez/.conda/envs/alntools/lib/python2.7/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/home/agonzalez/.conda/envs/alntools/lib/python2.7/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/agonzalez/.conda/envs/alntools/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/agonzalez/.conda/envs/alntools/lib/python2.7/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/home/agonzalez/.conda/envs/alntools/lib/python2.7/site-packages/alntools-0.1.1-py2.7.egg/alntools/cli.py", line 89, in bam2emase
    methods.bam2emase(bam_file, emase_file, chunks, directory, number_processes, rangefile, targets)
  File "/home/agonzalez/.conda/envs/alntools/lib/python2.7/site-packages/alntools-0.1.1-py2.7.egg/alntools/methods.py", line 37, in bam2emase
    bam_utils.convert(bam_filename, None, emase_filename, num_chunks=chunks, number_processes=number_processes, temp_dir=directory, range_filename=range_filename, target_filename=target_filename)
  File "/home/agonzalez/.conda/envs/alntools/lib/python2.7/site-packages/alntools-0.1.1-py2.7.egg/alntools/bam_utils.py", line 831, in convert
    sample_names=[sample])
  File "/home/agonzalez/.conda/envs/alntools/lib/python2.7/site-packages/alntools-0.1.1-py2.7.egg/alntools/matrix/AlignmentPropertyMatrix.py", line 36, in __init__
    Sparse3DMatrix.__init__(self, other=other, h5file=h5file, datanode=datanode, shape=shape, dtype=dtype)
  File "/home/agonzalez/.conda/envs/alntools/lib/python2.7/site-packages/alntools-0.1.1-py2.7.egg/alntools/matrix/Sparse3DMatrix.py", line 46, in __init__
    raise RuntimeError('The shape must be a tuple of three positive integers.')
RuntimeError: The shape must be a tuple of three positive integers.

I also tried this command: alntools bam2emase -c 1 FER15_processed.bam FER15_processed.bam.emase

And got this error:

[E::idx_find_and_load] Could not retrieve index file for '/media/scratch/UMP315_variant_calling_RNASeq_vs_DNA_exomas/analysis/mapping/_bam2ec.0.bam'
Traceback (most recent call last):
  File "/home/agonzalez/.conda/envs/alntools/bin/alntools", line 4, in <module>
    __import__('pkg_resources').run_script('alntools==0.1.1', 'alntools')
  File "/home/agonzalez/.conda/envs/alntools/lib/python2.7/site-packages/pkg_resources/__init__.py", line 666, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/home/agonzalez/.conda/envs/alntools/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1462, in run_script
    exec(code, namespace, namespace)
  File "/home/agonzalez/.conda/envs/alntools/lib/python2.7/site-packages/alntools-0.1.1-py2.7.egg/EGG-INFO/scripts/alntools", line 29, in <module>
    cli()
  File "/home/agonzalez/.conda/envs/alntools/lib/python2.7/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/home/agonzalez/.conda/envs/alntools/lib/python2.7/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/home/agonzalez/.conda/envs/alntools/lib/python2.7/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/agonzalez/.conda/envs/alntools/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/agonzalez/.conda/envs/alntools/lib/python2.7/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/home/agonzalez/.conda/envs/alntools/lib/python2.7/site-packages/alntools-0.1.1-py2.7.egg/alntools/cli.py", line 89, in bam2emase
    methods.bam2emase(bam_file, emase_file, chunks, directory, number_processes, rangefile, targets)
  File "/home/agonzalez/.conda/envs/alntools/lib/python2.7/site-packages/alntools-0.1.1-py2.7.egg/alntools/methods.py", line 37, in bam2emase
    bam_utils.convert(bam_filename, None, emase_filename, num_chunks=chunks, number_processes=number_processes, temp_dir=directory, range_filename=range_filename, target_filename=target_filename)
  File "/home/agonzalez/.conda/envs/alntools/lib/python2.7/site-packages/alntools-0.1.1-py2.7.egg/alntools/bam_utils.py", line 861, in convert
    apm.save(emase_filename, title='bam2ec')
  File "/home/agonzalez/.conda/envs/alntools/lib/python2.7/site-packages/alntools-0.1.1-py2.7.egg/alntools/matrix/AlignmentPropertyMatrix.py", line 508, in save
    Sparse3DMatrix.save(self, h5file=h5file, title=title, index_dtype=index_dtype, data_dtype=data_dtype, incidence_only=incidence_only, complib=complib)
  File "/home/agonzalez/.conda/envs/alntools/lib/python2.7/site-packages/alntools-0.1.1-py2.7.egg/alntools/matrix/Sparse3DMatrix.py", line 335, in save
    i1 = h5fh.create_carray(hgroup, 'indptr', obj=spmat.indptr.astype(index_dtype), filters=fil)
  File "/home/agonzalez/.conda/envs/alntools/lib/python2.7/site-packages/tables/file.py", line 1254, in create_carray
    ptobj[...] = obj
  File "/home/agonzalez/.conda/envs/alntools/lib/python2.7/site-packages/tables/array.py", line 716, in __setitem__
    self._write_slice(startl, stopl, stepl, shape, nparr)
  File "/home/agonzalez/.conda/envs/alntools/lib/python2.7/site-packages/tables/array.py", line 806, in _write_slice
    self._g_write_slice(startl, stepl, countl, nparr)
  File "hdf5extension.pyx", line 1672, in tables.hdf5extension.Array._g_write_slice (tables/hdf5extension.c:15688)
tables.exceptions.HDF5ExtError: HDF5 error back trace

  File "../../../src/H5D.c", line 372, in H5Dget_space
    not a dataset

End of HDF5 error back trace

Internal error modifying the elements (H5ARRAYwrite_records returned errorcode -4)

Help would be appreciated.

Best regards, Arturo

jon4thin commented 2 months ago

Your missing the targets file -t, --targets TARGET FILE Target ID file

I have not figured out what this should be however.