Thursday, August 14, 2014


There doesn't seem to be a lot of resources troubleshooting this error for Trinity.  Because we are running it on a Mac OSX and Trinity is compiled only for Linux, there is no real support from the Trinity side of things. It may be possible that we are missing libc++abi. This is not a minor undertaking and takes about 24 hours to download, configure, build, and compile. Despite this terrifying error message:

Mac users, remember to be careful when replacing the system's libc++. Your system will not be able to boot without a funcioning libc++.

I will carry onwards.

svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm
cd llvm/tools
svn co http://llvm.org/svn/llvm-project/cfe/trunk clang
cd ../..
cd llvm/tools/clang/tools
svn co http://llvm.org/svn/llvm-project/clang-tools-extra/trunk extra
cd ../../../..
cd llvm/projects
svn co http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
cd ../..
mkdir build
cd build
../llvm/configure
make #this took several hours; make sure to screen
#check to see if it worked
clang --help


#now install the other libraries
brew update
brew install cmake #you will need this later
cd
cd llvm/projects
svn co http://llvm.org/svn/llvm-project/libcxxabi/trunk libcxxabi
svn co http://llvm.org/svn/llvm-project/libcxx/trunk libcxx
cd .. #now you are in the llvm directory
mkdir build && cd build
cmake ..
make cxx
make #this also takes several hours

Okay done. Let's hope I didn't break break the computer and let's see if this actually did anything.

Tuesday, August 12, 2014

Fail.

succeeded(0), failed(58736)   99.9949% completed.    libc++abi.dylib: terminating with uncaught exception of type std::length_error: vector::_M_fill_insert
succeeded(0), failed(58737)   99.9966% completed.    libc++abi.dylib: terminating with uncaught exception of type std::length_error: vector::_M_fill_insert
succeeded(0), failed(58738)   99.9983% completed.    libc++abi.dylib: terminating with uncaught exception of type std::length_error: vector::_M_fill_insert
succeeded(0), failed(58739)   100% completed.

We are sorry, commands in file: [failed_quantify_graph_commands.6513.txt] failed.  :-(


Error, cmd: /usr/local/Cellar/trinity/r20131110/trinity-plugins/parafly/bin/ParaFly -c /Volumes/Spare/transcriptomes/MOE_VNO_transcriptomes/Trinity_assembly/to_assemble/DR_004_Arjam_MOE/trinity_output//chrysalis/quantifyGraph_commands -CPU 4 -failed_cmds failed_quantify_graph_commands.6513.txt -v -shuffle  died with ret 256 at /usr/local/bin/Trinity.pl line 1793.

This is to be continued. At least they put a frowny face in the error message. 
Here is a blog that gives excellent Trinity instructions:
https://cartwrightlab.wikispaces.com/RNAseq+Assembly+in+Trinity

#for paired end reads, combine each side of pairs into one file
cat pair.DR004_Artibeus_Jamaicensis_MOE_ACAGTG_L001_R1* >> Arjam_MOE_R1.fq
cat pair.DR004_Artibeus_Jamaicensis_MOE_ACAGTG_L001_R2* >> Arjam_MOE_R2.fq

#run a trimming script
python ~/Scripts/q-trim.py Arjam_MOE_R1.fq Arjam_MOE_R1_trim.fq

#woops I run into this error:
importerror no module named screed

#it looks like I need the "screed" module for this; looks like I also need to update "setup tools"
#first install pip
sudo python get-pip.py
pip install ipython #not sure what this did
#still missing the screed module
sudo pip install setuptools --upgrade
sudo pip install git+https://github.com/ged-lab/screed.git

#okay seems to be working now
#trimmed with the default setting in which a minimum Qscore = 5
#minimum length = 30; lets see how this works
python ~/Scripts/q-trim.py Arjam_MOE_R1.fq Arjam_MOE_R1_trim.fq
python ~/Scripts/q-trim.py Arjam_MOE_R2.fq Arjam_MOE_R2_trim.fq

#now i need to assemble paired reads--extracting only the pairs using both.py
python ~/Scripts/both.py Arjam_MOE_R1_trim.fq Arjam_MOE_R2_trim.fq
#this creates two files ...R1_trim.fq.both and R2_trim.fq.both
#this script took about one hour to run

#finally time to run trinity!
Trinity.pl --seqType fq --left Arjam_MOE_R1_trim.fq.both --right Arjam_MOE_R2_trim.fq.both --CPU 4 --JM 20G --output trinity_output/

Everything is up and running now. Stay tuned.

Monday, August 4, 2014

Okay we have FINALLY updated our operating system.

Apparently Mavericks already has commandline tools installed so it is not necessary to install again. However, there are some issues if you install Homebrew and the gcc compiler not being linked. So starting from scratch, here is what do do.

#install homebrew

ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
#check to see your comp is ready to brew
brew doctor
#i had several errors/warnings (errors indicated in orange)
/usr/bin comes before /usr/local/bin

export PATH='/usr/local/bin:$PATH' >> ~/.bash_profile

/usr/local/lib/gcc is not writable.

sudo chown -R laurelyohe /usr/local

brew install homebrew/science/bowtie
brew install apple-gcc42
brew install samtools
brew install trinity

Okay, everything seems good to go. Now I am unzipping the transcriptome output from trimmomatic. 

Thursday, July 31, 2014



#installing bamm
brew tap macroevolution/bamm
brew install bamm

#it worked

Wednesday, July 30, 2014

Because I did such a horrid job taking comprehensible notes while in London, I am going to be more efficient this time around with transcriptome assembly.

We have our illumina RNA-seq reads back (yay!).

To download the reads from UArizona, you have to download this horridly complicated program called irods (http://uagc.arl.arizona.edu/resources/user-guide). After much struggle, the easiest way to get things installed and compiled is the "non-fancy" way. HOWEVER, you MUST download the most recent version of iRods (as of right now 3.3.1)

Navigate to your iRODs folder. Things in blue are what you type. Things in pink are what you would change differently based on your computer.


 export PATH=$PATH:$HOME/iRODS/clients/icommands/bin
 iinit #this will prompt you for a bunch of information

Enter the host name (DNS) of the server to connect to:  mozart.arl.arizona.edu
Enter the port number:  1247
Enter your irods user name:  <your login name from UAGC/BCF>
Enter your irods zone:  BCFZone
Enter your current iRODS password:  <your password from UAGC/BCF>
 
#now your session should start
ils #lists all of the folders in your iRODS account
icd 14140709_SN885_0197_Lane1SideA_Project_Davalos_RNA #change directory
iget -r 140709_SN885_0197_Lane1SideA_Project_Davalos_RNA /Volumes/Spare/ 
#iget -r copies the folder you want to whatever directory you want

Okay now all of the data should be on your computer.

Now I need to install Trinity:
#install homebrew if you do not already have it

#now install programs necessary for trinity to run on your mac
brew install homebrew/science/bowtie
brew install git
#to allow for new installation of compiler
brew tap homebrew/dupes
brew install apple-gcc42

#okay guess I can't do that because it requires an operating system higher than Mac OSX Lion...

Yes, you read that correctly. Our operating system is still pre-lion. Seems like I will have to wait until our operating system is figured out.

Once we figure this out though, remember this link: http://sourceforge.net/p/trinityrnaseq/mailman/message/31892980/
It allows for trinity to be installed on Mac (even though it is compiled for Linux).


Tuesday, July 15, 2014

This is from awhile ago--I found it in my drafts, but I just wanted to reopen this can of worms.
selecting priors:

1) select random node on the tree:
#randomly sample a node from a randomly trimmed tree
random.node<-sample(tree.trim$edge[1,], 1)
> random.node
[1] 75

2) open up mesquite and simulate random character in Brownian motion on the tree and look at before and after rates on node 75 in Mesquite using these instructions:
https://nunn.rc.fas.harvard.edu/groups/pica/revisions/7b932/24/
https://nunn.rc.fas.harvard.edu/groups/pica/wiki/f4cc5/43_Squared_Change_Parsimony.html

Take the rate at node 75 for sig1 1 prior: -0.86245
Pick random branch within this clade for sig2 prior (Pellorneum_pyrrogenys):1.1092
Alpha: random uniform distribution runif(1)
rand.shift = 0.05 --used what Revell, et al uses
use ngen=100,000
sample:100