I work mostly within the R and python programming environments. Here, I have uploaded some code snippets that other people may find useful. If you would like to use these scripts but are having trouble implementing them, feel free to contact me and I may be able to help.




This small function parses the output of Structure for plotting in R with the function barplot(). I have not tried it on other data sets other than my own, so there’s a good chance you may run into errors. parseStructure_test



This short python script takes a Trinity assembly as input, extracts the longest isoform for each contig, and outputs a new assembly with only the longest isoform for each Trinity component.

If you find the compselector script useful, please cite the following paper, which is what I developed the script for, and also provide a direct link to the compselector code:

Mason, N. A., & Taylor, S. A. (2015). Differentially expressed genes match bill morphology and plumage despite largely undifferentiated genomes in a Holarctic songbird. Molecular Ecology, n/a–n/a. doi:10.1111/mec.13140.

1 thought on “Code

  1. Alexander Brandt

    Dear Nicholas,
    your compselector is exactly what I need and it works perfectly! Thank you very much!
    How can I cite it, properly?
    Alex from Göttingen, Germany


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s