Giter Site home page Giter Site logo

ck7 / compare-sets Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 1.0 1.45 MB

The program compares two sets of DNA sequences (provided as FASTA files) and returns the percent of sequences in each set that align to sequences in the other set. It also provides alignment information for each sequence.

License: GNU General Public License v3.0

Perl 100.00%

compare-sets's Introduction

compare-sets

The program compares two sets of DNA sequences (provided as FASTA files) and returns the percent of sequences in each set that align to sequences in the other set. It also provides alignment information for each sequence. I wrote this program a while ago and later discovered this paper which was published in 2015 and takes a similar approach to genome comparison: https://academic.oup.com/nar/article/43/14/6761/2903001

Requirements

The program requires perl, bioperl and MUMmer (http://mummer.sourceforge.net/)

Usage

compare-sets.pl -1 <set1-scafs> -2 <set2-scafs> -o <out-prefix> [--silent] [-p <% identity threshold>]

Where

  • set1-scafs is a DNA fasta file (genome, metagenome etc)
  • set2-scafs is a second DNA fasta file
  • out-prefix is the prefix for all output files (see below)
  • --silent: No output at all except for error messages
  • % identity threshold is the % identity that will be used to determine similarity (0..100, default: 96)

Output

compare-sets.pl will generate these files:

  • <out-prefix>.coors, .delta - output for the Mummer programs
  • <out-prefix>.report.txt - alignment report for each sequence. File looks as follows:
### GCF_001546235.1_ASM154623v1_genomic.fna ###

NZ_KQ955959.1	152422	90615	59.4
NZ_KQ955951.1	99091	86459	87.2
NZ_KQ955947.1	4015	0	0
NZ_KQ955953.1	2668	0	0
NZ_KQ955960.1	2545	2544	100
:
NZ_KQ955949.1	4452	0	0

1949214/2358436 (82.6%) are covered in GCF_001546235.1_ASM154623v1_genomic.fna

### GCF_002076055.1_Bbif1891B_genomic.fna ###

NZ_NAQG01000030.1	5942	0	0
NZ_NAQG01000014.1	8932	0	0
NZ_NAQG01000012.1	327702	285050	86.9
NZ_NAQG01000029.1	2039	595	29.1
NZ_NAQG01000003.1	8677	8005	92.2
:
NZ_NAQG01000015.1	22174	489	2.2

1977267/2418976 (81.7%) are covered in GCF_002076055.1_Bbif1891B_genomic.fna

Fields for each sequence are

<sequence-name> <sequence-length> <Number of bps covered by sequences from the other set> <% of bps covered by sequences from the other file>

Example

Download the example files, change directory to the example directory and use the following command line to generate the example output files:

compare-sets.pl -1 GCF_001546235.1_ASM154623v1_genomic.fna -2 GCF_002076055.1_Bbif1891B_genomic.fna -o comparison -p 90

compare-sets's People

Contributors

ck7 avatar

Stargazers

Prasert Yodsawat avatar

Watchers

James Cloos avatar  avatar

Forkers

fischuu

compare-sets's Issues

Total percentage of similarity

Good program! Please tell me how you can calculate the total percentage of similarity between the two sets? And as I understand it, you can import the results of targeted sequencing into the program (for example 16S, g23)?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.