add index and js files
This commit is contained in:
parent
da06cb4ca6
commit
7bdf12aa0d
23
gfp2.py
23
gfp2.py
|
@ -85,7 +85,7 @@ for feature in record.features:
|
|||
|
||||
# Przejdź przez wszystkie funkcje w rekordzie i wypisz ich szczegółowe informacje
|
||||
for feature in record.features:
|
||||
if feature.type in ["promoter", "RBS","CDS", "protein_bind", "misc_feature", "rep_origin"]:
|
||||
if feature.type in ["promoter", "RBS","CDS", "protein_bind", "misc_feature", "rep_origin", "terminator"]:
|
||||
print(f"Type: {feature.type}")
|
||||
print(f"Location: {feature.location}")
|
||||
print(f"Strand: {'+' if feature.strand == 1 else '-'}")
|
||||
|
@ -156,20 +156,19 @@ t=record[25:73].seq
|
|||
|
||||
#%%
|
||||
a = str (t)
|
||||
|
||||
a
|
||||
|
||||
#%%
|
||||
class Model:
|
||||
|
||||
complement = {'A': 'T', 'T': 'A', 'C': 'G', 'G': 'C'}
|
||||
|
||||
def __init__ (self, seq=None):
|
||||
self.seq = seq
|
||||
|
||||
def complement_dna(self):
|
||||
# Tworzenie słownika komplementarnych zasad
|
||||
complement = {'A': 'T', 'T': 'A', 'C': 'G', 'G': 'C'}
|
||||
|
||||
# Tworzenie komplementarnej sekwencji
|
||||
|
||||
complementary_sequence = ''.join(complement[base] for base in self.seq)
|
||||
|
||||
return complementary_sequence
|
||||
|
||||
#%%
|
||||
|
@ -184,6 +183,16 @@ r.seq[::-1]
|
|||
#%%
|
||||
r.complement_dna()
|
||||
|
||||
#%%
|
||||
r.seq
|
||||
#%%
|
||||
complement = {'A': 'T', 'T': 'A', 'C': 'G', 'G': 'C'}
|
||||
complementary_sequence = ''.join(complement[base] for base in r.seq)
|
||||
complementary_sequence
|
||||
|
||||
#%%
|
||||
|
||||
|
||||
#%%
|
||||
# Sekwencja DNA
|
||||
dna_seq = record.seq
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>Index</title>
|
||||
</head>
|
||||
<body>
|
||||
<script src="js.js"> </script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,36 @@
|
|||
/*
|
||||
* js.js
|
||||
* Copyright (C) 2024 user <user@penguin>
|
||||
*
|
||||
* Distributed under terms of the MIT license.
|
||||
*/
|
||||
(function(){
|
||||
'use strict';
|
||||
|
||||
// Assuming t is obtained from some source and contains the sequence
|
||||
let t = 'CAAAAAACCCCTCAAGACCCGTTTAGAGGCCCCAAGGGGTTATGCTAG'
|
||||
|
||||
let a = String(t);
|
||||
console.log(a);
|
||||
|
||||
class Model {
|
||||
static complement = {'A': 'T', 'T': 'A', 'C': 'G', 'G': 'C'};
|
||||
|
||||
constructor(seq = null) {
|
||||
this.seq = seq;
|
||||
}
|
||||
|
||||
complement_dna() {
|
||||
let complementary_sequence = '';
|
||||
for (let base of this.seq) {
|
||||
complementary_sequence += Model.complement[base];
|
||||
}
|
||||
return complementary_sequence;
|
||||
}
|
||||
}
|
||||
|
||||
// Example usage:
|
||||
let model = new Model(a);
|
||||
console.log(model.complement_dna());
|
||||
|
||||
})();
|
Loading…
Reference in New Issue