Commit 844f143b authored by Safia Saci's avatar Safia Saci
Browse files

Upload New File

parent 1ef96124
library(Biostrings)
library(stringr)
global_file <- readDNAStringSet("Sus_scrofa.Sscrofa11.1.dna.nonchromosomal.fa")
split_fasta <- lapply(seq_along(global_file), function(i) global_file[i])
names_fasta <- lapply(split_fasta, function(x) {
my_name <- names(x)
str_extract(my_name, "^[:alnum:]+\\.[:alnum:]")
})
lapply(seq_along(global_file), function(i){
writeXStringSet(
split_fasta[[i]],
file.path("seq_contig", paste0(names_fasta[[i]], ".fa"))
)
})
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment