Question: Retrieving nucleotide sequence based on chromosome location offline
2
gravatar for Mask
2.8 years ago by
Mask170
India
Mask170 wrote:

I have downloaded whole genome file from this link (ftp://ftp.broadinstitute.org/pub/genepattern/rna_seq/whole_genomes/Homo_sapiens_UCSC_hg19.fa). Now I need a program in Perl or Python to retrive nucleotide (user defined position) sequnce from the whole genome. I need to perform this offline The user input can be 1. Enter the chromosome number 2. Enter start position 3.Enter end position

The genome file i downloaded looks like

chrM

GATCGGTCTGACGTGCTgaTGATGATA GATCGGTCTGACGTGCTGATGATGATA

chr1

NNNNNNNNNNNNNNNNNNNNNNNNNNtggGGAATTttaag

python perl sequence gene genome • 793 views
ADD COMMENTlink modified 2.8 years ago by Alex Reynolds29k • written 2.8 years ago by Mask170
4
gravatar for Alex Reynolds
2.8 years ago by
Alex Reynolds29k
Seattle, WA USA
Alex Reynolds29k wrote:

You can simply use samtools to index the FASTA file, and then query the indexed FASTA file with your interval of interest.

  1. Generate the index: samtools faidx in.fasta
  2. Query via: samtools faidx in.fasta chrN:X-Y

Replace chrN:X-Y with the chromosome name (chrN), start position (X) and stop position (Y) of interest.

ADD COMMENTlink modified 2.8 years ago • written 2.8 years ago by Alex Reynolds29k
1
gravatar for Asaf
2.8 years ago by
Asaf6.5k
Israel
Asaf6.5k wrote:

Look at the Biopython cookbook. Especially Sections 2.4 and 3.3

ADD COMMENTlink written 2.8 years ago by Asaf6.5k
0
gravatar for gangireddy
2.8 years ago by
gangireddy160
gangireddy160 wrote:

look at 3rd answer here

ADD COMMENTlink modified 2.8 years ago • written 2.8 years ago by gangireddy160
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: 1479 users visited in the last hour