gratools list_samples๏ƒ

Quickly identify all unique samples integrated into your pangenome graph.

๐Ÿ‘ฅ Sample Inventory

The list_samples command scans the GFA file (specifically the Walk or Path lines) to extract the unique names of all samples. This is a crucial step to ensure you have the correct sample identifiers for subsequent queries like get_subgraph or get_fasta.

Options๏ƒ

๐Ÿ› ๏ธ View Command Line Options
$ gratools list_samples
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_samples [OPTIONS]
Aliases: samples

  Lists all unique sample names found in the walks (W lines) of the GFA file
  after its importation by GraTools. This command thus relies on the pre-
  existing GraTools import for the specified GFA file.
  
  For more details, see the full documentation:
  https://gratools.readthedocs.io/en/latest/commands/list_samples.html

List Samples 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>').

  --save / --no-save
     Save the list of the embedded sample names to a text file in the GraTools
     output directory.  [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 Example๏ƒ

๐Ÿ“‹ Listing Available Samples

Display a clean summary table of all individuals present in the graph.

$ gratools list_samples --gfa Og_cactus.gfa.gz

Output Summary:

โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ Summary โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
Total samples in GFA: 5
   Available Samples in GFA:
   Og_cactus
โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ Sample Name โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ CG14        โ”‚
โ”‚ Og20        โ”‚
โ”‚ Og103       โ”‚
โ”‚ Og182       โ”‚
โ”‚ Tog5681     โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
๐Ÿ’ก Pro Tip: Sample Names are Key

GFA files often use specific prefixes or internal IDs for samples. Since commands like get_subgraph or get_fasta require an exact match for the --sample-query argument, always use list_samples first to confirm the exact spelling and case-sensitivity of your sample names.

๐Ÿ“‘ Quick Links