Applied AI-Powered Bioinformatics Tools

eDNA Contamination QC Checker

Last reviewed

Beginner

What you'll learn

~45 min
  • Ask an AI tool, in plan mode, for a small program that reads a run's sequence variant table (read counts for each variant in every field sample and control) and its sample sheet, and lists what needs a look before a species list goes back
  • Give it your project's analysis plan rules for which controls apply to which sample and what counts as needing a look, and read its plan for them
  • Check its lists against counts worked out for the practice run
  • See why subtracting a control's count can drop one doubtful detection and keep another, and who decides what is reported

The story, and what you will end up with

It is Monday 16 November 2026. You manage a university laboratory that sequences environmental DNA (eDNA), the traces of DNA that animals leave in water, for field projects. A project sent eight filtered-water samples from four ponds and streams, two filters from each, collected over two days in October. Your lab extracted the DNA, amplified the stretch of DNA the project’s marker targets, sequenced the run, and put the reads through the lab’s established pipeline, the analysis software your lab already uses to turn reads into a table of sequence variants with taxon names. The run’s quality checks are done, the reads per sample have been looked at, and the positive control gave plenty of reads of its own taxon, so the PCR worked. What else turned up in it is part of the step that is left.

One step is left before any species list goes back to the project’s investigators: looking at what turned up in the run’s controls (the blanks and PCR negatives, which should hold no DNA, and the positive control, which should hold only its own taxon) beside what turned up in the field samples. You have done it by eye in a spreadsheet. A small program that does the same arithmetic the same way on every run is quicker, and it works through every row of a long table the same way.

By the end of this lesson you will have that program, the control check, on your own computer. It reads the run’s variant table and the sample sheet and lists what turned up in each control, and which field detections need a look under the rules in the project’s analysis plan. It removes, subtracts and decides nothing. You build it by asking your AI tool in plain English, and you check it against counts this lesson gives you.

The control check does none of the pipeline’s work. Turning raw reads into sequence variants and naming them is done by the pipeline before this lesson starts; the control check reads the table the pipeline already made.

🔍Words used in this lessonclick to expand
  • Sequence variant (ASV): one exact DNA sequence the pipeline found in the run, with a row of its own in the table and a code such as ASV04.
  • Read count: how many sequencing reads of a variant were assigned to a sample.
  • Detection: in this lesson, a variant with one read or more in a field sample. An analysis plan may set a minimum number of reads; this practice plan does not.
  • Field blank: clean water taken to the site and filtered with the same equipment on the same day as the field samples.
  • Extraction blank: a tube put through the DNA extraction with no sample in it.
  • PCR negative: a PCR reaction with water instead of DNA. Also called a no-template control, so these are named NTC1 and NTC2.
  • Positive control: DNA of a known taxon put through the PCR on purpose. In this run it is an invented sea fish that cannot be in fresh water.
  • Controls that apply to a sample: the controls the analysis plan compares that sample with; in this practice plan, the ones rule 1 lists.
  • Analysis plan: the document, agreed with the project before the run, that says how the lab handles reads in controls and what is reported.

Before you start

First, if your AI tool is still open, leave it: type /exit and press Enter (if you use Antigravity, press Ctrl+D with nothing typed instead), and wait until you see the $ or % prompt. The next line goes there, in the terminal, not in the AI tool. It makes a folder for this lesson beside your practice folder and goes into it:

Terminal window
mkdir -p ~/bio-workbench/15-edna-qc && cd ~/bio-workbench/15-edna-qc

Start your AI tool with the start line you kept from the setup lesson, the one with approval prompts off. Then ask it to set the folder up:

Set this folder up so we can undo any change you make, download https://learn.intellimetrics.net/starters/biotech/15/edna-run.zip and unpack it into a data folder, and save a checkpoint.

Look for it saying three things: the folder is set up with Git (the program that saves snapshots, from setup), two files are in the data folder (asv-table.csv and samples.csv), and a first snapshot, your checkpoint, is saved. Later you can ask whether the files have changed since then. If it does not mention one of them, ask: “Did you save a checkpoint with the files in it?” It may also keep the zip file in the data folder, which is fine; if it says it kept one somewhere outside this folder, ask it to delete that copy. If the download does not work, download edna-run.zip in your browser, check where it went (the browser’s list of downloads shows the folder), and tell your AI tool, for example: “edna-run.zip is in my Downloads folder. Unpack that one file into a data folder here, and save a checkpoint.” In Windows PowerShell or a desktop app, “my Downloads folder” works as is; only say “my Windows Downloads folder” if you use Ubuntu (WSL) on Windows, which keeps its own Downloads folder apart from Windows.

The box below says what is in the practice files; later steps refer to them.

ℹWhat is in edna-run.zipclick to expand

Two files, each of which opens in a spreadsheet program.

samples.csv is the lab’s sample sheet: one row for each column of the variant table, saying what it is, its site, its field day, its extraction batch and its well on the PCR plate.

CodeWhat it isField dayExtraction batchPlate well
S01, S02Field samples, Fenmarrow Pool13 OctoberEXT1A1, A2
S03, S04Field samples, Coldbrake Reach13 OctoberEXT1A3, A4
FB1Field blank13 OctoberEXT1A5
EB1Extraction blankEXT1A6
S05, S06Field samples, Ashwend Inlet14 OctoberEXT2A7, A8
S07, S08Field samples, Linnetmoor Pond14 OctoberEXT2A9, A10
FB2Field blank14 OctoberEXT2A11
EB2Extraction blankEXT2A12
NTC1, NTC2PCR negativesB1, B2
POSPositive controlB12

asv-table.csv is the pipeline’s table: one row for each of twelve sequence variants, ASV01 to ASV12, with its taxon label (such as “invented crayfish”) and its read count in each of the fifteen columns above. The rows that matter most in this lesson:

VariantTaxonWhere it has reads
ASV01invented minnow Aevery field sample, 960 to 3,120; PCR negative NTC1 4; positive control 11
ASV04invented suckerS03 6,240; S04 5,110; S01 28; extraction blank EB1 41
ASV08invented crayfishS07 9,812; S08 7,655; S06 14; positive control 5
ASV09invented reef fish, the positive control’s taxonPOS 22,400; S05 6
ASV10invented farm animalEB2 63; NTC1 12; no field sample
ASV11invented minnow CS06 1,480; S05 1,010; S02 19; S07 19; field blank FB1 25
ASV06invented frogS06 1,210; S05 880; S08 640; field blank FB2 7

PCR negative NTC2 has no reads of anything. A pipeline’s table may carry each variant’s sequence as well; this one leaves it out.

The project has told your lab that the invented crayfish, ASV08, is of management concern to it: a detection at a new site would matter to the people who manage those waters.

Everything in these files is made up for this course: the project, its sites, every taxon (each labelled “invented”), sample and count; no real sample or run produced them. Each lesson in this track has its own practice files, with their own people and dates.

ℹThe project's analysis plan: control rulesclick to expand

These are this practice project’s own rules, numbers included. Your project’s own analysis plan is the one that governs.

  • Rule 1. The controls that apply to a field sample are the field blank from its field day, the extraction blank from its extraction batch, and both PCR negatives.
  • Rule 2. A field detection needs a look when its reads are no more than the largest count of the same variant in the controls that apply to it.
  • Rule 3. A field detection needs a look when its reads are under 1% of the same variant’s largest count in any one field sample of the run.
  • Rule 4. Any read of the positive control’s taxon in a field sample needs a look.
  • Rule 5. The lab reports to the project with the species list, the control table and every detection that needed a look, with what was decided about each and by whom. The lab manager decides with the project’s investigators.

Switch to plan mode

Your AI tool is already open. Switch to plan mode now: Shift+Tab until it says plan, or /plan (the keys for each tool). In plan mode it usually reads your files, asks its questions and shows you a plan before it builds anything; the order can vary.

The conversation

Each message below is an example. Say it your own way.

Say what you want

Say what you do, which files to use, and what you want from them:

I manage an eDNA lab. For each run, I want a tool showing what turned up in our controls and which field detections need a look, from files like those in data. Ask me what you need first.

Your AI tool usually reads both files and comes back with questions. It may also point out some of the cases in the box above, such as the reads in the blanks or the reef fish in S05.

Give it the plan’s rules

The rules come from the project’s analysis plan, not from your AI tool’s suggestions, so give them whether or not it asks, in your own words, for example:

From our analysis plan: compare each field sample with its own day's field blank, its own batch's extraction blank, and both PCR negatives.

