
                                extractfeat 



Function

   Extract features from a sequence

Description

   extractfeat is a simple utility for extracting parts of a sequence
   that have been annotated as being a specific type of feature. These
   sub-sequences are writen to the output sequence file.

   If the feature is annotated as being in the reverse sense of a nucleic
   acid sequence, then that feature's sub-sequence is
   reverse-complemented before being written out.

   It is often useful to have some information on the context of the
   feature. extractfeat allows you to specify a number of bases or
   residues before and/or after the feature to write out.

   If you are interested in extracting the sequence of the region around
   the start or end of the feature, then this can also be specified.

   'joined' features can either be extracted as individual sequences, or
   as a single concatenated sequence if the '-join' qualifier is used.

   Please remember that the output feature sequence is only as good as
   the annotation. If you rely upon other people's, or other program's
   annotation of features, then some of these will be incorrect.

Usage

   Here is a sample session with extractfeat

   To write out the exons of a sequence:


% extractfeat tembl:hsfau1 -type exon stdout 
Extract features from a sequence

>HSFAU1_408_504 [exon] H.sapiens fau 1 gene
cagtgacgtgacacgcagcccacggtctgtactgacgcgccctcgcttcttcctctttct
cgactccatcttcgcggtagctgggaccgccgttcag
>HSFAU1_774_856 [exon] H.sapiens fau 1 gene
tcgccaatatgcagctctttgtccgcgcccaggagctacacaccttcgaggtgaccggcc
aggaaacggtcgcccagatcaag
>HSFAU1_951_1095 [exon] H.sapiens fau 1 gene
gctcatgtagcctcactggagggcattgccccggaagatcaagtcgtgctcctggcaggc
gcgcccctggaggatgaggccactctgggccagtgcggggtggaggccctgactaccctg
gaagtagcaggccgcatgcttggag
>HSFAU1_1557_1612 [exon] H.sapiens fau 1 gene
gtaaagtccatggttccctggcccgtgctggaaaagtgagaggtcagactcctaag
>HSFAU1_1787_1912 [exon] H.sapiens fau 1 gene
gtggccaaacaggagaagaagaagaagaagacaggtcgggctaagcggcggatgcagtac
aaccggcgctttgtcaacgttgtgcccacctttggcaagaagaagggccccaatgccaac
tcttaa

   Go to the input files for this example

   Example 2

   To write out the exons with 10 extra bases at the start and end so
   that you can inspect the splice sites:


% extractfeat tembl:hsfau1 -type exon -before 10 -after 10 stdout 
Extract features from a sequence

>HSFAU1_408_504 [exon] H.sapiens fau 1 gene
ggtcgctcagcagtgacgtgacacgcagcccacggtctgtactgacgcgccctcgcttct
tcctctttctcgactccatcttcgcggtagctgggaccgccgttcaggtaagaatgg
>HSFAU1_774_856 [exon] H.sapiens fau 1 gene
ctttactcagtcgccaatatgcagctctttgtccgcgcccaggagctacacaccttcgag
gtgaccggccaggaaacggtcgcccagatcaaggtaaggctgc
>HSFAU1_951_1095 [exon] H.sapiens fau 1 gene
ttccctgtaggctcatgtagcctcactggagggcattgccccggaagatcaagtcgtgct
cctggcaggcgcgcccctggaggatgaggccactctgggccagtgcggggtggaggccct
gactaccctggaagtagcaggccgcatgcttggaggtgagtgaga
>HSFAU1_1557_1612 [exon] H.sapiens fau 1 gene
cccactacaggtaaagtccatggttccctggcccgtgctggaaaagtgagaggtcagact
cctaaggtgagtgaga
>HSFAU1_1787_1912 [exon] H.sapiens fau 1 gene
ccttctccaggtggccaaacaggagaagaagaagaagaagacaggtcgggctaagcggcg
gatgcagtacaaccggcgctttgtcaacgttgtgcccacctttggcaagaagaagggccc
caatgccaactcttaagtcttttgta

   Example 3

   To write out the 10 bases around the start of all 'exon' features in
   the tembl database:


% extractfeat tembl:*  -type exon -before 5 -after -5 stdout 
Extract features from a sequence

>HSFAU1_408_504 [exon] H.sapiens fau 1 gene
ctcagcagtg
>HSFAU1_774_856 [exon] H.sapiens fau 1 gene
ctcagtcgcc
>HSFAU1_951_1095 [exon] H.sapiens fau 1 gene
tgtaggctca
>HSFAU1_1557_1612 [exon] H.sapiens fau 1 gene
tacaggtaaa
>HSFAU1_1787_1912 [exon] H.sapiens fau 1 gene
tccaggtggc
>HSFOS_889_1029 [exon] Human fos proto-oncogene (c-fos), complete cds.
ccacgatgat
>HSFOS_1783_2034 [exon] Human fos proto-oncogene (c-fos), complete cds.
tctaggactt
>HSFOS_2466_2573 [exon] Human fos proto-oncogene (c-fos), complete cds.
tctagttatc
>HSFOS_2688_3329 [exon] Human fos proto-oncogene (c-fos), complete cds.
tacaggagac
>HSTS1_1001_1205 [exon] Homo sapiens gene for thymidylate synthase, exons 1, 2,
 3, 4, 5, 6, 7, complete cds.
gcgccatgcc
>HSTS1_2895_2968 [exon] Homo sapiens gene for thymidylate synthase, exons 1, 2,
 3, 4, 5, 6, 7, complete cds.
ttcagatgaa
>HSTS1_5396_5570 [exon] Homo sapiens gene for thymidylate synthase, exons 1, 2,
 3, 4, 5, 6, 7, complete cds.
