Skip to content

Instantly share code, notes, and snippets.

View KamilSJaron's full-sized avatar
🫀
back to k-mers

Kamil S. Jaron KamilSJaron

🫀
back to k-mers
View GitHub Profile

Keybase proof

I hereby claim:

  • I am kamilsjaron on github.
  • I am kamilsjaron (https://keybase.io/kamilsjaron) on keybase.
  • I have a public key ASAfJia8IAvddfu9tkm0g_UDsFOXJm8ckeyv8LKIJVosrwo

To claim this, I am signing this object:

@KamilSJaron
KamilSJaron / basic_genome_model.R
Created June 2, 2022 16:43
Fit basic genomic models to kmer spectrum
#!/usr/bin/env Rscript
# this is a minimalist version of two tissue mdoel from https://github.com/RossLab/genomic-evidence-of-PGE-in-globular-springtails
# which is just an application of GenomeTelescope: https://github.com/KamilSJaron/GenomeTelescope
suppressPackageStartupMessages(library("argparse"))
suppressPackageStartupMessages(library("minpack.lm"))
suppressPackageStartupMessages(library("nlstools"))
###############
@KamilSJaron
KamilSJaron / convertManta2Paragraph_compatible_vcf.py
Last active June 10, 2023 02:36
Convertor of manta output to paragraph compatible vcf file(s)
#!/usr/bin/env python3
#
# This script was originally called "convertInversion.py" and was shipped in the Manta package hosted at https://github.com/Illumina/manta
# Manta - Structural Variant and Indel Caller
# Copyright (c) 2013-2020 Illumina, Inc., Kamil S. Jaron
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# at your option) any later version.
@KamilSJaron
KamilSJaron / bioRxiv2assigned_table.R
Created October 7, 2019 11:10
ProcB solicatations assigment script
#!/usr/bin/env Rscript
# an R script that processes copy-pasted bioRxiv info
# and outputs an csv table with assigned names
in_file <- commandArgs(trailingOnly=TRUE)[1]
# 'ProcB_Bioinfo_Sep2019.csv'
plain_text <- matrix(readLines(in_file), byrow = T, ncol = 4)[,1:3]
final_preprint_tab <- data.frame(title = plain_text[,1],
#!/usr/bin/env Rscript
args = commandArgs(trailingOnly=TRUE)
episode_location <- '/Volumes/dump/media/video/fic/rick_and_morty/'
episodes <- dir(episode_location)
metadatafile <- '~/.metarickandmorty'
if( !file.exists(metadatafile) | "--reset" %in% args ){
metadata <- data.frame(episode = episodes, weight = 100, stringsAsFactors = F)
} else {
@KamilSJaron
KamilSJaron / papanova.R
Last active July 3, 2019 14:42
PArallel Permutation ANOVA
# written by Kamil S. Jaron based on a 'lab script'
# proudly released to public domain
# args :
# model_formula - formula just like specified in linear models
# input_data - a data frame containing all the data in the formula
# nrep - number of replicates (permutations) that will be performed
# plot_name - if speficied, scripre will generate a pdf with histograms of F statistics calculated with permutated response variable and the original anova F statistics (one per variable)
# number of cores used for computation - default is number of processors - 1; SPECIFY THIS PARAMETER ON BIG SERVERS;
@KamilSJaron
KamilSJaron / vioplot2
Created May 28, 2017 08:51 — forked from mbjoseph/vioplot2.R
Slight change to the vioplot function from Daniel Adler that plots median lines instead of points, and gives the option to plot either side of a violin rather than always both.
vioplot2 <- function (x, ..., range = 1.5, h = NULL, ylim = NULL, names = NULL,
horizontal = FALSE, col = "magenta", border = "black", lty = 1,
lwd = 1, rectCol = "black", colMed = "white", pchMed = 19,
at, add = FALSE, wex = 1, drawRect = TRUE, side="both")
{
datas <- list(x, ...)
n <- length(datas)
if (missing(at))
at <- 1:n
upper <- vector(mode = "numeric", length = n)