| 1 |
#!/bin/bash |
| 2 |
|
| 3 |
# Public domain notice for all NCBI EDirect scripts is located at: |
| 4 |
# https://www.ncbi.nlm.nih.gov/books/NBK179288/#chapter6.Public_Domain_Notice |
| 5 |
|
| 6 |
# efetch -db snp -id 104894914,104894915,104894916,11549407 -format docsum | |
| 7 |
# snp2hgvs | hgvs2spdi | spdi2tbl |
| 8 |
|
| 9 |
xtract -transform <( echo -e "Genomic\t1\nCoding\t2\nProtein\t3\n" ) \ |
| 10 |
-pattern SPDI -GENE Gene -pfx "rs" -RSID Id \ |
| 11 |
-group Variant -def "-" \ |
| 12 |
-element "&RSID" Accession Position Deleted Inserted Class Type "&GENE" -translate Class -deq "\n" | |
| 13 |
sort-table -k 2,2V -k 3,3n -k 1.3n -k 9,9n -k 5,5f | cut -f 1-8 | uniq |