1 2 3 4 5 6 7 8 9 10 11 12 13 14
| rm(list = ls())
args <- commandArgs()
df = data.table::fread(args[1], encoding = "UTF-8") %>% dplyr::mutate(n = stringr::str_length(sequence))
df = df %>% tibble::add_row(id = as.character(nrow(.)), sequence = as.character(unique(df$n)), n = 1, .before = 1) %>% dplyr::select(-3) %>% data.table::fwrite(file = args[2], sep = " ", col.names = FALSE, row.names = FALSE)
|
💌lixiang117423@foxmail.com
💌lixiang117423@gmail.com