Tool:snpflip finds reverse and ambiguous strand SNPs
0
1
Entering edit mode
9.3 years ago

snpflip

snpflip

Report reverse and ambiguous strand SNPs.
(Visit github.com/endrebak/snpflip for examples and help.)

Usage:
    snpflip --fasta-genome=FA --bim-file=BIM [--output-prefix=PRE]
    snpflip --help

Arguments:
    -f FA --fasta-genome=FA     fasta genome
    -b BIM --bim-file=BIM       plink bed file (extended variant information)

Options:
    -h --help                   show this message
    -o PRE --output-prefix=PRE  the prefix of the output-files
                                (./snpflip_output/<bim_basename> by default)

Note:
    To enable snpflip to match the chromosomes in the `.bim` and `.fa` files, the
    chromosomes in the `.bim` file must be called `1, 2, ... X, Y, M`
    while the chromosomes in the fasta file must be called the same, or
    `chr1, chr2, ... chrX, chrY, chrM`

Example

$ cat example_files/example.fa
>chr1
ACT
>chr2
CCC
>chrY
ACT

$ cat example_files/example.bim
1 snp1 0 1 A C
1 snp2 0 2 A T
1 snp3 0 3 A G
2 snp4 0 1 A G
2 esv5 0 2 AA G
Y snp6 0 2 A G

$ snpflip -b examples/example.bim -f \
examples/example.fa -op extended_example

$ head extended_example.annotated_bim
chromosome  snp_name    genetic_distance    position    allele_1    allele_2    reference   reference_rev   strand
1   snp1    0   1   A   C   A   T   forward
1   snp2    0   2   A   T   C   G   ambiguous
1   snp3    0   3   A   G   T   A   reverse
2   snp4    0   1   A   G   C   G   reverse
2   esv5    0   2   AA  G   C   G   reverse
Y   snp6    0   2   A   G   C   G   reverse

$ head extended_example.ambiguous
snp2

$ head extended_example.reverse
snp3
snp4
esv5
snp6

Install

pip install snpflip
SNP strand • 4.6k views
ADD COMMENT
0
Entering edit mode

can I only use autosomal chromosomes in bim file?

ADD REPLY

Login before adding your answer.

Traffic: 1883 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6