TheSNPpit is a standalone application which is command line
driven. In workflows, series of commands can be put together in
bash programs. With this procedure, reasonably complex pipelines
can be built.
However, there is also a way to interact with the underlying
PostgeSQL directly, completely byepassing the command line
interface (cli). Access with the Postgresql database is for
instance through the Perl DBI interface. Similary access is
available for Python as a host language.
Now we shall present a simple example to demonstrate direct
database access from a Perl script.The problem is simply this:
retrieve the genotype for a given sample and a given SNPname in a
defined panel. If written as SQL you may want to write something
select genotype from 64Kpanel
where sample_name = 'sample123'
and SNPname = 'RS0122343'
The corrspondent Perl code using the contributed library would
my $genotype = SNPcontrib_1::snp_per_sample($sample,$panel,$snp);
Now every programmer can see, what can be done with this
subroutine call to snp_per_sample: integrated into a larger
application, the content of the TheSNPpit database can be freely
This example, and it is not more than an example, is intended to
open up a new mode / infrastructure to develop and share program
code which may be useful for other users. The directory
thesnppit/contrib is intended to house the contributions.
thesnppit/contrib/lib should contain subroutines, while
thesnppit/contrib/bin would house complete programs.