editmsa

A collection of scripts for editing and manipulating multiple sequence alignment files.

https://github.com/cdcgov/editmsa

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (8.0%) to scientific vocabulary

Keywords

cdc-influenza-division ncird-id
Last synced: 6 months ago · JSON representation ·

Repository

A collection of scripts for editing and manipulating multiple sequence alignment files.

Basic Info
  • Host: GitHub
  • Owner: CDCgov
  • License: apache-2.0
  • Language: Perl
  • Default Branch: master
  • Homepage:
  • Size: 88.9 KB
Statistics
  • Stars: 1
  • Watchers: 6
  • Forks: 2
  • Open Issues: 0
  • Releases: 0
Topics
cdc-influenza-division ncird-id
Created almost 2 years ago · Last pushed about 1 year ago
Metadata Files
Readme License Citation

README.md

Edit MSA

A collection of scripts for editing multiple sequence alignments, usually in FASTA format. Some functionality may exist for downstream processes and may not be generally useful.

For direct correspondence, feel free to contact: Samuel S. Shepard (vfn4@cdc.gov), Centers for Disease Control and Prevention

Overview

| Script | Author | Description | Notes | | ---------------------- | ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------- | | codonCorrect.pl | S. S. Shepard | Corrects insertions (given by the TSV) and deletions to be in-frame using the MSA stats. | Deprecated. | | codonCorrectStats.pl | S. S. Shepard | Corrects insertions (given by the TSV) and deletions to be in-frame using user-supplied statistics in Perl storable format. | Used by dais-ribosome (GitHub pending). | | displayStats.pl | S. S. Shepard | Useful for displaying the codon-weight matrix used by codonCorrectStats.pl. | Uses Perl storable format. | | storeStats.pl | S. S. Shepard | Takes an MSA and produces a codon-weight matrix in Perl storable format. | Format used by codonCorrectStats.pl | | fillSequences.pl | S. S. Shepard | Re-inserts insertions from a TSV (ID / Position / Insert) back into the MSA. | | | ordinalHeaders.pl | S. S. Shepard | Changes FASTA headers to an ordinal S#. Has various options for annotating. | | | removeGapColumns.pl | S. S. Shepard | Various options for dealing with gap columns in an MSA, including K-tons. | Overwrites in-place | | reviseTaxa.pl | S. S. Shepard | Revises annotation taxa in an MSA. | A component of the LABEL MS | | shiftAlignment.pl | S. S. Shepard | Shifts alignments to the left or right at a particular region. Useful for gaps before manual editing. || | sortFASTA.pl | S. S. Shepard | Sorts the FASTA file by the header or a designatd set of fields. | | | stripSequences.pl | S. S. Shepard | Strips unwanted characters from a FASTA file. | FASTA may be unaligned after this operation. | | treeOrderedFasta.pl | S. S. Shepard | Orders the FASTA file using a provided Newick where IDs or headers match. || | diceAlignment.pl | S. S. Shepard | Chops alignment at specified region into a de-duplicated MSA for editing and downstream splicing. | Used in tandem with spliceAlignment.pl | | spliceAlignment.pl | S. S. Shepard | Takes the manually edited miniNT or miniAA file and splices it back into a full nucleotide alignment. | Used in tandem with diceAlignment.pl |

Usage

For up-to-date usages, run perl <script.pl> with no arguments. Example usage for each script:

