Scott Cain's website

Bioinformatics, Perl, Cool Stuff
Powered by Drupal, an open source content management system

Email: sco...@scottcain.net

Bio

Jupiter’s Super-Weird Atmosphere Is Astonishing Scientists

Wired Science - 7 hours 57 min ago
Jupiter’s Super-Weird Atmosphere Is Astonishing ScientistsJupiter's atmosphere defies all scientific expectations. The post Jupiter’s Super-Weird Atmosphere Is Astonishing Scientists appeared first on WIRED.
Categories: Bio

Trump’s Budget Forgets That Science Is Insurance for America

Wired Science - 14 hours 57 min ago
Trump’s Budget Forgets That Science Is Insurance for AmericaThe President's proposed budget guts scientific research and protection, because it either doesn't know what science is for, or doesn't care. The post Trump’s Budget Forgets That Science Is Insurance for America appeared first on WIRED.
Categories: Bio

JBrowse Configuration Guide

GMOD.org recent changes - Thu, 05/25/2017 - 02:23

‎Making a New JBrowse

← Older revision Revision as of 06:23, 25 May 2017 (One intermediate revision by the same user not shown)Line 26: Line 26:        sudo apt-get install zlib1g-dev libpng-dev libgd2-noxpm-dev build-essential    sudo apt-get install zlib1g-dev libpng-dev libgd2-noxpm-dev build-essential  +  +Some other things that sometimes need to be manually installed if your setup.sh is failing includes these  +  +  sudo apt-get install libexpat-dev libxml2-dev libdb-dev     If you need a web server you can add apache2 to the list If you need a web server you can add apache2 to the list Line 3,030: Line 3,034:  * Add (or remove) options in the JBrowse dropdown menus. * Add (or remove) options in the JBrowse dropdown menus.  * Add new types of track selectors. * Add new types of track selectors.  +  +  +Also see this FAQ entry http://gmod.org/wiki/JBrowse_FAQ#How_do_I_create_a_plugin.3F and http://gmod.org/wiki/JBrowse_FAQ#What_is_a_plugin_useful_for.3F     === Plugin Components === === Plugin Components === Colin Diesh
Categories: Bio

This New Goldilocks Rocket Is Juuust Right for Small Satellites

Wired Science - Thu, 05/25/2017 - 00:45
This New Goldilocks Rocket Is Juuust Right for Small SatellitesRocket Lab's Electron is set to become the first launcher made for, and for sale to, small satellite startups. The post This New Goldilocks Rocket Is Juuust Right for Small Satellites appeared first on WIRED.
Categories: Bio

JBrowse Configuration Guide

GMOD.org recent changes - Wed, 05/24/2017 - 15:53

← Older revision Revision as of 19:53, 24 May 2017 Line 3,030: Line 3,030:  * Add (or remove) options in the JBrowse dropdown menus. * Add (or remove) options in the JBrowse dropdown menus.  * Add new types of track selectors. * Add new types of track selectors.  +  +  +Also see this FAQ entry http://gmod.org/wiki/JBrowse_FAQ#How_do_I_create_a_plugin.3F and http://gmod.org/wiki/JBrowse_FAQ#What_is_a_plugin_useful_for.3F     === Plugin Components === === Plugin Components === Colin Diesh
Categories: Bio

JBrowse FAQ

GMOD.org recent changes - Wed, 05/24/2017 - 15:36

