Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def split(x): | |
"""return the index of the first non-negative value in a sorted list: | |
legend for comments: | |
"-" stands for negative | |
"+" stands for non-negative | |
""" | |
# check for corner cases: | |
if len(x)==0: | |
return 0 | |
elif len(x)==1: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install gettext; after installation it outputs LDFLAGS and CPPFLAGS values. | |
brew reinstall gettext | |
# export gettext and conda-specific flags | |
export LDFLAGS="-Wl,-rpath,/Applications/anaconda3/lib/ -L/Applications/anaconda3/lib/ -L/usr/local/opt/gettext/lib" | |
export CPPFLAGS="-I/usr/local/opt/gettext/include" | |
# extract gdb | |
tar xvf gdb-8.1.tar.gz | |
cd gdb-8.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
""" | |
Created on Wed Oct 25 13:44:51 2017 | |
@author: dlituiev | |
""" | |
import os | |
import numpy as np | |
from uuid import uuid1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Created on Wed Oct 25 13:44:51 2017 | |
@author: dlituiev | |
""" | |
import numpy as np | |
import keras | |
from keras import backend as K | |
from keras.layers import (InputLayer, Conv2D, Dense, Activation, | |
AveragePooling2D, GlobalAveragePooling2D) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import numpy as np | |
import keras | |
from keras.models import load_model, Model | |
from keras.layers import Conv2D, MaxPool2D, GlobalAveragePooling2D, Dense, Dropout | |
from keras import backend as K | |
from keras.applications.inception_v3 import InceptionV3 | |
def get_model( | |
dropout=0.5, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
all_cols = ['0_AnatomicRegionSequence_CodeMeaning', | |
'0_AnatomicRegionSequence_CodeValue', | |
'0_AnatomicRegionSequence_CodingSchemeDesignator', | |
'0_ContributingEquipmentSequence_ContributionDateTime', | |
'0_ContributingEquipmentSequence_ContributionDescription', | |
'0_ContributingEquipmentSequence_InstitutionName', | |
'0_ContributingEquipmentSequence_Manufacturer', | |
'0_ContributingEquipmentSequence_StationName', | |
'0_ContributingEquipmentSequence__0_PurposeOfReferenceCodeSequence_CodeMeaning', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dfstr = '''{"FDR":{"0":0.0000001434,"1":0.0974543339,"2":0.5637882089,"3":0.7592318769,"4":0.82376489,"5":0.876232133,"6":0.891150062,"7":0.9234070548,"8":0.9421697501,"9":0.9421697501,"10":0.9534575004,"11":0.9686912495,"12":0.9792339965,"13":0.9800272087,"14":0.9814635178,"15":0.9814635178,"16":0.9822809925,"17":0.9832209543,"18":0.9832209543,"19":0.9832209543,"20":0.0079716299,"21":0.6863477759,"22":0.7846481266,"23":0.8596431336,"24":0.8940558933,"25":0.9071788194,"26":0.9269123036,"27":0.9323909829,"28":0.936505473,"29":0.9477474057,"30":0.9479119432,"31":0.9479119432,"32":0.9479119432,"33":0.9479119432,"34":0.9479179113,"35":0.9577011312,"36":0.9589141116,"37":0.9601000647,"38":0.9614078093,"39":0.9657393252,"40":0.0000000308,"41":0.1179302537,"42":0.6074557222,"43":0.7534315164,"44":0.8290719564,"45":0.8917851883,"46":0.9325332126,"47":0.9495263504,"48":0.9532127733,"49":0.9552555496,"50":0.9594234241,"51":0.9675706204,"52":0.9737916651,"53":0.9767958687,"54":0.9767958687,"55":0.9767958687,"56":0.97679 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import division, print_function | |
import numpy as np | |
import pandas as pd | |
from pysnptools.snpreader import SnpData | |
from pysnptools.kernelreader import KernelData | |
from fastlmm.inference.lmm import LMM | |
def snp_from_pandas(df, pos = None): | |
indiv_ids = zip(df.index.tolist(), ["."] * len(df.index)) | |
snp_ids = [("_".join(["%s"% y for y in x]) if type(x) in (tuple, list) else "%s"% x) for x in df.columns.tolist()] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Test-sra> | |
<Ngs> | |
<Latest> | |
<ncbi-vdb version=""/> | |
<ngs-sdk version=""/> | |
</Latest> | |
<LibManager.properties/> | |
<ncbi-vdb> | |
</ncbi-vdb> | |
<ngs-sdk> |
NewerOlder