@@ -198,33 +198,13 @@ def process_collections(self, cmds_only, mode):
198
198
199
199
if mode == "jbrowse" : # for jbrowse
200
200
if url .endswith ("bw" ):
201
-
202
- # print("\nCollection_type:dsfile: \n: ",self.files[collection_type][dsfile])
203
-
204
201
bw_name = self .files [collection_type ][dsfile ].get (
205
202
"name" , None
206
203
)
207
204
bw_id = bw_name .split ("." )[- 2 :]
208
205
project_id = "." .join (bw_name .split ("." )[1 :- 2 ])
209
-
210
- # cmd = f'jbrowse add-track {bw_name} --assemblyNames {name} --out {os.path.abspath(self.out_dir)} --load copy --force'
211
206
cmd = f"jbrowse add-track { url } --name { bw_id [0 ]} --assemblyNames { parent [0 ]} --category expression,{ project_id } --out { os .path .abspath (self .out_dir )} --force"
212
- #cmd = f"jbrowse add-track {self.from_github}/{genus}/{species}/expression/{project_id}/{bw_name} --name {bw_id[0]} --assemblyNames {parent[0]} --load copy --out {os.path.abspath(self.out_dir)} --force"
213
- """
214
- dis_name = self.files[collection_type][dsfile].get(
215
- "name", None
216
- )
217
- print("disname is: ", dis_name)
218
- # path = (f'{self.from_github}/{genus}/{species}/expression/')
219
- if os.path.exists(f'{self.from_github}/{genus}/{species}/expression/'):
220
- print("Directory exists!")
221
- for fname in os.listdir(f'{self.from_github}/{genus}/{species}/expression/'):
222
- # looks at for bigwigs of matching strain:
223
- if fname.endswith(f'{dis_name}.bw'):
224
- print("\n Found big wig: ", fname, "\n ")
225
- cmd = f'jbrowse add-track {self.from_github}/{genus}/{species}/expression/{fname} --assemblyNames {name} --out {os.path.abspath(self.out_dir)} --force'
226
- else: continue
227
- """
207
+
228
208
elif mode == "blast" : # for blast
229
209
continue # Not blastable at the moment
230
210
@@ -238,23 +218,6 @@ def process_collections(self, cmds_only, mode):
238
218
cmd , shell = True , executable = "/bin/bash"
239
219
): # execute cmd and check exit value = 0
240
220
logger .error (f"Non-zero exit value: { cmd } " )
241
- """
242
- if os.path.exists(f'{self.from_github}/{genus}/{species}/expression/'):
243
- dis_name = self.files[collection_type][dsfile].get("name", None)
244
- for fname in os.listdir(f'{self.from_github}/{genus}/{species}/expression/'):
245
-
246
-
247
- if fname.endswith(f'{dis_name}.bw'):
248
-
249
- print("\n Bigwig file found: ", fname, "\n ")
250
- # captures display name to match with potential bigwig files
251
-
252
- cmd2 = f'jbrowse add-track {self.from_github}/{genus}/{species}/expression/{fname} --assemblyNames {name} --load copy --out {os.path.abspath(self.out_dir)} --force'
253
- if subprocess.check_call(
254
- cmd2, shell=True, executable="/bin/bash"
255
- ):
256
- logger.error(f'Couldn\' t add bigwig')
257
- """
258
221
259
222
def populate_jbrowse2 (self , out_dir , cmds_only = False ):
260
223
"""Populate jbrowse2 config object from collected objects"""
@@ -705,7 +668,7 @@ def add_collections(self, collection_type, genus, species):
705
668
), # url encode for .yml file and Jekyll linking
706
669
"description" : "JBrowse2 Linear Genome View" ,
707
670
} # the object that will be written into the .yml file
708
- # print(f"linear data: {linear_data}")
671
+
709
672
if strain_lookup not in self .infraspecies_resources :
710
673
self .infraspecies_resources [strain_lookup ] = (
711
674
[]
0 commit comments