GBrowse: Difference between revisions

Marked this version for translation
No edit summary
(Marked this version for translation)
Line 2: Line 2:
<translate>
<translate>


== Introduction ==
== Introduction == <!--T:1-->


<!--T:2-->
GBrowse is a combination of database and interactive web pages for manipulating and displaying annotations on genomes. It requires a web interface to display. GBrowse has been installed on [[Cedar]]. The web address of the installation is https://gateway.cedar.computecanada.ca.
GBrowse is a combination of database and interactive web pages for manipulating and displaying annotations on genomes. It requires a web interface to display. GBrowse has been installed on [[Cedar]]. The web address of the installation is https://gateway.cedar.computecanada.ca.


<!--T:3-->
The Cedar installation differs in some ways from the standard GBrowse setup described at the official website: http://gmod.org/wiki/GBrowse, particularly with regard to authentication and authorization.
The Cedar installation differs in some ways from the standard GBrowse setup described at the official website: http://gmod.org/wiki/GBrowse, particularly with regard to authentication and authorization.


==Requesting access to GBrowse==
==Requesting access to GBrowse== <!--T:4-->


<!--T:5-->
In order for GBrowse to be able to access your files and directories, Compute Canada (CC) staff will create a shared account for each research group that requests access to GBrowse. While using GBrowse, any member of a research group can read GBrowse config files and input files belonging to any other member of that group. If you wish to use GBrowse, the Principal Investigator (PI) of your group must agree to this change from the usual file security practices. Have the PI write to support@computecanada.ca indicating that they want a GBrowse account to be created for the group, and that they understand the implications of the shared account.
In order for GBrowse to be able to access your files and directories, Compute Canada (CC) staff will create a shared account for each research group that requests access to GBrowse. While using GBrowse, any member of a research group can read GBrowse config files and input files belonging to any other member of that group. If you wish to use GBrowse, the Principal Investigator (PI) of your group must agree to this change from the usual file security practices. Have the PI write to support@computecanada.ca indicating that they want a GBrowse account to be created for the group, and that they understand the implications of the shared account.


<!--T:6-->
You must also have a database account on Cedar. If you already have one, please give the name of the database in your email. If you do not already have a database account, please read [[Database servers]] carefully and answer the questions given there for setting up a database.
You must also have a database account on Cedar. If you already have one, please give the name of the database in your email. If you do not already have a database account, please read [[Database servers]] carefully and answer the questions given there for setting up a database.


==Setting up GBrowse==
==Setting up GBrowse== <!--T:7-->


===Config files===
===Config files=== <!--T:8-->


<!--T:9-->
Since Gbrowse needs to be able to read config files of all users within a group, place your GBrowse config files in the following directory:
Since Gbrowse needs to be able to read config files of all users within a group, place your GBrowse config files in the following directory:


  /project/GROUPID/gbrowse/USERNAME/conf
  <!--T:10-->
/project/GROUPID/gbrowse/USERNAME/conf


<!--T:11-->
where <code>GROUPID</code> is your group id and <code>USERNAME</code> is the your user name. We will create a symbolic link from <code>${HOME}/gbrowse/conf</code> to this directory for your convenience. Files in this directory should be readable by all members of the group, so please do not change the group permission of files in this directory.
where <code>GROUPID</code> is your group id and <code>USERNAME</code> is the your user name. We will create a symbolic link from <code>${HOME}/gbrowse/conf</code> to this directory for your convenience. Files in this directory should be readable by all members of the group, so please do not change the group permission of files in this directory.


===Configuring the database connection===
===Configuring the database connection=== <!--T:12-->


<!--T:13-->
If you use MySQL, you need the following in your GBrowse config files:
If you use MySQL, you need the following in your GBrowse config files:


  [username_example_genome:database]
  <!--T:14-->
[username_example_genome:database]
  db_adaptor    =    Bio::DB::SeqFeature::Store
  db_adaptor    =    Bio::DB::SeqFeature::Store
  db_args      =    -adaptor DBI::mysql
  db_args      =    -adaptor DBI::mysql
  -dsn DATABASE;mysql_read_default_file=/home/SHARED/.my.cnf
  -dsn DATABASE;mysql_read_default_file=/home/SHARED/.my.cnf


