Mercurial > repos > yating-l > hubarchivecreatortest
diff util/index/ExternIndex.py @ 3:fa990284327b draft default tip
planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit ac73da32d59853ca563e7939d05016a6f3a6899e-dirty
| author | yating-l |
|---|---|
| date | Mon, 30 Oct 2017 11:58:31 -0400 |
| parents | 85195e0d4b71 |
| children |
line wrap: on
line diff
--- a/util/index/ExternIndex.py Fri Sep 29 14:50:50 2017 -0400 +++ b/util/index/ExternIndex.py Mon Oct 30 11:58:31 2017 -0400 @@ -13,48 +13,4 @@ @abc.abstractmethod def setExtLink(self): """set external link""" - - - - - ''' - @staticmethod - def setExtLink(database, inputFile, extra_settings, seqType=None, useIframe=True, iframeHeight=None, iframeWidth=None): - if "NCBI" in database: - if not seqType: - seqType = int(ExternIndex.getSeqType(inputFile)) - else: - seqType = seqType - if seqType < 0: - print seqType - raise Exception("Sequence Type is not set for bigPsl. Stopping the application") - if seqType == 2: - extra_settings["url"] = "https://www.ncbi.nlm.nih.gov/protein/$$" - elif seqType == 1: - extra_settings["url"] = "https://www.ncbi.nlm.nih.gov/nuccore/$$" - else: - raise Exception("Sequence Type {0} is not valid for bigPsl. Stopping the application".format(seqType)) - elif "UniProt" in database: - extra_settings["url"] = "http://www.uniprot.org/uniprot/$$" - elif "FlyBase" in database: - extra_settings["url"] = "http://flybase.org/reports/$$" - else: - extra_settings["url"] = "https://www.ncbi.nlm.nih.gov/gquery/?term=$$" - extra_settings["urlLabel"] = database + " Details:" - if useIframe: - extra_settings["iframeUrl"] = extra_settings["url"] - if not iframeHeight: - iframeHeight = "600" - if not iframeWidth: - iframeWidth = "800" - extra_settings["iframeOptions"] = "height= %s width= %s" % (iframeHeight, iframeWidth) - - @staticmethod - def getSeqType(inputFile): - with open(inputFile, "r") as bigpsl: - sampleSeq = bigpsl.readline().split() - if len(sampleSeq) == 25: - return sampleSeq[-1] - else: - return "-1" - ''' \ No newline at end of file + \ No newline at end of file
