tasks.workflows

Workflow tasks.

Module Contents

Classes

Fetch

Fetch morphologies from the given source.

Curate

Run Curation phase.

Annotate

Run Annotation phase.

Repair

Run Repair phase.

Functions

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

Save 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.Fetch(*args, **kwargs)

Bases: morphology_workflows.tasks.fetch.FetchMorphologies

Fetch morphologies from the given source.

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

Bases: data_validation_framework.task.ValidationWorkflow

Run Curation phase.

The complete phase has the following dependency graph:

strict digraph {
	graph [bb="0,0,708,504",
		bgcolor=transparent,
		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="349,495",
		width=0.75];
	Collect	[URL="../../tasks/curation/index.html#tasks.curation.Collect",
		pos="81,9",
		width=0.75];
	Curate -> Collect	[pos="e,68.344,18.225 321.7,492.56 256.8,488.73 95.266,476.72 49,450 18.587,432.43 0,423.12 0,388 0,388 0,388 0,116 0,74.137 40.38,38.547 \
64.118,21.241"];
	ExtractMarkers	[URL="../../tasks/curation/index.html#tasks.curation.ExtractMarkers",
		pos="81,387",
		width=1.1806];
	Curate -> ExtractMarkers	[pos="e,73.085,396.13 321.97,494.2 256.28,494.04 91.11,489.64 57,450 44.445,435.41 58.429,413.52 69.705,400.03"];
	Sanitize	[URL="../../tasks/curation/index.html#tasks.curation.Sanitize",
		pos="462,117",
		width=0.75];
	Curate -> Sanitize	[pos="e,434.85,121.65 321.81,491.15 269.94,484.06 162,460.58 162,388 162,388 162,388 162,224 162,167.76 351.78,133.93 429.45,122.43"];
	CheckNeurites	[URL="../../tasks/curation/index.html#tasks.curation.CheckNeurites",
		pos="517,63",
		width=1.1389];
	Curate -> CheckNeurites	[pos="e,558.44,68.576 376.08,493.08 443.82,490.34 618.66,480.44 667,450 694.95,432.4 708,421.04 708,388 708,388 708,388 708,170 708,104.1 \
620.01,78.828 563.47,69.388"];
	Recenter	[URL="../../tasks/curation/index.html#tasks.curation.Recenter",
		pos="462,171",
		width=0.79167];
	Curate -> Recenter	[pos="e,462,180.25 369.46,485.9 402.03,471.5 462,438.17 462,388 462,388 462,388 462,278 462,244.69 462,205.5 462,185.39"];
	DetectErrors	[URL="../../tasks/curation/index.html#tasks.curation.DetectErrors",
		pos="595,387",
		width=1.0278];
	Curate -> DetectErrors	[pos="e,611.76,396.12 376.45,494.35 444.03,494.56 615.56,490.98 651,450 666.86,431.67 638.15,410.85 616.3,398.6"];
	PlotMarkers	[URL="../../tasks/curation/index.html#tasks.curation.PlotMarkers",
		pos="100,441",
		width=0.94444];
	Curate -> PlotMarkers	[pos="e,134.22,449.15 321.88,488.34 277.77,479.12 190.29,460.86 139.34,450.22"];
	PlotErrors	[URL="../../tasks/curation/index.html#tasks.curation.PlotErrors",
		pos="520,441",
		width=0.83333];
	Curate -> PlotErrors	[pos="e,493.63,450.02 375.34,485.99 405.85,476.71 456.05,461.45 488.57,451.56"];
	ErrorsReport	[URL="../../tasks/curation/index.html#tasks.curation.ErrorsReport",
		pos="605,441",
		width=1.0278];
	Curate -> ErrorsReport	[pos="e,567.93,449.53 376.4,488.44 421.13,479.35 510.15,461.27 562.94,450.54"];
	Align	[URL="../../tasks/curation/index.html#tasks.curation.Align",
		pos="369,279",
		width=0.75];
	Curate -> Align	[pos="e,369.98,288.25 353.42,485.86 357.84,477.24 364.34,463.1 367,450 378.6,392.78 373.47,322.49 370.54,293.49"];
	Orient	[URL="../../tasks/curation/index.html#tasks.curation.Orient",
		pos="407,225",
		width=0.75];
	Curate -> Orient	[pos="e,409.22,234.17 360.39,485.81 381.37,469.66 424,431.51 424,388 424,388 424,388 424,332 424,298.12 415.43,258.92 410.46,239.03"];
	EnsureNeuritesOutsideSoma	[URL="../../tasks/curation/index.html#tasks.curation.EnsureNeuritesOutsideSoma",
		pos="274,333",
		width=2.0278];
	Curate -> EnsureNeuritesOutsideSoma	[pos="e,263.38,342.08 321.7,488.87 299.02,483.2 267.56,471.81 249,450 227.87,425.17 223.44,408.48 235,378 239.85,365.21 250.32,353.74 \
259.19,345.73"];
	Resample	[URL="../../tasks/curation/index.html#tasks.curation.Resample",
		pos="274,387",
		width=0.83333];
	Curate -> Resample	[pos="e,267.84,396.24 321.59,489.06 299.92,483.56 271.07,472.32 257,450 247.35,434.69 256.74,413.91 264.92,400.73"];
	PlotMorphologies	[URL="../../tasks/curation/index.html#tasks.curation.PlotMorphologies",
		pos="312,441",
		width=1.2778];
	Curate -> PlotMorphologies	[pos="e,317.86,450.24 343.22,485.88 337.23,477.45 327.78,464.18 320.85,454.44"];
	ExtractMarkers -> Collect	[pos="e,81,18.247 81,377.75 81,359.92 81,316.44 81,280 81,280 81,280 81,116 81,82.694 81,43.501 81,23.392"];
	Sanitize -> CheckNeurites	[pos="e,508.29,72.24 470.59,107.88 479.66,99.301 494.05,85.701 504.4,75.915"];
	CheckNeurites -> Collect	[pos="e,108.15,13.238 475.98,57.108 389.86,46.837 191.74,23.207 113.57,13.884"];
	Recenter -> Sanitize	[pos="e,462,126.24 462,161.88 462,153.76 462,141.13 462,131.5"];
	DetectErrors -> CheckNeurites	[pos="e,524.65,72.042 591.99,377.88 585.76,360.3 572,317.29 572,280 572,280 572,280 572,170 572,132.22 544.13,94.519 528.07,75.925"];
	PlotMarkers -> ExtractMarkers	[pos="e,84.011,396.24 97.031,431.88 94.009,423.6 89.279,410.66 85.738,400.97"];
	PlotErrors -> Recenter	[pos="e,468.67,180.21 518.69,431.78 515.98,413.99 510,370.6 510,334 510,334 510,334 510,278 510,241.5 486.09,203.72 472.02,184.65"];
	PlotErrors -> DetectErrors	[pos="e,583.12,396.24 531.72,431.88 544.41,423.07 564.75,408.98 578.93,399.14"];
	ErrorsReport -> DetectErrors	[pos="e,596.58,396.24 603.44,431.88 601.86,423.68 599.4,410.89 597.55,401.24"];
	Align -> Orient	[pos="e,400.98,234.24 374.94,269.88 381.09,261.45 390.79,248.18 397.91,238.44"];
	Orient -> Recenter	[pos="e,453.29,180.24 415.59,215.88 424.66,207.3 439.05,193.7 449.4,183.91"];
	EnsureNeuritesOutsideSoma -> Align	[pos="e,354.26,288.07 288.84,323.88 305.16,314.95 331.43,300.56 349.42,290.72"];
	Resample -> EnsureNeuritesOutsideSoma	[pos="e,274,342.24 274,377.88 274,369.76 274,357.13 274,347.5"];
	PlotMorphologies -> Resample	[pos="e,280.02,396.24 306.06,431.88 299.91,423.45 290.21,410.18 283.09,400.44"];
}
class tasks.workflows.Annotate(*args, **kwargs)

