gratools list_chr๏ƒ

Quickly inventory and describe genomic paths (chromosomes/contigs) within your graph.

๐Ÿงฌ Chromosome Mapping

The list_chr command scans the GFA walk lines (W-lines) to identify the contigs or chromosomes associated with each sample. It provides a quick way to check the completeness and naming consistency of your pangenome graph.

Options๏ƒ

๐Ÿ› ๏ธ View Command Line Options
$ gratools list_chr
Welcome to GraTools version: '0.1.0.dev134'
@author: GraTools team's
        ____                 __________               ____          
      6MMMMMb/               MMMMMMMMMM               `MM          
     8P    YM               /   MM     \               MM          
    6M      Y ___  __    ___    MM   _____     _____   MM   ____   
    MM        `MM 6MM  6MMMMb   MM  6MMMMMb   6MMMMMb  MM  6MMMMb\ 
    MM         MM69 " 8M'  `Mb  MM 6M'   `Mb 6M'   `Mb MM MM'    ` 
    MM     ___ MM'        ,oMM  MM MM     MM MM     MM MM YM.      
    MM     `M' MM     ,6MM9'MM  MM MM     MM MM     MM MM  YMMMMb  
    YM      M  MM     MM'   MM  MM MM     MM MM     MM MM      `Mb 
     8b    d9  MM     MM.  ,MM  MM YM.   ,M9 YM.   ,M9 MM L    ,MM 
      YMMMMM9  _MM_   `YMMM9'Yb_MM_ YMMMMM9   YMMMMM9 _MM_MYMMMM9 
        \                                    /                /
        /''A''\          /''''''\           /     /''''A'''''\
  ...GC|       |..ATG...C...CG...T....TAG..'..GC.|            |...
        \..C../      \.............../            \...TATA.../
 
Please cite our gitlab: https://forge.ird.fr/diade/gratools.git\

Usage: gratools list_chr [OPTIONS]
Aliases: chr

  Lists the chromosome information derived from the walks (W lines) of the
  imported GFA file. By default, it shows a summary of unique chromosomes per
  sample  (meaning multiple fragments in the same chromosome are combined as a
  single one). The --full option displays the detailed start/end positions for
  each chromosome fragment. The results is displayed in the command line or in a
  CSV file. This command relies on the pre-existing GraTools import.
  
  For more details, see the full documentation:
  https://gratools.readthedocs.io/en/latest/commands/list_chr.html

Chromosome Listing Options:
  -g, --gfa PATH
     Path to the input GFA file (e.g., myGraph.gfa or myGraph.gfa.gz).
     [required]

  -o, --outdir DIRECTORY
     Output directory for GraTools results. If not specified, results are
     typically placed in a subdirectory within the GFA file's parent directory
     (e.g., 'GraTools-output_<gfa_name>').

  --full / --no-full
     Display the detailed chromosome fragment information (original start/end
     positions from walks).  [default: no-full]

  --save / --no-save
     Save the chromosome list (summary or full, based on --full) to a CSV file.
     [default: no-save]

Logging Options:
  -vv, --verbosity [DEBUG|INFO|ERROR]
     Set the logging verbosity level.  [default: INFO]

  -l, --log-path DIRECTORY
     Directory where the log files will be saved. If not specified, logs will be
     placed in the main output directory (or in a default GraTools log
     location).

Performance Options:
  -t, --threads INTEGER
     Number of threads to be used for parallelizable operations.  [default: 1]

Other options:
  -h, --help
     Show this message and exit.

Usage Examples๏ƒ

๐Ÿ“‹ Short Format (Summary)

Get a concise list of unique chromosome names and counts per sample. Perfect for a quick overview.

$ gratools list_chr --gfa Og_cactus.gfa.gz

 โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ Summary โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
 Total samples: 5
 Min chromosomes per sample: 2
 Max chromosomes per sample: 2
               5 Samples, 2-2 Unique Chromosomes/Sample (GFA: Og_cactus)
 โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
 โ”‚ Sample Name โ”‚ Unique Chromosomes (Comma-separated) โ”‚ Number of Unique Chromosomes โ”‚
 โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
 โ”‚ CG14        โ”‚ CG14_Chr07, CG14_Chr08               โ”‚ 2                            โ”‚
 โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
 โ”‚ Og103       โ”‚ Og103_Chr07, Og103_Chr08             โ”‚ 2                            โ”‚
 โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
 โ”‚ Og182       โ”‚ Og182_Chr07, Og182_Chr08             โ”‚ 2                            โ”‚
 โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
 โ”‚ Og20        โ”‚ Og20_Chr07, Og20_Chr08               โ”‚ 2                            โ”‚
 โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
 โ”‚ Tog5681     โ”‚ Tog5681_Chr07, Tog5681_Chr08         โ”‚ 2                            โ”‚
 โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
๐Ÿ” Full Format (Detailed)

Displays every chromosome fragment with its exact start and end positions. Crucial for fragmented assemblies.

$ gratools list_chr --gfa Og_cactus.gfa.gz --full

 โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ Summary โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
 Total samples: 5
 Total unique chromosomes: 10
 Total fragments: 23
 Min fragment length: 1,772,164 bp
 Max fragment length: 2,075,321 bp
 Average fragment length: 11,330,633.22 bp
  5 Samples, 2-2 Chromosomes/Sample (GFA: Og_cactus) - Full Fragment List
 โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
 โ”‚ Sample Name โ”‚ Chromosome Fragment Name โ”‚ Fragment Start โ”‚ Fragment End โ”‚
 โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
 โ”‚ CG14        โ”‚ CG14_Chr07               โ”‚              0 โ”‚   26,599,614 โ”‚
 โ”‚             โ”‚ CG14_Chr08               โ”‚              0 โ”‚   25,472,747 โ”‚
 โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
 โ”‚ Og103       โ”‚ Og103_Chr07              โ”‚         23,875 โ”‚   12,687,580 โ”‚
 โ”‚             โ”‚ Og103_Chr07              โ”‚     12,866,628 โ”‚   13,747,795 โ”‚
 โ”‚             โ”‚ Og103_Chr07              โ”‚     13,903,795 โ”‚   27,060,440 โ”‚
 โ”‚             โ”‚ Og103_Chr08              โ”‚         30,268 โ”‚   25,689,516 โ”‚
 โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
 โ”‚ Og182       โ”‚ Og182_Chr07              โ”‚         16,376 โ”‚   26,829,393 โ”‚
 โ”‚             โ”‚ Og182_Chr08              โ”‚         11,495 โ”‚   25,639,462 โ”‚
 โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
 โ”‚ Og20        โ”‚ Og20_Chr07               โ”‚         13,644 โ”‚    1,772,164 โ”‚
 โ”‚             โ”‚ Og20_Chr07               โ”‚      1,890,766 โ”‚   13,326,301 โ”‚
 โ”‚             โ”‚ Og20_Chr07               โ”‚     13,432,358 โ”‚   26,556,933 โ”‚
 โ”‚             โ”‚ Og20_Chr08               โ”‚         33,688 โ”‚   25,577,180 โ”‚
 โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
 โ”‚ Tog5681     โ”‚ Tog5681_Chr07            โ”‚         22,457 โ”‚    9,322,325 โ”‚
 โ”‚             โ”‚ Tog5681_Chr07            โ”‚      9,748,285 โ”‚    9,764,302 โ”‚
 โ”‚             โ”‚ Tog5681_Chr07            โ”‚      9,907,780 โ”‚    9,939,241 โ”‚
 โ”‚             โ”‚ Tog5681_Chr07            โ”‚     10,023,782 โ”‚   13,034,997 โ”‚
 โ”‚             โ”‚ Tog5681_Chr07            โ”‚     13,211,081 โ”‚   14,101,598 โ”‚
 โ”‚             โ”‚ Tog5681_Chr07            โ”‚     14,241,787 โ”‚   25,016,640 โ”‚
 โ”‚             โ”‚ Tog5681_Chr07            โ”‚     25,052,306 โ”‚   25,203,063 โ”‚
 โ”‚             โ”‚ Tog5681_Chr07            โ”‚     25,411,687 โ”‚   25,413,700 โ”‚
 โ”‚             โ”‚ Tog5681_Chr07            โ”‚     25,481,734 โ”‚   27,557,055 โ”‚
 โ”‚             โ”‚ Tog5681_Chr08            โ”‚          9,084 โ”‚   16,374,127 โ”‚
 โ”‚             โ”‚ Tog5681_Chr08            โ”‚     16,391,988 โ”‚   25,643,255 โ”‚
 โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
๐Ÿ’พ Save to File

Export the chromosome list to a tabular file for documentation or downstream parsing.

$ gratools list_chr --gfa graph.gfa --full --save

Output Formats Explained๏ƒ

Provides a summary table where each row represents one sample.

  • Unique Chromosomes: Comma-separated list of all path names found for that sample.

  • Number of Unique Chromosomes: Total count of distinct names.

Use this to verify that all samples have the expected number of chromosomes.

Provides a detailed fragment list. If a sampleโ€™s chromosome is split into several walks (W-lines), each fragment is listed separately.

  • Fragment Start/End: The exact coordinates within the pangenome graph.

  • Fragment Statistics: The summary header will also show Min/Max/Avg fragment lengths.

Use this to diagnose fragmented assemblies or check for gaps in the graph.

๐Ÿ’ก Pro Tip: Fragmented Paths

In some GFA files (like those from Cactus), a single chromosome might be represented by multiple non-contiguous W lines. In Full Mode, GraTools lists every single one of these lines as a โ€œfragmentโ€, allowing you to see exactly how your assembly is structured in the graph.

โ€”

๐Ÿ“‘ Quick Links