tasks.workflows

Workflow tasks.

Module Contents

Classes

Curate

Run Curation phase.

Annotate

Run Annotation phase.

Repair

Run Repair phase.

Functions

path_reduced_df(data_dir[, df_path, parents])

Build the path to the reduced version of the report.

save_reduced_df(df, data_dir[, df_path, parents])

Save reduced version of the report.

tasks.workflows.path_reduced_df(data_dir, df_path='reduced_df.csv', parents=None)

Build the path to the reduced version of the report.

tasks.workflows.save_reduced_df(df, data_dir, df_path='reduced_df.csv', parents=None)

Save reduced version of the report.

class tasks.workflows.Curate(*args, **kwargs)

Bases: morphology_workflows.utils.StrIndexMixin, data_validation_framework.task.ValidationWorkflow

Run Curation phase.

The complete phase has the following dependency graph:

strict digraph {
	graph [bb="0,0,630.73,504",
		bgcolor=transparent,
		dpi=100,
		fontsize=9,
		layout=dot,
		rankdir=TB,
		size="7.0, 15.0"
	];
	node [fillcolor=white,
		fontname="\"Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans\"",
		fontsize=9,
		height=0.25,
		label="\N",
		shape=box,
		style="setlinewidth(0.5),filled"
	];
	edge [arrowsize=0.5,
		style="setlinewidth(0.5)"
	];
	Curate	[color=red,
		penwidth=1.5,
		pos="330.73,495",
		width=0.75];
	Collect	[URL="../../tasks/curation/index.html#tasks.curation.Collect",
		pos="97.728,9",
		width=0.75];
	Curate -> Collect	[pos="e,81.711,18.053 303.68,493.78 236.09,492.68 62.226,486.31 19.728,450 -2.1846,431.28 0.7282,416.82 0.7282,388 0.7282,388 0.7282,388 \
0.7282,116 0.7282,71.011 48.871,36.802 77.324,20.512"];
	ExtractMarkers	[URL="../../tasks/curation/index.html#tasks.curation.ExtractMarkers",
		pos="97.728,387",
		width=1.1806];
	Curate -> ExtractMarkers	[pos="e,105.49,396.09 303.57,489.77 271.44,484 216.99,471.81 174.73,450 148.8,436.62 123.35,413.67 109.18,399.76"];
	Sanitize	[URL="../../tasks/curation/index.html#tasks.curation.Sanitize",
		pos="347.73,117",
		width=0.75];
	Curate -> Sanitize	[pos="e,345.51,126.17 330.73,485.75 330.73,467.92 330.73,424.44 330.73,388 330.73,388 330.73,388 330.73,224 330.73,190.12 339.3,150.92 \
344.27,131.03"];
	CheckNeurites	[URL="../../tasks/curation/index.html#tasks.curation.CheckNeurites",
		pos="272.73,63",
		width=1.1389];
	Curate -> CheckNeurites	[pos="e,275.34,72.148 325.6,485.84 315.23,468.52 292.73,426.51 292.73,388 292.73,388 292.73,388 292.73,170 292.73,135.96 282.65,96.824 \
276.8,76.986"];
	Recenter	[URL="../../tasks/curation/index.html#tasks.curation.Recenter",
		pos="405.73,171",
		width=0.79167];
	Curate -> Recenter	[pos="e,434.68,172.67 358.04,494.29 404.51,493.67 500.71,487.49 570.73,450 604.53,431.9 630.73,426.35 630.73,388 630.73,388 630.73,388 \
630.73,278 630.73,194.63 502.75,176.72 439.83,172.95"];
	DetectErrors	[URL="../../tasks/curation/index.html#tasks.curation.DetectErrors",
		pos="227.73,387",
		width=1.0278];
	Curate -> DetectErrors	[pos="e,214.15,396.04 303.61,494.92 268.9,494.45 209.91,487.7 181.73,450 168.41,432.19 191.69,411.42 209.71,399.01"];
	PlotMarkers	[URL="../../tasks/curation/index.html#tasks.curation.PlotMarkers",
		pos="62.728,441",
		width=0.94444];
	Curate -> PlotMarkers	[pos="e,97.102,448.67 303.56,488.73 255.99,479.5 157.45,460.38 102.3,449.68"];
	ErrorsReport	[URL="../../tasks/curation/index.html#tasks.curation.ErrorsReport",
		pos="227.73,441",
		width=1.0278];
	Curate -> ErrorsReport	[pos="e,243.71,450.07 314.63,485.88 296.8,476.87 267.97,462.32 248.46,452.47"];
	Align	[URL="../../tasks/curation/index.html#tasks.curation.Align",
		pos="423.73,279",
		width=0.75];
	Curate -> Align	[pos="e,423.52,288.12 344.36,485.99 356.29,478.28 373.17,465.5 382.73,450 414.68,398.18 421.73,323.24 423.29,293.19"];
	Orient	[URL="../../tasks/curation/index.html#tasks.curation.Orient",
		pos="405.73,225",
		width=0.75];
	Curate -> Orient	[pos="e,400.74,234.18 335.85,485.84 346.23,468.52 368.73,426.51 368.73,388 368.73,388 368.73,388 368.73,332 368.73,296.6 387.35,258.08 \
398.17,238.68"];
	EnsureNeuritesOutsideSoma	[URL="../../tasks/curation/index.html#tasks.curation.EnsureNeuritesOutsideSoma",
		pos="518.73,333",
		width=2.0278];
	Curate -> EnsureNeuritesOutsideSoma	[pos="e,529.35,342.08 358,492.48 411.21,488.92 525.94,478.1 551.73,450 573.44,426.34 569.12,408.02 557.73,378 552.87,365.21 542.41,353.74 \
533.54,345.73"];
	Resample	[URL="../../tasks/curation/index.html#tasks.curation.Resample",
		pos="518.73,387",
		width=0.83333];
	Curate -> Resample	[pos="e,525.07,396.16 357.85,492.28 408.34,488.46 513.65,477.32 535.73,450 547.33,435.65 536.86,413.98 527.98,400.43"];
	PlotMorphologies	[URL="../../tasks/curation/index.html#tasks.curation.PlotMorphologies",
		pos="480.73,441",
		width=1.2778];
	Curate -> PlotMorphologies	[pos="e,457.35,450.11 353.84,485.99 380.41,476.78 424.01,461.66 452.55,451.77"];
	ExtractMarkers -> Collect	[pos="e,97.728,18.247 97.728,377.75 97.728,359.92 97.728,316.44 97.728,280 97.728,280 97.728,280 97.728,116 97.728,82.694 97.728,43.501 \
97.728,23.392"];
	Sanitize -> CheckNeurites	[pos="e,284.61,72.24 336.01,107.88 323.32,99.074 302.98,84.975 288.8,75.143"];
	CheckNeurites -> Collect	[pos="e,124.72,18.02 245.77,53.989 214.55,44.713 163.17,29.447 129.9,19.559"];
	Recenter -> Sanitize	[pos="e,356.92,126.24 396.67,161.88 387.02,153.23 371.66,139.46 360.73,129.66"];
	DetectErrors -> CheckNeurites	[pos="e,268.41,72.261 229.43,377.8 232.95,360.04 240.73,316.71 240.73,280 240.73,280 240.73,280 240.73,170 240.73,135.09 256.83,96.365 \
266.19,76.807"];
	PlotMarkers -> ExtractMarkers	[pos="e,92.182,396.24 68.197,431.88 73.866,423.45 82.799,410.18 89.357,400.44"];
	ErrorsReport -> DetectErrors	[pos="e,227.73,396.24 227.73,431.88 227.73,423.76 227.73,411.13 227.73,401.5"];
	Align -> Orient	[pos="e,408.58,234.24 420.92,269.88 418.05,261.6 413.57,248.66 410.22,238.97"];
	Orient -> Recenter	[pos="e,405.73,180.24 405.73,215.88 405.73,207.76 405.73,195.13 405.73,185.5"];
	EnsureNeuritesOutsideSoma -> Align	[pos="e,438.47,288.07 503.88,323.88 487.57,314.95 461.3,300.56 443.31,290.72"];
	Resample -> EnsureNeuritesOutsideSoma	[pos="e,518.73,342.24 518.73,377.88 518.73,369.76 518.73,357.13 518.73,347.5"];
	PlotMorphologies -> Resample	[pos="e,512.71,396.24 486.67,431.88 492.82,423.45 502.52,410.18 509.64,400.44"];
}

