This is a test version of Biostars. For the public version, visit https://www.biostars.org.
list to one fasta file

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

0 answers

No answers yet.

Log in to answer this question.