I have a DNAStringset containing some sequences of length 25. i want to make an .fq file of it but first i need to add a "specific" header (which stored in a vector) for each read. the data is like this:
A DNAStringSet instance of length 2 width seq names  25 AGCTTTTCATTCTGACTGCAACGGG coli  25 ATTTCCTTACTCAACCCCGAAACGC coli
And the result that i want is like:
@coli:1500 AGCTTTTCATTCTGACTGCAACGGG + XXXXXXXXXXXXXXXXXXXXXXXX @coli:1700 ATTTCCTTACTCAACCCCGAAACGC + XXXXXXXXXXXXXXXXXXXXXXXX
I can simply make each line and write it to file using cat() function but this is really slow for large datasets. so i found writeXStringSet(data,format=".fq") to use. but i can't find how to prepare my object for using this function.
My question is:
How to prepare my file for this function? or is there any other easy and quick way of doing this?