<p>Having done 23andme myself I can tell you that your variant file, which contains SNP genotypes, cannot be converted to a bam file. It does not contain the same information as a bam file. It may be helpful to familiarize yourself with those filetypes and the technologies used to obtain them. A SAM/BAM file contains alignments of reads obtained by sequencing. Your standard* 23andme analysis doesn't have reads, as it uses a SNP array for determining the alleles at predefined positions. Markers which are not included in your 23andme file cannot be added by other means because those were not genotyped by the array. Therefore also Y-DNA cannot use your 23andme file or add additional markers.</p>

<p>*For the sake of completeness: I am aware that under rare circumstances 23andme can perform WGS for additional variant typing, but I do not assume this is the case for OP.</p>

CC BY-SA 4.0
2019-03-04T08:19:20.857Z
2019-03-04T08:19:20.857Z
Wouter De Coster
<p>If you just want to get the markers which were not reported/genotyped by 23andMe (as you mentioned in the comment), you don´t want to convert your 23andMe data to SAM/BAM (which is most probably really difficult or impossible, as explained by @Wouter De Coster), but rather to perform <em>imputation</em> on your data file. This will give you a genotype file with genotype or allele probabilities for all the markers. While it will not give you a 100% certainty for the lacking variants, it can certainly give you more information on many of them. </p>

<p>NB: you can imputate the Y-chromosome variants <em>only</em> if your 23andMe file contain data from Y-chromosome. If you want to know about that option, let me know.</p>

CC BY-SA 4.0
2019-03-23T19:13:06.817Z
2019-03-23T21:20:18.453Z
2019-03-23T21:20:18.453Z
Oka
<p>I think the closest approximation for a SNP chip would be the intensity values.  When I asked 23andMe about obtaining these, the answer was that they don't plan on adding this feature.</p>

<p>Some programs use the .vcf file format instead of the 23andMe format, but I think the 23andMe format is compatible with relatively more 3rd party software than some other vendors.  If I remember correctly, I think <a href="https://dna.land/" rel="nofollow noreferrer">DNA.land</a> even has an intermediate .vcf file, which you can download.</p>

<p>I actually think it is important that 23andMe <em>doesn't</em> impute the variants in your genotype table.  However, if you are trying to dig deeper into some SNP chip data, I believe you can still get genotyping for free from <a href="https://genesforgood.sph.umich.edu/" rel="nofollow noreferrer">Genes for Good</a>.  They provide a few different "raw data" formats (such as .vcf files, with and without imputation, as well as a "23andMe format" file) and I got the impression that they would consider providing an even more raw form of data (to test the effect of generating genotypes on your own, even thought I don't think most sites will change).  However, to be clear, they also do not currently provide intensity values (or some other even more raw form of data).</p>

CC BY-SA 4.0
2019-03-26T23:14:48.967Z
2019-03-26T23:14:48.967Z
Charles W
<p>I would like to convert 23andme text file to NextGen to BAM file for Yfull.com to read.  It is difficult to get answers on how to convert to SAM/BAM file for the 23andme text file to be converted to SAM/BAM tools</p>

CC BY-SA 4.0
2019-03-03T20:07:35.613Z
Please include an example of the text file since 23andme is not a standard format or something that people in the field will necessarily be familiar with. But if you mean you just have a list of variant positions (which is what this sort of consumer service usually provides), it is impossible to convert to bam.
terdon
CC BY-SA 4.0
2019-03-03T21:07:53.837Z
I would be happy to provide a text of 23andme. Is there a way to upload it?
Owance Jackie
CC BY-SA 4.0
2019-03-03T21:11:11.037Z
We just need to know what the file looks like so we can understand what you need. Just copy the first few lines (if there is a header, make sure you include both the header and a few lines of data) and paste them into your question. Use the [formatting tools](https://bioinformatics.stackexchange.com/help/formatting) to format them as code.
terdon
CC BY-SA 4.0
2019-03-03T21:12:51.287Z
It would also be helpful if you could explain what your final objective is. BAM files are used to store the alignment of raw sequencing data (reads) against (usually) a reference genome. 23&me should have given you a set of genomic variants, something that is produced by analyzing a bam file. Why do you want to go back to a bam file now?
terdon
CC BY-SA 4.0
2019-03-03T21:23:46.153Z
I want to upload the Y-DNA to Yfull.com to NetGen for any markers 23andme didn't test all markers; Yfull.com does not read text files.  They read BAM files.
Owance Jackie
CC BY-SA 4.0
2019-03-03T21:24:43.577Z
Please show us a few lines of your 23&me file. What you are asking for is almost certainly impossible unless 23&me have given you the raw reads. We can't know unless you show us a few lines so we know what you have.
terdon
CC BY-SA 4.0
2019-03-03T23:27:05.913Z
Here is the data for 23andme.  I am not sure how to use formatting tools. I tried to copy and paste the text file.
Owance Jackie
CC BY-SA 4.0
2019-03-04T10:13:35.533Z
Note you can just [edit] your question and add/change whatever you need. You probably want to use "code" mode for the sample of your file, which you can achieve by copy-pasting the text, highlighting it with the mouse cursor and clicking on the "code" formatting button.
Kamil S Jaron
<sam><file-formats>
I have 23andme text files and would like to convert to SAM/BAM format
# I have 23andme text files and would like to convert to SAM/BAM format

(Asked by: username_0 on 2019-03-03)

I would like to convert 23andme text file to NextGen to BAM file for Yfull.com to read. It is difficult to get answers on how to convert to SAM/BAM file for the 23andme text file to be converted to SAM/BAM tools

**Tags:** sam, file-formats
> **Comments:**
> **username_1**: Please include an example of the text file since 23andme is not a standard format or something that people in the field will necessarily be familiar with. But if you mean you just have a list of variant positions (which is what this sort of consumer service usually provides), it is impossible to convert to bam.  
> **username_0**: I would be happy to provide a text of 23andme. Is there a way to upload it?  
> **username_1**: We just need to know what the file looks like so we can understand what you need. Just copy the first few lines (if there is a header, make sure you include both the header and a few lines of data) and paste them into your question. Use the [formatting tools](https://bioinformatics.stackexchange.com/help/formatting) to format them as code.  
> **username_1**: It would also be helpful if you could explain what your final objective is. BAM files are used to store the alignment of raw sequencing data (reads) against (usually) a reference genome. 23&me should have given you a set of genomic variants, something that is produced by analyzing a bam file. Why do you want to go back to a bam file now?  
> **username_0**: I want to upload the Y-DNA to Yfull.com to NetGen for any markers 23andme didn't test all markers; Yfull.com does not read text files.  They read BAM files.  
> **username_1**: Please show us a few lines of your 23&me file. What you are asking for is almost certainly impossible unless 23&me have given you the raw reads. We can't know unless you show us a few lines so we know what you have.  
> **username_0**: Here is the data for 23andme.  I am not sure how to use formatting tools. I tried to copy and paste the text file.  
> **username_2**: Note you can just [edit] your question and add/change whatever you need. You probably want to use "code" mode for the sample of your file, which you can achieve by copy-pasting the text, highlighting it with the mouse cursor and clicking on the "code" formatting button.  

---

## 3 answers

### Answer by username_3 on 2019-03-04. Score: 11

Having done 23andme myself I can tell you that your variant file, which contains SNP genotypes, cannot be converted to a bam file. It does not contain the same information as a bam file. It may be helpful to familiarize yourself with those filetypes and the technologies used to obtain them. A SAM/BAM file contains alignments of reads obtained by sequencing. Your standard\* 23andme analysis doesn't have reads, as it uses a SNP array for determining the alleles at predefined positions. Markers which are not included in your 23andme file cannot be added by other means because those were not genotyped by the array. Therefore also Y-DNA cannot use your 23andme file or add additional markers.

\*For the sake of completeness: I am aware that under rare circumstances 23andme can perform WGS for additional variant typing, but I do not assume this is the case for OP.


---

### Answer by username_4 on 2019-03-23. Score: 3

If you just want to get the markers which were not reported/genotyped by 23andMe (as you mentioned in the comment), you don´t want to convert your 23andMe data to SAM/BAM (which is most probably really difficult or impossible, as explained by @Wouter De Coster), but rather to perform *imputation* on your data file. This will give you a genotype file with genotype or allele probabilities for all the markers. While it will not give you a 100% certainty for the lacking variants, it can certainly give you more information on many of them.

NB: you can imputate the Y-chromosome variants *only* if your 23andMe file contain data from Y-chromosome. If you want to know about that option, let me know.


---

### Answer by username_5 on 2019-03-26. Score: 3

I think the closest approximation for a SNP chip would be the intensity values. When I asked 23andMe about obtaining these, the answer was that they don't plan on adding this feature.

Some programs use the .vcf file format instead of the 23andMe format, but I think the 23andMe format is compatible with relatively more 3rd party software than some other vendors. If I remember correctly, I think [DNA.land](https://dna.land/) even has an intermediate .vcf file, which you can download.

I actually think it is important that 23andMe *doesn't* impute the variants in your genotype table. However, if you are trying to dig deeper into some SNP chip data, I believe you can still get genotyping for free from [Genes for Good](https://genesforgood.sph.umich.edu/). They provide a few different "raw data" formats (such as .vcf files, with and without imputation, as well as a "23andMe format" file) and I got the impression that they would consider providing an even more raw form of data (to test the effect of generating genotypes on your own, even thought I don't think most sites will change). However, to be clear, they also do not currently provide intensity values (or some other even more raw form of data).


---

