Skip to content

Instantly share code, notes, and snippets.

View khemlalnirmalkar's full-sized avatar
:shipit:
I may be slow to respond.

Khemlal Nirmalkar khemlalnirmalkar

:shipit:
I may be slow to respond.
View GitHub Profile
@mblondel
mblondel / statistical_tests.py
Last active May 9, 2024 00:46
t-test and wilcoxon-test examples in Python
# Mathieu Blondel, February 2012
# License: BSD 3 clause
# Port to Python of examples in chapter 5 of
# "Introductory Statistics with R" by Peter Dalgaard
import numpy as np
from scipy.stats import ttest_1samp, wilcoxon, ttest_ind, mannwhitneyu
# daily intake of energy in kJ for 11 women
@stephenturner
stephenturner / deseq2-analysis-template.R
Created July 30, 2014 12:20
Template for analysis with DESeq2
## RNA-seq analysis with DESeq2
## Stephen Turner, @genetics_blog
# RNA-seq data from GSE52202
# http://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=gse52202. All patients with
# ALS, 4 with C9 expansion ("exp"), 4 controls without expansion ("ctl")
# Import & pre-process ----------------------------------------------------
# Import data from featureCounts
@shenwei356
shenwei356 / filter spades assembly result according to coverage.md
Last active December 11, 2023 04:42
Filtering spades assembly result according to coverage using SeqKit and csvtk

Filtering Spades assembly result according to coverage information in sequence header

Sample sequence

$ cat contigs.fasta 
>NODE_1_length_869844_cov_1135.34
ACTGNacgtn 
>NODE_2_length_576386_cov_975.882
acgtn
@nicolasdao
nicolasdao / open_source_licenses.md
Last active June 29, 2024 18:45
What you need to know to choose an open source license.
@lwaldron
lwaldron / metaphlanToPhyloseq.R
Last active March 11, 2024 14:16
Import a table of MetaPhlAn taxonomic abundances into phyloseq
metaphlanToPhyloseq <- function(
metaphlandir,
metadat=NULL,
simplify=TRUE){
## tax is a matrix or data.frame with the table of taxonomic abundances, rows are taxa, columns are samples
## metadat is an optional data.frame of specimen metadata, rows are samples, columns are variables
## if simplify=TRUE, use only the most detailed level of taxa names in the final object
## metaphlanToPhyloseq("~/Downloads/metaphlan_bugs_list")
.getMetaphlanTree <- function(removeGCF=TRUE, simplify=TRUE){
if (!requireNamespace("ape")) {
#!/bin/bash
usage ()
{
echo ""
echo "Usage : `basename $0` <tableL6.txt> <L6_clean.tsv>"
echo ""
exit
}
if [ "$1" = "" ]; then
( conda create -y -n "melonpann" && source activate "melonpann" && \
conda install r-base=3.5.0 r-devtools r-fbasics -yc r && \
R -q -e "install.packages('BiocManager', repos='http://cran.r-project.org'); \
library('BiocManager'); BiocManager::install('ccrepe');" && \
R -q -e "install.packages('optparse', repos='http://cran.r-project.org')" && \
R -q -e "install.packages('AssocTests', repos='http://cran.r-project.org')" && \
R -q -e "install.packages('glmnet', repos='http://cran.r-project.org')" && \
R -q -e "install.packages('HDtweedie', repos='http://cran.r-project.org')" && \
R -q -e "install.packages('getopt', repos='http://cran.r-project.org')" && \
R -q -e "install.packages('doParallel', repos='http://cran.r-project.org')" && \