Skip to content

Instantly share code, notes, and snippets.

View samuell's full-sized avatar
💻
Hacking away

Samuel Lampa samuell

💻
Hacking away
View GitHub Profile
package main
// Source code for this experiment: https://github.com/samuell/gormula
import (
"fmt"
"math"
)
func main() {
monthlyPaymentUSD := Mul(
Div(
Mul(
Div(Val(rate),
Val(1200.0)),
Exp(
Add(
Val(1.0),
Div(
Val(rate),
digraph "DNA Base Complement Workflow" {
rankdir=LR;
graph [fontname="Arial",fontsize=13,color="#384A52",fontcolor="#384A52"];
node [fontname="Arial",fontsize=11,color="#384A52",fontcolor="#384A52",fillcolor="#EFF2F5",shape=box,style=filled];
edge [fontname="Arial",fontsize=9, color="#384A52",fontcolor="#384A52"];
"Base Complement" [shape=box];
"Make DNA" [shape=box];
"Reverse" [shape=box];
"Base Complement" -> "Reverse" [taillabel="compl", headlabel="in"];
"Make DNA" -> "Base Complement" [taillabel="dna", headlabel="in"];
digraph "resequencing_workflow" {
rankdir=LR;
graph [fontname="Arial",fontsize=13,color="#384A52",fontcolor="#384A52"];
node [fontname="Arial",fontsize=11,color="#384A52",fontcolor="#384A52",fillcolor="#EFF2F5",shape=box,style=filled];
edge [fontname="Arial",fontsize=9, color="#384A52",fontcolor="#384A52"];
"bwa_aln_NA06984_1" [shape=box];
"bwa_aln_NA06984_2" [shape=box];
"bwa_aln_NA12489_1" [shape=box];
"bwa_aln_NA12489_2" [shape=box];
"download_fastq_NA06984_1" [shape=box];
package main
import (
sp "github.com/scipipe/scipipe"
spc "github.com/scipipe/scipipe/components"
)
func main() {
wf := sp.NewWorkflow("example_workflow", 4)
package main
import (
"encoding/csv"
"encoding/xml"
"io"
"os"
sp "github.com/scipipe/scipipe"
)
import std.stdio;
import std.string;
import std.algorithm;
void main() {
File file = File("Homo_sapiens.GRCh37.67.dna_rm.chromosome.Y.fa","r");
int countat[256];
int countgc[256];
countat['A'] = 1;
countat['T'] = 1;
#!/bin/bash
# ---------------------------------------------------------------------
# Generate test coverage for .Net core 2 projects.
# ---------------------------------------------------------------------
# Author: Samuel Lampa
#
# This script is supposed to be run in a Windows bash-environment such
# as MSYS2 (See this post for a guide on how to set up one:
# https://bionics.it/posts/linux-like-non-wsl-terminal-env-on-windows)
#
package main
import (
sp "github.com/scipipe/scipipe"
)
func main() {
wf := sp.NewWorkflow("hello_world", 4)
hello := wf.NewProc("hello", "echo 'Hello ' > {o:out}")
package main
import (
sp "github.com/samuell/scipipe"
)
func main() {
hello := sp.Sh("echo foo > {o:out}")
hello.OutPathFuncs["out"] = func() string {
return "hello.txt"