Skip to content

Instantly share code, notes, and snippets.

@xie186
xie186 / DMR_merge.pl
Last active August 17, 2020 14:51
How to write Perl script to merge chromosome coordinates
#!/usr/bin/perl -w
use strict;
my ($DMR, $out) = @ARGV;
open DMR, $DMR or die "File not found: $!";
open OUT, "+>$out" or die "$!";
#read a line,
# go to next line
@pratos
pratos / condaenv.txt
Created November 30, 2016 07:01
To package a conda environment (Requirement.txt and virtual environment)
# For Windows users# Note: <> denotes changes to be made
#Create a conda environment
conda create --name <environment-name> python=<version:2.7/3.5>
#To create a requirements.txt file:
conda list #Gives you list of packages used for the environment
conda list -e > requirements.txt #Save all the info about packages to your folder
@kived
kived / splittertest.py
Created May 26, 2015 18:00
Kivy: Splitter example
import kivy
kivy.require('1.8.1')
from kivy.app import App
from kivy.lang import Builder
root = Builder.load_string('''
BoxLayout:
orientation: 'vertical'
Splitter:
@barrysteyn
barrysteyn / svn-to-git.md
Last active December 26, 2022 22:32
Migrate From SVN To GIT
@nathanhaigh
nathanhaigh / deinterleave_fastq.sh
Last active May 6, 2024 06:38
deinterleave FASTQ files
#!/bin/bash
# Usage: deinterleave_fastq.sh < interleaved.fastq f.fastq r.fastq [compress]
#
# Deinterleaves a FASTQ file of paired reads into two FASTQ
# files specified on the command line. Optionally GZip compresses the output
# FASTQ files using pigz if the 3rd command line argument is the word "compress"
#
# Can deinterleave 100 million paired reads (200 million total
# reads; a 43Gbyte file), in memory (/dev/shm), in 4m15s (255s)
#
@netj
netj / memusg
Last active June 25, 2024 17:39
memusg -- Measure memory usage of processes
#!/usr/bin/env bash
# memusg -- Measure memory usage of processes
# Usage: memusg COMMAND [ARGS]...
#
# Author: Jaeho Shin <netj@sparcs.org>
# Created: 2010-08-16
############################################################################
# Copyright 2010 Jaeho Shin. #
# #
# Licensed under the Apache License, Version 2.0 (the "License"); #