Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Index out of bounds for TooManyPeaks #45

Open
AdrianaAlexander opened this issue Mar 23, 2022 · 7 comments
Open

Index out of bounds for TooManyPeaks #45

AdrianaAlexander opened this issue Mar 23, 2022 · 7 comments

Comments

@AdrianaAlexander
Copy link

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.
Screen Shot 2022-03-23 at 3 31 08 PM
Screen Shot 2022-03-23 at 3 31 23 PM

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!

@GregorySchwartz
Copy link
Owner

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!

@AdrianaAlexander
Copy link
Author

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

@GregorySchwartz
Copy link
Owner

Are you running the vignette exactly? Does that work for you?

@AdrianaAlexander
Copy link
Author

Yeah, I am, and it throws the 'terminate' message shown above. Thank you for your help, btw!

@GregorySchwartz
Copy link
Owner

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)

@AdrianaAlexander
Copy link
Author

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

@GregorySchwartz
Copy link
Owner

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants