The brush can be turned on and off by clicking the brush button. When the brush is off, clicking on a point drills down into that taxonomic category at higher resolution. Try it out! This data is from a 15N2 DNA-SIP experiment with biological soil crust samples.
Last active
August 29, 2015 14:11
-
-
Save chuckpr/3c62c2008e8e784d175d to your computer and use it in GitHub Desktop.
l2fc scatter with drilldown -- turn off brush and click on point to drill into category
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
OTU | Rank3 | Rank2 | Rank6 | Rank5 | Rank4 | log2FoldChange | |
---|---|---|---|---|---|---|---|
OTU.1 | SubsectionIII | Cyanobacteria | unassigned | Microcoleus | FamilyI | 0.273125576269475 | |
OTU.10 | Betaproteobacteria | Proteobacteria | Herbaspirillum | Oxalobacteraceae | Burkholderiales | -0.7288353709745409 | |
OTU.100 | Rubrobacteria | Actinobacteria | Rubrobacter | Rubrobacteriaceae | Rubrobacterales | -0.232079134527247 | |
OTU.1001 | SubsectionIII | Cyanobacteria | unassigned | Microcoleus | FamilyI | 0.20796992257556896 | |
OTU.101 | Alphaproteobacteria | Proteobacteria | Rubellimicrobium | Rhodobacteraceae | Rhodobacterales | -0.15980262963791902 | |
OTU.102 | Betaproteobacteria | Proteobacteria | Dechloromonas | Rhodocyclaceae | Rhodocyclales | -3.24700423933967 | |
OTU.103 | Alphaproteobacteria | Proteobacteria | Rubellimicrobium | Rhodobacteraceae | Rhodobacterales | -0.111393532733024 | |
OTU.1064 | Alphaproteobacteria | Proteobacteria | unassigned | Rhodospirillaceae | Rhodospirillales | 0.8004701351003599 | |
OTU.1075 | SubsectionIII | Cyanobacteria | unassigned | Microcoleus | FamilyI | -0.453080499311427 | |
OTU.108 | Clostridia | Firmicutes | uncultured | Clostridiaceae | Clostridiales | 2.61245000983974 | |
OTU.1080 | Alphaproteobacteria | Proteobacteria | Microvirga | Methylobacteriaceae | Rhizobiales | -0.5460452814584471 | |
OTU.109 | Thermoleophilia | Actinobacteria | Patulibacter | Patulibacteraceae | Solirubrobacterales | -0.4857492454218739 | |
OTU.11 | Clostridia | Firmicutes | Clostridium | Clostridiaceae | Clostridiales | 1.0324423912468101 | |
OTU.110 | Micrococcales | Actinobacteria | unassigned | Arthrobacter | Micrococcaceae | 0.917491158887877 | |
OTU.1106 | SubsectionIII | Cyanobacteria | unassigned | unassigned | FamilyI | 0.474998068742056 | |
OTU.113 | Betaproteobacteria | Proteobacteria | uncultured | Rhodocyclaceae | Rhodocyclales | 1.02178871461346 | |
OTU.116 | Streptomycetales | Actinobacteria | unassigned | Streptomyces | Streptomycetaceae | 2.4052602497656403 | |
OTU.117 | Sphingobacteriia | Bacteroidetes | Ferruginibacter | Chitinophagaceae | Sphingobacteriales | 0.721590171654675 | |
OTU.119 | Thermomicrobia | Chloroflexi | unassigned | unassigned | JG30-KF-CM45 | -1.38085647823208 | |
OTU.12 | Alphaproteobacteria | Proteobacteria | Microvirga | Methylobacteriaceae | Rhizobiales | -0.223821181541802 | |
OTU.122 | SubsectionIII | Cyanobacteria | uncultured_bacterium | Leptolyngbya | FamilyI | -1.33945154458632 | |
OTU.123 | Betaproteobacteria | Proteobacteria | Derxia | Alcaligenaceae | Burkholderiales | 0.58586877404676 | |
OTU.125 | Gemmatimonadales | Gemmatimonadetes | uncultured_bacterium | uncultured | Gemmatimonadaceae | 0.426311113363949 | |
OTU.1260 | Order_Incertae_Sedis | Acidobacteria | uncultured_bacterium | Bryobacter | Family_Incertae_Sedis | -0.199050507560362 | |
OTU.127 | Gemmatimonadales | Gemmatimonadetes | uncultured_bacterium | uncultured | Gemmatimonadaceae | -0.00772355977975034 | |
OTU.129 | Clostridia | Firmicutes | uncultured | Clostridiaceae | Clostridiales | 0.8307428837042881 | |
OTU.134 | Betaproteobacteria | Proteobacteria | Paucimonas | Oxalobacteraceae | Burkholderiales | 0.327643658817567 | |
OTU.137 | Alphaproteobacteria | Proteobacteria | Azospirillum | Rhodospirillaceae | Rhodospirillales | 1.28923153831443 | |
OTU.138 | Clostridia | Firmicutes | Sporacetigenium | Peptostreptococcaceae | Clostridiales | 0.8768181240990179 | |
OTU.1396 | Betaproteobacteria | Proteobacteria | Paucimonas | Oxalobacteraceae | Burkholderiales | 0.21849123408281 | |
OTU.1398 | Candidatus_Chloracidobacterium | Acidobacteria | unassigned | unassigned | uncultured_bacterium | 0.37270998461018606 | |
OTU.14 | Gammaproteobacteria | Proteobacteria | Escherichia-Shigella | Enterobacteriaceae | Enterobacteriales | 3.2180079324661803 | |
OTU.140 | Bacilli | Firmicutes | Bacillus | Bacillaceae | Bacillales | 1.98725073067058 | |
OTU.1411 | Alphaproteobacteria | Proteobacteria | Rubellimicrobium | Rhodobacteraceae | Rhodobacterales | -0.757915346512621 | |
OTU.143 | Cytophagia | Bacteroidetes | Spirosoma | Cytophagaceae | Cytophagales | 0.5539752531355611 | |
OTU.144 | Clostridia | Firmicutes | Lutispora | Gracilibacteraceae | Clostridiales | -1.09050966511963 | |
OTU.147 | Alphaproteobacteria | Proteobacteria | Bosea | Bradyrhizobiaceae | Rhizobiales | 0.431436503710161 | |
OTU.15 | Ktedonobacteria | Chloroflexi | unassigned | uncultured_bacterium | C0119 | 0.0948706849640109 | |
OTU.151 | Rubrobacteria | Actinobacteria | Rubrobacter | Rubrobacteriaceae | Rubrobacterales | -0.0122658157617632 | |
OTU.152 | Acidimicrobiia | Actinobacteria | uncultured_bacterium | TM214 | Acidimicrobiales | -1.00831144401172 | |
OTU.1551 | Betaproteobacteria | Proteobacteria | Undibacterium | Oxalobacteraceae | Burkholderiales | -0.957356136648327 | |
OTU.156 | Armatimonadia | Armatimonadetes | unassigned | uncultured_bacterium | Armatimonadales | -0.752209669768632 | |
OTU.159 | Clostridia | Firmicutes | uncultured | Lachnospiraceae | Clostridiales | 1.02273268828465 | |
OTU.164 | Candidatus_Chloracidobacterium | Acidobacteria | unassigned | unassigned | uncultured_bacterium | 0.0943179665610552 | |
OTU.1641 | Alphaproteobacteria | Proteobacteria | Microvirga | Methylobacteriaceae | Rhizobiales | 0.63845555407798 | |
OTU.165 | Clostridia | Firmicutes | Tepidibacter | Peptostreptococcaceae | Clostridiales | 1.23706162788599 | |
OTU.1673 | Clostridia | Firmicutes | Clostridium | Clostridiaceae | Clostridiales | 2.61004575648759 | |
OTU.168 | SubsectionIII | Cyanobacteria | unassigned | unassigned | FamilyI | 0.4898000935354339 | |
OTU.1687 | Betaproteobacteria | Proteobacteria | Paucimonas | Oxalobacteraceae | Burkholderiales | 0.1553356679628 | |
OTU.1694 | Frankiales | Actinobacteria | unassigned | Geodermatophilus | Geodermatophilaceae | 0.348045518904474 | |
OTU.1698 | Alphaproteobacteria | Proteobacteria | Microvirga | Methylobacteriaceae | Rhizobiales | 0.440426622601671 | |
OTU.17 | Clostridia | Firmicutes | Clostridium | Clostridiaceae | Clostridiales | 0.6819960117135191 | |
OTU.170 | Propionibacteriales | Actinobacteria | unassigned | Aeromicrobium | Nocardioidaceae | -0.9190601983475749 | |
OTU.171 | Acidimicrobiia | Actinobacteria | uncultured_bacterium | TM214 | Acidimicrobiales | 1.1388038545782 | |
OTU.172 | Alphaproteobacteria | Proteobacteria | Azospirillum | Rhodospirillaceae | Rhodospirillales | -0.7506921647944409 | |
OTU.1724 | Betaproteobacteria | Proteobacteria | Paucimonas | Oxalobacteraceae | Burkholderiales | -0.7868626678126371 | |
OTU.174 | Spartobacteria | Verrucomicrobia | Chthoniobacter | Chthoniobacteraceae | Chthoniobacterales | -0.188895345279525 | |
OTU.1747 | Clostridia | Firmicutes | Clostridium | Clostridiaceae | Clostridiales | 1.36387031793726 | |
OTU.176 | Betaproteobacteria | Proteobacteria | Delftia | Comamonadaceae | Burkholderiales | 1.73187443526681 | |
OTU.1764 | Alphaproteobacteria | Proteobacteria | uncultured_bacterium | Ellin6055 | Sphingomonadales | -0.870267407093388 | |
OTU.177 | Alphaproteobacteria | Proteobacteria | Roseococcus | Acetobacteraceae | Rhodospirillales | 0.38407312847124303 | |
OTU.1770 | Alphaproteobacteria | Proteobacteria | Azospirillum | Rhodospirillaceae | Rhodospirillales | 0.23966548347873398 | |
OTU.178 | Deltaproteobacteria | Proteobacteria | Polyangiaceae | Sorangiineae | Myxococcales | -2.40623355607145 | |
OTU.179 | Pseudonocardiales | Actinobacteria | unassigned | unassigned | Pseudonocardiaceae | -0.5061444117676279 | |
OTU.1798 | Frankiales | Actinobacteria | uncultured_bacterium | Modestobacter | Geodermatophilaceae | 0.29534001734319704 | |
OTU.181 | Alphaproteobacteria | Proteobacteria | Craurococcus | Acetobacteraceae | Rhodospirillales | -0.8828892728563009 | |
OTU.182 | Sphingobacteriia | Bacteroidetes | Flavisolibacter | Chitinophagaceae | Sphingobacteriales | 0.723198879983463 | |
OTU.1831 | Armatimonadia | Armatimonadetes | unassigned | unassigned | Armatimonadales | -0.7961764605916309 | |
OTU.1833 | Betaproteobacteria | Proteobacteria | Derxia | Alcaligenaceae | Burkholderiales | -0.525509474091203 | |
OTU.185 | Propionibacteriales | Actinobacteria | uncultured_bacterium | Marmoricola | Nocardioidaceae | -1.07538631329239 | |
OTU.1860 | Betaproteobacteria | Proteobacteria | unassigned | Comamonadaceae | Burkholderiales | -0.286189437243774 | |
OTU.190 | uncultured_bacterium | Armatimonadetes | unassigned | unassigned | unassigned | 0.8044607135893279 | |
OTU.191 | Clostridia | Firmicutes | Symbiobacterium | Family_XVIII_Incertae_Sedis | Clostridiales | 1.3174364169444899 | |
OTU.1923 | Rubrobacteria | Actinobacteria | Rubrobacter | Rubrobacteriaceae | Rubrobacterales | 0.0138555467272426 | |
OTU.193 | Holophagae | Acidobacteria | unassigned | uncultured_Acidobacteria_bacterium | iii1-8 | 0.692719066252418 | |
OTU.194 | Alphaproteobacteria | Proteobacteria | uncultured | Caulobacteraceae | Caulobacterales | -0.199663582458805 | |
OTU.195 | Alphaproteobacteria | Proteobacteria | uncultured | Acetobacteraceae | Rhodospirillales | -0.266639094499107 | |
OTU.1957 | Candidatus_Chloracidobacterium | Acidobacteria | unassigned | unassigned | uncultured_Acidobacteria_bacterium | 0.478703211167235 | |
OTU.196 | Bacilli | Firmicutes | Paenibacillus | Paenibacillaceae | Bacillales | 0.0191195734278926 | |
OTU.198 | SubsectionIII | Cyanobacteria | unassigned | unassigned | FamilyI | -0.826086293839846 | |
OTU.20 | Sphingobacteriia | Bacteroidetes | Segetibacter | Chitinophagaceae | Sphingobacteriales | 0.650910318003781 | |
OTU.201 | Clostridia | Firmicutes | Clostridium | Clostridiaceae | Clostridiales | 1.4593466264423898 | |
OTU.2015 | Alphaproteobacteria | Proteobacteria | Azospirillum | Rhodospirillaceae | Rhodospirillales | 0.523214842610966 | |
OTU.202 | AT425-EubC11_terrestrial_group | Gemmatimonadetes | unassigned | unassigned | uncultured_bacterium | 0.27708889643846996 | |
OTU.2029 | Alphaproteobacteria | Proteobacteria | uncultured_endolithic_bacterium | JG34-KF-361 | Rhizobiales | -0.309207404330953 | |
OTU.2033 | Betaproteobacteria | Proteobacteria | uncultured | Comamonadaceae | Burkholderiales | -0.0491014478428569 | |
OTU.204 | Spartobacteria | Verrucomicrobia | Chthoniobacter | Chthoniobacteraceae | Chthoniobacterales | -2.21563494527952 | |
OTU.21 | Candidatus_Chloracidobacterium | Acidobacteria | unassigned | unassigned | uncultured_bacterium | 0.0584720025858566 | |
OTU.212 | Alphaproteobacteria | Proteobacteria | Sphingomonas | Sphingomonadaceae | Sphingomonadales | 0.464138547363253 | |
OTU.214 | Micrococcales | Actinobacteria | unassigned | Cellulomonas | Cellulomonadaceae | -0.11691984654916199 | |
OTU.215 | AT425-EubC11_terrestrial_group | Gemmatimonadetes | unassigned | unassigned | uncultured_bacterium | 0.45990490191341 | |
OTU.2175 | Clostridia | Firmicutes | Clostridium | Clostridiaceae | Clostridiales | 1.02909059954245 | |
OTU.218 | Candidatus_Chloracidobacterium | Acidobacteria | unassigned | unassigned | uncultured_bacterium | 1.4842255479938897 | |
OTU.227 | Clostridia | Firmicutes | Cellulosilyticum | Lachnospiraceae | Clostridiales | -0.5981347438823189 | |
OTU.2292 | Frankiales | Actinobacteria | unassigned | Modestobacter | Geodermatophilaceae | 0.71466624193565 | |
OTU.23 | Alphaproteobacteria | Proteobacteria | unassigned | unassigned | Rhizobiales | -0.232960348466875 | |
OTU.231 | Alphaproteobacteria | Proteobacteria | Sphingomonas | Sphingomonadaceae | Sphingomonadales | 0.139361294924078 | |
OTU.233 | Cytophagia | Bacteroidetes | uncultured | Cytophagaceae | Cytophagales | 0.918828313685462 | |
OTU.238 | Alphaproteobacteria | Proteobacteria | Sphingomonas | Sphingomonadaceae | Sphingomonadales | -0.127771663218149 | |
OTU.239 | Alphaproteobacteria | Proteobacteria | Sphingomonas | Sphingomonadaceae | Sphingomonadales | 0.0873223868738334 | |
OTU.24 | Rubrobacteria | Actinobacteria | Rubrobacter | Rubrobacteriaceae | Rubrobacterales | 0.436021810978793 | |
OTU.2404 | Bacilli | Firmicutes | Incertae_Sedis | Planococcaceae | Bacillales | 0.8772733011631758 | |
OTU.243 | Bacilli | Firmicutes | Bacillus | Bacillaceae | Bacillales | 2.2231450044296603 | |
OTU.2445 | Betaproteobacteria | Proteobacteria | Herbaspirillum | Oxalobacteraceae | Burkholderiales | 0.5170202240756939 | |
OTU.2452 | Alphaproteobacteria | Proteobacteria | Sphingomonas | Sphingomonadaceae | Sphingomonadales | -0.8526149606796691 | |
OTU.247 | Alphaproteobacteria | Proteobacteria | Sphingomonas | Sphingomonadaceae | Sphingomonadales | -1.1946944326149098 | |
OTU.249 | Clostridia | Firmicutes | uncultured | Clostridiaceae | Clostridiales | 0.38088118591102793 | |
OTU.250 | Alphaproteobacteria | Proteobacteria | Sphingomonas | Sphingomonadaceae | Sphingomonadales | 0.0508311030214174 | |
OTU.2526 | Alphaproteobacteria | Proteobacteria | Rubellimicrobium | Rhodobacteraceae | Rhodobacterales | 0.463074407472524 | |
OTU.2538 | Alphaproteobacteria | Proteobacteria | Microvirga | Methylobacteriaceae | Rhizobiales | -0.33530463100057695 | |
OTU.255 | AT425-EubC11_terrestrial_group | Gemmatimonadetes | unassigned | unassigned | uncultured_bacterium | -1.9270855676213998 | |
OTU.258 | Thermoleophilia | Actinobacteria | uncultured_bacterium | uncultured | Gaiellales | 0.7147515001384901 | |
OTU.259 | Clostridia | Firmicutes | uncultured | Lachnospiraceae | Clostridiales | 1.39176062427901 | |
OTU.263 | Alphaproteobacteria | Proteobacteria | Azospirillum | Rhodospirillaceae | Rhodospirillales | 1.85833817916099 | |
OTU.2655 | Planctomycetacia | Planctomycetes | unassigned | Planctomycetaceae | Planctomycetales | -1.0742255886505798 | |
OTU.27 | Alphaproteobacteria | Proteobacteria | Rubellimicrobium | Rhodobacteraceae | Rhodobacterales | 0.0726987971324522 | |
OTU.271 | Candidatus_Chloracidobacterium | Acidobacteria | unassigned | unassigned | uncultured_bacterium | 0.4273722181416 | |
OTU.273 | Cytophagia | Bacteroidetes | Fibrella | Cytophagaceae | Cytophagales | -0.24574410875310998 | |
OTU.277 | Gemmatimonadales | Gemmatimonadetes | uncultured_bacterium | uncultured | Gemmatimonadaceae | -0.750275742028187 | |
OTU.2771 | Gammaproteobacteria | Proteobacteria | Stenotrophomonas | Xanthomonadaceae | Xanthomonadales | 1.4009354082273302 | |
OTU.278 | Clostridia | Firmicutes | Symbiobacterium | Family_XVIII_Incertae_Sedis | Clostridiales | 2.50542961886142 | |
OTU.28 | Thermomicrobia | Chloroflexi | unassigned | unassigned | JG30-KF-CM45 | 0.612229509761058 | |
OTU.280 | Alphaproteobacteria | Proteobacteria | unassigned | unassigned | Rhizobiales | -0.29658380806209306 | |
OTU.282 | Corynebacteriales | Actinobacteria | unassigned | Rhodococcus | Nocardiaceae | 1.0825065347652 | |
OTU.2833 | Rubrobacteria | Actinobacteria | Rubrobacter | Rubrobacteriaceae | Rubrobacterales | -0.44070997508581 | |
OTU.285 | Frankiales | Actinobacteria | unassigned | Geodermatophilus | Geodermatophilaceae | 0.0667459824315188 | |
OTU.2857 | Alphaproteobacteria | Proteobacteria | Sphingomonas | Sphingomonadaceae | Sphingomonadales | -0.536712496524034 | |
OTU.29 | Betaproteobacteria | Proteobacteria | uncultured | Comamonadaceae | Burkholderiales | -0.6274314686341089 | |
OTU.290 | Cytophagia | Bacteroidetes | uncultured | Cytophagaceae | Cytophagales | 0.9834936944462509 | |
OTU.3 | Bacilli | Firmicutes | unassigned | Bacillaceae | Bacillales | 1.1594799036911299 | |
OTU.30 | AKIW781 | Chloroflexi | unassigned | unassigned | unassigned | -1.2789185528780902 | |
OTU.300 | SubsectionII | Cyanobacteria | uncultured_bacterium | Chroococcidiopsis | FamilyII | -1.4096435534097902 | |
OTU.303 | Frankiales | Actinobacteria | uncultured_bacterium | Modestobacter | Geodermatophilaceae | -0.7622013804307529 | |
OTU.3049 | SubsectionIII | Cyanobacteria | unassigned | Microcoleus | FamilyI | -0.0262898701131294 | |
OTU.306 | Flavobacteria | Bacteroidetes | Flavobacterium | Flavobacteriaceae | Flavobacteriales | -0.5157174942732929 | |
OTU.308 | Bacilli | Firmicutes | Tumebacillus | Alicyclobacillaceae | Bacillales | -0.365711426842449 | |
OTU.3097 | SubsectionIII | Cyanobacteria | unassigned | unassigned | FamilyI | 0.0159410911778563 | |
OTU.31 | uncultured_bacterium | Armatimonadetes | unassigned | unassigned | unassigned | -0.5749968735831129 | |
OTU.310 | Sphingobacteriia | Bacteroidetes | Flavisolibacter | Chitinophagaceae | Sphingobacteriales | -2.02940920363464 | |
OTU.311 | AKIW781 | Chloroflexi | unassigned | unassigned | uncultured_Chloroflexi_bacterium | -0.926878068786256 | |
OTU.3118 | Alphaproteobacteria | Proteobacteria | Craurococcus | Acetobacteraceae | Rhodospirillales | -0.356644672406111 | |
OTU.316 | Alphaproteobacteria | Proteobacteria | uncultured_bacterium | JG34-KF-161 | Sphingomonadales | -0.586153777487027 | |
OTU.3168 | Rubrobacteria | Actinobacteria | Rubrobacter | Rubrobacteriaceae | Rubrobacterales | 0.737158942705915 | |
OTU.317 | Alphaproteobacteria | Proteobacteria | unassigned | unassigned | Rhizobiales | -0.30137367379766805 | |
OTU.3209 | Rubrobacteria | Actinobacteria | Rubrobacter | Rubrobacteriaceae | Rubrobacterales | -1.0028599085743002 | |
OTU.321 | Gammaproteobacteria | Proteobacteria | Stenotrophomonas | Xanthomonadaceae | Xanthomonadales | 3.27644485676445 | |
OTU.326 | Chlorobia | Chlorobi | uncultured_bacterium | OPB56 | Chlorobiales | 0.8499783028597769 | |
OTU.327 | Clostridia | Firmicutes | Clostridium | Clostridiaceae | Clostridiales | 1.95390353073878 | |
OTU.328 | Sphingobacteriia | Bacteroidetes | Flavisolibacter | Chitinophagaceae | Sphingobacteriales | 0.862531014980462 | |
OTU.33 | SubsectionIII | Cyanobacteria | unassigned | unassigned | FamilyI | -0.15397186845554997 | |
OTU.330 | Clostridia | Firmicutes | Clostridium | Clostridiaceae | Clostridiales | 3.08861585982166 | |
OTU.3329 | Alphaproteobacteria | Proteobacteria | Rubellimicrobium | Rhodobacteraceae | Rhodobacterales | 0.24884851346893602 | |
OTU.3334 | Alphaproteobacteria | Proteobacteria | Sphingomonas | Sphingomonadaceae | Sphingomonadales | -0.17578005329003699 | |
OTU.334 | Kineosporiales | Actinobacteria | unassigned | unassigned | Kineosporiaceae | -0.124869193173127 | |
OTU.335 | Alphaproteobacteria | Proteobacteria | Sphingomonas | Sphingomonadaceae | Sphingomonadales | -1.03772997958959 | |
OTU.336 | Thermoleophilia | Actinobacteria | unassigned | unassigned | Solirubrobacterales | 0.9120805735748051 | |
OTU.3364 | RB41 | Acidobacteria | unassigned | unassigned | uncultured_bacterium | -0.7432891786153321 | |
OTU.337 | unassigned | unassigned | unassigned | unassigned | unassigned | -1.01962752810133 | |
OTU.34 | uncultured_bacterium | Armatimonadetes | unassigned | unassigned | unassigned | -0.45044154175653495 | |
OTU.342 | Gammaproteobacteria | Proteobacteria | unassigned | Moraxellaceae | Pseudomonadales | 1.99348002952889 | |
OTU.343 | Propionibacteriales | Actinobacteria | unassigned | Marmoricola | Nocardioidaceae | 0.43678018253396705 | |
OTU.3439 | Frankiales | Actinobacteria | unassigned | Blastococcus | Geodermatophilaceae | -0.108322613299562 | |
OTU.3454 | Alphaproteobacteria | Proteobacteria | uncultured_endolithic_bacterium | JG34-KF-361 | Rhizobiales | -0.944912490031673 | |
OTU.348 | Frankiales | Actinobacteria | unassigned | uncultured_bacterium | uncultured | -0.0561270502788235 | |
OTU.35 | uncultured | Cyanobacteria | unassigned | unassigned | uncultured_bacterium | -0.9908246750753922 | |
OTU.3512 | Frankiales | Actinobacteria | unassigned | Geodermatophilus | Geodermatophilaceae | 0.0959684240709548 | |
OTU.355 | Alphaproteobacteria | Proteobacteria | Bosea | Bradyrhizobiaceae | Rhizobiales | -0.8746168355341619 | |
OTU.357 | RB41 | Acidobacteria | unassigned | unassigned | uncultured_bacterium | 1.1300599587587201 | |
OTU.358 | AKIW781 | Chloroflexi | unassigned | unassigned | uncultured_bacterium | 0.5859032597203979 | |
OTU.3636 | Alphaproteobacteria | Proteobacteria | Sphingomonas | Sphingomonadaceae | Sphingomonadales | 0.0459107877837019 | |
OTU.367 | Thermoleophilia | Actinobacteria | Solirubrobacter | Solirubrobacteraceae | Solirubrobacterales | -0.350487373129088 | |
OTU.3694 | Alphaproteobacteria | Proteobacteria | Azospirillum | Rhodospirillaceae | Rhodospirillales | 0.160414812063523 | |
OTU.37 | Clostridia | Firmicutes | Clostridium | Clostridiaceae | Clostridiales | 1.1518080814434 | |
OTU.370 | Alphaproteobacteria | Proteobacteria | Afifella | Rhodobiaceae | Rhizobiales | -0.448935310204375 | |
OTU.3712 | Clostridia | Firmicutes | Clostridium | Clostridiaceae | Clostridiales | 1.2796434031588702 | |
OTU.372 | Verrucomicrobiae | Verrucomicrobia | uncultured | Verrucomicrobiaceae | Verrucomicrobiales | -0.0928178018116085 | |
OTU.3755 | Alphaproteobacteria | Proteobacteria | Sphingomonas | Sphingomonadaceae | Sphingomonadales | 0.500983802409275 | |
OTU.38 | Frankiales | Actinobacteria | unassigned | Geodermatophilus | Geodermatophilaceae | 0.17913727899932802 | |
OTU.3814 | Alphaproteobacteria | Proteobacteria | Bosea | Bradyrhizobiaceae | Rhizobiales | -0.662898403569163 | |
OTU.388 | Thermoleophilia | Actinobacteria | uncultured_microorganism | 480-2 | Solirubrobacterales | 0.9833636284361729 | |
OTU.39 | Alphaproteobacteria | Proteobacteria | Craurococcus | Acetobacteraceae | Rhodospirillales | 0.414578821921815 | |
OTU.390 | Alphaproteobacteria | Proteobacteria | Sphingobium | Sphingomonadaceae | Sphingomonadales | -0.193348710532073 | |
OTU.4 | Alphaproteobacteria | Proteobacteria | unassigned | JG34-KF-161 | Sphingomonadales | 0.32438582317796505 | |
OTU.402 | Phycisphaerae | Planctomycetes | unassigned | uncultured_bacterium | WD2101_soil_group | -1.27251447184163 | |
OTU.4037 | Clostridia | Firmicutes | uncultured | Clostridiaceae | Clostridiales | 2.12116815030846 | |
OTU.4048 | Gammaproteobacteria | Proteobacteria | Pantoea | Enterobacteriaceae | Enterobacteriales | 1.4178241807628402 | |
OTU.405 | Alphaproteobacteria | Proteobacteria | Roseomonas | Acetobacteraceae | Rhodospirillales | -0.0597984536160447 | |
OTU.408 | Alphaproteobacteria | Proteobacteria | Methylobacterium | Methylobacteriaceae | Rhizobiales | -1.22112280836731 | |
OTU.41 | Deltaproteobacteria | Proteobacteria | uncultured | Cystobacterineae | Myxococcales | 0.6352602617576739 | |
OTU.4112 | RB41 | Acidobacteria | unassigned | unassigned | uncultured_bacterium | -0.356122083440099 | |
OTU.4113 | Betaproteobacteria | Proteobacteria | Massilia | Oxalobacteraceae | Burkholderiales | -0.4700467369912171 | |
OTU.4126 | Clostridia | Firmicutes | unassigned | Clostridiaceae | Clostridiales | 0.0397285697447295 | |
OTU.4136 | Clostridia | Firmicutes | Clostridium | Clostridiaceae | Clostridiales | 0.0317551470844473 | |
OTU.4143 | Alphaproteobacteria | Proteobacteria | Rubellimicrobium | Rhodobacteraceae | Rhodobacterales | 0.291397672346646 | |
OTU.416 | Deltaproteobacteria | Proteobacteria | Geobacter | Geobacteraceae | Desulfuromonadales | 1.5921027286368001 | |
OTU.4167 | Clostridia | Firmicutes | uncultured | Clostridiaceae | Clostridiales | 2.1514931233233403 | |
OTU.4181 | Alphaproteobacteria | Proteobacteria | Azospirillum | Rhodospirillaceae | Rhodospirillales | -0.521326469489329 | |
OTU.4193 | Alphaproteobacteria | Proteobacteria | Rubellimicrobium | Rhodobacteraceae | Rhodobacterales | 0.18404892313461496 | |
OTU.42 | Frankiales | Actinobacteria | unassigned | Blastococcus | Geodermatophilaceae | 0.0168851233520083 | |
OTU.420 | Armatimonadia | Armatimonadetes | unassigned | uncultured_bacterium | Armatimonadales | -0.601489094500087 | |
OTU.422 | Sphingobacteriia | Bacteroidetes | Flavisolibacter | Chitinophagaceae | Sphingobacteriales | 0.267415689803138 | |
OTU.4220 | Betaproteobacteria | Proteobacteria | Ramlibacter | Comamonadaceae | Burkholderiales | -0.34333115379312 | |
OTU.427 | Spartobacteria | Verrucomicrobia | unassigned | unassigned | unassigned | 0.513428743433206 | |
OTU.4322 | Betaproteobacteria | Proteobacteria | unassigned | Oxalobacteraceae | Burkholderiales | 0.250979882608993 | |
OTU.442 | Alphaproteobacteria | Proteobacteria | Sphingomonas | Sphingomonadaceae | Sphingomonadales | 0.15784233385598 | |
OTU.444 | DA023 | Acidobacteria | unassigned | unassigned | uncultured_Acidobacteria_bacterium | 1.1075558763524098 | |
OTU.449 | Frankiales | Actinobacteria | unassigned | uncultured | Sporichthyaceae | 0.412640201737537 | |
OTU.45 | Alphaproteobacteria | Proteobacteria | Microvirga | Methylobacteriaceae | Rhizobiales | 0.24699773043318302 | |
OTU.456 | Gitt-GS-136 | Chloroflexi | unassigned | unassigned | unassigned | 1.06989485571678 | |
OTU.465 | Cytophagia | Bacteroidetes | Hymenobacter | Cytophagaceae | Cytophagales | -0.751074168286514 | |
OTU.47 | Alphaproteobacteria | Proteobacteria | Sphingomonas | Sphingomonadaceae | Sphingomonadales | 0.0950074808742764 | |
OTU.471 | Deinococci | Deinococcus-Thermus | Deinococcus | Deinococcaceae | Deinococcales | -0.313363256404393 | |
OTU.479 | SubsectionII | Cyanobacteria | uncultured_bacterium | Chroococcidiopsis | FamilyII | -0.731488885501762 | |
OTU.49 | Alphaproteobacteria | Proteobacteria | uncultured_endolithic_bacterium | JG34-KF-361 | Rhizobiales | -0.235610850810333 | |
OTU.490 | Alphaproteobacteria | Proteobacteria | unassigned | Sphingomonadaceae | Sphingomonadales | 0.762388632727506 | |
OTU.496 | Rubrobacteria | Actinobacteria | Rubrobacter | Rubrobacteriaceae | Rubrobacterales | -0.133622688816485 | |
OTU.497 | Gammaproteobacteria | Proteobacteria | Lysobacter | Xanthomonadaceae | Xanthomonadales | -0.10885656699968 | |
OTU.50 | Rubrobacteria | Actinobacteria | Rubrobacter | Rubrobacteriaceae | Rubrobacterales | 0.120178774514248 | |
OTU.51 | Alphaproteobacteria | Proteobacteria | Devosia | Hyphomicrobiaceae | Rhizobiales | -0.45079083760391603 | |
OTU.513 | Acidimicrobiia | Actinobacteria | CL500-29_marine_group | Acidimicrobiaceae | Acidimicrobiales | 0.14429523969613597 | |
OTU.52 | SubsectionIII | Cyanobacteria | uncultured_cyanobacterium | Crinalium | FamilyI | 0.151830429304181 | |
OTU.529 | Betaproteobacteria | Proteobacteria | Limnobacter | Burkholderiaceae | Burkholderiales | 0.11095080972369198 | |
OTU.53 | Frankiales | Actinobacteria | unassigned | Geodermatophilus | Geodermatophilaceae | -0.0242498906599648 | |
OTU.535 | vadinHA49 | Planctomycetes | unassigned | unassigned | unassigned | 0.433225671595589 | |
OTU.54 | Gammaproteobacteria | Proteobacteria | Escherichia-Shigella | Enterobacteriaceae | Enterobacteriales | 3.15483696234873 | |
OTU.55 | Candidatus_Chloracidobacterium | Acidobacteria | unassigned | unassigned | unassigned | 1.57917802424808 | |
OTU.562 | SubsectionIII | Cyanobacteria | unassigned | Microcoleus | FamilyI | -0.0660100414222201 | |
OTU.564 | Alphaproteobacteria | Proteobacteria | Craurococcus | Acetobacteraceae | Rhodospirillales | -0.610903663529388 | |
OTU.57 | Clostridia | Firmicutes | uncultured | Clostridiaceae | Clostridiales | 1.38075796705778 | |
OTU.575 | Clostridia | Firmicutes | Lutispora | Gracilibacteraceae | Clostridiales | 1.83997007761102 | |
OTU.580 | Thermoleophilia | Actinobacteria | uncultured_actinobacterium | 0319-6M6 | Solirubrobacterales | -0.321609438437719 | |
OTU.583 | Gemmatimonadales | Gemmatimonadetes | unassigned | uncultured | Gemmatimonadaceae | -0.695678058375953 | |
OTU.586 | Betaproteobacteria | Proteobacteria | uncultured | Comamonadaceae | Burkholderiales | 2.5807595627108397 | |
OTU.6 | SubsectionIII | Cyanobacteria | unassigned | unassigned | FamilyI | -2.2929682617404397 | |
OTU.60 | Spartobacteria | Verrucomicrobia | Chthoniobacter | Chthoniobacteraceae | Chthoniobacterales | -0.243405174419105 | |
OTU.606 | Planctomycetacia | Planctomycetes | uncultured | Planctomycetaceae | Planctomycetales | 0.354121403321929 | |
OTU.61 | Clostridia | Firmicutes | Clostridium | Clostridiaceae | Clostridiales | 1.61162760306315 | |
OTU.618 | Clostridia | Firmicutes | uncultured | Clostridiaceae | Clostridiales | 0.16918098103540802 | |
OTU.62 | Micromonosporales | Actinobacteria | unassigned | Actinoplanes | Micromonosporaceae | 0.45874219397 | |
OTU.628 | Alphaproteobacteria | Proteobacteria | Methylobacterium | Methylobacteriaceae | Rhizobiales | 1.3878655676336598 | |
OTU.63 | Alphaproteobacteria | Proteobacteria | Rubellimicrobium | Rhodobacteraceae | Rhodobacterales | 0.0772519638400044 | |
OTU.639 | Clostridia | Firmicutes | Symbiobacterium | Family_XVIII_Incertae_Sedis | Clostridiales | -1.24106461344425 | |
OTU.640 | Betaproteobacteria | Proteobacteria | Massilia | Oxalobacteraceae | Burkholderiales | -1.10037141215074 | |
OTU.643 | Clostridia | Firmicutes | Clostridium | Clostridiaceae | Clostridiales | 1.7732617683681202 | |
OTU.658 | Clostridia | Firmicutes | Incertae_Sedis | Ruminococcaceae | Clostridiales | 1.1382871535486498 | |
OTU.66 | SubsectionIII | Cyanobacteria | unassigned | Phormidium | FamilyI | -0.27478723391313997 | |
OTU.665 | Alphaproteobacteria | Proteobacteria | Sphingomonas | Sphingomonadaceae | Sphingomonadales | 0.629829706824417 | |
OTU.67 | Order_Incertae_Sedis | Acidobacteria | uncultured_bacterium | Bryobacter | Family_Incertae_Sedis | 0.38413902391294 | |
OTU.7 | SubsectionIII | Cyanobacteria | unassigned | unassigned | FamilyI | -1.14832752973395 | |
OTU.703 | Betaproteobacteria | Proteobacteria | unassigned | Oxalobacteraceae | Burkholderiales | -0.46132840041198103 | |
OTU.713 | Alphaproteobacteria | Proteobacteria | unassigned | Sphingomonadaceae | Sphingomonadales | -0.694275250075324 | |
OTU.72 | uncultured_bacterium | Armatimonadetes | unassigned | unassigned | unassigned | -0.283986642980653 | |
OTU.73 | Rubrobacteria | Actinobacteria | Rubrobacter | Rubrobacteriaceae | Rubrobacterales | 0.493823576358163 | |
OTU.730 | Propionibacteriales | Actinobacteria | unassigned | Nocardioides | Nocardioidaceae | -0.8903648124782071 | |
OTU.75 | Clostridia | Firmicutes | Clostridium | Clostridiaceae | Clostridiales | 1.2301063739178602 | |
OTU.77 | Gemmatimonadales | Gemmatimonadetes | uncultured_bacterium | uncultured | Gemmatimonadaceae | -0.37007210405744106 | |
OTU.772 | Sphingobacteriia | Bacteroidetes | Pedobacter | Sphingobacteriaceae | Sphingobacteriales | 0.544804473310597 | |
OTU.78 | Candidatus_Chloracidobacterium | Acidobacteria | unassigned | unassigned | uncultured_Acidobacteria_bacterium | 1.18451345176905 | |
OTU.8 | unassigned | unassigned | unassigned | unassigned | unassigned | 0.38633646993567494 | |
OTU.80 | Betaproteobacteria | Proteobacteria | unassigned | Oxalobacteraceae | Burkholderiales | -0.9393932014679609 | |
OTU.801 | Sphingobacteriia | Bacteroidetes | Flavisolibacter | Chitinophagaceae | Sphingobacteriales | 1.47808182440761 | |
OTU.81 | Alphaproteobacteria | Proteobacteria | unassigned | Bradyrhizobiaceae | Rhizobiales | 1.3782461782238302 | |
OTU.831 | Pseudonocardiales | Actinobacteria | unassigned | Actinomycetospora | Pseudonocardiaceae | 0.127645604188966 | |
OTU.85 | Frankiales | Actinobacteria | unassigned | uncultured_actinobacterium | uncultured | -0.161521527204604 | |
OTU.858 | Micrococcales | Actinobacteria | unassigned | unassigned | Intrasporangiaceae | 0.12003988529241001 | |
OTU.88 | Clostridia | Firmicutes | Symbiobacterium | Family_XVIII_Incertae_Sedis | Clostridiales | 2.05356950402764 | |
OTU.888 | Thermoleophilia | Actinobacteria | Solirubrobacter | Solirubrobacteraceae | Solirubrobacterales | 0.685712445718243 | |
OTU.9 | Alphaproteobacteria | Proteobacteria | Azospirillum | Rhodospirillaceae | Rhodospirillales | 0.557754235662693 | |
OTU.90 | Alphaproteobacteria | Proteobacteria | Methylobacterium | Methylobacteriaceae | Rhizobiales | -0.7045804716799009 | |
OTU.91 | Clostridia | Firmicutes | Clostridium | Clostridiaceae | Clostridiales | 1.36296201435869 | |
OTU.916 | Thermoleophilia | Actinobacteria | Solirubrobacter | Solirubrobacteraceae | Solirubrobacterales | -1.190753520253 | |
OTU.938 | Betaproteobacteria | Proteobacteria | Azoarcus | Rhodocyclaceae | Rhodocyclales | 1.6524035914913202 | |
OTU.943 | Sphingobacteriia | Bacteroidetes | Flavisolibacter | Chitinophagaceae | Sphingobacteriales | -0.390383949508764 | |
OTU.95 | Bacilli | Firmicutes | Sporosarcina | Planococcaceae | Bacillales | 0.533556003283699 | |
OTU.96 | Alphaproteobacteria | Proteobacteria | Methylobacterium | Methylobacteriaceae | Rhizobiales | -0.0907906541087509 | |
OTU.97 | Thermoleophilia | Actinobacteria | unassigned | unassigned | Solirubrobacterales | 1.3777292372918999 | |
OTU.987 | Alphaproteobacteria | Proteobacteria | unassigned | Methylobacteriaceae | Rhizobiales | 0.0876059011162944 | |
OTU.99 | Clostridia | Firmicutes | Symbiobacterium | Family_XVIII_Incertae_Sedis | Clostridiales | 0.41108154481997206 | |
OTU.999 | Betaproteobacteria | Proteobacteria | unassigned | Oxalobacteraceae | Burkholderiales | 1.3918010221489798 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<style> | |
.axis path { | |
stroke: black; | |
shape-rendering: crispEdges; | |
stroke-width: 2.5; | |
} | |
.axis line { | |
shape-rendering: crispEdges; | |
stroke: lightgrey; | |
} | |
.axis text { | |
font-size: 22px; | |
font-family: sans-serif; | |
} | |
.point { | |
fill: black; | |
fill-opacity: 0.25; | |
stroke: black; | |
stroke-opacity: 1.0; | |
} | |
.point.unselected { | |
fill: black; | |
fill-opacity: 0.25; | |
stroke: black; | |
stroke-opacity: 1.0; | |
} | |
.point.selected { | |
fill: red; | |
stroke: red; | |
fill-opacity: 0.55; | |
stroke-opacity: 1.00; | |
} | |
.brush { | |
stroke: none; | |
fill: none; | |
} | |
.button { | |
position: absolute; | |
display: block; | |
} | |
rect.background { | |
fill: white; | |
} | |
</style> | |
<svg class="chart"></svg> | |
</head> | |
<body> | |
<script src="http://d3js.org/d3.v3.min.js"></script> | |
<script src="scatter.js"></script> | |
</body> | |
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
margin = {top: 20, bottom : 225, left : 75, right : 50} | |
width = 700 - margin.left - margin.right | |
height = 625 - margin.top - margin.bottom | |
button = d3.select("body") | |
.append "div" | |
.attr "class", "button" | |
.style "top", "0px" | |
.style "left", (d) -> margin.left + width - margin.right + "px" | |
.append "button" | |
.attr "class", "button" | |
button.text "brush" | |
.style "font-size", "18px" | |
.style "font-family", "sans-serif" | |
chart = d3.select(".chart") | |
.attr "width", width + margin.left + margin.right | |
.attr "height", height + margin.top + margin.bottom | |
.append "g" | |
.attr "transform", "translate(" + margin.left + "," + margin.top + ")" | |
y = d3.scale.linear() | |
.range [height, 0] | |
yAxis = d3.svg.axis() | |
.scale y | |
.orient "left" | |
.tickSize -width, 0, 0 | |
x = d3.scale.ordinal() | |
xAxis = d3.svg.axis() | |
.scale x | |
.orient "bottom" | |
.tickSize -height, 0, 0 | |
type = (d) -> | |
d.log2FoldChange = +d.log2FoldChange | |
d | |
dataset = null | |
ranks = ["Rank2", "Rank3", "Rank4", "Rank5", "Rank6"] | |
iRank = 0 | |
filterTaxon = -1 | |
previousFilterTaxon = null | |
selected = [] | |
console.log(ranks[iRank]) | |
sign = () -> if Math.random() < 0.5 then -1 else 1 | |
jitter = () -> sign() * Math.random() * 7.5 | |
d3.csv("readme.csv", type, (data) -> | |
pad = 0.25 | |
y.domain [d3.min(data, (d) -> d.log2FoldChange) - 0.5, | |
d3.max(data, (d) -> d.log2FoldChange) + 0.5] | |
bg = chart.append "rect" | |
.attr "class", "background" | |
.attr "width", width | |
.attr "height", height | |
ylabel = chart | |
.append "g" | |
.attr "class", "y axis" | |
.call yAxis | |
chart | |
.append "g" | |
.attr "class", "x axis" | |
.attr "transform", () -> "translate(0," + height + ")" | |
ylabel.append("text") | |
.attr "text-anchor", "middle" | |
.attr "x", -height / 2 | |
.attr "y", -margin.left / 3 | |
.attr "transform", "rotate(-90)" | |
.html "log₂ FoldChange" | |
update = () -> | |
xRank = ranks[iRank] | |
if filterTaxon == -1 | |
d = data | |
else | |
d = data.filter (d) -> d[ranks[iRank - 1]] == filterTaxon | |
dNest= d3.nest() | |
.key (e) -> e[xRank] | |
.rollup (e) -> {MAX:d3.max(e, (g) -> g.log2FoldChange)} | |
.entries d | |
sorted = dNest.sort (a, b) -> d3.descending(a.values.MAX, b.values.MAX) | |
domainValues = d3.set sorted.map (e) -> e.key | |
x.rangeRoundPoints [0, width], 1.5 | |
.domain(domainValues.values()) | |
chart.select(".x.axis") | |
.transition().duration(500) | |
.call xAxis | |
.selectAll "text" | |
.style "text-anchor", "end" | |
.style "font-style", "italic" | |
.attr "dx", "-1.0em" | |
.attr "dy", "0.5em" | |
.attr "x", 9 | |
.attr "transform", "rotate(-60)" | |
p = chart.selectAll(".point") | |
.data d, (d) -> d.OTU | |
p.transition().duration(500) | |
.attr "cx", (d) -> x(d[xRank]) + jitter() | |
.attr "id", (d) -> d[xRank] | |
p.enter().append "circle" | |
.attr "class", "point" | |
.attr "cy", (d) -> y(d.log2FoldChange) | |
.attr "cx", (d) -> x(d[xRank]) + jitter() | |
.attr "id", (d) -> d[xRank] | |
.attr "r", 0 | |
.transition().duration 500 | |
.attr "r", 4 | |
p.exit() | |
.transition().duration 500 | |
.attr "r", 0 | |
.remove() | |
p.on "click", () -> | |
if iRank == ranks.length | |
return | |
else if d3.select(this).attr("id") in ["undefined","uncultured","unassigned"] | |
return | |
else | |
++iRank | |
selected.unshift(filterTaxon) | |
filterTaxon = d3.select(this).attr("id") | |
console.log(iRank) | |
console.log(selected) | |
update() | |
#update data.filter((d) -> d["Rank2"] == "Cyanobacteria") | |
update() | |
bg.on "click", () -> | |
if iRank == 0 | |
filterTaxon = -1 | |
update() | |
return | |
else | |
--iRank | |
i = selected.lastIndexOf(filterTaxon) | |
console.log(i) | |
filterTaxon = selected[i + 1] | |
console.log(iRank) | |
console.log(filterTaxon) | |
update() | |
line = chart | |
.append "line" | |
.attr "x1", 0 | |
.attr "x2", width | |
.attr "y1", y(0) | |
.attr "y2", y(0) | |
.attr "stroke", "blue" | |
.style "stroke-width", 4 | |
brushmove = () -> | |
e = brush.extent(); | |
chart | |
.selectAll ".point" | |
.classed "unselected", (d) -> | |
e[0][0] > x(d[ranks[iRank]]) \ | |
or x(d[ranks[iRank]]) > e[1][0] \ | |
or e[0][1] > d.log2FoldChange \ | |
or d.log2FoldChange > e[1][1] | |
chart | |
.selectAll ".point" | |
.classed "selected", (d) -> | |
e[0][0] < x(d[ranks[iRank]]) \ | |
and x(d[ranks[iRank]]) < e[1][0] \ | |
and e[0][1] < d.log2FoldChange \ | |
and d.log2FoldChange < e[1][1] | |
brushend = () -> | |
chart | |
.selectAll ".unselected" | |
.classed "unselected", false if brush.empty() | |
brush = d3.svg.brush() | |
.x x | |
.y y | |
.on "brush", brushmove | |
.on "brushend", brushend | |
chart | |
.append "g" | |
.attr "class", "brush" | |
.call brush | |
button.on "click", () -> | |
v = d3.select(".brush").style("display") | |
console.log v | |
if v == "inline" | |
d3.select ".brush" | |
.style "display", "none" | |
else | |
d3.select ".brush" | |
.style "display", "inline" | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Generated by CoffeeScript 1.8.0 | |
var button, chart, dataset, filterTaxon, height, iRank, jitter, margin, previousFilterTaxon, ranks, selected, sign, type, width, x, xAxis, y, yAxis; | |
margin = { | |
top: 20, | |
bottom: 225, | |
left: 75, | |
right: 50 | |
}; | |
width = 700 - margin.left - margin.right; | |
height = 625 - margin.top - margin.bottom; | |
button = d3.select("body").append("div").attr("class", "button").style("top", "0px").style("left", function(d) { | |
return margin.left + width - margin.right + "px"; | |
}).append("button").attr("class", "button"); | |
button.text("brush").style("font-size", "18px").style("font-family", "sans-serif"); | |
chart = d3.select(".chart").attr("width", width + margin.left + margin.right).attr("height", height + margin.top + margin.bottom).append("g").attr("transform", "translate(" + margin.left + "," + margin.top + ")"); | |
y = d3.scale.linear().range([height, 0]); | |
yAxis = d3.svg.axis().scale(y).orient("left").tickSize(-width, 0, 0); | |
x = d3.scale.ordinal(); | |
xAxis = d3.svg.axis().scale(x).orient("bottom").tickSize(-height, 0, 0); | |
type = function(d) { | |
d.log2FoldChange = +d.log2FoldChange; | |
return d; | |
}; | |
dataset = null; | |
ranks = ["Rank2", "Rank3", "Rank4", "Rank5", "Rank6"]; | |
iRank = 0; | |
filterTaxon = -1; | |
previousFilterTaxon = null; | |
selected = []; | |
console.log(ranks[iRank]); | |
sign = function() { | |
if (Math.random() < 0.5) { | |
return -1; | |
} else { | |
return 1; | |
} | |
}; | |
jitter = function() { | |
return sign() * Math.random() * 7.5; | |
}; | |
d3.csv("readme.csv", type, function(data) { | |
var bg, brush, brushend, brushmove, line, pad, update, ylabel; | |
pad = 0.25; | |
y.domain([ | |
d3.min(data, function(d) { | |
return d.log2FoldChange; | |
}) - 0.5, d3.max(data, function(d) { | |
return d.log2FoldChange; | |
}) + 0.5 | |
]); | |
bg = chart.append("rect").attr("class", "background").attr("width", width).attr("height", height); | |
ylabel = chart.append("g").attr("class", "y axis").call(yAxis); | |
chart.append("g").attr("class", "x axis").attr("transform", function() { | |
return "translate(0," + height + ")"; | |
}); | |
ylabel.append("text").attr("text-anchor", "middle").attr("x", -height / 2).attr("y", -margin.left / 3).attr("transform", "rotate(-90)").html("log₂ FoldChange"); | |
update = function() { | |
var d, dNest, domainValues, p, sorted, xRank; | |
xRank = ranks[iRank]; | |
if (filterTaxon === -1) { | |
d = data; | |
} else { | |
d = data.filter(function(d) { | |
return d[ranks[iRank - 1]] === filterTaxon; | |
}); | |
} | |
dNest = d3.nest().key(function(e) { | |
return e[xRank]; | |
}).rollup(function(e) { | |
return { | |
MAX: d3.max(e, function(g) { | |
return g.log2FoldChange; | |
}) | |
}; | |
}).entries(d); | |
sorted = dNest.sort(function(a, b) { | |
return d3.descending(a.values.MAX, b.values.MAX); | |
}); | |
domainValues = d3.set(sorted.map(function(e) { | |
return e.key; | |
})); | |
x.rangeRoundPoints([0, width], 1.5).domain(domainValues.values()); | |
chart.select(".x.axis").transition().duration(500).call(xAxis).selectAll("text").style("text-anchor", "end").style("font-style", "italic").attr("dx", "-1.0em").attr("dy", "0.5em").attr("x", 9).attr("transform", "rotate(-60)"); | |
p = chart.selectAll(".point").data(d, function(d) { | |
return d.OTU; | |
}); | |
p.transition().duration(500).attr("cx", function(d) { | |
return x(d[xRank]) + jitter(); | |
}).attr("id", function(d) { | |
return d[xRank]; | |
}); | |
p.enter().append("circle").attr("class", "point").attr("cy", function(d) { | |
return y(d.log2FoldChange); | |
}).attr("cx", function(d) { | |
return x(d[xRank]) + jitter(); | |
}).attr("id", function(d) { | |
return d[xRank]; | |
}).attr("r", 0).transition().duration(500).attr("r", 4); | |
p.exit().transition().duration(500).attr("r", 0).remove(); | |
return p.on("click", function() { | |
var _ref; | |
if (iRank === ranks.length) { | |
return; | |
} else if ((_ref = d3.select(this).attr("id")) === "undefined" || _ref === "uncultured" || _ref === "unassigned") { | |
return; | |
} else { | |
++iRank; | |
} | |
selected.unshift(filterTaxon); | |
filterTaxon = d3.select(this).attr("id"); | |
console.log(iRank); | |
console.log(selected); | |
return update(); | |
}); | |
}; | |
update(); | |
bg.on("click", function() { | |
var i; | |
if (iRank === 0) { | |
filterTaxon = -1; | |
update(); | |
return; | |
} else { | |
--iRank; | |
i = selected.lastIndexOf(filterTaxon); | |
console.log(i); | |
filterTaxon = selected[i + 1]; | |
} | |
console.log(iRank); | |
console.log(filterTaxon); | |
return update(); | |
}); | |
line = chart.append("line").attr("x1", 0).attr("x2", width).attr("y1", y(0)).attr("y2", y(0)).attr("stroke", "blue").style("stroke-width", 4); | |
brushmove = function() { | |
var e; | |
e = brush.extent(); | |
chart.selectAll(".point").classed("unselected", function(d) { | |
return e[0][0] > x(d[ranks[iRank]]) || x(d[ranks[iRank]]) > e[1][0] || e[0][1] > d.log2FoldChange || d.log2FoldChange > e[1][1]; | |
}); | |
return chart.selectAll(".point").classed("selected", function(d) { | |
return e[0][0] < x(d[ranks[iRank]]) && x(d[ranks[iRank]]) < e[1][0] && e[0][1] < d.log2FoldChange && d.log2FoldChange < e[1][1]; | |
}); | |
}; | |
brushend = function() { | |
if (brush.empty()) { | |
return chart.selectAll(".unselected").classed("unselected", false); | |
} | |
}; | |
brush = d3.svg.brush().x(x).y(y).on("brush", brushmove).on("brushend", brushend); | |
chart.append("g").attr("class", "brush").call(brush); | |
return button.on("click", function() { | |
var v; | |
v = d3.select(".brush").style("display"); | |
console.log(v); | |
if (v === "inline") { | |
return d3.select(".brush").style("display", "none"); | |
} else { | |
return d3.select(".brush").style("display", "inline"); | |
} | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment