install bioperl

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);


  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值