Skip to content

Instantly share code, notes, and snippets.

HongKee Moon hkmoon

  • MPI-CBG
  • Dresden
Block or report user

Report or block hkmoon

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View runSample.sh
export TRINITY="sudo singularity exec /home/vagrant/Trinity-v2.8.4.simg Trinity"
cd sample_data
$TRINITY --samples_file samples.PE.txt --seqType fq --max_memory 1G --output trinity_test_samples_PE
View getSampleData.sh
export TRINITY_HOME="singularity exec /home/vagrant/Trinity-v2.8.4.simg Trinity"
mkdir trinityrnaseq
cd trinityrnaseq
git init
git remote add -f origin https://github.com/trinityrnaseq/trinityrnaseq.git
git config core.sparseCheckout true
echo "sample_data/test_Trinity_Assembly" >> .git/info/sparse-checkout
git pull origin master
mv sample_data/test_Trinity_Assembly/* .
@hkmoon
hkmoon / Vagrantfile
Last active Aug 22, 2019
Simple Vagrantfile
View Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
####################################################
# You can do this entire process while running on the filesystem you want to resize (yes, it's safe and fully supported). There is no need for rescue CDs or alternate operating systems.
#
@hkmoon
hkmoon / bootstrap.sh
Last active Sep 10, 2019
Simple vagrant bootstrap.sh
View bootstrap.sh
#!/usr/bin/env bash
export DEBIAN_FRONTEND=noninteractive
apt-get update
apt-get install -y python-pip python3-pip
pip install numpy biopython
pip3 install numpy biopython
# create Trinity output, DATA, scripts folder
sudo -S -u vagrant mkdir -p /vagrant/output
sudo -S -u vagrant ln -s /vagrant/output output
@hkmoon
hkmoon / vm-resize-hard-disk.md
Created Jul 1, 2019 — forked from christopher-hopper/vm-resize-hard-disk.md
Resize a Hard Disk for a Virtual Machine provisioned using Vagrant from a Linux base box to run using VirutalBox.
View vm-resize-hard-disk.md

Resize a Hard Disk for a Virtual Machine

Our Virtual Machines are provisioned using Vagrant from a Linux base box to run using VirutalBox. If the Hard Disk space runs out and you cannot remove files to free-up space, you can resize the Hard Disk using some VirtualBox and Linux commands.

Some assumptions

The following steps assume you've got a set-up like mine, where:

@hkmoon
hkmoon / byobuCommands
Created Jun 22, 2018 — forked from jshaw/byobuCommands
Byobu Commands
View byobuCommands
Byobu Commands
==============
byobu Screen manager
Level 0 Commands (Quick Start)
------------------------------
<F2> Create a new window
@hkmoon
hkmoon / ROIHdf5.java
Created Aug 9, 2017
ROI in HDF4ImageLoader
View ROIHdf5.java
void process(File hdf5, SpimDataMinimal spimData, Interval roi) {
AbstractSequenceDescription<?, ?, ?> sequenceDescription = spimData.getSequenceDescription();
Hdf5ImageLoader hdf5Loader = new Hdf5ImageLoader(hdf5, /* hdf5 partitions */ null, sequenceDescription);
for (TimePoint timepoint : sequenceDescription.getTimePoints().getTimePointsOrdered()) {
for (BasicViewSetup setup : sequenceDescription.getViewSetupsOrdered()) {
RandomAccessibleInterval<UnsignedShortType> img = hdf5Loader.getSetupImgLoader(setup.getId()).getImage(timepoint.getId(), 0); // full res
RandomAccessibleInterval<UnsignedShortType> imgRoi = Views.interval(img, roi);
// process imgRoi here, it will be lazily loaded when accessed
}
}
@hkmoon
hkmoon / Check.java
Created Dec 14, 2015
UTF-8 filesystem check
View Check.java
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
/**
* Created by moon on 12/8/15.
*/
public class Check
{
@hkmoon
hkmoon / private.xml
Created Oct 5, 2015
Key mappings for Karabiner
View private.xml
<?xml version="1.0"?>
<root>
<item>
<name>Mapping hjkl on left up down and right</name>
<identifier>private.mapping_hjkl_on_arrow</identifier>
<autogen>__KeyToKey__
KeyCode::H, ModifierFlag::CONTROL_L,
KeyCode::CURSOR_LEFT
</autogen>
<autogen>__KeyToKey__
@hkmoon
hkmoon / StreamMap.java
Last active Sep 15, 2015
Java 8: stream(), map() and collect()
View StreamMap.java
// In Java 8, there are stream(), map() and collect() for better collection manipulation
ArrayList<String> list = new ArrayList<>();
for(Person person : people)
{
list.add( person.getNickName() );
}
// The above code is shortened with the below
List<String> list = people.stream().map( Person::getNickName ).collect( Collectors.toList() );
You can’t perform that action at this time.