wheaton5 / souporcell

Clustering scRNAseq by genotypes
MIT License
163 stars 46 forks source link

Error fitting pystan model #148

Open mumichae opened 2 years ago

mumichae commented 2 years ago

I'm getting an error when calling the pipeline through singularity with the test data that was provided in the README. The issue persists when I use a local installation of the pipeline.

WARNING:pystan:/tmp/tmpnwo6wvui/stanfit4anon_model_c58d6755a445ee1723e096eb7e36ea75_355834653533342947.cpython-36m-x86_64-linux-gnu.so: failed to map segment from shared object
WARNING:pystan:Something went wrong while unpickling the StanModel. Consider recompiling.
...
Traceback (most recent call last):
  File "/opt/souporcell/consensus.py", line 348, in <module>
    fit = sm.optimizing(data=counts_dat)
  File "/usr/local/envs/py36/lib/python3.6/site-packages/pystan/model.py", line 472, in optimizing
    fit = self.fit_class(data, seed)
AttributeError: 'StanModel' object has no attribute 'fit_class'
Traceback (most recent call last):
  File "/opt/souporcell/souporcell_pipeline.py", line 599, in <module>
    consensus(args, ref_mtx, alt_mtx, doublet_file)
  File "/opt/souporcell/souporcell_pipeline.py", line 549, in consensus
    "--output_dir",args.out_dir,"--soup_out", args.out_dir + "/ambient_rna.txt", "--vcf_out", args.out_dir + "/cluster_genotypes.vcf", "--vcf", final_vcf])
  File "/usr/local/envs/py36/lib/python3.6/subprocess.py", line 311, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/opt/souporcell/consensus.py', '-c', 'demux_data_test/clusters.tsv', '-a', 'demux_data_test/alt.mtx', '-r', 'demux_data_test/ref.mtx', '-p', '2', '--output_dir', 'demux_data_test', '--soup_out', 'demux_data_test/ambient_rna.txt', '--vcf_out', 'demux_data_test/cluster_genotypes.vcf', '--vcf', 'demux_data_test/souporcell_merged_sorted_vcf.vcf.gz']' returned non-zero exit status 1.
wheaton5 commented 2 years ago

I am working on making a new singularity build with these issues fixed. But you might not need that step. That just estimates ambient RNA and calls final cluster genotypes. The clustering is already completed.

mumichae commented 2 years ago

Thanks for the quick reply! Is there a way to explicitly skip that step in the pipeline or is that not recommended?

wxicu commented 1 year ago

I also met this error, when will the new singularity build released?

wxicu commented 1 year ago

Thanks for the quick reply! Is there a way to explicitly skip that step in the pipeline or is that not recommended?

Hey, I see you closed the issue. Did you find out any solution?

mumichae commented 1 year ago

I didn't end up needing the last step. Guess this thread needs to remain open then

wxicu commented 1 year ago

I am working on making a new singularity build with these issues fixed. But you might not need that step. That just estimates ambient RNA and calls final cluster genotypes. The clustering is already completed.

Is there any update so far? Because I need the genotype info at the end. Thanks in advance!

wxicu commented 1 year ago

@wheaton5 Is there any update to solve the issue? Thank you!

wheaton5 commented 1 year ago

I will take some time tomorrow on this. Its difficult as im a new assistant prof and am not funded to work on this currently. Lots of demands on my time. But i do care and want to address issues.

aygiesler commented 1 year ago

Hi, any updates on solving this? Thanks!

wheaton5 commented 1 year ago

Sorry, its a complicated build. I worked on it a few weeks ago but gave up. I'll give it another shot now.