Giter Club home page Giter Club logo

circosalignmentplotter's Introduction

CircosAlignmentPlotter

Converts a part of an alignment (.PAF perhaps others sometimes) to a Circos image using BED and fasta files.

Requirements

  • biopython
  • circos
  • pandas
  • numpy

Usage

usage: p2c.py [-h] [--templates TEMPLATES] [--min-length MIN_LENGTH]
              [--bed BED] [--cov COV] [--snps SNPS]
              PAF Query Reference BED Output

Circos plot all alignments against each target in the .paf file.

positional arguments:
  PAF                   An alignment .paf formatted
  Query                 A fasta file containing the query sequences
  Reference             A fasta file containing the target sequences
  BED                   A .bed file containing the target contigs regions to plot
  Output                A directory path

optional arguments:
  -h, --help                              show this help message and exit
  --templates TEMPLATES, -t TEMPLATES     A directory path containing the template files
  --min-length MIN_LENGTH, -m MIN_LENGTH  Minimum length. Default: 1000.
  --bed BED, -b BED                       A .bed file with regions to highlight.
  --scov COV, -sc COV                     A file formatted like the output of samtools depth.
  --ccov COV, -cc COV                     A file formatted for circos.
  --snps SNPS, -s SNPS                    A .vcf file of the query and/or target.

circosalignmentplotter's People

Contributors

antoineho avatar vortex22 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

msuefishlab

circosalignmentplotter's Issues

FileNotFoundError: [Errno 2] No such file or directory: 'circos'

Hi,

I created a python virtual environment with python3.11, and I installed
biopython
circos
pandas
numpy
With pip install.

I am running the program like this:

p2c.py H1_MojtabaGaps.paf ANN1372_H1_H2_hap1.reviewed.chr_assembled.fasta VIGUIERA_H1_H2.reviewed.chr_assembled.fasta VIGUIERA_H1_H2.reviewed.chr_assembled.fasta.bed PLOT_RESULTS

I am having the next error.

Query: /lustre07/scratch/egonza02/ASSEMBLIES/SCAFFOLDING/CPU_MODE/MAKE_FASTAS/SECOND_TRY/VIGUIERA_G_AFTER_REVIEW/VISUALIZE/ANN1372_H1_H2_hap1.reviewed.chr_assembled.fasta
Reference: /lustre07/scratch/egonza02/ASSEMBLIES/SCAFFOLDING/CPU_MODE/MAKE_FASTAS/SECOND_TRY/VIGUIERA_G_AFTER_REVIEW/VISUALIZE/VIGUIERA_H1_H2.reviewed.chr_assembled.fasta
Targets: /lustre07/scratch/egonza02/ASSEMBLIES/SCAFFOLDING/CPU_MODE/MAKE_FASTAS/SECOND_TRY/VIGUIERA_G_AFTER_REVIEW/VISUALIZE/VIGUIERA_H1_H2.reviewed.chr_assembled.fasta.bed
PAF: /lustre07/scratch/egonza02/ASSEMBLIES/SCAFFOLDING/CPU_MODE/MAKE_FASTAS/SECOND_TRY/VIGUIERA_G_AFTER_REVIEW/VISUALIZE/H1_MojtabaGaps.paf
Outdir: /lustre07/scratch/egonza02/ASSEMBLIES/SCAFFOLDING/CPU_MODE/MAKE_FASTAS/SECOND_TRY/VIGUIERA_G_AFTER_REVIEW/VISUALIZE/PLOT_RESULTS
Templates: /lustre07/scratch/egonza02/SOFTWARE/CircosAlignmentPlotter/CircosAlignmentPlotter/templates
Copying files...
Building karyotype.txt...
Building links.txt...
Building highlights.txt...
Adding samtools formatted coverage...
Adding circos formatted coverage...
Running circos in /lustre07/scratch/egonza02/ASSEMBLIES/SCAFFOLDING/CPU_MODE/MAKE_FASTAS/SECOND_TRY/VIGUIERA_G_AFTER_REVIEW/VISUALIZE/PLOT_RESULTS
Traceback (most recent call last):
File "/home/egonza02/scratch/SOFTWARE/CircosAlignmentPlotter/CircosAlignmentPlotter/p2c.py", line 473, in
main()
File "/home/egonza02/scratch/SOFTWARE/CircosAlignmentPlotter/CircosAlignmentPlotter/p2c.py", line 470, in main
plotPAF(dAlns, iFH.outdir, iFH.templates, iFH.query, iFH.reference, correspondance, min_len, contigs_lengths, targets_to_plot, bed=iFH.bed, scov=iFH.scov, ccov=iFH.ccov, snps=iFH.snps)
File "/home/egonza02/scratch/SOFTWARE/CircosAlignmentPlotter/CircosAlignmentPlotter/p2c.py", line 410, in plotPAF
run(cmd)
File "/home/egonza02/scratch/SOFTWARE/CircosAlignmentPlotter/CircosAlignmentPlotter/p2c.py", line 415, in run
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/cvmfs/soft.computecanada.ca/easybuild/software/2020/avx2/Core/python/3.11.2/lib/python3.11/subprocess.py", line 1024, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "/cvmfs/soft.computecanada.ca/easybuild/software/2020/avx2/Core/python/3.11.2/lib/python3.11/subprocess.py", line 1901, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'circos'

Do you know how I could solve this error?

Thanks,

Eric

query vs target?

The instructions explain the parameters as follows:
"Query A fasta file containing the target sequences
Reference A fasta file containing the query sequences"

Is it not the other way around?

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.