Skip to content

Commit

Permalink
fix: temporary fix of the missing dwi key
Browse files Browse the repository at this point in the history
  • Loading branch information
celprov committed Jan 16, 2024
1 parent 24f786a commit 214e90a
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions mriqc/reports/group.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ def gen_html(csv_file, mod, csv_failed=None, out_file=None):
None,
),
],
"dwi": [],
}

if csv_file.suffix == ".csv":
Expand All @@ -208,13 +209,9 @@ def gen_html(csv_file, mod, csv_failed=None, out_file=None):
)

id_labels = list(set(BIDS_COMP) & set(dataframe.columns.ravel().tolist()))
dataframe["label"] = dataframe[id_labels].apply(
_format_labels, args=(id_labels,), axis=1
)
dataframe["label"] = dataframe[id_labels].apply(_format_labels, args=(id_labels,), axis=1)
else:
dataframe = pd.read_csv(
csv_file, index_col=False, sep="\t", dtype={"bids_name": object}
)
dataframe = pd.read_csv(csv_file, index_col=False, sep="\t", dtype={"bids_name": object})
dataframe = dataframe.rename(index=str, columns={"bids_name": "label"})

nPart = len(dataframe)
Expand Down Expand Up @@ -271,9 +268,7 @@ def gen_html(csv_file, mod, csv_failed=None, out_file=None):
)
).read(),
"d3_js": open(
pkgrf(
"mriqc", op.join("data", "reports", "embed_resources", "d3.min.js")
)
pkgrf("mriqc", op.join("data", "reports", "embed_resources", "d3.min.js"))
).read(),
"boxplots_css": open(
pkgrf(
Expand Down

0 comments on commit 214e90a

Please sign in to comment.