Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
GenEpi
Analyses
rosePigs
Commits
844f143b
Commit
844f143b
authored
Jun 07, 2021
by
Safia Saci
Browse files
Upload New File
parent
1ef96124
Changes
1
Hide whitespace changes
Inline
Side-by-side
sub_nonchromosomal_file.R
0 → 100644
View file @
844f143b
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"
))
)
})
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment