Skip to content

Instantly share code, notes, and snippets.

@iracooke
iracooke / ignore-osxquarantine.diff
Last active August 29, 2015 14:17
Rsync patches
This patch is for rsync running in a sandboxed environment on OSX
It ignores the com.apple.quarantine attribute which code running in
a sandbox cannot modify but which will invariably be set by the system
on files rsync creates
To use this patch, run these commands for a successful build:
patch -p1 <patches/ignore-case.diff
./configure (optional if already run)
make
@iracooke
iracooke / submodulewiki.md
Last active August 29, 2025 08:17
Wiki as a submodule

From within the parent repo do

        git submodule add git@bitbucket.org:iracooke/transcriptomes.git/wiki wiki
        git commit -m "Adding wiki as submodule"
        git push

Making changes to the wiki and to the parent require separate git commit commands.

@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

@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 / 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 / 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 / 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 / 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 / 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
#!/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(" ") }