Wait for its reply, then send what needs a look in a second message:

Flag a field detection if its reads are no more than the largest count in those controls or under 1% of that variant's biggest field count, or if it is ASV09, our positive control's own variant. List them; change nothing.

Wait for its reply, then say what you want to see beside them:

Show each sample's total reads, and beside each flagged detection, the same variant's reads in the other filter from its site.

Answer its questions

Answer each in a sentence. These are questions the tools often ask, with one way to answer each. Yours may ask them in a different order or show a list of choices:

If it asksYou might say
A page, a spreadsheet, or output in the terminal?A page I can open in my browser and print. I run it myself.
Do you have written rules, or should it propose its own?Use our analysis plan’s rules, the ones I just gave you.
Which controls cover which samples?The ones in the analysis plan rules I just gave you.
Are the two filters from a site replicates?Field replicates, each extracted separately, one PCR each. List each on its own.
Is the positive control always the same taxon?It can change, so I’ll name it each run. This run it’s ASV09.
What counts as the positive control passing?Its own taxon came through, so the PCR worked. List everything else in it.
Should it look for spillover between neighbouring wells?No rule for that. Show each sample’s plate well.
Will every run’s files look like these?The same two files and columns, one plate per run.
Only flag, or also write a cleaned table?Only flag. Change nothing; I decide with the project’s investigators.
Who reviews the flags, and what is recorded?I do, with the project’s investigators. I record the decisions myself.
On one computer, or shared?On my computer only.
The other filter: from the same site on the same day only?Same day only is fine.

If it asks several questions at once, answer the ones about which controls apply, what needs a look and what is reported from the project’s analysis plan, a sentence each, and accept its suggestions only about how the results look. If you cannot tell which kind a question is, treat it as a rule. If it asks something not listed here, answer it the same way, in a sentence.

Read the plan

Next it usually shows you a plan: what it will build and how it will check it. Read it for six things:

  1. The sample sheet says which columns are controls, not the column names.
  2. Each field sample is compared only with the controls that apply to it: its day’s field blank, its batch’s extraction blank and both PCR negatives.
  3. Every variant found in any blank or PCR negative is listed with its reads in each, including a variant found only in controls, and so is everything that turned up in the positive control.
  4. Each detection that needs a look shows which rule and the numbers side by side, with the same variant’s reads in the other filter from that site, and each sample’s total reads are shown.
  5. Nothing is removed, subtracted or changed: it lists, and your two files are read and left as they are.
  6. It runs again on another run’s files, and sends nothing anywhere.

A first plan may still leave one of these out, such as parts of item 3 or 4. Say so in a sentence, in your own words, for example:

Also show each sample's total reads, what else turned up in the positive control, and each flagged detection's reads in the other filter from its site.

When the plan has all six, approve it: if your AI tool offers a choice to go ahead, pick it; otherwise say “Yes, go ahead and build it.” In Codex, press Shift+Tab first to leave plan mode. In Copilot, saying it brings up a choice to go ahead; pick that. Let it build. It may run what it built and tell you how to run it yourself; either way, the next step asks it to. When it has finished, ask it: “Did you install anything, and where?” Nothing, or something inside this lesson’s folder, is fine for these lessons. If it names anywhere else on your computer, ask it what that is for, and to remove it if you do not want it there.

Look at what it built

Ask it to run what it built:

Run it and show me the results.

It may show the lists in the terminal and say where a page is saved, or start the page and give you an address to open. To see the page itself, ask: “Open the control check in my browser.” If it gives you a file location or an address without opening it, copy that into your browser’s address bar and press Enter. If it starts the page at a local address, one ending in a number, and says the address is already in use, say: “Something else is using that address. Don’t stop it. Use a different address for my page.” If your AI tool does not take a message after opening the page, wait a minute. If it still does not, close the terminal window, open a new one, type this lesson’s folder line again, start your tool, and say: “Start the page again so it keeps running while we talk.” The page and your saved work are files in the folder, so nothing is lost. When you have finished with the page, ask: “Stop the control check page if it is still running.”