tccagggatc
>HSTS1_11843_11944 [exon] Homo sapiens gene for thymidylate synthase, exons 1,
2, 3, 4, 5, 6, 7, complete cds.
tacagattat
>HSTS1_13449_13624 [exon] Homo sapiens gene for thymidylate synthase, exons 1,
2, 3, 4, 5, 6, 7, complete cds.
ctcagatctt
>HSTS1_14133_14204 [exon] Homo sapiens gene for thymidylate synthase, exons 1,
2, 3, 4, 5, 6, 7, complete cds.
tatagccagg
>HSTS1_15613_15750 [exon] Homo sapiens gene for thymidylate synthase, exons 1,
2, 3, 4, 5, 6, 7, complete cds.
tttagcttca
>AB009062_75_503 [exon] Homo sapiens HERG gene, exon 6.
tgcaggtcct
>HSFERG2_50_196 [exon] Human apoferritin H gene exons 2-4
ttcagtctta
>HSFERG2_453_578 [exon] Human apoferritin H gene exons 2-4
ttcagaaacc
>HSFERG2_674_999 [exon] Human apoferritin H gene exons 2-4
tgcagttgtg
>AP000504_13_134 [exon] Homo sapiens genomic DNA, chromosome 6p21.3, HLA Class
I region, section 3/20.
ctcactgtga
>AP000504_868_930 [exon] Homo sapiens genomic DNA, chromosome 6p21.3, HLA Class
 I region, section 3/20.
gataccaaaa
>AP000504_1081_1161 [exon] Homo sapiens genomic DNA, chromosome 6p21.3, HLA Cla
ss I region, section 3/20.
cttaccaagc
>AP000504_2752_2875 [exon] Homo sapiens genomic DNA, chromosome 6p21.3, HLA Cla
ss I region, section 3/20.
cccacctctc
>AP000504_3425_3584 [exon] Homo sapiens genomic DNA, chromosome 6p21.3, HLA Cla
ss I region, section 3/20.
gagacctcgg
>AP000504_3818_4038 [exon] Homo sapiens genomic DNA, chromosome 6p21.3, HLA Cla
ss I region, section 3/20.
gttacccttt
>AP000504_7507_7763 [exon] Homo sapiens genomic DNA, chromosome 6p21.3, HLA Cla
ss I region, section 3/20.
ccagcccggg
>AP000504_9766_9875 [exon] Homo sapiens genomic DNA, chromosome 6p21.3, HLA Cla
ss I region, section 3/20.
ttcaggctgg
>AP000504_10068_10193 [exon] Homo sapiens genomic DNA, chromosome 6p21.3, HLA C
lass I region, section 3/20.
tccaggcgga
>AP000504_10357_10463 [exon] Homo sapiens genomic DNA, chromosome 6p21.3, HLA C
lass I region, section 3/20.
ttcaggtacc
>AP000504_11631_11812 [exon] Homo sapiens genomic DNA, chromosome 6p21.3, HLA C
lass I region, section 3/20.
cacagatctg
>AP000504_13026_13434 [exon] Homo sapiens genomic DNA, chromosome 6p21.3, HLA C
lass I region, section 3/20.
ctcaggtggt
>AP000504_14850_15164 [exon] Homo sapiens genomic DNA, chromosome 6p21.3, HLA C
lass I region, section 3/20.
gagggggagt
>AP000504_15284_15383 [exon] Homo sapiens genomic DNA, chromosome 6p21.3, HLA C
lass I region, section 3/20.
ctaaggtcga
>AP000504_15505_15578 [exon] Homo sapiens genomic DNA, chromosome 6p21.3, HLA C
lass I region, section 3/20.
ctcaggccgg
>AP000504_15737_15856 [exon] Homo sapiens genomic DNA, chromosome 6p21.3, HLA C
lass I region, section 3/20.
cctaggactt
>AP000504_16337_16486 [exon] Homo sapiens genomic DNA, chromosome 6p21.3, HLA C
lass I region, section 3/20.
tctaggcaat
>AP000504_16676_16987 [exon] Homo sapiens genomic DNA, chromosome 6p21.3, HLA C
lass I region, section 3/20.
tgcaggcact
>AP000504_18955_19059 [exon] Homo sapiens genomic DNA, chromosome 6p21.3, HLA C
lass I region, section 3/20.
tcccttcaaa
>AP000504_19185_19264 [exon] Homo sapiens genomic DNA, chromosome 6p21.3, HLA C
lass I region, section 3/20.
cttaccggtt
>AP000504_19402_19442 [exon] Homo sapiens genomic DNA, chromosome 6p21.3, HLA C
lass I region, section 3/20.
ctcaccaaat
>AP000504_19797_19887 [exon] Homo sapiens genomic DNA, chromosome 6p21.3, HLA C
lass I region, section 3/20.
ctcacctgtg
>AP000504_20043_20390 [exon] Homo sapiens genomic DNA, chromosome 6p21.3, HLA C
lass I region, section 3/20.
cctaccatgg
>AP000504_20585_20645 [exon] Homo sapiens genomic DNA, chromosome 6p21.3, HLA C
lass I region, section 3/20.
cttaccccca
>AP000504_22296_22401 [exon] Homo sapiens genomic DNA, chromosome 6p21.3, HLA C
lass I region, section 3/20.
atccttgaaa
>AP000504_23826_23936 [exon] Homo sapiens genomic DNA, chromosome 6p21.3, HLA C
lass I region, section 3/20.
cccagctgac
>AP000504_24719_25381 [exon] Homo sapiens genomic DNA, chromosome 6p21.3, HLA C
lass I region, section 3/20.
cctaggtaag
>AP000504_26111_26448 [exon] Homo sapiens genomic DNA, chromosome 6p21.3, HLA C
lass I region, section 3/20.
gctgtagagt
>AP000504_28403_28525 [exon] Homo sapiens genomic DNA, chromosome 6p21.3, HLA C
lass I region, section 3/20.
ctcacggttt
>AP000504_28617_28671 [exon] Homo sapiens genomic DNA, chromosome 6p21.3, HLA C
lass I region, section 3/20.
cttacccaag
>AP000504_30215_30266 [exon] Homo sapiens genomic DNA, chromosome 6p21.3, HLA C
lass I region, section 3/20.
tggccatggg
>AP000504_31238_31363 [exon] Homo sapiens genomic DNA, chromosome 6p21.3, HLA C
lass I region, section 3/20.
aacaggtctc
>AP000504_31486_31691 [exon] Homo sapiens genomic DNA, chromosome 6p21.3, HLA C
lass I region, section 3/20.
ctgagtgaaa
>AP000504_33605_33675 [exon] Homo sapiens genomic DNA, chromosome 6p21.3, HLA C
lass I region, section 3/20.
gttcctcacc
>AP000504_33846_34001 [exon] Homo sapiens genomic DNA, chromosome 6p21.3, HLA C
lass I region, section 3/20.
ctcacctctg
>AP000504_35893_36156 [exon] Homo sapiens genomic DNA, chromosome 6p21.3, HLA C
lass I region, section 3/20.
tttacctgcc
>AP000504_36240_36569 [exon] Homo sapiens genomic DNA, chromosome 6p21.3, HLA C
lass I region, section 3/20.
ctcacctttg
>AP000504_37069_37123 [exon] Homo sapiens genomic DNA, chromosome 6p21.3, HLA C
lass I region, section 3/20.
cttacctgca
>AP000504_40724_40877 [exon] Homo sapiens genomic DNA, chromosome 6p21.3, HLA C
lass I region, section 3/20.
ggaagagcag
>AP000504_41897_41953 [exon] Homo sapiens genomic DNA, chromosome 6p21.3, HLA C
lass I region, section 3/20.
ggcaggatac
>AP000504_42687_42753 [exon] Homo sapiens genomic DNA, chromosome 6p21.3, HLA C
lass I region, section 3/20.
tgcaggcttc
>AP000504_42999_43085 [exon] Homo sapiens genomic DNA, chromosome 6p21.3, HLA C
lass I region, section 3/20.
cccaggttac
>AP000504_46996_47081 [exon] Homo sapiens genomic DNA, chromosome 6p21.3, HLA C
lass I region, section 3/20.
accaggcatt
>AP000504_50596_50669 [exon] Homo sapiens genomic DNA, chromosome 6p21.3, HLA C
lass I region, section 3/20.
tgcagaggca
>AP000504_50879_51001 [exon] Homo sapiens genomic DNA, chromosome 6p21.3, HLA C
lass I region, section 3/20.
ctcaggaagg
>AP000504_52110_52224 [exon] Homo sapiens genomic DNA, chromosome 6p21.3, HLA C
lass I region, section 3/20.
cacagctacc
>AP000504_52348_52449 [exon] Homo sapiens genomic DNA, chromosome 6p21.3, HLA C
lass I region, section 3/20.
ctcagtgtaa
>AP000504_53426_53489 [exon] Homo sapiens genomic DNA, chromosome 6p21.3, HLA C
lass I region, section 3/20.
cctaggtgat
>AP000504_53901_53950 [exon] Homo sapiens genomic DNA, chromosome 6p21.3, HLA C
lass I region, section 3/20.
tacagctgga
>AP000504_54324_54447 [exon] Homo sapiens genomic DNA, chromosome 6p21.3, HLA C
lass I region, section 3/20.
tgcagggggt
>AP000504_54909_55013 [exon] Homo sapiens genomic DNA, chromosome 6p21.3, HLA C
lass I region, section 3/20.
accagccacg
>AP000504_55242_55305 [exon] Homo sapiens genomic DNA, chromosome 6p21.3, HLA C
lass I region, section 3/20.
tctagggggc
>AP000504_55723_55779 [exon] Homo sapiens genomic DNA, chromosome 6p21.3, HLA C
lass I region, section 3/20.
tgaagatacc
>AP000504_55925_55987 [exon] Homo sapiens genomic DNA, chromosome 6p21.3, HLA C
lass I region, section 3/20.
cccagggttc
>AP000504_56128_56204 [exon] Homo sapiens genomic DNA, chromosome 6p21.3, HLA C
lass I region, section 3/20.
cgtaggtatc
>AP000504_56288_56386 [exon] Homo sapiens genomic DNA, chromosome 6p21.3, HLA C
lass I region, section 3/20.
accagcctca
>AP000504_56484_56530 [exon] Homo sapiens genomic DNA, chromosome 6p21.3, HLA C
lass I region, section 3/20.
tgcaggggag
>AP000504_56733_57055 [exon] Homo sapiens genomic DNA, chromosome 6p21.3, HLA C
lass I region, section 3/20.
ctcaggctcg
>AP000504_59988_60040 [exon] Homo sapiens genomic DNA, chromosome 6p21.3, HLA C
lass I region, section 3/20.
cagagatgca
>AP000504_63714_63775 [exon] Homo sapiens genomic DNA, chromosome 6p21.3, HLA C
lass I region, section 3/20.
cacagcagcc
>AP000504_64760_64927 [exon] Homo sapiens genomic DNA, chromosome 6p21.3, HLA C
lass I region, section 3/20.
tctaggtaag
>AP000504_66908_67344 [exon] Homo sapiens genomic DNA, chromosome 6p21.3, HLA C
lass I region, section 3/20.
cccaggcagc
>AP000504_71741_72164 [exon] Homo sapiens genomic DNA, chromosome 6p21.3, HLA C
lass I region, section 3/20.
actgtggaat
>AP000504_72744_73649 [exon] Homo sapiens genomic DNA, chromosome 6p21.3, HLA C
lass I region, section 3/20.
tttaccataa
>AP000504_73962_74192 [exon] Homo sapiens genomic DNA, chromosome 6p21.3, HLA C
lass I region, section 3/20.
ctcatggcct
>AP000504_74520_74709 [exon] Homo sapiens genomic DNA, chromosome 6p21.3, HLA C
lass I region, section 3/20.
cctacctggg
>AP000504_74856_74931 [exon] Homo sapiens genomic DNA, chromosome 6p21.3, HLA C
lass I region, section 3/20.
ctcaccaatg
>AP000504_75374_75489 [exon] Homo sapiens genomic DNA, chromosome 6p21.3, HLA C
lass I region, section 3/20.
ctcaccatct
>AP000504_76058_76160 [exon] Homo sapiens genomic DNA, chromosome 6p21.3, HLA C
lass I region, section 3/20.
ctcaccaggc
>AP000504_77125_77207 [exon] Homo sapiens genomic DNA, chromosome 6p21.3, HLA C
lass I region, section 3/20.
ctcacttcac
>AP000504_77820_78148 [exon] Homo sapiens genomic DNA, chromosome 6p21.3, HLA C
lass I region, section 3/20.
ctcaccggct
>AP000504_79023_79187 [exon] Homo sapiens genomic DNA, chromosome 6p21.3, HLA C
lass I region, section 3/20.
tgattagaat
>AP000504_79451_80175 [exon] Homo sapiens genomic DNA, chromosome 6p21.3, HLA C
lass I region, section 3/20.
agcaggtctc
>AP000504_81318_81943 [exon] Homo sapiens genomic DNA, chromosome 6p21.3, HLA C
lass I region, section 3/20.
tgcaggtctc
>AP000504_83295_85730 [exon] Homo sapiens genomic DNA, chromosome 6p21.3, HLA C
lass I region, section 3/20.
ggctccccaa
>AP000504_85819_85964 [exon] Homo sapiens genomic DNA, chromosome 6p21.3, HLA C
lass I region, section 3/20.
gagatgagga
>AP000504_86305_86403 [exon] Homo sapiens genomic DNA, chromosome 6p21.3, HLA C
lass I region, section 3/20.
cttaccttga
>AP000504_86550_86648 [exon] Homo sapiens genomic DNA, chromosome 6p21.3, HLA C
lass I region, section 3/20.
ctcactgtag
>AP000504_86730_86803 [exon] Homo sapiens genomic DNA, chromosome 6p21.3, HLA C
lass I region, section 3/20.
ccaaccttca
>AP000504_87402_87556 [exon] Homo sapiens genomic DNA, chromosome 6p21.3, HLA C
lass I region, section 3/20.
ctcacatgcg
>AP000504_87948_88090 [exon] Homo sapiens genomic DNA, chromosome 6p21.3, HLA C
lass I region, section 3/20.
catacctcct
>AP000504_91393_91628 [exon] Homo sapiens genomic DNA, chromosome 6p21.3, HLA C
lass I region, section 3/20.
ccccgggcga
>AP000504_92264_92384 [exon] Homo sapiens genomic DNA, chromosome 6p21.3, HLA C
lass I region, section 3/20.
tttagagacc
>AP000504_94413_94530 [exon] Homo sapiens genomic DNA, chromosome 6p21.3, HLA C
lass I region, section 3/20.
ttcagatgaa
>AP000504_94645_94841 [exon] Homo sapiens genomic DNA, chromosome 6p21.3, HLA C
lass I region, section 3/20.
tgcagatgtt
>AP000504_95076_95129 [exon] Homo sapiens genomic DNA, chromosome 6p21.3, HLA C
lass I region, section 3/20.
cccagagtga
>AP000504_95289_95363 [exon] Homo sapiens genomic DNA, chromosome 6p21.3, HLA C
lass I region, section 3/20.
tgtagagtga
>AP000504_96214_96449 [exon] Homo sapiens genomic DNA, chromosome 6p21.3, HLA C
lass I region, section 3/20.
ttcagtgtcg
>AP000504_97518_97647 [exon] Homo sapiens genomic DNA, chromosome 6p21.3, HLA C
lass I region, section 3/20.
cacagccatc
>AP000504_98437_98634 [exon] Homo sapiens genomic DNA, chromosome 6p21.3, HLA C
lass I region, section 3/20.
cgcagcacga
>AP000504_98843_99095 [exon] Homo sapiens genomic DNA, chromosome 6p21.3, HLA C
lass I region, section 3/20.
ttcagatcaa
>AP000504_99439_99516 [exon] Homo sapiens genomic DNA, chromosome 6p21.3, HLA C
lass I region, section 3/20.
cccagattct
>AP000504_99847_99959 [exon] Homo sapiens genomic DNA, chromosome 6p21.3, HLA C
lass I region, section 3/20.
cacaggacag
>AB000360_808_2266 [exon] Homo sapiens PIGC gene, complete cds.
cttttagtaa
>HSHBB_19289_19632 [exon] Human beta globin region on chromosome 11.
ggagccaaca
>HSHBB_19755_19977 [exon] Human beta globin region on chromosome 11.
catagactcc
>HSHBB_20833_21080 [exon] Human beta globin region on chromosome 11.
aacagctcct
>HSHBB_34478_34622 [exon] Human beta globin region on chromosome 11.
tccacacact
>HSHBB_34745_34967 [exon] Human beta globin region on chromosome 11.
cacaggctcc
>HSHBB_35854_36069 [exon] Human beta globin region on chromosome 11.
aacagctcct
>HSHBB_39414_39558 [exon] Human beta globin region on chromosome 11.
tccacacact
>HSHBB_39681_39903 [exon] Human beta globin region on chromosome 11.
cacaggctcc
>HSHBB_40770_40985 [exon] Human beta globin region on chromosome 11.
aacagctcct
>HSHBB_45710_45800 [exon] Human beta globin region on chromosome 11.
acactgtagt
>HSHBB_45922_46145 [exon] Human beta globin region on chromosome 11.
cacagtctcc
>HSHBB_46997_47124 [exon] Human beta globin region on chromosome 11.
cccagctctt
>HSHBB_54740_54881 [exon] Human beta globin region on chromosome 11.
tgcttacact
>HSHBB_55010_55232 [exon] Human beta globin region on chromosome 11.
ctcagattac
>HSHBB_56131_56389 [exon] Human beta globin region on chromosome 11.
cgcagctctt
>HSHBB_62137_62278 [exon] Human beta globin region on chromosome 11.
tgcttacatt
>HSHBB_62187_62278 [exon] Human beta globin region on chromosome 11.
acaccatggt
>HSHBB_62390_62408 [exon] Human beta globin region on chromosome 11.
attggtctat
>HSHBB_62409_62631 [exon] Human beta globin region on chromosome 11.
cttaggctgc
>HSHBB_63482_63742 [exon] Human beta globin region on chromosome 11.
cacagctcct
>GMGL01_363_460 [exon] Glycine max leghemoglobin gene or pseudogene (no mRNA de
tected).
gaaatatggg
>GMGL01_555_663 [exon] Glycine max leghemoglobin gene or pseudogene (no mRNA de
tected).
aataggatat
>GMGL01_2182_2286 [exon] Glycine max leghemoglobin gene or pseudogene (no mRNA
detected).
tgtaggtgcg
>GMGL01_3065_3208 [exon] Glycine max leghemoglobin gene or pseudogene (no mRNA
detected).
cgtaggtggt

   Example 4

   To extract the CDS region with the exons joined into one sequence:


% extractfeat tembl:hsfau1 -type CDS -join stdout 
Extract features from a sequence

>HSFAU1_782_1912 [CDS] H.sapiens fau 1 gene
atgcagctctttgtccgcgcccaggagctacacaccttcgaggtgaccggccaggaaacg
gtcgcccagatcaaggctcatgtagcctcactggagggcattgccccggaagatcaagtc
gtgctcctggcaggcgcgcccctggaggatgaggccactctgggccagtgcggggtggag
gccctgactaccctggaagtagcaggccgcatgcttggaggtaaagtccatggttccctg
gcccgtgctggaaaagtgagaggtcagactcctaaggtggccaaacaggagaagaagaag
aagaagacaggtcgggctaagcggcggatgcagtacaaccggcgctttgtcaacgttgtg
cccacctttggcaagaagaagggccccaatgccaactcttaa

   Example 5

   To write out the 7 residues around all phosphorylated residues in the
   tsw database:


% extractfeat tsw:*  -type mod_res -value phosphorylation* -before 3 -after -4
stdout 
Extract features from a sequence

>OPSD_HUMAN_343_343 [mod_res] RHODOPSIN.
TETSQVA
>PAXI_HUMAN_118_118 [mod_res] PAXILLIN.
EHVYSFP

   Go to the input files for this example

