What Is 3-P And 5-P Flanking Sequence? How To Find Them Using Pygr?
For example,
>>> hg17=worldbase.Bio.Seq.Genome.HUMAN.hg17()
>>> len(hg17)
46
>>> hg17.keys()
['chr6_random', 'chr19_random', 'chr8_random', 'chrY', 'chrX', 'chr13', 'chr12', 'chr11', 'chr15_random', 'chr17', 'chr16', 'chr15', 'chr14', 'chr19', 'chr18', 'chrM', 'chr1_random', 'chr13_random', 'chr3_random', 'chr6_hla_hap2', 'chr9_random', 'chr22_random', 'chr10', 'chr4_random', 'chr18_random', 'chr2_random', 'chr22', 'chr20', 'chr21', 'chr10_random', 'chr6_hla_hap1', 'chr7', 'chr6', 'chr5', 'chr4', 'chr3', 'chr2', 'chr1', 'chr7_random', 'chrX_random', 'chr9', 'chr8', 'chr16_random', 'chr5_random', 'chr17_random', 'chr12_random']
>>> chr1=hg17['chr1']
>>> len(chr1)
245522847
>>> s=chr1[100000000:100001000]
>>> len(s)
1000
>>> repr(s)
'chr1[100000000:100001000]'
>>>print s
ATTCAGGCAATGTTGACTTCATTAGTGTTGACAGAAAATAAGCATAAAAATGCAAAACATTGTTGGCTTAACCTGAATATACCTGCATTACCTATTATTAACCAGTTTGTGTTGCCAAAAGACTTATTCCTTGGCATTAAAATGGAGCACTTAAAAATATTTCTAAAAAGCAAATGCCCACA....
How to find the 5pflank and 3pflank of a chromosome location?
• 2,243 views
•
link
1 answer
Assuming that your locations are relative to the positive strand, the 5p_flank is obtained by subtracting from your location. In other words, if you want 1000 bp of 5p_flanking sequence and your location is at X, your 5p_flanking sequence will be chr1[X-1000:X-1]. For the 3p_flank, simply add 1000 to the end location.
• 0 views
•
link
Log in to answer this question.
Are you starting from the sequence (like "s") or from chromosome locations? In other words, what are the inputs from which you want to get flanking sequence?
I want to get 5p_flank and 3p_flank sequence of a chromosome location. Sorry for the confusion..