All Collections
Software
What should I do if I want to enrich for only a single genome by using adaptive sampling?
What should I do if I want to enrich for only a single genome by using adaptive sampling?
Updated over a week ago

There are two options for doing this:

1. Make a reference file with only that single genome and enrich for it without using a bed file.

Example: the command below uses seqkit to get any subsequences with the name "ecoli" from the reference "zymo.fasta" and put it in a file called "zymo_ecoli1_ecoli2.fasta"

`seqkit grep -r -p ecoli zymo.fasta > zymo_ecoli1_ecoli2.fasta`

2. Use a mixed reference, but specify `"<contig> 1 <genome_size>"` in your bed file.

Example: the commands below uses samtools faidx to first create a file called "zymo.fasta.fai" which contains (among other things) the sizes of each sequence.

The line after the "|" sign converts this file into a bed3-file and locates only the lines matching "ecoli".

`samtools faidx zymo.fastaawk -v OFS='\t' {'print $1,1,$2'} zymo.fasta.fai | grep ecoli > zymo_onlyecoli.bed`

Did this answer your question?