Command line arguments

   Standard (Mandatory) qualifiers:
  [-sequence]          seqall     Sequence database USA
  [-outseq]            seqout     Output sequence USA

   Additional (Optional) qualifiers:
   -before             integer    If this value is greater than 0 then that
                                  number of bases or residues before the
                                  feature are included in the extracted
                                  sequence. This allows you to get the context
                                  of the feature. If this value is negative
                                  then the start of the extracted sequence
                                  will be this number of bases/residues before
                                  the end of the feature. So a value of '10'
                                  will start the extraction 10 bases/residues
                                  before the start of the sequence, and a
                                  value of '-10' will start the extraction 10
                                  bases/residues before the end of the
                                  feature. The output sequence will be padded
                                  with 'N' or 'X' characters if the sequence
                                  starts after the required start of the
                                  extraction.
   -after              integer    If this value is greater than 0 then that
                                  number of bases or residues after the
                                  feature are included in the extracted
                                  sequence. This allows you to get the context
                                  of the feature. If this value is negative
                                  then the end of the extracted sequence will
                                  be this number of bases/residues after the
                                  start of the feature. So a value of '10'
                                  will end the extraction 10 bases/residues
                                  after the end of the sequence, and a value
                                  of '-10' will end the extraction 10
                                  bases/residues after the start of the
                                  feature. The output sequence will be padded
                                  with 'N' or 'X' characters if the sequence
                                  ends before the required end of the
                                  extraction.
   -source             string     By default any feature source in the feature
                                  table is shown. You can set this to match
                                  any feature source you wish to show.
                                  The source name is usually either the name
                                  of the program that detected the feature or
                                  it is the feature table (eg: EMBL) that the
                                  feature came from.
                                  The source may be wildcarded by using '*'.
                                  If you wish to show more than one source,
                                  separate their names with the character '|',
                                  eg:
                                  gene* | embl
   -type               string     By default every feature in the feature
                                  table is extracted. You can set this to be
                                  any feature type you wish to extract.
                                  See http://www3.ebi.ac.uk/Services/WebFeat/
                                  for a list of the EMBL feature types and see
                                  Appendix A of the Swissprot user manual in
                                  http://www.expasy.ch/txt/userman.txt for a
                                  list of the Swissprot feature types.
                                  The type may be wildcarded by using '*'.
                                  If you wish to extract more than one type,
                                  separate their names with the character '|',
                                  eg:
                                  *UTR | intron
   -sense              integer    By default any feature type in the feature
                                  table is extracted. You can set this to
                                  match any feature sense you wish. 0 - any
                                  sense, 1 - forward sense, -1 - reverse sense
   -minscore           float      If this is greater than or equal to the
                                  maximum score, then any score is permitted
   -maxscore           float      If this is less than or equal to the maximum
                                  score, then any score is permitted
   -tag                string     Tags are the types of extra values that a
                                  feature may have. For example in the EMBL
                                  feature table, a 'CDS' type of feature may
                                  have the tags '/codon', '/codon_start',
                                  '/db_xref', '/EC_number', '/evidence',
                                  '/exception', '/function', '/gene',
                                  '/label', '/map', '/note', '/number',
                                  '/partial', '/product', '/protein_id',
                                  '/pseudo', '/standard_name', '/translation',
                                  '/transl_except', '/transl_table', or
                                  '/usedin'. Some of these tags also have
                                  values, for example '/gene' can have the
                                  value of the gene name.
                                  By default any feature tag in the feature
                                  table is extracted. You can set this to
                                  match any feature tag you wish to show.
                                  The tag may be wildcarded by using '*'.
                                  If you wish to extract more than one tag,
                                  separate their names with the character '|',
                                  eg:
                                  gene | label
   -value              string     Tag values are the values associated with a
                                  feature tag. Tags are the types of extra
                                  values that a feature may have. For example
                                  in the EMBL feature table, a 'CDS' type of
                                  feature may have the tags '/codon',
                                  '/codon_start', '/db_xref', '/EC_number',
                                  '/evidence', '/exception', '/function',
                                  '/gene', '/label', '/map', '/note',
                                  '/number', '/partial', '/product',
                                  '/protein_id', '/pseudo', '/standard_name',
                                  '/translation', '/transl_except',
                                  '/transl_table', or '/usedin'. Only some of
                                  these tags can have values, for example
                                  '/gene' can have the value of the gene name.
                                  By default any feature tag value in the
                                  feature table is shown. You can set this to
                                  match any feature tag valueyou wish to show.
                                  The tag value may be wildcarded by using
                                  '*'.
                                  If you wish to show more than one tag value,
                                  separate their names with a space or the
                                  character '|', eg:
                                  pax* | 10
   -join               boolean    Some features, such as CDS (coding sequence)
                                  and mRNA are composed of introns
                                  concatenated together. There may be other
                                  forms of 'joined' sequence, depending on the
                                  feature table. If this option is set TRUE,
                                  then any group of these features will be
                                  output as a single sequence. If the 'before'
                                  and 'after' qualifiers have been set, then
                                  only the sequence before the first feature
                                  and after the last feature are added.
   -featinname         boolean    To aid you in identifying the type of
                                  feature that has been output, the type of
                                  feature is added to the start of the
                                  description of the output sequence.
                                  Sometimes the description of a sequence is
                                  lost in subsequent processing of the
                                  sequences file, so it is useful for the type
                                  to be a part of the sequence ID name. If
                                  you set this to be TRUE then the name is
                                  added to the ID name of the output sequence.
   -describe           string     To aid you in identifying some further
                                  properties of a feature that has been
                                  output, this lets you specify one or more
                                  tag names that should be added to the output
                                  sequence Description text, together with
                                  their values (if any). For example, if this
                                  is set to be 'gene', then if any output
                                  feature has the tag (for example)
                                  '/gene=BRCA1' associated with it, then the
                                  text '(gene=BRCA1)' will be added to the
                                  Description line. Tags are the types of
                                  extra values that a feature may have. For
                                  example in the EMBL feature table, a 'CDS'
                                  type of feature may have the tags '/codon',
                                  '/codon_start', '/db_xref', '/EC_number',
                                  '/evidence', '/exception', '/function',
                                  '/gene', '/label', '/map', '/note',
                                  '/number', '/partial', '/product',
                                  '/protein_id', '/pseudo', '/standard_name',
                                  '/translation', '/transl_except',
                                  '/transl_table', or '/usedin'. Some of these
                                  tags also have values, for example '/gene'
                                  can have the value of the gene name.
                                  By default no feature tag is displayed. You
                                  can set this to match any feature tag you
                                  wish to show.
                                  The tag may be wildcarded by using '*'.
                                  If you wish to extract more than one tag,
                                  separate their names with the character '|',
                                  eg:
                                  gene | label

   Advanced (Unprompted) qualifiers: (none)
   Associated qualifiers:

   "-sequence" associated qualifiers
   -sbegin1             integer    Start of each sequence to be used
   -send1               integer    End of each sequence to be used
   -sreverse1           boolean    Reverse (if DNA)
   -sask1               boolean    Ask for begin/end/reverse
   -snucleotide1        boolean    Sequence is nucleotide
   -sprotein1           boolean    Sequence is protein
   -slower1             boolean    Make lower case
   -supper1             boolean    Make upper case
   -sformat1            string     Input sequence format
   -sdbname1            string     Database name
   -sid1                string     Entryname
   -ufo1                string     UFO features
   -fformat1            string     Features format
   -fopenfile1          string     Features file name

   "-outseq" associated qualifiers
   -osformat2           string     Output seq format
   -osextension2        string     File name extension
   -osname2             string     Base file name
   -osdirectory2        string     Output directory
   -osdbname2           string     Database name to add
   -ossingle2           boolean    Separate file for each entry
   -oufo2               string     UFO features
   -offormat2           string     Features format
   -ofname2             string     Features file name
   -ofdirectory2        string     Output directory

   General qualifiers:
   -auto                boolean    Turn off prompts
   -stdout              boolean    Write standard output
   -filter              boolean    Read standard input, write standard output
   -options             boolean    Prompt for standard and additional values
   -debug               boolean    Write debug output to program.dbg
   -verbose             boolean    Report some/full command line options
   -help                boolean    Report command line options. More
                                  information on associated and general
                                  qualifiers can be found with -help -verbose
   -warning             boolean    Report warnings
   -error               boolean    Report errors
   -fatal               boolean    Report fatal errors
   -die                 boolean    Report deaths


   Standard (Mandatory) qualifiers Allowed values Default
   [-sequence]
   (Parameter 1) Sequence database USA Readable sequence(s) Required
   [-outseq]
   (Parameter 2) Output sequence USA Writeable sequence <sequence>.format
   Additional (Optional) qualifiers Allowed values Default
   -before If this value is greater than 0 then that number of bases or
   residues before the feature are included in the extracted sequence.
   This allows you to get the context of the feature. If this value is
   negative then the start of the extracted sequence will be this number
   of bases/residues before the end of the feature. So a value of '10'
   will start the extraction 10 bases/residues before the start of the
   sequence, and a value of '-10' will start the extraction 10
   bases/residues before the end of the feature. The output sequence will
   be padded with 'N' or 'X' characters if the sequence starts after the
   required start of the extraction. Any integer value 0
   -after If this value is greater than 0 then that number of bases or
   residues after the feature are included in the extracted sequence.
   This allows you to get the context of the feature. If this value is
   negative then the end of the extracted sequence will be this number of
   bases/residues after the start of the feature. So a value of '10' will
   end the extraction 10 bases/residues after the end of the sequence,
   and a value of '-10' will end the extraction 10 bases/residues after
   the start of the feature. The output sequence will be padded with 'N'
   or 'X' characters if the sequence ends before the required end of the
   extraction. Any integer value 0
   -source By default any feature source in the feature table is shown.
   You can set this to match any feature source you wish to show. The
   source name is usually either the name of the program that detected
   the feature or it is the feature table (eg: EMBL) that the feature
   came from. The source may be wildcarded by using '*'. If you wish to
   show more than one source, separate their names with the character
   '|', eg: gene* | embl Any string is accepted *
   -type By default every feature in the feature table is extracted. You
   can set this to be any feature type you wish to extract. See
   http://www3.ebi.ac.uk/Services/WebFeat/ for a list of the EMBL feature
   types and see Appendix A of the Swissprot user manual in
   http://www.expasy.ch/txt/userman.txt for a list of the Swissprot
   feature types. The type may be wildcarded by using '*'. If you wish to
   extract more than one type, separate their names with the character
   '|', eg: *UTR | intron Any string is accepted *
   -sense By default any feature type in the feature table is extracted.
   You can set this to match any feature sense you wish. 0 - any sense, 1
   - forward sense, -1 - reverse sense Any integer value 0 - any sense, 1
   - forward sense, -1 - reverse sense
   -minscore If this is greater than or equal to the maximum score, then
   any score is permitted Any numeric value 0.0
   -maxscore If this is less than or equal to the maximum score, then any
   score is permitted Any numeric value 0.0
   -tag Tags are the types of extra values that a feature may have. For
   example in the EMBL feature table, a 'CDS' type of feature may have
   the tags '/codon', '/codon_start', '/db_xref', '/EC_number',
   '/evidence', '/exception', '/function', '/gene', '/label', '/map',
   '/note', '/number', '/partial', '/product', '/protein_id', '/pseudo',
   '/standard_name', '/translation', '/transl_except', '/transl_table',
   or '/usedin'. Some of these tags also have values, for example '/gene'
   can have the value of the gene name. By default any feature tag in the
   feature table is extracted. You can set this to match any feature tag
   you wish to show. The tag may be wildcarded by using '*'. If you wish
   to extract more than one tag, separate their names with the character
   '|', eg: gene | label Any string is accepted *
   -value Tag values are the values associated with a feature tag. Tags
   are the types of extra values that a feature may have. For example in
   the EMBL feature table, a 'CDS' type of feature may have the tags
   '/codon', '/codon_start', '/db_xref', '/EC_number', '/evidence',
   '/exception', '/function', '/gene', '/label', '/map', '/note',
   '/number', '/partial', '/product', '/protein_id', '/pseudo',
   '/standard_name', '/translation', '/transl_except', '/transl_table',
   or '/usedin'. Only some of these tags can have values, for example
   '/gene' can have the value of the gene name. By default any feature
   tag value in the feature table is shown. You can set this to match any
   feature tag valueyou wish to show. The tag value may be wildcarded by
   using '*'. If you wish to show more than one tag value, separate their
   names with a space or the character '|', eg: pax* | 10 Any string is
   accepted *
   -join Some features, such as CDS (coding sequence) and mRNA are
   composed of introns concatenated together. There may be other forms of
   'joined' sequence, depending on the feature table. If this option is
   set TRUE, then any group of these features will be output as a single
   sequence. If the 'before' and 'after' qualifiers have been set, then
   only the sequence before the first feature and after the last feature
   are added. Boolean value Yes/No No
   -featinname To aid you in identifying the type of feature that has
   been output, the type of feature is added to the start of the
   description of the output sequence. Sometimes the description of a
   sequence is lost in subsequent processing of the sequences file, so it
   is useful for the type to be a part of the sequence ID name. If you
   set this to be TRUE then the name is added to the ID name of the
   output sequence. Boolean value Yes/No No
   -describe To aid you in identifying some further properties of a
   feature that has been output, this lets you specify one or more tag
   names that should be added to the output sequence Description text,
   together with their values (if any). For example, if this is set to be
   'gene', then if any output feature has the tag (for example)
   '/gene=BRCA1' associated with it, then the text '(gene=BRCA1)' will be
   added to the Description line. Tags are the types of extra values that
   a feature may have. For example in the EMBL feature table, a 'CDS'
   type of feature may have the tags '/codon', '/codon_start',
   '/db_xref', '/EC_number', '/evidence', '/exception', '/function',
   '/gene', '/label', '/map', '/note', '/number', '/partial', '/product',
   '/protein_id', '/pseudo', '/standard_name', '/translation',
   '/transl_except', '/transl_table', or '/usedin'. Some of these tags
   also have values, for example '/gene' can have the value of the gene
   name. By default no feature tag is displayed. You can set this to
   match any feature tag you wish to show. The tag may be wildcarded by
   using '*'. If you wish to extract more than one tag, separate their
   names with the character '|', eg: gene | label Any string is accepted
   An empty string is accepted
   Advanced (Unprompted) qualifiers Allowed values Default
   (none)