Your results will be worded and laid out in their own way. Check them for these:

  • Every control is listed with its total reads: FB1 25, FB2 7, EB1 41, EB2 63, NTC1 16, NTC2 none, POS 22,416. NTC2 is shown as having no reads, not as clean or passed. If it calls NTC2 clean, tell it: “NTC2 has no reads. Say that, not clean.”
  • Five variants turned up in a field blank, an extraction blank or a PCR negative: ASV01 (NTC1, 4 reads), ASV04 (EB1, 41), ASV06 (FB2, 7), ASV10 (EB2, 63, and NTC1, 12, with no reads in any field sample) and ASV11 (FB1, 25).
  • Besides its own taxon (ASV09, 22,400 reads), the positive control holds ASV01 (11 reads) and ASV08, the invented crayfish (5 reads).
  • Four field detections need a look, each with the rule and the numbers beside it:
    • S01, ASV04, 28 reads: no more than EB1’s 41 (rule 2), and under 1% of S03’s 6,240, which is 62.4 (rule 3).
    • S02, ASV11, 19 reads: no more than FB1’s 25 (rule 2).
    • S05, ASV09, 6 reads: the positive control’s taxon (rule 4).
    • S06, ASV08, 14 reads: under 1% of S07’s 9,812, which is 98.12 (rule 3).
  • Beside each of the four, the other filter from the same site has none of that variant: S02 for S01, S01 for S02, S06 for S05, S05 for S06.
  • S03 and S04’s sucker reads (6,240 and 5,110) are not flagged, and EB1’s 41 reads of that variant are listed with the controls.
  • S07’s 19 reads of ASV11 are not flagged. If they are, the field blank from 13 October has been compared with a sample from 14 October; tell it: “FB1 applies only to samples from 13 October.”
  • Each field sample’s total reads: S01 5,768; S02 5,329; S03 10,410; S04 9,145; S05 4,616; S06 4,684; S07 12,581; S08 11,095.
  • When you ask “Have my two data files changed since the checkpoint?”, it compares them with the checkpoint and says no.

Rule 3 may be shown as the number of reads that 1% stands for (62.4 for the sucker) or as a percentage (28 is 0.45% of 6,240); both say the same. A list that shows only which rule fired, with no numbers, is harder to check; ask for the numbers beside it.

If something on the list is not true, tell your AI tool in a sentence what you see and what you expected, for example: “S07’s 19 reads of ASV11 are flagged. FB1 applies only to the 13 October samples, so S07 should not be.”

What the rules cannot see

Look at S02 and S07 together. Each has 19 reads of ASV11, the invented minnow C. S02 is flagged and S07 is not, because rule 1 ties a field blank to its day: FB1 went out on 13 October with S02, and S07 was collected on 14 October.

Now look at where minnow C turns up in the field: 1,010 and 1,480 reads at Ashwend Inlet, collected on 14 October, and nothing above 19 anywhere else. FB1 never went to Ashwend Inlet. That pattern points away from the field: its 25 reads may have come in later, in the lab or when the run’s reads were sorted. Then look at the plate wells in the box above. S07 is in A9, next to S06 in A8, which holds 1,480 minnow C reads; S02 in A2 and FB1 in A5 have no minnow C in the wells beside them. The plan has no rule about neighbouring wells, and whether your lab looks at them is for its own procedures; here they make S07’s 19 reads at least as doubtful as S02’s. The rule, followed exactly, flags one and not the other. The control check applied the plan correctly; seeing what the rule cannot see is yours to do, and worth a note to the investigators.

Notice what subtracting a control’s count does

Some laboratories’ procedures may call for subtracting a control’s count from the field counts instead of flagging; whether yours do is for your project’s analysis plan, so check it there. Try the arithmetic on a copy of this practice run:

Make a copy of the variant table in this folder. In the copy only, subtract from each field count the largest count of that variant in the controls that apply to it, never below zero.

Wait for its reply, then:

Show me ASV04, ASV08 and ASV11 before and after.

Before you read on: which of the four detections that needed a look will be gone from the copy?

Two of them. S01’s 28 sucker reads become 0, and S02’s 19 minnow C reads become 0. S03 and S04 keep almost all their sucker reads (6,240 to 6,199, and 5,110 to 5,069). S07’s 19 minnow C reads stay 19, because its own controls have none. S05’s 6 reef fish reads stay 6, because the positive control is not one of the controls subtracted. And S06’s 14 crayfish reads stay 14, because no blank or PCR negative has any crayfish to subtract.

