Get a complete view of a long DNA sequence of a Biostrings object in R
1
0
Entering edit mode
arado1 • 0
@arado1-8708
Last seen 9.3 years ago
European Union

I tried to get reverse complement of a DNA sequence in R applying Biostrings package. The length of sequence is around 900 and I want to see it completely but R shows an abstract version with some dots between the codes. Is there anyway to get it completely?

> library("Biostrings")
> d <- DNAString("CTGTTGAAGCGTCAGATGGATAAGCATCCATAATTTACTGTCCATATCCAAGACCTCATAGTATTCCTCGGGCATGAATTTAATTGGCGGGGTCGGGGTTCAAGTAAGCCGTATTTTGGCTTCGCCGCCGCGAATTTGAATGCGAGGCGTCTCCTCAAAGATGAGTAACGGCGTCCTGGGCTTCACAGAACTTTCGTGAGAAAACTCTAAGACTCTACAGAGATCACAAATGGTTTCAGCCCAGACTCTATTACTTGGGAGTAAGGGGGTTGACAACTCGCCACTCTATTTCCCATCATCTGCCCGCAGCTGCGACTGGGCCGAACCGAGATGGATATAGGAATAAAATGTGGTGGTGTTGCCGTGCTCTTTTCGTCCGCGTGTCCATGGCGAGGACAGCTATTTTCCTCTAAAGCCCATGTAGATCGCCTCGATCCCTCGTAAGACCCGGCTGCAGTCTGACGCCCCGACAAATAAGCTACCGCCTCCTAAACCATCCCCGATTCAGATGCGTGCTAACTTCGTGTTTCGGCCTAGCTTTAAGGGTACCGTCAGTCACCGCGACTCATAGCTGTACTCCTTCAGAATAAGGTAGTCCCGATCGTACACGTAGCTACAGAGGTATCAGACACGAGCTCGCGTCAATTCGACTCTTCGAGGCTGTGTGCCCCAGCTCCTCAGGGATCGCAATTTAGCAATCAAGAGATCTTGCCTCGTATCAATGATTTTCGCAGTTGGGTTCACGCCCCCTACAATAGCGCACCGCCTGTGTGCAAAGAAATTTTCTGGTACGTAAGATTCGAGGGAGTAGGGACGAAACATTCATGGCGATAGCAGATTTCCGAGGGCTACGGTGTAGCGGATACTAACCTCCGCGTGGTATAGATAGATACTTACCAAGGACACATGCTCTTCCTGTATAGCCGTTCCCG")
> rc <- reverseComplement(d)
> rc
  932-letter "DNAString" instance
seq: CGGGAACGGCTATACAGGAAGAGCAT...TGCTTATCCATCTGACGCTTCAACAG

 

I would like to get the part in front of "seq" as a DNA sequence, completely and not with dots.

biostrings subsetting View dnastring dnaseq • 1.5k views
ADD COMMENT
3
Entering edit mode
@james-w-macdonald-5106
Last seen 1 day ago
United States
> library(Biostrings)
> d <- DNAString("CTGTTGAAGCGTCAGATGGATAAGCATCCATAATTTACTGTCCATATCCAAGACCTCATAGTATTCCTCGGGCATGAATTTAATTGGCGGGGTCGGGGTTCAAGTAAGCCGTATTTTGGCTTCGCCGCCGCGAATTTGAATGCGAGGCGTCTCCTCAAAGATGAGTAACGGCGTCCTGGGCTTCACAGAACTTTCGTGAGAAAACTCTAAGACTCTACAGAGATCACAAATGGTTTCAGCCCAGACTCTATTACTTGGGAGTAAGGGGGTTGACAACTCGCCACTCTATTTCCCATCATCTGCCCGCAGCTGCGACTGGGCCGAACCGAGATGGATATAGGAATAAAATGTGGTGGTGTTGCCGTGCTCTTTTCGTCCGCGTGTCCATGGCGAGGACAGCTATTTTCCTCTAAAGCCCATGTAGATCGCCTCGATCCCTCGTAAGACCCGGCTGCAGTCTGACGCCCCGACAAATAAGCTACCGCCTCCTAAACCATCCCCGATTCAGATGCGTGCTAACTTCGTGTTTCGGCCTAGCTTTAAGGGTACCGTCAGTCACCGCGACTCATAGCTGTACTCCTTCAGAATAAGGTAGTCCCGATCGTACACGTAGCTACAGAGGTATCAGACACGAGCTCGCGTCAATTCGACTCTTCGAGGCTGTGTGCCCCAGCTCCTCAGGGATCGCAATTTAGCAATCAAGAGATCTTGCCTCGTATCAATGATTTTCGCAGTTGGGTTCACGCCCCCTACAATAGCGCACCGCCTGTGTGCAAAGAAATTTTCTGGTACGTAAGATTCGAGGGAGTAGGGACGAAACATTCATGGCGATAGCAGATTTCCGAGGGCTACGGTGTAGCGGATACTAACCTCCGCGTGGTATAGATAGATACTTACCAAGGACACATGCTCTTCCTGTATAGCCGTTCCCG")
> rc <- reverseComplement(d)
> as.character(rc)
[1] "CGGGAACGGCTATACAGGAAGAGCATGTGTCCTTGGTAAGTATCTATCTATACCACGCGGAGGTTAGTATCCGCTACACCGTAGCCCTCGGAAATCTGCTATCGCCATGAATGTTTCGTCCCTACTCCCTCGAATCTTACGTACCAGAAAATTTCTTTGCACACAGGCGGTGCGCTATTGTAGGGGGCGTGAACCCAACTGCGAAAATCATTGATACGAGGCAAGATCTCTTGATTGCTAAATTGCGATCCCTGAGGAGCTGGGGCACACAGCCTCGAAGAGTCGAATTGACGCGAGCTCGTGTCTGATACCTCTGTAGCTACGTGTACGATCGGGACTACCTTATTCTGAAGGAGTACAGCTATGAGTCGCGGTGACTGACGGTACCCTTAAAGCTAGGCCGAAACACGAAGTTAGCACGCATCTGAATCGGGGATGGTTTAGGAGGCGGTAGCTTATTTGTCGGGGCGTCAGACTGCAGCCGGGTCTTACGAGGGATCGAGGCGATCTACATGGGCTTTAGAGGAAAATAGCTGTCCTCGCCATGGACACGCGGACGAAAAGAGCACGGCAACACCACCACATTTTATTCCTATATCCATCTCGGTTCGGCCCAGTCGCAGCTGCGGGCAGATGATGGGAAATAGAGTGGCGAGTTGTCAACCCCCTTACTCCCAAGTAATAGAGTCTGGGCTGAAACCATTTGTGATCTCTGTAGAGTCTTAGAGTTTTCTCACGAAAGTTCTGTGAAGCCCAGGACGCCGTTACTCATCTTTGAGGAGACGCCTCGCATTCAAATTCGCGGCGGCGAAGCCAAAATACGGCTTACTTGAACCCCGACCCCGCCAATTAAATTCATGCCCGAGGAATACTATGAGGTCTTGGATATGGACAGTAAATTATGGATGCTTATCCATCTGACGCTTCAACAG"
ADD COMMENT
0
Entering edit mode

Thanks, James!

ADD REPLY

Login before adding your answer.

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