-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
I've been using a broom-style function to tidy seqinr::read.fasta objects. Would there be any interest in adding this to biobroom if I do a pull request?
read_fasta <- function(fasta_filename, annot = FALSE){
fasta <- seqinr::read.fasta(fasta_filename, as.string = TRUE)
# Convert seqinr SeqFastadna object to data.frame
fasta_df <- fasta %>%
sapply(function(x){x[1:length(x)]}) %>%
as.data.frame %>%
broom::fix_data_frame(newcol = "ID", newnames = "Sequence")
if(annot == TRUE){
annot_df <- getAnnot(fasta) %>%
sapply(function(x){x[1:length(x)]}) %>%
as.data.frame() %>%
broom::fix_data_frame(newnames = "Annot")
fasta_df <- cbind(fasta_df, annot_df)
}
return(fasta_df)
}
read_fasta('https://www.uniprot.org/uniprot/?query=PGH1&format=fasta&limit=10')
https://gist.github.com/clairemcwhite/a5e889f6192a664be45c0226d0ab5813
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels