protocol overview
Sample naming so a bioinformatics file matches the freezer
A naming scheme that keeps freezer tubes, metadata sheets and bioinformatics columns on the same sample, including labels that survive humidity.
- Author
- EVRINTH Editorial Team
- Published
- 8 October 2026
- Updated
- 8 October 2026
- Reading time
- 10 min

If the string in the count matrix is not the string on the tube, the analysis describes a sample the freezer does not contain. No quality score catches that. The reads can be excellent and still belong to the wrong mouse, the wrong day, or a tube you can no longer find. This is the naming overview for an expression study: stable identifiers, a metadata sheet that joins, and a box map that is allowed to change. It sits upstream of every result in from cells to a gene expression result.
The string is the sample
Bioinformatics joins on text. A column header, a FASTQ filename and a row in a sample sheet are the same sample only when the characters match. Human memory does not survive that join. "The third treated one" is not a key. A key is an identifier you mint once, never reuse, and never edit in order to fix a scientific fact.
The identifier should be boring. A pattern such as a study code plus a serial number is enough. Meaning lives in columns: condition, biological replicate, tissue, time, donor or culture identity, extraction batch, sequencing batch. Those columns can be corrected when someone notices an error. The identifier cannot, because it has already been written on plastic, in filenames and in a collaborator's copy of the sheet.
Reuse is the quiet disaster. A pilot sample and a later sample that share an id will be averaged, or one will overwrite the other, and the plot will look precise. Retire identifiers. Do not recycle them when a tube is discarded.
Characters that keep a table intact
Spaces break command lines and some column splits. Commas break comma-separated files. Slashes and backslashes break paths. Quotes break both. Pipes and semicolons are field separators in more formats than people remember. Build the id from letters, digits and one kind of separator, hyphen or underscore, and use that rule for every sample in the study.
Spreadsheet software will try to help. It will strip leading zeros, turn some identifiers into dates, and reformat long numbers into scientific notation. The gene-symbol version of this problem is famous. Sample ids suffer the same help. Store the sheet as text, open it in a way that does not guess types, and check the first and last rows after any round trip. If the id you minted is not the id you see, the file is already wrong.
Case is part of the string. A join that ignores case will glue distinct ids together the day someone uses both. Pick lower case or upper case and keep it. Do not rely on a human to notice that two headers differ only by a capital.
Length has a practical limit. A name that includes project, operator, date, tissue, treatment, replicate and notes will be truncated by a label, a filename limit, or a colleague in a hurry. Truncation creates collisions. Keep the id short enough to write again if a label fails, and put the notes in the sheet.
Tubes, sheets and box maps
Three physical objects carry the scheme. The tube wears the id. Cryogenic labels and a pen that still writes on cold plastic are the equipment class. Ordinary stationery labels fall off when a box frosts and thaws. The laboratory plasticware catalogue is where tubes and related consumables are grouped. The label chemistry has to match cold storage, which is a product specification, not a hope.
The metadata sheet wears the scientific description. One row per id. Required columns are the id, the biological group, the replicate index within that group, and the unit the replicate actually is. Add extraction day and any identifier a sequencer will use if it differs, but prefer that it does not differ. Dates should be written in an unambiguous form. Day-month order and month-day order have both created real sample swaps.
The freezer map wears location. Box name, slot, id, date stored, and date moved. The map is allowed to change. The metadata sheet's id column is not. When you consolidate boxes, you edit the map. You do not relabel the experiment. Storage habits beyond naming are in storing biological samples from fridge to freezer.
A paper notebook that repeats the id and the group is not old-fashioned. It is the copy that survives a corrupted file. Keep it where condensate from a freezer lid will not soak it.
From a new id to a joined matrix
Mint the next id in the sheet. Write the group and the replicate you intend. Label the tube from the sheet, not from memory. Load the tube and update the map the same day. If the harvest fails, mark the id as unused and do not give it to the next animal.
At extraction, the output tube inherits the same id, or receives a derived id that still contains the parent id as an unbroken token. A derived id is justified when one tissue becomes several extracts. It is not justified as a chance to rename the group. Record the parent in a column.
When libraries are made, the filename should contain the id. Tell anyone who builds the library that renaming files to "sample1" is a failure, not a convenience. Before analysis, join matrix column names to the sheet. Orphans and duplicates are stop conditions. A duplicate header means two tubes were merged in the filename. An orphan means a file arrived that the freezer sheet does not know.
Only then is a contrast allowed. The contrast reads the group column. It does not parse the id with a regular expression to guess the group. Parsing names is how a typo becomes a covariate.
If a swap is discovered later, correct the group column and write a dated note. Do not silently rename files on one computer. A second copy will still have the old join. The Sequence Read Archive and the European Nucleotide Archive both show how painful a vague sample title is for anyone who was not in the room. Name as though a stranger will join the files.
Strings that break, strings that last
| String | What happens in a real file | What to do instead |
|---|---|---|
| treated mouse 3 | Spaces and a comma-like pause. Splits in a table. The index is not stable if you cull an animal | Id RNA-014, group in a column |
| Box2-A4 | Collides with the next box that also has an A4. Changes when you move the tube | Slot on the map only |
| 0014 | Leading zeros disappear in a spreadsheet and the join fails | Text column, or an id with a letter prefix |
| treated/rep3 | Slash becomes a directory. Rep3 is not a biological unit | Separator you chose on purpose, replicate as a column |
| RNA-014 | Survives a join if the sheet, the filename and the lid agree | Keep a second written copy of the same string |
The last row is not magic. It works only while all three copies match. A method note on protocols.io will not rescue a local nickname that never entered the sheet.
When the file and the freezer disagree
Believe the disagreement. If the matrix says RNA-014 and the sheet has no such row, do not invent a group from the order of the columns. If two tubes in one box both claim the same id, the box is unresolved until someone who was there can separate them, and maybe not even then. Sequencing both "just in case" doubles the ambiguity.
A swapped pair is worse than a missing tube, because the contrast looks clean. The defence is earlier: label from the sheet at the bench, and have a second person read the id back before a precious harvest is lysed. A barcode helps only if the barcode is the same string as the id and someone actually scans it. A barcode system that nobody scans is decoration.
qPCR plates need the same key. A well map that says "1, 2, 3" and a freezer that says RNA-014 will drift the moment a well is skipped. Write the id on the plate map. The relative expression assay in RT-qPCR for relative expression inherits whatever identity you give it.
Identity is a research record
Sample names are not a clinical consent system and not a biosafety classification. They do have a privacy edge when the id is built from a person's name or a hospital number. Do not do that. A serial id plus a restricted sheet is the research pattern. The institution decides who may see the sheet. This page does not.
Chemical safety of the labels is minor next to the samples themselves. Human and infectious material follow institutional containment whether the handwriting is neat or not.
Ink, humidity and frost
Handwritten labels smear. In a humid season the ink on a tube top softens, gloves come away from a freezer wet, and the characters crawl into each other. A naming scheme that survives is one you can restore when the lid is unreadable: a short id, a cryo label that was printed or written with a pen meant for wet plastic, and a sheet that does not live in the same damp box. If you must handwrite, write the id twice, lid and side, and copy it into the dry record the same hour. Do not rely on a long sentence on the lid. The sentence will be the first thing to blur, and the group word will be the part you guess wrong.
Frost cycles pull adhesive off. A power cut that warms a freezer and then refreezes it can dump a box of unlabelled tubes whose labels are stuck to the rack below. The map and the sheet are what make those tubes identifiable. Without them, the RNA may still be intact and the experiment is finished anyway, because identity is gone. Check boxes after a known temperature excursion before you assume the lids still tell the truth.
What an enquiry should use as the sample name
Send the id list, not a prose description of groups. State how group and replicate are encoded in columns. Say whether filenames already contain the ids. A sequencing discussion can start from the mRNA sequencing enquiry reference, and a contrast discussion from the differential expression analysis enquiry reference. Anyone joining files needs the sheet. A method page is a prompt for that conversation, not a renaming service.
The wider sample path is nucleic acid analysis. Attach the identifier rules to the quote request so the names in the reply match the names in the freezer.
Give each tube an identifier the count matrix can join
- 01Mint the identifier before the tube is labelledAssign a short stable id and write it into the metadata sheet first. Then label the tube. An id invented on the lid and typed later will drift by a digit, and the drift is invisible once the ink is dry.
- 02Keep group and replicate out of the characters that must stay frozenPut condition, biological replicate, donor or culture, and extraction batch in columns beside the id. Correcting a wrong group must not require renaming the tube. The id stays. The column changes.
- 03Map the id to a box position in a second sheetRecord box identity, position and date against the same id. When a tube moves, update the map. Do not encode the current slot into the sample name, or every rearrangement will falsify the bioinformatics file.
- 04Join the matrix columns to the sheet and reject mismatchesEvery count-matrix column and every FASTQ name should contain the id and nothing that contradicts the sheet. If a name fails the join, the file is wrong even when the reads look fine. Do not analyse the orphan column under a guessed group.
Questions from the bench
Can the sample name include the treatment group?
A short hint is harmless only if you accept that the hint can become a lie. Group belongs in a metadata column that you can correct. If the id itself says treated and the sample was actually a control, every later file inherits the mistake. Prefer an id that means nothing except identity.
Which characters should stay out of an identifier?
Leave out spaces, commas, semicolons, slashes, quotes and other marks that split a table or a file path. Use letters, digits and a single hyphen or underscore. Avoid symbols that spreadsheet software will reinterpret, and treat the column as text so leading zeros survive.
The label smeared after a humid week. Is the sequencing file still usable?
Only if a second record of the id survived. The file is usable when you can still join it to the metadata sheet and the box map. If the only copy of the name was the smeared ink, the tube is anonymous and the reads cannot be given a group. That is a lost sample, not a labelling inconvenience.
Should the freezer position be the sample name?
No. Position changes when boxes are reorganised, and two freezers can both have a slot A4. The position belongs on the map, dated, beside a stable id. Naming the sample after the slot guarantees a collision the moment someone defrosts a box and reloads it.
References
Manufacturer names identify published method classes. Trademarks remain with their owners. Catalogue records on this site are independent references for enquiry. They are not a statement of inventory, distribution rights or a supply commitment. This page is educational. It is not medical advice, a diagnostic protocol or a biosafety approval.
Catalogue
Related products and categories
These links follow the subject of the article into published manufacturer references. A listing is a reference for an enquiry, not a statement of stock or distribution rights.
Continue in this cluster
Related reading
From cells to a gene expression resultHow a laboratory goes from cells to a gene expression result, and how RNA quality decides between a focused RT-qPCR assay and RNA-seq.
A glossary of expression termsPlain definitions of Cq, TPM, counts, FDR, UMIs and the other expression words that cause arguments when they are used loosely.
A heatmap is a picture not a conclusionHow clustering, colour scale and row scaling change a gene-expression heatmap, and why the differential table and the contrast remain the result.