This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Tool: snpflip finds reverse and ambiguous strand SNPs

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

can I only use autosomal chromosomes in bim file?

0 answers

No answers yet.

Log in to answer this question.