GithubHelp home page GithubHelp logo

feigeliudan01 / cgview_comparison_tool Goto Github PK

View Code? Open in Web Editor NEW

This project forked from paulstothard/cgview_comparison_tool

0.0 0.0 0.0 709.39 MB

The CGView Comparison Tool (CCT) is a package for visually comparing bacterial, plasmid, chloroplast, and mitochondrial sequences.

Home Page: https://paulstothard.github.io/cgview_comparison_tool/

License: GNU General Public License v3.0

Perl 85.13% Shell 14.62% Dockerfile 0.25%

cgview_comparison_tool's Introduction

drawing

CGView Comparison Tool (CCT)

The CGView Comparison Tool (CCT) is a package for visually comparing bacterial, plasmid, chloroplast, and mitochondrial sequences. The comparisons are conducted using BLAST, and the BLAST results are presented in the form of graphical maps that can also show sequence features, gene and protein names, COG category assignments, and sequence composition characteristics. CCT can generate maps in a variety of sizes, including 400 Megapixel maps suitable for posters. Comparisons can be conducted within a particular species or genus, or all available genomes can be used. The entire map creation process, from downloading sequences to redrawing zoomed maps, can be completed easily using scripts included with CCT. User-defined features or analysis results can be included on maps, and maps can be extensively customized.

Sample CCT maps can be viewed here.

CCT was written and is maintained by Paul Stothard [email protected] and Jason Grant [email protected].

CCT citation

Grant JR, Arantes AS, Stothard P (2012) Comparing thousands of circular genomes using the CGView Comparison Tool. BMC Genomics 13:202.

Using the CCT Docker image

Pull the Docker image:

docker pull pstothard/cgview_comparison_tool

Run the Docker image and use fetch_genome_by_accession.sh to download a sequence in GenBank format:

docker run --rm -v "$(pwd)":/dir -u "$(id -u)":"$(id -g)" -w /dir pstothard/cgview_comparison_tool fetch_genome_by_accession.sh -a AC_000022 -o ./

Use build_blast_atlas.sh to create a BLAST atlas project for the sequence that was downloaded:

docker run --rm -v "$(pwd)":/dir -u "$(id -u)":"$(id -g)" -w /dir pstothard/cgview_comparison_tool build_blast_atlas.sh -i AC_000022.gbk

Download some sequences to be used as "comparison genomes" in the BLAST atlas project:

docker run --rm -v "$(pwd)":/dir -u "$(id -u)":"$(id -g)" -w /dir pstothard/cgview_comparison_tool fetch_genome_by_accession.sh -a NC_046914 -o ./AC_000022/comparison_genomes
docker run --rm -v "$(pwd)":/dir -u "$(id -u)":"$(id -g)" -w /dir pstothard/cgview_comparison_tool fetch_genome_by_accession.sh -a NC_047196 -o ./AC_000022/comparison_genomes
docker run --rm -v "$(pwd)":/dir -u "$(id -u)":"$(id -g)" -w /dir pstothard/cgview_comparison_tool fetch_genome_by_accession.sh -a NC_047457 -o ./AC_000022/comparison_genomes
docker run --rm -v "$(pwd)":/dir -u "$(id -u)":"$(id -g)" -w /dir pstothard/cgview_comparison_tool fetch_genome_by_accession.sh -a AC_000022 -o ./AC_000022/comparison_genomes
docker run --rm -v "$(pwd)":/dir -u "$(id -u)":"$(id -g)" -w /dir pstothard/cgview_comparison_tool fetch_genome_by_accession.sh -a NC_001326 -o ./AC_000022/comparison_genomes
docker run --rm -v "$(pwd)":/dir -u "$(id -u)":"$(id -g)" -w /dir pstothard/cgview_comparison_tool fetch_genome_by_accession.sh -a NC_043914 -o ./AC_000022/comparison_genomes

Generate the CGView maps:

docker run --rm -v "$(pwd)":/dir -u "$(id -u)":"$(id -g)" -w /dir pstothard/cgview_comparison_tool build_blast_atlas.sh -p AC_000022 -z medium

Once complete, the maps can be found in the AC_000022/maps_for_cds_vs_cds and AC_000022/maps_for_dna_vs_dna directories on the host system.

There are multiple ways to alter the appearance and contents of a map generated by CCT. For example, the configuration files written when a project is first created can be edited prior to completion of the project. Also, CCT script command-line options can be used to alter the contents and appearance of a map. Finally, the CGView XML file that is generated as the input to cgview.jar can be edited and reprocessed. For more details see the CCT documentation, in particular the tutorials.

For example, the following command uses the --custom option to change several aspects of the map:

docker run --rm -v "$(pwd)":/dir -u "$(id -u)":"$(id -g)" -w /dir pstothard/cgview_comparison_tool build_blast_atlas.sh -p AC_000022 -x -z medium --custom "title='Example map' global_label=T legend=F use_opacity=F backboneRadius=900 labelFontSize=60 borderColor=white width=3000 height=3000"

This command redraws the maps in SVG format:

docker run --rm -v "$(pwd)":/dir -u "$(id -u)":"$(id -g)" -w /dir pstothard/cgview_comparison_tool redraw_maps.sh -p AC_000022 -f svg

The SVG maps are added to the AC_000022/maps_for_cds_vs_cds and AC_000022/maps_for_dna_vs_dna directories. Below are the maps generated for the CDS vs CDS comparisons and the DNA vs DNA comparisons, respectively.

CGView map CGView map

Downloading and running CCT

To download CCT:

git clone [email protected]:paulstothard/cgview_comparison_tool.git

CCT requires the following programs:

CCT requires the following Perl modules:

  • Bio::SeqIO
  • Bio::SeqUtils
  • Bio::Tools::CodonTable
  • Error
  • File::Temp
  • LWP::Protocol::https
  • Tie::IxHash

Set the following environment variables (by editing ~/.bashrc or ~/.bash_profile, for example):

export CCT_HOME="/path/to/cgview_comparison_tool"
export PATH="$PATH:${CCT_HOME}/scripts"
export PERL5LIB="$PERL5LIB:${CCT_HOME}/lib/perl_modules"

Test your setup:

./scripts/check_env.sh

Prepare the COG database:

./scripts/build_cog_db.sh

Build some test maps:

./scripts/process_test_projects.sh

Refer to the CCT documentation for information on how to use CCT. The tutorials are a good starting point.

cgview_comparison_tool's People

Contributors

paulstothard avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.