Skip to content

Commit

Permalink
Merge branch 'main' into inkar-updating-docker-to-v0.96.3
Browse files Browse the repository at this point in the history
  • Loading branch information
inkarkapen authored Aug 22, 2024
2 parents 4f9ea07 + 4382548 commit 2fe5728
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions R/loadTaxonomy.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#' @param sample_id Field in reference taxonomy that defines the sample_id.
#' @param hGenes User supplied variable gene vector. If not provided, then all genes are used.
#' @param gene_id Field in counts.feather that defines the gene_id.
#' @param log.file.path Path to write log file to. Defaults to current working directory.
#' @param force Force rebuild the anndata object for the taxonomy.
#'
#' @return Organized reference object ready for mapping against.
Expand All @@ -15,6 +16,7 @@ loadTaxonomy = function(taxonomyDir,
sample_id = "sample_id",
hGenes=NULL,
gene_id = "gene",
log.file.path=getwd(),
force=FALSE){

## Load from directory name input
Expand All @@ -35,8 +37,8 @@ loadTaxonomy = function(taxonomyDir,
}))
}
## Ensure anndata is in scrattch.mapping format
if(!checkTaxonomy(AIT.anndata,taxonomyDir)){
stop(paste("Taxonomy has some breaking issues. Please check checkTaxonomy_log.txt in", taxonomyDir, "for details"))
if(!checkTaxonomy(AIT.anndata,log.file.path)){
stop(paste("Taxonomy has some breaking issues. Please check checkTaxonomy_log.txt in", log.file.path, "for details"))
}
} else if(all(file.exists(c(file.path(taxonomyDir,"anno.feather"),
file.path(taxonomyDir,"data.feather"),
Expand Down

0 comments on commit 2fe5728

Please sign in to comment.