This software is part of the RADSex pipeline, a method to detect sex-linked sequences in RADSeq data. As such, it is only designed to work with the output of Stacks using specific parameter values. This pipeline was developed for the PhyloSex project, which investigates sex determining factors in a wide range of fish species.
The RADSex pipeline is used to analyze RADSeq data with focus on sex. This pipeline was developed for the PhyloSex project, which investigates sex determining factors in a wide range of fish species.
*Generates a matrix of dimension (Number of males) x (Number of females). The value at coordinates **(i, j)** corresponds to the number of haplotypes found in precisely **i** males and **j** females.*
**Options** :
Option | Full name | Description
--- | --- | ---
`-i` | `--input-folder` | Path to a folder containing the output of denovo_map |
`-m` | `--popmap` | Path to a population map file |
`-o` | `--output-file` | Path to the output file (default: *haplotypes_matrix.tsv*)
*Extracts all the haplotypes found in a given number of males and females (a position in the haplotypes matrix). The output is a tabulated file with the following fields :*
-*Males* : number of males in which the haplotype was found
-*Females* : number of females in which the haplotype was found
-*Sequence* : haplotype sequence
-*Male_outliers* : ID of the males in which the haplotype was not found
-*Female_outliers* : ID of the males in which the haplotype was not found
*Generates a matrix of coverage for all individuals and all sequences. The output is a tabulated file, where each line contains the ID, sequence and coverage for each individual of a marker.*
**Options** :
Option | Full name | Description
--- | --- | ---
`-i` | `--input-folder` | Path to a folder containing the output of denovo_map |
`-m` | `--popmap` | Path to a population map file |
`-p` | `--positions` | Path to a file containing the list of positions to extract |
`-o` | `--output-file` | Path to the output file (default: *extracted_haplotypes.tsv*)
`-d` | `input_dir_path` | Path to a folder containing demultiplexed reads |
`-o` | `output_file_path` | Path to the output file |
`-t` | `n_threads` | Number of threads to use (default: 1) |
`-c` | `min_cov` | Minimum coverage to consider a marker in an individual (default: 1) |
*Computes the distribution of haplotypes frequencies in the population. The output is a tabulated file with the following fields*
-*Frequency* : number of individuals in which a haplotype is found
-*Count* : number of haplotypes with the associated frequency in the population
*Generates a matrix of dimensions (Number of males) x (Number of females). The value at coordinates **(i, j)** corresponds to the number of haplotypes found in precisely **i** males and **j** females.*
**Options** :
Option | Full name | Description
--- | --- | ---
`-i` | `--input-folder` | Path to a folder containing the output of denovo_map |
`-o` | `--output-file` | Path to the output file (default: *haplotypes_frequencies.tsv*)
`-f` | `input_file_path` | Path to an input file (result of process_reads) |
`-o` | `output_file_path` | Path to the output file |
`-p` | `popmap_file_path` | Path to a popmap file (indicating the sex of each individual) |
`-c` | `min_cov` | Minimum coverage to consider a marker in an individual (default: 1) |
*Find all alleles in sex-linked loci from the Stacks catalog by blasting sex-linked sequences and filtering by similarity. If a coverage file is provided, loci coverage will be corrected based on global coverage differences between individuals. The output is a tabulated file with the following fields :*
- Stack_ID: catalog ID of the sex-linked haplotype
- Haplotype_ID: catalog ID of the rescued haplotype (other allele)
- Sequence: rescued haplotype sequence
- Matches: number of matching bases between the sex-linked haplotype and the rescued haplotype
- Mismatches: number of non-matching bases between the sex-linked haplotype and the rescued haplotype
- Gaps: number of gaps between the sex-linked haplotype and the rescued haplotype
*Filters the coverage matrix to export markers matching the values of min_males, min_females, max_males, and max_females (i.e. markers found in M males with min_males <= M <= max_males and F females with min_females <= F <= max_females)*
**Options** :
Option | Full name | Description
--- | --- | ---
`-i` | `--input-folder` | Path to a folder containing the output of denovo_map |
`-s` | `--sequences` | Path to a sequences file (result of *haplotypes*)|
`-c` | `--coverage-file` | Path to a coverage file (result of *coverage*) |
`-o` | `--output-file` | Path to the output file (default: *extracted_alleles.tsv*)
`-f` | `input_file_path` | Path to an input file (result of process_reads) |
`-o` | `output_file_path` | Path to the output file |
`-p` | `popmap_file_path` | Path to a popmap file (indicating the sex of each individual) |
`-c` | `min_cov` | Minimum coverage to consider a marker in an individual (default: 1) |
`--min-males` | `min_males` | Minimum number of males with a marker |
`--min-females` | `min_females` | Minimum number of females with a marker |
`--max-males` | `max_males` | Maximum number of males with a marker |
`--max-females` | `max_females` | Maximum number of females with a marker |
*Generate plots to visualize output from heatmap, rescue, or frequencies commands. The input file type is automatically detected. The following plots are generated :*
-**heatmap** : a heatmap representation of the loci matrix, with number of males as abscissis and number of females as ordinates. The color of a tile at position **(i, j)** shows the number of haplotypes shared by exactly **i** males and **j** females.
-**rescue** : two heatmaps reprensentations of the results of clustering for both alleles and individuals; in the first heatmap, the values are presence/absence of loci. In the second heatmap, the values are individual coverage for each locus.
-**frequencies** : a barplot showing the distribution of haplotypes frequencies in the population.
**Options** :
Option | Full name | Description
--- | --- | ---
`-i` | `--input-file` | Path to a file generated by this pipeline |
`-m` | `--popmap` | Path to a population map file |
`-o` | `--output-file` | Path to the output file |
**Examples** :
**Example output** :
- heatmap :

...
...
@@ -160,7 +114,7 @@ Option | Full name | Description
MIT License
Copyright (c) 2017 Romain Feron
Copyright (c) 2017-2018 Romain Feron and INRA LPGP
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal