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
#!/bin/bash | |
#SBATCH -N 1 | |
#SBATCH -c 1 | |
#SBATCH --mem=200 | |
#SBATCH -J "init" | |
#SBATCH -e run.e | |
#SBATCH -o run.o | |
## SBATCH --mail-type=END,FAIL # this line is commented | |
## SBATCH [email protected] # this line is commented |
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
# Read first X lines of R3 of inDrop fastq files and map to | |
# sequence barcodes to check if the top N match or not. | |
import argparse | |
import os [44/1831] | |
import gzip | |
from collections import Counter, defaultdict | |
from Bio.Seq import Seq | |
def open_fastq(in_file): | |
""" open a fastq file, using gzip if it is gzipped |
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
seqcluster collapse -f example.fastq -o test |
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
mir = "CCCGGGGGGGGGGGGGGGGGGGGGCCC" | |
# generate different length +/-3 at both size | |
lapply(c(1,2,3,4,5,6,7), function(x){ | |
lapply(c(0,1,2,3,4,5,6,7), function(y){ | |
substr(mir, x, nchar(mir)-y) | |
}) %>% unlist() | |
}) %>% unlist() -> trim | |
# add non-tempaltes 3' A or U up to 3 | |
trim_add = expand.grid(trim, c("A","AA", "AAA", "U", "UU", "UUU", "")) %>% |
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
Many sequences are not being capture in the current test_lossRand_3p.mirna. I don't know the reason, but following the instructions in how the authors generated this file I get different results. | |
``` | |
wget https://github.com/lpantano/seqbuster/raw/miraligner/modules/miraligner/miraligner.jar | |
wget https://github.com/lpantano/java_seqbuster/raw/master/miraligner/DB/hairpin.fa | |
wget https://github.com/lpantano/java_seqbuster/raw/master/miraligner/DB/miRNA.str | |
java -jar miraligner.jar -sub 1 -trim 3 -add 3 -s hsa -i test_lossRand_3p.fastq -db . -o miraligner_lossRand_3p | |
# this sequences is not detected in the published data, but it is when you run this code. |
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
require(TxDb.Hsapiens.UCSC.hg19.knownGene) | |
txdb <- TxDb.Hsapiens.UCSC.hg19.knownGene | |
library(ChIPseeker) | |
library(GenomicRanges) | |
# Hack chipseeker function to add annotaiton | |
getGenomicAnnoStat <- function(peakAnno) { | |
if ( class(peakAnno) == "GRanges" ) | |
peakAnno <- as.data.frame(peakAnno) | |
anno <- peakAnno$annotation | |
## anno <- sub(" \\(.+", "", anno) |
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
@NS500227_6_H160HBGXX:1:11108:2429:1048 1:N:0:1 | |
AAAACNAAAAATGAGNTTAAATAACTANTNATATGNNTGTTATTTNCTGTNACTANNANANCTG | |
+ | |
AA7AA#FF.FFF7FF#FFFF7FF<FAA#F#AFAFF##FF<<FA.F#7FF.#.F)<##<#.#FAF | |
@NS500227_6_H160HBGXX:1:11108:1920:1048 1:N:0:1 | |
GAAGANGGTTCTGAGNATGCTTCTGATNTNGATCTNNGCGGTTTANCCCGNTAACNNCN | |
+ |
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
#https://gist.github.com/jcheng5/4050398 | |
library(ggplot2) | |
options(shiny.maxRequestSize = -1) | |
shinyServer(function(input, output,session) { | |
observe({ | |
if (is.null(input$files)) { | |
# User has not uploaded a file yet | |
return(NULL) | |
} |