Did not find any barcode-spots of the specified object in input for 'feature_df'.#57
Open
sciencepeak wants to merge 6 commits intotheMILOlab:masterfrom
Open
Did not find any barcode-spots of the specified object in input for 'feature_df'.#57sciencepeak wants to merge 6 commits intotheMILOlab:masterfrom
sciencepeak wants to merge 6 commits intotheMILOlab:masterfrom
Conversation
Author
|
the gene_pos_df issue fixed. The old CONICSmat::getGenePositions() is no longer working. I fix the getGenePositions() and included the function in the SPATA2 package before the maintainer of CONICSmat approve my pull request The gene position information is updated to ensembl v109. Add a default option of removing chr0, chr23, and chr24 so people will not get confused, and then study, and then make their own gene_pos_df. The runCnvAnalysis parameter list is mostly unchanged to make the dependent code working. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi,
When I run the function runCnvAnalysis(), I got this error:
Error in addFeatures(object = object, feature_df = ordered_cnv_df2, overwrite = TRUE) : Did not find any barcode-spots of the specified object in input for 'feature_df'.After careful debugging, I found that the problem arises from the barcode name processing in the runCnvAnalysis() function. The function changes the barcode names, whereas the barcode in the spata2 objects are not changed. Thereby, the barcode name discrepancy appears.
Specifically, after testing the source code in the runCnvAnalysis() function, I found that the barcodes’ dot symbols are all changed to hyphen symbols by using
stringr::str_replace_all(string = barcodes, pattern = "\\.", replacement = "-"). I see the replacement is meaningful, because the statementresults <- utils::read.table(result_dir)reads the file from disk and make all the hyphen changed to dot in the column names, which is a default behavior of R language. So there is a need to replace all dot back to hyphen.However, changing the barcode names in the function might not be the best way to handle the custom barcode naming conventions from different users. In our case, our barcode names have dot as well as hyphen to designate the hierarchical structure of the naming levels. So, here I propose a way to keep the barcode unchanged while keep the code running and to make the barcode name consistent with the one in the spata2 object. My solution is to read the file with the parameter
check.names = FALSE, like thisutils::read.table(result_dir, check.names = FALSE). This way all the hyphens are kept and not changed to dot. Then the dot to hyphen conversion statements are all deleted. After testing the barcode names in different R object produced thereafter, I found the barcode name without any change works well throughout the rest of the function runCnvAnalysis() as well as addFeatures() called by runCnvAnalysis().Thanks for your contribution to the field and help to our research.
Best,