How to install bioperl via cpan:
https://wiki.archlinux.org/index.php/Bioperl
bash>cpan
cpan>d /bioperl/
cpan>install xxx/bioperl-xxx.tar.gz
How to install GBrowse:
http://gmod.org/wiki/GBrowse_Install_HOWTO
bash>cpan -i CGI GD CGI::Session DBI DBD::mysql Digest::MD5 Text::Shellwords Class::Base Bio::Graphics JSON Capture::Tiny GD::SVG
>cpan -i DBD::SQLite or (depends on which you use)
>cpan -i DBD::mysql
optional:
>cpan -i Bio::DB::Das::Chado
>cpan -i XML::Parser XML::Writer XML::Twig XML::DOM LWP Bio::Das BioMOBY Math::FFT Statistics::Descriptive
After download http://sourceforge.net/projects/gmod/files/Generic%20Genome%20Browser/GBrowse-2.39/GBrowse-2.39.tar.gz/download
and tar zxf xxx.tar.gz, then cd xxx and run :
>perl Makefile.PL HTDOCS=/srv/http/tools/GBrowse CONF=/etc/conf.d/gbrowse CGIBIN=/srv/http/cgi-bin/
if some libs are missing, it will be shown, follow the tips.
>./Build test
>./Build install
>cd /etc/conf.d/gbrowse
>chmod +w GBrowse.conf
edit GBrowse.conf:
tmp_base = /tmp/gbrowse2
url_base = /tools/GBrowse
db_base = /path/to/gbrowse2/database # where your database located
# add next line in [General] if you don't want generate pdf
generate pdf = 0
default source = yeast # a name for your sequence
add config for your sequence
[yeast]
description = Yeast chromosomes 1+2 (basic)
path = yeast_simple.conf # your sequence configuration file
edit yeast_simple.conf for your sequence
if you want to use sqlite: (There is a 'how to build sqlite database' in the bottom)
db_adaptor = Bio::DB::SeqFeature::Store
db_args = -adaptor 'DBI::SQLite'
-dsn '/path/to/your/sequence.sqlite'
How to build a sqlite database for gbrowse:
bp_seqfeature_load.pl -a DBI::SQLite -c -f -d name.db name.gff3 name.sca
How to load gff & fasta to postgresql database:
bp_seqfeature_load.pl -d 'dbi:Pg:dbname=yeast' -a DBI::Pg -c -u yeast -p 123456 yeast.gff3 yeast.fa
How to generate a gff3 file for sequence: simple example
cat convert_fasta2gff3.pl
#!/usr/bin/perl -w
use strict;
use Bio::SeqIO;
my ($file_fasta,$file_gff3)=@ARGV;
die("$!: file_fasta file_gff3\n")unless( $file_fasta && $file_gff3);
open(F,'>',$file_gff3);
my $in=Bio::SeqIO->new(-format=>'fasta',-file=>$file_fasta);
while(my $s=$in->next_seq){
my $id=$s->id;
my $seq=$s->seq;
my ($seqid,$source,$type,$start,$end,$score,$strand,$phase,$attributes);
$seqid=$id;
$source="SOAPdenovo";
$type="WGS";
$start=1;
$end=length($seq);
$score='.';
$strand='.';
$phase='.';
$attributes="ID=$seqid;Name=$seqid;";
print F join("\t",($seqid,$source,$type,$start,$end,$score,$strand,$phase,$attributes)),"\n";
}
close(F);