Skip to content

Commit

Permalink
Merge branch 'fix-hub-supertracks' into fix-refactor-designip
Browse files Browse the repository at this point in the history
  • Loading branch information
alsmith151 committed Apr 22, 2024
2 parents ef48a19 + 779330d commit 86978ba
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions seqnado/workflow/rules/hub.smk
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,16 @@ def get_hub_params(config):
"subgroup_by": config["ucsc_hub_details"].get(
"subgroup_by",
[
"pileup_method",
"method",
"norm"
],
),
"supergroup_by": config["ucsc_hub_details"].get("supergroup_by", None),
"supergroup_by": config["ucsc_hub_details"].get("supergroup_by", "ext"),
}

if ASSAY == "RNA":
hub_params["overlay_by"] = ["samplename", "pileup_method", "norm"]
hub_params["subgroup_by"] = ["samplename", "pileup_method", "norm", "strand"]
hub_params["overlay_by"] = ["samplename", "method", "norm"]
hub_params["subgroup_by"] = ["method", "norm", "strand"]

return hub_params

Expand Down
4 changes: 2 additions & 2 deletions seqnado/workflow/scripts/create_hub.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ def get_rna_samplename(path: str):

elif snakemake.params.assay == "ATAC":
df["samplename"] = df["fn"].str.extract(r".*/(.*)\.(?:bigBed|bigWig)")
df["pileup_method"] = df["fn"].apply(lambda x: x.split("/")[-3])
df["method"] = df["fn"].apply(lambda x: x.split("/")[-3])
df["norm"] = df["fn"].apply(lambda x: x.split("/")[-2])

elif snakemake.params.assay == "RNA":
df["samplename"] = df["fn"].apply(get_rna_samplename)
df["pileup_method"] = df["fn"].apply(lambda x: x.split("/")[-3])
df["method"] = df["fn"].apply(lambda x: x.split("/")[-3])
df["strand"] = np.where(df["fn"].str.contains("_plus.bigWig"), "plus", "minus")
df["norm"] = df["fn"].apply(lambda x: x.split("/")[-2])

Expand Down

0 comments on commit 86978ba

Please sign in to comment.