So the arithmetic quietly drops S01’s sucker. But EB1 went through extraction with S03 and S04, which hold over 11,000 sucker reads between them. EB1’s 41 reads may have come from those two samples, and so may S01’s 28; or S01’s filter may really hold a little sucker DNA. Subtracting cannot tell which. And it keeps, untouched, the detection the project cares most about: 14 crayfish reads at Ashwend Inlet, a site where the crayfish was not otherwise found, in a run where crayfish reads also turned up in the positive control, which should hold only its own taxon. Those 14 reads may be crayfish DNA from Ashwend Inlet, DNA from S07 (9,812 crayfish reads, in the next well) that reached S06 somewhere in the lab, or reads put in the wrong sample when the run was sorted. The table cannot tell them apart.

Whatever is decided, the project hears about the Ashwend Inlet crayfish with its evidence: 14 reads, none in the other filter from that site, flagged by rule 3, crayfish in the positive control. Nothing on the list says the crayfish is at Ashwend Inlet, and nothing says it is not; leaving a detection off a list does not show an animal is absent. The investigators may want a second test or new samples before anyone acts on it.

Unexpected reads in a control show that something reached a sample it should not have, but the counts alone do not prove where it came from; so a checker lists what needs a look, and what is reported is decided by the people the project’s analysis plan names.

Here that is you, as lab manager, with the project’s investigators. When you have looked, remove the copy: “Delete that copy; I’m done with it.”

One real run

Here is part of what one AI tool said about the four flagged detections after the subtraction above, with Claude Code on 11 November 2026. Yours will word it differently; check your results against the checks above, not against this.

Its 5 reads in the positive control don't count, so S06's 14 reads stay.
So of the four flagged detections, subtraction removes only two,
S01 sucker and S02 minnow C. S05 reef fish and S06 crayfish are
left untouched.

“Its 5 reads” are the crayfish’s reads in the positive control. The samples, variants and counts it talks about are made up for this course.

How real runs differ

The practice run is small and tidy so that every count can be checked by hand.

  • Laboratories do not agree on one way to handle reads in controls. A review of published aquatic eDNA studies (Sepulveda and others, 2020, read 11 November 2026) says of the studies it found that reported amplification in their negative controls: “These studies most frequently used amplified negative controls to delimit a detection threshold above which is considered significant or provided rationale for why the unexpected amplifications did not affect results.” And: “In summary, we found that there has been minimal convergence over time on negative control implementation, methods, and interpretation, which suggests that increased rigor in these smaller, yet critical details remains an outstanding need.”
  • One published guide’s version of rule 2. The glossary of a university eDNA workshop guide (Tournayre and others, An overview and guide to environmental DNA protocols and workflows, version 2.3.0, read 11 November 2026) defines: “Cross-contamination threshold: maximum number of reads obtained for an ESV/OTU in the different no-template controls. A sample is considered negative to an ESV/OTU if the ESV/OTU shows less reads in that sample than the threshold.” (ESV and OTU are that guide’s names for an exact sequence variant and for a cluster of similar sequences; either is one row of a table like yours.) That threshold is taken from the PCR negatives only, and a count equal to it is not flagged by those words; this practice plan uses every control that applies and flags a count equal to the largest. Small differences like these change which detections are flagged, which is why the plan’s own words govern.
  • One published comparison drops a count rather than subtracting. A comparison of filtering methods on dietary metabarcoding data (Drake and others, 2021, Methods in Ecology and Evolution, read 12 November 2026) describes one of the methods it tested, in its results (section 3.5, “Remove maximum taxon contamination”), as “Removing reads less than or equal to the maximum read count in blanks per taxon”, and says of every method it tested, in its methods (section 2.4): “If the read count (i.e. number of reads per sample per taxon) did not pass the designated threshold, then it was converted to zero (rather than subtracting the threshold, thus not altering the remaining read counts).” Its abstract concluded “that the optimal method for the examples given combined a sample‐based threshold with removal of maximum taxon contamination”, and that “Choice of threshold value differed between datasets due to variation in artefact abundance and sequencing depth”. Subtracting a control’s count and dropping a count that does not exceed it are different operations with different results: S03’s 6,240 sucker reads become 6,199 by subtraction, and stay 6,240 when only counts no more than EB1’s 41 are dropped.
  • Samples differ in total reads. Here the field samples’ totals run from 4,616 to 12,581 reads, and every blank and PCR negative holds under 100. Ask your analyst how your lab pools controls into a run beside field samples, and what a raw count in a control can fairly be set beside. The control check shows each sample’s total reads for that reason; this practice plan has no rule that uses them.
  • Reads can be put in the wrong sample after sequencing. The sequencer’s maker says of its instruments with patterned flow cells (Illumina, Index hopping, read 11 November 2026): “Typical levels of index hopping on patterned flow cell systems range from 0.1–2%, depending on the type, quality, and handling of the library.” And: “use of unique dual indexing combinations eliminates hopped reads from downstream analysis because unexpected combinations will be assigned as undetermined.” Whether that applies to your run depends on your instrument and how the libraries were indexed. Rule 3’s 1% is this practice plan’s own figure, not taken from these.
  • Real tables may hold more. Check what yours holds, for example: taxa from other projects sharing the run, several variants for one species, variants the pipeline could not name, samples with very few reads, controls holding dozens of variants. Check too whether your runs have several PCR replicates for each extract; this practice run has one, and if yours do, your analysis plan says how they count.
  • Other checks may come before this one. Check what else your procedures ask for, for example the contamination log, what was sequenced on the instrument before this run, whether a negative’s PCR was inhibited (ask your analyst what a negative with no reads, like NTC2 here, can tell you), and how confidently the marker tells a taxon of concern from its close relatives. The control check does none of that.
  • Statistical methods exist. Established software can treat contamination statistically, for example decontam, whose page describes it as “Simple statistical identification of contaminating sequence features in marker-gene or metagenomics data” (Bioconductor, decontam, read 11 November 2026). The control check does no statistics; if your analysis plan uses such a method, the plan says how.
  • Real results belong to the project. The steps under Keep going show how to use the finished control check on them.

