Skip to content

Instantly share code, notes, and snippets.

View Vini2's full-sized avatar
🧬
Focusing

Vijini Mallawaarachchi Vini2

🧬
Focusing
View GitHub Profile
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.
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.
*/
/**
*
# 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"
# 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"
# 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"
>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
# 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
# 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
@Vini2
Vini2 / analyse.py
Last active March 11, 2020 07:24
Multinomial NB Classification of Tweets
# 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
-- 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');