Index out of bounds for TooManyPeaks
AdrianaAlexander opened this issue · 7 comments
Hello,
Thank you for making this neat program!
I am attempting to run TooManyPeaks according to your vignette, however, I keep running into the following error message:
too-many-cells: ./Data/Vector/Generic.hs:257 ((!)): index out of bounds (0,0)
CallStack (from HasCallStack):
error, called at ./Data/Vector/Internal/Check.hs:87:5 in vector-0.12.2.0-2zHAlcbUq1I7DJzPuCRDoB:Data.Vector.Internal.Check
Here is my code:
too-many-cells make-tree\ -m test.sorted2.tsv \ --filter-thresholds "(1000, 1)" \ --binwidth 5000 \ --lsa 50 \ --normalization NoneNorm \ --blacklist-regions-file Anshul_Hg19UltraHighSignalArtifactRegions.bed.gz \ --draw-node-number \ --draw-mark "MarkModularity" \ --fragments-output \ --labels-output \ -o out \ > out_leaves.csv
I've attached the top and bottom rows of my tsv file here.
Also, I am wondering if it is possible to provide a labels.csv file, including barcode and cell type, for the TooManyPeaks option.
Thank you. I would really like to get this to work!
The default is to look at a CSV file matrix when pointing to a file, matrix market format (10x) when pointing to a folder, and a fragments file when pointing to a file containing "fragments" and in .tsv.gz
format. So, try compressing your input matrix with gzip
and putting "fragments" in the file name (i.e. test_sorted_fragments.tsv.gz
).
Also, you are definitely able to use a labels.csv
file for TooManyPeaks!
Thank you for your help. I'm sorry I am running into a few issues. I ran your suggestion, and while it worked, I encountered a new error:
terminate called after throwing an instance of 'std::invalid_argument'
what(): stoll
/ddn/gs1/home/alexanderak/bin/too-many-cells: line 5: 45686 Aborted (core dumped) /ddn/gs1/biotools/toomanycells/bin/too-many-cells "$@"
Best,
Adriana
Are you running the vignette exactly? Does that work for you?
Yeah, I am, and it throws the 'terminate' message shown above. Thank you for your help, btw!
Can I see your command? The command you originally showed was not part of the TooManyPeaks walkthrough in the beginning (https://gregoryschwartz.github.io/too-many-cells/too-many-peaks_doc/too-many-peaks.html)
Sorry about that. I used the initial code that was shown in the TooManyPeaks GitHub page. I also tried the beginning command from the link above and received the same error. The command was this:
too-many-cells make-tree
--m test_sorted2_fragments.tsv.gz
--filter-thresholds "(1000, 1)"
--binwidth 5000
--lsa 50
--normalization NoneNorm
--output out
--matrix-output mat \
clusters.csv
The short argument would be -m
, not --m
, and I don't know if you would escape the newline if the others were not escaped. However, I don't think that would have caused the error. Your input does not seem to be from the vignette, can you follow what it does exactly to see if it is working on your machine with the same data?