souporcell icon indicating copy to clipboard operation
souporcell copied to clipboard

update to support current packages on macOS?

Open liviuspenter opened this issue 3 years ago • 0 comments

Hi Haynes,

great software - unfortunately not easy to set up on macOS.

I am wondering whether you might be able to update souporcell to support the latest python packages. I have tried to do the Hard Install on my macbook but failed to get the conda environment you provided to install (same issue as report here)

When I finally managed to install everything, I had to change a bit of code to make souporcell compatible with the new tensorflow package by using the function tf.compat.v1.get_variable and by setting up the compatibility:

import tensorflow.compat.v1 as tf tf.disable_v2_behavior()

Most things then worked fine, except for this error, which people also reported previously.

(base) liviuspenter@Liviuss-MacBook-Pro tmp % /Users/shaka87/dfci/github/souporcell/souporcell_pipeline.py -i /Users/shaka87/dfci/10026/10x/data/Pool96_15/possorted_genome_bam.bam -b /Users/shaka87/dfci/10026/10x/data/Pool96_15/filtered_feature_bc_matrix/barcodes.tsv -f /Users/shaka87/software/refdata-cellranger-GRCh38-3.0.0/fasta/genome.fa -t 8 -o souporcell_pipeline -k 2 --common_variants /Users/shaka87/dfci/software/filtered_2p_1kgenomes_unchr.vcf --skip_remap SKIP_REMAP checking modules imports done checking bam for expected tags checking fasta using common variants 8 running vartrix running souporcell clustering /Users/liviuspenter/Dropbox (Partners HealthCare)/github/souporcell/souporcell/target/release/souporcell -k 2 -a souporcell_pipeline/alt.mtx -r souporcell_pipeline/ref.mtx --restarts 100 -b /Users/shaka87/dfci/10026/10x/data/Pool96_15/filtered_feature_bc_matrix/barcodes.tsv --min_ref 10 --min_alt 10 --threads 8 running souporcell doublet detection running co inference of ambient RNA and cluster genotypes 30830 excluded for potential RNA editing WARNING:pystan:No module named 'stanfit4anon_model_c58d6755a445ee1723e096eb7e36ea75_355834653533342947' WARNING:pystan:Something went wrong while unpickling the StanModel. Consider recompiling. 71 doublets excluded from genotype and ambient RNA estimation 1402 not used for soup calculation due to possible RNA edit Traceback (most recent call last): File "/Users/liviuspenter/Dropbox (Partners HealthCare)/github/souporcell/consensus.py", line 348, in fit = sm.optimizing(data=counts_dat) File "/Users/liviuspenter/miniconda3/lib/python3.7/site-packages/pystan/model.py", line 542, in optimizing fit = self.fit_class(data, seed) AttributeError: 'StanModel' object has no attribute 'fit_class' Traceback (most recent call last): File "/Users/shaka87/dfci/github/souporcell/souporcell_pipeline.py", line 599, in consensus(args, ref_mtx, alt_mtx, doublet_file) File "/Users/shaka87/dfci/github/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 "/Users/liviuspenter/miniconda3/lib/python3.7/subprocess.py", line 363, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['/Users/liviuspenter/Dropbox (Partners HealthCare)/github/souporcell/consensus.py', '-c', 'souporcell_pipeline/clusters.tsv', '-a', 'souporcell_pipeline/alt.mtx', '-r', 'souporcell_pipeline/ref.mtx', '-p', '2', '--output_dir', 'souporcell_pipeline', '--soup_out', 'souporcell_pipeline/ambient_rna.txt', '--vcf_out', 'souporcell_pipeline/cluster_genotypes.vcf', '--vcf', 'souporcell_pipeline/common_variants_covered.vcf']' returned non-zero exit status 1.

Thank you!

livius

liviuspenter avatar Jul 06 '21 18:07 liviuspenter