<!--T:15-->
where <code>DATABASE</code> is the name of your database and <code>SHARED</code> is the shared-account. The <code>.my.cnf</code> file is a text file that is created by CC staff. It contains information required for the shared account to make a connection to MySQL.  
where <code>DATABASE</code> is the name of your database and <code>SHARED</code> is the shared-account. The <code>.my.cnf</code> file is a text file that is created by CC staff. It contains information required for the shared account to make a connection to MySQL.  


<!--T:16-->
If you decide to use Postgres you need the following in your GBrowse config files:
If you decide to use Postgres you need the following in your GBrowse config files:


  [username_example_genome:database]
  <!--T:17-->
[username_example_genome:database]
  db_adaptor    = Bio::DB::SeqFeature::Store
  db_adaptor    = Bio::DB::SeqFeature::Store
  db_args      =  -adaptor DBI::Pg
  db_args      =  -adaptor DBI::Pg
Line 44: Line 56:
where <code>DATABASE</code> is the name of your database.
where <code>DATABASE</code> is the name of your database.


==Using GBrowse==
==Using GBrowse== <!--T:18-->


===Input files===
===Input files=== <!--T:19-->


<!--T:20-->
GBrowse is able to read <code>.bam</code> files directly. You do not need to upload them to the database in order to display them. If you want GBrowse to read these .bam files:
GBrowse is able to read <code>.bam</code> files directly. You do not need to upload them to the database in order to display them. If you want GBrowse to read these .bam files:
* Files need to be copied to your <code>/project</code> directory and they should be readable by the group.  
* Files need to be copied to your <code>/project</code> directory and they should be readable by the group.  
Line 54: Line 67:
* Edit your config file to specify the path to the <code>.bam</code> file. Here is an example:
* Edit your config file to specify the path to the <code>.bam</code> file. Here is an example:


  [example_bam:database]
  <!--T:21-->
[example_bam:database]
  db_adaptor        = Bio::DB::Sam
  db_adaptor        = Bio::DB::Sam
  db_args          = -bam /project/GROUPID/USERNAME/gbrowse_bam_files/example_file.bam
  db_args          = -bam /project/GROUPID/USERNAME/gbrowse_bam_files/example_file.bam
  search options    = default
  search options    = default


===Uploading files to the database===
===Uploading files to the database=== <!--T:22-->


<!--T:23-->
This can be done using BioPerl. Here are commands that need to be run.  
This can be done using BioPerl. Here are commands that need to be run.  


  module load bioperl/1.7.1
  <!--T:24-->
module load bioperl/1.7.1
  bp_seqfeature_load.pl -c –d DATABASE:mysql_read_default_file=/home/USERNAME/.my.cnf \
  bp_seqfeature_load.pl -c –d DATABASE:mysql_read_default_file=/home/USERNAME/.my.cnf \
     example_genomic_sequence.fa header_file
     example_genomic_sequence.fa header_file


<!--T:25-->
In this example DATABASE is the name of your database and <code>example_genomic_sequence.fa</code> is the [https://en.wikipedia.org/wiki/FASTA_format fasta file] containing the entire genome that you want to visualize with GBrowse. <code>header_file</code> contains details about the length of the chromosomes. Here is an example of a header file:
In this example DATABASE is the name of your database and <code>example_genomic_sequence.fa</code> is the [https://en.wikipedia.org/wiki/FASTA_format fasta file] containing the entire genome that you want to visualize with GBrowse. <code>header_file</code> contains details about the length of the chromosomes. Here is an example of a header file:


<!--T:26-->
<pre>
<pre>
##sequence-region I 1 15072434
##sequence-region I 1 15072434
Line 79: Line 97:
</pre>
</pre>


<!--T:27-->
We remind you that the above commands should be run via the [[Running jobs|job scheduler]]. Do not run these on the head node!
We remind you that the above commands should be run via the [[Running jobs|job scheduler]]. Do not run these on the head node!


</translate>
</translate>
Bureaucrats, cc_docs_admin, cc_staff
2,879

edits