Code Monkey home page Code Monkey logo

pgc_dnds's Introduction


Defending the PGC Specification Hypothesis

All of the scripts and R commands required to run our analysis and create the figures are contained within this repository.

Identifying Orthologs

First off, the downloaded sequences are converted from Genbank to FASTA format if required by extract_cds.pl. Then remove_N_and_STOPs.pl is used to remove any sequences with an ambiguous nucleotide ('N') or an internal STOP codon. These sequences are available here. To identify orthologs we used BLASTX, an example is shown below.

perl translate.pl Alligator_mississippiensis.cds_clean

makeblastdb -in Alligator_mississippiensis.cds_clean_prot -dbtype prot

blastx -query Alligator_sinensis.cds_clean -db Alligator_mississippiensis.cds_clean_prot -evalue 1e-06 -max_target_seqs 1 -outfmt 6 -out AS_vs_AM.txt

Once all pairwise BLASTs were done, we pulled out the reciprocal top hits for each pair, 3-way, 4-way and 5-way group. The orthologs that we identified are listed here.

# To pullout the pairwise and 4-way orthologs:
perl pullout_orthos.pl AM_vs_AS.txt,AS_vs_AM.txt FC_vs_FP.txt,FP_vs_FC.txt AM_vs_FP.txt,FP_vs_AM.txt

# To pullout the 3-way orthologs used for the Relative-rate test:
perl pullout_orthos_3way.pl AM_vs_FP.txt,FP_vs_AM.txt AM_vs_PT.txt,PT_vs_AM.txt 0

# To pullout the 5-way orthologs:
perl pullout_orthos_5way.pl Archosaur_4way.txt PT_vs_AM.txt,AM_vs_PT.txt

Building Alignments

We first re-ran our original relative-rate tests on the independent, pairwise Falcon-Alligator-Chimp orthologs.

# First we run the RRT using the protein sequences
perl relative_rate3_prot.pl AM_FP_PT.txt Alligator_mississippiensis.cds_clean,Falco_peregrinus.cds_clean,Pan_troglodytes.CHIMP2.1.4.cds.all.fa_clean

# We then run the relative-rate test on the whole ORF, first two codon positions and third codon position
perl relative_rate3_cod.pl AM_FP_PT.txt orf  Alligator_mississippiensis.cds_clean,Falco_peregrinus.cds_clean,Pan_troglodytes.CHIMP2.1.4.cds.all.fa_clean
perl relative_rate3_cod.pl AM_FP_PT.txt first  Alligator_mississippiensis.cds_clean,Falco_peregrinus.cds_clean,Pan_troglodytes.CHIMP2.1.4.cds.all.fa_clean
perl relative_rate3_cod.pl AM_FP_PT.txt third  Alligator_mississippiensis.cds_clean,Falco_peregrinus.cds_clean,Pan_troglodytes.CHIMP2.1.4.cds.all.fa_clean

Next, we recreated the data from Whittle and Extavour, running MEGA-CC on the pairs and 4-way groups of orthologs.

# We first run MEGA-CC on each pairwise and 4-way group:
perl run_megacc.pl Alligator_pairs.txt Files/ Alligator_mississippiensis.cds_clean,Alligator_sinensis.cds_clean
perl run_megacc.pl Archosaur_4way.txt Files/ Alligator_mississippiensis.cds_clean,Alligator_sinensis.cds_clean,Falco_peregrinus.cds_clean,Falco_cherrug.cds_clean

# We then pullout the dN, dS and dN/dS for the pairwise alignments:
perl get_dnds_pair.pl Alligators 15502 34469 Files/
mv summary.txt Alligator_summary.txt

# We then pullout the information from the 4-way alignments:
perl get_dnds_4way.pl Archosaurs 34470 43844 Files/
mv summary.txt Archosaur_summary.txt

Finally, we build the 5-way alignments and run codeml to generate the dN/dS values, and HyPhy to run the relative rate test. All of the output files from each step are included here.

# We initially run the relative-rate test on the whole ORF
perl run_5way_analysis.pl 5way.txt Alligator_mississippiensis.cds_clean,Alligator_sinensis.cds_clean,Falco_peregrinus.cds_clean,Falco_cherrug.cds_clean,Pan_troglodytes.CHIMP2.1.4.cds.all.fa_clean

# We then additionally run the relative-rate test on just the first two codon positions
perl run_5way_first_rrt.pl 5way.txt Alligator_mississippiensis.cds_clean,Alligator_sinensis.cds_clean,Falco_peregrinus.cds_clean,Falco_cherrug.cds_clean,Pan_troglodytes.CHIMP2.1.4.cds.all.fa_clean

Creating the figures

Most of the figures were created in R and can be regenerated by running the following script. This will use the files currently in the Output_files directory. Note that many of these figures were subsequently edited in Illustrator, prior to publication.

Rscript generate_R_plots.R

pgc_dnds's People

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.