Esempio n. 1
0
    def __init__(self, dbname, dbuser, dbpass, wsuser, wspass, variant_url,
                 gbm_url):
        # input is the CMS database name, user, and password and the
        # GeneInsight web service user, password, and urls to
        # both the Variant and genomeBuildMapping wsdls

        # init database utility for geneinsight queries, connect to db
        self.db = gi_util.CMS_DB(dbname, dbuser, dbpass)

        # init GeneInsight class to query with web service for variant entries
        self.gi_variant = Variant(wsuser, wspass, variant_url)

        # init GeneInsight class to query with web service for transcript ids
        self.gbm_ws = gi_util.GI_GenomeBuildMapping(wsuser=wsuser,
                                                    wspass=wspass,
                                                    wsurl=gbm_url)
Esempio n. 2
0
# input is a chromosome, start position, end position

# test values
#chrom=13
#start=20763342
#end=20763342

wsurl = "https://geneinsight-lmm-ws.partners.org/services/GenomeBuildMapping?wsdl"
wsuser = "******"
wspass = "******"

try:
    chrom = sys.argv[1]
    start = sys.argv[2]
    end = sys.argv[3]
except:
    print "usage: gi_tid_by_region.py chromosome start_position end_position\ntest region: chrom=13, start=20763342, end=20763342"
    exit(0)

gi_obj = gi_util.GI_GenomeBuildMapping(wsurl=wsurl,
                                       wsuser=wsuser,
                                       wspass=wspass)
tid = gi_obj.transcript_id(chrom, start, end)

if tid is None:
    print "No transcript id found."
else:
    print tid

exit(0)
Esempio n. 3
0
parser.add_argument("--start", help="Start position (required)")
parser.add_argument("--end", help="End position (required)")
parser.add_argument(
    "-w",
    "--wsdl",
    help="GeneInsight Variant WSDL (optional)(default GI 5.0 prod)",
    default=default_gbm_wsdl)
parser.add_argument("-u",
                    "--user",
                    help="GeneInsight username (optional)(default lmm)",
                    default=default_user)
parser.add_argument("-p",
                    "--password",
                    help="GeneInsight password",
                    default=default_pass)

args = parser.parse_args()

if not args.chr or not args.start or not args.end:
    raise Exception("coordinates required.  missing chromosome, start, end")

#connect to geneinsight
gi_gbm = gi_util.GI_GenomeBuildMapping(wsurl=args.wsdl,
                                       wsuser=args.user,
                                       wspass=args.password)

info = gi_gbm.region_info(args.chr, args.start, args.end)
print str(info)

exit(0)