Fetching the sequence from the genome
0
0
Entering edit mode
5.8 years ago
zunera • 0

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 • 946 views
ADD COMMENT
3
Entering edit mode

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 REPLY
0
Entering edit mode

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 REPLY

Login before adding your answer.

Traffic: 1526 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