← Older revision Revision as of 19:36, 24 May 2017 (One intermediate revision by the same user not shown)Line 651: Line 651:     Check out the genes store class from the myvariantviewer plugin for an example of a simple custom adaptor https://github.com/cmdcolin/myvariantviewer/blob/master/js/Store/SeqFeature/Genes.js Check out the genes store class from the myvariantviewer plugin for an example of a simple custom adaptor https://github.com/cmdcolin/myvariantviewer/blob/master/js/Store/SeqFeature/Genes.js  +  +  +  +== What is a plugin useful for? ==  +  +A JBrowse plugin can do a wide variety of things. Some common use-cases would be  +  +* making a custom track type or visualization  +* making an adapter for a new file type or "store class"  +* adding new pieces to the user interface  +  +Other things that are extensible include  +  +* accessing custom search backends (the so called "Names API")  +* accessing custom filter functions https://github.com/cmdcolin/filterplugin  +* making custom "Save track data" export formats  +  +One cool thing is that when you create a plugin, you can simply reference it textually in your config file e.g. trackList.json, and then JBrowse will load the "class" from your plugin and initialize it  +  +== What background should I have for creating a plugin ==  +  +  +Make sure to review this link describing dojo declare, the way dojo declares new object types http://dojotoolkit.org/reference-guide/1.10/dojo/_base/declare.html  +  +Also review http://dojotoolkit.org/documentation/tutorials/1.9/modules/  +  +Understanding "*dojo declare*" and *asynchronous module definition (AMD)* will help you understand the “preamble” on the top of every file that jbrowse uses, and which you can use in your plugin  +  +  +== How do I create a plugin? ==  +  +Let's walk through a simple plugin with the goal of adding something to the track menu (e.g. where the "About this track" and "Save track data" options are)  +  +To do this, we can use object- oriented principles to “inherit” from some existing track type like CanvasFeatures and then extend its functionality by overriding the functions in a new track type  +  +  +We can inherit a new track type by using the “define” function to include the dependencies needed in a file, and they are listed in an array at the top of your file.  +  +First initialize a new plugin using  +  + bin/new-plugin.pl MyPlugin  +  +Then edit a new file, say plugins/MyPlugin/js/MyTrack.js  +  +  + define( ["dojo/_base/declare", "JBrowse/View/Track/CanvasFeatures"],  +    function(declare,CanvasFeatures) {  +    return declare(CanvasFeatures, {  +        _trackMenuOptions: function() {  +  +            var opts=this.inherited(arguments); //call the parent classes function  +            opts.push( // add an extra menu item to the array returned from parent class function  +                {         +                    label: "Custom item",  +                    type: 'dijit/CheckedMenuItem',  +                    onClick: function(event) {  +                        console.log('Clicked');  +                    },   +                    iconClass: "dijitIconPackage"  +                }   +            );   +            return opts;  +        }   +    });  +    }   + );  +  +Code listing 1. an example custom track type, plugin/MyPlugin/js/MyTrack.js, that adds an extra track menu item  +  +  +  +After this, we will have the plugin directory structure like this  +  + jbrowse/plugins/MyPlugin  + jbrowse/plugins/MyPlugin/js  + jbrowse/plugins/MyPlugin/js/main.js  + jbrowse/plugins/MyPlugin/js/MyTrack.js  +  +The bin/new-plugin.pl helps create the skeleton main.js  +  +Then we can use our new plugin to a config file like jbrowse_conf.json as "plugins": ["MyPlugin"]  +  +  +Then edit the trackList.json for an existing track and change `"type":  "CanvasFeatures"` to `"type": "MyPlugin/MyTrack"`.  +  +That will tell jbrowse to load the MyTrack class from your plugin instead of the normal CanvasFeatures class.       Line 915: Line 1,001:     In general, using normal commands like flatfile-to-json, prepare-refseqs, etc work fine though. See setup.sh for how the volvox sample data combines using biodb-to-json and other techniques. In general, using normal commands like flatfile-to-json, prepare-refseqs, etc work fine though. See setup.sh for how the volvox sample data combines using biodb-to-json and other techniques.  +  +     = Visualization tips = = Visualization tips = Colin Diesh
Categories: Bio

Cool Spacewalk, Right? Get Ready for More—ISS Will Need Fixin’

Wired Science - Wed, 05/24/2017 - 13:01
Cool Spacewalk, Right? Get Ready for More—ISS Will Need Fixin’Tuesday's contingency spacewalk could signal the beginning of more frequent repairs on the aging space station The post Cool Spacewalk, Right? Get Ready for More—ISS Will Need Fixin' appeared first on WIRED.
Categories: Bio

Virus Hunters Draw a Map of Zika’s Spread With DNA

Wired Science - Wed, 05/24/2017 - 13:00
Virus Hunters Draw a Map of Zika’s Spread With DNAAccording to new genetic evidence, public health efforts to contain and fight the disease could have—and should have—gotten started much sooner. The post Virus Hunters Draw a Map of Zika's Spread With DNA appeared first on WIRED.
Categories: Bio

The Tricky Ethics of Big Pharma Soft-Selling on Soap Operas

Wired Science - Wed, 05/24/2017 - 09:30
The Tricky Ethics of Big Pharma Soft-Selling on Soap OperasMedical professionals have raised concerns about whether General Hospital's plotline blurred the lines between disease awareness and advertisement. The post The Tricky Ethics of Big Pharma Soft-Selling on Soap Operas appeared first on WIRED.
Categories: Bio