Keep going

Small changes do not need plan mode. Say each in a sentence, then run it again:

  1. “Make a page for the investigators listing each detection that needed a look, with its numbers, and empty columns for what was decided, by whom and why.” You fill in those columns after you and the investigators have decided; the control check leaves them empty.
  2. “Does the program name any sample, variant or count from these practice files? If it does, make it work those out from the files instead.” A program built in a conversation may keep your examples written into it, and on the next run it would get them wrong. If it has the positive control’s taxon written in, ask it to let you name that taxon each time you run it.
  3. “Save a checkpoint.” Your AI tool saves a snapshot you can return to.

When you want to check a real run, use the finished control check. It runs on your real files by itself, with your AI tool closed, so your AI tool never sees them. Nothing confidential or unpublished, and nothing about people or about animals under a protocol, goes to your AI tool or into this course folder. Your pipeline’s export will not be shaped like the practice file: it may split the taxon over several columns, carry the sequence, or use other sample names. Do these steps in order; the first five happen now, while your AI tool is open and this folder still holds only the practice files:

  1. Go through the data check, the questions in setup about what the data is, who decides how it is used, and which AI tool would see it. A project’s results are that project’s to decide on. Go on only if its investigators and your lab’s procedures allow this use.

  2. Decide on a folder of its own for your real runs, outside this course folder, for example ~/edna-runs. Nothing has to be in it yet. If the folder is not there, ask your AI tool to make it: “Make an empty folder called edna-runs in my home folder.”

  3. Ask your AI tool for blank files and a made-up try, for example: “Make me a blank sample sheet and a blank variant table my spreadsheet program can open, in ~/edna-runs. Show the check working on one made-up field sample and one made-up control of each kind, then clear them.” Look for it saying which made-up detections were flagged and why, and that both files are blank again, ready for a real run. With only one field sample, rule 3 has nothing to compare against, so it cannot flag anything in that try. Leave the sample sheet blank for now; you fill it in at step 7, after you have left your AI tool. Then look at your own pipeline export in a spreadsheet and tell your AI tool the names of its columns, with two rows you make up in the same shape, made-up variant codes, taxa and counts, never a real row. For example: “My pipeline’s table has the columns OTU, Sequence, Kingdom, Phylum, Class, Order, Family, Genus, Species, then one column per sample. Here are two made-up rows in the same shape. Change the check to read files like that.” Then paste the two rows you made up. Give column names only where your laboratory is content for them to go to your AI tool; if it treats them as confidential, ask whoever is responsible first, or make up equivalents. Real sample names never go to it.

  4. Give the control check your project’s own rules in place of the practice plan’s rules 1 to 4, from its analysis plan, numbers included. For example: “Replace the practice plan’s rules with this project’s, which I’ll send next. Then make up one detection for each rule that only that rule flags, and show me the list.” Wait for its reply, then send your rules. If your runs have more than one field blank a day, more than one plate, or several PCR replicates for each extract, say so too. Check that each made-up detection is flagged by the rule it was made for, with that rule’s numbers. Each project’s analysis plan can differ, so do this again for each project.

  5. Ask your AI tool for the exact line, for example: “Give me the exact one line to run this myself on a variant table and sample sheet in ~/edna-runs, with full paths, saving the results there too.” Use your own folder’s name. If it offers to copy your real files into this folder instead, say no. Copy the line it gives you into a note. It will look something like this one, though yours may differ:

    Terminal window
    python3 /home/dana/bio-workbench/15-edna-qc/edna_qc.py /home/dana/edna-runs --positive ASV09 -o /home/dana/edna-runs

    Read it left to right. python3 runs a Python program. Next comes the control check, in this lesson’s folder; then the folder it reads the two files from (ask your AI tool what the two files must be named there, and write that in your note too). --positive and the code after it name that run’s positive-control taxon, which you change each run. -o and the folder after it say where the results are saved. /home/dana is the home folder of someone whose user name is dana; your own user name goes where dana is, and on a Mac the folders begin /Users/ instead of /home/. The line runs the program where it is, so leave this lesson’s folder in place. Some AI tools build the control check as a page you open straight from its file and load the two files into with its buttons; if yours did, you get the file’s location instead of a line; note too which buttons load the files. If you are unsure about any part, ask your AI tool now, while it is still open.

  6. Leave your AI tool the way you did at the start of this lesson.

  7. With your AI tool closed, open the blank sample sheet in edna-runs in your spreadsheet program, fill it in from your lab’s own records of what each sample is, its field day, its batch and its well, and save it with the same name and file type. Put a real run’s variant table beside it, named as your note says. If your note has a line, paste it at the $ or % prompt and press Enter; the results appear beside your real files, not in the course folder. If your AI tool built a page instead, copy the location in your note into your browser’s address bar, press Enter, and choose both files with the buttons your note names. To come back to the lesson folder later, type this lesson’s folder line again, the line near the top of this page that begins with mkdir.

  8. Before you act on the results, check a few of the counts against the pipeline’s own table for the same run. If they differ, find out why first.

