Closed carversh closed 1 year ago
Figured out that instead of putting in a counts file with -c, you put that file in as the TPM after the --tpm flag. Thanks!
Yep, it allows you to input your own normalized data file rather than using the default TPM calculation. This is useful if you want to use e.g. TP10K rather than TPM or have some other per-cell normalization you'd like to do.
-c ex Hi Can you please share the TPM command, I am using the following command and its throwing error
cnmf prepare --output-dir ./ --name cNMF_epi --tpm TPM tpm_counts.tsv -k 5 6 7 8 9 10 11 --n-iter 500 --seed 14 --numgenes 2000
Traceback (most recent call last):
File "/Users/akhaliq/miniconda3/envs/cnmf_env/bin/cnmf", line 8, in <module>
sys.exit(main())
File "/Users/akhaliq/miniconda3/envs/cnmf_env/lib/python3.7/site-packages/cnmf/cnmf.py", line 1029, in main
num_highvar_genes=args.numgenes, genes_file=args.genes_file, init=args.init)
File "/Users/akhaliq/miniconda3/envs/cnmf_env/lib/python3.7/site-packages/cnmf/cnmf.py", line 297, in prepare
if counts_fn.endswith('.h5ad'):
I believe in your case it would be see below. This is the only thing that worked for me. It's unintuitive to have to flag your matrix as counts and tpm because it's not a counts matrix, but this is the only version that ran for me -- it's not super clear on the github how to do this!:
cnmf prepare --output-dir ./ --name cNMF_epi -c tpm_counts.tsv -k 5 6 7 8 9 10 11 --n-iter 500 --seed 14 --numgenes 2000 --tpm tpm_counts.tsv
Hi, how do you run the TPM flag? I tried running it the following ways and got an error (would you mind specifying this in the tutorial?):