I have imported 2 sets of sequences in fasta format and imported them as DNAStringSets using decipher (which I believe uses biostrings for the basic manipulation of nucleic acts string sets):
> extraemm_DNA_untrim1
A DNAStringSet instance of length 5
width seq names
[1] 346 GCATCCGTAGCGGTCGCTGTGGCT...AAGATGTAGAACGTCACTATCTTA EMM88 emm88.0 (em...
[2] 391 GCATCAGTAGCGGTTGCTTTGACT...AATTAGCGGATAAGCAAGAACATC EMM225 emm225.0 (...
[3] 499 GGTACTGCTTCAGTAGCGGTTGGT...AAGAAGCAGAGCAGAAAAAACTTA EMM52 emm52.0 (em...
[4] 360 GCATCCGTAGCAGTCGCTGTGGCT...GAACGCCAAAGTCAACGAGAAGTC EMM2 emm2.0 (emm-...
[5] 384 AGCAGTTGCTGTGGCTGTTTTAGG...AATAGACAAGCGTTATCAAGAACA EMM114 emm114.0 (...
> extraemm_DNA_untrim2
A DNAStringSet instance of length 5
width seq names
[1] 345 CATCCGTAGCGGTCGCTGTGGCTG...AAGATGTAGAACGTCACTATCTTA EMM88 emm88.0 (em...
[2] 390 CATCAGTAGCGGTTGCTTTGACTG...AATTAGCGGATAAGCAAGAACATC EMM225 emm225.0 (...
[3] 498 GTACTGCTTCAGTAGCGGTTGGTT...AAGAAGCAGAGCAGAAAAAACTTA EMM52 emm52.0 (em...
[4] 359 CATCCGTAGCAGTCGCTGTGGCTG...GAACGCCAAAGTCAACGAGAAGTC EMM2 emm2.0 (emm-...
[5] 383 GCAGTTGCTGTGGCTGTTTTAGGA...AATAGACAAGCGTTATCAAGAACA EMM114 emm114.0 (...
Very simply I would like to get a new DNAStringSet with sequences 1 and 2 from extraemm_DNA_untrim1 and 3, 4 and 5 from extraemm_DNA_untrim2.
I realise this is probably a very simple question, but I can not find much simple documentation on Biostrings basics and I am quite new to using it.
Thanks
Strange, I did try something similar and it combined the DNA from all the selected sequences into one long string, but I can not remember how I managed that.
Thanks for this answer