Skip to content

Instantly share code, notes, and snippets.

View freenas_11.2_update_fix_vnets
/bin/sh -c 'export JAILS="$(iocage list -h | cut -f 2)"; for jail in $JAILS; do iocage set vnet_default_interface=auto $jail; done; iocage set vnet_default_intercace=auto default'
View scanpy_137_packages.txt
Package Version
------------------------ -----------
alabaster 0.7.12
anndata 0.6.18
astropy 3.1.1
atomicwrites 1.3.0
attrs 18.2.0
Babel 2.6.0
backcall 0.1.0
certifi 2018.11.29
View TCGAanalyze_RemoveReplicateSamples.R
TCGAanalyze_RemoveReplicateSamples<-function(tabDF, typesample){
tabDF.typesample <- tabDF[, TCGAquery_SampleTypes(colnames(tabDF), typesample=typesample)]
# detect duplicated patient for typesample
tabDF.typesample.duplicated = duplicated(tabDF.typesample$patient)
if (sum(tabDF.typesample.duplicated)>0){
tabDF.typesample.not_duplicated = !(tabDF.typesample$patient %in% tabDF.typesample[,tabDF.typesample.duplicated]$patient)
# print(tabDF.typesample$patient[tabDF.typesample.duplicated])
# print(class(tabDF.typesample$patient[tabDF.typesample.duplicated]))
barcodes_solved_duplication=sapply(tabDF.typesample$patient[tabDF.typesample.duplicated],function(patient, dataset){
helios / rstudio.scm
Created Oct 17, 2016
guix and rstudio
View rstudio.scm
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2015, 2016 Ricardo Wurmus <>
;;; Copyright © 2015 Vicente Vera Parra <>
;;; Copyright © 2016 Andreas Enge <>
;;; Copyright © 2016 Efraim Flashner <>
;;; Copyright © 2016 Pjotr Prins <>
;;; Copyright © 2016 Roel Janssen <>
;;; Copyright © 2016 Ben Woodcroft <>
;;; This file is part of GNU Guix.
helios / gist:fdc94a2637a208d47a03
Created Jan 13, 2016
Scala Create an iterator using a Stream over 2 "aligned" files
View gist:fdc94a2637a208d47a03
test("Detect barcodes in forward and reverse reads in Fastq format") {
val readerR1 = new FastqReader(new"/R1.fastq.gz").getPath))
val readerR2 = new FastqReader(new"/R2.fastq.gz").getPath))
var list = List[String]()
case class Reads( r1: FastqRecord, r2: FastqRecord)
val stream: Stream[Reads]= {
def reads(readerR1: FastqReader, readerR2: FastqReader): Stream[Reads] = {
readerR1.hasNext() && readerR2.hasNext() match {
helios / trinity-pipeline-template.pbs
Last active Aug 29, 2015
The file is an example of the command lines used to run Trinity and PASA, at the time of the original work (“LincRNAs landscape in human lymphocytes highlights modulation of T cell differentiation by linc-MAF-4” by Ranzani V. et al.) Recently Trinity and PASA were updated, the current command lines and options can differ.
View trinity-pipeline-template.pbs
# Copyright (C) 2015 INGM
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
helios / gist:2924846
Created Jun 13, 2012
Quick and dirty deployment of your Ruby Gem to your server(s)
View gist:2924846
# You must be the owner of the destination directory
rsync -avz --exclude-from=.gitignore --exclude '.git' -e ssh ./
helios /
Created Jun 11, 2012
MultiMemberGZIPInputStream Concatenate multiple gzip in java
// reference
// author: I'm not, I could not find he/she but the rights belong to it.
package x.y.z;
helios / gist:2658172
Created May 11, 2012
Parsing Cufflinks Gtf file/data, in an ActiveRecord style
View gist:2658172 "./spec/fixture/transcripts.gtf"
#not yet parsed until you iterate of the transcripts
a.multi_exons.each_transcript {|t| puts t; break}
#accessing to an exon using the indexin:
g.read_transcript(10) #return a string of the block
g.get_tranascript(10) #return an object transcript.
helios / gist:1315778
Created Oct 26, 2011
CuffDiff output iterator, preliminar example
View gist:1315778
#CLASS DEFINITION Bio::Ngs::Cufflinks
class Diff
include Bio::Command::Wrapper
include Bio::Ngs::Cufflinks::Diff::Utils
set_program Bio::Ngs::Utils.binary("cuffdiff")
add_option "output-dir", :type => :string, :aliases => '-o', :default => "./"
add_option "time-series", :type => :boolean, :aliases => '-T'
add_option "min-alignment-count", :type => :numeric, :aliases => '-c'