Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

alphabetized checksum processing for bigwigs, changed delimiter count… #38

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions scripts/process_collections.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,13 @@ def process_collections(self, cmds_only, mode):
bw_name = self.files[collection_type][dsfile].get(
"name", None
)
bw_id = bw_name.split(".")[-2:]
project_id = ".".join(bw_name.split(".")[1:-2])
#bw_id = bw_name.split(".")[-2:]
#project_id = ".".join(bw_name.split(".")[1:-2])

# count from left side instead
bw_id = bw_name.split(".")[7:]
project_id = ".".join(bw_name.split(".")[1:7])

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"

elif mode == "blast": # for blast
Expand Down Expand Up @@ -595,7 +600,11 @@ def add_collections(self, collection_type, genus, species):
logger.debug(checksum_response)
# print('\nchecksum_response: ', checksum_response,'\n')
if checksum_response: # checksum SUCCESS 200
for line in checksum_response.split("\n"):
sorted_lines = sorted(
(line for line in checksum_response.split("\n") if line.strip()),
key=lambda line: line.split()[1]
)
for line in sorted_lines:
logger.debug(line)
fields = line.split()
if fields: # process if fields exists
Expand Down
Loading