Skip to content

Commit

Permalink
updated naming entries for resources object to fix bug with only one …
Browse files Browse the repository at this point in the history
…paf object. #28
  • Loading branch information
ctcncgr committed Aug 22, 2023
1 parent 5ef4b38 commit 1e0bb15
Showing 1 changed file with 21 additions and 17 deletions.
38 changes: 21 additions & 17 deletions scripts/process_collections.py
Original file line number Diff line number Diff line change
Expand Up @@ -526,26 +526,30 @@ def add_collections(self, collection_type, genus, species):
{"assembly": parent1},
{"assembly": parent2},
],
"tracks": [],
"tracks": [paf_lookup.replace(".gz", "")],
}
]
}
dotplot_url = f"{self.jbrowse_url}/?config=config.json&session=spec-{dotplot_view}" # build the URL for the resource
dotplot_data = {
"name": f"JBrowse2 {lookup}",
"URL": str(dotplot_url).replace(
"'", "%22"
), # url encode for .yml file and Jekyll linking
"description": "JBrowse2 Dotplot View",
} # the object that will be written into the .yml file
if strain_lookup not in self.infraspecies_resources:
self.infraspecies_resources[
strain_lookup
] = [] # initialize infraspecies list within species
if self.jbrowse_url: # dont add data if no jbrowse url set
self.infraspecies_resources[strain_lookup].append(
dotplot_data
) # add data for later writing in resources
dotplot_url = f"{self.jbrowse_url}/?config=config.json&session=spec-{dotplot_view}" # build the URL for the resource
dotplot_data = {
"name": f"JBrowse2 {paf_lookup}",
"URL": str(dotplot_url).replace(
"'", "%22"
), # url encode for .yml file and Jekyll linking
"description": "JBrowse2 Dotplot View",
} # the object that will be written into the .yml file
if strain_lookup not in self.infraspecies_resources:
self.infraspecies_resources[
strain_lookup
] = (
[]
) # initialize infraspecies list within species
if (
self.jbrowse_url
): # dont add data if no jbrowse url set
self.infraspecies_resources[strain_lookup].append(
dotplot_data
) # add data for later writing in resources
readme_url = f"{self.datastore_url}/{collection_dir}README.{name}.yml" # species collection readme
readme_response = None
if from_github:
Expand Down

0 comments on commit 1e0bb15

Please sign in to comment.