Bases: 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,
		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"];
}
class tasks.workflows.Repair(*args, **kwargs)

Bases: data_validation_framework.task.ValidationWorkflow

Run Repair phase.

The complete phase has the following dependency graph:

strict digraph {
	graph [bb="0,0,546.7,342",
		bgcolor=transparent,
		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="241,333",
		width=0.75];
	CollectAnnotated	[URL="../../tasks/repair/index.html#tasks.repair.CollectAnnotated",
		pos="241,9",
		width=1.3056];
	Repair -> CollectAnnotated	[pos="e,193.96,10.508 213.82,332.17 150.8,331.01 0,318.56 0,226 0,226 0,226 0,116 0,34.091 118.09,14.914 188.94,10.78"];
	FixZeroDiameters	[URL="../../tasks/repair/index.html#tasks.repair.FixZeroDiameters",
		pos="424,63",
		width=1.3194];
	Repair -> FixZeroDiameters	[pos="e,447.23,72.073 268.21,331.4 331.97,329.44 488.53,321.27 527,288 548.8,269.15 546,254.82 546,226 546,226 546,226 546,170 546,120.46 \
487.96,88.829 451.95,73.972"];
	Unravel	[URL="../../tasks/repair/index.html#tasks.repair.Unravel",
		pos="175,171",
		width=0.75];
	Repair -> Unravel	[pos="e,161.89,180.01 213.82,332.72 179.72,331.97 122.39,324.87 95,288 66.908,250.19 126.32,203.64 157.51,182.88"];
	SmoothDiameters	[URL="../../tasks/repair/index.html#tasks.repair.SmoothDiameters",
		pos="241,117",
		width=1.3611];
	Repair -> SmoothDiameters	[pos="e,212.07,126.06 213.8,328.34 173.15,322.25 99.65,308.64 84,288 47.081,239.31 90.892,199.67 139,162 159.24,146.15 186.06,134.87 207.12,\
127.71"];
	RepairNeurites	[URL="../../tasks/repair/index.html#tasks.repair.RepairNeurites",
		pos="318,225",
		width=1.1528];
	Repair -> RepairNeurites	[pos="e,318.5,234.37 260.99,323.93 276.08,316.77 296,304.83 307,288 316.53,273.43 318.46,253 318.56,239.63"];
	PlotSmoothDiameters	[URL="../../tasks/repair/index.html#tasks.repair.PlotSmoothDiameters",
		pos="241,279",
		width=1.5833];
	Repair -> PlotSmoothDiameters	[pos="e,241,288.24 241,323.88 241,315.76 241,303.13 241,293.5"];
	PlotRepair	[URL="../../tasks/repair/index.html#tasks.repair.PlotRepair",
		pos="135,279",
		width=0.86111];
	Repair -> PlotRepair	[pos="e,151.45,288.07 224.44,323.88 206,314.83 176.17,300.19 156.08,290.34"];
	MakeCollage	[URL="../../tasks/repair/index.html#tasks.repair.MakeCollage",
		pos="390,279",
		width=1];
	Repair -> MakeCollage	[pos="e,366.77,288.11 263.95,323.99 290.35,314.78 333.66,299.66 362.01,289.77"];
	MakeRelease	[URL="../../tasks/repair/index.html#tasks.repair.MakeRelease",
		pos="481,279",
		width=1.0278];
	Repair -> MakeRelease	[pos="e,443.84,288.05 268.06,326.14 309.66,317.12 389.66,299.79 438.88,289.13"];
	FixZeroDiameters -> CollectAnnotated	[pos="e,269.22,18.02 395.81,53.989 363.03,44.675 308.99,29.321 274.21,19.437"];
	Unravel -> CollectAnnotated	[pos="e,234.64,18.078 175.02,161.74 175.27,149.62 176.64,126.47 183,108 194.5,74.565 218.24,40.017 231.5,22.229"];
	Unravel -> SmoothDiameters	[pos="e,230.54,126.24 185.31,161.88 196.39,153.15 214.07,139.22 226.53,129.4"];
	SmoothDiameters -> CollectAnnotated	[pos="e,241,18.279 241,107.68 241,89.415 241,45.655 241,23.435"];
	SmoothDiameters -> FixZeroDiameters	[pos="e,395.78,72.02 269.19,107.99 301.97,98.675 356.01,83.321 390.79,73.437"];
	RepairNeurites -> CollectAnnotated	[pos="e,247.25,18.117 317.7,215.87 316.77,196.57 313.07,146.75 299,108 286.93,74.766 263.42,40.138 250.34,22.283"];
	RepairNeurites -> Unravel	[pos="e,197.29,180.11 295.97,215.99 270.75,206.82 229.41,191.79 202.2,181.89"];
	PlotSmoothDiameters -> SmoothDiameters	[pos="e,241,126.33 241,269.85 241,243.96 241,163.47 241,131.39"];
	PlotSmoothDiameters -> RepairNeurites	[pos="e,306.05,234.07 253.03,269.88 266.14,261.02 287.19,246.81 301.76,236.97"];
	PlotRepair -> Unravel	[pos="e,171.88,180.28 138.14,269.68 145.06,251.34 161.69,207.28 170.04,185.15"];
	PlotRepair -> RepairNeurites	[pos="e,289.78,234.02 163.19,269.99 195.97,260.68 250.01,245.32 284.79,235.44"];
	MakeCollage -> RepairNeurites	[pos="e,329.41,234.24 378.75,269.88 366.67,261.15 347.38,247.22 333.78,237.4"];
	MakeRelease -> FixZeroDiameters	[pos="e,426.17,72.136 478.84,269.87 470.19,237.43 438.13,117.04 427.47,77.024"];
	MakeRelease -> Unravel	[pos="e,202.06,175.66 469.12,269.93 449.25,256.78 407.63,230.73 369,216 314.03,195.04 246.31,182.49 207.16,176.44"];
	MakeRelease -> RepairNeurites	[pos="e,343.14,234.02 455.89,269.99 426.81,260.71 378.96,245.45 347.96,235.56"];
}
make_release

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

Type

bool

Default value

True

report_config