Skip to content

Instantly share code, notes, and snippets.

View wenjie1991's full-sized avatar

Wenjie Sun wenjie1991

  • Institut Curie
  • Paris
View GitHub Profile
@wenjie1991
wenjie1991 / Variation calling pipeline
Last active July 21, 2017 01:36
Variation calling pipeline
# Alignemnt
```
## input file
inputFastq1=../data/fastq/input_R1.fastq.gz ## input file name
inputFastq2=../data/fastq/input_R2.fastq.gz ## input file name
## Output
mkdir -p ../tmp/bam ## Output fold
mappedBam=../tmp/bam/output.mapped.bam
source("https://github.com/wenjie1991/bioinfo/blob/master/R/scatterBar.R")
source("https://github.com/wenjie1991/bioinfo/blob/master/R/ucscCancer_extractor.R")
#=================================================
# read data
#=================================================
# read_csv
suppressMessages(dat.CNV <- read.ucscCancer.dir("../../../UCSC_cancer/COADREAD/TCGA_COADREAD_gistic2-2015-02-24/"))
suppressMessages(dat.mRNA <- read.ucscCancer.dir("../../../UCSC_cancer/COADREAD/TCGA_COADREAD_exp_HiSeqV2-2015-02-24"))
@wenjie1991
wenjie1991 / gist:549e287126a8076fc7ab56e59256010e
Last active July 17, 2018 15:06
Extract Gene frequency from Pubmed XML files
#################################################
# Input:
input = "./pubmed_result.xml"
#################################################
# Output:
output = "./abstract.xls"
# install.packages("pubmed.mineR")
## download and install package
# source("http://bioconductor.org/biocLite.R")
# biocLite("oligo")
library(oligo)
## read cel files
dir <- tcltk::tk_choose.dir(caption = "Please choose input fold contain cel")
raw <- list.celfiles(dir, full.names=TRUE)
affyGeneFS <- read.celfiles(raw)
@wenjie1991
wenjie1991 / variantCall.sh
Last active March 17, 2020 13:26
Joint variation calling
## Variant call
## Input files
gatk_jar=gatk3.jar # https://console.cloud.google.com/storage/browser/gatk-software/package-archive/gatk/?pli=1
refseq=genome.fa
rmdupN=normal.bam ## aligned & duplication removed bam file
rmdupP1=primary1.bam
rmdupP2=primary2.bam
rmdupM1=metastasis1.bam
rmdupM2=metastasis2.bam
@wenjie1991
wenjie1991 / gist:2a6a09316ea5d07d7820c64a24a8ab96
Created March 30, 2020 19:21
prototype RNAscope statistics
f1 = "../data/graph_pixel/ROI_170220-40x-tumorR2-405DAPI-488pLgr5-561mTomato-642pThbs1.20_MERGED.tif_Z#44C#1_Simple Segmentation.tif.txt"
f2 = "../data/graph_pixel/ROI_170220-40x-tumorR2-405DAPI-488pLgr5-561mTomato-642pThbs1.20_MERGED.tif_Z#44C#2_Simple Segmentation.tif.txt"
d1 = fread(f1)
d2 = fread(f2)
d1[, channel := "channel1"]
d2[, channel := "channel2"]
d = rbind(d1, d2)
ggplot(d, aes(x = V1, y = V2) ) + geom_point(aes(fill = channel, col = channel), alpha = 0.4) + theme_bw()
ggplot(d, aes(x = V1, y = V2) ) + geom_point(aes(fill = channel, col = channel), alpha = 0.1, size = 5) + theme_bw()
ggplot(d, aes(x = V1, y = V2) ) + geom_point(aes(fill = channel, col = channel), alpha = 0.1, size = 15) + theme_bw()
@wenjie1991
wenjie1991 / snippet_scrublet_seurat.Rmd
Created May 12, 2020 10:28
scrublet in seurat pipeline
```{r}
library(reticulate)
# You can set the conda environment
use_condaenv("scrublet", required = T)
```
```{python}
import scrublet as scr
import scipy.io
import matplotlib.pyplot as plt
@wenjie1991
wenjie1991 / README.md
Last active May 9, 2022 09:31
THBS1 in Colon cancer

This script is used for cancer gene expression analysis of paper: Paracrine signalling between intestinal epithelial and tumour cells induces a regenerative programme eLife2022;11:e76541 DOI: https://doi.org/10.7554/eLife.76541

Licence

TCGA_expression.Rmd - TCGA gene expression analysis Written in 2022 by Wenjie SUN sunwjie@gmail.com

To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide. This software is distributed without any warranty.

@wenjie1991
wenjie1991 / README.md
Last active May 9, 2022 09:28
Pathway Enrichment

This script is used for pathway enrichment analysis of paper: Paracrine signalling between intestinal epithelial and tumour cells induces a regenerative programme eLife2022;11:e76541 DOI: https://doi.org/10.7554/eLife.76541

Licence

pathway_enrichment.R - Pathway enrichment analysis Written in 2019 by Wenjie SUN sunwjie@gmail.com

To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide. This software is distributed without any warranty.

@wenjie1991
wenjie1991 / comparing_igor_model.R
Last active July 7, 2020 11:49
Comparing Igor model
library(data.table)
library(readr)
library(magrittr)
library(dplyr)
library(plotly)
library(lambda.tools)
read_model_data = function(model_file) {
# @params model_file the Igor model files