Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

Revision 49bf399a9d1ceae722c0c8c4aeb8376f2644d40f authored by Asher Preska Steinberg on 07 February 2022, 16:12:20 UTC, committed by Asher Preska Steinberg on 07 February 2022, 16:12:20 UTC
Commit for ReduceCoreGenome
1 parent 86759f7
  • Files
  • Changes
  • c9e6ce9
  • /
  • README.md
Raw File Download
Permalinks

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • revision
  • directory
  • content
revision badge
swh:1:rev:49bf399a9d1ceae722c0c8c4aeb8376f2644d40f
directory badge Iframe embedding
swh:1:dir:c9e6ce9963a2ebfadbbb0748f635ce8c69aa90ec
content badge Iframe embedding
swh:1:cnt:ff30a3c9ff0e4a53dfcb90dcf0ae37b57c87c82d
Citations

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • revision
  • directory
  • content
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
README.md
# ReferenceAlignmentGenerator
This program uses [SMALT](http://www.sanger.ac.uk/science/tools/smalt-0) to align reads to the reference genome, and then 
uses [SAMtools](https://github.com/samtools/samtools) to generate a consensus genome for each read file. 
The alignments of genes are extracted, alignments with gaps removed, and alignments for core and accessory genes are outputted.
There are several additional features that have been added, as described in "Usage".

# Installation

For basic installation (making reference-guided alignments), clone this github repository to your workstation and
install the program RefAligner via pip:
* `pip install ~/go/src/github.com/kussell-lab/ReferenceAlignmentGenerator/RefAlignGenerate`

The following dependencies need to be installed:
* [SMALT](http://www.sanger.ac.uk/science/tools/smalt-0)
* [SAMtools](https://github.com/samtools/samtools)
*  [Parallel](https://www.gnu.org/software/parallel/)
* [sra-tools](https://github.com/ncbi/sra-tools/wiki/01.-Downloading-SRA-Toolkit)

As well as several in-house developed programs found in this repo:
* `go get -u github.com/kussell-lab/ReferenceAlignmentGenerator/GenomicConsensus`
* `go get -u github.com/kussell-lab/ReferenceAlignmentGenerator/FilterGaps`
* `go get -u github.com/kussell-lab/ReferenceAlignmentGenerator/CollectGeneAlignments`
* `go get -u github.com/kussell-lab/ReferenceAlignmentGenerator/SplitGenome`

We have tested this on Mac OS 11.4 and on the NYU HPC (which is Linux-based) using Python 3.8 and 3.9, 
Go version 1.15.7 and 1.16, SMALT 0.7.6, SAMtools 1.11, sra-tools 2.10.9, parallel 20201022

# Basic Usage

After installation, enter `RefAligner --help` into your terminal to see inputs. For an example, see the RUN_ME.sh
file in the "hinfluenzae_example" subdirectory. For large jobs (>500 genomes), 
we recommend doing each of the steps that the RefAligner does separately, because there may be an issue with
one step that creates downstream problems. See the following file for the step-by-step process:

`~/go/src/github.com/kussell-lab/ReferenceAlignmentGenerator/RefAlignGenerate/RefAlignGenerate/RefAligner/cli.py`

# Additional Features

(1) To split XMFA files into XMFA files which only include genes which are in a certain percentage of strains,
(e.g., 50-70% of strains) use the GeneBins program, which can be installed via:
* `go get -u github.com/kussell-lab/ReferenceAlignmentGenerator/GeneBins`

After installation, enter `GeneBins --help` into your terminal to see inputs/outputs.

(2) To measure the frequency of gaps in an XMFA file generated using the RefAligner, use MeasureGaps, which can be installed
via:
* `go get -u github.com/kussell-lab/ReferenceAlignmentGenerator/MeasureGaps`

After installation, enter `MeasureGaps --help` into your terminal for inputs/outputs.

# Example

For an example of how to run RefAligner, see the directory "hinfluenzae_example" in this repo.
To run the example, run the RUN_ME.sh script. Downloads and read mapping are the time limiting step. To run the full 
example takes ~2-3 hours on a standard PC. To skip the download step and run everything else, use the flag 
`--skipdownloads=True`. This should then only take ~5 minutes to run.
Example outputs are given in the folder as well.
The diff you're trying to view is too large. Only the first 1000 changed files have been loaded.
Showing with 0 additions and 0 deletions (0 / 0 diffs computed)
swh spinner

Computing file changes ...

Software Heritage — Copyright (C) 2015–2025, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Contact— JavaScript license information— Web API

back to top