Input file format

   extractfeat reads normal sequences with features.

   Feature tables in Swissprot, EMBL, GFF, etc. format can be added using
   '-ufo featurefile' on the command line.

  Input files for usage example

   'tembl:hsfau1' is a sequence entry in the example nucleic acid
   database 'tembl'

  Database entry: tembl:hsfau1

ID   HSFAU1     standard; DNA; HUM; 2016 BP.
XX
AC   X65921; S45242;
XX
SV   X65921.1
XX
DT   13-MAY-1992 (Rel. 31, Created)
DT   21-JUL-1993 (Rel. 36, Last updated, Version 5)
XX
DE   H.sapiens fau 1 gene
XX
KW   fau 1 gene.
XX
OS   Homo sapiens (human)
OC   Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Mammalia
;
OC   Eutheria; Primates; Catarrhini; Hominidae; Homo.
XX
RN   [1]
RP   1-2016
RA   Kas K.;
RT   ;
RL   Submitted (29-APR-1992) to the EMBL/GenBank/DDBJ databases.
RL   K. Kas, University of Antwerp, Dept of Biochemistry T3.22,
RL   Universiteitsplein 1, 2610 Wilrijk, BELGIUM
XX
RN   [2]
RP   1-2016
RX   MEDLINE; 92412144.
RA   Kas K., Michiels L., Merregaert J.;
RT   "Genomic structure and expression of the human fau gene: encoding the
RT   ribosomal protein S30 fused to a ubiquitin-like protein.";
RL   Biochem. Biophys. Res. Commun. 187:927-933(1992).
XX
DR   SWISS-PROT; P35544; UBIM_HUMAN.
DR   SWISS-PROT; Q05472; RS30_HUMAN.
XX
FH   Key             Location/Qualifiers
FH
FT   source          1..2016
FT                   /db_xref="taxon:9606"
FT                   /organism="Homo sapiens"
FT                   /clone_lib="CML cosmid"
FT                   /clone="15.1"
FT   mRNA            join(408..504,774..856,951..1095,1557..1612,1787..>1912)
FT                   /gene="fau 1"
FT   exon            408..504
FT                   /number=1
FT   intron          505..773
FT                   /number=1
FT   exon            774..856


  [Part of this file has been deleted for brevity]

FT                   RAKRRMQYNRRFVNVVPTFGKKKGPNANS"
FT   intron          857..950
FT                   /number=2
FT   exon            951..1095
FT                   /number=3
FT   intron          1096..1556
FT                   /number=3
FT   exon            1557..1612
FT                   /number=4
FT   intron          1613..1786
FT                   /number=4
FT   exon            1787..>1912
FT                   /number=5
FT   polyA_signal    1938..1943
XX
SQ   Sequence 2016 BP; 421 A; 562 C; 538 G; 495 T; 0 other;
     ctaccatttt ccctctcgat tctatatgta cactcgggac aagttctcct gatcgaaaac        6
0
     ggcaaaacta aggccccaag taggaatgcc ttagttttcg gggttaacaa tgattaacac       12
0
     tgagcctcac acccacgcga tgccctcagc tcctcgctca gcgctctcac caacagccgt       18
0
     agcccgcagc cccgctggac accggttctc catccccgca gcgtagcccg gaacatggta       24
0
     gctgccatct ttacctgcta cgccagcctt ctgtgcgcgc aactgtctgg tcccgccccg       30
0
     tcctgcgcga gctgctgccc aggcaggttc gccggtgcga gcgtaaaggg gcggagctag       36
0
     gactgccttg ggcggtacaa atagcaggga accgcgcggt cgctcagcag tgacgtgaca       42