```bash

codonCorrect.pl

Usage: perl codonCorrect.pl [options] --insertion-table|-I Insertion table for insertion corrections. --output-table|-O Output file for the insertion table.

codonCorrectStats.pl

Usage: perl codonCorrectStats.pl [options] --stats|-S Input file for storable object. Default: none --delim|-D Delimiter for header fields. --field|-F Comma-delimited set of fields to use for group. Default: no group. --insertion-table|-I Insertion table for insertion corrections. --output-table|-O Output file for the insertion table.

diceAlignment.pl

Usage: perl diceAlignment.pl <...> -P|--prefix Prefix used for output. -B|--begin Begin coordinate. -E|--end End coordinate. -R|--shift-right Shift alignment right. -T|--translate Translate data as well. -C|--sort-by-count Sort data by their cluster counts.

displayStats.pl

Usage: perl displayStats.pl [options] --verbose|V Make display verbose.

fillSequences.pl

Usage: perl fillSequences.pl [-F|--fill-triplets]

ordinalHeaders.pl

Usage: perl ordinalHeaders.pl [-A] [-H] [-N ] [-O ]

removeGapColumns.pl

Usage: perl removeGapColumns.pl [options] -D|-display-k-tons Displays sequences where for columns with 0 < bases <= K. -T|-tab-formatted Print out tab-delimited data. -S|-show-column-support Show column support.

reviseTaxa.pl

Usage: perl reviseTaxa.pl [OPTIONS] [-M ] --confirm-prediction|-C Confirm predicted annotations. --delete-prev|-D Delete previous annotations where there are two. --delete-single|-S Delete previous annotations where there is one, filters AFTER delete-prev. --find|-F Select sequences including this annotation. --replace|-R Replace the annotation with TEXT. --add-annot|-A Add annotations based on tab delimited file (ID ANNOT). --ignore-fasta-annot|-G Ignores previous annotation on FASTA headers vs. annotation file. --fuzzy-match|-Z Searches for IDs in FASTA (-A option), matching if header contains the ID. --order-mode|-O Annotation with ordinals for truncated names. --match-files|-M Output filenames containing annotation names in the input file. --previous-infix|N Suffix and prefix only apply to a 'previous' or first of a doublet annotation. --prefix|-P Prefix for matching filenames with annotations OR adds prefix to header. --suffix|-X Suffix for matching filenames with annotations OR adds suffix to header. --in-place|-I Revise files in-place (could be dangerous). --join-to-end|-J Join annotation to end of the header (similar to add but without a file). --last-field|-L Clips the last field of the header and turns it into an annotation. Uses the specified delimiter to determine fields. --append-pipe-annot|-p Appends annotation as a header field with pipe delim.

shiftAlignment.pl

Usage: perl shiftAlignment.pl <...> -B|--begin Begin coordinate. -E|--end End coordinate. -R|--shift-right Shift alignment right.

sortFASTA.pl

Usage: perl sortFASTA.pl [FASTA ...] [OPTIONS] -C|--case-sensitive Ignore case. read if no FASTA given.

spliceAlignment.pl

Usage: perl spliceAlignment.pl [options] -F|--fill-missing Fill missing data with gaps rather than excluding. -A|--amino-acid-msa Amino acid alignment. -P|--prefix Prefix used for AAtoNT file output. -S|--splice-now Output the splice without further editing of the AAtoNT file.

storeStats.pl

Usage: perl storeStats.pl [options] --output|-O Output file for storable object. Default: STDOUT --delim|-D Delimiter for header fields. Default delim is '|'. --field|-F Comma-delimited set of fields to use for group. Default: no group.

stripSequences.pl

Usage: stripSequences.pl {-N|-L|} -N|--remove-bad-bases Removes invalid nucleotide characters from the sequence. -L|--strip-lower Removes lowercase letters from the sequence. -F|--fix-header Removes and replaces troublesome characters from the FASTA header.

treeOrderedFasta.pl

Usage: treeOrderedFasta.pl [-Q|--quoted-ids] ```

If you spot a bug in the usage, please file an issue or make a PR to this repo.

Installation

  1. Install Perl 5. If you are running MacOS or Linux you likely already have it. No, you don't need a container, package manager, venv, or Conda. Perl is aggressively backwards compatible and ubiquitous.
  2. Clone this repo.

Notices

Copyright is public domain but attributions to the original authors are welcomed. The software license uses ASL2.

Public Domain Standard Notice

This repository constitutes a work of the United States Government and is not subject to domestic copyright protection under 17 USC § 105. This repository is in the public domain within the United States, and copyright and related rights in the work worldwide are waived through the CC0 1.0 Universal public domain dedication. All contributions to this repository will be released under the CC0 dedication. By submitting a pull request you are agreeing to comply with this waiver of copyright interest.

License Standard Notice

The repository utilizes code licensed under the terms of the Apache Software License and therefore is licensed under ASL v2 or later.

This source code in this repository is free: you can redistribute it and/or modify it under the terms of the Apache Software License version 2, or (at your option) any later version.

This source code in this repository is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Apache Software License for more details.

You should have received a copy of the Apache Software License along with this program. If not, see http://www.apache.org/licenses/LICENSE-2.0.html

The source code forked from other open source projects will inherit its license.

Contributing Standard Notice

Anyone is encouraged to contribute to the repository by forking and submitting a pull request. (If you are new to GitHub, you might start with a basic tutorial.) By contributing to this project, you grant a world-wide, royalty-free, perpetual, irrevocable, non-exclusive, transferable license to all users under the terms of the Apache Software License v2 or later.

All comments, messages, pull requests, and other submissions received through CDC including this GitHub page may be subject to applicable federal law, including but not limited to the Federal Records Act, and may be archived. Learn more at http://www.cdc.gov/other/privacy.html.

Records Management Standard Notice

This repository is not a source of government records, but is a copy to increase collaboration and collaborative potential. All government records will be published through the CDC web site.

Owner

  • Name: Centers for Disease Control and Prevention
  • Login: CDCgov
  • Kind: organization
  • Email: data@cdc.gov
  • Location: Atlanta, GA

CDC's collaborative software projects to protect America from health, safety, and security threats, both foreign and in the U.S.

Citation (CITATION.bib)

@software{EditMSA_SWC,
  author = {Shepard, Samuel S.},
  month = {05},
  title = {{Edit MSA: a mini software collection}},
  url = {https://github.com/CDCgov/editMSA},
  version = {1.0.0},
  year = {2024}
}

GitHub Events

Total
  • Fork event: 1
  • Create event: 1
Last Year
  • Fork event: 1
  • Create event: 1

Issues and Pull Requests

Last synced: 11 months ago

All Time
  • Total issues: 0
  • Total pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 0
  • Total pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels