DNA/RNA Sequence Analysis
Usage
1. MCP Server Definition
Use the same BiologyToolsClient class as defined in the protein-properties-calculation skill.
2. DNA/RNA Sequence Analysis Workflow
This workflow analyzes DNA and RNA sequences, calculating molecular weight, GC content, melting temperature, and generating reverse complements.
Workflow Steps:
- Calculate DNA Molecular Weight - Compute molecular weight for DNA sequences
- Calculate Oligonucleotide Properties - Compute GC content, Tm, extinction coefficient for RNA
- Generate Reverse Complement - Create reverse complement sequence
Implementation:
## Initialize client
HEADERS = {"SCP-HUB-API-KEY": "<your-api-key>"}
client = BiologyToolsClient(
"https://scp.intern-ai.org.cn/api/v1/mcp/29/SciToolAgent-Bio",
HEADERS
)
if not await client.connect():
print("connection failed")
exit()
print("=== DNA/RNA Sequence Analysis ===\n")
## Step 1: Calculate DNA molecular weight
print("Step 1: DNA Molecular Weight")
dna_sequence = "ATGATGTAACGTAGCTAG"
sequence_para = f"seq1:{dna_sequence}.strand=single,topology=linear"
result = await client.client.call_tool(
"DNAMolecularWeightCalculator",
arguments={"sequence_para": sequence_para}
)
result_data = client.parse_result(result)
print(f"DNA Sequence: {dna_sequence}")
print(f"Result:\n{result_data}\n")
## Step 2: Calculate oligonucleotide (RNA) properties
print("Step 2: Oligonucleotide (RNA) Properties")
rna_sequence = "AUGAUGUAACGUAGCUAG"
result = await client.client.call_tool(
"CalculatorOligonucleotide",
arguments={"sq": rna_sequence}
)
result_data = client.parse_result(result)
print(f"RNA Sequence: {rna_sequence}")
print(f"Result:\n{result_data}\n")
## Step 3: Generate reverse complement
print("Step 3: Reverse Complement")
test_sequence = "ATCGATCG"
result = await client.client.call_tool(
"GetReverseComplement",
arguments={"sequence": test_sequence}
)
result_data = client.parse_result(result)
print(f"Original Sequence: {test_sequence}")
print(f"Reverse Complement:\n{result_data}\n")
## Step 4: Calculate annealing temperature for primers
print("Step 4: PCR Primer Annealing Temperature")
primer_sequence = "GCTAGCTAGCTA"
result = await client.client.call_tool(
"ComputeAnnealingTemperature",
arguments={"sequence": primer_sequence}
)
result_data = client.parse_result(result)
print(f"Primer Sequence: {primer_sequence}")
print(f"Result:\n{result_data}\n")
await client.disconnect()
Tool Descriptions
SciToolAgent-Bio Server:
DNAMolecularWeightCalculator: Calculate DNA molecular weight
- Args:
sequence_para (str) - Formatted sequence with parameters
- Format:
"seqName:SEQUENCE.strand=single/double,topology=linear/circular"
- Returns: Molecular weight in Daltons
CalculatorOligonucleotide: Calculate oligonucleotide (RNA) properties
- Args:
sq (str) - RNA sequence
- Returns: GC content (%), Tm (°C), molecular weight, extinction coefficient
GetReverseComplement: Generate reverse complement sequence
- Args:
sequence (str) - DNA sequence
- Returns: Reverse complement sequence
ComputeAnnealingTemperature: Calculate primer annealing temperature
- Args:
sequence (str) - Primer sequence
- Returns: Annealing temperature for PCR
Input/Output
Input:
- DNA sequences: Use A, T, G, C nucleotides
- RNA sequences: Use A, U, G, C nucleotides
- Sequence parameters for DNA: strand type (single/double) and topology (linear/circular)
Output:
- DNA Molecular Weight: Mass in Daltons for DNA sequences
- GC Content: Percentage of G and C nucleotides
- Tm (Melting Temperature): Temperature at which 50% of DNA is denatured
- Extinction Coefficient: For nucleic acid quantification (M⁻¹cm⁻¹)
- Reverse Complement: Complementary antiparallel sequence
Use Cases
- Design PCR primers with appropriate annealing temperatures
- Calculate oligonucleotide concentrations spectrophotometrically
- Generate reverse complement for sequencing analysis
- Analyze GC content for primer design
- Plan molecular cloning experiments
- Estimate DNA/RNA molecular weights
- Design and analyze synthetic oligonucleotides
Sequence Format for DNA Molecular Weight
Format: "seqName:SEQUENCE.strand=X,topology=Y"
Parameters:
seqName: Identifier for the sequence
SEQUENCE: DNA nucleotide sequence (A, T, G, C)
strand: Either "single" or "double"
topology: Either "linear" or "circular"
Example: "plasmid1:ATGCATGC.strand=double,topology=circular"
GC Content and Tm
- High GC content (>60%): Higher melting temperature, more stable
- Low GC content (<40%): Lower melting temperature, less stable
- Tm: Used to determine PCR annealing temperature (typically Tm - 5°C)
Additional DNA/RNA Tools Available
ORFFind: Find open reading frames
TranslateDNAtoAminoAcidSequence: Translate DNA to protein
RepeatDNASequenceSearch: Find repetitive sequences
CpGIslandPrediction: Predict CpG islands
PCRPrimerProperties: Analyze primer properties
RandomDNAGeneration: Generate random DNA sequences
CircularDNAAlignment: Align circular DNA sequences
1---2name: dna-rna-sequence-analysis3description: Analyze DNA and RNA sequences including molecular weight calculation, reverse complement generation, and oligonucleotide properties.4license: MIT license5---6
7# DNA/RNA Sequence Analysis
8
9## Usage
10
11### 1. MCP Server Definition
12
13Use the same `BiologyToolsClient` class as defined in the protein-properties-calculation skill.
14
15### 2. DNA/RNA Sequence Analysis Workflow
16
17This workflow analyzes DNA and RNA sequences, calculating molecular weight, GC content, melting temperature, and generating reverse complements.
18
19**Workflow Steps:**
20
211. **Calculate DNA Molecular Weight** - Compute molecular weight for DNA sequences
222. **Calculate Oligonucleotide Properties** - Compute GC content, Tm, extinction coefficient for RNA
233. **Generate Reverse Complement** - Create reverse complement sequence
24
25**Implementation:**
26
27```python
28## Initialize client
29HEADERS = {"SCP-HUB-API-KEY": "<your-api-key>"}
30
31client = BiologyToolsClient(
32 "https://scp.intern-ai.org.cn/api/v1/mcp/29/SciToolAgent-Bio",
33 HEADERS
34)
35
36if not await client.connect():
37 print("connection failed")
38 exit()
39
40print("=== DNA/RNA Sequence Analysis ===\n")
41
42## Step 1: Calculate DNA molecular weight
43print("Step 1: DNA Molecular Weight")
44dna_sequence = "ATGATGTAACGTAGCTAG"
45sequence_para = f"seq1:{dna_sequence}.strand=single,topology=linear"
46
47result = await client.client.call_tool(
48 "DNAMolecularWeightCalculator",
49 arguments={"sequence_para": sequence_para}
50)
51result_data = client.parse_result(result)
52print(f"DNA Sequence: {dna_sequence}")
53print(f"Result:\n{result_data}\n")
54
55## Step 2: Calculate oligonucleotide (RNA) properties
56print("Step 2: Oligonucleotide (RNA) Properties")
57rna_sequence = "AUGAUGUAACGUAGCUAG"
58
59result = await client.client.call_tool(
60 "CalculatorOligonucleotide",
61 arguments={"sq": rna_sequence}
62)
63result_data = client.parse_result(result)
64print(f"RNA Sequence: {rna_sequence}")
65print(f"Result:\n{result_data}\n")
66
67## Step 3: Generate reverse complement
68print("Step 3: Reverse Complement")
69test_sequence = "ATCGATCG"
70
71result = await client.client.call_tool(
72 "GetReverseComplement",
73 arguments={"sequence": test_sequence}
74)
75result_data = client.parse_result(result)
76print(f"Original Sequence: {test_sequence}")
77print(f"Reverse Complement:\n{result_data}\n")
78
79## Step 4: Calculate annealing temperature for primers
80print("Step 4: PCR Primer Annealing Temperature")
81primer_sequence = "GCTAGCTAGCTA"
82
83result = await client.client.call_tool(
84 "ComputeAnnealingTemperature",
85 arguments={"sequence": primer_sequence}
86)
87result_data = client.parse_result(result)
88print(f"Primer Sequence: {primer_sequence}")
89print(f"Result:\n{result_data}\n")
90
91await client.disconnect()
92```
93
94### Tool Descriptions
95
96**SciToolAgent-Bio Server:**
97- `DNAMolecularWeightCalculator`: Calculate DNA molecular weight
98 - Args: `sequence_para` (str) - Formatted sequence with parameters
99 - Format: `"seqName:SEQUENCE.strand=single/double,topology=linear/circular"`
100 - Returns: Molecular weight in Daltons
101
102- `CalculatorOligonucleotide`: Calculate oligonucleotide (RNA) properties
103 - Args: `sq` (str) - RNA sequence
104 - Returns: GC content (%), Tm (°C), molecular weight, extinction coefficient
105
106- `GetReverseComplement`: Generate reverse complement sequence
107 - Args: `sequence` (str) - DNA sequence
108 - Returns: Reverse complement sequence
109
110- `ComputeAnnealingTemperature`: Calculate primer annealing temperature
111 - Args: `sequence` (str) - Primer sequence
112 - Returns: Annealing temperature for PCR
113
114### Input/Output
115
116**Input:**
117- DNA sequences: Use A, T, G, C nucleotides
118- RNA sequences: Use A, U, G, C nucleotides
119- Sequence parameters for DNA: strand type (single/double) and topology (linear/circular)
120
121**Output:**
122- **DNA Molecular Weight**: Mass in Daltons for DNA sequences
123- **GC Content**: Percentage of G and C nucleotides
124- **Tm (Melting Temperature)**: Temperature at which 50% of DNA is denatured
125- **Extinction Coefficient**: For nucleic acid quantification (M⁻¹cm⁻¹)
126- **Reverse Complement**: Complementary antiparallel sequence
127
128### Use Cases
129
130- Design PCR primers with appropriate annealing temperatures
131- Calculate oligonucleotide concentrations spectrophotometrically
132- Generate reverse complement for sequencing analysis
133- Analyze GC content for primer design
134- Plan molecular cloning experiments
135- Estimate DNA/RNA molecular weights
136- Design and analyze synthetic oligonucleotides
137
138### Sequence Format for DNA Molecular Weight
139
140Format: `"seqName:SEQUENCE.strand=X,topology=Y"`
141
142Parameters:
143- `seqName`: Identifier for the sequence
144- `SEQUENCE`: DNA nucleotide sequence (A, T, G, C)
145- `strand`: Either "single" or "double"
146- `topology`: Either "linear" or "circular"
147
148Example: `"plasmid1:ATGCATGC.strand=double,topology=circular"`
149
150### GC Content and Tm
151
152- **High GC content (>60%)**: Higher melting temperature, more stable
153- **Low GC content (<40%)**: Lower melting temperature, less stable
154- **Tm**: Used to determine PCR annealing temperature (typically Tm - 5°C)
155
156### Additional DNA/RNA Tools Available
157
158- `ORFFind`: Find open reading frames
159- `TranslateDNAtoAminoAcidSequence`: Translate DNA to protein
160- `RepeatDNASequenceSearch`: Find repetitive sequences
161- `CpGIslandPrediction`: Predict CpG islands
162- `PCRPrimerProperties`: Analyze primer properties
163- `RandomDNAGeneration`: Generate random DNA sequences
164- `CircularDNAAlignment`: Align circular DNA sequences