Reading FASTA file with multiple sequences
0
0
Entering edit mode
7.2 years ago
Seot • 0

Hello all,

I'm trying to read a fasta file that has over 5000 sequences. The plan is to create a vector that calls out all the sequences, and those sequences I'll carry over to Bio Linux after I turn them into protein. I've done this, but with only one sequence at a time (that and I'm still new to RStudio). Please see below for the codes I'm using... Can someone please tell me where I'm going wrong?

contigs= read.fasta("contigs.fasta", seqtype = “DNA”)

contigs_dna= contigs[[1]]   (I think this is the part where things go wrong. I'm not sure what code to use in order for the program to recognize the 5000+ sequences.)

getTrans(contigs_dna, sens = "F", NAstring = "X", ambiguous = FALSE, frame = 0, numcode = 1)

contigs_aa= getTrans(contigs_dna,sens = "F")    

write.fasta(contigs_aa,contigs_aa,file.out = "contigs_aa.fasta")

contigsaafile = read.fasta("contigs_aa.fasta", seqtype = "AA")

getAnnot(contigsaafile)
sequence read.fasta multiple sequences R • 3.2k views
ADD COMMENT
0
Entering edit mode

use loop to handle all the contigs

ADD REPLY
0
Entering edit mode

Hello Seot!

It appears that your post has been cross-posted to another site: https://support.bioconductor.org/p/92193/

This is typically not recommended as it runs the risk of annoying people in both communities.

ADD REPLY

Login before adding your answer.

Traffic: 2613 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6