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
params.index = 'testfile2.txt' | |
Channel | |
.fromPath(params.index) | |
.splitCsv(header:true, sep:"\t") | |
.map{ row-> tuple(row.head1, row.head2, row.head4) } | |
.into { samples_ch } | |
process transform { | |
input: |
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
head1 head2 head3 head4 | |
line.00 afsd col3 another-00 | |
line.01 afsd col3 another-01 | |
line.02 afsd col3 another-02 | |
line.03 afsd col3 another-03 | |
leene.04 afsd col3 another-04 | |
line.05 afsd col3 another-05 | |
leene.06 afsd col3 another-06 | |
loone.07 afsd col3 another-07 | |
loone.08 afsd col3 another-08 |
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
library(tidyverse) | |
# allele section ----------------- | |
# available base pairs | |
BS <- c('A','T','C','G') | |
# sample random base pair | |
bs <- function(n,replace = TRUE,...) sample(x = BS, size = n, replace = replace, ...) | |
# sample a possible alternative allele for a single given base pair | |
alt_bs_1 <- function(bs){ | |
stopifnot(length(bs)==1) |
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
library(tidyverse) | |
library(grid) | |
raw <- tibble(x = letters[1:5], y = x) | |
filter <- function(x, y) x <= y | |
data_tri <- purrr::cross_df(raw,.filter = filter) %>% mutate(val = rnorm(length(.$x))) | |
plot_tri <- ggplot(data = data_tri, aes(x = x, y = y, fill = val)) + | |
coord_equal()+ | |
geom_tile() + |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
library(tidyverse) | |
export_2_latex <- function(table, name){ | |
table %>% | |
mutate(`\\\\\\hline` = '\\\\') %>% | |
write_delim(.,path = '.tmp.tex',delim = '&') | |
# clean last column | |
n <- names(table) %>% length() | |
# open latex table |
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
/*typo replace {into ; not ","}*/ | |
Channel | |
.from( [[1, "ind"], [2, "may"], [3, "nig"], [4, "pue"], [5, "uni"], [6, "gem"]] ) | |
.into{ bel_spec1_ch; bel_spec2_ch } | |
Channel.from("test1", "test2" ).collect().set{vcf_loc_pair1} | |
bel_pairs_ch = Channel | |
.from( "test1" ) | |
.join( vcf_loc_pair1 ) |
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
pts <- strata_coordinates( arapat, as.SpatialPoints = TRUE ) | |
stamen_bb <- function(bb){ | |
bt <- pts@bbox %>% | |
as_tibble() | |
c(left = bt$min[1], | |
bottom = bt$min[2], | |
right = bt$max[1], | |
top = bt$max[2]) | |
} |
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
--- | |
title: "fit_growth_curve" | |
author: "Kosmas Hench" | |
date: "5/24/2019" | |
output: html_document | |
--- | |
```{r setup, include=FALSE} | |
knitr::opts_chunk$set(echo = TRUE) | |
library(DT) |
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
library(tidyverse) | |
### nuber of reruns ### | |
nsims <- 10000 | |
## parameter table defining the parameter space -------------------- | |
params <- tibble(param_name = c("NNIG", "NPUE", "NANC", "TDIV", "TMIG", "MIGRPROBN2P", "MIGRPROBP2N"), | |
log10min = c(rep(3,3), 1, 1, rep(-5, 2)), | |
log10max = c(rep(log10(2.5e5), 3), rep(4, 2), rep(-2, 2)), |
OlderNewer