Seqtk
1
0
Entering edit mode
20 months ago
bestone ▴ 30

Hello guys, Apricot has 8 chromosomes but I wanna get just 1 chromosome instead of others using Seqtk tool. Could you pls help me with this issue? Which code Can I use for it?

seqtk • 1.2k views
ADD COMMENT
1
Entering edit mode

What assembly are you using? You should link to it if possible or provide the names of the fasta headers with grep "^>" file.fasta

ADD REPLY
1
Entering edit mode
20 months ago

use samtools faidx instead, First index the genome

samtools faidx genome.fa

then extract the chromosome of interest

samtools faidx genome.fa chrom1 > subset.fa
ADD COMMENT
0
Entering edit mode

Thank you. for your reply. My file is "Prunus_armeniaca_Stella.fasta.gz" it is not "fa" . I tried it but I couldn't get any result

ADD REPLY
1
Entering edit mode

You need first to extract the FASTA file from the archive.

gzip --decompress --stdout Prunus_armeniaca_Stella.fasta.gz >Prunus_armeniaca_Stella.fasta

samtools faidx Prunus_armeniaca_Stella.fasta title_of_the_chromosome_you_need >one_chromosome.fasta
ADD REPLY
0
Entering edit mode

Hello shelkmike, I tried the codes, it works but I run this code : samtools faidx Prunus_armeniaca_Stella.fasta >one_chromosome.fasta. I got two different files one them is Prunus_armeniaca_Stella.fasta.fai the other one is one_chromosome.fasta. But I have a problem with one_chromosome.fasta. It shows zero byte. Do I have any missing code?

ADD REPLY
0
Entering edit mode

I figure it out guys thank you so much for all of your help

ADD REPLY

Login before adding your answer.

Traffic: 2636 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6