Skip to content

Commit

Permalink
clean unused scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
sdgamboa committed Nov 22, 2023
1 parent 8aeeb40 commit a387179
Show file tree
Hide file tree
Showing 11 changed files with 6 additions and 816 deletions.
13 changes: 0 additions & 13 deletions inst/scripts/00_generateTree.R

This file was deleted.

52 changes: 0 additions & 52 deletions inst/scripts/add_clusters.R

This file was deleted.

21 changes: 0 additions & 21 deletions inst/scripts/binary.R

This file was deleted.

49 changes: 0 additions & 49 deletions inst/scripts/distance_between_nodes.R

This file was deleted.

3 changes: 3 additions & 0 deletions inst/scripts/download_taxids_2.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#! /bin/bash

# I think this is the version (2) that I need rather than download_taxids.sh

# rm -rf *txt
# RUn in terminal, not using Rstudio
exec > >(tee log.txt) 2>&1
Expand Down
40 changes: 3 additions & 37 deletions inst/scripts/get_data_tree.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
## Script used to generate tree_list (ncbi_tree)

library(purrr)
library(dplyr)
library(taxPPro)
Expand All @@ -6,7 +8,6 @@ library(tidyr)
library(bugphyzz)
library(treeio)


# taxizedb::db_download_ncbi(overwrite = TRUE)

fname1 <- system.file(
Expand Down Expand Up @@ -155,40 +156,5 @@ tree_sp <- TreeSummarizedExperiment::toTree(tbl_for_tree)
tree_sp$node.label <- sub('^.*:', '', tree_sp$node.label)

usethis::use_data(tree_list, overwrite = TRUE)
usethis::use_data(tree_sp, overwrite = TRUE)
## usethis::use_data(tree_sp, overwrite = TRUE)
## This whole procedure takes about 10 minutes (local machine).
## This is an improvement. It took about 1 hr before.


##
# domain phylum class order family genus species strain
# 2 82 172 352 843 4716 27495 41707



# library(data.tree)
# library(purrr)
#
# data(tree_list)
# tree <- as.Node(tree_list)
#
#
# ranks = c(
# domain = 'd__', phylum = 'p__', class = 'c__', order = 'o__',
# family = 'f__', genus = 'g__', species = 's__', strain = 't__'
# )
# output <- vector('list', length(ranks))
# for (i in seq_along(output)) {
# output[[i]] <- tree$Get(function(node) {
# if (grepl(ranks[i], node$name))
# node$name
# })
# }
# names(output) <- names(ranks)
# output <- map(output, ~ .x[!is.na(.x)])
# map_int(output, length)


# domain phylum class order family genus species strain
# 2 82 172 352 843 4716 27529 41749

File renamed without changes.
22 changes: 0 additions & 22 deletions inst/scripts/inh_script_sample.R

This file was deleted.

File renamed without changes.
Loading

0 comments on commit a387179

Please sign in to comment.