0
     cgcagcccac ggtctgtact gacgcgccct cgcttcttcc tctttctcga ctccatcttc       48
0
     gcggtagctg ggaccgccgt tcaggtaaga atggggcctt ggctggatcc gaagggcttg       54
0
     tagcaggttg gctgcggggt cagaaggcgc ggggggaacc gaagaacggg gcctgctccg       60
0
     tggccctgct ccagtcccta tccgaactcc ttgggaggca ctggccttcc gcacgtgagc       66
0
     cgccgcgacc accatcccgt cgcgatcgtt tctggaccgc tttccactcc caaatctcct       72
0
     ttatcccaga gcatttcttg gcttctctta caagccgtct tttctttact cagtcgccaa       78
0
     tatgcagctc tttgtccgcg cccaggagct acacaccttc gaggtgaccg gccaggaaac       84
0
     ggtcgcccag atcaaggtaa ggctgcttgg tgcgccctgg gttccatttt cttgtgctct       90
0
     tcactctcgc ggcccgaggg aacgcttacg agccttatct ttccctgtag gctcatgtag       96
0
     cctcactgga gggcattgcc ccggaagatc aagtcgtgct cctggcaggc gcgcccctgg      102
0
     aggatgaggc cactctgggc cagtgcgggg tggaggccct gactaccctg gaagtagcag      108
0
     gccgcatgct tggaggtgag tgagagagga atgttctttg aagtaccggt aagcgtctag      114
0
     tgagtgtggg gtgcatagtc ctgacagctg agtgtcacac ctatggtaat agagtacttc      120
0
     tcactgtctt cagttcagag tgattcttcc tgtttacatc cctcatgttg aacacagacg      126
0
     tccatgggag actgagccag agtgtagttg tatttcagtc acatcacgag atcctagtct      132
0
     ggttatcagc ttccacacta aaaattaggt cagaccaggc cccaaagtgc tctataaatt      138
0
     agaagctgga agatcctgaa atgaaactta agatttcaag gtcaaatatc tgcaactttg      144
0
     ttctcattac ctattgggcg cagcttctct ttaaaggctt gaattgagaa aagaggggtt      150
0
     ctgctgggtg gcaccttctt gctcttacct gctggtgcct tcctttccca ctacaggtaa      156
0
     agtccatggt tccctggccc gtgctggaaa agtgagaggt cagactccta aggtgagtga      162
0
     gagtattagt ggtcatggtg ttaggacttt ttttcctttc acagctaaac caagtccctg      168
0
     ggctcttact cggtttgcct tctccctccc tggagatgag cctgagggaa gggatgctag      174
0
     gtgtggaaga caggaaccag ggcctgatta accttccctt ctccaggtgg ccaaacagga      180
0
     gaagaagaag aagaagacag gtcgggctaa gcggcggatg cagtacaacc ggcgctttgt      186
0
     caacgttgtg cccacctttg gcaagaagaa gggccccaat gccaactctt aagtcttttg      192
0
     taattctggc tttctctaat aaaaaagcca cttagttcag tcatcgcatt gtttcatctt      198
0
     tacttgcaag gcctcaggga gaggtgtgct tctcgg                                201
6
//

  Input files for usage example 5

   'tsw:*' is a sequence entry in the example protein database 'tsw'

Output file format

   The sequences of the specified features are written out.

   The ID name of the sequence is formed from the original sequence name
   with the start and end positions of the feature appended to it. So if
   the feature came from a sequence with an ID name of 'XYZ' from
   positions 10 to 22, then the resulting ID name of the feature sequence
   will be 'XYZ_10_22'

   The name of the type of feature is added to the start of the
   description of the sequence in brackets, e.g.: '[exon]'.

   The sequence is written out as a normal sequence.

   If the feature is in the reverse sense of a nucleic acid sequence,
   then it is reverse-complemented before being written.

Data files

   None.

Notes

   If a feature is specified as being a part of a different sequence
   entry in a database, then this feature is ignored.

   If you are extracting 'joined' features and one of more of the
   component features is in a different sequence entry, then the whole
   joined feature is ignored.

References

   None.

Warnings

   None.

Diagnostic Error Messages

   If the end position of the sequence to be written is less than the
   start position, then the warning message "Extraction region end less
   than start for feature type [start-end] in ID name" is written and no
   sequence is output.

Exit status

   It always exits with status 0.

Known bugs

   None.

See also

   Program name                          Description
   biosed       Replace or delete sequence sections
   coderet      Extract CDS, mRNA and translations from feature tables
   cutseq       Removes a specified section from a sequence
   degapseq     Removes gap characters from sequences
   descseq      Alter the name or description of a sequence
   entret       Reads and writes (returns) flatfile entries
   extractseq   Extract regions from a sequence
   listor       Writes a list file of the logical OR of two sets of sequences
   maskfeat     Mask off features of a sequence
   maskseq      Mask off regions of a sequence
   newseq       Type in a short new sequence
   noreturn     Removes carriage return from ASCII files
   notseq       Excludes a set of sequences and writes out the remaining ones
   nthseq       Writes one sequence from a multiple set of sequences
   pasteseq     Insert one sequence into another
   revseq       Reverse and complement a sequence
   seqret       Reads and writes (returns) sequences
   seqretsplit  Reads and writes (returns) sequences in individual files
   showfeat     Show features of a sequence
   skipseq      Reads and writes (returns) sequences, skipping the first few
   splitter     Split a sequence into (overlapping) smaller sequences
   trimest      Trim poly-A tails off EST sequences
   trimseq      Trim ambiguous bits off the ends of sequences
   twofeat      Finds neighbouring pairs of features in sequences
   union        Reads sequence fragments and builds one sequence
   vectorstrip  Strips out DNA between a pair of vector sequences
   yank         Reads a sequence range, appends the full USA to a list file

Author(s)

   Gary Williams (gwilliam © rfcgr.mrc.ac.uk)
   MRC Rosalind Franklin Centre for Genomics Research Wellcome Trust
   Genome Campus, Hinxton, Cambridge, CB10 1SB, UK

History

   Written (Dec 12 2001) - Gary Williams

   Added '-join' parameter (June 2002) - Gary Williams

Target users

   This program is intended to be used by everyone and everything, from
   naive users to embedded scripts.

Comments

   None