(click on steps in the image for more details)

class tasks.workflows.Annotate(*args, **kwargs)

Bases: morphology_workflows.utils.StrIndexMixin, data_validation_framework.task.ValidationWorkflow

Run Annotation phase.

The complete phase has the following dependency graph:

strict digraph {
	graph [bb="0,0,465.23,180",
		bgcolor=transparent,
		dpi=100,
		fontsize=9,
		layout=dot,
		rankdir=TB,
		size="7.0, 15.0"
	];
	node [fillcolor=white,
		fontname="\"Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans\"",
		fontsize=9,
		height=0.25,
		label="\N",
		shape=box,
		style="setlinewidth(0.5),filled"
	];
	edge [arrowsize=0.5,
		style="setlinewidth(0.5)"
	];
	Annotate	[color=red,
		penwidth=1.5,
		pos="188.73,171",
		width=0.80556];
	CollectCurated	[URL="../../tasks/annotation/index.html#tasks.annotation.CollectCurated",
		pos="213.73,9",
		width=1.1528];
	Annotate -> CollectCurated	[pos="e,171.83,12.978 159.64,163.94 97.955,149.82 -36.674,111.48 9.7322,54 29.079,30.035 112.7,18.495 166.7,13.446"];
	MType	[URL="../../tasks/annotation/index.html#tasks.annotation.MType",
		pos="45.732,63",
		width=0.75];
	Annotate -> MType	[pos="e,50.629,72.219 164.53,161.99 144.72,154.67 116.64,142.46 95.732,126 77.772,111.86 62.158,90.127 53.349,76.505"];
	HardLimit	[URL="../../tasks/annotation/index.html#tasks.annotation.HardLimit",
		pos="243.73,63",
		width=0.84722];
	Annotate -> HardLimit	[pos="e,239.44,72.279 193.05,161.68 202.61,143.26 225.62,98.912 237.05,76.875"];
	ApicalPoint	[URL="../../tasks/annotation/index.html#tasks.annotation.ApicalPoint",
		pos="123.73,63",
		width=0.91667];
	Annotate -> ApicalPoint	[pos="e,116.78,72.124 159.73,163.55 139.91,157.47 115.07,146.17 102.73,126 93.036,110.15 104.29,89.251 113.69,76.222"];
	CutLeaves	[URL="../../tasks/annotation/index.html#tasks.annotation.CutLeaves",
		pos="361.73,63",
		width=0.86111];
	Annotate -> CutLeaves	[pos="e,360.87,72.109 217.93,168.83 250.97,166 304.5,156.61 337.73,126 351.67,113.16 357.6,91.284 360.07,77.246"];
	PlotApicalPoint	[URL="../../tasks/annotation/index.html#tasks.annotation.PlotApicalPoint",
		pos="153.73,117",
		width=1.1528];
	Annotate -> PlotApicalPoint	[pos="e,159.28,126.24 183.26,161.88 177.59,153.45 168.66,140.18 162.1,130.44"];
	PlotCutLeaves	[URL="../../tasks/annotation/index.html#tasks.annotation.PlotCutLeaves",
		pos="425.73,117",
		width=1.0972];
	Annotate -> PlotCutLeaves	[pos="e,389.04,126.05 217.79,163.62 259.41,154.49 336.23,137.64 383.95,127.17"];
	PlotHardLimit	[URL="../../tasks/annotation/index.html#tasks.annotation.PlotHardLimit",
		pos="290.73,117",
		width=1.0694];
	Annotate -> PlotHardLimit	[pos="e,274.91,126.07 204.67,161.88 222.33,152.87 250.88,138.32 270.2,128.47"];
	MType -> CollectCurated	[pos="e,187.82,18.02 71.614,53.989 101.58,44.713 150.9,29.447 182.85,19.559"];
	HardLimit -> CollectCurated	[pos="e,218.49,18.24 239.04,53.875 234.23,45.529 226.67,32.42 221.06,22.702"];
	ApicalPoint -> CollectCurated	[pos="e,199.77,18.068 137.79,53.875 153.25,44.945 178.14,30.564 195.18,20.717"];
	CutLeaves -> CollectCurated	[pos="e,236.8,18.106 338.93,53.989 312.72,44.779 269.69,29.661 241.53,19.768"];
	PlotApicalPoint -> CollectCurated	[pos="e,209.05,18.279 158.44,107.68 168.87,89.26 193.97,44.912 206.44,22.875"];
	PlotApicalPoint -> ApicalPoint	[pos="e,128.49,72.24 149.04,107.88 144.23,99.529 136.67,86.42 131.06,76.702"];
	PlotCutLeaves -> CollectCurated	[pos="e,255.42,15.171 424.96,107.79 423.26,94.433 417.93,68.086 401.73,54 380.93,35.909 309.23,22.9 260.64,15.911"];
	PlotCutLeaves -> CutLeaves	[pos="e,371.87,72.24 415.73,107.88 404.99,99.149 387.85,85.218 375.76,75.399"];
	PlotHardLimit -> CollectCurated	[pos="e,235.83,18.125 291.77,107.63 292.9,94.977 293.32,70.675 282.73,54 272.95,38.591 255.61,27.566 240.76,20.406"];
	PlotHardLimit -> HardLimit	[pos="e,251.18,72.24 283.39,107.88 275.71,99.377 263.56,85.941 254.74,76.175"];
}

