Skip to content

Commit

Permalink
fix output rownames
Browse files Browse the repository at this point in the history
  • Loading branch information
UCDNJJ committed Mar 18, 2023
1 parent 484ecc3 commit 1a58164
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/loadTaxonomy.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ loadTaxonomy = function(refFolder,
## Convert count data into a matrix
countsReference = as.matrix(countsReference[,names(countsReference)!=gene_id])
rownames(countsReference) = colnames(datReference)
countsReference = t(countsReference)
countsReference = Matrix::t(countsReference)
}else{
countsReference = NULL
}
Expand Down Expand Up @@ -97,10 +97,10 @@ loadTaxonomy = function(refFolder,
}
)
}

# This next bit should NOT be needed, but the anndata crashes without it
if(is_tibble(umap.coords)){
umap.coords = as.data.frame(umap.coords)
print(class(umap.coords))
rownames(umap.coords) = umap.coords[,sample_id]
}

Expand Down
1 change: 1 addition & 0 deletions R/taxonomy_mapping.R
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ taxonomy_mapping = function(AIT.anndata, query.data, corr.map=TRUE, tree.map=TRU
#############
## Combine mapping results
mappingAnno = Reduce(cbind, mappingResults)
rownames(mappingAnno) = colnames(query.data) ## Add query sample names to mapping results

#############
## ---- Convert cell type mappings to subclass, neighborhood (if available), and class -------------------------------
Expand Down

0 comments on commit 1a58164

Please sign in to comment.