GregorySchwartz/too-many-cells

error openTempFile

Opened this issue · 13 comments

Hi Gregor,
I managed to obtain trees with Too Many Cells pruned with smartcutoff 2 and midsize 1.
I would now like to overlay some continuous variables on the same tree, and I am following the code below:

too-many-cells make-tree
--matrix-path ./data/brain/filtered_feature_bc_matrix/
--matrix-path ./data/heart/filtered_feature_bc_matrix/
--filter-thresholds "(250, 1)"
--prior out
--feature-column 2
--normalization "UQNorm"
--draw-leaf "DrawItem (DrawContinuous ["Rbfox3"])"
--dendrogram-output "tree_neuron_gene_symbol.svg"
--draw-scale-saturation 6
--output out \

clusters.csv

printf "./out/tree_neuron_gene_symbol.svg"

However, I get this error:
too-many-cells: /scratch/XXXXXXX: openTempFile: does not exist (No such file or directory)
/var/spool/slurmd/jobXXXXXXX/slurm_script: line 36: --smart-cutoff: command not found

Moreover, could you also explain how the matrix and the labels file should be formatted when I want to print continuous variables?
Looking forward to hearing from you!
Thank you very much in advance
Angelica

Is that exact command you used? Is it in a bash script? If you have newlines in a bash script you should escape them as you did on the output line.

Hi,
Thank you very much!
The exact command I used is this (by launching an sh file)

module load too-many-cells

too-many-cells make-tree
--matrix-path /[...].Input.csv
--matrix-path /[...].Input.csv
--filter-thresholds "(0.000000000000000000000000000001, 1)"
--prior /.../priorFolder
--smart-cutoff 2
--min-size 1
--feature-column 2
--draw-leaf "DrawItem (DrawContinuous ["LNMF_1"])"
--draw-scale-saturation 10
--output /.../outDirectory
> /.../output.csv

Thank you very much
Angelica

It isn't clear from your paste whether you have newlines in your script. If so, you need to escape them. If you would like an interactive version of the tree, have you seen https://github.com/schwartzlab-methods/too-many-cells-interactive

Thank you very much!
Yes, I escaped them all but still the issue persists. Thank you very much for pointing to the interactive version!

Could you paste the script again in markdown syntax verbatim so I can test?

The trick is that we are working on an input matrix which is not a gene expression matrix and we saved it as an input.csv file.
We therefore don't have any other features.tsv file containing the features. in the matrix path input we do not input the folder but directly the input.csv generated from us. This works for the previous steps until generating a tree and adding labels to it. However, we cannot use the script to plot continuous variables on it. It says it cannot find the function --smartcutoff etc
I copy and paste again the script below.
Thank you very much for your kind support,
Best
Angelica

There are two separate issues I think you are having, are you still having the temp file issue? Would you be able to change your tmpdir to a directory you a permission to create a file and test?

What is your remaining problem? Could you please send the exact command and the exact error message you were receiving from that command?

Could you also send the head and tail of the input matrix, features, and barcode files.

Hi Gregory,
thanks a lot for the reply.

Please find the updated script attached.
TooManyCells.pdf

The error I am getting is this one:
Clumpiness requires labels for cells, skipping ...
[===========================================] 100%

~/slurm_script: line 34: --draw-leaf: command not found

This is the head of my matrix.mtx file

%%MatrixMarket matrix coordinate real general
12384 22 213910
1 1 5.8805870440584774e-5
2 1 .00010065311055221438
4 1 .0001263418669510648
5 1 6.257336511186656e-5
6 1 .00013968189894054871
7 1 9.055497281423947e-5
8 1 .00010760125567004136
9 1 6.634946069476296e-5

Tail matrix.mtx
12380 22 .0009302237121057329
12381 22 .00014739944821827444
12382 22 .0002177194569149948
12383 22 .00020795247884700688
12384 22 1.5531936970709823e-6

Head barcodes.tsv
AAACAGCCACAGCCTG-2
AAACAGCCACCTATAG-2
AAACAGCCAGGATGGC-2
AAACAGCCAGGTCCTG-1
AAACAGCCAGTTGCGT-1

tail barcodes.tsv
TTTGTTGGTACCAGGT-2
TTTGTTGGTCCGGTTC-2
TTTGTTGGTGATCAGC-2
TTTGTTGGTTGCACGG-2
TTTGTTGGTTGGATCA-2

head genes.tsv
LNMF_1 LNMF
LNMF_2 LNMF
LNMF_3 LNMF
LNMF_4 LNMF
LNMF_5 LNMF
LNMF_6 LNMF

tail genes.tsv
LNMF_20 LNMF
LNMF_21 LNMF
LNMF_22 LNMF

Could you send me your slurm script? You can send over email if you don't want to do it here.

Replied by email!
Thanks a lot
Angelica