Code Monkey home page Code Monkey logo

snipsa's Introduction

SNIPSA

A small project experimenting with SNP genome data and python.

snipsa-gui.py

Windows: unzip the windows release package and start snipsa.bat in the main folder. The zip includes python, all dependencies and SNP databases. Thanks to TPN for the preinstalled python package.

Linux: install dependencies and run snipsa-gui.py.

Experimental bam alignment file support is now enabled by default.

FTDNA project files can be imported. Go to project DNA Results->Classic Chart, set Page Size to a big number, load the new page and Save as.

haploy_find.py

This small tool reads a raw SNP data file and lists Y chromosome haplogroup information. You must first initialize the mutation database with haploy_db_import.py. The tool lists all the haplogroup related mutations found in the database, sorted roughly by age of the mutation.

./haploy_find.py <file>

The tool accepts also multiple files. This can be used to search haplogroups among the files, using the common haplogroup name (separated by comma) or mutation name as the search key.

./haploy_find.py N1a1,I2,L287 <files>...

haploy_db_import.py

This script imports the ISOGG database to the internal format that is used by haploy_find.py. It needs CrossMap (pip3 install CrossMap), conversion chain file (crossmap/GRCh38_to_NCBI36.chain.gz) and the ISOGG spreadsheet in csv format ('SNP Index - Human.csv'). Outputs a haploy_map.txt file which is used by haploy_find.py. See haploy.py for details on other required input files.

haploy_anno_import.py

This example script is used to import your own annotations that can be attached to the reported tree nodes. As an example the script will import YFull person IDs, and also some selected FTDNA project files. Open project chart tables in a browser, select page size so that everything fits in one page, and edit the corresponding lines at the end of the script. Snipsa will load any files starting with haploy_annodb. An example file is included.

haplomt_find.py

This small tool reads a raw SNP data file and lists MT chromosome haplogroup information. You must first initialize the mutation database with haplomt_db_import.py. The tool finds paths in the mutation tree and displays best matches.

./haplomt_find.py <file>

The tool accepts also multiple files. This can be used to search haplogroups among the files, using the common haplogroup name (separated by comma) or mutation name as the search key.

./haplomt_find.py 0 <files>...

haplomt_db_import.py

This script imports the PhyloTree.org mtDNA database file in (https://www.phylotree.org/builds/mtDNA_tree_Build_17.zip) to the internal format. Experimental support for yfull.com mtree import. Outputs a haplomt_map.txt file which is used by haplomt_find.py. See haplomt.py for details.

snipsa's People

Contributors

alinja avatar teepean avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

snipsa's Issues

pyliftover.py

After installing repo dependencies
'npm install ${https://github.com/alinja/snipsa.git}

up to date, audited 2 packages in 986ms

1 high severity vulnerability'

I have pyliftover.py installed in this PC (Kubuntu 23) but I don't see pyliftover in your repo

(base) miqrom@miqrom-HP-Compaq-Elite-8300-SFF:~/snipsa$ ./snipsa-gui.py
Traceback (most recent call last):
File "/home/miqrom/snipsa/./snipsa-gui.py", line 15, in
import bamload
File "/home/miqrom/snipsa/bamload.py", line 10, in
from pyliftover import LiftOver
ModuleNotFoundError: No module named 'pyliftover'

No such file or directory

Hello,
The application gives error as below.

ubuntu@ubuntu:~/snipsa$ python3 haploy_find.py raw.csv
Loading DB2...
Traceback (most recent call last):
File "haploy_find.py", line 54, in
haploy.load_db2j(min_tree_load_level=min_tree_load_level)
File "/home/ubuntu/snipsa/haploy.py", line 732, in load_db2j
with open(fname, 'r') as f:
FileNotFoundError: [Errno 2] No such file or directory: 'haploy_map2j.txt'

ubuntu@ubuntu:~/snipsa$ sudo python3 haploy_db_import.py
Loading SNP DB from ISOGG csv...
Traceback (most recent call last):
File "haploy_db_import.py", line 11, in
haploy.load_snp()
File "/home/ubuntu/snipsa/haploy.py", line 474, in load_snp
with open('SNP Index - Human.csv') as f:
FileNotFoundError: [Errno 2] No such file or directory: 'SNP Index - Human.csv'

HOW UPDATE

Hello
How Update snp database:
haploy_db_import.py
Does not work
Thanks

Positions missing from haploy_map2.txt

For example this location on SNP Index - Human.csv

S211,I1a2a1a1d1a~,L1301,,16787539,14675659,A->G S211,R1b1a1b1a1a2b1c1,Z142,,16787539,14675659,A->G

After importing haploy_map.txt still includes the first line:

{'m': 'S211', 'mall': 'S211, S211, Z142', 'g': 'I1a2a1a1d1a~', 'rs': '', 'b37': '16787539', 'b38': '14675659', 'p': 'G', 'b36': '15296933'}

But it is missing from haploy_map2.txt

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.