Question: Fetching the sequence from the genome
0
gravatar for zunera
9 months ago by
zunera0
zunera0 wrote:

Hello everyone,

I have a genome with 4.3 GB size. I have run local blast for it. Now I want to fetch the sequence from the genome like from 700000 bps to 800000 bps. I don't have any information regarding chromosome coordinates or chromosome number etc. because it is a non-redundant data. I have tried to make bed file but it is also not working. I am a beginner. Please help me.

Thank you in advance.

genome • 267 views
ADD COMMENTlink written 9 months ago by zunera0
3

Hello and welcome to biostars zunera ,

I have tried to make bed file but it is also not working.

Please show us more details about what you have tried and what is "not working".

Two common ways to receive a region of interest are bedtools getfasta:

$ bedtools getfasta -fi genome.fa -bed myregions.bed

and samtools faidx:

$ samtools faidx genome.fa <chr>:<from>-<to>
ADD REPLYlink written 9 months ago by finswimmer13k

Thank you for you reply.

I was using the wrong command for bedtools. The above command worked for me.

Secondly, the bed file was not in tab delimated format. So I used awk command to convert it into tab delimated format and the issue is resolved.

awk '{ for(i=1;i<=NF;i++){if(i==NF){printf("%s\n",$NF);}else {printf("%s\t",$i)}}}' bedfile.bed > output
ADD REPLYlink modified 9 months ago by finswimmer13k • written 9 months ago by zunera0
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 856 users visited in the last hour