Question: Get a complete view of a long DNA sequence of a Biostrings object in R
0
gravatar for arado1
4.3 years ago by
arado10
European Union
arado10 wrote:

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.

ADD COMMENTlink modified 4.3 years ago by James W. MacDonald52k • written 4.3 years ago by arado10
Answer: Get a complete view of a long DNA sequence of a Biostrings object in R
3
gravatar for James W. MacDonald
4.3 years ago by
United States
James W. MacDonald52k wrote:
> library(Biostrings)
> d <- DNAString("CTGTTGAAGCGTCAGATGGATAAGCATCCATAATTTACTGTCCATATCCAAGACCTCATAGTATTCCTCGGGCATGAATTTAATTGGCGGGGTCGGGGTTCAAGTAAGCCGTATTTTGGCTTCGCCGCCGCGAATTTGAATGCGAGGCGTCTCCTCAAAGATGAGTAACGGCGTCCTGGGCTTCACAGAACTTTCGTGAGAAAACTCTAAGACTCTACAGAGATCACAAATGGTTTCAGCCCAGACTCTATTACTTGGGAGTAAGGGGGTTGACAACTCGCCACTCTATTTCCCATCATCTGCCCGCAGCTGCGACTGGGCCGAACCGAGATGGATATAGGAATAAAATGTGGTGGTGTTGCCGTGCTCTTTTCGTCCGCGTGTCCATGGCGAGGACAGCTATTTTCCTCTAAAGCCCATGTAGATCGCCTCGATCCCTCGTAAGACCCGGCTGCAGTCTGACGCCCCGACAAATAAGCTACCGCCTCCTAAACCATCCCCGATTCAGATGCGTGCTAACTTCGTGTTTCGGCCTAGCTTTAAGGGTACCGTCAGTCACCGCGACTCATAGCTGTACTCCTTCAGAATAAGGTAGTCCCGATCGTACACGTAGCTACAGAGGTATCAGACACGAGCTCGCGTCAATTCGACTCTTCGAGGCTGTGTGCCCCAGCTCCTCAGGGATCGCAATTTAGCAATCAAGAGATCTTGCCTCGTATCAATGATTTTCGCAGTTGGGTTCACGCCCCCTACAATAGCGCACCGCCTGTGTGCAAAGAAATTTTCTGGTACGTAAGATTCGAGGGAGTAGGGACGAAACATTCATGGCGATAGCAGATTTCCGAGGGCTACGGTGTAGCGGATACTAACCTCCGCGTGGTATAGATAGATACTTACCAAGGACACATGCTCTTCCTGTATAGCCGTTCCCG")
> rc <- reverseComplement(d)
> as.character(rc)
[1] "CGGGAACGGCTATACAGGAAGAGCATGTGTCCTTGGTAAGTATCTATCTATACCACGCGGAGGTTAGTATCCGCTACACCGTAGCCCTCGGAAATCTGCTATCGCCATGAATGTTTCGTCCCTACTCCCTCGAATCTTACGTACCAGAAAATTTCTTTGCACACAGGCGGTGCGCTATTGTAGGGGGCGTGAACCCAACTGCGAAAATCATTGATACGAGGCAAGATCTCTTGATTGCTAAATTGCGATCCCTGAGGAGCTGGGGCACACAGCCTCGAAGAGTCGAATTGACGCGAGCTCGTGTCTGATACCTCTGTAGCTACGTGTACGATCGGGACTACCTTATTCTGAAGGAGTACAGCTATGAGTCGCGGTGACTGACGGTACCCTTAAAGCTAGGCCGAAACACGAAGTTAGCACGCATCTGAATCGGGGATGGTTTAGGAGGCGGTAGCTTATTTGTCGGGGCGTCAGACTGCAGCCGGGTCTTACGAGGGATCGAGGCGATCTACATGGGCTTTAGAGGAAAATAGCTGTCCTCGCCATGGACACGCGGACGAAAAGAGCACGGCAACACCACCACATTTTATTCCTATATCCATCTCGGTTCGGCCCAGTCGCAGCTGCGGGCAGATGATGGGAAATAGAGTGGCGAGTTGTCAACCCCCTTACTCCCAAGTAATAGAGTCTGGGCTGAAACCATTTGTGATCTCTGTAGAGTCTTAGAGTTTTCTCACGAAAGTTCTGTGAAGCCCAGGACGCCGTTACTCATCTTTGAGGAGACGCCTCGCATTCAAATTCGCGGCGGCGAAGCCAAAATACGGCTTACTTGAACCCCGACCCCGCCAATTAAATTCATGCCCGAGGAATACTATGAGGTCTTGGATATGGACAGTAAATTATGGATGCTTATCCATCTGACGCTTCAACAG"
ADD COMMENTlink written 4.3 years ago by James W. MacDonald52k

Thanks, James!

ADD REPLYlink written 4.3 years ago by arado10
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 298 users visited in the last hour