blob: 0af71bfe29dd51669b9897694a9196f69762170b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
#!/usr/bin/env python
# Challenge 090
#
# TASK #1 > DNA Sequence
# Submitted by: Mohammad S Anwar
# DNA is a long, chainlike molecule which has two strands twisted into a
# double helix. The two strands are made up of simpler molecules called
# nucleotides. Each nucleotide is composed of one of the four nitrogen-containing
# nucleobases cytosine (C), guanine (G), adenine (A) and thymine (T).
#
# You are given DNA sequence,
# GTAAACCCCTTTTCATTTAGACAGATCGACTCCTTATCCATTCTCAGAGATGTGTTGCTGGTCGCCG.
#
# Write a script to print nucleiobase count in the given DNA sequence.
# Also print the complementary sequence where Thymine (T) on one strand
# is always facing an adenine (A) and vice versa; guanine (G) is always
# facing a cytosine (C) and vice versa.
import sys
import string
seq = sys.argv[1]
compl = seq.translate(str.maketrans("TAGC", "ATCG"))
print(len(seq))
print(compl)
|