This file contains hidden or 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
HeatMap R | |
library(gplots) | |
library(RColorBrewer) | |
data <- data.frame(read.table("All",sep="\t",header=FALSE)) | |
updown <- data[data$V19 == "protein_coding_gene" & data$V10 > 0 & data$V12 <= 0.05 & data$V16 < 0 & data$V18 <= 0.05,]; updown <- cbind.data.frame(updown$V1,updown$V5,updown$V7,updown$V9) | |
This file contains hidden or 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
bowtie map reads: | |
bowtie2 -x TAIR10_chr_all.fas -U All_Mutant_Reads/NGS_rawdata/2172_A_run347_ACTTGAAT_S36_L002_R1_001_f.fastq -S 2172_A_run347_ACTTGAAT_S36_L002_R1_001.sam | |
sam to sorted bam: | |
samtools view -u 2172_A_run347_ACTTGAAT_S36_L002_R1_001.sam | samtools sort -@ 4 -o 2172_A_run347_ACTTGAAT_S36_L002_R1_001.bam | |
Samtools and bcftools : bam to bcf to vcf "SNP and INDEL both": | |
samtools mpileup -go 2608_A_run410_ACACAGTG_S128_L008_R1_001.bcf -f TAIR10_chr_all.fas 2608_A_run410_ACACAGTG_S128_L008_R1_001.bam | |
For Indel | |
bcftools call -mO z -V snps -o W35_indel.vcf.gz W35.bcf |
This file contains hidden or 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
#!/usr/bin/python | |
from Bio import SeqIO | |
from Bio.Seq import Seq | |
from Bio.SeqRecord import SeqRecord | |
from collections import defaultdict | |
from Bio.Alphabet import generic_dna | |
import sys | |
import re |
This file contains hidden or 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
library(DESeq2) | |
## Load read counts with replicates | |
CountTable <- as.data.frame(round(as.matrix(read.csv("replicate.read_counts", sep="\t", header=TRUE, row.names=1)))) | |
##Comparisons combination | |
CA20_CA50 <- (CountTable[,c(1,2,3,4)]) | |
CA20_CE20 <- (CountTable[,c(1,2,5,6)]) | |
CA20_CE50 <- (CountTable[,c(1,2,7,8)]) | |
CA20_TA20 <- (CountTable[,c(1,2,9,10)]) |
This file contains hidden or 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
#!/usr/bin/python | |
from __future__ import division | |
import numpy as np | |
from itertools import count, tee, islice | |
import math | |
#window_size = 100 | |
#stride = 20 |
This file contains hidden or 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
library(Interpol.T) | |
date<-date.time(day.begin="01/04/2020", day.end="31/07/2020", date.format= "d/m/y") # generate Date hour | |
tempd <- read.table("result.txt", sep="\t", header=FALSE) #from python program CIBSE Algorithm | |
x <- data.frame(date$year ,date$month, date$day, date$hour, tempd$V2) | |
y <- data.frame(x$year,x$month, x$day) |
This file contains hidden or 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
library(ncdf4) | |
library(chron) | |
library(lattice) | |
library(RColorBrewer) | |
ncin <- nc_open("Pr_CORDEX/EUROPE/pr_EUR-44_MPI-M-MPI-ESM-LR_rcp45_r1i1p1_MPI-CSC-REMO2009_v1_day_20060102-20101231.nc") | |
csvname <- "pr_EUR-44_MPI-M-MPI-ESM-LR_rcp45_r1i1p1_MPI-CSC-REMO2009_v1_day_20060102-20101231.txt" |
This file contains hidden or 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
#!/usr/bin/python | |
""" | |
run this with python2.7 | |
python2.7 fasta_summary.py | |
Enter the fasta file: | |
your_fasta_file.fa | |
""" |
This file contains hidden or 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
#!/usr/bin/python | |
import sys | |
import multiprocessing | |
import time | |
import threading | |
file = open("Heat_danpos_norm-Control_danpos_norm.positions.integrative.txt","r") | |
#file2 = open("diff/Heat_danpos_norm-Control_danpos_norm.pois_diff.wig","r") | |
fOut = open("filerted_diff_1.wig","w") |
This file contains hidden or 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
#!/usr/bin/python | |
import numpy as np | |
from itertools import count, tee, izip, islice | |
window_size = 100 | |
stride = 20 | |
fOut = open("result.txt", "w") | |
x = raw_input("Enter your file name: ") |
NewerOlder