Find an rsID directly in a BAM file
Search for rs numbers in your BAM with Genome: load the file, select BAM mode and review genotype, coverage and quality.
Have a BAM file from sequencing and want to look up a particular rs number? Genome can search directly in that file. You do not need to export a genotype file for the whole genome first.
The workflow: Load BAM → select BAM mode → enter rsID → review the result.
How an rsID connects to your BAM
An rsID identifies a variant record in dbSNP. It is not a personal test result. The record includes the variant’s position on a particular reference assembly. That position can differ between GRCh37 and GRCh38. NCBI describes the structure of RefSNP records.
A BAM stores aligned sequencing reads, rather than a list of genotypes ordered by rs number. Genome resolves the rsID to the appropriate position and examines the sequencing evidence there. A plain text search for rs… inside a BAM does not perform this analysis.
1. Check your file and prerequisites
Open Genome and load your BAM under Data Management. Check that you selected the correct sample and that the file is complete.
A targeted search requires:
- a coordinate-sorted BAM with a corresponding index recognised by Genome;
- a matching reference FASTA and a recognised reference assembly;
- the samtools and bcftools tools.
The index enables access to individual regions. If it is missing, index the file first. Check its status in Genome; BAM search does not start without an index. The samtools manual describes the general requirements for regional access.
Manage missing tools under Tools and reference data under References. Having any FASTA is not enough: it must match the alignment in your BAM. If the assembly is unknown or incompatible, first establish how the file was produced.
2. Select BAM mode in SNP Search
Open SNP Search in the sidebar. Under Search mode, select BAM: from alignment file. The search uses the BAM loaded in Data Management.
TXT mode is for previously exported genotype files. Use BAM mode for this guide. Check the prerequisites shown above the input. Labels and result details may vary with the installed app version.
3. Enter rs numbers and search
Enter the complete identifier, including rs followed by its digits. You can enter several rsIDs, preferably one per line. Use an identifier from a publication or a dbSNP record, for example.
Start with the magnifying-glass button or ⌘ Return. Genome resolves the rsIDs for the reference assembly and evaluates the corresponding positions in your BAM.
The BAM and its reads are processed locally. Genome may query the NCBI RefSNP service to resolve identifiers, sending the requested rsIDs. An existing local cache or a suitable local database may help when the service is unavailable. This does not guarantee complete offline resolution for every rsID.
4. Read the result with its quality
Check the identifier, chromosome, position and assembly first. They identify the locus that was evaluated. Then review the genotype alongside the available coverage, allele support and quality information.
A genotype is only as reliable as the evidence behind it. Too few usable reads, conflicting signals or a technical error can prevent a clear result. An uncallable genotype does not rule out the variant. A -- value is not evidence of a reference genotype either.
Optional database matching adds information about a variant. It does not replace measurement in your sample or assessment of its quality. Genome is for research and education, not diagnosis or treatment selection.
If the search cannot proceed
| Message or observation | Next step |
|---|---|
| No BAM loaded | Select the file in Data Management. |
| Missing index | Index the BAM and check that Genome recognises the index. |
| Missing or incompatible reference | Establish the BAM’s assembly and provide the matching FASTA. |
| rsID cannot be resolved | Check its spelling and dbSNP record; an unavailable data source may also be responsible. |
| Missing or uncertain result | Review coverage, quality and the log. Do not treat this as a negative finding. |
The Genome help covers setup. Find the available version on the download page. To look up public information about an rsID, you can use the rsID web app. It is separate from the local BAM analysis described here.