Skip to content

Commit

Permalink
Update loadMIDAS2.R
Browse files Browse the repository at this point in the history
  • Loading branch information
noriakis committed Oct 26, 2023
1 parent 0a76a7f commit ca66ef4
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion R/loadMIDAS2.R
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,10 @@ loadMIDAS2 <- function(midas_merge_dir,
snpRet$species_name <- nmdic[as.character(snpRet$species_id)]
geneRet$species_name <- nmdic[as.character(geneRet$species_id)]
}

snpRet$species_id <- as.character(snpRet$species_id)
geneRet$species_id <- as.character(geneRet$species_id)

return(
list("snps"=snpRet,
"genes"=geneRet)
Expand Down Expand Up @@ -270,7 +274,11 @@ loadMIDAS2 <- function(midas_merge_dir,
stana@snpsInfo <- snpInfoList
stana@snpsDepth <- snpDepthList
stana@genes <- geneList
stana@ids <- union(names(geneList),names(snpList))
if (!is.null(candSp)) {
stana@ids <- candSp |> as.character()
} else {
stana@ids <- union(names(geneList),names(snpList))
}
stana <- initializeStana(stana,cl)
if (!is.null(taxtbl)){
if (!is.null(clearSnSp)) stana@clearSnpsSpecies <- clearSnSp
Expand Down

0 comments on commit ca66ef4

Please sign in to comment.