This blog post shows an example of an easy quire analysis to extract self-self physical interactions identified in the budding yeast Saccharomyces cerevisiae from (an old) BioGRID database. The point of these blog posts is to show some of the motivation for the development of quire, not to explain the details of the language. For details on the quire language, see the documentation (>100 pages) in the provided .tgz file.
First, we need to read in Biogrid and extract out the physical interactions. We'll do this with a separate file, biogrid-physical-nosymm.q. We can then run this script with the run( @"biogrid-physical-nosymm.q" ) command in the actual script. This is one of the few code reuse strategies that quire currently supports.
## ## biogrid-physical-nosymm.q ## # # Read biogrid # scgenes = registry( @ "../../quire_git/data/databases/gene_registry.txt" ) biogridfile = "/home/cdputnam/databases/biogrid/BIOGRID-ORGANISM-Saccharomyces_cerevisiae_S288c-3.4.152.tab2.txt" biogrid = network( @ biogridfile, format="biogrid_tab2", generegistry=scgenes, symmetry="none", sourcename="biogrid" ) # # Extract physical interactions # physical_types = """ Affinity Capture-MS Affinity Capture-Western Reconstituted Complex Two-hybrid Co-crystal Structure Far Western FRET Protein-peptide PCA Co-purification Co-fractionation Affinity Capture-Luminescence """ physical = filter( biogrid, type=physical_types, silent="false" )
Next, we need to identify which of the baits and prey genes are present in a self-self interaction. Because we read in the interaction data without symmetry, we can simplify the task by recognizing that the only possible candidates must be in both the bait and prey genelists. For the Saccharomyces cerevisiae Biogrid database 3.4.152, there are 5,626 genes in the bait and prey list, but only 4,287 that are in both, so we can ignore 1,339 of them.
run( @"biogrid-physical-nosymm.q" ) baits = element( physical, type="baits" ) preys = element( physical, type="preys" ) common = filter( baits + preys, partition="11" ) -> flatten()
Finally, we can look for any interactions between a gene with itself by applying the gene partition of a genelist containing only one gene at a time and extracting those interactions with the gene partition "1:1".
Instead of just counting, we will collect all of the genes and observations belonging to self-self interactions for potential future use.
selfinteractors = genelist( generegistry=scgenes ) selfinteractions = network( generegistry=scgenes ) for i in range( sizeof( candidates ) ) gene = element( candidates, i ) label( physical, genepartition=gene ) genegene = filter( physical, genepartition="1:1" ) if ( sizeof( genegene ) > 0 ) then selfinteractors = flatten( selfinteractors + gene ) selfinteractions = flatten( selfinteractions + genegene ) fi orf = element( gene, 1, type="genes" ) "gene: " + locus( orf, scgenes ) + " (" + orf + ")" + " self: " + sizeof( selfinteractions ) rof selfinteractors
Thus we end up with 1,583 genes identified as being part of self-self interactions (observed 2,912 times for an average of 1.8 observations for each interaction).
network summary ---------------- nsources 1 source 1 flattened nbaits 1583 npreys 1583 ninteraction_types 11 Affinity Capture-MS 587 PCA 383 Two-hybrid 697 Affinity Capture-Western 335 Reconstituted Complex 458 Co-crystal Structure 268 Co-purification 66 FRET 41 Co-fractionation 34 Protein-peptide 40 Far Western 3 ninteractions 1583 nobservations 2912
We can now take the self-self interaction network and compare it to the starting network.
Technique Total Obs Self Obs Percent ----------------------------- --------- --------- ------- All Techniques 119539 2912 2.44% ----------------------------- --------- --------- ------- Affinity Capture-MS 63529 587 0.92% Affinity Capture-Western 17536 335 1.91% Reconstituted Complex 8080 458 5.67% PCA 6671 383 5.74% Two-hybrid 16183 697 4.31% Co-purification 4371 66 1.51% Co-fractionation 1011 34 3.36% Protein-peptide 849 40 4.71% FRET 226 41 18.14% Far Western 103 3 2.91% Co-crystal Structure 930 268 28.82% Affinity Capture-Luminescence 50 0 0.00%
Unsurprisingly, co-crystallization has a high percentage of self-self physical interactions. Also unsurprisingly, affinity capture mass spectrometry has very few reports of self-self physical interactions, given the fact that peptides from multiple subunits of the same protein generate the same peptide, so that identifying self-self interactions requires very specific experimental designs.