Why Are Whales So Dang Big? Science May Finally Have an Answer

Wired Science - Tue, 05/23/2017 - 19:00
Why Are Whales So Dang Big? Science May Finally Have an AnswerBaleen whales probably only grew colossal some 3 million years ago, and it was probably climate change that triggered the transformation. The post Why Are Whales So Dang Big? Science May Finally Have an Answer appeared first on WIRED.
Categories: Bio

A Physicist Breaks Down One of Roger Moore’s Iconic Bond Stunts

Wired Science - Tue, 05/23/2017 - 18:07
A Physicist Breaks Down One of Roger Moore’s Iconic Bond StuntsOur resident expert examines Bond's wild skydive in 'Moonraker.' The post A Physicist Breaks Down One of Roger Moore's Iconic Bond Stunts appeared first on WIRED.
Categories: Bio

The US Lags Behind in Meteorology. Under Trump, It May Get Worse

Wired Science - Tue, 05/23/2017 - 14:19
The US Lags Behind in Meteorology. Under Trump, It May Get WorseAs the White House considers budget slashes and new leadership for NOAA, scientists worry our weather predictions will get even worse. The post The US Lags Behind in Meteorology. Under Trump, It May Get Worse appeared first on WIRED.
Categories: Bio

Let’s Explore the Physics of Rotational Motion With a Fidget Spinner

Wired Science - Tue, 05/23/2017 - 08:00
Let’s Explore the Physics of Rotational Motion With a Fidget SpinnerAmerica's latest fad provides yet another opportunity to explain physics. The post Let’s Explore the Physics of Rotational Motion With a Fidget Spinner appeared first on WIRED.
Categories: Bio

A Curious Plan to Save the Environment With the Blockchain

Wired Science - Mon, 05/22/2017 - 11:00
A Curious Plan to Save the Environment With the BlockchainAn ecologist argues that cryptographically-sealed databases could starve out inefficiencies that are ruining the environment. The post A Curious Plan to Save the Environment With the Blockchain appeared first on WIRED.
Categories: Bio

Medicine Is Going Digital. The FDA Is Racing to Catch Up

Wired Science - Mon, 05/22/2017 - 07:00
Medicine Is Going Digital. The FDA Is Racing to Catch UpThe regulatory agency for drugs and medical devices is creating a new unit dedicated strictly to digital health. The post Medicine Is Going Digital. The FDA Is Racing to Catch Up appeared first on WIRED.
Categories: Bio

In Defense of the Reality of Time

Wired Science - Sun, 05/21/2017 - 07:00
In Defense of the Reality of TimeTime isn't just another dimension, argues Tim Maudlin. To make his case, he's had to reinvent geometry. The post In Defense of the Reality of Time appeared first on WIRED.
Categories: Bio

Even If Dana Rohrabacher Was a Russian Asset, Would He Know?

Wired Science - Fri, 05/19/2017 - 21:24
Even If Dana Rohrabacher Was a Russian Asset, Would He Know?Congressman Dana Rohrabacher is totally onto the Russian spies trying to recruit him. But knowing he's a target doesn't necessarily protect him from their influence. The post Even If Dana Rohrabacher Was a Russian Asset, Would He Know? appeared first on WIRED.
Categories: Bio

The Arctic Doomsday Seed Vault Flooded. Thanks, Global Warming

Wired Science - Fri, 05/19/2017 - 14:31
The Arctic Doomsday Seed Vault Flooded. Thanks, Global WarmingNo seeds were lost, but the ability of the rock vault to provide failsafe protection against all disasters is now threatened by climate change. The post The Arctic Doomsday Seed Vault Flooded. Thanks, Global Warming appeared first on WIRED.
Categories: Bio

Volcanic Explosions Rock an Alaskan Island as Etna Rumbles

Wired Science - Fri, 05/19/2017 - 14:04
Volcanic Explosions Rock an Alaskan Island as Etna RumblesAfter a few weeks of quiet, two Alaskan volcanoes had big explosions this week, while Etna rumbled but didn't pop. The post Volcanic Explosions Rock an Alaskan Island as Etna Rumbles appeared first on WIRED.
Categories: Bio

Brrrr. The Secret History of Frozen Food

Wired Science - Fri, 05/19/2017 - 09:30
Brrrr. The Secret History of Frozen FoodHint: Move fast, and don't forget the calcium chloride spray The post Brrrr. The Secret History of Frozen Food appeared first on WIRED.
Categories: Bio