Mercurial > repos > iuc > vgp_chromosome_assignment
comparison chromosome_assignment.xml @ 0:9b52f4e2093b draft default tip
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/vgp_processcuration commit c25e877636f68656a0005883efb0f03b5ffd6b0c
| author | iuc |
|---|---|
| date | Wed, 07 Jan 2026 12:48:42 +0000 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:9b52f4e2093b |
|---|---|
| 1 <tool id="vgp_chromosome_assignment" name="VGP Chromosome Assignment" version="@TOOL_VERSION@+galaxy0" profile="@PROFILE@"> | |
| 2 <description>Assign chromosome names to scaffolds</description> | |
| 3 <macros> | |
| 4 <import>macros.xml</import> | |
| 5 </macros> | |
| 6 <expand macro="xrefs"/> | |
| 7 <expand macro="requirements"/> | |
| 8 <command detect_errors="exit_code"><![CDATA[ | |
| 9 ## Create output directory | |
| 10 mkdir -p output_dir && | |
| 11 | |
| 12 ## Run chromosome_assignment | |
| 13 chromosome_assignment | |
| 14 -a '$agp' | |
| 15 -f '$fasta' | |
| 16 -o output_dir | |
| 17 | |
| 18 ]]></command> | |
| 19 <inputs> | |
| 20 <param name="agp" type="data" format="tabular" label="Haplotype AGP file" | |
| 21 help="Input haplotype AGP file without haplotig duplications." /> | |
| 22 <param name="fasta" type="data" format="fasta" label="Sorted FASTA file" | |
| 23 help="Input sorted FASTA file." /> | |
| 24 </inputs> | |
| 25 <outputs> | |
| 26 <data name="inter_chr" format="tabular" from_work_dir="output_dir/inter_chr.tsv" | |
| 27 label="${tool.name} on ${on_string}: Chromosome Mapping Table"/> | |
| 28 <data name="chr_level_fasta" format="fasta" from_work_dir="output_dir/hap.chr_level.fa" | |
| 29 label="${tool.name} on ${on_string}: Chromosome-level FASTA"/> | |
| 30 </outputs> | |
| 31 <tests> | |
| 32 <test expect_num_outputs="2"> | |
| 33 <param name="agp" value="test_hap1_unlocs_no_hapdups.agp" ftype="tabular"/> | |
| 34 <param name="fasta" value="test_hap1_sorted.fa" ftype="fasta"/> | |
| 35 <output name="inter_chr" file="expected_hap1_inter_chr.tsv" ftype="tabular"/> | |
| 36 <output name="chr_level_fasta" file="expected_hap1_chr_level.fa" ftype="fasta"/> | |
| 37 </test> | |
| 38 </tests> | |
| 39 <help><![CDATA[ | |
| 40 **What it does** | |
| 41 | |
| 42 chromosome_assignment substitutes scaffold identifiers with chromosome assignments, generating chromosome-level | |
| 43 sequences and mapping tables. | |
| 44 | |
| 45 The tool processes AGP metadata to: | |
| 46 | |
| 47 1. Identify sex chromosomes (X, Y, W, Z) and regular chromosomes | |
| 48 2. Filter autosomal scaffolds and assign sequential ``SUPER_`` identifiers | |
| 49 3. Rename sex-linked scaffolds with ``SUPER_X/Y/W/Z`` prefixes | |
| 50 4. Handle unlocalized contigs by replacing parent scaffold names with chromosomal assignments | |
| 51 5. Generate documentation mapping original names to new names | |
| 52 | |
| 53 **Inputs** | |
| 54 | |
| 55 - **Haplotype AGP file**: Tab-delimited AGP file with chromosome assignment metadata (typically hap.unlocs.no_hapdups.agp from split_agp) | |
| 56 - **Sorted FASTA file**: Sorted sequence file containing scaffolds/contigs (typically sorted using gfastats) | |
| 57 | |
| 58 **Outputs** | |
| 59 | |
| 60 - **Chromosome Mapping Table (inter_chr.tsv)**: Tab-separated file documenting all scaffold-to-chromosome name transformations | |
| 61 - **Chromosome-level FASTA**: FASTA file with sequences renamed to chromosome-level assignments | |
| 62 | |
| 63 **Workflow Context** | |
| 64 | |
| 65 This tool is typically run twice in the VGP curation pipeline, once for each haplotype: | |
| 66 | |
| 67 1. Run on Haplotype 1: Use Hap1 AGP and Hap1 sorted FASTA | |
| 68 2. Run on Haplotype 2: Use Hap2 AGP and Hap2 sorted FASTA | |
| 69 | |
| 70 **Input Preparation** | |
| 71 | |
| 72 Before running this tool: | |
| 73 | |
| 74 1. Run split_agp to split haplotypes and correct AGP files | |
| 75 2. Use gfastats to sort each haplotype with its corresponding AGP file: | |
| 76 - gfastats hap1.fa -a hap1_unlocs_no_hapdups.agp -o hap1.sorted.fa | |
| 77 - gfastats hap2.fa -a hap2_unlocs_no_hapdups.agp -o hap2.sorted.fa | |
| 78 | |
| 79 **Next Steps** | |
| 80 | |
| 81 After running chromosome_assignment on both haplotypes: | |
| 82 | |
| 83 1. Run MashMap to align the two chromosome-level haplotypes | |
| 84 2. Use sak_generation with the two inter_chr.tsv files and MashMap output to generate SAK instructions | |
| 85 | |
| 86 .. class:: infomark | |
| 87 | |
| 88 **More Information** | |
| 89 | |
| 90 This tool is part of the VGP ProcessCuration pipeline for preparing curated genome assemblies for submission. | |
| 91 | |
| 92 <expand macro="help_common"/> | |
| 93 ]]></help> | |
| 94 <expand macro="citations"/> | |
| 95 </tool> |