Try another case

Before the quiz, write two or three sentences for yourself. Next month a run’s extraction blank holds 2,300 reads of a variant that has 40 to 90 reads in every field sample of that batch. The rules in the analysis plan flag every one of those detections. An investigator asks you to drop the blank as an outlier so the detections can stand. What do you check, and what goes in the report?

A good answer treats the blank as evidence, not an outlier: a blank with far more reads of a variant than any field sample of its batch shows that something reached the blank that should not have. It looks at the run’s other controls and at the other batches before deciding anything, keeps the rule as the plan wrote it, and reports the blank’s count with the detections and what was decided about them, by the lab manager with the investigators.

Key takeaways

  • A short ask, then the plan’s rules. Say what you do and which files; give the analysis plan’s rules in its own words.
  • Read the plan for which controls apply to which sample: the field blank from the same day, the extraction blank from the same batch, the PCR negatives.
  • Check a new tool against counts you know before you trust it on a run you do not.
  • A rule followed exactly can treat the same evidence two ways. Look at where a variant really turns up, not only at the flags.
  • A list of flags is where to look, not what to report. The people the analysis plan names decide, and the control table goes with the species list.
  • Practice data stays practice data: real runs go to the finished control check, with your AI tool closed, after the data check.
KNOWLEDGE CHECK

A variant has 35 reads in a field sample, and 41 reads in the extraction blank from that sample's batch. The other field samples in the batch hold 6,000 and 5,000 reads of it. What do these counts show?

What’s next

The next lesson is about a field project’s eDNA detections: which taxa turned up at which sites.

intellimetrics · Arlington, VA
© 2026 intellimetrics.net
Search lessons