(click on steps in the image for more details)

class tasks.workflows.Repair(*args, **kwargs)

Bases: morphology_workflows.utils.StrIndexMixin, data_validation_framework.task.ValidationWorkflow

Run Repair phase.

The complete phase has the following dependency graph:

strict digraph {
	graph [bb="0,0,624,396",
		bgcolor=transparent,
		dpi=100,
		fontsize=9,
		layout=dot,
		rankdir=TB,
		size="7.0, 15.0"
	];
	node [fillcolor=white,
		fontname="\"Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans\"",
		fontsize=9,
		height=0.25,
		label="\N",
		shape=box,
		style="setlinewidth(0.5),filled"
	];
	edge [arrowsize=0.5,
		style="setlinewidth(0.5)"
	];
	Repair	[color=red,
		penwidth=1.5,
		pos="305,387",
		width=0.75];
	CollectAnnotated	[URL="../../tasks/repair/index.html#tasks.repair.CollectAnnotated",
		pos="207,9",
		width=1.3056];
	Repair -> CollectAnnotated	[pos="e,159.77,13.669 277.66,384.8 233.85,381.98 146.07,372.67 79,342 38.409,323.44 0,324.63 0,280 0,280 0,280 0,116 0,46.588 93.353,22.599 \
154.68,14.329"];
	FixZeroDiameters	[URL="../../tasks/repair/index.html#tasks.repair.FixZeroDiameters",
		pos="131,63",
		width=1.3194];
	Repair -> FixZeroDiameters	[pos="e,115.64,72.229 277.93,381.24 210.05,368.52 38,331.25 38,280 38,280 38,280 38,170 38,126.03 83.778,91.58 111.1,74.937"];
	Unravel	[URL="../../tasks/repair/index.html#tasks.repair.Unravel",
		pos="313,171",
		width=0.75];
	Repair -> Unravel	[pos="e,314.38,180.2 308.47,377.75 311.93,369.04 317.01,354.83 319,342 327.96,284.27 319.49,214.26 315.18,185.41"];
	SmoothDiameters	[URL="../../tasks/repair/index.html#tasks.repair.SmoothDiameters",
		pos="169,117",
		width=1.3611];
	Repair -> SmoothDiameters	[pos="e,174.26,126.14 280.97,377.98 263.64,371.02 240.93,359.33 227,342 208.94,319.54 208,308.82 208,280 208,280 208,280 208,224 208,188.39 \
188.37,149.96 176.97,130.63"];
	RepairNeurites	[URL="../../tasks/repair/index.html#tasks.repair.RepairNeurites",
		pos="451,225",
		width=1.1528];
	Repair -> RepairNeurites	[pos="e,467.39,234.12 332.11,381.95 377.31,373.58 466.88,349.67 505,288 517.28,268.13 491.8,248.33 471.82,236.63"];
	PlotSmoothDiameters	[URL="../../tasks/repair/index.html#tasks.repair.PlotSmoothDiameters",
		pos="123,171",
		width=1.5833];
	Repair -> PlotSmoothDiameters	[pos="e,124.16,180.35 277.98,381.48 253.25,376.04 217.07,364.66 194,342 147.83,296.67 130.29,216.82 124.97,185.32"];
	PlotRepair	[URL="../../tasks/repair/index.html#tasks.repair.PlotRepair",
		pos="381,279",
		width=0.86111];
	Repair -> PlotRepair	[pos="e,378.32,288.16 315.83,377.88 326.15,369.7 341.63,356.29 352,342 363.22,326.55 371.78,306.07 376.6,292.96"];
	MakeCollage	[URL="../../tasks/repair/index.html#tasks.repair.MakeCollage",
		pos="588,333",
		width=1];
	Repair -> MakeCollage	[pos="e,551.69,340.67 332.14,381.01 381.82,371.88 487.71,352.43 546.49,341.63"];
	FinalCheck	[URL="../../tasks/repair/index.html#tasks.repair.FinalCheck",
		pos="463,279",
		width=0.90278];
	Repair -> FinalCheck	[pos="e,451.1,288.04 317.18,377.91 330.43,369.1 352.24,354.57 371,342 397.55,324.2 428.33,303.43 446.71,291.01"];
	MakeRelease	[URL="../../tasks/repair/index.html#tasks.repair.MakeRelease",
		pos="273,333",
		width=1.0278];
	Repair -> MakeRelease	[pos="e,278.07,342.24 300,377.88 294.86,369.53 286.8,356.42 280.82,346.7"];
	FixZeroDiameters -> CollectAnnotated	[pos="e,194.96,18.24 142.88,53.875 155.74,45.074 176.34,30.975 190.71,21.143"];
	Unravel -> CollectAnnotated	[pos="e,212.52,18.33 307.6,161.85 290.31,135.75 236.24,54.134 215.35,22.606"];
	Unravel -> SmoothDiameters	[pos="e,191.45,126.11 290.82,161.99 265.42,152.82 223.79,137.79 196.39,127.89"];
	SmoothDiameters -> CollectAnnotated	[pos="e,204.82,18.12 172.77,108 176.82,99.263 183.29,84.807 188,72 194.12,55.359 199.9,35.726 203.44,23.082"];
	SmoothDiameters -> FixZeroDiameters	[pos="e,137.02,72.24 163.06,107.88 156.91,99.453 147.21,86.181 140.09,76.438"];
	RepairNeurites -> CollectAnnotated	[pos="e,216.28,18.136 441.73,215.87 404.29,183.03 264.1,60.076 220.22,21.591"];
	RepairNeurites -> Unravel	[pos="e,334.51,180.11 429.74,215.99 405.4,206.82 365.51,191.79 339.25,181.89"];
	PlotSmoothDiameters -> FixZeroDiameters	[pos="e,126.05,72.067 119.35,161.95 114.45,150.1 106.82,127.29 111,108 113.43,96.791 118.97,85.007 123.6,76.459"];
	PlotSmoothDiameters -> SmoothDiameters	[pos="e,161.71,126.24 130.19,161.88 137.7,153.38 149.59,139.94 158.23,130.18"];
	PlotRepair -> Unravel	[pos="e,318.31,180.28 375.66,269.68 363.8,251.18 335.16,206.54 321.08,184.6"];
	PlotRepair -> RepairNeurites	[pos="e,439.91,234.24 391.94,269.88 403.68,261.15 422.44,247.22 435.66,237.4"];
	MakeCollage -> RepairNeurites	[pos="e,472.87,234.02 583.05,323.84 574.96,311.03 557.78,286 538,270 519.84,255.31 495.97,243.67 477.83,236.06"];
	FinalCheck -> RepairNeurites	[pos="e,452.9,234.24 461.12,269.88 459.23,261.68 456.28,248.89 454.05,239.24"];
	MakeRelease -> FixZeroDiameters	[pos="e,165.06,72.007 269.47,323.93 262.15,306.45 246,263.6 246,226 246,226 246,226 246,170 246,141.18 245.99,129.68 227,108 212.19,91.088 \
189.55,80.283 169.97,73.614"];
	MakeRelease -> Unravel	[pos="e,310.92,180.33 275.04,323.85 281.51,297.96 301.63,217.47 309.65,185.39"];
	MakeRelease -> FinalCheck	[pos="e,433.7,288.02 302.27,323.99 336.3,314.68 392.4,299.32 428.52,289.44"];
}

(click on steps in the image for more details)

make_release

Set to True to make a morpology release with neurondb.xml

Type:

bool

Default value:

True

report_config