Skip to content

Instantly share code, notes, and snippets.

@nh13
nh13 / transpose.py
Created March 10, 2012 05:12
SAM File Re-organizer
#!/usr/bin/env python
############################################
# SAM File Re-organizer
###########################################
#
# what if you took a SAM file and transposed the data,
# that is, make it so that the rows become columns and vice versa, even keeping
# optional tags? Would the file compress better?
#
diff --git a/src/sw/lib/Solution4.cpp b/src/sw/lib/Solution4.cpp
index 497d71a..f019480 100644
--- a/src/sw/lib/Solution4.cpp
+++ b/src/sw/lib/Solution4.cpp
@@ -1,7 +1,8 @@
// Coder: Psyho
// Submission: 40
// URL: http://community.topcoder.com/longcontest/?module=ViewProblemSolution&pm=11786&rd=15078&cr=10597114&subnum=40
-#define INLINE __attribute__ ((always_inline))
+//#define INLINE __attribute__ ((always_inline))
# tmap mapall -f ${REF} -r r0.fq -v stage1 map1 map2 map3 > r0.fq.map1map2map3.sam
40 84212 0
39 84470 0
38 84724 0
37 85033 0
36 85271 0
35 85438 0
34 85632 0
33 85988 0
32 86200 0
# tmap mapall -f ${REF} -r r0.fq -v stage1 map1 map2 map3 > r0.fq.map1map2map3.sam
40 77347 0
39 77817 0
38 78306 0
37 78962 0
36 79452 0
35 79794 0
34 80128 0
33 80742 0
32 81118 0
@nh13
nh13 / gist:3908018
Created October 17, 2012 20:40
TMAP homebrew
nilshomer$ ./bin/brew install -v tmap
==> Cloning https://github.com/iontorrent/TMAP.git
git clone --depth 1 --branch tmap.3.2.0 https://github.com/iontorrent/TMAP.git /Users/nilshomer/Library/Caches/Homebrew/tmap--git
Cloning into '/Users/nilshomer/Library/Caches/Homebrew/tmap--git'...
remote: Counting objects: 2272, done.
remote: Compressing objects: 100% (1182/1182), done.
remote: Total 2272 (delta 1681), reused 1564 (delta 1085)
Receiving objects: 100% (2272/2272), 6.20 MiB | 928 KiB/s, done.
Resolving deltas: 100% (1681/1681), done.
warning: Remote branch tmap.3.2.0 not found in upstream origin, using HEAD instead
@nh13
nh13 / farm.c
Created August 8, 2014 18:32
Old McDonald had a farm...
switch (c)
{
/* Old McDonald had a farm ei... */
case 'e':
case 'i':
case 'o':
@nh13
nh13 / EnumExample.java
Created July 30, 2015 16:24
example enum for gc
enum {
MISSING_CODE,
HOM_REF_CODE,
HET_REF_VAR1_CODE,
HET_VAR1_VAR2_CODE,
HOM_VAR1_CODE,
NO_CALL_CODE,
LOW_GQ_CODE,
LOW_DP_CODE,
VC_FILTERED_CODE,
@nh13
nh13 / AddDummyAlignmentInformation.java
Created November 16, 2015 06:11
AddDummyAlignmentInformation.java
package picard.sam;
import htsjdk.samtools.SAMFileHeader;
import htsjdk.samtools.SAMFileWriter;
import htsjdk.samtools.SAMFileWriterFactory;
import htsjdk.samtools.SAMRecord;
import htsjdk.samtools.SAMSequenceRecord;
import htsjdk.samtools.SamReader;
import htsjdk.samtools.SamReaderFactory;
import htsjdk.samtools.util.CloserUtil;
// jeanluc/src/main/scala/dagr/jeanluc/JeanLucMain.scala
/*
* The MIT License
*
* Copyright (c) 2016 Fulcrum Genomics LLC
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@nh13
nh13 / README.md
Last active April 22, 2016 23:55
Htsjdk README
Unit Tests Integration Tests
Master GATK Picard