This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.concurrent.locks.Condition; | |
import java.util.concurrent.locks.Lock; | |
import java.util.concurrent.locks.ReentrantLock; | |
import static java.lang.Thread.sleep; | |
import java.util.Random; | |
/* | |
* To change this license header, choose License Headers in Project Properties. | |
* To change this template file, choose Tools | Templates | |
* and open the template in the editor. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Stack; | |
import java.util.StringTokenizer; | |
/* | |
* To change this license header, choose License Headers in Project Properties. | |
* To change this template file, choose Tools | Templates | |
* and open the template in the editor. | |
*/ | |
/** | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Import pairwise2 module | |
from Bio import pairwise2 | |
# Import format_alignment method | |
from Bio.pairwise2 import format_alignment | |
# Define two sequences to be aligned | |
X = "ACGGGT" | |
Y = "ACG" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Import pairwise2 module | |
from Bio import pairwise2 | |
# Import format_alignment method | |
from Bio.pairwise2 import format_alignment | |
# Define two sequences to be aligned | |
X = "ACGGGT" | |
Y = "ACG" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Import pairwise2 module | |
from Bio import pairwise2 | |
# Import format_alignment method | |
from Bio.pairwise2 import format_alignment | |
# Define two sequences to be aligned | |
X = "ACGGGT" | |
Y = "ACG" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>gnl|GNOMON|17969.m Partial model predicted by Gnomon on Acanthaster planci unplaced genomic scaffold, OKI-Apl_1.0 oki_scaffold1752, whole genome shotgun sequence (NW_019093106.1) | |
AAGCAAAAAGCAGAGAAGGAGAAACCAGGTTTCCTTAGTAGGATCCACCAGGCATTCAGCTTTGAAGAGG | |
AACAGTCCAGGGATGATGAGCAGGATAGTCAAGACAGCGAGTCCGAGGATGGGAGTATTGACGAAGACCC | |
TGAGGGCAATGAAAACACGGTGGATCCAATCGACTGTTTGAGTGCCCCACGTGCTGTTGTCACCAAAGAA | |
GAGCTCATCACTGAGGAG | |
>gnl|GNOMON|70594930.m Model predicted by Gnomon on Acanthaster planci unplaced genomic scaffold, OKI-Apl_1.0 oki_scaffold1731, whole genome shotgun sequence (NW_019093085.1) | |
CAAGAACAGTGGATGAAGAAAACAGCAGGCGATAGCAGCGTGGTTGGCGCCTTGCCCCTGGGCTCATCTT | |
CTAGCATCACTGCCCTGATACGCGAAAGCAGCGTGGTTGGTCCCTTCCTGTGGGCTCATCTTCTGGCATC | |
ACTGCCCTGATAATGTAAGGCGGTAGCAGCGAGGTTGGTCCCCTGCCTGTGGGCTCATCTTCTGGAATCA | |
CCACCCT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Import Clustal Omega wrapper | |
from Bio.Align.Applications import ClustalOmegaCommandline | |
# Define input file | |
in_file = "/Users/vijinimallawaarachchi/Documents/Python/Acanthaster_planci_Gnomon.fsa" | |
# Define output file | |
out_file = "aligned.fasta" | |
# Get the command for Clustal Omega |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Import modules | |
from Bio import Phylo | |
from Bio.Phylo.TreeConstruction import DistanceCalculator | |
from Bio.Phylo.TreeConstruction import DistanceTreeConstructor | |
from Bio import AlignIO | |
# Read the sequences and align | |
aln = AlignIO.read('msa.phy', 'phylip') | |
# Print the alignment |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# NLP imports | |
import nltk | |
from nltk.tokenize import sent_tokenize | |
from nltk.corpus import stopwords | |
from nltk.tokenize import word_tokenize | |
from nltk.stem import PorterStemmer | |
# sklearn imports | |
from sklearn.model_selection import train_test_split | |
from sklearn.feature_extraction.text import TfidfVectorizer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Create Member table | |
CREATE TABLE member( | |
member_id INT PRIMARY KEY, | |
name VARCHAR (50) NOT NULL, | |
date_of_birth DATE NOT NULL | |
); | |
-- Add records to Member table | |
INSERT INTO member VALUES (1, 'Alice', '1995-03-03'); | |
INSERT INTO member VALUES (2, 'Bob', '1993-03-05'); |
OlderNewer