list to one fasta file
0
0
Entering edit mode
5.8 years ago
c.chakraborty ▴ 180

Dear all,

I used biomaRt to retrieve the 3'UTR sequences of 1527 transcpts, using their refseq ids:

for (i in uniquetrans[,1]) {
    sequences[i] = getSequence(id = i,type = "refseq_mrna",seqtype = "3utr", mart = ensembl, verbose = FALSE)
 }

The sequences were retrieved, but now, I have a problem in converting the list into a file. I tried exportFASTA(), but it works for a single sequence at time which is irritating. I also tried lapplys such as

 lapply(sequences, write, "test.txt", append=TRUE, ncolumns=1527)

and I got the sequences, but they don't have a header. What do i do now. I can write a for loop and convert each one in a separate text file, but it is so cumbersome! Please help.

Regards,
Chaitali

R biomaR FASTA • 1.5k views
ADD COMMENT

Login before adding your answer.

Traffic: 1920 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