Commit caa47e70 authored by Eric CHARPENTIER's avatar Eric CHARPENTIER 🐍
Browse files

added cow genome. Fixed reading track names for ensembl

parent db0d99aa
......@@ -34,7 +34,8 @@ def getLastBuildForSpecies(species):
switcher = {
"human":"hg38",
"rat": "rn6",
"mouse": "mm10"
"mouse": "mm10",
"cow": "bosTau9"
}
if(not species in switcher):
......@@ -50,7 +51,9 @@ def getEnsemblFolderForSpecies(species):
switcher = {
"human":"homo_sapiens",
"rat": "rattus_norvegicus",
"mouse": "mus_musculus"
"mouse": "mus_musculus",
"cow":"bos_taurus"
}
if(not species in switcher):
......@@ -255,7 +258,12 @@ def processEnsembl(fastaString, fastaOut, annotOut):
# Split track name by ' '. Transcript ID is on 1st field, gene symbol is on 7th field.
ls = line.decode("utf-8").split(" ")
fastaMod += ls[0]+"\n"
geneName = ls[6].split(":")[1].rstrip('\n')
geneField = 1
for i in range(1,len(ls)):
if(ls[i].startswith("gene:")):
geneField = i
break
geneName = ls[geneField].split(":")[1].rstrip('\n')
if(not geneName in gene2transcripts):
gene2transcripts[geneName] = set()
gene2transcripts[geneName].add(ls[0][1:])
......@@ -280,9 +288,9 @@ def addERCC(fout):
parser = argparse.ArgumentParser()
parser.add_argument('-p', '--provenance', help='Provenance of the reference transcriptome to be downloaded (default : %(default)s).', required=False, default='refseq', choices=['refseq','gencode','ensembl'], dest='provenance')
parser.add_argument('-s', '--species', help='Species of the reference transcriptome to be downloaded (default: %(default)s). If you need another species, you\'re going to have to build your reference manually. Have a look at this page: https://gitlab.univ-nantes.fr/bird_pipeline_registry/srp-pipeline/-/wikis/usage/reference', choices=['human','mouse','rat'], default='human', dest='species')
parser.add_argument('-s', '--species', help='Species of the reference transcriptome to be downloaded (default: %(default)s). If you need another species, you\'re going to have to build your reference manually. Have a look at this page: https://gitlab.univ-nantes.fr/bird_pipeline_registry/srp-pipeline/-/wikis/usage/reference', choices=['human','mouse','rat','cow'], default='human', dest='species')
parser.add_argument('-r', '--reference-dir', metavar='DIR', help='Directory where the new reference will be built (default : %(default)s).', required=False, default='REF', dest='refdir')
parser.add_argument('-n', '--name', help='Name of the new reference (default to standard last build name according to chosen species. Ex: hg38,mm10,rn6). This name should be the same specified in the samplesheet describing the samples.', required=False, dest='refname')
parser.add_argument('-n', '--name', help='Name of the new reference (default to standard last build name according to chosen species. Ex: hg38,mm10,rn6,bosTau9). This name should be the same specified in the samplesheet describing the samples.', required=False, dest='refname')
parser.add_argument('-u', '--use-proxy', help='Use univ-nantes proxy', required=False, type=bool, default=False, dest='proxy')
args = parser.parse_args()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment