Skip to content

Instantly share code, notes, and snippets.

@iracooke
iracooke / bpipe.config
Last active August 29, 2015 13:57
bpipe script for Trinotate
executor="slurm"
jobtype="single"
queue="compute"
walltime="10-30:00"
procs=16
commands {
blastx {
procs=16
walltime="10-30:00"
@iracooke
iracooke / gist:9db6d12c037b6bcb04e9
Created July 19, 2014 01:59
rsync42-better-ignore-case.diff
Common subdirectories: ../../rsync-42/rsync/doc and ./doc
diff -u ../../rsync-42/rsync/exclude.c ./exclude.c
--- ../../rsync-42/rsync/exclude.c 2007-11-07 06:31:30.000000000 +1100
+++ ./exclude.c 2014-02-09 17:35:43.000000000 +1100
@@ -38,6 +38,7 @@
extern int sanitize_paths;
extern int protocol_version;
extern int module_id;
+extern int ignore_case;
#!/usr/bin/env ruby
def permutation(p, m)
all_p = p.to_a.permutation.to_a
puts all_p.length
all_p.each { |perm| puts perm.join(" ") }
@iracooke
iracooke / Results.md
Last active August 29, 2015 14:05
Flysleep Results

If we condense the data completely (ie average over the results on each day) we have a data frame that looks like this

>  cdatadaynum
   biorep daynight treatment count nflies
1       1      day        cs 12620   2662
2       1      day       trh  8371   1509
3       1    night        cs 10820   1972
4       1    night       trh  6132    987
@iracooke
iracooke / scaffold.md
Last active August 29, 2015 14:05
Scaffold Batch Cheat Sheet

Scaffold Batch Howto

If your scaffold run is longer than an hour or so its a good idea to run it in batch mode. This allows others to run the scaffold GUI at the same time and will run in the background until done.

  1. Setup your scaffold run using the GUI but dont actually start the run
  2. Save your scaffold file using the save as dialog (eg myrun.sf3)
  3. Choose Export -> Scaffold Batch and save your batch file (eg myrun.scafml )
  4. Open the Windows Powershell program. This should give a command prompt

Powershell Commands

@iracooke
iracooke / README.md
Last active August 29, 2015 14:06
NCBI SRA

Download files from SRA

This gist contains a few snippets of code to help automate downloading data using the NCBI SRA Toolkit.

  1. Use the NCBI website to export a csv file with the details of experiment you wish to download. This file will contain just experiment accession numbers.
  2. Use R to convert experiment accessiont to run accessions. Save these in runs.txt
  3. Use this command to download all the files
 cat runs.txt | ./fetchall.sh
@iracooke
iracooke / BasicExample.applescript
Created September 24, 2014 19:59
DropSync Scripts
(* Running a sync using DropSync and Applescript
Demonstrates how to launch DropSync, select a folder pair for syncing, and then run a sync. DropSync supports much more applescript functionality than is demonstrated here. Consult the DropSync.sdef file for complete details.
To use this script you will need to modify it to reflect your own setup. The Applescript Editor utility can be used to run, edit and debug your scripts.
The script can then be run from terminal using the osascript command, or can be automatically launched by linking it to a recurring event in iCal.
*)
@iracooke
iracooke / piechart.R
Last active August 29, 2015 14:07
R Snippets
toxin_counts = c(2273,2306,2235,19,183,61,210)
taxa = c("Gastropods","Snakes","Arachnids","Mammals","Jellyfish","Amphibians","other")
df = data.frame(toxin_counts,taxa)
pie(df$toxin_counts,labels=df$taxa)
@iracooke
iracooke / README.md
Last active March 9, 2021 00:04
TopGO

Enrichment analysis with topGO

Input data needed;

  • A file orf2go.map for your study organism. It should contain entries like this;

    cds.comp1000018_c0_seq1|m.205055 GO:0005618, GO:0016021, GO:0045330, GO:0004857, GO:0030599, GO:0042545 cds.comp1000154_c0_seq1|m.205060 GO:0030136, GO:0031901, GO:0005768

If you don't have an orf2go.map file but you have a Trinity sqlite file you can generate one using trinotate_proteomics as follows;

@iracooke
iracooke / ingalaxy.md
Created November 11, 2014 06:27
Proteogenomics

Running a Proteogenomics Analysis in Galaxy

To do this properly you need to follow this basic pattern of steps regardless of the project.

  1. Create a protein database that you can also generate a gff coordinate file for.
  2. Run proteomic searches on this db to create a protXML file
  3. Use the Proteomics to GFF tool to map proteomics results back to your genomic coordinates.

Analysing a transcriptome