summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron M. Ucko <ucko@debian.org>2008-03-14 21:05:36 +0000
committerAaron M. Ucko <ucko@debian.org>2008-03-14 21:05:36 +0000
commit57c46350c843512260030ae52710924dcb340f0b (patch)
tree8381b9111d6284abc1d779ad4dbcb37b2a276e4a
parent7647e504b18f91edcedba85e7a6ef772b2a0f48b (diff)
[svn-upgrade] Integrating new upstream version, ncbi-tools6 (6.1.20080302)
-rw-r--r--VERSION2
-rw-r--r--access/makeacc.unx2
-rw-r--r--access/mla2api.c137
-rw-r--r--access/mla2api.h7
-rw-r--r--access/pmfapi.c237
-rw-r--r--access/pmfapi.h21
-rw-r--r--access/tax3api.c287
-rw-r--r--access/tax3api.h10
-rw-r--r--algo/blast/api/blast_api.c5
-rw-r--r--algo/blast/api/blast_input.c11
-rw-r--r--algo/blast/api/blast_options_api.c10
-rw-r--r--algo/blast/api/dust_filter.c6
-rw-r--r--algo/blast/api/repeats_filter.c9
-rw-r--r--algo/blast/api/seqsrc_readdb.c8
-rw-r--r--algo/blast/composition_adjustment/redo_alignment.c50
-rw-r--r--algo/blast/composition_adjustment/redo_alignment.h16
-rw-r--r--algo/blast/core/blast_aalookup.c197
-rw-r--r--algo/blast/core/blast_aascan.c83
-rw-r--r--algo/blast/core/blast_def.h16
-rw-r--r--algo/blast/core/blast_dynarray.c53
-rw-r--r--algo/blast/core/blast_encoding.c41
-rw-r--r--algo/blast/core/blast_encoding.h68
-rw-r--r--algo/blast/core/blast_engine.c11
-rw-r--r--algo/blast/core/blast_filter.c242
-rw-r--r--algo/blast/core/blast_filter.h31
-rw-r--r--algo/blast/core/blast_hits.c136
-rw-r--r--algo/blast/core/blast_hits.h48
-rw-r--r--algo/blast/core/blast_hspstream.c7
-rw-r--r--algo/blast/core/blast_kappa.c184
-rw-r--r--algo/blast/core/blast_nalookup.c50
-rw-r--r--algo/blast/core/blast_nalookup.h5
-rw-r--r--algo/blast/core/blast_options.c54
-rw-r--r--algo/blast/core/blast_options.h28
-rw-r--r--algo/blast/core/blast_parameters.c16
-rw-r--r--algo/blast/core/blast_parameters.h7
-rw-r--r--algo/blast/core/blast_psi.c6
-rw-r--r--algo/blast/core/blast_psi_priv.c247
-rw-r--r--algo/blast/core/blast_psi_priv.h129
-rw-r--r--algo/blast/core/blast_query_info.h6
-rw-r--r--algo/blast/core/blast_seg.h7
-rw-r--r--algo/blast/core/blast_seqsrc.c8
-rw-r--r--algo/blast/core/blast_seqsrc.h20
-rw-r--r--algo/blast/core/blast_setup.h5
-rw-r--r--algo/blast/core/blast_stat.c15
-rw-r--r--algo/blast/core/blast_traceback.c10
-rw-r--r--algo/blast/core/hspstream_collector.c96
-rw-r--r--algo/blast/core/hspstream_collector.h27
-rw-r--r--algo/blast/core/lookup_wrap.c7
-rw-r--r--algo/blast/core/lookup_wrap.h6
-rw-r--r--algo/blast/core/na_ungapped.c85
-rw-r--r--api/alignval.c67
-rw-r--r--api/asn2gnb1.c15
-rw-r--r--api/asn2gnb2.c70
-rw-r--r--api/asn2gnb3.c274
-rw-r--r--api/asn2gnb4.c116
-rw-r--r--api/asn2gnb5.c178
-rw-r--r--api/asn2gnb6.c560
-rw-r--r--api/asn2gnbi.h28
-rw-r--r--api/findrepl.c635
-rw-r--r--api/findrepl.h81
-rw-r--r--api/gbftglob.c22
-rwxr-xr-xapi/macroapi.c11254
-rw-r--r--api/macroapi.h184
-rw-r--r--api/seqmgr.c39
-rw-r--r--api/seqport.c44
-rw-r--r--api/seqport.h10
-rw-r--r--api/sequtil.c979
-rw-r--r--api/sequtil.h25
-rw-r--r--api/sqnutil1.c387
-rw-r--r--api/sqnutil2.c2411
-rw-r--r--api/sqnutil3.c2727
-rwxr-xr-xapi/sqnutil4.c10460
-rw-r--r--api/sqnutils.h438
-rw-r--r--api/subutil.c421
-rw-r--r--api/subutil.h22
-rw-r--r--api/tofasta.c1010
-rw-r--r--api/txalign.c10
-rw-r--r--api/utilpub.c2
-rw-r--r--api/utilpub.h2
-rw-r--r--api/valid.c1577
-rw-r--r--api/valid.h6
-rw-r--r--api/valid.msg22
-rw-r--r--api/validerr.h6
-rw-r--r--asn/all.bat2
-rw-r--r--asn/all.mac2
-rwxr-xr-xasn/all.unx6
-rw-r--r--asn/asn.all1073
-rw-r--r--asn/makeload.bat1
-rwxr-xr-xasn/makeload.unx1
-rw-r--r--asn/makestat.bat2
-rwxr-xr-xasn/makestat.unx2
-rw-r--r--asn/seq.asn28
-rw-r--r--asn/seqfeat.asn5
-rw-r--r--asn/seqtable.asn226
-rw-r--r--asnlib/asnprint.c7
-rw-r--r--asnstat/all.h5520
-rw-r--r--asnstat/asnfeat.h105
-rw-r--r--asnstat/asnmacro.h1124
-rw-r--r--asnstat/asnseq.h550
-rw-r--r--asnstat/asntable.h195
-rw-r--r--biostruc/cdd/cdd.asn21
-rw-r--r--biostruc/cdd/cdd.h705
-rw-r--r--biostruc/cdd/objcdd.c56
-rw-r--r--biostruc/cdd/objcdd.h6
-rwxr-xr-xbuild.me6
-rwxr-xr-xbuild.me6418
-rw-r--r--checkout.date2
-rw-r--r--connect/ncbi_config.h10
-rw-r--r--connect/ncbi_connection.c257
-rw-r--r--connect/ncbi_connector.c46
-rw-r--r--connect/ncbi_connector.h65
-rw-r--r--connect/ncbi_connutil.c248
-rw-r--r--connect/ncbi_connutil.h254
-rw-r--r--connect/ncbi_core.c82
-rw-r--r--connect/ncbi_core.h18
-rw-r--r--connect/ncbi_core_c.c7
-rw-r--r--connect/ncbi_dispd.c17
-rw-r--r--connect/ncbi_ftp_connector.c75
-rw-r--r--connect/ncbi_heapmgr.c203
-rw-r--r--connect/ncbi_http_connector.c191
-rw-r--r--connect/ncbi_lb.c23
-rw-r--r--connect/ncbi_local.c4
-rw-r--r--connect/ncbi_priv.h171
-rw-r--r--connect/ncbi_sendmail.c82
-rw-r--r--connect/ncbi_server_info.c5
-rw-r--r--connect/ncbi_service.c25
-rw-r--r--connect/ncbi_service.h6
-rw-r--r--connect/ncbi_service_connector.c412
-rw-r--r--connect/ncbi_socket.c1035
-rw-r--r--connect/ncbi_socket.h45
-rw-r--r--connect/ncbi_util.c76
-rw-r--r--connect/ncbi_util.h95
-rw-r--r--connect/test/test_ncbi_connutil_misc.c139
-rw-r--r--connect/test/test_ncbi_core.c44
-rw-r--r--connect/test/test_ncbi_http_get.c72
-rw-r--r--connect/test/test_ncbi_socket.c112
-rw-r--r--corelib/ncbierr.c13
-rw-r--r--ctools/asn_connection.c44
-rw-r--r--ctools/error_codes.h45
-rw-r--r--data/country_lat_lon.txt5
-rw-r--r--data/featdef.prt24
-rw-r--r--data/featdef.valbin7708 -> 7856 bytes
-rw-r--r--data/lineages.txt710
-rw-r--r--data/sequin.hlp135
-rw-r--r--data/taxlist.txt500
-rw-r--r--demo/.BLAST_VERSION2
-rw-r--r--demo/asn2all.c4
-rw-r--r--demo/asn2gb.c4
-rw-r--r--demo/asnbarval.c17
-rw-r--r--demo/asndisc.c110
-rwxr-xr-xdemo/asnmacro.c708
-rw-r--r--demo/asnval.c4
-rw-r--r--demo/blast_driver.c11
-rw-r--r--demo/blastall.c35
-rw-r--r--demo/blastclust.c9
-rw-r--r--demo/blastpgp.c33
-rw-r--r--demo/cleanasn.c228
-rw-r--r--demo/copymat.c7
-rw-r--r--demo/cspeedtest.c1099
-rw-r--r--demo/megablast.c19
-rw-r--r--demo/nps2gps.c46
-rw-r--r--demo/raw2delt.c657
-rw-r--r--demo/seedtop.c34
-rw-r--r--demo/tbl2asn.c1386
-rw-r--r--desktop/biosrc.c55
-rw-r--r--desktop/bspview.c4
-rw-r--r--desktop/cdrgn.c1906
-rw-r--r--desktop/cdrgn.h44
-rw-r--r--desktop/dlgutil1.c458
-rw-r--r--desktop/dlgutil2.c1263
-rw-r--r--desktop/dlogutil.h49
-rw-r--r--desktop/gbfview.c132
-rw-r--r--desktop/import.c114
-rwxr-xr-xdesktop/macrodlg.c10335
-rwxr-xr-xdesktop/macrodlg.h63
-rw-r--r--desktop/pubdesc.c716
-rw-r--r--desktop/salpanel.c122
-rw-r--r--desktop/salpanel.h6
-rw-r--r--desktop/salsa.c42
-rw-r--r--desktop/seqpanel.c394
-rw-r--r--desktop/seqpanel.h5
-rw-r--r--desktop/seqsub.c159
-rw-r--r--desktop/vsm.c105
-rw-r--r--desktop/vsm.h4
-rw-r--r--desktop/vsmfile.c139
-rw-r--r--desktop/vsmfile.h3
-rw-r--r--desktop/vsmutil.c482
-rw-r--r--doc/blast/blast.html9
-rwxr-xr-xdoc/fwd_check.sh50
-rw-r--r--doc/man/Nentrez.119
-rw-r--r--doc/man/asn2all.16
-rw-r--r--doc/man/asn2gb.115
-rw-r--r--doc/man/asn2idx.120
-rw-r--r--doc/man/asnval.129
-rw-r--r--doc/man/blast.176
-rw-r--r--doc/man/cleanasn.1113
-rw-r--r--doc/man/entrcmd.1102
-rw-r--r--doc/man/entrez2.14
-rw-r--r--doc/man/formatdb.18
-rw-r--r--doc/man/getfeat.164
-rw-r--r--doc/man/idfetch.14
-rw-r--r--doc/man/netentcf.116
-rw-r--r--doc/man/nps2gps.114
-rw-r--r--doc/man/tbl2asn.126
-rw-r--r--doc/sdk.docbin2174202 -> 1498112 bytes
-rwxr-xr-xdoc/tbl2asn.txt23
-rw-r--r--errmsg/valid.msg22
-rw-r--r--link/mswin/asnmacro.rc11
-rw-r--r--link/mswin/cleanasn.rc10
-rw-r--r--link/mswin/cspeedtest.rc10
-rw-r--r--link/mswin/raw2delt.rc11
-rw-r--r--make/makeall.unx31
-rwxr-xr-xmake/makeallchives2
-rw-r--r--make/makedemo.unx4
-rwxr-xr-xmake/makedis.csh2
-rw-r--r--make/makeindx.unx8
-rw-r--r--make/makenet.unx39
-rw-r--r--make/msvc800_prj/algo/blast/api/blastapi.vcproj2
-rw-r--r--make/msvc800_prj/algo/blast/composition_adjustment/blastcompadj.vcproj2
-rw-r--r--make/msvc800_prj/algo/blast/core/blast.vcproj2
-rw-r--r--make/msvc800_prj/all.vcproj3
-rw-r--r--make/msvc800_prj/all_demo.vcproj2
-rw-r--r--make/msvc800_prj/all_exe.vcproj2
-rw-r--r--make/msvc800_prj/all_lib.vcproj2
-rw-r--r--make/msvc800_prj/all_ncbi.vcproj2
-rw-r--r--make/msvc800_prj/asnlib/asntool/exe_asntool.vcproj2
-rw-r--r--make/msvc800_prj/biostruc/ncbimmdb.vcproj2
-rw-r--r--make/msvc800_prj/cdromlib/ncbiacc/ncbiacc.vcproj2
-rw-r--r--make/msvc800_prj/cdromlib/ncbicdr/ncbicdr.vcproj2
-rw-r--r--make/msvc800_prj/cdromlib/ncbinacc/ncbinacc.vcproj2
-rw-r--r--make/msvc800_prj/cn3d/ncbicn3d/ncbicn3d.vcproj2
-rw-r--r--make/msvc800_prj/cn3d/ncbicn3d_ogl/ncbicn3d_ogl.vcproj2
-rw-r--r--make/msvc800_prj/connect/test/http_connector_hit/http_connector_hit.vcproj2
-rw-r--r--make/msvc800_prj/connect/test/socket_io_bouncer/socket_io_bouncer.vcproj2
-rw-r--r--make/msvc800_prj/connect/test/test_ncbi_buffer/test_ncbi_buffer.vcproj2
-rw-r--r--make/msvc800_prj/connect/test/test_ncbi_connutil_hit/test_ncbi_connutil_hit.vcproj2
-rw-r--r--make/msvc800_prj/connect/test/test_ncbi_connutil_misc/test_ncbi_connutil_misc.vcproj2
-rw-r--r--make/msvc800_prj/connect/test/test_ncbi_core/test_ncbi_core.vcproj2
-rw-r--r--make/msvc800_prj/connect/test/test_ncbi_disp/test_ncbi_disp.vcproj2
-rw-r--r--make/msvc800_prj/connect/test/test_ncbi_dsock/test_ncbi_dsock.vcproj2
-rw-r--r--make/msvc800_prj/connect/test/test_ncbi_file_connector/test_ncbi_file_connector.vcproj2
-rw-r--r--make/msvc800_prj/connect/test/test_ncbi_http_connector/test_ncbi_http_connector.vcproj2
-rw-r--r--make/msvc800_prj/connect/test/test_ncbi_http_get/test_ncbi_http_get.vcproj2
-rw-r--r--make/msvc800_prj/connect/test/test_ncbi_memory_connector/test_ncbi_memory_connector.vcproj2
-rw-r--r--make/msvc800_prj/connect/test/test_ncbi_sendmail/test_ncbi_sendmail.vcproj2
-rw-r--r--make/msvc800_prj/connect/test/test_ncbi_service_connector/test_ncbi_service_connector.vcproj2
-rw-r--r--make/msvc800_prj/connect/test/test_ncbi_socket/test_ncbi_socket.vcproj2
-rw-r--r--make/msvc800_prj/connect/test/test_ncbi_socket_connector/test_ncbi_socket_connector.vcproj2
-rw-r--r--make/msvc800_prj/connect/test/xconntest.vcproj2
-rw-r--r--make/msvc800_prj/corelib/ncbi/ncbi.vcproj2
-rw-r--r--make/msvc800_prj/corelib/ncbiconfig.vcproj2
-rw-r--r--make/msvc800_prj/corelib/ncbimain/ncbimain.vcproj2
-rw-r--r--make/msvc800_prj/ddv/ddv/exe_ddv.vcproj2
-rw-r--r--make/msvc800_prj/ddv/ddvlib/ddvlib.vcproj2
-rw-r--r--make/msvc800_prj/demo/asn2all/demo_asn2all.vcproj2
-rw-r--r--make/msvc800_prj/demo/asn2ff/demo_asn2ff.vcproj2
-rw-r--r--make/msvc800_prj/demo/asn2fsa/demo_asn2fsa.vcproj2
-rw-r--r--make/msvc800_prj/demo/asn2gb/demo_asn2gb.vcproj2
-rw-r--r--make/msvc800_prj/demo/asn2idx/demo_asn2idx.vcproj2
-rw-r--r--make/msvc800_prj/demo/asn2xml/demo_asn2xml.vcproj2
-rw-r--r--make/msvc800_prj/demo/asnbarval/demo_asnbarval.vcproj953
-rw-r--r--make/msvc800_prj/demo/asndhuff/demo_asndhuff.vcproj2
-rw-r--r--make/msvc800_prj/demo/asndisc/demo_asndisc.vcproj2
-rw-r--r--make/msvc800_prj/demo/asnstrip/demo_asnstrip.vcproj949
-rw-r--r--make/msvc800_prj/demo/asnval/demo_asnval.vcproj2
-rw-r--r--make/msvc800_prj/demo/bl2seq/demo_bl2seq.vcproj2
-rw-r--r--make/msvc800_prj/demo/blast/demo_blast.vcproj2
-rw-r--r--make/msvc800_prj/demo/blastall/demo_blastall.vcproj2
-rw-r--r--make/msvc800_prj/demo/blastclust/demo_blastclust.vcproj2
-rw-r--r--make/msvc800_prj/demo/blastpgp/demo_blastpgp.vcproj2
-rw-r--r--make/msvc800_prj/demo/ccp/demo_ccp.vcproj2
-rw-r--r--make/msvc800_prj/demo/ccpv/demo_ccpv.vcproj2
-rw-r--r--make/msvc800_prj/demo/cdscan/demo_cdscan.vcproj2
-rw-r--r--make/msvc800_prj/demo/checksub/demo_checksub.vcproj2
-rw-r--r--make/msvc800_prj/demo/cnsgn/demo_cnsgn.vcproj2
-rw-r--r--make/msvc800_prj/demo/cnsgnv/demo_cnsgnv.vcproj2
-rw-r--r--make/msvc800_prj/demo/cnsrt/demo_cnsrt.vcproj2
-rw-r--r--make/msvc800_prj/demo/cnsrtv/demo_cnsrtv.vcproj2
-rw-r--r--make/msvc800_prj/demo/copymat/demo_copymat.vcproj2
-rw-r--r--make/msvc800_prj/demo/dosimple/demo_dosimple.vcproj2
-rw-r--r--make/msvc800_prj/demo/dust/demo_dust.vcproj2
-rw-r--r--make/msvc800_prj/demo/dustv/demo_dustv.vcproj2
-rw-r--r--make/msvc800_prj/demo/entrez2/demo_entrez2.vcproj2
-rw-r--r--make/msvc800_prj/demo/epi/demo_epi.vcproj2
-rw-r--r--make/msvc800_prj/demo/epiv/demo_epiv.vcproj2
-rw-r--r--make/msvc800_prj/demo/fa2htgs/demo_fa2htgs.vcproj2
-rw-r--r--make/msvc800_prj/demo/fastacmd/demo_fastacmd.vcproj2
-rw-r--r--make/msvc800_prj/demo/flint/demo_flint.vcproj2
-rw-r--r--make/msvc800_prj/demo/formatdb/demo_formatdb.vcproj2
-rw-r--r--make/msvc800_prj/demo/formatrpsdb/demo_formatrpsdb.vcproj2
-rw-r--r--make/msvc800_prj/demo/gbseqget/demo_gbseqget.vcproj2
-rw-r--r--make/msvc800_prj/demo/gene2xml/demo_gene2xml.vcproj2
-rw-r--r--make/msvc800_prj/demo/getmesh/demo_getmesh.vcproj2
-rw-r--r--make/msvc800_prj/demo/getpub/demo_getpub.vcproj2
-rw-r--r--make/msvc800_prj/demo/gil2bin/demo_gil2bin.vcproj2
-rw-r--r--make/msvc800_prj/demo/impala/demo_impala.vcproj2
-rw-r--r--make/msvc800_prj/demo/indexpub/demo_indexpub.vcproj2
-rw-r--r--make/msvc800_prj/demo/insdseqget/demo_insdseqget.vcproj2
-rw-r--r--make/msvc800_prj/demo/makemat/demo_makemat.vcproj2
-rw-r--r--make/msvc800_prj/demo/megablast/demo_megablast.vcproj2
-rw-r--r--make/msvc800_prj/demo/nentrez/demo_nentrez.vcproj2
-rw-r--r--make/msvc800_prj/demo/nentrez_ogl/demo_nentrez_ogl.vcproj2
-rw-r--r--make/msvc800_prj/demo/netentcf/demo_netentcf.vcproj2
-rw-r--r--make/msvc800_prj/demo/raw2delt/demo_raw2delt.vcproj949
-rw-r--r--make/msvc800_prj/demo/rpsblast/demo_rpsblast.vcproj2
-rw-r--r--make/msvc800_prj/demo/searchv/demo_searchv.vcproj2
-rw-r--r--make/msvc800_prj/demo/seedtop/demo_seedtop.vcproj2
-rw-r--r--make/msvc800_prj/demo/seqtest/demo_seqtest.vcproj2
-rw-r--r--make/msvc800_prj/demo/sigme/demo_sigme.vcproj2
-rw-r--r--make/msvc800_prj/demo/sigmev/demo_sigmev.vcproj2
-rw-r--r--make/msvc800_prj/demo/spidey/demo_spidey.vcproj2
-rw-r--r--make/msvc800_prj/demo/srchaa/demo_srchaa.vcproj2
-rw-r--r--make/msvc800_prj/demo/srchnt/demo_srchnt.vcproj2
-rw-r--r--make/msvc800_prj/demo/tbl2asn/demo_tbl2asn.vcproj2
-rw-r--r--make/msvc800_prj/demo/testcore/demo_testcore.vcproj2
-rw-r--r--make/msvc800_prj/demo/testobj/demo_testobj.vcproj2
-rw-r--r--make/msvc800_prj/demo/twop/demo_twop.vcproj2
-rw-r--r--make/msvc800_prj/demo/twopv/demo_twopv.vcproj2
-rw-r--r--make/msvc800_prj/demo/udv/demo_udv.vcproj2
-rw-r--r--make/msvc800_prj/demo/vecscreen/demo_vecscreen.vcproj2
-rw-r--r--make/msvc800_prj/desktop/ncbidesk.vcproj82
-rw-r--r--make/msvc800_prj/gif/vibgif.vcproj2
-rw-r--r--make/msvc800_prj/internal/all_internal.vcproj2
-rw-r--r--make/msvc800_prj/internal/smart/smartnet/smartnet.vcproj2
-rw-r--r--make/msvc800_prj/ncbi.sln6024
-rw-r--r--make/msvc800_prj/network/blast3/blastcl3/exe_blastcl3.vcproj2
-rw-r--r--make/msvc800_prj/network/blast3/netblast/netblast.vcproj2
-rw-r--r--make/msvc800_prj/network/entrez/client/netentr.vcproj2
-rw-r--r--make/msvc800_prj/network/id1arch/ncbiid1.vcproj2
-rw-r--r--make/msvc800_prj/network/idfetch/exe_idfetch.vcproj2
-rw-r--r--make/msvc800_prj/network/medarch/client/medarch.vcproj2
-rw-r--r--make/msvc800_prj/network/nsclilib/netcli.vcproj2
-rw-r--r--make/msvc800_prj/network/spell/client/ncbispel.vcproj2
-rw-r--r--make/msvc800_prj/network/taxon1/taxon2/ncbitxc2.vcproj2
-rw-r--r--make/msvc800_prj/network/vibnet/vibnet.vcproj2
-rw-r--r--make/msvc800_prj/object/ncbiobj.vcproj1612
-rw-r--r--make/msvc800_prj/regexp/demo/demo_regexp.vcproj2
-rw-r--r--make/msvc800_prj/regexp/demo/demo_regexp_grep.vcproj2
-rw-r--r--make/msvc800_prj/regexp/regexp.vcproj2
-rw-r--r--make/msvc800_prj/regexp/test/test_regexp.vcproj2
-rw-r--r--make/msvc800_prj/sequin/sbtedit/exe_sbtedit.vcproj2
-rw-r--r--make/msvc800_prj/sequin/sequin/exe_sequin.vcproj2
-rw-r--r--make/msvc800_prj/sequin/ssequin/exe_ssequin.vcproj2
-rw-r--r--make/msvc800_prj/tools/ncbitool.vcproj2
-rw-r--r--make/msvc800_prj/vibrant/vibrant/vibrant.vcproj2
-rw-r--r--make/msvc800_prj/vibrant/vibrant_ogl/vibrant_ogl.vcproj2
-rw-r--r--make/msvc_prj/demo/asnmacro/demo_asnmacro.dsp75
-rw-r--r--make/msvc_prj/demo/cleanasn/demo_cleanasn.dsp75
-rw-r--r--make/msvc_prj/demo/cspeedtest/demo_cspeedtest.dsp75
-rw-r--r--make/msvc_prj/demo/raw2delt/demo_raw2delt.dsp75
-rw-r--r--make/msvc_prj/desktop/ncbidesk.dsp8
-rw-r--r--make/msvc_prj/ncbi.dsw144
-rw-r--r--make/msvc_prj/object/ncbiobj.dsp28
-rw-r--r--make/xCode/ncbictoolkit/ncbictoolkit.xcodeproj/project.pbxproj36
-rw-r--r--network/id2arch/id2.asn5
-rw-r--r--network/id2arch/id2.h87
-rw-r--r--network/medarch/client/medutil.c69
-rw-r--r--network/medarch/client/medutil.h9
-rw-r--r--network/taxon1/taxon2/txcdproc.c7
-rw-r--r--object/objalign.c47
-rw-r--r--object/objfdef.c27
-rw-r--r--object/objgen.c121
-rw-r--r--object/objloc.c7
-rwxr-xr-xobject/objmacro.c10615
-rwxr-xr-xobject/objmacro.h1538
-rw-r--r--object/objpubd.h6
-rw-r--r--object/objseq.c16
-rw-r--r--object/objtable.c1633
-rw-r--r--object/objtable.h188
-rwxr-xr-xsequin/macro.asn814
-rw-r--r--sequin/sequin.h176
-rw-r--r--sequin/sequin1.c791
-rw-r--r--sequin/sequin10.c11951
-rw-r--r--sequin/sequin2.c398
-rw-r--r--sequin/sequin3.c617
-rw-r--r--sequin/sequin4.c615
-rw-r--r--sequin/sequin5.c6197
-rw-r--r--sequin/sequin6.c1648
-rw-r--r--sequin/sequin7.c777
-rw-r--r--sequin/sequin8.c747
-rw-r--r--sequin/sequin9.c430
-rw-r--r--tools/blast.c30
-rw-r--r--tools/blfmtutl.c18
-rw-r--r--tools/kappa.c91
-rw-r--r--tools/ncbisam.c11
-rw-r--r--tools/pseed3.c35
-rw-r--r--tools/readdb.c214
-rw-r--r--tools/readdb.h8
-rw-r--r--tools/salptool.c5
-rw-r--r--tools/seed.h9
-rw-r--r--tools/tfuns.c4
-rw-r--r--tools/tfuns.h4
-rw-r--r--tools/toasn3.c163
-rw-r--r--tools/toporg.c67
-rw-r--r--util/creaders/alnread.c157
-rw-r--r--vibrant/document.c21
-rw-r--r--vibrant/document.h10
-rw-r--r--vibrant/image.c82
-rw-r--r--vibrant/ncbidraw.c1016
-rw-r--r--vibrant/ncbidraw.h52
-rw-r--r--vibrant/ncbiport.h69
-rw-r--r--vibrant/vibbutns.c108
-rw-r--r--vibrant/vibincld.h102
-rw-r--r--vibrant/vibmenus.c250
-rw-r--r--vibrant/vibprocs.h190
-rw-r--r--vibrant/vibslate.c220
-rw-r--r--vibrant/vibtexts.c285
-rw-r--r--vibrant/vibutils.c791
-rw-r--r--vibrant/vibwndws.c996
409 files changed, 94826 insertions, 34620 deletions
diff --git a/VERSION b/VERSION
index 469fe3b9..b28843f9 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-Sun Aug 26 12:03:24 EDT 2007
+Sun Mar 2 10:14:50 EST 2008
diff --git a/access/makeacc.unx b/access/makeacc.unx
index 631b6b9d..d657b222 100644
--- a/access/makeacc.unx
+++ b/access/makeacc.unx
@@ -27,3 +27,5 @@ asntool -m mla2.asn -o asnmla2.h
mv asnmla2.h ../asnstat/
asntool -m mla2.asn -M ../asn/pub.asn,../asn/biblio.asn,../asn/medline.asn,../asn/medlars.asn,../asn/pubmed.asn -G -B objmla2 -I mlkludge.h -K asnmla2.h -Z
+asntool -m seqtable.asn -M ../asn/seqloc.asn -G -B objtable -K asntable.h -Z
+
diff --git a/access/mla2api.c b/access/mla2api.c
index f4e17539..52389bd6 100644
--- a/access/mla2api.c
+++ b/access/mla2api.c
@@ -29,7 +29,7 @@
*
* Version Creation Date: 1/30/07
*
-* $Revision: 1.8 $
+* $Revision: 1.14 $
*
* File Description:
*
@@ -528,18 +528,18 @@ static void SplitMLAuthName (
*p = '\0';
if (sbuf [0]) {
- if (StringCmp (sbuf, "1d") == 0)
- p = StringMove (suffix, "I.");
- else if (StringCmp (sbuf, "2d") == 0)
- p = StringMove (suffix, "II.");
- else if (StringCmp (sbuf, "3d") == 0)
- p = StringMove (suffix, "III.");
+ if (StringCmp (sbuf, "1d") == 0 || StringCmp (sbuf, "1st") == 0)
+ p = StringMove (suffix, "I");
+ else if (StringCmp (sbuf, "2d") == 0 || StringCmp (sbuf, "2nd") == 0)
+ p = StringMove (suffix, "II");
+ else if (StringCmp (sbuf, "3d") == 0 || StringCmp (sbuf, "3rd") == 0)
+ p = StringMove (suffix, "III");
else if (StringCmp (sbuf, "4th") == 0)
- p = StringMove (suffix, "IV.");
+ p = StringMove (suffix, "IV");
else if (StringCmp (sbuf, "5th") == 0)
- p = StringMove (suffix, "V.");
+ p = StringMove (suffix, "V");
else if (StringCmp (sbuf, "6th") == 0)
- p = StringMove (suffix, "VI.");
+ p = StringMove (suffix, "VI");
else if (StringCmp (sbuf, "Sr") == 0)
p = StringMove (suffix, "Sr.");
else if (StringCmp (sbuf, "Jr") == 0)
@@ -666,6 +666,123 @@ NLM_EXTERN void ChangeMlaBackMLAuthorsToSTD (
ChangeCitArtMLAuthorsToSTD (cap);
}
+typedef struct ejour {
+ CharPtr journal_name;
+ Int2 starting_year;
+} EjourData, PNTR EjourDataPtr;
+
+static EjourData mla2_ejour_list [] = {
+ {"Acta Crystallograph. Sect. F Struct. Biol. Cryst. Commun.", 0 },
+ {"Acta Vet. Scand.", 2006 },
+ {"Afr. J. Biotechnol.", 0 },
+ {"Ambul. Surg.", 2005 },
+ {"Ann. Clin. Microbiol. Antimicrob.", 0 },
+ {"Biol. Direct", 0 },
+ {"Biotecnol. Apl.", 2002 },
+ {"BMC Biochem.", 0 },
+ {"BMC Bioinformatics", 0 },
+ {"BMC Biotechnol.", 0 },
+ {"BMC Cancer", 0 },
+ {"BMC Cell Biol.", 0 },
+ {"BMC Dermatol.", 0 },
+ {"BMC Dev. Biol.", 0 },
+ {"BMC Ecol.", 0 },
+ {"BMC Evol. Biol.", 0 },
+ {"BMC Genet.", 0 },
+ {"BMC Genomics", 0 },
+ {"BMC Immunol.", 0 },
+ {"BMC Infect. Dis.", 0 },
+ {"BMC Med. Genet.", 0 },
+ {"BMC Microbiol.", 0 },
+ {"BMC Mol. Biol.", 0 },
+ {"BMC Pharmacol.", 0 },
+ {"BMC Physiol.", 0 },
+ {"BMC Plant Biol.", 0 },
+ {"BMC Struct. Biol.", 0 },
+ {"BMC Vet. Res.", 0 },
+ {"Breast Cancer Res.", 2005 },
+ {"Cancer Cell Int.", 0 },
+ {"Cancer Immun.", 0 },
+ {"Cell Commun. Signal", 0 },
+ {"Cell Struct. Funct.", 2005 },
+ {"Cell. Mol. Biol. (Noisy-le-grand)", 2004 },
+ {"Colomb. Med.", 1998 },
+ {"Crit. Rev. Oral Biol. Med.", 2002 },
+ {"Dermatol. Online J.", 0 },
+ {"Electron. J. Biotechnol.", 0 },
+ {"Eur. J. Genet. Mol. Toxicol.", 0 },
+ {"Evol. Bioinform. Online", 0 },
+ {"Front. Zool.", 0 },
+ {"Fungal Planet", 0 },
+ {"Genome Biol.", 2005 },
+ {"Geochem. Trans.", 0 },
+ {"Hereditas", 2004 },
+ {"Hum. Genomics", 2004 },
+ {"Infect. Agents Cancer", 0 },
+ {"J. Exp. Clin. Assist. Reprod.", 0 },
+ {"J. Plankton Res.", 0 },
+ {"JOP", 0 },
+ {"Kinetoplastid Biol Dis", 0 },
+ {"Malar. J.", 0 },
+ {"Microb. Cell Fact.", 0 },
+ {"Mol. Syst. Biol.", 0 },
+ {"Mol. Vis.", 0 },
+ {"Neoplasia", 2005 },
+ {"Nucl. Recept.", 0 },
+ {"Pharmacologyonline", 0 },
+ {"Plant Methods", 0 },
+ {"PLoS Biol.", 2006 },
+ {"PLoS ONE", 0 },
+ {"Redox Rep.", 2004 },
+ {"Reprod. Biol. Endocrinol.", 0 },
+ {"Retrovirology", 0 },
+ {"Saline Syst.", 0 },
+ {"Sci. STKE", 0 },
+ {"ScientificWorldJournal", 0 },
+ {"Tech. Tips Online", 0 },
+ {"Virol. J.", 0 },
+ {NULL, 0 }
+};
+
+NLM_EXTERN Boolean Mla2IsEPubOnlyJournal (
+ CharPtr jta,
+ Int2Ptr starting_yearP
+)
+
+{
+ EjourDataPtr ejp;
+ Int2 L, R, mid;
+
+ if (starting_yearP != NULL) {
+ *starting_yearP = 0;
+ }
+
+ if (StringHasNoText (jta)) return FALSE;
+
+ L = 0;
+ R = sizeof (mla2_ejour_list) / sizeof (mla2_ejour_list [0]) - 1; /* -1 because now NULL terminated */
+
+ while (L < R) {
+ mid = (L + R) / 2;
+ ejp = &(mla2_ejour_list [mid]);
+ if (ejp != NULL && StringICmp (ejp->journal_name, jta) < 0) {
+ L = mid + 1;
+ } else {
+ R = mid;
+ }
+ }
+
+ ejp = &(mla2_ejour_list [R]);
+ if (ejp != NULL && StringICmp (ejp->journal_name, jta) == 0) {
+ if (starting_yearP != NULL) {
+ *starting_yearP = ejp->starting_year;
+ }
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
NLM_EXTERN Int2 Mla2CorrectCitArt (
CitArtPtr newcap,
CitArtPtr oldcap
diff --git a/access/mla2api.h b/access/mla2api.h
index b89fcf93..c36699d6 100644
--- a/access/mla2api.h
+++ b/access/mla2api.h
@@ -29,7 +29,7 @@
*
* Version Creation Date: 1/30/07
*
-* $Revision: 1.5 $
+* $Revision: 1.7 $
*
* File Description:
*
@@ -163,6 +163,11 @@ NLM_EXTERN void ChangeMlaBackMLAuthorsToSTD (
MlaBackPtr mbp
);
+NLM_EXTERN Boolean Mla2IsEPubOnlyJournal (
+ CharPtr jta,
+ Int2Ptr starting_yearP
+);
+
/*
Mla2CorrectCitArt takes the original and fetched CitArt and
fixes author types, compares author lists for differences,
diff --git a/access/pmfapi.c b/access/pmfapi.c
index 9f536138..197594ed 100644
--- a/access/pmfapi.c
+++ b/access/pmfapi.c
@@ -29,7 +29,7 @@
*
* Version Creation Date: 5/5/00
*
-* $Revision: 1.91 $
+* $Revision: 1.96 $
*
* File Description:
*
@@ -158,18 +158,18 @@ static void SplitMLAuthorName (
*p = '\0';
if (sbuf [0]) {
- if (StringCmp (sbuf, "1d") == 0)
- p = StringMove (suffix, "I.");
- else if (StringCmp (sbuf, "2d") == 0)
- p = StringMove (suffix, "II.");
- else if (StringCmp (sbuf, "3d") == 0)
- p = StringMove (suffix, "III.");
+ if (StringCmp (sbuf, "1d") == 0 || StringCmp (sbuf, "1st") == 0)
+ p = StringMove (suffix, "I");
+ else if (StringCmp (sbuf, "2d") == 0 || StringCmp (sbuf, "2nd") == 0)
+ p = StringMove (suffix, "II");
+ else if (StringCmp (sbuf, "3d") == 0 || StringCmp (sbuf, "3rd") == 0)
+ p = StringMove (suffix, "III");
else if (StringCmp (sbuf, "4th") == 0)
- p = StringMove (suffix, "IV.");
+ p = StringMove (suffix, "IV");
else if (StringCmp (sbuf, "5th") == 0)
- p = StringMove (suffix, "V.");
+ p = StringMove (suffix, "V");
else if (StringCmp (sbuf, "6th") == 0)
- p = StringMove (suffix, "VI.");
+ p = StringMove (suffix, "VI");
else if (StringCmp (sbuf, "Sr") == 0)
p = StringMove (suffix, "Sr.");
else if (StringCmp (sbuf, "Jr") == 0)
@@ -381,6 +381,75 @@ NLM_EXTERN CONN PubSeqFetchOpenConnection (
return conn;
}
+NLM_EXTERN CONN PubSeqFetchTraceOpenConnection (
+ Int4 tid,
+ Int2 retcode,
+ Int4 flags
+)
+
+{
+ Char buf [32];
+ CONN conn;
+ Char query [64];
+#ifdef OS_UNIX
+ CharPtr str;
+#endif
+
+ if (tid < 1) return NULL;
+ if (retcode < 0 || retcode > 4) {
+ retcode = 0;
+ }
+ if (flags < 0) {
+ flags = 1;
+ }
+
+#ifdef PUB_SEQ_FETCH_DEBUG
+ sprintf (query, "val=0:TRACE:%ld&save=idf&view=1&maxplex=%d&extrafeat=%ld", (long) tid, (int) retcode, (long) flags);
+ return QUERY_OpenUrlQuery ("www.ncbi.nlm.nih.gov", 80, "/entrez/viewer.fcgi",
+ query, "Entrez2Tool", 30, eMIME_T_NcbiData,
+ eMIME_AsnText, eENCOD_None, 0);
+#endif
+
+ sprintf (query, "val=0:TRACE:%ld&maxplex=%d&extrafeat=%ld", (long) tid, (int) retcode, (long) flags);
+ conn = QUERY_OpenServiceQuery ("SeqFetch", query, 30);
+
+#ifdef OS_UNIX
+ if (! log_query_url_set) {
+ str = (CharPtr) getenv ("PUBSEQ_FETCH_LOG_URL");
+ if (StringDoesHaveText (str)) {
+ if (StringICmp (str, "TRUE") == 0) {
+ log_query_url = TRUE;
+ }
+ }
+ log_query_url_set = TRUE;
+ }
+#endif
+
+ if (conn == NULL) {
+ MakeDateTimeStamp (buf);
+ if (StringHasNoText (buf)) {
+ StringCpy (buf, "?");
+ }
+ ErrPostEx (SEV_ERROR, 0, 0, "PubSeqFetchTraceOpenConnection failed for ti %ld, date/time %s", (long) tid, buf);
+ return conn;
+ }
+
+#ifdef OS_UNIX
+ if (log_query_url) {
+ str = CONN_Description (conn);
+ if (str == NULL) {
+ ErrPostEx (SEV_ERROR, 0, 0, "CONN_Description failed for ti %ld", (long) tid);
+ } else {
+ ErrPostEx (SEV_ERROR, 0, 0, "CONN_Description for ti %ld is %s", (long) tid, str);
+ }
+ MemFree (str);
+ }
+#endif
+
+ return conn;
+}
+
+
static CharPtr girevtxt = "cmd=seqid&txt=on&seqid=fasta&val=";
NLM_EXTERN CONN GiRevHistOpenConnection (
@@ -1023,10 +1092,39 @@ static void ConfirmGiInSep (
}
}
-NLM_EXTERN SeqEntryPtr PubSeqSynchronousQuery (
+
+static void ConfirmTiInSep (
+ BioseqPtr bsp,
+ Pointer userdata
+)
+
+{
+ Int4 ti;
+ PsConfirmPtr psp;
+ SeqIdPtr sip;
+ DbtagPtr dbtag;
+
+ if (bsp == NULL || userdata == NULL) return;
+ psp = (PsConfirmPtr) userdata;
+ for (sip = bsp->id; sip != NULL; sip = sip->next) {
+ if (sip->choice != SEQID_GENERAL) continue;
+ dbtag = (DbtagPtr) sip->data.ptrvalue;
+ if (dbtag == NULL || StringCmp (dbtag->db, "ti") != 0 || dbtag->tag == NULL) continue;
+ if (dbtag->tag->str == NULL && dbtag->tag->id > 0) {
+ ti = dbtag->tag->id;
+ if (psp->gi == 0 || ti == psp->uid) {
+ psp->gi = ti;
+ }
+ }
+ }
+}
+
+
+NLM_EXTERN SeqEntryPtr PubSeqSynchronousQueryEx (
Int4 uid,
Int2 retcode,
- Int4 flags
+ Int4 flags,
+ Boolean is_trace
)
{
@@ -1055,7 +1153,11 @@ NLM_EXTERN SeqEntryPtr PubSeqSynchronousQuery (
}
#endif
- conn = PubSeqFetchOpenConnection (uid, retcode, flags);
+ if (is_trace) {
+ conn = PubSeqFetchTraceOpenConnection (uid, retcode, flags);
+ } else {
+ conn = PubSeqFetchOpenConnection (uid, retcode, flags);
+ }
if (conn == NULL) return NULL;
@@ -1084,11 +1186,18 @@ NLM_EXTERN SeqEntryPtr PubSeqSynchronousQuery (
if (sep != NULL) {
ps.uid = uid;
ps.gi = 0;
- VisitBioseqsInSep (sep, (Pointer) &ps, ConfirmGiInSep);
+ if (is_trace) {
+ VisitBioseqsInSep (sep, (Pointer) &ps, ConfirmTiInSep);
+ } else {
+ VisitBioseqsInSep (sep, (Pointer) &ps, ConfirmGiInSep);
+ }
if (ps.gi != uid) {
ErrPostEx (SEV_ERROR, 0, 0,
- "PubSeqSynchronousQuery requested gi %ld but received gi %ld",
- (long) uid, (long) ps.gi);
+ "PubSeqSynchronousQuery requested %s %ld but received %s %ld",
+ is_trace ? "ti" : "gi",
+ (long) uid,
+ is_trace ? "ti" : "gi",
+ (long) ps.gi);
}
} else {
MakeDateTimeStamp (buf);
@@ -1096,7 +1205,8 @@ NLM_EXTERN SeqEntryPtr PubSeqSynchronousQuery (
StringCpy (buf, "?");
}
ErrPostEx (SEV_ERROR, 0, 0,
- "PubSeqSynchronousQuery failed for gi %ld, date/time %s, URL is %s",
+ "PubSeqSynchronousQuery failed for %s %ld, date/time %s, URL is %s",
+ is_trace ? "ti" : "gi",
(long) uid, buf, str);
}
@@ -1105,6 +1215,28 @@ NLM_EXTERN SeqEntryPtr PubSeqSynchronousQuery (
return sep;
}
+
+NLM_EXTERN SeqEntryPtr PubSeqSynchronousQuery (
+ Int4 uid,
+ Int2 retcode,
+ Int4 flags
+)
+
+{
+ return PubSeqSynchronousQueryEx (uid, retcode, flags, FALSE);
+}
+
+
+NLM_EXTERN SeqEntryPtr PubSeqSynchronousQueryTI (
+ Int4 uid,
+ Int2 retcode,
+ Int4 flags
+)
+
+{
+ return PubSeqSynchronousQueryEx (uid, retcode, flags, TRUE);
+}
+
NLM_EXTERN CharPtr GiRevHistSynchronousQuery (
Int4 uid,
Int4 num,
@@ -1565,9 +1697,10 @@ NLM_EXTERN Int4 AccnListCheckQueue (
return QUERY_CheckQueue (queue);
}
-/* object manager registerable fetch function */
+/* object manager registerable fetch functions */
static CharPtr pubseqfetchproc = "PubSeqBioseqFetch";
+static CharPtr tracefetchproc = "TraceBioseqFetch";
static CharPtr pubseqseqidtogi = "PubSeqSeqIdForGi";
static CharPtr pubseqgitoseqid = "PubSeqGiForSeqId";
@@ -1693,6 +1826,61 @@ static Int2 LIBCALLBACK PubSeqBioseqFetchFunc (Pointer data)
return OM_MSG_RET_DONE;
}
+static Int2 LIBCALLBACK TraceBioseqFetchFunc (Pointer data)
+
+{
+ BioseqPtr bsp;
+ DbtagPtr dbt;
+ Int4 flags = -1;
+ ObjectIdPtr oip;
+ OMUserDataPtr omdp = NULL;
+ OMProcControlPtr ompcp;
+ ObjMgrProcPtr ompp;
+ Int2 retcode = 0;
+ SeqEntryPtr sep = NULL;
+ SeqIdPtr sip;
+ Int4 uid = 0;
+
+ ompcp = (OMProcControlPtr) data;
+ if (ompcp == NULL) return OM_MSG_RET_ERROR;
+ ompp = ompcp->proc;
+ if (ompp == NULL) return OM_MSG_RET_ERROR;
+ sip = (SeqIdPtr) ompcp->input_data;
+ if (sip == NULL) return OM_MSG_RET_ERROR;
+
+ omdp = ObjMgrGetUserData (ompcp->input_entityID, ompp->procid, OMPROC_FETCH, 0);
+ if (omdp != NULL) {
+ uid = omdp->userdata.intvalue;
+ if (uid == 0) return OM_MSG_RET_ERROR;
+ } else if (sip->choice == SEQID_GENERAL) {
+ dbt = (DbtagPtr) sip->data.ptrvalue;
+ if (dbt == NULL) return OM_MSG_RET_OK;
+ if (StringICmp (dbt->db, "ti") != 0) return OM_MSG_RET_OK;
+ oip = dbt->tag;
+ if (oip == NULL || oip->id == 0) return OM_MSG_RET_OK;
+ uid = oip->id;
+ }
+
+ if (uid == 0) return OM_MSG_RET_OK;
+
+ sep = PubSeqSynchronousQueryTI (uid, retcode, flags);
+
+ if (sep == NULL) {
+ return OM_MSG_RET_OK;
+ }
+ bsp = BioseqFindInSeqEntry (sip, sep);
+
+ ompcp->output_data = (Pointer) bsp;
+ ompcp->output_entityID = ObjMgrGetEntityIDForChoice (sep);
+
+ omdp = ObjMgrAddUserData (ompcp->output_entityID, ompp->procid, OMPROC_FETCH, 0);
+ if (omdp != NULL) {
+ omdp->userdata.intvalue = uid;
+ }
+
+ return OM_MSG_RET_DONE;
+}
+
static Int2 LIBCALLBACK PubSeqSeqIdForGiFunc (Pointer data)
{
@@ -1776,6 +1964,10 @@ static Int2 LIBCALLBACK PubSeqGiForSeqIdFunc (Pointer data)
NLM_EXTERN Boolean PubSeqFetchEnable (void)
{
+ ObjMgrProcLoad (OMPROC_FETCH, tracefetchproc, tracefetchproc,
+ OBJ_SEQID, 0, OBJ_BIOSEQ, 0, NULL,
+ TraceBioseqFetchFunc, PROC_PRIORITY_DEFAULT);
+
ObjMgrProcLoad (OMPROC_FETCH, pubseqfetchproc, pubseqfetchproc,
OBJ_SEQID, 0, OBJ_BIOSEQ, 0, NULL,
PubSeqBioseqFetchFunc, PROC_PRIORITY_DEFAULT);
@@ -1805,6 +1997,10 @@ NLM_EXTERN Boolean PubSeqFetchEnableEx (
{
if (fetch) {
+ ObjMgrProcLoad (OMPROC_FETCH, tracefetchproc, tracefetchproc,
+ OBJ_SEQID, 0, OBJ_BIOSEQ, 0, NULL,
+ TraceBioseqFetchFunc, PROC_PRIORITY_DEFAULT);
+
ObjMgrProcLoad (OMPROC_FETCH, pubseqfetchproc, pubseqfetchproc,
OBJ_SEQID, 0, OBJ_BIOSEQ, 0, NULL,
PubSeqBioseqFetchFunc, PROC_PRIORITY_DEFAULT);
@@ -1840,6 +2036,10 @@ NLM_EXTERN void PubSeqFetchDisable (void)
ObjMgrProcPtr ompp;
omp = ObjMgrGet ();
+ ompp = ObjMgrProcFind (omp, 0, tracefetchproc, OMPROC_FETCH);
+ if (ompp != NULL) {
+ ObjMgrFreeUserData (0, ompp->procid, OMPROC_FETCH, 0);
+ }
ompp = ObjMgrProcFind (omp, 0, pubseqfetchproc, OMPROC_FETCH);
if (ompp != NULL) {
ObjMgrFreeUserData (0, ompp->procid, OMPROC_FETCH, 0);
@@ -2439,6 +2639,7 @@ static CharPtr inferencePrefix [] = {
"nucleotide motif",
"protein motif",
"ab initio prediction",
+ "alignment",
NULL
};
diff --git a/access/pmfapi.h b/access/pmfapi.h
index 40ddab53..3a0f4b4b 100644
--- a/access/pmfapi.h
+++ b/access/pmfapi.h
@@ -29,7 +29,7 @@
*
* Version Creation Date: 5/5/00
*
-* $Revision: 1.28 $
+* $Revision: 1.29 $
*
* File Description:
*
@@ -74,6 +74,12 @@ NLM_EXTERN CONN PubSeqFetchOpenConnection (
Int4 flags
);
+NLM_EXTERN CONN PubSeqFetchTraceOpenConnection (
+ Int4 tid,
+ Int2 retcode,
+ Int4 flags
+);
+
NLM_EXTERN CONN GiRevHistOpenConnection (
Int4 uid,
Int4 num,
@@ -135,6 +141,19 @@ NLM_EXTERN PubmedEntryPtr PubMedSynchronousQuery (
Int4 uid
);
+NLM_EXTERN SeqEntryPtr PubSeqSynchronousQueryEx (
+ Int4 uid,
+ Int2 retcode,
+ Int4 flags,
+ Boolean is_trace
+);
+
+NLM_EXTERN SeqEntryPtr PubSeqSynchronousQueryTI (
+ Int4 uid,
+ Int2 retcode,
+ Int4 flags
+);
+
NLM_EXTERN SeqEntryPtr PubSeqSynchronousQuery (
Int4 uid,
Int2 retcode,
diff --git a/access/tax3api.c b/access/tax3api.c
index 67720f14..5a537224 100644
--- a/access/tax3api.c
+++ b/access/tax3api.c
@@ -29,7 +29,7 @@
*
* Version Creation Date: 7/8/04
*
-* $Revision: 1.28 $
+* $Revision: 1.35 $
*
* File Description:
*
@@ -52,12 +52,29 @@
/* low-level connection functions */
+static Boolean text_tax_asn = FALSE;
+static Boolean text_tax_set = FALSE;
+
NLM_EXTERN CONN Tax3OpenConnection (
void
)
{
- return QUERY_OpenServiceQuery ("TaxService3", NULL, 30);
+#ifdef OS_UNIX
+ CharPtr str;
+
+ if (! text_tax_set) {
+ str = (CharPtr) getenv ("TEXT_TAX_ASN");
+ if (StringDoesHaveText (str)) {
+ if (StringICmp (str, "TRUE") == 0) {
+ text_tax_asn = TRUE;
+ }
+ }
+ text_tax_set = TRUE;
+ }
+#endif
+
+ return QUERY_OpenServiceQuery (text_tax_asn ? "TaxService3Text" : "TaxService3", NULL, 30);
}
#ifdef OS_MAC
@@ -98,7 +115,7 @@ NLM_EXTERN Taxon3ReplyPtr Tax3WaitForReply (
#endif
}
if (status == eIO_Success) {
- aicp = QUERY_AsnIoConnOpen ("rb", conn);
+ aicp = QUERY_AsnIoConnOpen (text_tax_asn ? "r" : "rb", conn);
t3ry = Taxon3ReplyAsnRead (aicp->aip, NULL);
QUERY_AsnIoConnClose (aicp);
}
@@ -124,7 +141,7 @@ NLM_EXTERN Taxon3ReplyPtr Tax3SynchronousQuery (
if (conn == NULL) return NULL;
- aicp = QUERY_AsnIoConnOpen ("wb", conn);
+ aicp = QUERY_AsnIoConnOpen (text_tax_asn ? "w" : "wb", conn);
Taxon3RequestAsnWrite (t3rq, aicp->aip, NULL);
@@ -155,7 +172,7 @@ NLM_EXTERN Boolean Tax3AsynchronousQuery (
if (conn == NULL) return FALSE;
- aicp = QUERY_AsnIoConnOpen ("wb", conn);
+ aicp = QUERY_AsnIoConnOpen (text_tax_asn ? "w" : "wb", conn);
Taxon3RequestAsnWrite (t3rq, aicp->aip, NULL);
@@ -187,7 +204,7 @@ NLM_EXTERN Taxon3ReplyPtr Tax3ReadReply (
Taxon3ReplyPtr t3ry = NULL;
if (conn != NULL && status == eIO_Success) {
- aicp = QUERY_AsnIoConnOpen ("rb", conn);
+ aicp = QUERY_AsnIoConnOpen (text_tax_asn ? "r" : "rb", conn);
t3ry = Taxon3ReplyAsnRead (aicp->aip, NULL);
QUERY_AsnIoConnClose (aicp);
}
@@ -250,6 +267,23 @@ NLM_EXTERN Taxon3RequestPtr CreateMultiTaxon3Request (ValNodePtr org_list)
return t3rp;
}
+
+static Boolean HasMisspellingFlag (T3DataPtr t)
+{
+ T3StatusFlagsPtr status;
+
+ if (t == NULL) return FALSE;
+ status = t->status;
+ while (status != NULL) {
+ if (StringCmp (status->property, "misspelled_name") == 0) {
+ return TRUE;
+ }
+ status = status->next;
+ }
+ return FALSE;
+}
+
+
NLM_EXTERN ValNodePtr Taxon3GetOrgRefList (ValNodePtr org_list)
{
Taxon3RequestPtr t3rq;
@@ -295,7 +329,11 @@ NLM_EXTERN ValNodePtr Taxon3GetOrgRefList (ValNodePtr org_list)
tdp = (T3DataPtr) trp->data.ptrvalue;
if (tdp != NULL) {
t3orp = (OrgRefPtr)(tdp->org);
- ValNodeAddPointer (&response_list, 3, (Pointer) t3orp);
+ if (HasMisspellingFlag (tdp)) {
+ ValNodeAddPointer (&response_list, 4, (Pointer) t3orp);
+ } else {
+ ValNodeAddPointer (&response_list, 3, (Pointer) t3orp);
+ }
tdp->org = NULL;
}
break;
@@ -748,7 +786,6 @@ static Boolean DoTaxonIdsMatch (OrgRefPtr org1, OrgRefPtr org2)
NLM_EXTERN void Taxon3CheckOrgInSeqEntry (SeqEntryPtr sep, ValNodePtr PNTR not_found, ValNodePtr PNTR bad_match)
{
- ValNodePtr biop_list = NULL;
ValNodePtr request_list = NULL;
ValNodePtr response_list = NULL;
ValNodePtr biop_vnp, response_vnp;
@@ -883,6 +920,33 @@ static ValNodePtr FreeOrgRefValNodeList (ValNodePtr vnp)
}
+static Boolean EndsWithSp (CharPtr str)
+{
+ Int4 len;
+
+ if (StringHasNoText (str)) return FALSE;
+ len = StringLen (str);
+ if (len < 4) return FALSE;
+ if (StringCmp (str + len - 4, " sp.") == 0) return TRUE;
+ return FALSE;
+}
+
+
+static CharPtr RemoveSp (CharPtr orig)
+{
+ CharPtr cpy = NULL;
+ Int4 len;
+
+ len = StringLen (orig);
+ if (len >= 4 && StringCmp (orig + len - 4, " sp.") == 0) {
+ cpy = (CharPtr) MemNew (sizeof (Char) * len - 3);
+ StringNCpy (cpy, orig, len - 4);
+ cpy[len - 4] = 0;
+ }
+ return cpy;
+}
+
+
static void AddRequestOrgForString (CharPtr str, CharPtr host, ValNodePtr PNTR request_list, ValNodePtr PNTR req_host_list)
{
OrgRefPtr request_org;
@@ -894,28 +958,38 @@ static void AddRequestOrgForString (CharPtr str, CharPtr host, ValNodePtr PNTR r
return;
}
- request_org = OrgRefNew();
- request_org->taxname = StringSave (str);
- ValNodeAddPointer (request_list, 3, request_org);
- ValNodeAddPointer (req_host_list, 0, host);
-
- /* if more than one word, try chopping off last to see if abbreviated name looks up */
- word1_len = StringCSpn (str, " ");
- if (word1_len == 0) return;
- space_len = StringSpn (str + word1_len, " ");
- if (space_len == 0) return;
- word2_len = StringCSpn (str + word1_len + space_len, " ");
- if (word2_len == 0) return;
- if (isspace (*(str + word1_len + space_len + word2_len)))
- {
- cpy = StringSave (str);
- cp = StringRChr (cpy, ' ');
- if (cp != NULL)
+ /* if ends with " sp.", remove " sp." */
+ cpy = RemoveSp (host);
+ if (cpy != NULL) {
+ request_org = OrgRefNew();
+ request_org->taxname = cpy;
+ ValNodeAddPointer (request_list, 3, request_org);
+ ValNodeAddPointer (req_host_list, 0, host);
+ } else {
+ request_org = OrgRefNew();
+ request_org->taxname = StringSave (str);
+ ValNodeAddPointer (request_list, 3, request_org);
+ ValNodeAddPointer (req_host_list, 0, host);
+
+
+ /* if more than one word, try chopping off last to see if abbreviated name looks up */
+ word1_len = StringCSpn (str, " ");
+ if (word1_len == 0) return;
+ space_len = StringSpn (str + word1_len, " ");
+ if (space_len == 0) return;
+ word2_len = StringCSpn (str + word1_len + space_len, " ");
+ if (word2_len == 0) return;
+ if (isspace (*(str + word1_len + space_len + word2_len)))
{
- *cp = 0;
- AddRequestOrgForString (cpy, host, request_list, req_host_list);
+ cpy = StringSave (str);
+ cp = StringRChr (cpy, ' ');
+ if (cp != NULL)
+ {
+ *cp = 0;
+ AddRequestOrgForString (cpy, host, request_list, req_host_list);
+ }
+ cpy = MemFree (cpy);
}
- cpy = MemFree (cpy);
}
}
@@ -1083,26 +1157,13 @@ static void AddBioSourcesToSpecificHostChecklist (ValNodePtr biop_list, ValNodeP
}
-static Boolean EndsWithSp (CharPtr str)
-{
- Int4 len;
-
- if (StringHasNoText (str)) return FALSE;
- len = StringLen (str);
- if (len < 4) return FALSE;
- if (StringCmp (str + len - 4, " sp.") == 0) return TRUE;
- return FALSE;
-}
-
-
-NLM_EXTERN Boolean IsOrgModSpecificHostToBeChecked (OrgModPtr mod, Boolean for_validator)
+NLM_EXTERN Boolean IsOrgModSpecificHostToBeChecked (OrgModPtr mod, Boolean for_validator, Boolean check_single_word)
{
CharPtr cp;
Boolean any_upper = FALSE, any_space = FALSE;
if (mod != NULL && mod->subtype == ORGMOD_nat_host
- && !StringHasNoText (mod->subname)
- && (!for_validator || !EndsWithSp(mod->subname)))
+ && !StringHasNoText (mod->subname))
{
cp = mod->subname;
while (*cp != 0 && (!any_upper || !any_space))
@@ -1121,7 +1182,7 @@ NLM_EXTERN Boolean IsOrgModSpecificHostToBeChecked (OrgModPtr mod, Boolean for_v
}
cp++;
}
- if (any_upper && any_space)
+ if (any_upper && (any_space || check_single_word))
{
return TRUE;
}
@@ -1130,7 +1191,7 @@ NLM_EXTERN Boolean IsOrgModSpecificHostToBeChecked (OrgModPtr mod, Boolean for_v
}
-static Boolean HasSpecificHostToBeChecked (BioSourcePtr biop, Boolean for_validator)
+static Boolean HasSpecificHostToBeChecked (BioSourcePtr biop, Boolean for_validator, Boolean check_single_word)
{
OrgModPtr mod;
@@ -1138,7 +1199,7 @@ static Boolean HasSpecificHostToBeChecked (BioSourcePtr biop, Boolean for_valida
mod = biop->org->orgname->mod;
while (mod != NULL)
{
- if (IsOrgModSpecificHostToBeChecked (mod, for_validator))
+ if (IsOrgModSpecificHostToBeChecked (mod, for_validator, check_single_word))
{
return TRUE;
}
@@ -1223,6 +1284,7 @@ static Boolean MatchesCommonName (CharPtr txt, CharPtr common_name)
typedef struct spechostgather {
ValNodePtr list;
Boolean for_validator;
+ Boolean check_single_word;
} SpecHostGatherData, PNTR SpecHostGatherPtr;
static void AddSpecificHostBioSourceFeatToList (SeqFeatPtr sfp, Pointer userdata)
@@ -1232,7 +1294,7 @@ static void AddSpecificHostBioSourceFeatToList (SeqFeatPtr sfp, Pointer userdata
if (sfp == NULL || sfp->data.choice != SEQFEAT_BIOSRC || userdata == NULL) return;
p = (SpecHostGatherPtr) userdata;
- if (HasSpecificHostToBeChecked (sfp->data.value.ptrvalue, p->for_validator))
+ if (HasSpecificHostToBeChecked (sfp->data.value.ptrvalue, p->for_validator, p->check_single_word))
{
ValNodeAddPointer (&(p->list), OBJ_SEQFEAT, sfp);
}
@@ -1246,18 +1308,19 @@ static void AddSpecificHostBioSourceDescToList (SeqDescrPtr sdp, Pointer userdat
if (sdp == NULL || sdp->choice != Seq_descr_source || userdata == NULL) return;
p = (SpecHostGatherPtr) userdata;
- if (HasSpecificHostToBeChecked (sdp->data.ptrvalue, p->for_validator))
+ if (HasSpecificHostToBeChecked (sdp->data.ptrvalue, p->for_validator, p->check_single_word))
{
ValNodeAddPointer (&(p->list), OBJ_SEQDESC, sdp);
}
}
-static ValNodePtr GetSpecificHostBioSourceList (SeqEntryPtr sep, Boolean for_validator)
+static ValNodePtr GetSpecificHostBioSourceList (SeqEntryPtr sep, Boolean for_validator, Boolean check_single_word)
{
SpecHostGatherData d;
d.for_validator = for_validator;
+ d.check_single_word = check_single_word;
d.list = NULL;
VisitFeaturesInSep (sep, &d, AddSpecificHostBioSourceFeatToList);
VisitDescriptorsInSep (sep, &d, AddSpecificHostBioSourceDescToList);
@@ -1351,8 +1414,79 @@ FormatSpecificHostRequests
}
+static Boolean IsShorterVersionOfEarlierMatch (ValNodePtr request_vnp, ValNodePtr request_list, ValNodePtr response_list)
+{
+ OrgRefPtr this_org, earlier_org, earlier_response;
+ Int4 len;
+ Boolean found = FALSE;
+
+ if (request_vnp == NULL || request_list == NULL) return FALSE;
+ this_org = (OrgRefPtr) request_vnp->data.ptrvalue;
+ if (this_org == NULL || StringHasNoText (this_org->taxname)) return FALSE;
+ len = StringLen (this_org->taxname);
+ while (request_list != NULL && request_list != request_vnp && !found && response_list != NULL)
+ {
+ earlier_org = (OrgRefPtr) request_list->data.ptrvalue;
+ earlier_response = (OrgRefPtr) response_list->data.ptrvalue;
+ if (earlier_org != NULL && earlier_response != NULL
+ && StringNCmp (earlier_org->taxname, this_org->taxname, len) == 0
+ && (MatchesCommonName (earlier_org->taxname, earlier_response->common)
+ || MatchesSynonym (earlier_org->taxname, earlier_response)
+ || MatchesGenBankSynonym (earlier_org->taxname, earlier_response)))
+ {
+ found = TRUE;
+ }
+
+ request_list = request_list->next;
+ response_list = response_list->next;
+ }
+ return found;
+}
+
+
+static Boolean MatchWithSp (CharPtr request, CharPtr response)
+{
+ CharPtr cpy = NULL;
+ Boolean rval = FALSE;
+
+ if (StringCmp (request, response) == 0) {
+ rval = TRUE;
+ } else {
+ cpy = RemoveSp (request);
+ if (cpy != NULL && StringCmp (cpy, response) == 0) {
+ rval = TRUE;
+ }
+ cpy = MemFree (cpy);
+ }
+ return rval;
+}
+
+
+static Boolean FindMatchInResponseOrgList (CharPtr request_str, ValNodePtr response_list)
+{
+ ValNodePtr vnp;
+ OrgRefPtr org;
+ Boolean rval = FALSE;
+
+ if (StringHasNoText (request_str) || response_list == NULL) {
+ return FALSE;
+ }
+
+ for (vnp = response_list; vnp != NULL && !rval; vnp = vnp->next) {
+ org = (OrgRefPtr) vnp->data.ptrvalue;
+ if (org != NULL) {
+ if (MatchesCommonName (request_str, org->common)
+ || MatchesSynonym (request_str, org)) {
+ rval = TRUE;
+ }
+ }
+ }
+ return rval;
+}
+
+
/* Want to check that specific host names are valid */
-NLM_EXTERN ValNodePtr Taxon3CheckSpecificHostInSeqEntry (SeqEntryPtr sep, Boolean for_validator)
+NLM_EXTERN ValNodePtr Taxon3CheckSpecificHostInSeqEntry (SeqEntryPtr sep, Boolean for_validator, Boolean check_single_word)
{
ValNodePtr biop_list = NULL;
ValNodePtr req_host_list = NULL, spec_host_list = NULL;
@@ -1362,11 +1496,11 @@ NLM_EXTERN ValNodePtr Taxon3CheckSpecificHostInSeqEntry (SeqEntryPtr sep, Boolea
ValNodePtr check_list, check_vnp;
OrgRefPtr request_org, response_org;
SpecificHostCheckPtr p;
- Boolean has_taxname, has_bad;
+ Boolean has_taxname, has_bad, all_synonyms;
ValNodePtr bad_biop_list = NULL;
- Int4 level;
+ ErrSev level;
- biop_list = GetSpecificHostBioSourceList (sep, for_validator);
+ biop_list = GetSpecificHostBioSourceList (sep, for_validator, check_single_word);
/* get a list of unique specific_host values */
spec_host_list = GetListOfUniqueSpecificHostValues (biop_list);
@@ -1401,23 +1535,37 @@ NLM_EXTERN ValNodePtr Taxon3CheckSpecificHostInSeqEntry (SeqEntryPtr sep, Boolea
has_bad = FALSE;
request_vnp = p->request_list;
response_vnp = p->response_list;
+ all_synonyms = TRUE;
while (!has_taxname && request_vnp != NULL && response_vnp != NULL)
{
request_org = (OrgRefPtr) request_vnp->data.ptrvalue;
response_org = (OrgRefPtr) response_vnp->data.ptrvalue;
- if (response_org == NULL)
+ if (response_vnp->choice == 4)
{
has_bad = TRUE;
+ }
+ else if (response_org == NULL)
+ {
+ if (!IsShorterVersionOfEarlierMatch(request_vnp, p->request_list, p->response_list)
+ && !FindMatchInResponseOrgList (request_org->taxname, p->response_list))
+ {
+ has_bad = TRUE;
+ }
}
- else if (StringCmp (request_org->taxname, response_org->taxname) == 0)
+ else if (MatchWithSp (request_org->taxname, response_org->taxname))
{
has_taxname = TRUE;
+ }
+ else if (MatchesCommonName (request_org->taxname, response_org->common)
+ || MatchesSynonym (request_org->taxname, response_org)
+ || MatchesGenBankSynonym (request_org->taxname, response_org))
+ {
+ /* it's a synonym */
}
- else if (!MatchesCommonName (request_org->taxname, response_org->common)
- && ! MatchesSynonym (request_org->taxname, response_org)
- && ! MatchesGenBankSynonym (request_org->taxname, response_org))
+ else
{
has_bad = TRUE;
+ all_synonyms = FALSE;
}
request_vnp = request_vnp->next;
response_vnp = response_vnp->next;
@@ -1557,6 +1705,7 @@ static CharPtr StringIsFirstPartOfItemInList (CharPtr str, ValNodePtr list)
return NULL;
}
+
static ValNodePtr GetFixesForOneSpecificHostValue (SpecificHostCheckPtr p)
{
CharPtr new_taxname = NULL, old_taxname = NULL;
@@ -1578,10 +1727,12 @@ static ValNodePtr GetFixesForOneSpecificHostValue (SpecificHostCheckPtr p)
response_org = (OrgRefPtr) response_vnp->data.ptrvalue;
if (response_org == NULL)
{
- /* no data */
- ValNodeAddPointer (&failed_requests, 0, StringSave (request_org->taxname));
+ if (!FindMatchInResponseOrgList (request_org->taxname, p->response_list)) {
+ /* no data */
+ ValNodeAddPointer (&failed_requests, 0, StringSave (request_org->taxname));
+ }
}
- else if (StringCmp (request_org->taxname, response_org->taxname) == 0)
+ else if (MatchWithSp (request_org->taxname, response_org->taxname))
{
/* found taxname */
/* is it just a shorter version of an earlier failed request? */
@@ -1617,7 +1768,7 @@ static ValNodePtr GetFixesForOneSpecificHostValue (SpecificHostCheckPtr p)
}
-NLM_EXTERN ValNodePtr Taxon3GetSpecificHostFixesInSeqEntry (SeqEntryPtr sep)
+NLM_EXTERN ValNodePtr Taxon3GetSpecificHostFixesInSeqEntry (SeqEntryPtr sep, Boolean check_single_word)
{
ValNodePtr biop_list = NULL;
ValNodePtr req_host_list = NULL, spec_host_list = NULL;
@@ -1625,11 +1776,10 @@ NLM_EXTERN ValNodePtr Taxon3GetSpecificHostFixesInSeqEntry (SeqEntryPtr sep)
ValNodePtr response_list = NULL;
ValNodePtr check_list, check_vnp;
SpecificHostCheckPtr p;
- Int4 level;
- Boolean rval = FALSE;
+ ErrSev level;
ValNodePtr fix_list = NULL;
- biop_list = GetSpecificHostBioSourceList (sep, FALSE);
+ biop_list = GetSpecificHostBioSourceList (sep, FALSE, check_single_word);
/* get a list of unique specific_host values */
spec_host_list = GetListOfUniqueSpecificHostValues (biop_list);
@@ -1673,12 +1823,12 @@ NLM_EXTERN ValNodePtr Taxon3GetSpecificHostFixesInSeqEntry (SeqEntryPtr sep)
}
-NLM_EXTERN Boolean Taxon3FixSpecificHostInSeqEntry (SeqEntryPtr sep)
+NLM_EXTERN Boolean Taxon3FixSpecificHostInSeqEntry (SeqEntryPtr sep, Boolean check_single_word)
{
ValNodePtr fix_list, vnp;
Boolean rval = FALSE;
- fix_list = Taxon3GetSpecificHostFixesInSeqEntry (sep);
+ fix_list = Taxon3GetSpecificHostFixesInSeqEntry (sep, check_single_word);
for (vnp = fix_list; vnp != NULL; vnp = vnp->next)
{
rval |= ApplyOneSpecificHostFix (vnp->data.ptrvalue);
@@ -1825,8 +1975,7 @@ NLM_EXTERN ValNodePtr GetOrganismTaxLookupFailuresInSeqEntry (SeqEntryPtr sep)
ValNodePtr request_list = NULL;
ValNodePtr response_list = NULL;
ValNodePtr req_vnp, resp_vnp;
- Int4 level;
- Boolean rval = FALSE;
+ ErrSev level;
ValNodePtr failed_list = NULL, vnp;
OrgRefPtr request_org;
diff --git a/access/tax3api.h b/access/tax3api.h
index ff7cc916..629eeb1f 100644
--- a/access/tax3api.h
+++ b/access/tax3api.h
@@ -29,7 +29,7 @@
*
* Version Creation Date: 7/8/04
*
-* $Revision: 1.15 $
+* $Revision: 1.16 $
*
* File Description:
*
@@ -137,9 +137,9 @@ NLM_EXTERN void Taxon3ReplaceOrgInSeqEntry (SeqEntryPtr sep, Boolean keep_syn);
NLM_EXTERN void Taxon3CheckOrgInSeqEntry (SeqEntryPtr sep, ValNodePtr PNTR not_found, ValNodePtr PNTR bad_match);
NLM_EXTERN void CheckTaxNamesAgainstTaxDatabase (ValNodePtr PNTR discrepancy_list, ValNodePtr sep_list);
-NLM_EXTERN Boolean IsOrgModSpecificHostToBeChecked (OrgModPtr mod, Boolean for_validator);
-NLM_EXTERN ValNodePtr Taxon3CheckSpecificHostInSeqEntry (SeqEntryPtr sep, Boolean for_validator);
-NLM_EXTERN Boolean Taxon3FixSpecificHostInSeqEntry (SeqEntryPtr sep);
+NLM_EXTERN Boolean IsOrgModSpecificHostToBeChecked (OrgModPtr mod, Boolean for_validator, Boolean check_single_word);
+NLM_EXTERN ValNodePtr Taxon3CheckSpecificHostInSeqEntry (SeqEntryPtr sep, Boolean for_validator, Boolean check_single_word);
+NLM_EXTERN Boolean Taxon3FixSpecificHostInSeqEntry (SeqEntryPtr sep, Boolean check_single_word);
typedef struct specifichostfix {
ValNodePtr feat_or_desc;
@@ -151,7 +151,7 @@ typedef struct specifichostfix {
extern ValNodePtr SpecificHostFixListFree (ValNodePtr vnp);
extern Boolean ApplyOneSpecificHostFix (SpecificHostFixPtr s);
/* returns ValNodePtr list of SpecificHostFixPtr */
-NLM_EXTERN ValNodePtr Taxon3GetSpecificHostFixesInSeqEntry (SeqEntryPtr sep);
+NLM_EXTERN ValNodePtr Taxon3GetSpecificHostFixesInSeqEntry (SeqEntryPtr sep, Boolean check_single_word);
NLM_EXTERN ValNodePtr GetOrganismTaxLookupFailuresInSeqEntry (SeqEntryPtr sep);
diff --git a/algo/blast/api/blast_api.c b/algo/blast/api/blast_api.c
index a088090e..e605f036 100644
--- a/algo/blast/api/blast_api.c
+++ b/algo/blast/api/blast_api.c
@@ -1,4 +1,4 @@
-/* $Id: blast_api.c,v 1.50 2007/07/27 18:02:26 papadopo Exp $
+/* $Id: blast_api.c,v 1.53 2008/02/13 22:35:49 camacho Exp $
***************************************************************************
* *
* COPYRIGHT NOTICE *
@@ -284,6 +284,7 @@ s_BlastHSPStreamSetUp(BLAST_SequenceBlk* query, BlastQueryInfo* query_info,
options->score_options, &blasthit_params);
*hsp_stream =
Blast_HSPListCollectorInitMT(options->program, blasthit_params,
+ options->ext_options, TRUE,
kNumResults, lock);
} else {
/* Initialize the queue HSP stream for tabular formatting. */
@@ -718,7 +719,7 @@ Blast_RunSearch(SeqLoc* query_seqloc,
}
}
- status = LookupTableWrapInit(query, lookup_options,
+ status = LookupTableWrapInit(query, lookup_options, query_options,
lookup_segments, sbp, &lookup_wrap, rps_info, &core_msg);
if (core_msg)
{
diff --git a/algo/blast/api/blast_input.c b/algo/blast/api/blast_input.c
index 364d1dfc..abb2312e 100644
--- a/algo/blast/api/blast_input.c
+++ b/algo/blast/api/blast_input.c
@@ -1,5 +1,5 @@
#ifndef SKIP_DOXYGEN_PROCESSING
-static char const rcsid[] = "$Id: blast_input.c,v 1.30 2007/05/07 13:27:15 kans Exp $";
+static char const rcsid[] = "$Id: blast_input.c,v 1.31 2008/01/10 15:43:35 madden Exp $";
#endif /* SKIP_DOXYGEN_PROCESSING */
/* ===========================================================================
*
@@ -117,11 +117,18 @@ BLAST_GetQuerySeqLoc(FILE *infp, Boolean query_is_na, Uint1 strand,
}
if (query_bsp == NULL) {
- ErrPostEx(SEV_FATAL, 0, 0, "Unable to obtain bioseq\n");
+ ErrPostEx(SEV_FATAL, 0, 0, "Unable to obtain bioseq for sequence number %ld", (long) query_count-1);
*ctr += query_index;
return -1;
}
+ if (query_bsp->length <= 0) {
+ ErrPostEx(SEV_FATAL, 0, 0, "Sequence number %ld had length %ld", (long) query_count-1, (long) query_bsp->length);
+ *ctr += query_index;
+ return -1;
+ }
+
+
/* Original from and to are 1-offsets, except when they are 0's,
in which case they are start and end of sequence respectively */
diff --git a/algo/blast/api/blast_options_api.c b/algo/blast/api/blast_options_api.c
index 12c0f855..9e248e8f 100644
--- a/algo/blast/api/blast_options_api.c
+++ b/algo/blast/api/blast_options_api.c
@@ -1,4 +1,4 @@
-/* $Id: blast_options_api.c,v 1.24 2007/03/20 15:17:16 kans Exp $
+/* $Id: blast_options_api.c,v 1.25 2007/12/14 17:11:29 madden Exp $
***************************************************************************
* *
* COPYRIGHT NOTICE *
@@ -323,6 +323,14 @@ Int2 SBlastOptionsSetDbGeneticCode(SBlastOptions* options, Int4 gc)
options->db_options->genetic_code = gc;
+ if (GenCodeSingletonFind(gc) == NULL)
+ {
+ Uint1* gcode = NULL;
+ BLAST_GeneticCodeFind(options->db_options->genetic_code, &gcode);
+ GenCodeSingletonAdd(options->db_options->genetic_code, gcode);
+ free(gcode);
+ }
+
return status;
}
diff --git a/algo/blast/api/dust_filter.c b/algo/blast/api/dust_filter.c
index 29097583..f233b3fd 100644
--- a/algo/blast/api/dust_filter.c
+++ b/algo/blast/api/dust_filter.c
@@ -1,5 +1,5 @@
#ifndef SKIP_DOXYGEN_PROCESSING
-static char const rcsid[] = "$Id: dust_filter.c,v 1.10 2007/01/24 14:31:16 madden Exp $";
+static char const rcsid[] = "$Id: dust_filter.c,v 1.12 2007/12/19 22:05:56 camacho Exp $";
#endif /* SKIP_DOXYGEN_PROCESSING */
/*
@@ -175,9 +175,7 @@ s_GetFilteringLocations(BLAST_SequenceBlk* query_blk, BlastQueryInfo* query_info
/* Reverse this relative to the part of the query being searched, leave it up to
BlastMaskLocToSeqLoc to put it into the context of the entire query sequence (and
not just that part being searched). */
- filter_slp_rev = BlastSeqLocReverse(filter_slp, query_length);
- filter_slp = BlastSeqLocFree(filter_slp);
- filter_slp = filter_slp_rev;
+ BlastSeqLocReverse(filter_slp, query_length);
}
else
{
diff --git a/algo/blast/api/repeats_filter.c b/algo/blast/api/repeats_filter.c
index 61259273..b31f73be 100644
--- a/algo/blast/api/repeats_filter.c
+++ b/algo/blast/api/repeats_filter.c
@@ -1,5 +1,5 @@
#ifndef SKIP_DOXYGEN_PROCESSING
-static char const rcsid[] = "$Id: repeats_filter.c,v 1.18 2007/03/12 16:13:36 madden Exp $";
+static char const rcsid[] = "$Id: repeats_filter.c,v 1.19 2007/12/19 21:56:48 camacho Exp $";
#endif /* SKIP_DOXYGEN_PROCESSING */
/*
@@ -150,10 +150,9 @@ s_FillMaskLocFromBlastHSPResults(SeqLoc* query_seqloc, BlastHSPResults* results,
}
}
/* Make the intervals unique */
- ordered_loc_list = BlastSeqLocCombine(loc_list, REPEAT_MASK_LINK_VALUE);
-
- /* Free the list of locations that's no longer needed. */
- loc_list = BlastSeqLocFree(loc_list);
+ BlastSeqLocCombine(&loc_list, REPEAT_MASK_LINK_VALUE);
+ ordered_loc_list = loc_list;
+ loc_list = NULL;
mask->seqloc_array[query_index*kNumContexts] = ordered_loc_list;
}
diff --git a/algo/blast/api/seqsrc_readdb.c b/algo/blast/api/seqsrc_readdb.c
index 5b1d35bd..fcf48a68 100644
--- a/algo/blast/api/seqsrc_readdb.c
+++ b/algo/blast/api/seqsrc_readdb.c
@@ -1,4 +1,4 @@
-/* $Id: seqsrc_readdb.c,v 1.57 2007/05/15 15:29:56 camacho Exp $
+/* $Id: seqsrc_readdb.c,v 1.59 2008/01/02 14:00:35 madden Exp $
* ===========================================================================
*
* PUBLIC DOMAIN NOTICE
@@ -29,7 +29,7 @@
*/
#ifndef SKIP_DOXYGEN_PROCESSING
-static char const rcsid[] = "$Id: seqsrc_readdb.c,v 1.57 2007/05/15 15:29:56 camacho Exp $";
+static char const rcsid[] = "$Id: seqsrc_readdb.c,v 1.59 2008/01/02 14:00:35 madden Exp $";
#endif /* SKIP_DOXYGEN_PROCESSING */
#include <algo/blast/api/seqsrc_readdb.h>
@@ -142,7 +142,7 @@ s_ReaddbGetName(void* readdb_handle, void* ignoreme)
{
ReadDBFILEPtr rdfp = (ReadDBFILEPtr) readdb_handle;
- return readdb_get_filename(rdfp);
+ return readdb_get_full_filename(rdfp);
}
/** Retrieves the date of the BLAST database.
@@ -342,7 +342,7 @@ s_ReadDbGetNextOidListChunk(ReadDBFILEPtr rdfp, BlastSeqSrcIterator* itr,
bit_start = 0;
}
- if (oidindex == itr->chunk_sz || !rdfp->next) {
+ if (oidindex == itr->chunk_sz || (oidindex && !rdfp->next)) {
itr->itr_type = eOidList;
itr->current_pos = 0;
*last_oid_assigned = rdfp->start + gi;
diff --git a/algo/blast/composition_adjustment/redo_alignment.c b/algo/blast/composition_adjustment/redo_alignment.c
index 8182c8c3..995b4f24 100644
--- a/algo/blast/composition_adjustment/redo_alignment.c
+++ b/algo/blast/composition_adjustment/redo_alignment.c
@@ -31,7 +31,7 @@
*/
#ifndef SKIP_DOXYGEN_PROCESSING
static char const rcsid[] =
- "$Id: redo_alignment.c,v 1.11 2006/06/29 16:50:07 gertz Exp $";
+ "$Id: redo_alignment.c,v 1.13 2007/10/25 15:55:36 kazimird Exp $";
#endif /* SKIP_DOXYGEN_PROCESSING */
#include <stdlib.h>
@@ -943,6 +943,29 @@ Blast_RedoAlignParamsNew(Blast_MatrixInfo ** pmatrix_info,
return params;
}
+#define MINIMUM_LENGTH_NEAR_IDENTICAL 50
+
+
+static Boolean s_preliminaryTestNearIdentical(BlastCompo_QueryInfo query_info[],
+ s_WindowInfo *window)
+{
+ BlastCompo_Alignment *align; /*first alignment in this window*/
+ int queryIndex, queryLength;
+
+ if ((window->hspcnt > 1) ||
+ (window->hspcnt < 1))
+ return(FALSE);
+ align = window->align;
+ queryIndex = align->queryIndex;
+ queryLength = query_info[queryIndex].seq.length;
+ if ((align->queryEnd - align->queryStart) !=
+ (align->matchEnd - align->matchStart))
+ return(FALSE);
+ if ((align->matchEnd - align->matchStart +1) <
+ (MIN(queryLength, MINIMUM_LENGTH_NEAR_IDENTICAL)))
+ return(FALSE);
+ return(TRUE);
+}
/* Documented in redo_alignment.h. */
int
@@ -995,11 +1018,19 @@ Blast_RedoOneMatch(BlastCompo_Alignment ** alignments,
BlastCompo_SequenceData * query; /* query data for this window */
/* the composition of this query */
Blast_AminoAcidComposition * query_composition;
+ Boolean nearIdenticalStatus; /*are query and subject nearly
+ identical in the aligned part?*/
window = windows[window_index];
+
+ nearIdenticalStatus = s_preliminaryTestNearIdentical(query_info,
+ window);
status =
callbacks->get_range(matchingSeq, &window->subject_range,
- &subject);
+ &subject,
+ &query_info[window->align->queryIndex].seq,
+ query_info[window->align->queryIndex].origin,
+ window->align, nearIdenticalStatus);
if (status != 0) {
goto window_index_loop_cleanup;
}
@@ -1141,22 +1172,31 @@ Blast_RedoOneMatchSmithWaterman(BlastCompo_Alignment ** alignments,
BlastCompo_SequenceData subject = {0,};
/* subject data for this window */
BlastCompo_SequenceData * query; /* query data for this window */
+ int query_offset; /*offset if there are multiple queries*/
/* the composition of this query */
Blast_AminoAcidComposition * query_composition;
double searchsp; /* effective search space */
-
+ Boolean nearIdenticalStatus; /*are query and subject nearly
+ identical in the aligned part?*/
/* adjust_search_failed is true only if Blast_AdjustScores
* is called and returns a nonzero value */
int adjust_search_failed = FALSE;
+
window = windows[window_index];
query_index = window->query_range.context;
query = &query_info[query_index].seq;
+ query_offset = query_info[query_index].origin;
query_composition = &query_info[query_index].composition;
searchsp = query_info[query_index].eff_search_space;
- status = callbacks->get_range(matchingSeq, &window->subject_range,
- &subject);
+ nearIdenticalStatus = s_preliminaryTestNearIdentical(query_info,
+ window);
+
+ status =
+ callbacks->get_range(matchingSeq, &window->subject_range,
+ &subject,
+ query, query_offset, window->align, nearIdenticalStatus);
if (status != 0)
goto window_index_loop_cleanup;
diff --git a/algo/blast/composition_adjustment/redo_alignment.h b/algo/blast/composition_adjustment/redo_alignment.h
index 08e58f08..27467e63 100644
--- a/algo/blast/composition_adjustment/redo_alignment.h
+++ b/algo/blast/composition_adjustment/redo_alignment.h
@@ -1,4 +1,4 @@
-/* $Id: redo_alignment.h,v 1.11 2007/05/23 15:55:29 kazimird Exp $
+/* $Id: redo_alignment.h,v 1.12 2007/10/11 14:25:37 kazimird Exp $
* ===========================================================================
*
* PUBLIC DOMAIN NOTICE
@@ -191,12 +191,22 @@ calc_lambda_type(double * probs, int min_score, int max_score,
*
* @param sequence a sequence
* @param range the range to get
- * @param data the data obtained
+ * @param data the matching sequence data obtained
+ * @param queryData the sequence data for the query
+ * @param queryOffset offset for align if there are multiple queries
+ * @param align information about the alignment between query and subject
+ * @param shouldTestIdentical did alignment pass a preliminary test in
+ * redo_alignment.c that indicates the sequence
+ * pieces may be near identical
*/
typedef int
get_range_type(const BlastCompo_MatchingSequence * sequence,
const BlastCompo_SequenceRange * range,
- BlastCompo_SequenceData * data);
+ BlastCompo_SequenceData * data,
+ const BlastCompo_SequenceData * queryData,
+ const int queryOffset,
+ const BlastCompo_Alignment *align,
+ const Boolean shouldTestIdentical);
/**
* Function type: Calculate the traceback for one alignment by
diff --git a/algo/blast/core/blast_aalookup.c b/algo/blast/core/blast_aalookup.c
index 056115a1..2a2bd22f 100644
--- a/algo/blast/core/blast_aalookup.c
+++ b/algo/blast/core/blast_aalookup.c
@@ -1,4 +1,4 @@
-/* $Id: blast_aalookup.c,v 1.7 2007/04/11 15:55:30 kazimird Exp $
+/* $Id: blast_aalookup.c,v 1.10 2007/11/27 16:25:55 kazimird Exp $
* ===========================================================================
*
* PUBLIC DOMAIN NOTICE
@@ -34,7 +34,7 @@
#ifndef SKIP_DOXYGEN_PROCESSING
static char const rcsid[] =
- "$Id: blast_aalookup.c,v 1.7 2007/04/11 15:55:30 kazimird Exp $";
+ "$Id: blast_aalookup.c,v 1.10 2007/11/27 16:25:55 kazimird Exp $";
#endif /* SKIP_DOXYGEN_PROCESSING */
/** Structure containing information needed for adding neighboring words.
@@ -848,14 +848,41 @@ static void s_CompressedLookupAddEncoded(
Uint1* w,
Int4 query_offset)
{
- Int4 alphabet_size = lookup->compressed_alphabet_size;
- Int4 word_length = lookup->word_length;
- Int4 index = 0;
- Int4 i;
-
- for (i = word_length - 1; i >= 0; i--)
- index = index * alphabet_size + w[i];
+ Int4 index;
+
+ static const Int4 W7p1[] = { 0, 10, 20, 30, 40, 50, 60, 70, 80, 90};
+ static const Int4 W7p2[] = { 0, 100, 200, 300, 400, 500, 600, 700, 800,
+ 900};
+ static const Int4 W7p3[] = { 0, 1000, 2000, 3000, 4000, 5000, 6000,
+ 7000, 8000, 9000};
+ static const Int4 W7p4[] = { 0, 10000, 20000, 30000, 40000, 50000, 60000,
+ 70000, 80000, 90000};
+ static const Int4 W7p5[] = { 0, 100000, 200000, 300000, 400000, 500000,
+ 600000, 700000, 800000, 900000};
+ static const Int4 W7p6[] = { 0, 1000000, 2000000, 3000000, 4000000,
+ 5000000, 6000000, 7000000, 8000000, 9000000};
+ static const Int4 W6p1[] = { 0, 15, 30, 45, 60, 75, 90, 105, 120, 135,
+ 150, 165, 180, 195, 210};
+ static const Int4 W6p2[] = { 0, 225, 450, 675, 900, 1125, 1350, 1575,
+ 1800, 2025, 2250, 2475, 2700, 2925, 3150};
+ static const Int4 W6p3[] = { 0, 3375, 6750, 10125, 13500, 16875, 20250,
+ 23625, 27000, 30375, 33750, 37125, 40500,
+ 43875, 47250};
+ static const Int4 W6p4[] = { 0, 50625, 101250, 151875, 202500, 253125,
+ 303750, 354375, 405000, 455625, 506250,
+ 556875, 607500, 658125, 708750};
+ static const Int4 W6p5[] = { 0, 759375, 1518750, 2278125, 3037500,
+ 3796875, 4556250, 5315625, 6075000, 6834375,
+ 7593750, 8353125, 9112500, 9871875, 10631250};
+
+ if(lookup->word_length == 7)
+ index = w[0] + W7p1[w[1]] + W7p2[w[2]] + W7p3[w[3]] +
+ W7p4[w[4]] + W7p5[w[5]] + W7p6[w[6]];
+ else
+ index = w[0] + W6p1[w[1]] + W6p2[w[2]] + W6p3[w[3]] +
+ W6p4[w[4]] + W6p5[w[5]];
+
s_CompressedLookupAddWordHit(lookup, index, query_offset);
}
@@ -889,11 +916,62 @@ typedef struct CompressedNeighborInfo {
Int4 compressed_alphabet_size; /**< for use with compressed alphabet */
Int4 wordsize; /**< number of residues in a word */
Int4 **matrix; /**< the substitution matrix */
- Int4 *row_max; /**< maximum possible score for each row of the matrix */
+ Int4 row_max[BLASTAA_SIZE]; /**< maximum possible score for each
+ row of the matrix */
Int4 query_offset; /**< a single query offset to index */
Int4 threshold; /**< the score threshold for neighboring words */
+ Int4 matrixSorted[BLASTAA_SIZE][BLASTAA_SIZE]; /**< version of substitution
+ matrix whose rows are
+ sorted by score */
+ Uint1 matrixSortedChar[BLASTAA_SIZE][BLASTAA_SIZE];/**< matrix with
+ the letters permuted identically
+ to that of matrixSorted */
} CompressedNeighborInfo;
+/** Structure used as a helper for sorting matrix according to substitution
+ * score
+ */
+typedef struct LetterAndScoreDifferencePair{
+ Int4 diff; /**< score difference from row maximum */
+ Uint1 letter; /**< given protein letter */
+} LetterAndScoreDifferencePair;
+
+/** callback for the "sort" */
+int ScoreDifferenceSort(const void * a, const void *b ){
+ return (((LetterAndScoreDifferencePair*)a)->diff -
+ ((LetterAndScoreDifferencePair*)b)->diff);
+}
+
+/** Prepare "score sorted" version of the substitution matrix"
+ * @param info Pointer to the NeighborInfo structure.
+ */
+static void s_loadSortedMatrix(CompressedNeighborInfo* info) {
+
+ LetterAndScoreDifferencePair sortTable[BLASTAA_SIZE];
+ Int4 i;
+ Int4 longChar, shortChar;
+
+ for (longChar = 0; longChar < BLASTAA_SIZE; longChar++) {
+ for (shortChar = 0; shortChar <
+ info->compressed_alphabet_size; shortChar++) {
+
+ sortTable[shortChar].diff = info->row_max[longChar] -
+ info->matrix[longChar][shortChar];
+ sortTable[shortChar].letter = shortChar;
+ }
+
+ qsort(sortTable, info->compressed_alphabet_size,
+ sizeof(LetterAndScoreDifferencePair), ScoreDifferenceSort);
+
+ for (i = 0; i < info->compressed_alphabet_size; i++) {
+ Uint1 letter = sortTable[i].letter;
+
+ info->matrixSorted[longChar][i] = info->matrix[longChar][letter];
+ info->matrixSortedChar[longChar][i] = letter;
+ }
+ }
+}
+
/** Very similar to s_AddWordHitsCore
* @param info Pointer to the NeighborInfo structure.
* @param score The partial sum of the score.
@@ -907,8 +985,10 @@ static void s_CompressedAddWordHitsCore(CompressedNeighborInfo * info,
Int4 wordsize = info->wordsize;
Uint1 *query_word = info->query_word;
Uint1 *subject_word = info->subject_word;
- Int4 *row;
Int4 i;
+ Int4 *rowSorted;
+ Uint1 *charSorted;
+ Int4 currQueryChar = query_word[current_pos];
/* remove the maximum score of letters that align with the query letter
at position 'current_pos'. Later code will align the entire alphabet
@@ -916,63 +996,57 @@ static void s_CompressedAddWordHitsCore(CompressedNeighborInfo * info,
the row of the score matrix corresponding to the query letter at
current_pos */
- score -= info->row_max[query_word[current_pos]];
- row = info->matrix[query_word[current_pos]];
-
+ score -= info->row_max[currQueryChar];
+ rowSorted = info->matrixSorted[currQueryChar];
+ charSorted = info->matrixSortedChar[currQueryChar];
+
if (current_pos == wordsize - 1) {
/* The recursion has bottomed out, and we can produce complete
- subject words. Pass the entire alphabet through the last position
- in the subject word, then save the query offset in all lookup
- table positions corresponding to subject words that yield a high
- enough score */
+ subject words. Pass (a portion of) the alphabet through the
+ last position in the subject word, then saving the query offset
+ in the lookup table position corresponding to subject word i */
BlastCompressedAaLookupTable *lookup = info->lookup;
Int4 query_offset = info->query_offset;
- for (i = 0; i < compressed_alphabet_size; i++) {
- if (score + row[i] >= threshold) {
- subject_word[current_pos] = i;
- s_CompressedLookupAddEncoded(lookup, subject_word,
- query_offset);
+ for (i = 0; i < compressed_alphabet_size &&
+ (score + rowSorted[i] >= threshold); i++) {
+ subject_word[current_pos] = charSorted[i];
+ s_CompressedLookupAddEncoded(lookup, subject_word,
+ query_offset);
#ifdef LOOKUP_VERBOSE
- lookup->neighbor_matches++;
+ lookup->neighbor_matches++;
#endif
- }
}
return;
}
- /* Otherwise, pass the entire alphabet through position current_pos of
- the subject word, and recurse on all words that could possibly exceed
- the threshold later */
+ /* Otherwise, pass (a portion of) the alphabet through position
+ current_pos of the subject word, and recurse on all words that
+ could possibly exceed the threshold later */
- for (i = 0; i < compressed_alphabet_size; i++) {
- if (score + row[i] >= threshold) {
- subject_word[current_pos] = i;
- s_CompressedAddWordHitsCore(info, score + row[i],
- current_pos + 1);
- }
+ for (i = 0; i < compressed_alphabet_size &&
+ (score + rowSorted[i] >= threshold); i++) {
+ subject_word[current_pos] = charSorted[i];
+ s_CompressedAddWordHitsCore(info, score + rowSorted[i],
+ current_pos + 1);
}
}
/** Add neighboring words to the lookup table (compressed alphabet).
- * @param lookup Pointer to the lookup table.
- * @param compressed_matrix Pointer to the substitution matrix.
+ * @param info Pointer to the NeighborInfo structure.
* @param query Pointer to the query sequence.
* @param query_offset offset where the word occurs in the query
- * @param row_max maximum possible score for each row of the matrix
*/
-static void s_CompressedAddWordHits(BlastCompressedAaLookupTable * lookup,
- Int4 ** compressed_matrix,
- Uint1 * query, Int4 query_offset,
- Int4 * row_max)
+static void s_CompressedAddWordHits(CompressedNeighborInfo * info,
+ Uint1 * query, Int4 query_offset)
{
Uint1 *w = query + query_offset;
Uint1 s[32]; /* larger than any possible wordsize */
Int4 score;
Int4 i;
- CompressedNeighborInfo info;
+ BlastCompressedAaLookupTable * lookup = info->lookup;
#ifdef LOOKUP_VERBOSE
lookup->exact_matches++;
@@ -987,7 +1061,7 @@ static void s_CompressedAddWordHits(BlastCompressedAaLookupTable * lookup,
if (c >= lookup->compressed_alphabet_size) /* "non-20 aa": skip it*/
return;
- score += compressed_matrix[w[i]][c];
+ score += info->matrix[w[i]][c];
}
/* If the self-score is above the threshold, then the neighboring
@@ -1012,25 +1086,19 @@ static void s_CompressedAddWordHits(BlastCompressedAaLookupTable * lookup,
/* Set up the structure of information to be used during the recursion */
- info.lookup = lookup;
- info.query_word = w;
- info.subject_word = s;
- info.compressed_alphabet_size = lookup->compressed_alphabet_size;
- info.wordsize = lookup->word_length;
- info.matrix = compressed_matrix;
- info.row_max = row_max;
- info.query_offset = query_offset;
- info.threshold = lookup->threshold;
+ info->query_word = w;
+ info->subject_word = s;
+ info->query_offset = query_offset;
/* compute the largest possible score that any neighboring word can have;
this maximum will gradually be replaced by exact scores as subject
words are built up */
- score = row_max[w[0]];
+ score = info->row_max[w[0]];
for (i = 1; i < lookup->word_length; i++)
- score += row_max[w[i]];
+ score += info->row_max[w[i]];
- s_CompressedAddWordHitsCore(&info, score, 0);
+ s_CompressedAddWordHitsCore(info, score, 0);
}
/**
@@ -1050,7 +1118,7 @@ static void s_CompressedAddNeighboringWords(
BlastSeqLoc * location)
{
Int4 i, j;
- Int4 row_max[BLASTAA_SIZE];
+ CompressedNeighborInfo info;
BlastSeqLoc *loc;
Int4 offset;
@@ -1060,11 +1128,21 @@ static void s_CompressedAddNeighboringWords(
row of the score matrix */
for (i = 0; i < lookup->alphabet_size; i++) {
- row_max[i] = compressed_matrix[i][0];
+ info.row_max[i] = compressed_matrix[i][0];
for (j = 1; j < lookup->compressed_alphabet_size; j++)
- row_max[i] = MAX(row_max[i], compressed_matrix[i][j]);
+ info.row_max[i] = MAX(info.row_max[i], compressed_matrix[i][j]);
}
+ /* Set up the structure of information to be used during the recursion */
+ info.lookup = lookup;
+ info.compressed_alphabet_size = lookup->compressed_alphabet_size;
+ info.wordsize = lookup->word_length;
+ info.matrix = compressed_matrix;
+ info.threshold = lookup->threshold;
+
+ s_loadSortedMatrix(&info);
+
+
/* Walk through the query and index all the words */
for (loc = location; loc; loc = loc->next){
@@ -1072,8 +1150,7 @@ static void s_CompressedAddNeighboringWords(
Int4 to = loc->ssr->right - lookup->word_length + 1;
for (offset = from; offset <= to; offset++){
- s_CompressedAddWordHits(lookup, compressed_matrix,
- query->sequence, offset, row_max);
+ s_CompressedAddWordHits(&info, query->sequence, offset);
}
}
}
diff --git a/algo/blast/core/blast_aascan.c b/algo/blast/core/blast_aascan.c
index 1f0132f2..4a1aef26 100644
--- a/algo/blast/core/blast_aascan.c
+++ b/algo/blast/core/blast_aascan.c
@@ -1,4 +1,4 @@
-/* $Id: blast_aascan.c,v 1.7 2007/04/11 15:55:30 kazimird Exp $
+/* $Id: blast_aascan.c,v 1.9 2007/11/08 22:55:41 kazimird Exp $
* ===========================================================================
*
* PUBLIC DOMAIN NOTICE
@@ -33,7 +33,7 @@
#ifndef SKIP_DOXYGEN_PROCESSING
static char const rcsid[] =
- "$Id: blast_aascan.c,v 1.7 2007/04/11 15:55:30 kazimird Exp $";
+ "$Id: blast_aascan.c,v 1.9 2007/11/08 22:55:41 kazimird Exp $";
#endif /* SKIP_DOXYGEN_PROCESSING */
/**
@@ -152,7 +152,8 @@ static Int4 s_BlastCompressedAaScanSubject(
BlastOffsetPair * NCBI_RESTRICT offset_pairs,
Int4 array_size)
{
- Int4 index;
+ Int4 index=0;
+ Int4 preshift; /* used for 2-stage index calculation */
Uint1 *s;
Uint1 *s_first;
Uint1 *s_last;
@@ -182,42 +183,60 @@ static Int4 s_BlastCompressedAaScanSubject(
pv_array_bts = lookup->pv_array_bts;
/* prime the index */
- index = s_ComputeCompressedIndex(word_length - 1, s_first,
- compressed_alphabet_size,
- &skip, lookup);
+ for(s = s_first; s <= s_last; s++){
+ index = s_ComputeCompressedIndex(word_length - 1, s,
+ compressed_alphabet_size,
+ &skip, lookup);
+ if(!skip)
+ break;
+ }
- next_char = ((subject->length > word_length)? s_first[word_length-1] : 0);
+ next_char = ((s <= s_last)? s[word_length-1] : 0);
+ preshift = (Int4)((((Int8)index) * recip) >> 32);
- for (s = s_first; s <= s_last; s++) {
+ /* main scanning loop */
+ for (; s <= s_last; s++) {
/* compute the index value */
compressed_char = scaled_compress_table[next_char];
next_char = s[word_length];
-
- if (compressed_char < 0) {
- /* skip all words containing this (ignored) letter */
- skip = word_length;
- continue;
- }
- else {
- /* we have to remove the oldest letter from the
- index and add in the next letter. The latter is easy,
- but since the compressed alphabet size is not a
- power of two the former requires a remainder and
- multiply, assuming the old letter is in the high part
- of the index. For this reason, we reverse the order
- of the letters and keep the oldest in the low part
- of index, so that a single divide (implemented via
- reciprocal multiplication) does the removal */
-
- index = (Int4)((((Int8)index) * recip) >> 32) + compressed_char;
-
- if (skip) {
- if (--skip) /* still skipping? */
- continue;
- }
- }
+ if(compressed_char < 0){ /* flush (rare) "bad" character(s) */
+ preshift = 0;
+ s++;
+ for(skip = word_length-1; skip && (s <= s_last) ; s++){
+ compressed_char = scaled_compress_table[next_char];
+ next_char = s[word_length];
+
+ if(compressed_char < 0){ /* not again! */
+ skip = word_length-1;
+ preshift = 0;
+ continue;
+ }
+
+ index = preshift + compressed_char;
+ preshift = (Int4)((((Int8)( index )) * recip) >> 32);
+ skip--;
+ }
+
+ s--; /*undo the following increment*/
+ continue;
+ }
+
+ /* we have to remove the oldest letter from the
+ index and add in the next letter. The latter is easy,
+ but since the compressed alphabet size is not a
+ power of two the former requires a remainder and
+ multiply, assuming the old letter is in the high part
+ of the index. For this reason, we reverse the order
+ of the letters and keep the oldest in the low part
+ of index, so that a single divide (implemented via
+ reciprocal multiplication) does the removal.
+ Index calculation done in two steps to let the CPU do
+ out-of-order execution. */
+
+ index = preshift + compressed_char;
+ preshift = (Int4)((((Int8)( index )) * recip) >> 32);
/* if there are hits */
if (PV_TEST(pv, index, pv_array_bts)) {
diff --git a/algo/blast/core/blast_def.h b/algo/blast/core/blast_def.h
index b7d6bc6e..14475d56 100644
--- a/algo/blast/core/blast_def.h
+++ b/algo/blast/core/blast_def.h
@@ -1,4 +1,4 @@
-/* $Id: blast_def.h,v 1.79 2007/03/20 14:55:37 kazimird Exp $
+/* $Id: blast_def.h,v 1.83 2008/01/31 23:55:41 kazimird Exp $
* ===========================================================================
*
* PUBLIC DOMAIN NOTICE
@@ -42,18 +42,18 @@ extern "C" {
/****************************** Constants *********************************/
-extern const int kDustLevel; /**< Level parameter used by dust. */
-extern const int kDustWindow; /**< Window parameter used by dust. */
-extern const int kDustLinker; /**< Parameter used by dust to link together close low-complexity segments. */
+NCBI_XBLAST_EXPORT extern const int kDustLevel; /**< Level parameter used by dust. */
+NCBI_XBLAST_EXPORT extern const int kDustWindow; /**< Window parameter used by dust. */
+NCBI_XBLAST_EXPORT extern const int kDustLinker; /**< Parameter used by dust to link together close low-complexity segments. */
-extern const int kSegWindow; /**< Window that SEG examines at once. */
-extern const double kSegLocut; /**< Locut parameter for SEG. */
-extern const double kSegHicut; /**< Hicut parameter for SEG. */
+NCBI_XBLAST_EXPORT extern const int kSegWindow; /**< Window that SEG examines at once. */
+NCBI_XBLAST_EXPORT extern const double kSegLocut; /**< Locut parameter for SEG. */
+NCBI_XBLAST_EXPORT extern const double kSegHicut; /**< Hicut parameter for SEG. */
/** Maximum number of HPSs to be saved in an ungapped search.
* Value defined in blast_options.c
*/
-extern const int kUngappedHSPNumMax;
+NCBI_XBLAST_EXPORT extern const int kUngappedHSPNumMax;
/******************** Preprocessor definitions ******************************/
diff --git a/algo/blast/core/blast_dynarray.c b/algo/blast/core/blast_dynarray.c
index 3f667dcd..67d267bf 100644
--- a/algo/blast/core/blast_dynarray.c
+++ b/algo/blast/core/blast_dynarray.c
@@ -1,4 +1,4 @@
-/* $Id: blast_dynarray.c,v 1.6 2007/03/20 14:55:37 kazimird Exp $
+/* $Id: blast_dynarray.c,v 1.7 2007/11/08 22:55:42 kazimird Exp $
* ===========================================================================
*
* PUBLIC DOMAIN NOTICE
@@ -34,13 +34,16 @@
#ifndef SKIP_DOXYGEN_PROCESSING
static char const rcsid[] =
- "$Id: blast_dynarray.c,v 1.6 2007/03/20 14:55:37 kazimird Exp $";
+ "$Id: blast_dynarray.c,v 1.7 2007/11/08 22:55:42 kazimird Exp $";
#endif /* SKIP_DOXYGEN_PROCESSING */
#include "blast_dynarray.h"
#include <algo/blast/core/blast_util.h>
#include <algo/blast/core/blast_message.h> /* for error codes */
+/** factor by which these arrays are resized */
+const size_t kResizeFactor = 2;
+
SDynamicUint4Array* DynamicUint4ArrayFree(SDynamicUint4Array* arr)
{
if ( !arr ) {
@@ -85,12 +88,14 @@ s_DynamicUint4Array_ReallocIfNecessary(SDynamicUint4Array* arr)
if (arr->num_used+1 > arr->num_allocated) {
/* we need more room for elements */
- arr->num_allocated *= 2;
- arr->data = (Uint4*) realloc(arr->data,
- arr->num_allocated * sizeof(Uint4));
- if ( !arr->data ) {
+ Uint4* reallocation =
+ (Uint4*) realloc(arr->data,
+ kResizeFactor * arr->num_allocated * sizeof(*arr->data));
+ if ( !reallocation ) {
return BLASTERR_MEMORY;
}
+ arr->data = reallocation;
+ arr->num_allocated *= kResizeFactor;
}
return 0;
}
@@ -104,7 +109,8 @@ DynamicUint4Array_Append(SDynamicUint4Array* arr, Uint4 element)
if ( (retval = s_DynamicUint4Array_ReallocIfNecessary(arr)) != 0) {
return retval;
}
- arr->data[arr->num_used++] = element;
+ arr->data[arr->num_used] = element;
+ arr->num_used++;
return retval;
}
@@ -130,12 +136,14 @@ DynamicUint4Array_Copy(SDynamicUint4Array* dest,
Uint4 i = 0; /* index into arrays */
if (dest->num_allocated < src->num_allocated) {
- dest->num_allocated = src->num_allocated;
- dest->data = (Uint4*) realloc(dest->data,
- dest->num_allocated * sizeof(Uint4));
- if ( !dest->data ) {
- return -1;
+ /* we need more room for elements */
+ Uint4* reallocation = (Uint4*) realloc(dest->data,
+ src->num_allocated * sizeof(*dest->data));
+ if ( !reallocation ) {
+ return BLASTERR_MEMORY;
}
+ dest->data = reallocation;
+ dest->num_allocated = src->num_allocated;
}
for (i = 0; i < src->num_used; i++) {
@@ -203,12 +211,13 @@ s_DynamicInt4Array_ReallocIfNecessary(SDynamicInt4Array* arr)
if (arr->num_used+1 > arr->num_allocated) {
/* we need more room for elements */
- arr->num_allocated *= 2;
- arr->data = (Int4*) realloc(arr->data,
- arr->num_allocated * sizeof(Int4));
- if ( !arr->data ) {
+ Int4* reallocation = (Int4*) realloc(arr->data,
+ kResizeFactor * arr->num_allocated * sizeof(*arr->data));
+ if ( !reallocation ) {
return BLASTERR_MEMORY;
}
+ arr->data = reallocation;
+ arr->num_allocated *= kResizeFactor;
}
return 0;
}
@@ -222,7 +231,8 @@ DynamicInt4Array_Append(SDynamicInt4Array* arr, Int4 element)
if ( (retval = s_DynamicInt4Array_ReallocIfNecessary(arr)) != 0) {
return retval;
}
- arr->data[arr->num_used++] = element;
+ arr->data[arr->num_used] = element;
+ arr->num_used++;
return retval;
}
@@ -272,12 +282,13 @@ s_DynamicSGenCodeNodeArray_ReallocIfNecessary(SDynamicSGenCodeNodeArray* arr)
if (arr->num_used+1 > arr->num_allocated) {
/* we need more room for elements */
- arr->num_allocated *= 2;
- arr->data = (SGenCodeNode*) realloc(arr->data,
- arr->num_allocated * sizeof(SGenCodeNode));
- if ( !arr->data ) {
+ SGenCodeNode* reallocation = (SGenCodeNode*) realloc(arr->data,
+ kResizeFactor * arr->num_allocated * sizeof(*arr->data));
+ if ( !reallocation ) {
return BLASTERR_MEMORY;
}
+ arr->data = reallocation;
+ arr->num_allocated *= kResizeFactor;
}
return 0;
}
diff --git a/algo/blast/core/blast_encoding.c b/algo/blast/core/blast_encoding.c
index 23e5db9e..90d88df5 100644
--- a/algo/blast/core/blast_encoding.c
+++ b/algo/blast/core/blast_encoding.c
@@ -1,4 +1,4 @@
-/* $Id: blast_encoding.c,v 1.6 2006/08/29 21:56:34 camacho Exp $
+/* $Id: blast_encoding.c,v 1.7 2008/01/24 21:25:45 kazimird Exp $
* ===========================================================================
*
* PUBLIC DOMAIN NOTICE
@@ -34,7 +34,7 @@
#ifndef SKIP_DOXYGEN_PROCESSING
static char const rcsid[] =
- "$Id: blast_encoding.c,v 1.6 2006/08/29 21:56:34 camacho Exp $";
+ "$Id: blast_encoding.c,v 1.7 2008/01/24 21:25:45 kazimird Exp $";
#endif /* SKIP_DOXYGEN_PROCESSING */
#include <algo/blast/core/blast_encoding.h>
@@ -77,6 +77,16 @@ const Uint1 BLASTNA_TO_NCBI4NA[BLASTNA_SIZE] = {
0 /* Gap, 15 */
};
+const char BLASTNA_TO_IUPACNA[BLASTNA_SIZE] = {
+ 'A', 'C', 'G', 'T', 'R', 'Y', 'M', 'K',
+ 'W', 'S', 'B', 'D', 'H', 'V', 'N', '-'
+};
+
+const char NCBI4NA_TO_IUPACNA[BLASTNA_SIZE] = {
+ '-', 'A', 'C', 'M', 'G', 'R', 'S', 'V',
+ 'T', 'W', 'Y', 'H', 'K', 'D', 'B', 'N'
+};
+
const Uint1 IUPACNA_TO_BLASTNA[128]={
15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,
15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,
@@ -114,30 +124,3 @@ const char NCBISTDAA_TO_AMINOACID[BLASTAA_SIZE] = {
const Uint1 kProtSentinel = NULLB;
const Uint1 kNuclSentinel = 0xF;
-
-/*
- * ===========================================================================
- * $Log: blast_encoding.c,v $
- * Revision 1.6 2006/08/29 21:56:34 camacho
- * +NCBISTDAA_TO_AMINOACID
- *
- * Revision 1.5 2006/03/31 17:32:40 camacho
- * Added constants for sentinel values
- *
- * Revision 1.4 2006/02/16 18:47:18 camacho
- * + encoding translations for O and J
- *
- * Revision 1.3 2004/11/02 17:56:48 camacho
- * Add DOXYGEN_SKIP_PROCESSING to guard rcsid string
- *
- * Revision 1.2 2004/05/19 14:52:02 camacho
- * 1. Added doxygen tags to enable doxygen processing of algo/blast/core
- * 2. Standardized copyright, CVS $Id string, $Log and rcsid formatting and i
- * location
- * 3. Added use of @todo doxygen keyword
- *
- * Revision 1.1 2004/04/07 03:10:56 camacho
- * Initial revision
- *
- * ===========================================================================
- */
diff --git a/algo/blast/core/blast_encoding.h b/algo/blast/core/blast_encoding.h
index f34c3d41..071e3376 100644
--- a/algo/blast/core/blast_encoding.h
+++ b/algo/blast/core/blast_encoding.h
@@ -1,4 +1,4 @@
-/* $Id: blast_encoding.h,v 1.12 2006/11/21 16:37:56 papadopo Exp $
+/* $Id: blast_encoding.h,v 1.18 2008/01/24 21:25:45 kazimird Exp $
* ===========================================================================
*
* PUBLIC DOMAIN NOTICE
@@ -36,6 +36,7 @@
#define ALGO_BLAST_CORE___BLAST_ENCODING__H
#include <algo/blast/core/ncbi_std.h>
+#include <algo/blast/core/blast_export.h>
/** @addtogroup AlgoBlast
*
@@ -64,22 +65,28 @@ typedef enum {
/** Translates between ncbi4na and blastna. The first four elements
* of this array match ncbi2na. */
-extern const Uint1 NCBI4NA_TO_BLASTNA[];
+NCBI_XBLAST_EXPORT extern const Uint1 NCBI4NA_TO_BLASTNA[];
/** Translates between blastna and ncbi4na. */
-extern const Uint1 BLASTNA_TO_NCBI4NA[];
+NCBI_XBLAST_EXPORT extern const Uint1 BLASTNA_TO_NCBI4NA[];
/** Translates between iupacna and blastna. */
-extern const Uint1 IUPACNA_TO_BLASTNA[];
+NCBI_XBLAST_EXPORT extern const Uint1 IUPACNA_TO_BLASTNA[];
/** Translates between iupacna and ncbi4na. */
-extern const Uint1 IUPACNA_TO_NCBI4NA[];
+NCBI_XBLAST_EXPORT extern const Uint1 IUPACNA_TO_NCBI4NA[];
/** Translates between ncbieaa and ncbistdaa. */
-extern const Uint1 AMINOACID_TO_NCBISTDAA[];
+NCBI_XBLAST_EXPORT extern const Uint1 AMINOACID_TO_NCBISTDAA[];
/** Translates between ncbieaa and ncbistdaa. */
-extern const char NCBISTDAA_TO_AMINOACID[];
+NCBI_XBLAST_EXPORT extern const char NCBISTDAA_TO_AMINOACID[];
+
+/** Translates between blastna and iupacna. */
+NCBI_XBLAST_EXPORT extern const char BLASTNA_TO_IUPACNA[];
+
+/** Translates between ncbi4na and iupacna. */
+NCBI_XBLAST_EXPORT extern const char NCBI4NA_TO_IUPACNA[];
#define BLAST2NA_SIZE 4 /**< Size of compressed nucleic acid alphabet */
#define BLASTNA_SIZE 16 /**< Size of nucleic acid alphabet */
@@ -92,9 +99,9 @@ extern const char NCBISTDAA_TO_AMINOACID[];
#define NCBI4NA_SEQ_CODE 4 /**< == Seq_code_ncbi4na */
/** Sentinel byte for protein sequences */
-extern const Uint1 kProtSentinel;
+NCBI_XBLAST_EXPORT extern const Uint1 kProtSentinel;
/** Sentinel nibble for nucleotide sequences */
-extern const Uint1 kNuclSentinel;
+NCBI_XBLAST_EXPORT extern const Uint1 kNuclSentinel;
#ifdef __cplusplus
}
@@ -102,47 +109,4 @@ extern const Uint1 kNuclSentinel;
/* @} */
-
-/*
- * ===========================================================================
- * $Log: blast_encoding.h,v $
- * Revision 1.12 2006/11/21 16:37:56 papadopo
- * minor
- *
- * Revision 1.11 2006/08/29 21:56:30 camacho
- * +NCBISTDAA_TO_AMINOACID
- *
- * Revision 1.10 2006/07/05 15:42:22 papadopo
- * change the amino acid alphabet size from 26 to 28
- *
- * Revision 1.9 2006/04/28 20:43:41 camacho
- * Remove C++-style comments
- *
- * Revision 1.8 2006/03/31 17:31:49 camacho
- * Added constants for sentinel values
- *
- * Revision 1.7 2005/12/19 16:19:18 papadopo
- * add define for size of ncbi2na alphabet
- *
- * Revision 1.6 2005/05/10 16:07:35 camacho
- * Changed *_ENCODING #defines to EBlastEncoding enumeration
- *
- * Revision 1.5 2004/11/24 16:00:39 dondosha
- * Added and/or fixed doxygen comments
- *
- * Revision 1.4 2004/06/21 12:53:54 camacho
- * Remove PSI_ALPHABET_SIZE as it is identical to BLASTAA_SIZE
- *
- * Revision 1.3 2004/04/09 14:48:05 camacho
- * Added doxygen comments
- *
- * Revision 1.2 2004/04/07 19:05:44 camacho
- * Minor fix in #ifdef guards
- *
- * Revision 1.1 2004/04/07 03:10:20 camacho
- * Initial revision
- *
- * ===========================================================================
- */
-
#endif /* ALGO_BLAST_CORE___BLAST_ENCODING__H */
diff --git a/algo/blast/core/blast_engine.c b/algo/blast/core/blast_engine.c
index df8d362c..eadf2997 100644
--- a/algo/blast/core/blast_engine.c
+++ b/algo/blast/core/blast_engine.c
@@ -1,4 +1,4 @@
-/* $Id: blast_engine.c,v 1.249 2007/08/23 20:25:30 kazimird Exp $
+/* $Id: blast_engine.c,v 1.251 2008/01/31 23:55:42 kazimird Exp $
* ===========================================================================
*
* PUBLIC DOMAIN NOTICE
@@ -55,7 +55,7 @@
#ifndef SKIP_DOXYGEN_PROCESSING
static char const rcsid[] =
- "$Id: blast_engine.c,v 1.249 2007/08/23 20:25:30 kazimird Exp $";
+ "$Id: blast_engine.c,v 1.251 2008/01/31 23:55:42 kazimird Exp $";
#endif /* SKIP_DOXYGEN_PROCESSING */
#include <algo/blast/core/blast_engine.h>
@@ -81,8 +81,8 @@ static char const rcsid[] =
NCBI_XBLAST_EXPORT const int kBlastMajorVersion = 2;
NCBI_XBLAST_EXPORT const int kBlastMinorVersion = 2;
-NCBI_XBLAST_EXPORT const int kBlastPatchVersion = 17;
-NCBI_XBLAST_EXPORT const char* kBlastReleaseDate = "Aug-26-2007";
+NCBI_XBLAST_EXPORT const int kBlastPatchVersion = 18;
+NCBI_XBLAST_EXPORT const char* kBlastReleaseDate = "Feb-03-2008";
/** Structure to be passed to s_BlastSearchEngineCore, containing pointers
to various preallocated structures and arrays. */
@@ -860,7 +860,6 @@ BLAST_PreliminarySearchEngine(EBlastProgramType program_number,
Boolean gapped_calculation = score_options->gapped_calculation;
BlastScoreBlk* sbp = gap_align->sbp;
BlastSeqSrcIterator* itr;
- Int4 default_db_genetic_code = db_options->genetic_code;
const Boolean kNucleotide = (program_number == eBlastTypeBlastn ||
program_number == eBlastTypePhiBlastn);
@@ -939,7 +938,7 @@ BLAST_PreliminarySearchEngine(EBlastProgramType program_number,
if (Blast_SubjectIsTranslated(program_number) &&
seq_arg.seq->gen_code_string == NULL) {
seq_arg.seq->gen_code_string =
- GenCodeSingletonFind(default_db_genetic_code);
+ GenCodeSingletonFind(db_options->genetic_code);
ASSERT(seq_arg.seq->gen_code_string);
}
status =
diff --git a/algo/blast/core/blast_filter.c b/algo/blast/core/blast_filter.c
index eb9f0762..7bc1c141 100644
--- a/algo/blast/core/blast_filter.c
+++ b/algo/blast/core/blast_filter.c
@@ -1,4 +1,4 @@
-/* $Id: blast_filter.c,v 1.89 2007/07/05 14:25:35 kazimird Exp $
+/* $Id: blast_filter.c,v 1.92 2008/01/31 23:55:42 kazimird Exp $
* ===========================================================================
*
* PUBLIC DOMAIN NOTICE
@@ -30,7 +30,7 @@
#ifndef SKIP_DOXYGEN_PROCESSING
static char const rcsid[] =
- "$Id: blast_filter.c,v 1.89 2007/07/05 14:25:35 kazimird Exp $";
+ "$Id: blast_filter.c,v 1.92 2008/01/31 23:55:42 kazimird Exp $";
#endif /* SKIP_DOXYGEN_PROCESSING */
#include <algo/blast/core/blast_util.h>
@@ -313,7 +313,7 @@ BlastFilteringOptionsFromString(EBlastProgramType program_number, const char* in
ptr = s_LoadOptionsToBuffer(ptr+1, buffer);
if (buffer[0] != NULLB)
{
- int window, level, linker;
+ int window = 0, level = 0, linker = 0;
status = s_ParseDustOptions(buffer, &level, &window, &linker);
if (status)
{
@@ -440,35 +440,71 @@ static BlastSeqLoc* s_BlastSeqLocNodeDup(BlastSeqLoc* source)
return BlastSeqLocNew(NULL, source->ssr->left, source->ssr->right);
}
-/** Prepend node to the head of the list and return the new head of the list */
-static BlastSeqLoc* s_BlastSeqLocPrepend(BlastSeqLoc* head, BlastSeqLoc* node)
+/** Calculates number of links in a chain of BlastSeqLoc's.
+ * @param var Chain of BlastSeqLoc structures [in]
+ * @return Number of links in the chain.
+ */
+static Int4 s_BlastSeqLocLen(const BlastSeqLoc* var)
{
- if ( !node ) {
- return NULL;
+ BlastSeqLoc* itr = NULL;
+ Int4 retval = 0;
+
+ for (itr = (BlastSeqLoc*)var; itr; itr = itr->next, retval++) {
+ ;
}
- node->next = head;
- return node;
+ return retval;
+}
+
+/** Converts a BlastSeqLoc list to an array of pointers, each pointing to an
+ * element of the list passed in to this function and the last element points
+ * to NULL
+ * @param list List to convert to an array of pointers [in]
+ * @count number of elements populated in the array [out]
+ */
+static BlastSeqLoc**
+s_BlastSeqLocListToArrayOfPointers(const BlastSeqLoc* list, Int4* count)
+{
+ BlastSeqLoc* tmp,** retval;
+ Int4 i;
+ *count = 0;
+
+ if (list == NULL)
+ return NULL;
+
+ *count = s_BlastSeqLocLen(list);
+ retval = (BlastSeqLoc**) calloc(((size_t)(*count)+1), sizeof(BlastSeqLoc*));
+ for (tmp = (BlastSeqLoc*)list, i = 0; tmp != NULL && i < *count; i++) {
+ retval[i] = tmp;
+ tmp = tmp->next;
+ }
+ return retval;
}
/** Reverse elements in the list
- * @param head pointer to pointer to the head of the list. After this call,
- * this is set to NULL [in|out]
- * @return the new head of the list or NULL if argument is NULL
+ * @param head pointer to pointer to the head of the list. [in|out]
+ * (this is not declared static so that it can be tested in the unit tests
*/
-static BlastSeqLoc* s_BlastSeqLocListReverse(BlastSeqLoc** head)
+NCBI_XBLAST_EXPORT
+void BlastSeqLocListReverse(BlastSeqLoc** head)
{
- BlastSeqLoc* retval = NULL; /* return value */
- BlastSeqLoc* itr = NULL; /* iterator */
+ BlastSeqLoc** ptrs = NULL; /* array of pointers to BlastSeqLoc elements */
+ Int4 num_elems = 0, i = 0;
if ( !head ) {
- return NULL;
+ return;
}
- for (itr = *head; itr; itr = itr->next) {
- retval = s_BlastSeqLocPrepend(retval, s_BlastSeqLocNodeDup(itr));
+ ptrs = s_BlastSeqLocListToArrayOfPointers(*head, &num_elems);
+ if (num_elems == 0) {
+ return;
}
- *head = BlastSeqLocFree(*head);
- return retval;
+ ASSERT(ptrs);
+ *head = ptrs[num_elems-1];
+ for (i = num_elems-1; i > 0; i--) {
+ ptrs[i]->next = ptrs[i-1];
+ }
+ ptrs[0]->next = NULL;
+ sfree(ptrs);
}
BlastSeqLoc* BlastSeqLocNodeFree(BlastSeqLoc* loc)
@@ -715,98 +751,49 @@ static int s_SeqRangeSortByStartPosition(const void *vp1, const void *vp2)
return 0;
}
-/** Calculates number of links in a chain of BlastSeqLoc's.
- * @param var Chain of BlastSeqLoc structures [in]
- * @return Number of links in the chain.
- */
-static Int4 s_BlastSeqLocLen(BlastSeqLoc* var)
-{
- Int4 count=0;
-
- while (var)
- {
- count++;
- var = var->next;
- }
-
- return count;
-}
-
-/** Sort a list of BlastSeqLoc structures
- * @param list List of BlastSeqLoc's [in]
- * @param compar Comparison function to use [in]
- * @return Sorted list.
- */
-static BlastSeqLoc*
-s_BlastSeqLocSort (BlastSeqLoc* list,
- int (*compar )(const void *, const void *))
+void
+BlastSeqLocCombine(BlastSeqLoc** mask_loc, Int4 link_value)
{
- BlastSeqLoc* tmp,** head;
- Int4 count, i;
+ BlastSeqLoc** ptrs = NULL;
+ Int4 i = 0, num_elems = 0;
- if (list == NULL)
- return NULL;
+ /* Break up the list into an array of pointers and sort it */
+ ptrs = s_BlastSeqLocListToArrayOfPointers(*mask_loc, &num_elems);
+ if (num_elems == 0) {
+ return;
+ }
+ ASSERT(ptrs);
+ qsort(ptrs, (size_t)num_elems, sizeof(*ptrs),
+ s_SeqRangeSortByStartPosition);
- count = s_BlastSeqLocLen (list);
- head = (BlastSeqLoc* *) calloc (((size_t) count + 1), sizeof (BlastSeqLoc*));
- for (tmp = list, i = 0; tmp != NULL && i < count; i++) {
- head [i] = tmp;
- tmp = tmp->next;
+ /* Merge the overlapping elements */
+ {
+ BlastSeqLoc* curr_tail = *mask_loc = ptrs[0];
+ for (i = 0; i < num_elems - 1; i++) {
+ const SSeqRange* next_ssr = ptrs[i+1]->ssr;
+ const Int4 stop = curr_tail->ssr->right;
+
+ if ((stop + link_value) > next_ssr->left) {
+ curr_tail->ssr->right = MAX(stop, next_ssr->right);
+ ptrs[i+1] = BlastSeqLocNodeFree(ptrs[i+1]);
+ } else {
+ curr_tail = ptrs[i+1];
+ }
}
+ }
- qsort (head, (size_t) count, sizeof (BlastSeqLoc*), compar);
- for (i = 0; i < count; i++) {
- tmp = head [i];
- tmp->next = head [i + 1];
+ /* Rebuild the linked list */
+ {
+ BlastSeqLoc* tail = *mask_loc;
+ for (i = 1; i < num_elems; i++) {
+ if (ptrs[i]) {
+ tail->next = ptrs[i];
+ tail = ptrs[i];
+ }
}
- list = head [0];
- sfree (head);
-
- return list;
-}
-
-BlastSeqLoc*
-BlastSeqLocCombine(BlastSeqLoc* mask_loc, Int4 link_value)
-{
- BlastSeqLoc* retval = NULL;
- BlastSeqLoc* retval_tail = NULL;
- Int4 start, stop; /* Used to merge overlapping SeqLoc's. */
- BlastSeqLoc* loc_head=NULL,* loc_var=NULL;
-
- if ( !mask_loc ) {
- return NULL;
- }
-
- /* Copy the BlastSeqLoc-s and sort them by starting position. */
- loc_head = loc_var = s_BlastSeqLocSort(BlastSeqLocListDup(mask_loc),
- s_SeqRangeSortByStartPosition);
- if ( !loc_head ) {
- return NULL;
- }
- start = loc_head->ssr->left;
- stop = loc_head->ssr->right;
-
- for (; loc_var; loc_var = loc_var->next) {
- SSeqRange* ssr = loc_var->next ? loc_var->next->ssr : NULL;
-
- if (ssr && ((stop + link_value) > ssr->left)) {
- stop = MAX(stop, ssr->right);
- } else {
- /* Cache the tail of the list to avoid the overhead of traversing the
- * list when appending to it */
- retval_tail = BlastSeqLocNew((retval_tail ? &retval_tail : &retval),
- start, stop);
- if (loc_var->next) {
- start = ssr->left;
- stop = ssr->right;
- }
- }
- }
-
- /* Free memory allocated for the temporary list of BlastSeqLoc-s */
- BlastSeqLocFree(loc_head);
-
- return retval;
+ tail->next = NULL;
+ }
+ sfree(ptrs);
}
Int2
@@ -853,8 +840,7 @@ BLAST_ComplementMaskLocations(EBlastProgramType program_number,
}
if (BlastIsReverseStrand(kIsNucl, context)) {
- mask_loc->seqloc_array[context] =
- s_BlastSeqLocListReverse(&mask_loc->seqloc_array[context]);
+ BlastSeqLocListReverse(&mask_loc->seqloc_array[context]);
}
loc = mask_loc->seqloc_array[context];
@@ -958,23 +944,13 @@ BlastSetUp_Filter(EBlastProgramType program_number,
return status;
}
-BlastSeqLoc*
-BlastSeqLocReverse(const BlastSeqLoc* filter_in, Int4 query_length)
+void
+BlastSeqLocReverse(BlastSeqLoc* masks, Int4 query_length)
{
- BlastSeqLoc* filter_out = NULL; /* Return variable. */
-
- while (filter_in)
- {
- Int4 start, stop;
- SSeqRange* loc = filter_in->ssr;
-
- start = query_length - 1 - loc->right;
- stop = query_length - 1 - loc->left;
- BlastSeqLocNew(&filter_out, start, stop);
- filter_in = filter_in->next;
- }
-
- return filter_out;
+ for(; masks; masks = masks->next) {
+ masks->ssr->left = query_length - 1 - masks->ssr->right;
+ masks->ssr->right = query_length - 1 - masks->ssr->left;
+ }
}
/** Calculates the mask locations one context at a time.
@@ -999,7 +975,6 @@ s_GetFilteringLocationsForOneContext(BLAST_SequenceBlk* query_blk,
Int2 status = 0;
Int4 query_length = 0; /* Length of query described by SeqLocPtr. */
Int4 context_offset;
- BlastSeqLoc *filter_slp = NULL; /* SeqLocPtr computed for filtering. */
Uint1 *buffer; /* holds sequence for plus strand or protein. */
const Boolean kIsNucl = (program_number == eBlastTypeBlastn);
@@ -1018,16 +993,14 @@ s_GetFilteringLocationsForOneContext(BLAST_SequenceBlk* query_blk,
query_length,
0,
filter_options,
- &filter_slp,
+ filter_out,
blast_message);
if (status)
return status;
- if (BlastIsReverseStrand(kIsNucl, context) == TRUE)
- { /* Reverse this as it's on minus strand. */
- BlastSeqLoc* tmp = BlastSeqLocReverse(filter_slp, query_length);
- filter_slp = BlastSeqLocFree(filter_slp);
- filter_slp = tmp;
+ if (BlastIsReverseStrand(kIsNucl, context) == TRUE) {
+ /* Reverse this as it's on minus strand. */
+ BlastSeqLocReverse(*filter_out, query_length);
}
/* Extract the mask locations corresponding to this query
@@ -1045,17 +1018,16 @@ s_GetFilteringLocationsForOneContext(BLAST_SequenceBlk* query_blk,
ASSERT(context < query_blk->lcase_mask->total_size);
lcase_mask_slp = query_blk->lcase_mask->seqloc_array[context];
/* Set location list to NULL, to allow safe memory deallocation,
- ownership transferred to filter_slp below. */
+ ownership transferred to filter_out below. */
query_blk->lcase_mask->seqloc_array[context] = NULL;
}
/* Attach the lower case mask locations to the filter locations and
combine them */
- BlastSeqLocAppend(&filter_slp, lcase_mask_slp);
+ BlastSeqLocAppend(filter_out, lcase_mask_slp);
}
- *filter_out = BlastSeqLocCombine(filter_slp, 0);
- filter_slp = BlastSeqLocFree(filter_slp);
+ BlastSeqLocCombine(filter_out, 0);
return 0;
}
diff --git a/algo/blast/core/blast_filter.h b/algo/blast/core/blast_filter.h
index 7ba86ed3..4692336d 100644
--- a/algo/blast/core/blast_filter.h
+++ b/algo/blast/core/blast_filter.h
@@ -1,4 +1,4 @@
-/* $Id: blast_filter.h,v 1.39 2007/07/25 12:55:50 kazimird Exp $
+/* $Id: blast_filter.h,v 1.41 2007/12/20 22:55:46 kazimird Exp $
* ===========================================================================
*
* PUBLIC DOMAIN NOTICE
@@ -47,8 +47,10 @@ extern "C" {
#endif
/** BLASTNA element used to mask bases in BLAST */
+NCBI_XBLAST_EXPORT
extern const Uint1 kNuclMask;
/** NCBISTDAA element used to mask residues in BLAST */
+NCBI_XBLAST_EXPORT
extern const Uint1 kProtMask;
/** Repeats filtering default options. */
@@ -86,6 +88,7 @@ BlastSeqLoc* BlastSeqLocNew(BlastSeqLoc** head, Int4 from, Int4 to);
* @returns pointer to the second argument to this function (i.e.: tail of the
* list)
*/
+NCBI_XBLAST_EXPORT
BlastSeqLoc* BlastSeqLocAppend(BlastSeqLoc** head, BlastSeqLoc* node);
/** Deallocate a single BlastSeqLoc structure and its contents, without
@@ -93,6 +96,7 @@ BlastSeqLoc* BlastSeqLocAppend(BlastSeqLoc** head, BlastSeqLoc* node);
* @param node structure to deallocate [in]
* @return NULL
*/
+NCBI_XBLAST_EXPORT
BlastSeqLoc* BlastSeqLocNodeFree(BlastSeqLoc* node);
/** Deallocate all BlastSeqLoc objects in a chain.
@@ -108,29 +112,25 @@ BlastSeqLoc* BlastSeqLocFree(BlastSeqLoc* loc);
* @return NULL on NULL input or memory allocation failure, else a copy of the
* list and its contents
*/
+NCBI_XBLAST_EXPORT
BlastSeqLoc* BlastSeqLocListDup(BlastSeqLoc* head);
-/** Converts reverse strand coordinates to forward strand.
- * @param filter_in BlastSeqLoc to be reversed [in]
+/** Converts reverse strand coordinates to forward strand in place.
+ * @param masks BlastSeqLoc to be reversed [in|out]
* @param query_length length of query [in]
- * @return reversed BlastSeqLoc
*/
NCBI_XBLAST_EXPORT
-BlastSeqLoc* BlastSeqLocReverse(const BlastSeqLoc* filter_in,
- Int4 query_length);
+void BlastSeqLocReverse(BlastSeqLoc* masks, Int4 query_length);
-/** Go through all mask locations in one sequence,
- * combine any that overlap. Deallocate the memory for the locations that
- * were on the list, produce a new (merged) list of locations.
- * @param mask_loc The list of masks to be merged [in]
+/** Go through all mask locations in one sequence and combine any that overlap,
+ * deallocating the unneeded locations.
+ * @param mask_loc The list of masks to be merged (in place) [in|out]
* @param link_value Largest gap size between locations for which they
* should be linked together [in]
- * @return The new (merged) list of masks or NULL if mask_loc is NULL or memory
- * allocation failure.
*/
NCBI_XBLAST_EXPORT
-BlastSeqLoc*
-BlastSeqLocCombine(BlastSeqLoc* mask_loc, Int4 link_value);
+void
+BlastSeqLocCombine(BlastSeqLoc** mask_loc, Int4 link_value);
/** Allocate memory for a BlastMaskLoc.
* @param total number of contexts for which SSeqLocs should be allocated
@@ -172,6 +172,7 @@ BlastMaskLoc* BlastMaskLocFree(BlastMaskLoc* mask_loc);
* @note This function does NOT take into consideration the strands requested
* to be searched, which is INCONSISTENT with what the C++ API does.
*/
+NCBI_XBLAST_EXPORT
Int2 BlastMaskLocDNAToProtein(BlastMaskLoc* mask_loc,
const BlastQueryInfo* query_info);
@@ -180,6 +181,7 @@ Int2 BlastMaskLocDNAToProtein(BlastMaskLoc* mask_loc,
* @param mask_loc Mask locations structure [in|out]
* @param query_info Query information structure, containing contexts data [in]
*/
+NCBI_XBLAST_EXPORT
Int2 BlastMaskLocProteinToDNA(BlastMaskLoc* mask_loc,
const BlastQueryInfo* query_info);
@@ -198,6 +200,7 @@ Int2 BlastMaskLocProteinToDNA(BlastMaskLoc* mask_loc,
* @param complement_mask Linked list of SSeqRange*s in the concatenated
* sequence to be indexed in the lookup table . [out]
*/
+NCBI_XBLAST_EXPORT
Int2
BLAST_ComplementMaskLocations(EBlastProgramType program_number,
const BlastQueryInfo* query_info, const BlastMaskLoc* mask_loc,
diff --git a/algo/blast/core/blast_hits.c b/algo/blast/core/blast_hits.c
index 5acc284f..02d04ed2 100644
--- a/algo/blast/core/blast_hits.c
+++ b/algo/blast/core/blast_hits.c
@@ -1,4 +1,4 @@
-/* $Id: blast_hits.c,v 1.211 2007/07/27 18:25:29 kazimird Exp $
+/* $Id: blast_hits.c,v 1.217 2008/02/14 15:55:42 kazimird Exp $
* ===========================================================================
*
* PUBLIC DOMAIN NOTICE
@@ -32,7 +32,7 @@
#ifndef SKIP_DOXYGEN_PROCESSING
static char const rcsid[] =
- "$Id: blast_hits.c,v 1.211 2007/07/27 18:25:29 kazimird Exp $";
+ "$Id: blast_hits.c,v 1.217 2008/02/14 15:55:42 kazimird Exp $";
#endif /* SKIP_DOXYGEN_PROCESSING */
#include <algo/blast/core/ncbi_math.h>
@@ -570,10 +570,18 @@ Blast_HSPReevaluateWithAmbiguitiesUngapped(BlastHSP* hsp, Uint1* query_start,
best_q_end, best_s_start, best_s_end);
}
-Int2
-Blast_HSPGetNumIdentities(Uint1* query, Uint1* subject,
- BlastHSP* hsp, Int4* num_ident_ptr,
- Int4* align_length_ptr)
+/** Calculate number of identities in a regular HSP.
+ * @param query The query sequence [in]
+ * @param subject The uncompressed subject sequence [in]
+ * @param hsp All information about the HSP [in]
+ * @param num_ident_ptr Number of identities [out]
+ * @param align_length_ptr The alignment length, including gaps [out]
+ * @return 0 on success, -1 on invalid parameters or error
+ */
+static Int2
+s_Blast_HSPGetNumIdentities(const Uint1* query, const Uint1* subject,
+ const BlastHSP* hsp, Int4* num_ident_ptr,
+ Int4* align_length_ptr)
{
Int4 i, num_ident, align_length, q_off, s_off;
Uint1* q,* s;
@@ -583,11 +591,11 @@ Blast_HSPGetNumIdentities(Uint1* query, Uint1* subject,
q_off = hsp->query.offset;
s_off = hsp->subject.offset;
- if (!subject || !query)
+ if ( !subject || !query || !hsp )
return -1;
- q = &query[q_off];
- s = &subject[s_off];
+ q = (Uint1*) &query[q_off];
+ s = (Uint1*) &subject[s_off];
num_ident = 0;
align_length = 0;
@@ -630,14 +638,25 @@ Blast_HSPGetNumIdentities(Uint1* query, Uint1* subject,
}
}
- *align_length_ptr = align_length;
+ if (align_length_ptr) {
+ *align_length_ptr = align_length;
+ }
*num_ident_ptr = num_ident;
return 0;
}
-Int2
-Blast_HSPGetOOFNumIdentities(Uint1* query, Uint1* subject,
- BlastHSP* hsp, EBlastProgramType program,
+/** Calculate number of identities in an HSP for an out-of-frame alignment.
+ * @param query The query sequence [in]
+ * @param subject The uncompressed subject sequence [in]
+ * @param hsp All information about the HSP [in]
+ * @param program BLAST program (blastx or tblastn) [in]
+ * @param num_ident_ptr Number of identities [out]
+ * @param align_length_ptr The alignment length, including gaps [out]
+ * @return 0 on success, -1 on invalid parameters or error
+ */
+static Int2
+s_Blast_HSPGetOOFNumIdentities(const Uint1* query, const Uint1* subject,
+ const BlastHSP* hsp, EBlastProgramType program,
Int4* num_ident_ptr, Int4* align_length_ptr)
{
Int4 num_ident, align_length;
@@ -651,11 +670,11 @@ Blast_HSPGetOOFNumIdentities(Uint1* query, Uint1* subject,
if (program == eBlastTypeTblastn ||
program == eBlastTypeRpsTblastn) {
- q = &query[hsp->query.offset];
- s = &subject[hsp->subject.offset];
+ q = (Uint1*) &query[hsp->query.offset];
+ s = (Uint1*) &subject[hsp->subject.offset];
} else {
- s = &query[hsp->query.offset];
- q = &subject[hsp->subject.offset];
+ s = (Uint1*) &query[hsp->query.offset];
+ q = (Uint1*) &subject[hsp->subject.offset];
}
num_ident = 0;
align_length = 0;
@@ -701,25 +720,39 @@ Blast_HSPGetOOFNumIdentities(Uint1* query, Uint1* subject,
}
}
- *align_length_ptr = align_length;
+ if (align_length_ptr) {
+ *align_length_ptr = align_length;
+ }
*num_ident_ptr = num_ident;
return 0;
}
-/** Calculates number of identities and alignment lengths of an HSP and
- * determines whether this HSP should be kept or deleted. The num_ident
- * field of the BlastHSP structure is filled here.
- * @param program_number Type of BLAST program [in]
- * @param hsp An HSP structure [in] [out]
- * @param query Query sequence [in]
- * @param subject Subject sequence [in]
- * @param score_options Scoring options, needed to distinguish the
- * out-of-frame case. [in]
- * @param hit_options Hit saving options containing percent identity and
- * HSP length thresholds.
- * @return FALSE if HSP passes the test, TRUE if it should be deleted.
- */
+Int2
+Blast_HSPGetNumIdentities(const Uint1* query,
+ const Uint1* subject,
+ BlastHSP* hsp,
+ const BlastScoringOptions* score_options,
+ Int4* align_length_ptr)
+{
+ Int2 retval = 0;
+
+ /* Calculate alignment length and number of identical letters.
+ Do not get the number of identities if the query is not available */
+ if (score_options->is_ooframe) {
+ retval = s_Blast_HSPGetOOFNumIdentities(query, subject, hsp,
+ score_options->program_number,
+ &hsp->num_ident,
+ align_length_ptr);
+ } else {
+ retval = s_Blast_HSPGetNumIdentities(query, subject, hsp,
+ &hsp->num_ident,
+ align_length_ptr);
+ }
+
+ return retval;
+}
+
Boolean
Blast_HSPTestIdentityAndLength(EBlastProgramType program_number,
BlastHSP* hsp, Uint1* query, Uint1* subject,
@@ -728,19 +761,14 @@ Blast_HSPTestIdentityAndLength(EBlastProgramType program_number,
{
Int4 align_length = 0;
Boolean delete_hsp = FALSE;
+ Int2 status = 0;
ASSERT(hsp && query && subject && score_options && hit_options);
- /* Calculate alignment length and number of identical letters.
- Do not get the number of identities if the query is not available */
- if (score_options->is_ooframe) {
- Blast_HSPGetOOFNumIdentities(query, subject, hsp, program_number,
- &hsp->num_ident, &align_length);
- } else {
- Blast_HSPGetNumIdentities(query, subject, hsp,
- &hsp->num_ident, &align_length);
- }
-
+ status = Blast_HSPGetNumIdentities(query, subject, hsp, score_options,
+ &align_length);
+ ASSERT(status == 0);
+
/* Check whether this HSP passes the percent identity and minimal hit
length criteria, and delete it if it does not. */
if ((hsp->num_ident * 100.0 <
@@ -1928,6 +1956,7 @@ Blast_HSPListReevaluateWithAmbiguitiesUngapped(EBlastProgramType program,
/* Wrap subject sequence block into a BlastSeqSrcGetSeqArg structure, which is
needed by the BlastSeqSrc API. */
BlastSeqSrcGetSeqArg seq_arg;
+ memset((void*) &seq_arg, 0, sizeof(seq_arg));
seq_arg.oid = subject_blk->oid;
seq_arg.encoding =
(kTranslateSubject ? eBlastEncodingNcbi4na : eBlastEncodingNucleotide);
@@ -2377,6 +2406,15 @@ s_EvalueCompareHSPLists(const void* v1, const void* v2)
return 0;
}
+/** Callback for sorting hsp lists by their best e-value/score, in
+ * reverse order - from higher e-value to lower (lower score to higher).
+*/
+static int
+s_EvalueCompareHSPListsRev(const void* v1, const void* v2)
+{
+ return s_EvalueCompareHSPLists(v2, v1);
+}
+
/********************************************************************************
Functions manipulating BlastHitList's
********************************************************************************/
@@ -2638,6 +2676,22 @@ Int2 Blast_HSPResultsSortByEvalue(BlastHSPResults* results)
return 0;
}
+Int2 Blast_HSPResultsReverseSort(BlastHSPResults* results)
+{
+ Int4 index;
+ BlastHitList* hit_list;
+
+ for (index = 0; index < results->num_queries; ++index) {
+ hit_list = results->hitlist_array[index];
+ if (hit_list && hit_list->hsplist_count > 1) {
+ qsort(hit_list->hsplist_array, hit_list->hsplist_count,
+ sizeof(BlastHSPList*), s_EvalueCompareHSPListsRev);
+ }
+ s_BlastHitListPurge(hit_list);
+ }
+ return 0;
+}
+
Int2 Blast_HSPResultsReverseOrder(BlastHSPResults* results)
{
Int4 index;
diff --git a/algo/blast/core/blast_hits.h b/algo/blast/core/blast_hits.h
index 42fff55e..7e8445e1 100644
--- a/algo/blast/core/blast_hits.h
+++ b/algo/blast/core/blast_hits.h
@@ -1,4 +1,4 @@
-/* $Id: blast_hits.h,v 1.106 2007/07/27 18:25:30 kazimird Exp $
+/* $Id: blast_hits.h,v 1.108 2008/02/14 15:55:42 kazimird Exp $
* ===========================================================================
*
* PUBLIC DOMAIN NOTICE
@@ -263,35 +263,27 @@ Blast_HSPReevaluateWithAmbiguitiesUngapped(BlastHSP* hsp,
const BlastInitialWordParameters* word_params,
BlastScoreBlk* sbp, Boolean translated);
-/** Calculate number of identities in an HSP.
+/** Calculate number of identities in an HSP and set the BlastHSP::num_ident
+ * field (unconditionally)
* @param query The query sequence [in]
* @param subject The uncompressed subject sequence [in]
- * @param hsp All information about the HSP [in]
- * @param num_ident_ptr Number of identities [out]
- * @param align_length_ptr The alignment length, including gaps [out]
+ * @param hsp All information about the HSP, the output of this function will
+ * be stored in its num_ident field [in|out]
+ * @param score_options Scoring options [in]
+ * @param align_length_ptr The alignment length, including gaps (optional) [out]
+ * @return 0 on success, -1 on invalid parameters or error
*/
NCBI_XBLAST_EXPORT
Int2
-Blast_HSPGetNumIdentities(Uint1* query, Uint1* subject, BlastHSP* hsp,
- Int4* num_ident_ptr, Int4* align_length_ptr);
-
-/** Calculate number of identities in an HSP for an out-of-frame alignment.
- * @param query The query sequence [in]
- * @param subject The uncompressed subject sequence [in]
- * @param hsp All information about the HSP [in]
- * @param program BLAST program (blastx or tblastn) [in]
- * @param num_ident_ptr Number of identities [out]
- * @param align_length_ptr The alignment length, including gaps [out]
- */
-NCBI_XBLAST_EXPORT
-Int2
-Blast_HSPGetOOFNumIdentities(Uint1* query, Uint1* subject, BlastHSP* hsp,
- EBlastProgramType program, Int4* num_ident_ptr,
- Int4* align_length_ptr);
-
-/** Calculates number of identities and alignment lengths of an HSP and
- * determines whether this HSP should be kept or deleted. The num_ident
- * field of the BlastHSP structure is filled here.
+Blast_HSPGetNumIdentities(const Uint1* query,
+ const Uint1* subject,
+ BlastHSP* hsp,
+ const BlastScoringOptions* score_options,
+ Int4* align_length_ptr);
+
+/** Calculates number of identities and alignment lengths of an HSP via
+ * Blast_HSPGetNumIdentities and determines whether this HSP should be kept or
+ * deleted.
* @param program_number Type of BLAST program [in]
* @param hsp An HSP structure [in] [out]
* @param query Query sequence [in]
@@ -640,7 +632,7 @@ Int2 Blast_HitListUpdate(BlastHitList* hit_list, BlastHSPList* hsp_list);
* represent alignments to the same query sequence
* @param old_hit_list_ptr Pointer to original HitList, will be NULLed
* out on return [in|out]
- * @param combined_hsp_list_ptr Pointer to the combined list of HSPs [in|out]
+ * @param combined_hit_list_ptr Pointer to the combined HitList [in|out]
* @param contexts_per_query The number of different contexts that can
* occur in hits from old_hit_list and combined_hit_list [in]
* @param split_offsets the query offset that marks the boundary between
@@ -681,6 +673,10 @@ BlastHSPResults* Blast_HSPResultsFree(BlastHSPResults* results);
/** Sort each hit list in the BLAST results by best e-value */
NCBI_XBLAST_EXPORT
Int2 Blast_HSPResultsSortByEvalue(BlastHSPResults* results);
+/** Sort each hit list in the BLAST results by best e-value, in reverse
+ order. */
+NCBI_XBLAST_EXPORT
+Int2 Blast_HSPResultsReverseSort(BlastHSPResults* results);
/** Reverse order of HSP lists in each hit list in the BLAST results.
* This allows to return HSP lists from the end of the arrays when reading
diff --git a/algo/blast/core/blast_hspstream.c b/algo/blast/core/blast_hspstream.c
index 38efe78a..ee4cfa81 100644
--- a/algo/blast/core/blast_hspstream.c
+++ b/algo/blast/core/blast_hspstream.c
@@ -1,4 +1,4 @@
-/* $Id: blast_hspstream.c,v 1.8 2007/07/27 18:25:30 kazimird Exp $
+/* $Id: blast_hspstream.c,v 1.9 2007/12/07 18:25:41 kazimird Exp $
* ===========================================================================
*
* PUBLIC DOMAIN NOTICE
@@ -33,7 +33,7 @@
#ifndef SKIP_DOXYGEN_PROCESSING
static char const rcsid[] =
- "$Id: blast_hspstream.c,v 1.8 2007/07/27 18:25:30 kazimird Exp $";
+ "$Id: blast_hspstream.c,v 1.9 2007/12/07 18:25:41 kazimird Exp $";
#endif /* SKIP_DOXYGEN_PROCESSING */
#include <algo/blast/core/blast_hspstream.h>
@@ -150,7 +150,8 @@ void Blast_HSPStreamResultBatchReset(BlastHSPStreamResultBatch *batch)
{
Int4 i;
for (i = 0; i < batch->num_hsplists; i++) {
- sfree(batch->hsplist_array[i]);
+ batch->hsplist_array[i] =
+ Blast_HSPListFree(batch->hsplist_array[i]);
}
batch->num_hsplists = 0;
}
diff --git a/algo/blast/core/blast_kappa.c b/algo/blast/core/blast_kappa.c
index 88012767..ccea695c 100644
--- a/algo/blast/core/blast_kappa.c
+++ b/algo/blast/core/blast_kappa.c
@@ -1,4 +1,4 @@
-/* $Id: blast_kappa.c,v 1.86 2007/05/22 20:55:36 kazimird Exp $
+/* $Id: blast_kappa.c,v 1.94 2008/02/14 15:55:42 kazimird Exp $
* ==========================================================================
*
* PUBLIC DOMAIN NOTICE
@@ -34,7 +34,7 @@
#ifndef SKIP_DOXYGEN_PROCESSING
static char const rcsid[] =
-"$Id: blast_kappa.c,v 1.86 2007/05/22 20:55:36 kazimird Exp $";
+"$Id: blast_kappa.c,v 1.94 2008/02/14 15:55:42 kazimird Exp $";
#endif /* SKIP_DOXYGEN_PROCESSING */
#include <float.h>
@@ -44,6 +44,7 @@ static char const rcsid[] =
#include <algo/blast/core/blast_util.h>
#include <algo/blast/core/blast_gapalign.h>
#include <algo/blast/core/blast_filter.h>
+#include <algo/blast/core/blast_traceback.h>
#include <algo/blast/core/link_hsps.h>
#include <algo/blast/core/gencode_singleton.h>
#include "blast_psi_priv.h"
@@ -295,7 +296,7 @@ s_HSPListFromDistinctAlignments(BlastCompo_Alignment ** alignments,
BlastQueryInfo* queryInfo)
{
int status = 0; /* return code for any routine called */
- const int unknown_value = 0; /* dummy constant to use when a
+ static const int unknown_value = 0; /* dummy constant to use when a
parameter value is not known */
BlastCompo_Alignment * align; /* an alignment in the list */
BlastHSPList * hsp_list; /* the new HSP list */
@@ -381,7 +382,7 @@ s_HSPListFromDistinctAlignments(BlastCompo_Alignment ** alignments,
static int
s_HitlistEvaluateAndPurge(int * pbestScore, double *pbestEvalue,
BlastHSPList * hsp_list,
- const BlastSeqSrc* seqSrc,
+ const BlastSeqSrc* seqSrc,
int subject_length,
EBlastProgramType program_number,
BlastQueryInfo* queryInfo,
@@ -395,7 +396,7 @@ s_HitlistEvaluateAndPurge(int * pbestScore, double *pbestEvalue,
int status = 0;
*pbestEvalue = DBL_MAX;
*pbestScore = 0;
- if (hitParams->options->do_sum_stats) {
+ if (hitParams->do_sum_stats) {
status = BLAST_LinkHsps(program_number, hsp_list, queryInfo,
subject_length, sbp,
hitParams->link_hsp_params, TRUE);
@@ -427,6 +428,70 @@ s_HitlistEvaluateAndPurge(int * pbestScore, double *pbestEvalue,
return status == 0 ? 0 : -1;
}
+#if 0
+/** Compute the number of identities for the HSPs in the hsp_list
+ * @note this only works for blastp right now and it's not currently being used
+ * because we cannot reliably calculate the number of identities for queries
+ * that have hard masking applied to them (which is the default).
+ *
+ * @param query_blk the query sequence data [in]
+ * @param query_info structure describing the query_blk structure [in]
+ * @param seq_src source of subject sequence data [in]
+ * @param hsp_list list of HSPs to be processed [in|out]
+ * @param scoring_options scoring options [in]
+ */
+static void
+s_ComputeNumIdentities(const BLAST_SequenceBlk* query_blk,
+ const BlastQueryInfo* query_info,
+ const BlastSeqSrc* seq_src,
+ BlastHSPList* hsp_list,
+ const BlastScoringOptions* scoring_options)
+{
+ Uint1* query = NULL;
+ Uint1* subject = NULL;
+ const EBlastProgramType program_number = scoring_options->program_number;
+ const Boolean kIsOutOfFrame = scoring_options->is_ooframe;
+ const EBlastEncoding encoding = Blast_TracebackGetEncoding(program_number);
+ BlastSeqSrcGetSeqArg seq_arg;
+ Int2 status = 0;
+ int i;
+
+ if ( !hsp_list || program_number != eBlastTypeBlastp ) {
+ return;
+ }
+
+ /* Initialize the subject */
+ {
+ memset((void*) &seq_arg, 0, sizeof(seq_arg));
+ seq_arg.oid = hsp_list->oid;
+ seq_arg.encoding = encoding;
+ status = BlastSeqSrcGetSequence(seq_src, (void*) &seq_arg);
+ ASSERT(status == 0);
+ subject = seq_arg.seq->sequence;
+ }
+
+ for (i = 0; i < hsp_list->hspcnt; i++) {
+ BlastHSP* hsp = hsp_list->hsp_array[i];
+
+ /* Initialize the query */
+ if (program_number == eBlastTypeBlastx && kIsOutOfFrame) {
+ Int4 context = hsp->context - hsp->context % CODON_LENGTH;
+ Int4 context_offset = query_info->contexts[context].query_offset;
+ query = query_blk->oof_sequence + CODON_LENGTH + context_offset;
+ } else {
+ query = query_blk->sequence +
+ query_info->contexts[hsp->context].query_offset;
+ }
+
+ status = Blast_HSPGetNumIdentities(query, subject, hsp,
+ scoring_options, 0);
+ ASSERT(status == 0);
+ }
+ BlastSeqSrcReleaseSequence(seq_src, (void*) &seq_arg);
+ BlastSequenceBlkFree(seq_arg.seq);
+}
+#endif
+
/**
* A callback routine: compute lambda for the given score
@@ -801,6 +866,48 @@ s_MatchingSequenceRelease(BlastCompo_MatchingSequence * self)
}
}
+#define MINUMUM_FRACTION_NEAR_IDENTICAL 0.98
+
+/**
+ * Test whether the aligned parts of two sequences that
+ * have a high-scoring gapless alignment are nearly identical
+ *
+ * @param seqData subject sequence
+ * @param queryData query sequence
+ * @param align information about the alignment
+ * @param rangeOffset offset for subject sequence (used for tblastn)
+ *
+ * @return TRUE if the aligned portions are nearly identical
+ */
+static Boolean
+s_TestNearIdentical(const BlastCompo_SequenceData *seqData,
+ const BlastCompo_SequenceData *queryData,
+ const int queryOffset,
+ const BlastCompo_Alignment *align,
+ const int rangeOffset)
+{
+ int numIdentical = 0;
+ double fractionIdentical;
+ int qPos, sPos; /*positions in query and subject;*/
+ int qEnd; /*end of query*/
+
+ qPos = align->queryStart - queryOffset;
+ qEnd = align->queryEnd - queryOffset;
+ sPos = align->matchStart - rangeOffset;
+ while (qPos < qEnd) {
+ if (queryData->data[qPos] == seqData->data[sPos])
+ numIdentical++;
+ sPos++;
+ qPos++;
+ }
+ fractionIdentical = ((double) numIdentical/
+ (double) (align->queryEnd - align->queryStart));
+ if (fractionIdentical >= MINUMUM_FRACTION_NEAR_IDENTICAL)
+ return(TRUE);
+ else
+ return(FALSE);
+}
+
/**
* Initialize a new matching sequence, obtaining information about the
@@ -918,13 +1025,23 @@ s_DoSegSequenceData(BlastCompo_SequenceData * seqData,
* @param self the sequence from which to obtain the data [in]
* @param range the range and translation frame to get [in]
* @param seqData the resulting data [out]
+ * @param queryData the query sequence [in]
+ * @param queryOffset offset for align if there are multiple queries
+ * @param align information about the alignment between query and subject
+ * @param shouldTestIdentical did alignment pass a preliminary test in
+ * redo_alignment.c that indicates the sequence
+ * pieces may be near identical
*
* @return 0 on success; -1 on failure
*/
static int
s_SequenceGetTranslatedRange(const BlastCompo_MatchingSequence * self,
const BlastCompo_SequenceRange * range,
- BlastCompo_SequenceData * seqData )
+ BlastCompo_SequenceData * seqData,
+ const BlastCompo_SequenceData * queryData,
+ const int queryOffset,
+ const BlastCompo_Alignment *align,
+ const Boolean shouldTestIdentical)
{
int status = 0;
BlastKappa_SequenceInfo * local_data; /* BLAST-specific
@@ -970,6 +1087,9 @@ s_SequenceGetTranslatedRange(const BlastCompo_MatchingSequence * self,
seqData->length = translated_length;
if ( !(KAPPA_TBLASTN_NO_SEG_SEQUENCE) ) {
+ if ((!shouldTestIdentical) ||
+ (shouldTestIdentical &&
+ (!s_TestNearIdentical(seqData, queryData, queryOffset, align, range->begin)))) {
status = s_DoSegSequenceData(seqData, eBlastTypeTblastn);
if (status != 0) {
free(seqData->buffer);
@@ -977,6 +1097,7 @@ s_SequenceGetTranslatedRange(const BlastCompo_MatchingSequence * self,
seqData->data = NULL;
seqData->length = 0;
}
+ }
}
}
return status;
@@ -989,13 +1110,25 @@ s_SequenceGetTranslatedRange(const BlastCompo_MatchingSequence * self,
* @param self a protein sequence [in]
* @param range the range to get [in]
* @param seqData the resulting data [out]
+ * @param queryData the query sequence [in]
+ * @param queryOffset offset for align if there are multiple queries
+ * @param align information about the alignment
+ * between query and subject [in]
+ * @param shouldTestIdentical did alignment pass a preliminary test in
+ * redo_alignment.c that indicates the sequence
+ * pieces may be near identical [in]
*
* @return 0 on success; -1 on failure
*/
static int
s_SequenceGetProteinRange(const BlastCompo_MatchingSequence * self,
const BlastCompo_SequenceRange * range,
- BlastCompo_SequenceData * seqData )
+ BlastCompo_SequenceData * seqData,
+ const BlastCompo_SequenceData * queryData,
+ const int queryOffset,
+ const BlastCompo_Alignment *align,
+ const Boolean shouldTestIdentical)
+
{
int status = 0; /* return status */
Int4 idx; /* loop index */
@@ -1030,7 +1163,12 @@ s_SequenceGetProteinRange(const BlastCompo_MatchingSequence * self,
}
}
if ( !(KAPPA_BLASTP_NO_SEG_SEQUENCE) ) {
+ if ((!shouldTestIdentical) ||
+ (shouldTestIdentical &&
+ (!s_TestNearIdentical(seqData, queryData, queryOffset, align, 0)))) {
+ status = -1;
status = s_DoSegSequenceData(seqData, eBlastTypeBlastp);
+ }
}
/* Fit the data to the range. */
seqData ->data = &seqData->data[range->begin - 1];
@@ -1052,20 +1190,32 @@ s_SequenceGetProteinRange(const BlastCompo_MatchingSequence * self,
* @param self sequence information [in]
* @param range range specifying the range of data [in]
* @param seqData the sequence data obtained [out]
+ * @param seqData the resulting data [out]
+ * @param queryData the query sequence [in]
+ * @param queryOffset offset for align if there are multiple queries
+ * @param align information about the alignment between query and subject
+ * @param shouldTestIdentical did alignment pass a preliminary test in
+ * redo_alignment.c that indicates the sequence
+ * pieces may be near identical
*
* @return 0 on success; -1 on failure
*/
static int
s_SequenceGetRange(const BlastCompo_MatchingSequence * self,
const BlastCompo_SequenceRange * range,
- BlastCompo_SequenceData * seqData )
+ BlastCompo_SequenceData * seqData,
+ const BlastCompo_SequenceData * queryData,
+ const int queryOffset,
+ const BlastCompo_Alignment *align,
+ const Boolean shouldTestIdentical)
{
BlastKappa_SequenceInfo * seq_info = self->local_data;
if (seq_info->prog_number == eBlastTypeTblastn) {
/* The sequence must be translated. */
- return s_SequenceGetTranslatedRange(self, range, seqData);
+ return s_SequenceGetTranslatedRange(self, range, seqData,
+ queryData, queryOffset, align, shouldTestIdentical);
} else {
- return s_SequenceGetProteinRange(self, range, seqData);
+ return s_SequenceGetProteinRange(self, range, seqData, queryData, queryOffset, align, shouldTestIdentical);
}
}
@@ -1741,7 +1891,7 @@ s_GetAlignParams(BlastKappa_GappingParamsContext * context,
/* is this a positiion-based search */
Boolean positionBased = (Boolean) (context->sbp->psi_matrix != NULL);
/* will BLAST_LinkHsps be called to assign e-values */
- Boolean do_link_hsps = (hitParams->options->do_sum_stats);
+ Boolean do_link_hsps = (hitParams->do_sum_stats);
ECompoAdjustModes compo_adjust_mode =
(ECompoAdjustModes) extendParams->options->compositionBasedStats;
@@ -1922,8 +2072,10 @@ Blast_RedoAlignmentCore(EBlastProgramType program_number,
return -1; /* Unsupported matrix */
}
/*****************/
- inclusion_ethresh =
- (psiOptions != NULL) ? psiOptions->inclusion_ethresh : 0;
+ inclusion_ethresh = (psiOptions /* this can be NULL for CBl2Seq */
+ ? psiOptions->inclusion_ethresh
+ : PSI_INCLUSION_ETHRESH);
+ ASSERT(inclusion_ethresh != 0.0);
/* Initialize savedParams */
savedParams =
@@ -2094,7 +2246,7 @@ Blast_RedoAlignmentCore(EBlastProgramType program_number,
status_code =
s_HitlistEvaluateAndPurge(&bestScore, &bestEvalue,
hsp_list,
- seqSrc,
+ seqSrc,
matchingSeq.length,
program_number,
queryInfo, query_index,
@@ -2112,6 +2264,10 @@ Blast_RedoAlignmentCore(EBlastProgramType program_number,
s_HSPListNormalizeScores(hsp_list,
kbp->Lambda, kbp->logK,
localScalingFactor);
+ /* currently commented out, see function definition for
+ explanation
+ s_ComputeNumIdentities(queryBlk, queryInfo, seqSrc,
+ hsp_list, scoringParams->options);*/
status_code =
BlastCompo_HeapInsert(&redoneMatches[query_index],
hsp_list, bestEvalue,
diff --git a/algo/blast/core/blast_nalookup.c b/algo/blast/core/blast_nalookup.c
index ed9674a7..d4dd7c5a 100644
--- a/algo/blast/core/blast_nalookup.c
+++ b/algo/blast/core/blast_nalookup.c
@@ -1,4 +1,4 @@
-/* $Id: blast_nalookup.c,v 1.6 2007/02/14 20:25:43 kazimird Exp $
+/* $Id: blast_nalookup.c,v 1.8 2008/01/31 23:55:42 kazimird Exp $
* ===========================================================================
*
* PUBLIC DOMAIN NOTICE
@@ -32,10 +32,11 @@
#include <algo/blast/core/lookup_util.h>
#include <algo/blast/core/blast_encoding.h>
#include <algo/blast/core/blast_util.h>
+#include <algo/blast/core/blast_filter.h>
#ifndef SKIP_DOXYGEN_PROCESSING
static char const rcsid[] =
- "$Id: blast_nalookup.c,v 1.6 2007/02/14 20:25:43 kazimird Exp $";
+ "$Id: blast_nalookup.c,v 1.8 2008/01/31 23:55:42 kazimird Exp $";
#endif /* SKIP_DOXYGEN_PROCESSING */
/** bitfield used to detect ambiguities in uncompressed
@@ -316,10 +317,46 @@ static Int4 s_BlastSmallNaLookupFinalize(Int4 **thin_backbone,
return 0;
}
+static BlastSeqLoc* s_SeqLocListInvert(BlastSeqLoc* locations, Int4 length)
+{
+ BlastSeqLoc* retval = NULL;
+ BlastSeqLoc* tail = NULL; /* Tail of the list. */
+ Int4 start, stop;
+
+ ASSERT(locations);
+
+ start = 0;
+ stop = MAX( 0, locations->ssr->left);
+
+ if (stop - start > 2)
+ tail = BlastSeqLocNew(&retval, start, stop);
+
+ while (locations)
+ {
+ start = locations->ssr->right;
+ locations = locations->next;
+
+ if (locations)
+ stop = locations->ssr->left;
+ else
+ stop = length;
+
+ if (stop - start > 2)
+ {
+ if (retval == NULL)
+ tail = BlastSeqLocNew(&retval, start, stop);
+ else
+ tail = BlastSeqLocNew(&tail, start, stop);
+ }
+ }
+ return retval;
+}
+
Int4 BlastSmallNaLookupTableNew(BLAST_SequenceBlk* query,
BlastSeqLoc* locations,
BlastSmallNaLookupTable * *lut,
const LookupTableOptions * opt,
+ const QuerySetUpOptions* query_options,
Int4 lut_width)
{
Int4 status = 0;
@@ -344,6 +381,13 @@ Int4 BlastSmallNaLookupTableNew(BLAST_SequenceBlk* query,
BITS_PER_NUC,
lookup->lut_word_length,
query, locations);
+ if (locations && lookup->word_length > lookup->lut_word_length &&
+ ((query_options->filtering_options && SBlastFilterOptionsMaskAtHash(query_options->filtering_options)) ||
+ (query_options->filter_string && strstr(query_options->filter_string, "m"))))
+ {
+ lookup->masked_locations = s_SeqLocListInvert(locations, query->length);
+ }
+
status = s_BlastSmallNaLookupFinalize(thin_backbone, lookup, query);
if (status != 0) {
lookup = BlastSmallNaLookupTableDestruct(lookup);
@@ -359,6 +403,8 @@ BlastSmallNaLookupTable *BlastSmallNaLookupTableDestruct(
{
sfree(lookup->final_backbone);
sfree(lookup->overflow);
+ if (lookup->masked_locations)
+ lookup->masked_locations = BlastSeqLocFree(lookup->masked_locations);
sfree(lookup);
return NULL;
}
diff --git a/algo/blast/core/blast_nalookup.h b/algo/blast/core/blast_nalookup.h
index 413f926f..8b9b5ac7 100644
--- a/algo/blast/core/blast_nalookup.h
+++ b/algo/blast/core/blast_nalookup.h
@@ -1,4 +1,4 @@
-/* $Id: blast_nalookup.h,v 1.8 2007/03/13 17:55:34 kazimird Exp $
+/* $Id: blast_nalookup.h,v 1.10 2008/01/31 23:55:42 kazimird Exp $
* ===========================================================================
*
* PUBLIC DOMAIN NOTICE
@@ -74,6 +74,7 @@ typedef struct BlastSmallNaLookupTable {
Int4 overflow_size; /**< Number of elements in the overflow array */
void *scansub_callback; /**< function for scanning subject sequences */
void *extend_callback; /**< function for extending hits */
+ BlastSeqLoc* masked_locations; /**< masked locations, only non-NULL for soft-masking. */
} BlastSmallNaLookupTable;
/** Create a new small nucleotide lookup table.
@@ -83,6 +84,7 @@ typedef struct BlastSmallNaLookupTable {
* e.g. [0,length-1] for full sequence. NULL means no sequence. [in]
* @param lut Pointer to the lookup table to be created [out]
* @param opt Options for lookup table creation [in]
+ * @param query_options query options used to get filtering options [in]
* @param lut_width The number of nucleotides in one lookup table word [in]
* @return 0 if successful, nonzero on failure
*/
@@ -90,6 +92,7 @@ Int4 BlastSmallNaLookupTableNew(BLAST_SequenceBlk* query,
BlastSeqLoc* locations,
BlastSmallNaLookupTable * *lut,
const LookupTableOptions * opt,
+ const QuerySetUpOptions* query_options,
Int4 lut_width);
/** Free a small nucleotide lookup table.
diff --git a/algo/blast/core/blast_options.c b/algo/blast/core/blast_options.c
index 1c9484f6..81e875b7 100644
--- a/algo/blast/core/blast_options.c
+++ b/algo/blast/core/blast_options.c
@@ -1,4 +1,4 @@
-/* $Id: blast_options.c,v 1.205 2007/05/22 20:55:36 kazimird Exp $
+/* $Id: blast_options.c,v 1.207 2007/10/25 15:55:36 kazimird Exp $
* ===========================================================================
*
* PUBLIC DOMAIN NOTICE
@@ -34,7 +34,7 @@
#ifndef SKIP_DOXYGEN_PROCESSING
static char const rcsid[] =
- "$Id: blast_options.c,v 1.205 2007/05/22 20:55:36 kazimird Exp $";
+ "$Id: blast_options.c,v 1.207 2007/10/25 15:55:36 kazimird Exp $";
#endif /* SKIP_DOXYGEN_PROCESSING */
#include <algo/blast/core/blast_options.h>
@@ -458,7 +458,7 @@ BlastInitialWordOptionsNew(EBlastProgramType program,
(*options)->gap_trigger = BLAST_GAP_TRIGGER_NUCL;
(*options)->x_dropoff = BLAST_UNGAPPED_X_DROPOFF_NUCL;
}
- (*options)->ungapped_extension = TRUE;
+
(*options)->program_number = program;
return 0;
@@ -473,8 +473,8 @@ BlastInitialWordOptionsValidate(EBlastProgramType program_number,
ASSERT(options);
- /* For some blastn variants (i.e., megablast), and for PHI BLAST there is no
- * ungapped extension. */
+ /* PHI-BLAST has no ungapped extension phase. Megablast may not have it,
+ but generally does now. */
if (program_number != eBlastTypeBlastn &&
(!Blast_ProgramIsPhiBlast(program_number)) &&
options->x_dropoff <= 0.0)
@@ -515,7 +515,7 @@ BlastExtensionOptionsFree(BlastExtensionOptions* options)
}
Int2
-BlastExtensionOptionsNew(EBlastProgramType program, BlastExtensionOptions* *options)
+BlastExtensionOptionsNew(EBlastProgramType program, BlastExtensionOptions* *options, Boolean gapped)
{
*options = (BlastExtensionOptions*)
@@ -541,7 +541,7 @@ BlastExtensionOptionsNew(EBlastProgramType program, BlastExtensionOptions* *opti
/** @todo how to determine this for PSI-BLAST bootstrap run (i.e. when
* program is blastp? */
- if (Blast_QueryIsPssm(program) && ! Blast_SubjectIsTranslated(program)) {
+ if (gapped && (Blast_QueryIsPssm(program) && ! Blast_SubjectIsTranslated(program))) {
(*options)->compositionBasedStats = eCompositionBasedStats;
}
@@ -985,7 +985,8 @@ BLAST_FillLookupTableOptions(LookupTableOptions* options,
if (word_size)
options->word_size = word_size;
if ((program_number == eBlastTypeTblastn ||
- program_number == eBlastTypeBlastp) &&
+ program_number == eBlastTypeBlastp ||
+ program_number == eBlastTypeBlastx) &&
word_size > 5)
options->lut_type = eCompressedAaLookupTable;
@@ -1141,13 +1142,14 @@ LookupTableOptionsValidate(EBlastProgramType program_number,
} else if (program_number != eBlastTypeBlastn && options->word_size > 5)
{
if (program_number == eBlastTypeBlastp ||
- program_number == eBlastTypeTblastn)
+ program_number == eBlastTypeTblastn ||
+ program_number == eBlastTypeBlastx)
{
if (options->word_size > 7) {
Blast_MessageWrite(blast_msg, eBlastSevError,
kBlastMessageNoContext,
"Word-size must be less than "
- "8 for a tblastn search");
+ "8 for a tblastn, blastp or blastx search");
return BLASTERR_OPTION_VALUE_INVALID;
}
}
@@ -1169,13 +1171,16 @@ LookupTableOptionsValidate(EBlastProgramType program_number,
}
if (program_number == eBlastTypeBlastp ||
- program_number == eBlastTypeTblastn)
+ program_number == eBlastTypeTblastn ||
+ program_number == eBlastTypeBlastx)
{
if (options->word_size > 5 &&
options->lut_type != eCompressedAaLookupTable) {
- Blast_MessageWrite(blast_msg, eBlastSevError, kBlastMessageNoContext,
- "Blastp or Tblastn with word size > 5 requires a "
- "compressed alphabet lookup table");
+ Blast_MessageWrite(blast_msg, eBlastSevError,
+ kBlastMessageNoContext,
+ "Blastp, Blastx or Tblastn with word size"
+ " > 5 requires a "
+ "compressed alphabet lookup table");
return BLASTERR_OPTION_VALUE_INVALID;
}
else if (options->lut_type == eCompressedAaLookupTable &&
@@ -1412,10 +1417,11 @@ Int2 BLAST_InitDefaultOptions(EBlastProgramType program_number,
if ((status=BlastInitialWordOptionsNew(program_number, word_options)))
return status;
- if ((status = BlastExtensionOptionsNew(program_number, ext_options)))
+ if ((status=BlastScoringOptionsNew(program_number, score_options)))
return status;
- if ((status=BlastScoringOptionsNew(program_number, score_options)))
+ if ((status = BlastExtensionOptionsNew(program_number, ext_options,
+ (*score_options)->gapped_calculation)))
return status;
if ((status=BlastHitSavingOptionsNew(program_number, hit_options,
@@ -1464,6 +1470,22 @@ static Int2 s_BlastExtensionScoringOptionsValidate(EBlastProgramType program_num
}
}
+ if (ext_options->compositionBasedStats != eNoCompositionBasedStats)
+ {
+ if (!Blast_QueryIsPssm(program_number) && program_number != eBlastTypeTblastn &&
+ program_number != eBlastTypeBlastp) {
+ Blast_MessageWrite(blast_msg, eBlastSevWarning, kBlastMessageNoContext,
+ "Compositional adjustments are only supported with blastp or tblastn");
+ return BLASTERR_OPTION_VALUE_INVALID;
+ }
+ if (!score_options->gapped_calculation) {
+ Blast_MessageWrite(blast_msg, eBlastSevWarning, kBlastMessageNoContext,
+ "Compositional adjustments are only supported for gapped searches");
+ return BLASTERR_OPTION_VALUE_INVALID;
+ }
+
+ }
+
return 0;
}
diff --git a/algo/blast/core/blast_options.h b/algo/blast/core/blast_options.h
index 69891352..b7167d0d 100644
--- a/algo/blast/core/blast_options.h
+++ b/algo/blast/core/blast_options.h
@@ -1,4 +1,4 @@
-/* $Id: blast_options.h,v 1.146 2007/05/22 20:55:36 kazimird Exp $
+/* $Id: blast_options.h,v 1.149 2008/01/24 21:25:45 kazimird Exp $
* ===========================================================================
*
* PUBLIC DOMAIN NOTICE
@@ -132,7 +132,7 @@ extern "C" {
/** default dropoff for the final gapped extension with traceback */
#define BLAST_GAP_X_DROPOFF_FINAL_PROT 25 /**< default dropoff (all protein-
based gapped extensions) */
-#define BLAST_GAP_X_DROPOFF_FINAL_NUCL 50 /**< default dropoff for nucleotide
+#define BLAST_GAP_X_DROPOFF_FINAL_NUCL 100 /**< default dropoff for nucleotide
gapped extensions) */
#define BLAST_GAP_X_DROPOFF_FINAL_TBLASTX 0 /**< default dropoff for tblastx */
@@ -184,8 +184,6 @@ typedef struct LookupTableOptions {
Int4 mb_template_length; /**< Length of the discontiguous words */
Int4 mb_template_type; /**< Type of a discontiguous word template */
char* phi_pattern; /**< PHI-BLAST pattern */
- Int4 max_num_patterns; /**< Maximal number of patterns allowed for
- PHI-BLAST */
EBlastProgramType program_number; /**< indicates blastn, blastp, etc. */
} LookupTableOptions;
@@ -243,8 +241,6 @@ typedef struct BlastInitialWordOptions {
double gap_trigger; /**< Score in bits for starting gapped extension */
Int4 window_size; /**< Maximal allowed distance between 2 hits in case 2
hits are required to trigger the extension */
- Boolean ungapped_extension; /**< Should the ungapped extension be
- performed? */
double x_dropoff; /**< X-dropoff value (in bits) for the ungapped
extension */
EBlastProgramType program_number; /**< indicates blastn, blastp, etc. */
@@ -308,8 +304,6 @@ typedef struct BlastHitSavingOptions {
Int4 hsp_num_max; /**< Maximal number of HSPs to save for one database
sequence */
Int4 total_hsp_limit; /**< Maximal total number of HSPs to keep */
- Int4 hsp_range_max; /**< Maximal number of HSPs to save in a region:
- used for culling only */
Int4 culling_limit; /**< If the query range of an HSP is contained in
at least this many higher-scoring HSPs, throw
away the HSP as redundant (turned off if zero) */
@@ -441,24 +435,28 @@ typedef struct BlastDatabaseOptions {
* @param dust_options object to free
* @return NULL pointer
*/
+NCBI_XBLAST_EXPORT
SDustOptions* SDustOptionsFree(SDustOptions* dust_options);
/** Allocates memory for SDustOptions, fills in defaults.
* @param dust_options options that are being returned [in|out]
* @return zero on sucess
*/
+NCBI_XBLAST_EXPORT
Int2 SDustOptionsNew(SDustOptions* *dust_options);
/** Frees SSegOptions.
* @param seg_options object to free [in]
* @return NULL pointer
*/
+NCBI_XBLAST_EXPORT
SSegOptions* SSegOptionsFree(SSegOptions* seg_options);
/** Allocates memory for SSegOptions, fills in defaults. [in|out]
* @param seg_options options that are being returned [in|out]
* @return zero on sucess
*/
+NCBI_XBLAST_EXPORT
Int2 SSegOptionsNew(SSegOptions* *seg_options);
/** Resets name of db for repeat filtering.
@@ -466,24 +464,28 @@ Int2 SSegOptionsNew(SSegOptions* *seg_options);
* @param dbname name of the database(s) [in]
* @return zero on sucess
*/
+NCBI_XBLAST_EXPORT
Int2 SRepeatFilterOptionsResetDB(SRepeatFilterOptions* *repeat_options, const char* dbname);
/** Frees SRepeatFilterOptions.
* @param repeat_options object to free [in]
* @return NULL pointer
*/
+NCBI_XBLAST_EXPORT
SRepeatFilterOptions* SRepeatFilterOptionsFree(SRepeatFilterOptions* repeat_options);
/** Allocates memory for SRepeatFilterOptions, fills in defaults.
* @param repeat_options options that are being returned [in|out]
* @return zero on sucess
*/
+NCBI_XBLAST_EXPORT
Int2 SRepeatFilterOptionsNew(SRepeatFilterOptions* *repeat_options);
/** Frees SBlastFilterOptions and all subservient structures.
* @param filter_options object to free
* @return NULL pointer
*/
+NCBI_XBLAST_EXPORT
SBlastFilterOptions* SBlastFilterOptionsFree(SBlastFilterOptions* filter_options);
/** Merges two sets of options together, taking the non-default one as preferred. if
@@ -493,6 +495,7 @@ SBlastFilterOptions* SBlastFilterOptionsFree(SBlastFilterOptions* filter_options
* @param opt2 second set of options [in]
* @return zero on success.
*/
+NCBI_XBLAST_EXPORT
Int2 SBlastFilterOptionsMerge(SBlastFilterOptions** combined, const SBlastFilterOptions* opt1,
const SBlastFilterOptions* opt2);
@@ -510,12 +513,14 @@ typedef enum EFilterOptions {
* @param type specify either dust or seg (now) with EFilterOptions [in]
* @return zero on sucess
*/
+NCBI_XBLAST_EXPORT
Int2 SBlastFilterOptionsNew(SBlastFilterOptions* *filter_options, EFilterOptions type);
/** Queries whether masking should be done only for the lookup table or for the entire search.
* @param filter_options the object to be queried [in]
* @return TRUE or FALSE, FALSE if filter_options is NULL.
*/
+NCBI_XBLAST_EXPORT
Boolean SBlastFilterOptionsMaskAtHash(const SBlastFilterOptions* filter_options);
/** Validates filter options to ensure that program and options are consistent
@@ -525,6 +530,7 @@ Boolean SBlastFilterOptionsMaskAtHash(const SBlastFilterOptions* filter_options)
* @param blast_message error or warning (optional) [out]
* @return zero on success
*/
+NCBI_XBLAST_EXPORT
Int2 SBlastFilterOptionsValidate(EBlastProgramType program_number, const SBlastFilterOptions* filter_options,
Blast_Message* *blast_message);
@@ -604,10 +610,11 @@ BlastExtensionOptionsFree(BlastExtensionOptions* options);
/** Allocate memory for BlastExtensionOptions and fill with default values.
* @param program Program number (blastn, blastp, etc.) [in]
* @param options The options that are being returned [out]
+ * @param gapped The search is gapped [in]
*/
NCBI_XBLAST_EXPORT
Int2
-BlastExtensionOptionsNew(EBlastProgramType program, BlastExtensionOptions* *options);
+BlastExtensionOptionsNew(EBlastProgramType program, BlastExtensionOptions* *options, Boolean gapped);
/** Fill non-default values in the BlastExtensionOptions structure.
* @param options The options structure [in] [out]
@@ -688,6 +695,7 @@ Int2 BlastScoringOptionsDup(BlastScoringOptions* *new_opt, const BlastScoringOpt
* @param matrix_name New matrix name. If NULL, old matrix name is left
* as is. [in]
*/
+NCBI_XBLAST_EXPORT
Int2 BlastScoringOptionsSetMatrix(BlastScoringOptions* opts,
const char* matrix_name);
@@ -902,6 +910,7 @@ Int2 BLAST_ValidateOptions(EBlastProgramType program_number,
* @param threshold returns suggested value [in|out]
* @return zero on success
*/
+NCBI_XBLAST_EXPORT
Int2 BLAST_GetSuggestedThreshold(EBlastProgramType program_number,
const char* matrixName,
double* threshold);
@@ -914,6 +923,7 @@ Int2 BLAST_GetSuggestedThreshold(EBlastProgramType program_number,
* @param window_size returns suggested value [in|out]
* @return zero on success
*/
+NCBI_XBLAST_EXPORT
Int2 BLAST_GetSuggestedWindowSize(EBlastProgramType program_number,
const char* matrixName,
Int4* window_size);
diff --git a/algo/blast/core/blast_parameters.c b/algo/blast/core/blast_parameters.c
index a910dfc4..d1f832b5 100644
--- a/algo/blast/core/blast_parameters.c
+++ b/algo/blast/core/blast_parameters.c
@@ -1,4 +1,4 @@
-/* $Id: blast_parameters.c,v 1.36 2007/05/22 20:55:36 kazimird Exp $
+/* $Id: blast_parameters.c,v 1.38 2007/10/25 15:55:36 kazimird Exp $
* ===========================================================================
*
* PUBLIC DOMAIN NOTICE
@@ -30,7 +30,7 @@
#ifndef SKIP_DOXYGEN_PROCESSING
static char const rcsid[] =
- "$Id: blast_parameters.c,v 1.36 2007/05/22 20:55:36 kazimird Exp $";
+ "$Id: blast_parameters.c,v 1.38 2007/10/25 15:55:36 kazimird Exp $";
#endif /* SKIP_DOXYGEN_PROCESSING */
#include <algo/blast/core/blast_parameters.h>
@@ -186,6 +186,11 @@ BlastInitialWordParametersNew(EBlastProgramType program_number,
p = *parameters = (BlastInitialWordParameters*)calloc(1,
sizeof(BlastInitialWordParameters));
+ if (Blast_ProgramIsPhiBlast(program_number))
+ p->ungapped_extension = FALSE;
+ else
+ p->ungapped_extension = TRUE;
+
p->cutoffs = (BlastUngappedCutoffs *)calloc(
(size_t)(query_info->last_context+1), sizeof(BlastUngappedCutoffs));
@@ -665,13 +670,14 @@ BlastHitSavingParametersNew(EBlastProgramType program_number,
if (params == NULL)
return 1;
+ params->do_sum_stats = options->do_sum_stats;
params->options = (BlastHitSavingOptions *) options;
/* Each context gets its own gapped cutoff data */
params->cutoffs = (BlastGappedCutoffs *)calloc(
(size_t)(query_info->last_context+1),
sizeof(BlastGappedCutoffs));
- if (options->do_sum_stats) {
+ if (params->do_sum_stats) {
BlastLinkHSPParametersNew(program_number, gapped_calculation,
&params->link_hsp_params);
@@ -695,6 +701,7 @@ BlastHitSavingParametersNew(EBlastProgramType program_number,
/* A nonpositive value of max_protein_gap disables linking */
params->link_hsp_params =
BlastLinkHSPParametersFree(params->link_hsp_params);
+ params->do_sum_stats = FALSE;
} else { /* the value of max_protein_gap is positive */
params->link_hsp_params->longest_intron = max_protein_gap;
}
@@ -940,6 +947,9 @@ CalculateLinkHSPCutoffs(EBlastProgramType program, BlastQueryInfo* query_info,
* ===========================================================================
*
* $Log: blast_parameters.c,v $
+ * Revision 1.38 2007/10/25 15:55:36 kazimird
+ * Synchronized with the C++ Toolkit.
+ *
* Revision 1.36 2007/05/22 20:55:36 kazimird
* Synchronized with the C++ Toolkit.
*
diff --git a/algo/blast/core/blast_parameters.h b/algo/blast/core/blast_parameters.h
index 1c02aa97..82fd9a22 100644
--- a/algo/blast/core/blast_parameters.h
+++ b/algo/blast/core/blast_parameters.h
@@ -1,4 +1,4 @@
-/* $Id: blast_parameters.h,v 1.18 2007/05/22 20:55:36 kazimird Exp $
+/* $Id: blast_parameters.h,v 1.20 2007/10/25 15:55:36 kazimird Exp $
* ===========================================================================
*
* PUBLIC DOMAIN NOTICE
@@ -115,6 +115,8 @@ typedef struct BlastInitialWordParameters {
seeds? */
Int4 nucl_score_table[256]; /**< the combined score of all match/mismatch
combinations for aligning four bases */
+ Boolean ungapped_extension; /**< Should an ungapped extension be
+ performed? */
} BlastInitialWordParameters;
/** Computed values used as parameters for gapped alignments.
@@ -167,6 +169,9 @@ typedef struct BlastHitSavingParameters {
is not done if NULL. */
Boolean restricted_align; /**< TRUE if approximate score-only gapped
alignment is used */
+ Boolean do_sum_stats; /**< TRUE if sum stats will be used. Can override the
+ do_sum_stats Boolean in the options if criteria for
+ doing sum stats are not met. */
} BlastHitSavingParameters;
/** Because approximate gapped alignment adds extra overhead,
diff --git a/algo/blast/core/blast_psi.c b/algo/blast/core/blast_psi.c
index 3299206c..58f6d8cf 100644
--- a/algo/blast/core/blast_psi.c
+++ b/algo/blast/core/blast_psi.c
@@ -1,6 +1,6 @@
#ifndef SKIP_DOXYGEN_PROCESSING
static char const rcsid[] =
- "$Id: blast_psi.c,v 1.33 2006/11/21 17:07:09 papadopo Exp $";
+ "$Id: blast_psi.c,v 1.34 2007/12/07 18:25:42 kazimird Exp $";
#endif /* SKIP_DOXYGEN_PROCESSING */
/* ===========================================================================
*
@@ -181,7 +181,9 @@ PSICreatePssmWithDiagnostics(const PSIMsa* msap, /* [in] */
}
status = _PSIComputeFreqRatios(msa, seq_weights, sbp, aligned_block,
- options->pseudo_count, internal_pssm);
+ options->pseudo_count,
+ options->nsg_compatibility_mode,
+ internal_pssm);
if (status != PSI_SUCCESS) {
s_PSICreatePssmCleanUp(pssm, packed_msa, msa, aligned_block,
seq_weights, internal_pssm);
diff --git a/algo/blast/core/blast_psi_priv.c b/algo/blast/core/blast_psi_priv.c
index 49f4b9e0..aa14067c 100644
--- a/algo/blast/core/blast_psi_priv.c
+++ b/algo/blast/core/blast_psi_priv.c
@@ -1,6 +1,6 @@
#ifndef SKIP_DOXYGEN_PROCESSING
static char const rcsid[] =
- "$Id: blast_psi_priv.c,v 1.67 2006/12/05 22:03:00 camacho Exp $";
+ "$Id: blast_psi_priv.c,v 1.68 2007/12/07 18:25:42 kazimird Exp $";
#endif /* SKIP_DOXYGEN_PROCESSING */
/* ===========================================================================
*
@@ -1801,6 +1801,7 @@ _PSIComputeFreqRatios(const _PSIMsa* msa,
const BlastScoreBlk* sbp,
const _PSIAlignedBlock* aligned_blocks,
Int4 pseudo_count,
+ Boolean nsg_compatibility_mode,
_PSIInternalPssmData* internal_pssm)
{
/* Subscripts are indicated as follows: N_i, where i is a subscript of N */
@@ -1858,7 +1859,11 @@ _PSIComputeFreqRatios(const _PSIMsa* msa,
denominator = alpha + kBeta;
- ASSERT(denominator != 0.0);
+ if (nsg_compatibility_mode && denominator == 0.0) {
+ return PSIERR_UNKNOWN;
+ } else {
+ ASSERT(denominator != 0.0);
+ }
qOverPEstimate = numerator/denominator;
/* Note artificial multiplication by standard probability
@@ -2449,241 +2454,3 @@ _PSISaveDiagnostics(const _PSIMsa* msa,
return PSI_SUCCESS;
}
-
-/*
- * ===========================================================================
- * $Log: blast_psi_priv.c,v $
- * Revision 1.67 2006/12/05 22:03:00 camacho
- * Minor fix for structure group customization
- *
- * Revision 1.66 2006/11/21 17:07:31 papadopo
- * rearrange headers
- *
- * Revision 1.65 2006/11/20 15:48:00 camacho
- * Relocation of dynamic array functions/definitions
- *
- * Revision 1.64 2006/11/15 16:19:53 camacho
- * Pacify compiler
- *
- * Revision 1.63 2006/11/14 17:24:12 camacho
- * eliminate compiler warning
- *
- * Revision 1.62 2006/11/14 15:37:19 camacho
- * PSSM engine performance optimizations
- *
- * Revision 1.61 2006/08/30 13:30:20 camacho
- * Remove inline
- *
- * Revision 1.60 2006/08/29 22:17:56 camacho
- * Use NCBISTDAA_TO_AMINOACID
- *
- * Revision 1.59 2006/04/19 19:16:49 camacho
- * Refactoring of structure group customization and addition of validation
- *
- * Revision 1.58 2006/02/16 18:47:18 camacho
- * + encoding translations for O and J
- *
- * Revision 1.57 2005/11/18 20:09:45 camacho
- * Fixes for backwards compatibility with C toolkit PSSM engine for certain corner
- * cases.
- *
- * Revision 1.56 2005/10/17 18:34:54 camacho
- * Remove abort() call when sequence weights are not checked
- *
- * Revision 1.55 2005/10/05 14:09:30 camacho
- * Port change in revision 6.76 of posit.c
- *
- * Revision 1.54 2005/10/03 20:42:41 camacho
- * Minor
- *
- * Revision 1.53 2005/04/21 20:26:57 camacho
- * Relax validation in s_PSIValidateAlignedColumns so that query sequence can be
- * the only aligned sequence for a given column of the multiple sequence
- * alignment.
- *
- * Revision 1.52 2005/03/22 15:35:10 camacho
- * Fix to enable backwards compatibility with old PSSM engine when the query is
- * the only sequence aligned for a given column of the multiple sequence
- * alignment.
- *
- * Revision 1.51 2005/03/07 18:46:05 camacho
- * Removed dead code
- *
- * Revision 1.50 2005/02/23 17:32:57 camacho
- * Minor
- *
- * Revision 1.49 2005/02/23 17:24:41 camacho
- * 1. Moved prototype of _PSIUpdateLambdaK to blast_psi_priv.h
- * 2. Removed unneeded fields from Kappa_compactSearchItems
- * 3. Doxygen fixes
- *
- * Revision 1.48 2005/02/22 22:49:55 camacho
- * + impala_scaling_factor, first cut
- *
- * Revision 1.47 2005/02/14 14:07:49 camacho
- * Changes to use SBlastScoreMatrix
- *
- * Revision 1.46 2005/01/31 16:50:21 camacho
- * 1. Moved constants to private header.
- * 2. Changed signature of functions to copy matrices.
- *
- * Revision 1.45 2004/12/15 16:19:27 camacho
- * Remove compiler warning
- *
- * Revision 1.44 2004/12/15 03:17:11 ucko
- * Revert previous change, as VERIFY is not necessarily #defined.
- *
- * Revision 1.43 2004/12/15 02:50:50 camacho
- * Replace ASSERT with VERIFY
- *
- * Revision 1.42 2004/12/13 22:26:59 camacho
- * Consolidated structure group customizations in option: nsg_compatibility_mode
- *
- * Revision 1.41 2004/12/09 15:22:56 dondosha
- * Renamed some functions dealing with BlastScoreBlk and Blast_KarlinBlk structures
- *
- * Revision 1.40 2004/12/08 15:06:01 camacho
- * Call _PSIUpdatePositionCounts is needed after purging query sequence for
- * structure group customization, thus this function has been changed to reset the
- * appropriate _PSIMsa fields so that residue counts/aligned sequences are
- * reported accurately.
- *
- * Revision 1.39 2004/12/07 22:07:34 camacho
- * Add sanity checks for purge identity threshold
- *
- * Revision 1.38 2004/11/29 13:53:23 camacho
- * Renamed Blast_ScoreFreq structure free function
- *
- * Revision 1.37 2004/11/23 21:48:21 camacho
- * Removed local initialization of ideal Karlin-Altschul parameters
- *
- * Revision 1.36 2004/11/22 14:38:48 camacho
- * + option to set % identity threshold to PSSM engine
- *
- * Revision 1.35 2004/11/18 16:25:32 camacho
- * Rename _PSIGetStandardProbabilities to BLAST_GetStandardAaProbabilities
- *
- * Revision 1.34 2004/11/15 16:54:36 camacho
- * break long lines
- *
- * Revision 1.33 2004/11/15 16:32:37 dondosha
- * Changed constant names and static functions names in accordance with C++ toolkit guidelines
- *
- * Revision 1.32 2004/11/15 14:21:43 camacho
- * Correction to _PSIValidateAlignedColumns when the query sequence should be accounted
- *
- * Revision 1.31 2004/11/02 20:37:30 camacho
- * Doxygen fixes
- *
- * Revision 1.30 2004/10/19 14:28:38 camacho
- * Fix memory access error
- *
- * Revision 1.29 2004/10/18 14:33:14 camacho
- * 1. Added validation routines
- * 2. Fixed bug in calculating sequence weights
- * 3. Expanded error codes
- *
- * Revision 1.28 2004/10/13 16:03:00 camacho
- * Add assertions as sanity checks
- *
- * Revision 1.27 2004/10/01 13:59:22 camacho
- * Use calloc where needed
- *
- * Revision 1.26 2004/09/23 19:51:44 camacho
- * Added sanity checks
- *
- * Revision 1.25 2004/09/17 02:06:34 camacho
- * Renaming of diagnostics structure fields
- *
- * Revision 1.24 2004/09/14 21:17:02 camacho
- * Add structure group customization to ignore query
- *
- * Revision 1.23 2004/08/31 16:13:28 camacho
- * Documentation changes
- *
- * Revision 1.22 2004/08/13 22:32:16 camacho
- * Refactoring of _PSIPurgeSimilarAlignments to use finite state machine
- *
- * Revision 1.21 2004/08/04 20:18:26 camacho
- * 1. Renaming of structures and functions that pertain to the internals of PSSM
- * engine.
- * 2. Updated documentation (in progress)
- *
- * Revision 1.20 2004/08/02 13:25:49 camacho
- * 1. Various renaming of structures, in progress
- * 2. Addition of PSIDiagnostics structures, in progress
- *
- * Revision 1.19 2004/07/29 19:16:02 camacho
- * Moved PSIExtractQuerySequenceInfo
- *
- * Revision 1.18 2004/07/22 19:06:18 camacho
- * 1. Fix in _PSICheckSequenceWeights.
- * 2. Added functions to calculate information content.
- * 3. Cleaned up PSIComputeFreqRatios.
- * 4. Removed unneeded code to set populate extra column in PSSMs.
- * 5. Added collection of information content and gapless column weights to
- * diagnostics structure
- *
- * Revision 1.17 2004/07/06 15:23:54 camacho
- * Fix memory acccess error
- *
- * Revision 1.16 2004/07/02 19:40:48 camacho
- * Fixes for handling out-of-memory conditions
- *
- * Revision 1.15 2004/07/02 18:00:25 camacho
- * 1. Document rationale for order in which sequences are compared in
- * _PSIPurgeNearIdenticalAlignments.
- * 2. Fix in _PSIPurgeSimilarAlignments to take into account the X residues
- * 3. Refactorings in sequence weight calculation functions:
- * - Simplification of _PSICheckSequenceWeights
- * - Addition of _PSISpreadGapWeights
- * - Reorganization of _PSICalculateNormalizedSequenceWeights
- *
- * Revision 1.14 2004/06/25 20:31:11 camacho
- * Remove C++ comments
- *
- * Revision 1.13 2004/06/25 20:16:50 camacho
- * 1. Minor fixes to sequence weights calculation
- * 2. Add comments
- *
- * Revision 1.12 2004/06/21 12:52:44 camacho
- * Replace PSI_ALPHABET_SIZE for BLASTAA_SIZE
- *
- * Revision 1.11 2004/06/17 20:47:21 camacho
- * Minor fix to extent sizes
- *
- * Revision 1.10 2004/06/16 15:22:47 camacho
- * Fixes to add new unit tests
- *
- * Revision 1.9 2004/06/09 14:21:03 camacho
- * Removed msvc compiler warnings
- *
- * Revision 1.8 2004/06/08 17:30:06 dondosha
- * Compiler warnings fixes
- *
- * Revision 1.7 2004/06/07 14:18:24 dondosha
- * Added some variables initialization, to remove compiler warnings
- *
- * Revision 1.6 2004/05/28 17:35:03 camacho
- * Fix msvc6 warnings
- *
- * Revision 1.5 2004/05/28 16:00:09 camacho
- * + first port of PSSM generation engine
- *
- * Revision 1.4 2004/05/19 14:52:02 camacho
- * 1. Added doxygen tags to enable doxygen processing of algo/blast/core
- * 2. Standardized copyright, CVS $Id string, $Log and rcsid formatting and i
- * location
- * 3. Added use of @todo doxygen keyword
- *
- * Revision 1.3 2004/05/06 14:01:40 camacho
- * + _PSICopyDoubleMatrix
- *
- * Revision 1.2 2004/04/07 22:08:37 kans
- * needed to include blast_def.h for sfree prototype
- *
- * Revision 1.1 2004/04/07 19:11:17 camacho
- * Initial revision
- *
- * ===========================================================================
- */
diff --git a/algo/blast/core/blast_psi_priv.h b/algo/blast/core/blast_psi_priv.h
index a2078347..a8e04ffc 100644
--- a/algo/blast/core/blast_psi_priv.h
+++ b/algo/blast/core/blast_psi_priv.h
@@ -1,4 +1,4 @@
-/* $Id: blast_psi_priv.h,v 1.33 2006/11/22 15:35:17 papadopo Exp $
+/* $Id: blast_psi_priv.h,v 1.34 2007/12/07 18:25:42 kazimird Exp $
* ===========================================================================
*
* PUBLIC DOMAIN NOTICE
@@ -347,6 +347,8 @@ _PSISequenceWeightsFree(_PSISequenceWeights* seq_weights);
#define PSIERR_STARTINGGAP (-10)
/** Found flanking gap at end of alignment */
#define PSIERR_ENDINGGAP (-11)
+/** Unknown error */
+#define PSIERR_UNKNOWN (-255)
/****************************************************************************/
/* Function prototypes for the various stages of the PSSM generation engine */
@@ -412,6 +414,8 @@ _PSIComputeSequenceWeights(const _PSIMsa* msa,
* @param aligned_blocks data structure describing the aligned blocks'
* properties for each position of the multiple sequence alignment [in]
* @param pseudo_count pseudo count constant [in]
+ * @param nsg_compatibility_mode set to true to emulate the structure group's
+ * use of PSSM engine in the cddumper application. By default should be FALSE
* @param internal_pssm PSSM being computed [out]
* @return PSIERR_BADPARAM if arguments are NULL, PSI_SUCCESS otherwise
*/
@@ -421,6 +425,7 @@ _PSIComputeFreqRatios(const _PSIMsa* msa,
const BlastScoreBlk* sbp,
const _PSIAlignedBlock* aligned_blocks,
Int4 pseudo_count,
+ Boolean nsg_compatibility_mode,
_PSIInternalPssmData* internal_pssm);
/** Converts the PSSM's frequency ratios obtained in the previous stage to a
@@ -625,126 +630,4 @@ _PSIValidateMSA_StructureGroup(const _PSIMsa* msa);
}
#endif
-
-/*
- * ===========================================================================
- *
- * $Log: blast_psi_priv.h,v $
- * Revision 1.33 2006/11/22 15:35:17 papadopo
- * doxygen fixes
- *
- * Revision 1.32 2006/11/21 17:07:38 papadopo
- * rearrange headers
- *
- * Revision 1.31 2006/11/14 15:37:19 camacho
- * PSSM engine performance optimizations
- *
- * Revision 1.30 2006/04/19 19:16:49 camacho
- * Refactoring of structure group customization and addition of validation
- *
- * Revision 1.29 2005/05/24 12:49:24 camacho
- * doxygen fix
- *
- * Revision 1.28 2005/05/10 16:07:51 camacho
- * Changed *_ENCODING #defines to EBlastEncoding enumeration
- *
- * Revision 1.27 2005/03/23 14:04:24 camacho
- * doxygen fix
- *
- * Revision 1.26 2005/03/22 15:35:10 camacho
- * Fix to enable backwards compatibility with old PSSM engine when the query is
- * the only sequence aligned for a given column of the multiple sequence
- * alignment.
- *
- * Revision 1.25 2005/02/28 13:40:11 camacho
- * Minor doxygen fix
- *
- * Revision 1.24 2005/02/23 17:24:41 camacho
- * 1. Moved prototype of _PSIUpdateLambdaK to blast_psi_priv.h
- * 2. Removed unneeded fields from Kappa_compactSearchItems
- * 3. Doxygen fixes
- *
- * Revision 1.23 2005/02/22 22:49:34 camacho
- * + impala_scaling_factor, first cut
- *
- * Revision 1.22 2005/01/31 16:50:21 camacho
- * 1. Moved constants to private header.
- * 2. Changed signature of functions to copy matrices.
- *
- * Revision 1.21 2004/12/13 22:26:59 camacho
- * Consolidated structure group customizations in option: nsg_compatibility_mode
- *
- * Revision 1.20 2004/12/08 15:06:02 camacho
- * Call _PSIUpdatePositionCounts is needed after purging query sequence for
- * structure group customization, thus this function has been changed to reset the
- * appropriate _PSIMsa fields so that residue counts/aligned sequences are
- * reported accurately.
- *
- * Revision 1.19 2004/12/07 22:07:34 camacho
- * Add sanity checks for purge identity threshold
- *
- * Revision 1.18 2004/11/26 14:22:54 camacho
- * doxygen fixes
- *
- * Revision 1.17 2004/11/22 14:38:48 camacho
- * + option to set % identity threshold to PSSM engine
- *
- * Revision 1.16 2004/11/18 16:25:32 camacho
- * Rename _PSIGetStandardProbabilities to BLAST_GetStandardAaProbabilities
- *
- * Revision 1.15 2004/11/02 20:37:30 camacho
- * Doxygen fixes
- *
- * Revision 1.14 2004/10/18 14:33:14 camacho
- * 1. Added validation routines
- * 2. Fixed bug in calculating sequence weights
- * 3. Expanded error codes
- *
- * Revision 1.13 2004/08/31 16:13:28 camacho
- * Documentation changes
- *
- * Revision 1.12 2004/08/04 20:18:26 camacho
- * 1. Renaming of structures and functions that pertain to the internals of PSSM
- * engine.
- * 2. Updated documentation (in progress)
- *
- * Revision 1.11 2004/08/02 13:25:49 camacho
- * 1. Various renaming of structures, in progress
- * 2. Addition of PSIDiagnostics structures, in progress
- *
- * Revision 1.10 2004/07/29 19:16:02 camacho
- * Moved PSIExtractQuerySequenceInfo
- *
- * Revision 1.9 2004/07/22 19:05:58 camacho
- * 1. Removed information content from _PSISequenceWeights structure.
- * 2. Added functions to calculate information content.
- *
- * Revision 1.8 2004/07/02 17:57:57 camacho
- * Made _PSIUpdatePositionCounts non-static
- *
- * Revision 1.7 2004/06/21 12:52:44 camacho
- * Replace PSI_ALPHABET_SIZE for BLASTAA_SIZE
- *
- * Revision 1.6 2004/06/17 20:46:59 camacho
- * doxygen fixes
- *
- * Revision 1.5 2004/06/09 14:20:30 camacho
- * Updated comments
- *
- * Revision 1.4 2004/05/28 16:00:10 camacho
- * + first port of PSSM generation engine
- *
- * Revision 1.3 2004/05/06 14:01:40 camacho
- * + _PSICopyDoubleMatrix
- *
- * Revision 1.2 2004/04/07 21:43:47 camacho
- * Removed unneeded #include directive
- *
- * Revision 1.1 2004/04/07 19:11:17 camacho
- * Initial revision
- *
- *
- * ===========================================================================
- */
-
#endif /* !ALGO_BLAST_CORE__BLAST_PSI_PRIV__H */
diff --git a/algo/blast/core/blast_query_info.h b/algo/blast/core/blast_query_info.h
index 8da94ef9..c799e3ce 100644
--- a/algo/blast/core/blast_query_info.h
+++ b/algo/blast/core/blast_query_info.h
@@ -1,4 +1,4 @@
-/* $Id: blast_query_info.h,v 1.4 2006/11/21 16:44:39 papadopo Exp $
+/* $Id: blast_query_info.h,v 1.5 2007/12/20 22:55:46 kazimird Exp $
* ===========================================================================
*
* PUBLIC DOMAIN NOTICE
@@ -101,6 +101,7 @@ Int4 Blast_GetQueryIndexFromContext(Int4 context, EBlastProgramType program);
* (query_index < BlastQueryInfo::num_queries) [in]
* @return the search space of the query sequence requested or 0 if this is not
* set */
+NCBI_XBLAST_EXPORT
Int8
BlastQueryInfoGetEffSearchSpace(const BlastQueryInfo* qinfo,
EBlastProgramType program,
@@ -113,6 +114,7 @@ BlastQueryInfoGetEffSearchSpace(const BlastQueryInfo* qinfo,
* (query_index < BlastQueryInfo::num_queries) [in]
* @param eff_searchsp the effective search space to use [in]
*/
+NCBI_XBLAST_EXPORT
void
BlastQueryInfoSetEffSearchSpace(BlastQueryInfo* qinfo,
EBlastProgramType program,
@@ -127,6 +129,7 @@ BlastQueryInfoSetEffSearchSpace(BlastQueryInfo* qinfo,
* (query_index < BlastQueryInfo::num_queries) [in]
* @return the length of the query sequence requested
*/
+NCBI_XBLAST_EXPORT
Int4 BlastQueryInfoGetQueryLength(const BlastQueryInfo* qinfo,
EBlastProgramType program,
Int4 query_index);
@@ -166,6 +169,7 @@ Int4 BSearchContextInfo(Int4 n, const BlastQueryInfo * A);
* @param qinfo Query info structure. [in/out]
* @return Number of bytes for all queries and inter-query marks.
*/
+NCBI_XBLAST_EXPORT
Uint4
QueryInfo_GetSeqBufLen(const BlastQueryInfo* qinfo);
diff --git a/algo/blast/core/blast_seg.h b/algo/blast/core/blast_seg.h
index 7c02d818..70f2a1b5 100644
--- a/algo/blast/core/blast_seg.h
+++ b/algo/blast/core/blast_seg.h
@@ -1,4 +1,4 @@
-/* $Id: blast_seg.h,v 1.17 2006/11/21 16:45:08 papadopo Exp $
+/* $Id: blast_seg.h,v 1.18 2007/11/28 15:55:56 kazimird Exp $
* ===========================================================================
*
* PUBLIC DOMAIN NOTICE
@@ -38,11 +38,11 @@
#include <algo/blast/core/ncbi_std.h>
#include <algo/blast/core/blast_def.h>
+
#ifdef __cplusplus
extern "C" {
#endif
-
/** Structure to hold parameters for seg search.
*/
typedef struct SegParameters
@@ -60,11 +60,13 @@ typedef struct SegParameters
/** Allocated SeqParameter struct for proteins and fills with default values.
* @return pointer to SegParameters
*/
+NCBI_XBLAST_EXPORT
SegParameters* SegParametersNewAa (void);
/** Free SegParameters structure
* @param sparamsp object to be freed [in]
*/
+NCBI_XBLAST_EXPORT
void SegParametersFree(SegParameters* sparamsp);
/** Runs seg on a protein sequence in ncbistdaa.
@@ -76,6 +78,7 @@ void SegParametersFree(SegParameters* sparamsp);
* @param seg_locs resulting locations for filtering [out]
* @return zero on success
*/
+NCBI_XBLAST_EXPORT
Int2 SeqBufferSeg (Uint1* sequence, Int4 length, Int4 offset,
SegParameters* sparamsp, BlastSeqLoc** seg_locs);
diff --git a/algo/blast/core/blast_seqsrc.c b/algo/blast/core/blast_seqsrc.c
index 77d62e70..d90c2d56 100644
--- a/algo/blast/core/blast_seqsrc.c
+++ b/algo/blast/core/blast_seqsrc.c
@@ -1,4 +1,4 @@
-/* $Id: blast_seqsrc.c,v 1.34 2007/05/15 15:55:30 kazimird Exp $
+/* $Id: blast_seqsrc.c,v 1.35 2008/02/14 15:55:42 kazimird Exp $
* ===========================================================================
*
* PUBLIC DOMAIN NOTICE
@@ -36,7 +36,7 @@
#ifndef SKIP_DOXYGEN_PROCESSING
#ifndef SKIP_DOXYGEN_PROCESSING
static char const rcsid[] =
- "$Id: blast_seqsrc.c,v 1.34 2007/05/15 15:55:30 kazimird Exp $";
+ "$Id: blast_seqsrc.c,v 1.35 2008/02/14 15:55:42 kazimird Exp $";
#endif /* SKIP_DOXYGEN_PROCESSING */
#endif
@@ -259,8 +259,6 @@ BlastSeqSrcReleaseSequence(const BlastSeqSrc* seq_src,
#ifdef KAPPA_PRINT_DIAGNOSTICS
static const size_t kInitialGiListSize = 10;
-const Int2 kBadParameter = -1;
-const Int2 kOutOfMemory = -2;
Blast_GiList*
Blast_GiListNew(void)
@@ -280,7 +278,7 @@ Blast_GiListNewEx(size_t list_size)
if ( !retval->data ) {
return Blast_GiListFree(retval);
}
- retval->num_allocated = kInitialGiListSize;
+ retval->num_allocated = list_size;
return retval;
}
diff --git a/algo/blast/core/blast_seqsrc.h b/algo/blast/core/blast_seqsrc.h
index ca4a6d48..bf626984 100644
--- a/algo/blast/core/blast_seqsrc.h
+++ b/algo/blast/core/blast_seqsrc.h
@@ -1,4 +1,4 @@
-/* $Id: blast_seqsrc.h,v 1.47 2007/05/08 13:25:30 kazimird Exp $
+/* $Id: blast_seqsrc.h,v 1.48 2007/08/28 17:25:29 kazimird Exp $
* ===========================================================================
*
* PUBLIC DOMAIN NOTICE
@@ -195,12 +195,22 @@ typedef struct BlastSeqSrcGetSeqArg {
* eBlastEncodingNucleotide, etc [in] */
EBlastEncoding encoding;
- /** Specify true here to disable this OID's ranges before fetching.
+ /** Specify true here to disable this OID's ranges before
+ * fetching. OID ranges are a (somewhat complicated) performance
+ * feature that allows less nucleotide unpacking to be done in
+ * some cases. If in doubt, specify FALSE here.
* TRUE to disable ranges, FALSE to use them if they exist [in] */
Boolean enable_ranges;
- /** Sequence to return, if NULL, it should allocated by GetSeqBlkFnPtr, else
- * its contents are freed and the structure is reused [out]*/
+ /** Check whether an OID is excluded due to overlapping filtering.
+ * The disease is rare, and the test for it is somewhat expensive,
+ * so it is deferred to the traceback stage.
+ * TRUE to disable ranges, FALSE to use them if they exist [in] */
+ Boolean check_oid_exclusion;
+
+ /** Sequence to return, if NULL, it should allocated by GetSeqBlkFnPtr
+ * (using BlastSeqBlkNew or BlastSetUp_SeqBlkNew), else its contents are
+ * freed (using BlastSequenceBlkClean) and the structure is reused [out]*/
BLAST_SequenceBlk* seq;
} BlastSeqSrcGetSeqArg;
@@ -220,7 +230,7 @@ Int2
BlastSeqSrcGetSequence(const BlastSeqSrc* seq_src,
void* sequence);
-/** Retrieve sequence length.
+/** Retrieve sequence length (number of residues/bases)
* @param seq_src the BLAST sequence source [in]
* @param oid ordinal id of the sequence desired (should be Uint4) [in]
*/
diff --git a/algo/blast/core/blast_setup.h b/algo/blast/core/blast_setup.h
index 70e6275c..0772062a 100644
--- a/algo/blast/core/blast_setup.h
+++ b/algo/blast/core/blast_setup.h
@@ -1,4 +1,4 @@
-/* $Id: blast_setup.h,v 1.64 2007/04/26 20:55:30 kazimird Exp $
+/* $Id: blast_setup.h,v 1.65 2007/12/20 22:55:46 kazimird Exp $
* ===========================================================================
*
* PUBLIC DOMAIN NOTICE
@@ -211,6 +211,7 @@ Int2 BlastSetup_ScoreBlkInit(BLAST_SequenceBlk* query_blk,
* @param from Starting offset of a sequence interval [in]
* @param to Ending offset of a sequence interval [in]
*/
+NCBI_XBLAST_EXPORT
void
BlastSeqLoc_RestrictToInterval(BlastSeqLoc* *mask, Int4 from, Int4 to);
@@ -226,6 +227,7 @@ BlastSeqLoc_RestrictToInterval(BlastSeqLoc* *mask, Int4 from, Int4 to);
* @param blast_message will be filled in if pattern not found on query [in][out]
* @return Status, 0 on success, -1 on error.
*/
+NCBI_XBLAST_EXPORT
Int2
Blast_SetPHIPatternInfo(EBlastProgramType program,
const SPHIPatternSearchBlk * pattern_blk,
@@ -239,6 +241,7 @@ Blast_SetPHIPatternInfo(EBlastProgramType program,
* @note In the case of a Blast2Sequences search, this function assumes a
* single sequence and returns the length of the first sequence only
*/
+NCBI_XBLAST_EXPORT
void
BLAST_GetSubjectTotals(const BlastSeqSrc* seqsrc,
Int8* total_length,
diff --git a/algo/blast/core/blast_stat.c b/algo/blast/core/blast_stat.c
index 25a3a764..99c37e44 100644
--- a/algo/blast/core/blast_stat.c
+++ b/algo/blast/core/blast_stat.c
@@ -1,4 +1,4 @@
-/* $Id: blast_stat.c,v 1.157 2007/05/22 20:55:36 kazimird Exp $
+/* $Id: blast_stat.c,v 1.158 2007/09/24 14:55:29 kazimird Exp $
* ===========================================================================
*
* PUBLIC DOMAIN NOTICE
@@ -50,7 +50,7 @@
#ifndef SKIP_DOXYGEN_PROCESSING
static char const rcsid[] =
- "$Id: blast_stat.c,v 1.157 2007/05/22 20:55:36 kazimird Exp $";
+ "$Id: blast_stat.c,v 1.158 2007/09/24 14:55:29 kazimird Exp $";
#endif /* SKIP_DOXYGEN_PROCESSING */
#include <algo/blast/core/blast_stat.h>
@@ -2491,7 +2491,16 @@ Blast_ScoreBlkKbpUngappedCalc(EBlastProgramType program,
stdrfp = Blast_ResFreqFree(stdrfp);
if (valid_context == FALSE)
- status = 1; /* Not a single context was valid. */
+ { /* No valid contexts were found. */
+ /* Message for non-translated search issued above. */
+ if (Blast_QueryIsTranslated(program) ) {
+ Blast_MessageWrite(blast_message, eBlastSevWarning, kBlastMessageNoContext,
+ "Could not calculate ungapped Karlin-Altschul parameters due "
+ "to an invalid query sequence or its translation. Please verify the "
+ "query sequence(s) and/or filtering options");
+ }
+ status = 1; /* Not a single context was valid. */
+ }
/* Set ungapped Blast_KarlinBlk* alias */
sbp->kbp = Blast_QueryIsPssm(program) ? sbp->kbp_psi : sbp->kbp_std;
diff --git a/algo/blast/core/blast_traceback.c b/algo/blast/core/blast_traceback.c
index 1605621f..33526f9d 100644
--- a/algo/blast/core/blast_traceback.c
+++ b/algo/blast/core/blast_traceback.c
@@ -1,4 +1,4 @@
-/* $Id: blast_traceback.c,v 1.204 2007/07/27 18:25:30 kazimird Exp $
+/* $Id: blast_traceback.c,v 1.206 2007/12/07 18:25:42 kazimird Exp $
* ===========================================================================
*
* PUBLIC DOMAIN NOTICE
@@ -50,7 +50,7 @@
#ifndef SKIP_DOXYGEN_PROCESSING
static char const rcsid[] =
- "$Id: blast_traceback.c,v 1.204 2007/07/27 18:25:30 kazimird Exp $";
+ "$Id: blast_traceback.c,v 1.206 2007/12/07 18:25:42 kazimird Exp $";
#endif /* SKIP_DOXYGEN_PROCESSING */
#include <algo/blast/core/blast_traceback.h>
@@ -455,7 +455,7 @@ Blast_TracebackFromHSPList(EBlastProgramType program_number,
query_info->contexts[hsp->context].query_offset;
query_length = query_info->contexts[hsp->context].query_length;
}
-
+
/* preliminary RPS blast alignments have not had
the composition-based correction applied yet, so
we cannot reliably check whether an HSP is contained
@@ -1200,6 +1200,8 @@ BLAST_ComputeTraceback(EBlastProgramType program_number,
seq_arg.oid = batch->hsplist_array[0]->oid;
seq_arg.encoding = encoding;
seq_arg.enable_ranges = kSubjectRanges;
+ seq_arg.check_oid_exclusion = TRUE;
+
BlastSequenceBlkClean(seq_arg.seq);
if (BlastSeqSrcGetSequence(seq_src, (void*) &seq_arg) < 0) {
Blast_HSPStreamResultBatchReset(batch);
@@ -1314,7 +1316,7 @@ BLAST_ComputeTraceback(EBlastProgramType program_number,
} /* loop over all batches */
- Blast_HSPStreamResultBatchFree(batch);
+ batch = Blast_HSPStreamResultBatchFree(batch);
BlastSequenceBlkFree(seq_arg.seq);
}
diff --git a/algo/blast/core/hspstream_collector.c b/algo/blast/core/hspstream_collector.c
index e10be08c..d6a2ce04 100644
--- a/algo/blast/core/hspstream_collector.c
+++ b/algo/blast/core/hspstream_collector.c
@@ -1,4 +1,4 @@
-/* $Id: hspstream_collector.c,v 1.19 2007/07/27 18:25:30 kazimird Exp $
+/* $Id: hspstream_collector.c,v 1.22 2008/02/14 15:55:42 kazimird Exp $
* ===========================================================================
*
* PUBLIC DOMAIN NOTICE
@@ -34,7 +34,7 @@
#ifndef SKIP_DOXYGEN_PROCESSING
static char const rcsid[] =
- "$Id: hspstream_collector.c,v 1.19 2007/07/27 18:25:30 kazimird Exp $";
+ "$Id: hspstream_collector.c,v 1.22 2008/02/14 15:55:42 kazimird Exp $";
#endif /* SKIP_DOXYGEN_PROCESSING */
@@ -50,11 +50,18 @@ static char const rcsid[] =
static BlastHSPStream*
s_BlastHSPListCollectorFree(BlastHSPStream* hsp_stream)
{
+ int index=0;
BlastHSPListCollectorData* stream_data =
(BlastHSPListCollectorData*) GetData(hsp_stream);
stream_data->x_lock = MT_LOCK_Delete(stream_data->x_lock);
SBlastHitsParametersFree(stream_data->blasthit_params);
Blast_HSPResultsFree(stream_data->results);
+ for (index=0; index < stream_data->num_hsplists; index++)
+ {
+ stream_data->sorted_hsplists[index] =
+ Blast_HSPListFree(stream_data->sorted_hsplists[index]);
+ }
+ sfree(stream_data->sort_by_score);
sfree(stream_data->sorted_hsplists);
sfree(stream_data);
sfree(hsp_stream);
@@ -90,6 +97,19 @@ s_BlastHSPListCollectorClose(BlastHSPStream* hsp_stream)
if (stream_data->results == NULL || stream_data->results_sorted)
return;
+ if (stream_data->sort_by_score) {
+ if (stream_data->sort_by_score->sort_on_read) {
+ Blast_HSPResultsReverseSort(stream_data->results);
+ } else {
+ /* Reverse the order of HSP lists, because they will be returned
+ starting from end, for the sake of convenience */
+ Blast_HSPResultsReverseOrder(stream_data->results);
+ }
+ stream_data->results_sorted = TRUE;
+ stream_data->x_lock = MT_LOCK_Delete(stream_data->x_lock);
+ return;
+ }
+
results = stream_data->results;
num_hsplists = stream_data->num_hsplists;
@@ -168,13 +188,47 @@ s_BlastHSPListCollectorRead(BlastHSPStream* hsp_stream,
if (!stream_data->results_sorted)
s_BlastHSPListCollectorClose(hsp_stream);
- /* return the next HSPlist out of the collection stored */
+ if (stream_data->sort_by_score) {
+ Int4 last_hsplist_index = -1, index = 0;
+ BlastHitList* hit_list = NULL;
+ BlastHSPResults* results = stream_data->results;
+
+ /* Find index of the first query that has results. */
+ for (index = stream_data->sort_by_score->first_query_index;
+ index < results->num_queries; ++index) {
+ if (results->hitlist_array[index] &&
+ results->hitlist_array[index]->hsplist_count > 0)
+ break;
+ }
+ if (index >= results->num_queries)
+ return kBlastHSPStream_Eof;
+
+ stream_data->sort_by_score->first_query_index = index;
+
+ hit_list = results->hitlist_array[index];
+ last_hsplist_index = hit_list->hsplist_count - 1;
+
+ *hsp_list_out = hit_list->hsplist_array[last_hsplist_index];
+ /* Assign the query index here so the caller knows which query this HSP
+ list comes from */
+ (*hsp_list_out)->query_index = index;
+ /* Dequeue this HSP list by decrementing the HSPList count */
+ --hit_list->hsplist_count;
+ if (hit_list->hsplist_count == 0) {
+ /* Advance the first query index, without checking that the next
+ * query has results - that will be done on the next call. */
+ ++stream_data->sort_by_score->first_query_index;
+ }
+ } else {
+ /* return the next HSPlist out of the collection stored */
- if (!stream_data->num_hsplists)
- return kBlastHSPStream_Eof;
+ if (!stream_data->num_hsplists)
+ return kBlastHSPStream_Eof;
- *hsp_list_out = stream_data->sorted_hsplists[--stream_data->num_hsplists];
+ *hsp_list_out =
+ stream_data->sorted_hsplists[--stream_data->num_hsplists];
+ }
return kBlastHSPStream_Success;
}
@@ -355,6 +409,16 @@ fprintf(stderr, "No hits to query %d\n", global_query);
SplitQueryBlk_GetChunkOverlapSize(squery_blk));
}
+ /* Sort to the canonical order, which the merge may not have done. */
+ for (i = 0; i < results2->num_queries; i++) {
+ BlastHitList *hitlist = results2->hitlist_array[i];
+ if (hitlist == NULL)
+ continue;
+
+ for (j = 0; j < hitlist->hsplist_count; j++)
+ Blast_HSPListSortByScore(hitlist->hsplist_array[j]);
+ }
+
stream2->results_sorted = FALSE;
#if _DEBUG_VERBOSE
@@ -471,6 +535,8 @@ s_BlastHSPListCollectorNew(BlastHSPStream* hsp_stream, void* args)
BlastHSPStream*
Blast_HSPListCollectorInitMT(EBlastProgramType program,
SBlastHitsParameters* blasthit_params,
+ const BlastExtensionOptions* extn_opts,
+ Boolean sort_on_read,
Int4 num_queries, MT_LOCK lock)
{
BlastHSPListCollectorData* stream_data =
@@ -488,6 +554,18 @@ Blast_HSPListCollectorInitMT(EBlastProgramType program,
stream_data->results = Blast_HSPResultsNew(num_queries);
stream_data->results_sorted = FALSE;
+
+ /* This is needed to meet a pre-condition of the composition-based
+ * statistics code */
+ if ((Blast_QueryIsProtein(program) || Blast_QueryIsPssm(program)) &&
+ extn_opts->compositionBasedStats != 0) {
+ stream_data->sort_by_score =
+ (SSortByScoreStruct*)calloc(0, sizeof(SSortByScoreStruct));
+ stream_data->sort_by_score->sort_on_read = sort_on_read;
+ stream_data->sort_by_score->first_query_index = 0;
+ } else {
+ stream_data->sort_by_score = NULL;
+ }
stream_data->x_lock = lock;
info.constructor = &s_BlastHSPListCollectorNew;
@@ -499,9 +577,11 @@ Blast_HSPListCollectorInitMT(EBlastProgramType program,
BlastHSPStream*
Blast_HSPListCollectorInit(EBlastProgramType program,
SBlastHitsParameters* blasthit_params,
+ const BlastExtensionOptions* extn_opts,
+ Boolean sort_on_read,
Int4 num_queries)
{
- return Blast_HSPListCollectorInitMT(program, blasthit_params,
- num_queries, NULL);
+ return Blast_HSPListCollectorInitMT(program, blasthit_params, extn_opts,
+ sort_on_read, num_queries, NULL);
}
diff --git a/algo/blast/core/hspstream_collector.h b/algo/blast/core/hspstream_collector.h
index df076c96..e7cc5bc8 100644
--- a/algo/blast/core/hspstream_collector.h
+++ b/algo/blast/core/hspstream_collector.h
@@ -1,4 +1,4 @@
-/* $Id: hspstream_collector.h,v 1.9 2007/07/27 18:25:30 kazimird Exp $
+/* $Id: hspstream_collector.h,v 1.10 2008/02/14 15:55:42 kazimird Exp $
* ===========================================================================
*
* PUBLIC DOMAIN NOTICE
@@ -46,6 +46,15 @@
extern "C" {
#endif
+/** Auxiliary structure to allow sorting the results by score for the
+ * composition-based statistics code */
+typedef struct SSortByScoreStruct {
+ Boolean sort_on_read; /**< Should the results be sorted on the first read
+ call? */
+ Int4 first_query_index; /**< Index of the first query to try getting
+ results from */
+} SSortByScoreStruct;
+
/** Default implementation of BlastHSPStream */
typedef struct BlastHSPListCollectorData {
EBlastProgramType program; /**< BLAST program type */
@@ -59,6 +68,10 @@ typedef struct BlastHSPListCollectorData {
BlastHSPResults* results;/**< Structure for saving HSP lists */
Boolean results_sorted; /**< Have the results already been sorted?
Set to true after the first read call. */
+ /**< Non-NULL if the results should be sorted by score as opposed to subject
+ * OID. This is necessary to meet a pre-condition of the composition-based
+ * statistics processing */
+ SSortByScoreStruct* sort_by_score;
MT_LOCK x_lock; /**< Mutex for writing and reading results. */
} BlastHSPListCollectorData;
@@ -67,6 +80,10 @@ typedef struct BlastHSPListCollectorData {
* locking facility must be instantiated before this function is called.
* @param program Type of BlAST program [in]
* @param blasthit_params Specifies how many hits to save etc. [in]
+ * @param extn_opts Extension options to determine composition-based statistics
+ * mode [in]
+ * @param sort_on_read Should results be sorted on the first read call? Only
+ * applicable if composition-based statistics is on [in]
* @param num_queries Number of query sequences in this BLAST search [in]
* @param lock Pointer to locking structure for writing by multiple
* threads. Locking will not be performed if NULL. [in]
@@ -74,17 +91,25 @@ typedef struct BlastHSPListCollectorData {
BlastHSPStream*
Blast_HSPListCollectorInitMT(EBlastProgramType program,
SBlastHitsParameters* blasthit_params,
+ const BlastExtensionOptions* extn_opts,
+ Boolean sort_on_read,
Int4 num_queries, MT_LOCK lock);
/** Initialize the collector HSP stream for a single-threaded search, i.e.
* no locking is done when reading/writing from/to the stream.
* @param program Type of BlAST program [in]
* @param blasthit_params Specifies how many hits to save etc. [in]
+ * @param extn_opts Extension options to determine composition-based statistics
+ * mode [in]
+ * @param sort_on_read Should results be sorted on the first read call? Only
+ * applicable if composition-based statistics is on [in]
* @param num_queries Number of query sequences in this BLAST search [in]
*/
BlastHSPStream*
Blast_HSPListCollectorInit(EBlastProgramType program,
SBlastHitsParameters* blasthit_params,
+ const BlastExtensionOptions* extn_opts,
+ Boolean sort_on_read,
Int4 num_queries);
#ifdef __cplusplus
diff --git a/algo/blast/core/lookup_wrap.c b/algo/blast/core/lookup_wrap.c
index a1d835f3..1759c3a1 100644
--- a/algo/blast/core/lookup_wrap.c
+++ b/algo/blast/core/lookup_wrap.c
@@ -1,4 +1,4 @@
-/* $Id: lookup_wrap.c,v 1.30 2007/03/07 19:25:34 kazimird Exp $
+/* $Id: lookup_wrap.c,v 1.31 2008/01/31 23:55:42 kazimird Exp $
* ===========================================================================
*
* PUBLIC DOMAIN NOTICE
@@ -37,7 +37,7 @@
#ifndef SKIP_DOXYGEN_PROCESSING
static char const rcsid[] =
- "$Id: lookup_wrap.c,v 1.30 2007/03/07 19:25:34 kazimird Exp $";
+ "$Id: lookup_wrap.c,v 1.31 2008/01/31 23:55:42 kazimird Exp $";
#endif /* SKIP_DOXYGEN_PROCESSING */
#include <algo/blast/core/lookup_wrap.h>
@@ -51,6 +51,7 @@ static char const rcsid[] =
Int2 LookupTableWrapInit(BLAST_SequenceBlk* query,
const LookupTableOptions* lookup_options,
+ const QuerySetUpOptions* query_options,
BlastSeqLoc* lookup_segments, BlastScoreBlk* sbp,
LookupTableWrap** lookup_wrap_ptr, const BlastRPSInfo *rps_info,
Blast_Message* *error_msg)
@@ -120,7 +121,7 @@ Int2 LookupTableWrapInit(BLAST_SequenceBlk* query,
else if (lookup_wrap->lut_type == eSmallNaLookupTable) {
status = BlastSmallNaLookupTableNew(query, lookup_segments,
(BlastSmallNaLookupTable* *) &(lookup_wrap->lut),
- lookup_options, lut_width);
+ lookup_options, query_options, lut_width);
if (status != 0) {
lookup_wrap->lut_type = eNaLookupTable;
status = BlastNaLookupTableNew(query, lookup_segments,
diff --git a/algo/blast/core/lookup_wrap.h b/algo/blast/core/lookup_wrap.h
index 614b63c5..98b4cde5 100644
--- a/algo/blast/core/lookup_wrap.h
+++ b/algo/blast/core/lookup_wrap.h
@@ -1,4 +1,4 @@
-/* $Id: lookup_wrap.h,v 1.16 2006/11/21 16:50:02 papadopo Exp $
+/* $Id: lookup_wrap.h,v 1.18 2008/01/31 23:55:42 kazimird Exp $
* ===========================================================================
*
* PUBLIC DOMAIN NOTICE
@@ -62,13 +62,16 @@ typedef struct LookupTableWrap {
* @param rps_info Structure containing RPS blast setup information [in]
* @param error_msg message with warning or errors [in|out]
*/
+NCBI_XBLAST_EXPORT
Int2 LookupTableWrapInit(BLAST_SequenceBlk* query,
const LookupTableOptions* lookup_options,
+ const QuerySetUpOptions* query_options,
BlastSeqLoc* lookup_segments, BlastScoreBlk* sbp,
LookupTableWrap** lookup_wrap_ptr, const BlastRPSInfo *rps_info,
Blast_Message* *error_msg);
/** Deallocate memory for the lookup table */
+NCBI_XBLAST_EXPORT
LookupTableWrap* LookupTableWrapFree(LookupTableWrap* lookup);
/** Default size of offset arrays filled in a single ScanSubject call. */
@@ -77,6 +80,7 @@ LookupTableWrap* LookupTableWrapFree(LookupTableWrap* lookup);
/** Determine the size of the offsets arrays to be filled by
* the ScanSubject function.
*/
+NCBI_XBLAST_EXPORT
Int4 GetOffsetArraySize(LookupTableWrap* lookup);
#ifdef __cplusplus
diff --git a/algo/blast/core/na_ungapped.c b/algo/blast/core/na_ungapped.c
index 2d65821c..1421ad5f 100644
--- a/algo/blast/core/na_ungapped.c
+++ b/algo/blast/core/na_ungapped.c
@@ -1,4 +1,4 @@
-/* $Id: na_ungapped.c,v 1.10 2007/03/29 20:55:30 kazimird Exp $
+/* $Id: na_ungapped.c,v 1.13 2008/01/31 23:55:42 kazimird Exp $
* ===========================================================================
*
* PUBLIC DOMAIN NOTICE
@@ -30,7 +30,7 @@
#ifndef SKIP_DOXYGEN_PROCESSING
static char const rcsid[] =
- "$Id: na_ungapped.c,v 1.10 2007/03/29 20:55:30 kazimird Exp $";
+ "$Id: na_ungapped.c,v 1.13 2008/01/31 23:55:42 kazimird Exp $";
#endif /* SKIP_DOXYGEN_PROCESSING */
#include <algo/blast/core/na_ungapped.h>
@@ -419,7 +419,7 @@ s_BlastnDiagTableExtendInitialHit(BLAST_SequenceBlk * query,
hit_ready = 1;
if (hit_ready) {
- if (word_params->options->ungapped_extension) {
+ if (word_params->ungapped_extension) {
/* Perform ungapped extension */
Int4 context = BSearchContextInfo(q_off, query_info);
cutoffs = word_params->cutoffs + context;
@@ -536,7 +536,7 @@ s_BlastnDiagHashExtendInitialHit(BLAST_SequenceBlk * query,
hit_ready = 1;
if (hit_ready) {
- if (word_params->options->ungapped_extension) {
+ if (word_params->ungapped_extension) {
/* Perform ungapped extension */
Int4 context = BSearchContextInfo(q_off, query_info);
cutoffs = word_params->cutoffs + context;
@@ -587,7 +587,7 @@ s_BlastnDiagHashExtendInitialHit(BLAST_SequenceBlk * query,
/* Save the hit if it already qualifies */
if (!two_hits) {
hit_ready = 1;
- if (word_params->options->ungapped_extension) {
+ if (word_params->ungapped_extension) {
/* Perform ungapped extension */
Int4 context = BSearchContextInfo(q_off, query_info);
cutoffs = word_params->cutoffs + context;
@@ -661,7 +661,7 @@ s_BlastNaExtendDirect(const BlastOffsetPair * offset_pairs, Int4 num_hits,
lut_word_length = lut->lut_word_length;
/* When ungapped extension is not performed, the hit will be new only
if it is more than scan_step away from the previous hit. */
- if (!word_params->options->ungapped_extension)
+ if (!word_params->ungapped_extension)
min_step = lut->scan_step;
template_length = lut->template_length;
}
@@ -669,13 +669,13 @@ s_BlastNaExtendDirect(const BlastOffsetPair * offset_pairs, Int4 num_hits,
BlastSmallNaLookupTable *lut =
(BlastSmallNaLookupTable *) lookup_wrap->lut;
lut_word_length = lut->lut_word_length;
- if (!word_params->options->ungapped_extension)
+ if (!word_params->ungapped_extension)
min_step = lut->scan_step;
}
else {
BlastNaLookupTable *lut = (BlastNaLookupTable *) lookup_wrap->lut;
lut_word_length = lut->lut_word_length;
- if (!word_params->options->ungapped_extension)
+ if (!word_params->ungapped_extension)
min_step = lut->scan_step;
}
@@ -757,7 +757,7 @@ s_BlastNaExtend(const BlastOffsetPair * offset_pairs, Int4 num_hits,
BlastMBLookupTable *lut = (BlastMBLookupTable *) lookup_wrap->lut;
word_length = lut->word_length;
lut_word_length = lut->lut_word_length;
- if (!word_params->options->ungapped_extension)
+ if (!word_params->ungapped_extension)
min_step = lut->scan_step;
template_length = lut->template_length;
}
@@ -765,7 +765,7 @@ s_BlastNaExtend(const BlastOffsetPair * offset_pairs, Int4 num_hits,
BlastNaLookupTable *lut = (BlastNaLookupTable *) lookup_wrap->lut;
word_length = lut->word_length;
lut_word_length = lut->lut_word_length;
- if (!word_params->options->ungapped_extension)
+ if (!word_params->ungapped_extension)
min_step = lut->scan_step;
}
extra_bases = word_length - lut_word_length;
@@ -908,7 +908,7 @@ s_BlastNaExtendAligned(const BlastOffsetPair * offset_pairs, Int4 num_hits,
BlastMBLookupTable *lut = (BlastMBLookupTable *) lookup_wrap->lut;
word_length = lut->word_length;
lut_word_length = lut->lut_word_length;
- if (!word_params->options->ungapped_extension)
+ if (!word_params->ungapped_extension)
min_step = lut->scan_step;
template_length = lut->template_length;
}
@@ -1098,7 +1098,7 @@ s_BlastSmallNaExtendAlignedOneByte(const BlastOffsetPair * offset_pairs,
Int4 hits_extended = 0;
Int4 min_step = 0;
- if (!word_params->options->ungapped_extension)
+ if (!word_params->ungapped_extension)
min_step = lut->scan_step;
for (i = 0; i < num_hits; i++) {
@@ -1147,10 +1147,10 @@ s_BlastSmallNaExtendAlignedOneByte(const BlastOffsetPair * offset_pairs,
subject, min_step, 0, word_params,
matrix, query_info,
ewp->hash_table,
- q_off - extended_left,
+ q_off,
s_off + lut_word_length +
extended_right,
- s_off - extended_left,
+ s_off,
init_hitlist);
}
else {
@@ -1158,16 +1158,47 @@ s_BlastSmallNaExtendAlignedOneByte(const BlastOffsetPair * offset_pairs,
subject, min_step, 0, word_params,
matrix, query_info,
ewp->diag_table,
- q_off - extended_left,
+ q_off,
s_off + lut_word_length +
extended_right,
- s_off - extended_left,
+ s_off,
init_hitlist);
}
}
return hits_extended;
}
+
+/** Check that word just found is not part of a soft-masked region.
+ * This check only happens for soft masking for certain word sizes
+ * @param locations not masked regions [in]
+ * @param offset query offset for for word [in]
+ * @param left_extend how far extended to left by mini-extension [in]
+ * @param right_extend how far extended to right by mini-extension [in]
+ */
+Boolean
+s_SmallBlastnCheckLocations(BlastSeqLoc* locations,
+ Int4 offset,
+ Int4 left_extend,
+ Int4 right_extend)
+{
+ Boolean retval = FALSE;
+ Int4 q_start = offset - left_extend;
+ Int4 q_end = offset + right_extend;
+ while (locations)
+ {
+ if ((q_end > locations->ssr->left && q_end < locations->ssr->right) ||
+ (q_start > locations->ssr->left && q_start < locations->ssr->right))
+ {
+ retval = TRUE;
+ break;
+ }
+ locations = locations->next;
+ }
+ return retval;
+
+}
+
/** Perform exact match extensions on the hits retrieved from
* small-query blastn lookup tables, assuming an arbitrary number of bases
* in a lookup and arbitrary start offset of each hit. Also
@@ -1207,7 +1238,7 @@ s_BlastSmallNaExtend(const BlastOffsetPair * offset_pairs, Int4 num_hits,
Int4 hits_extended = 0;
Int4 min_step = 0;
- if (!word_params->options->ungapped_extension)
+ if (!word_params->ungapped_extension)
min_step = lut->scan_step;
for (i = 0; i < num_hits; i++) {
@@ -1269,21 +1300,27 @@ s_BlastSmallNaExtend(const BlastOffsetPair * offset_pairs, Int4 num_hits,
if (extended_left + extended_right < word_length)
continue;
+ /* Check that the exact match was not masked out. */
+ if (word_length > lut_word_length && lut->masked_locations)
+ if (s_SmallBlastnCheckLocations(lut->masked_locations, q_off, extended_left, extended_right) == TRUE)
+ continue;
+
+
if (word_params->container_type == eDiagHash) {
hits_extended += s_BlastnDiagHashExtendInitialHit(query, subject,
min_step, 0, word_params, matrix,
query_info, ewp->hash_table,
- q_off - extended_left,
+ q_off,
s_off + extended_right,
- s_off - extended_left,
+ s_off,
init_hitlist);
} else {
hits_extended += s_BlastnDiagTableExtendInitialHit(query, subject,
min_step, 0, word_params, matrix,
query_info, ewp->diag_table,
- q_off - extended_left,
+ q_off,
s_off + extended_right,
- s_off - extended_left,
+ s_off,
init_hitlist);
}
}
@@ -1358,7 +1395,7 @@ Int2 BlastNaWordFinder(BLAST_SequenceBlk * subject,
Blast_UngappedStatsUpdate(ungapped_stats, total_hits, hits_extended,
init_hitlist->total);
- if (word_params->options->ungapped_extension)
+ if (word_params->ungapped_extension)
Blast_InitHitListSortByScore(init_hitlist);
return 0;
@@ -1394,7 +1431,7 @@ Int2 MB_IndexedWordFinder(
ASSERT(get_results);
word_size = get_results(lookup_wrap->lut, oid, chunk, init_hitlist);
- if( word_size > 0 && word_params->options->ungapped_extension ) {
+ if( word_size > 0 && word_params->ungapped_extension ) {
hash = ir_hash_create();
new_hsp = hsp = init_hitlist->init_hsp_array;
hsp_end = hsp + init_hitlist->total;
@@ -1439,7 +1476,7 @@ Int2 MB_IndexedWordFinder(
hash = ir_hash_destroy( hash );
}
- if (word_params->options->ungapped_extension)
+ if (word_params->ungapped_extension)
Blast_InitHitListSortByScore(init_hitlist);
return 0;
diff --git a/api/alignval.c b/api/alignval.c
index 546e346e..e039db2e 100644
--- a/api/alignval.c
+++ b/api/alignval.c
@@ -29,7 +29,7 @@
*
* Version Creation Date: 6/3/99
*
-* $Revision: 6.64 $
+* $Revision: 6.65 $
*
* File Description: To validate sequence alignment.
*
@@ -862,25 +862,26 @@ static void ValidateStrandInPack_DenseSeg(Pointer segs, Uint1 segtype, SeqAlignP
{
DenseSegPtr dsp=NULL;
PackSegPtr psp=NULL;
- Int2 numseg, aligndim, dimnumseg, i, j, m;
+ Int4 numseg, aligndim, dimnumseg, i, j, m;
SeqIdPtr sip=NULL, siptemp;
Uint1 strand1=0, strand2=0;
Uint1Ptr strandptr=NULL;
if(!segs)
+ {
ValMessage (salp, Err_Null_Segs, SEV_ERROR, NULL, NULL, 0);
+ }
else if(segtype==2||segtype==4)
- {
- if(segtype==2)
+ {
+ if(segtype==2)
{
dsp=(DenseSegPtr)segs;
strandptr=dsp->strands;
sip=dsp->ids;
numseg=dsp->numseg;
aligndim=dsp->dim;
- }
-
- else if(segtype==4)
+ }
+ else if(segtype==4)
{
psp=(PackSegPtr)segs;
strandptr=psp->strands;
@@ -888,44 +889,46 @@ static void ValidateStrandInPack_DenseSeg(Pointer segs, Uint1 segtype, SeqAlignP
numseg=psp->numseg;
aligndim=psp->dim;
}
- dimnumseg=numseg*aligndim;
- if(strandptr)
- {
-
+
+ dimnumseg=numseg*aligndim;
+ if(strandptr)
+ {
/*go through id for each alignment sequence*/
for(j=0; j<aligndim; j++)
- {
- /* first strand value for each sequence*/
- strand1=dsp->strands[j];
- /* go through all strand values for each sequence*/
- for(i=j+aligndim; i<dimnumseg; i=i+aligndim)
+ {
+ /* first strand value for each sequence*/
+ strand1=strandptr[j];
+ /* go through all strand values for each sequence*/
+ for(i=j+aligndim; i<dimnumseg; i=i+aligndim)
{
- strand2=dsp->strands[i];
+ strand2=strandptr[i];
if(strand1==0||strand1==255)
- {
- strand1=strand2;
- continue;
- }
+ {
+ strand1=strand2;
+ continue;
+ }
/*skip undefined strand*/
- if(strand2!=0&&strand2!=255)
+ if(strand2!=0&&strand2!=255)
+ {
/*strand should be same for a given seq*/
if(strand1!=strand2)
- {
- /*find current seqid*/
-
- siptemp=sip;
- for(m=0; m<j&&siptemp!=NULL; m++)
- siptemp=siptemp->next;
- ValMessage (salp, Err_Strand_Rev, SEV_ERROR, siptemp, sip, i/aligndim+1);
-
+ {
+ /*find current seqid*/
+ siptemp=sip;
+ for(m=0; m<j&&siptemp!=NULL; m++)
+ {
+ siptemp=siptemp->next;
}
+ ValMessage (salp, Err_Strand_Rev, SEV_ERROR, siptemp, sip, i/aligndim+1);
+ }
+ }
}
- }
- }
+ }
}
+ }
}
diff --git a/api/asn2gnb1.c b/api/asn2gnb1.c
index 4fe9828a..dd83ce73 100644
--- a/api/asn2gnb1.c
+++ b/api/asn2gnb1.c
@@ -28,11 +28,11 @@
* Author: Karl Sirotkin, Tom Madden, Tatiana Tatusov, Jonathan Kans,
* Mati Shomrat
*
-* $Id: asn2gnb1.c,v 1.135 2007/08/23 15:40:43 ludwigf Exp $
+* $Id: asn2gnb1.c,v 1.139 2007/12/04 18:55:29 kans Exp $
*
* Version Creation Date: 10/21/98
*
-* $Revision: 1.135 $
+* $Revision: 1.139 $
*
* File Description: New GenBank flatfile generator - work in progress
*
@@ -1020,7 +1020,9 @@ NLM_EXTERN void FFTrim (
NLM_EXTERN int FFNextChar(
StringItemPtr start_sip,
- Int4 start_pos) {
+ Int4 start_pos
+)
+{
if (start_pos < start_sip->pos-1) {
return start_sip->buf[start_pos+1];
}
@@ -1034,7 +1036,8 @@ NLM_EXTERN int FFNextChar(
NLM_EXTERN void FFAdvanceChar(
StringItemPtr* start_sip,
- Int4* start_pos )
+ Int4* start_pos
+)
{
if (*start_pos < (*start_sip)->pos-1) {
++(*start_pos);
@@ -2623,8 +2626,8 @@ NLM_EXTERN void DoOneBioseq (
if (bsp->idx.parenttype == OBJ_BIOSEQSET) {
bssp = (BioseqSetPtr) bsp->idx.parentptr;
if (bssp != NULL && bssp->_class == BioseqseqSet_class_nuc_prot) {
- if (bsp->idx.parenttype == OBJ_BIOSEQSET) {
- bssp = (BioseqSetPtr) bsp->idx.parentptr;
+ if (bssp->idx.parenttype == OBJ_BIOSEQSET) {
+ bssp = (BioseqSetPtr) bssp->idx.parentptr;
if (bssp != NULL && bssp->_class == BioseqseqSet_class_gen_prod_set) {
return;
}
diff --git a/api/asn2gnb2.c b/api/asn2gnb2.c
index 0190e57c..c493bcc1 100644
--- a/api/asn2gnb2.c
+++ b/api/asn2gnb2.c
@@ -30,7 +30,7 @@
*
* Version Creation Date: 10/21/98
*
-* $Revision: 1.88 $
+* $Revision: 1.93 $
*
* File Description: New GenBank flatfile generator - work in progress
*
@@ -71,14 +71,16 @@ static CharPtr strd [4] = {
" ", "ss-", "ds-", "ms-"
};
-static CharPtr gnbk_mol [14] = {
- " ", "DNA ", "RNA ", "mRNA", "rRNA", "tRNA", "snRNA", "scRNA", " AA ", "DNA ", "DNA ", "cRNA ", "snoRNA", "RNA "
+static CharPtr gnbk_mol [16] = {
+ " ", "DNA ", "RNA ", "mRNA", "rRNA", "tRNA", "snRNA", "scRNA",
+ " AA ", "DNA ", "DNA ", "cRNA ", "snoRNA", "RNA ", "RNA ", "tmRNA "
};
/* EMBL_FMT in RELEASE_MODE or ENTREZ_MODE, otherwise use gnbk_mol */
-static CharPtr embl_mol [14] = {
- "xxx", "DNA", "RNA", "RNA", "RNA", "RNA", "RNA", "RNA", "AA ", "DNA", "DNA", "RNA", "RNA", "RNA"
+static CharPtr embl_mol [16] = {
+ "xxx", "DNA", "RNA", "RNA", "RNA", "RNA", "RNA", "RNA",
+ "AA ", "DNA", "DNA", "RNA", "RNA", "RNA", "RNA", "RNA"
};
static CharPtr embl_divs [18] = {
@@ -86,8 +88,8 @@ static CharPtr embl_divs [18] = {
"SYN", "UNA", "VRL", "VRT", "PAT", "EST", "STS", "HUM", "HTC"
};
-static Uint1 imolToMoltype [14] = {
- 0, 1, 2, 5, 4, 3, 6, 7, 9, 1, 1, 2, 8, 2
+static Uint1 imolToMoltype [16] = {
+ 0, 1, 2, 5, 4, 3, 6, 7, 9, 1, 1, 2, 8, 2, 2, 2
};
static DatePtr GetBestDate (
@@ -648,7 +650,7 @@ NLM_EXTERN void AddLocusBlock (
mip = (MolInfoPtr) sdp->data.ptrvalue;
if (mip != NULL) {
- if (mip->biomol <= MOLECULE_TYPE_TRANSCRIBED_RNA) {
+ if (mip->biomol <= MOLECULE_TYPE_TMRNA) {
imol = (Int2) mip->biomol;
}
tech = mip->tech;
@@ -721,7 +723,8 @@ NLM_EXTERN void AddLocusBlock (
/* ss=any RNA don't show ss */
if ((bmol > Seq_mol_rna ||
- (imol >= MOLECULE_TYPE_MRNA && imol <= MOLECULE_TYPE_PEPTIDE)) &&
+ (imol >= MOLECULE_TYPE_MRNA && imol <= MOLECULE_TYPE_PEPTIDE) ||
+ (imol >= MOLECULE_TYPE_CRNA && imol <= MOLECULE_TYPE_TMRNA)) &&
istrand == 1) {
istrand = 0;
}
@@ -1099,6 +1102,9 @@ NLM_EXTERN void AddLocusBlock (
if (StringCmp (str, "viral cRNA") == 0) {
str = "other RNA";
}
+ if (StringICmp (str, "ncRNA") == 0) {
+ str = "RNA";
+ }
StringNCpy_0 (mol, str, sizeof (mol));
FFStartPrint (ffstring, awp->format, 0, 0, NULL, 0, 5, 0, "ID", FALSE);
@@ -2516,13 +2522,13 @@ static Boolean WriteDbsourceID (
pfx = prefix;
rsult = TRUE;
}
- if (tsip->version > 0) {
+ if (tsip->version > 0 && sip->choice != SEQID_SWISSPROT) {
sprintf (tmp, ".%d", (int) tsip->version);
StringCat (str, tmp);
sfx = suffix;
pfx = prefix;
}
- if (! StringHasNoText (tsip->release)) {
+ if (! StringHasNoText (tsip->release) && sip->choice != SEQID_SWISSPROT) {
StringCat (str, pfx);
StringCat (str, "release ");
StringCat (str, tsip->release);
@@ -2757,6 +2763,25 @@ static void AddSPBlock (
} else {
FFAddOneString (ffstring, ", ", FALSE, FALSE, TILDE_IGNORE);
}
+
+ str = NULL;
+ if ( oip->str != NULL ) {
+ str = oip->str;
+ if (StringNCmp (str, "GO:", 3) == 0) {
+ str += 3;
+ } else if (StringNCmp (str, "MGI:", 4) == 0) {
+ str += 4;
+ } else if (StringNCmp (str, "HGNC:", 5) == 0) {
+ str += 5;
+ }
+ } else if ( oip->id > 0 ) {
+ sprintf (numbuf, "%d", oip->id);
+ str = numbuf;
+ }
+
+ FF_www_db_xref (ajp, ffstring, db->db, str, bsp);
+
+ /*
if (StringCmp (db->db, "MGD") == 0 || StringCmp (db->db, "MGI") == 0) {
FFAddOneString (ffstring, "MGI", FALSE, FALSE, TILDE_IGNORE);
} else {
@@ -2791,6 +2816,7 @@ static void AddSPBlock (
FFAddOneString(ffstring, str, FALSE, FALSE, TILDE_IGNORE);
}
}
+ */
}
}
@@ -2958,32 +2984,28 @@ static void AddPRFBlock (
if (extra->host != NULL) {
FFAddTextToString(ffstring, "host:", extra->host, NULL, FALSE, TRUE, TILDE_IGNORE);
- prefix = ";";
+ prefix = ";\n";
}
if (extra->part != NULL) {
FFAddOneString(ffstring, prefix, FALSE, FALSE, TILDE_IGNORE);
- FFAddNewLine(ffstring);
FFAddTextToString(ffstring, "part: ", extra->part, NULL, FALSE, TRUE, TILDE_IGNORE);
- prefix = ";";
+ prefix = ";\n";
}
if (extra->state != NULL) {
FFAddOneString(ffstring, prefix, FALSE, FALSE, TILDE_IGNORE);
- FFAddNewLine(ffstring);
FFAddTextToString(ffstring, "state: ", extra->state, NULL, FALSE, TRUE, TILDE_IGNORE);
- prefix = ";";
+ prefix = ";\n";
}
if (extra->strain != NULL) {
FFAddOneString(ffstring, prefix, FALSE, FALSE, TILDE_IGNORE);
- FFAddNewLine(ffstring);
FFAddTextToString(ffstring, "strain: ", extra->strain, NULL, FALSE, TRUE, TILDE_IGNORE);
- prefix = ";";
+ prefix = ";\n";
}
if (extra->taxon != NULL) {
FFAddOneString(ffstring, prefix, FALSE, FALSE, TILDE_IGNORE);
- FFAddNewLine(ffstring);
FFAddTextToString(ffstring, "taxonomy: ", extra->taxon, NULL, FALSE, TRUE, TILDE_IGNORE);
- prefix = ";";
+ prefix = ";\n";
}
FFAddOneChar(ffstring, '.', FALSE);
@@ -3683,6 +3705,14 @@ NLM_EXTERN void AddKeywordsBlock (
}
ValNodeCopyStr (&head, 0, "BARCODE");
break;
+ case MI_TECH_tsa :
+ if (head != NULL) {
+ ValNodeCopyStr (&head, 0, "; ");
+ }
+ ValNodeCopyStr (&head, 0, "TSA");
+ ValNodeCopyStr (&head, 0, "; ");
+ ValNodeCopyStr (&head, 0, "Transcriptome Shotgun Assembly");
+ break;
case MI_TECH_unknown :
case MI_TECH_standard :
case MI_TECH_other :
diff --git a/api/asn2gnb3.c b/api/asn2gnb3.c
index b1110614..edd95a04 100644
--- a/api/asn2gnb3.c
+++ b/api/asn2gnb3.c
@@ -30,7 +30,7 @@
*
* Version Creation Date: 10/21/98
*
-* $Revision: 1.75 $
+* $Revision: 1.81 $
*
* File Description: New GenBank flatfile generator - work in progress
*
@@ -418,6 +418,7 @@ static CharPtr GetStrForBankit (
}
static CharPtr reftxt0 = " The reference sequence was derived from ";
+static CharPtr reftxtg = " The reference sequence was generated based on analysis of ";
static CharPtr reftxt1 = " This record is predicted by genome sequence analysis and is not yet supported by experimental evidence.";
static CharPtr reftxt2 = " This record has not yet been subject to final NCBI review.";
static CharPtr reftxt3 = " The mRNA record is supported by experimental evidence; however, the coding sequence is predicted.";
@@ -480,18 +481,19 @@ static void AddStrForRefTrack (
)
{
- CharPtr accn, curator = NULL, source = NULL, st;
+ CharPtr accn, curator = NULL, name, source = NULL, st;
+ Char buf [64];
ObjectIdPtr oip;
UserFieldPtr ufp, tmp, u, urf = NULL;
+ Int4 from, to;
Int2 i = 0;
- Int2 review = 0,len;
- Boolean is_accn;
+ Int2 review = 0;
+ Boolean generated = FALSE;
if ( uop == NULL || ffstring == NULL ) return;
if ((oip = uop->type) == NULL) return;
if (StringCmp (oip->str, "RefGeneTracking") != 0) return;
- len = StringLen (reftxt0);
for (ufp = uop->data; ufp != NULL; ufp = ufp->next) {
oip = ufp->label;
if (StringCmp(oip->str, "Assembly") == 0) {
@@ -516,6 +518,8 @@ static void AddStrForRefTrack (
} else if (StringICmp (st, "Pipeline") == 0) {
review = 8;
}
+ } else if (StringCmp (oip->str, "Generated") == 0) {
+ generated = ufp->data.boolvalue;
} else if (StringCmp (oip->str, "Collaborator") == 0) {
st = (CharPtr) ufp->data.ptrvalue;
if (! StringHasNoText (st)) {
@@ -575,33 +579,58 @@ static void AddStrForRefTrack (
}
if (source != NULL) {
FFAddOneString (ffstring, reftxt9, FALSE, FALSE, TILDE_IGNORE);
- FFAddOneString (ffstring, source, FALSE, FALSE, TILDE_IGNORE);
+ if (GetWWW (ajp) && ValidateAccn (source) == 0) {
+ FFAddTextToString(ffstring, "<a href=", link_seq, NULL, FALSE, FALSE, TILDE_IGNORE);
+ FFAddTextToString(ffstring, "val=", source, ">", FALSE, FALSE, TILDE_IGNORE);
+ FFAddOneString (ffstring, source, FALSE, FALSE, TILDE_IGNORE);
+ FFAddOneString (ffstring, "</a>", FALSE, FALSE, TILDE_IGNORE);
+ } else {
+ FFAddOneString (ffstring, source, FALSE, FALSE, TILDE_IGNORE);
+ }
FFAddOneString (ffstring, ").", FALSE, FALSE, TILDE_IGNORE);
}
if (i > 0) {
- FFAddOneString (ffstring, reftxt0, FALSE, FALSE, TILDE_IGNORE);
+ if (generated) {
+ FFAddOneString (ffstring, reftxtg, FALSE, FALSE, TILDE_IGNORE);
+ } else {
+ FFAddOneString (ffstring, reftxt0, FALSE, FALSE, TILDE_IGNORE);
+ }
for (tmp = urf->data.ptrvalue; tmp != NULL; tmp = tmp->next) {
- is_accn = TRUE;
+ accn = NULL;
+ from = 0;
+ to = 0;
+ name = NULL;
for (u = tmp->data.ptrvalue; u != NULL; u = u->next) {
oip = u->label;
- if (StringCmp (oip->str, "accession") == 0) break;
- if (StringCmp (oip->str, "name") == 0) {
- is_accn = FALSE;
- break;
+ if (oip != NULL && oip->str != NULL) {
+ if (StringICmp (oip->str, "accession") == 0 && u->choice == 1) {
+ accn = (CharPtr) u->data.ptrvalue;
+ } else if (StringICmp (oip->str, "from") == 0 && u->choice == 2) {
+ from = u->data.intvalue;
+ } else if (StringICmp (oip->str, "to") == 0 && u->choice == 2) {
+ to = u->data.intvalue;
+ } else if (StringICmp (oip->str, "name") == 0 && u->choice == 1) {
+ name = (CharPtr) u->data.ptrvalue;
+ }
}
}
- if (u == NULL) continue;
- accn = (CharPtr) u->data.ptrvalue;
- if (StringHasNoText (accn)) continue;
- if (is_accn && GetWWW(ajp) ) {
- FFAddTextToString(ffstring, "<a href=", link_seq, NULL, FALSE, FALSE, TILDE_IGNORE);
- FFAddTextToString(ffstring, "val=", accn, ">", FALSE, FALSE, TILDE_IGNORE);
- FFAddOneString (ffstring, accn, FALSE, FALSE, TILDE_IGNORE);
- FFAddOneString (ffstring, "</a>", FALSE, FALSE, TILDE_IGNORE);
- } else {
- FFAddOneString (ffstring, accn, FALSE, FALSE, TILDE_IGNORE);
- }
+ if (StringDoesHaveText (accn)) {
+ if (GetWWW (ajp) && ValidateAccn (accn) == 0) {
+ FFAddTextToString(ffstring, "<a href=", link_seq, NULL, FALSE, FALSE, TILDE_IGNORE);
+ FFAddTextToString(ffstring, "val=", accn, ">", FALSE, FALSE, TILDE_IGNORE);
+ FFAddOneString (ffstring, accn, FALSE, FALSE, TILDE_IGNORE);
+ FFAddOneString (ffstring, "</a>", FALSE, FALSE, TILDE_IGNORE);
+ } else {
+ FFAddOneString (ffstring, accn, FALSE, FALSE, TILDE_IGNORE);
+ }
+ if (from > 0 && to > 0) {
+ sprintf (buf, " (range: %ld-%ld)", (long) from, (long) to);
+ FFAddOneString (ffstring, buf, FALSE, FALSE, TILDE_IGNORE);
+ }
+ } else if (StringDoesHaveText (name)) {
+ FFAddOneString (ffstring, name, FALSE, FALSE, TILDE_IGNORE);
+ } else continue;
if (tmp->next != NULL) {
ufp = tmp->next;
if (ufp->next != NULL) {
@@ -1491,6 +1520,148 @@ static void AddAltPrimaryBlock (
FFRecycleString(ajp, ffstring);
}
+static CharPtr GeStrForTSA (
+ UserObjectPtr uop
+)
+
+{
+ Int4 asf, ast, prf, prt;
+ Char buf [80], tmp [80];
+ UserFieldPtr curr;
+ Boolean has_asf, has_ast, has_prf, has_prt;
+ ValNodePtr head = NULL;
+ ObjectIdPtr oip;
+ CharPtr pid;
+ CharPtr str;
+ UserFieldPtr ufp;
+
+ if (uop == NULL) return NULL;
+ if ((oip = uop->type) == NULL) return NULL;
+ if (StringCmp (oip->str, "TSA") != 0) return NULL;
+
+ for (curr = uop->data; curr != NULL; curr = curr->next) {
+ if (curr->choice != 11) continue;
+ asf = 0;
+ ast = 0;
+ prf = 0;
+ prt = 0;
+ pid = NULL;
+ has_asf = FALSE;
+ has_ast = FALSE;
+ has_prf = FALSE;
+ has_prt = FALSE;
+ for (ufp = curr->data.ptrvalue; ufp != NULL; ufp = ufp->next) {
+ oip = ufp->label;
+ if (oip == NULL) continue;
+ if (StringICmp (oip->str, "assembly from") == 0 && ufp->choice == 2) {
+ asf = (Int4) ufp->data.intvalue;
+ has_asf = TRUE;
+ } else if (StringICmp (oip->str, "assembly to") == 0 && ufp->choice == 2) {
+ ast = (Int4) ufp->data.intvalue;
+ has_ast = TRUE;
+ } else if (StringICmp (oip->str, "primary from") == 0 && ufp->choice == 2) {
+ prf = (Int4) ufp->data.intvalue;
+ has_prf = TRUE;
+ } else if (StringICmp (oip->str, "primary to") == 0 && ufp->choice == 2) {
+ prt = (Int4) ufp->data.intvalue;
+ has_prt = TRUE;
+ } else if (StringICmp (oip->str, "primary ID") == 0 && ufp->choice == 1) {
+ pid = (CharPtr) ufp->data.ptrvalue;
+ }
+ }
+ if (has_asf && has_ast && has_prf && has_prt && pid != NULL) {
+ if (head == NULL) {
+ ValNodeCopyStr (&head, 0, "TSA_SPAN PRIMARY_IDENTIFIER PRIMARY_SPAN COMP");
+ }
+ StringCpy (buf, pid);
+ if (StringNCmp (pid, "gnl|ti|", 7) == 0) {
+ StringCpy (buf, "TI");
+ StringCat (buf, pid + 7);
+ }
+ sprintf (tmp, "~%ld-%ld ",
+ (long) (asf + 1), (long) (ast + 1));
+ tmp [21] = '\0';
+ StringCat (buf, " ");
+ buf [18] = '\0';
+ StringCat (tmp, buf);
+ sprintf (buf, " %ld-%ld ",
+ (long) (prf + 1), (long) (prt + 1));
+ buf [21] = '\0';
+ StringCat (tmp, buf);
+ if (prf > prt) {
+ StringCat (tmp, "c");
+ }
+ ValNodeCopyStr (&head, 0, tmp);
+ }
+ }
+
+ if (head == NULL) return NULL;
+
+ str = MergeFFValNodeStrs (head);
+ ValNodeFreeData (head);
+
+ return str;
+}
+
+static void AddTsaBlock (
+ Asn2gbWorkPtr awp,
+ UserObjectPtr uop
+)
+
+{
+ IntAsn2gbJobPtr ajp;
+ Asn2gbSectPtr asp;
+ BaseBlockPtr bbp = NULL;
+ BioseqPtr bsp;
+ GBSeqPtr gbseq;
+ CharPtr str;
+ StringItemPtr ffstring;
+
+ if (awp == NULL) return;
+ ajp = awp->ajp;
+ if (ajp == NULL) return;
+ bsp = awp->bsp;
+ if (bsp == NULL) return;
+ asp = awp->asp;
+ if (asp == NULL) return;
+
+ ffstring = FFGetString(ajp);
+ if ( ffstring == NULL ) return;
+
+ str = GeStrForTSA (uop);
+ if (str != NULL) {
+
+ bbp = (BaseBlockPtr) Asn2gbAddBlock (awp, PRIMARY_BLOCK, sizeof (BaseBlock));
+ if (bbp != NULL) {
+
+ FFStartPrint (ffstring, awp->format, 0, 12, "PRIMARY", 12, 5, 5, "PR", TRUE);
+
+ FFAddOneString (ffstring, str, FALSE, FALSE, TILDE_EXPAND);
+
+ bbp->string = FFEndPrint(ajp, ffstring, awp->format, 12, 12, 5, 5, "PR");
+
+ /* optionally populate gbseq for XML-ized GenBank format */
+
+ if (ajp->gbseq) {
+ gbseq = &asp->gbseq;
+ } else {
+ gbseq = NULL;
+ }
+
+ if (gbseq != NULL) {
+ gbseq->primary = StringSave (str);
+ }
+
+ if (awp->afp != NULL) {
+ DoImmediateFormat (awp->afp, (BaseBlockPtr) bbp);
+ }
+ }
+ MemFree (str);
+ }
+
+ FFRecycleString(ajp, ffstring);
+}
+
NLM_EXTERN void AddPrimaryBlock (
Asn2gbWorkPtr awp
)
@@ -1503,6 +1674,7 @@ NLM_EXTERN void AddPrimaryBlock (
SeqMgrDescContext dcontext;
GBSeqPtr gbseq;
Boolean has_tpa_assembly = FALSE;
+ Boolean has_tsa = FALSE;
SeqHistPtr hist;
Boolean isRefSeq = FALSE;
ObjectIdPtr oip;
@@ -1527,16 +1699,23 @@ NLM_EXTERN void AddPrimaryBlock (
if (oip != NULL) {
if (StringCmp (oip->str, "TpaAssembly") == 0) {
has_tpa_assembly = TRUE;
+ } else if (StringCmp (oip->str, "TSA") == 0) {
+ has_tsa = TRUE;
}
}
}
- if (has_tpa_assembly) {
+ if (has_tpa_assembly || has_tsa) {
sdp = NULL;
} else {
sdp = SeqMgrGetNextDescriptor (bsp, sdp, Seq_descr_user, &dcontext);
}
}
+ if (has_tsa) {
+ AddTsaBlock (awp, uop);
+ return;
+ }
+
hist = bsp->hist;
if ((! IsTpa (bsp, has_tpa_assembly, &isRefSeq)) ||
hist == NULL || hist->assembly == NULL) {
@@ -1709,6 +1888,7 @@ NLM_EXTERN void AddCommentBlock (
MolInfoPtr mip;
Boolean mrnaEv = FALSE;
CharPtr name = NULL;
+ ObjectIdPtr ncbifileID = NULL;
ObjectIdPtr oip;
Boolean okay;
BioseqPtr parent;
@@ -2130,6 +2310,8 @@ NLM_EXTERN void AddCommentBlock (
DoImmediateFormat (awp->afp, (BaseBlockPtr) cbp);
}
}
+ } else if (dbt != NULL && StringCmp (dbt->db, "NCBIFILE") == 0 && dbt->tag != NULL) {
+ ncbifileID = dbt->tag;
}
} else if (sip->choice == SEQID_GI) {
@@ -2181,6 +2363,47 @@ NLM_EXTERN void AddCommentBlock (
}
}
+ if (ncbifileID != NULL) {
+ if (is_tpa || is_collab) {
+ if (awp->mode == SEQUIN_MODE || awp->mode == DUMP_MODE) {
+ buf [0] = '\0';
+ if (! StringHasNoText (ncbifileID->str)) {
+ if (StringLen (ncbifileID->str) < 1000) {
+ sprintf (buf, "FileID: %s", ncbifileID->str);
+ } else {
+ sprintf (buf, "FileID string too large");
+ }
+ } else {
+ sprintf (buf, "FileID: %ld", (long) ncbifileID->id);
+ }
+
+ cbp = (CommentBlockPtr) Asn2gbAddBlock (awp, COMMENT_BLOCK, sizeof (CommentBlock));
+ if (cbp != NULL) {
+
+ cbp->entityID = awp->entityID;
+ cbp->first = first;
+ first = FALSE;
+
+ if (cbp->first) {
+ FFStartPrint (ffstring, awp->format, 0, 12, "COMMENT", 12, 5, 5, "CC", TRUE);
+ } else {
+ FFStartPrint (ffstring, awp->format, 0, 12, NULL, 12, 5, 5, "CC", FALSE);
+ }
+
+ FFAddOneString (ffstring, buf, FALSE, FALSE, TILDE_EXPAND);
+
+ cbp->string = FFEndPrint(ajp, ffstring, awp->format, 12, 12,5, 5, "CC");
+ FFRecycleString(ajp, ffstring);
+ ffstring = FFGetString(ajp);
+
+ if (awp->afp != NULL) {
+ DoImmediateFormat (awp->afp, (BaseBlockPtr) cbp);
+ }
+ }
+ }
+ }
+ }
+
/* RefSeq results in allocated comment string */
sdp = SeqMgrGetNextDescriptor (bsp, NULL, Seq_descr_user, &dcontext);
@@ -3784,6 +4007,9 @@ NLM_EXTERN void AddSourceFeatBlock (
}
str = GetMolTypeQual (bsp);
+ if (StringICmp (str, "ncRNA") == 0) {
+ str = "other RNA";
+ }
if (str == NULL) {
switch (bsp->mol) {
case Seq_mol_dna :
diff --git a/api/asn2gnb4.c b/api/asn2gnb4.c
index 7fff07cf..40a640f4 100644
--- a/api/asn2gnb4.c
+++ b/api/asn2gnb4.c
@@ -30,7 +30,7 @@
*
* Version Creation Date: 10/21/98
*
-* $Revision: 1.148 $
+* $Revision: 1.159 $
*
* File Description: New GenBank flatfile generator - work in progress
*
@@ -79,6 +79,7 @@ static FtQualType feat_qual_order [] = {
FTQUAL_operon,
FTQUAL_ncRNA_class,
+ FTQUAL_ncRNA_other,
FTQUAL_product,
@@ -191,6 +192,7 @@ static FtQualType feat_note_order [] = {
FTQUAL_prot_note,
FTQUAL_prot_comment,
FTQUAL_prot_method,
+ FTQUAL_ncRNA_note,
FTQUAL_figure,
FTQUAL_maploc,
FTQUAL_prot_conflict,
@@ -281,6 +283,8 @@ static FeaturQual asn2gnbk_featur_quals [ASN2GNBK_TOTAL_FEATUR] = {
{ "model_evidence", Qual_class_model_ev },
{ "calculated_mol_wt", Qual_class_mol_wt },
{ "ncRNA_class", Qual_class_quote },
+ { "ncRNA_note", Qual_class_string },
+ { "ncRNA_class", Qual_class_string },
{ "nomenclature", Qual_class_nomenclature },
{ "note", Qual_class_note },
{ "number", Qual_class_number },
@@ -1055,7 +1059,6 @@ static ValQual legalGbqualList [] = {
{ FEATDEF_misc_recomb , FTQUAL_label },
{ FEATDEF_misc_recomb , FTQUAL_map },
{ FEATDEF_misc_recomb , FTQUAL_old_locus_tag },
- { FEATDEF_misc_recomb , FTQUAL_organism },
{ FEATDEF_misc_recomb , FTQUAL_standard_name },
{ FEATDEF_misc_signal , FTQUAL_allele },
@@ -1135,6 +1138,7 @@ static ValQual legalGbqualList [] = {
{ FEATDEF_protein_bind , FTQUAL_label },
{ FEATDEF_protein_bind , FTQUAL_map },
{ FEATDEF_protein_bind , FTQUAL_old_locus_tag },
+ { FEATDEF_protein_bind , FTQUAL_operon },
{ FEATDEF_protein_bind , FTQUAL_standard_name },
{ FEATDEF_RBS , FTQUAL_allele },
@@ -2683,10 +2687,13 @@ static void FormatFeatureBlockQuals (
UserObjectPtr uop;
ValNodePtr vnp;
StringItemPtr unique;
+ Boolean indexerVersion;
unique = FFGetString(ajp);
if ( unique == NULL ) return;
+ indexerVersion = (Boolean) (GetAppProperty ("InternalNcbiSequin") != NULL);
+
for (i = 0, idx = feat_qual_order [i]; idx != (FtQualType) 0; i++, idx = feat_qual_order [i]) {
lasttype = NULL;
@@ -4153,7 +4160,11 @@ static void FormatFeatureBlockQuals (
}
} else if (jdx == FTQUAL_seqfeat_note) {
str = StringSave (qvp [jdx].str);
- TrimSpacesAndJunkFromEnds (str, TRUE);
+ if (indexerVersion) {
+ TrimSpacesAroundString (str);
+ } else {
+ TrimSpacesAndJunkFromEnds (str, TRUE);
+ }
if (! IsEllipsis (str))
add_period = s_RemovePeriodFromEnd (str);
/* NOTE -- The following function call cleans up some strings
@@ -5050,6 +5061,7 @@ static CharPtr legalInferencePrefixes [] = {
"nucleotide motif",
"protein motif",
"ab initio prediction",
+ "alignment",
NULL
};
@@ -5184,8 +5196,10 @@ static SeqFeatPtr GetOverlappingGeneInEntity (
vn.data.ptrvalue = (Pointer) &spt;
gene = SeqMgrGetOverlappingGene (&vn, gcontext);
+ /*
} else {
gene = SeqMgrGetOverlappingGene (locforgene, gcontext);
+ */
}
}
} else {
@@ -5199,6 +5213,23 @@ static SeqFeatPtr GetOverlappingGeneInEntity (
return gene;
}
+static Boolean LocStrandsMatch (SeqLocPtr loc1, SeqLocPtr loc2)
+
+{
+ Uint1 featstrand;
+ Uint1 locstrand;
+
+ if (loc1 == NULL || loc2 == NULL) return FALSE;
+ featstrand = SeqLocStrand (loc1);
+ locstrand = SeqLocStrand (loc2);
+ if (featstrand == locstrand) return TRUE;
+ if (locstrand == Seq_strand_unknown && featstrand != Seq_strand_minus) return TRUE;
+ if (featstrand == Seq_strand_unknown && locstrand != Seq_strand_minus) return TRUE;
+ if (featstrand == Seq_strand_both && locstrand != Seq_strand_minus) return TRUE;
+ if (locstrand == Seq_strand_both) return TRUE;
+ return FALSE;
+}
+
static CharPtr FormatFeatureBlockEx (
IntAsn2gbJobPtr ajp,
Asn2gbSectPtr asp,
@@ -5248,6 +5279,7 @@ static CharPtr FormatFeatureBlockEx (
ValNodePtr illegal = NULL;
ImpFeatPtr imp = NULL;
IndxPtr index;
+ Boolean is_ed = FALSE;
Boolean is_ged = FALSE;
Boolean is_gps = FALSE;
Boolean is_journalscan = FALSE;
@@ -5259,6 +5291,7 @@ static CharPtr FormatFeatureBlockEx (
SeqLocPtr loc = NULL;
SeqLocPtr location = NULL;
SeqLocPtr locforgene = NULL;
+ SeqLocPtr locformatpep = NULL;
SeqMgrFeatContext mcontext;
MolInfoPtr mip;
SeqFeatPtr mrna;
@@ -5363,8 +5396,9 @@ static CharPtr FormatFeatureBlockEx (
locforgene = location;
*/
if (cds != NULL) {
- locforgene = cds->location; /* mat_peptide always gets parent CDS /gene value */
- grp = SeqMgrGetGeneXref (cds); /* mat_peptide also needs to use CDS gene xref */
+ grp = SeqMgrGetGeneXref (cds); /* mat_peptide first obeys any CDS gene xref */
+ locformatpep = location; /* mat_peptide next gets exact match for /gene */
+ locforgene = cds->location; /* mat_peptide last gets parent CDS /gene */
}
loc = location;
@@ -5441,8 +5475,16 @@ static CharPtr FormatFeatureBlockEx (
is_journalscan = TRUE;
break;
case SEQID_GENBANK :
+ is_ged = TRUE;
+ break;
case SEQID_EMBL :
+ is_ged = TRUE;
+ is_ed = TRUE;
+ break;
case SEQID_DDBJ :
+ is_ged = TRUE;
+ is_ed = TRUE;
+ break;
case SEQID_TPG :
case SEQID_TPE :
case SEQID_TPD :
@@ -5656,6 +5698,9 @@ static CharPtr FormatFeatureBlockEx (
qvp [FTQUAL_operon].gbq = gbq;
}
}
+ if (operon->pseudo) {
+ pseudo = TRUE;
+ }
}
} else if (featdeftype != FEATDEF_operon && featdeftype != FEATDEF_gap) {
@@ -5688,7 +5733,35 @@ static CharPtr FormatFeatureBlockEx (
if (! suppressed) {
- /* if not suppressed, and no gene xref, get gene by overlap */
+ /* first look for gene that exactly matches mat_peptide DNA projection */
+
+ if (gene == NULL && grp == NULL && locformatpep != NULL) {
+ gene = GetOverlappingGeneInEntity (ajp->ajp.entityID, fcontext, &gcontext, locformatpep);
+ if (gene == NULL && ajp->ajp.entityID != sfp->idx.entityID) {
+ gene = GetOverlappingGeneInEntity (sfp->idx.entityID, fcontext, &gcontext, locformatpep);
+ }
+
+ if (gene != NULL) {
+ if (SeqLocCompare (gene->location, locformatpep) == SLC_A_EQ_B &&
+ LocStrandsMatch (gene->location, locformatpep)) {
+ qvp [FTQUAL_gene_note].str = gene->comment;
+
+ grp = (GeneRefPtr) gene->data.value.ptrvalue;
+ if (gene->pseudo) {
+ pseudo = TRUE;
+ }
+ if (grp != NULL && grp->db != NULL) {
+ qvp [FTQUAL_gene_xref].vnp = grp->db;
+ } else {
+ qvp [FTQUAL_gene_xref].vnp = gene->dbxref;
+ }
+ } else {
+ gene = NULL;
+ }
+ }
+ }
+
+ /* otherwise, if not suppressed and no gene xref, get gene by overlap */
if (gene == NULL && grp == NULL) {
if (featdeftype != FEATDEF_primer_bind) {
@@ -5728,7 +5801,7 @@ static CharPtr FormatFeatureBlockEx (
pseudo = TRUE;
}
- if (grp != NULL && (featdeftype != FEATDEF_repeat_region || gene == NULL)) {
+ if (grp != NULL && (featdeftype != FEATDEF_repeat_region || is_ed || gene == NULL)) {
if (! StringHasNoText (grp->locus)) {
qvp [FTQUAL_gene].str = grp->locus;
qvp [FTQUAL_locus_tag].str = grp->locus_tag;
@@ -5775,6 +5848,9 @@ static CharPtr FormatFeatureBlockEx (
qvp [FTQUAL_operon].gbq = gbq;
}
}
+ if (operon->pseudo) {
+ pseudo = TRUE;
+ }
}
}
}
@@ -6261,20 +6337,9 @@ static CharPtr FormatFeatureBlockEx (
if (rrp->type == 255) {
str = (CharPtr) rrp->ext.value.ptrvalue;
if (StringICmp (str, "misc_RNA") == 0 ||
- StringICmp (str, "ncRNA") == 0) {
+ StringICmp (str, "ncRNA") == 0 ||
+ StringICmp (str, "tmRNA") == 0) {
/* pick up product from gbqual */
- } else if (StringICmp (str, "tmRNA") == 0) {
- /* check for product gbqual in new records */
- for (gbq = sfp->qual; gbq != NULL; gbq = gbq->next) {
- if (StringICmp (gbq->qual, "product") == 0 &&
- StringDoesHaveText (gbq->val)) {
- break;
- }
- }
- if (gbq == NULL) {
- /* old record has no product gbqual, product is tmRNA */
- qvp [FTQUAL_product].str = str;
- }
} else {
str = (CharPtr) rrp->ext.value.ptrvalue;
qvp [FTQUAL_product].str = str;
@@ -6612,6 +6677,17 @@ static CharPtr FormatFeatureBlockEx (
}
}
+ if (qvp [FTQUAL_ncRNA_class].gbq != NULL) {
+ gbq = qvp [FTQUAL_ncRNA_class].gbq;
+ if (StringDoesHaveText (gbq->val)) {
+ if (! IsStringInNcRNAClassList (gbq->val)) {
+ qvp [FTQUAL_ncRNA_other].str = "other";
+ qvp [FTQUAL_ncRNA_note].str = gbq->val;
+ qvp [FTQUAL_ncRNA_class].gbq = NULL;
+ }
+ }
+ }
+
if (ajp->mode != DUMP_MODE) {
ParseInference (qvp [FTQUAL_inference].gbq, &good_inference, &bad_inference);
qvp [FTQUAL_inference_good].vnp = good_inference;
diff --git a/api/asn2gnb5.c b/api/asn2gnb5.c
index 4b9b7f6b..1c3457f9 100644
--- a/api/asn2gnb5.c
+++ b/api/asn2gnb5.c
@@ -30,7 +30,7 @@
*
* Version Creation Date: 10/21/98
*
-* $Revision: 1.98 $
+* $Revision: 1.115 $
*
* File Description: New GenBank flatfile generator - work in progress
*
@@ -104,18 +104,30 @@ NLM_EXTERN Char ec_ambig [MAX_WWWBUF];
NLM_EXTERN Char link_tax [MAX_WWWBUF];
#define DEF_LINK_TAX "http://www.ncbi.nlm.nih.gov/Taxonomy/Browser/wwwtax.cgi?"
-static Char link_ff [MAX_WWWBUF];
-#define DEF_LINK_FF "/cgi-bin/Entrez/getfeat?"
-
NLM_EXTERN Char link_muid [MAX_WWWBUF];
#define DEF_LINK_MUID "http://www.ncbi.nlm.nih.gov/sites/entrez?cmd=Retrieve&db=pubmed&list_uids="
-static Char link_ace [MAX_WWWBUF];
-#define DEF_LINK_ACE "http://www.ncbi.nlm.nih.gov/IEB/Research/Acembly/av.cgi?db=worm&c=gene&q="
-
NLM_EXTERN Char link_code [MAX_WWWBUF];
#define DEF_LINK_CODE "http://www.ncbi.nlm.nih.gov/Taxonomy/Utils/wprintgc.cgi?"
+NLM_EXTERN Char link_sp [MAX_WWWBUF];
+#define DEF_LINK_SP "http://www.uniprot.org/entry/"
+
+NLM_EXTERN Char link_encode [MAX_WWWBUF];
+#define DEF_LINK_ENCODE "http://www.nhgri.nih.gov/10005107"
+
+NLM_EXTERN Char link_go [MAX_WWWBUF];
+#define DEF_LINK_GO "http://amigo.geneontology.org/cgi-bin/amigo/go.cgi?view=details&depth=1&query="
+
+NLM_EXTERN Char link_go_ref [MAX_WWWBUF];
+#define DEF_LINK_GO_REF "http://www.geneontology.org/cgi-bin/references.cgi#GO_REF:"
+
+static Char link_ff [MAX_WWWBUF];
+#define DEF_LINK_FF "/cgi-bin/Entrez/getfeat?"
+
+static Char link_ace [MAX_WWWBUF];
+#define DEF_LINK_ACE "http://www.ncbi.nlm.nih.gov/IEB/Research/Acembly/av.cgi?db=worm&c=gene&q="
+
static Char link_fly [MAX_WWWBUF];
#define DEF_LINK_FLY "http://flybase.bio.indiana.edu/.bin/fbidq.html?"
@@ -143,9 +155,6 @@ static Char link_ck [MAX_WWWBUF];
static Char link_rice [MAX_WWWBUF];
#define DEF_LINK_RICE "http://ars-genome.cornell.edu/cgi-bin/WebAce/webace?db=ricegenes&class=Marker&object="
-NLM_EXTERN Char link_sp [MAX_WWWBUF];
-#define DEF_LINK_SP "http://www.uniprot.org/entry/"
-
static Char link_pdb [MAX_WWWBUF];
#define DEF_LINK_PDB "http://www.rcsb.org/pdb/cgi/explore.cgi?pdbId="
@@ -230,21 +239,12 @@ static Char link_zfin [MAX_WWWBUF];
static Char link_rebase [MAX_WWWBUF];
#define DEF_LINK_REBASE "http://rebase.neb.com/rebase/enz/"
-NLM_EXTERN Char link_encode [MAX_WWWBUF];
-#define DEF_LINK_ENCODE "http://www.nhgri.nih.gov/10005107"
-
static Char link_pgn [MAX_WWWBUF];
#define DEF_LINK_PGN "http://pgn.cornell.edu/cgi-bin/search/seq_search_result.pl?identifier="
static Char link_subtilist [MAX_WWWBUF];
#define DEF_LINK_SUBTILIST "http://genolist.pasteur.fr/SubtiList/genome.cgi?external_query+"
-NLM_EXTERN Char link_go [MAX_WWWBUF];
-#define DEF_LINK_GO "http://amigo.geneontology.org/cgi-bin/amigo/go.cgi?view=details&depth=1&query="
-
-NLM_EXTERN Char link_go_ref [MAX_WWWBUF];
-#define DEF_LINK_GO_REF "http://www.geneontology.org/cgi-bin/references.cgi#GO_REF:"
-
static Char link_hinvdb [MAX_WWWBUF];
#define DEF_LINK_HINVDB "http://www.h-invitational.jp"
@@ -261,7 +261,7 @@ static Char link_dicty [MAX_WWWBUF];
#define DEF_LINK_DICTY "http://dictybase.org/db/cgi-bin/gene_page.pl?dictybaseid="
static Char link_maizegdb [MAX_WWWBUF];
-#define DEF_LINK_MAIZEGDB "http://www.maizegdb.org/"
+#define DEF_LINK_MAIZEGDB "http://www.maizegdb.org/cgi-bin/displaylocusrecord.cgi?id="
static Char link_axeldb [MAX_WWWBUF];
#define DEF_LINK_AXELDB "http://www.dkfz-heidelberg.de/tbi/services/axeldb/clone/xenopus?name="
@@ -284,6 +284,9 @@ static Char link_hgnc [MAX_WWWBUF];
static Char link_bold [MAX_WWWBUF];
#define DEF_LINK_BOLD "http://www.boldsystems.org/connectivity/specimenlookup.php?processid="
+static Char link_aftol [MAX_WWWBUF];
+#define DEF_LINK_AFTOL "http://aftol.biology.duke.edu/pub/displayTaxonInfo?aftol_id="
+
static Char link_hprd [MAX_WWWBUF];
#define DEF_LINK_HPRD "http://www.hprd.org/protein/"
@@ -294,7 +297,7 @@ static Char link_cambia [MAX_WWWBUF];
#define DEF_LINK_CAMBIA "http://www.patentlens.net/patentlens/simple.cgi?patnum="
static Char link_vector [MAX_WWWBUF];
-#define DEF_LINK_VECTOR "http://www.vectorbase.org/Genome/BRCGene/?"
+#define DEF_LINK_VECTOR "http://www.vectorbase.org/Genome/BRCGene/?feature="
static Char link_mirbase [MAX_WWWBUF];
#define DEF_LINK_MIRBASE "http://microrna.sanger.ac.uk/cgi-bin/sequences/mirna_entry.pl?acc="
@@ -318,7 +321,7 @@ static Char link_eric [MAX_WWWBUF];
#define DEF_LINK_ERIC "http://www.ericbrc.org/genbank/dbxref/"
static Char link_pbr [MAX_WWWBUF];
-#define DEF_LINK_PBR "http://www.poxvirus.org/gene_detail.asp?gene_id="
+#define DEF_LINK_PBR "http://www.poxvirus.org/query.asp?web_id="
static Char link_nmpdr [MAX_WWWBUF];
#define DEF_LINK_NMPDR "http://www.nmpdr.org/linkin.cgi?id="
@@ -344,11 +347,39 @@ static Char link_apidb_plasmodb [MAX_WWWBUF];
static Char link_apidb_toxodb [MAX_WWWBUF];
#define DEF_LINK_APIDB_TOXODB "http://www.toxodb.org/toxo/showRecord.do?name=GeneRecordClasses.GeneRecordClass&project_id=&primary_key="
-static Char link_pathema_locus [MAX_WWWBUF];
-#define DEF_LINK_PATHEMA_LOCUS "http://pathema.tigr.org/tigr-scripts/pathema/shared/GenePage.cgi?locus="
+static Char link_pathema [MAX_WWWBUF];
+/* #define DEF_LINK_PATHEMA "http://pathema.tigr.org/tigr-cripts/Burkholderia/shared/GenePage.cgi?all=1&locus=" */
+#define DEF_LINK_PATHEMA "http://pathema.jcvi.org/cgi-bin/Burkholderia/shared/GenePage.cgi?all=1&locus="
+
+/*
+static Char link_pathema_prefix [MAX_WWWBUF];
+#define DEF_LINK_PATHEMA_PREFIX "http://pathema.tigr.org/tigr-scripts/"
+
+static Char link_pathema_suffix [MAX_WWWBUF];
+#define DEF_LINK_PATHEMA_SUFFIX "/shared/GenePage.cgi?all=1&locus="
+*/
+
+static Char link_pfam [MAX_WWWBUF];
+#define DEF_LINK_PFAM "http://pfam.sanger.ac.uk/family?acc="
+
+static Char link_rfam [MAX_WWWBUF];
+#define DEF_LINK_RFAM "http://www.sanger.ac.uk/cgi-bin/Rfam/getacc?"
+
+static Char link_xenbase [MAX_WWWBUF];
+#define DEF_LINK_XENBASE "http://www.xenbase.org/gene/showgene.do?method=display&geneId="
+
+static Char link_nrestdb [MAX_WWWBUF];
+#define DEF_LINK_NRESTDB "http://genome.ukm.my/nrestdb/db/single_view_est.php?id="
+
+static Char link_tigrfam [MAX_WWWBUF];
+#define DEF_LINK_TIGRFAM "http://cmr.tigr.org/tigr-scripts/CMR/HmmReport.cgi?hmm_acc="
+
+static Char link_vbrc [MAX_WWWBUF];
+#define DEF_LINK_VBRC "http://vbrc.org/query.asp?web_view=curation&web_id="
+
+static Char link_unigene [MAX_WWWBUF];
+#define DEF_LINK_UNIGENE "http://www.ncbi.nlm.nih.gov/sites/entrez?Db=unigene&Cmd=Search&Term="
-static Char link_pathema_taxon_id [MAX_WWWBUF];
-#define DEF_LINK_PATHEMA_TAXON_ID "http://pathema.tigr.org/tigr-scripts/pathema/GenomePage.cgi?taxon_id="
/* www utility functions */
@@ -439,6 +470,7 @@ NLM_EXTERN void InitWWW (IntAsn2gbJobPtr ajp)
GetAppParam ("NCBI", "WWWENTREZ", "LINK_HSSP", DEF_LINK_HSSP, link_hssp, MAX_WWWBUF);
GetAppParam ("NCBI", "WWWENTREZ", "LINK_HGNC", DEF_LINK_HGNC, link_hgnc, MAX_WWWBUF);
GetAppParam ("NCBI", "WWWENTREZ", "LINK_BOLD", DEF_LINK_BOLD, link_bold, MAX_WWWBUF);
+ GetAppParam ("NCBI", "WWWENTREZ", "LINK_AFTOL", DEF_LINK_AFTOL, link_aftol, MAX_WWWBUF);
GetAppParam ("NCBI", "WWWENTREZ", "LINK_HPRD", DEF_LINK_HPRD, link_hprd, MAX_WWWBUF);
GetAppParam ("NCBI", "WWWENTREZ", "LINK_USPTO", DEF_LINK_USPTO, link_uspto, MAX_WWWBUF);
GetAppParam ("NCBI", "WWWENTREZ", "LINK_CAMBIA", DEF_LINK_CAMBIA, link_cambia, MAX_WWWBUF);
@@ -459,11 +491,20 @@ NLM_EXTERN void InitWWW (IntAsn2gbJobPtr ajp)
GetAppParam ("NCBI", "WWWENTREZ", "LINK_APIDB_CRYPTODB", DEF_LINK_APIDB_CRYPTODB, link_apidb_cryptodb, MAX_WWWBUF);
GetAppParam ("NCBI", "WWWENTREZ", "LINK_APIDB_PLASMODB", DEF_LINK_APIDB_PLASMODB, link_apidb_plasmodb, MAX_WWWBUF);
GetAppParam ("NCBI", "WWWENTREZ", "LINK_APIDB_TOXODB", DEF_LINK_APIDB_TOXODB, link_apidb_toxodb, MAX_WWWBUF);
- GetAppParam ("NCBI", "WWWENTREZ", "LINK_PATHEMA_LOCUS", DEF_LINK_PATHEMA_LOCUS, link_pathema_locus, MAX_WWWBUF);
- GetAppParam ("NCBI", "WWWENTREZ", "LINK_PATHEMA_TAXON_ID", DEF_LINK_PATHEMA_TAXON_ID, link_pathema_taxon_id, MAX_WWWBUF);
+ GetAppParam ("NCBI", "WWWENTREZ", "LINK_PATHEMA", DEF_LINK_PATHEMA, link_pathema, MAX_WWWBUF);
+ /*
+ GetAppParam ("NCBI", "WWWENTREZ", "LINK_PATHEMA_PREFIX", DEF_LINK_PATHEMA_PREFIX, link_pathema_prefix, MAX_WWWBUF);
+ GetAppParam ("NCBI", "WWWENTREZ", "LINK_PATHEMA_SUFFIX", DEF_LINK_PATHEMA_SUFFIX, link_pathema_suffix, MAX_WWWBUF);
+ */
+ GetAppParam ("NCBI", "WWWENTREZ", "LINK_PFAM", DEF_LINK_PFAM, link_pfam, MAX_WWWBUF);
+ GetAppParam ("NCBI", "WWWENTREZ", "LINK_RFAM", DEF_LINK_RFAM, link_rfam, MAX_WWWBUF);
+ GetAppParam ("NCBI", "WWWENTREZ", "LINK_XENBASE", DEF_LINK_XENBASE, link_xenbase, MAX_WWWBUF);
+ GetAppParam ("NCBI", "WWWENTREZ", "LINK_NRESTDB", DEF_LINK_NRESTDB, link_nrestdb, MAX_WWWBUF);
+ GetAppParam ("NCBI", "WWWENTREZ", "LINK_TIGRFAM", DEF_LINK_TIGRFAM, link_tigrfam, MAX_WWWBUF);
+ GetAppParam ("NCBI", "WWWENTREZ", "LINK_VBRC", DEF_LINK_VBRC, link_vbrc, MAX_WWWBUF);
+ GetAppParam ("NCBI", "WWWENTREZ", "LINK_UNIGENE", DEF_LINK_UNIGENE, link_unigene, MAX_WWWBUF);
}
-
NLM_EXTERN void FF_www_featloc(StringItemPtr ffstring, CharPtr loc)
{
CharPtr ptr;
@@ -547,10 +588,12 @@ static Boolean IsOnlyDigits (CharPtr str)
static void FF_www_db_xref_pathema (
StringItemPtr ffstring,
CharPtr db,
- CharPtr identifier
+ CharPtr identifier,
+ BioseqPtr bsp
)
{
+ /*
if ( StringStr (identifier, "SOP_") != NULL ) {
FFAddTextToString(ffstring, db, ":", identifier, FALSE, FALSE, TILDE_IGNORE);
} else if ( StringChr (identifier, '_') != NULL ) {
@@ -560,6 +603,30 @@ static void FF_www_db_xref_pathema (
} else {
FFAddTextToString(ffstring, db, ":", identifier, FALSE, FALSE, TILDE_IGNORE);
}
+ */
+
+ /*
+ Char link [256];
+ CharPtr ptr;
+ Char taxname [128];
+
+ if (bsp != NULL && BioseqToGeneticCode (bsp, NULL, NULL, NULL, taxname, sizeof (taxname), NULL)) {
+ ptr = StringChr (taxname, ' ');
+ if (ptr != NULL) {
+ *ptr = '\0';
+ }
+ StringCpy (link, link_pathema_prefix);
+ StringCat (link, taxname);
+ StringCat (link, link_pathema_suffix);
+
+ FF_www_db_xref_std(ffstring, db, identifier, link);
+ } else {
+ FFAddTextToString(ffstring, db, ":", identifier, FALSE, FALSE, TILDE_IGNORE);
+ }
+ */
+
+
+ FF_www_db_xref_std(ffstring, db, identifier, link_pathema);
}
static void FF_www_db_xref_imgt_gene (
@@ -689,22 +756,6 @@ static void FF_www_db_xref_niaEST(
}
-static void FF_www_db_xref_maizegdb(
- StringItemPtr ffstring,
- CharPtr db,
- CharPtr identifier
-)
-{
- while (*identifier == ' ')
- identifier++;
-
- FFAddTextToString(ffstring, NULL, db, ":", FALSE, FALSE, TILDE_IGNORE);
- FFAddTextToString(ffstring, "<a href=", link_maizegdb, ">", FALSE, FALSE, TILDE_IGNORE);
- FFAddOneString(ffstring, identifier, FALSE, FALSE, TILDE_IGNORE);
- FFAddOneString(ffstring, "</a>", FALSE, FALSE, TILDE_IGNORE);
-}
-
-
static void FF_www_db_xref_gdb(
StringItemPtr ffstring,
CharPtr db,
@@ -804,6 +855,7 @@ static void FF_www_db_xref_hprd (
FF_www_db_xref_std (ffstring, db, identifier, link);
}
+/*
static void FF_www_db_xref_vector (
StringItemPtr ffstring,
CharPtr db,
@@ -836,6 +888,7 @@ static void FF_www_db_xref_vector (
StringCat (buf, "gene=");
FF_www_db_xref_std (ffstring, db, identifier, buf);
}
+*/
static void FF_www_db_xref_null (
StringItemPtr ffstring,
@@ -963,7 +1016,7 @@ static void Do_www_db_xref(
} else if ( StringCmp(db , "dictyBase") == 0) {
FF_www_db_xref_std(ffstring, db, identifier, link_dicty);
} else if ( StringCmp(db , "MaizeGDB") == 0) {
- FF_www_db_xref_maizegdb(ffstring, db, identifier);
+ FF_www_db_xref_std(ffstring, db, identifier, link_maizegdb);
} else if ( StringCmp(db , "axeldb") == 0) {
FF_www_db_xref_std(ffstring, db, identifier, link_axeldb);
} else if ( StringCmp(db , "VBASE2") == 0) {
@@ -980,10 +1033,12 @@ static void Do_www_db_xref(
FF_www_db_xref_std(ffstring, db, identifier, link_hgnc);
} else if ( StringCmp(db , "BOLD") == 0) {
FF_www_db_xref_std(ffstring, db, identifier, link_bold);
+ } else if ( StringCmp(db , "AFTOL") == 0) {
+ FF_www_db_xref_std(ffstring, db, identifier, link_aftol);
} else if ( StringCmp(db , "HPRD") == 0) {
FF_www_db_xref_hprd(ffstring, db, identifier, link_hprd);
} else if ( StringCmp(db , "VectorBase") == 0) {
- FF_www_db_xref_vector(ffstring, db, identifier, bsp, link_vector);
+ FF_www_db_xref_std(ffstring, db, identifier, link_vector);
} else if ( StringCmp(db , "miRBase") == 0) {
FF_www_db_xref_std(ffstring, db, identifier, link_mirbase);
} else if ( StringCmp(db , "dbClone") == 0) {
@@ -1009,7 +1064,7 @@ static void Do_www_db_xref(
} else if ( StringCmp(db , "TAIR") == 0) {
FF_www_db_xref_std(ffstring, db, identifier, link_tair);
} else if ( StringCmp(db , "Pathema") == 0) {
- FF_www_db_xref_pathema(ffstring, db, identifier);
+ FF_www_db_xref_pathema(ffstring, db, identifier, bsp);
} else if ( StringCmp(db , "ApiDB") == 0) {
FF_www_db_xref_std(ffstring, db, identifier, link_apidb);
} else if ( StringCmp(db , "ApiDB_CryptoDB") == 0) {
@@ -1018,6 +1073,27 @@ static void Do_www_db_xref(
FF_www_db_xref_std(ffstring, db, identifier, link_apidb_plasmodb);
} else if ( StringCmp(db , "ApiDB_ToxoDB") == 0) {
FF_www_db_xref_std(ffstring, db, identifier, link_apidb_toxodb);
+ } else if ( StringCmp(db , "PFAM") == 0 || StringCmp(db , "Pfam") == 0 ) {
+ FF_www_db_xref_std(ffstring, db, identifier, link_pfam);
+ } else if ( StringCmp(db , "RFAM") == 0) {
+ FF_www_db_xref_std(ffstring, db, identifier, link_rfam);
+ } else if ( StringCmp(db , "Xenbase") == 0) {
+ FF_www_db_xref_std(ffstring, db, identifier, link_xenbase);
+ } else if ( StringCmp(db , "NRESTdb") == 0) {
+ FF_www_db_xref_std(ffstring, db, identifier, link_nrestdb);
+ } else if ( StringCmp(db , "TIGRFAM") == 0) {
+ FF_www_db_xref_std(ffstring, db, identifier, link_tigrfam);
+ } else if ( StringCmp(db , "VBRC") == 0) {
+ FF_www_db_xref_std(ffstring, db, identifier, link_vbrc);
+
+ /* for dbsource */
+ } else if ( StringCmp(db , "UniGene") == 0) {
+ FF_www_db_xref_std(ffstring, db, identifier, link_unigene);
+ } else if ( StringCmp(db , "RefSeq") == 0) {
+ FFAddTextToString(ffstring, NULL, db, ":", FALSE, FALSE, TILDE_IGNORE);
+ FFAddTextToString(ffstring, "<a href=", link_seq, "val=", FALSE, FALSE, TILDE_IGNORE);
+ FFAddTextToString(ffstring, identifier, ">", identifier, FALSE, FALSE, TILDE_IGNORE);
+ FFAddOneString(ffstring, "</a>", FALSE, FALSE, TILDE_IGNORE);
} else {
/* default: no link just the text */
@@ -1306,10 +1382,12 @@ NLM_EXTERN CharPtr GetAuthorsString (
if (alp == NULL) return NULL;
+ /*
alp = AsnIoMemCopy ((Pointer) alp,
(AsnReadFunc) AuthListAsnRead,
(AsnWriteFunc) AuthListAsnWrite);
if (alp == NULL) return NULL;
+ */
count = 0;
if (alp->choice == 1) {
@@ -1418,7 +1496,9 @@ NLM_EXTERN CharPtr GetAuthorsString (
ValNodeFreeData (head);
+ /*
AuthListFree (alp);
+ */
return str;
}
diff --git a/api/asn2gnb6.c b/api/asn2gnb6.c
index 260e6492..7a41cf38 100644
--- a/api/asn2gnb6.c
+++ b/api/asn2gnb6.c
@@ -30,7 +30,7 @@
*
* Version Creation Date: 10/21/98
*
-* $Revision: 1.120 $
+* $Revision: 1.136 $
*
* File Description: New GenBank flatfile generator - work in progress
*
@@ -82,7 +82,10 @@ static SourceType source_qual_order [] = {
SCQUAL_isolation_source,
SCQUAL_spec_or_nat_host,
SCQUAL_sub_species,
+
SCQUAL_specimen_voucher,
+ SCQUAL_culture_collection,
+ SCQUAL_bio_material,
SCQUAL_db_xref,
SCQUAL_org_xref,
@@ -170,8 +173,6 @@ static SourceType source_desc_note_order [] = {
SCQUAL_teleomorph,
SCQUAL_breed,
- SCQUAL_culture_collection,
- SCQUAL_bio_material,
SCQUAL_metagenome_source,
SCQUAL_metagenome_note,
@@ -220,8 +221,6 @@ static SourceType source_feat_note_order [] = {
SCQUAL_teleomorph,
SCQUAL_breed,
- SCQUAL_culture_collection,
- SCQUAL_bio_material,
SCQUAL_metagenome_source,
SCQUAL_metagenome_note,
@@ -298,7 +297,7 @@ NLM_EXTERN SourceQual asn2gnbk_source_quals [ASN2GNBK_TOTAL_SOURCE] = {
{ "isolation_source", Qual_class_subsource },
{ "lab_host", Qual_class_subsource },
{ "label", Qual_class_label },
- { "lat_lon", Qual_class_subsource },
+ { "lat_lon", Qual_class_lat_lon },
{ "macronuclear", Qual_class_boolean },
{ "map", Qual_class_subsource },
{ "derived from metagenome", Qual_class_orgmod },
@@ -404,6 +403,7 @@ NLM_EXTERN SourceType subSourceToSourceIdx [39] = {
NLM_EXTERN CharPtr legalDbXrefs [] = {
"PIDe", "PIDd", "PIDg", "PID",
"AceView/WormGenes",
+ "AFTOL",
"ApiDB",
"ApiDB_CryptoDB",
"ApiDB_PlasmoDB",
@@ -462,20 +462,24 @@ NLM_EXTERN CharPtr legalDbXrefs [] = {
"NextDB",
"niaEST",
"NMPDR",
+ "NRESTdb",
"Pathema",
"PDB",
+ "PFAM",
"PGN",
"PIR",
"PSEUDO",
"RATMAP",
- "RiceGenes",
+ "RFAM",
"RGD",
+ "RiceGenes",
"RZPD",
"SEED",
"SGD",
"SoyBase",
"SubtiList",
"taxon",
+ "TIGRFAM",
"UniGene",
"UniProtKB/Swiss-Prot",
"UniProtKB/TrEMBL",
@@ -484,6 +488,7 @@ NLM_EXTERN CharPtr legalDbXrefs [] = {
"VectorBase",
"WorfDB",
"WormBase",
+ "Xenbase",
"ZFIN",
NULL
};
@@ -497,9 +502,413 @@ NLM_EXTERN CharPtr legalRefSeqDbXrefs [] = {
"PBR",
"REBASE",
"TAIR",
+ "VBRC",
NULL
};
+
+typedef struct dbxrefval {
+ CharPtr dbval;
+ Uint4 flags;
+} DbxrefValData, PNTR DbxrefValPtr;
+
+#define DBXREF_VAL_FLAG_KNOWN_BAD 0
+#define DBXREF_VAL_FLAG_OK_ON_ANYFEAT 1
+#define DBXREF_VAL_FLAG_OK_ON_CDSFEAT 2
+#define DBXREF_VAL_FLAG_OK_ON_ORGREF 4
+#define DBXREF_VAL_FLAG_OK_ON_ANY 8
+#define DBXREF_VAL_FLAG_OK_ON_NCBI 16
+#define DBXREF_VAL_FLAG_OK_ON_EMBL 32
+#define DBXREF_VAL_FLAG_OK_ON_DDBJ 64
+
+static DbxrefValData validDbxref [] = {
+ {"AceView/WormGenes", DBXREF_VAL_FLAG_OK_ON_ANYFEAT | DBXREF_VAL_FLAG_OK_ON_ANY },
+ {"AFTOL", DBXREF_VAL_FLAG_OK_ON_ORGREF | DBXREF_VAL_FLAG_OK_ON_ANY },
+ {"ApiDB", DBXREF_VAL_FLAG_OK_ON_ANYFEAT | DBXREF_VAL_FLAG_OK_ON_ANY },
+ {"ApiDB_CryptoDB", DBXREF_VAL_FLAG_OK_ON_ANYFEAT | DBXREF_VAL_FLAG_OK_ON_ANY },
+ {"ApiDB_PlasmoDB", DBXREF_VAL_FLAG_OK_ON_ANYFEAT | DBXREF_VAL_FLAG_OK_ON_ANY },
+ {"ApiDB_ToxoDB", DBXREF_VAL_FLAG_OK_ON_ANYFEAT | DBXREF_VAL_FLAG_OK_ON_ANY },
+ {"ASAP", DBXREF_VAL_FLAG_OK_ON_ANYFEAT | DBXREF_VAL_FLAG_OK_ON_ANY },
+ {"ATCC", DBXREF_VAL_FLAG_OK_ON_ANYFEAT | DBXREF_VAL_FLAG_OK_ON_ORGREF | DBXREF_VAL_FLAG_OK_ON_ANY },
+ {"ATCC(dna)", DBXREF_VAL_FLAG_OK_ON_ANYFEAT | DBXREF_VAL_FLAG_OK_ON_ORGREF | DBXREF_VAL_FLAG_OK_ON_ANY },
+ {"ATCC(in host)", DBXREF_VAL_FLAG_OK_ON_ANYFEAT | DBXREF_VAL_FLAG_OK_ON_ORGREF | DBXREF_VAL_FLAG_OK_ON_ANY },
+ {"axeldb", DBXREF_VAL_FLAG_OK_ON_ANYFEAT | DBXREF_VAL_FLAG_OK_ON_ANY },
+ {"BDGP_EST", DBXREF_VAL_FLAG_OK_ON_ANYFEAT | DBXREF_VAL_FLAG_OK_ON_ANY },
+ {"BDGP_INS", DBXREF_VAL_FLAG_OK_ON_ANYFEAT | DBXREF_VAL_FLAG_OK_ON_ANY },
+ {"BOLD", DBXREF_VAL_FLAG_OK_ON_ANYFEAT | DBXREF_VAL_FLAG_OK_ON_ORGREF | DBXREF_VAL_FLAG_OK_ON_ANY },
+ {"CCDS", DBXREF_VAL_FLAG_OK_ON_ANYFEAT },
+ {"CDD", DBXREF_VAL_FLAG_OK_ON_ANYFEAT | DBXREF_VAL_FLAG_OK_ON_ANY },
+ {"cdd", DBXREF_VAL_FLAG_OK_ON_ANYFEAT | DBXREF_VAL_FLAG_OK_ON_ANY },
+ {"CK", DBXREF_VAL_FLAG_OK_ON_ANYFEAT | DBXREF_VAL_FLAG_OK_ON_ANY },
+ {"CloneID", DBXREF_VAL_FLAG_OK_ON_ANYFEAT },
+ {"COG", DBXREF_VAL_FLAG_OK_ON_ANYFEAT | DBXREF_VAL_FLAG_OK_ON_ANY },
+ {"dbClone", DBXREF_VAL_FLAG_OK_ON_ANYFEAT | DBXREF_VAL_FLAG_OK_ON_ANY },
+ {"dbCloneLib", DBXREF_VAL_FLAG_OK_ON_ANYFEAT | DBXREF_VAL_FLAG_OK_ON_ANY },
+ {"dbEST", DBXREF_VAL_FLAG_OK_ON_ANYFEAT | DBXREF_VAL_FLAG_OK_ON_ANY },
+ {"dbProbe", DBXREF_VAL_FLAG_OK_ON_ANYFEAT | DBXREF_VAL_FLAG_OK_ON_ANY },
+ {"dbSNP", DBXREF_VAL_FLAG_OK_ON_ANYFEAT | DBXREF_VAL_FLAG_OK_ON_ANY },
+ {"dbSTS", DBXREF_VAL_FLAG_OK_ON_ANYFEAT | DBXREF_VAL_FLAG_OK_ON_ANY },
+ {"DDBJ", DBXREF_VAL_FLAG_OK_ON_ANYFEAT },
+ {"dictyBase", DBXREF_VAL_FLAG_OK_ON_ANYFEAT | DBXREF_VAL_FLAG_OK_ON_ANY },
+ {"ECOCYC", DBXREF_VAL_FLAG_OK_ON_ANYFEAT },
+ {"EcoGene", DBXREF_VAL_FLAG_OK_ON_ANYFEAT | DBXREF_VAL_FLAG_OK_ON_ANY },
+ {"EMBL", DBXREF_VAL_FLAG_OK_ON_ANYFEAT },
+ {"ENSEMBL", DBXREF_VAL_FLAG_OK_ON_ANYFEAT | DBXREF_VAL_FLAG_OK_ON_ANY },
+ {"ERIC", DBXREF_VAL_FLAG_OK_ON_ANYFEAT | DBXREF_VAL_FLAG_OK_ON_ANY },
+ {"ESTLIB", DBXREF_VAL_FLAG_OK_ON_ANYFEAT | DBXREF_VAL_FLAG_OK_ON_ANY },
+ {"FANTOM_DB", DBXREF_VAL_FLAG_OK_ON_ANYFEAT | DBXREF_VAL_FLAG_OK_ON_ORGREF | DBXREF_VAL_FLAG_OK_ON_ANY },
+ {"FLYBASE", DBXREF_VAL_FLAG_OK_ON_ANYFEAT | DBXREF_VAL_FLAG_OK_ON_ORGREF | DBXREF_VAL_FLAG_OK_ON_ANY },
+ {"FlyBase", DBXREF_VAL_FLAG_OK_ON_ANYFEAT | DBXREF_VAL_FLAG_OK_ON_ORGREF | DBXREF_VAL_FLAG_OK_ON_ANY },
+ {"GABI", DBXREF_VAL_FLAG_OK_ON_ANYFEAT | DBXREF_VAL_FLAG_OK_ON_ANY },
+ {"GDB", DBXREF_VAL_FLAG_OK_ON_ANYFEAT | DBXREF_VAL_FLAG_OK_ON_ANY },
+ {"GenBank", DBXREF_VAL_FLAG_OK_ON_ANYFEAT },
+ {"GeneDB", DBXREF_VAL_FLAG_OK_ON_ANYFEAT | DBXREF_VAL_FLAG_OK_ON_ANY },
+ {"GeneID", DBXREF_VAL_FLAG_OK_ON_ANYFEAT | DBXREF_VAL_FLAG_OK_ON_ANY },
+ {"GI", DBXREF_VAL_FLAG_KNOWN_BAD },
+ {"GO", DBXREF_VAL_FLAG_OK_ON_ANYFEAT | DBXREF_VAL_FLAG_OK_ON_ANY },
+ {"GOA", DBXREF_VAL_FLAG_OK_ON_ANYFEAT | DBXREF_VAL_FLAG_OK_ON_ANY },
+ {"GRIN", DBXREF_VAL_FLAG_OK_ON_ANYFEAT | DBXREF_VAL_FLAG_OK_ON_ORGREF | DBXREF_VAL_FLAG_OK_ON_ANY },
+ {"H-InvDB", DBXREF_VAL_FLAG_OK_ON_ANYFEAT | DBXREF_VAL_FLAG_OK_ON_ANY },
+ {"HGNC", DBXREF_VAL_FLAG_OK_ON_ANYFEAT | DBXREF_VAL_FLAG_OK_ON_ANY },
+ {"HPRD", DBXREF_VAL_FLAG_OK_ON_ANYFEAT },
+ {"HSSP", DBXREF_VAL_FLAG_OK_ON_ANYFEAT | DBXREF_VAL_FLAG_OK_ON_ANY },
+ {"IMGT/GENE-DB", DBXREF_VAL_FLAG_OK_ON_ANYFEAT | DBXREF_VAL_FLAG_OK_ON_ANY },
+ {"IMGT/HLA", DBXREF_VAL_FLAG_OK_ON_ANYFEAT | DBXREF_VAL_FLAG_OK_ON_ORGREF | DBXREF_VAL_FLAG_OK_ON_ANY },
+ {"IMGT/LIGM", DBXREF_VAL_FLAG_OK_ON_ANYFEAT | DBXREF_VAL_FLAG_OK_ON_ORGREF | DBXREF_VAL_FLAG_OK_ON_ANY },
+ {"InterimID", DBXREF_VAL_FLAG_OK_ON_ANYFEAT | DBXREF_VAL_FLAG_OK_ON_ANY },
+ {"InterPro", DBXREF_VAL_FLAG_OK_ON_ANYFEAT | DBXREF_VAL_FLAG_OK_ON_ANY },
+ {"ISD", DBXREF_VAL_FLAG_OK_ON_ANYFEAT | DBXREF_VAL_FLAG_OK_ON_ANY },
+ {"ISFinder", DBXREF_VAL_FLAG_OK_ON_ANYFEAT | DBXREF_VAL_FLAG_OK_ON_ANY },
+ {"JCM", DBXREF_VAL_FLAG_OK_ON_ANYFEAT | DBXREF_VAL_FLAG_OK_ON_ORGREF | DBXREF_VAL_FLAG_OK_ON_ANY },
+ {"LocusID", DBXREF_VAL_FLAG_OK_ON_ANYFEAT | DBXREF_VAL_FLAG_OK_ON_ANY },
+ {"MaizeGDB", DBXREF_VAL_FLAG_OK_ON_ANYFEAT | DBXREF_VAL_FLAG_OK_ON_ANY },
+ {"MGD", DBXREF_VAL_FLAG_OK_ON_ANYFEAT | DBXREF_VAL_FLAG_OK_ON_ORGREF | DBXREF_VAL_FLAG_OK_ON_ANY },
+ {"MGI", DBXREF_VAL_FLAG_OK_ON_ANYFEAT | DBXREF_VAL_FLAG_OK_ON_ORGREF | DBXREF_VAL_FLAG_OK_ON_ANY },
+ {"MIM", DBXREF_VAL_FLAG_OK_ON_ANYFEAT | DBXREF_VAL_FLAG_OK_ON_ANY },
+ {"miRBASE", DBXREF_VAL_FLAG_OK_ON_ANYFEAT },
+ {"NBRC", DBXREF_VAL_FLAG_OK_ON_ANYFEAT | DBXREF_VAL_FLAG_OK_ON_ORGREF | DBXREF_VAL_FLAG_OK_ON_ANY },
+ {"NextDB", DBXREF_VAL_FLAG_OK_ON_ANYFEAT | DBXREF_VAL_FLAG_OK_ON_ANY },
+ {"niaEST", DBXREF_VAL_FLAG_OK_ON_ANYFEAT | DBXREF_VAL_FLAG_OK_ON_ANY },
+ {"NID", DBXREF_VAL_FLAG_KNOWN_BAD },
+ {"NMPDR", DBXREF_VAL_FLAG_OK_ON_ANYFEAT | DBXREF_VAL_FLAG_OK_ON_ANY },
+ {"NRESTdb", DBXREF_VAL_FLAG_OK_ON_ANYFEAT | DBXREF_VAL_FLAG_OK_ON_ANY },
+ {"Pathema", DBXREF_VAL_FLAG_OK_ON_ANYFEAT | DBXREF_VAL_FLAG_OK_ON_ANY },
+ {"PBR", DBXREF_VAL_FLAG_OK_ON_ANYFEAT },
+ {"PDB", DBXREF_VAL_FLAG_OK_ON_ANYFEAT | DBXREF_VAL_FLAG_OK_ON_ANY },
+ {"PFAM", DBXREF_VAL_FLAG_OK_ON_ANYFEAT | DBXREF_VAL_FLAG_OK_ON_ANY },
+ {"PGN", DBXREF_VAL_FLAG_OK_ON_ANYFEAT | DBXREF_VAL_FLAG_OK_ON_ANY },
+ {"PID", DBXREF_VAL_FLAG_OK_ON_CDSFEAT },
+ {"PIDd", DBXREF_VAL_FLAG_OK_ON_CDSFEAT },
+ {"PIDe", DBXREF_VAL_FLAG_OK_ON_CDSFEAT },
+ {"PIDg", DBXREF_VAL_FLAG_OK_ON_CDSFEAT },
+ {"PIR", DBXREF_VAL_FLAG_OK_ON_ANYFEAT | DBXREF_VAL_FLAG_OK_ON_ANY },
+ {"PSEUDO", DBXREF_VAL_FLAG_OK_ON_ANYFEAT | DBXREF_VAL_FLAG_OK_ON_ANY },
+ {"RATMAP", DBXREF_VAL_FLAG_OK_ON_ANYFEAT | DBXREF_VAL_FLAG_OK_ON_ANY },
+ {"REBASE", DBXREF_VAL_FLAG_OK_ON_ANYFEAT },
+ {"RFAM", DBXREF_VAL_FLAG_OK_ON_ANYFEAT | DBXREF_VAL_FLAG_OK_ON_ANY },
+ {"RGD", DBXREF_VAL_FLAG_OK_ON_ANYFEAT | DBXREF_VAL_FLAG_OK_ON_ANY },
+ {"RiceGenes", DBXREF_VAL_FLAG_OK_ON_ANYFEAT | DBXREF_VAL_FLAG_OK_ON_ANY },
+ {"RZPD", DBXREF_VAL_FLAG_OK_ON_ANYFEAT | DBXREF_VAL_FLAG_OK_ON_ORGREF | DBXREF_VAL_FLAG_OK_ON_ANY },
+ {"SEED", DBXREF_VAL_FLAG_OK_ON_ANYFEAT | DBXREF_VAL_FLAG_OK_ON_ANY },
+ {"SGD", DBXREF_VAL_FLAG_OK_ON_ANYFEAT | DBXREF_VAL_FLAG_OK_ON_ANY },
+ {"SoyBase", DBXREF_VAL_FLAG_OK_ON_ANYFEAT | DBXREF_VAL_FLAG_OK_ON_ANY },
+ {"SubtiList", DBXREF_VAL_FLAG_OK_ON_ANYFEAT | DBXREF_VAL_FLAG_OK_ON_ANY },
+ {"TAIR", DBXREF_VAL_FLAG_OK_ON_ANYFEAT },
+ {"taxon", DBXREF_VAL_FLAG_OK_ON_ORGREF | DBXREF_VAL_FLAG_OK_ON_ANY },
+ {"TIGRFAM", DBXREF_VAL_FLAG_OK_ON_ANYFEAT | DBXREF_VAL_FLAG_OK_ON_ANY },
+ {"UniGene", DBXREF_VAL_FLAG_OK_ON_ANYFEAT | DBXREF_VAL_FLAG_OK_ON_ANY },
+ {"UniProtKB/Swiss-Prot", DBXREF_VAL_FLAG_OK_ON_ANYFEAT | DBXREF_VAL_FLAG_OK_ON_ANY },
+ {"UniProtKB/TrEMBL", DBXREF_VAL_FLAG_OK_ON_ANYFEAT | DBXREF_VAL_FLAG_OK_ON_ANY },
+ {"UniSTS", DBXREF_VAL_FLAG_OK_ON_ANYFEAT | DBXREF_VAL_FLAG_OK_ON_ANY },
+ {"VBASE2", DBXREF_VAL_FLAG_OK_ON_ANYFEAT | DBXREF_VAL_FLAG_OK_ON_ANY },
+ {"VBRC", DBXREF_VAL_FLAG_OK_ON_ANYFEAT },
+ {"VectorBase", DBXREF_VAL_FLAG_OK_ON_ANYFEAT | DBXREF_VAL_FLAG_OK_ON_ANY },
+ {"WorfDB", DBXREF_VAL_FLAG_OK_ON_ANYFEAT | DBXREF_VAL_FLAG_OK_ON_ANY },
+ {"WormBase", DBXREF_VAL_FLAG_OK_ON_ANYFEAT | DBXREF_VAL_FLAG_OK_ON_ANY },
+ {"Xenbase", DBXREF_VAL_FLAG_OK_ON_ANYFEAT | DBXREF_VAL_FLAG_OK_ON_ANY },
+ {"ZFIN", DBXREF_VAL_FLAG_OK_ON_ANYFEAT | DBXREF_VAL_FLAG_OK_ON_ANY }
+};
+
+const Int4 cNumValidDbxref = sizeof (validDbxref) / sizeof (DbxrefValData);
+
+
+/* These functions are for testing dbxrefs */
+static ValNodePtr MakeDbxrefList (void)
+{
+ ValNodePtr dbxref_list = NULL;
+ Int4 i;
+ DbtagPtr dbtag;
+
+ for (i = 0; i < cNumValidDbxref; i++)
+ {
+ dbtag = DbtagNew ();
+ dbtag->db = StringSave (validDbxref[i].dbval);
+ dbtag->tag = ObjectIdNew ();
+ dbtag->tag->id = 42;
+ ValNodeAddPointer (&dbxref_list, 0, dbtag);
+ }
+ return dbxref_list;
+}
+
+static void AddDbxrefsToBioSource (BioSourcePtr biop)
+{
+ if (biop == NULL) return;
+ if (biop->org == NULL)
+ {
+ biop->org = OrgRefNew();
+ }
+
+ ValNodeLink (&(biop->org->db), MakeDbxrefList());
+}
+
+static void AddDbxrefsToSeqFeat (SeqFeatPtr sfp)
+{
+ if (sfp == NULL) return;
+ ValNodeLink (&(sfp->dbxref), MakeDbxrefList());
+}
+
+NLM_EXTERN void AddAllDbxrefsToBioseq (BioseqPtr bsp)
+{
+ SeqDescrPtr sdp;
+ SeqFeatPtr sfp;
+ SeqMgrDescContext dcontext;
+ SeqMgrFeatContext fcontext;
+
+ sdp = SeqMgrGetNextDescriptor (bsp, NULL, Seq_descr_source, &dcontext);
+ if (sdp != NULL) {
+ AddDbxrefsToBioSource (sdp->data.ptrvalue);
+ }
+
+ sfp = SeqMgrGetNextFeature (bsp, NULL, SEQFEAT_BIOSRC, 0, &fcontext);
+ if (sfp != NULL) {
+ AddDbxrefsToBioSource (sfp->data.value.ptrvalue);
+ AddDbxrefsToSeqFeat (sfp);
+ }
+
+ sfp = SeqMgrGetNextFeature (bsp, NULL, SEQFEAT_CDREGION, 0, &fcontext);
+ if (sfp != NULL) {
+ AddDbxrefsToSeqFeat (sfp);
+ }
+
+ sfp = SeqMgrGetNextFeature (bsp, NULL, SEQFEAT_GENE, 0, &fcontext);
+ if (sfp != NULL) {
+ AddDbxrefsToSeqFeat (sfp);
+ }
+}
+
+/* functions for validating dbxrefs */
+
+static CharPtr FormatIllegalMsg (CharPtr db)
+{
+ CharPtr msg_fmt = "Illegal db_xref type %s";
+ CharPtr err = NULL;
+
+ if (StringHasNoText (db)) return NULL;
+ err = (CharPtr) MemNew (sizeof (Char) * (StringLen (msg_fmt) + StringLen (db)));
+ sprintf (err, msg_fmt, db);
+ return err;
+}
+
+
+static CharPtr FormatBadCapMsg (CharPtr db, CharPtr correct)
+{
+ CharPtr msg_fmt = "Illegal db_xref type %s, legal capitalization is %s";
+ CharPtr err = NULL;
+
+ if (StringHasNoText (db) || StringHasNoText (correct)) return NULL;
+ err = (CharPtr) MemNew (sizeof (Char) * (StringLen (msg_fmt) + StringLen (db) + StringLen (correct)));
+ sprintf (err, msg_fmt, db, correct);
+ return err;
+}
+
+
+static CharPtr FormatFlatfileOnlyMsg (CharPtr db)
+{
+ CharPtr msg_fmt = "db_xref type %s is only created by the flatfile generator, and should not be in the record as a separate xref";
+ CharPtr err = NULL;
+
+ if (StringHasNoText (db)) return NULL;
+ err = (CharPtr) MemNew (sizeof (Char) * (StringLen (msg_fmt) + StringLen (db)));
+ sprintf (err, msg_fmt, db);
+ return err;
+}
+
+
+static CharPtr FormatBadOrgDbxrefMsg (CharPtr db)
+{
+ CharPtr msg_fmt = "db_xref type %s should not used on an OrgRef";
+ CharPtr err = NULL;
+
+ if (StringHasNoText (db)) return NULL;
+ err = (CharPtr) MemNew (sizeof (Char) * (StringLen (msg_fmt) * StringLen (db)));
+ sprintf (err, msg_fmt, db);
+ return err;
+}
+
+
+static CharPtr FormatBadSeqFeatDbxrefMsg (CharPtr db)
+{
+ CharPtr msg_fmt = "db_xref type %s should not used as a feature xref";
+ CharPtr err = NULL;
+
+ if (StringHasNoText (db)) return NULL;
+ err = (CharPtr) MemNew (sizeof (Char) * (StringLen (msg_fmt) * StringLen (db)));
+ sprintf (err, msg_fmt, db);
+ return err;
+}
+
+
+/* returns 1 if found and valid
+ * returns 0 if not found
+ * returns -1 if found but invalid
+ * returns -2 if found and known bad
+ */
+NLM_EXTERN Int4 IsDbxrefValid (CharPtr db, SeqFeatPtr sfp, OrgRefPtr org, Boolean IsRefSeq, CharPtr PNTR errmsg)
+{
+ Int4 imin, imax, i, j;
+ Int4 capmismatch = -1, exactmatch = -1, validmatch;
+ Int4 rval = 0;
+
+ if (StringHasNoText (db)) return 0;
+
+ if (errmsg != NULL) *errmsg = NULL;
+
+ imin = 0; /* find in list */
+ imax = cNumValidDbxref - 1;
+ i = (imax + imin) / 2;
+ while (imax > imin)
+ {
+ j = StringICmp (db, validDbxref[i].dbval);
+ if (j < 0)
+ imax = i - 1;
+ else if (j > 0)
+ imin = i + 1;
+ else
+ break;
+ i = (imax + imin)/2;
+ }
+
+ if (i > -1 && StringICmp (db, validDbxref[i].dbval) == 0)
+ {
+ j = StringCmp (db, validDbxref[i].dbval);
+ if (j == 0)
+ {
+ exactmatch = i;
+ }
+ else if (j < 0)
+ {
+ capmismatch = i;
+ i--;
+ while (i > -1 && StringICmp (db, validDbxref[i].dbval) == 0 && exactmatch < 0)
+ {
+ if (StringCmp (db, validDbxref[i].dbval) == 0)
+ {
+ exactmatch = i;
+ }
+ else
+ {
+ i--;
+ }
+ }
+ }
+ else if (j > 0)
+ {
+ capmismatch = i;
+ i++;
+ while (i < cNumValidDbxref && StringICmp (db, validDbxref[i].dbval) == 0 && exactmatch < 0)
+ {
+ if (StringCmp (db, validDbxref[i].dbval) == 0)
+ {
+ exactmatch = i;
+ }
+ else
+ {
+ i--;
+ }
+ }
+ }
+ }
+
+ if (capmismatch > -1 && exactmatch < 0)
+ {
+ validmatch = capmismatch;
+ }
+ else
+ {
+ validmatch = exactmatch;
+ }
+
+ if (validmatch < 0)
+ {
+ rval = 0;
+ if (errmsg != NULL)
+ {
+ *errmsg = FormatIllegalMsg (db);
+ }
+ }
+ else
+ {
+ if (validDbxref[validmatch].flags == DBXREF_VAL_FLAG_KNOWN_BAD)
+ {
+ rval = -2;
+ if (errmsg != NULL)
+ {
+ *errmsg = FormatFlatfileOnlyMsg (db);
+ }
+ }
+ else if (org != NULL && !(validDbxref[validmatch].flags & DBXREF_VAL_FLAG_OK_ON_ORGREF))
+ {
+ rval = -1;
+ if (errmsg != NULL)
+ {
+ *errmsg = FormatBadOrgDbxrefMsg (db);
+ }
+ }
+ else if (sfp != NULL && !(validDbxref[validmatch].flags & DBXREF_VAL_FLAG_OK_ON_ANYFEAT)
+ && (sfp->data.choice != SEQFEAT_CDREGION
+ || !(validDbxref[validmatch].flags & DBXREF_VAL_FLAG_OK_ON_CDSFEAT)))
+ {
+ if ((validDbxref[validmatch].flags & DBXREF_VAL_FLAG_OK_ON_CDSFEAT)
+ && !(validDbxref[validmatch].flags & DBXREF_VAL_FLAG_OK_ON_ANYFEAT)
+ && sfp->data.choice != SEQFEAT_CDREGION)
+ {
+ rval = -2;
+ if (errmsg != NULL)
+ {
+ *errmsg = FormatFlatfileOnlyMsg (db);
+ }
+ }
+ else
+ {
+ rval = -1;
+ if (errmsg != NULL)
+ {
+ *errmsg = FormatBadSeqFeatDbxrefMsg (db);
+ }
+ }
+ }
+ else if (IsRefSeq ||(validDbxref[validmatch].flags & DBXREF_VAL_FLAG_OK_ON_ANY))
+ {
+ rval = 1;
+ if (validmatch == capmismatch && errmsg != NULL)
+ {
+ *errmsg = FormatBadCapMsg (db, validDbxref[validmatch].dbval);
+ }
+ }
+ else
+ {
+ rval = -1;
+ if (errmsg != NULL)
+ {
+ *errmsg = FormatIllegalMsg (db);
+ }
+ }
+ }
+
+ return rval;
+}
+
+
static CharPtr organellePrefix [] = {
NULL,
NULL,
@@ -2498,6 +2907,12 @@ NLM_EXTERN CharPtr GetMolTypeQual (
case MOLECULE_TYPE_TRANSCRIBED_RNA :
return "other RNA";
break;
+ case MOLECULE_TYPE_NCRNA :
+ return "ncRNA";
+ break;
+ case MOLECULE_TYPE_TMRNA :
+ return "tmRNA";
+ break;
case 255 :
switch (bsp->mol) {
case Seq_mol_dna :
@@ -2565,7 +2980,7 @@ static ValNodePtr ParseColonString (
tmp = StringSave (strs);
str = tmp;
len = StringLen (str);
- if (len > 1 && StringChr (str, ':') != NULL && multiple) {
+ if (len > 1 && StringChr (str, ':') != NULL /* && multiple */) {
while (StringDoesHaveText (str)) {
ptr = StringChr (str, ':');
if (ptr != NULL) {
@@ -2917,6 +3332,113 @@ static void FF_www_specimen_voucher (
Do_www_specimen_voucher (ffstring, inst, id, vdp);
}
+NLM_EXTERN Char link_lat_lon [MAX_WWWBUF];
+#define DEF_LINK_LAT_LON "http://www.ncbi.nlm.nih.gov/projects/Sequin/latlonview.html?"
+
+static Boolean lat_lon_link_set = FALSE;
+
+static void Do_www_lat_lon (
+ StringItemPtr ffstring,
+ CharPtr lat_lon
+)
+
+{
+ Char buf [128];
+ Char ch;
+ CharPtr ew = "";
+ Int2 i;
+ CharPtr ns = "";
+ CharPtr ptr;
+ Char tmp [128];
+ CharPtr tokens [6];
+
+ if ( ffstring == NULL || lat_lon == NULL ) return;
+
+ if (! lat_lon_link_set) {
+ GetAppParam ("NCBI", "WWWENTREZ", "LINK_LAT_LON", DEF_LINK_LAT_LON, link_lat_lon, MAX_WWWBUF);
+ lat_lon_link_set = TRUE;
+ }
+
+ MemSet ((Pointer) tokens, 0, sizeof (tokens));
+
+ StringNCpy_0 (buf, lat_lon, sizeof (buf));
+
+ i = 0;
+ ptr = buf;
+ ch = *ptr;
+ tokens [i] = ptr;
+ while (ch != '\0' && i < 5) {
+ if (ch == ' ') {
+ *ptr = '\0';
+ ptr++;
+ ch = *ptr;
+ while (ch == ' ') {
+ ptr++;
+ ch = *ptr;
+ }
+ i++;
+ tokens [i] = ptr;
+ } else {
+ ptr++;
+ ch = *ptr;
+ }
+ }
+
+ ptr = tokens [1];
+ if (ptr != NULL && *ptr == 'S') {
+ ns = "-";
+ }
+ ptr = tokens [3];
+ if (ptr != NULL && *ptr == 'W') {
+ ew = "-";
+ }
+
+ if (tokens [0] == NULL) {
+ tokens [0] = "?";
+ }
+ if (tokens [2] == NULL) {
+ tokens [2] = "?";
+ }
+
+ FFAddOneString (ffstring, "<a href=", FALSE, FALSE, TILDE_IGNORE);
+ FFAddOneString (ffstring, link_lat_lon, FALSE, FALSE, TILDE_IGNORE);
+ sprintf (tmp, "lat=%s%s&lon=%s%s", ns, tokens [0], ew, tokens [2]);
+ FFAddOneString (ffstring, tmp, FALSE, FALSE, TILDE_IGNORE);
+ FFAddTextToString (ffstring, ">", lat_lon, "</a>", FALSE, FALSE, TILDE_IGNORE);
+}
+
+static void FF_www_lat_lon (
+ IntAsn2gbJobPtr ajp,
+ StringItemPtr ffstring,
+ CharPtr lat_lon
+)
+
+{
+ Boolean format_ok = FALSE;
+ FloatHi lat = 0.0;
+ FloatHi lon = 0.0;
+ Boolean lat_in_range = FALSE;
+ Boolean lon_in_range = FALSE;
+
+ if ( ffstring == NULL || lat_lon == NULL ) return;
+ if (! GetWWW (ajp)) { /* not in www mode */
+ FFAddTextToString(ffstring, NULL, lat_lon, NULL, FALSE, TRUE, TILDE_TO_SPACES);
+ return;
+ }
+ if (StringDoesHaveText (lat_lon)) {
+ IsCorrectLatLonFormat (lat_lon, &format_ok, &lat_in_range, &lon_in_range);
+ if (format_ok && lat_in_range && lon_in_range) {
+ if (ParseLatLon (lat_lon, &lat, &lon)) {
+ Do_www_lat_lon (ffstring, lat_lon);
+ return;
+ }
+ }
+ }
+
+ /* if any of above tests failed, default print */
+ FFAddTextToString (ffstring, NULL, lat_lon, NULL, FALSE, TRUE, TILDE_TO_SPACES);
+}
+
NLM_EXTERN CharPtr FormatSourceFeatBlock (
Asn2gbFormatPtr afp,
BaseBlockPtr bbp
@@ -3109,6 +3631,9 @@ NLM_EXTERN CharPtr FormatSourceFeatBlock (
}
str = GetMolTypeQual (bsp);
+ if (StringICmp (str, "ncRNA") == 0) {
+ str = "other RNA";
+ }
if (str == NULL) {
switch (bsp->mol) {
case Seq_mol_dna :
@@ -3272,6 +3797,25 @@ NLM_EXTERN CharPtr FormatSourceFeatBlock (
}
break;
+ case Qual_class_lat_lon :
+ omp = qvp [idx].omp;
+ if (lastomptype == 0 && omp != NULL) {
+ lastomptype = omp->subtype;
+ }
+ while (omp != NULL && omp->subtype == lastomptype) {
+ if (StringIsJustQuotes (omp->subname)) {
+ FFAddTextToString(ffstring, "/", asn2gnbk_source_quals [idx].name, "=\"\"\n",
+ FALSE, TRUE, TILDE_IGNORE);
+ } else if (! StringHasNoText (omp->subname)) {
+ FFAddTextToString(ffstring, "/", asn2gnbk_source_quals [idx].name, "=\"",
+ FALSE, TRUE, TILDE_IGNORE);
+ FF_www_lat_lon(ajp, ffstring, omp->subname);
+ FFAddOneString(ffstring, "\"\n", FALSE, FALSE, TILDE_IGNORE);
+ }
+ omp = omp->next;
+ }
+ break;
+
case Qual_class_subsource :
ssp = qvp [idx].ssp;
if (lastssptype == 0 && ssp != NULL) {
diff --git a/api/asn2gnbi.h b/api/asn2gnbi.h
index 836daf63..ffed723c 100644
--- a/api/asn2gnbi.h
+++ b/api/asn2gnbi.h
@@ -29,7 +29,7 @@
*
* Version Creation Date: 12/30/03
*
-* $Revision: 1.82 $
+* $Revision: 1.85 $
*
* File Description: New GenBank flatfile generator, internal header
*
@@ -465,6 +465,7 @@ typedef enum {
Qual_class_pcr,
Qual_class_mol_wt,
Qual_class_voucher,
+ Qual_class_lat_lon,
Qual_class_mobile_element
} QualType;
@@ -635,6 +636,8 @@ typedef enum {
FTQUAL_modelev,
FTQUAL_mol_wt,
FTQUAL_ncRNA_class,
+ FTQUAL_ncRNA_note,
+ FTQUAL_ncRNA_other,
FTQUAL_nomenclature,
FTQUAL_note,
FTQUAL_number,
@@ -712,6 +715,7 @@ NLM_EXTERN Char ec_link [MAX_WWWBUF];
NLM_EXTERN Char ec_ambig [MAX_WWWBUF];
NLM_EXTERN Char link_tax [MAX_WWWBUF];
NLM_EXTERN Char link_muid [MAX_WWWBUF];
+NLM_EXTERN Char link_lat_lon [MAX_WWWBUF];
NLM_EXTERN Char link_code [MAX_WWWBUF];
NLM_EXTERN Char link_encode [MAX_WWWBUF];
NLM_EXTERN Char link_go [MAX_WWWBUF];
@@ -823,7 +827,16 @@ NLM_EXTERN void FFTrim (
StringItemPtr line_start,
Int4 line_pos,
Int4 line_prefix_len
-);NLM_EXTERN void FFCalculateLineBreak (
+);
+NLM_EXTERN int FFNextChar(
+ StringItemPtr start_sip,
+ Int4 start_pos
+);
+NLM_EXTERN void FFAdvanceChar(
+ StringItemPtr* start_sip,
+ Int4* start_pos
+);
+NLM_EXTERN void FFCalculateLineBreak (
StringItemPtr PNTR break_sip, Int4 PNTR break_pos,
Int4 init_indent, Int4 visible
);
@@ -1071,6 +1084,17 @@ NLM_EXTERN CharPtr goFieldType [];
NLM_EXTERN CharPtr legalDbXrefs [];
NLM_EXTERN CharPtr legalRefSeqDbXrefs [];
+NLM_EXTERN Int4 IsDbxrefValid (
+ CharPtr db,
+ SeqFeatPtr sfp,
+ OrgRefPtr org,
+ Boolean IsRefSeq,
+ CharPtr PNTR case_correction
+);
+
+
+NLM_EXTERN void AddAllDbxrefsToBioseq (BioseqPtr bsp);
+
NLM_EXTERN void AddRefStatsBlock (
Asn2gbWorkPtr awp
diff --git a/api/findrepl.c b/api/findrepl.c
index 641ff677..29855d04 100644
--- a/api/findrepl.c
+++ b/api/findrepl.c
@@ -40,130 +40,6 @@
*
* ==========================================================================
*
-*
-* RCS Modification History:
-* -------------------------
-* $Log: findrepl.c,v $
-* Revision 6.25 2006/10/25 21:38:25 kans
-* adding source qualifier metagenomic
-*
-* Revision 6.24 2006/08/31 16:34:32 kans
-* FindReplAuthor handles consortium, properly replaces pid->data, not pNameStr, for string choices
-*
-* Revision 6.23 2006/07/13 21:06:52 kans
-* SearchForString passes strLen - (ptr - str) to FindSubString when looping for whole_word
-*
-* Revision 6.22 2006/07/13 17:06:38 bollin
-* use Uint4 instead of Uint2 for itemID values
-* removed unused variables
-* resolved compiler warnings
-*
-* Revision 6.21 2006/01/17 17:50:01 bollin
-* allow FindReplaceInEntity to search for a string made up of whitespace, as
-* long as whole_word is not specified
-*
-* Revision 6.20 2006/01/10 18:13:56 kans
-* FindReplAligns does not have case for SAS_DISC, since visit function recursively presents these components separately
-*
-* Revision 6.19 2006/01/09 21:15:03 bollin
-* allow punctuation to terminate a word in find replace
-*
-* Revision 6.18 2006/01/04 21:26:57 kans
-* FSA hit does not need code from validator unstructured source test, cleaned up variable names
-*
-* Revision 6.17 2006/01/04 20:39:41 kans
-* added FindStringsInEntity using finite state machine, general cleanup of code
-*
-* Revision 6.16 2005/12/29 21:42:06 kans
-* only call callback if text was found or replaced
-*
-* Revision 6.15 2005/12/29 20:54:41 kans
-* FindReplaceInEntity takes callback and userdata
-*
-* Revision 6.14 2005/09/21 14:39:09 bollin
-* fixed bug in FindReplace where if the whole-word flag was specified but
-* the substring was found in a not-whole-word context earlier in the string
-* the search terminated early with a null result
-*
-* Revision 6.13 2005/04/26 21:33:52 kans
-* added SEQID_GPIPE
-*
-* Revision 6.12 2004/04/01 13:43:05 lavr
-* Spell "occurred", "occurrence", and "occurring"
-*
-* Revision 6.11 2003/11/21 17:58:46 bollin
-* remove tax ref and common name when changing taxonomy name via ASN Find/Replace
-*
-* Revision 6.10 2003/07/31 20:54:54 kans
-* FindReplaceString does not need do_replace argument
-*
-* Revision 6.9 2003/07/31 18:18:03 kans
-* added FindReplaceString
-*
-* Revision 6.8 2003/05/11 21:12:50 kans
-* FindReplAligns loops through StdSegPtr chain, also does ssp->ids within
-*
-* Revision 6.7 2002/06/11 14:41:20 kans
-* added support for locus_tag
-*
-* Revision 6.6 2002/03/05 21:11:04 kans
-* do not replace ifp->key
-*
-* Revision 6.5 2001/12/12 17:38:38 kans
-* added new subsource qualifiers, four now have empty name
-*
-* Revision 6.4 2001/12/07 13:49:34 kans
-* workingBuffer needs to be large enough for terminal null byte
-*
-* Revision 6.3 2001/08/06 22:13:12 kans
-* using NUM_SEQID, added TPA ids to arrays
-*
-* Revision 6.2 2000/11/03 20:36:00 kans
-* FindReplaceInEntity replaces FindInEntity and FindInEntityX - complete redesign,
-* no longer using AsnExpOptExplore because of the difficulty of replacing with a
-* larger string (TF + JK)
-*
-* Revision 6.1 1999/03/05 23:31:07 kans
-* FindInEntityX was not initializing flen, replen
-*
-* Revision 6.0 1997/08/25 18:05:38 madden
-* Revision changed to 6.0
-*
-* Revision 5.3 1997/06/19 18:37:41 vakatov
-* [WIN32,MSVC++] Adopted for the "NCBIOBJ.LIB" DLL'ization
-*
-* Revision 5.2 1997/03/17 23:44:39 kans
-* added whole_word parameter to FindInEntity and FindInEntityX, and protected
-* against multiple ObjMgrAlsoSelects on a single itemID
-*
-* Revision 5.1 1996/09/06 20:20:41 kans
-* keeps going even if ObjMgrTypeFind returns NULL (e.g., on OBJ_BIOSEQ_SEG),
-* and adds a case_counts parameter for case sensitive/insensitive searches.
-*
-* Revision 5.0 1996/05/28 13:23:23 ostell
-* Set to revision 5.0
-*
-* Revision 1.7 1996/02/28 04:53:06 ostell
-* fix to prevernt recursion on substring replaces
-*
-* Revision 1.6 1996/02/26 20:24:05 kans
-* replace needs MemCopy instead of StringMove (JO), and set dirty flag
-*
-* Revision 1.5 1996/01/03 23:06:32 ostell
-* support for longer replaces, controlled updating
-*
-* Revision 1.3 1996/01/02 18:40:07 ostell
-* simplified code.
-*
-* Revision 1.2 1996/01/01 00:05:14 kans
-* replaced StringStr with StringISearch to ignore case
-*
-* Revision 1.1 1995/12/31 18:13:14 kans
-* Initial revision
-*
-* Revision 1.1.1.1 1995/10/19 18:42:10 sad
-* Initial version
-*
*/
#include <ncbi.h>
@@ -176,7 +52,6 @@
#include <findrepl.h>
/* callback type for search/replace functions */
-
typedef void (*FindReplFunc) (CharPtr PNTR strp, Pointer fspdata);
/* internal data structure */
@@ -186,6 +61,7 @@ typedef struct findstruct {
FindReplFunc func;
FindReplProc callback;
Pointer userdata;
+ StringActionFunc string_action;
CharPtr find_string;
CharPtr replace_string;
@@ -1009,7 +885,7 @@ static void FindReplPubdesc (
}
}
-static void RemoveTaxRef (OrgRefPtr orp)
+extern void RemoveTaxRef (OrgRefPtr orp)
{
ValNodePtr vnp, next;
ValNodePtr PNTR prev;
@@ -1702,7 +1578,514 @@ static void FindReplSubmitBlock (
FindReplSendMessages (fsp, ssp->idx.itemID, ssp->idx.itemtype);
}
+
+NLM_EXTERN CharPtr GetSpecialWinCharacterReplacement (unsigned char ch)
+{
+ CharPtr r = "#";
+
+ if (ch == 198 || ch == 196)
+ {
+ r = "Ae";
+ }
+ else if (ch == 230 || ch == 228)
+ {
+ r = "ae";
+ }
+ else if (ch == 197)
+ {
+ r = "Aa";
+ }
+ else if (ch == 229)
+ {
+ r = "aa";
+ }
+ else if (ch == 220)
+ {
+ r = "Ue";
+ }
+ else if (ch == 252)
+ {
+ r = "ue";
+ }
+ else if (ch == 214)
+ {
+ r = "Oe";
+ }
+ else if (ch == 246)
+ {
+ r = "oe";
+ }
+ else if (ch == 223)
+ {
+ r = "ss";
+ }
+ else if (ch == 199)
+ {
+ r = "C";
+ }
+ else if (ch >= 200 && ch <= 203)
+ {
+ r = "E";
+ }
+ else if (ch >= 204 && ch <= 207)
+ {
+ r = "I";
+ }
+ else if (ch == 209)
+ {
+ r = "N";
+ }
+ else if ((ch >= 210 && ch <= 214) || ch == 216)
+ {
+ r = "O";
+ }
+ else if (ch >= 217 && ch <= 220)
+ {
+ r = "U";
+ }
+ else if (ch == 221)
+ {
+ r = "Y";
+ }
+ else if (ch >= 224 && ch <= 229)
+ {
+ r = "a";
+ }
+ else if (ch == 231)
+ {
+ r = "c";
+ }
+ else if (ch >= 232 && ch <= 235)
+ {
+ r = "e";
+ }
+ else if (ch >= 236 && ch <= 239)
+ {
+ r = "i";
+ }
+ else if (ch == 241)
+ {
+ r = "n";
+ }
+ else if ((ch >= 242 && ch <= 246) || ch == 248)
+ {
+ r = "o";
+ }
+ else if (ch >= 249 && ch <= 252)
+ {
+ r = "u";
+ }
+ else if (ch == 253 || ch == 255)
+ {
+ r = "y";
+ }
+ return r;
+}
+
+
+NLM_EXTERN CharPtr GetSpecialMacCharacterReplacement (unsigned char ch)
+{
+ CharPtr r = "#";
+
+ if (ch == 174 || ch == 128)
+ {
+ r = "Ae";
+ }
+ else if (ch == 190 || ch == 138)
+ {
+ r = "ae";
+ }
+ else if (ch == 129)
+ {
+ r = "Aa";
+ }
+ else if (ch == 140)
+ {
+ r = "aa";
+ }
+ else if (ch == 134)
+ {
+ r = "Ue";
+ }
+ else if (ch == 159)
+ {
+ r = "ue";
+ }
+ else if (ch == 133)
+ {
+ r = "Oe";
+ }
+ else if (ch == 154)
+ {
+ r = "oe";
+ }
+ else if (ch == 167)
+ {
+ r = "ss";
+ }
+ else if (ch == 130)
+ {
+ r = "C";
+ }
+ else if (ch == 233 || ch == 131 || ch == 230 || ch == 232)
+ {
+ r = "E";
+ }
+ else if (ch == 237 || ch == 234 || ch == 235 || ch == 236)
+ {
+ r = "I";
+ }
+ else if (ch == 132)
+ {
+ r = "N";
+ }
+ else if (ch == 241 || ch == 238 || ch == 239 || ch == 205 || ch == 133 || ch == 175)
+ {
+ r = "O";
+ }
+ else if (ch == 244 || ch == 242 || ch == 243 || ch == 134)
+ {
+ r = "U";
+ }
+ else if (ch == 136 || ch == 135 || ch == 137 || ch == 139 || ch == 138)
+ {
+ r = "a";
+ }
+ else if (ch == 141)
+ {
+ r = "c";
+ }
+ else if (ch == 143 || ch == 142 || ch == 144 || ch == 145)
+ {
+ r = "e";
+ }
+ else if (ch == 147 || ch == 146 || ch == 148 || ch == 149)
+ {
+ r = "i";
+ }
+ else if (ch == 150)
+ {
+ r = "n";
+ }
+ else if (ch == 152 || ch == 151 || ch == 153 || ch == 155 || ch == 154 || ch == 190)
+ {
+ r = "o";
+ }
+ else if (ch == 157 || ch == 156 || ch == 158 || ch == 159)
+ {
+ r = "u";
+ }
+ else if (ch == 216)
+ {
+ r = "y";
+ }
+ return r;
+}
+
+
+NLM_EXTERN CharPtr GetSpecialCharacterReplacement (unsigned char ch)
+
+{
+#ifdef WIN_MAC
+ return GetSpecialMacCharacterReplacement (ch);
+#endif
+#ifdef WIN_MSWIN
+ return GetSpecialWinCharacterReplacement (ch);
+#endif
+ return NULL;
+}
+
+
+NLM_EXTERN void SpecialCharFind (CharPtr PNTR strp, Pointer userdata, BoolPtr did_find, BoolPtr did_change)
+{
+ CharPtr cp;
+ Boolean found_any = FALSE;
+
+ if (strp == NULL || *strp == NULL) return;
+
+ cp = *strp;
+ while (*cp != 0 && !found_any)
+ {
+ if (*cp < ' ' || *cp > '~')
+ {
+ found_any = TRUE;
+ }
+ cp++;
+ }
+ if (found_any && did_find != NULL)
+ {
+ *did_find = TRUE;
+ }
+}
+
+
+NLM_EXTERN void SpecialCharReplace (CharPtr PNTR strp, Pointer userdata, BoolPtr did_find, BoolPtr did_change)
+{
+ Int4 orig_len, new_len, repl_len;
+ CharPtr cp, cpy, dst, repl;
+ Boolean found_any = FALSE;
+
+ if (strp == NULL || *strp == NULL) return;
+
+ /* count all characters that need two replacement characters */
+ cp = *strp;
+ orig_len = StringLen (cp);
+ new_len = orig_len;
+ while (*cp != 0)
+ {
+ new_len += abs (StringLen (GetSpecialCharacterReplacement ((unsigned char)*cp)) - 1);
+ if (*cp < ' ' || *cp > '~')
+ {
+ found_any = TRUE;
+ }
+ cp++;
+ }
+ if (!found_any)
+ {
+ return;
+ }
+
+ /* allocate memory for new string if necessary */
+ if (new_len > orig_len)
+ {
+ cpy = (CharPtr) MemNew (sizeof (Char) * (new_len + 1));
+ }
+ else
+ {
+ cpy = *strp;
+ }
+
+ /* copy in with replacements */
+ cp = *strp;
+ dst = cpy;
+ while (*cp != 0)
+ {
+ if ((unsigned char)*cp < ' ')
+ {
+ /* will replace with pound sign */
+ *dst = '#';
+ dst++;
+ }
+ else if ((unsigned char)*cp > '~')
+ {
+#if 0
+ repl = GetSpecialCharacterReplacement ((unsigned char)*cp);
+#else
+ repl = "#";
+#endif
+ repl_len = StringLen (repl);
+ StringNCpy (dst, repl, repl_len);
+ dst += repl_len;
+ }
+ else
+ {
+ *dst = *cp;
+ dst++;
+ }
+ cp++;
+ }
+ *dst = 0;
+
+ /* put new string in place of old string */
+ if (cpy != *strp)
+ {
+ *strp = MemFree (*strp);
+ *strp = cpy;
+ }
+ if (did_find != NULL)
+ {
+ *did_find = TRUE;
+ }
+ if (did_change != NULL)
+ {
+ *did_change = TRUE;
+ }
+}
+
+
+static void StringActionCallback (CharPtr PNTR strp, Pointer fspdata)
+{
+ FindStructPtr fsp;
+
+ if (strp == NULL || fspdata == NULL) return;
+
+ fsp = (FindStructPtr) fspdata;
+
+ if (fsp->string_action == NULL) return;
+ (fsp->string_action)(strp, fsp->userdata, &(fsp->did_find), &(fsp->dirty));
+}
+
+
/* EXTERNAL FIND-REPLACE FUNCTIONS */
+NLM_EXTERN void StringActionInEntity (
+ Uint2 entityID,
+ Boolean select_item,
+ Int2 send_update,
+ BoolPtr descFilter,
+ BoolPtr featFilter,
+ BoolPtr seqidFilter,
+ Boolean do_seqid_local,
+ StringActionFunc action_func,
+ FindReplProc callback,
+ Pointer userdata
+)
+
+{
+ FindStruct fs;
+ ObjMgrDataPtr omdp;
+ SeqEntryPtr sep = NULL;
+ SeqSubmitPtr ssp = NULL;
+
+ if (entityID == 0 || action_func == NULL) return;
+
+ omdp = ObjMgrGetData (entityID);
+ if (omdp != NULL) {
+ switch (omdp->datatype) {
+ case OBJ_SEQSUB :
+ ssp = (SeqSubmitPtr) omdp->dataptr;
+ if (ssp != NULL && ssp->datatype == 1) {
+ sep = (SeqEntryPtr) ssp->data;
+ }
+ break;
+ case OBJ_BIOSEQ :
+ sep = (SeqEntryPtr) omdp->choice;
+ case OBJ_BIOSEQSET :
+ sep = (SeqEntryPtr) omdp->choice;
+ default :
+ break;
+ }
+ }
+ /* sep = GetTopSeqEntryForEntityID (entityID); */
+ if (sep == NULL) return;
+
+ MemSet ((Pointer) &fs, 0, sizeof (FindStruct));
+
+ fs.entityID = entityID;
+ fs.func = StringActionCallback;
+ fs.callback = callback;
+ fs.userdata = userdata;
+ fs.string_action = action_func;
+
+ fs.select_item = select_item;
+ fs.send_update = send_update;
+ fs.dirty = FALSE;
+
+ /* if desc or feat filter arrays not supplied, default to all TRUE */
+
+ if (descFilter != NULL) {
+ MemCopy ((Pointer) &fs.descFilter, (Pointer) descFilter, sizeof (fs.descFilter));
+ } else {
+ MemSet ((Pointer) &fs.descFilter, (int) TRUE, sizeof (fs.descFilter));
+ }
+
+ if (featFilter != NULL) {
+ MemCopy ((Pointer) &fs.featFilter, (Pointer) featFilter, sizeof (fs.featFilter));
+ } else {
+ MemSet ((Pointer) &fs.featFilter, (int) TRUE, sizeof (fs.featFilter));
+ }
+
+ /* if seqid filter array not supplied, default to all FALSE */
+
+ if (seqidFilter != NULL) {
+ MemCopy ((Pointer) &fs.seqidFilter, (Pointer) seqidFilter, sizeof (fs.seqidFilter));
+ } else if (do_seqid_local) {
+ MemSet ((Pointer) &fs.seqidFilter, (int) FALSE, sizeof (fs.seqidFilter));
+ fs.seqidFilter [SEQID_LOCAL] = TRUE;
+ } else {
+ MemSet ((Pointer) &fs.seqidFilter, (int) FALSE, sizeof (fs.seqidFilter));
+ }
+
+ /* ensure feature subtype is set in sfp->idx block */
+
+ AssignIDsInEntity (entityID, 0, NULL);
+
+ /* visit callbacks that find/replace specific fields */
+
+ VisitBioseqsInSep (sep, (Pointer) &fs, FindReplBioseqs);
+
+ VisitFeaturesInSep (sep, (Pointer) &fs, FindReplFeats);
+
+ VisitAlignmentsInSep (sep, (Pointer) &fs, FindReplAligns);
+
+ VisitGraphsInSep (sep, (Pointer) &fs, FindReplGraphs);
+
+ VisitDescriptorsInSep (sep, (Pointer) &fs, FindReplDescs);
+
+ if (ssp != NULL) {
+ FindReplSubmitBlock (ssp, &fs);
+ }
+
+ /* send select message, if applicable */
+
+ if (fs.send_update == UPDATE_ONCE && fs.dirty) {
+ ObjMgrSetDirtyFlag (entityID, TRUE);
+ ObjMgrSendMsg (OM_MSG_UPDATE, entityID, 0, 0);
+ }
+}
+
+NLM_EXTERN void StringActionForObject (
+ Uint2 datatype,
+ Pointer objdata,
+ Uint2 entityID,
+ Boolean select_item,
+ Int2 send_update,
+ StringActionFunc action_func,
+ FindReplProc callback,
+ Pointer userdata
+)
+
+{
+ FindStruct fs;
+
+ if (objdata == NULL || action_func == NULL) return;
+
+ MemSet ((Pointer) &fs, 0, sizeof (FindStruct));
+
+ fs.entityID = entityID;
+ fs.func = StringActionCallback;
+ fs.callback = callback;
+ fs.userdata = userdata;
+ fs.string_action = action_func;
+
+ fs.select_item = select_item;
+ fs.send_update = send_update;
+ fs.dirty = FALSE;
+
+ MemSet ((Pointer) &fs.descFilter, (int) TRUE, sizeof (fs.descFilter));
+
+ MemSet ((Pointer) &fs.featFilter, (int) TRUE, sizeof (fs.featFilter));
+
+ MemSet ((Pointer) &fs.seqidFilter, (int) FALSE, sizeof (fs.seqidFilter));
+
+ switch (datatype)
+ {
+ case OBJ_BIOSEQ:
+ FindReplBioseqs ((BioseqPtr) objdata, &fs);
+ break;
+ case OBJ_SEQFEAT:
+ FindReplFeats ((SeqFeatPtr) objdata, &fs);
+ break;
+ case OBJ_SEQALIGN:
+ FindReplAligns ((SeqAlignPtr) objdata, &fs);
+ break;
+ case OBJ_SEQGRAPH:
+ FindReplGraphs ((SeqGraphPtr) objdata, &fs);
+ break;
+ case OBJ_SEQDESC:
+ FindReplDescs ((SeqDescrPtr) objdata, &fs);
+ break;
+ case OBJ_SEQSUB:
+ FindReplSubmitBlock ((SeqSubmitPtr) objdata, &fs);
+ break;
+ }
+
+ /* send select message, if applicable */
+
+ if (fs.send_update == UPDATE_ONCE && fs.dirty) {
+ ObjMgrSetDirtyFlag (entityID, TRUE);
+ ObjMgrSendMsg (OM_MSG_UPDATE, entityID, 0, 0);
+ }
+}
/*=======================================================================*/
/* */
diff --git a/api/findrepl.h b/api/findrepl.h
index 9c17a470..3fff5a5b 100644
--- a/api/findrepl.h
+++ b/api/findrepl.h
@@ -41,52 +41,6 @@
* ==========================================================================
*
*
-* RCS Modification History:
-* -------------------------
-* $Log: findrepl.h,v $
-* Revision 6.6 2006/07/13 18:17:17 bollin
-* use Uint4 instead of Uint2 for itemID values
-*
-* Revision 6.5 2006/01/04 20:39:41 kans
-* added FindStringsInEntity using finite state machine, general cleanup of code
-*
-* Revision 6.4 2005/12/29 20:54:41 kans
-* FindReplaceInEntity takes callback and userdata
-*
-* Revision 6.3 2003/07/31 20:54:54 kans
-* FindReplaceString does not need do_replace argument
-*
-* Revision 6.2 2003/07/31 18:18:03 kans
-* added FindReplaceString
-*
-* Revision 6.1 2000/11/03 20:36:00 kans
-* FindReplaceInEntity replaces FindInEntity and FindInEntityX - complete redesign, no longer using AsnExpOptExplore because of the difficulty of replacing with a larger string (TF + JK)
-*
-* Revision 6.0 1997/08/25 18:05:40 madden
-* Revision changed to 6.0
-*
-* Revision 5.3 1997/06/19 18:37:43 vakatov
-* [WIN32,MSVC++] Adopted for the "NCBIOBJ.LIB" DLL'ization
-*
-* Revision 5.2 1997/03/17 23:44:39 kans
-* added whole_word parameter to FindInEntity and FindInEntityX
-*
- * Revision 5.1 1996/09/06 20:20:41 kans
- * keeps going even if ObjMgrTypeFind returns NULL (e.g., on OBJ_BIOSEQ_SEG),
- * and adds a case_counts parameter for case sensitive/insensitive searches.
- *
- * Revision 5.0 1996/05/28 13:23:23 ostell
- * Set to revision 5.0
- *
- * Revision 1.3 1996/01/03 23:06:32 ostell
- * support for longer replaces, controlled updating
- *
- * Revision 1.1 1995/12/31 18:13:14 kans
- * Initial revision
- *
-* Revision 1.1.1.1 1995/10/19 18:42:10 sad
-* Initial version
-*
*/
#ifndef __FINDREPL_H__
@@ -114,6 +68,38 @@ extern "C" {
typedef void (*FindReplProc) (Uint2 entityID, Uint4 itemID, Uint2 itemtype, Pointer userdata);
+typedef void (*StringActionFunc) (CharPtr PNTR strp, Pointer userdata, BoolPtr did_find, BoolPtr did_change);
+/* EXTERNAL FIND-REPLACE FUNCTIONS */
+NLM_EXTERN void StringActionInEntity (
+ Uint2 entityID,
+ Boolean select_item,
+ Int2 send_update,
+ BoolPtr descFilter,
+ BoolPtr featFilter,
+ BoolPtr seqidFilter,
+ Boolean do_seqid_local,
+ StringActionFunc action_func,
+ FindReplProc callback,
+ Pointer userdata
+);
+
+NLM_EXTERN void StringActionForObject (
+ Uint2 datatype,
+ Pointer objdata,
+ Uint2 entityID,
+ Boolean select_item,
+ Int2 send_update,
+ StringActionFunc action_func,
+ FindReplProc callback,
+ Pointer userdata
+);
+
+NLM_EXTERN void SpecialCharReplace (CharPtr PNTR strp, Pointer userdata, BoolPtr did_find, BoolPtr did_change);
+NLM_EXTERN void SpecialCharFind (CharPtr PNTR strp, Pointer userdata, BoolPtr did_find, BoolPtr did_change);
+NLM_EXTERN CharPtr GetSpecialCharacterReplacement (unsigned char ch);
+NLM_EXTERN CharPtr GetSpecialWinCharacterReplacement (unsigned char ch);
+NLM_EXTERN CharPtr GetSpecialMacCharacterReplacement (unsigned char ch);
+
NLM_EXTERN void FindReplaceInEntity (
Uint2 entityID,
CharPtr find_string,
@@ -155,6 +141,9 @@ NLM_EXTERN void FindStringsInEntity (
);
+extern void RemoveTaxRef (OrgRefPtr orp);
+
+
#ifdef __cplusplus
extern "C" }
#endif /* __cplusplus */
diff --git a/api/gbftglob.c b/api/gbftglob.c
index c5d1f0c0..be11dd91 100644
--- a/api/gbftglob.c
+++ b/api/gbftglob.c
@@ -247,12 +247,11 @@ static SematicFeat STATIC__ParFlat_GBFeat[ParFlat_TOTAL_GBFEAT] = {
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}},
- {"misc_recomb", 0, {-1, -1, -1, -1, -1}, 16,
+ {"misc_recomb", 0, {-1, -1, -1, -1, -1}, 15,
{GBQUAL_citation, GBQUAL_db_xref, GBQUAL_evidence, GBQUAL_experiment, GBQUAL_inference, GBQUAL_gene,
- GBQUAL_label, GBQUAL_map, GBQUAL_note, GBQUAL_organism,
- GBQUAL_partial, GBQUAL_standard_name, GBQUAL_usedin,
+ GBQUAL_label, GBQUAL_map, GBQUAL_note, GBQUAL_partial, GBQUAL_standard_name, GBQUAL_usedin,
GBQUAL_locus_tag, GBQUAL_old_locus_tag, GBQUAL_allele,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}},
{"misc_RNA", 0, {-1, -1, -1, -1, -1}, 20,
@@ -388,12 +387,12 @@ static SematicFeat STATIC__ParFlat_GBFeat[ParFlat_TOTAL_GBFEAT] = {
GBQUAL_bound_moiety, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}},
- {"protein_bind", 1, {GBQUAL_bound_moiety, -1, -1, -1, -1}, 16,
+ {"protein_bind", 1, {GBQUAL_bound_moiety, -1, -1, -1, -1}, 17,
{GBQUAL_citation, GBQUAL_db_xref, GBQUAL_evidence, GBQUAL_experiment, GBQUAL_inference, GBQUAL_function,
GBQUAL_gene, GBQUAL_label, GBQUAL_map, GBQUAL_note, GBQUAL_partial,
GBQUAL_standard_name, GBQUAL_usedin,
GBQUAL_locus_tag, GBQUAL_old_locus_tag, GBQUAL_allele,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ GBQUAL_operon, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}},
{"RBS", 0, {-1, -1, -1, -1, -1}, 15,
@@ -486,7 +485,7 @@ static SematicFeat STATIC__ParFlat_GBFeat[ParFlat_TOTAL_GBFEAT] = {
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}},
- {"source", 1, {GBQUAL_organism, -1, -1, -1, -1}, 59,
+ {"source", 1, {GBQUAL_organism, -1, -1, -1, -1}, 61,
{GBQUAL_cell_line, GBQUAL_cell_type, GBQUAL_chloroplast,
GBQUAL_chromoplast, GBQUAL_chromosome,
GBQUAL_citation, GBQUAL_clone, GBQUAL_clone_lib, GBQUAL_country, GBQUAL_cultivar,
@@ -503,7 +502,8 @@ static SematicFeat STATIC__ParFlat_GBFeat[ParFlat_TOTAL_GBFEAT] = {
GBQUAL_organelle, GBQUAL_transgenic, GBQUAL_environmental_sample,
GBQUAL_isolation_source, GBQUAL_serovar, GBQUAL_mol_type, GBQUAL_segment,
GBQUAL_ecotype, GBQUAL_collected_by, GBQUAL_collection_date, GBQUAL_identified_by,
- GBQUAL_lat_lon, GBQUAL_PCR_primers, GBQUAL_metagenomic, -1, -1, -1, -1, -1, -1}},
+ GBQUAL_lat_lon, GBQUAL_PCR_primers, GBQUAL_metagenomic, GBQUAL_culture_collection,
+ GBQUAL_bio_material, -1, -1, -1, -1}},
{"stem_loop", 0, {-1, -1, -1, -1, -1}, 17,
{GBQUAL_citation, GBQUAL_db_xref, GBQUAL_evidence, GBQUAL_experiment, GBQUAL_inference, GBQUAL_function,
GBQUAL_gene, GBQUAL_label, GBQUAL_map, GBQUAL_note, GBQUAL_partial,
@@ -535,12 +535,12 @@ static SematicFeat STATIC__ParFlat_GBFeat[ParFlat_TOTAL_GBFEAT] = {
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}},
- {"tmRNA", 0, {-1, -1, -1, -1, -1}, 19,
+ {"tmRNA", 0, {-1, -1, -1, -1, -1}, 20,
{GBQUAL_citation, GBQUAL_db_xref, GBQUAL_evidence, GBQUAL_experiment, GBQUAL_inference, GBQUAL_function,
GBQUAL_gene, GBQUAL_label, GBQUAL_map, GBQUAL_note, GBQUAL_partial, GBQUAL_product,
GBQUAL_pseudo, GBQUAL_standard_name, GBQUAL_usedin,
- GBQUAL_locus_tag, GBQUAL_old_locus_tag, GBQUAL_allele, GBQUAL_operon,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ GBQUAL_locus_tag, GBQUAL_old_locus_tag, GBQUAL_allele, GBQUAL_operon, GBQUAL_tag_peptide,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}},
{"transit_peptide", 0, {-1, -1, -1, -1, -1}, 18,
diff --git a/api/macroapi.c b/api/macroapi.c
new file mode 100755
index 00000000..28bdf3d3
--- /dev/null
+++ b/api/macroapi.c
@@ -0,0 +1,11254 @@
+/* macro.c
+* ===========================================================================
+*
+* PUBLIC DOMAIN NOTICE
+* National Center for Biotechnology Information (NCBI)
+*
+* This software/database is a "United States Government Work" under the
+* terms of the United States Copyright Act. It was written as part of
+* the author's official duties as a United States Government employee and
+* thus cannot be copyrighted. This software/database is freely available
+* to the public for use. The National Library of Medicine and the U.S.
+* Government do not place any restriction on its use or reproduction.
+* We would, however, appreciate having the NCBI and the author cited in
+* any work or product based on this material
+*
+* Although all reasonable efforts have been taken to ensure the accuracy
+* and reliability of the software and data, the NLM and the U.S.
+* Government do not and cannot warrant the performance or results that
+* may be obtained by using this software or data. The NLM and the U.S.
+* Government disclaim all warranties, express or implied, including
+* warranties of performance, merchantability or fitness for any particular
+* purpose.
+*
+* ===========================================================================
+*
+* File Name: macro.c
+*
+* Author: Colleen Bollin
+*
+* Version Creation Date: 11/8/2007
+*
+* $Revision: 1.58 $
+*
+* File Description:
+*
+* Modifications:
+* --------------------------------------------------------------------------
+* Date Name Description of modification
+* ------- ---------- -----------------------------------------------------
+*
+*
+* ==========================================================================
+*/
+
+#include <asn.h>
+#include <objmacro.h>
+#include <objfeat.h>
+#include <subutil.h>
+#include <objmgr.h>
+#include <objfdef.h>
+#include <gbftdef.h>
+#include <sqnutils.h>
+#include <edutil.h>
+#include <gather.h>
+#include <asn2gnbi.h>
+#define NLM_GENERATED_CODE_PROTO
+#include <macroapi.h>
+#include <seqport.h>
+
+/* structure and create/free functions for CGPSet, used for handling CDS-Gene-Prot sets */
+typedef struct cgpset
+{
+ ValNodePtr cds_list;
+ ValNodePtr gene_list;
+ ValNodePtr prot_list;
+ ValNodePtr mrna_list;
+} CGPSetData, PNTR CGPSetPtr;
+
+
+
+static CGPSetPtr CGPSetNew (void)
+{
+ CGPSetPtr c;
+
+ c = (CGPSetPtr) MemNew (sizeof (CGPSetData));
+ c->cds_list = NULL;
+ c->gene_list = NULL;
+ c->prot_list = NULL;
+ c->mrna_list = NULL;
+ return c;
+}
+
+
+static CGPSetPtr CGPSetFree (CGPSetPtr c)
+{
+ if (c != NULL) {
+ c->cds_list = ValNodeFree (c->cds_list);
+ c->gene_list = ValNodeFree (c->gene_list);
+ c->prot_list = ValNodeFree (c->prot_list);
+ c->mrna_list = ValNodeFree (c->mrna_list);
+ c = MemFree (c);
+ }
+ return c;
+}
+
+
+static ValNodePtr FreeCGPSetList (ValNodePtr vnp)
+{
+ ValNodePtr vnp_next;
+
+ while (vnp != NULL) {
+ vnp_next = vnp->next;
+ vnp->next = NULL;
+ vnp->data.ptrvalue = CGPSetFree (vnp->data.ptrvalue);
+ vnp = ValNodeFree (vnp);
+ vnp = vnp_next;
+ }
+ return NULL;
+}
+
+
+/* generic functions for mapping constraints */
+
+typedef struct feattypefeatdef {
+ Int4 feattype;
+ Int4 featdef;
+ CharPtr featname;
+} FeatTypeFeatDefData, PNTR FeatTypeFeatDefPtr;
+
+static FeatTypeFeatDefData feattype_featdef[] = {
+ { Feature_type_any , FEATDEF_ANY , "any" } ,
+ { Feature_type_gene , FEATDEF_GENE , "gene" } ,
+ { Feature_type_org , FEATDEF_ORG , "org" } ,
+ { Feature_type_cds , FEATDEF_CDS , "CDS" } ,
+ { Feature_type_prot , FEATDEF_PROT , "Protein" } ,
+ { Feature_type_preRNA , FEATDEF_preRNA , "preRNA" } ,
+ { Feature_type_mRNA , FEATDEF_mRNA , "mRNA" } ,
+ { Feature_type_tRNA , FEATDEF_tRNA , "tRNA" } ,
+ { Feature_type_rRNA , FEATDEF_rRNA , "rRNA" } ,
+ { Feature_type_snRNA , FEATDEF_snRNA , "snRNA" } ,
+ { Feature_type_scRNA , FEATDEF_scRNA , "scRNA" } ,
+ { Feature_type_otherRNA , FEATDEF_otherRNA , "misc_RNA" } ,
+ { Feature_type_pub , FEATDEF_PUB , "pub" } ,
+ { Feature_type_seq , FEATDEF_SEQ , "seq" } ,
+ { Feature_type_imp , FEATDEF_IMP , "imp" } ,
+ { Feature_type_allele , FEATDEF_allele , "allele" } ,
+ { Feature_type_attenuator , FEATDEF_attenuator , "attenuator" } ,
+ { Feature_type_c_region , FEATDEF_C_region , "c_region" } ,
+ { Feature_type_caat_signal , FEATDEF_CAAT_signal , "caat_signal" } ,
+ { Feature_type_imp_CDS , FEATDEF_Imp_CDS , "imp_CDS" } ,
+ { Feature_type_conflict , FEATDEF_conflict , "conflict" } ,
+ { Feature_type_d_loop , FEATDEF_D_loop , "d_loop" } ,
+ { Feature_type_d_segment , FEATDEF_D_segment , "d_segment" } ,
+ { Feature_type_enhancer , FEATDEF_enhancer , "enhancer" } ,
+ { Feature_type_exon , FEATDEF_exon , "exon" } ,
+ { Feature_type_gC_signal , FEATDEF_GC_signal , "gC_signal" } ,
+ { Feature_type_iDNA , FEATDEF_iDNA , "iDNA" } ,
+ { Feature_type_intron , FEATDEF_intron , "intron" } ,
+ { Feature_type_j_segment , FEATDEF_J_segment , "j_segment" } ,
+ { Feature_type_ltr , FEATDEF_LTR , "ltr" } ,
+ { Feature_type_mat_peptide , FEATDEF_mat_peptide , "mat_peptide" } ,
+ { Feature_type_misc_binding , FEATDEF_misc_binding , "misc_binding" } ,
+ { Feature_type_misc_difference , FEATDEF_misc_difference , "misc_difference" } ,
+ { Feature_type_misc_feature , FEATDEF_misc_feature , "misc_feature" } ,
+ { Feature_type_misc_recomb , FEATDEF_misc_recomb , "misc_recomb" } ,
+ { Feature_type_misc_RNA , FEATDEF_misc_RNA , "misc_RNA" } ,
+ { Feature_type_misc_signal , FEATDEF_misc_signal , "misc_signal" } ,
+ { Feature_type_misc_structure , FEATDEF_misc_structure , "misc_structure" } ,
+ { Feature_type_modified_base , FEATDEF_modified_base , "modified_base" } ,
+ { Feature_type_mutation , FEATDEF_mutation , "mutation" } ,
+ { Feature_type_n_region , FEATDEF_N_region , "n_region" } ,
+ { Feature_type_old_sequence , FEATDEF_old_sequence , "old_sequence" } ,
+ { Feature_type_polyA_signal , FEATDEF_polyA_signal , "polyA_signal" } ,
+ { Feature_type_polyA_site , FEATDEF_polyA_site , "polyA_site" } ,
+ { Feature_type_precursor_RNA , FEATDEF_precursor_RNA , "precursor_RNA" } ,
+ { Feature_type_prim_transcript , FEATDEF_prim_transcript , "prim_transcript" } ,
+ { Feature_type_primer_bind , FEATDEF_primer_bind , "primer_bind" } ,
+ { Feature_type_promoter , FEATDEF_promoter , "promoter" } ,
+ { Feature_type_protein_bind , FEATDEF_protein_bind , "protein_bind" } ,
+ { Feature_type_rbs , FEATDEF_RBS , "rbs" } ,
+ { Feature_type_repeat_region , FEATDEF_repeat_region , "repeat_region" } ,
+ { Feature_type_repeat_unit , FEATDEF_repeat_unit , "repeat_unit" } ,
+ { Feature_type_rep_origin , FEATDEF_rep_origin , "rep_origin" } ,
+ { Feature_type_s_region , FEATDEF_S_region , "s_region" } ,
+ { Feature_type_satellite , FEATDEF_satellite , "satellite" } ,
+ { Feature_type_sig_peptide , FEATDEF_sig_peptide , "sig_peptide" } ,
+ { Feature_type_source , FEATDEF_source , "source" } ,
+ { Feature_type_stem_loop , FEATDEF_stem_loop , "stem_loop" } ,
+ { Feature_type_sts , FEATDEF_STS , "sts" } ,
+ { Feature_type_tata_signal , FEATDEF_TATA_signal , "tata_signal" } ,
+ { Feature_type_terminator , FEATDEF_terminator , "terminator" } ,
+ { Feature_type_transit_peptide , FEATDEF_transit_peptide , "transit_peptide" } ,
+ { Feature_type_unsure , FEATDEF_unsure , "unsure" } ,
+ { Feature_type_v_region , FEATDEF_V_region , "v_region" } ,
+ { Feature_type_v_segment , FEATDEF_V_segment , "v_segment" } ,
+ { Feature_type_variation , FEATDEF_variation , "variation" } ,
+ { Feature_type_virion , FEATDEF_virion , "virion" } ,
+ { Feature_type_n3clip , FEATDEF_3clip , "3clip" } ,
+ { Feature_type_n3UTR , FEATDEF_3UTR , "3UTR" } ,
+ { Feature_type_n5clip , FEATDEF_5clip , "5clip" } ,
+ { Feature_type_n5UTR , FEATDEF_5UTR , "5UTR" } ,
+ { Feature_type_n10_signal , FEATDEF_10_signal , "10_signal" } ,
+ { Feature_type_n35_signal , FEATDEF_35_signal , "35_signal" } ,
+ { Feature_type_site_ref , FEATDEF_site_ref , "site_ref" } ,
+ { Feature_type_region , FEATDEF_REGION , "region" } ,
+ { Feature_type_comment , FEATDEF_COMMENT , "comment" } ,
+ { Feature_type_bond , FEATDEF_BOND , "bond" } ,
+ { Feature_type_site , FEATDEF_SITE , "site" } ,
+ { Feature_type_rsite , FEATDEF_RSITE , "rsite" } ,
+ { Feature_type_user , FEATDEF_USER , "user" } ,
+ { Feature_type_txinit , FEATDEF_TXINIT , "txinit" } ,
+ { Feature_type_num , FEATDEF_NUM , "num" } ,
+ { Feature_type_psec_str , FEATDEF_PSEC_STR , "psec_str" } ,
+ { Feature_type_non_std_residue , FEATDEF_NON_STD_RESIDUE , "non_std_residue" } ,
+ { Feature_type_het , FEATDEF_HET , "het" } ,
+ { Feature_type_biosrc , FEATDEF_BIOSRC , "biosrc" } ,
+ { Feature_type_preprotein , FEATDEF_preprotein , "preprotein" } ,
+ { Feature_type_mat_peptide_aa , FEATDEF_mat_peptide_aa , "mat_peptide_aa" } ,
+ { Feature_type_sig_peptide_aa , FEATDEF_sig_peptide_aa , "sig_peptide_aa" } ,
+ { Feature_type_transit_peptide_aa , FEATDEF_transit_peptide_aa , "transit_peptide_aa" } ,
+ { Feature_type_snoRNA , FEATDEF_snoRNA , "snoRNA" } ,
+ { Feature_type_gap , FEATDEF_gap , "gap" } ,
+ { Feature_type_operon , FEATDEF_operon , "operon" } ,
+ { Feature_type_oriT , FEATDEF_oriT , "oriT" } ,
+ { Feature_type_ncRNA , FEATDEF_ncRNA , "ncRNA" } ,
+ { Feature_type_tmRNA , FEATDEF_tmRNA , "tmRNA" }};
+
+#define NUM_feattype_featdef sizeof (feattype_featdef) / sizeof (FeatTypeFeatDefData)
+
+NLM_EXTERN Int4 GetFeatdefFromFeatureType (Int4 feature_type)
+{
+ Int4 i;
+
+ for (i = 0; i < NUM_feattype_featdef; i++) {
+ if (feature_type == feattype_featdef[i].feattype) {
+ return feattype_featdef[i].featdef;
+ }
+ }
+ return FEATDEF_BAD;
+}
+
+
+NLM_EXTERN CharPtr GetFeatureNameFromFeatureType (Int4 feature_type)
+{
+ CharPtr str = NULL;
+ Int4 i;
+
+ for (i = 0; i < NUM_feattype_featdef && str == NULL; i++) {
+ if (feature_type == feattype_featdef[i].feattype) {
+ str = feattype_featdef[feature_type].featname;
+ }
+ }
+ if (str == NULL) {
+ str = "Unknown feature type";
+ }
+ return str;
+}
+
+
+static Boolean Matchnamestring (CharPtr name1, CharPtr name2)
+{
+ if (name1 == NULL && name2 == NULL) {
+ return TRUE;
+ } else if (name1 == NULL || name2 == NULL) {
+ return FALSE;
+ } else {
+ while (*name1 != 0 && *name2 != 0) {
+ while (*name1 == ' ' || *name1 == '-' || *name1 == '_') {
+ name1++;
+ }
+ while (*name2 == ' ' || *name2 == '-' || *name2 == '_') {
+ name2++;
+ }
+ if (*name1 != *name2) {
+ return FALSE;
+ }
+ name1++;
+ name2++;
+ }
+ if (*name1 == 0 && *name2 == 0) {
+ return TRUE;
+ } else {
+ return FALSE;
+ }
+ }
+}
+
+
+NLM_EXTERN Int4 GetFeatureTypeByName (CharPtr feat_name)
+{
+ Int4 i;
+
+ for (i = 0; i < NUM_feattype_featdef; i++) {
+ if (Matchnamestring (feattype_featdef[i].featname, feat_name)) {
+ return feattype_featdef[i].feattype;
+ }
+ }
+ return -1;
+}
+
+
+NLM_EXTERN void AddImportFeaturesToChoiceList (ValNodePtr PNTR feature_type_list)
+{
+ Int4 i, seqfeattype;
+ CharPtr featname;
+ ValNodePtr tmp_list = NULL;
+
+ for (i = 1; i < NUM_feattype_featdef; i++) {
+ if (feattype_featdef[i].feattype == Feature_type_gap) continue;
+ seqfeattype = FindFeatFromFeatDefType (feattype_featdef[i].featdef);
+ if (seqfeattype == SEQFEAT_IMP) {
+ featname = GetFeatureNameFromFeatureType (feattype_featdef[i].feattype);
+ if (featname != NULL) {
+ ValNodeAddPointer (&tmp_list, feattype_featdef[i].feattype, StringSave (featname));
+ }
+ }
+ }
+ tmp_list = ValNodeSort (tmp_list, SortVnpByString);
+ ValNodeLink (feature_type_list, tmp_list);
+}
+
+
+
+static Boolean IsMostUsedFeature (Uint1 val)
+{
+ if (val == Feature_type_gene
+ || val == Feature_type_cds
+ || val == Feature_type_prot
+ || val == Feature_type_exon
+ || val == Feature_type_intron
+ || val == Feature_type_mRNA
+ || val == Feature_type_rRNA
+ || val == Feature_type_otherRNA) {
+ return TRUE;
+ } else {
+ return FALSE;
+ }
+}
+
+
+static int LIBCALLBACK SortVnpByFeatureName (VoidPtr ptr1, VoidPtr ptr2)
+
+{
+ CharPtr str1;
+ CharPtr str2;
+ ValNodePtr vnp1;
+ ValNodePtr vnp2;
+ Boolean most_used1, most_used2;
+
+ if (ptr1 != NULL && ptr2 != NULL) {
+ vnp1 = *((ValNodePtr PNTR) ptr1);
+ vnp2 = *((ValNodePtr PNTR) ptr2);
+ if (vnp1 != NULL && vnp2 != NULL) {
+ most_used1 = IsMostUsedFeature (vnp1->choice);
+ most_used2 = IsMostUsedFeature (vnp2->choice);
+ if (most_used1 && !most_used2) {
+ return -1;
+ } else if (!most_used1 && most_used2) {
+ return 1;
+ } else {
+ str1 = (CharPtr) vnp1->data.ptrvalue;
+ str2 = (CharPtr) vnp2->data.ptrvalue;
+ if (str1 != NULL && str2 != NULL) {
+ return StringICmp (str1, str2);
+ }
+ }
+ }
+ }
+ return 0;
+}
+
+
+NLM_EXTERN void AddAllFeaturesToChoiceList (ValNodePtr PNTR feature_type_list)
+{
+ Int4 i;
+ CharPtr featname;
+ ValNodePtr tmp_list = NULL;
+
+ for (i = 1; i < NUM_feattype_featdef; i++) {
+ if (feattype_featdef[i].feattype == Feature_type_gap) continue;
+ featname = GetFeatureNameFromFeatureType (feattype_featdef[i].feattype);
+ if (featname != NULL) {
+ ValNodeAddPointer (&tmp_list, feattype_featdef[i].feattype, StringSave (featname));
+ }
+ }
+ tmp_list = ValNodeSort (tmp_list, SortVnpByFeatureName);
+ ValNodeLink (feature_type_list, tmp_list);
+}
+
+
+typedef struct featqualgbqual {
+ Int4 featqual;
+ Int4 gbqual;
+ CharPtr qualname;
+} FeatQualGBQualData, PNTR FeatQualGBQualPtr;
+
+static FeatQualGBQualData featqual_gbqual[] = {
+ { Feat_qual_legal_allele , GBQUAL_allele , "allele" } ,
+ { Feat_qual_legal_anticodon , GBQUAL_anticodon , "anticodon" } ,
+ { Feat_qual_legal_bound_moiety , GBQUAL_bound_moiety , "bound-moiety" } ,
+ { Feat_qual_legal_chromosome , GBQUAL_chromosome , "chromosome" } ,
+ { Feat_qual_legal_citation , GBQUAL_citation , "citation" } ,
+ { Feat_qual_legal_codon , GBQUAL_codon , "codon" } ,
+ { Feat_qual_legal_codon_start , GBQUAL_codon_start , "codon-start" } ,
+ { Feat_qual_legal_compare , GBQUAL_compare , "compare" } ,
+ { Feat_qual_legal_cons_splice , GBQUAL_cons_splice , "cons-splice" } ,
+ { Feat_qual_legal_db_xref , GBQUAL_db_xref , "db-xref" } ,
+ { Feat_qual_legal_direction , GBQUAL_direction , "direction" } ,
+ { Feat_qual_legal_environmental_sample , GBQUAL_environmental_sample , "environmental-sample" } ,
+ { Feat_qual_legal_evidence , GBQUAL_evidence , "evidence" } ,
+ { Feat_qual_legal_exception , GBQUAL_exception , "exception" } ,
+ { Feat_qual_legal_experiment , GBQUAL_experiment , "experiment" } ,
+ { Feat_qual_legal_focus , GBQUAL_focus , "focus" } ,
+ { Feat_qual_legal_frequency , GBQUAL_frequency , "frequency" } ,
+ { Feat_qual_legal_function , GBQUAL_function , "function" } ,
+ { Feat_qual_legal_gene , GBQUAL_gene , "locus" } ,
+ { Feat_qual_legal_inference , GBQUAL_inference , "inference" } ,
+ { Feat_qual_legal_label , GBQUAL_label , "label" } ,
+ { Feat_qual_legal_locus_tag , GBQUAL_locus_tag , "locus-tag" } ,
+ { Feat_qual_legal_map , GBQUAL_map , "map" } ,
+ { Feat_qual_legal_mobile_element , GBQUAL_mobile_element , "mobile-element" } ,
+ { Feat_qual_legal_mod_base , GBQUAL_mod_base , "mod-base" } ,
+ { Feat_qual_legal_mol_type , GBQUAL_mol_type , "mol-type" } ,
+ { Feat_qual_legal_ncRNA_class , GBQUAL_ncRNA_class , "ncRNA-class" } ,
+ { Feat_qual_legal_note , GBQUAL_note , "note" } ,
+ { Feat_qual_legal_number , GBQUAL_number , "number" } ,
+ { Feat_qual_legal_old_locus_tag , GBQUAL_old_locus_tag , "old-locus-tag" } ,
+ { Feat_qual_legal_operon , GBQUAL_operon , "operon" } ,
+ { Feat_qual_legal_organism , GBQUAL_organism , "organism" } ,
+ { Feat_qual_legal_organelle , GBQUAL_organelle , "organelle" } ,
+ { Feat_qual_legal_partial , GBQUAL_partial , "partial" } ,
+ { Feat_qual_legal_phenotype , GBQUAL_phenotype , "phenotype" } ,
+ { Feat_qual_legal_plasmid , GBQUAL_plasmid , "plasmid" } ,
+ { Feat_qual_legal_product , GBQUAL_product , "product" } ,
+ { Feat_qual_legal_protein_id , GBQUAL_protein_id , "protein-id" } ,
+ { Feat_qual_legal_pseudo , GBQUAL_pseudo , "pseudo" } ,
+ { Feat_qual_legal_rearranged , GBQUAL_rearranged , "rearranged" } ,
+ { Feat_qual_legal_replace , GBQUAL_replace , "replace" } ,
+ { Feat_qual_legal_rpt_family , GBQUAL_rpt_family , "rpt-family" } ,
+ { Feat_qual_legal_rpt_type , GBQUAL_rpt_type , "rpt-type" } ,
+ { Feat_qual_legal_rpt_unit , GBQUAL_rpt_unit , "rpt-unit" } ,
+ { Feat_qual_legal_rpt_unit_seq , GBQUAL_rpt_unit_seq , "rpt-unit-seq" } ,
+ { Feat_qual_legal_rpt_unit_range , GBQUAL_rpt_unit_range , "rpt-unit-range" } ,
+ { Feat_qual_legal_segment , GBQUAL_segment , "segment" } ,
+ { Feat_qual_legal_sequenced_mol , GBQUAL_sequenced_mol , "sequenced-mol" } ,
+ { Feat_qual_legal_standard_name , GBQUAL_standard_name , "standard-name" } ,
+ { Feat_qual_legal_transcript_id , GBQUAL_transcript_id , "transcript-id" } ,
+ { Feat_qual_legal_transgenic , GBQUAL_transgenic , "transgenic" } ,
+ { Feat_qual_legal_translation , GBQUAL_translation , "translation" } ,
+ { Feat_qual_legal_transl_except , GBQUAL_transl_except , "transl-except" } ,
+ { Feat_qual_legal_transl_table , GBQUAL_transl_table , "transl-table" } ,
+ { Feat_qual_legal_usedin , GBQUAL_usedin , "usedin" } };
+
+#define NUM_featqual_gbqual sizeof (featqual_gbqual) / sizeof (FeatQualGBQualData)
+
+
+NLM_EXTERN Int4 GetNumFeatQual (void)
+{
+ return NUM_featqual_gbqual;
+}
+
+
+static Int4 GetGBQualFromFeatQual (Int4 featqual)
+{
+ Int4 i;
+
+ for (i = 0; i < NUM_featqual_gbqual; i++) {
+ if (featqual == featqual_gbqual[i].featqual) {
+ return featqual_gbqual[i].gbqual;
+ }
+ }
+ return -1;
+}
+
+
+NLM_EXTERN CharPtr GetFeatQualName (Int4 featqual)
+{
+ Int4 i;
+
+ for (i = 0; i < NUM_featqual_gbqual; i++) {
+ if (featqual == featqual_gbqual[i].featqual) {
+ return featqual_gbqual[i].qualname;
+ }
+ }
+ return NULL;
+}
+
+
+NLM_EXTERN Int4 GetFeatQualByName (CharPtr qualname)
+{
+ Int4 i;
+
+ for (i = 0; i < NUM_featqual_gbqual; i++) {
+ if (Matchnamestring (featqual_gbqual[i].qualname, qualname)) {
+ return featqual_gbqual[i].featqual;
+ }
+ }
+ return -1;
+}
+
+
+NLM_EXTERN void AddAllFeatureFieldsToChoiceList (ValNodePtr PNTR field_list)
+{
+ Int4 i;
+
+ for (i = 1; i < NUM_featqual_gbqual; i++) {
+ ValNodeAddPointer (field_list, featqual_gbqual[i].featqual, StringSave (featqual_gbqual[i].qualname));
+ }
+}
+
+
+#define IS_ORGMOD 1
+#define IS_SUBSRC 2
+#define IS_OTHER 3
+
+typedef struct srcqualscqual {
+ Int4 srcqual;
+ Int4 subtype;
+ Int4 typeflag;
+ CharPtr qualname;
+} SrcQualSCQualData, PNTR SrcQualSCQualPtr;
+
+static SrcQualSCQualData srcqual_scqual[] = {
+ { Source_qual_acronym , ORGMOD_acronym , IS_ORGMOD , "acronym" } ,
+ { Source_qual_anamorph , ORGMOD_anamorph , IS_ORGMOD , "anamorph" } ,
+ { Source_qual_authority , ORGMOD_authority , IS_ORGMOD , "authority" } ,
+ { Source_qual_bio_material , ORGMOD_bio_material , IS_ORGMOD , "bio-material" } ,
+ { Source_qual_biotype , ORGMOD_biotype , IS_ORGMOD , "biotype" } ,
+ { Source_qual_biovar , ORGMOD_biovar , IS_ORGMOD , "biovar" } ,
+ { Source_qual_breed , ORGMOD_breed , IS_ORGMOD , "breed" } ,
+ { Source_qual_cell_line , SUBSRC_cell_line , IS_SUBSRC , "cell-line" } ,
+ { Source_qual_cell_type , SUBSRC_cell_type , IS_SUBSRC , "cell-type" } ,
+ { Source_qual_chemovar , ORGMOD_chemovar , IS_ORGMOD , "chemovar" } ,
+ { Source_qual_chromosome , SUBSRC_chromosome , IS_SUBSRC , "chromosome" } ,
+ { Source_qual_clone , SUBSRC_clone , IS_SUBSRC , "clone" } ,
+ { Source_qual_clone_lib , SUBSRC_clone_lib , IS_SUBSRC , "clone-lib" } ,
+ { Source_qual_collected_by , SUBSRC_collected_by , IS_SUBSRC , "collected-by" } ,
+ { Source_qual_collection_date , SUBSRC_collection_date , IS_SUBSRC , "collection-date" } ,
+ { Source_qual_common , ORGMOD_common , IS_ORGMOD , "common" } ,
+ { Source_qual_common_name , 0 , IS_OTHER , "common name" } ,
+ { Source_qual_country , SUBSRC_country , IS_SUBSRC , "country" } ,
+ { Source_qual_cultivar , ORGMOD_cultivar , IS_ORGMOD , "cultivar" } ,
+ { Source_qual_culture_collection , ORGMOD_culture_collection , IS_ORGMOD , "culture-collection" } ,
+ { Source_qual_dev_stage , SUBSRC_dev_stage , IS_SUBSRC , "dev-stage" } ,
+ { Source_qual_division , 0 , IS_OTHER, "divistion" } ,
+ { Source_qual_dosage , ORGMOD_dosage , IS_ORGMOD , "dosage" } ,
+ { Source_qual_ecotype , ORGMOD_ecotype , IS_ORGMOD , "ecotype" } ,
+ { Source_qual_endogenous_virus_name , SUBSRC_endogenous_virus_name , IS_SUBSRC , "endogenous-virus-name" } ,
+ { Source_qual_environmental_sample , SUBSRC_environmental_sample , IS_SUBSRC , "environmental-sample" } ,
+ { Source_qual_forma , ORGMOD_forma , IS_ORGMOD , "forma" } ,
+ { Source_qual_forma_specialis , ORGMOD_forma_specialis , IS_ORGMOD , "forma-specialis" } ,
+ { Source_qual_frequency , SUBSRC_frequency , IS_SUBSRC , "frequency" } ,
+ { Source_qual_fwd_primer_name , SUBSRC_fwd_primer_name , IS_SUBSRC , "fwd-primer-name" } ,
+ { Source_qual_fwd_primer_seq , SUBSRC_fwd_primer_seq , IS_SUBSRC , "fwd-primer-seq" } ,
+ { Source_qual_gb_acronym , ORGMOD_gb_acronym , IS_ORGMOD , "gb-acronym" } ,
+ { Source_qual_gb_anamorph , ORGMOD_gb_anamorph , IS_ORGMOD , "gb-anamorph" } ,
+ { Source_qual_gb_synonym , ORGMOD_gb_synonym , IS_ORGMOD , "gb-synonym" } ,
+ { Source_qual_genotype , SUBSRC_genotype , IS_SUBSRC , "genotype" } ,
+ { Source_qual_germline , SUBSRC_germline , IS_SUBSRC , "germline" } ,
+ { Source_qual_group , ORGMOD_group , IS_ORGMOD , "group" } ,
+ { Source_qual_haplotype , SUBSRC_haplotype , IS_SUBSRC , "haplotype" } ,
+ { Source_qual_identified_by , SUBSRC_identified_by , IS_SUBSRC , "identified-by" } ,
+ { Source_qual_insertion_seq_name , SUBSRC_insertion_seq_name , IS_SUBSRC , "insertion-seq-name" } ,
+ { Source_qual_isolate , ORGMOD_isolate , IS_ORGMOD , "isolate" } ,
+ { Source_qual_isolation_source , SUBSRC_isolation_source , IS_SUBSRC , "isolation-source" } ,
+ { Source_qual_lab_host , SUBSRC_lab_host , IS_SUBSRC , "lab-host" } ,
+ { Source_qual_lat_lon , SUBSRC_lat_lon , IS_SUBSRC , "lat-lon" } ,
+ { Source_qual_lineage , 0, IS_OTHER, "lineage" } ,
+ { Source_qual_map , SUBSRC_map , IS_SUBSRC , "map" } ,
+ { Source_qual_metagenome_source , ORGMOD_metagenome_source , IS_ORGMOD , "metagenome-source" } ,
+ { Source_qual_metagenomic , SUBSRC_metagenomic , IS_SUBSRC , "metagenomic" } ,
+ { Source_qual_old_lineage , ORGMOD_old_lineage , IS_ORGMOD , "old-lineage" } ,
+ { Source_qual_old_name , ORGMOD_old_name , IS_ORGMOD , "old-name" } ,
+ { Source_qual_orgmod_note , ORGMOD_other, IS_ORGMOD, "orgmod note" } ,
+ { Source_qual_nat_host , ORGMOD_nat_host , IS_ORGMOD , "nat-host" } ,
+ { Source_qual_pathovar , ORGMOD_pathovar , IS_ORGMOD , "pathovar" } ,
+ { Source_qual_plasmid_name , SUBSRC_plasmid_name , IS_SUBSRC , "plasmid-name" } ,
+ { Source_qual_plastid_name , SUBSRC_plastid_name , IS_SUBSRC , "plastid-name" } ,
+ { Source_qual_pop_variant , SUBSRC_pop_variant , IS_SUBSRC , "pop-variant" } ,
+ { Source_qual_rearranged , SUBSRC_rearranged , IS_SUBSRC , "rearranged" } ,
+ { Source_qual_rev_primer_name , SUBSRC_rev_primer_name , IS_SUBSRC , "rev-primer-name" } ,
+ { Source_qual_rev_primer_seq , SUBSRC_rev_primer_seq , IS_SUBSRC , "rev-primer-seq" } ,
+ { Source_qual_segment , SUBSRC_segment , IS_SUBSRC , "segment" } ,
+ { Source_qual_serogroup , ORGMOD_serogroup , IS_ORGMOD , "serogroup" } ,
+ { Source_qual_serotype , ORGMOD_serotype , IS_ORGMOD , "serotype" } ,
+ { Source_qual_serovar , ORGMOD_serovar , IS_ORGMOD , "serovar" } ,
+ { Source_qual_sex , SUBSRC_sex , IS_SUBSRC , "sex" } ,
+ { Source_qual_specimen_voucher , ORGMOD_specimen_voucher , IS_ORGMOD , "specimen-voucher" } ,
+ { Source_qual_strain , ORGMOD_strain , IS_ORGMOD , "strain" } ,
+ { Source_qual_subclone , SUBSRC_subclone , IS_SUBSRC , "subclone" } ,
+ { Source_qual_subgroup , ORGMOD_subgroup , IS_ORGMOD , "subgroup" } ,
+ { Source_qual_subsource_note , SUBSRC_other , IS_SUBSRC , "subsource note" } ,
+ { Source_qual_sub_species , ORGMOD_sub_species , IS_ORGMOD , "sub-species" } ,
+ { Source_qual_substrain , ORGMOD_substrain , IS_ORGMOD , "substrain" } ,
+ { Source_qual_subtype , ORGMOD_subtype , IS_ORGMOD , "subtype" } ,
+ { Source_qual_synonym , ORGMOD_synonym , IS_ORGMOD , "synonym" } ,
+ { Source_qual_taxname , 0 , IS_OTHER , "taxname" } ,
+ { Source_qual_teleomorph , ORGMOD_teleomorph , IS_ORGMOD , "teleomorph" } ,
+ { Source_qual_tissue_lib , SUBSRC_tissue_lib , IS_SUBSRC , "tissue-lib" } ,
+ { Source_qual_tissue_type , SUBSRC_tissue_type , IS_SUBSRC , "tissue-type" } ,
+ { Source_qual_transgenic , SUBSRC_transgenic , IS_SUBSRC , "transgenic" } ,
+ { Source_qual_transposon_name , SUBSRC_transposon_name , IS_SUBSRC , "transposon-name" } ,
+ { Source_qual_type , ORGMOD_type , IS_ORGMOD , "type" } ,
+ { Source_qual_variety , ORGMOD_variety , IS_ORGMOD , "variety" } };
+
+#define NUM_srcqual_scqual sizeof (srcqual_scqual) / sizeof (SrcQualSCQualData)
+
+static Int4 GetSubSrcQualFromSrcQual (Int4 srcqual)
+{
+ Int4 i;
+
+ for (i = 0; i < NUM_srcqual_scqual; i++) {
+ if (srcqual == srcqual_scqual[i].srcqual) {
+ if (srcqual_scqual[i].typeflag == IS_SUBSRC) {
+ return srcqual_scqual[i].subtype;
+ } else {
+ return -1;
+ }
+ }
+ }
+ return -1;
+}
+
+
+static Int4 GetOrgModQualFromSrcQual (Int4 srcqual)
+{
+ Int4 i;
+
+ for (i = 0; i < NUM_srcqual_scqual; i++) {
+ if (srcqual == srcqual_scqual[i].srcqual) {
+ if (srcqual_scqual[i].typeflag == IS_ORGMOD) {
+ return srcqual_scqual[i].subtype;
+ } else {
+ return -1;
+ }
+ }
+ }
+ return -1;
+}
+
+
+NLM_EXTERN Boolean IsNonTextSourceQual (Int4 srcqual)
+{
+ if (srcqual == Source_qual_transgenic
+ || srcqual == Source_qual_germline
+ || srcqual == Source_qual_metagenomic
+ || srcqual == Source_qual_environmental_sample
+ || srcqual == Source_qual_rearranged)
+ {
+ return TRUE;
+ }
+ else
+ {
+ return FALSE;
+ }
+}
+
+
+NLM_EXTERN CharPtr GetSourceQualName (Int4 srcqual)
+{
+ CharPtr str = NULL;
+ Int4 i;
+
+ for (i = 0; i < NUM_srcqual_scqual && str == NULL; i++) {
+ if (srcqual_scqual[i].srcqual == srcqual) {
+ str = srcqual_scqual[i].qualname;
+ }
+ }
+ if (str == NULL) {
+ str = "Unknown source qualifier";
+ }
+ return str;
+}
+
+
+NLM_EXTERN Int4 GetSourceQualTypeByName (CharPtr qualname)
+{
+ Int4 i;
+
+ for (i = 0; i < NUM_srcqual_scqual; i++) {
+ if (Matchnamestring(srcqual_scqual[i].qualname, qualname)) {
+ return srcqual_scqual[i].srcqual;
+ }
+ }
+ return -1;
+}
+
+
+NLM_EXTERN ValNodePtr GetSourceQualList (void)
+{
+ ValNodePtr list = NULL;
+ Int4 i;
+
+ for (i = 0; i < NUM_srcqual_scqual; i++) {
+ ValNodeAddPointer (&list, 0, StringSave (srcqual_scqual[i].qualname));
+ }
+ return list;
+}
+
+typedef struct srclocgenome {
+ Int4 srcloc;
+ Int4 genome;
+ CharPtr name;
+} SrcLocGenomeData, PNTR SrcLocGenomePtr;
+
+static SrcLocGenomeData srcloc_genome[] = {
+ { Source_location_unknown , GENOME_unknown , "unknown" } ,
+ { Source_location_genomic , GENOME_genomic , "genomic" } ,
+ { Source_location_chloroplast , GENOME_chloroplast , "chloroplast" } ,
+ { Source_location_chromoplast , GENOME_chromoplast , "chromoplast" } ,
+ { Source_location_kinetoplast , GENOME_kinetoplast , "kinetoplast" } ,
+ { Source_location_mitochondrion , GENOME_mitochondrion , "mitochondrion" } ,
+ { Source_location_plastid , GENOME_plastid , "plastid" } ,
+ { Source_location_macronuclear , GENOME_macronuclear , "macronuclear" } ,
+ { Source_location_extrachrom , GENOME_extrachrom , "extrachrom" } ,
+ { Source_location_plasmid , GENOME_plasmid , "plasmid" } ,
+ { Source_location_transposon , GENOME_transposon , "transposon" } ,
+ { Source_location_insertion_seq , GENOME_insertion_seq , "insertion-seq" } ,
+ { Source_location_cyanelle , GENOME_cyanelle , "cyanelle" } ,
+ { Source_location_proviral , GENOME_proviral , "proviral" } ,
+ { Source_location_virion , GENOME_virion , "virion" } ,
+ { Source_location_nucleomorph , GENOME_nucleomorph , "nucleomorph" } ,
+ { Source_location_apicoplast , GENOME_apicoplast , "apicoplast" } ,
+ { Source_location_leucoplast , GENOME_leucoplast , "leucoplast" } ,
+ { Source_location_proplastid , GENOME_proplastid , "proplastid" } ,
+ { Source_location_endogenous_virus , GENOME_endogenous_virus , "endogenous-virus" } ,
+ { Source_location_hydrogenosome , GENOME_hydrogenosome , "hydrogenosome" } ,
+ { Source_location_chromosome , 21 , "chromosome" } ,
+ { Source_location_chromatophore , 22 , "chromatophore" } };
+
+#define NUM_srcloc_genome sizeof (srcloc_genome) / sizeof (SrcLocGenomeData)
+
+NLM_EXTERN Int4 GenomeFromSrcLoc (Int4 srcloc) \
+{
+ Int4 i;
+
+ for (i = 0; i < NUM_srcloc_genome; i++) {
+ if (srcloc_genome[i].srcloc == srcloc) {
+ return srcloc_genome[i].genome;
+ }
+ }
+ return -1;
+}
+
+
+NLM_EXTERN CharPtr LocNameFromGenome (Int4 genome)
+{
+ Int4 i;
+
+ for (i = 0; i < NUM_srcloc_genome; i++) {
+ if (srcloc_genome[i].genome == genome) {
+ return srcloc_genome[i].name;
+ }
+ }
+ return NULL;
+}
+
+
+static Int4 GenomeFromLocName (CharPtr loc_name)
+{
+ Int4 i;
+
+ for (i = 0; i < NUM_srcloc_genome; i++) {
+ if (StringICmp (srcloc_genome[i].name, loc_name) == 0) {
+ return srcloc_genome[i].genome;
+ }
+ }
+ return -1;
+}
+
+
+NLM_EXTERN ValNodePtr GetLocationList (Boolean for_remove)
+{
+ ValNodePtr list = NULL;
+ Int4 i;
+
+ for (i = 0; i < NUM_srcloc_genome; i++) {
+ if (for_remove && srcloc_genome[i].srcloc == Source_location_unknown) {
+ ValNodeAddPointer (&list, srcloc_genome[i].srcloc, StringSave ("any"));
+ } else {
+ ValNodeAddPointer (&list, srcloc_genome[i].srcloc, StringSave (srcloc_genome[i].name));
+ }
+ }
+ return list;
+}
+
+
+typedef struct srcorigorigin {
+ Int4 srcorig;
+ Int4 origin;
+ CharPtr name;
+} SrcOrigOriginData, PNTR SrcrigOriginPtr;
+
+static SrcOrigOriginData srcorig_origin[] = {
+ { Source_origin_unknown , 0 , "unknown" } ,
+ { Source_origin_natural , 1 , "natural" } ,
+ { Source_origin_natmut , 2 , "natmut" } ,
+ { Source_origin_mut , 3 , "mut" } ,
+ { Source_origin_artificial , 4 , "artificial" } ,
+ { Source_origin_synthetic , 5 , "synthetic" } ,
+ { Source_origin_other , 255 , "other" } };
+
+#define NUM_srcorig_origin sizeof (srcorig_origin) / sizeof (SrcOrigOriginData)
+
+NLM_EXTERN Int4 OriginFromSrcOrig (Int4 srcorig)
+{
+ Int4 i;
+
+ for (i = 0; i < NUM_srcorig_origin; i++) {
+ if (srcorig_origin[i].srcorig == srcorig) {
+ return srcorig_origin[i].origin;
+ }
+ }
+ return -1;
+}
+
+
+NLM_EXTERN CharPtr OriginNameFromOrigin (Int4 origin)
+{
+ Int4 i;
+
+ for (i = 0; i < NUM_srcorig_origin; i++) {
+ if (srcorig_origin[i].origin == origin) {
+ return srcorig_origin[i].name;
+ }
+ }
+ return NULL;
+}
+
+
+static Int4 OriginFromOriginName (CharPtr origin_name)
+{
+ Int4 i;
+
+ for (i = 0; i < NUM_srcorig_origin; i++) {
+ if (StringCmp (srcorig_origin[i].name, origin_name) == 0) {
+ return srcorig_origin[i].origin;
+ }
+ }
+ return -1;
+}
+
+
+NLM_EXTERN ValNodePtr GetOriginList (Boolean for_remove)
+{
+ ValNodePtr list = NULL;
+ Int4 i;
+
+ for (i = 0; i < NUM_srcorig_origin; i++) {
+ if (for_remove && srcorig_origin[i].srcorig == Source_origin_unknown) {
+ ValNodeAddPointer (&list, srcorig_origin[i].srcorig, StringSave ("any"));
+ } else {
+ ValNodeAddPointer (&list, srcorig_origin[i].srcorig, StringSave (srcorig_origin[i].name));
+ }
+ }
+ return list;
+}
+
+
+typedef struct cdsgeneprotfieldname {
+ Int4 field;
+ CharPtr name;
+} CDSGeneProtFieldNameData, PNTR CDSGeneProtFieldNamePtr;
+
+static CDSGeneProtFieldNameData cdsgeneprotfield_name[] = {
+{ CDSGeneProt_field_cds_comment , "CDS comment" } ,
+{ CDSGeneProt_field_gene_locus , "gene locus" } ,
+{ CDSGeneProt_field_gene_description , "gene description" } ,
+{ CDSGeneProt_field_gene_comment , "gene comment" } ,
+{ CDSGeneProt_field_gene_allele , "allele" } ,
+{ CDSGeneProt_field_gene_maploc , "maploc" } ,
+{ CDSGeneProt_field_gene_locus_tag , "locus tag" } ,
+{ CDSGeneProt_field_gene_synonym , "synonym" } ,
+{ CDSGeneProt_field_gene_old_locus_tag , "old locus tag" } ,
+{ CDSGeneProt_field_mrna_product , "mRNA product" } ,
+{ CDSGeneProt_field_mrna_comment , "mRNA comment" } ,
+{ CDSGeneProt_field_prot_name , "protein name" } ,
+{ CDSGeneProt_field_prot_description , "protein description" } ,
+{ CDSGeneProt_field_prot_ec_number , "protein EC number" } ,
+{ CDSGeneProt_field_prot_activity , "protein activity" } ,
+{ CDSGeneProt_field_prot_comment , "protein comment" } ,
+{ CDSGeneProt_field_mat_peptide_name , "mat-peptide name" } ,
+{ CDSGeneProt_field_mat_peptide_description , "mat-peptide description" } ,
+{ CDSGeneProt_field_mat_peptide_ec_number , "mat-peptide EC number" } ,
+{ CDSGeneProt_field_mat_peptide_activity , "mat-peptide activity" } ,
+{ CDSGeneProt_field_mat_peptide_comment , "mat-peptide comment" } };
+
+#define NUM_cdsgeneprotfield_name sizeof (cdsgeneprotfield_name) / sizeof (CDSGeneProtFieldNameData)
+
+NLM_EXTERN CharPtr CDSGeneProtNameFromField (Int4 field)
+{
+ Int4 i;
+
+ for (i = 0; i < NUM_cdsgeneprotfield_name; i++) {
+ if (cdsgeneprotfield_name[i].field == field) {
+ return cdsgeneprotfield_name[i].name;
+ }
+ }
+ return NULL;
+}
+
+
+NLM_EXTERN void AddAllCDSGeneProtFieldsToChoiceList (ValNodePtr PNTR field_list)
+{
+ Int4 i;
+
+ for (i = 0; i < NUM_cdsgeneprotfield_name; i++) {
+ ValNodeAddPointer (field_list, cdsgeneprotfield_name[i].field, StringSave (cdsgeneprotfield_name[i].name));
+ }
+}
+
+
+typedef struct cdsgeneprotfeatname {
+ Int4 feature_type;
+ CharPtr name;
+} CDSGeneProtFeatNameData, PNTR CDSGeneProtFeatNamePtr;
+
+static CDSGeneProtFeatNameData cdsgeneprotfeat_name[] = {
+{ CDSGeneProt_feature_type_constraint_gene , "gene" } ,
+{ CDSGeneProt_feature_type_constraint_mRNA , "mRNA" } ,
+{ CDSGeneProt_feature_type_constraint_cds , "CDS" } ,
+{ CDSGeneProt_feature_type_constraint_prot , "protein" } ,
+{ CDSGeneProt_feature_type_constraint_mat_peptide , "mat-peptide" }};
+
+#define NUM_cdsgeneprotfeat_name sizeof (cdsgeneprotfeat_name) / sizeof (CDSGeneProtFeatNameData)
+
+NLM_EXTERN CharPtr CDSGeneProtFeatureNameFromFeatureType (Int4 feature_type)
+{
+ Int4 i;
+
+ for (i = 0; i < NUM_cdsgeneprotfeat_name; i++) {
+ if (cdsgeneprotfeat_name[i].feature_type == feature_type) {
+ return cdsgeneprotfeat_name[i].name;
+ }
+ }
+ return NULL;
+}
+
+
+NLM_EXTERN void AddAllCDSGeneProtFeaturesToChoiceList (ValNodePtr PNTR field_list)
+{
+ Int4 i;
+
+ for (i = 0; i < NUM_cdsgeneprotfeat_name; i++) {
+ ValNodeAddPointer (field_list, cdsgeneprotfeat_name[i].feature_type, StringSave (cdsgeneprotfeat_name[i].name));
+ }
+}
+
+
+NLM_EXTERN FeatureFieldPtr FeatureFieldFromCDSGeneProtField (Uint2 cds_gene_prot_field)
+{
+ FeatureFieldPtr f = NULL;
+
+ switch (cds_gene_prot_field) {
+ case CDSGeneProt_field_cds_comment:
+ f = FeatureFieldNew ();
+ f->type = Feature_type_cds;
+ f->field = ValNodeNew (NULL);
+ f->field->choice = FeatQualChoice_legal_qual;
+ f->field->data.intvalue = Feat_qual_legal_note;
+ break;
+ case CDSGeneProt_field_gene_locus:
+ f = FeatureFieldNew ();
+ f->type = Feature_type_gene;
+ f->field = ValNodeNew (NULL);
+ f->field->choice = FeatQualChoice_legal_qual;
+ f->field->data.intvalue = Feat_qual_legal_gene;
+ break;
+ case CDSGeneProt_field_gene_description:
+ f = FeatureFieldNew ();
+ f->type = Feature_type_gene;
+ f->field = ValNodeNew (NULL);
+ f->field->choice = FeatQualChoice_legal_qual;
+ f->field->data.intvalue = Feat_qual_legal_gene_description;
+ break;
+ case CDSGeneProt_field_gene_comment:
+ f = FeatureFieldNew ();
+ f->type = Feature_type_gene;
+ f->field = ValNodeNew (NULL);
+ f->field->choice = FeatQualChoice_legal_qual;
+ f->field->data.intvalue = Feat_qual_legal_note;
+ break;
+ case CDSGeneProt_field_gene_allele:
+ f = FeatureFieldNew ();
+ f->type = Feature_type_gene;
+ f->field = ValNodeNew (NULL);
+ f->field->choice = FeatQualChoice_legal_qual;
+ f->field->data.intvalue = Feat_qual_legal_allele;
+ break;
+ case CDSGeneProt_field_gene_maploc:
+ f = FeatureFieldNew ();
+ f->type = Feature_type_gene;
+ f->field = ValNodeNew (NULL);
+ f->field->choice = FeatQualChoice_legal_qual;
+ f->field->data.intvalue = Feat_qual_legal_map;
+ break;
+ case CDSGeneProt_field_gene_locus_tag:
+ f = FeatureFieldNew ();
+ f->type = Feature_type_gene;
+ f->field = ValNodeNew (NULL);
+ f->field->choice = FeatQualChoice_legal_qual;
+ f->field->data.intvalue = Feat_qual_legal_locus_tag;
+ break;
+ case CDSGeneProt_field_gene_synonym:
+ f = FeatureFieldNew ();
+ f->type = Feature_type_gene;
+ f->field = ValNodeNew (NULL);
+ f->field->choice = FeatQualChoice_legal_qual;
+ f->field->data.intvalue = Feat_qual_legal_synonym;
+ break;
+ case CDSGeneProt_field_gene_old_locus_tag:
+ f = FeatureFieldNew ();
+ f->type = Feature_type_gene;
+ f->field = ValNodeNew (NULL);
+ f->field->choice = FeatQualChoice_legal_qual;
+ f->field->data.intvalue = Feat_qual_legal_old_locus_tag;
+ break;
+ case CDSGeneProt_field_mrna_product:
+ f = FeatureFieldNew ();
+ f->type = Feature_type_mRNA;
+ f->field = ValNodeNew (NULL);
+ f->field->choice = FeatQualChoice_legal_qual;
+ f->field->data.intvalue = Feat_qual_legal_product;
+ break;
+ case CDSGeneProt_field_mrna_comment:
+ f = FeatureFieldNew ();
+ f->type = Feature_type_mRNA;
+ f->field = ValNodeNew (NULL);
+ f->field->choice = FeatQualChoice_legal_qual;
+ f->field->data.intvalue = Feat_qual_legal_note;
+ break;
+ case CDSGeneProt_field_prot_name:
+ f = FeatureFieldNew ();
+ f->type = Feature_type_prot;
+ f->field = ValNodeNew (NULL);
+ f->field->choice = FeatQualChoice_legal_qual;
+ f->field->data.intvalue = Feat_qual_legal_product;
+ break;
+ case CDSGeneProt_field_prot_description:
+ f = FeatureFieldNew ();
+ f->type = Feature_type_prot;
+ f->field = ValNodeNew (NULL);
+ f->field->choice = FeatQualChoice_legal_qual;
+ f->field->data.intvalue = Feat_qual_legal_description;
+ break;
+ case CDSGeneProt_field_prot_ec_number:
+ f = FeatureFieldNew ();
+ f->type = Feature_type_prot;
+ f->field = ValNodeNew (NULL);
+ f->field->choice = FeatQualChoice_legal_qual;
+ f->field->data.intvalue = Feat_qual_legal_ec_number;
+ break;
+ case CDSGeneProt_field_prot_activity:
+ f = FeatureFieldNew ();
+ f->type = Feature_type_prot;
+ f->field = ValNodeNew (NULL);
+ f->field->choice = FeatQualChoice_legal_qual;
+ f->field->data.intvalue = Feat_qual_legal_activity;
+ break;
+ case CDSGeneProt_field_prot_comment:
+ f = FeatureFieldNew ();
+ f->type = Feature_type_prot;
+ f->field = ValNodeNew (NULL);
+ f->field->choice = FeatQualChoice_legal_qual;
+ f->field->data.intvalue = Feat_qual_legal_note;
+ break;
+ case CDSGeneProt_field_mat_peptide_name:
+ f = FeatureFieldNew ();
+ f->type = Feature_type_mat_peptide;
+ f->field = ValNodeNew (NULL);
+ f->field->choice = FeatQualChoice_legal_qual;
+ f->field->data.intvalue = Feat_qual_legal_product;
+ break;
+ case CDSGeneProt_field_mat_peptide_description:
+ f = FeatureFieldNew ();
+ f->type = Feature_type_mat_peptide;
+ f->field = ValNodeNew (NULL);
+ f->field->choice = FeatQualChoice_legal_qual;
+ f->field->data.intvalue = Feat_qual_legal_description;
+ break;
+ case CDSGeneProt_field_mat_peptide_ec_number:
+ f = FeatureFieldNew ();
+ f->type = Feature_type_mat_peptide;
+ f->field = ValNodeNew (NULL);
+ f->field->choice = FeatQualChoice_legal_qual;
+ f->field->data.intvalue = Feat_qual_legal_ec_number;
+ break;
+ case CDSGeneProt_field_mat_peptide_activity:
+ f = FeatureFieldNew ();
+ f->type = Feature_type_mat_peptide;
+ f->field = ValNodeNew (NULL);
+ f->field->choice = FeatQualChoice_legal_qual;
+ f->field->data.intvalue = Feat_qual_legal_activity;
+ break;
+ case CDSGeneProt_field_mat_peptide_comment:
+ f = FeatureFieldNew ();
+ f->type = Feature_type_mat_peptide;
+ f->field = ValNodeNew (NULL);
+ f->field->choice = FeatQualChoice_legal_qual;
+ f->field->data.intvalue = Feat_qual_legal_note;
+ break;
+ }
+ return f;
+}
+
+
+/* Molinfo fields */
+typedef struct moleculetypebiomol {
+ Int4 molecule_type;
+ Int4 biomol;
+ CharPtr name;
+} MoleculeTypeBiomolData, PNTR MoleculeTypeBiomolPtr;
+
+static MoleculeTypeBiomolData moleculetype_biomol[] = {
+ { Molecule_type_unknown , 0, "unknown" } ,
+ { Molecule_type_genomic , MOLECULE_TYPE_GENOMIC , "genomic" } ,
+ { Molecule_type_precursor_RNA , MOLECULE_TYPE_PRE_MRNA , "precursor RNA" } ,
+ { Molecule_type_mRNA , MOLECULE_TYPE_MRNA , "mRNA" } ,
+ { Molecule_type_rRNA , MOLECULE_TYPE_RRNA , "rRNA" } ,
+ { Molecule_type_tRNA , MOLECULE_TYPE_TRNA , "tRNA" } ,
+ { Molecule_type_snRNA , MOLECULE_TYPE_SNRNA , "snRNA" } ,
+ { Molecule_type_scRNA , MOLECULE_TYPE_SCRNA , "scRNA" } ,
+ { Molecule_type_genomic_mRNA , MOLECULE_TYPE_GENOMIC_MRNA_MIX , "genomic mRNA" } ,
+ { Molecule_type_cRNA , MOLECULE_TYPE_CRNA , "cRNA" } ,
+ { Molecule_type_scRNA , MOLECULE_TYPE_SCRNA , "scRNA" } ,
+ { Molecule_type_scRNA , MOLECULE_TYPE_SCRNA , "scRNA" } ,
+ { Molecule_type_scRNA , MOLECULE_TYPE_SCRNA , "scRNA" } ,
+ { Molecule_type_snoRNA , MOLECULE_TYPE_SNORNA, "snoRNA" } ,
+ { Molecule_type_transcribed_RNA, MOLECULE_TYPE_TRANSCRIBED_RNA, "transcribed RNA" } ,
+ { Molecule_type_ncRNA, MOLECULE_TYPE_NCRNA, "ncRNA" } ,
+ { Molecule_type_transfer_messenger_RNA, MOLECULE_TYPE_TMRNA, "tmRNA" } ,
+ { Molecule_type_other, MOLECULE_TYPE_OTHER_GENETIC_MATERIAL, "other" }
+};
+
+
+#define NUM_moleculetype_biomol sizeof (moleculetype_biomol) / sizeof (MoleculeTypeBiomolData)
+
+NLM_EXTERN Int4 BiomolFromMoleculeType (Int4 molecule_type)
+{
+ Int4 i;
+
+ for (i = 0; i < NUM_moleculetype_biomol; i++) {
+ if (moleculetype_biomol[i].molecule_type == molecule_type) {
+ return moleculetype_biomol[i].biomol;
+ }
+ }
+ return -1;
+}
+
+
+NLM_EXTERN CharPtr BiomolNameFromBiomol (Int4 biomol)
+{
+ Int4 i;
+
+ for (i = 0; i < NUM_moleculetype_biomol; i++) {
+ if (moleculetype_biomol[i].biomol == biomol) {
+ return moleculetype_biomol[i].name;
+ }
+ }
+ return NULL;
+}
+
+
+static Int4 BiomolFromBiomolName (CharPtr biomol_name)
+{
+ Int4 i;
+
+ for (i = 0; i < NUM_moleculetype_biomol; i++) {
+ if (StringCmp (moleculetype_biomol[i].name, biomol_name) == 0) {
+ return moleculetype_biomol[i].biomol;
+ }
+ }
+ return -1;
+}
+
+
+NLM_EXTERN ValNodePtr GetMoleculeTypeList (void)
+{
+ ValNodePtr list = NULL;
+ Int4 i;
+
+ for (i = 0; i < NUM_moleculetype_biomol; i++) {
+ ValNodeAddPointer (&list, moleculetype_biomol[i].molecule_type, StringSave (moleculetype_biomol[i].name));
+ }
+ return list;
+}
+
+
+/* Technique fields */
+typedef struct techniquetypetech {
+ Int4 technique_type;
+ Int4 tech;
+ CharPtr name;
+} TechniqueTypeTechData, PNTR TechniqueTypeTechPtr;
+
+static TechniqueTypeTechData techniquetype_tech[] = {
+ { Technique_type_unknown , MI_TECH_unknown , "unknown" } ,
+ { Technique_type_standard , MI_TECH_standard , "standard" } ,
+ { Technique_type_est , MI_TECH_est , "EST" } ,
+ { Technique_type_sts , MI_TECH_sts , "STS" } ,
+ { Technique_type_survey , MI_TECH_survey , "survey" } ,
+ { Technique_type_genetic_map , MI_TECH_genemap , "genetic map" } ,
+ { Technique_type_physical_map , MI_TECH_physmap , "physical map" } ,
+ { Technique_type_derived , MI_TECH_derived , "derived" } ,
+ { Technique_type_concept_trans , MI_TECH_concept_trans , "concept-trans" } ,
+ { Technique_type_seq_pept , MI_TECH_seq_pept , "seq-pept" } ,
+ { Technique_type_both , MI_TECH_both , "both" } ,
+ { Technique_type_seq_pept_overlap , MI_TECH_seq_pept_overlap , "seq-pept-overlap" } ,
+ { Technique_type_seq_pept_homol , MI_TECH_seq_pept_homol, "seq-pept-homol" } ,
+ { Technique_type_concept_trans_a, MI_TECH_concept_trans_a, "concept-trans-a" } ,
+ { Technique_type_htgs_1, MI_TECH_htgs_1, "HTGS-1" } ,
+ { Technique_type_htgs_2, MI_TECH_htgs_2, "HTGS-2" } ,
+ { Technique_type_htgs_3, MI_TECH_htgs_3, "HTGS-3" } ,
+ { Technique_type_fli_cDNA, MI_TECH_fli_cdna, "fli-cDNA" } ,
+ { Technique_type_htgs_0, MI_TECH_htgs_0, "HTGS-0" } ,
+ { Technique_type_htc, MI_TECH_htc, "HTC" } ,
+ { Technique_type_wgs, MI_TECH_wgs, "WGS" } ,
+ { Technique_type_barcode, MI_TECH_barcode, "BARCODE" } ,
+ { Technique_type_composite_wgs_htgs, MI_TECH_composite_wgs_htgs, "composite WGS-HTGS" } ,
+ { Technique_type_tsa, MI_TECH_tsa, "TSA" } ,
+ { Technique_type_other, MI_TECH_other, "other" }
+};
+
+
+#define NUM_techniquetype_tech sizeof (techniquetype_tech) / sizeof (TechniqueTypeTechData)
+
+NLM_EXTERN Int4 TechFromTechniqueType (Int4 technique_type)
+{
+ Int4 i;
+
+ for (i = 0; i < NUM_techniquetype_tech; i++) {
+ if (techniquetype_tech[i].technique_type == technique_type) {
+ return techniquetype_tech[i].tech;
+ }
+ }
+ return -1;
+}
+
+
+NLM_EXTERN CharPtr TechNameFromTech (Int4 tech)
+{
+ Int4 i;
+
+ for (i = 0; i < NUM_techniquetype_tech; i++) {
+ if (techniquetype_tech[i].tech == tech) {
+ return techniquetype_tech[i].name;
+ }
+ }
+ return NULL;
+}
+
+
+static Int4 TechFromTechName (CharPtr tech_name)
+{
+ Int4 i;
+
+ for (i = 0; i < NUM_techniquetype_tech; i++) {
+ if (StringCmp (techniquetype_tech[i].name, tech_name) == 0) {
+ return techniquetype_tech[i].tech;
+ }
+ }
+ return -1;
+}
+
+
+NLM_EXTERN ValNodePtr GetTechniqueTypeList (void)
+{
+ ValNodePtr list = NULL;
+ Int4 i;
+
+ for (i = 0; i < NUM_techniquetype_tech; i++) {
+ ValNodeAddPointer (&list, techniquetype_tech[i].technique_type, StringSave (techniquetype_tech[i].name));
+ }
+ return list;
+}
+
+
+/* Completedness fields */
+typedef struct completednesstypecompleteness {
+ Int4 completedness_type;
+ Int4 completeness;
+ CharPtr name;
+} CompletednessTypeCompletenessData, PNTR CompletednessTypeCompletenessPtr;
+
+static CompletednessTypeCompletenessData completednesstype_completeness[] = {
+ { Completedness_type_unknown, 0, "unknown" } ,
+ { Completedness_type_complete, 1, "complete" } ,
+ { Completedness_type_partial, 2, "partial" } ,
+ { Completedness_type_no_left, 3, "no left" } ,
+ { Completedness_type_no_right, 4, "no right" } ,
+ { Completedness_type_no_ends, 5, "no ends" } ,
+ { Completedness_type_has_left, 6, "has left" } ,
+ { Completedness_type_has_right, 7, "has right" } ,
+ { Completedness_type_other, 255, "other" }
+};
+
+#define NUM_completednesstype_completeness sizeof (completednesstype_completeness) / sizeof (CompletednessTypeCompletenessData)
+
+NLM_EXTERN Int4 CompletenessFromCompletednessType (Int4 completedness_type)
+{
+ Int4 i;
+
+ for (i = 0; i < NUM_completednesstype_completeness; i++) {
+ if (completednesstype_completeness[i].completedness_type == completedness_type) {
+ return completednesstype_completeness[i].completeness;
+ }
+ }
+ return -1;
+}
+
+
+NLM_EXTERN CharPtr CompletenessNameFromCompleteness (Int4 completeness)
+{
+ Int4 i;
+
+ for (i = 0; i < NUM_completednesstype_completeness; i++) {
+ if (completednesstype_completeness[i].completeness == completeness) {
+ return completednesstype_completeness[i].name;
+ }
+ }
+ return NULL;
+}
+
+
+static Int4 CompletenessFromCompletenessName (CharPtr completeness_name)
+{
+ Int4 i;
+
+ for (i = 0; i < NUM_completednesstype_completeness; i++) {
+ if (StringCmp (completednesstype_completeness[i].name, completeness_name) == 0) {
+ return completednesstype_completeness[i].completeness;
+ }
+ }
+ return -1;
+}
+
+
+NLM_EXTERN ValNodePtr GetCompletednessTypeList (void)
+{
+ ValNodePtr list = NULL;
+ Int4 i;
+
+ for (i = 0; i < NUM_completednesstype_completeness; i++) {
+ ValNodeAddPointer (&list, completednesstype_completeness[i].completedness_type, StringSave (completednesstype_completeness[i].name));
+ }
+ return list;
+}
+
+
+/* Molecule class fields */
+typedef struct moleculeclasstypemol {
+ Int4 moleculeclass_type;
+ Int4 mol;
+ CharPtr name;
+} MoleculeClassTypeMolData, PNTR MoleculeClassTypeMolPtr;
+
+static MoleculeClassTypeMolData moleculeclasstype_mol[] = {
+ { Molecule_class_type_unknown, 0, "unknown" } ,
+ { Molecule_class_type_dna, MOLECULE_CLASS_DNA, "DNA" } ,
+ { Molecule_class_type_rna, MOLECULE_CLASS_RNA, "RNA" } ,
+ { Molecule_class_type_protein, MOLECULE_CLASS_PROTEIN, "protein" } ,
+ { Molecule_class_type_nucleotide, MOLECULE_CLASS_NUC, "nucleotide" } ,
+ { Molecule_class_type_other, 255, "other" }
+};
+
+
+#define NUM_moleculeclasstype_mol sizeof (moleculeclasstype_mol) / sizeof (MoleculeClassTypeMolData)
+
+NLM_EXTERN Int4 MolFromMoleculeClassType (Int4 moleculeclass_type)
+{
+ Int4 i;
+
+ for (i = 0; i < NUM_moleculeclasstype_mol; i++) {
+ if (moleculeclasstype_mol[i].moleculeclass_type == moleculeclass_type) {
+ return moleculeclasstype_mol[i].mol;
+ }
+ }
+ return -1;
+}
+
+
+NLM_EXTERN CharPtr MolNameFromMol (Int4 mol)
+{
+ Int4 i;
+
+ for (i = 0; i < NUM_moleculeclasstype_mol; i++) {
+ if (moleculeclasstype_mol[i].mol == mol) {
+ return moleculeclasstype_mol[i].name;
+ }
+ }
+ return NULL;
+}
+
+
+static Int4 MolFromMolName (CharPtr mol_name)
+{
+ Int4 i;
+
+ for (i = 0; i < NUM_moleculeclasstype_mol; i++) {
+ if (StringCmp (moleculeclasstype_mol[i].name, mol_name) == 0) {
+ return moleculeclasstype_mol[i].mol;
+ }
+ }
+ return -1;
+}
+
+
+NLM_EXTERN ValNodePtr GetMoleculeClassTypeList (void)
+{
+ ValNodePtr list = NULL;
+ Int4 i;
+
+ for (i = 0; i < NUM_moleculeclasstype_mol; i++) {
+ ValNodeAddPointer (&list, moleculeclasstype_mol[i].moleculeclass_type, StringSave (moleculeclasstype_mol[i].name));
+ }
+ return list;
+}
+
+
+/* Topology fields */
+typedef struct topologytypetopology {
+ Int4 topology_type;
+ Int4 topology;
+ CharPtr name;
+} TopologyTypeTopologyData, PNTR TopologyTypeTopologyPtr;
+
+static TopologyTypeTopologyData topologytype_topology[] = {
+ { Topology_type_unknown, 0, "unknown" } ,
+ { Topology_type_linear, TOPOLOGY_LINEAR, "linear" } ,
+ { Topology_type_circular, TOPOLOGY_CIRCULAR, "circular" } ,
+ { Topology_type_tandem, TOPOLOGY_TANDEM, "tandem" } ,
+ { Topology_type_other, 255, "other" }
+};
+
+#define NUM_topologytype_topology sizeof (topologytype_topology) / sizeof (TopologyTypeTopologyData)
+
+NLM_EXTERN Int4 TopologyFromTopologyType (Int4 topology_type)
+{
+ Int4 i;
+
+ for (i = 0; i < NUM_topologytype_topology; i++) {
+ if (topologytype_topology[i].topology_type == topology_type) {
+ return topologytype_topology[i].topology;
+ }
+ }
+ return -1;
+}
+
+
+NLM_EXTERN CharPtr TopologyNameFromTopology (Int4 topology)
+{
+ Int4 i;
+
+ for (i = 0; i < NUM_topologytype_topology; i++) {
+ if (topologytype_topology[i].topology == topology) {
+ return topologytype_topology[i].name;
+ }
+ }
+ return NULL;
+}
+
+
+static Int4 TopologyFromTopologyName (CharPtr topology_name)
+{
+ Int4 i;
+
+ for (i = 0; i < NUM_topologytype_topology; i++) {
+ if (StringCmp (topologytype_topology[i].name, topology_name) == 0) {
+ return topologytype_topology[i].topology;
+ }
+ }
+ return -1;
+}
+
+
+NLM_EXTERN ValNodePtr GetTopologyTypeList (void)
+{
+ ValNodePtr list = NULL;
+ Int4 i;
+
+ for (i = 0; i < NUM_topologytype_topology; i++) {
+ ValNodeAddPointer (&list, topologytype_topology[i].topology_type, StringSave (topologytype_topology[i].name));
+ }
+ return list;
+}
+
+
+/* strand fields */
+typedef struct strandtypestrand {
+ Int4 strand_type;
+ Int4 strand;
+ CharPtr name;
+} StrandTypeStrandData, PNTR StrandTypeStrandPtr;
+
+static StrandTypeStrandData strandtype_strand[] = {
+ { Strand_type_unknown, 0, "unknown" } ,
+ { Strand_type_single, STRANDEDNESS_SINGLE, "single" } ,
+ { Strand_type_double__, STRANDEDNESS_DOUBLE, "double" } ,
+ { Strand_type_mixed, 3, "mixed" } ,
+ { Strand_type_mixed_rev, 4, "mixed-rev" } ,
+ { Strand_type_other, 255, "other" }
+};
+
+#define NUM_strandtype_strand sizeof (strandtype_strand) / sizeof (StrandTypeStrandData)
+
+NLM_EXTERN Int4 StrandFromStrandType (Int4 strand_type)
+{
+ Int4 i;
+
+ for (i = 0; i < NUM_strandtype_strand; i++) {
+ if (strandtype_strand[i].strand_type == strand_type) {
+ return strandtype_strand[i].strand;
+ }
+ }
+ return -1;
+}
+
+
+NLM_EXTERN CharPtr StrandNameFromStrand (Int4 strand)
+{
+ Int4 i;
+
+ for (i = 0; i < NUM_strandtype_strand; i++) {
+ if (strandtype_strand[i].strand == strand) {
+ return strandtype_strand[i].name;
+ }
+ }
+ return NULL;
+}
+
+
+static Int4 StrandFromStrandName (CharPtr strand_name)
+{
+ Int4 i;
+
+ for (i = 0; i < NUM_strandtype_strand; i++) {
+ if (StringCmp (strandtype_strand[i].name, strand_name) == 0) {
+ return strandtype_strand[i].strand;
+ }
+ }
+ return -1;
+}
+
+
+NLM_EXTERN ValNodePtr GetStrandTypeList (void)
+{
+ ValNodePtr list = NULL;
+ Int4 i;
+
+ for (i = 0; i < NUM_strandtype_strand; i++) {
+ ValNodeAddPointer (&list, strandtype_strand[i].strand_type, StringSave (strandtype_strand[i].name));
+ }
+ return list;
+}
+
+
+static CharPtr GetSequenceQualValName (ValNodePtr field)
+{
+ CharPtr val = NULL;
+
+ if (field == NULL) return NULL;
+ switch (field->choice) {
+ case MolinfoField_molecule:
+ val = BiomolNameFromBiomol (BiomolFromMoleculeType (field->data.intvalue));
+ break;
+ case MolinfoField_technique:
+ val = TechNameFromTech (TechFromTechniqueType (field->data.intvalue));
+ break;
+ case MolinfoField_completedness:
+ val = CompletenessNameFromCompleteness (CompletenessFromCompletednessType (field->data.intvalue));
+ break;
+ case MolinfoField_mol_class:
+ val = MolNameFromMol (MolFromMoleculeClassType (field->data.intvalue));
+ break;
+ case MolinfoField_topology:
+ val = TopologyNameFromTopology (TopologyFromTopologyType (field->data.intvalue));
+ break;
+ case MolinfoField_strand:
+ val = StrandNameFromStrand (StrandFromStrandType (field->data.intvalue));
+ break;
+ }
+ return val;
+}
+
+
+static CharPtr GetSequenceQualName (ValNodePtr field)
+{
+ CharPtr str = NULL, fieldname = "invalid field", val = "invalid value";
+ CharPtr fmt = "%s %s";
+
+ if (field == NULL) return NULL;
+ switch (field->choice) {
+ case MolinfoField_molecule:
+ fieldname = "molecule";
+ val = BiomolNameFromBiomol (BiomolFromMoleculeType (field->data.intvalue));
+ break;
+ case MolinfoField_technique:
+ fieldname = "technique";
+ val = TechNameFromTech (TechFromTechniqueType (field->data.intvalue));
+ break;
+ case MolinfoField_completedness:
+ fieldname = "completeness";
+ val = CompletenessNameFromCompleteness (CompletenessFromCompletednessType (field->data.intvalue));
+ break;
+ case MolinfoField_mol_class:
+ fieldname = "class";
+ val = MolNameFromMol (MolFromMoleculeClassType (field->data.intvalue));
+ break;
+ case MolinfoField_topology:
+ fieldname = "topology";
+ val = TopologyNameFromTopology (TopologyFromTopologyType (field->data.intvalue));
+ break;
+ case MolinfoField_strand:
+ fieldname = "strand";
+ val = StrandNameFromStrand (StrandFromStrandType (field->data.intvalue));
+ break;
+ }
+ if (val == NULL) {
+ val = "Invalid value";
+ }
+ str = (CharPtr) MemNew (sizeof (Char) * (StringLen (fmt) + StringLen (fieldname) + StringLen (val)));
+ sprintf (str, fmt, fieldname, val);
+ return str;
+}
+
+
+/* Simple constraints */
+static Boolean IsWholeWordMatch (CharPtr start, CharPtr found, Int4 match_len)
+{
+ Boolean rval = TRUE;
+ Char char_after;
+ Char char_before;
+
+ if (match_len == 0)
+ {
+ rval = TRUE;
+ }
+ else if (start == NULL || found == NULL)
+ {
+ rval = FALSE;
+ }
+ else
+ {
+ char_after = *(found + match_len);
+ if (found != start)
+ {
+ char_before = *(found - 1);
+ if (isalpha ((Int4) char_before) || isdigit ((Int4) char_before))
+ {
+ rval = FALSE;
+ }
+ }
+ if (char_after != 0 && (isalpha ((Int4) char_after) || isdigit ((Int4)char_after)))
+ {
+ rval = FALSE;
+ }
+ }
+ return rval;
+}
+
+
+NLM_EXTERN Boolean IsStringConstraintEmpty (StringConstraintPtr scp)
+{
+ if (scp == NULL || StringHasNoText (scp->match_text)) return TRUE;
+ else return FALSE;
+}
+
+
+NLM_EXTERN Boolean DoesSingleStringMatchConstraint (CharPtr str, StringConstraintPtr scp)
+{
+ CharPtr pFound;
+ Boolean rval = FALSE;
+ Char char_after = 0;
+
+ if (IsStringConstraintEmpty (scp)) return TRUE;
+ if (StringHasNoText (str)) return FALSE;
+
+ switch (scp->match_location)
+ {
+ case String_location_contains:
+ if (scp->case_sensitive)
+ {
+ pFound = StringSearch (str, scp->match_text);
+ }
+ else
+ {
+ pFound = StringISearch (str, scp->match_text);
+ }
+ if (pFound == NULL)
+ {
+ rval = FALSE;
+ }
+ else if (scp->whole_word)
+ {
+ rval = IsWholeWordMatch (str, pFound, StringLen (scp->match_text));
+ while (!rval && pFound != NULL)
+ {
+ if (scp->case_sensitive)
+ {
+ pFound = StringSearch (pFound + 1, scp->match_text);
+ }
+ else
+ {
+ pFound = StringISearch (pFound + 1, scp->match_text);
+ }
+ if (pFound != NULL)
+ {
+ rval = IsWholeWordMatch (str, pFound, StringLen (scp->match_text));
+ }
+ }
+ }
+ else
+ {
+ rval = TRUE;
+ }
+ break;
+ case String_location_starts:
+ if (scp->case_sensitive)
+ {
+ pFound = StringSearch (str, scp->match_text);
+ }
+ else
+ {
+ pFound = StringISearch (str, scp->match_text);
+ }
+ if (pFound == str)
+ {
+ if (scp->whole_word)
+ {
+ rval = IsWholeWordMatch (str, pFound, StringLen (scp->match_text));
+ }
+ else
+ {
+ rval = TRUE;
+ }
+ }
+ break;
+ case String_location_ends:
+ if (scp->case_sensitive)
+ {
+ pFound = StringSearch (str, scp->match_text);
+ }
+ else
+ {
+ pFound = StringISearch (str, scp->match_text);
+ }
+ while (pFound != NULL && !rval) {
+ char_after = *(pFound + StringLen (scp->match_text));
+ if (char_after == 0)
+ {
+ if (scp->whole_word)
+ {
+ rval = IsWholeWordMatch (str, pFound, StringLen (scp->match_text));
+ }
+ else
+ {
+ rval = TRUE;
+ }
+ /* stop the search, we're at the end of the string */
+ pFound = NULL;
+ }
+ else
+ {
+ if (scp->case_sensitive)
+ {
+ pFound = StringSearch (pFound + 1, scp->match_text);
+ }
+ else
+ {
+ pFound = StringISearch (pFound + 1, scp->match_text);
+ }
+ }
+ }
+ break;
+ case String_location_equals:
+ if (scp->case_sensitive)
+ {
+ if (StringCmp (str, scp->match_text) == 0)
+ {
+ rval = TRUE;
+ }
+ }
+ else
+ {
+ if (StringICmp (str, scp->match_text) == 0)
+ {
+ rval = TRUE;
+ }
+ }
+ break;
+ case String_location_inlist:
+ if (scp->case_sensitive)
+ {
+ pFound = StringSearch (scp->match_text, str);
+ }
+ else
+ {
+ pFound = StringISearch (scp->match_text, str);
+ }
+ if (pFound == NULL)
+ {
+ rval = FALSE;
+ }
+ else
+ {
+ rval = IsWholeWordMatch (scp->match_text, pFound, StringLen (str));
+ while (!rval && pFound != NULL)
+ {
+ if (scp->case_sensitive)
+ {
+ pFound = StringSearch (pFound + 1, str);
+ }
+ else
+ {
+ pFound = StringISearch (pFound + 1, str);
+ }
+ if (pFound != NULL)
+ {
+ rval = IsWholeWordMatch (scp->match_text, pFound, StringLen (str));
+ }
+ }
+ }
+ if (!rval) {
+ /* look for spans */
+ rval = IsStringInSpanInList (str, scp->match_text);
+ }
+ break;
+ }
+ return rval;
+}
+
+
+NLM_EXTERN Boolean DoesStringMatchConstraint (CharPtr str, StringConstraintPtr scp)
+{
+ Boolean rval;
+
+ rval = DoesSingleStringMatchConstraint (str, scp);
+ if (scp != NULL && scp->not_present) {
+ rval = !rval;
+ }
+ return rval;
+}
+
+
+static Boolean DoesStringListMatchConstraint (ValNodePtr list, StringConstraintPtr scp)
+{
+ Int4 len = 1;
+ CharPtr tmp;
+ Boolean rval = FALSE;
+ ValNodePtr vnp;
+
+ if (IsStringConstraintEmpty (scp)) {
+ return TRUE;
+ }
+ if (list == NULL) return FALSE;
+
+ for (vnp = list; vnp != NULL; vnp = vnp->next) {
+ len += StringLen (vnp->data.ptrvalue) + 2;
+ }
+
+ tmp = (CharPtr) MemNew (sizeof (Char) * len);
+ for (vnp = list; vnp != NULL; vnp = vnp->next) {
+ StringCat (tmp, vnp->data.ptrvalue);
+ if (vnp->next != NULL) {
+ StringCat (tmp, "; ");
+ }
+ }
+
+ rval = DoesStringMatchConstraint (tmp, scp);
+ tmp = MemFree (tmp);
+ return rval;
+}
+
+
+static Boolean DoesStrandMatchConstraint (SeqLocPtr slp, LocationConstraintPtr lcp)
+{
+ Uint2 strand;
+ Boolean rval = FALSE;
+
+ if (slp == NULL)
+ {
+ rval = FALSE;
+ }
+ else if (lcp == NULL || lcp->strand == Strand_constraint_any)
+ {
+ rval = TRUE;
+ }
+ else
+ {
+ strand = SeqLocStrand (slp);
+ if (strand == Seq_strand_minus)
+ {
+ if (lcp->strand == Strand_constraint_minus)
+ {
+ rval = TRUE;
+ }
+ else
+ {
+ rval = FALSE;
+ }
+ }
+ else
+ {
+ if (lcp->strand == Strand_constraint_plus)
+ {
+ rval = TRUE;
+ }
+ else
+ {
+ rval = FALSE;
+ }
+ }
+ }
+ return rval;
+}
+
+
+static Boolean DoesBioseqMatchSequenceType (BioseqPtr bsp, Uint2 seq_type)
+{
+ Boolean rval = FALSE;
+
+ if (bsp == NULL) return FALSE;
+ if (seq_type == Seqtype_constraint_any) return TRUE;
+
+ if (ISA_na (bsp->mol) && seq_type == Seqtype_constraint_nuc)
+ {
+ rval = TRUE;
+ }
+ else if (ISA_aa (bsp->mol) && seq_type == Seqtype_constraint_prot)
+ {
+ rval = TRUE;
+ }
+ return rval;
+}
+
+
+static Boolean DoesSequenceTypeMatchContraint (SeqLocPtr slp, LocationConstraintPtr lcp)
+{
+ Boolean rval = FALSE;
+ BioseqPtr bsp;
+
+ if (slp == NULL)
+ {
+ rval = FALSE;
+ }
+ else if (lcp == NULL || lcp->seq_type == Seqtype_constraint_any)
+ {
+ rval = TRUE;
+ }
+ else
+ {
+ bsp = BioseqFindFromSeqLoc (slp);
+ rval = DoesBioseqMatchSequenceType (bsp, lcp->seq_type);
+ }
+ return rval;
+}
+
+static Boolean DoesLocationMatchConstraint (SeqLocPtr slp, LocationConstraintPtr lcp)
+
+{
+ Boolean rval = FALSE;
+
+ if (slp == NULL)
+ {
+ rval = FALSE;
+ }
+ else if (lcp == NULL || (DoesStrandMatchConstraint (slp, lcp) && DoesSequenceTypeMatchContraint (slp, lcp)))
+ {
+ rval = TRUE;
+ }
+ return rval;
+}
+
+
+static Boolean DoesObjectMatchLocationConstraint (Uint1 choice, Pointer data, LocationConstraintPtr constraint)
+{
+ SeqFeatPtr sfp;
+ SeqDescrPtr sdp;
+ CGPSetPtr cgp;
+ BioseqPtr bsp = NULL;
+ BioseqSetPtr bssp;
+ ValNodePtr vnp;
+ ObjValNodePtr ovp;
+ SeqMgrFeatContext context;
+
+ if (data == NULL) return FALSE;
+
+ if (constraint == NULL
+ || (constraint->strand == Strand_constraint_any
+ && constraint->seq_type == Seqtype_constraint_any)) {
+ return TRUE;
+ }
+
+ if (choice == OBJ_SEQFEAT) {
+ sfp = (SeqFeatPtr) data;
+ bsp = BioseqFindFromSeqLoc (sfp->location);
+ } else if (choice == OBJ_SEQDESC) {
+ sdp = (SeqDescrPtr) data;
+ if (sdp->extended != 0) {
+ ovp = (ObjValNodePtr) sdp;
+ if (ovp->idx.parenttype == OBJ_BIOSEQSET) {
+ bssp = (BioseqSetPtr) ovp->idx.parentptr;
+ if (bssp != NULL && bssp->seq_set != NULL && IS_Bioseq_set (bssp->seq_set)) {
+ bsp = (BioseqPtr) bssp->seq_set->data.ptrvalue;
+ }
+ } else if (ovp->idx.parenttype == OBJ_BIOSEQ) {
+ bsp = (BioseqPtr) ovp->idx.parentptr;
+ }
+ }
+ } else if (choice == 0) {
+ if (constraint->seq_type != Seqtype_constraint_any) {
+ return FALSE;
+ }
+ cgp = (CGPSetPtr) data;
+ if (cgp->cds_list != NULL && cgp->cds_list->data.ptrvalue != NULL) {
+ sfp = (SeqFeatPtr) cgp->cds_list->data.ptrvalue;
+ bsp = BioseqFindFromSeqLoc (sfp->location);
+ } else if (cgp->gene_list != NULL && cgp->gene_list->data.ptrvalue != NULL) {
+ sfp = (SeqFeatPtr) cgp->gene_list->data.ptrvalue;
+ bsp = BioseqFindFromSeqLoc (sfp->location);
+ } else if (cgp->mrna_list != NULL && cgp->mrna_list->data.ptrvalue != NULL) {
+ sfp = (SeqFeatPtr) cgp->mrna_list->data.ptrvalue;
+ bsp = BioseqFindFromSeqLoc (sfp->location);
+ } else if (cgp->prot_list != NULL && cgp->prot_list->data.ptrvalue != NULL) {
+ sfp = (SeqFeatPtr) cgp->prot_list->data.ptrvalue;
+ bsp = BioseqFindFromSeqLoc (sfp->location);
+ }
+ }
+ if (!DoesBioseqMatchSequenceType(bsp, constraint->seq_type)) {
+ return FALSE;
+ }
+ if (constraint->strand != Strand_constraint_any && ISA_aa (bsp->mol)) {
+ sfp = SeqMgrGetCDSgivenProduct (bsp, &context);
+ if (constraint->strand == Strand_constraint_minus && context.strand != Seq_strand_minus) {
+ return FALSE;
+ }
+ if (constraint->strand == Strand_constraint_plus && context.strand == Seq_strand_minus) {
+ return FALSE;
+ }
+ } else if (constraint->strand != Strand_constraint_any) {
+ if (choice == 0) {
+ /* strand for CDS-Gene-Prot group */
+ cgp = (CGPSetPtr) data;
+ for (vnp = cgp->cds_list; vnp != NULL; vnp = vnp->next) {
+ sfp = (SeqFeatPtr) vnp->data.ptrvalue;
+ if (sfp != NULL && !DoesStrandMatchConstraint (sfp->location, constraint)) {
+ return FALSE;
+ }
+ }
+ for (vnp = cgp->gene_list; vnp != NULL; vnp = vnp->next) {
+ sfp = (SeqFeatPtr) vnp->data.ptrvalue;
+ if (sfp != NULL && !DoesStrandMatchConstraint (sfp->location, constraint)) {
+ return FALSE;
+ }
+ }
+ for (vnp = cgp->mrna_list; vnp != NULL; vnp = vnp->next) {
+ sfp = (SeqFeatPtr) vnp->data.ptrvalue;
+ if (sfp != NULL && !DoesStrandMatchConstraint (sfp->location, constraint)) {
+ return FALSE;
+ }
+ }
+ } else if (choice == OBJ_SEQFEAT) {
+ sfp = (SeqFeatPtr) data;
+ if (!DoesStrandMatchConstraint (sfp->location, constraint)) {
+ return FALSE;
+ }
+ } else {
+ /* descriptors can't meet strand constraints */
+ return FALSE;
+ }
+ }
+ return TRUE;
+}
+
+
+/* for parsing and editing */
+static CharPtr GetTextPortionFromString (CharPtr str, TextPortionPtr text_portion)
+{
+ CharPtr portion = NULL;
+ CharPtr found_start, found_end;
+ Int4 found_len;
+
+ if (StringHasNoText (str)) {
+ return NULL;
+ }
+ if (text_portion == NULL) {
+ return StringSave (str);
+ }
+
+ if (text_portion->left_text == NULL || text_portion->left_text [0] == 0)
+ {
+ found_start = str;
+ }
+ else
+ {
+ if (text_portion->case_sensitive)
+ {
+ found_start = StringSearch (str, text_portion->left_text);
+ }
+ else
+ {
+ found_start = StringISearch (str, text_portion->left_text);
+ }
+
+ if (text_portion->whole_word && ! IsWholeWordMatch (str, found_start, StringLen (text_portion->left_text)))
+ {
+ found_start = NULL;
+ }
+ }
+
+ if (found_start == NULL)
+ {
+ return NULL;
+ }
+
+ if (!text_portion->include_left)
+ {
+ found_start += StringLen (text_portion->left_text);
+ }
+
+ if (text_portion->right_text == NULL || text_portion->right_text [0] == 0)
+ {
+ found_len = StringLen (found_start);
+ }
+ else
+ {
+ if (text_portion->case_sensitive)
+ {
+ found_end = StringSearch (found_start, text_portion->right_text);
+ }
+ else
+ {
+ found_end = StringISearch (found_start, text_portion->right_text);
+ }
+ if (text_portion->whole_word && ! IsWholeWordMatch (str, found_end, StringLen (text_portion->right_text)))
+ {
+ found_end = NULL;
+ }
+
+ if (found_end == NULL)
+ {
+ found_len = 0;
+ }
+ else if (text_portion->include_right)
+ {
+ found_len = (Int4)(found_end - found_start) + StringLen (text_portion->right_text);
+ }
+ else
+ {
+ found_len = found_end - found_start;
+ }
+ }
+
+ if (found_len > 0)
+ {
+ portion = (CharPtr) MemNew (sizeof (Char) * (found_len + 1));
+ StringNCpy (portion, found_start, found_len);
+ portion[found_len] = 0;
+ }
+ return portion;
+}
+
+
+
+static CharPtr FindTextPortionLocationInString (CharPtr str, TextPortionPtr text_portion)
+{
+ CharPtr start, stop;
+
+ if (str == NULL || text_portion == NULL) return FALSE;
+
+ if (text_portion->left_text != NULL) {
+ start = StringSearch (str, text_portion->left_text);
+ if (start != NULL) {
+ if (!text_portion->include_left) {
+ start += StringLen (text_portion->left_text);
+ }
+ }
+ } else {
+ start = str;
+ }
+ if (start != NULL) {
+ if (text_portion->right_text != NULL) {
+ stop = StringSearch (start, text_portion->right_text);
+ if (stop == NULL) {
+ start = NULL;
+ }
+ }
+ }
+ return start;
+}
+
+
+static void ReplaceStringForParse(CharPtr src_text, TextPortionPtr text_portion)
+{
+ CharPtr src, dst;
+
+ if (src_text == NULL || text_portion == NULL) {
+ return;
+ }
+
+ dst = FindTextPortionLocationInString (src_text, text_portion);
+ if (dst == NULL) return;
+ if (text_portion->right_text == NULL) {
+ *dst = 0;
+ } else {
+ src = StringSearch (src_text, text_portion->right_text);
+ if (src != NULL) {
+ if (text_portion->include_right) {
+ src += StringLen (text_portion->right_text);
+ }
+ while (*src != 0) {
+ *dst = *src;
+ dst++;
+ src++;
+ }
+ *dst = 0;
+ }
+ }
+}
+
+
+/* generic functions for getting string values */
+static Int4 GetDbtagStringLen (DbtagPtr db_tag)
+{
+ Int4 len;
+
+ if (db_tag == NULL)
+ {
+ return 0;
+ }
+
+ len = StringLen (db_tag->db) + 2;
+ if (db_tag->tag != NULL)
+ {
+ if (db_tag->tag->str != NULL)
+ {
+ len += StringLen (db_tag->tag->str);
+ }
+ else
+ {
+ len += 10;
+ }
+ }
+ return len;
+}
+
+
+static CharPtr GetDbtagString (DbtagPtr db_tag)
+{
+ Int4 len;
+ CharPtr str;
+
+ if (db_tag == NULL) {
+ return NULL;
+ }
+
+ len = GetDbtagStringLen (db_tag);
+ if (len == 0) {
+ return NULL;
+ }
+
+ str = (CharPtr) MemNew (len * sizeof (Char));
+ if (str != NULL) {
+ StringCpy (str, db_tag->db);
+ StringCat (str, ":");
+ if (db_tag->tag != NULL) {
+ if (db_tag->tag->str != NULL) {
+ StringCat (str, db_tag->tag->str);
+ } else {
+ sprintf (str + StringLen (str), "%d", db_tag->tag->id);
+ }
+ }
+ }
+ return str;
+}
+
+
+/* generic functions for setting field values */
+static Boolean SetStringValue (CharPtr PNTR existing_val, CharPtr new_val, Uint2 existing_text)
+{
+ Boolean rval = FALSE;
+ Int4 len;
+ CharPtr tmp;
+
+ if (existing_val == NULL) {
+ return FALSE;
+ }
+
+ if (StringHasNoText (*existing_val)) {
+ *existing_val = MemFree (*existing_val);
+ *existing_val = StringSave (new_val);
+ rval = TRUE;
+ } else {
+ switch (existing_text) {
+ case ExistingTextOption_replace_old :
+ *existing_val = MemFree (*existing_val);
+ *existing_val = StringSave (new_val);
+ rval = TRUE;
+ break;
+ case ExistingTextOption_append_semi :
+ len = StringLen (new_val) + StringLen (*existing_val) + 3;
+ tmp = (CharPtr) MemNew (sizeof (Char) * len);
+ if (tmp != NULL) {
+ sprintf (tmp, "%s; %s", *existing_val, new_val);
+ MemFree (*existing_val);
+ *existing_val = tmp;
+ rval = TRUE;
+ }
+ break;
+ case ExistingTextOption_append_space :
+ len = StringLen (new_val) + StringLen (*existing_val) + 2;
+ tmp = (CharPtr) MemNew (sizeof (Char) * len);
+ if (tmp != NULL) {
+ sprintf (tmp, "%s %s", *existing_val, new_val);
+ MemFree (*existing_val);
+ *existing_val = tmp;
+ rval = TRUE;
+ }
+ break;
+ case ExistingTextOption_append_colon :
+ len = StringLen (new_val) + StringLen (*existing_val) + 3;
+ tmp = (CharPtr) MemNew (sizeof (Char) * len);
+ if (tmp != NULL) {
+ sprintf (tmp, "%s: %s", *existing_val, new_val);
+ MemFree (*existing_val);
+ *existing_val = tmp;
+ rval = TRUE;
+ }
+ break;
+ case ExistingTextOption_append_none :
+ len = StringLen (new_val) + StringLen (*existing_val) + 1;
+ tmp = (CharPtr) MemNew (sizeof (Char) * len);
+ if (tmp != NULL) {
+ sprintf (tmp, "%s%s", *existing_val, new_val);
+ MemFree (*existing_val);
+ *existing_val = tmp;
+ rval = TRUE;
+ }
+ break;
+ case ExistingTextOption_prefix_semi :
+ len = StringLen (new_val) + StringLen (*existing_val) + 3;
+ tmp = (CharPtr) MemNew (sizeof (Char) * len);
+ if (tmp != NULL) {
+ sprintf (tmp, "%s; %s", new_val, *existing_val);
+ MemFree (*existing_val);
+ *existing_val = tmp;
+ rval = TRUE;
+ }
+ break;
+ case ExistingTextOption_prefix_space :
+ len = StringLen (new_val) + StringLen (*existing_val) + 2;
+ tmp = (CharPtr) MemNew (sizeof (Char) * len);
+ if (tmp != NULL) {
+ sprintf (tmp, "%s %s", new_val, *existing_val);
+ MemFree (*existing_val);
+ *existing_val = tmp;
+ rval = TRUE;
+ }
+ break;
+ case ExistingTextOption_prefix_colon :
+ len = StringLen (new_val) + StringLen (*existing_val) + 3;
+ tmp = (CharPtr) MemNew (sizeof (Char) * len);
+ if (tmp != NULL) {
+ sprintf (tmp, "%s: %s", new_val, *existing_val);
+ MemFree (*existing_val);
+ *existing_val = tmp;
+ rval = TRUE;
+ }
+ break;
+ case ExistingTextOption_prefix_none :
+ len = StringLen (new_val) + StringLen (*existing_val) + 1;
+ tmp = (CharPtr) MemNew (sizeof (Char) * len);
+ if (tmp != NULL) {
+ sprintf (tmp, "%s%s", new_val, *existing_val);
+ MemFree (*existing_val);
+ *existing_val = tmp;
+ rval = TRUE;
+ }
+ break;
+ case ExistingTextOption_leave_old :
+ rval = FALSE;
+ }
+ }
+ return rval;
+}
+
+
+static Boolean SetStringsInValNodeStringList (ValNodePtr PNTR list, StringConstraintPtr scp, CharPtr new_val, Uint2 existing_text)
+{
+ ValNodePtr vnp;
+ CharPtr cp;
+ Boolean rval = FALSE;
+
+ if (list == NULL)
+ {
+ return FALSE;
+ }
+
+ if (*list == NULL && (scp == NULL || StringHasNoText (scp->match_text))) {
+ ValNodeAddPointer (list, 0, StringSave (new_val));
+ rval = TRUE;
+ } else if (existing_text == ExistingTextOption_append_semi) {
+ if (DoesStringListMatchConstraint (*list, scp)) {
+ ValNodeAddPointer (list, 0, StringSave (new_val));
+ rval = TRUE;
+ }
+ } else if (existing_text == ExistingTextOption_prefix_semi) {
+ if (DoesStringListMatchConstraint (*list, scp)) {
+ vnp = ValNodeNew (NULL);
+ vnp->data.ptrvalue = StringSave (new_val);
+ vnp->next = *list;
+ *list = vnp;
+ rval = TRUE;
+ }
+ } else if (existing_text == ExistingTextOption_replace_old) {
+ if (DoesStringListMatchConstraint (*list, scp)) {
+ *list = ValNodeFreeData (*list);
+ vnp = ValNodeNew (NULL);
+ vnp->data.ptrvalue = StringSave (new_val);
+ *list = vnp;
+ rval = TRUE;
+ }
+ } else if (existing_text == ExistingTextOption_leave_old) {
+ rval = FALSE;
+ } else {
+ for (vnp = *list; vnp != NULL; vnp = vnp->next)
+ {
+ cp = (CharPtr) vnp->data.ptrvalue;
+ if (DoesStringMatchConstraint (cp, scp)) {
+ rval |= SetStringValue (&cp, new_val, existing_text);
+ vnp->data.ptrvalue = cp;
+ }
+ }
+ }
+ return rval;
+}
+
+
+static Boolean SetStringInGBQualList (GBQualPtr PNTR list, ValNodePtr field, StringConstraintPtr scp, CharPtr new_val, Uint2 existing_text)
+{
+ Boolean rval = FALSE;
+ Int4 gbqual;
+ CharPtr qual_name = NULL;
+ GBQualPtr gbq, last_gbq = NULL;
+
+ if (field == NULL) return FALSE;
+
+ if (field->choice == FeatQualChoice_legal_qual)
+ {
+ gbqual = GetGBQualFromFeatQual (field->data.intvalue);
+ if (gbqual > -1) {
+ qual_name = ParFlat_GBQual_names [gbqual].name;
+ for (gbq = *list; gbq != NULL; gbq = gbq->next) {
+ if (StringCmp (gbq->qual, qual_name) == 0
+ && DoesStringMatchConstraint (gbq->val, scp)) {
+ rval |= SetStringValue (&(gbq->val), new_val, existing_text);
+ }
+ last_gbq = gbq;
+ }
+ if (!rval && (scp == NULL || scp->match_text == NULL)) {
+ gbq = GBQualNew ();
+ gbq->qual = StringSave (qual_name);
+ gbq->val = StringSave (new_val);
+ if (last_gbq == NULL) {
+ *list = gbq;
+ } else {
+ last_gbq->next = gbq;
+ }
+ rval = TRUE;
+ }
+ }
+ } else if (field->choice == FeatQualChoice_illegal_qual) {
+ for (gbq = *list; gbq != NULL; gbq = gbq->next) {
+ if (DoesStringMatchConstraint (gbq->qual, field->data.ptrvalue)
+ && DoesStringMatchConstraint (gbq->val, scp)) {
+ rval |= SetStringValue (&(gbq->val), new_val, existing_text);
+ }
+ }
+ }
+
+ return rval;
+}
+
+
+static Boolean IsAllDigits (CharPtr str)
+{
+ CharPtr cp;
+
+ if (StringHasNoText (str)) return FALSE;
+
+ cp = str;
+ while (*cp != 0 && isdigit (*cp)) {
+ cp++;
+ }
+ if (*cp == 0) {
+ return TRUE;
+ } else {
+ return FALSE;
+ }
+}
+
+
+static Boolean SetObjectIdString (ObjectIdPtr oip, CharPtr value, Uint2 existing_text)
+{
+ Boolean rval = FALSE;
+ Char num[15];
+ CharPtr tmp = NULL;
+
+ if (oip == NULL) {
+ return FALSE;
+ }
+
+ if (oip->id > 0) {
+ sprintf (num, "%d", oip->id);
+ tmp = StringSave (num);
+ } else {
+ tmp = StringSaveNoNull (oip->str);
+ }
+ if (SetStringValue (&tmp, value, existing_text)) {
+ oip->str = MemFree (oip->str);
+ oip->id = 0;
+ if (IsAllDigits (tmp)) {
+ oip->id = atoi (tmp);
+ } else {
+ oip->str = tmp;
+ tmp = NULL;
+ }
+ rval = TRUE;
+ }
+ tmp = MemFree (tmp);
+ return rval;
+}
+
+
+static Boolean SetDbtagString (DbtagPtr db_tag, CharPtr value, Uint2 existing_text)
+{
+ Boolean rval = FALSE;
+ CharPtr cp;
+ Int4 dbxvalid;
+ CharPtr tmp;
+ CharPtr twoval;
+
+ if (db_tag == NULL || StringHasNoText (value)) {
+ return FALSE;
+ }
+
+ cp = StringChr (value, ':');
+ if (cp == NULL) {
+ tmp = StringSave (db_tag->db);
+ if (SetStringValue (&tmp, value, existing_text)) {
+ dbxvalid = IsDbxrefValid (tmp, NULL, NULL, TRUE, NULL);
+ if (dbxvalid != 0) {
+ db_tag->db = MemFree (db_tag->db);
+ db_tag->db = tmp;
+ tmp = NULL;
+ rval = TRUE;
+ }
+ }
+ if (!rval) {
+ if (db_tag->tag == NULL) {
+ db_tag->tag = ObjectIdNew();
+ }
+ rval = SetObjectIdString (db_tag->tag, value, existing_text);
+ }
+ tmp = MemFree (tmp);
+ } else {
+ twoval = StringSave (value);
+ cp = StringChr (twoval, ':');
+ *cp = 0;
+ cp++;
+ rval = SetStringValue (&(db_tag->db), twoval, existing_text);
+ if (db_tag->tag == NULL) {
+ db_tag->tag = ObjectIdNew ();
+ }
+ rval |= SetObjectIdString (db_tag->tag, cp, existing_text);
+ twoval = MemFree (twoval);
+ }
+ return rval;
+}
+
+
+static Boolean SetDbxrefString (SeqFeatPtr sfp, StringConstraintPtr scp, CharPtr value, Uint2 existing_text)
+{
+ ValNodePtr vnp;
+ Boolean rval = FALSE, skip;
+ DbtagPtr dbtag;
+ CharPtr cp;
+
+ if (sfp == NULL) {
+ return FALSE;
+ }
+
+ if ((sfp->dbxref == NULL || existing_text == ExistingTextOption_append_semi) && (scp == NULL || StringHasNoText (scp->match_text))) {
+ dbtag = DbtagNew ();
+ rval = SetDbtagString (dbtag, value, existing_text);
+ if (rval) {
+ ValNodeAddPointer (&(sfp->dbxref), 0, dbtag);
+ } else {
+ dbtag = DbtagFree (dbtag);
+ }
+ } else {
+ for (vnp = sfp->dbxref; vnp != NULL; vnp = vnp->next) {
+ skip = FALSE;
+ if (scp != NULL) {
+ cp = GetDbtagString (vnp->data.ptrvalue);
+ if (!DoesStringMatchConstraint (cp, scp)) {
+ skip = TRUE;
+ }
+ cp = MemFree (cp);
+ }
+ if (!skip) {
+ rval |= SetDbtagString (vnp->data.ptrvalue, value, existing_text);
+ }
+ }
+ }
+ return rval;
+}
+
+
+
+static CharPtr GetFirstValNodeStringMatch (ValNodePtr vnp, StringConstraintPtr scp)
+{
+ CharPtr str = NULL;
+ while (vnp != NULL && str == NULL) {
+ if (!StringHasNoText (vnp->data.ptrvalue)
+ && DoesStringMatchConstraint (vnp->data.ptrvalue, scp)) {
+ str = StringSave (vnp->data.ptrvalue);
+ }
+ vnp = vnp->next;
+ }
+ return str;
+}
+
+
+static Boolean RemoveValNodeStringMatch (ValNodePtr PNTR list, StringConstraintPtr scp)
+{
+ ValNodePtr vnp_prev = NULL, vnp_next, vnp;
+ Boolean rval = FALSE;
+
+ if (list == NULL) return FALSE;
+ vnp = *list;
+ while (vnp != NULL) {
+ vnp_next = vnp->next;
+ if (!StringHasNoText (vnp->data.ptrvalue)
+ && DoesStringMatchConstraint (vnp->data.ptrvalue, scp)) {
+ if (vnp_prev == NULL) {
+ *list = vnp->next;
+ } else {
+ vnp_prev->next = vnp->next;
+ }
+ vnp->next = NULL;
+ vnp = ValNodeFreeData (vnp);
+ rval = TRUE;
+ } else {
+ vnp_prev = vnp;
+ }
+ vnp = vnp_next;
+ }
+ return rval;
+}
+
+
+static CharPtr GetFirstGBQualMatch (GBQualPtr qual, CharPtr qual_name, StringConstraintPtr scp)
+{
+ CharPtr str = NULL;
+ while (qual != NULL && str == NULL) {
+ if (StringICmp (qual->qual, qual_name) == 0
+ &&!StringHasNoText (qual->val)
+ && DoesStringMatchConstraint (qual->val, scp)) {
+ str = StringSave (qual->val);
+ }
+ qual = qual->next;
+ }
+ return str;
+}
+
+
+static CharPtr GetFirstGBQualMatchConstraintName (GBQualPtr qual, StringConstraintPtr qual_name, StringConstraintPtr scp)
+{
+ CharPtr str = NULL;
+ while (qual != NULL && str == NULL) {
+ if (DoesStringMatchConstraint (qual->qual, qual_name)
+ &&!StringHasNoText (qual->val)
+ && DoesStringMatchConstraint (qual->val, scp)) {
+ str = StringSave (qual->val);
+ }
+ qual = qual->next;
+ }
+ return str;
+}
+
+
+static Boolean RemoveGBQualMatch (GBQualPtr PNTR list, CharPtr qual_name, StringConstraintPtr scp)
+{
+ GBQualPtr qual_prev = NULL, qual_next, qual;
+ Boolean rval = FALSE;
+
+ if (list == NULL) return FALSE;
+ qual = *list;
+ while (qual != NULL) {
+ qual_next = qual->next;
+ if (StringICmp (qual->qual, qual_name) == 0
+ && !StringHasNoText (qual->val)
+ && DoesStringMatchConstraint (qual->val, scp)) {
+ if (qual_prev == NULL) {
+ *list = qual->next;
+ } else {
+ qual_prev->next = qual->next;
+ }
+ qual->next = NULL;
+ qual = GBQualFree (qual);
+ rval = TRUE;
+ } else {
+ qual_prev = qual;
+ }
+ qual = qual_next;
+ }
+ return rval;
+}
+
+
+static Boolean RemoveGBQualMatchConstraintName (GBQualPtr PNTR list, StringConstraintPtr qual_name, StringConstraintPtr scp)
+{
+ GBQualPtr qual_prev = NULL, qual_next, qual;
+ Boolean rval = FALSE;
+
+ if (list == NULL) return FALSE;
+ qual = *list;
+ while (qual != NULL) {
+ qual_next = qual->next;
+ if (DoesStringMatchConstraint (qual->qual, qual_name)
+ && !StringHasNoText (qual->val)
+ && DoesStringMatchConstraint (qual->val, scp)) {
+ if (qual_prev == NULL) {
+ *list = qual->next;
+ } else {
+ qual_prev->next = qual->next;
+ }
+ qual->next = NULL;
+ qual = GBQualFree (qual);
+ rval = TRUE;
+ } else {
+ qual_prev = qual;
+ }
+ qual = qual_next;
+ }
+ return rval;
+}
+
+
+static CharPtr GetDbxrefString (SeqFeatPtr sfp, StringConstraintPtr scp)
+{
+ ValNodePtr vnp;
+ Int4 len = 0;
+ CharPtr str = NULL, cp;
+
+ if (sfp == NULL || sfp->dbxref == NULL) {
+ return NULL;
+ }
+
+ for (vnp = sfp->dbxref; vnp != NULL; vnp = vnp->next) {
+ cp = GetDbtagString (vnp->data.ptrvalue);
+ if (cp != NULL && DoesStringMatchConstraint(cp, scp)) {
+ len += StringLen (cp) + 1;
+ }
+ cp = MemFree (cp);
+ }
+
+ if (len == 0) {
+ return NULL;
+ }
+
+ str = (CharPtr) MemNew ((len + 1) * sizeof (Char));
+ if (str != NULL) {
+ for (vnp = sfp->dbxref; vnp != NULL; vnp = vnp->next) {
+ cp = GetDbtagString (vnp->data.ptrvalue);
+ if (cp != NULL && DoesStringMatchConstraint(cp, scp)) {
+ StringCat (str, cp);
+ StringCat (str, ";");
+ }
+ cp = MemFree (cp);
+ }
+ }
+ if (StringLen (str) >1) {
+ /* remove final semicolon */
+ str [StringLen (str) - 2] = 0;
+ }
+ return str;
+}
+
+
+static Boolean RemoveDbxrefString (SeqFeatPtr sfp, StringConstraintPtr scp)
+{
+ ValNodePtr vnp, vnp_prev = NULL, vnp_next;
+ CharPtr cp;
+ Boolean rval = FALSE;
+
+ if (sfp == NULL || sfp->dbxref == NULL) {
+ return FALSE;
+ }
+
+ vnp = sfp->dbxref;
+ while (vnp != NULL) {
+ vnp_next = vnp->next;
+ cp = GetDbtagString (vnp->data.ptrvalue);
+ if (DoesStringMatchConstraint(cp, scp)) {
+ if (vnp_prev == NULL) {
+ sfp->dbxref = vnp->next;
+ } else {
+ vnp_prev->next = vnp->next;
+ }
+ vnp->next = NULL;
+ vnp->data.ptrvalue = DbtagFree (vnp->data.ptrvalue);
+ vnp = ValNodeFree (vnp);
+ rval = TRUE;
+ } else {
+ vnp_prev = vnp;
+ }
+ }
+ return rval;
+}
+
+
+static CharPtr GetRNAProductString (SeqFeatPtr sfp, StringConstraintPtr scp)
+{
+ RnaRefPtr rrp;
+ SeqMgrFeatContext context;
+ CharPtr str = NULL;
+
+ if (sfp == NULL || sfp->data.choice != SEQFEAT_RNA || sfp->data.value.ptrvalue == NULL) {
+ return NULL;
+ }
+
+ rrp = sfp->data.value.ptrvalue;
+ if (rrp->ext.choice == 0
+ || (rrp->ext.choice == 1 && StringHasNoText (rrp->ext.value.ptrvalue))
+ || (rrp->ext.choice == 1
+ && (StringCmp (rrp->ext.value.ptrvalue, "ncRNA") == 0
+ || StringCmp (rrp->ext.value.ptrvalue, "tmRNA") == 0
+ || StringCmp (rrp->ext.value.ptrvalue, "misc_RNA") == 0))) {
+ str = GetFirstGBQualMatch (sfp->qual, "product", scp);
+ }
+
+ if (str == NULL) {
+ if (rrp->ext.choice == 1 && !StringHasNoText (rrp->ext.value.ptrvalue)
+ && StringCmp (rrp->ext.value.ptrvalue, "ncRNA") != 0
+ && StringCmp (rrp->ext.value.ptrvalue, "tmRNA") != 0
+ && StringCmp (rrp->ext.value.ptrvalue, "misc_RNA") != 0) {
+ str = StringSave (rrp->ext.value.ptrvalue);
+ } else if (rrp->ext.choice == 2 && rrp->ext.value.ptrvalue != NULL) {
+ if (SeqMgrGetDesiredFeature (sfp->idx.entityID, NULL, 0, 0, sfp, &context) != NULL
+ && !StringHasNoText (context.label)
+ && StringCmp (context.label, "tRNA") != 0) {
+ str = (CharPtr) MemNew (sizeof (Char) + (StringLen (context.label) + 6));
+ sprintf (str, "tRNA-%s", context.label);
+ }
+ }
+ if (!DoesStringMatchConstraint(str, scp)) {
+ str = MemFree (str);
+ }
+ }
+ return str;
+}
+
+
+static Boolean IsParseabletRNAName (CharPtr name_string)
+{
+ if (StringHasNoText(name_string))
+ {
+ return TRUE;
+ }
+ else if (StringNICmp (name_string, "trna-", 5) != 0)
+ {
+ return FALSE;
+ }
+ else if (StringLen (name_string) != 8)
+ {
+ return FALSE;
+ }
+ else if (ParseTRnaString (name_string, NULL, NULL, TRUE) == 0)
+ {
+ return FALSE;
+ }
+ else
+ {
+ return TRUE;
+ }
+}
+
+
+static Boolean SetRNAProductString (SeqFeatPtr sfp, StringConstraintPtr scp, CharPtr new_val, Uint2 existing_text)
+{
+ RnaRefPtr rrp;
+ Boolean rval = FALSE;
+ ValNode vn;
+ CharPtr cp, tmp;
+ tRNAPtr trp;
+ Boolean justTrnaText = FALSE;
+ Uint1 codon [6];
+
+ if (sfp == NULL || sfp->data.choice != SEQFEAT_RNA || sfp->data.value.ptrvalue == NULL) {
+ return FALSE;
+ }
+
+ rrp = sfp->data.value.ptrvalue;
+ if (rrp->ext.choice == 0
+ || (rrp->ext.choice == 1 && StringHasNoText (rrp->ext.value.ptrvalue))
+ || (rrp->ext.choice == 1
+ && (StringCmp (rrp->ext.value.ptrvalue, "ncRNA") == 0
+ || StringCmp (rrp->ext.value.ptrvalue, "tmRNA") == 0
+ || StringCmp (rrp->ext.value.ptrvalue, "misc_RNA") == 0))) {
+ vn.choice = FeatQualChoice_legal_qual;
+ vn.data.intvalue = Feat_qual_legal_product;
+
+ rval = SetStringInGBQualList (&(sfp->qual), &vn, scp, new_val, existing_text);
+ }
+
+ if (!rval) {
+ if ((rrp->ext.choice == 0 || (rrp->ext.choice == 1 && StringHasNoText (rrp->ext.value.ptrvalue)))
+ && (scp == NULL || scp->match_text == NULL)) {
+ rrp->ext.value.ptrvalue = MemFree (rrp->ext.value.ptrvalue);
+ rrp->ext.value.ptrvalue = StringSave (new_val);
+ rrp->ext.choice = 1;
+ rval = TRUE;
+ } else if (rrp->ext.choice == 1
+ && StringCmp (rrp->ext.value.ptrvalue, "ncRNA") != 0
+ && StringCmp (rrp->ext.value.ptrvalue, "tmRNA") != 0
+ && StringCmp (rrp->ext.value.ptrvalue, "misc_RNA") != 0
+ && DoesStringMatchConstraint (rrp->ext.value.ptrvalue, scp)) {
+ cp = rrp->ext.value.ptrvalue;
+ rval = SetStringValue (&cp, new_val, existing_text);
+ rrp->ext.value.ptrvalue = cp;
+ rval = TRUE;
+ } else if (rrp->ext.choice == 2) {
+ tmp = GetRNAProductString (sfp, NULL);
+ if (DoesStringMatchConstraint (tmp, scp)
+ && SetStringValue (&tmp, new_val, existing_text)) {
+ trp = (tRNAPtr) rrp->ext.value.ptrvalue;
+ if (trp == NULL) {
+ trp = MemNew (sizeof (tRNA));
+ trp->aatype = 0;
+ MemSet (trp->codon, 255, sizeof (trp->codon));
+ trp->anticodon = NULL;
+ rrp->ext.value.ptrvalue = trp;
+ }
+
+ if (!IsParseabletRNAName(tmp))
+ {
+ if (trp->anticodon == NULL
+ && trp->codon[0] == 255
+ && trp->codon[1] == 255
+ && trp->codon[2] == 255
+ && trp->codon[3] == 255
+ && trp->codon[4] == 255
+ && trp->codon[5] == 255)
+ {
+ trp = MemFree (trp);
+ rrp->ext.choice = 1;
+ rrp->ext.value.ptrvalue = tmp;
+ tmp = NULL;
+ rval = TRUE;
+ }
+ else
+ {
+ vn.choice = FeatQualChoice_legal_qual;
+ vn.data.intvalue = Feat_qual_legal_product;
+ if (SetStringInGBQualList (&(sfp->qual), &vn, scp, new_val, existing_text)) {
+ trp->aa = 0;
+ rval = TRUE;
+ }
+ }
+ }
+ else
+ {
+ trp->aa = ParseTRnaString (tmp, &justTrnaText, codon, TRUE);
+ trp->aatype = 2;
+ rval = TRUE;
+ }
+ tmp = MemFree (tmp);
+ }
+ }
+ }
+ return rval;
+}
+
+
+static Boolean RemoveRNAProductString (SeqFeatPtr sfp, StringConstraintPtr scp)
+{
+ RnaRefPtr rrp;
+ Boolean rval = FALSE;
+
+ if (sfp == NULL || sfp->data.choice != SEQFEAT_RNA || sfp->data.value.ptrvalue == NULL) {
+ return FALSE;
+ }
+
+ rrp = sfp->data.value.ptrvalue;
+ if (rrp->ext.choice == 0
+ || (rrp->ext.choice == 1 && StringHasNoText (rrp->ext.value.ptrvalue))
+ || (rrp->ext.choice == 1
+ && (StringCmp (rrp->ext.value.ptrvalue, "ncRNA") == 0
+ || StringCmp (rrp->ext.value.ptrvalue, "tmRNA") == 0
+ || StringCmp (rrp->ext.value.ptrvalue, "misc_RNA") == 0))) {
+ rval = RemoveGBQualMatch (&(sfp->qual), "product", scp);
+ }
+
+ if (!rval
+ && rrp->ext.choice == 1 && !StringHasNoText (rrp->ext.value.ptrvalue)
+ && StringCmp (rrp->ext.value.ptrvalue, "ncRNA") != 0
+ && StringCmp (rrp->ext.value.ptrvalue, "tmRNA") != 0
+ && StringCmp (rrp->ext.value.ptrvalue, "misc_RNA") != 0
+ && DoesStringMatchConstraint(rrp->ext.value.ptrvalue, scp)) {
+ rrp->ext.value.ptrvalue = MemFree (rrp->ext.value.ptrvalue);
+ rrp->ext.choice = 0;
+ rval = TRUE;
+ }
+ return rval;
+}
+
+
+static SeqFeatPtr GetProtFeature (BioseqPtr protbsp)
+{
+ SeqMgrFeatContext fcontext;
+ SeqAnnotPtr sap;
+ SeqFeatPtr prot_sfp;
+ ProtRefPtr prp;
+
+ if (protbsp == NULL) return NULL;
+
+ prot_sfp = SeqMgrGetNextFeature (protbsp, NULL, 0, FEATDEF_PROT, &fcontext);
+ if (prot_sfp == NULL) {
+ sap = protbsp->annot;
+ while (sap != NULL && prot_sfp == NULL) {
+ if (sap->type == 1) {
+ prot_sfp = sap->data;
+ while (prot_sfp != NULL
+ && (prot_sfp->data.choice != SEQFEAT_PROT
+ || (prp = prot_sfp->data.value.ptrvalue) == NULL
+ || prp->processed != 0)) {
+ prot_sfp = prot_sfp->next;
+ }
+ }
+ sap = sap->next;
+ }
+ }
+ return prot_sfp;
+}
+
+
+static ProtRefPtr GetProtRefForFeature (SeqFeatPtr sfp)
+{
+ BioseqPtr protbsp;
+ SeqFeatPtr protsfp;
+ ProtRefPtr prp = NULL;
+ SeqFeatXrefPtr xref;
+
+ if (sfp == NULL) return NULL;
+
+ if (sfp->data.choice == SEQFEAT_PROT) {
+ prp = (ProtRefPtr) sfp->data.value.ptrvalue;
+ } else if (sfp->data.choice == SEQFEAT_CDREGION) {
+ xref = sfp->xref;
+ while (xref != NULL && xref->data.choice != SEQFEAT_PROT) {
+ xref = xref->next;
+ }
+ if (xref != NULL) {
+ prp = xref->data.value.ptrvalue;
+ }
+ if (prp == NULL && sfp->product != NULL) {
+ protbsp = BioseqFindFromSeqLoc (sfp->product);
+ protsfp = GetProtFeature (protbsp);
+ if (protsfp != NULL) {
+ prp = protsfp->data.value.ptrvalue;
+ }
+ }
+ }
+ return prp;
+}
+
+
+NLM_EXTERN CharPtr GetQualFromFeature (SeqFeatPtr sfp, FeatureFieldPtr field, StringConstraintPtr scp)
+{
+ CharPtr str = NULL;
+ GeneRefPtr grp = NULL;
+ ProtRefPtr prp = NULL;
+ Int4 gbqual;
+
+ if (sfp == NULL || field == NULL || field->field == NULL)
+ {
+ return NULL;
+ }
+ if (field->type != Feature_type_any && sfp->idx.subtype != GetFeatdefFromFeatureType (field->type))
+ {
+ return NULL;
+ }
+
+ // for gene fields
+ if (sfp->idx.subtype == FEATDEF_GENE) {
+ grp = sfp->data.value.ptrvalue;
+ } else {
+ grp = SeqMgrGetGeneXref (sfp);
+ }
+
+ // for protein fields
+ prp = GetProtRefForFeature (sfp);
+
+ /* fields common to all features */
+ /* note, also known as comment */
+ if ((field->field->choice == FeatQualChoice_legal_qual && field->field->data.intvalue == Feat_qual_legal_note)
+ || (field->field->choice == FeatQualChoice_illegal_qual && DoesStringMatchConstraint ("note", field->field->data.ptrvalue)))
+ {
+ if (!StringHasNoText (sfp->comment) && DoesStringMatchConstraint(sfp->comment, scp))
+ {
+ str = StringSave (sfp->comment);
+ }
+ }
+ /* db-xref */
+ if (str == NULL
+ && ((field->field->choice == FeatQualChoice_legal_qual && field->field->data.intvalue == Feat_qual_legal_db_xref)
+ || (field->field->choice == FeatQualChoice_illegal_qual && DoesStringMatchConstraint ("db_xref", field->field->data.ptrvalue))))
+ {
+ str = GetDbxrefString (sfp, scp);
+ }
+ /* exception */
+ if (str == NULL
+ && ((field->field->choice == FeatQualChoice_legal_qual && field->field->data.intvalue == Feat_qual_legal_exception)
+ || (field->field->choice == FeatQualChoice_illegal_qual && DoesStringMatchConstraint ("exception", field->field->data.ptrvalue))))
+ {
+ if (!StringHasNoText (sfp->except_text) && DoesStringMatchConstraint(sfp->except_text, scp))
+ {
+ str = StringSave (sfp->except_text);
+ }
+ }
+ /* evidence */
+ if (str == NULL
+ && ((field->field->choice == FeatQualChoice_legal_qual && field->field->data.intvalue == Feat_qual_legal_evidence)
+ || (field->field->choice == FeatQualChoice_illegal_qual && DoesStringMatchConstraint ("evidence", field->field->data.ptrvalue))))
+ {
+ if (sfp->exp_ev == 1)
+ {
+ str = StringSave ("experimental");
+ }
+ else if (sfp->exp_ev == 2)
+ {
+ str = StringSave ("non-experimental");
+ }
+ if (!DoesStringMatchConstraint(str, scp)) {
+ str = MemFree (str);
+ }
+ }
+
+ /* fields common to some features */
+ /* product */
+ if (str == NULL
+ && ((field->field->choice == FeatQualChoice_legal_qual && field->field->data.intvalue == Feat_qual_legal_product)
+ || (field->field->choice == FeatQualChoice_illegal_qual && DoesStringMatchConstraint ("product", field->field->data.ptrvalue))))
+ {
+ if (prp != NULL) {
+ str = GetFirstValNodeStringMatch (prp->name, scp);
+ } else if (sfp->data.choice == SEQFEAT_RNA) {
+ str = GetRNAProductString (sfp, scp);
+ }
+ }
+
+ /* Gene fields */
+ /* locus */
+ if (str == NULL
+ && ((field->field->choice == FeatQualChoice_legal_qual && field->field->data.intvalue == Feat_qual_legal_gene)
+ || (field->field->choice == FeatQualChoice_illegal_qual && DoesStringMatchConstraint ("locus", field->field->data.ptrvalue)))
+ && grp != NULL)
+ {
+ if (!StringHasNoText (grp->locus) && DoesStringMatchConstraint(grp->locus, scp))
+ {
+ str = StringSave (grp->locus);
+ }
+ }
+ /* description */
+ if (str == NULL
+ && ((field->field->choice == FeatQualChoice_legal_qual && field->field->data.intvalue == Feat_qual_legal_gene_description)
+ || (field->field->choice == FeatQualChoice_illegal_qual && DoesStringMatchConstraint ("description", field->field->data.ptrvalue)))
+ && grp != NULL)
+ {
+ if (!StringHasNoText (grp->desc) && DoesStringMatchConstraint(grp->desc, scp))
+ {
+ str = StringSave (grp->desc);
+ }
+ }
+ /* maploc */
+ if (str == NULL
+ && ((field->field->choice == FeatQualChoice_legal_qual && field->field->data.intvalue == Feat_qual_legal_map)
+ || (field->field->choice == FeatQualChoice_illegal_qual && DoesStringMatchConstraint ("map", field->field->data.ptrvalue)))
+ && grp != NULL)
+ {
+ if (!StringHasNoText (grp->maploc) && DoesStringMatchConstraint(grp->maploc, scp))
+ {
+ str = StringSave (grp->maploc);
+ }
+ }
+ /* allele */
+ if (str == NULL
+ && ((field->field->choice == FeatQualChoice_legal_qual && field->field->data.intvalue == Feat_qual_legal_allele)
+ || (field->field->choice == FeatQualChoice_illegal_qual && DoesStringMatchConstraint ("allele", field->field->data.ptrvalue)))
+ && grp != NULL)
+ {
+ if (!StringHasNoText (grp->allele) && DoesStringMatchConstraint(grp->allele, scp))
+ {
+ str = StringSave (grp->allele);
+ }
+ }
+ /* locus_tag */
+ if (str == NULL
+ && ((field->field->choice == FeatQualChoice_legal_qual && field->field->data.intvalue == Feat_qual_legal_locus_tag)
+ || (field->field->choice == FeatQualChoice_illegal_qual && DoesStringMatchConstraint ("locus_tag", field->field->data.ptrvalue)))
+ && grp != NULL)
+ {
+ if (!StringHasNoText (grp->locus_tag) && DoesStringMatchConstraint(grp->locus_tag, scp))
+ {
+ str = StringSave (grp->locus_tag);
+ }
+ }
+ /* synonym */
+ if (str == NULL
+ && ((field->field->choice == FeatQualChoice_legal_qual && field->field->data.intvalue == Feat_qual_legal_synonym)
+ || (field->field->choice == FeatQualChoice_illegal_qual && DoesStringMatchConstraint ("synonym", field->field->data.ptrvalue)))
+ && grp != NULL)
+ {
+ str = GetFirstValNodeStringMatch (grp->syn, scp);
+ }
+
+
+ /* protein fields */
+ /* note - product handled above */
+ /* description */
+ if (str == NULL
+ && ((field->field->choice == FeatQualChoice_legal_qual && field->field->data.intvalue == Feat_qual_legal_description)
+ || (field->field->choice == FeatQualChoice_illegal_qual && DoesStringMatchConstraint ("description", field->field->data.ptrvalue)))
+ && prp != NULL)
+ {
+ if (!StringHasNoText (prp->desc) && DoesStringMatchConstraint(prp->desc, scp)) {
+ str = StringSave (prp->desc);
+ }
+ }
+ /* ec_number */
+ if (str == NULL
+ && ((field->field->choice == FeatQualChoice_legal_qual && field->field->data.intvalue == Feat_qual_legal_ec_number)
+ || (field->field->choice == FeatQualChoice_illegal_qual && DoesStringMatchConstraint ("ec_number", field->field->data.ptrvalue)))
+ && prp != NULL)
+ {
+ str = GetFirstValNodeStringMatch (prp->ec, scp);
+ }
+ /* activity */
+ if (str == NULL
+ && ((field->field->choice == FeatQualChoice_legal_qual && field->field->data.intvalue == Feat_qual_legal_activity)
+ || (field->field->choice == FeatQualChoice_illegal_qual && DoesStringMatchConstraint ("activity", field->field->data.ptrvalue)))
+ && prp != NULL)
+ {
+ str = GetFirstValNodeStringMatch (prp->activity, scp);
+ }
+
+
+ /* actual GenBank qualifiers */
+ if (str == NULL)
+ {
+ if (field->field->choice == FeatQualChoice_legal_qual)
+ {
+ gbqual = GetGBQualFromFeatQual (field->field->data.intvalue);
+ if (gbqual > -1) {
+ str = GetFirstGBQualMatch (sfp->qual, ParFlat_GBQual_names [gbqual].name, scp);
+ } else {
+ /* need to do something with non-qualifier qualifiers */
+ }
+ } else {
+ str = GetFirstGBQualMatchConstraintName (sfp->qual, field->field->data.ptrvalue, scp);
+ }
+ }
+ return str;
+}
+
+
+static Boolean RemoveQualFromFeature (SeqFeatPtr sfp, FeatureFieldPtr field, StringConstraintPtr scp)
+{
+ Boolean rval = FALSE;
+ GeneRefPtr grp = NULL;
+ ProtRefPtr prp = NULL;
+ RnaRefPtr rrp;
+ tRNAPtr trp;
+ Int4 gbqual;
+
+ if (sfp == NULL || field == NULL || field->field == NULL)
+ {
+ return FALSE;
+ }
+ if (field->type != Feature_type_any && sfp->idx.subtype != GetFeatdefFromFeatureType (field->type))
+ {
+ return FALSE;
+ }
+
+ // for gene fields
+ if (sfp->idx.subtype == FEATDEF_GENE) {
+ grp = sfp->data.value.ptrvalue;
+ } else {
+ grp = SeqMgrGetGeneXref (sfp);
+ }
+
+ // for protein fields
+ prp = GetProtRefForFeature (sfp);
+
+ // for RNA fields
+ if (sfp->data.choice == SEQFEAT_RNA) {
+ rrp = (RnaRefPtr) sfp->data.value.ptrvalue;
+ }
+
+ /* fields common to all features */
+ /* note, also known as comment */
+ if ((field->field->choice == FeatQualChoice_legal_qual && field->field->data.intvalue == Feat_qual_legal_note)
+ || (field->field->choice == FeatQualChoice_illegal_qual && DoesStringMatchConstraint ("note", field->field->data.ptrvalue)))
+ {
+ if (!StringHasNoText (sfp->comment) && DoesStringMatchConstraint (sfp->comment, scp))
+ {
+ sfp->comment = MemFree (sfp->comment);
+ rval = TRUE;
+ }
+ }
+ /* db-xref */
+ if ((field->field->choice == FeatQualChoice_legal_qual && field->field->data.intvalue == Feat_qual_legal_db_xref)
+ || (field->field->choice == FeatQualChoice_illegal_qual && DoesStringMatchConstraint ("db_xref", field->field->data.ptrvalue)))
+ {
+ rval = RemoveDbxrefString (sfp, scp);
+ }
+ /* exception */
+ if ((field->field->choice == FeatQualChoice_legal_qual && field->field->data.intvalue == Feat_qual_legal_exception)
+ || (field->field->choice == FeatQualChoice_illegal_qual && DoesStringMatchConstraint ("exception", field->field->data.ptrvalue)))
+ {
+ if (!StringHasNoText (sfp->except_text) && DoesStringMatchConstraint (sfp->except_text, scp))
+ {
+ sfp->except_text = MemFree (sfp->except_text);
+ rval = TRUE;
+ }
+ }
+ /* evidence */
+ if ((field->field->choice == FeatQualChoice_legal_qual && field->field->data.intvalue == Feat_qual_legal_evidence)
+ || (field->field->choice == FeatQualChoice_illegal_qual && DoesStringMatchConstraint ("evidence", field->field->data.ptrvalue)))
+ {
+ if ((sfp->exp_ev == 1 && DoesStringMatchConstraint("experimental", scp))
+ || (sfp->exp_ev == 2 && DoesStringMatchConstraint("non-experimental", scp))) {
+ sfp->exp_ev = 0;
+ rval = TRUE;
+ }
+ }
+
+ /* fields common to some features */
+ /* product */
+ if ((field->field->choice == FeatQualChoice_legal_qual && field->field->data.intvalue == Feat_qual_legal_product)
+ || (field->field->choice == FeatQualChoice_illegal_qual && DoesStringMatchConstraint ("product", field->field->data.ptrvalue)))
+ {
+ if (prp != NULL) {
+ rval = RemoveValNodeStringMatch (&(prp->name), scp);
+ } else if (sfp->data.choice == SEQFEAT_RNA) {
+ rval = RemoveRNAProductString (sfp, scp);
+ }
+ }
+
+ /* Gene fields */
+ /* locus */
+ if (((field->field->choice == FeatQualChoice_legal_qual && field->field->data.intvalue == Feat_qual_legal_gene)
+ || (field->field->choice == FeatQualChoice_illegal_qual && DoesStringMatchConstraint ("locus", field->field->data.ptrvalue)))
+ && grp != NULL)
+ {
+ if (!StringHasNoText (grp->locus) && DoesStringMatchConstraint (grp->locus, scp)) {
+ grp->locus = MemFree (grp->locus);
+ rval = TRUE;
+ }
+ }
+ /* description */
+ if (((field->field->choice == FeatQualChoice_legal_qual && field->field->data.intvalue == Feat_qual_legal_gene_description)
+ || (field->field->choice == FeatQualChoice_illegal_qual && DoesStringMatchConstraint ("description", field->field->data.ptrvalue)))
+ && grp != NULL)
+ {
+ if (!StringHasNoText (grp->desc) && DoesStringMatchConstraint(grp->desc, scp))
+ {
+ grp->desc = MemFree (grp->desc);
+ rval = TRUE;
+ }
+ }
+ /* maploc */
+ if (((field->field->choice == FeatQualChoice_legal_qual && field->field->data.intvalue == Feat_qual_legal_map)
+ || (field->field->choice == FeatQualChoice_illegal_qual && DoesStringMatchConstraint ("map", field->field->data.ptrvalue)))
+ && grp != NULL)
+ {
+ if (!StringHasNoText (grp->maploc) && DoesStringMatchConstraint(grp->maploc, scp))
+ {
+ grp->maploc = MemFree (grp->maploc);
+ rval = TRUE;
+ }
+ }
+ /* allele */
+ if (((field->field->choice == FeatQualChoice_legal_qual && field->field->data.intvalue == Feat_qual_legal_allele)
+ || (field->field->choice == FeatQualChoice_illegal_qual && DoesStringMatchConstraint ("allele", field->field->data.ptrvalue)))
+ && grp != NULL)
+ {
+ if (!StringHasNoText (grp->allele) && DoesStringMatchConstraint(grp->allele, scp))
+ {
+ grp->allele = MemFree (grp->allele);
+ rval = TRUE;
+ }
+ }
+ /* locus_tag */
+ if (((field->field->choice == FeatQualChoice_legal_qual && field->field->data.intvalue == Feat_qual_legal_locus_tag)
+ || (field->field->choice == FeatQualChoice_illegal_qual && DoesStringMatchConstraint ("locus_tag", field->field->data.ptrvalue)))
+ && grp != NULL)
+ {
+ if (!StringHasNoText (grp->locus_tag) && DoesStringMatchConstraint(grp->locus_tag, scp))
+ {
+ grp->locus_tag = MemFree (grp->locus_tag);
+ rval = TRUE;
+ }
+ }
+ /* synonym */
+ if (((field->field->choice == FeatQualChoice_legal_qual && field->field->data.intvalue == Feat_qual_legal_synonym)
+ || (field->field->choice == FeatQualChoice_illegal_qual && DoesStringMatchConstraint ("synonym", field->field->data.ptrvalue)))
+ && grp != NULL)
+ {
+ rval = RemoveValNodeStringMatch (&(grp->syn), scp);
+ }
+
+ /* protein fields */
+ /* note - product handled above */
+ /* description */
+ if (((field->field->choice == FeatQualChoice_legal_qual && field->field->data.intvalue == Feat_qual_legal_description)
+ || (field->field->choice == FeatQualChoice_illegal_qual && DoesStringMatchConstraint ("description", field->field->data.ptrvalue)))
+ && prp != NULL)
+ {
+ if (!StringHasNoText (prp->desc) && DoesStringMatchConstraint(prp->desc, scp)) {
+ prp->desc = MemFree (prp->desc);
+ rval = TRUE;
+ }
+ }
+ /* ec_number */
+ if (((field->field->choice == FeatQualChoice_legal_qual && field->field->data.intvalue == Feat_qual_legal_ec_number)
+ || (field->field->choice == FeatQualChoice_illegal_qual && DoesStringMatchConstraint ("ec_number", field->field->data.ptrvalue)))
+ && prp != NULL)
+ {
+ rval = RemoveValNodeStringMatch (&(prp->ec), scp);
+ }
+ /* activity */
+ if (((field->field->choice == FeatQualChoice_legal_qual && field->field->data.intvalue == Feat_qual_legal_activity)
+ || (field->field->choice == FeatQualChoice_illegal_qual && DoesStringMatchConstraint ("activity", field->field->data.ptrvalue)))
+ && prp != NULL)
+ {
+ rval = RemoveValNodeStringMatch (&(prp->activity), scp);
+ }
+
+ /* RNA fields */
+ /* anticodon */
+ if (((field->field->choice == FeatQualChoice_legal_qual && field->field->data.intvalue == Feat_qual_legal_anticodon)
+ || (field->field->choice == FeatQualChoice_illegal_qual && DoesStringMatchConstraint ("anticodon", field->field->data.ptrvalue)))
+ && rrp != NULL && rrp->ext.choice == 2)
+ {
+ trp = (tRNAPtr) rrp->ext.value.ptrvalue;
+ if (trp != NULL && trp->anticodon != NULL) {
+ trp->anticodon = SeqLocFree (trp->anticodon);
+ rval = TRUE;
+ }
+ }
+ /* codons recognized */
+ if (((field->field->choice == FeatQualChoice_legal_qual && field->field->data.intvalue == Feat_qual_legal_anticodon)
+ || (field->field->choice == FeatQualChoice_illegal_qual && DoesStringMatchConstraint ("anticodon", field->field->data.ptrvalue)))
+ && rrp != NULL && rrp->ext.choice == 2)
+ {
+ trp = (tRNAPtr) rrp->ext.value.ptrvalue;
+ if (trp != NULL && (trp->codon[0] != 255 || trp->codon[1] != 255 || trp->codon[2] != 255
+ || trp->codon[3] != 255 || trp->codon[4] != 255 || trp->codon[5] != 255)) {
+ trp->codon [0] = 255;
+ trp->codon [1] = 255;
+ trp->codon [2] = 255;
+ trp->codon [3] = 255;
+ trp->codon [4] = 255;
+ trp->codon [5] = 255;
+ rval = TRUE;
+ }
+ }
+
+ if (!rval) {
+ /* actual GenBank qualifiers */
+ if (field->field->choice == FeatQualChoice_legal_qual)
+ {
+ gbqual = GetGBQualFromFeatQual (field->field->data.intvalue);
+ if (gbqual > -1) {
+ rval = RemoveGBQualMatch (&(sfp->qual), ParFlat_GBQual_names [gbqual].name, scp);
+ } else {
+ /* need to do something with non-qualifier qualifiers */
+ }
+ } else {
+ rval = RemoveGBQualMatchConstraintName (&(sfp->qual), field->field->data.ptrvalue, scp);
+ }
+ }
+
+ return rval;
+}
+
+
+static Boolean ChooseBestFrame (SeqFeatPtr sfp)
+{
+ CdRegionPtr crp;
+ Uint1 new_frame = 0, i, orig_frame;
+ ByteStorePtr bs;
+ Int4 lens [3];
+ Int4 max;
+ Boolean retval = TRUE;
+
+ if (sfp == NULL || sfp->data.choice != SEQFEAT_CDREGION) return FALSE;
+
+ crp = sfp->data.value.ptrvalue;
+ if (crp == NULL) return FALSE;
+ orig_frame = crp->frame;
+
+ max = 0;
+ for (i = 1; i <= 3; i++) {
+ crp->frame = i;
+ bs = ProteinFromCdRegionEx (sfp, FALSE, FALSE);
+ lens[i - 1] = BSLen (bs);
+ BSFree (bs);
+ if (lens[i - 1] > max) {
+ max = lens[i - 1];
+ new_frame = i;
+ }
+ }
+ for (i = 1; i <= 3; i++) {
+ if (lens [i - 1] == max && i != new_frame) {
+ retval = FALSE;
+ }
+ }
+ if (retval) {
+ crp->frame = new_frame;
+ } else {
+ crp->frame = orig_frame;
+ }
+ return retval;
+}
+
+
+static Boolean SetQualOnFeature (SeqFeatPtr sfp, FeatureFieldPtr field, StringConstraintPtr scp, CharPtr value, Uint2 existing_text)
+{
+ Boolean rval = FALSE;
+ GeneRefPtr grp = NULL;
+ ProtRefPtr prp = NULL;
+ CharPtr tmp;
+ CdRegionPtr crp;
+
+ if (sfp == NULL || field == NULL || field->field == NULL)
+ {
+ return FALSE;
+ }
+ if (field->type != Feature_type_any && sfp->idx.subtype != GetFeatdefFromFeatureType (field->type))
+ {
+ return FALSE;
+ }
+
+ // for gene fields
+ if (sfp->idx.subtype == FEATDEF_GENE) {
+ grp = sfp->data.value.ptrvalue;
+ } else {
+ grp = SeqMgrGetGeneXref (sfp);
+ }
+
+ // for protein fields
+ prp = GetProtRefForFeature (sfp);
+
+ /* fields common to all features */
+ /* note, also known as comment */
+ if ((field->field->choice == FeatQualChoice_legal_qual && field->field->data.intvalue == Feat_qual_legal_note)
+ || (field->field->choice == FeatQualChoice_illegal_qual && DoesStringMatchConstraint ("note", field->field->data.ptrvalue)))
+ {
+ if (DoesStringMatchConstraint(sfp->comment, scp))
+ {
+ rval = SetStringValue ( &(sfp->comment), value, existing_text);
+ }
+ }
+ /* db-xref */
+ if ((field->field->choice == FeatQualChoice_legal_qual && field->field->data.intvalue == Feat_qual_legal_db_xref)
+ || (field->field->choice == FeatQualChoice_illegal_qual && DoesStringMatchConstraint ("db_xref", field->field->data.ptrvalue)))
+ {
+ rval = SetDbxrefString (sfp, scp, value, existing_text);
+ }
+ /* exception */
+ if ((field->field->choice == FeatQualChoice_legal_qual && field->field->data.intvalue == Feat_qual_legal_exception)
+ || (field->field->choice == FeatQualChoice_illegal_qual && DoesStringMatchConstraint ("exception", field->field->data.ptrvalue)))
+ {
+ if (DoesStringMatchConstraint(sfp->except_text, scp))
+ {
+ rval = SetStringValue ( &(sfp->except_text), value, existing_text);
+ }
+ }
+ /* evidence */
+ if ((field->field->choice == FeatQualChoice_legal_qual && field->field->data.intvalue == Feat_qual_legal_evidence)
+ || (field->field->choice == FeatQualChoice_illegal_qual && DoesStringMatchConstraint ("evidence", field->field->data.ptrvalue)))
+ {
+ tmp = NULL;
+ if (sfp->exp_ev == 1)
+ {
+ tmp = StringSave ("experimental");
+ }
+ else if (sfp->exp_ev == 2)
+ {
+ tmp = StringSave ("non-experimental");
+ }
+ if (DoesStringMatchConstraint(tmp, scp)) {
+ rval = SetStringValue (&tmp, value, existing_text);
+ if (rval) {
+ rval = FALSE;
+ if (StringICmp (tmp, "experimental") == 0) {
+ sfp->exp_ev = 1;
+ rval = TRUE;
+ } else if (StringICmp (tmp, "non-experimental") == 0) {
+ sfp->exp_ev = 2;
+ rval = TRUE;
+ } else if (StringHasNoText (tmp)) {
+ sfp->exp_ev = 0;
+ rval = TRUE;
+ }
+ }
+ }
+ tmp = MemFree (tmp);
+ }
+
+
+ /* fields common to some features */
+ /* product */
+ if ((field->field->choice == FeatQualChoice_legal_qual && field->field->data.intvalue == Feat_qual_legal_product)
+ || (field->field->choice == FeatQualChoice_illegal_qual && DoesStringMatchConstraint ("product", field->field->data.ptrvalue)))
+ {
+ if (prp != NULL) {
+ rval = SetStringsInValNodeStringList (&(prp->name), scp, value, existing_text);
+ } else if (sfp->data.choice == SEQFEAT_RNA) {
+ rval = SetRNAProductString (sfp, scp, value, existing_text);
+ }
+ }
+
+ /* Gene fields */
+ /* locus */
+ if (((field->field->choice == FeatQualChoice_legal_qual && field->field->data.intvalue == Feat_qual_legal_gene)
+ || (field->field->choice == FeatQualChoice_illegal_qual && DoesStringMatchConstraint ("locus", field->field->data.ptrvalue)))
+ && grp != NULL)
+ {
+ if (DoesStringMatchConstraint(grp->locus, scp))
+ {
+ rval = SetStringValue (&(grp->locus), value, existing_text);
+ }
+ }
+ /* description */
+ if (((field->field->choice == FeatQualChoice_legal_qual && field->field->data.intvalue == Feat_qual_legal_gene_description)
+ || (field->field->choice == FeatQualChoice_illegal_qual && DoesStringMatchConstraint ("description", field->field->data.ptrvalue)))
+ && grp != NULL)
+ {
+ if (DoesStringMatchConstraint(grp->desc, scp))
+ {
+ rval = SetStringValue (&(grp->desc), value, existing_text);
+ }
+ }
+ /* maploc */
+ if (((field->field->choice == FeatQualChoice_legal_qual && field->field->data.intvalue == Feat_qual_legal_map)
+ || (field->field->choice == FeatQualChoice_illegal_qual && DoesStringMatchConstraint ("map", field->field->data.ptrvalue)))
+ && grp != NULL)
+ {
+ if (DoesStringMatchConstraint(grp->maploc, scp))
+ {
+ rval = SetStringValue (&(grp->maploc), value, existing_text);
+ }
+ }
+ /* allele */
+ if (((field->field->choice == FeatQualChoice_legal_qual && field->field->data.intvalue == Feat_qual_legal_allele)
+ || (field->field->choice == FeatQualChoice_illegal_qual && DoesStringMatchConstraint ("allele", field->field->data.ptrvalue)))
+ && grp != NULL)
+ {
+ if (DoesStringMatchConstraint(grp->allele, scp))
+ {
+ rval = SetStringValue (&(grp->allele), value, existing_text);
+ }
+ }
+ /* locus_tag */
+ if (((field->field->choice == FeatQualChoice_legal_qual && field->field->data.intvalue == Feat_qual_legal_locus_tag)
+ || (field->field->choice == FeatQualChoice_illegal_qual && DoesStringMatchConstraint ("locus_tag", field->field->data.ptrvalue)))
+ && grp != NULL)
+ {
+ if (DoesStringMatchConstraint(grp->locus_tag, scp))
+ {
+ rval = SetStringValue (&(grp->locus_tag), value, existing_text);
+ }
+ }
+ /* synonym */
+ if (((field->field->choice == FeatQualChoice_legal_qual && field->field->data.intvalue == Feat_qual_legal_synonym)
+ || (field->field->choice == FeatQualChoice_illegal_qual && DoesStringMatchConstraint ("synonym", field->field->data.ptrvalue)))
+ && grp != NULL)
+ {
+ rval = SetStringsInValNodeStringList (&(grp->syn), scp, value, existing_text);
+ }
+
+
+ /* protein fields */
+ /* note - product handled above */
+ /* description */
+ if (((field->field->choice == FeatQualChoice_legal_qual && field->field->data.intvalue == Feat_qual_legal_description)
+ || (field->field->choice == FeatQualChoice_illegal_qual && DoesStringMatchConstraint ("description", field->field->data.ptrvalue)))
+ && prp != NULL)
+ {
+ if (DoesStringMatchConstraint(prp->desc, scp)) {
+ rval = SetStringValue (&(prp->desc), value, existing_text);
+ }
+ }
+ /* ec_number */
+ if (((field->field->choice == FeatQualChoice_legal_qual && field->field->data.intvalue == Feat_qual_legal_ec_number)
+ || (field->field->choice == FeatQualChoice_illegal_qual && DoesStringMatchConstraint ("ec_number", field->field->data.ptrvalue)))
+ && prp != NULL)
+ {
+ rval = SetStringsInValNodeStringList (&(prp->ec), scp, value, existing_text);
+ }
+ /* activity */
+ if (((field->field->choice == FeatQualChoice_legal_qual && field->field->data.intvalue == Feat_qual_legal_activity)
+ || (field->field->choice == FeatQualChoice_illegal_qual && DoesStringMatchConstraint ("activity", field->field->data.ptrvalue)))
+ && prp != NULL)
+ {
+ rval = SetStringsInValNodeStringList (&(prp->activity), scp, value, existing_text);
+ }
+
+ if (field->field->choice == FeatQualChoice_legal_qual && field->field->data.intvalue == Feat_qual_legal_codon_start
+ && sfp->data.choice == SEQFEAT_CDREGION)
+ {
+ crp = (CdRegionPtr) sfp->data.value.ptrvalue;
+ if (StringICmp (value, "best") == 0)
+ {
+ rval = ChooseBestFrame (sfp);
+ }
+ else if (StringCmp (value, "1") == 0)
+ {
+ crp->frame = 1;
+ rval = TRUE;
+ }
+ else if (StringCmp (value, "2") == 0)
+ {
+ crp->frame = 2;
+ rval = TRUE;
+ }
+ else if (StringCmp (value, "3") == 0)
+ {
+ crp->frame = 3;
+ rval = TRUE;
+ }
+ }
+
+ /* actual GenBank qualifiers */
+ if (!rval)
+ {
+ rval = SetStringInGBQualList (&(sfp->qual), field->field, scp, value, existing_text);
+ }
+ return rval;
+}
+
+
+NLM_EXTERN CharPtr GetSourceQualFromBioSource (BioSourcePtr biop, SourceQualChoicePtr scp, StringConstraintPtr constraint)
+{
+ CharPtr str = NULL;
+ SubSourcePtr ssp;
+ OrgModPtr mod;
+ Int4 orgmod_subtype = -1, subsrc_subtype = -1;
+
+ if (biop == NULL || scp == NULL) return NULL;
+
+ switch (scp->choice)
+ {
+ case SourceQualChoice_textqual:
+ if (scp->data.intvalue == Source_qual_taxname) {
+ if (biop->org != NULL && !StringHasNoText (biop->org->taxname)
+ && DoesStringMatchConstraint (biop->org->taxname, constraint)) {
+ str = StringSave (biop->org->taxname);
+ }
+ } else if (scp->data.intvalue == Source_qual_common_name) {
+ if (biop->org != NULL && !StringHasNoText (biop->org->common)
+ && DoesStringMatchConstraint (biop->org->common, constraint)) {
+ str = StringSave (biop->org->common);
+ }
+ } else if (scp->data.intvalue == Source_qual_lineage) {
+ if (biop->org != NULL && biop->org->orgname != NULL && !StringHasNoText (biop->org->orgname->lineage)
+ && DoesStringMatchConstraint (biop->org->orgname->lineage, constraint)) {
+ str = StringSave (biop->org->orgname->lineage);
+ }
+ } else if (scp->data.intvalue == Source_qual_division) {
+ if (biop->org != NULL && biop->org->orgname != NULL && !StringHasNoText (biop->org->orgname->div)
+ && DoesStringMatchConstraint (biop->org->orgname->div, constraint)) {
+ str = StringSave (biop->org->orgname->div);
+ }
+ } else {
+ orgmod_subtype = GetOrgModQualFromSrcQual (scp->data.intvalue);
+ if (orgmod_subtype == -1) {
+ subsrc_subtype = GetSubSrcQualFromSrcQual (scp->data.intvalue);
+ for (ssp = biop->subtype; ssp != NULL && str == NULL; ssp = ssp->next) {
+ if (ssp->subtype == subsrc_subtype) {
+ if (StringHasNoText (ssp->name)) {
+ if (IsNonTextSourceQual (scp->data.intvalue)
+ && DoesStringMatchConstraint ("TRUE", constraint)) {
+ str = StringSave ("TRUE");
+ }
+ } else {
+ if (DoesStringMatchConstraint (ssp->name, constraint)) {
+ str = StringSave (ssp->name);
+ }
+ }
+ }
+ }
+ } else {
+ if (biop->org != NULL && biop->org->orgname != NULL) {
+ for (mod = biop->org->orgname->mod; mod != NULL && str == NULL; mod = mod->next) {
+ if (mod->subtype == orgmod_subtype) {
+ if (StringHasNoText (mod->subname)) {
+ if (IsNonTextSourceQual (scp->data.intvalue)
+ && DoesStringMatchConstraint ("TRUE", constraint)) {
+ str = StringSave ("TRUE");
+ }
+ } else {
+ if (DoesStringMatchConstraint (mod->subname, constraint)) {
+ str = StringSave (mod->subname);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ break;
+ case SourceQualChoice_location:
+ str = LocNameFromGenome (biop->genome);
+ if (DoesStringMatchConstraint (str, constraint)) {
+ str = StringSave (str);
+ } else {
+ str = NULL;
+ }
+ break;
+ case SourceQualChoice_origin:
+ str = OriginNameFromOrigin (biop->origin);
+ if (DoesStringMatchConstraint (str, constraint)) {
+ str = StringSave (str);
+ } else {
+ str = NULL;
+ }
+ break;
+ }
+ return str;
+}
+
+
+static Boolean RemoveSourceQualFromBioSource (BioSourcePtr biop, SourceQualChoicePtr scp, StringConstraintPtr constraint)
+{
+ SubSourcePtr ssp, ssp_prev = NULL, ssp_next;
+ OrgModPtr mod, mod_prev = NULL, mod_next;
+ Int4 orgmod_subtype = -1, subsrc_subtype = -1;
+ CharPtr str;
+ Boolean rval = FALSE;
+
+ if (biop == NULL || scp == NULL) return FALSE;
+
+ switch (scp->choice)
+ {
+ case SourceQualChoice_textqual:
+ if (scp->data.intvalue == Source_qual_taxname) {
+ if (biop->org != NULL && !StringHasNoText (biop->org->taxname)
+ && DoesStringMatchConstraint (biop->org->taxname, constraint)) {
+ biop->org->taxname = MemFree (biop->org->taxname);
+ rval = TRUE;
+ }
+ } else if (scp->data.intvalue == Source_qual_common_name) {
+ if (biop->org != NULL && !StringHasNoText (biop->org->common)
+ && DoesStringMatchConstraint (biop->org->common, constraint)) {
+ biop->org->common = MemFree (biop->org->common);
+ rval = TRUE;
+ }
+ } else if (scp->data.intvalue == Source_qual_lineage) {
+ if (biop->org != NULL && biop->org->orgname != NULL && !StringHasNoText (biop->org->orgname->lineage)
+ && DoesStringMatchConstraint (biop->org->orgname->lineage, constraint)) {
+ biop->org->orgname->lineage = MemFree (biop->org->orgname->lineage);
+ rval = TRUE;
+ }
+ } else if (scp->data.intvalue == Source_qual_division) {
+ if (biop->org != NULL && biop->org->orgname != NULL && !StringHasNoText (biop->org->orgname->div)
+ && DoesStringMatchConstraint (biop->org->orgname->div, constraint)) {
+ biop->org->orgname->div = MemFree (biop->org->orgname->div);
+ rval = TRUE;
+ }
+ } else {
+ orgmod_subtype = GetOrgModQualFromSrcQual (scp->data.intvalue);
+ if (orgmod_subtype == -1) {
+ subsrc_subtype = GetSubSrcQualFromSrcQual (scp->data.intvalue);
+ ssp = biop->subtype;
+ while (ssp != NULL) {
+ ssp_next = ssp->next;
+ if (ssp->subtype == subsrc_subtype
+ && DoesStringMatchConstraint (ssp->name, constraint)) {
+ if (ssp_prev == NULL) {
+ biop->subtype = ssp->next;
+ } else {
+ ssp_prev->next = ssp->next;
+ }
+ ssp->next = NULL;
+ ssp = SubSourceFree (ssp);
+ rval = TRUE;
+ } else {
+ ssp_prev = ssp;
+ }
+ ssp = ssp_next;
+ }
+ } else {
+ if (biop->org != NULL && biop->org->orgname != NULL) {
+ mod = biop->org->orgname->mod;
+ while (mod != NULL) {
+ mod_next = mod->next;
+ if (mod->subtype == orgmod_subtype
+ && DoesStringMatchConstraint (mod->subname, constraint)) {
+ if (mod_prev == NULL) {
+ biop->org->orgname->mod = mod->next;
+ } else {
+ mod_prev->next = mod->next;
+ }
+ mod->next = NULL;
+ mod = OrgModFree (mod);
+ rval = TRUE;
+ } else {
+ mod_prev = mod;
+ }
+ mod = mod_next;
+ }
+ }
+ }
+ }
+ break;
+ case SourceQualChoice_location:
+ str = LocNameFromGenome (biop->genome);
+ if (DoesStringMatchConstraint (str, constraint)) {
+ if (scp->data.intvalue == 0 || biop->genome == GenomeFromSrcLoc (scp->data.intvalue)) {
+ biop->genome = 0;
+ rval = TRUE;
+ }
+ }
+ break;
+ case SourceQualChoice_origin:
+ str = OriginNameFromOrigin (biop->origin);
+ if (DoesStringMatchConstraint (str, constraint)) {
+ if (scp->data.intvalue == 0 || biop->origin == OriginFromSrcOrig (scp->data.intvalue)) {
+ biop->origin = 0;
+ rval = TRUE;
+ }
+ }
+ break;
+ }
+ return rval;
+}
+
+
+NLM_EXTERN Boolean SetSourceQualInBioSource (BioSourcePtr biop, SourceQualChoicePtr scp, StringConstraintPtr constraint, CharPtr value, Uint2 existing_text)
+{
+ SubSourcePtr ssp, ssp_prev = NULL, ssp_next;
+ OrgModPtr mod, mod_prev = NULL, mod_next;
+ Int4 orgmod_subtype = -1, subsrc_subtype = -1;
+ CharPtr str;
+ Boolean rval = FALSE, found = FALSE;
+
+ if (biop == NULL || scp == NULL) return FALSE;
+
+ switch (scp->choice)
+ {
+ case SourceQualChoice_textqual:
+ if (scp->data.intvalue == Source_qual_taxname) {
+ if (biop->org != NULL
+ && DoesStringMatchConstraint (biop->org->taxname, constraint)) {
+ rval = SetStringValue (&(biop->org->taxname), value, existing_text);
+ }
+ } else if (scp->data.intvalue == Source_qual_common_name) {
+ if (biop->org != NULL
+ && DoesStringMatchConstraint (biop->org->common, constraint)) {
+ rval = SetStringValue (&(biop->org->common), value, existing_text);
+ }
+ } else if (scp->data.intvalue == Source_qual_lineage) {
+ if (biop->org != NULL && biop->org->orgname != NULL
+ && DoesStringMatchConstraint (biop->org->orgname->lineage, constraint)) {
+ rval = SetStringValue (&(biop->org->orgname->lineage), value, existing_text);
+ }
+ } else if (scp->data.intvalue == Source_qual_division) {
+ if (biop->org != NULL && biop->org->orgname != NULL
+ && DoesStringMatchConstraint (biop->org->orgname->div, constraint)) {
+ rval = SetStringValue (&(biop->org->orgname->div), value, existing_text);
+ }
+ } else {
+ orgmod_subtype = GetOrgModQualFromSrcQual (scp->data.intvalue);
+ if (orgmod_subtype == -1) {
+ subsrc_subtype = GetSubSrcQualFromSrcQual (scp->data.intvalue);
+ if (subsrc_subtype > -1) {
+ ssp = biop->subtype;
+ while (ssp != NULL) {
+ ssp_next = ssp->next;
+ if (ssp->subtype == subsrc_subtype
+ && DoesStringMatchConstraint (ssp->name, constraint)) {
+ rval = SetStringValue (&(ssp->name), value, existing_text);
+ found = TRUE;
+ if (rval && StringHasNoText (ssp->name) && !IsNonTextSourceQual(scp->data.intvalue)) {
+ if (ssp_prev == NULL) {
+ biop->subtype = ssp->next;
+ } else {
+ ssp_prev->next = ssp->next;
+ }
+ ssp->next = NULL;
+ ssp = SubSourceFree (ssp);
+ } else {
+ ssp_prev = ssp;
+ }
+ } else {
+ ssp_prev = ssp;
+ }
+ ssp = ssp_next;
+ }
+ if (!found && IsStringConstraintEmpty (constraint)) {
+ ssp = SubSourceNew ();
+ ssp->subtype = subsrc_subtype;
+ rval = SetStringValue (&(ssp->name), value, existing_text);
+ if (ssp_prev == NULL) {
+ biop->subtype = ssp;
+ } else {
+ ssp_prev->next = ssp;
+ }
+ }
+ }
+ } else {
+ if (biop->org != NULL && biop->org->orgname != NULL) {
+ mod = biop->org->orgname->mod;
+ while (mod != NULL) {
+ mod_next = mod->next;
+ if (mod->subtype == orgmod_subtype
+ && DoesStringMatchConstraint (mod->subname, constraint)) {
+ rval = SetStringValue (&(mod->subname), value, existing_text);
+ found = TRUE;
+ if (rval && StringHasNoText (mod->subname) && !IsNonTextSourceQual(scp->data.intvalue)) {
+ if (mod_prev == NULL) {
+ biop->org->orgname->mod = mod->next;
+ } else {
+ mod_prev->next = mod->next;
+ }
+ mod->next = NULL;
+ mod = OrgModFree (mod);
+ } else {
+ mod_prev = mod;
+ }
+ } else {
+ mod_prev = mod;
+ }
+ mod = mod_next;
+ }
+ }
+ if (!found && IsStringConstraintEmpty (constraint)) {
+ if (biop->org == NULL) {
+ biop->org = OrgRefNew();
+ }
+ if (biop->org->orgname == NULL) {
+ biop->org->orgname = OrgNameNew();
+ }
+ mod = OrgModNew ();
+ mod->subtype = orgmod_subtype;
+ rval = SetStringValue (&(mod->subname), value, existing_text);
+ if (mod_prev == NULL) {
+ biop->org->orgname->mod = mod;
+ } else {
+ mod_prev->next = mod;
+ }
+ }
+ }
+ }
+ break;
+ case SourceQualChoice_location:
+ str = LocNameFromGenome (biop->genome);
+ if (DoesStringMatchConstraint (str, constraint)) {
+ biop->genome = GenomeFromSrcLoc (scp->data.intvalue);
+ rval = TRUE;
+ }
+ break;
+ case SourceQualChoice_origin:
+ str = OriginNameFromOrigin (biop->origin);
+ if (DoesStringMatchConstraint (str, constraint)) {
+ biop->origin = OriginFromSrcOrig(scp->data.intvalue);
+ rval = TRUE;
+ }
+ break;
+ }
+ return rval;
+}
+
+
+static BioseqPtr GetSequenceForObject (Uint1 choice, Pointer data)
+{
+ BioseqPtr bsp = NULL;
+ SeqFeatPtr sfp;
+ SeqDescrPtr sdp;
+ ObjValNodePtr ovp;
+ CGPSetPtr cgp;
+ ValNodePtr vnp;
+
+ if (data == NULL) return NULL;
+
+ switch (choice) {
+ case OBJ_BIOSEQ:
+ bsp = (BioseqPtr) data;
+ break;
+ case OBJ_SEQFEAT:
+ sfp = (SeqFeatPtr) data;
+ bsp = BioseqFindFromSeqLoc (sfp->location);
+ break;
+ case OBJ_SEQDESC:
+ sdp = (SeqDescrPtr) data;
+ if (sdp->extended) {
+ ovp = (ObjValNodePtr) sdp;
+ if (ovp->idx.parenttype == OBJ_BIOSEQ && ovp->idx.parentptr != NULL) {
+ bsp = ovp->idx.parentptr;
+ }
+ }
+ break;
+ case 0:
+ cgp = (CGPSetPtr) data;
+ for (vnp = cgp->cds_list; vnp != NULL && bsp == NULL; vnp = vnp->next) {
+ sfp = vnp->data.ptrvalue;
+ if (sfp != NULL) {
+ bsp = BioseqFindFromSeqLoc (sfp->location);
+ }
+ }
+ for (vnp = cgp->mrna_list; vnp != NULL && bsp == NULL; vnp = vnp->next) {
+ sfp = vnp->data.ptrvalue;
+ if (sfp != NULL) {
+ bsp = BioseqFindFromSeqLoc (sfp->location);
+ }
+ }
+ break;
+ for (vnp = cgp->gene_list; vnp != NULL && bsp == NULL; vnp = vnp->next) {
+ sfp = vnp->data.ptrvalue;
+ if (sfp != NULL) {
+ bsp = BioseqFindFromSeqLoc (sfp->location);
+ }
+ }
+ break;
+ }
+ return bsp;
+}
+
+
+NLM_EXTERN BioSourcePtr GetBioSourceFromObject (Uint1 choice, Pointer data)
+{
+ BioSourcePtr biop = NULL;
+ SeqDescrPtr sdp;
+ SeqFeatPtr sfp;
+ BioseqPtr bsp = NULL;
+ SeqMgrDescContext context;
+
+ if (data == NULL) return NULL;
+
+ switch (choice)
+ {
+ case OBJ_SEQDESC:
+ sdp = (SeqDescrPtr) data;
+ if (sdp->choice == Seq_descr_source) {
+ biop = sdp->data.ptrvalue;
+ }
+ break;
+ case OBJ_SEQFEAT:
+ sfp = (SeqFeatPtr) data;
+ if (sfp->data.choice == SEQFEAT_BIOSRC) {
+ biop = sfp->data.value.ptrvalue;
+ }
+ break;
+ }
+ if (biop == NULL) {
+ bsp = GetSequenceForObject (choice, data);
+ sdp = SeqMgrGetNextDescriptor (bsp, NULL, Seq_descr_source, &context);
+ if (sdp != NULL && sdp->choice == Seq_descr_source) {
+ biop = sdp->data.ptrvalue;
+ }
+ }
+ return biop;
+}
+
+
+/* functions for dealing with CDS-Gene-Prot sets */
+static CharPtr GetFieldValueFromCGPSet (CGPSetPtr c, Uint2 field, StringConstraintPtr scp)
+{
+ CharPtr str = NULL;
+ ValNodePtr vnp;
+ SeqFeatPtr sfp;
+ GeneRefPtr grp;
+ RnaRefPtr rrp;
+ ProtRefPtr prp;
+
+ if (c == NULL) return NULL;
+ switch (field) {
+ case CDSGeneProt_field_cds_comment:
+ for (vnp = c->cds_list; vnp != NULL && str == NULL; vnp = vnp->next) {
+ sfp = (SeqFeatPtr) vnp->data.ptrvalue;
+ if (sfp != NULL && !StringHasNoText (sfp->comment) && DoesStringMatchConstraint(sfp->comment, scp))
+ {
+ str = StringSave (sfp->comment);
+ }
+ }
+ break;
+ case CDSGeneProt_field_gene_locus:
+ for (vnp = c->gene_list; vnp != NULL && str == NULL; vnp = vnp->next) {
+ sfp = (SeqFeatPtr) vnp->data.ptrvalue;
+ if (sfp != NULL && sfp->data.choice == SEQFEAT_GENE
+ && (grp = sfp->data.value.ptrvalue) != NULL
+ && !StringHasNoText (grp->locus)
+ && DoesStringMatchConstraint(grp->locus, scp))
+ {
+ str = StringSave (grp->locus);
+ }
+ }
+ break;
+ case CDSGeneProt_field_gene_description:
+ for (vnp = c->gene_list; vnp != NULL && str == NULL; vnp = vnp->next) {
+ sfp = (SeqFeatPtr) vnp->data.ptrvalue;
+ if (sfp != NULL && sfp->data.choice == SEQFEAT_GENE
+ && (grp = sfp->data.value.ptrvalue) != NULL
+ && !StringHasNoText (grp->desc)
+ && DoesStringMatchConstraint(grp->desc, scp))
+ {
+ str = StringSave (grp->desc);
+ }
+ }
+ break;
+ case CDSGeneProt_field_gene_comment:
+ for (vnp = c->gene_list; vnp != NULL && str == NULL; vnp = vnp->next) {
+ sfp = (SeqFeatPtr) vnp->data.ptrvalue;
+ if (sfp != NULL && !StringHasNoText (sfp->comment) && DoesStringMatchConstraint(sfp->comment, scp))
+ {
+ str = StringSave (sfp->comment);
+ }
+ }
+ break;
+ case CDSGeneProt_field_gene_allele:
+ for (vnp = c->gene_list; vnp != NULL && str == NULL; vnp = vnp->next) {
+ sfp = (SeqFeatPtr) vnp->data.ptrvalue;
+ if (sfp != NULL && sfp->data.choice == SEQFEAT_GENE
+ && (grp = sfp->data.value.ptrvalue) != NULL
+ && !StringHasNoText (grp->allele)
+ && DoesStringMatchConstraint(grp->allele, scp))
+ {
+ str = StringSave (grp->allele);
+ }
+ }
+ break;
+ case CDSGeneProt_field_gene_maploc:
+ for (vnp = c->gene_list; vnp != NULL && str == NULL; vnp = vnp->next) {
+ sfp = (SeqFeatPtr) vnp->data.ptrvalue;
+ if (sfp != NULL && sfp->data.choice == SEQFEAT_GENE
+ && (grp = sfp->data.value.ptrvalue) != NULL
+ && !StringHasNoText (grp->maploc)
+ && DoesStringMatchConstraint(grp->maploc, scp))
+ {
+ str = StringSave (grp->maploc);
+ }
+ }
+ break;
+ case CDSGeneProt_field_gene_locus_tag:
+ for (vnp = c->gene_list; vnp != NULL && str == NULL; vnp = vnp->next) {
+ sfp = (SeqFeatPtr) vnp->data.ptrvalue;
+ if (sfp != NULL && sfp->data.choice == SEQFEAT_GENE
+ && (grp = sfp->data.value.ptrvalue) != NULL
+ && !StringHasNoText (grp->locus_tag)
+ && DoesStringMatchConstraint(grp->locus_tag, scp))
+ {
+ str = StringSave (grp->locus_tag);
+ }
+ }
+ break;
+ case CDSGeneProt_field_gene_synonym:
+ for (vnp = c->gene_list; vnp != NULL && str == NULL; vnp = vnp->next) {
+ sfp = (SeqFeatPtr) vnp->data.ptrvalue;
+ if (sfp != NULL && sfp->data.choice == SEQFEAT_GENE
+ && (grp = sfp->data.value.ptrvalue) != NULL)
+ {
+ str = GetFirstValNodeStringMatch (grp->syn, scp);
+ }
+ }
+ break;
+ case CDSGeneProt_field_gene_old_locus_tag:
+ for (vnp = c->gene_list; vnp != NULL && str == NULL; vnp = vnp->next) {
+ sfp = (SeqFeatPtr) vnp->data.ptrvalue;
+ if (sfp != NULL) {
+ str = GetFirstGBQualMatch (sfp->qual, "old-locus-tag", scp);
+ }
+ }
+ break;
+ case CDSGeneProt_field_mrna_product:
+ for (vnp = c->mrna_list; vnp != NULL && str == NULL; vnp = vnp->next) {
+ sfp = (SeqFeatPtr) vnp->data.ptrvalue;
+ if (sfp != NULL && sfp->data.choice == SEQFEAT_RNA
+ && (rrp = sfp->data.value.ptrvalue) != NULL
+ && rrp->ext.choice == 1
+ && !StringHasNoText (rrp->ext.value.ptrvalue)
+ && DoesStringMatchConstraint(rrp->ext.value.ptrvalue, scp))
+ {
+ str = StringSave (rrp->ext.value.ptrvalue);
+ }
+ }
+ break;
+ case CDSGeneProt_field_mrna_comment:
+ for (vnp = c->mrna_list; vnp != NULL && str == NULL; vnp = vnp->next) {
+ sfp = (SeqFeatPtr) vnp->data.ptrvalue;
+ if (sfp != NULL && !StringHasNoText (sfp->comment) && DoesStringMatchConstraint(sfp->comment, scp))
+ {
+ str = StringSave (sfp->comment);
+ }
+ }
+ break;
+ case CDSGeneProt_field_prot_name:
+ for (vnp = c->prot_list; vnp != NULL && str == NULL; vnp = vnp->next) {
+ sfp = (SeqFeatPtr) vnp->data.ptrvalue;
+ if (sfp != NULL && sfp->data.choice == SEQFEAT_PROT
+ && sfp->idx.subtype == FEATDEF_PROT
+ && (prp = sfp->data.value.ptrvalue) != NULL)
+ {
+ str = GetFirstValNodeStringMatch (prp->name, scp);
+ }
+ }
+ break;
+ case CDSGeneProt_field_prot_description:
+ for (vnp = c->prot_list; vnp != NULL && str == NULL; vnp = vnp->next) {
+ sfp = (SeqFeatPtr) vnp->data.ptrvalue;
+ if (sfp != NULL && sfp->data.choice == SEQFEAT_PROT
+ && sfp->idx.subtype == FEATDEF_PROT
+ && (prp = sfp->data.value.ptrvalue) != NULL
+ && !StringHasNoText (prp->desc) && DoesStringMatchConstraint(prp->desc, scp)) {
+ str = StringSave (prp->desc);
+ }
+ }
+ break;
+ case CDSGeneProt_field_prot_ec_number:
+ for (vnp = c->prot_list; vnp != NULL && str == NULL; vnp = vnp->next) {
+ sfp = (SeqFeatPtr) vnp->data.ptrvalue;
+ if (sfp != NULL && sfp->data.choice == SEQFEAT_PROT
+ && sfp->idx.subtype == FEATDEF_PROT
+ && (prp = sfp->data.value.ptrvalue) != NULL)
+ {
+ str = GetFirstValNodeStringMatch (prp->ec, scp);
+ }
+ }
+ break;
+ case CDSGeneProt_field_prot_activity:
+ for (vnp = c->prot_list; vnp != NULL && str == NULL; vnp = vnp->next) {
+ sfp = (SeqFeatPtr) vnp->data.ptrvalue;
+ if (sfp != NULL && sfp->data.choice == SEQFEAT_PROT
+ && sfp->idx.subtype == FEATDEF_PROT
+ && (prp = sfp->data.value.ptrvalue) != NULL)
+ {
+ str = GetFirstValNodeStringMatch (prp->activity, scp);
+ }
+ }
+ break;
+ case CDSGeneProt_field_prot_comment:
+ for (vnp = c->prot_list; vnp != NULL && str == NULL; vnp = vnp->next) {
+ sfp = (SeqFeatPtr) vnp->data.ptrvalue;
+ if (sfp != NULL && sfp->idx.subtype == FEATDEF_PROT
+ && !StringHasNoText (sfp->comment) && DoesStringMatchConstraint(sfp->comment, scp))
+ {
+ str = StringSave (sfp->comment);
+ }
+ }
+ break;
+ case CDSGeneProt_field_mat_peptide_name:
+ for (vnp = c->prot_list; vnp != NULL && str == NULL; vnp = vnp->next) {
+ sfp = (SeqFeatPtr) vnp->data.ptrvalue;
+ if (sfp != NULL && sfp->data.choice == SEQFEAT_PROT
+ && sfp->idx.subtype == FEATDEF_mat_peptide_aa
+ && (prp = sfp->data.value.ptrvalue) != NULL)
+ {
+ str = GetFirstValNodeStringMatch (prp->name, scp);
+ }
+ }
+ break;
+ case CDSGeneProt_field_mat_peptide_description:
+ for (vnp = c->prot_list; vnp != NULL && str == NULL; vnp = vnp->next) {
+ sfp = (SeqFeatPtr) vnp->data.ptrvalue;
+ if (sfp != NULL && sfp->data.choice == SEQFEAT_PROT
+ && sfp->idx.subtype == FEATDEF_mat_peptide_aa
+ && (prp = sfp->data.value.ptrvalue) != NULL
+ && !StringHasNoText (prp->desc) && DoesStringMatchConstraint(prp->desc, scp)) {
+ str = StringSave (prp->desc);
+ }
+ }
+ break;
+ case CDSGeneProt_field_mat_peptide_ec_number:
+ for (vnp = c->prot_list; vnp != NULL && str == NULL; vnp = vnp->next) {
+ sfp = (SeqFeatPtr) vnp->data.ptrvalue;
+ if (sfp != NULL && sfp->data.choice == SEQFEAT_PROT
+ && sfp->idx.subtype == FEATDEF_mat_peptide_aa
+ && (prp = sfp->data.value.ptrvalue) != NULL)
+ {
+ str = GetFirstValNodeStringMatch (prp->ec, scp);
+ }
+ }
+ break;
+ case CDSGeneProt_field_mat_peptide_activity:
+ for (vnp = c->prot_list; vnp != NULL && str == NULL; vnp = vnp->next) {
+ sfp = (SeqFeatPtr) vnp->data.ptrvalue;
+ if (sfp != NULL && sfp->data.choice == SEQFEAT_PROT
+ && sfp->idx.subtype == FEATDEF_mat_peptide_aa
+ && (prp = sfp->data.value.ptrvalue) != NULL)
+ {
+ str = GetFirstValNodeStringMatch (prp->activity, scp);
+ }
+ }
+ break;
+ case CDSGeneProt_field_mat_peptide_comment:
+ for (vnp = c->prot_list; vnp != NULL && str == NULL; vnp = vnp->next) {
+ sfp = (SeqFeatPtr) vnp->data.ptrvalue;
+ if (sfp != NULL && sfp->idx.subtype == FEATDEF_mat_peptide_aa
+ && !StringHasNoText (sfp->comment) && DoesStringMatchConstraint(sfp->comment, scp))
+ {
+ str = StringSave (sfp->comment);
+ }
+ }
+ break;
+ }
+ return str;
+}
+
+
+static Boolean RemoveFieldValueFromCGPSet (CGPSetPtr c, Uint2 field, StringConstraintPtr scp)
+{
+ Boolean rval = FALSE;
+ ValNodePtr vnp;
+ SeqFeatPtr sfp;
+ GeneRefPtr grp;
+ RnaRefPtr rrp;
+ ProtRefPtr prp;
+
+ if (c == NULL) return FALSE;
+ switch (field) {
+ case CDSGeneProt_field_cds_comment:
+ for (vnp = c->cds_list; vnp != NULL; vnp = vnp->next) {
+ sfp = (SeqFeatPtr) vnp->data.ptrvalue;
+ if (sfp != NULL && !StringHasNoText (sfp->comment) && DoesStringMatchConstraint(sfp->comment, scp))
+ {
+ sfp->comment = MemFree (sfp->comment);
+ rval = TRUE;
+ }
+ }
+ break;
+ case CDSGeneProt_field_gene_locus:
+ for (vnp = c->gene_list; vnp != NULL; vnp = vnp->next) {
+ sfp = (SeqFeatPtr) vnp->data.ptrvalue;
+ if (sfp != NULL && sfp->data.choice == SEQFEAT_GENE
+ && (grp = sfp->data.value.ptrvalue) != NULL
+ && !StringHasNoText (grp->locus)
+ && DoesStringMatchConstraint(grp->locus, scp))
+ {
+ grp->locus = MemFree (grp->locus);
+ rval = TRUE;
+ }
+ }
+ break;
+ case CDSGeneProt_field_gene_description:
+ for (vnp = c->gene_list; vnp != NULL; vnp = vnp->next) {
+ sfp = (SeqFeatPtr) vnp->data.ptrvalue;
+ if (sfp != NULL && sfp->data.choice == SEQFEAT_GENE
+ && (grp = sfp->data.value.ptrvalue) != NULL
+ && !StringHasNoText (grp->desc)
+ && DoesStringMatchConstraint(grp->desc, scp))
+ {
+ grp->desc = MemFree(grp->desc);
+ rval = TRUE;
+ }
+ }
+ break;
+ case CDSGeneProt_field_gene_comment:
+ for (vnp = c->gene_list; vnp != NULL; vnp = vnp->next) {
+ sfp = (SeqFeatPtr) vnp->data.ptrvalue;
+ if (sfp != NULL && !StringHasNoText (sfp->comment) && DoesStringMatchConstraint(sfp->comment, scp))
+ {
+ sfp->comment = MemFree (sfp->comment);
+ rval = TRUE;
+ }
+ }
+ break;
+ case CDSGeneProt_field_gene_allele:
+ for (vnp = c->gene_list; vnp != NULL; vnp = vnp->next) {
+ sfp = (SeqFeatPtr) vnp->data.ptrvalue;
+ if (sfp != NULL && sfp->data.choice == SEQFEAT_GENE
+ && (grp = sfp->data.value.ptrvalue) != NULL
+ && !StringHasNoText (grp->allele)
+ && DoesStringMatchConstraint(grp->allele, scp))
+ {
+ grp->allele = MemFree (grp->allele);
+ rval = TRUE;
+ }
+ }
+ break;
+ case CDSGeneProt_field_gene_maploc:
+ for (vnp = c->gene_list; vnp != NULL; vnp = vnp->next) {
+ sfp = (SeqFeatPtr) vnp->data.ptrvalue;
+ if (sfp != NULL && sfp->data.choice == SEQFEAT_GENE
+ && (grp = sfp->data.value.ptrvalue) != NULL
+ && !StringHasNoText (grp->maploc)
+ && DoesStringMatchConstraint(grp->maploc, scp))
+ {
+ grp->maploc = MemFree (grp->maploc);
+ rval = TRUE;
+ }
+ }
+ break;
+ case CDSGeneProt_field_gene_locus_tag:
+ for (vnp = c->gene_list; vnp != NULL; vnp = vnp->next) {
+ sfp = (SeqFeatPtr) vnp->data.ptrvalue;
+ if (sfp != NULL && sfp->data.choice == SEQFEAT_GENE
+ && (grp = sfp->data.value.ptrvalue) != NULL
+ && !StringHasNoText (grp->locus_tag)
+ && DoesStringMatchConstraint(grp->locus_tag, scp))
+ {
+ grp->locus_tag = MemFree (grp->locus_tag);
+ rval = TRUE;
+ }
+ }
+ break;
+ case CDSGeneProt_field_gene_synonym:
+ for (vnp = c->gene_list; vnp != NULL; vnp = vnp->next) {
+ sfp = (SeqFeatPtr) vnp->data.ptrvalue;
+ if (sfp != NULL && sfp->data.choice == SEQFEAT_GENE
+ && (grp = sfp->data.value.ptrvalue) != NULL)
+ {
+ rval |= RemoveValNodeStringMatch (&(grp->syn), scp);
+ }
+ }
+ break;
+ case CDSGeneProt_field_gene_old_locus_tag:
+ for (vnp = c->gene_list; vnp != NULL; vnp = vnp->next) {
+ sfp = (SeqFeatPtr) vnp->data.ptrvalue;
+ if (sfp != NULL) {
+ rval |= RemoveGBQualMatch (&(sfp->qual), "old-locus-tag", scp);
+ }
+ }
+ break;
+ case CDSGeneProt_field_mrna_product:
+ for (vnp = c->mrna_list; vnp != NULL; vnp = vnp->next) {
+ sfp = (SeqFeatPtr) vnp->data.ptrvalue;
+ if (sfp != NULL && sfp->data.choice == SEQFEAT_RNA
+ && (rrp = sfp->data.value.ptrvalue) != NULL
+ && rrp->ext.choice == 1
+ && !StringHasNoText (rrp->ext.value.ptrvalue)
+ && DoesStringMatchConstraint(rrp->ext.value.ptrvalue, scp))
+ {
+ rrp->ext.value.ptrvalue = MemFree (rrp->ext.value.ptrvalue);
+ rrp->ext.choice = 0;
+ rval = TRUE;
+ }
+ }
+ break;
+ case CDSGeneProt_field_mrna_comment:
+ for (vnp = c->mrna_list; vnp != NULL; vnp = vnp->next) {
+ sfp = (SeqFeatPtr) vnp->data.ptrvalue;
+ if (sfp != NULL && !StringHasNoText (sfp->comment) && DoesStringMatchConstraint(sfp->comment, scp))
+ {
+ sfp->comment = MemFree (sfp->comment);
+ rval = TRUE;
+ }
+ }
+ break;
+ case CDSGeneProt_field_prot_name:
+ for (vnp = c->prot_list; vnp != NULL; vnp = vnp->next) {
+ sfp = (SeqFeatPtr) vnp->data.ptrvalue;
+ if (sfp != NULL && sfp->data.choice == SEQFEAT_PROT
+ && sfp->idx.subtype == FEATDEF_PROT
+ && (prp = sfp->data.value.ptrvalue) != NULL)
+ {
+ rval |= RemoveValNodeStringMatch (&(prp->name), scp);
+ }
+ }
+ break;
+ case CDSGeneProt_field_prot_description:
+ for (vnp = c->prot_list; vnp != NULL; vnp = vnp->next) {
+ sfp = (SeqFeatPtr) vnp->data.ptrvalue;
+ if (sfp != NULL && sfp->data.choice == SEQFEAT_PROT
+ && sfp->idx.subtype == FEATDEF_PROT
+ && (prp = sfp->data.value.ptrvalue) != NULL
+ && !StringHasNoText (prp->desc) && DoesStringMatchConstraint(prp->desc, scp)) {
+ prp->desc = MemFree (prp->desc);
+ rval = TRUE;
+ }
+ }
+ break;
+ case CDSGeneProt_field_prot_ec_number:
+ for (vnp = c->prot_list; vnp != NULL; vnp = vnp->next) {
+ sfp = (SeqFeatPtr) vnp->data.ptrvalue;
+ if (sfp != NULL && sfp->data.choice == SEQFEAT_PROT
+ && sfp->idx.subtype == FEATDEF_PROT
+ && (prp = sfp->data.value.ptrvalue) != NULL)
+ {
+ rval |= RemoveValNodeStringMatch (&(prp->ec), scp);
+ }
+ }
+ break;
+ case CDSGeneProt_field_prot_activity:
+ for (vnp = c->prot_list; vnp != NULL; vnp = vnp->next) {
+ sfp = (SeqFeatPtr) vnp->data.ptrvalue;
+ if (sfp != NULL && sfp->data.choice == SEQFEAT_PROT
+ && sfp->idx.subtype == FEATDEF_PROT
+ && (prp = sfp->data.value.ptrvalue) != NULL)
+ {
+ rval |= RemoveValNodeStringMatch (&(prp->activity), scp);
+ }
+ }
+ break;
+ case CDSGeneProt_field_prot_comment:
+ for (vnp = c->prot_list; vnp != NULL; vnp = vnp->next) {
+ sfp = (SeqFeatPtr) vnp->data.ptrvalue;
+ if (sfp != NULL && sfp->idx.subtype == FEATDEF_PROT
+ && !StringHasNoText (sfp->comment) && DoesStringMatchConstraint(sfp->comment, scp))
+ {
+ sfp->comment = MemFree (sfp->comment);
+ rval = TRUE;
+ }
+ }
+ break;
+ case CDSGeneProt_field_mat_peptide_name:
+ for (vnp = c->prot_list; vnp != NULL; vnp = vnp->next) {
+ sfp = (SeqFeatPtr) vnp->data.ptrvalue;
+ if (sfp != NULL && sfp->data.choice == SEQFEAT_PROT
+ && sfp->idx.subtype == FEATDEF_mat_peptide_aa
+ && (prp = sfp->data.value.ptrvalue) != NULL)
+ {
+ rval |= RemoveValNodeStringMatch (&(prp->name), scp);
+ }
+ }
+ break;
+ case CDSGeneProt_field_mat_peptide_description:
+ for (vnp = c->prot_list; vnp != NULL; vnp = vnp->next) {
+ sfp = (SeqFeatPtr) vnp->data.ptrvalue;
+ if (sfp != NULL && sfp->data.choice == SEQFEAT_PROT
+ && sfp->idx.subtype == FEATDEF_mat_peptide_aa
+ && (prp = sfp->data.value.ptrvalue) != NULL
+ && !StringHasNoText (prp->desc) && DoesStringMatchConstraint(prp->desc, scp)) {
+ prp->desc = MemFree (prp->desc);
+ rval = TRUE;
+ }
+ }
+ break;
+ case CDSGeneProt_field_mat_peptide_ec_number:
+ for (vnp = c->prot_list; vnp != NULL; vnp = vnp->next) {
+ sfp = (SeqFeatPtr) vnp->data.ptrvalue;
+ if (sfp != NULL && sfp->data.choice == SEQFEAT_PROT
+ && sfp->idx.subtype == FEATDEF_mat_peptide_aa
+ && (prp = sfp->data.value.ptrvalue) != NULL)
+ {
+ rval |= RemoveValNodeStringMatch (&(prp->ec), scp);
+ }
+ }
+ break;
+ case CDSGeneProt_field_mat_peptide_activity:
+ for (vnp = c->prot_list; vnp != NULL; vnp = vnp->next) {
+ sfp = (SeqFeatPtr) vnp->data.ptrvalue;
+ if (sfp != NULL && sfp->data.choice == SEQFEAT_PROT
+ && sfp->idx.subtype == FEATDEF_mat_peptide_aa
+ && (prp = sfp->data.value.ptrvalue) != NULL)
+ {
+ rval |= RemoveValNodeStringMatch (&(prp->activity), scp);
+ }
+ }
+ break;
+ case CDSGeneProt_field_mat_peptide_comment:
+ for (vnp = c->prot_list; vnp != NULL; vnp = vnp->next) {
+ sfp = (SeqFeatPtr) vnp->data.ptrvalue;
+ if (sfp != NULL && sfp->idx.subtype == FEATDEF_mat_peptide_aa
+ && !StringHasNoText (sfp->comment) && DoesStringMatchConstraint(sfp->comment, scp))
+ {
+ sfp->comment = MemFree (sfp->comment);
+ rval = TRUE;
+ }
+ }
+ break;
+ }
+ return rval;
+}
+
+
+static SeqFeatPtr CreateGeneForCGPSet (CGPSetPtr c)
+{
+ SeqFeatPtr gene = NULL, sfp = NULL;
+ BioseqPtr bsp;
+ ValNodePtr vnp;
+
+ if (c == NULL) return NULL;
+
+ for (vnp = c->cds_list; vnp != NULL && sfp == NULL; vnp = vnp->next) {
+ sfp = vnp->data.ptrvalue;
+ }
+ for (vnp = c->mrna_list; vnp != NULL && sfp == NULL; vnp = vnp->next) {
+ sfp = vnp->data.ptrvalue;
+ }
+ if (sfp != NULL) {
+ bsp = BioseqFindFromSeqLoc (sfp->location);
+ if (bsp != NULL) {
+ gene = CreateNewFeatureOnBioseq (bsp, SEQFEAT_GENE, sfp->location);
+ if (gene != NULL) {
+ gene->data.value.ptrvalue = GeneRefNew();
+ }
+ }
+ }
+ return gene;
+}
+
+
+static Boolean SetFieldValueInCGPSet (CGPSetPtr c, Uint2 field, StringConstraintPtr scp, CharPtr value, Uint2 existing_text)
+{
+ Boolean rval = FALSE;
+ ValNodePtr vnp;
+ SeqFeatPtr sfp;
+ GeneRefPtr grp;
+ ProtRefPtr prp;
+
+ if (c == NULL) return FALSE;
+ switch (field) {
+ case CDSGeneProt_field_cds_comment:
+ for (vnp = c->cds_list; vnp != NULL; vnp = vnp->next) {
+ sfp = (SeqFeatPtr) vnp->data.ptrvalue;
+ if (sfp != NULL && DoesStringMatchConstraint(sfp->comment, scp))
+ {
+ rval |= SetStringValue ( &(sfp->comment), value, existing_text);
+ }
+ }
+ break;
+ case CDSGeneProt_field_gene_locus:
+ if (c->gene_list == NULL && scp == NULL) {
+ sfp = CreateGeneForCGPSet (c);
+ if (sfp != NULL) {
+ ValNodeAddPointer (&(c->gene_list), 0, sfp);
+ }
+ }
+ for (vnp = c->gene_list; vnp != NULL; vnp = vnp->next) {
+ sfp = (SeqFeatPtr) vnp->data.ptrvalue;
+ if (sfp != NULL && sfp->data.choice == SEQFEAT_GENE
+ && (grp = sfp->data.value.ptrvalue) != NULL
+ && DoesStringMatchConstraint(grp->locus, scp))
+ {
+ rval |= SetStringValue ( &(grp->locus), value, existing_text);
+ }
+ }
+ break;
+ case CDSGeneProt_field_gene_description:
+ for (vnp = c->gene_list; vnp != NULL; vnp = vnp->next) {
+ sfp = (SeqFeatPtr) vnp->data.ptrvalue;
+ if (sfp != NULL && sfp->data.choice == SEQFEAT_GENE
+ && (grp = sfp->data.value.ptrvalue) != NULL
+ && DoesStringMatchConstraint(grp->desc, scp))
+ {
+ rval |= SetStringValue ( &(grp->desc), value, existing_text);
+ }
+ }
+ break;
+ case CDSGeneProt_field_gene_comment:
+ for (vnp = c->gene_list; vnp != NULL; vnp = vnp->next) {
+ sfp = (SeqFeatPtr) vnp->data.ptrvalue;
+ if (sfp != NULL && DoesStringMatchConstraint(sfp->comment, scp))
+ {
+ rval |= SetStringValue ( &(sfp->comment), value, existing_text);
+ }
+ }
+ break;
+ case CDSGeneProt_field_gene_allele:
+ for (vnp = c->gene_list; vnp != NULL; vnp = vnp->next) {
+ sfp = (SeqFeatPtr) vnp->data.ptrvalue;
+ if (sfp != NULL && sfp->data.choice == SEQFEAT_GENE
+ && (grp = sfp->data.value.ptrvalue) != NULL
+ && DoesStringMatchConstraint(grp->allele, scp))
+ {
+ rval |= SetStringValue (&(grp->allele), value, existing_text);
+ }
+ }
+ break;
+ case CDSGeneProt_field_gene_maploc:
+ for (vnp = c->gene_list; vnp != NULL; vnp = vnp->next) {
+ sfp = (SeqFeatPtr) vnp->data.ptrvalue;
+ if (sfp != NULL && sfp->data.choice == SEQFEAT_GENE
+ && (grp = sfp->data.value.ptrvalue) != NULL
+ && DoesStringMatchConstraint(grp->maploc, scp))
+ {
+ rval |= SetStringValue ( &(grp->maploc), value, existing_text);
+ }
+ }
+ break;
+ case CDSGeneProt_field_gene_locus_tag:
+ for (vnp = c->gene_list; vnp != NULL; vnp = vnp->next) {
+ sfp = (SeqFeatPtr) vnp->data.ptrvalue;
+ if (sfp != NULL && sfp->data.choice == SEQFEAT_GENE
+ && (grp = sfp->data.value.ptrvalue) != NULL
+ && DoesStringMatchConstraint(grp->locus_tag, scp))
+ {
+ rval |= SetStringValue ( &(grp->locus_tag), value, existing_text);
+ }
+ }
+ break;
+ case CDSGeneProt_field_gene_synonym:
+ for (vnp = c->gene_list; vnp != NULL; vnp = vnp->next) {
+ sfp = (SeqFeatPtr) vnp->data.ptrvalue;
+ if (sfp != NULL && sfp->data.choice == SEQFEAT_GENE
+ && (grp = sfp->data.value.ptrvalue) != NULL)
+ {
+ rval |= SetStringsInValNodeStringList (&(grp->syn), scp, value, existing_text);
+ }
+ }
+ break;
+ case CDSGeneProt_field_gene_old_locus_tag:
+ for (vnp = c->gene_list; vnp != NULL; vnp = vnp->next) {
+ sfp = (SeqFeatPtr) vnp->data.ptrvalue;
+ if (sfp != NULL) {
+ rval |= RemoveGBQualMatch (&(sfp->qual), "old-locus-tag", scp);
+ }
+ }
+ break;
+ case CDSGeneProt_field_mrna_product:
+ for (vnp = c->mrna_list; vnp != NULL; vnp = vnp->next) {
+ sfp = (SeqFeatPtr) vnp->data.ptrvalue;
+ rval |= SetRNAProductString (sfp, scp, value, existing_text);
+ }
+ break;
+ case CDSGeneProt_field_mrna_comment:
+ for (vnp = c->mrna_list; vnp != NULL; vnp = vnp->next) {
+ sfp = (SeqFeatPtr) vnp->data.ptrvalue;
+ if (sfp != NULL&& DoesStringMatchConstraint(sfp->comment, scp))
+ {
+ rval |= SetStringValue ( &(sfp->comment), value, existing_text);
+ }
+ }
+ break;
+ case CDSGeneProt_field_prot_name:
+ for (vnp = c->prot_list; vnp != NULL; vnp = vnp->next) {
+ sfp = (SeqFeatPtr) vnp->data.ptrvalue;
+ if (sfp != NULL && sfp->data.choice == SEQFEAT_PROT
+ && sfp->idx.subtype == FEATDEF_PROT
+ && (prp = sfp->data.value.ptrvalue) != NULL)
+ {
+ rval |= SetStringsInValNodeStringList (&(prp->name), scp, value, existing_text);
+ }
+ }
+ break;
+ case CDSGeneProt_field_prot_description:
+ for (vnp = c->prot_list; vnp != NULL; vnp = vnp->next) {
+ sfp = (SeqFeatPtr) vnp->data.ptrvalue;
+ if (sfp != NULL && sfp->data.choice == SEQFEAT_PROT
+ && sfp->idx.subtype == FEATDEF_PROT
+ && (prp = sfp->data.value.ptrvalue) != NULL
+ && DoesStringMatchConstraint(prp->desc, scp)) {
+ rval |= SetStringValue ( &(prp->desc), value, existing_text);
+ }
+ }
+ break;
+ case CDSGeneProt_field_prot_ec_number:
+ for (vnp = c->prot_list; vnp != NULL; vnp = vnp->next) {
+ sfp = (SeqFeatPtr) vnp->data.ptrvalue;
+ if (sfp != NULL && sfp->data.choice == SEQFEAT_PROT
+ && sfp->idx.subtype == FEATDEF_PROT
+ && (prp = sfp->data.value.ptrvalue) != NULL)
+ {
+ rval |= SetStringsInValNodeStringList (&(prp->ec), scp, value, existing_text);
+ }
+ }
+ break;
+ case CDSGeneProt_field_prot_activity:
+ for (vnp = c->prot_list; vnp != NULL; vnp = vnp->next) {
+ sfp = (SeqFeatPtr) vnp->data.ptrvalue;
+ if (sfp != NULL && sfp->data.choice == SEQFEAT_PROT
+ && sfp->idx.subtype == FEATDEF_PROT
+ && (prp = sfp->data.value.ptrvalue) != NULL)
+ {
+ rval |= SetStringsInValNodeStringList (&(prp->activity), scp, value, existing_text);
+ }
+ }
+ break;
+ case CDSGeneProt_field_prot_comment:
+ for (vnp = c->prot_list; vnp != NULL; vnp = vnp->next) {
+ sfp = (SeqFeatPtr) vnp->data.ptrvalue;
+ if (sfp != NULL && sfp->idx.subtype == FEATDEF_PROT
+ && DoesStringMatchConstraint(sfp->comment, scp))
+ {
+ rval |= SetStringValue ( &(sfp->comment), value, existing_text);
+ }
+ }
+ break;
+ case CDSGeneProt_field_mat_peptide_name:
+ for (vnp = c->prot_list; vnp != NULL; vnp = vnp->next) {
+ sfp = (SeqFeatPtr) vnp->data.ptrvalue;
+ if (sfp != NULL && sfp->data.choice == SEQFEAT_PROT
+ && sfp->idx.subtype == FEATDEF_mat_peptide_aa
+ && (prp = sfp->data.value.ptrvalue) != NULL)
+ {
+ rval |= SetStringsInValNodeStringList (&(prp->name), scp, value, existing_text);
+ }
+ }
+ break;
+ case CDSGeneProt_field_mat_peptide_description:
+ for (vnp = c->prot_list; vnp != NULL; vnp = vnp->next) {
+ sfp = (SeqFeatPtr) vnp->data.ptrvalue;
+ if (sfp != NULL && sfp->data.choice == SEQFEAT_PROT
+ && sfp->idx.subtype == FEATDEF_mat_peptide_aa
+ && (prp = sfp->data.value.ptrvalue) != NULL
+ && DoesStringMatchConstraint(prp->desc, scp)) {
+ rval |= SetStringValue ( &(prp->desc), value, existing_text);
+ }
+ }
+ break;
+ case CDSGeneProt_field_mat_peptide_ec_number:
+ for (vnp = c->prot_list; vnp != NULL; vnp = vnp->next) {
+ sfp = (SeqFeatPtr) vnp->data.ptrvalue;
+ if (sfp != NULL && sfp->data.choice == SEQFEAT_PROT
+ && sfp->idx.subtype == FEATDEF_mat_peptide_aa
+ && (prp = sfp->data.value.ptrvalue) != NULL)
+ {
+ rval |= SetStringsInValNodeStringList (&(prp->ec), scp, value, existing_text);
+ }
+ }
+ break;
+ case CDSGeneProt_field_mat_peptide_activity:
+ for (vnp = c->prot_list; vnp != NULL; vnp = vnp->next) {
+ sfp = (SeqFeatPtr) vnp->data.ptrvalue;
+ if (sfp != NULL && sfp->data.choice == SEQFEAT_PROT
+ && sfp->idx.subtype == FEATDEF_mat_peptide_aa
+ && (prp = sfp->data.value.ptrvalue) != NULL)
+ {
+ rval |= SetStringsInValNodeStringList (&(prp->activity), scp, value, existing_text);
+ }
+ }
+ break;
+ case CDSGeneProt_field_mat_peptide_comment:
+ for (vnp = c->prot_list; vnp != NULL; vnp = vnp->next) {
+ sfp = (SeqFeatPtr) vnp->data.ptrvalue;
+ if (sfp != NULL && sfp->idx.subtype == FEATDEF_mat_peptide_aa
+ && DoesStringMatchConstraint(sfp->comment, scp))
+ {
+ rval |= SetStringValue ( &(sfp->comment), value, existing_text);
+ }
+ }
+ break;
+ }
+ return rval;
+}
+
+
+static MolInfoPtr GetMolInfoForBioseq (BioseqPtr bsp)
+{
+ MolInfoPtr m = NULL;
+ SeqDescrPtr sdp;
+
+ if (bsp == NULL) return NULL;
+ sdp = bsp->descr;
+ while (sdp != NULL && sdp->choice != Seq_descr_molinfo) {
+ sdp = sdp->next;
+ }
+ if (sdp != NULL) {
+ m = (MolInfoPtr) sdp->data.ptrvalue;
+ }
+ return m;
+}
+
+
+static CharPtr GetSequenceQualFromBioseq (BioseqPtr bsp, ValNodePtr field)
+{
+ CharPtr rval = NULL;
+ MolInfoPtr m;
+
+ if (bsp == NULL || field == NULL) return NULL;
+
+ switch (field->choice) {
+ case MolinfoField_molecule:
+ m = GetMolInfoForBioseq (bsp);
+ if (m != NULL) {
+ rval = BiomolNameFromBiomol (m->biomol);
+ }
+ break;
+ case MolinfoField_technique:
+ m = GetMolInfoForBioseq (bsp);
+ if (m != NULL) {
+ rval = TechNameFromTech (m->tech);
+ }
+ break;
+ case MolinfoField_completedness:
+ m = GetMolInfoForBioseq (bsp);
+ if (m != NULL) {
+ rval = CompletenessNameFromCompleteness (m->completeness);
+ }
+ break;
+ case MolinfoField_mol_class:
+ rval = MolNameFromMol (bsp->mol);
+ break;
+ case MolinfoField_topology:
+ rval = TopologyNameFromTopology (bsp->topology);
+ break;
+ case MolinfoField_strand:
+ rval = StrandNameFromStrand (bsp->strand);
+ break;
+ }
+ if (rval != NULL) rval = StringSave (rval);
+ return rval;
+}
+
+
+static Boolean RemoveSequenceQualFromBioseq (BioseqPtr bsp, ValNodePtr field)
+{
+ MolInfoPtr m;
+ Boolean rval = FALSE;
+
+ if (bsp == NULL || field == NULL) return FALSE;
+
+ switch (field->choice) {
+ case MolinfoField_molecule:
+ m = GetMolInfoForBioseq (bsp);
+ if (m != NULL) {
+ m->biomol = 0;
+ rval = TRUE;
+ }
+ break;
+ case MolinfoField_technique:
+ m = GetMolInfoForBioseq (bsp);
+ if (m != NULL) {
+ m->tech = 0;
+ rval = TRUE;
+ }
+ break;
+ case MolinfoField_completedness:
+ m = GetMolInfoForBioseq (bsp);
+ if (m != NULL) {
+ m->completeness = 0;
+ rval = TRUE;
+ }
+ break;
+ case MolinfoField_mol_class:
+ bsp->mol = 0;
+ rval = TRUE;
+ break;
+ case MolinfoField_topology:
+ bsp->topology = 0;
+ rval = TRUE;
+ break;
+ case MolinfoField_strand:
+ bsp->strand = 0;
+ rval = TRUE;
+ break;
+ }
+ return rval;
+}
+
+
+static MolInfoPtr AddMolInfoToBioseq (BioseqPtr bsp)
+{
+ SeqDescrPtr sdp;
+ MolInfoPtr m;
+
+ sdp = CreateNewDescriptorOnBioseq (bsp, Seq_descr_molinfo);
+ m = MolInfoNew ();
+ sdp->data.ptrvalue = m;
+ return m;
+}
+
+
+static Boolean SetSequenceQualOnBioseq (BioseqPtr bsp, ValNodePtr field)
+{
+ MolInfoPtr m;
+ Boolean rval = FALSE;
+
+ if (bsp == NULL || field == NULL) return FALSE;
+
+ switch (field->choice) {
+ case MolinfoField_molecule:
+ m = GetMolInfoForBioseq (bsp);
+ if (m == NULL) {
+ m = AddMolInfoToBioseq (bsp);
+ }
+ m->biomol = BiomolFromMoleculeType (field->data.intvalue);
+ rval = TRUE;
+ break;
+ case MolinfoField_technique:
+ m = GetMolInfoForBioseq (bsp);
+ if (m == NULL) {
+ m = AddMolInfoToBioseq (bsp);
+ }
+ m->tech = TechFromTechniqueType (field->data.intvalue);
+ rval = TRUE;
+ break;
+ case MolinfoField_completedness:
+ m = GetMolInfoForBioseq (bsp);
+ if (m == NULL) {
+ m = AddMolInfoToBioseq (bsp);
+ }
+ m->completeness = CompletenessFromCompletednessType (field->data.intvalue);
+ rval = TRUE;
+ break;
+ case MolinfoField_mol_class:
+ bsp->mol = MolFromMoleculeClassType (field->data.intvalue);
+ rval = TRUE;
+ break;
+ case MolinfoField_topology:
+ bsp->topology = TopologyFromTopologyType (field->data.intvalue);
+ rval = TRUE;
+ break;
+ case MolinfoField_strand:
+ bsp->strand = StrandFromStrandType (field->data.intvalue);
+ rval = TRUE;
+ break;
+ }
+ return rval;
+}
+
+
+NLM_EXTERN FieldTypePtr GetFromFieldFromFieldPair (FieldPairTypePtr fieldpair)
+{
+ SourceQualChoicePtr ss = NULL;
+ SourceQualPairPtr sqpp;
+ FeatureFieldPairPtr fp;
+ FeatureFieldPtr fs;
+ FieldTypePtr f = NULL;
+ CDSGeneProtFieldPairPtr cp;
+ MolinfoFieldPairPtr mp;
+ ValNodePtr vnp;
+
+ if (fieldpair == NULL) return NULL;
+ switch (fieldpair->choice) {
+ case FieldPairType_source_qual:
+ sqpp = (SourceQualPairPtr) fieldpair->data.ptrvalue;
+ if (sqpp != NULL) {
+ ss = ValNodeNew (NULL);
+ ss->choice = SourceQualChoice_textqual;
+ ss->data.intvalue = sqpp->field_from;
+ f = ValNodeNew (NULL);
+ f->choice = FieldType_source_qual;
+ f->data.ptrvalue = ss;
+ }
+ break;
+ case FieldPairType_feature_field:
+ fp = (FeatureFieldPairPtr) fieldpair->data.ptrvalue;
+ if (fp != NULL) {
+ fs = FeatureFieldNew ();
+ fs->type = fp->type;
+ fs->field = (FeatQualChoicePtr) AsnIoMemCopy (fp->field_from, (AsnReadFunc) FeatQualChoiceAsnRead, (AsnWriteFunc) FeatQualChoiceAsnWrite);
+ f = ValNodeNew (NULL);
+ f->choice = FieldType_feature_field;
+ f->data.ptrvalue = fs;
+ }
+ break;
+ case FieldPairType_cds_gene_prot:
+ cp = (CDSGeneProtFieldPairPtr) fieldpair->data.ptrvalue;
+ if (cp != NULL) {
+ f = ValNodeNew (NULL);
+ f->choice = FieldType_cds_gene_prot;
+ f->data.intvalue = cp->field_from;
+ }
+ break;
+ case FieldPairType_molinfo_field:
+ mp = (MolinfoFieldPairPtr) fieldpair->data.ptrvalue;
+ if (mp != NULL && mp->data.ptrvalue != NULL) {
+ vnp = NULL;
+ switch (mp->choice) {
+ case MolinfoFieldPair_molecule:
+ vnp = ValNodeNew (NULL);
+ vnp->choice = MolinfoField_molecule;
+ vnp->data.intvalue = ((MolinfoMoleculePairPtr)mp->data.ptrvalue)->from;
+ break;
+ case MolinfoFieldPair_technique:
+ vnp = ValNodeNew (NULL);
+ vnp->choice = MolinfoField_technique;
+ vnp->data.intvalue = ((MolinfoTechniquePairPtr)mp->data.ptrvalue)->from;
+ break;
+ case MolinfoFieldPair_completedness:
+ vnp = ValNodeNew (NULL);
+ vnp->choice = MolinfoField_completedness;
+ vnp->data.intvalue = ((MolinfoCompletednessPairPtr)mp->data.ptrvalue)->from;
+ break;
+ case MolinfoFieldPair_mol_class:
+ vnp = ValNodeNew (NULL);
+ vnp->choice = MolinfoField_mol_class;
+ vnp->data.intvalue = ((MolinfoMolClassPairPtr)mp->data.ptrvalue)->from;
+ break;
+ case MolinfoFieldPair_topology:
+ vnp = ValNodeNew (NULL);
+ vnp->choice = MolinfoField_topology;
+ vnp->data.intvalue = ((MolinfoTopologyPairPtr)mp->data.ptrvalue)->from;
+ break;
+ case MolinfoFieldPair_strand:
+ vnp = ValNodeNew (NULL);
+ vnp->choice = MolinfoField_strand;
+ vnp->data.intvalue = ((MolinfoStrandPairPtr)mp->data.ptrvalue)->from;
+ break;
+ }
+ if (vnp != NULL) {
+ f = ValNodeNew (NULL);
+ f->choice = FieldType_molinfo_field;
+ f->data.ptrvalue = vnp;
+ }
+ }
+ break;
+ }
+ return f;
+}
+
+
+NLM_EXTERN FieldTypePtr GetToFieldFromFieldPair (FieldPairTypePtr fieldpair)
+{
+ SourceQualChoicePtr ss = NULL;
+ SourceQualPairPtr sqpp;
+ FeatureFieldPairPtr fp;
+ FeatureFieldPtr fs;
+ FieldTypePtr f = NULL;
+ CDSGeneProtFieldPairPtr cp;
+ MolinfoFieldPairPtr mp;
+ ValNodePtr vnp;
+
+ if (fieldpair == NULL) return NULL;
+ switch (fieldpair->choice) {
+ case FieldPairType_source_qual:
+ sqpp = (SourceQualPairPtr) fieldpair->data.ptrvalue;
+ if (sqpp != NULL) {
+ ss = ValNodeNew (NULL);
+ ss->choice = SourceQualChoice_textqual;
+ ss->data.intvalue = sqpp->field_to;
+ f = ValNodeNew (NULL);
+ f->choice = FieldType_source_qual;
+ f->data.ptrvalue = ss;
+ }
+ break;
+ case FieldPairType_feature_field:
+ fp = (FeatureFieldPairPtr) fieldpair->data.ptrvalue;
+ if (fp != NULL) {
+ fs = FeatureFieldNew ();
+ fs->type = fp->type;
+ fs->field = (FeatQualChoicePtr) AsnIoMemCopy (fp->field_to, (AsnReadFunc) FeatQualChoiceAsnRead, (AsnWriteFunc) FeatQualChoiceAsnWrite);
+ f = ValNodeNew (NULL);
+ f->choice = FieldType_feature_field;
+ f->data.ptrvalue = fs;
+ }
+ break;
+ case FieldPairType_cds_gene_prot:
+ cp = (CDSGeneProtFieldPairPtr) fieldpair->data.ptrvalue;
+ if (cp != NULL) {
+ f = ValNodeNew (NULL);
+ f->choice = FieldType_cds_gene_prot;
+ f->data.intvalue = cp->field_to;
+ }
+ break;
+ case FieldPairType_molinfo_field:
+ mp = (MolinfoFieldPairPtr) fieldpair->data.ptrvalue;
+ if (mp != NULL && mp->data.ptrvalue != NULL) {
+ vnp = NULL;
+ switch (mp->choice) {
+ case MolinfoFieldPair_molecule:
+ vnp = ValNodeNew (NULL);
+ vnp->choice = MolinfoField_molecule;
+ vnp->data.intvalue = ((MolinfoMoleculePairPtr)mp->data.ptrvalue)->to;
+ break;
+ case MolinfoFieldPair_technique:
+ vnp = ValNodeNew (NULL);
+ vnp->choice = MolinfoField_technique;
+ vnp->data.intvalue = ((MolinfoTechniquePairPtr)mp->data.ptrvalue)->to;
+ break;
+ case MolinfoFieldPair_completedness:
+ vnp = ValNodeNew (NULL);
+ vnp->choice = MolinfoField_completedness;
+ vnp->data.intvalue = ((MolinfoCompletednessPairPtr)mp->data.ptrvalue)->to;
+ break;
+ case MolinfoFieldPair_mol_class:
+ vnp = ValNodeNew (NULL);
+ vnp->choice = MolinfoField_mol_class;
+ vnp->data.intvalue = ((MolinfoMolClassPairPtr)mp->data.ptrvalue)->to;
+ break;
+ case MolinfoFieldPair_topology:
+ vnp = ValNodeNew (NULL);
+ vnp->choice = MolinfoField_topology;
+ vnp->data.intvalue = ((MolinfoTopologyPairPtr)mp->data.ptrvalue)->to;
+ break;
+ case MolinfoFieldPair_strand:
+ vnp = ValNodeNew (NULL);
+ vnp->choice = MolinfoField_strand;
+ vnp->data.intvalue = ((MolinfoStrandPairPtr)mp->data.ptrvalue)->to;
+ break;
+ }
+ if (vnp != NULL) {
+ f = ValNodeNew (NULL);
+ f->choice = FieldType_molinfo_field;
+ f->data.ptrvalue = vnp;
+ }
+ }
+ break;
+ }
+ return f;
+}
+
+
+static Uint1 FieldTypeChoiceFromFieldPairTypeChoice (Uint1 field_pair_choice)
+{
+ Uint1 field_type_choice = 0;
+
+ switch (field_pair_choice) {
+ case FieldPairType_source_qual:
+ field_type_choice = FieldType_source_qual;
+ break;
+ case FieldPairType_feature_field:
+ field_type_choice = FieldType_feature_field;
+ break;
+ case FieldPairType_cds_gene_prot:
+ field_type_choice = FieldType_cds_gene_prot;
+ break;
+ case FieldPairType_molinfo_field:
+ field_type_choice = FieldType_molinfo_field;
+ break;
+ }
+
+ return field_type_choice;
+}
+
+
+NLM_EXTERN Uint1 FieldTypeFromAECRAction (AECRActionPtr action)
+{
+ Uint1 field_type = 0;
+ ApplyActionPtr a;
+ EditActionPtr e;
+ ConvertActionPtr v;
+ CopyActionPtr c;
+ SwapActionPtr s;
+ RemoveActionPtr r;
+ AECRParseActionPtr p;
+
+ if (action == NULL || action->action == NULL || action->action->data.ptrvalue == NULL) {
+ return 0;
+ }
+ switch (action->action->choice) {
+ case ActionChoice_apply:
+ a = (ApplyActionPtr) action->action->data.ptrvalue;
+ if (a->field != NULL) {
+ field_type = a->field->choice;
+ }
+ break;
+ case ActionChoice_edit:
+ e = (EditActionPtr) action->action->data.ptrvalue;
+ if (e->field != NULL) {
+ field_type = e->field->choice;
+ }
+ break;
+ case ActionChoice_convert:
+ v = (ConvertActionPtr) action->action->data.ptrvalue;
+ field_type = FieldTypeChoiceFromFieldPairTypeChoice (v->fields->choice);
+ break;
+ case ActionChoice_copy:
+ c = (CopyActionPtr) action->action->data.ptrvalue;
+ field_type = FieldTypeChoiceFromFieldPairTypeChoice (c->fields->choice);
+ break;
+ case ActionChoice_swap:
+ s = (SwapActionPtr) action->action->data.ptrvalue;
+ field_type = FieldTypeChoiceFromFieldPairTypeChoice (s->fields->choice);
+ break;
+ case ActionChoice_remove:
+ r = (RemoveActionPtr) action->action->data.ptrvalue;
+ if (r->field != NULL) {
+ field_type = r->field->choice;
+ }
+ break;
+ case ActionChoice_parse:
+ p = (AECRParseActionPtr) action->action->data.ptrvalue;
+ field_type = FieldTypeChoiceFromFieldPairTypeChoice (p->fields->choice);
+ break;
+ }
+ return field_type;
+}
+
+
+static CharPtr GetFieldValueForObject (Uint1 choice, Pointer data, FieldTypePtr field, StringConstraintPtr scp)
+{
+ CharPtr str = NULL;
+ FeatureFieldPtr feature_field;
+
+ if (data == NULL || field == NULL || field->data.ptrvalue == NULL) return FALSE;
+
+ switch (field->choice) {
+ case FieldType_source_qual :
+ str = GetSourceQualFromBioSource (GetBioSourceFromObject (choice, data), (SourceQualChoicePtr) field->data.ptrvalue, scp);
+ break;
+ case FieldType_feature_field :
+ if (choice == OBJ_SEQFEAT) {
+ str = GetQualFromFeature ((SeqFeatPtr) data, (FeatureFieldPtr) field->data.ptrvalue, scp);
+ }
+ break;
+ case FieldType_cds_gene_prot :
+ if (choice == 0) {
+ str = GetFieldValueFromCGPSet ((CGPSetPtr) data, field->data.intvalue, scp);
+ } else if (choice == OBJ_SEQFEAT) {
+ feature_field = FeatureFieldFromCDSGeneProtField (field->data.intvalue);
+ str = GetQualFromFeature ((SeqFeatPtr) data, feature_field, scp);
+ feature_field = FeatureFieldFree (feature_field);
+ }
+ break;
+ case FieldType_molinfo_field :
+ if (choice == OBJ_BIOSEQ) {
+ str = GetSequenceQualFromBioseq ((BioseqPtr) data, field->data.ptrvalue);
+ }
+ break;
+ }
+ return str;
+}
+
+
+static Boolean RemoveFieldValueForObject (Uint1 choice, Pointer data, FieldTypePtr field, StringConstraintPtr scp)
+{
+ Boolean rval = FALSE;
+ FeatureFieldPtr feature_field;
+
+ if (data == NULL || field == NULL || field->data.ptrvalue == NULL) return FALSE;
+
+ switch (field->choice) {
+ case FieldType_source_qual :
+ rval = RemoveSourceQualFromBioSource (GetBioSourceFromObject (choice, data), (SourceQualChoicePtr) field->data.ptrvalue, scp);
+ break;
+ case FieldType_feature_field :
+ if (choice == OBJ_SEQFEAT) {
+ rval = RemoveQualFromFeature ((SeqFeatPtr) data, (FeatureFieldPtr) field->data.ptrvalue, scp);
+ }
+ break;
+ case FieldType_cds_gene_prot:
+ if (choice == 0) {
+ rval = RemoveFieldValueFromCGPSet ((CGPSetPtr) data, field->data.intvalue, scp);
+ } else if (choice == OBJ_SEQFEAT) {
+ feature_field = FeatureFieldFromCDSGeneProtField (field->data.intvalue);
+ rval = RemoveQualFromFeature ((SeqFeatPtr) data, feature_field, scp);
+ feature_field = FeatureFieldFree (feature_field);
+ }
+ break;
+ case FieldType_molinfo_field :
+ if (choice == OBJ_BIOSEQ) {
+ rval = RemoveSequenceQualFromBioseq ((BioseqPtr) data, field->data.ptrvalue);
+ }
+ break;
+ }
+ return rval;
+}
+
+
+static Boolean SetFieldValueForObject (Uint1 choice, Pointer data, FieldTypePtr field, StringConstraintPtr scp, CharPtr value, Uint2 existing_text)
+{
+ Boolean rval = FALSE;
+ FeatureFieldPtr feature_field;
+
+ if (data == NULL || field == NULL || field->data.ptrvalue == NULL) return FALSE;
+
+ switch (field->choice) {
+ case FieldType_source_qual :
+ rval = SetSourceQualInBioSource (GetBioSourceFromObject (choice, data), (SourceQualChoicePtr) field->data.ptrvalue, scp, value, existing_text);
+ break;
+ case FieldType_feature_field :
+ if (choice == OBJ_SEQFEAT) {
+ rval = SetQualOnFeature ((SeqFeatPtr) data, (FeatureFieldPtr) field->data.ptrvalue, scp, value, existing_text);
+ }
+ break;
+ case FieldType_cds_gene_prot:
+ if (choice == 0) {
+ rval = SetFieldValueInCGPSet ((CGPSetPtr) data, field->data.intvalue, scp, value, existing_text);
+ } else if (choice == OBJ_SEQFEAT) {
+ feature_field = FeatureFieldFromCDSGeneProtField (field->data.intvalue);
+ rval = SetQualOnFeature ((SeqFeatPtr) data, feature_field, scp, value, existing_text);
+ feature_field = FeatureFieldFree (feature_field);
+ }
+ break;
+ case FieldType_molinfo_field:
+ if (choice == OBJ_BIOSEQ) {
+ rval = SetSequenceQualOnBioseq ((BioseqPtr) data, field->data.ptrvalue);
+ }
+ break;
+ }
+ return rval;
+}
+
+
+static Boolean IsObjectAppropriateForFieldValue (Uint1 choice, Pointer data, FieldTypePtr field)
+{
+ SeqFeatPtr sfp;
+ SeqDescrPtr sdp;
+ FeatureFieldPtr fp;
+ Boolean rval = FALSE;
+
+ if (data == NULL || field == NULL) return FALSE;
+
+ switch (field->choice) {
+ case FieldType_source_qual :
+ if (choice == OBJ_SEQFEAT) {
+ sfp = (SeqFeatPtr) data;
+ if (sfp->data.choice == SEQFEAT_BIOSRC) {
+ rval = TRUE;
+ }
+ } else if (choice == OBJ_SEQDESC) {
+ sdp = (SeqDescrPtr) data;
+ if (sdp->choice == Seq_descr_source) {
+ rval = TRUE;
+ }
+ }
+ break;
+ case FieldType_feature_field :
+ if (choice == OBJ_SEQFEAT) {
+ sfp = (SeqFeatPtr) data;
+ fp = (FeatureFieldPtr) field->data.ptrvalue;
+ if (fp != NULL && (fp->type == Feature_type_any || GetFeatdefFromFeatureType (fp->type) == sfp->idx.subtype)) {
+ rval = TRUE;
+ }
+ }
+ break;
+ case FieldType_cds_gene_prot :
+ if (choice == 0) {
+ rval = TRUE;
+ }
+ break;
+ case FieldType_molinfo_field :
+ if (choice == OBJ_BIOSEQ) {
+ rval = TRUE;
+ }
+ break;
+ }
+ return rval;
+}
+
+
+static Boolean IsObjectAppropriateForFieldPair (Uint1 choice, Pointer data, FieldPairTypePtr fieldpair)
+{
+ FieldTypePtr f;
+ Boolean rval;
+
+ f = GetFromFieldFromFieldPair(fieldpair);
+ rval = IsObjectAppropriateForFieldValue(choice, data, f);
+ f = FieldTypeFree (f);
+ return rval;
+}
+
+
+static Boolean DoFieldTypesMatch (FieldTypePtr field1, FieldTypePtr field2)
+{
+ Boolean rval = FALSE;
+ SourceQualChoicePtr scp1, scp2;
+ FeatureFieldPtr fp1, fp2;
+
+ if (field1 == NULL || field2 == NULL) return FALSE;
+ if (field1->choice != field2->choice) return FALSE;
+
+ switch (field1->choice) {
+ case FieldType_source_qual :
+ scp1 = (SourceQualChoicePtr) field1->data.ptrvalue;
+ scp2 = (SourceQualChoicePtr) field2->data.ptrvalue;
+ if (scp1 != NULL && scp2 != NULL && scp1->choice == scp2->choice) {
+ switch (scp1->choice) {
+ case SourceQualChoice_textqual:
+ if (scp1->data.intvalue == scp2->data.intvalue) {
+ rval = TRUE;
+ }
+ break;
+ case SourceQualChoice_location:
+ case SourceQualChoice_origin:
+ rval = TRUE;
+ break;
+ }
+ }
+ break;
+ case FieldType_feature_field :
+ fp1 = (FeatureFieldPtr) field1->data.ptrvalue;
+ fp2 = (FeatureFieldPtr) field2->data.ptrvalue;
+ if (fp1 != NULL && fp2 != NULL
+ && (fp1->type == fp2->type || fp1->type == Feature_type_any || fp2->type == Feature_type_any)
+ && fp1->field != NULL && fp2->field != NULL
+ && fp1->field->choice == FeatQualChoice_legal_qual && fp2->field->choice == FeatQualChoice_legal_qual
+ && fp1->field->data.intvalue == fp2->field->data.intvalue) {
+ rval = TRUE;
+ }
+ break;
+ case FieldType_cds_gene_prot :
+ if (field1->data.intvalue == field2->data.intvalue) {
+ rval = TRUE;
+ }
+ break;
+ }
+ return rval;
+}
+
+
+static Boolean IsNonTextSourceQualPresent (BioSourcePtr biop, Int4 srcqual)
+{
+ Int4 orgmod_subtype, subsrc_subtype;
+ OrgModPtr mod;
+ SubSourcePtr ssp;
+ Boolean rval = FALSE;
+
+ if (biop == NULL) return FALSE;
+
+ orgmod_subtype = GetOrgModQualFromSrcQual (srcqual);
+ if (orgmod_subtype == -1) {
+ subsrc_subtype = GetSubSrcQualFromSrcQual (srcqual);
+ for (ssp = biop->subtype; ssp != NULL && !rval; ssp = ssp->next) {
+ if (ssp->subtype == subsrc_subtype) {
+ rval = TRUE;
+ }
+ }
+ } else {
+ if (biop->org != NULL && biop->org->orgname != NULL) {
+ for (mod = biop->org->orgname->mod; mod != NULL && !rval; mod = mod->next) {
+ if (mod->subtype == orgmod_subtype) {
+ rval = TRUE;
+ }
+ }
+ }
+ }
+ return rval;
+}
+
+
+static Boolean IsSourceQualPresent (BioSourcePtr biop, SourceQualChoicePtr scp)
+{
+ Boolean rval = FALSE;
+ CharPtr str;
+
+ if (biop == NULL) return FALSE;
+ if (scp == NULL) return TRUE;
+
+ switch (scp->choice) {
+ case SourceQualChoice_textqual:
+ if (IsNonTextSourceQual (scp->data.intvalue)) {
+ rval = IsNonTextSourceQualPresent (biop, scp->data.intvalue);
+ } else {
+ str = GetSourceQualFromBioSource (biop, scp, NULL);
+ if (!StringHasNoText (str)) {
+ rval = TRUE;
+ }
+ str = MemFree (str);
+ }
+ break;
+ case SourceQualChoice_location:
+ if (biop->genome != 0) {
+ rval = TRUE;
+ }
+ break;
+ case SourceQualChoice_origin:
+ if (biop->origin != 0) {
+ rval = TRUE;
+ }
+ break;
+ }
+ return rval;
+}
+
+
+typedef struct objecthasstring
+{
+ StringConstraintPtr scp;
+ Boolean found;
+} ObjectHasStringData, PNTR ObjectHasStringPtr;
+
+
+static void LIBCALLBACK AsnWriteConstraintCallBack (AsnExpOptStructPtr pAEOS)
+
+{
+ CharPtr pchSource;
+ ObjectHasStringPtr ohsp;
+
+ ohsp = (ObjectHasStringPtr) pAEOS->data;
+ if (ISA_STRINGTYPE (AsnFindBaseIsa (pAEOS->atp)))
+ {
+ pchSource = (CharPtr) pAEOS->dvp->ptrvalue;
+ ohsp->found |= DoesSingleStringMatchConstraint (pchSource, ohsp->scp);
+ }
+}
+
+
+static Boolean DoesObjectMatchStringConstraint (Uint1 choice, Pointer data, StringConstraintPtr scp)
+
+{
+ ObjMgrPtr omp;
+ ObjMgrTypePtr omtp;
+ AsnIoPtr aip;
+ AsnExpOptPtr aeop;
+ ObjectHasStringData ohsd;
+ SeqFeatPtr sfp, prot;
+ SeqMgrFeatContext fcontext;
+ CharPtr search_txt;
+ CGPSetPtr c;
+ ValNodePtr vnp;
+ Boolean all_match = TRUE, any_match = FALSE, rval;
+ BioseqPtr protbsp;
+
+ if (data == NULL) return FALSE;
+ if (scp == NULL) return TRUE;
+
+ if (choice == 0) {
+ /* CDS-Gene-Prot set */
+ c = (CGPSetPtr) data;
+ for (vnp = c->gene_list; vnp != NULL && (!any_match || all_match); vnp = vnp->next) {
+ if (DoesObjectMatchStringConstraint (OBJ_SEQFEAT, vnp->data.ptrvalue, scp)) {
+ any_match = TRUE;
+ } else {
+ all_match = FALSE;
+ }
+ }
+ for (vnp = c->cds_list; vnp != NULL && (!any_match || all_match); vnp = vnp->next) {
+ if (DoesObjectMatchStringConstraint (OBJ_SEQFEAT, vnp->data.ptrvalue, scp)) {
+ any_match = TRUE;
+ } else {
+ all_match = FALSE;
+ }
+ }
+ for (vnp = c->mrna_list; vnp != NULL && (!any_match || all_match); vnp = vnp->next) {
+ if (DoesObjectMatchStringConstraint (OBJ_SEQFEAT, vnp->data.ptrvalue, scp)) {
+ any_match = TRUE;
+ } else {
+ all_match = FALSE;
+ }
+ }
+ for (vnp = c->prot_list; vnp != NULL && (!any_match || all_match); vnp = vnp->next) {
+ if (DoesObjectMatchStringConstraint (OBJ_SEQFEAT, vnp->data.ptrvalue, scp)) {
+ any_match = TRUE;
+ } else {
+ all_match = FALSE;
+ }
+ }
+ if (scp->not_present) {
+ rval = all_match;
+ } else {
+ rval = any_match;
+ }
+ } else {
+ omp = ObjMgrGet ();
+ omtp = ObjMgrTypeFind (omp, choice, NULL, NULL);
+ if (omtp == NULL) return FALSE;
+ aip = AsnIoNullOpen ();
+ aeop = AsnExpOptNew (aip, NULL, NULL, AsnWriteConstraintCallBack);
+ ohsd.found = FALSE;
+ ohsd.scp = scp;
+ if (aeop != NULL) {
+ aeop->user_data = (Pointer) &ohsd;
+ }
+
+ (omtp->asnwrite) (data, aip, NULL);
+
+ if (!ohsd.found && omtp->datatype == OBJ_SEQFEAT)
+ {
+ sfp = (SeqFeatPtr) data;
+ if (sfp->data.choice == SEQFEAT_CDREGION) {
+ protbsp = BioseqFindFromSeqLoc (sfp->product);
+ prot = SeqMgrGetNextFeature (protbsp, NULL, 0, FEATDEF_PROT, &fcontext);
+ if (prot != NULL) {
+ (omtp->asnwrite) (prot, aip, NULL);
+ }
+ } else {
+ if (SeqMgrFeaturesAreIndexed(sfp->idx.entityID) == 0) {
+ SeqMgrIndexFeatures (sfp->idx.entityID, NULL);
+ }
+ if (sfp->idx.subtype == FEATDEF_tRNA) {
+ sfp = SeqMgrGetDesiredFeature (sfp->idx.entityID, NULL, sfp->idx.itemID, 0, sfp, &fcontext);
+ ohsd.found = DoesSingleStringMatchConstraint (fcontext.label, ohsd.scp);
+ if (!ohsd.found && sfp != NULL && sfp->idx.subtype == FEATDEF_tRNA)
+ {
+ search_txt = (CharPtr) MemNew ((StringLen (fcontext.label) + 6) * sizeof (Char));
+ if (search_txt != NULL)
+ {
+ sprintf (search_txt, "tRNA-%s", fcontext.label);
+ ohsd.found = DoesSingleStringMatchConstraint (search_txt, ohsd.scp);
+ search_txt = MemFree (search_txt);
+ }
+ }
+ }
+ }
+ }
+ AsnIoClose (aip);
+ if (scp->not_present) {
+ rval = !ohsd.found;
+ } else {
+ rval = ohsd.found;
+ }
+ }
+ return rval;
+}
+
+
+NLM_EXTERN Boolean IsSourceConstraintEmpty (SourceConstraintPtr scp)
+{
+ if (scp == NULL) return TRUE;
+
+ if (scp->field1 == NULL
+ && scp->field2 == NULL
+ && IsStringConstraintEmpty(scp->constraint)) {
+ return TRUE;
+ } else {
+ return FALSE;
+ }
+}
+
+NLM_EXTERN Boolean DoesBiosourceMatchConstraint (BioSourcePtr biop, SourceConstraintPtr scp)
+{
+ Boolean rval = FALSE;
+ CharPtr str1, str2;
+ ValNode vn;
+
+ if (biop == NULL) return FALSE;
+ if (scp == NULL) return TRUE;
+
+ if (IsStringConstraintEmpty(scp->constraint)) {
+ /* looking for qual present */
+ if (scp->field1 != NULL && scp->field2 == NULL) {
+ rval = IsSourceQualPresent (biop, scp->field1);
+ } else if (scp->field2 != NULL && scp->field1 == NULL) {
+ rval = IsSourceQualPresent (biop, scp->field2);
+ /* looking for quals to match */
+ } else if (scp->field1 != NULL && scp->field2 != NULL) {
+ str1 = GetSourceQualFromBioSource (biop, scp->field1, NULL);
+ str2 = GetSourceQualFromBioSource (biop, scp->field2, NULL);
+ if (StringCmp (str1, str2) == 0) {
+ rval = TRUE;
+ }
+ str1 = MemFree (str1);
+ str2 = MemFree (str2);
+ } else {
+ /* nothing specified, automatic match */
+ rval = TRUE;
+ }
+ } else {
+ if (scp->field1 != NULL && scp->field2 == NULL) {
+ str1 = GetSourceQualFromBioSource (biop, scp->field1, scp->constraint);
+ if (str1 == NULL) {
+ if (scp->constraint->not_present) {
+ str1 = GetSourceQualFromBioSource (biop, scp->field1, NULL);
+ if (str1 == NULL) {
+ rval = TRUE;
+ }
+ }
+ } else if (!StringHasNoText (str1)) {
+ rval = TRUE;
+ }
+ str1 = MemFree (str1);
+ } else if (scp->field2 != NULL && scp->field1 == NULL) {
+ str2 = GetSourceQualFromBioSource (biop, scp->field2, scp->constraint);
+ if (str2 == NULL) {
+ if (scp->constraint->not_present) {
+ str2 = GetSourceQualFromBioSource (biop, scp->field2, NULL);
+ if (str2 == NULL) {
+ rval = TRUE;
+ }
+ }
+ } else if (!StringHasNoText (str2)) {
+ rval = TRUE;
+ }
+ str2 = MemFree (str2);
+ } else if (scp->field1 != NULL && scp->field2 != NULL) {
+ str1 = GetSourceQualFromBioSource (biop, scp->field1, scp->constraint);
+ str2 = GetSourceQualFromBioSource (biop, scp->field2, scp->constraint);
+ if (StringCmp (str1, str2) == 0) {
+ rval = TRUE;
+ }
+ str1 = MemFree (str1);
+ str2 = MemFree (str2);
+ } else {
+ /* generic string constraint */
+ vn.choice = Seq_descr_source;
+ vn.next = NULL;
+ vn.extended = 0;
+ vn.data.ptrvalue = biop;
+ rval = DoesObjectMatchStringConstraint (OBJ_SEQDESC, &vn, scp->constraint);
+ }
+ }
+ return rval;
+}
+
+
+static Boolean DoesCGPSetMatchPseudoConstraint (CGPSetPtr c, CDSGeneProtPseudoConstraintPtr constraint)
+{
+ Boolean any_pseudo = FALSE;
+ ValNodePtr vnp;
+ SeqFeatPtr sfp;
+ Boolean rval = FALSE;
+
+ if (c == NULL) return FALSE;
+ if (constraint == NULL) return TRUE;
+
+ switch (constraint->feature) {
+ case CDSGeneProt_feature_type_constraint_gene :
+ for (vnp = c->gene_list; vnp != NULL && !any_pseudo; vnp = vnp->next) {
+ sfp = (SeqFeatPtr) vnp->data.ptrvalue;
+ if (sfp != NULL && sfp->pseudo) {
+ any_pseudo = TRUE;
+ }
+ }
+ break;
+ case CDSGeneProt_feature_type_constraint_mRNA :
+ for (vnp = c->mrna_list; vnp != NULL && !any_pseudo; vnp = vnp->next) {
+ sfp = (SeqFeatPtr) vnp->data.ptrvalue;
+ if (sfp != NULL && sfp->pseudo) {
+ any_pseudo = TRUE;
+ }
+ }
+ break;
+ case CDSGeneProt_feature_type_constraint_cds :
+ for (vnp = c->mrna_list; vnp != NULL && !any_pseudo; vnp = vnp->next) {
+ sfp = (SeqFeatPtr) vnp->data.ptrvalue;
+ if (sfp != NULL && sfp->pseudo) {
+ any_pseudo = TRUE;
+ }
+ }
+ break;
+ case CDSGeneProt_feature_type_constraint_prot :
+ for (vnp = c->mrna_list; vnp != NULL && !any_pseudo; vnp = vnp->next) {
+ sfp = (SeqFeatPtr) vnp->data.ptrvalue;
+ if (sfp != NULL && sfp->pseudo && sfp->idx.subtype == FEATDEF_PROT) {
+ any_pseudo = TRUE;
+ }
+ }
+ break;
+ case CDSGeneProt_feature_type_constraint_mat_peptide :
+ for (vnp = c->mrna_list; vnp != NULL && !any_pseudo; vnp = vnp->next) {
+ sfp = (SeqFeatPtr) vnp->data.ptrvalue;
+ if (sfp != NULL && sfp->pseudo && sfp->idx.subtype == FEATDEF_mat_peptide_aa) {
+ any_pseudo = TRUE;
+ }
+ }
+ break;
+ }
+
+ if ((any_pseudo && constraint->is_pseudo)
+ || (!any_pseudo && !constraint->is_pseudo)) {
+ rval = TRUE;
+ }
+ return rval;
+}
+
+
+NLM_EXTERN Boolean IsCDSGeneProtQualConstraintEmpty (CDSGeneProtQualConstraintPtr constraint)
+{
+ if (constraint == NULL) return TRUE;
+ if (constraint->field1 == NULL && constraint->field2 == NULL && IsStringConstraintEmpty (constraint->constraint)) {
+ return TRUE;
+ } else {
+ return FALSE;
+ }
+}
+
+
+static Boolean DoesCGPSetMatchQualConstraint (CGPSetPtr c, CDSGeneProtQualConstraintPtr constraint)
+{
+ Boolean rval = FALSE, any_match = FALSE, all_match = TRUE;
+ CharPtr str, str1, str2;
+
+ if (c == NULL) return FALSE;
+ if (constraint == NULL) return TRUE;
+
+ if (IsStringConstraintEmpty (constraint->constraint)) {
+ /* looking for qual present */
+ if (constraint->field1 != NULL && constraint->field2 == NULL) {
+ str = GetFieldValueFromCGPSet (c, constraint->field1->data.intvalue, NULL);
+ if (str != NULL) {
+ rval = TRUE;
+ str = MemFree (str);
+ }
+ } else if (constraint->field2 != NULL && constraint->field1 == NULL) {
+ str = GetFieldValueFromCGPSet (c, constraint->field2->data.intvalue, NULL);
+ if (str == NULL) {
+ rval = FALSE;
+ } else {
+ str = MemFree (str);
+ }
+ /* looking for quals to match */
+ } else if (constraint->field1 != NULL && constraint->field2 != NULL) {
+ str1 = GetFieldValueFromCGPSet (c, constraint->field1->data.intvalue, NULL);
+ str2 = GetFieldValueFromCGPSet (c, constraint->field2->data.intvalue, NULL);
+ if (StringCmp (str1, str2) == 0) {
+ rval = TRUE;
+ }
+ str1 = MemFree (str1);
+ str2 = MemFree (str2);
+ } else {
+ /* nothing specified, automatic match */
+ rval = TRUE;
+ }
+ } else {
+ if (constraint->field1 != NULL && constraint->field2 == NULL) {
+ str1 = GetFieldValueFromCGPSet (c, constraint->field1->data.intvalue, constraint->constraint);
+ if (str1 == NULL) {
+ if (constraint->constraint->not_present) {
+ str1 = GetFieldValueFromCGPSet (c, constraint->field1->data.intvalue, NULL);
+ if (str1 == NULL) {
+ rval = TRUE;
+ }
+ }
+ } else if (!StringHasNoText (str1)) {
+ rval = TRUE;
+ }
+ str1 = MemFree (str1);
+ } else if (constraint->field2 != NULL && constraint->field1 == NULL) {
+ str2 = GetFieldValueFromCGPSet (c, constraint->field2->data.intvalue, constraint->constraint);
+ if (str2 == NULL) {
+ if (constraint->constraint->not_present) {
+ str2 = GetFieldValueFromCGPSet (c, constraint->field2->data.intvalue, NULL);
+ if (str2 == NULL) {
+ rval = TRUE;
+ }
+ }
+ } else if (!StringHasNoText (str2)) {
+ rval = TRUE;
+ }
+ str2 = MemFree (str2);
+ } else if (constraint->field1 != NULL && constraint->field2 != NULL) {
+ str1 = GetFieldValueFromCGPSet (c, constraint->field1->data.intvalue, constraint->constraint);
+ str2 = GetFieldValueFromCGPSet (c, constraint->field2->data.intvalue, constraint->constraint);
+ if (StringCmp (str1, str2) == 0) {
+ rval = TRUE;
+ }
+ str1 = MemFree (str1);
+ str2 = MemFree (str2);
+ } else {
+ /* generic string constraint */
+ rval = DoesObjectMatchStringConstraint (0, c, constraint->constraint);
+ }
+ }
+ return rval;
+}
+
+
+NLM_EXTERN Boolean IsSequenceConstraintEmpty (SequenceConstraintPtr constraint)
+{
+ if (constraint == NULL) return TRUE;
+ if (constraint->seqtype != NULL && constraint->seqtype->choice != SequenceConstraintMolTypeConstraint_any) return FALSE;
+ if (constraint->feature != Feature_type_any) return FALSE;
+ if (!IsStringConstraintEmpty (constraint->id)) return FALSE;
+ return TRUE;
+}
+
+
+extern Boolean DoesSeqIDListMeetStringConstraint (SeqIdPtr sip, StringConstraintPtr string_constraint)
+{
+ Char id [41];
+ CharPtr cp, cp_dst;
+ SeqIdPtr tmp;
+ Boolean match, changed;
+
+ if (sip == NULL)
+ {
+ return FALSE;
+ }
+ if (string_constraint == NULL)
+ {
+ return TRUE;
+ }
+
+ while (sip != NULL)
+ {
+ /* temporary disconnect ID from list */
+ tmp = sip->next;
+ sip->next = NULL;
+ id [0] = '\0';
+ SeqIdWrite (sip, id, PRINTID_FASTA_LONG, sizeof (id) - 1);
+ match = DoesSingleStringMatchConstraint (id, string_constraint);
+ if (!match)
+ {
+ changed = FALSE;
+ /* remove terminating pipe character */
+ if (id[StringLen(id) - 1] == '|')
+ {
+ id[StringLen(id) - 1] = 0;
+ changed = TRUE;
+ }
+ /* remove leading pipe identifier */
+ cp = StringChr (id, '|');
+ if (cp != NULL)
+ {
+ changed = TRUE;
+ cp++;
+ cp_dst = id;
+ while (*cp != 0)
+ {
+ *cp_dst = *cp;
+ cp_dst++;
+ cp++;
+ }
+ *cp_dst = 0;
+ }
+ if (changed)
+ {
+ match = DoesSingleStringMatchConstraint (id, string_constraint);
+ }
+
+ /* if search text doesn't have ., try ID without version */
+ if (!match && StringChr (string_constraint->match_text, '.') == NULL)
+ {
+ cp = StringChr (id, '.');
+ if (cp != NULL)
+ {
+ *cp = 0;
+ match = DoesSingleStringMatchConstraint (id, string_constraint);
+ }
+ }
+ }
+ sip->next = tmp;
+
+ if (match)
+ {
+ if (string_constraint->not_present)
+ {
+ return FALSE;
+ }
+ else
+ {
+ return TRUE;
+ }
+ }
+ sip = sip->next;
+ }
+ if (string_constraint->not_present)
+ {
+ return TRUE;
+ }
+ else
+ {
+ return FALSE;
+ }
+}
+
+
+typedef struct rnatypebiomol {
+ Int4 rnatype;
+ Uint1 biomol;
+ CharPtr rnamolname;
+} RnaTypeBiomolData, PNTR RnaTypeBiomolPtr;
+
+static RnaTypeBiomolData rna_type_biomol[] = {
+{ Sequence_constraint_rnamol_genomic , MOLECULE_TYPE_GENOMIC, "Genomic RNA" } ,
+{ Sequence_constraint_rnamol_precursor_RNA , MOLECULE_TYPE_PRE_MRNA , "Precursor RNA" } ,
+{ Sequence_constraint_rnamol_mRNA , MOLECULE_TYPE_MRNA , "mRNA [cDNA]" } ,
+{ Sequence_constraint_rnamol_rRNA , MOLECULE_TYPE_RRNA , "Ribosomal RNA" } ,
+{ Sequence_constraint_rnamol_tRNA , MOLECULE_TYPE_TRNA , "Transfer RNA" } ,
+{ Sequence_constraint_rnamol_snRNA , MOLECULE_TYPE_SNRNA , "Small nuclear RNA" } ,
+{ Sequence_constraint_rnamol_scRNA , MOLECULE_TYPE_SCRNA , "Small cytoplasmic RNA" } ,
+{ Sequence_constraint_rnamol_genomic_mRNA , MOLECULE_TYPE_GENOMIC_MRNA_MIX , "Genomic-mRNA" } ,
+{ Sequence_constraint_rnamol_cRNA , MOLECULE_TYPE_CRNA , "cRNA" } ,
+{ Sequence_constraint_rnamol_snoRNA , MOLECULE_TYPE_SNORNA , "Small nucleolar RNA" } ,
+{ Sequence_constraint_rnamol_transcribed_RNA , MOLECULE_TYPE_TRANSCRIBED_RNA , "Transcribed RNA" } ,
+{ Sequence_constraint_rnamol_ncRNA , MOLECULE_TYPE_NCRNA , "Non-coding RNA" } ,
+{ Sequence_constraint_rnamol_transfer_messenger_RNA , MOLECULE_TYPE_TMRNA , "Transfer-messenger RNA" } } ;
+
+#define NUM_rna_type_biomol sizeof (rna_type_biomol) / sizeof (RnaTypeBiomolData)
+
+
+NLM_EXTERN Uint1 GetBiomolForRnaType (Int4 rnatype)
+{
+ Int4 i;
+
+ for (i = 0; i < NUM_rna_type_biomol; i++) {
+ if (rna_type_biomol[i].rnatype == rnatype) {
+ return rna_type_biomol[i].biomol;
+ }
+ }
+ return 0;
+}
+
+
+NLM_EXTERN CharPtr GetBiomolNameForRnaType (Int4 rnatype)
+{
+ Int4 i;
+
+ for (i = 0; i < NUM_rna_type_biomol; i++) {
+ if (rna_type_biomol[i].rnatype == rnatype) {
+ return rna_type_biomol[i].rnamolname;
+ }
+ }
+ return "invalid RNA type";
+}
+
+NLM_EXTERN void AddAllRNASubtypesToChoiceList (ValNodePtr PNTR field_list)
+{
+ Int4 i;
+
+ if (field_list == NULL) return;
+
+ ValNodeAddPointer (field_list, Sequence_constraint_rnamol_any, StringSave ("Any RNA"));
+ for (i = 0; i < NUM_rna_type_biomol; i++) {
+ ValNodeAddPointer (field_list, rna_type_biomol[i].rnatype, StringSave (rna_type_biomol[i].rnamolname));
+ }
+}
+
+
+static Boolean DoesSequenceMatchSequenceConstraint (BioseqPtr bsp, SequenceConstraintPtr constraint)
+{
+ SeqFeatPtr sfp;
+ SeqMgrFeatContext fcontext;
+ SeqDescrPtr sdp;
+ SeqMgrDescContext dcontext;
+ MolInfoPtr mip;
+
+ if (bsp == NULL) return FALSE;
+ if (IsSequenceConstraintEmpty (constraint)) return TRUE;
+
+ if (constraint->seqtype != NULL && constraint->seqtype->choice != SequenceConstraintMolTypeConstraint_any) {
+ switch (constraint->seqtype->choice) {
+ case SequenceConstraintMolTypeConstraint_nucleotide :
+ if (ISA_aa (bsp->mol)) {
+ return FALSE;
+ }
+ break;
+ case SequenceConstraintMolTypeConstraint_dna :
+ if (bsp->mol != Seq_mol_dna) {
+ return FALSE;
+ }
+ break;
+ case SequenceConstraintMolTypeConstraint_rna :
+ if (bsp->mol != Seq_mol_rna) {
+ return FALSE;
+ }
+ if (constraint->seqtype->data.intvalue != Sequence_constraint_rnamol_any) {
+ sdp = SeqMgrGetNextDescriptor (bsp, NULL, Seq_descr_molinfo, &dcontext);
+ if (sdp == NULL || sdp->data.ptrvalue == NULL || sdp->choice != Seq_descr_molinfo) {
+ return FALSE;
+ }
+ mip = (MolInfoPtr) sdp->data.ptrvalue;
+ if (GetBiomolForRnaType (constraint->seqtype->data.intvalue) != mip->biomol) {
+ return FALSE;
+ }
+ }
+ break;
+ case SequenceConstraintMolTypeConstraint_protein :
+ if (!ISA_aa (bsp->mol)) {
+ return FALSE;
+ }
+ break;
+ }
+ }
+
+ if (constraint->feature != Feature_type_any) {
+ sfp = SeqMgrGetNextFeature (bsp, NULL, 0, GetFeatdefFromFeatureType (constraint->feature), &fcontext);
+ if (sfp == NULL) {
+ return FALSE;
+ }
+ }
+
+ if (!IsStringConstraintEmpty (constraint->id) && !DoesSeqIDListMeetStringConstraint (bsp->id, constraint->id)) {
+ return FALSE;
+ }
+ return TRUE;
+}
+
+static Boolean DoesSequenceInSetMatchSequenceConstraint (BioseqSetPtr bssp, SequenceConstraintPtr constraint)
+{
+ Boolean rval = FALSE;
+ SeqEntryPtr sep;
+
+ if (bssp == NULL) return FALSE;
+ if (IsSequenceConstraintEmpty (constraint)) return TRUE;
+
+ for (sep = bssp->seq_set; sep != NULL && !rval; sep = sep->next) {
+ if (IS_Bioseq (sep)) {
+ rval = DoesSequenceMatchSequenceConstraint ((BioseqPtr) sep->data.ptrvalue, constraint);
+ } else if (IS_Bioseq_set (sep)) {
+ rval = DoesSequenceInSetMatchSequenceConstraint ((BioseqSetPtr) sep->data.ptrvalue, constraint);
+ }
+ }
+ return rval;
+}
+
+
+static Boolean DoesObjectMatchSequenceConstraint (Uint1 choice, Pointer data, SequenceConstraintPtr constraint)
+{
+ BioseqPtr bsp;
+ SeqDescrPtr sdp;
+ ObjValNodePtr ovp;
+ Boolean rval = FALSE;
+
+ if (data == NULL) return FALSE;
+ if (IsSequenceConstraintEmpty (constraint)) return TRUE;
+
+ bsp = GetSequenceForObject (choice, data);
+ if (bsp == NULL) {
+ if (choice == OBJ_SEQDESC) {
+ sdp = (SeqDescrPtr) data;
+ if (sdp->extended) {
+ ovp = (ObjValNodePtr) sdp;
+ if (ovp->idx.parenttype == OBJ_BIOSEQSET && ovp->idx.parentptr != NULL) {
+ rval = DoesSequenceInSetMatchSequenceConstraint ((BioseqSetPtr) ovp->idx.parentptr, constraint);
+ }
+ }
+ }
+ } else {
+ rval = DoesSequenceMatchSequenceConstraint (bsp, constraint);
+ }
+ return rval;
+}
+
+
+static Boolean DoesObjectMatchConstraint (Uint1 choice, Pointer data, ConstraintChoicePtr constraint)
+{
+ Boolean rval = TRUE;
+
+ if (data == NULL) return FALSE;
+ if (constraint == NULL) return TRUE;
+
+ switch (constraint->choice) {
+ case ConstraintChoice_string :
+ rval = DoesObjectMatchStringConstraint (choice, data, constraint->data.ptrvalue);
+ break;
+ case ConstraintChoice_location :
+ rval = DoesObjectMatchLocationConstraint (choice, data, constraint->data.ptrvalue);
+ break;
+ case ConstraintChoice_source :
+ rval = DoesBiosourceMatchConstraint (GetBioSourceFromObject (choice, data), constraint->data.ptrvalue);
+ break;
+ case ConstraintChoice_cdsgeneprot_qual :
+ if (choice == 0) {
+ rval = DoesCGPSetMatchQualConstraint (data, constraint->data.ptrvalue);
+ } else {
+ rval = FALSE;
+ }
+ break;
+ case ConstraintChoice_cdsgeneprot_pseudo :
+ if (choice == 0) {
+ rval = DoesCGPSetMatchPseudoConstraint (data, constraint->data.ptrvalue);
+ } else {
+ rval = FALSE;
+ }
+ break;
+ case ConstraintChoice_sequence :
+ rval = DoesObjectMatchSequenceConstraint (choice, data, constraint->data.ptrvalue);
+ break;
+ }
+ return rval;
+}
+
+
+static Boolean DoesObjectMatchConstraintChoiceSet (Uint1 choice, Pointer data, ConstraintChoiceSetPtr csp)
+{
+ Boolean rval = TRUE;
+
+ if (data == NULL) return FALSE;
+
+ while (csp != NULL && rval) {
+ rval = DoesObjectMatchConstraint (choice, data, csp);
+ csp = csp->next;
+ }
+ return rval;
+}
+
+
+NLM_EXTERN StringConstraintPtr FindStringConstraintInConstraintSetForField (FieldTypePtr field, ConstraintChoiceSetPtr csp)
+{
+ StringConstraintPtr scp = NULL;
+ ConstraintChoicePtr constraint;
+ SourceConstraintPtr source_constraint;
+ CDSGeneProtQualConstraintPtr cgp_constraint;
+
+ while (csp != NULL) {
+ constraint = (ConstraintChoicePtr) csp->data.ptrvalue;
+ switch (constraint->choice) {
+ case ConstraintChoice_string :
+ scp = constraint->data.ptrvalue;
+ break;
+ case ConstraintChoice_source :
+ source_constraint = (SourceConstraintPtr) constraint->data.ptrvalue;
+ if (source_constraint != NULL && source_constraint->constraint != NULL
+ && ((source_constraint->field1 != NULL
+ && DoFieldTypesMatch (field, source_constraint->field1))
+ || (source_constraint->field2 != NULL
+ && DoFieldTypesMatch (field, source_constraint->field2)))) {
+ scp = source_constraint->constraint;
+ }
+ break;
+ case ConstraintChoice_cdsgeneprot_qual :
+ cgp_constraint = (CDSGeneProtQualConstraintPtr) field->data.ptrvalue;
+ if (field->choice == FieldType_cds_gene_prot
+ && cgp_constraint != NULL && cgp_constraint->constraint != NULL
+ && ((cgp_constraint->field1 != NULL && cgp_constraint->field1->data.intvalue == field->data.intvalue)
+ || (cgp_constraint->field2 != NULL && cgp_constraint->field2->data.intvalue == field->data.intvalue))) {
+ scp = cgp_constraint->constraint;
+ }
+ break;
+ }
+ csp = csp->next;
+ }
+ return scp;
+}
+
+
+NLM_EXTERN StringConstraintPtr FindStringConstraintInConstraintSetForFieldPair (FieldPairTypePtr fieldpair, ConstraintChoiceSetPtr csp)
+{
+ StringConstraintPtr scp;
+ FieldTypePtr f;
+
+ f = GetFromFieldFromFieldPair (fieldpair);
+ scp = FindStringConstraintInConstraintSetForField (f, csp);
+ f = FieldTypeFree (f);
+ return scp;
+}
+
+
+NLM_EXTERN StringConstraintPtr StringConstraintFromFieldEdit (FieldEditPtr edit)
+{
+ StringConstraintPtr scp;
+
+ if (edit == NULL || edit->find_txt == NULL) return NULL;
+ scp = StringConstraintNew ();
+ scp->match_text = StringSave (edit->find_txt);
+
+ switch (edit->location) {
+ case Field_edit_location_anywhere :
+ scp->match_location = String_location_contains;
+ break;
+ case Field_edit_location_beginning :
+ scp->match_location = String_location_starts;
+ break;
+ case Field_edit_location_end :
+ scp->match_location = String_location_ends;
+ break;
+ }
+
+ scp->case_sensitive = TRUE;
+ scp->whole_word = FALSE;
+ scp->not_present = FALSE;
+
+ return scp;
+}
+
+
+static CharPtr ApplyEditToString (CharPtr str, FieldEditPtr edit)
+{
+ CharPtr cp_found, new_str;
+ Int4 found_len, replace_len, new_len;
+
+ if (edit == NULL) return StringSave (str);
+
+ str = StringSave (str);
+ cp_found = StringISearch (str, edit->find_txt);
+
+ found_len = StringLen (edit->find_txt);
+ replace_len = StringLen (edit->repl_txt);
+ if (edit->location == Field_edit_location_beginning
+ && cp_found != str) {
+ cp_found = NULL;
+ }
+ while (cp_found != NULL)
+ {
+ if (edit->location == Field_edit_location_end
+ && cp_found != str + StringLen (str) - found_len) {
+ cp_found = StringISearch (cp_found + found_len, edit->find_txt);
+ } else {
+ new_len = StringLen (str) + 1 - found_len + replace_len;
+ new_str = (CharPtr) MemNew (new_len * sizeof (Char));
+ if (new_str != NULL)
+ {
+ if (cp_found != str)
+ {
+ StringNCpy (new_str, str, cp_found - str);
+ }
+ StringCat (new_str, edit->repl_txt);
+ StringCat (new_str, cp_found + found_len);
+ cp_found = new_str + (cp_found - str) + replace_len;
+ str = MemFree (str);
+ str = new_str;
+ }
+ cp_found = StringISearch (cp_found, edit->find_txt);
+ }
+ }
+ return str;
+}
+
+
+typedef struct objectcollection {
+ AECRActionPtr action;
+ ValNodePtr object_list;
+} ObjectCollectionData, PNTR ObjectCollectionPtr;
+
+
+static void AECRActionObjectCollectionItemCallback (Uint1 objecttype, Pointer objectdata, ObjectCollectionPtr o)
+{
+ ApplyActionPtr a;
+ EditActionPtr e;
+ ConvertActionPtr v;
+ CopyActionPtr c;
+ SwapActionPtr s;
+ RemoveActionPtr r;
+ AECRParseActionPtr p;
+ CharPtr str, portion;
+ StringConstraintPtr scp;
+ FieldTypePtr field_from = NULL, field_to = NULL;
+
+ if (objectdata == NULL || o == NULL) return;
+
+ /* check to make sure object is appropriate for field and meets filter */
+ switch (o->action->action->choice) {
+ case ActionChoice_apply :
+ a = (ApplyActionPtr) o->action->action->data.ptrvalue;
+ if (a != NULL
+ && IsObjectAppropriateForFieldValue (objecttype, objectdata, a->field)
+ && DoesObjectMatchConstraintChoiceSet (objecttype, objectdata, o->action->constraint)) {
+ ValNodeAddPointer (&(o->object_list), objecttype, objectdata);
+ }
+ break;
+ case ActionChoice_edit :
+ e = (EditActionPtr) o->action->action->data.ptrvalue;
+ if (e != NULL
+ && IsObjectAppropriateForFieldValue (objecttype, objectdata, e->field)
+ && DoesObjectMatchConstraintChoiceSet (objecttype, objectdata, o->action->constraint)) {
+ scp = StringConstraintFromFieldEdit (e->edit);
+ str = GetFieldValueForObject (objecttype, objectdata, e->field, scp);
+ if (!StringHasNoText (str)) {
+ ValNodeAddPointer (&(o->object_list), objecttype, objectdata);
+ }
+ str = MemFree (str);
+ }
+ break;
+ case ActionChoice_convert :
+ v = (ConvertActionPtr) o->action->action->data.ptrvalue;
+ if (v != NULL
+ && (field_from = GetFromFieldFromFieldPair(v->fields)) != NULL
+ && IsObjectAppropriateForFieldValue (objecttype, objectdata, field_from)
+ && DoesObjectMatchConstraintChoiceSet (objecttype, objectdata, o->action->constraint)) {
+ scp = FindStringConstraintInConstraintSetForField (field_from, o->action->constraint);
+ str = GetFieldValueForObject (objecttype, objectdata, field_from, scp);
+ if (!StringHasNoText (str)) {
+ ValNodeAddPointer (&(o->object_list), objecttype, objectdata);
+ }
+ str = MemFree (str);
+ }
+ field_from = FieldTypeFree (field_from);
+ break;
+ case ActionChoice_copy :
+ c = (CopyActionPtr) o->action->action->data.ptrvalue;
+ if (c != NULL
+ && (field_from = GetFromFieldFromFieldPair(c->fields)) != NULL
+ && (field_to = GetFromFieldFromFieldPair(c->fields)) != NULL
+ && IsObjectAppropriateForFieldValue (objecttype, objectdata, field_from)
+ && IsObjectAppropriateForFieldValue (objecttype, objectdata, field_to)
+ && DoesObjectMatchConstraintChoiceSet (objecttype, objectdata, o->action->constraint)) {
+ ValNodeAddPointer (&(o->object_list), objecttype, objectdata);
+ }
+ field_from = FieldTypeFree (field_from);
+ field_to = FieldTypeFree (field_to);
+ break;
+ case ActionChoice_swap :
+ s = (SwapActionPtr) o->action->action->data.ptrvalue;
+ if (s != NULL
+ && (field_from = GetFromFieldFromFieldPair(s->fields)) != NULL
+ && (field_to = GetFromFieldFromFieldPair(s->fields)) != NULL
+ && IsObjectAppropriateForFieldValue (objecttype, objectdata, field_from)
+ && IsObjectAppropriateForFieldValue (objecttype, objectdata, field_to)
+ && DoesObjectMatchConstraintChoiceSet (objecttype, objectdata, o->action->constraint)) {
+ ValNodeAddPointer (&(o->object_list), objecttype, objectdata);
+ }
+ field_from = FieldTypeFree (field_from);
+ field_to = FieldTypeFree (field_to);
+ break;
+ case ActionChoice_remove :
+ r = (RemoveActionPtr) o->action->action->data.ptrvalue;
+ if (r != NULL
+ && IsObjectAppropriateForFieldValue (objecttype, objectdata, r->field)
+ && DoesObjectMatchConstraintChoiceSet (objecttype, objectdata, o->action->constraint)) {
+ ValNodeAddPointer (&(o->object_list), objecttype, objectdata);
+ }
+ break;
+ case ActionChoice_parse :
+ p = (AECRParseActionPtr) o->action->action->data.ptrvalue;
+ if (p != NULL
+ && (field_from = GetFromFieldFromFieldPair(p->fields)) != NULL
+ && (field_to = GetFromFieldFromFieldPair(p->fields)) != NULL
+ && IsObjectAppropriateForFieldValue (objecttype, objectdata, field_from)
+ && IsObjectAppropriateForFieldValue (objecttype, objectdata, field_to)
+ && DoesObjectMatchConstraintChoiceSet (objecttype, objectdata, o->action->constraint)) {
+ scp = FindStringConstraintInConstraintSetForField (field_from, o->action->constraint);
+ str = GetFieldValueForObject (objecttype, objectdata, field_from, scp);
+ portion = GetTextPortionFromString (str, p->portion);
+ if (!StringHasNoText (portion)) {
+ ValNodeAddPointer (&(o->object_list), objecttype, objectdata);
+ }
+ portion = MemFree (portion);
+ str = MemFree (str);
+ }
+ field_from = FieldTypeFree (field_from);
+ field_to = FieldTypeFree (field_to);
+ break;
+ }
+
+}
+
+
+static void AECRActionObjectCollectionFeatureCallback (SeqFeatPtr sfp, Pointer data)
+{
+ ObjectCollectionPtr o;
+ if (sfp == NULL || data == NULL) return;
+
+ o = (ObjectCollectionPtr) data;
+ AECRActionObjectCollectionItemCallback (OBJ_SEQFEAT, sfp, o);
+
+}
+
+
+static void AECRActionObjectCollectionDescriptorCallback (SeqDescrPtr sdp, Pointer data)
+{
+ ObjectCollectionPtr o;
+
+ if (sdp == NULL || data == NULL) return;
+
+ o = (ObjectCollectionPtr) data;
+ AECRActionObjectCollectionItemCallback (OBJ_SEQDESC, sdp, o);
+}
+
+
+static void AECRObjectCollectionBioseqCallback (BioseqPtr bsp, Pointer data)
+{
+ ObjectCollectionPtr o;
+
+ if (bsp == NULL || data == NULL) return;
+
+ o = (ObjectCollectionPtr) data;
+ AECRActionObjectCollectionItemCallback (OBJ_BIOSEQ, bsp, o);
+}
+
+
+NLM_EXTERN ValNodePtr GetObjectListForAECRAction (SeqEntryPtr sep, AECRActionPtr action)
+{
+ ObjectCollectionData ocd;
+
+ ocd.action = action;
+ ocd.object_list = NULL;
+
+ if (action == NULL) return NULL;
+ if (FieldTypeFromAECRAction (action) == FieldType_molinfo_field) {
+ VisitBioseqsInSep (sep, &ocd, AECRObjectCollectionBioseqCallback);
+ } else {
+ VisitFeaturesInSep (sep, &ocd, AECRActionObjectCollectionFeatureCallback);
+ VisitDescriptorsInSep (sep, &ocd, AECRActionObjectCollectionDescriptorCallback);
+ }
+ return ocd.object_list;
+}
+
+
+typedef struct buildcgpset
+{
+ ValNodePtr cds_list;
+ ValNodePtr mrna_list;
+ ValNodePtr gene_list;
+} BuildCGPSetData, PNTR BuildCGPSetPtr;
+
+static void BuildCGPSetCallback (SeqFeatPtr sfp, Pointer userdata)
+{
+ BuildCGPSetPtr b;
+
+ if (sfp == NULL || sfp->idx.deleteme || userdata == NULL) return;
+ b = (BuildCGPSetPtr) userdata;
+ if (sfp->data.choice == SEQFEAT_CDREGION)
+ {
+ ValNodeAddPointer (&(b->cds_list), OBJ_SEQFEAT, sfp);
+ }
+ else if (sfp->data.choice == SEQFEAT_GENE)
+ {
+ ValNodeAddPointer (&(b->gene_list), OBJ_SEQFEAT, sfp);
+ }
+ else if (sfp->idx.subtype == FEATDEF_mRNA)
+ {
+ ValNodeAddPointer (&(b->mrna_list), OBJ_SEQFEAT, sfp);
+ }
+ else if (SeqMgrGetGeneXref (sfp) != NULL)
+ {
+ ValNodeAddPointer (&(b->gene_list), OBJ_SEQFEAT, sfp);
+ }
+}
+
+
+static CGPSetPtr BuildCGPSetFromCodingRegion (SeqFeatPtr cds, BoolPtr indexing_needed)
+{
+ SeqMgrFeatContext fcontext;
+ SeqFeatPtr gene = NULL, mrna, prot;
+ BioseqPtr protbsp;
+ CGPSetPtr cdsp;
+ ProtRefPtr prp;
+
+ if (cds == NULL || cds->data.choice != SEQFEAT_CDREGION) return NULL;
+
+ cdsp = (CGPSetPtr) MemNew (sizeof (CGPSetData));
+ ValNodeAddPointer (&(cdsp->cds_list), 0, cds);
+
+ gene = GetGeneForFeature (cds);
+ if (gene != NULL)
+ {
+ ValNodeAddPointer (&(cdsp->gene_list), 0, gene);
+ /* mark gene, so that we'll know it isn't lonely */
+ gene->idx.deleteme = TRUE;
+ }
+
+ mrna = SeqMgrGetOverlappingmRNA (cds->location, &fcontext);
+ if (mrna != NULL)
+ {
+ ValNodeAddPointer (&(cdsp->mrna_list), 0, mrna);
+ /* mark mrna, so that we'll know it's already in a set */
+ mrna->idx.deleteme = TRUE;
+ }
+
+ if (cds->product != NULL)
+ {
+ protbsp = BioseqFindFromSeqLoc (cds->product);
+ if (protbsp != NULL)
+ {
+ prot = SeqMgrGetNextFeature (protbsp, NULL, SEQFEAT_PROT, FEATDEF_PROT, &fcontext);
+ /* if there is no full-length protein feature, make one */
+ if (prot == NULL)
+ {
+ prp = ProtRefNew ();
+ prot = CreateNewFeatureOnBioseq (protbsp, SEQFEAT_PROT, NULL);
+ if (prot != NULL)
+ {
+ prot->data.value.ptrvalue = prp;
+ if (indexing_needed != NULL)
+ {
+ *indexing_needed = TRUE;
+ }
+ }
+ }
+ if (prot != NULL)
+ {
+ ValNodeAddPointer (&(cdsp->prot_list), 0, prot);
+ }
+
+ /* also add in mat_peptides from protein feature */
+ prot = SeqMgrGetNextFeature (protbsp, NULL, SEQFEAT_PROT, FEATDEF_mat_peptide_aa, &fcontext);
+ while (prot != NULL)
+ {
+ ValNodeAddPointer (&(cdsp->prot_list), 0, prot);
+ prot = SeqMgrGetNextFeature (protbsp, prot, SEQFEAT_PROT, FEATDEF_mat_peptide_aa, &fcontext);
+ }
+ }
+ }
+ return cdsp;
+}
+
+
+static CGPSetPtr BuildCGPSetFrommRNA (SeqFeatPtr mrna)
+{
+ SeqFeatPtr gene;
+ CGPSetPtr cdsp;
+
+ if (mrna == NULL || mrna->idx.deleteme || mrna->idx.subtype != FEATDEF_mRNA) return NULL;
+
+ cdsp = (CGPSetPtr) MemNew (sizeof (CGPSetData));
+ ValNodeAddPointer (&(cdsp->mrna_list), 0, mrna);
+
+ gene = GetGeneForFeature (mrna);
+ if (gene != NULL)
+ {
+ ValNodeAddPointer (&(cdsp->gene_list), 0, gene);
+ /* mark gene, so that we'll know it isn't lonely */
+ gene->idx.deleteme = TRUE;
+ }
+
+ return cdsp;
+}
+
+
+static void UnmarkFeatureList (ValNodePtr list)
+{
+ SeqFeatPtr sfp;
+
+ while (list != NULL)
+ {
+ sfp = list->data.ptrvalue;
+ if (sfp != NULL)
+ {
+ sfp->idx.deleteme = FALSE;
+ }
+ list = list->next;
+ }
+}
+
+
+static ValNodePtr BuildCGPSetList (Uint2 entityID, ValNodePtr constraint)
+{
+ SeqEntryPtr sep;
+ BuildCGPSetData b;
+ CGPSetPtr cdsp;
+ ValNodePtr vnp, vnp_next, vnp_prev;
+ ValNodePtr cdset_list = NULL;
+ SeqFeatPtr cds, gene, mrna;
+ Boolean need_indexing = FALSE;
+
+ sep = GetTopSeqEntryForEntityID (entityID);
+
+ b.cds_list = NULL;
+ b.gene_list = NULL;
+ b.mrna_list = NULL;
+
+ VisitFeaturesInSep (sep, &b, BuildCGPSetCallback);
+
+ /* build cdsets that have coding regions */
+ for (vnp = b.cds_list; vnp != NULL; vnp = vnp->next)
+ {
+ cds = (SeqFeatPtr) vnp->data.ptrvalue;
+ if (cds == NULL) continue;
+ cdsp = BuildCGPSetFromCodingRegion (cds, &need_indexing);
+ if (cdsp != NULL)
+ {
+ ValNodeAddPointer (&cdset_list, 0, cdsp);
+ }
+ }
+ if (need_indexing)
+ {
+ /* indexing because we have created full-length protein features */
+ SeqMgrIndexFeatures (entityID, NULL);
+ }
+
+ /* build cdsets for mrna features that don't have coding regions */
+ for (vnp = b.mrna_list; vnp != NULL; vnp = vnp->next)
+ {
+ mrna = (SeqFeatPtr) vnp->data.ptrvalue;
+ if (mrna == NULL || mrna->idx.deleteme) continue;
+ cdsp = BuildCGPSetFrommRNA (mrna);
+ if (cdsp != NULL)
+ {
+ ValNodeAddPointer (&cdset_list, 0, cdsp);
+ }
+ }
+
+ /* build cdsets for lonely genes / features with gene xrefs that are not coding regions or mrnas */
+ for (vnp = b.gene_list; vnp != NULL; vnp = vnp->next)
+ {
+ gene = (SeqFeatPtr) vnp->data.ptrvalue;
+ if (gene == NULL || gene->idx.deleteme) continue;
+ cdsp = CGPSetNew ();
+ ValNodeAddPointer (&(cdsp->gene_list), 0, gene);
+ ValNodeAddPointer (&cdset_list, 0, cdsp);
+ }
+
+ /* now unmark features */
+ UnmarkFeatureList (b.cds_list);
+ UnmarkFeatureList (b.mrna_list);
+ UnmarkFeatureList (b.gene_list);
+
+ b.cds_list = ValNodeFree (b.cds_list);
+ b.mrna_list = ValNodeFree (b.mrna_list);
+ b.gene_list = ValNodeFree (b.gene_list);
+
+ /* now remove sets that don't match our choice constraint */
+ vnp_prev = NULL;
+ for (vnp = cdset_list; vnp != NULL; vnp = vnp_next)
+ {
+ vnp_next = vnp->next;
+ if (!DoesObjectMatchConstraintChoiceSet (0, vnp->data.ptrvalue, constraint))
+ {
+ if (vnp_prev == NULL)
+ {
+ cdset_list = vnp->next;
+ }
+ else
+ {
+ vnp_prev->next = vnp->next;
+ }
+ vnp->next = NULL;
+ FreeCGPSetList (vnp);
+ }
+ else
+ {
+ vnp_prev = vnp;
+ }
+ }
+
+ return cdset_list;
+}
+
+
+NLM_EXTERN Int4 DoApplyActionToObjectList (ApplyActionPtr action, ValNodePtr object_list, StringConstraintPtr scp)
+{
+ ValNodePtr vnp;
+ Int4 num_succeed = 0, num_fail = 0;
+
+ if (action == NULL || object_list == NULL) return 0;
+
+ for (vnp = object_list; vnp != NULL; vnp = vnp->next) {
+ if (SetFieldValueForObject (vnp->choice, vnp->data.ptrvalue, action->field, scp, action->value, action->existing_text)) {
+ num_succeed ++;
+ } else {
+ num_fail++;
+ }
+ }
+ return num_succeed;
+}
+
+
+NLM_EXTERN Int4 DoEditActionToObjectList (EditActionPtr action, ValNodePtr object_list)
+{
+ ValNodePtr vnp;
+ Int4 num_succeed = 0, num_fail = 0;
+ StringConstraintPtr scp;
+ CharPtr str, new_str;
+
+ if (action == NULL || object_list == NULL) return 0;
+ scp = StringConstraintFromFieldEdit (action->edit);
+
+ for (vnp = object_list; vnp != NULL; vnp = vnp->next) {
+ str = GetFieldValueForObject (vnp->choice, vnp->data.ptrvalue, action->field, scp);
+ new_str = ApplyEditToString (str, action->edit);
+ if (StringCmp (str, new_str) != 0
+ && SetFieldValueForObject (vnp->choice, vnp->data.ptrvalue, action->field, scp, new_str, ExistingTextOption_replace_old)) {
+ num_succeed ++;
+ } else {
+ num_fail++;
+ }
+ new_str = MemFree (new_str);
+ str = MemFree (str);
+ }
+ return num_succeed;
+}
+
+
+NLM_EXTERN Int4 DoConvertActionToObjectList (ConvertActionPtr action, ValNodePtr object_list, StringConstraintPtr scp)
+{
+ ValNodePtr vnp;
+ Int4 num_succeed = 0, num_fail = 0;
+ CharPtr str, from_val;
+ FieldTypePtr field_from, field_to;
+
+ if (action == NULL || object_list == NULL || action->fields == NULL) return 0;
+
+ field_from = GetFromFieldFromFieldPair (action->fields);
+ field_to = GetToFieldFromFieldPair (action->fields);
+
+ if (action->fields->choice == FieldPairType_molinfo_field) {
+ for (vnp = object_list; vnp != NULL; vnp = vnp->next) {
+ str = GetFieldValueForObject (vnp->choice, vnp->data.ptrvalue, field_from, NULL);
+ from_val = GetSequenceQualValName (field_from->data.ptrvalue);
+ if (StringCmp (str, from_val) == 0
+ && SetFieldValueForObject (vnp->choice, vnp->data.ptrvalue, field_to, NULL, str, ExistingTextOption_replace_old)) {
+ num_succeed ++;
+ }
+ str = MemFree (str);
+ }
+ } else {
+ for (vnp = object_list; vnp != NULL; vnp = vnp->next) {
+ str = GetFieldValueForObject (vnp->choice, vnp->data.ptrvalue, field_from, scp);
+ if (SetFieldValueForObject (vnp->choice, vnp->data.ptrvalue, field_to, NULL, str, action->existing_text)
+ && RemoveFieldValueForObject (vnp->choice, vnp->data.ptrvalue, field_from, scp)) {
+ num_succeed ++;
+ } else {
+ num_fail++;
+ }
+ str = MemFree (str);
+ }
+ }
+
+ field_from = FieldTypeFree (field_from);
+ field_to = FieldTypeFree (field_to);
+
+ return num_succeed;
+}
+
+
+NLM_EXTERN Int4 DoCopyActionToObjectList (CopyActionPtr action, ValNodePtr object_list, StringConstraintPtr scp)
+{
+ ValNodePtr vnp;
+ Int4 num_succeed = 0, num_fail = 0;
+ CharPtr str;
+ FieldTypePtr field_from, field_to;
+
+ if (action == NULL || object_list == NULL) return 0;
+ field_from = GetFromFieldFromFieldPair (action->fields);
+ field_to = GetToFieldFromFieldPair (action->fields);
+
+ for (vnp = object_list; vnp != NULL; vnp = vnp->next) {
+ str = GetFieldValueForObject (vnp->choice, vnp->data.ptrvalue, field_from, scp);
+ if (SetFieldValueForObject (vnp->choice, vnp->data.ptrvalue, field_to, NULL, str, action->existing_text)) {
+ num_succeed ++;
+ } else {
+ num_fail++;
+ }
+ str = MemFree (str);
+ }
+
+ field_from = FieldTypeFree (field_from);
+ field_to = FieldTypeFree (field_to);
+ return num_succeed;
+}
+
+
+NLM_EXTERN Int4 DoSwapActionToObjectList (SwapActionPtr action, ValNodePtr object_list, StringConstraintPtr scp)
+{
+ ValNodePtr vnp;
+ Int4 num_succeed = 0, num_fail = 0;
+ CharPtr str1, str2;
+ FieldTypePtr field_from, field_to;
+
+ if (action == NULL || object_list == NULL) return 0;
+ field_from = GetFromFieldFromFieldPair (action->fields);
+ field_to = GetToFieldFromFieldPair (action->fields);
+
+ for (vnp = object_list; vnp != NULL; vnp = vnp->next) {
+ str1 = GetFieldValueForObject (vnp->choice, vnp->data.ptrvalue, field_from, scp);
+ str2 = GetFieldValueForObject (vnp->choice, vnp->data.ptrvalue, field_to, NULL);
+ if (SetFieldValueForObject (vnp->choice, vnp->data.ptrvalue, field_to, NULL, str1, ExistingTextOption_replace_old)
+ && SetFieldValueForObject (vnp->choice, vnp->data.ptrvalue, field_from, scp, str2, ExistingTextOption_replace_old)) {
+ num_succeed ++;
+ } else {
+ num_fail++;
+ }
+ str1 = MemFree (str1);
+ str2 = MemFree (str2);
+ }
+ field_from = FieldTypeFree (field_from);
+ field_to = FieldTypeFree (field_to);
+ return num_succeed;
+}
+
+
+NLM_EXTERN Int4 DoRemoveActionToObjectList (RemoveActionPtr action, ValNodePtr object_list, StringConstraintPtr scp)
+{
+ ValNodePtr vnp;
+ Int4 num_succeed = 0, num_fail = 0;
+
+ if (action == NULL || object_list == NULL) return 0;
+
+ for (vnp = object_list; vnp != NULL; vnp = vnp->next) {
+ if (RemoveFieldValueForObject (vnp->choice, vnp->data.ptrvalue, action->field, scp)) {
+ num_succeed ++;
+ } else {
+ num_fail++;
+ }
+ }
+ return num_succeed;
+}
+
+
+NLM_EXTERN Int4 DoParseActionToObjectList (AECRParseActionPtr action, ValNodePtr object_list, StringConstraintPtr scp)
+{
+ ValNodePtr vnp;
+ CharPtr str1, str2, cp;
+ Int4 len, num_succeed = 0;
+ FieldTypePtr field_from, field_to;
+
+ if (action == NULL || object_list == NULL) return 0;
+ field_from = GetFromFieldFromFieldPair (action->fields);
+ field_to = GetToFieldFromFieldPair (action->fields);
+
+ for (vnp = object_list; vnp != NULL; vnp = vnp->next) {
+ str1 = GetFieldValueForObject (vnp->choice, vnp->data.ptrvalue, field_from, scp);
+ str2 = GetTextPortionFromString (str1, action->portion);
+ if (str2 != NULL) {
+ if (action->remove_from_parsed) {
+ cp = StringSearch (str1, str2);
+ len = StringLen (str2);
+ StringCpy (cp, cp + len);
+ SetFieldValueForObject (vnp->choice, vnp->data.ptrvalue, field_from, scp, str1, ExistingTextOption_replace_old);
+ }
+ if (SetFieldValueForObject (vnp->choice, vnp->data.ptrvalue, field_to, NULL, str1, action->existing_text)) {
+ num_succeed++;
+ }
+ }
+ str1 = MemFree (str1);
+ str2 = MemFree (str2);
+ }
+ field_from = FieldTypeFree (field_from);
+ field_to = FieldTypeFree (field_to);
+ return num_succeed;
+}
+
+
+static Int4 ApplyAECRActionToSeqEntry (AECRActionPtr act, SeqEntryPtr sep)
+{
+ StringConstraintPtr scp;
+ ApplyActionPtr a;
+ ValNodePtr object_list = NULL;
+ Uint1 field_type;
+ Uint2 entityID;
+ Int4 num_succeed = 0;
+
+ if (act == NULL || act->action == NULL) return 0;
+ field_type = FieldTypeFromAECRAction (act);
+ if (field_type == FieldType_cds_gene_prot) {
+ entityID = ObjMgrGetEntityIDForChoice(sep);
+ object_list = BuildCGPSetList (entityID, act->constraint);
+ } else {
+ object_list = GetObjectListForAECRAction (sep, act);
+ }
+
+ switch (act->action->choice) {
+ case ActionChoice_apply:
+ a = (ApplyActionPtr) act->action->data.ptrvalue;
+ scp = FindStringConstraintInConstraintSetForField (a->field, act->constraint);
+ num_succeed = DoApplyActionToObjectList (act->action->data.ptrvalue, object_list, scp);
+ scp = StringConstraintFree (scp);
+ break;
+ case ActionChoice_edit:
+ num_succeed = DoEditActionToObjectList (act->action->data.ptrvalue, object_list);
+ break;
+ case ActionChoice_convert:
+ num_succeed = DoConvertActionToObjectList (act->action->data.ptrvalue, object_list, NULL);
+ break;
+ case ActionChoice_swap:
+ num_succeed = DoSwapActionToObjectList (act->action->data.ptrvalue, object_list, NULL);
+ break;
+ case ActionChoice_copy:
+ num_succeed = DoCopyActionToObjectList (act->action->data.ptrvalue, object_list, NULL);
+ break;
+ case ActionChoice_remove:
+ num_succeed = DoRemoveActionToObjectList (act->action->data.ptrvalue, object_list, NULL);
+ break;
+ case ActionChoice_parse:
+ num_succeed = DoRemoveActionToObjectList (act->action->data.ptrvalue, object_list, NULL);
+ break;
+ }
+ object_list = ValNodeFree (object_list);
+ return num_succeed;
+}
+
+
+/* This section handles parsing where the source field and destination field may not be on the same
+ * group of objects. */
+typedef struct parsesourceinfo
+{
+ BioseqPtr bsp;
+ SeqFeatPtr sfp;
+ SeqDescrPtr sdp;
+ SeqIdPtr sip;
+ ValNodePtr dest_list;
+ CharPtr parse_src_txt;
+} ParseSourceInfoData, PNTR ParseSourceInfoPtr;
+
+static ParseSourceInfoPtr ParseSourceInfoNew (BioseqPtr bsp, SeqFeatPtr sfp, SeqDescrPtr sdp, SeqIdPtr sip, CharPtr parse_src_txt)
+{
+ ParseSourceInfoPtr psip;
+
+ psip = (ParseSourceInfoPtr) MemNew (sizeof (ParseSourceInfoData));
+ if (psip != NULL) {
+ psip->bsp = bsp;
+ psip->sdp = sdp;
+ psip->sfp = sfp;
+ psip->sip = sip;
+ psip->dest_list = NULL;
+ psip->parse_src_txt = parse_src_txt;
+ }
+ return psip;
+}
+
+
+static ParseSourceInfoPtr ParseSourceInfoFree (ParseSourceInfoPtr psip)
+{
+ if (psip != NULL)
+ {
+ psip->dest_list = ValNodeFree (psip->dest_list);
+ psip->parse_src_txt = MemFree (psip->parse_src_txt);
+ psip = MemFree (psip);
+ }
+ return psip;
+}
+
+static ParseSourceInfoPtr ParseSourceInfoCopy (ParseSourceInfoPtr psip)
+{
+ ParseSourceInfoPtr pcopy = NULL;
+
+ if (psip != NULL)
+ {
+ pcopy = (ParseSourceInfoPtr) MemNew (sizeof (ParseSourceInfoData));
+ if (pcopy != NULL) {
+ pcopy->bsp = psip->bsp;
+ pcopy->sfp = psip->sfp;
+ pcopy->sdp = psip->sdp;
+ pcopy->sip = psip->sip;
+ pcopy->dest_list = NULL;
+ pcopy->parse_src_txt = NULL;
+ }
+ }
+ return pcopy;
+}
+
+static ValNodePtr ParseSourceListFree (ValNodePtr vnp)
+{
+ ValNodePtr vnp_next;
+ while (vnp != NULL) {
+ vnp_next = vnp->next;
+ vnp->next = NULL;
+ vnp->data.ptrvalue = ParseSourceInfoFree (vnp->data.ptrvalue);
+ vnp = ValNodeFree (vnp);
+ vnp = vnp_next;
+ }
+ return vnp;
+}
+
+
+static void
+GetDeflineSourcesForBioseq
+(BioseqPtr bsp,
+ TextPortionPtr portion,
+ ValNodePtr PNTR source_list)
+{
+ SeqDescrPtr sdp;
+ SeqMgrDescContext dcontext;
+ CharPtr str;
+ ParseSourceInfoPtr psip;
+
+ if (bsp == NULL || source_list == NULL)
+ {
+ return;
+ }
+
+ sdp = SeqMgrGetNextDescriptor (bsp, NULL, Seq_descr_title, &dcontext);
+ while (sdp != NULL)
+ {
+ str = GetTextPortionFromString (sdp->data.ptrvalue, portion);
+ if (str != NULL) {
+ psip = ParseSourceInfoNew (bsp, NULL, sdp, NULL, str);
+ if (psip != NULL) {
+ ValNodeAddPointer (source_list, 0, psip);
+ } else {
+ str = MemFree (str);
+ }
+ }
+ sdp = SeqMgrGetNextDescriptor (bsp, sdp, Seq_descr_title, &dcontext);
+ }
+}
+
+
+static CharPtr GetIDSrc (SeqIdPtr sip, Uint1 id_type, CharPtr tag)
+{
+ DbtagPtr dbt = NULL;
+ ObjectIdPtr oip = NULL;
+ Char id_str[128];
+ CharPtr str_src = NULL;
+
+ if (sip == NULL || sip->choice != id_type) return NULL;
+
+ if (id_type == SEQID_GENERAL)
+ {
+ dbt = (DbtagPtr) sip->data.ptrvalue;
+ if (dbt == NULL || (tag != NULL && StringCmp (dbt->db, tag) != 0)) return NULL;
+ oip = dbt->tag;
+ }
+ else if (id_type == SEQID_LOCAL)
+ {
+ oip = sip->data.ptrvalue;
+ }
+
+ if (oip == NULL)
+ {
+ SeqIdWrite (sip, id_str, PRINTID_REPORT, sizeof (id_str));
+ str_src = StringSave (id_str);
+ }
+ else
+ {
+ if (oip->str == NULL)
+ {
+ sprintf (id_str, "%d", oip->id);
+ str_src = StringSave (id_str);
+ }
+ else
+ {
+ str_src = StringSave (oip->str);
+ }
+ }
+ return str_src;
+}
+
+
+static void
+GetIDSourcesForBioseq
+(BioseqPtr bsp,
+ TextPortionPtr portion,
+ Uint1 id_type,
+ CharPtr tag,
+ ValNodePtr PNTR source_list)
+{
+ SeqIdPtr sip;
+ ParseSourceInfoPtr psip;
+ CharPtr src_str = NULL, str;
+
+ if (bsp == NULL || source_list == NULL)
+ {
+ return;
+ }
+
+ sip = bsp->id;
+ while (sip != NULL)
+ {
+ if ((src_str = GetIDSrc (sip, id_type, tag)) != NULL) {
+ str = GetTextPortionFromString (src_str, portion);
+ if (str != NULL) {
+ psip = ParseSourceInfoNew (bsp, NULL, NULL, sip, str);
+ if (psip != NULL) {
+ ValNodeAddPointer (source_list, 0, psip);
+ } else {
+ str = MemFree (str);
+ }
+ }
+ src_str = MemFree (src_str);
+ }
+ sip = sip->next;
+ }
+}
+
+
+static void
+GetLocalIDSourcesForBioseq
+(BioseqPtr bsp,
+ TextPortionPtr tp,
+ ValNodePtr PNTR source_list)
+{
+ GetIDSourcesForBioseq (bsp, tp, SEQID_LOCAL, NULL, source_list);
+}
+
+
+static void GetNcbiFileSourceForBioseq
+(BioseqPtr bsp,
+ TextPortionPtr tp,
+ ValNodePtr PNTR source_list)
+{
+ GetIDSourcesForBioseq (bsp, tp, SEQID_GENERAL, "NCBIFILE", source_list);
+}
+
+
+static void StripBankitCommentForParse (SeqDescrPtr sdp, TextPortionPtr tp)
+{
+ UserObjectPtr uop;
+ ObjectIdPtr oip;
+ UserFieldPtr ufp;
+
+ if (sdp == NULL || sdp->choice != Seq_descr_user || tp == NULL) {
+ return;
+ }
+
+ /* Bankit Comments */
+ uop = (UserObjectPtr) sdp->data.ptrvalue;
+ if (uop != NULL && StringCmp (uop->_class, "SMART_V1.0") != 0) {
+ oip = uop->type;
+ if (oip != NULL && StringCmp (oip->str, "Submission") == 0) {
+ for (ufp = uop->data; ufp != NULL; ufp = ufp->next) {
+ oip = ufp->label;
+ if (oip != NULL && StringCmp (oip->str, "AdditionalComment") == 0) {
+ ReplaceStringForParse (ufp->data.ptrvalue, tp);
+ }
+ }
+ }
+ }
+}
+
+
+static void StripStructuredCommentForParse (SeqDescrPtr sdp, CharPtr comment_field, TextPortionPtr tp)
+{
+ UserObjectPtr uop;
+ ObjectIdPtr oip;
+ UserFieldPtr ufp;
+
+ if (sdp == NULL || sdp->choice != Seq_descr_user || tp == NULL || StringHasNoText (comment_field)) {
+ return;
+ }
+
+ uop = (UserObjectPtr) sdp->data.ptrvalue;
+ oip = uop->type;
+ if (oip != NULL && StringCmp (oip->str, "StructuredComment") == 0) {
+ for (ufp = uop->data; ufp != NULL; ufp = ufp->next) {
+ oip = ufp->label;
+ if (oip != NULL && StringCmp (oip->str, comment_field) == 0) {
+ ReplaceStringForParse (ufp->data.ptrvalue, tp);
+ }
+ }
+ }
+}
+
+
+static void
+GetBankitCommentSourcesForBioseq
+(BioseqPtr bsp,
+ TextPortionPtr tp,
+ ValNodePtr PNTR source_list)
+{
+ SeqDescrPtr sdp;
+ SeqMgrDescContext dcontext;
+ ParseSourceInfoPtr psip;
+ UserObjectPtr uop;
+ ObjectIdPtr oip;
+ UserFieldPtr ufp;
+ CharPtr str = NULL;
+
+ if (bsp == NULL || source_list == NULL) {
+ return;
+ }
+
+ sdp = SeqMgrGetNextDescriptor (bsp, NULL, Seq_descr_user, &dcontext);
+ while (sdp != NULL) {
+ if (sdp->extended != 0) {
+ /* Bankit Comments */
+ uop = (UserObjectPtr) sdp->data.ptrvalue;
+ if (uop != NULL && StringCmp (uop->_class, "SMART_V1.0") != 0) {
+ oip = uop->type;
+ if (oip != NULL && StringCmp (oip->str, "Submission") == 0) {
+ for (ufp = uop->data; ufp != NULL; ufp = ufp->next) {
+ oip = ufp->label;
+ if (oip != NULL && StringCmp (oip->str, "AdditionalComment") == 0) {
+ str = GetTextPortionFromString (ufp->data.ptrvalue, tp);
+ if (str != NULL) {
+ psip = ParseSourceInfoNew (bsp, NULL, sdp, NULL, str);
+ if (psip == NULL) {
+ str = MemFree (str);
+ } else {
+ ValNodeAddPointer (source_list, 0, psip);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ sdp = SeqMgrGetNextDescriptor (bsp, sdp, Seq_descr_user, &dcontext);
+ }
+}
+
+
+static void
+GetCommentSourcesForBioseq
+(BioseqPtr bsp,
+ TextPortionPtr tp,
+ ValNodePtr PNTR source_list)
+{
+ SeqDescrPtr sdp;
+ SeqFeatPtr sfp;
+ SeqMgrFeatContext fcontext;
+ SeqMgrDescContext dcontext;
+ ParseSourceInfoPtr psip;
+ CharPtr str;
+
+ if (bsp == NULL || source_list == NULL) {
+ return;
+ }
+
+ sdp = SeqMgrGetNextDescriptor (bsp, NULL, Seq_descr_comment, &dcontext);
+ while (sdp != NULL) {
+ str = GetTextPortionFromString (sdp->data.ptrvalue, tp);
+ if (str != NULL) {
+ psip = ParseSourceInfoNew (bsp, NULL, sdp, NULL, str);
+ if (psip == NULL) {
+ str = MemFree (str);
+ } else {
+ ValNodeAddPointer (source_list, 0, psip);
+ }
+ }
+ sdp = SeqMgrGetNextDescriptor (bsp, sdp, Seq_descr_comment, &dcontext);
+ }
+
+ sfp = SeqMgrGetNextFeature (bsp, NULL, SEQFEAT_COMMENT, 0, &fcontext);
+ while (sfp != NULL) {
+ str = GetTextPortionFromString (sfp->data.value.ptrvalue, tp);
+ if (str != NULL) {
+ psip = ParseSourceInfoNew (bsp, sfp, NULL, NULL, str);
+ if (psip == NULL) {
+ str = MemFree (str);
+ } else {
+ ValNodeAddPointer (source_list, 0, psip);
+ }
+ }
+ sfp = SeqMgrGetNextFeature (bsp, sfp, SEQFEAT_COMMENT, 0, &fcontext);
+ }
+ GetBankitCommentSourcesForBioseq (bsp, tp, source_list);
+}
+
+
+static void
+GetStructuredCommentSourcesForBioseq
+(BioseqPtr bsp,
+ TextPortionPtr tp,
+ CharPtr comment_field,
+ ValNodePtr PNTR source_list)
+{
+ SeqDescrPtr sdp;
+ UserObjectPtr uop;
+ ObjectIdPtr oip;
+ UserFieldPtr ufp;
+ SeqMgrDescContext dcontext;
+ CharPtr str;
+ ParseSourceInfoPtr psip;
+
+ if (bsp == NULL || source_list == NULL)
+ {
+ return;
+ }
+
+ sdp = SeqMgrGetNextDescriptor (bsp, NULL, Seq_descr_user, &dcontext);
+ while (sdp != NULL) {
+ if (sdp->extended != 0
+ && sdp->data.ptrvalue != NULL) {
+ uop = (UserObjectPtr) sdp->data.ptrvalue;
+ oip = uop->type;
+ if (oip != NULL && StringCmp (oip->str, "StructuredComment") == 0) {
+ for (ufp = uop->data; ufp != NULL; ufp = ufp->next) {
+ oip = ufp->label;
+ if (oip != NULL && StringCmp (oip->str, comment_field) == 0) {
+ str = GetTextPortionFromString (ufp->data.ptrvalue, tp);
+ if (str != NULL) {
+ psip = ParseSourceInfoNew (bsp, NULL, sdp, NULL, str);
+ if (psip == NULL) {
+ str = MemFree (str);
+ } else {
+ ValNodeAddPointer (source_list, 0, psip);
+ }
+ }
+ }
+ }
+ }
+ }
+ sdp = SeqMgrGetNextDescriptor (bsp, sdp, Seq_descr_user, &dcontext);
+ }
+}
+
+
+const CharPtr nomial_keywords[] = {
+"f. sp. ",
+"var.",
+"pv.",
+"bv.",
+"serovar",
+"subsp." };
+
+const Int4 num_nomial_keywords = sizeof(nomial_keywords) / sizeof (CharPtr);
+
+static CharPtr GetTextAfterNomial (CharPtr taxname)
+
+{
+ CharPtr ptr, nomial_end;
+ Int4 i;
+ Boolean found_keyword = TRUE;
+
+ ptr = StringChr (taxname, ' ');
+ if (ptr == NULL) return NULL;
+ /* skip over the first word and the spaces after it. */
+ while (*ptr == ' ') {
+ ptr++;
+ }
+ ptr = StringChr (ptr, ' ');
+ /* if there are only two words, give up. */
+ if (ptr == NULL) {
+ return NULL;
+ }
+ nomial_end = ptr;
+ while (*ptr == ' ') {
+ ptr++;
+ }
+
+ while (found_keyword) {
+ found_keyword = FALSE;
+ /* if the next word is a nomial keyword, skip that plus the first word that follows it. */
+ for (i = 0; i < num_nomial_keywords && *nomial_end != 0; i++) {
+ if (StringNCmp (ptr, nomial_keywords[i], StringLen(nomial_keywords[i])) == 0) {
+ ptr += StringLen(nomial_keywords[i]);
+ while (*ptr == ' ' ) {
+ ptr++;
+ }
+ nomial_end = StringChr (ptr, ' ');
+ if (nomial_end == NULL) {
+ nomial_end = ptr + StringLen (ptr);
+ } else {
+ ptr = nomial_end;
+ while (*ptr == ' ') {
+ ptr++;
+ }
+ found_keyword = TRUE;
+ }
+ }
+ }
+ }
+ return nomial_end;
+}
+
+
+static void
+GetOrgParseSourcesForBioSource
+(BioSourcePtr biop,
+ BioseqPtr bsp,
+ SeqDescrPtr sdp,
+ SeqFeatPtr sfp,
+ ParseSrcOrgPtr o,
+ TextPortionPtr tp,
+ ValNodePtr PNTR source_list)
+{
+ CharPtr str = NULL, portion, tmp;
+ ValNode vn;
+ ParseSourceInfoPtr psip;
+
+ if (biop == NULL || o == NULL || o->field == NULL || source_list == NULL) return;
+
+ switch (o->field->choice) {
+ case ParseSrcOrgChoice_source_qual :
+ vn.choice = SourceQualChoice_textqual;
+ vn.data.intvalue = o->field->data.intvalue;
+ vn.next = NULL;
+ str = GetSourceQualFromBioSource (biop, &vn, NULL);
+ break;
+ case ParseSrcOrgChoice_taxname_after_binomial :
+ vn.choice = SourceQualChoice_textqual;
+ vn.data.intvalue = Source_qual_taxname;
+ vn.next = NULL;
+ str = GetSourceQualFromBioSource (biop, &vn, NULL);
+ tmp = GetTextAfterNomial (str);
+ tmp = StringSave (tmp);
+ str = MemFree (str);
+ str = tmp;
+ break;
+ }
+ portion = GetTextPortionFromString (str, tp);
+ if (portion != NULL) {
+ psip = ParseSourceInfoNew (bsp, sfp, sdp, NULL, portion);
+ if (psip == NULL) {
+ portion = MemFree (portion);
+ } else {
+ ValNodeAddPointer (source_list, 0, psip);
+ }
+ }
+ str = MemFree (str);
+}
+
+
+static void GetOrgParseSourcesForBioseq (BioseqPtr bsp, ParseSrcOrgPtr o, TextPortionPtr tp, ValNodePtr PNTR source_list)
+{
+ SeqDescrPtr sdp;
+ SeqFeatPtr sfp;
+ SeqMgrFeatContext fcontext;
+ SeqMgrDescContext dcontext;
+
+ if (bsp == NULL || o == NULL || source_list == NULL) return;
+
+ if (o->type == Object_type_constraint_any || o->type == Object_type_constraint_descriptor) {
+ for (sdp = SeqMgrGetNextDescriptor (bsp, NULL, Seq_descr_source, &dcontext);
+ sdp != NULL;
+ sdp = SeqMgrGetNextDescriptor (bsp, sdp, Seq_descr_source, &dcontext)) {
+ GetOrgParseSourcesForBioSource (sdp->data.ptrvalue, bsp, sdp, NULL, o, tp, source_list);
+ }
+ }
+
+ if (o->type == Object_type_constraint_any || o->type == Object_type_constraint_feature) {
+ for (sfp = SeqMgrGetNextFeature (bsp, NULL, SEQFEAT_BIOSRC, 0, &fcontext);
+ sfp != NULL;
+ sfp = SeqMgrGetNextFeature (bsp, sfp, SEQFEAT_BIOSRC, 0, &fcontext)) {
+ GetOrgParseSourcesForBioSource (sfp->data.value.ptrvalue, bsp, NULL, sfp, o, tp, source_list);
+ }
+ }
+}
+
+
+typedef struct parsesrccollection {
+ ParseSrcPtr src;
+ TextPortionPtr portion;
+ ValNodePtr src_list;
+} ParseSrcCollectionData, PNTR ParseSrcCollectionPtr;
+
+
+static void FindParseSourceBioseqCallback (BioseqPtr bsp, Pointer userdata)
+{
+ ParseSrcCollectionPtr psp;
+
+ if (bsp == NULL || userdata == NULL)
+ {
+ return;
+ }
+
+ psp = (ParseSrcCollectionPtr) userdata;
+ if (psp->src == NULL) return;
+
+ switch (psp->src->choice)
+ {
+ case ParseSrc_defline:
+ if (!ISA_aa (bsp->mol)) {
+ GetDeflineSourcesForBioseq (bsp, psp->portion, &(psp->src_list));
+ }
+ break;
+ case ParseSrc_local_id:
+ if (! ISA_aa (bsp->mol) && bsp->repr != Seq_repr_seg) {
+ GetLocalIDSourcesForBioseq (bsp, psp->portion, &(psp->src_list));
+ }
+ break;
+ case ParseSrc_file_id:
+ GetNcbiFileSourceForBioseq (bsp, psp->portion, &(psp->src_list));
+ break;
+ case ParseSrc_org:
+ GetOrgParseSourcesForBioseq (bsp, psp->src->data.ptrvalue, psp->portion, &(psp->src_list));
+ break;
+ case ParseSrc_comment:
+ GetCommentSourcesForBioseq (bsp, psp->portion, &(psp->src_list));
+ break;
+ case ParseSrc_structured_comment:
+ GetStructuredCommentSourcesForBioseq(bsp, psp->portion, psp->src->data.ptrvalue, &(psp->src_list));
+ break;
+ case ParseSrc_bankit_comment:
+ if (!ISA_aa (bsp->mol)) {
+ GetBankitCommentSourcesForBioseq (bsp, psp->portion, &(psp->src_list));
+ }
+ break;
+ }
+}
+
+
+static void GetOrgNamesInRecordCallback (BioSourcePtr biop, Pointer userdata)
+{
+ ValNodePtr PNTR org_names;
+
+ if (biop == NULL || biop->org == NULL || StringHasNoText (biop->org->taxname)
+ || userdata == NULL)
+ {
+ return;
+ }
+
+ org_names = (ValNodePtr PNTR) userdata;
+
+ ValNodeAddPointer (org_names, 0, biop->org->taxname);
+}
+
+
+static void SetToUpper (CharPtr cp)
+{
+ if (cp == NULL) return;
+ while (*cp != 0) {
+ if (isalpha (*cp)) {
+ *cp = toupper (*cp);
+ }
+ cp++;
+ }
+}
+
+
+static void
+FixCapitalizationInString
+(CharPtr PNTR pTitle,
+ Uint2 capitalization,
+ ValNodePtr org_names)
+{
+ if (pTitle == NULL || capitalization == Cap_change_none) return;
+
+ switch (capitalization) {
+ case Cap_change_tolower:
+ ResetCapitalization (FALSE, *pTitle);
+ FixAbbreviationsInElement (pTitle);
+ FixOrgNamesInString (*pTitle, org_names);
+ break;
+ case Cap_change_toupper:
+ SetToUpper (*pTitle);
+ FixAbbreviationsInElement (pTitle);
+ FixOrgNamesInString (*pTitle, org_names);
+ break;
+ case Cap_change_firstcap:
+ ResetCapitalization (TRUE, *pTitle);
+ FixAbbreviationsInElement (pTitle);
+ FixOrgNamesInString (*pTitle, org_names);
+ break;
+ }
+}
+
+
+static void AddDeflineDestinationsForBioseq (BioseqPtr bsp, ValNodePtr PNTR dest_list)
+{
+ SeqDescrPtr sdp;
+ SeqMgrDescContext dcontext;
+
+ if (bsp == NULL || dest_list == NULL) {
+ return;
+ }
+
+ sdp = SeqMgrGetNextDescriptor (bsp, NULL, Seq_descr_title, &dcontext);
+ while (sdp != NULL) {
+ ValNodeAddPointer (dest_list, OBJ_SEQDESC, sdp);
+ sdp = SeqMgrGetNextDescriptor (bsp, sdp, Seq_descr_title, &dcontext);
+ }
+}
+
+
+static void AddFeatureDestinationsForBioseq (BioseqPtr bsp, FeatureFieldLegalPtr featfield, ValNodePtr PNTR dest_list)
+{
+ SeqFeatPtr sfp;
+ SeqMgrFeatContext fcontext;
+ Int4 featdef;
+
+ if (bsp == NULL || featfield == NULL || dest_list == NULL) return;
+
+ featdef = GetFeatdefFromFeatureType (featfield->type);
+ for (sfp = SeqMgrGetNextFeature (bsp, NULL, 0, featdef, &fcontext);
+ sfp != NULL;
+ sfp = SeqMgrGetNextFeature (bsp, sfp, 0, featdef, &fcontext)) {
+ ValNodeAddPointer (dest_list, OBJ_SEQFEAT, sfp);
+ }
+}
+
+
+static void GetBioSourceDestinationsForBioseq (BioseqPtr bsp, Uint2 object_type, ValNodePtr PNTR dest_list)
+{
+ SeqDescrPtr sdp;
+ SeqFeatPtr sfp;
+ SeqMgrFeatContext fcontext;
+ SeqMgrDescContext dcontext;
+
+ if (bsp == NULL || dest_list == NULL)
+ {
+ return;
+ }
+
+ if (object_type == Object_type_constraint_any || object_type == Object_type_constraint_descriptor)
+ {
+ sdp = SeqMgrGetNextDescriptor (bsp, NULL, Seq_descr_source, &dcontext);
+ while (sdp != NULL)
+ {
+ ValNodeAddPointer (dest_list, OBJ_SEQDESC, sdp);
+ sdp = SeqMgrGetNextDescriptor (bsp, sdp, Seq_descr_source, &dcontext);
+ }
+ }
+
+ if (object_type == Object_type_constraint_any || object_type == Object_type_constraint_feature)
+ {
+ sfp = SeqMgrGetNextFeature (bsp, NULL, SEQFEAT_BIOSRC, 0, &fcontext);
+ while (sfp != NULL)
+ {
+ ValNodeAddPointer (dest_list, OBJ_SEQFEAT, sfp);
+ sfp = SeqMgrGetNextFeature (bsp, sfp, SEQFEAT_BIOSRC, 0, &fcontext);
+ }
+ }
+}
+
+
+static void AddParseDestinations (ParseSourceInfoPtr psip, ParseDestPtr dst)
+{
+ ParseDstOrgPtr o;
+
+ if (psip == NULL || dst == NULL) return;
+
+ switch (dst->choice) {
+ case ParseDest_defline :
+ AddDeflineDestinationsForBioseq (psip->bsp, &(psip->dest_list));
+ break;
+ case ParseDest_org :
+ o = (ParseDstOrgPtr) dst->data.ptrvalue;
+ if ((o->type == Object_type_constraint_any || o->type == Object_type_constraint_descriptor)
+ && psip->sdp != NULL && psip->sdp->choice == Seq_descr_source) {
+ ValNodeAddPointer (&(psip->dest_list), OBJ_SEQDESC, psip->sdp);
+ } else if ((o->type == Object_type_constraint_any || o->type == Object_type_constraint_feature)
+ && psip->sfp != NULL && psip->sfp->data.choice == SEQFEAT_BIOSRC) {
+ ValNodeAddPointer (&(psip->dest_list), OBJ_SEQFEAT, psip->sfp);
+ } else {
+ GetBioSourceDestinationsForBioseq (psip->bsp, o->type, &(psip->dest_list));
+ }
+ break;
+ case ParseDest_featqual :
+ AddFeatureDestinationsForBioseq (psip->bsp, dst->data.ptrvalue, &(psip->dest_list));
+ break;
+ case ParseDest_dbxref :
+ GetBioSourceDestinationsForBioseq (psip->bsp, Object_type_constraint_any, &(psip->dest_list));
+ break;
+ }
+}
+
+
+static Boolean SourceHasOneUndeletedDestination (ParseSourceInfoPtr source)
+{
+ Int4 num_seen = 0;
+ ValNodePtr vnp;
+
+ if (source == NULL
+ || source->dest_list == NULL)
+ {
+ return FALSE;
+ }
+
+ vnp = source->dest_list;
+ while (vnp != NULL && num_seen < 2)
+ {
+ if (vnp->choice > 1)
+ {
+ num_seen ++;
+ }
+ vnp = vnp->next;
+ }
+ if (num_seen == 1)
+ {
+ return TRUE;
+ }
+ else
+ {
+ return FALSE;
+ }
+}
+
+
+static void CombineSourcesForDestinations (ValNodePtr PNTR source_list)
+{
+ ValNodePtr source1_vnp, source2_vnp, dest1_vnp, dest2_vnp;
+ ValNodePtr source_new, del_vnp;
+ ParseSourceInfoPtr psip1, psip2, new_psip;
+ CharPtr comb_txt;
+
+ for (source1_vnp = *source_list;
+ source1_vnp != NULL;
+ source1_vnp = source1_vnp->next)
+ {
+ psip1 = (ParseSourceInfoPtr) source1_vnp->data.ptrvalue;
+ if (psip1 == NULL || psip1->dest_list == NULL)
+ {
+ continue;
+ }
+ for (source2_vnp = source1_vnp->next;
+ source2_vnp != NULL;
+ source2_vnp = source2_vnp->next)
+ {
+ if (source2_vnp->choice > 0)
+ {
+ /* already marked for deletion */
+ continue;
+ }
+ psip2 = (ParseSourceInfoPtr) source2_vnp->data.ptrvalue;
+ if (psip2 == NULL || psip2->dest_list == NULL)
+ {
+ continue;
+ }
+ for (dest1_vnp = psip1->dest_list;
+ dest1_vnp != NULL;
+ dest1_vnp = dest1_vnp->next)
+ {
+ if (dest1_vnp->choice == 0)
+ {
+ /* already marked for deletion */
+ continue;
+ }
+ for (dest2_vnp = psip2->dest_list;
+ dest2_vnp != NULL;
+ dest2_vnp = dest2_vnp->next)
+ {
+ if (dest2_vnp->choice == 0)
+ {
+ /* already marked for deletion */
+ continue;
+ }
+ if (dest1_vnp->choice == dest2_vnp->choice
+ && dest1_vnp->data.ptrvalue == dest2_vnp->data.ptrvalue)
+ {
+ comb_txt = (CharPtr) (MemNew (sizeof (Char)
+ * (StringLen (psip1->parse_src_txt)
+ + StringLen (psip2->parse_src_txt)
+ + 2)));
+ StringCpy (comb_txt, psip1->parse_src_txt);
+ StringCat (comb_txt, ";");
+ StringCat (comb_txt, psip2->parse_src_txt);
+
+ /* If the first source has a single destination, then we can
+ * add the text from the second source to the first and remove
+ * the destination from the second source.
+ */
+ if (SourceHasOneUndeletedDestination (psip1))
+ {
+
+ psip1->parse_src_txt = MemFree (psip1->parse_src_txt);
+ psip1->parse_src_txt = comb_txt;
+ dest2_vnp->choice = 0;
+ }
+ /* If the first source has more than one destination and
+ * the second source has a single destination, then we can
+ * remove the repeated desination from the first source
+ * and add the text from the first source to the second source.
+ */
+ else if (SourceHasOneUndeletedDestination (psip2))
+ {
+ psip2->parse_src_txt = MemFree (psip2->parse_src_txt);
+ psip2->parse_src_txt = comb_txt;
+ dest1_vnp->choice = 0;
+ }
+ /* If the first and second sources have multiple destinations,
+ * we need to remove the repeated destination from both the first
+ * and second source and create a new source with the combined
+ * text for just the repeated destination.
+ */
+ else
+ {
+ new_psip = ParseSourceInfoNew (NULL, NULL, NULL, NULL, comb_txt);
+ ValNodeAddPointer (&(new_psip->dest_list),
+ dest1_vnp->choice,
+ dest1_vnp->data.ptrvalue);
+ dest1_vnp->choice = 0;
+ dest2_vnp->choice = 0;
+ source_new = ValNodeNew (NULL);
+ source_new->choice = 0;
+ source_new->data.ptrvalue = new_psip;
+ source_new->next = source1_vnp->next;
+ source1_vnp->next = source_new;
+ }
+ }
+ }
+ }
+
+ del_vnp = ValNodeExtractList (&(psip1->dest_list), 0);
+ del_vnp = ValNodeFree (del_vnp);
+ if (psip1->dest_list == NULL)
+ {
+ source1_vnp->choice = 1;
+ }
+ del_vnp = ValNodeExtractList (&(psip2->dest_list), 0);
+ del_vnp = ValNodeFree (del_vnp);
+ if (psip2->dest_list == NULL)
+ {
+ source2_vnp->choice = 1;
+ }
+ }
+ }
+
+ /* now remove sources deleted */
+ del_vnp = ValNodeExtractList (source_list, 1);
+ del_vnp = ParseSourceListFree (del_vnp);
+}
+
+
+static BioseqSetPtr GetPartsForSourceDescriptorOnSegSet (SeqDescrPtr sdp)
+{
+ ObjValNodePtr ovp;
+ BioseqSetPtr bssp;
+ SeqEntryPtr sep;
+
+ if (sdp == NULL || sdp->extended != 1) {
+ return NULL;
+ }
+ ovp = (ObjValNodePtr) sdp;
+ if (ovp->idx.parenttype != OBJ_BIOSEQSET || ovp->idx.parentptr == NULL) {
+ return NULL;
+ }
+ bssp = (BioseqSetPtr) ovp->idx.parentptr;
+
+ if (bssp->_class == BioseqseqSet_class_nuc_prot
+ && IS_Bioseq_set (bssp->seq_set)
+ && bssp->seq_set->data.ptrvalue != NULL) {
+ bssp = (BioseqSetPtr) bssp->seq_set->data.ptrvalue;
+ }
+
+ if (bssp->_class == BioseqseqSet_class_segset) {
+ sep = bssp->seq_set;
+ while (sep != NULL) {
+ if (IS_Bioseq_set (sep) && sep->data.ptrvalue != NULL) {
+ bssp = (BioseqSetPtr) sep->data.ptrvalue;
+ if (bssp->_class == BioseqseqSet_class_parts) {
+ return bssp;
+ }
+ }
+ sep = sep->next;
+ }
+ }
+
+ return NULL;
+}
+
+
+static SeqDescrPtr FindSourceDescriptorInSeqEntry (SeqEntryPtr sep)
+{
+ BioseqPtr bsp;
+ BioseqSetPtr bssp;
+ SeqDescrPtr sdp = NULL;
+
+ if (sep != NULL && sep->data.ptrvalue != NULL) {
+ if (IS_Bioseq (sep)) {
+ bsp = (BioseqPtr) sep->data.ptrvalue;
+ sdp = bsp->descr;
+ } else if (IS_Bioseq_set (sep)) {
+ bssp = (BioseqSetPtr) sep->data.ptrvalue;
+ sdp = bssp->descr;
+ }
+ while (sdp != NULL && sdp->choice != Seq_descr_source)
+ {
+ sdp = sdp->next;
+ }
+ }
+ return sdp;
+}
+
+
+static SeqDescrPtr PropagateToSeqEntry (SeqEntryPtr sep, SeqDescrPtr sdp)
+{
+ BioseqPtr bsp;
+ BioseqSetPtr bssp;
+ SeqDescrPtr new_sdp = NULL;
+
+ if (sep != NULL && sep->data.ptrvalue != NULL) {
+ if (IS_Bioseq (sep)) {
+ bsp = (BioseqPtr) sep->data.ptrvalue;
+ new_sdp = AsnIoMemCopy ((Pointer) sdp,
+ (AsnReadFunc) SeqDescrAsnRead,
+ (AsnWriteFunc) SeqDescrAsnWrite);
+ ValNodeLink (&(bsp->descr), new_sdp);
+ } else if (IS_Bioseq_set (sep)) {
+ bssp = (BioseqSetPtr) sep->data.ptrvalue;
+ new_sdp = AsnIoMemCopy ((Pointer) sdp,
+ (AsnReadFunc) SeqDescrAsnRead,
+ (AsnWriteFunc) SeqDescrAsnWrite);
+ ValNodeLink (&(bssp->descr), new_sdp);
+ }
+ }
+ return new_sdp;
+}
+
+
+static void PropagateSourceOnSegSetForParse (ValNodePtr parse_source_list)
+{
+ ParseSourceInfoPtr psip;
+ ValNodePtr vnp_src, vnp_dst;
+ SeqDescrPtr sdp, other_sdp;
+ SeqEntryPtr sep;
+ ValNodePtr extra_dests = NULL;
+ BioseqSetPtr parts_bssp;
+
+ for (vnp_src = parse_source_list; vnp_src != NULL; vnp_src = vnp_src->next) {
+ psip = (ParseSourceInfoPtr) vnp_src->data.ptrvalue;
+ if (psip != NULL) {
+ for (vnp_dst = psip->dest_list; vnp_dst != NULL; vnp_dst = vnp_dst->next) {
+ if (vnp_dst->choice == OBJ_SEQDESC) {
+ sdp = (SeqDescrPtr) vnp_dst->data.ptrvalue;
+ if (sdp != NULL && sdp->choice == Seq_descr_source) {
+ parts_bssp = GetPartsForSourceDescriptorOnSegSet (sdp);
+ if (parts_bssp != NULL) {
+ for (sep = parts_bssp->seq_set; sep != NULL; sep = sep->next) {
+ if (IS_Bioseq(sep) && sep->data.ptrvalue == psip->bsp) {
+ other_sdp = FindSourceDescriptorInSeqEntry (sep);
+ if (other_sdp == NULL) {
+ other_sdp = PropagateToSeqEntry (sep, sdp);
+ ValNodeAddPointer (&extra_dests, OBJ_SEQDESC, other_sdp);
+ }
+ }
+ }
+
+ /* set choice to 0 so master won't be a destination */
+ vnp_dst->choice = 0;
+
+ }
+ }
+ }
+ }
+ /* add extra destinations to list */
+ ValNodeLink (&psip->dest_list, extra_dests);
+ extra_dests = NULL;
+ }
+ }
+
+}
+
+
+static Boolean SetDBxrefForBioSource (BioSourcePtr biop, CharPtr db_name, CharPtr str, Uint2 existing_text)
+{
+ ValNodePtr dbx;
+ DbtagPtr dbtag;
+ Boolean found = FALSE;
+ Char buf[20];
+ Boolean rval = FALSE;
+
+ if (biop == NULL || StringHasNoText (db_name) || StringHasNoText (str)) {
+ return FALSE;
+ }
+
+ if (biop->org == NULL)
+ {
+ biop->org = OrgRefNew();
+ }
+ dbx = biop->org->db;
+ while (dbx != NULL && !found)
+ {
+ dbtag = (DbtagPtr) dbx->data.ptrvalue;
+ if (dbtag != NULL && dbtag->tag != NULL
+ && StringCmp (dbtag->db, db_name) == 0)
+ {
+ found = TRUE;
+ }
+ if (!found)
+ {
+ dbx = dbx->next;
+ }
+ }
+ if (!found)
+ {
+ dbtag = DbtagNew();
+ dbtag->db = StringSave (db_name);
+ ValNodeAddPointer (&(biop->org->db), 0, dbtag);
+ }
+ if (dbtag->tag == NULL)
+ {
+ dbtag->tag = ObjectIdNew();
+ }
+ /* if it was a number before, make it a string now */
+ if (dbtag->tag->id > 0 && dbtag->tag->str == NULL)
+ {
+ sprintf (buf, "%s", dbtag->tag->id);
+ dbtag->tag->id = 0;
+ dbtag->tag->str = StringSave (buf);
+ }
+ rval = SetStringValue (&(dbtag->tag->str), str, existing_text);
+ return rval;
+}
+
+
+static Int4 SetFieldForDestList (ValNodePtr dest_list, ParseDestPtr field, CharPtr str, Uint2 existing_text)
+{
+ ValNodePtr vnp;
+ SeqDescrPtr sdp;
+ CharPtr cp;
+ BioSourcePtr biop;
+ ParseDstOrgPtr o;
+ FeatureFieldLegalPtr fl;
+ FeatureField f;
+ Int4 num_succeeded = 0;
+
+ if (dest_list == NULL || field == NULL) return 0;
+
+ switch (field->choice) {
+ case ParseDest_defline :
+ for (vnp = dest_list; vnp != NULL; vnp = vnp->next) {
+ if (vnp->choice == OBJ_SEQDESC && vnp->data.ptrvalue != NULL) {
+ sdp = (SeqDescrPtr) vnp->data.ptrvalue;
+ if (sdp->choice == Seq_descr_title) {
+ cp = sdp->data.ptrvalue;
+ if (SetStringValue (&cp, str, existing_text)) {
+ num_succeeded++;
+ }
+ sdp->data.ptrvalue = cp;
+ }
+ }
+ }
+ break;
+ case ParseDest_org :
+ o = (ParseDstOrgPtr) field->data.ptrvalue;
+ if (o != NULL) {
+ for (vnp = dest_list; vnp != NULL; vnp = vnp->next) {
+ biop = GetBioSourceFromObject (vnp->choice, vnp->data.ptrvalue);
+ if (SetSourceQualInBioSource (biop, o->field, NULL, str, existing_text)) {
+ num_succeeded++;
+ }
+ }
+ }
+ break;
+ case ParseDest_featqual:
+ fl = (FeatureFieldLegalPtr) field->data.ptrvalue;
+ if (fl != NULL) {
+ f.type = fl->type;
+ f.field = ValNodeNew(NULL);
+ f.field->next = NULL;
+ f.field->choice = FeatQualChoice_legal_qual;
+ f.field->data.intvalue = fl->field;
+ for (vnp = dest_list; vnp != NULL; vnp = vnp->next) {
+ if (SetQualOnFeature (vnp->data.ptrvalue, &f, NULL, str, existing_text)) {
+ num_succeeded++;
+ }
+ }
+ f.field = ValNodeFree (f.field);
+ }
+ break;
+ case ParseDest_dbxref:
+ if (!StringHasNoText (field->data.ptrvalue)) {
+ for (vnp = dest_list; vnp != NULL; vnp = vnp->next) {
+ biop = GetBioSourceFromObject (vnp->choice, vnp->data.ptrvalue);
+ if (SetDBxrefForBioSource (biop, field->data.ptrvalue, str, existing_text)) {
+ num_succeeded++;
+ }
+ }
+ }
+ break;
+ }
+ return num_succeeded;
+}
+
+
+static void StripFieldForSrcList (ParseSourceInfoPtr psip, ParseSrcPtr field, TextPortionPtr text_portion)
+{
+ CharPtr str;
+ ParseSrcOrgPtr o;
+ BioSourcePtr biop;
+
+ if (psip == NULL || field == NULL || text_portion == NULL) return;
+
+ switch (field->choice) {
+ case ParseSrc_defline :
+ if (psip->sdp != NULL && psip->sdp->choice == Seq_descr_title) {
+ ReplaceStringForParse (psip->sdp->data.ptrvalue, text_portion);
+ }
+ break;
+ case ParseSrc_org :
+ o = (ParseSrcOrgPtr) field->data.ptrvalue;
+ if (o != NULL) {
+ if (psip->sdp != NULL && psip->sdp->choice == Seq_descr_source) {
+ biop = (BioSourcePtr) psip->sdp->data.ptrvalue;
+ str = GetSourceQualFromBioSource (biop, o->field, NULL);
+ ReplaceStringForParse (str, text_portion);
+ SetSourceQualInBioSource (biop, o->field, NULL, str, ExistingTextOption_replace_old);
+ str = MemFree (str);
+ } else if (psip->sfp != NULL && psip->sfp->data.choice == SEQFEAT_BIOSRC) {
+ biop = (BioSourcePtr) psip->sfp->data.value.ptrvalue;
+ str = GetSourceQualFromBioSource (biop, o->field, NULL);
+ ReplaceStringForParse (str, text_portion);
+ SetSourceQualInBioSource (biop, o->field, NULL, str, ExistingTextOption_replace_old);
+ str = MemFree (str);
+ }
+ }
+ break;
+ case ParseSrc_comment:
+ if (psip->sdp != NULL) {
+ if (psip->sdp->choice == Seq_descr_user) {
+ StripBankitCommentForParse (psip->sdp, text_portion);
+ } else if (psip->sdp->choice == Seq_descr_comment) {
+ ReplaceStringForParse (psip->sdp->data.ptrvalue, text_portion);
+ }
+ }
+ if (psip->sfp != NULL && psip->sfp->data.choice == SEQFEAT_COMMENT) {
+ ReplaceStringForParse (psip->sfp->data.value.ptrvalue, text_portion);
+ }
+ break;
+ case ParseSrc_bankit_comment:
+ if (psip->sdp != NULL && psip->sdp->choice == Seq_descr_user) {
+ StripBankitCommentForParse (psip->sdp, text_portion);
+ }
+ break;
+ case ParseSrc_structured_comment:
+ if (psip->sdp != NULL && psip->sdp->choice == Seq_descr_user) {
+ StripStructuredCommentForParse (psip->sdp, field->data.ptrvalue, text_portion);
+ }
+ break;
+ }
+}
+
+
+static Int4 ApplyParseActionToSeqEntry (ParseActionPtr action, SeqEntryPtr sep)
+{
+ ParseSrcCollectionData psd;
+ ParseSourceInfoPtr psip;
+ ValNodePtr orgnames = NULL, source_list_for_removal = NULL, vnp;
+ Int4 num_succeeded = 0;
+
+ if (action == NULL || sep == NULL) return 0;
+
+ psd.src = action->src;
+ psd.portion = action->portion;
+ psd.src_list = NULL;
+
+ /* first, we need to get a list of the parse sources */
+ VisitBioseqsInSep (sep, &psd, FindParseSourceBioseqCallback);
+
+ if (action->capitalization != Cap_change_none) {
+ /* if we will be fixing capitalization, get org names to use in fixes */
+ VisitBioSourcesInSep (sep, &orgnames, GetOrgNamesInRecordCallback);
+ }
+
+ /* for each parse source, we need to get a list of the destinations */
+ for (vnp = psd.src_list; vnp != NULL; vnp = vnp->next)
+ {
+ if (vnp->data.ptrvalue == NULL) continue;
+ psip = (ParseSourceInfoPtr) vnp->data.ptrvalue;
+ if (action->remove_from_parsed) {
+ ValNodeAddPointer (&source_list_for_removal, 0, ParseSourceInfoCopy (psip));
+ }
+ /* fix source text */
+ FixCapitalizationInString (&(psip->parse_src_txt), action->capitalization, orgnames);
+
+ /* find destinations */
+ AddParseDestinations (psip, action->dest);
+
+ }
+
+ /* free orgname list if we created it */
+ orgnames = ValNodeFree (orgnames);
+
+ CombineSourcesForDestinations (&(psd.src_list));
+
+ if (action->dest->choice == ParseDest_org) {
+ PropagateSourceOnSegSetForParse (psd.src_list);
+ }
+
+ /* now do the parsing */
+ for (vnp = psd.src_list; vnp != NULL; vnp = vnp->next) {
+ psip = (ParseSourceInfoPtr) vnp->data.ptrvalue;
+ num_succeeded += SetFieldForDestList (psip->dest_list, action->dest, psip->parse_src_txt, action->existing_text);
+ }
+
+ /* now remove strings from sources */
+ for (vnp = source_list_for_removal; vnp != NULL; vnp = vnp->next)
+ {
+ if (vnp->data.ptrvalue == NULL) continue;
+ psip = (ParseSourceInfoPtr) vnp->data.ptrvalue;
+ StripFieldForSrcList (psip, action->src, action->portion);
+ }
+ return num_succeeded;
+}
+
+
+static void SetCdRegionGeneticCode (SeqFeatPtr cds)
+{
+ CdRegionPtr crp;
+ SeqEntryPtr parent_sep;
+ BioseqPtr bsp;
+ Int4 genCode;
+ ValNodePtr code, vnp;
+
+ if (cds == NULL || cds->data.choice != SEQFEAT_CDREGION) return;
+ if (cds->data.value.ptrvalue == NULL) {
+ cds->data.value.ptrvalue = CdRegionNew();
+ }
+ crp = (CdRegionPtr) cds->data.value.ptrvalue;
+ bsp = BioseqFindFromSeqLoc (cds->location);
+ if (bsp == NULL) return;
+ parent_sep = GetBestTopParentForData (bsp->idx.entityID, bsp);
+ genCode = SeqEntryToGeneticCode (parent_sep, NULL, NULL, 0);
+
+ code = ValNodeNew (NULL);
+ if (code != NULL) {
+ code->choice = 254;
+ vnp = ValNodeNew (NULL);
+ code->data.ptrvalue = vnp;
+ if (vnp != NULL) {
+ vnp->choice = 2;
+ vnp->data.intvalue = genCode;
+ }
+ }
+ crp->genetic_code = code;
+}
+
+
+static void CreateDataForFeature (SeqFeatPtr sfp, Int4 feature_type)
+{
+ Int4 featdef, seqfeattype;
+ CharPtr label = NULL;
+ RnaRefPtr rrp;
+ GBQualPtr gbq;
+ ImpFeatPtr ifp;
+
+ featdef = GetFeatdefFromFeatureType (feature_type);
+ sfp->idx.subtype = featdef;
+ seqfeattype = FindFeatFromFeatDefType (featdef);
+ switch (seqfeattype) {
+ case SEQFEAT_GENE:
+ sfp->data.value.ptrvalue = GeneRefNew();
+ break;
+ case SEQFEAT_CDREGION:
+ sfp->data.value.ptrvalue = CdRegionNew();
+ SetCdRegionGeneticCode (sfp);
+ break;
+ case SEQFEAT_RNA:
+ rrp = RnaRefNew();
+ rrp->ext.choice = 0;
+ sfp->data.value.ptrvalue = rrp;
+ switch (featdef) {
+ case FEATDEF_preRNA:
+ rrp->type = RNA_TYPE_premsg;
+ break;
+ case FEATDEF_mRNA:
+ rrp->type = RNA_TYPE_mRNA;
+ break;
+ case FEATDEF_tRNA:
+ rrp->type = RNA_TYPE_tRNA;
+ break;
+ case FEATDEF_rRNA:
+ rrp->type = RNA_TYPE_rRNA;
+ break;
+ case FEATDEF_snRNA:
+ rrp->type = RNA_TYPE_other;
+ rrp->ext.choice = 1;
+ rrp->ext.value.ptrvalue = StringSave ("ncRNA");
+ gbq = GBQualNew ();
+ gbq->qual = StringSave ("ncRNA_class");
+ gbq->val = StringSave ("snRNA");
+ break;
+ case FEATDEF_scRNA:
+ rrp->type = RNA_TYPE_other;
+ rrp->ext.choice = 1;
+ rrp->ext.value.ptrvalue = StringSave ("ncRNA");
+ gbq = GBQualNew ();
+ gbq->qual = StringSave ("ncRNA_class");
+ gbq->val = StringSave ("scRNA");
+ break;
+ case FEATDEF_tmRNA:
+ rrp->type = RNA_TYPE_other;
+ rrp->ext.choice = 1;
+ rrp->ext.value.ptrvalue = StringSave ("tmRNA");
+ break;
+ case FEATDEF_ncRNA:
+ rrp->type = RNA_TYPE_other;
+ rrp->ext.choice = 1;
+ rrp->ext.value.ptrvalue = StringSave ("ncRNA");
+ break;
+ }
+ break;
+ case SEQFEAT_IMP:
+ ifp = ImpFeatNew();
+ sfp->data.value.ptrvalue = ifp;
+ label = GetFeatureNameFromFeatureType (feature_type);
+ ifp->key = StringSave (label);
+ break;
+ }
+}
+
+
+static void ExtraCDSCreationActions (SeqFeatPtr cds, SeqEntryPtr parent_sep)
+{
+ ByteStorePtr bs;
+ CharPtr prot, ptr;
+ BioseqPtr bsp;
+ Char ch;
+ Int4 i;
+ SeqEntryPtr psep, nsep;
+ MolInfoPtr mip;
+ ValNodePtr vnp, descr;
+ SeqFeatPtr prot_sfp;
+ ProtRefPtr prp;
+ Boolean partial5, partial3;
+
+ if (cds == NULL) return;
+
+ CheckSeqLocForPartial (cds->location, &partial5, &partial3);
+
+ /* Create corresponding protein sequence data for the CDS */
+
+ bs = ProteinFromCdRegionEx (cds, TRUE, FALSE);
+ if (NULL == bs)
+ return;
+
+ prot = BSMerge (bs, NULL);
+ bs = BSFree (bs);
+ if (NULL == prot)
+ return;
+
+ ptr = prot;
+ ch = *ptr;
+ while (ch != '\0') {
+ *ptr = TO_UPPER (ch);
+ ptr++;
+ ch = *ptr;
+ }
+ i = StringLen (prot);
+ if (i > 0 && prot [i - 1] == '*') {
+ prot [i - 1] = '\0';
+ }
+ bs = BSNew (1000);
+ if (bs != NULL) {
+ ptr = prot;
+ BSWrite (bs, (VoidPtr) ptr, (Int4) StringLen (ptr));
+ }
+
+ /* Create the product protein Bioseq */
+
+ bsp = BioseqNew ();
+ if (NULL == bsp)
+ return;
+
+ bsp->repr = Seq_repr_raw;
+ bsp->mol = Seq_mol_aa;
+ bsp->seq_data_type = Seq_code_ncbieaa;
+ bsp->seq_data = (SeqDataPtr) bs;
+ bsp->length = BSLen (bs);
+ bs = NULL;
+ bsp->id = MakeNewProteinSeqId (cds->location, NULL);
+ SeqMgrAddToBioseqIndex (bsp);
+
+ /* Create a new SeqEntry for the Prot Bioseq */
+
+ psep = SeqEntryNew ();
+ if (NULL == psep)
+ return;
+
+ psep->choice = 1;
+ psep->data.ptrvalue = (Pointer) bsp;
+ SeqMgrSeqEntry (SM_BIOSEQ, (Pointer) bsp, psep);
+
+ /* Add a descriptor to the protein Bioseq */
+
+ mip = MolInfoNew ();
+ if (NULL == mip)
+ return;
+
+ mip->biomol = 8;
+ mip->tech = 8;
+ if (partial5 && partial3) {
+ mip->completeness = 5;
+ } else if (partial5) {
+ mip->completeness = 3;
+ } else if (partial3) {
+ mip->completeness = 4;
+ }
+ vnp = CreateNewDescriptor (psep, Seq_descr_molinfo);
+ if (NULL == vnp)
+ return;
+
+ vnp->data.ptrvalue = (Pointer) mip;
+
+ /**/
+
+ descr = ExtractBioSourceAndPubs (parent_sep);
+
+ AddSeqEntryToSeqEntry (parent_sep, psep, TRUE);
+ nsep = FindNucSeqEntry (parent_sep);
+ ReplaceBioSourceAndPubs (parent_sep, descr);
+ SetSeqFeatProduct (cds, bsp);
+
+ prp = ProtRefNew ();
+
+ if (prp != NULL) {
+ prot_sfp = CreateNewFeature (psep, NULL, SEQFEAT_PROT, NULL);
+ if (prot_sfp != NULL) {
+ prot_sfp->data.value.ptrvalue = (Pointer) prp;
+ SetSeqLocPartial (prot_sfp->location, partial5, partial3);
+ prot_sfp->partial = (partial5 || partial3);
+ }
+ }
+}
+
+
+static SeqLocPtr LocationFromApplyFeatureAction (BioseqPtr bsp, ApplyFeatureActionPtr action)
+{
+ LocationIntervalPtr l;
+ SeqLocPtr slp = NULL;
+ Uint1 strand = Seq_strand_plus;
+ Int4 from, to;
+
+ if (bsp == NULL || action == NULL || action->location == NULL) return NULL;
+
+ if (!action->plus_strand) {
+ strand = Seq_strand_minus;
+ }
+ if (action->location->choice == LocationChoice_interval) {
+ l = (LocationIntervalPtr) action->location->data.ptrvalue;
+ if (l != NULL) {
+ from = MIN (l->from, l->to);
+ to = MAX (l->from, l->to);
+ slp = SeqLocIntNew (from, to, strand, SeqIdFindWorst (bsp->id));
+ }
+ } else if (action->location->choice == LocationChoice_whole_sequence) {
+ slp = SeqLocIntNew (0, bsp->length - 1, strand, SeqIdFindWorst (bsp->id));
+ }
+ SetSeqLocPartial (slp, action->partial5, action->partial3);
+ return slp;
+}
+
+
+static Boolean OkToApplyToBioseq (ApplyFeatureActionPtr action, BioseqPtr bsp)
+{
+ SeqFeatPtr sfp;
+ SeqMgrFeatContext context;
+ Int4 featdef;
+ Boolean rval = TRUE;
+
+ if (action == NULL || bsp == NULL) return FALSE;
+
+ if (!action->add_redundant) {
+ featdef = GetFeatdefFromFeatureType (action->type);
+ sfp = SeqMgrGetNextFeature (bsp, NULL, 0, featdef, &context);
+ if (sfp != NULL) {
+ rval = FALSE;
+ }
+ }
+ return rval;
+}
+
+static void AddParts (ApplyFeatureActionPtr action, BioseqSetPtr parts, ValNodePtr PNTR bsp_list)
+{
+ SeqEntryPtr sep;
+ Int4 seg_num;
+
+ if (action == NULL || !action->apply_to_parts
+ || parts == NULL || parts->_class != BioseqseqSet_class_parts
+ || bsp_list == NULL) {
+ return;
+ }
+
+ if (action->only_seg_num > -1) {
+ seg_num = 0;
+ sep = parts->seq_set;
+ while (seg_num < action->only_seg_num && sep != NULL) {
+ sep = sep->next;
+ seg_num++;
+ }
+ if (sep != NULL && IS_Bioseq (sep) && OkToApplyToBioseq (action, sep->data.ptrvalue)) {
+ ValNodeAddPointer (bsp_list, OBJ_BIOSEQ, sep->data.ptrvalue);
+ }
+ } else {
+ for (sep = parts->seq_set; sep != NULL; sep = sep->next) {
+ if (IS_Bioseq (sep) && OkToApplyToBioseq (action, sep->data.ptrvalue)) {
+ ValNodeAddPointer (bsp_list, OBJ_BIOSEQ, sep->data.ptrvalue);
+ }
+ }
+ }
+}
+
+
+static void AddSequenceOrParts (ApplyFeatureActionPtr action, BioseqPtr bsp, ValNodePtr PNTR bsp_list)
+{
+ BioseqSetPtr bssp, parts;
+ SeqEntryPtr sep;
+
+ if (action == NULL || bsp == NULL || bsp_list == NULL) return;
+
+ if (bsp->idx.parenttype == OBJ_BIOSEQSET && bsp->idx.parentptr != NULL) {
+ bssp = (BioseqSetPtr) bsp->idx.parentptr;
+ if (bssp->_class == BioseqseqSet_class_segset) {
+ if (action->apply_to_parts) {
+ sep = bssp->seq_set;
+ while (sep != NULL && !IS_Bioseq_set (sep)) {
+ sep = sep->next;
+ }
+ if (sep != NULL) {
+ AddParts (action, sep->data.ptrvalue, bsp_list);
+ }
+ } else {
+ if (OkToApplyToBioseq (action, bsp)) {
+ ValNodeAddPointer (bsp_list, OBJ_BIOSEQ, bsp);
+ }
+ }
+ } else if (bssp->_class == BioseqseqSet_class_parts) {
+ if (action->apply_to_parts) {
+ AddParts (action, bssp, bsp_list);
+ } else {
+ parts = bssp;
+ if (parts->idx.parenttype == OBJ_BIOSEQSET && parts->idx.parentptr != NULL) {
+ bssp = (BioseqSetPtr) parts->idx.parentptr;
+ if (IS_Bioseq (bssp->seq_set) && OkToApplyToBioseq (action, bssp->seq_set->data.ptrvalue)) {
+ ValNodeAddPointer (bsp_list, OBJ_BIOSEQ, bsp_list);
+ }
+ }
+ }
+ } else {
+ if (OkToApplyToBioseq (action, bsp)) {
+ ValNodeAddPointer (bsp_list, OBJ_BIOSEQ, bsp);
+ }
+ }
+ } else {
+ if (OkToApplyToBioseq (action, bsp)) {
+ ValNodeAddPointer (bsp_list, OBJ_BIOSEQ, bsp);
+ }
+ }
+}
+
+static void AddSequenceOrPartsFromSeqEntry (ApplyFeatureActionPtr action, SeqEntryPtr sep, ValNodePtr PNTR bsp_list)
+{
+ BioseqSetPtr bssp;
+ SeqEntryPtr seq_set;
+
+ if (action == NULL || sep == NULL) return;
+
+ while (sep != NULL) {
+ if (IS_Bioseq (sep)) {
+ AddSequenceOrParts (action, sep->data.ptrvalue, bsp_list);
+ } else if (IS_Bioseq_set (sep)) {
+ bssp = (BioseqSetPtr) sep->data.ptrvalue;
+ if (bssp->_class == BioseqseqSet_class_segset) {
+ /* find master segment */
+ seq_set = bssp->seq_set;
+ while (seq_set != NULL && !IS_Bioseq (seq_set)) {
+ seq_set = seq_set->next;
+ }
+ if (seq_set != NULL) {
+ AddSequenceOrParts (action, seq_set->data.ptrvalue, bsp_list);
+ }
+ } else if (bssp->_class == BioseqseqSet_class_nuc_prot) {
+ /* find nucleotide sequence */
+ seq_set = bssp->seq_set;
+ if (seq_set != NULL) {
+ if (IS_Bioseq_set (seq_set)) {
+ /* nucleotide is segmented set */
+ bssp = (BioseqSetPtr) seq_set->data.ptrvalue;
+ if (bssp != NULL && bssp->_class == BioseqseqSet_class_segset
+ && bssp->seq_set != NULL && IS_Bioseq (bssp->seq_set)) {
+ AddSequenceOrParts (action, bssp->seq_set->data.ptrvalue, bsp_list);
+ }
+ } else if (IS_Bioseq (seq_set)) {
+ AddSequenceOrParts (action, seq_set->data.ptrvalue, bsp_list);
+ }
+ }
+ } else {
+ /* add from set members */
+ AddSequenceOrPartsFromSeqEntry (action, bssp->seq_set, bsp_list);
+ }
+ }
+ sep = sep->next;
+ }
+}
+
+
+static void AdjustProteinSequenceForReadingFrame (SeqFeatPtr cds)
+{
+ BioseqPtr protbsp, bsp;
+ ByteStorePtr bs;
+ SeqFeatPtr prot_sfp;
+ Boolean partial5, partial3;
+
+ if (cds == NULL || cds->data.choice != SEQFEAT_CDREGION) return;
+
+ protbsp = BioseqFindFromSeqLoc (cds->product);
+
+ if (protbsp == NULL) {
+ bsp = BioseqFindFromSeqLoc (cds->location);
+ if (bsp != NULL) {
+ ExtraCDSCreationActions (cds, GetBestTopParentForData (bsp->idx.entityID, bsp));
+ }
+ } else {
+ bs = ProteinFromCdRegionExWithTrailingCodonHandling (cds,
+ TRUE,
+ FALSE,
+ FALSE);
+ protbsp->seq_data = (SeqDataPtr) BSFree ((ByteStorePtr)(protbsp->seq_data));
+ protbsp->seq_data = (SeqDataPtr) bs;
+ protbsp->length = BSLen (bs);
+ prot_sfp = GetProtFeature (protbsp);
+ if (prot_sfp == NULL) {
+ CheckSeqLocForPartial (cds->location, &partial5, &partial3);
+ prot_sfp = CreateNewFeatureOnBioseq (protbsp, SEQFEAT_PROT, NULL);
+ prot_sfp->data.value.ptrvalue = ProtRefNew ();
+ SetSeqLocPartial (prot_sfp->location, partial5, partial3);
+ prot_sfp->partial = (partial5 || partial3);
+ } else {
+ if (SeqLocLen (prot_sfp->location) != protbsp->length) {
+ prot_sfp->location = SeqLocFree (prot_sfp->location);
+ prot_sfp->location = SeqLocIntNew (0, protbsp->length - 1, Seq_strand_plus, SeqIdFindWorst (protbsp->id));
+ }
+ }
+ }
+}
+
+
+static Int4 ApplyApplyFeatureActionToSeqEntry (ApplyFeatureActionPtr action, SeqEntryPtr sep)
+{
+ ValNodePtr bsp_list = NULL, vnp, field_vnp;
+ Int4 featdef, seqfeattype;
+ BioseqPtr bsp;
+ SeqFeatPtr sfp;
+ SeqLocPtr slp;
+ FeatQualLegalValPtr q;
+ FeatureField f;
+ SeqIdPtr sip;
+ SeqFeatPtr gene;
+ Int4 num_created = 0;
+
+ if (sep == NULL || action == NULL) return 0;
+
+ /* first, get list of Bioseqs to apply features to */
+ /* relevant values : seq_list, add_redundant, apply_to_parts, only_seg_num */
+ if (action->seq_list != NULL && action->seq_list->choice == SequenceListChoice_list) {
+ for (vnp = action->seq_list->data.ptrvalue; vnp != NULL; vnp = vnp->next) {
+ sip = CreateSeqIdFromText (vnp->data.ptrvalue, sep);
+ bsp = BioseqFind (sip);
+ if (bsp != NULL) {
+ AddSequenceOrParts (action, bsp, &bsp_list);
+ }
+ }
+ } else {
+ AddSequenceOrPartsFromSeqEntry (action, sep, &bsp_list);
+ }
+
+ /* now add feature to each bioseq in list */
+ for (vnp = bsp_list; vnp != NULL; vnp = vnp->next) {
+ bsp = vnp->data.ptrvalue;
+ if (bsp == NULL) continue;
+ featdef = GetFeatdefFromFeatureType (action->type);
+ seqfeattype = FindFeatFromFeatDefType (featdef);
+ slp = LocationFromApplyFeatureAction (bsp, action);
+ sfp = CreateNewFeatureOnBioseq (bsp, seqfeattype, slp);
+ if (sfp == NULL) continue;
+ CreateDataForFeature (sfp, action->type);
+ /* any extra actions */
+ switch (action->type) {
+ case (Feature_type_cds) :
+ ExtraCDSCreationActions (sfp, GetBestTopParentForData (bsp->idx.entityID, bsp));
+ break;
+ }
+ gene = NULL;
+ for (field_vnp = action->fields; field_vnp != NULL; field_vnp = field_vnp->next) {
+ q = (FeatQualLegalValPtr) field_vnp->data.ptrvalue;
+ if (q != NULL) {
+ f.field = ValNodeNew(NULL);
+ f.field->next = NULL;
+ f.field->choice = FeatQualChoice_legal_qual;
+ f.field->data.intvalue = q->qual;
+ if (sfp->data.choice != SEQFEAT_GENE
+ && (q->qual == Feat_qual_legal_gene || q->qual == Feat_qual_legal_gene_description)) {
+ if (gene == NULL) {
+ gene = CreateNewFeatureOnBioseq (bsp, SEQFEAT_GENE, slp);
+ CreateDataForFeature (gene, Feature_type_gene);
+ }
+ f.type = Feature_type_gene;
+ SetQualOnFeature (gene, &f, NULL, q->val, ExistingTextOption_replace_old);
+ } else {
+ f.type = action->type;
+ SetQualOnFeature (sfp, &f, NULL, q->val, ExistingTextOption_replace_old);
+ }
+ }
+ }
+ if (action->type == Feature_type_cds) {
+ /* retranslate, to account for change in reading frame */
+ AdjustProteinSequenceForReadingFrame (sfp);
+ /* after the feature has been created, then adjust it for gaps */
+ /* Note - this step may result in multiple coding regions being created. */
+ AdjustCDSLocationsForUnknownGapsCallback (sfp, NULL);
+ }
+ num_created++;
+ }
+ return num_created;
+}
+
+
+typedef struct convertandremovefeaturecollection {
+ Uint1 featdef;
+ ValNodePtr constraint_set;
+ ValNodePtr feature_list;
+} ConvertAndRemoveFeatureCollectionData, PNTR ConvertAndRemoveFeatureCollectionPtr;
+
+static void ConvertAndRemoveFeatureCollectionCallback (SeqFeatPtr sfp, Pointer data)
+{
+ ConvertAndRemoveFeatureCollectionPtr p;
+
+ if (sfp == NULL || data == NULL) return;
+
+ p = (ConvertAndRemoveFeatureCollectionPtr) data;
+ if (sfp->idx.subtype == p->featdef && DoesObjectMatchConstraintChoiceSet (OBJ_SEQFEAT, sfp, p->constraint_set)) {
+ ValNodeAddPointer (&(p->feature_list), OBJ_SEQFEAT, sfp);
+ }
+}
+
+
+static Int4 ApplyRemoveFeatureActionToSeqEntry (RemoveFeatureActionPtr action, SeqEntryPtr sep)
+{
+ ConvertAndRemoveFeatureCollectionData d;
+ ValNodePtr vnp;
+ SeqFeatPtr sfp;
+ Int4 num_deleted = 0;
+
+ if (action == NULL) return 0;
+
+ d.featdef = GetFeatdefFromFeatureType (action->type);
+ d.constraint_set = action->constraint;
+ d.feature_list = NULL;
+
+ VisitFeaturesInSep (sep, &d, ConvertAndRemoveFeatureCollectionCallback);
+ for (vnp = d.feature_list; vnp != NULL; vnp = vnp->next) {
+ sfp = vnp->data.ptrvalue;
+ if (sfp != NULL) {
+ sfp->idx.deleteme = TRUE;
+ num_deleted ++;
+ }
+ }
+ DeleteMarkedObjects (ObjMgrGetEntityIDForChoice(sep), 0, NULL);
+ return num_deleted;
+}
+
+
+static Boolean DoesStrandMatch (Int4 strand_choice, Uint1 strand_val)
+{
+ Boolean rval = FALSE;
+
+ switch (strand_choice)
+ {
+ case Feature_location_strand_from_any:
+ rval = TRUE;
+ break;
+ case Feature_location_strand_from_unknown:
+ if (strand_val == Seq_strand_unknown)
+ {
+ rval = TRUE;
+ }
+ break;
+ case Feature_location_strand_from_plus:
+ if (strand_val != Seq_strand_minus)
+ {
+ rval = TRUE;
+ }
+ break;
+ case Feature_location_strand_from_minus:
+ if (strand_val == Seq_strand_minus)
+ {
+ rval = TRUE;
+ }
+ break;
+ case Feature_location_strand_from_both:
+ if (strand_val == Seq_strand_both)
+ {
+ rval = TRUE;
+ }
+ break;
+ }
+ return rval;
+}
+
+
+static Uint1 GetNewStrandValue (Int4 strand_choice, Uint1 strand_val)
+{
+ Uint1 rval = Seq_strand_unknown;
+
+ switch (strand_choice)
+ {
+ case Feature_location_strand_to_reverse:
+ switch (strand_val)
+ {
+ case Seq_strand_plus:
+ case Seq_strand_unknown:
+ rval = Seq_strand_minus;
+ break;
+ case Seq_strand_minus:
+ rval = Seq_strand_plus;
+ break;
+ default:
+ rval = strand_val;
+ break;
+ }
+ break;
+ case Feature_location_strand_to_unknown:
+ rval = Seq_strand_unknown;
+ break;
+ case Feature_location_strand_to_plus:
+ rval = Seq_strand_plus;
+ break;
+ case Feature_location_strand_to_minus:
+ rval = Seq_strand_minus;
+ break;
+ case Feature_location_strand_to_both:
+ rval = Seq_strand_both;
+ break;
+ }
+ return rval;
+}
+
+
+static Boolean ConvertLocationStrand (SeqLocPtr slp, Int4 fromStrand, Int4 toStrand)
+{
+ SeqLocPtr loc;
+ PackSeqPntPtr psp;
+ SeqBondPtr sbp;
+ SeqIntPtr sinp;
+ SeqPntPtr spp;
+ Boolean rval = FALSE;
+ Uint1 strand_orig;
+
+ while (slp != NULL) {
+ switch (slp->choice) {
+ case SEQLOC_NULL :
+ break;
+ case SEQLOC_EMPTY :
+ case SEQLOC_WHOLE :
+ break;
+ case SEQLOC_INT :
+ sinp = (SeqIntPtr) slp->data.ptrvalue;
+ if (sinp != NULL && DoesStrandMatch (fromStrand, sinp->strand))
+ {
+ strand_orig = sinp->strand;
+ sinp->strand = GetNewStrandValue (toStrand, sinp->strand);
+ if (strand_orig != sinp->strand) {
+ rval = TRUE;
+ }
+ }
+ break;
+ case SEQLOC_PNT :
+ spp = (SeqPntPtr) slp->data.ptrvalue;
+ if (spp != NULL && DoesStrandMatch (fromStrand, spp->strand))
+ {
+ strand_orig = spp->strand;
+ spp->strand = GetNewStrandValue (toStrand, spp->strand);
+ if (strand_orig != spp->strand) {
+ rval = TRUE;
+ }
+ }
+ break;
+ case SEQLOC_PACKED_PNT :
+ psp = (PackSeqPntPtr) slp->data.ptrvalue;
+ if (psp != NULL && DoesStrandMatch (fromStrand, psp->strand))
+ {
+ strand_orig = psp->strand;
+ psp->strand = GetNewStrandValue (toStrand, psp->strand);
+ if (strand_orig != psp->strand) {
+ rval = TRUE;
+ }
+ }
+ break;
+ case SEQLOC_PACKED_INT :
+ case SEQLOC_MIX :
+ case SEQLOC_EQUIV :
+ loc = (SeqLocPtr) slp->data.ptrvalue;
+ while (loc != NULL) {
+ rval |= ConvertLocationStrand (loc, fromStrand, toStrand);
+ loc = loc->next;
+ }
+ break;
+ case SEQLOC_BOND :
+ sbp = (SeqBondPtr) slp->data.ptrvalue;
+ if (sbp != NULL) {
+ spp = (SeqPntPtr) sbp->a;
+ if (spp != NULL && DoesStrandMatch (fromStrand, spp->strand))
+ {
+ strand_orig = spp->strand;
+ spp->strand = GetNewStrandValue (toStrand, spp->strand);
+ if (strand_orig != spp->strand) {
+ rval = TRUE;
+ }
+ }
+ spp = (SeqPntPtr) sbp->b;
+ if (spp != NULL && DoesStrandMatch (fromStrand, spp->strand))
+ {
+ strand_orig = spp->strand;
+ spp->strand = GetNewStrandValue (toStrand, spp->strand);
+ if (strand_orig != spp->strand) {
+ rval = TRUE;
+ }
+ }
+ }
+ break;
+ case SEQLOC_FEAT :
+ break;
+ default :
+ break;
+ }
+ slp = slp->next;
+ }
+ return rval;
+}
+
+
+static Boolean ApplyEditLocationStrandToSeqFeat (EditLocationStrandPtr edit, SeqFeatPtr sfp)
+{
+ Boolean rval = FALSE;
+
+ if (edit == NULL || sfp == NULL) {
+ return FALSE;
+ }
+
+ rval = ConvertLocationStrand (sfp->location, edit->strand_from, edit->strand_to);
+ return rval;
+}
+
+
+static Boolean At5EndOfSequence (SeqLocPtr slp, BioseqPtr bsp)
+{
+ Uint1 strand;
+ Int4 start;
+ Boolean at_end = FALSE;
+
+ if (slp == NULL || bsp == NULL) return FALSE;
+
+ strand = SeqLocStrand (slp);
+
+ if (strand == Seq_strand_minus) {
+ start = SeqLocStop (slp);
+ if (start == bsp->length - 1) {
+ at_end = TRUE;
+ }
+ } else {
+ start = SeqLocStart (slp);
+ if (start == 0) {
+ at_end = TRUE;
+ }
+ }
+ return at_end;
+}
+
+
+static Boolean HasGoodStartCodon (SeqFeatPtr sfp)
+{
+ ByteStorePtr bs;
+ CharPtr prot;
+ Boolean has_start = FALSE;
+
+ if (sfp != NULL && sfp->data.choice == SEQFEAT_CDREGION) {
+ bs = ProteinFromCdRegionEx (sfp, TRUE, FALSE);
+ if (bs != NULL) {
+ prot = BSMerge (bs, NULL);
+ bs = BSFree (bs);
+ if (prot != NULL && *prot == 'M') {
+ has_start = TRUE;
+ }
+ prot = MemFree (prot);
+ }
+ }
+ return has_start;
+}
+
+
+static Boolean ApplyPartial5SetActionToSeqFeat (Partial5SetActionPtr action, SeqFeatPtr sfp)
+{
+ Boolean rval = FALSE;
+ Boolean make_partial = FALSE;
+ Uint1 strand;
+ BioseqPtr bsp;
+ CdRegionPtr crp;
+ Boolean partial5, partial3;
+
+ if (action == NULL || sfp == NULL) return FALSE;
+ bsp = BioseqFindFromSeqLoc (sfp->location);
+ strand = SeqLocStrand (sfp->location);
+
+ switch (action->constraint) {
+ case Partial_5_set_constraint_all:
+ make_partial = TRUE;
+ break;
+ case Partial_5_set_constraint_at_end:
+ make_partial = At5EndOfSequence (sfp->location, bsp);
+ break;
+ case Partial_5_set_constraint_bad_start:
+ make_partial = HasGoodStartCodon (sfp);
+ break;
+ case Partial_5_set_constraint_frame_not_one:
+ if (sfp->data.choice == SEQFEAT_CDREGION
+ && (crp = sfp->data.value.ptrvalue) != NULL
+ && crp->frame != 0 && crp->frame != 1) {
+ make_partial = TRUE;
+ }
+ break;
+ }
+
+ if (make_partial) {
+ CheckSeqLocForPartial (sfp->location, &partial5, &partial3);
+ if (!partial5) {
+ SetSeqLocPartial (sfp->location, TRUE, partial3);
+ if (action->extend && bsp != NULL) {
+ ExtendSeqLocToEnd (sfp->location, bsp, TRUE);
+ }
+ rval = TRUE;
+ }
+ }
+ return rval;
+}
+
+
+static Boolean ApplyClear5PartialToSeqFeat (Int4 action, SeqFeatPtr sfp)
+{
+ Boolean rval = FALSE, clear_partial = FALSE;
+ Boolean partial5, partial3;
+
+ if (sfp == NULL) return FALSE;
+
+ switch (action) {
+ case Partial_5_clear_constraint_all:
+ clear_partial = TRUE;
+ break;
+ case Partial_5_clear_constraint_not_at_end:
+ clear_partial = !At5EndOfSequence(sfp->location, BioseqFindFromSeqLoc (sfp->location));
+ break;
+ case Partial_5_clear_constraint_good_start:
+ clear_partial = !HasGoodStartCodon(sfp);
+ break;
+ }
+ if (clear_partial) {
+ CheckSeqLocForPartial (sfp->location, &partial5, &partial3);
+ if (partial5) {
+ SetSeqLocPartial (sfp->location, FALSE, partial3);
+ rval = TRUE;
+ }
+ }
+ return rval;
+}
+
+
+static Boolean At3EndOfSequence (SeqLocPtr slp, BioseqPtr bsp)
+{
+ Uint1 strand;
+ Int4 stop;
+ Boolean at_end = FALSE;
+
+ if (slp == NULL || bsp == NULL) return FALSE;
+
+ strand = SeqLocStrand (slp);
+
+ if (strand == Seq_strand_minus) {
+ stop = SeqLocStart (slp);
+ if (stop == 0) {
+ at_end = TRUE;
+ }
+ } else {
+ stop = SeqLocStop (slp);
+ if (stop == bsp->length - 1) {
+ at_end = TRUE;
+ }
+ }
+ return at_end;
+}
+
+
+static Boolean HasGoodStopCodon (SeqFeatPtr sfp)
+{
+ ByteStorePtr bs;
+ CharPtr prot;
+ Boolean has_stop = FALSE;
+
+ if (sfp != NULL && sfp->data.choice == SEQFEAT_CDREGION) {
+ bs = ProteinFromCdRegionEx (sfp, TRUE, FALSE);
+ if (bs != NULL) {
+ prot = BSMerge (bs, NULL);
+ bs = BSFree (bs);
+ if (prot != NULL && prot[StringLen (prot) - 1] == '*') {
+ has_stop = TRUE;
+ }
+ prot = MemFree (prot);
+ }
+ }
+ return has_stop;
+}
+
+
+static Boolean ApplyPartial3SetActionToSeqFeat (Partial3SetActionPtr action, SeqFeatPtr sfp)
+{
+ Boolean rval = FALSE;
+ Boolean make_partial = FALSE;
+ Uint1 strand;
+ BioseqPtr bsp;
+ Boolean partial5, partial3;
+
+ if (action == NULL || sfp == NULL) return FALSE;
+ bsp = BioseqFindFromSeqLoc (sfp->location);
+ strand = SeqLocStrand (sfp->location);
+
+ switch (action->constraint) {
+ case Partial_3_set_constraint_all:
+ make_partial = TRUE;
+ break;
+ case Partial_3_set_constraint_at_end:
+ make_partial = At3EndOfSequence (sfp->location, bsp);
+ break;
+ case Partial_3_set_constraint_bad_end:
+ make_partial = HasGoodStopCodon (sfp);
+ break;
+ }
+
+ if (make_partial) {
+ CheckSeqLocForPartial (sfp->location, &partial5, &partial3);
+ if (!partial3) {
+ SetSeqLocPartial (sfp->location, partial5, TRUE);
+ if (action->extend && bsp != NULL) {
+ ExtendSeqLocToEnd (sfp->location, bsp, FALSE);
+ }
+ rval = TRUE;
+ }
+ }
+ return rval;
+}
+
+
+static Boolean ApplyClear3PartialToSeqFeat (Int4 action, SeqFeatPtr sfp)
+{
+ Boolean rval = FALSE, clear_partial = FALSE;
+ Boolean partial5, partial3;
+
+ if (sfp == NULL) return FALSE;
+
+ switch (action) {
+ case Partial_3_clear_constraint_all:
+ clear_partial = TRUE;
+ break;
+ case Partial_3_clear_constraint_not_at_end:
+ clear_partial = !At3EndOfSequence(sfp->location, BioseqFindFromSeqLoc (sfp->location));
+ break;
+ case Partial_3_clear_constraint_good_end:
+ clear_partial = !HasGoodStopCodon(sfp);
+ break;
+ }
+ if (clear_partial) {
+ CheckSeqLocForPartial (sfp->location, &partial5, &partial3);
+ if (partial3) {
+ SetSeqLocPartial (sfp->location, partial5, FALSE);
+ rval = TRUE;
+ }
+ }
+ return rval;
+}
+
+
+static Boolean ApplyConvertLocationToSeqFeat (Int4 convert_location, SeqFeatPtr sfp)
+{
+ Boolean hasNulls, rval = FALSE;
+ SeqLocPtr slp;
+ BioseqPtr bsp;
+ Boolean partial5, partial3;
+
+ if (sfp == NULL || (bsp = BioseqFindFromSeqLoc (sfp->location))== NULL) {
+ return FALSE;
+ }
+
+ CheckSeqLocForPartial (sfp->location, &partial5, &partial3);
+ hasNulls = LocationHasNullsBetween (sfp->location);
+ switch (convert_location)
+ {
+ case Convert_location_type_join :
+ if (hasNulls)
+ {
+ slp = SeqLocMerge (bsp, sfp->location, NULL, FALSE, FALSE, FALSE);
+ sfp->location = SeqLocFree (sfp->location);
+ sfp->location = slp;
+ if (bsp->repr == Seq_repr_seg)
+ {
+ slp = SegLocToPartsEx (bsp, sfp->location, FALSE);
+ sfp->location = SeqLocFree (sfp->location);
+ sfp->location = slp;
+ hasNulls = LocationHasNullsBetween (sfp->location);
+ sfp->partial = (sfp->partial || hasNulls);
+ }
+ FreeAllFuzz (sfp->location);
+ SetSeqLocPartial (sfp->location, partial5, partial3);
+ rval = TRUE;
+ }
+ break;
+ case Convert_location_type_order :
+ if (!hasNulls)
+ {
+ slp = SeqLocMerge (bsp, sfp->location, NULL, FALSE, FALSE, TRUE);
+ sfp->location = SeqLocFree (sfp->location);
+ sfp->location = slp;
+ if (bsp->repr == Seq_repr_seg)
+ {
+ slp = SegLocToPartsEx (bsp, sfp->location, TRUE);
+ sfp->location = SeqLocFree (sfp->location);
+ sfp->location = slp;
+ hasNulls = LocationHasNullsBetween (sfp->location);
+ sfp->partial = (sfp->partial || hasNulls);
+ }
+ FreeAllFuzz (sfp->location);
+ SetSeqLocPartial (sfp->location, partial5, partial3);
+ rval = TRUE;
+ }
+ break;
+ case Convert_location_type_merge :
+ if (sfp->location->choice != SEQLOC_INT) {
+ slp = SeqLocMerge (bsp, sfp->location, NULL, TRUE, FALSE, FALSE);
+ sfp->location = SeqLocFree (sfp->location);
+ sfp->location = slp;
+ SetSeqLocPartial (sfp->location, partial5, partial3);
+ rval = TRUE;
+ }
+ default:
+ break;
+ }
+ return rval;
+}
+
+
+static Boolean ApplyLocationEditTypeToSeqFeat (ValNodePtr action, SeqFeatPtr sfp)
+{
+ Boolean rval = FALSE;
+
+ if (action == NULL || sfp == NULL) {
+ return FALSE;
+ }
+
+ switch (action->choice) {
+ case LocationEditType_strand:
+ rval = ApplyEditLocationStrandToSeqFeat (action->data.ptrvalue, sfp);
+ break;
+ case LocationEditType_set_5_partial:
+ rval = ApplyPartial5SetActionToSeqFeat (action->data.ptrvalue, sfp);
+ break;
+ case LocationEditType_clear_5_partial:
+ rval = ApplyClear5PartialToSeqFeat (action->data.intvalue, sfp);
+ break;
+ case LocationEditType_set_3_partial:
+ rval = ApplyPartial3SetActionToSeqFeat (action->data.ptrvalue, sfp);
+ break;
+ case LocationEditType_clear_3_partial:
+ rval = ApplyClear3PartialToSeqFeat (action->data.intvalue, sfp);
+ break;
+ case LocationEditType_convert:
+ rval = ApplyConvertLocationToSeqFeat (action->data.intvalue, sfp);
+ break;
+ }
+ return rval;
+}
+
+
+static Int4 ApplyEditFeatureLocationActionToSeqEntry (EditFeatureLocationActionPtr action, SeqEntryPtr sep)
+{
+ ConvertAndRemoveFeatureCollectionData d;
+ ValNodePtr vnp;
+ SeqFeatPtr sfp;
+ Int4 num_affected = 0;
+
+ if (action == NULL) return 0;
+
+ d.featdef = GetFeatdefFromFeatureType (action->type);
+ d.constraint_set = action->constraint;
+ d.feature_list = NULL;
+
+ VisitFeaturesInSep (sep, &d, ConvertAndRemoveFeatureCollectionCallback);
+ for (vnp = d.feature_list; vnp != NULL; vnp = vnp->next) {
+ sfp = vnp->data.ptrvalue;
+ if (sfp != NULL && ApplyLocationEditTypeToSeqFeat (action->action, sfp)) {
+ num_affected++;
+ }
+ }
+ return num_affected;
+}
+
+
+NLM_EXTERN void ApplyMacroToSeqEntry (SeqEntryPtr sep, ValNodePtr macro, Int4Ptr pNumFields, Int4Ptr pNumFeat)
+{
+ Int4 num_AECR = 0, num_parse = 0, num_feature = 0, num_fields = 0;
+
+ while (macro != NULL) {
+ switch (macro->choice) {
+ case MacroActionChoice_aecr:
+ num_AECR += ApplyAECRActionToSeqEntry ((AECRActionPtr) macro->data.ptrvalue, sep);
+ break;
+ case MacroActionChoice_parse:
+ num_parse += ApplyParseActionToSeqEntry ((ParseActionPtr) macro->data.ptrvalue, sep);
+ break;
+ case MacroActionChoice_add_feature:
+ num_feature += ApplyApplyFeatureActionToSeqEntry ((ApplyFeatureActionPtr) macro->data.ptrvalue, sep);
+ SeqMgrIndexFeatures (ObjMgrGetEntityIDForChoice(sep), NULL);
+ break;
+ case MacroActionChoice_remove_feature:
+ num_feature += ApplyRemoveFeatureActionToSeqEntry ((RemoveFeatureActionPtr) macro->data.ptrvalue, sep);
+ break;
+ case MacroActionChoice_edit_location:
+ num_fields += ApplyEditFeatureLocationActionToSeqEntry ((EditFeatureLocationActionPtr) macro->data.ptrvalue, sep);
+ break;
+ }
+ macro = macro->next;
+ }
+ if (pNumFields != NULL) {
+ *pNumFields = num_AECR + num_parse + num_fields;
+ }
+ if (pNumFeat != NULL) {
+ *pNumFeat = num_feature;
+ }
+}
+
+
+/* for generating text descriptions of macro objects */
+NLM_EXTERN CharPtr SummarizeSourceQual (ValNodePtr field)
+{
+ CharPtr summ = NULL, locname, origname;
+ Int4 genome, origin;
+ CharPtr loc_fmt = "location %s";
+ CharPtr orig_fmt = "origin %s";
+
+ if (field == NULL) return NULL;
+ switch (field->choice) {
+ case SourceQualChoice_textqual:
+ summ = StringSave (GetSourceQualName (field->data.intvalue));
+ break;
+ case SourceQualChoice_location:
+ genome = GenomeFromSrcLoc (field->data.intvalue);
+ locname = LocNameFromGenome (genome);
+ summ = (CharPtr) MemNew (sizeof (Char) * (StringLen (loc_fmt) + StringLen (locname)));
+ sprintf (summ, loc_fmt, locname);
+ break;
+ case SourceQualChoice_origin:
+ origin = OriginFromSrcOrig (field->data.intvalue);
+ origname = OriginNameFromOrigin (origin);
+ summ = (CharPtr) MemNew (sizeof (Char) * (StringLen (orig_fmt) + StringLen (origname)));
+ sprintf (summ, orig_fmt, origname);
+ break;
+ }
+ return summ;
+}
+
+
+NLM_EXTERN CharPtr FeatureFieldLabel (CharPtr feature_name, ValNodePtr field)
+{
+ CharPtr cp;
+ CharPtr label = NULL;
+ CharPtr legal_fmt = "%s %s";
+ CharPtr illegal_fmt = "constrained field on %s";
+
+ if (feature_name == NULL) {
+ feature_name = "Unknown feature";
+ }
+
+ if (field == NULL) {
+ return StringSave ("missing field");
+ } else if (field->choice == FeatQualChoice_legal_qual) {
+ cp = GetFeatQualName (field->data.intvalue);
+ if (cp == NULL) cp = "Unknown field type";
+ label = (CharPtr) MemNew (sizeof (Char) * (StringLen (legal_fmt) + StringLen (feature_name) + StringLen (cp)));
+ sprintf (label, legal_fmt, feature_name, cp);
+ } else if (field->choice == FeatQualChoice_illegal_qual) {
+ label = (CharPtr) MemNew (sizeof (Char) * (StringLen (illegal_fmt) + StringLen (feature_name)));
+ sprintf (label, illegal_fmt, feature_name);
+ } else {
+ label = StringSave ("illegal field value");
+ }
+ return label;
+}
+
+
+NLM_EXTERN Boolean IsFeatureFieldEmpty (FeatureFieldPtr field)
+{
+ if (field == NULL) return TRUE;
+ if (field->field == NULL) return TRUE;
+ return FALSE;
+}
+
+
+NLM_EXTERN Boolean IsFieldTypeEmpty (FieldTypePtr field)
+{
+ Boolean rval = TRUE;
+
+ if (field == NULL) return TRUE;
+ switch (field->choice) {
+ case FieldType_source_qual:
+ if (field->data.ptrvalue != NULL) {
+ rval = FALSE;
+ }
+ break;
+ case FieldType_feature_field:
+ if (!IsFeatureFieldEmpty (field->data.ptrvalue)) {
+ rval = FALSE;
+ }
+ break;
+ case FieldType_cds_gene_prot:
+ rval = FALSE;
+ break;
+ }
+ return rval;
+}
+
+
+NLM_EXTERN CharPtr SummarizeFieldType (ValNodePtr vnp)
+{
+ FeatureFieldPtr ffp;
+ CharPtr str = NULL;
+ CharPtr label = NULL;
+
+ if (vnp == NULL) {
+ str = StringSave ("missing field");
+ } else {
+ switch (vnp->choice) {
+ case FieldType_source_qual:
+ str = SummarizeSourceQual (vnp->data.ptrvalue);
+ break;
+ case FieldType_feature_field:
+ ffp = (FeatureFieldPtr) vnp->data.ptrvalue;
+ if (ffp == NULL || ffp->field == NULL) {
+ str = StringSave ("missing field");
+ } else {
+ label = GetFeatureNameFromFeatureType (ffp->type);
+ str = FeatureFieldLabel (label, ffp->field);
+ }
+ break;
+ case FieldType_cds_gene_prot:
+ str = StringSaveNoNull (CDSGeneProtNameFromField (vnp->data.intvalue));
+ if (str == NULL) {
+ str = StringSave ("Invalid CDS-Gene-Prot Field");
+ }
+ break;
+ case FieldType_molinfo_field:
+ str = GetSequenceQualName (vnp->data.ptrvalue);
+ if (str == NULL) {
+ str = StringSave ("Invalid Sequence Qual Field");
+ }
+ break;
+ default:
+ str = StringSave ("Invalid field type");
+ break;
+ }
+ }
+ return str;
+}
+
+
+/* for table readers that use the macro language functions */
+NLM_EXTERN TabColumnConfigPtr TabColumnConfigNew (void)
+{
+ TabColumnConfigPtr t;
+
+ t = (TabColumnConfigPtr) MemNew (sizeof (TabColumnConfigData));
+ t->field = NULL;
+ t->existing_text = ExistingTextOption_replace_old;
+ t->skip_blank = TRUE;
+ return t;
+}
+
+
+
+NLM_EXTERN TabColumnConfigPtr TabColumnConfigFree (TabColumnConfigPtr t)
+{
+ if (t != NULL) {
+ t->field = FieldTypeFree (t->field);
+ t = MemFree (t);
+ }
+ return t;
+}
+
+
+NLM_EXTERN TabColumnConfigPtr TabColumnConfigCopy (TabColumnConfigPtr orig)
+{
+ TabColumnConfigPtr t = NULL;
+
+ if (orig != NULL) {
+ t = TabColumnConfigNew ();
+ t->match_type = orig->match_type;
+ t->existing_text = orig->existing_text;
+ t->skip_blank = orig->skip_blank;
+ t->match_mrna = orig->match_mrna;
+ t->field = AsnIoMemCopy (orig->field, (AsnReadFunc) FieldTypeAsnRead, (AsnWriteFunc) FieldTypeAsnWrite);
+ }
+ return t;
+}
+
+
+NLM_EXTERN ValNodePtr TabColumnConfigListFree (ValNodePtr columns)
+{
+ ValNodePtr vnp_next;
+
+ while (columns != NULL) {
+ vnp_next = columns->next;
+ columns->data.ptrvalue = TabColumnConfigFree (columns->data.ptrvalue);
+ columns->next = NULL;
+ columns = ValNodeFree (columns);
+ columns = vnp_next;
+ }
+ return columns;
+}
+
+
+NLM_EXTERN ValNodePtr TabColumnConfigListCopy (ValNodePtr orig)
+{
+ ValNodePtr new_list = NULL;
+ TabColumnConfigPtr t;
+
+ while (orig != NULL) {
+ t = TabColumnConfigCopy (orig->data.ptrvalue);
+ ValNodeAddPointer (&new_list, 0, t);
+ orig = orig->next;
+ }
+ return new_list;
+}
+
+
+
+/* This checks the column names and returns a list of the feature fields */
+NLM_EXTERN ValNodePtr ValidateFeatureFieldColumnNames (ValNodePtr header_line, ValNodePtr PNTR perr_list)
+{
+ ValNodePtr header_vnp;
+ ValNodePtr err_list = NULL, col_list = NULL;
+ Boolean rval = TRUE;
+ TabColumnConfigPtr t;
+ FeatureFieldPtr field;
+ Int4 featqual, feat_type;
+ CharPtr first_space;
+
+ if (header_line == NULL)
+ {
+ return FALSE;
+ }
+
+ header_vnp = header_line->data.ptrvalue;
+ if (header_vnp == NULL || header_vnp->next == NULL)
+ {
+ return FALSE;
+ }
+
+ /* skip ID column */
+ header_vnp = header_vnp->next;
+ while (header_vnp != NULL && rval)
+ {
+ first_space = StringChr (header_vnp->data.ptrvalue, ' ');
+ if (first_space != NULL) {
+ *first_space = 0;
+ feat_type = GetFeatureTypeByName (header_vnp->data.ptrvalue);
+ featqual = GetFeatQualByName (first_space + 1);
+ *first_space = ' ';
+ if (feat_type < 0 || featqual < 0) {
+ /* unable to recognize column name */
+ ValNodeAddPointer (&err_list, 0, StringSave (header_vnp->data.ptrvalue));
+ /* if we're not able to send back a list of errors, just quit now */
+ if (perr_list == NULL) {
+ rval = FALSE;
+ }
+ } else if (err_list == NULL) {
+ /* if we've already found errors, don't bother collecting more fields */
+ field = FeatureFieldNew ();
+ field->type = feat_type;
+ field->field = ValNodeNew (NULL);
+ field->field->choice = FeatQualChoice_legal_qual;
+ field->field->data.intvalue = featqual;
+ t = TabColumnConfigNew ();
+ t->field = ValNodeNew (NULL);
+ t->field->choice = FieldType_feature_field;
+ t->field->data.ptrvalue = field;
+ ValNodeAddPointer (&col_list, 0, t);
+ }
+ } else {
+ featqual = GetFeatQualByName (header_vnp->data.ptrvalue);
+ if (featqual < 0) {
+ /* unable to recognize column name */
+ ValNodeAddPointer (&err_list, 0, StringSave (header_vnp->data.ptrvalue));
+ /* if we're not able to send back a list of errors, just quit now */
+ if (perr_list == NULL) {
+ rval = FALSE;
+ }
+ } else if (err_list == NULL) {
+ /* if we've already found errors, don't bother collecting more fields */
+ field = FeatureFieldNew ();
+ field->type = Feature_type_any;
+ field->field = ValNodeNew (NULL);
+ field->field->choice = FeatQualChoice_legal_qual;
+ field->field->data.intvalue = featqual;
+ t = TabColumnConfigNew ();
+ t->field = ValNodeNew (NULL);
+ t->field->choice = FieldType_feature_field;
+ t->field->data.ptrvalue = field;
+ ValNodeAddPointer (&col_list, 0, t);
+ }
+ }
+ header_vnp = header_vnp->next;
+ }
+ if (err_list != NULL) {
+ col_list = TabColumnConfigListFree (col_list);
+ if (perr_list != NULL) {
+ *perr_list = err_list;
+ } else {
+ err_list = ValNodeFreeData (err_list);
+ }
+ }
+ return col_list;
+}
+
+typedef struct findgenelocustag {
+ CharPtr locus_tag;
+ ValNodePtr gene_list;
+} FindGeneLocusTagData, PNTR FindGeneLocusTagPtr;
+
+static void FindGeneByLocusTagBioseqCallback (BioseqPtr bsp, Pointer userdata)
+{
+ FindGeneLocusTagPtr p;
+ SeqFeatPtr gene;
+ SeqMgrFeatContext fcontext;
+
+ if (bsp == NULL || userdata == NULL || !ISA_na (bsp->mol)) {
+ return;
+ }
+
+ p = (FindGeneLocusTagPtr) userdata;
+
+ gene = SeqMgrGetGeneByLocusTag (bsp, p->locus_tag, &fcontext);
+ if (gene != NULL) {
+ ValNodeAddPointer (&p->gene_list, OBJ_SEQFEAT, gene);
+ }
+}
+
+
+typedef struct objbystr {
+ ValNodePtr obj_list;
+ CharPtr str;
+} ObjByStrData, PNTR ObjByStrPtr;
+
+static void GetFeaturesByDbxrefCallback (SeqFeatPtr sfp, Pointer userdata)
+{
+ ObjByStrPtr p;
+ ValNodePtr vnp;
+ DbtagPtr dbt;
+ Char buf[20];
+ Boolean found = FALSE;
+
+ if (sfp == NULL || sfp->dbxref == NULL || userdata == NULL) return;
+ p = (ObjByStrPtr) userdata;
+
+ if (StringHasNoText (p->str)) return;
+
+ for (vnp = sfp->dbxref; vnp != NULL && !found; vnp = vnp->next) {
+ dbt = (DbtagPtr) vnp->data.ptrvalue;
+ if (dbt != NULL && dbt->tag != NULL) {
+ if (dbt->tag->id > 0) {
+ sprintf (buf, "%d", dbt->tag->id);
+ if (StringCmp (buf, p->str) == 0) {
+ found = TRUE;
+ }
+ } else if (StringCmp (dbt->tag->str, p->str) == 0) {
+ found = TRUE;
+ }
+ }
+ }
+ if (found) {
+ ValNodeAddPointer (&(p->obj_list), OBJ_SEQFEAT, sfp);
+ }
+
+}
+
+
+static ValNodePtr GetFeaturesByDbxref (SeqEntryPtr sep, CharPtr dbxref)
+{
+ ObjByStrData d;
+
+ d.str = dbxref;
+ d.obj_list = NULL;
+ VisitFeaturesInSep (sep, &d, GetFeaturesByDbxrefCallback);
+ return d.obj_list;
+}
+
+
+static void GetBioSourcesByTaxNameDescriptorCallback (SeqDescrPtr sdp, Pointer userdata)
+{
+ ObjByStrPtr p;
+ BioSourcePtr biop;
+
+ if (sdp == NULL || sdp->choice != Seq_descr_source || userdata == NULL) return;
+ p = (ObjByStrPtr) userdata;
+
+ if (StringHasNoText (p->str)) return;
+
+ biop = (BioSourcePtr) sdp->data.ptrvalue;
+ if (biop != NULL && biop->org != NULL && StringCmp (biop->org->taxname, p->str) == 0) {
+ ValNodeAddPointer (&(p->obj_list), OBJ_SEQDESC, sdp);
+ }
+
+}
+
+
+static void GetBioSourcesByTaxNameFeatureCallback (SeqFeatPtr sfp, Pointer userdata)
+{
+ ObjByStrPtr p;
+ BioSourcePtr biop;
+
+ if (sfp == NULL || sfp->data.choice != SEQFEAT_BIOSRC || userdata == NULL) return;
+ p = (ObjByStrPtr) userdata;
+
+ if (StringHasNoText (p->str)) return;
+
+ biop = (BioSourcePtr) sfp->data.value.ptrvalue;
+ if (biop != NULL && biop->org != NULL && StringCmp (biop->org->taxname, p->str) == 0) {
+ ValNodeAddPointer (&(p->obj_list), OBJ_SEQFEAT, sfp);
+ }
+
+}
+
+
+static ValNodePtr GetBioSourcesByTaxName (SeqEntryPtr sep, CharPtr taxname)
+{
+ ObjByStrData d;
+
+ d.str = taxname;
+ d.obj_list = NULL;
+ VisitDescriptorsInSep (sep, &d, GetBioSourcesByTaxNameDescriptorCallback);
+
+ VisitFeaturesInSep (sep, &d, GetBioSourcesByTaxNameFeatureCallback);
+ return d.obj_list;
+}
+
+
+
+static ValNodePtr
+FindMatchForRow
+(ValNodePtr match_type,
+ Uint2 entityID,
+ SeqEntryPtr sep)
+{
+ ValNodePtr match_list = NULL;
+ SeqIdPtr sip;
+ BioseqPtr bsp, nbsp = NULL;
+ FindGeneLocusTagData fd;
+ SeqFeatPtr sfp;
+ SeqMgrFeatContext fcontext;
+
+ if (match_type == NULL || sep == NULL) return NULL;
+
+ switch (match_type->choice) {
+ case eTableMatchFeatureID:
+ sfp = SeqMgrGetFeatureByFeatID (entityID, NULL, match_type->data.ptrvalue, NULL, &fcontext);
+ if (sfp != NULL) {
+ ValNodeAddPointer (&match_list, OBJ_SEQFEAT, sfp);
+ }
+ break;
+ case eTableMatchGeneLocusTag:
+ fd.locus_tag = match_type->data.ptrvalue;
+ fd.gene_list = NULL;
+ VisitBioseqsInSep (sep, &fd, FindGeneByLocusTagBioseqCallback);
+ ValNodeLink (&match_list, fd.gene_list);
+ break;
+ case eTableMatchProteinID:
+ case eTableMatchNucID:
+ sip = CreateSeqIdFromText (match_type->data.ptrvalue, sep);
+ bsp = BioseqFind (sip);
+ sip = SeqIdFree (sip);
+ if (bsp != NULL)
+ {
+ ValNodeAddPointer (&match_list, OBJ_BIOSEQ, bsp);
+ }
+ break;
+ case eTableMatchDbxref:
+ match_list = GetFeaturesByDbxref (sep, match_type->data.ptrvalue);
+ break;
+ case eTableMatchBioSource:
+ match_list = GetBioSourcesByTaxName (sep, match_type->data.ptrvalue);
+ break;
+ }
+ return match_list;
+}
+
+
+static ValNodePtr GetFeatureListForProteinBioseq (Uint1 featdef, BioseqPtr bsp)
+{
+ ValNodePtr feat_list = NULL;
+ SeqFeatPtr sfp, cds;
+ SeqMgrFeatContext fcontext;
+ Int4 seqfeattype;
+
+ if (bsp == NULL || !ISA_aa (bsp->mol))
+ {
+ return NULL;
+ }
+
+ seqfeattype = FindFeatFromFeatDefType (featdef);
+ if (seqfeattype == SEQFEAT_PROT)
+ {
+ for (sfp = SeqMgrGetNextFeature (bsp, NULL, 0, featdef, &fcontext);
+ sfp != NULL;
+ sfp = SeqMgrGetNextFeature (bsp, sfp, 0, featdef, &fcontext))
+ {
+ ValNodeAddPointer (&feat_list, OBJ_SEQFEAT, sfp);
+ }
+ }
+ else
+ {
+ cds = SeqMgrGetCDSgivenProduct (bsp, NULL);
+ if (cds != NULL)
+ {
+ if (featdef == FEATDEF_CDS)
+ {
+ sfp = cds;
+ }
+ else if (featdef == FEATDEF_GENE)
+ {
+ sfp = GetGeneForFeature (cds);
+ }
+ else if (featdef == FEATDEF_mRNA)
+ {
+ sfp = SeqMgrGetOverlappingmRNA (cds->location, &fcontext);
+ }
+ if (sfp != NULL)
+ {
+ ValNodeAddPointer (&feat_list, OBJ_SEQFEAT, sfp);
+ }
+ }
+ }
+ return feat_list;
+}
+
+
+static ValNodePtr GetFeatureListForNucleotideBioseq (Uint1 featdef, BioseqPtr bsp)
+{
+ ValNodePtr feat_list = NULL;
+ SeqFeatPtr sfp;
+ SeqMgrFeatContext fcontext;
+ Int4 seqfeattype;
+ BioseqPtr prot_bsp;
+
+ if (bsp == NULL || ISA_aa (bsp->mol))
+ {
+ return NULL;
+ }
+
+ seqfeattype = FindFeatFromFeatDefType (featdef);
+ if (seqfeattype == SEQFEAT_PROT)
+ {
+ for (sfp = SeqMgrGetNextFeature (bsp, NULL, 0, FEATDEF_CDS, &fcontext);
+ sfp != NULL;
+ sfp = SeqMgrGetNextFeature (bsp, sfp, 0, FEATDEF_CDS, &fcontext))
+ {
+ prot_bsp = BioseqFindFromSeqLoc (sfp->product);
+ ValNodeLink (&feat_list, GetFeatureListForProteinBioseq (featdef, prot_bsp));
+ }
+ }
+ else
+ {
+ for (sfp = SeqMgrGetNextFeature (bsp, NULL, 0, featdef, &fcontext);
+ sfp != NULL;
+ sfp = SeqMgrGetNextFeature (bsp, sfp, 0, featdef, &fcontext))
+ {
+ ValNodeAddPointer (&feat_list, OBJ_SEQFEAT, sfp);
+ }
+ }
+ return feat_list;
+}
+
+
+static ValNodePtr GetFeaturesForGene (SeqFeatPtr gene, Uint1 featdef)
+{
+ BioseqPtr bsp;
+ SeqFeatPtr sfp;
+ ValNodePtr feat_list = NULL;
+ SeqMgrFeatContext fcontext;
+ Int4 start, stop, swap;
+
+ if (gene == NULL) return NULL;
+
+ bsp = BioseqFindFromSeqLoc (gene->location);
+ start = SeqLocStart (gene->location);
+ stop = SeqLocStop (gene->location);
+ if (stop < start)
+ {
+ swap = start;
+ start = stop;
+ stop = swap;
+ }
+ for (sfp = SeqMgrGetNextFeature (bsp, NULL, 0, featdef, &fcontext);
+ sfp != NULL && fcontext.left < stop;
+ sfp = SeqMgrGetNextFeature (bsp, sfp, 0, featdef, &fcontext))
+ {
+ if (fcontext.right >= start && gene == GetGeneForFeature (sfp))
+ {
+ ValNodeAddPointer (&feat_list, OBJ_SEQFEAT, sfp);
+ }
+ }
+ return feat_list;
+}
+
+
+static ValNodePtr GetFeatureListForGene (Uint1 featdef, SeqFeatPtr gene)
+{
+ ValNodePtr feat_list = NULL, cds_list, vnp;
+ SeqFeatPtr sfp, cds;
+ SeqMgrFeatContext fcontext;
+ BioseqPtr protbsp;
+
+ if (gene == NULL)
+ {
+ return NULL;
+ }
+
+ if (featdef == FEATDEF_GENE)
+ {
+ ValNodeAddPointer (&feat_list, OBJ_SEQFEAT, gene);
+ }
+ else if (FindFeatFromFeatDefType (featdef == SEQFEAT_PROT))
+ {
+ cds_list = GetFeaturesForGene (gene, FEATDEF_CDS);
+ for (vnp = cds_list; vnp != NULL; vnp = vnp->next)
+ {
+ cds = vnp->data.ptrvalue;
+ if (cds != NULL)
+ {
+ protbsp = BioseqFindFromSeqLoc (cds->product);
+ for (sfp = SeqMgrGetNextFeature (protbsp, NULL, 0, featdef, &fcontext);
+ sfp != NULL;
+ sfp = SeqMgrGetNextFeature (protbsp, sfp, 0, featdef, &fcontext))
+ {
+ ValNodeAddPointer (&feat_list, OBJ_SEQFEAT, sfp);
+ }
+ }
+ }
+ cds_list = ValNodeFree (cds_list);
+ }
+ else
+ {
+ feat_list = GetFeaturesForGene (gene, featdef);
+ }
+
+ return feat_list;
+}
+
+
+static ValNodePtr AddFeaturesFromBioseqSet (BioseqSetPtr bssp, Uint1 featdef)
+{
+ SeqEntryPtr sep;
+ BioseqPtr bsp;
+ Int4 seqfeattype;
+ ValNodePtr item_list = NULL;
+
+ if (bssp == NULL) return NULL;
+
+ seqfeattype = FindFeatFromFeatDefType (featdef);
+ for (sep = bssp->seq_set; sep != NULL; sep = sep->next) {
+ if (sep->data.ptrvalue == NULL) continue;
+ if (IS_Bioseq (sep)) {
+ bsp = sep->data.ptrvalue;
+ if (seqfeattype == SEQFEAT_PROT) {
+ if (ISA_aa (bsp->mol)) {
+ ValNodeLink (&item_list, GetFeatureListForProteinBioseq (featdef, bsp));
+ }
+ } else if (!ISA_aa (bsp->mol)) {
+ ValNodeLink (&item_list, GetFeatureListForNucleotideBioseq (featdef, bsp));
+ }
+ } else if (IS_Bioseq_set (sep)) {
+ ValNodeLink (&item_list, AddFeaturesFromBioseqSet (sep->data.ptrvalue, featdef));
+ }
+ }
+ return item_list;
+}
+
+
+static ValNodePtr GetFeatureListForBioSourceObjects (ValNodePtr item_list, FeatureFieldPtr field)
+{
+ ValNodePtr vnp;
+ SeqFeatPtr sfp;
+ SeqDescrPtr sdp;
+ BioseqPtr bsp;
+ ObjValNodePtr ovp;
+ ValNodePtr feature_list = NULL;
+
+ if (item_list == NULL || field == NULL) return NULL;
+
+ for (vnp = item_list; vnp != NULL; vnp = vnp->next) {
+ if (vnp->choice == OBJ_SEQFEAT) {
+ sfp = vnp->data.ptrvalue;
+ if (sfp != NULL) {
+ bsp = BioseqFindFromSeqLoc (sfp->location);
+ ValNodeLink (&feature_list, GetFeatureListForNucleotideBioseq (GetFeatdefFromFeatureType(field->type), bsp));
+ }
+ } else if (vnp->choice == OBJ_SEQDESC) {
+ sdp = vnp->data.ptrvalue;
+ if (sdp != NULL && sdp->extended != 0) {
+ ovp = (ObjValNodePtr) sdp;
+ if (ovp->idx.parenttype == OBJ_BIOSEQSET) {
+ ValNodeLink (&feature_list, AddFeaturesFromBioseqSet (ovp->idx.parentptr, GetFeatdefFromFeatureType(field->type)));
+ } else if (ovp->idx.parenttype == OBJ_BIOSEQ) {
+ bsp = (BioseqPtr) ovp->idx.parentptr;
+ ValNodeLink (&feature_list, GetFeatureListForNucleotideBioseq (GetFeatdefFromFeatureType(field->type), bsp));
+ }
+ }
+ }
+ }
+ return feature_list;
+}
+
+
+static ValNodePtr ValNodeCopyPtr (ValNodePtr orig)
+{
+ ValNodePtr new_list = NULL, last_vnp = NULL, vnp;
+
+ while (orig != NULL) {
+ vnp = ValNodeNew (NULL);
+ vnp->choice = orig->choice;
+ vnp->data.ptrvalue = orig->data.ptrvalue;
+ if (last_vnp == NULL) {
+ new_list = vnp;
+ } else {
+ last_vnp->next = vnp;
+ }
+ last_vnp = vnp;
+ orig = orig->next;
+ }
+ return new_list;
+}
+
+
+static ValNodePtr GetFeatureListForRowAndColumn (Uint1 match_type, ValNodePtr match_list, FeatureFieldPtr field)
+{
+ ValNodePtr feature_list = NULL, vnp;
+
+ if (match_list == NULL || field == NULL) return NULL;
+
+ switch (match_type) {
+ case eTableMatchFeatureID:
+ feature_list = ValNodeCopyPtr (match_list);
+ break;
+ case eTableMatchGeneLocusTag:
+ for (vnp = match_list; vnp != NULL; vnp = vnp->next) {
+ ValNodeLink (&feature_list, GetFeatureListForGene (GetFeatdefFromFeatureType(field->type), vnp->data.ptrvalue));
+ }
+ break;
+ case eTableMatchProteinID:
+ for (vnp = match_list; vnp != NULL; vnp = vnp->next) {
+ ValNodeLink (&feature_list, GetFeatureListForProteinBioseq (GetFeatdefFromFeatureType(field->type), vnp->data.ptrvalue));
+ }
+ break;
+ case eTableMatchDbxref:
+ feature_list = ValNodeCopyPtr (match_list);
+ break;
+ case eTableMatchNucID:
+ for (vnp = match_list; vnp != NULL; vnp = vnp->next) {
+ ValNodeLink (&feature_list, GetFeatureListForNucleotideBioseq (GetFeatdefFromFeatureType(field->type), vnp->data.ptrvalue));
+ }
+ break;
+ case eTableMatchBioSource:
+ ValNodeLink (&feature_list, GetFeatureListForBioSourceObjects (match_list, field));
+ break;
+ }
+ return feature_list;
+}
+
+
+static void AddBioSourcesForBioseq (BioseqPtr bsp, ValNodePtr PNTR feature_list)
+{
+ SeqDescrPtr sdp;
+ SeqMgrDescContext context;
+
+ if (feature_list == NULL) return;
+ for (sdp = SeqMgrGetNextDescriptor (bsp, NULL, Seq_descr_source, &context);
+ sdp != NULL;
+ sdp = SeqMgrGetNextDescriptor (bsp, sdp, Seq_descr_source, &context)) {
+ ValNodeAddPointer (feature_list, OBJ_SEQDESC, sdp);
+ }
+}
+
+static void AddBioSourcesForFeature (SeqFeatPtr sfp, ValNodePtr PNTR feature_list)
+{
+ BioseqPtr bsp;
+
+ if (sfp == NULL || feature_list == NULL) return;
+
+ if (sfp->data.choice == SEQFEAT_BIOSRC) {
+ ValNodeAddPointer (feature_list, OBJ_SEQFEAT, sfp);
+ } else {
+ bsp = BioseqFindFromSeqLoc (sfp->location);
+ AddBioSourcesForBioseq (bsp, feature_list);
+ }
+}
+
+
+static ValNodePtr GetBioSourceListForRowAndColumn (Uint1 match_type, ValNodePtr match_list, FeatureFieldPtr field)
+{
+ ValNodePtr feature_list = NULL, vnp;
+
+ if (match_list == NULL || field == NULL) return NULL;
+
+ switch (match_type) {
+ case eTableMatchFeatureID:
+ for (vnp = match_list; vnp != NULL; vnp = vnp->next) {
+ if (vnp->choice == OBJ_SEQFEAT && vnp->data.ptrvalue != NULL) {
+ AddBioSourcesForFeature (vnp->data.ptrvalue, &feature_list);
+ }
+ }
+ break;
+ case eTableMatchGeneLocusTag:
+ for (vnp = match_list; vnp != NULL; vnp = vnp->next) {
+ if (vnp->choice == OBJ_SEQFEAT && vnp->data.ptrvalue != NULL) {
+ AddBioSourcesForFeature (vnp->data.ptrvalue, &feature_list);
+ }
+ }
+ break;
+ case eTableMatchProteinID:
+ case eTableMatchNucID:
+ for (vnp = match_list; vnp != NULL; vnp = vnp->next) {
+ if (vnp->choice == OBJ_BIOSEQ) {
+ AddBioSourcesForBioseq (vnp->data.ptrvalue, &feature_list);
+ }
+ }
+ break;
+ case eTableMatchDbxref:
+ for (vnp = match_list; vnp != NULL; vnp = vnp->next) {
+ if (vnp->choice == OBJ_SEQFEAT && vnp->data.ptrvalue != NULL) {
+ AddBioSourcesForFeature (vnp->data.ptrvalue, &feature_list);
+ }
+ }
+ break;
+ case eTableMatchBioSource:
+ feature_list = ValNodeCopyPtr (match_list);
+ break;
+ }
+ return feature_list;
+}
+
+
+static ValNodePtr GetTargetListForRowAndColumn (Uint1 match_type, ValNodePtr match_list, FieldTypePtr field)
+{
+ ValNodePtr target_list = NULL;
+ FeatureFieldPtr feature_field;
+
+ if (field == NULL) return NULL;
+ switch (field->choice) {
+ case FieldType_source_qual:
+ target_list = GetBioSourceListForRowAndColumn (match_type, match_list, field->data.ptrvalue);
+ break;
+ case FieldType_feature_field:
+ target_list = GetFeatureListForRowAndColumn (match_type, match_list, field->data.ptrvalue);
+ break;
+ case FieldType_cds_gene_prot:
+ feature_field = FeatureFieldFromCDSGeneProtField (field->data.intvalue);
+ target_list = GetFeatureListForRowAndColumn (match_type, match_list, feature_field);
+ feature_field = FeatureFieldFree (feature_field);
+ break;
+ }
+ return target_list;
+}
+
+
+static void ReportMissingTargets (ValNodePtr PNTR perr_list, FieldTypePtr ft, CharPtr match_val, Int4 col_num, Int4 line_num)
+{
+ CharPtr feat_name;
+ FeatureFieldPtr field;
+ CharPtr no_feat_fmt = "No %s feature for %s (column %d, line %d)";
+ CharPtr no_src_fmt = "No biosource for %s (column %d, line %d)";
+ CharPtr err_msg;
+
+ if (perr_list == NULL || ft == NULL || match_val == NULL) return;
+
+ switch (ft->choice) {
+ case FieldType_source_qual:
+ err_msg = (CharPtr) MemNew (sizeof (Char) * (StringLen (no_feat_fmt)
+ + StringLen (match_val)
+ + 30));
+ sprintf (err_msg, no_src_fmt, match_val, col_num, line_num);
+ ValNodeAddPointer (perr_list, 0, err_msg);
+ break;
+ case FieldType_feature_field:
+ field = (FeatureFieldPtr) ft->data.ptrvalue;
+ if (field != NULL) {
+ feat_name = GetFeatureNameFromFeatureType (field->type);
+ err_msg = (CharPtr) MemNew (sizeof (Char) * (StringLen (no_feat_fmt)
+ + StringLen (feat_name)
+ + StringLen (match_val)
+ + 30));
+ sprintf (err_msg, no_feat_fmt, feat_name, match_val, col_num, line_num);
+ ValNodeAddPointer (perr_list, 0, err_msg);
+ }
+ break;
+ case FieldType_cds_gene_prot:
+ field = FeatureFieldFromCDSGeneProtField (ft->data.intvalue);
+ if (field != NULL) {
+ feat_name = GetFeatureNameFromFeatureType (field->type);
+ err_msg = (CharPtr) MemNew (sizeof (Char) * (StringLen (no_feat_fmt)
+ + StringLen (feat_name)
+ + StringLen (match_val)
+ + 30));
+ sprintf (err_msg, no_feat_fmt, feat_name, match_val, col_num, line_num);
+ ValNodeAddPointer (perr_list, 0, err_msg);
+ }
+ field = FeatureFieldFree (field);
+ break;
+ }
+}
+
+
+static void ReportEmptyIDColumn (ValNodePtr PNTR perr_list, Int4 line_num)
+{
+ CharPtr err_msg;
+ CharPtr missing_id_fmt = "No ID for line %d";
+
+ err_msg = (CharPtr) MemNew (sizeof (Char) * (StringLen (missing_id_fmt) + 15));
+ sprintf (err_msg, missing_id_fmt, line_num);
+ ValNodeAddPointer (perr_list, 0, err_msg);
+}
+
+static ValNodePtr FindMatchChoiceInLine (ValNodePtr val_vnp, ValNodePtr col_vnp)
+{
+ TabColumnConfigPtr t;
+
+ while (val_vnp != NULL && col_vnp != NULL) {
+ t = (TabColumnConfigPtr) col_vnp->data.ptrvalue;
+ if (t != NULL && t->match_type > 0) {
+ val_vnp->choice = (Uint1) t->match_type;
+ return val_vnp;
+ }
+ val_vnp = val_vnp->next;
+ col_vnp = col_vnp->next;
+ }
+ return NULL;
+}
+
+
+NLM_EXTERN SeqFeatPtr GetmRNAForFeature (SeqFeatPtr sfp)
+{
+ SeqMgrFeatContext fcontext;
+ BioseqPtr pbsp;
+
+ if (sfp == NULL) return NULL;
+ if (sfp->data.choice == SEQFEAT_PROT)
+ {
+ pbsp = BioseqFindFromSeqLoc (sfp->location);
+ sfp = SeqMgrGetCDSgivenProduct (pbsp, NULL);
+ if (sfp == NULL) return NULL;
+ }
+ return SeqMgrGetOverlappingmRNA (sfp->location, &fcontext);
+}
+
+
+NLM_EXTERN Boolean AdjustmRNAProductToMatchProteinProduct (SeqFeatPtr sfp)
+{
+ SeqFeatPtr mrna;
+ ProtRefPtr prp;
+ RnaRefPtr rrp;
+
+ if (sfp == NULL || sfp->data.choice != SEQFEAT_PROT) return FALSE;
+
+ prp = (ProtRefPtr) sfp->data.value.ptrvalue;
+ mrna = GetmRNAForFeature (sfp);
+
+ if (mrna == NULL) return FALSE;
+
+ rrp = (RnaRefPtr) mrna->data.value.ptrvalue;
+ if (rrp == NULL)
+ {
+ rrp = RnaRefNew();
+ mrna->data.value.ptrvalue = rrp;
+ }
+
+ rrp->ext.value.ptrvalue = MemFree (rrp->ext.value.ptrvalue);
+ if (prp == NULL || prp->name == NULL || StringHasNoText (prp->name->data.ptrvalue))
+ {
+ rrp->ext.choice = 0;
+ }
+ else
+ {
+ rrp->ext.choice = 1;
+ rrp->ext.value.ptrvalue = StringSave (prp->name->data.ptrvalue);
+ }
+ return TRUE;
+}
+
+
+NLM_EXTERN Boolean IsFieldTypeCDSProduct (FieldTypePtr ft)
+{
+ FeatureFieldPtr field;
+ Boolean rval = FALSE;
+
+ if (ft == NULL) return FALSE;
+ if (ft->choice == FieldType_feature_field) {
+ field = (FeatureFieldPtr) ft->data.ptrvalue;
+ if (field != NULL && field->type == Feature_type_cds
+ && field->field != NULL
+ && field->field->choice == FeatQualChoice_legal_qual
+ && field->field->data.intvalue == Feat_qual_legal_product) {
+ rval = TRUE;
+ }
+ } else if (ft->choice == FieldType_cds_gene_prot) {
+ if (ft->data.intvalue == CDSGeneProt_field_prot_name) {
+ rval = TRUE;
+ }
+ }
+ return rval;
+}
+
+
+static Boolean IsFieldTypeGeneLocusTag (FieldTypePtr ft)
+{
+ FeatureFieldPtr field;
+ Boolean rval = FALSE;
+
+ if (ft == NULL) return FALSE;
+ if (ft->choice == FieldType_feature_field) {
+ field = (FeatureFieldPtr) ft->data.ptrvalue;
+ if (field != NULL && field->type == Feature_type_gene
+ && field->field != NULL
+ && field->field->choice == FeatQualChoice_legal_qual
+ && field->field->data.intvalue == Feat_qual_legal_locus_tag) {
+ rval = TRUE;
+ }
+ } else if (ft->choice == FieldType_cds_gene_prot) {
+ if (ft->data.intvalue == CDSGeneProt_field_gene_locus_tag) {
+ rval = TRUE;
+ }
+ }
+ return rval;
+}
+
+
+
+NLM_EXTERN ValNodePtr ValidateTabTableValues (ValNodePtr table, ValNodePtr columns)
+{
+ ValNodePtr err_list = NULL;
+ ValNodePtr line_vnp, col_vnp, val_vnp;
+ Int4 line_num, col_num;
+ TabColumnConfigPtr t;
+ ValNodePtr locus_tag_values = NULL, bad_locus_tags = NULL, vnp;
+ CharPtr bad_format_fmt = "Locus tag %s has incorrect format";
+ CharPtr dup_fmt = "Locus tag %s appears in the table more than once";
+ CharPtr inconsistent_fmt = "Locus tag prefix for %s is inconsistent";
+ CharPtr err_msg;
+
+ if (table == NULL || columns == NULL) {
+ return NULL;
+ }
+
+ for (line_vnp = table, line_num = 1;
+ line_vnp != NULL;
+ line_vnp = line_vnp->next, line_num++) {
+ for (val_vnp = line_vnp->data.ptrvalue, col_vnp = columns, col_num = 1;
+ val_vnp != NULL && col_vnp != NULL;
+ val_vnp = val_vnp->next, col_vnp = col_vnp->next, col_num++) {
+ t = (TabColumnConfigPtr) col_vnp->data.ptrvalue;
+ if (t == NULL || t->match_type > 0 || val_vnp == NULL || StringHasNoText (val_vnp->data.ptrvalue)) {
+ continue;
+ }
+ if (IsFieldTypeGeneLocusTag (t->field)) {
+ ValNodeAddPointer (&locus_tag_values, 0, val_vnp->data.ptrvalue);
+ }
+ }
+ }
+
+ bad_locus_tags = FindBadLocusTagsInList (locus_tag_values);
+ for (vnp = bad_locus_tags; vnp != NULL; vnp = vnp->next) {
+ switch (vnp->choice) {
+ case eLocusTagErrorBadFormat:
+ err_msg = (CharPtr) MemNew (sizeof (Char) * (StringLen (bad_format_fmt) + StringLen (vnp->data.ptrvalue)));
+ sprintf (err_msg, bad_format_fmt, vnp->data.ptrvalue);
+ ValNodeAddPointer (&err_list, 0, err_msg);
+ break;
+ case eLocusTagErrorDuplicate:
+ err_msg = (CharPtr) MemNew (sizeof (Char) * (StringLen (dup_fmt) + StringLen (vnp->data.ptrvalue)));
+ sprintf (err_msg, dup_fmt, vnp->data.ptrvalue);
+ ValNodeAddPointer (&err_list, 0, err_msg);
+ break;
+ case eLocusTagErrorInconsistentPrefix:
+ err_msg = (CharPtr) MemNew (sizeof (Char) * (StringLen (inconsistent_fmt) + StringLen (vnp->data.ptrvalue)));
+ sprintf (err_msg, inconsistent_fmt, vnp->data.ptrvalue);
+ ValNodeAddPointer (&err_list, 0, err_msg);
+ break;
+ }
+ }
+ locus_tag_values = ValNodeFree (locus_tag_values);
+ return err_list;
+}
+
+
+NLM_EXTERN ValNodePtr GetObjectTableForTabTable (SeqEntryPtr sep, ValNodePtr table, ValNodePtr columns, ValNodePtr PNTR p_err_list)
+{
+ ValNodePtr err_list = NULL;
+ ValNodePtr line_vnp, val_vnp, col_vnp;
+ ValNodePtr obj_table = NULL, obj_row;
+ Int4 line_num = 1, col_num;
+ Uint2 entityID;
+ ValNodePtr match_list, match_choice, target_list;
+ TabColumnConfigPtr t;
+ CharPtr err_msg;
+ CharPtr no_match_fmt = "No match for %s, line %d";
+ CharPtr bad_col_val_fmt = "Did not set value for column %d, line %d";
+ CharPtr num_affected_fmt = "%d fields affected";
+ Int4 num_fields_affected = 0;
+
+ if (sep == NULL) {
+ ValNodeAddPointer (&err_list, 0, StringSave ("No SeqEntry"));
+ }
+ if (table == NULL) {
+ ValNodeAddPointer (&err_list, 0, StringSave ("No table"));
+ }
+ if (columns == NULL) {
+ ValNodeAddPointer (&err_list, 0, StringSave ("No column information"));
+ }
+ if (err_list != NULL) {
+ if (p_err_list == NULL) {
+ err_list = ValNodeFreeData (err_list);
+ } else {
+ *p_err_list = err_list;
+ }
+ return NULL;
+ }
+
+ entityID = SeqMgrGetEntityIDForSeqEntry (sep);
+
+ for (line_vnp = table, line_num = 1; line_vnp != NULL; line_vnp = line_vnp->next, line_num++) {
+ obj_row = NULL;
+ match_choice = FindMatchChoiceInLine (line_vnp->data.ptrvalue, columns);
+ if (match_choice == NULL || StringHasNoText (match_choice->data.ptrvalue)) {
+ ReportEmptyIDColumn (&err_list, line_num);
+ } else {
+ match_list = FindMatchForRow (match_choice, entityID, sep);
+ if (match_list == NULL) {
+ err_msg = (CharPtr) MemNew (sizeof (Char) * (StringLen (no_match_fmt) + StringLen (match_choice->data.ptrvalue) + 15));
+ sprintf (err_msg, no_match_fmt, match_choice->data.ptrvalue, line_num);
+ ValNodeAddPointer (&err_list, 0, err_msg);
+ } else {
+ for (val_vnp = line_vnp->data.ptrvalue, col_vnp = columns, col_num = 1;
+ col_vnp != NULL;
+ col_vnp = col_vnp->next, col_num++) {
+ target_list = NULL;
+ t = (TabColumnConfigPtr) col_vnp->data.ptrvalue;
+ if (t == NULL || t->match_type > 0
+ || (t->skip_blank && (val_vnp == NULL || StringHasNoText (val_vnp->data.ptrvalue)))) {
+ /* no targets */
+ } else {
+ target_list = GetTargetListForRowAndColumn (match_choice->choice, match_list, t->field);
+ if (target_list == NULL) {
+ ReportMissingTargets (&err_list, t->field, match_choice->data.ptrvalue, col_num, line_num);
+ }
+ }
+ ValNodeAddPointer (&obj_row, 0, target_list);
+ if (val_vnp != NULL) {
+ val_vnp = val_vnp->next;
+ }
+ }
+ }
+ }
+ ValNodeAddPointer (&obj_table, 0, obj_row);
+ }
+
+ if (err_list != NULL) {
+ if (p_err_list == NULL) {
+ err_list = ValNodeFreeData (err_list);
+ } else {
+ *p_err_list = err_list;
+ }
+ }
+ return obj_table;
+}
+
+
+NLM_EXTERN ValNodePtr FreeObjectTableForTabTable (ValNodePtr table)
+{
+ ValNodePtr vnp_next, vnp_row, vnp_row_next;
+
+ while (table != NULL) {
+ vnp_next = table->next;
+ table->next = NULL;
+ vnp_row = table->data.ptrvalue;
+ while (vnp_row != NULL) {
+ vnp_row_next = vnp_row->next;
+ vnp_row->next = NULL;
+ vnp_row->data.ptrvalue = ValNodeFree (vnp_row->data.ptrvalue);
+ vnp_row = ValNodeFree (vnp_row);
+ vnp_row = vnp_row_next;
+ }
+ table = ValNodeFree (table);
+ table = vnp_next;
+ }
+ return table;
+}
+
+
+typedef struct countfeat {
+ Uint1 featdef;
+ Int4 num;
+} CountFeatData, PNTR CountFeatPtr;
+
+
+static void CountFeaturesCallback (SeqFeatPtr sfp, Pointer userdata)
+{
+ CountFeatPtr p;
+
+ if (sfp == NULL || userdata == NULL) return;
+
+ p = (CountFeatPtr) userdata;
+ if (sfp->idx.subtype == p->featdef) {
+ p->num++;
+ }
+}
+
+static void CountBioSourceDescriptorsCallback (SeqDescrPtr sdp, Pointer userdata)
+{
+ Int4Ptr p;
+
+ p = (Int4Ptr) userdata;
+ if (sdp != NULL && p != NULL && sdp->choice == Seq_descr_source) {
+ (*p)++;
+ }
+}
+
+
+static ValNodePtr CountObjectsForColumnFields (SeqEntryPtr sep, ValNodePtr columns)
+{
+ ValNodePtr count_list = NULL, vnp;
+ TabColumnConfigPtr t;
+ CountFeatData d;
+ FeatureFieldPtr f;
+ Int4 num;
+ Uint1 featdef = 0;
+
+ d.featdef = 0;
+ d.num = 0;
+ for (vnp = columns; vnp != NULL; vnp = vnp->next) {
+ num = 0;
+ t = (TabColumnConfigPtr) vnp->data.ptrvalue;
+ if (t != NULL && t->match_type == 0 && t->field != NULL) {
+ switch (t->field->choice) {
+ case FieldType_source_qual:
+ if (featdef != FEATDEF_BIOSRC) {
+ d.featdef = FEATDEF_BIOSRC;
+ d.num = 0;
+ VisitFeaturesInSep (sep, &d, CountFeaturesCallback);
+ VisitDescriptorsInSep (sep, &(d.num), CountBioSourceDescriptorsCallback);
+ }
+ num = d.num;
+ break;
+ case FieldType_feature_field:
+ f = (FeatureFieldPtr) t->field->data.ptrvalue;
+ if (f != NULL) {
+ featdef = GetFeatdefFromFeatureType(f->type);
+ if (featdef != d.featdef) {
+ d.featdef = featdef;
+ d.num = 0;
+ VisitFeaturesInSep (sep, &d, CountFeaturesCallback);
+ }
+ num = d.num;
+ }
+ break;
+ case FieldType_cds_gene_prot:
+ f = FeatureFieldFromCDSGeneProtField (t->field->data.intvalue);
+ if (f != NULL) {
+ featdef = GetFeatdefFromFeatureType(f->type);
+ if (featdef != d.featdef) {
+ d.featdef = featdef;
+ d.num = 0;
+ VisitFeaturesInSep (sep, &d, CountFeaturesCallback);
+ }
+ num = d.num;
+ }
+ f = FeatureFieldFree (f);
+ break;
+ }
+ }
+ ValNodeAddInt (&count_list, 0, num);
+ }
+ return count_list;
+}
+
+
+NLM_EXTERN ValNodePtr ApplyTableValuesToObjectTable (SeqEntryPtr sep, ValNodePtr table, ValNodePtr columns, ValNodePtr obj_table)
+{
+ ValNodePtr val_line_vnp, obj_line_vnp;
+ ValNodePtr val_vnp, obj_vnp, col_vnp;
+ ValNodePtr target_vnp;
+ TabColumnConfigPtr t;
+ CharPtr val, qual_name;
+ ValNodePtr err_list = NULL, count_list, count_affected_list = NULL, count_vnp, count_tot_vnp;
+ CharPtr err_msg;
+ CharPtr bad_col_val_fmt = "Did not set value for column %d, line %d";
+ CharPtr num_affected_fmt = "%d fields affected";
+ CharPtr col_num_affected_fmt = "For %s (column %d), %d items were affected out of %d total";
+ Int4 num_fields_affected = 0, col_num, line_num, num_this_column;
+ Boolean success;
+ ValNodePtr count_msg = NULL;
+
+ count_list = CountObjectsForColumnFields (sep, columns);
+
+ for (val_line_vnp = table, obj_line_vnp = obj_table, line_num = 1;
+ val_line_vnp != NULL && obj_line_vnp != NULL;
+ val_line_vnp = val_line_vnp->next, obj_line_vnp = obj_line_vnp->next, line_num++) {
+ val_vnp = val_line_vnp->data.ptrvalue;
+ obj_vnp = obj_line_vnp->data.ptrvalue;
+ col_vnp = columns;
+ col_num = 1;
+ count_vnp = count_affected_list;
+ while (obj_vnp != NULL && col_vnp != NULL) {
+ num_this_column = 0;
+ if (obj_vnp->data.ptrvalue != NULL) {
+ t = (TabColumnConfigPtr) col_vnp->data.ptrvalue;
+ if (t == NULL || t->match_type > 0
+ || (t->skip_blank && (val_vnp == NULL || StringHasNoText (val_vnp->data.ptrvalue)))) {
+ /* ignore column or skip blank value */
+ } else {
+ if (val_vnp == NULL || val_vnp->data.ptrvalue == NULL) {
+ val = "";
+ } else {
+ val = val_vnp->data.ptrvalue;
+ }
+ for (target_vnp = obj_vnp->data.ptrvalue; target_vnp != NULL; target_vnp = target_vnp->next) {
+ if (val[0] == 0) {
+ success = RemoveFieldValueForObject (target_vnp->choice, target_vnp->data.ptrvalue, t->field, NULL);
+ } else {
+ success = SetFieldValueForObject (target_vnp->choice, target_vnp->data.ptrvalue, t->field, NULL,
+ val_vnp->data.ptrvalue, t->existing_text);
+ }
+ if (success) {
+ num_fields_affected++;
+ num_this_column++;
+ if (t->match_mrna && IsFieldTypeCDSProduct (t->field)
+ && target_vnp->choice == OBJ_SEQFEAT) {
+ if (AdjustmRNAProductToMatchProteinProduct (target_vnp->data.ptrvalue)) {
+ num_fields_affected++;
+ }
+ }
+ } else {
+ err_msg = (CharPtr) MemNew (sizeof (Char) * (StringLen (bad_col_val_fmt) + 30));
+ sprintf (err_msg, bad_col_val_fmt, col_num, line_num);
+ ValNodeAddPointer (&err_list, 0, err_msg);
+ }
+ }
+ }
+ }
+ if (val_vnp != NULL) {
+ val_vnp = val_vnp->next;
+ }
+ if (count_vnp == NULL) {
+ ValNodeAddInt (&count_affected_list, 0, num_this_column);
+ } else {
+ count_vnp->data.intvalue ++;
+ count_vnp = count_vnp->next;
+ }
+ obj_vnp = obj_vnp->next;
+ col_vnp = col_vnp->next;
+ col_num++;
+ }
+ }
+
+ /* put message at top of list for number of fields affected */
+ err_msg = (CharPtr) MemNew (sizeof (Char) * (StringLen (num_affected_fmt) + 15));
+ sprintf (err_msg, num_affected_fmt, num_fields_affected);
+ ValNodeAddPointer (&count_msg, 0, err_msg);
+
+ /* if any affected, list number of fields per column, and the total in the record */
+ if (num_fields_affected > 0) {
+ for (count_vnp = count_affected_list, count_tot_vnp = count_list, col_vnp = columns, col_num = 1;
+ count_vnp != NULL && count_tot_vnp != NULL && col_vnp != NULL;
+ count_vnp = count_vnp->next, count_tot_vnp = count_tot_vnp->next, col_vnp = col_vnp->next, col_num++) {
+ t = (TabColumnConfigPtr) col_vnp->data.ptrvalue;
+ if (t != NULL && t->match_type == 0) {
+ qual_name = SummarizeFieldType (t->field);
+ err_msg = (CharPtr) MemNew (sizeof (Char) * (StringLen (col_num_affected_fmt) + StringLen (qual_name) + 45));
+ sprintf (err_msg, col_num_affected_fmt, qual_name, col_num, count_vnp->data.intvalue, count_tot_vnp->data.intvalue);
+ ValNodeAddPointer (&count_msg, 0, err_msg);
+ qual_name = MemFree (qual_name);
+ }
+ }
+ }
+
+ ValNodeLink (&count_msg, err_list);
+
+ count_list = ValNodeFree (count_list);
+ count_affected_list = ValNodeFree (count_affected_list);
+
+ return count_msg;
+}
+
+
+static int LIBCALLBACK SortVnpByChoiceAndPtrvalue (VoidPtr ptr1, VoidPtr ptr2)
+
+{
+ ValNodePtr vnp1;
+ ValNodePtr vnp2;
+
+ if (ptr1 != NULL && ptr2 != NULL) {
+ vnp1 = *((ValNodePtr PNTR) ptr1);
+ vnp2 = *((ValNodePtr PNTR) ptr2);
+ if (vnp1 != NULL && vnp2 != NULL) {
+ if (vnp1->choice > vnp2->choice) {
+ return 1;
+ } else if (vnp1->choice < vnp2->choice) {
+ return -1;
+ } else if (vnp1->data.ptrvalue > vnp2->data.ptrvalue) {
+ return 1;
+ } else if (vnp2->data.ptrvalue < vnp2->data.ptrvalue) {
+ return -1;
+ } else {
+ return 0;
+ }
+ }
+ }
+ return 0;
+}
+
+
+NLM_EXTERN ValNodePtr CheckObjTableForRowsThatApplyToTheSameDestination (ValNodePtr obj_table)
+{
+ Int4 col_num;
+ ValNodePtr line_vnp, col_vnp, obj_vnp, vnp;
+ ValNodePtr col_list = NULL, col_obj_list;
+ Boolean any_column_values_left;
+ ValNodePtr err_list = NULL;
+ Boolean found_multi;
+ CharPtr multi_fmt = "Multiple rows apply to the same object for column %d";
+ CharPtr err_msg;
+
+ /* now, for each row, get pointer to first column */
+ for (line_vnp = obj_table; line_vnp != NULL; line_vnp = line_vnp->next) {
+ ValNodeAddPointer (&col_list, 0, line_vnp->data.ptrvalue);
+ }
+
+ /* now for each column, make a list of all features in the column, then sort to see if there are duplicates */
+ any_column_values_left = TRUE;
+ col_num = 1;
+ while (any_column_values_left) {
+ any_column_values_left = FALSE;
+ col_obj_list = NULL;
+ for (vnp = col_list; vnp != NULL; vnp = vnp->next) {
+ col_vnp = vnp->data.ptrvalue;
+ if (col_vnp != NULL) {
+ obj_vnp = col_vnp->data.ptrvalue;
+ ValNodeLink (&col_obj_list, ValNodeCopyPtr (obj_vnp));
+ vnp->data.ptrvalue = col_vnp->next;
+ any_column_values_left = TRUE;
+ }
+ }
+ if (col_obj_list != NULL) {
+ found_multi = FALSE;
+ col_obj_list = ValNodeSort (col_obj_list, SortVnpByChoiceAndPtrvalue);
+ for (vnp = col_obj_list; vnp != NULL && vnp->next != NULL && !found_multi; vnp = vnp->next) {
+ if (vnp->choice == vnp->next->choice
+ && vnp->data.ptrvalue == vnp->next->data.ptrvalue) {
+ found_multi = TRUE;
+ }
+ }
+ if (found_multi) {
+ err_msg = (CharPtr) MemNew (sizeof (Char) * (StringLen (multi_fmt)
+ + 30));
+ sprintf (err_msg, multi_fmt, col_num);
+ ValNodeAddPointer (&err_list, col_num, err_msg);
+ }
+ col_obj_list = ValNodeFree (col_obj_list);
+ }
+ col_num++;
+ }
+ col_list = ValNodeFree (col_list);
+ return err_list;
+}
+
+
+NLM_EXTERN ValNodePtr CheckObjTableForExistingText (SeqEntryPtr sep, ValNodePtr table, ValNodePtr columns, ValNodePtr obj_table)
+{
+ ValNodePtr err_list = NULL, vnp;
+ ValNodePtr val_line_vnp, obj_line_vnp;
+ ValNodePtr val_vnp, obj_vnp, col_vnp;
+ Int4 line_num = 1, col_num, num_existing_text = 0;
+ Uint2 entityID;
+ TabColumnConfigPtr t;
+ CharPtr err_msg, str, qual_name, val;
+ CharPtr already_has_val_fmt = "%s already has value '%s' (column %d), line %d. Replacement is '%s'";
+ CharPtr num_existing_text_fmt = "%d fields already have text.";
+ CharPtr mrna_warn_fmt = "%d coding region features have mRNAs, but %d do not.";
+ ValNodePtr target_list, feat_vnp;
+ Int4 num_with_mrna = 0, num_without_mrna = 0;
+
+ if (sep == NULL) {
+ ValNodeAddPointer (&err_list, 1, StringSave ("No SeqEntry"));
+ }
+ if (table == NULL) {
+ ValNodeAddPointer (&err_list, 1, StringSave ("No table"));
+ }
+ if (columns == NULL) {
+ ValNodeAddPointer (&err_list, 1, StringSave ("No column information"));
+ }
+ if (err_list != NULL) {
+ return err_list;
+ }
+
+ entityID = SeqMgrGetEntityIDForSeqEntry (sep);
+
+ for (val_line_vnp = table, obj_line_vnp = obj_table, line_num = 1;
+ val_line_vnp != NULL && obj_line_vnp != NULL;
+ val_line_vnp = val_line_vnp->next, obj_line_vnp = obj_line_vnp->next, line_num++) {
+ val_vnp = val_line_vnp->data.ptrvalue;
+ obj_vnp = obj_line_vnp->data.ptrvalue;
+ col_vnp = columns;
+ if (val_vnp == NULL || obj_vnp == NULL) continue;
+ col_num = 1;
+ while (obj_vnp != NULL && col_vnp != NULL) {
+ if (obj_vnp->data.ptrvalue != NULL) {
+ t = (TabColumnConfigPtr) col_vnp->data.ptrvalue;
+ if (t == NULL || t->match_type > 0
+ || (t->skip_blank && (val_vnp == NULL || StringHasNoText (val_vnp->data.ptrvalue)))) {
+ /* ignore column or skip blank value */
+ } else {
+ target_list = obj_vnp->data.ptrvalue;
+ if (val_vnp == NULL || val_vnp->data.ptrvalue == NULL) {
+ val = "";
+ } else {
+ val = val_vnp->data.ptrvalue;
+ }
+ for (feat_vnp = target_list; feat_vnp != NULL; feat_vnp = feat_vnp->next) {
+ /* check for existing text */
+ str = GetFieldValueForObject (feat_vnp->choice, feat_vnp->data.ptrvalue, t->field, NULL);
+ if (!StringHasNoText (str)) {
+ qual_name = SummarizeFieldType (t->field);
+ err_msg = (CharPtr) MemNew (sizeof (Char) * (StringLen (already_has_val_fmt)
+ + StringLen (qual_name) + StringLen (str)
+ + StringLen (val)
+ + 30));
+ sprintf (err_msg, already_has_val_fmt, qual_name, str, col_num, line_num, val);
+ ValNodeAddPointer (&err_list, col_num, err_msg);
+ num_existing_text ++;
+ }
+ str = MemFree (str);
+ /* check for mrna if changing CDS product */
+ if (IsFieldTypeCDSProduct (t->field) && feat_vnp->choice == OBJ_SEQFEAT) {
+ if (GetmRNAForFeature (feat_vnp->data.ptrvalue) != NULL) {
+ num_with_mrna++;
+ } else {
+ num_without_mrna++;
+ }
+ }
+ }
+ }
+ }
+ if (val_vnp != NULL) {
+ val_vnp = val_vnp->next;
+ }
+ obj_vnp = obj_vnp->next;
+ col_vnp = col_vnp->next;
+ col_num++;
+ }
+ }
+ if (num_existing_text > 0) {
+ err_msg = (CharPtr) MemNew (sizeof (Char) * (StringLen (num_existing_text_fmt)
+ + 15));
+ sprintf (err_msg, num_existing_text_fmt, num_existing_text);
+ vnp = ValNodeNew (NULL);
+ vnp->choice = 0;
+ vnp->data.ptrvalue = err_msg;
+ vnp->next = err_list;
+ err_list = vnp;
+ }
+ if (num_with_mrna > 0 && num_without_mrna > 0) {
+ err_msg = (CharPtr) MemNew (sizeof (Char) * (StringLen (mrna_warn_fmt)
+ + 30));
+ sprintf (err_msg, mrna_warn_fmt, num_with_mrna, num_without_mrna);
+ vnp = ValNodeNew (NULL);
+ vnp->choice = 0;
+ vnp->data.ptrvalue = err_msg;
+ vnp->next = err_list;
+ err_list = vnp;
+ }
+
+ return err_list;
+}
+
+
+NLM_EXTERN ValNodePtr ApplyTableToFeatures (SeqEntryPtr sep, ValNodePtr table, ValNodePtr columns)
+{
+ ValNodePtr err_list = NULL;
+ ValNodePtr line_vnp, val_vnp, col_vnp;
+ Int4 line_num = 1, col_num;
+ Uint2 entityID;
+ ValNodePtr match_list, match_choice, target_list, feat_vnp, vnp;
+ TabColumnConfigPtr t;
+ CharPtr err_msg;
+ CharPtr no_match_fmt = "No match for %s, line %d";
+ CharPtr bad_col_val_fmt = "Did not set value for column %d, line %d";
+ CharPtr num_affected_fmt = "%d fields affected";
+ Int4 num_fields_affected = 0;
+ CharPtr val;
+ Boolean success;
+
+ if (sep == NULL) {
+ ValNodeAddPointer (&err_list, 0, StringSave ("No SeqEntry"));
+ }
+ if (table == NULL) {
+ ValNodeAddPointer (&err_list, 0, StringSave ("No table"));
+ }
+ if (columns == NULL) {
+ ValNodeAddPointer (&err_list, 0, StringSave ("No column information"));
+ }
+ if (err_list != NULL) {
+ return err_list;
+ }
+
+ entityID = SeqMgrGetEntityIDForSeqEntry (sep);
+
+ for (line_vnp = table, line_num = 1; line_vnp != NULL; line_vnp = line_vnp->next, line_num++) {
+ match_choice = FindMatchChoiceInLine (line_vnp->data.ptrvalue, columns);
+ if (match_choice == NULL || StringHasNoText (match_choice->data.ptrvalue)) {
+ ReportEmptyIDColumn (&err_list, line_num);
+ } else {
+ match_list = FindMatchForRow (match_choice, entityID, sep);
+ if (match_list == NULL) {
+ err_msg = (CharPtr) MemNew (sizeof (Char) * (StringLen (no_match_fmt) + StringLen (match_choice->data.ptrvalue) + 15));
+ sprintf (err_msg, no_match_fmt, match_choice->data.ptrvalue, line_num);
+ ValNodeAddPointer (&err_list, 0, err_msg);
+ } else {
+ for (val_vnp = line_vnp->data.ptrvalue, col_vnp = columns, col_num = 1;
+ col_vnp != NULL;
+ col_vnp = col_vnp->next, col_num++) {
+ t = (TabColumnConfigPtr) col_vnp->data.ptrvalue;
+ if (t == NULL || t->match_type > 0
+ || (t->skip_blank && (val_vnp == NULL || StringHasNoText (val_vnp->data.ptrvalue)))) {
+ if (val_vnp != NULL) {
+ val_vnp = val_vnp->next;
+ }
+ continue;
+ }
+
+ target_list = GetTargetListForRowAndColumn (match_choice->choice, match_list, t->field);
+ if (target_list == NULL) {
+ ReportMissingTargets (&err_list, t->field, match_choice->data.ptrvalue, col_num, line_num);
+ } else {
+ if (val_vnp == NULL || val_vnp->data.ptrvalue == NULL) {
+ val = "";
+ } else {
+ val = val_vnp->data.ptrvalue;
+ }
+ for (feat_vnp = target_list; feat_vnp != NULL; feat_vnp = feat_vnp->next) {
+ if (val[0] == 0) {
+ success = RemoveFieldValueForObject (feat_vnp->choice, feat_vnp->data.ptrvalue, t->field, NULL);
+ } else {
+ success = SetFieldValueForObject (feat_vnp->choice, feat_vnp->data.ptrvalue, t->field, NULL,
+ val_vnp->data.ptrvalue, t->existing_text);
+ }
+ if (success) {
+ num_fields_affected++;
+ if (t->match_mrna && IsFieldTypeCDSProduct (t->field)
+ && feat_vnp->choice == OBJ_SEQFEAT) {
+ if (AdjustmRNAProductToMatchProteinProduct (feat_vnp->data.ptrvalue)) {
+ num_fields_affected++;
+ }
+ }
+ } else {
+ err_msg = (CharPtr) MemNew (sizeof (Char) * (StringLen (bad_col_val_fmt) + 30));
+ sprintf (err_msg, bad_col_val_fmt, col_num, line_num);
+ ValNodeAddPointer (&err_list, 0, err_msg);
+ }
+ }
+ }
+ target_list = ValNodeFree (target_list);
+ if (val_vnp != NULL) {
+ val_vnp = val_vnp->next;
+ }
+ }
+ }
+ match_list = ValNodeFree (match_list);
+ }
+ }
+
+ err_msg = (CharPtr) MemNew (sizeof (Char) * (StringLen (num_affected_fmt) + 15));
+ sprintf (err_msg, num_affected_fmt, num_fields_affected);
+ vnp = ValNodeNew (NULL);
+ vnp->data.ptrvalue = err_msg;
+ vnp->next = err_list;
+ err_list = vnp;
+
+ return err_list;
+}
+
+
+NLM_EXTERN ValNodePtr CheckTableForExistingText (SeqEntryPtr sep, ValNodePtr table, ValNodePtr columns)
+{
+ ValNodePtr err_list = NULL, vnp;
+ ValNodePtr line_vnp, val_vnp, col_vnp;
+ Int4 line_num = 1, col_num, num_existing_text = 0;
+ Uint2 entityID;
+ TabColumnConfigPtr t;
+ CharPtr err_msg, str, qual_name, val;
+ CharPtr no_match_fmt = "No match for %s, line %d";
+ CharPtr no_feat_fmt = "No %s feature for %s (column %d, line %d)";
+ CharPtr already_has_val_fmt = "%s already has value '%s' (column %d), line %d. Replacement is '%s'";
+ CharPtr num_existing_text_fmt = "%d fields already have text.";
+ ValNodePtr match_choice, match_list;
+ ValNodePtr target_list, feat_vnp;
+
+ if (sep == NULL) {
+ ValNodeAddPointer (&err_list, 1, StringSave ("No SeqEntry"));
+ }
+ if (table == NULL) {
+ ValNodeAddPointer (&err_list, 1, StringSave ("No table"));
+ }
+ if (columns == NULL) {
+ ValNodeAddPointer (&err_list, 1, StringSave ("No column information"));
+ }
+ if (err_list != NULL) {
+ return err_list;
+ }
+
+ entityID = SeqMgrGetEntityIDForSeqEntry (sep);
+
+ for (line_vnp = table, line_num = 1; line_vnp != NULL; line_vnp = line_vnp->next, line_num++) {
+ match_choice = FindMatchChoiceInLine (line_vnp->data.ptrvalue, columns);
+ if (match_choice == NULL || StringHasNoText (match_choice->data.ptrvalue)) {
+ ReportEmptyIDColumn (&err_list, line_num);
+ } else {
+ match_list = FindMatchForRow (match_choice, entityID, sep);
+ if (match_list == NULL) {
+ err_msg = (CharPtr) MemNew (sizeof (Char) * (StringLen (no_match_fmt) + StringLen (match_choice->data.ptrvalue) + 15));
+ sprintf (err_msg, no_match_fmt, match_choice->data.ptrvalue, line_num);
+ ValNodeAddPointer (&err_list, 0, err_msg);
+ } else {
+ for (val_vnp = line_vnp->data.ptrvalue, col_vnp = columns, col_num = 1;
+ col_vnp != NULL;
+ col_vnp = col_vnp->next, col_num++) {
+ t = (TabColumnConfigPtr) col_vnp->data.ptrvalue;
+ if (t == NULL || t->match_type > 0
+ || (t->skip_blank && (val_vnp == NULL || StringHasNoText (val_vnp->data.ptrvalue)))) {
+ if (val_vnp != NULL) {
+ val_vnp = val_vnp->next;
+ }
+ continue;
+ }
+ target_list = GetTargetListForRowAndColumn (match_choice->choice, match_list, t->field);
+ if (target_list == NULL) {
+ ReportMissingTargets (&err_list, t->field, match_choice->data.ptrvalue, col_num, line_num);
+ } else {
+ if (val_vnp == NULL || val_vnp->data.ptrvalue == NULL) {
+ val = "";
+ } else {
+ val = val_vnp->data.ptrvalue;
+ }
+ for (feat_vnp = target_list; feat_vnp != NULL; feat_vnp = feat_vnp->next) {
+ str = GetFieldValueForObject (feat_vnp->choice, feat_vnp->data.ptrvalue, t->field, NULL);
+ if (!StringHasNoText (str)) {
+ qual_name = SummarizeFieldType (t->field);
+ err_msg = (CharPtr) MemNew (sizeof (Char) * (StringLen (already_has_val_fmt)
+ + StringLen (qual_name) + StringLen (str)
+ + StringLen (val)
+ + 30));
+ sprintf (err_msg, already_has_val_fmt, qual_name, str, col_num, line_num, val);
+ ValNodeAddPointer (&err_list, col_num, err_msg);
+ num_existing_text ++;
+ }
+ str = MemFree (str);
+ }
+ }
+ target_list = ValNodeFree (target_list);
+ if (val_vnp != NULL) {
+ val_vnp = val_vnp->next;
+ }
+ }
+ }
+ match_list = ValNodeFree (match_list);
+ }
+ }
+ if (num_existing_text > 0) {
+ err_msg = (CharPtr) MemNew (sizeof (Char) * (StringLen (num_existing_text_fmt)
+ + 15));
+ sprintf (err_msg, num_existing_text_fmt, num_existing_text);
+ vnp = ValNodeNew (NULL);
+ vnp->choice = 0;
+ vnp->data.ptrvalue = err_msg;
+ vnp->next = err_list;
+ err_list = vnp;
+ }
+
+ return err_list;
+}
+
+
+
+
+
diff --git a/api/macroapi.h b/api/macroapi.h
new file mode 100644
index 00000000..dbd90472
--- /dev/null
+++ b/api/macroapi.h
@@ -0,0 +1,184 @@
+/* macro_i.h
+* ===========================================================================
+*
+* PUBLIC DOMAIN NOTICE
+* National Center for Biotechnology Information (NCBI)
+*
+* This software/database is a "United States Government Work" under the
+* terms of the United States Copyright Act. It was written as part of
+* the author's official duties as a United States Government employee and
+* thus cannot be copyrighted. This software/database is freely available
+* to the public for use. The National Library of Medicine and the U.S.
+* Government do not place any restriction on its use or reproduction.
+* We would, however, appreciate having the NCBI and the author cited in
+* any work or product based on this material
+*
+* Although all reasonable efforts have been taken to ensure the accuracy
+* and reliability of the software and data, the NLM and the U.S.
+* Government do not and cannot warrant the performance or results that
+* may be obtained by using this software or data. The NLM and the U.S.
+* Government disclaim all warranties, express or implied, including
+* warranties of performance, merchantability or fitness for any particular
+* purpose.
+*
+* ===========================================================================
+*
+* File Name: macro_i.h
+*
+* Author: Colleen Bollin
+*
+* Version Creation Date: 11/15/2007
+*
+* $Revision: 1.31 $
+*
+* File Description:
+*
+* Modifications:
+* --------------------------------------------------------------------------
+* Date Name Description of modification
+* ------- ---------- -----------------------------------------------------
+*
+*
+* ==========================================================================
+*/
+
+#ifndef _macroapi_h_
+#define _macroapi_h_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+NLM_EXTERN Int4 GetFeatdefFromFeatureType (Int4 feature_type);
+NLM_EXTERN CharPtr GetFeatureNameFromFeatureType (Int4 feature_type);
+NLM_EXTERN Int4 GetFeatureTypeByName (CharPtr feat_name);
+NLM_EXTERN void AddImportFeaturesToChoiceList (ValNodePtr PNTR feature_type_list);
+NLM_EXTERN void AddAllFeaturesToChoiceList (ValNodePtr PNTR feature_type_list);
+NLM_EXTERN CharPtr GetFeatQualName (Int4 featqual);
+NLM_EXTERN Int4 GetFeatQualByName (CharPtr qualname);
+NLM_EXTERN Int4 GetNumFeatQual (void);
+NLM_EXTERN void AddAllFeatureFieldsToChoiceList (ValNodePtr PNTR field_list);
+NLM_EXTERN CharPtr GetSourceQualName (Int4 srcqual);
+NLM_EXTERN Int4 GetSourceQualTypeByName (CharPtr qualname);
+NLM_EXTERN ValNodePtr GetSourceQualList (void);
+NLM_EXTERN Boolean IsNonTextSourceQual (Int4 srcqual);
+NLM_EXTERN Int4 GenomeFromSrcLoc (Int4 srcloc);
+NLM_EXTERN CharPtr LocNameFromGenome (Int4 genome);
+NLM_EXTERN ValNodePtr GetLocationList (Boolean for_remove);
+NLM_EXTERN Int4 OriginFromSrcOrig (Int4 srcorig);
+NLM_EXTERN CharPtr OriginNameFromOrigin (Int4 origin);
+NLM_EXTERN ValNodePtr GetOriginList (Boolean for_remove);
+NLM_EXTERN BioSourcePtr GetBioSourceFromObject (Uint1 choice, Pointer data);
+NLM_EXTERN CharPtr CDSGeneProtNameFromField (Int4 field);
+NLM_EXTERN CharPtr CDSGeneProtFeatureNameFromFeatureType (Int4 feature_type);
+NLM_EXTERN void AddAllCDSGeneProtFieldsToChoiceList (ValNodePtr PNTR field_list);
+NLM_EXTERN void AddAllCDSGeneProtFeaturesToChoiceList (ValNodePtr PNTR field_list);
+NLM_EXTERN FeatureFieldPtr FeatureFieldFromCDSGeneProtField (Uint2 cds_gene_prot_field);
+
+NLM_EXTERN CharPtr BiomolNameFromBiomol (Int4 biomol);
+NLM_EXTERN Int4 BiomolFromMoleculeType (Int4 molecule_type);
+NLM_EXTERN ValNodePtr GetMoleculeTypeList (void);
+NLM_EXTERN CharPtr TechNameFromTech (Int4 tech);
+NLM_EXTERN Int4 TechFromTechniqueType (Int4 technique_type);
+NLM_EXTERN ValNodePtr GetTechniqueTypeList (void);
+NLM_EXTERN Int4 CompletenessFromCompletednessType (Int4 completedness_type);
+NLM_EXTERN CharPtr CompletenessNameFromCompleteness (Int4 completeness);
+NLM_EXTERN ValNodePtr GetCompletednessTypeList (void);
+NLM_EXTERN Int4 MolFromMoleculeClassType (Int4 moleculeclass_type);
+NLM_EXTERN CharPtr MolNameFromMol (Int4 mol);
+NLM_EXTERN ValNodePtr GetMoleculeClassTypeList (void);
+NLM_EXTERN Int4 TopologyFromTopologyType (Int4 topology_type);
+NLM_EXTERN CharPtr TopologyNameFromTopology (Int4 topology);
+NLM_EXTERN ValNodePtr GetTopologyTypeList (void);
+NLM_EXTERN Int4 StrandFromStrandType (Int4 strand_type);
+NLM_EXTERN CharPtr StrandNameFromStrand (Int4 strand);
+NLM_EXTERN ValNodePtr GetStrandTypeList (void);
+
+
+
+NLM_EXTERN FieldTypePtr GetFromFieldFromFieldPair (FieldPairTypePtr fieldpair);
+NLM_EXTERN FieldTypePtr GetToFieldFromFieldPair (FieldPairTypePtr fieldpair);
+NLM_EXTERN Uint1 FieldTypeFromAECRAction (AECRActionPtr action);
+NLM_EXTERN Uint1 GetBiomolForRnaType (Int4 rnatype);
+NLM_EXTERN CharPtr GetBiomolNameForRnaType (Int4 rnatype);
+NLM_EXTERN void AddAllRNASubtypesToChoiceList (ValNodePtr PNTR field_list);
+
+NLM_EXTERN CharPtr GetSourceQualFromBioSource (BioSourcePtr biop, SourceQualChoicePtr scp, StringConstraintPtr constraint);
+NLM_EXTERN CharPtr GetQualFromFeature (SeqFeatPtr sfp, FeatureFieldPtr field, StringConstraintPtr scp);
+NLM_EXTERN Boolean SetSourceQualInBioSource (BioSourcePtr biop, SourceQualChoicePtr scp, StringConstraintPtr constraint, CharPtr value, Uint2 existing_text);
+
+
+NLM_EXTERN Boolean IsStringConstraintEmpty (StringConstraintPtr scp);
+NLM_EXTERN Boolean DoesSingleStringMatchConstraint (CharPtr str, StringConstraintPtr scp);
+NLM_EXTERN Boolean DoesStringMatchConstraint (CharPtr str, StringConstraintPtr scp);
+NLM_EXTERN Boolean IsSourceConstraintEmpty (SourceConstraintPtr scp);
+NLM_EXTERN Boolean DoesBiosourceMatchConstraint (BioSourcePtr biop, SourceConstraintPtr scp);
+NLM_EXTERN Boolean IsSequenceConstraintEmpty (SequenceConstraintPtr constraint);
+NLM_EXTERN Boolean IsCDSGeneProtQualConstraintEmpty (CDSGeneProtQualConstraintPtr constraint);
+NLM_EXTERN ValNodePtr GetObjectListForAECRAction (SeqEntryPtr sep, AECRActionPtr action);
+NLM_EXTERN Int4 DoApplyActionToObjectList (ApplyActionPtr action, ValNodePtr object_list, StringConstraintPtr scp);
+NLM_EXTERN Int4 DoEditActionToObjectList (EditActionPtr action, ValNodePtr object_list);
+NLM_EXTERN Int4 DoConvertActionToObjectList (ConvertActionPtr action, ValNodePtr object_list, StringConstraintPtr scp);
+NLM_EXTERN Int4 DoCopyActionToObjectList (CopyActionPtr action, ValNodePtr object_list, StringConstraintPtr scp);
+NLM_EXTERN Int4 DoSwapActionToObjectList (SwapActionPtr action, ValNodePtr object_list, StringConstraintPtr scp);
+NLM_EXTERN Int4 DoRemoveActionToObjectList (RemoveActionPtr action, ValNodePtr object_list, StringConstraintPtr scp);
+NLM_EXTERN Int4 DoParseActionToObjectList (AECRParseActionPtr action, ValNodePtr object_list, StringConstraintPtr scp);
+NLM_EXTERN StringConstraintPtr FindStringConstraintInConstraintSetForField (FieldTypePtr field, ConstraintChoiceSetPtr csp);
+NLM_EXTERN StringConstraintPtr StringConstraintFromFieldEdit (FieldEditPtr edit);
+
+
+
+
+NLM_EXTERN void ApplyMacroToSeqEntry (SeqEntryPtr sep, ValNodePtr macro, Int4Ptr pNumFields, Int4Ptr pNumFeat);
+
+/* for generating text representations of macro objects */
+NLM_EXTERN CharPtr SummarizeSourceQual (ValNodePtr field);
+NLM_EXTERN CharPtr FeatureFieldLabel (CharPtr feature_name, ValNodePtr field);
+NLM_EXTERN Boolean IsFieldTypeEmpty (FieldTypePtr field);
+NLM_EXTERN CharPtr SummarizeFieldType (ValNodePtr vnp);
+
+typedef enum {
+ eTableMatchFeatureID = 1,
+ eTableMatchGeneLocusTag,
+ eTableMatchProteinID,
+ eTableMatchDbxref,
+ eTableMatchNucID,
+ eTableMatchBioSource
+} ETableMatchType;
+
+
+
+typedef struct tabcolumnconfig {
+ Uint2 match_type;
+ FieldTypePtr field;
+ Uint2 existing_text;
+ Boolean skip_blank;
+ Boolean match_mrna;
+} TabColumnConfigData, PNTR TabColumnConfigPtr;
+
+NLM_EXTERN TabColumnConfigPtr TabColumnConfigNew (void);
+NLM_EXTERN TabColumnConfigPtr TabColumnConfigFree (TabColumnConfigPtr t);
+NLM_EXTERN TabColumnConfigPtr TabColumnConfigCopy (TabColumnConfigPtr orig);
+NLM_EXTERN ValNodePtr TabColumnConfigListFree (ValNodePtr columns);
+NLM_EXTERN ValNodePtr TabColumnConfigListCopy (ValNodePtr orig);
+NLM_EXTERN ValNodePtr ValidateTabTableValues (ValNodePtr table, ValNodePtr columns);
+NLM_EXTERN ValNodePtr ValidateFeatureFieldColumnNames (ValNodePtr header_line, ValNodePtr PNTR perr_list);
+NLM_EXTERN ValNodePtr FreeObjectTableForTabTable (ValNodePtr table);
+NLM_EXTERN ValNodePtr GetObjectTableForTabTable (SeqEntryPtr sep, ValNodePtr table, ValNodePtr columns, ValNodePtr PNTR p_err_list);
+NLM_EXTERN ValNodePtr ApplyTableValuesToObjectTable (SeqEntryPtr sep, ValNodePtr table, ValNodePtr columns, ValNodePtr obj_table);
+NLM_EXTERN ValNodePtr CheckObjTableForRowsThatApplyToTheSameDestination (ValNodePtr obj_table);
+NLM_EXTERN ValNodePtr CheckObjTableForExistingText (SeqEntryPtr sep, ValNodePtr table, ValNodePtr columns, ValNodePtr obj_table);
+
+NLM_EXTERN ValNodePtr ApplyTableToFeatures (SeqEntryPtr sep, ValNodePtr table, ValNodePtr columns);
+NLM_EXTERN ValNodePtr CheckTableForExistingText (SeqEntryPtr sep, ValNodePtr table, ValNodePtr columns);
+
+NLM_EXTERN SeqFeatPtr GetmRNAForFeature (SeqFeatPtr sfp);
+NLM_EXTERN Boolean AdjustmRNAProductToMatchProteinProduct (SeqFeatPtr sfp);
+NLM_EXTERN Boolean IsFieldTypeCDSProduct (FieldTypePtr ft);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/api/seqmgr.c b/api/seqmgr.c
index ca7ff20e..4f918cd0 100644
--- a/api/seqmgr.c
+++ b/api/seqmgr.c
@@ -29,7 +29,7 @@
*
* Version Creation Date: 9/94
*
-* $Revision: 6.291 $
+* $Revision: 6.293 $
*
* File Description: Manager for Bioseqs and BioseqSets
*
@@ -8318,6 +8318,32 @@ static void SeqMgrBestOverlapSetContext (
}
}
+static Boolean TransSplicedStrandsMatch (Uint1 locstrand, SeqLocPtr slp, SMFeatItemPtr feat)
+
+{
+ Uint1 featstrand;
+ SeqLocPtr loc;
+ SeqFeatPtr sfp;
+
+ if (slp == NULL || feat == NULL) return FALSE;
+ sfp = feat->sfp;
+ if (sfp == NULL) return FALSE;
+
+ if (! sfp->excpt) return FALSE;
+ if (StringISearch (sfp->except_text, "trans-splicing") == NULL) return FALSE;
+
+ loc = SeqLocFindNext (sfp->location, NULL);
+ while (loc != NULL) {
+ if (SeqLocAinB (slp, loc) >= 0) {
+ featstrand = SeqLocStrand (loc);
+ if (StrandsMatch (featstrand, locstrand)) return TRUE;
+ }
+ loc = SeqLocFindNext (sfp->location, loc);
+ }
+
+ return FALSE;
+}
+
static SeqFeatPtr SeqMgrGetBestOverlappingFeat (
SeqLocPtr slp,
Uint2 subtype,
@@ -8349,6 +8375,7 @@ static SeqFeatPtr SeqMgrGetBestOverlappingFeat (
Int4 left;
SeqLocPtr loc;
Int4 max = INT4_MAX;
+ Boolean may_be_trans_spliced;
Int4 mid;
Int2 numivals = 0;
SeqEntryPtr oldscope;
@@ -8514,14 +8541,15 @@ static SeqFeatPtr SeqMgrGetBestOverlappingFeat (
/* requires feature to be contained within gene, etc. */
- if (special && (feat->bad_order || feat->mixed_strand)) {
+ may_be_trans_spliced = (Boolean) (special && (feat->bad_order || feat->mixed_strand));
+ if (may_be_trans_spliced) {
diff = TestForOverlap (feat, slp, left, right, LOCATION_SUBSET, numivals, ivals);
} else {
diff = TestForOverlap (feat, slp, left, right, overlapType, numivals, ivals);
}
if (diff >= 0) {
- if (StrandsMatch (feat->strand, strand)) {
+ if (StrandsMatch (feat->strand, strand) || (may_be_trans_spliced && TransSplicedStrandsMatch (strand, slp, feat))) {
if (userfunc != NULL && context != NULL && goOn) {
SeqMgrBestOverlapSetContext (feat, omdp, userdata, context);
@@ -8553,14 +8581,15 @@ static SeqFeatPtr SeqMgrGetBestOverlappingFeat (
feat = array [hier];
if (feat != NULL && ((! feat->ignore) || userfunc == NULL)) {
- if (special && (feat->bad_order || feat->mixed_strand)) {
+ may_be_trans_spliced = (Boolean) (special && (feat->bad_order || feat->mixed_strand));
+ if (may_be_trans_spliced) {
diff = TestForOverlap (feat, slp, left, right, LOCATION_SUBSET, numivals, ivals);
} else {
diff = TestForOverlap (feat, slp, left, right, overlapType, numivals, ivals);
}
if (diff >= 0) {
- if (StrandsMatch (feat->strand, strand)) {
+ if (StrandsMatch (feat->strand, strand) || (may_be_trans_spliced && TransSplicedStrandsMatch (strand, slp, feat))) {
if (userfunc != NULL && context != NULL && goOn) {
SeqMgrBestOverlapSetContext (feat, omdp, userdata, context);
diff --git a/api/seqport.c b/api/seqport.c
index b9eed095..989af547 100644
--- a/api/seqport.c
+++ b/api/seqport.c
@@ -29,7 +29,7 @@
*
* Version Creation Date: 7/13/91
*
-* $Revision: 6.169 $
+* $Revision: 6.172 $
*
* File Description: Ports onto Bioseqs
*
@@ -39,6 +39,15 @@
* ------- ---------- -----------------------------------------------------
*
* $Log: seqport.c,v $
+* Revision 6.172 2008/02/12 18:56:52 bollin
+* Made ReverseSeqData and ComplementSeqData extern
+*
+* Revision 6.171 2007/12/28 16:27:58 kans
+* in SeqPortStreamSetup, on failure, return -1 if count was 0 to ensure failure signal
+*
+* Revision 6.170 2007/12/04 19:00:21 kans
+* SeqPortStreamSeqLoc uses scope to get local (segset) components while allowing multiple simultaneous StreamCache objects
+*
* Revision 6.169 2007/05/30 18:10:06 kans
* added KNOWN_GAP_AS_PLUS to distinguish known-length from unknown-length gaps, use for validation
*
@@ -2647,6 +2656,7 @@ typedef struct streamdata {
CharPtr tmp;
Boolean failed;
Int2 depth;
+ SeqEntryPtr scope;
} StreamData, PNTR StreamDataPtr;
/* prototype for main internal recursive processing function */
@@ -3065,15 +3075,16 @@ static Int4 SeqPortStreamSeqLoc (
)
{
- BioseqPtr bsp;
- Char buf [64];
- Int4 count = 0;
- Char pid [64];
- SeqIdPtr sip;
+ BioseqPtr bsp;
+ Char buf [64];
+ Int4 count = 0;
+ SeqEntryPtr oldscope = NULL;
+ Char pid [64];
+ SeqIdPtr sip;
#ifdef OS_UNIX
- Int2 attempts;
- CharPtr str;
- int val = 0;
+ Int2 attempts;
+ CharPtr str;
+ int val = 0;
#endif
if (slp == NULL || sdp == NULL) return 0;
@@ -3098,7 +3109,9 @@ static Int4 SeqPortStreamSeqLoc (
return 0;
}
+ oldscope = SeqEntrySetScope (sdp->scope);
bsp = BioseqLockById (sip);
+ SeqEntrySetScope (oldscope);
#ifdef OS_UNIX
if (bsp == NULL) {
@@ -3134,7 +3147,9 @@ static Int4 SeqPortStreamSeqLoc (
sleep (stream_retry_sleep);
}
+ oldscope = SeqEntrySetScope (sdp->scope);
bsp = BioseqLockById (sip);
+ SeqEntrySetScope (oldscope);
attempts++;
}
if (bsp != NULL) {
@@ -3612,6 +3627,7 @@ static Int4 SeqPortStreamSetup (
Char ch, lttr;
CharPtr complementBase = " TVGH CD M KN YSAABW R ";
Int4 count = 0, from, to;
+ Uint2 entityID;
Int2 i;
StreamData sd;
SeqLocPtr slp;
@@ -3658,10 +3674,15 @@ static Int4 SeqPortStreamSetup (
if (bsp != NULL) {
+ entityID = ObjMgrGetEntityIDForPointer (bsp);
+ sd.scope = GetTopSeqEntryForEntityID (entityID);
+
count += SeqPortStreamWork (bsp, start, stop, strand, &sd);
} else if (loc != NULL) {
+ sd.scope = SeqEntryGetScope ();
+
slp = SeqLocFindNext (loc, NULL);
while (slp != NULL) {
@@ -3678,6 +3699,7 @@ static Int4 SeqPortStreamSetup (
/* return number of bases or residues streamed to callback */
if (sd.failed) {
+ if (count < 1) return -1;
return -count;
}
@@ -5216,7 +5238,7 @@ NLM_EXTERN Boolean LIBCALL BioseqRevComp (BioseqPtr bsp)
return retval;
}
-static Boolean ComplementSeqData (Uint1 seqtype, Int4 seqlen, SeqDataPtr sdp)
+NLM_EXTERN Boolean ComplementSeqData (Uint1 seqtype, Int4 seqlen, SeqDataPtr sdp)
{
SeqCodeTablePtr sctp;
ByteStorePtr bysp;
@@ -5393,7 +5415,7 @@ NLM_EXTERN Boolean LIBCALL BioseqComplement (BioseqPtr bsp)
} /* BioseqComplement */
-static Boolean LIBCALL ReverseSeqData (Uint1 seqtype, Int4 seqlen, SeqDataPtr sdp)
+NLM_EXTERN Boolean LIBCALL ReverseSeqData (Uint1 seqtype, Int4 seqlen, SeqDataPtr sdp)
{
ByteStorePtr bysp1, bysp2 = '\0';
long readbyte, bslen = 0;
diff --git a/api/seqport.h b/api/seqport.h
index 3e1269cb..9928a18e 100644
--- a/api/seqport.h
+++ b/api/seqport.h
@@ -29,7 +29,7 @@
*
* Version Creation Date: 7/13/91
*
-* $Revision: 6.58 $
+* $Revision: 6.59 $
*
* File Description: Ports onto Bioseqs
*
@@ -40,6 +40,9 @@
*
*
* $Log: seqport.h,v $
+* Revision 6.59 2008/02/12 18:56:52 bollin
+* Made ReverseSeqData and ComplementSeqData extern
+*
* Revision 6.58 2007/05/30 18:10:06 kans
* added KNOWN_GAP_AS_PLUS to distinguish known-length from unknown-length gaps, use for validation
*
@@ -1059,6 +1062,11 @@ NLM_EXTERN FloatHi MolWtForBsp (BioseqPtr bsp);
NLM_EXTERN FloatHi MolWtForStr (CharPtr str);
+
+NLM_EXTERN Boolean LIBCALL ReverseSeqData (Uint1 seqtype, Int4 seqlen, SeqDataPtr sdp);
+NLM_EXTERN Boolean ComplementSeqData (Uint1 seqtype, Int4 seqlen, SeqDataPtr sdp);
+
+
#ifdef __cplusplus
}
#endif
diff --git a/api/sequtil.c b/api/sequtil.c
index e802ade2..efad56a8 100644
--- a/api/sequtil.c
+++ b/api/sequtil.c
@@ -29,918 +29,15 @@
*
* Version Creation Date: 4/1/91
*
-* $Revision: 6.225 $
+* $Revision: 6.241 $
*
* File Description: Sequence Utilities for objseq and objsset
*
* Modifications:
* --------------------------------------------------------------------------
-* $Log: sequtil.c,v $
-* Revision 6.225 2007/08/08 15:59:04 kans
-* added EW to WHICH_db_accession as NCBI EST
+* Date Name Description of modification
+* ------- ---------- -----------------------------------------------------
*
-* Revision 6.224 2007/07/03 16:41:30 kans
-* use EV for NCBI EST
-*
-* Revision 6.223 2007/06/21 19:15:22 kans
-* EU is NCBI direct submission prefix
-*
-* Revision 6.222 2007/05/30 15:45:57 kans
-* WHICH_db_accession uses ET for NCBI GSS
-*
-* Revision 6.221 2007/05/08 19:01:43 kans
-* set uninitialized variables, changed tabs to spaces
-*
-* Revision 6.220 2007/05/07 13:28:35 kans
-* added casts for Seq-data.gap (SeqDataPtr, SeqGapPtr, ByteStorePtr)
-*
-* Revision 6.219 2007/04/05 13:43:36 kans
-* DDBJ uses DI for patents
-*
-* Revision 6.218 2007/03/20 19:18:04 kans
-* added ES to WHICH_db_accession
-*
-* Revision 6.217 2007/03/13 18:03:45 kans
-* added FreeSeqLocSetComponents to free sequence records referenced in a chain of SeqLocs
-*
-* Revision 6.216 2007/03/06 16:06:20 kans
-* added ER to WHICH_db_accession as ncbi gss
-*
-* Revision 6.215 2007/03/05 20:01:19 kans
-* added new wgs scaffold segmented parent prefixes to WHICH_db_accession
-*
-* Revision 6.214 2007/02/21 17:23:59 bollin
-* Added IsSkippableDbtag function, to use when TMSMART, BankIt, and NCBIFILE
-* IDs should be ignored (for displays, formatting, etc.)
-*
-* Revision 6.213 2007/02/01 17:19:19 kans
-* added EL to WHICH_db_accession as NCBI EST
-*
-* Revision 6.212 2007/01/04 16:43:56 kans
-* added EJ and EK to WHICH_db_accession as NCBI GSS
-*
-* Revision 6.211 2006/12/20 14:55:40 kans
-* added DH for DDBJ GSS
-*
-* Revision 6.210 2006/11/22 15:24:22 kans
-* WHICH_db_accession uses EI for NCBI GSS
-*
-* Revision 6.209 2006/11/15 18:01:22 kans
-* added SeqLocPartialCheckEx to control fetching of far location
-*
-* Revision 6.208 2006/11/03 19:06:03 kans
-* another accession prefix in WHICH_db_accession
-*
-* Revision 6.207 2006/09/28 20:19:26 bollin
-* fixed buffer overrun problem in SeqPointWriteEx, increased size of buffer used
-* by SeqLocPrintProc
-*
-* Revision 6.206 2006/09/20 14:53:18 kans
-* ExtendSingleGeneOnMRNA and CorrectGeneFeatLocation look for origin artificial and taxname synthetic construct, do not extend gene
-*
-* Revision 6.205 2006/09/18 17:58:41 kans
-* added EG to WHICH_db_accession
-*
-* Revision 6.204 2006/08/21 20:02:31 kans
-* assign EF to NCBI dirsub in WHICH_db_accession
-*
-* Revision 6.203 2006/07/13 17:06:39 bollin
-* use Uint4 instead of Uint2 for itemID values
-* removed unused variables
-* resolved compiler warnings
-*
-* Revision 6.202 2006/07/06 15:05:02 kans
-* added EE to WHICH_db_accession as NCBI EST
-*
-* Revision 6.201 2006/06/29 20:31:19 kans
-* only AH may be segmented protein, CH, CM, DS are nucleotide
-*
-* Revision 6.200 2006/06/29 14:24:05 kans
-* added ED to WHICH_db_accession as NCBI GSS
-*
-* Revision 6.199 2006/06/20 20:49:21 kans
-* added CU to WHICH_db_accession as EMBL genome project data
-*
-* Revision 6.198 2006/05/30 14:54:06 kans
-* added EC as NCBI EST prefix
-*
-* Revision 6.197 2006/05/11 17:08:13 bollin
-* corrected problem in GetThePointForOffset for SeqLocStart and SeqLocStop for
-* all-minus strand interval locations
-*
-* Revision 6.196 2006/04/06 15:41:19 kans
-* added DG to WHICH_db_accession
-*
-* Revision 6.195 2006/04/05 16:45:01 bollin
-* special left-right end handling for circular topology in GetThePointForOffset
-*
-* Revision 6.194 2006/03/30 17:04:53 kans
-* DF is DDBJ CON accession prefix
-*
-* Revision 6.193 2006/03/23 18:31:32 kans
-* added EB as NCBI EST
-*
-* Revision 6.192 2006/03/10 17:27:14 bollin
-* make sure parentptr is BioseqSet in GetEarlierSeqIdPtr
-*
-* Revision 6.191 2006/03/10 17:13:45 bollin
-* changes to GetEarlierSeqIdPtr to handle the situation where one of the Bioseqs
-* has not been indexed. Fixes bug reported by Serge Bazhin
-*
-* Revision 6.190 2006/02/16 17:19:14 kans
-* better handling of trans splicing in GetThePointForOffset, SeqLocStart (CB)
-*
-* Revision 6.189 2006/02/07 17:50:53 kans
-* support for pgp instead of pat for pre-grant publication in SeqIdWrite and SeqIdParse
-*
-* Revision 6.188 2006/02/01 21:53:44 kans
-* DZ and EA for ncbi patent in WHICH_db_accession
-*
-* Revision 6.187 2006/01/24 17:59:26 kans
-* use DY for NCBI EST
-*
-* Revision 6.186 2006/01/05 14:11:56 bollin
-* added SeqLocPrintUseBestID function, which prints out the sequence location
-* but uses the "best" sequence ID instead of the one actually stored in the
-* SeqLoc.
-*
-* Revision 6.185 2006/01/03 15:49:36 kans
-* added DX as ncbi gss to WHICH_db_accession
-*
-* Revision 6.184 2005/12/09 19:43:43 kans
-* added DW as NCBI EST
-*
-* Revision 6.183 2005/09/20 21:11:34 kans
-* added DV as NCBI EST
-*
-* Revision 6.182 2005/08/09 20:04:17 kans
-* added NW_ with 6 or 9 digits to WHICH_db_accession
-*
-* Revision 6.181 2005/07/28 18:33:31 kans
-* in WHICH_db_accession, DT is NCBI EST and DU is NCBI GSS
-*
-* Revision 6.180 2005/07/18 14:49:53 kans
-* fixed minor xcode compiler warnings
-*
-* Revision 6.179 2005/07/06 14:31:19 kans
-* DS is ncbi segmented set header (WGS CON scaffolds) in WHICH_db_accession
-*
-* Revision 6.178 2005/06/17 19:25:58 coulouri
-* correct pdb accession output
-*
-* Revision 6.177 2005/06/15 17:22:39 kans
-* added CT as embl genome to WHICH_db_accession
-*
-* Revision 6.176 2005/05/18 20:33:45 bollin
-* changed BSConvertSeq to handle transitions from nucleotide to protein and
-* protein to nucleotide
-*
-* Revision 6.175 2005/04/28 19:24:45 kans
-* DR prefix moved from STS to EST
-*
-* Revision 6.174 2005/04/27 17:24:21 kans
-* support seqid_gpipe in combination with a more public accession type
-*
-* Revision 6.173 2005/04/26 21:33:52 kans
-* added SEQID_GPIPE
-*
-* Revision 6.172 2005/04/05 15:25:30 kans
-* added DR as NCBI STS
-*
-* Revision 6.171 2005/03/29 14:46:42 papadopo
-* use a different start point when changing StdSeg-type seqalign offsets, if the underlying SeqLoc specifes the minus strand
-*
-* Revision 6.170 2005/03/22 20:42:03 kans
-* added DP and DQ accession prefixes
-*
-* Revision 6.169 2005/02/01 13:28:55 kans
-* added DN as NCBI EST accession prefix
-*
-* Revision 6.168 2005/01/25 18:13:47 kans
-* added CS as EMBL patent
-*
-* Revision 6.167 2004/12/08 19:44:52 kans
-* added CZ as NCBI GSS
-*
-* Revision 6.166 2004/12/08 15:14:51 kans
-* added ACCN_DDBJ_GSS, accession prefix DE
-*
-* Revision 6.165 2004/12/02 19:02:47 kans
-* added CY accession prefix
-*
-* Revision 6.164 2004/11/22 20:50:15 kans
-* added CX as NCBI EST
-*
-* Revision 6.163 2004/11/12 14:45:39 kans
-* added DD as DDBJ patent prefix
-*
-* Revision 6.162 2004/11/08 18:19:44 madden
-* GetScoreAndEvalue change to return number of hsps (in linked set) for most significant set.
-*
-* Revision 6.161 2004/10/13 16:46:52 kans
-* added DA, DB, DC as DDBJ_EST
-*
-* Revision 6.160 2004/09/21 22:34:36 dondosha
-* Get the number of linked HSPs for a DenDiag from the first segment, not from the largest linked set
-*
-* Revision 6.159 2004/09/15 13:02:02 kans
-* added CW to WHICH_db_accession as NCBI GSS
-*
-* Revision 6.158 2004/08/20 18:55:27 kans
-* SeqLocStrand skips NULL or EMPTY components of MIX to avoid giving incorrect unknown result
-*
-* Revision 6.157 2004/08/17 19:35:44 kans
-* BSPack uses BSRead instead of BSGetByte for significant speed increase
-*
-* Revision 6.156 2004/08/06 17:15:50 kans
-* added CV as NCBI EST
-*
-* Revision 6.155 2004/08/04 17:15:16 kans
-* added AccnInUniProt - still need AccnIsSWISSPROT for old style
-*
-* Revision 6.154 2004/07/21 18:05:00 rsmith
-* SeqLocStart and SeqLocStop were not handling SEQLOC_PACKED_PNTs properly
-*
-* Revision 6.153 2004/07/14 22:55:04 dondosha
-* Add version in GetAccessionVersionFromSeqId only if it is > 0
-*
-* Revision 6.152 2004/07/14 22:46:08 dondosha
-* Added GetAccessionVersionFromSeqId function to extract Accession.version from a Seq-id
-*
-* Revision 6.151 2004/07/14 19:09:19 kans
-* added CP for ACCN_NCBI_GENOME in WHICH_db_accession
-*
-* Revision 6.150 2004/06/04 17:31:34 kans
-* added CN and CO accession prefixes
-*
-* Revision 6.149 2004/05/27 15:37:31 kans
-* fixed typo in WHICH_db_accession - new 12-character RefSeq test used wrong comparison for underscore test
-*
-* Revision 6.148 2004/05/25 20:46:18 kans
-* WHICH_db_accession handles 12-character RefSeq accessions
-*
-* Revision 6.147 2004/03/30 20:29:33 kans
-* in static std_order array within SeqIdBestRank, demoted gibbsq, gibbmt, and patent
-*
-* Revision 6.146 2004/03/16 22:08:31 kans
-* added CL to WHICH_db_accession as NCBI EST
-*
-* Revision 6.145 2004/03/15 18:42:59 coulouri
-* Handle memory allocation failure gracefully with BSRebuildDNA_4na
-*
-* Revision 6.144 2004/01/16 16:37:01 kans
-* added CM as scaffold/CON record
-*
-* Revision 6.143 2003/12/18 19:35:53 kans
-* added CQ and CR prefixes
-*
-* Revision 6.142 2003/12/16 16:03:04 kans
-* added CL as ncbi gss
-*
-* Revision 6.141 2003/11/10 16:12:33 kans
-* added CK as genbank est
-*
-* Revision 6.140 2003/10/31 20:51:24 kans
-* added CI and CJ as DDBJ ESTs to WHICH_db_accession
-*
-* Revision 6.139 2003/10/24 14:36:12 kans
-* added CH as GenBank CONN to WHICH_db_accession
-*
-* Revision 6.138 2003/09/09 20:08:18 kans
-* SeqLocPartialCheck locks bioseq if seqloc_whole and far
-*
-* Revision 6.137 2003/09/02 15:11:50 kans
-* WHICH_db_accession takes ZP_ with 8 digits as refseq_prot_predicted
-*
-* Revision 6.136 2003/08/11 13:45:18 kans
-* added CG as ncbi gss
-*
-* Revision 6.135 2003/07/14 20:17:53 kans
-* added CF as ncbi est to WHICH_db_accession
-*
-* Revision 6.134 2003/07/02 14:35:21 kans
-* added CE as ncbi gss
-*
-* Revision 6.133 2003/05/20 22:15:24 yaschenk
-* SeqIdSelect loops indefinitely on corrupted memory
-*
-* Revision 6.132 2003/04/30 16:40:41 kans
-* added CD as GenBank EST
-*
-* Revision 6.131 2003/03/25 13:32:22 kans
-* added CC as ncbi gss accession prefix
-*
-* Revision 6.130 2003/03/24 19:41:56 kans
-* added tmsmart_order, use in SeqIdWrite to prevent TMSMART temporary ID from being used
-*
-* Revision 6.129 2003/02/20 19:05:31 ford
-* Modified MakeNewProteinSeqIdExMT() to create an ID of maximum length 30 instead of 20.
-*
-* Revision 6.128 2003/01/21 17:06:57 kans
-* implement PRINTID_FASTA_ALL SeqIdWrite
-*
-* Revision 6.127 2003/01/13 18:15:35 kans
-* added CB as NCBI EST prefix
-*
-* Revision 6.126 2002/11/05 18:50:31 kans
-* fixed bug in SeqLocPartialCheck
-*
-* Revision 6.125 2002/10/19 19:11:21 kans
-* added CA as GenBank EST
-*
-* Revision 6.124 2002/10/03 16:18:35 kans
-* added BZ as NCBI GSS
-*
-* Revision 6.123 2002/09/20 20:47:51 kans
-* added BY as DDBJ EST prefix
-*
-* Revision 6.122 2002/08/28 13:28:54 kans
-* added BX prefix
-*
-* Revision 6.121 2002/08/26 20:38:26 kans
-* added BW as ddbj est prefix
-*
-* Revision 6.120 2002/08/19 15:57:28 kans
-* BV is NCBI STS prefix
-*
-* Revision 6.119 2002/08/19 15:54:47 kans
-* added BU as NCBI EST prefix
-*
-* Revision 6.118 2002/07/12 18:47:46 kans
-* WHICH_db_accession was using the result of AccnIsSWISSPROT incorrectly
-*
-* Revision 6.117 2002/07/08 20:25:45 kans
-* added BT as FLI_cDNA type
-*
-* Revision 6.116 2002/06/28 14:48:03 kans
-* added BS as ddbj genome project prefix
-*
-* Revision 6.115 2002/06/20 18:38:43 kans
-* added FAA and GAA, ACCN_NCBI_WGS_PROT, ACCN_EMBL_WGS_PROT, ACCN_DDBJ_WGS_PROT, and ACCN_IS_WGS
-*
-* Revision 6.114 2002/06/19 17:13:48 kans
-* added ACCN_PDB, support for PDB in SeqIdFromAccessionDotVersion
-*
-* Revision 6.113 2002/06/10 18:06:16 kans
-* SeqLocLen use of smp->seq_len_lookup_func first checks sip for NULL
-*
-* Revision 6.112 2002/06/10 14:07:12 kans
-* SeqLocLen on whole tries new smp->seq_len_lookup_func registered function
-*
-* Revision 6.111 2002/05/29 19:19:53 bazhin
-* Added support for new EAA-EZZ protein's WGS accessions.
-*
-* Revision 6.110 2002/04/24 17:11:03 kans
-* added BR as DDBJ TPA accession prefix
-*
-* Revision 6.109 2002/04/02 18:19:56 kans
-* SeqLocPartialCheck fixes
-*
-* Revision 6.108 2002/03/26 18:11:26 kans
-* WHICH_db_accession WGS assignments - A*** NCBI, B*** DDBJ, C*** EMBL
-*
-* Revision 6.107 2002/03/12 17:08:32 kans
-* added BQ as NCBI EST
-*
-* Revision 6.106 2002/02/14 18:30:27 kans
-* SeqIdFromAccessionDotVersion defaults version to INT2_MIN
-*
-* Revision 6.105 2002/01/29 19:28:16 kans
-* SeqIdParse can parse type|accession.ver with no trailing vertical bars for RefSeq and DNA database types
-*
-* Revision 6.104 2002/01/22 18:49:15 kans
-* added ACCN_NCBI_WGS, ACCN_EMBL_WGS, and ACCN_DDBJ_WGS
-*
-* Revision 6.103 2002/01/17 13:49:32 kans
-* BP added as DDBJ EST accession prefix
-*
-* Revision 6.102 2002/01/16 16:59:38 camacho
-* Changed the type of buflen parameter in SeqIdWrite from Int2 to Uint4
-*
-* Revision 6.101 2001/11/29 14:04:29 kans
-* reverted GetThePointForOffset, deal with trans-splicing in feature indexing left/right extreme calculation itself
-*
-* Revision 6.100 2001/11/14 13:55:45 kans
-* added BN accession
-*
-* Revision 6.99 2001/11/08 13:49:45 kans
-* GetThePointForOffset on left or right end now handles trans-spliced mixed strands properly - still need to fix SeqLocMerge
-*
-* Revision 6.98 2001/10/23 14:04:18 kans
-* added BM and BL accession prefixes
-*
-* Revision 6.97 2001/09/28 22:42:49 vakatov
-* Renamed "new" to "x_new" -- to avoid clash with the C++ "operator new"
-*
-* Revision 6.96 2001/09/28 14:31:00 madden
-* Added functions BSCompressDNANew and GenericCompressDNAEx for long sequences with ambiguity
-*
-* Revision 6.95 2001/09/20 18:53:28 kans
-* changed SeqLocCompare matrices to handle artificial frameshifts
-*
-* Revision 6.94 2001/08/07 18:12:05 kans
-* added macros for EMBL and DDBJ TPA and TPA_PROT prefixes
-*
-* Revision 6.93 2001/08/06 22:13:12 kans
-* using NUM_SEQID, added TPA ids to arrays
-*
-* Revision 6.92 2001/08/06 20:07:53 ostell
-* added support for SEQID_TPG, TPE, TPD types
-*
-* Revision 6.91 2001/08/01 17:56:24 kans
-* in SeqLocGetSegLens on mix or equiv, ctr += changed to ctr = to avoid multiple increments
-*
-* Revision 6.90 2001/07/03 21:42:01 kans
-* added macros and accession prefixes for TPA (third-party annotation) records
-*
-* Revision 6.89 2001/06/06 17:53:42 kans
-* added BI and BJ accession prefixes
-*
-* Revision 6.88 2001/06/05 16:28:40 kans
-* restored logic of GetThePointForOffset, with comment that SeqLocStart returns sintp->from even on minus strand, different behavior than SEQLOC_START
-*
-* Revision 6.87 2001/06/04 19:31:14 kans
-* PDB lower case chain now represented by double upper case letter, modified SeqIdWrite, SeqIdParse, SeqIdComp, removed DeltaSeqsToSeqLoc call and variables from CheckPointInBioseq
-*
-* Revision 6.86 2001/06/04 19:07:48 kans
-* fixed buggy logic for minus strand LEFT_END/RIGHT_END in GetThePointForOffset
-*
-* Revision 6.85 2001/06/01 21:11:45 kans
-* CheckPointInBioseq now works for far delta sequences, calls SeqMgrMapPartToSegmentedBioseq, allowing NG propagation onto NT genomic records
-*
-* Revision 6.84 2001/05/30 22:47:23 kans
-* fixed Mac compiler warnings about unwanted assignments, moved function prototypes to header, removed unused variables
-*
-* Revision 6.83 2001/05/30 20:30:31 shoemake
-* Fixed bug in SeqIdParse for VB chain in SEQID_PDBs.
-*
-* Revision 6.82 2001/05/14 19:42:37 sicotte
-* Added BH prefix for ncbi GSS
-*
-* Revision 6.81 2001/05/04 22:09:45 dondosha
-* Small modification in GetAccessionFromSeqId for local id
-*
-* Revision 6.80 2001/04/27 15:46:20 madden
-* Add function RebuildDNA_4na
-*
-* Revision 6.79 2001/03/23 16:56:26 dondosha
-* Correction in function GetAccessionFromSeqId
-*
-* Revision 6.78 2001/01/30 18:11:13 kans
-* SeqIdParse for general and local counts digits, and any number > INT4_MAX will be stored as a string
-*
-* Revision 6.77 2000/12/20 20:59:58 sicotte
-* bug fix for AccnnIsSWISSPROT
-*
-* Revision 6.76 2000/12/07 16:34:42 sicotte
-* Updated WHICH_db_accession and corresponding macros: I* accessions can no longer be proteins (they were PIR) and have completed hardcoding of N000?? accessions which can belong to twoDB. Added SeqIdFromAccessionEx, ACCN_PIR_FORMAT, and AccnIsSWISSPROT functions
-*
-* Revision 6.75 2000/12/05 23:10:29 kans
-* SeqIdParse does not override default pdb chain if no tokens[1] content
-*
-* Revision 6.74 2000/11/20 17:13:47 kans
-* SeqIdParse uses SEQID_PARSE_BUF_SIZE instead of 40 character limit - needed to handle humongously long local IDs in genome annotation models, which will be removed when loaded into ID, but still need to be dealt with during processing
-*
-* Revision 6.73 2000/11/16 17:23:26 sicotte
-* IS_protdb_accession is now true for any 3 letter accession and IS_ntdb_accession is now also true for any unknown accession-looking accession number
-*
-* Revision 6.72 2000/11/14 20:49:48 sicotte
-* add XM_ refseq prefix
-*
-* Revision 6.71 2000/10/31 21:20:05 vakatov
-* [WIN32] DLL'zation
-*
-* Revision 6.70 2000/10/27 20:10:57 shavirin
-* Added new function MakeNewProteinSeqIdExMT for MT save operation.
-*
-* Revision 6.69 2000/10/26 15:28:58 dondosha
-* Do not adjust offsets for empty SeqLocs in AdjustOffSetsInSeqAlign
-*
-* Revision 6.68 2000/10/24 19:04:18 dondosha
-* Moved function UniqueLocalId from blast.c
-*
-* Revision 6.67 2000/10/11 21:59:35 kans
-* added PRINTID_FASTA_GENERAL
-*
-* Revision 6.66 2000/10/11 18:33:36 kans
-* SeqIdWrite fasta_order prefers SEQID_OTHER, then SEQID_GENERAL, then SEQID_LOCAL
-*
-* Revision 6.65 2000/10/03 16:51:07 cavanaug
-* Added BF accession prefix to WHICH_db_accession
-*
-* Revision 6.64 2000/10/02 14:30:48 sicotte
-* Added BE prefix for NCBI EST to WHICH_db_accession
-*
-* Revision 6.63 2000/10/02 14:29:16 sicotte
-* Added BE prefix for NCBI EST to WHICH_db_accession
-*
-* Revision 6.62 2000/09/28 15:08:31 dondosha
-* Corrected local id handling in GetAccessionFromSeqid - used in Mega BLAST
-*
-* Revision 6.61 2000/09/19 15:22:07 sicotte
-* fix BD and BE prefix
-*
-* Revision 6.60 2000/09/12 20:20:13 cavanaug
-* WHICH_db_accession : fixed missing paren
-*
-* Revision 6.59 2000/09/12 19:54:22 cavanaug
-* WHICH_db_accession now knows about BE accessions
-*
-* Revision 6.58 2000/08/02 21:26:15 kans
-* SeqIdWrite will not print version if release is used
-*
-* Revision 6.57 2000/07/11 15:01:50 kans
-* added SeqIdFromAccessionDotVersion for genome mapping project
-*
-* Revision 6.56 2000/06/08 14:30:07 dondosha
-* Fixed bug in GetAccessionFromSeqId for general id
-*
-* Revision 6.55 2000/05/22 17:37:01 sicotte
-* add BD prefix to WHICH_db_accession
-*
-* Revision 6.54 2000/05/17 17:20:43 dondosha
-* Added function GetAccessionFromSeqId, used in standalone programs blastclust and megablast
-*
-* Revision 6.53 2000/05/10 16:56:33 kans
-* SeqIdParse stops looking for expected_tokens when done is TRUE, avoids reading past end of string for ref|xxx| with two bars
-*
-* Revision 6.52 2000/05/05 13:24:50 kans
-* For SEQID_OTHER (RefSeq), SeqIdWrite will not print third vertical bar (originally for when there would be periodic releases - obsolete now that RefSeq is part of Entrez), and SeqIdParse will not upper case the tsip->name (LOCUS)
-*
-* Revision 6.51 2000/05/04 15:07:54 kans
-* SeqIdParse sends SEV_INFO, not SEV_ERROR, since blast uses it to test IDs for validity
-*
-* Revision 6.50 2000/05/03 17:56:05 sicotte
-* Added BC prefix ; changed refseq SeqID
-*
-* Revision 6.49 2000/03/29 15:53:50 sicotte
-* Added BB predix for DDBJ EST to WHICH_db_accession
-*
-* Revision 6.48 2000/02/17 17:29:52 sicotte
-* Added BA prefix for DDBJ CON division
-*
-* Revision 6.47 2000/02/11 21:09:52 madden
-* Check for NULL SeqAlignPtr before dereferencing
-*
-* Revision 6.46 2000/02/04 16:13:16 kans
-* added prefix parameter to MakeNewProteinSeqIdEx
-*
-* Revision 6.45 1999/12/22 15:46:19 sicotte
-* Added prefix AZ
-*
-* Revision 6.44 1999/11/22 17:28:01 kans
-* allow RefSeq ID to have two or (expected) three tokens
-*
-* Revision 6.43 1999/10/12 13:46:42 kans
-* AX and AY added to WHICH_db_accession
-*
-* Revision 6.42 1999/08/31 20:49:03 shavirin
-* Added case 5 (discontinous alignment) in function TxGetIdFromSeqAlign().
-*
-* Revision 6.41 1999/08/11 15:49:21 sicotte
-* Add AW prefix for NCBI EST in WHICH_db_accession
-*
-* Revision 6.40 1999/08/05 20:52:25 sicotte
-* fix in SeqIdFindBestAccession
-*
-* Revision 6.39 1999/08/03 20:00:34 sicotte
-* Add SeqIdFindBestAccession
-*
-* Revision 6.38 1999/07/30 09:28:17 sicotte
-* Transfered fns from salutil.c(chappey) AddSeqId,SeqIdDupList,SeqIdDupBestList,SeqIdListfromSeqLoc
-*
-* Revision 6.37 1999/06/24 20:39:21 kans
-* SeqIdPrint just calls SeqIdWrite, PRINTID_TEXTID_LOCUS uses accession (no version) if no locus name
-*
-* Revision 6.36 1999/05/24 22:22:25 sicotte
-* SeqIdFromAccession: Fix bug for embl/ddbj accessions
-*
-* Revision 6.35 1999/05/20 14:33:13 sicotte
-* SeqIdFromAccession: remove tsp->name to accomodate LOCUS names
-*
-* Revision 6.34 1999/04/22 14:52:34 tatiana
-* changes in MuskSeqIdWrite to print human chromosome Ids
-*
-* Revision 6.33 1999/04/20 14:34:53 sicotte
-* Add AV accession prefix for DDBJ EST in WHICH_db_accession
-*
-* Revision 6.32 1999/04/08 14:11:16 sicotte
-* Add SeqIdOrderInBioseqIdList (consider synomymous SeqIds)
-*
-* Revision 6.31 1999/04/02 17:31:59 vakatov
-* Added NLM_EXTERN for FindNuc() and FindProt() proto
-*
-* Revision 6.30 1999/04/01 17:41:20 sicotte
-* Added SeqIdInSeqLocList : Check if the Bioseq of SeqId sip is in list: may try to fetch the Bioseq
-*
-* Revision 6.29 1999/04/01 13:54:47 sicotte
-* Added SeqIdOrderInList(To find the position of a SeqId in a Chain)
-* ExtractAccession ( To parse an accession into it's version and acc.)
-* SeqIdFromAccession (To make the proper type of SeqId given an
-* accession string. (uses WHICH_db_accession)
-* moved IS_ntdb_accession, IS_protdb_accession, WHICH_db_accession
-* from accutils.ch to sequtil.ch
-*
-* Revision 6.28 1999/03/31 16:53:40 madden
-* Added FindNuc and FindProt functions for SeqEntryExplore
-*
-* Revision 6.27 1999/03/11 23:32:06 kans
-* sprintf casts
-*
-* Revision 6.26 1999/03/04 17:10:14 kans
-* check for tsip->release == NULL for showversion (JO)
-*
-* Revision 6.25 1999/02/22 15:34:22 kans
-* print version if > 0 (had erroneously been > 1)
-*
-* Revision 6.24 1999/02/09 20:15:00 kans
-* initialized version, release, in stack textseqid (JO)
-*
-* Revision 6.23 1999/02/02 21:38:12 kans
-* moved SHOWVERSION to header, SeqMgrAddIndexElement with and without version (JO)
-*
-* Revision 6.22 1999/02/01 18:41:02 ostell
-* added SHOWVER define to stop printing versions until ready
-*
-* Revision 6.21 1999/02/01 16:24:45 ostell
-* check for accession.version >0 not just non-zero
-*
-* Revision 6.20 1999/02/01 16:17:12 ostell
-* added version support for SeqIdWrite and SeqIdParse
-*
-* Revision 6.19 1999/01/12 18:00:18 kans
-* SeqIdComp now ignores version if < 1, and added PRINTID_TEXTID_ACC_VER and PRINTID_TEXTID_ACC_ONLY formats for SeqIdWrite
-*
-* Revision 6.18 1999/01/11 17:11:22 kans
-* SeqIdComp now checks version numbers
-*
-* Revision 6.17 1999/01/05 18:30:26 kans
-* SeqLocId ignores SEQLOC_NULL (Tatiana)
-*
-* Revision 6.16 1998/12/14 20:56:26 kans
-* dnaLoc_to_aaLoc takes allowTerminator parameter to handle stop codons created by polyA tail
-*
-* Revision 6.15 1998/11/24 20:15:05 kans
-* seqid other has better priority than local so refgene id is used preferentially
-*
-* Revision 6.14 1998/11/12 15:48:35 kans
-* SEQID_OTHER now prints as "ref" instead of "oth", though the latter is still detected by SeqIdParse as a special case
-*
-* Revision 6.13 1998/10/19 15:49:08 kans
-* SeqIdWrite now writes three fields for SEQID_OTHER in FASTA_SHORT
-*
-* Revision 6.12 1998/08/26 20:56:06 kans
-* got SeqIdComp test for general ID db strings wrong the first time
-*
-* Revision 6.11 1998/08/26 20:29:45 kans
-* SeqIdComp allows multiple general IDs with different db names
-*
-* Revision 6.10 1998/08/18 21:42:44 kans
-* SeqIdIn does not return on SIC_NO in order to handle multiple IDs of the same class (e.g., general)
-*
-* Revision 6.9 1998/08/13 22:31:48 kans
-* SeqMgrMapPartToSegmentedBioseq to speed up GetOffsetInBioseq, start of indexing segments, also index biosource by location for binary search (Wheelan)
-*
-* Revision 6.8 1998/07/28 16:41:08 kans
-* added MakeNewProteinSeqIdEx for faster creation of many new protein products
-*
-* Revision 6.7 1998/05/05 15:54:39 kans
-* SeqIdMatch now handles SEQID_OTHER (JO)
-*
-* Revision 6.6 1998/04/22 18:07:22 egorov
-* Make possible the second paramter (SeqLocPtr slp2) of AdjustOffSetsInSeqAlign to be NULL
-*
-* Revision 6.5 1998/02/27 17:10:01 vakatov
-* [WIN32 DLL] Declared some functions as NLM_EXTERN(DLL-exportable)
-*
-* Revision 6.4 1998/02/26 19:14:03 madden
-* Added AdjustOffSetsInSeqAlign
-*
-* Revision 6.3 1998/01/26 17:25:30 madden
-* Added TxGetQueryIdFromSeqAlign function
-*
-* Revision 6.2 1997/10/15 14:43:18 ostell
-* changed SeqIdPrint, SeqIdWrite, SeqIdParse to convert PDB chain id '|' into VB
-*
-* Revision 6.1 1997/10/06 14:01:23 zjing
-* move TxGetSubjectId, GetScoreAndEvalue to sequtil.ch
-*
-* Revision 6.0 1997/08/25 18:07:20 madden
-* Revision changed to 6.0
-*
-* Revision 5.43 1997/08/19 17:07:09 kans
-* EntrezASN1Detected now explores all components
-*
-* Revision 5.42 1997/07/17 18:46:21 kans
-* SeqLocStrand now treats mixed unknown and plus as plus
-*
-* Revision 5.41 1997/06/19 18:38:56 vakatov
-* [WIN32,MSVC++] Adopted for the "NCBIOBJ.LIB" DLL'ization
-*
-* Revision 5.40 1997/05/19 19:25:26 shavirin
-* Added function CorrectGeneFeatLocation()
-*
- * Revision 5.39 1997/04/09 18:43:01 tatiana
- * a typo in MolTypeForGi description fixed
- *
- * Revision 5.38 1997/04/09 18:00:10 tatiana
- * added MolTypeForGI()
- *
- * Revision 5.37 1997/04/08 17:27:51 shavirin
- * Fixed typecast warnings.
- *
- * Revision 5.36 1997/04/04 17:24:44 shavirin
- * Fixed position calculation in BSRebuildDNA_4na() function
- *
- * Revision 5.35 1997/03/28 21:18:10 shavirin
- * Added function BSRebuildDNA_4na()
- *
- * Revision 5.34 1997/03/18 23:22:25 kans
- * changed return NULL to return FALSE in GenericCompressDNA (detected by
- * CodeWarrior)
- *
- * Revision 5.33 1997/03/18 19:16:30 shavirin
- * Added error handling in GenericCompressDNA() function
- *
- * Revision 5.32 1997/03/18 15:26:31 ostell
- * made SeqIdComp case insensitive
- *
- * Revision 5.31 1997/03/06 22:56:31 kans
- * added include <seqport.h> for dnaLoc_to_aaLoc
- *
- * Revision 5.30 1997/03/06 22:46:50 shavirin
- * Moved SPCompress functions to seqport.c
- *
- * Revision 5.29 1997/03/06 21:27:30 shavirin
- * Added new set of functions: SPCompressDNA(), SPRebuildDNA(), SPCompressNew(),
- * SPCompressFree()
- *
- * Revision 5.28 1997/03/04 21:58:48 shavirin
- * Added function GenericCompressDNA()
- *
- * Revision 5.27 1997/03/04 19:57:03 epstein
- * fix minus strand problem for gatherCodingRegions()
- *
- * Revision 5.26 1997/03/04 03:51:32 shavirin
- * Fixed memory leak in BSCompressDNA()
- *
- * Revision 5.25 1997/03/03 22:34:09 shavirin
- * Changed IO Buffer from 100/1 to 1024/1024 in BSCompressDNA
- *
- * Revision 5.23 1997/02/26 20:14:16 shavirin
- * Removed RandomSeed initialization in SeqMapTableFind()
- *
- * Revision 5.22 1997/02/26 19:24:16 shavirin
- * Optimized by increasing IO buffers function BSConvertSeq()
- *
- * Revision 5.21 1997/02/03 20:56:24 ostell
- * added additional check to MakeNewProteinSeqId() for an existing id in
- * GenBank locus form.
- *
- * Revision 5.20 1997/01/08 22:24:26 zjing
- * changes in MuskSeqIdWrite to Print THC Ids
- *
- * Revision 5.19 1996/12/10 19:17:39 kans
- * *** empty log message ***
- *
- * Revision 5.18 1996/11/18 20:37:37 shavirin
- * "Pack" set of functions now will produce ncbieaa Seq_code
- * for proteins.
- *
- * Revision 5.17 1996/10/15 15:44:08 shavirin
- * *** empty log message ***
- *
- * Revision 5.16 1996/10/15 14:47:18 shavirin
- * Added new functions: BSCompressDNA() and BSRebuildDNA() to handle
- * ambiguity characters.
- *
- * Revision 5.15 1996/10/11 21:08:28 chappey
- * backed out changes to add extra byte at end of bytestore
- *
- * Revision 5.14 1996/10/10 21:06:01 shavirin
- * Implemented random conversion of ASCII and ncbi4na encoding
- * to ncbi2na in case of ambiguous bases.
- *
- * Revision 5.13 1996/10/09 19:01:37 shavirin
- * Changed format of last byte in BSConvertSeq() function.
- *
- * Revision 5.12 1996/10/04 19:07:31 shavirin
- * Rewritten function BSPack() with more efficient algorithm
- *
- * Revision 5.11 1996/09/26 01:51:37 ostell
- * fixed logic error in BioseqConvert()
- *
- * Revision 5.10 1996/08/26 14:07:52 madden
- * Changed try to tax_try in for compatability with DEC OS.
- *
- * Revision 5.9 1996/08/07 20:13:04 epstein
- * move MuskSeqIdWrite, seqid_name, local_id_make and update_seq_loc from jzmisc to sequtil, to untangle the desktop and tools libraries from one another
- *
- * Revision 5.8 1996/07/15 19:03:57 epstein
- * adapt to dnaLoc_to_aaLoc() change
- *
- * Revision 5.7 1996/07/15 15:57:23 kans
- * fixed a call to ISA_na, removed an unused variable
- *
- * Revision 5.6 1996/07/15 14:41:53 epstein
- * add SeqEntryContainsSeqIdOfMolType() and FindCodingRegion() and add performance improvements to FindSpliceSites()
- *
- * Revision 5.5 1996/07/11 16:25:31 kans
- * MakeNewProteinSeqId default string is now tmpseq_
- *
- * Revision 5.4 1996/06/27 19:58:39 epstein
- * return NULL from FindSpliceSites if there are no splice sites
- *
- * Revision 5.3 1996/06/24 18:38:24 epstein
- * move splicing functionality to sequtil.c
- *
- * Revision 5.2 1996/06/16 15:19:31 ostell
- * added delta seq support to SeqEntryPack
- *
- * Revision 5.1 1996/06/12 18:29:14 epstein
- * move SeqLocIntNew() and SeqLocPntNew() from edutil to sequtil
- *
- * Revision 5.0 1996/05/28 13:23:23 ostell
- * Set to revision 5.0
- *
- * Revision 4.18 1996/03/25 22:18:32 tatiana
- * *** empty log message ***
- *
- * Revision 4.17 1996/03/11 19:06:43 ostell
- * added MakeNewProteinSeqId()
- *
- * Revision 4.16 1996/02/28 04:53:06 ostell
- * fix for SeqLocFindNext and ..Part for head haveing next pointer
- *
- * Revision 4.15 1996/02/26 03:44:33 ostell
- * added support for SEQLOC_BOND to SeqLocStart, SeqLocStop, SeqLocID, SeqLocStrand
- *
- * Revision 4.14 1996/02/24 03:11:40 ostell
- * made GetResidueForSymbol ruturn INVALID=-RESIDUE when letter is 0
- *
- * Revision 4.13 1996/01/31 16:08:16 tatiana
- * StringForSeqTech() added by Tatiana
- *
- * Revision 4.12 1995/12/27 22:30:21 ostell
- * added support for delta seqs in BioseqGetSegs, ..GetGaps
- *
- * Revision 4.11 1995/12/22 20:18:10 ostell
- * fix to SeqIdWrite to fall though PRINTID_FASTA_LONG when no gi is present
- *
- * Revision 4.10 1995/12/05 21:43:13 ostell
- * changed SeqIdWrite to format a little nicer
- *
- * Revision 4.9 1995/10/19 02:30:31 ostell
- * fixed SeqLocFindNext() bug that caused early termination at the
- * end of nested locations.
- *
- * Revision 4.8 1995/10/17 04:15:37 ostell
- * added SeqLocFindPart()
- * made SeqLocFindNext() call it
- * added equiv_is_one to IS_one_loc()
- *
- * Revision 4.7 1995/10/12 18:11:23 kans
- * corrected SeqLocLen for SEQLOC_MIX (JO)
- *
- * Revision 4.6 1995/09/29 15:03:06 ostell
- * changed SeqIdParse() to retain first Seqid if failure only on second
- *
- * Revision 4.5 1995/09/28 20:51:13 tatiana
- * SeqLocLen changed to handle case SEQLOC_EQUIV
- *
- * Revision 4.3 1995/09/06 21:06:28 ostell
- * fixed logical condition in SeqLocPartialCheck() that looked at Int-fuzz
- * lim type >= 0 || <= 2 (for unk, gt, lt).. changed || to &&
- *
- * Revision 4.2 1995/08/24 20:15:31 tatiana
- * bug fixed in sequtil.c
- *
- * Revision 4.1 1995/08/09 17:00:15 tatiana
- * bug fixed in SeqIdWrite()
- *
- * Revision 2.80 1995/07/20 22:08:39 tatiana
- * change SeqIdprint to SeqIdWrite
- *
- * Revision 2.79 1995/07/18 19:53:22 tatiana
- * add SeqIdWrite() to replace SeqIdPrint()
- *
- * Revision 2.78 1995/06/27 20:39:58 kans
- * SeqIdForSameBioseq no longer fetches
- *
- * Revision 2.77 1995/06/14 16:31:59 kans
- * EntrezASN1Detected function added (to be used by Sequin and ID)
- *
- * Revision 2.76 1995/06/06 16:25:38 ostell
- * added support for MolInfo in SeqLocPartialCheck()
- *
- * Revision 2.75 1995/05/19 04:02:08 ostell
- * added SeqLocAinB()
- *
- * Revision 2.74 1995/05/09 18:10:09 ostell
- * changed to using NUM_SEQID
- *
- * Revision 2.74 1995/05/09 18:10:09 ostell
- * changed to using NUM_SEQID
* ==========================================================================
*/
@@ -1506,7 +603,11 @@ NLM_EXTERN Boolean BioseqPack (BioseqPtr bsp)
if (Bioseq_repr(bsp) != Seq_repr_delta)
return FALSE;
+
+ /* not set up to compress delta proteins */
+ if (ISA_aa (bsp->mol)) return FALSE;
+
/* go through the delta chain */
for (vnp = (ValNodePtr)(bsp->seq_ext); vnp != NULL; vnp = vnp->next) {
@@ -3632,6 +2733,7 @@ NLM_EXTERN CharPtr SeqIdWrite (SeqIdPtr isip, CharPtr buf, Uint1 format, Uint4 b
Char chainbuf[3];
Char versionbuf[10];
Int2 version = 0;
+ CharPtr release = NULL;
buf[0] = '\0';
buflen--;
@@ -3779,6 +2881,10 @@ NLM_EXTERN CharPtr SeqIdWrite (SeqIdPtr isip, CharPtr buf, Uint1 format, Uint4 b
case SEQID_TPD:
case SEQID_GPIPE:
tsip = (TextSeqIdPtr)sip->data.ptrvalue;
+ release = tsip->release;
+ if (sip->choice == SEQID_SWISSPROT) {
+ release = NULL;
+ }
if ((format == PRINTID_TEXTID_LOCUS) && (tsip->name != NULL)) {
Nlm_LabelCopyNext(&tmp, tsip->name, &buflen);
return tmp;
@@ -3788,7 +2894,7 @@ NLM_EXTERN CharPtr SeqIdWrite (SeqIdPtr isip, CharPtr buf, Uint1 format, Uint4 b
return tmp;
} else if ((format == PRINTID_TEXTID_ACC_VER)
&& (tsip->accession != NULL)) {
- if (tsip->version > 0 && tsip->release == NULL) {
+ if (tsip->version > 0 && release == NULL) {
sprintf(localbuf, "%s.%d", tsip->accession,
(int)(tsip->version));
} else {
@@ -3807,6 +2913,12 @@ NLM_EXTERN CharPtr SeqIdWrite (SeqIdPtr isip, CharPtr buf, Uint1 format, Uint4 b
{
if (sip->choice == SEQID_PATENT && is_us_pre_grant) {
Nlm_LabelCopyNext(&tmp, "pgp", &buflen);
+ } else if (sip->choice == SEQID_SWISSPROT) {
+ tsip = (TextSeqIdPtr)sip->data.ptrvalue;
+ if (tsip->release && StringCmp(tsip->release, "unreviewed") == 0)
+ Nlm_LabelCopyNext(&tmp, "tr", &buflen);
+ else
+ Nlm_LabelCopyNext(&tmp, txtid[sip->choice], &buflen);
} else {
Nlm_LabelCopyNext(&tmp, txtid[sip->choice], &buflen);
}
@@ -3844,12 +2956,16 @@ NLM_EXTERN CharPtr SeqIdWrite (SeqIdPtr isip, CharPtr buf, Uint1 format, Uint4 b
case SEQID_TPE:
case SEQID_TPD:
case SEQID_GPIPE:
+ case SEQID_SWISSPROT:
tsip = (TextSeqIdPtr)(sip->data.ptrvalue);
- if (((tsip->version > 0) && (tsip->release == NULL)) && SHOWVERSION)
- version = tsip->version; /* show versions */
- sprintf(versionbuf, ".%d", (int)version);
+ release = tsip->release;
+ if (sip->choice == SEQID_SWISSPROT) {
+ release = NULL;
+ }
+ if (((tsip->version > 0) && (release == NULL)) && SHOWVERSION)
+ version = tsip->version; /* show versions */
+ sprintf(versionbuf, ".%d", (int)version);
case SEQID_PIR:
- case SEQID_SWISSPROT:
case SEQID_PRF:
tsip = (TextSeqIdPtr)sip->data.ptrvalue;
if (tsip->accession != NULL)
@@ -4101,6 +3217,7 @@ NLM_EXTERN SeqIdPtr SeqIdParse(CharPtr buf)
d = *delim; /* delimiter */
while (! done)
{
+ Boolean sp_prelim = FALSE; /* Used to set release field in Swissprot TextSeqId */
/* set all tokens pointing to \0 */
localbuf[SEQID_PARSE_BUF_SIZE + 1] = '\0';
for (i = 0; i < 6; i++)
@@ -4134,6 +3251,12 @@ NLM_EXTERN SeqIdPtr SeqIdParse(CharPtr buf)
is_us_pre_grant = TRUE;
}
+ /* Trembl ID is really Swissprot with release field of TextSeqId set to "unreviewed" */
+ if ((! type) && (! StringCmp(localbuf, "tr"))) {
+ type = SEQID_SWISSPROT;
+ sp_prelim = TRUE;
+ }
+
if (! type) goto erret;
/* copy and tokenize - token\0token\0\n */
@@ -4261,6 +3384,13 @@ NLM_EXTERN SeqIdPtr SeqIdParse(CharPtr buf)
}
}
}
+ if (type == SEQID_SWISSPROT)
+ {
+ if (sp_prelim)
+ tsip->release = StringSave("unreviewed");
+ else
+ tsip->release = StringSave("reviewed");
+ }
break;
case SEQID_PATENT:
if ((*tokens[0] == '\0') || (*tokens[1] == '\0')) goto erret;
@@ -9542,7 +8672,12 @@ NLM_EXTERN Uint4 LIBCALL WHICH_db_accession (CharPtr s)
(StringICmp(temp,"EL") == 0) ||
(StringICmp(temp,"ES") == 0) ||
(StringICmp(temp,"EV") == 0) ||
- (StringICmp(temp,"EW") == 0) ) { /* NCBI EST */
+ (StringICmp(temp,"EW") == 0) ||
+ (StringICmp(temp,"EX") == 0) ||
+ (StringICmp(temp,"EY") == 0) ||
+ (StringICmp(temp,"FC") == 0) ||
+ (StringICmp(temp,"FD") == 0) ||
+ (StringICmp(temp,"FE") == 0) ) { /* NCBI EST */
retcode = ACCN_NCBI_EST;
} else if ((StringICmp(temp,"BV") == 0)) { /* NCBI STS */
retcode = ACCN_NCBI_STS;
@@ -9567,7 +8702,8 @@ NLM_EXTERN Uint4 LIBCALL WHICH_db_accession (CharPtr s)
(StringICmp(temp,"EM") == 0) ||
(StringICmp(temp,"EN") == 0) ||
(StringICmp(temp,"EP") == 0) ||
- (StringICmp(temp,"EQ") == 0)) { /* NCBI segmented set header Bioseq */
+ (StringICmp(temp,"EQ") == 0) ||
+ (StringICmp(temp,"FA") == 0)) { /* NCBI segmented set header Bioseq */
retcode = ACCN_NCBI_SEGSET;
} else if ((StringICmp(temp,"AS") == 0)) { /* NCBI "other" */
retcode = ACCN_NCBI_OTHER;
@@ -9603,12 +8739,15 @@ NLM_EXTERN Uint4 LIBCALL WHICH_db_accession (CharPtr s)
} else if((StringICmp(temp,"BK")==0) || /* NCBI third-party annotation */
(StringICmp(temp,"BL") == 0)) {
retcode = ACCN_NCBI_TPA;
+ } else if((StringICmp(temp,"EZ") == 0)) {
+ retcode = ACCN_NCBI_TSA;
} else if ((StringICmp(temp,"BN") == 0)) { /* EMBL third-party annotation */
retcode = ACCN_EMBL_TPA;
} else if ((StringICmp(temp,"BR") == 0)) { /* DDBJ third-party annotation */
retcode = ACCN_DDBJ_TPA;
} else if ((StringICmp(temp,"AJ") == 0) ||
- (StringICmp(temp,"AM") == 0)) { /* EMBL direct submission */
+ (StringICmp(temp,"AM") == 0) ||
+ (StringICmp(temp,"FM") == 0)) { /* EMBL direct submission */
retcode = ACCN_EMBL_DIRSUB;
} else if ((StringICmp(temp,"AL") == 0) ||
(StringICmp(temp,"BX") == 0)||
@@ -9620,7 +8759,8 @@ NLM_EXTERN Uint4 LIBCALL WHICH_db_accession (CharPtr s)
retcode = ACCN_EMBL_CON;
} else if ((StringICmp(temp,"AX") == 0) ||
(StringICmp(temp,"CQ") == 0) ||
- (StringICmp(temp,"CS") == 0)) { /* EMBL patent division */
+ (StringICmp(temp,"CS") == 0) ||
+ (StringICmp(temp,"FB") == 0)) { /* EMBL patent division */
retcode = ACCN_EMBL_PATENT;
} else if ((StringICmp(temp,"AT") == 0) ||
(StringICmp(temp,"AU") == 0) ||
@@ -9650,7 +8790,8 @@ NLM_EXTERN Uint4 LIBCALL WHICH_db_accession (CharPtr s)
retcode = ACCN_DDBJ_CON;
} else if ((StringICmp(temp,"BD") == 0) ||
(StringICmp(temp,"DD") == 0) ||
- (StringICmp(temp,"DI") == 0)) { /* DDBJ patent division */
+ (StringICmp(temp,"DI") == 0) ||
+ (StringICmp(temp,"DJ") == 0)) { /* DDBJ patent division */
retcode = ACCN_DDBJ_PATENT;
} else if ((StringICmp(temp,"DE") == 0) ||
(StringICmp(temp,"DH") == 0)) { /* DDBJ GSS */
@@ -9683,7 +8824,7 @@ NLM_EXTERN Uint4 LIBCALL WHICH_db_accession (CharPtr s)
temp[1] = *s; s++;
temp[2] = NULLB; s++;
- if ((StringICmp(temp,"NP") == 0)) {
+ if ((StringICmp(temp,"NP") == 0) || (StringICmp(temp,"AP") == 0)) {
retcode = ACCN_REFSEQ_PROT;
} else if ((StringICmp(temp,"NM") == 0)) {
retcode = ACCN_REFSEQ_mRNA;
@@ -9697,8 +8838,10 @@ NLM_EXTERN Uint4 LIBCALL WHICH_db_accession (CharPtr s)
retcode = ACCN_REFSEQ_mRNA_PREDICTED;
} else if ((StringICmp(temp,"XP") == 0)) {
retcode = ACCN_REFSEQ_PROT_PREDICTED;
- } else if ((StringICmp(temp,"NG") == 0)) {
+ } else if ((StringICmp(temp,"NG") == 0) || (StringICmp(temp,"AC") == 0)) {
retcode = ACCN_REFSEQ_GENOMIC;
+ } else if ((StringICmp(temp,"NS") == 0)) {
+ retcode = ACCN_REFSEQ_ARTIFICIAL_ASSEMBLY;
} else if (IS_ALPHA(*temp) && IS_ALPHA(*(temp+1))) {
retcode =ACCN_REFSEQ | ACCN_AMBIGOUS_MOL;
} else
diff --git a/api/sequtil.h b/api/sequtil.h
index 470c7b23..5d0f0b8f 100644
--- a/api/sequtil.h
+++ b/api/sequtil.h
@@ -29,13 +29,19 @@
*
* Version Creation Date: 4/1/91
*
-* $Revision: 6.52 $
+* $Revision: 6.54 $
*
* File Description: Sequence Utilities for objseq and objsset
*
* Modifications:
* --------------------------------------------------------------------------
* $Log: sequtil.h,v $
+* Revision 6.54 2008/02/12 16:30:29 kans
+* added ACCN_REFSEQ_ARTIFICIAL_ASSEMBLY for NS_
+*
+* Revision 6.53 2008/01/25 22:31:48 kans
+* added ACCN_XXXX_TSA and ACCN_XXXX_TSA_PROT, EZ as NCBI TSA accession
+*
* Revision 6.52 2007/03/13 18:03:45 kans
* added FreeSeqLocSetComponents to free sequence records referenced in a chain of SeqLocs
*
@@ -1218,6 +1224,15 @@ NLM_EXTERN Boolean LIBCALL NAccnIsDDBJ (CharPtr s);
#define ACCN_DDBJ_GSS 61
+#define ACCN_NCBI_TSA 62
+#define ACCN_NCBI_TSA_PROT 63
+#define ACCN_EMBL_TSA 64
+#define ACCN_EMBL_TSA_PROT 65
+#define ACCN_DDBJ_TSA 66
+#define ACCN_DDBJ_TSA_PROT 67
+
+#define ACCN_REFSEQ_ARTIFICIAL_ASSEMBLY 68
+
/* Some accessions prefix can be either protein or nucleotide
such as NCBI PATENT I, AR .. or segmented set Bioseqs 'AH'
@@ -1247,18 +1262,20 @@ NLM_EXTERN Boolean LIBCALL NAccnIsDDBJ (CharPtr s);
Define to detect Genbank's accessions: Genbank-subsumed GSDB accession numbers
are defined to be Genbank's as well as GSDB DIRSUB records.
*/
-#define ACCN_IS_GENBANK(c) ((((c)&65535) == ACCN_NCBI_GSDB) || (((c)&65535)==ACCN_GSDB_DIRSUB) || (((c)&65535) == ACCN_NCBI_EST) || (((c)&65535) == ACCN_NCBI_DIRSUB) || (((c)&65535) == ACCN_NCBI_GENOME) || (((c)&65535) == ACCN_NCBI_PATENT) || (((c)&65535) == ACCN_NCBI_HTGS) || (((c)&65535) == ACCN_NCBI_GSS) || (((c)&65535) == ACCN_NCBI_STS) || (((c)&65535) == ACCN_NCBI_BACKBONE) || (((c)&65535) == ACCN_NCBI_SEGSET) || (((c)&65535) == ACCN_NCBI_WGS) || (((c)&65535) == ACCN_NCBI_OTHER) || (((c)&65535) == ACCN_NCBI_PROT) || (((c)&65535) == ACCN_NCBI_cDNA) || (((c)&65535) == ACCN_EMBL_GB) || (((c)&65535) == ACCN_EMBL_GB_DDBJ || (((c)&65535) == ACCN_GB_DDBJ)) )
+#define ACCN_IS_GENBANK(c) ((((c)&65535) == ACCN_NCBI_GSDB) || (((c)&65535)==ACCN_GSDB_DIRSUB) || (((c)&65535) == ACCN_NCBI_EST) || (((c)&65535) == ACCN_NCBI_DIRSUB) || (((c)&65535) == ACCN_NCBI_GENOME) || (((c)&65535) == ACCN_NCBI_PATENT) || (((c)&65535) == ACCN_NCBI_HTGS) || (((c)&65535) == ACCN_NCBI_GSS) || (((c)&65535) == ACCN_NCBI_STS) || (((c)&65535) == ACCN_NCBI_BACKBONE) || (((c)&65535) == ACCN_NCBI_SEGSET) || (((c)&65535) == ACCN_NCBI_WGS) || (((c)&65535) == ACCN_NCBI_OTHER) || (((c)&65535) == ACCN_NCBI_PROT) || (((c)&65535) == ACCN_NCBI_cDNA) || (((c)&65535) == ACCN_NCBI_TSA) || (((c)&65535) == ACCN_NCBI_TSA_PROT) || (((c)&65535) == ACCN_EMBL_GB) || (((c)&65535) == ACCN_EMBL_GB_DDBJ || (((c)&65535) == ACCN_GB_DDBJ)) )
/* XM_,NP_,NM_,NT_,NC_ reference sequence records created and curated by NCBI
REFSEQ project
*/
-#define ACCN_IS_REFSEQ(c) (((c)== ACCN_REFSEQ_PROT) || ((c)== ACCN_REFSEQ_mRNA) || ((c)== ACCN_REFSEQ_CONTIG) || ((c)== ACCN_REFSEQ_CHROMOSOME) || ((c)== ACCN_REFSEQ_mRNA_PREDICTED) || ((c)== ACCN_REFSEQ_PROT_PREDICTED) || ((c)== ACCN_REFSEQ_GENOMIC) || (((c)&65535)== ACCN_REFSEQ) )
+#define ACCN_IS_REFSEQ(c) (((c)== ACCN_REFSEQ_PROT) || ((c)== ACCN_REFSEQ_mRNA) || ((c)== ACCN_REFSEQ_CONTIG) || ((c)== ACCN_REFSEQ_CHROMOSOME) || ((c)== ACCN_REFSEQ_mRNA_PREDICTED) || ((c)== ACCN_REFSEQ_PROT_PREDICTED) || ((c)== ACCN_REFSEQ_GENOMIC) || ((c)== ACCN_REFSEQ_ARTIFICIAL_ASSEMBLY) || (((c)&65535)== ACCN_REFSEQ) )
#define ACCN_IS_TPA(c) (((c)== ACCN_NCBI_TPA) || ((c)== ACCN_NCBI_TPA_PROT) || ((c)== ACCN_EMBL_TPA) || ((c)== ACCN_EMBL_TPA_PROT) || ((c)== ACCN_DDBJ_TPA) || ((c)== ACCN_DDBJ_TPA_PROT))
#define ACCN_IS_WGS(c) (((c)== ACCN_NCBI_WGS) || ((c)== ACCN_NCBI_WGS_PROT) || ((c)== ACCN_EMBL_WGS) || ((c)== ACCN_EMBL_WGS_PROT) || ((c)== ACCN_DDBJ_WGS) || ((c)== ACCN_DDBJ_WGS_PROT))
-#define ACCN_IS_NCBI(c) (ACCN_IS_REFSEQ((c)) || ACCN_IS_GENBANK((c)) || ((c)== ACCN_NCBI_TPA) || ((c)== ACCN_NCBI_TPA_PROT) || ((c)== ACCN_NCBI_WGS) || ((c)== ACCN_NCBI_WGS_PROT))
+#define ACCN_IS_TSA(c) (((c)== ACCN_NCBI_TSA) || ((c)== ACCN_NCBI_TSA_PROT) || ((c)== ACCN_EMBL_TSA) || ((c)== ACCN_EMBL_TSA_PROT) || ((c)== ACCN_DDBJ_TSA) || ((c)== ACCN_DDBJ_TSA_PROT))
+
+#define ACCN_IS_NCBI(c) (ACCN_IS_REFSEQ((c)) || ACCN_IS_GENBANK((c)) || ((c)== ACCN_NCBI_TPA) || ((c)== ACCN_NCBI_TPA_PROT) || ((c)== ACCN_NCBI_WGS) || ((c)== ACCN_NCBI_WGS_PROT) || ((c)== ACCN_NCBI_TSA))
/*
Macro to detect EMBL accession numbers (can also belong to another DB)
diff --git a/api/sqnutil1.c b/api/sqnutil1.c
index 623c5750..cf854efb 100644
--- a/api/sqnutil1.c
+++ b/api/sqnutil1.c
@@ -29,7 +29,7 @@
*
* Version Creation Date: 9/2/97
*
-* $Revision: 6.415 $
+* $Revision: 6.433 $
*
* File Description:
*
@@ -1976,7 +1976,7 @@ NLM_EXTERN void PromoteXrefsExEx (SeqFeatPtr sfp, BioseqPtr bsp, Uint2 entityID,
sfp = first;
while (sfp != NULL) {
if (sfp->data.choice == SEQFEAT_RNA &&
- sfp->idx.subtype != FEATDEF_tRNA &&
+ /* sfp->idx.subtype != FEATDEF_tRNA && */
sfp->product == NULL && (! sfp->pseudo)) {
gbq = sfp->qual;
prevqual = (GBQualPtr PNTR) &(sfp->qual);
@@ -2090,6 +2090,12 @@ NLM_EXTERN void PromoteXrefsExEx (SeqFeatPtr sfp, BioseqPtr bsp, Uint2 entityID,
case FEATDEF_snoRNA :
mip->biomol = MOLECULE_TYPE_SNORNA;
break;
+ case FEATDEF_ncRNA :
+ mip->biomol = MOLECULE_TYPE_NCRNA;
+ break;
+ case FEATDEF_tmRNA :
+ mip->biomol = MOLECULE_TYPE_TMRNA;
+ break;
default :
mip->biomol = 0;
break;
@@ -3516,6 +3522,7 @@ static Boolean HandledGBQualOnCDS (SeqFeatPtr sfp, GBQualPtr gbq, ValNodePtr PNT
return FALSE;
}
+
static Boolean HandledGBQualOnRNA (SeqFeatPtr sfp, GBQualPtr gbq, Boolean isEmblOrDdbj)
{
@@ -3612,10 +3619,7 @@ static Boolean HandledGBQualOnRNA (SeqFeatPtr sfp, GBQualPtr gbq, Boolean isEmbl
return TRUE;
}
}
- if (rrp->type == 255 &&
- (StringICmp (name, "misc_RNA") == 0 ||
- StringICmp (name, "ncRNA") == 0 ||
- StringICmp (name, "tmRNA") == 0)) {
+ if (rrp->type == 255) {
/* new convention follows ASN.1 spec comments, allows new RNA types */
return FALSE;
}
@@ -4314,12 +4318,12 @@ static void CleanupFeatureGBQuals (SeqFeatPtr sfp, Boolean isEmblOrDdbj)
sfp->comment = str;
}
} else if (StringICmp (gbq->qual, "db_xref") == 0) {
- vnp = ValNodeNew (NULL);
- db = DbtagNew ();
- vnp->data.ptrvalue = db;
tag = gbq->val;
ptr = StringChr (tag, ':');
if (ptr != NULL) {
+ vnp = ValNodeNew (NULL);
+ db = DbtagNew ();
+ vnp->data.ptrvalue = db;
*ptr = '\0';
ptr++;
db->db = StringSave (tag);
@@ -4760,13 +4764,54 @@ static OrgModPtr SortOrgModList (OrgModPtr list)
return list;
}
-static void CleanOrgModList (OrgModPtr PNTR ompp)
+static void RemoveSpaceBeforeAndAfterColon (CharPtr str)
{
+ CharPtr pColon, cp, src, dst;
+
+ if (StringHasNoText (str)) {
+ return;
+ }
+
+ pColon = StringChr (str, ':');
+ while (pColon != NULL) {
+ cp = pColon - 1;
+ while (cp > str && isspace (*cp)) {
+ cp--;
+ }
+ if (cp < str || !isspace (*cp)) {
+ cp++;
+ }
+ *cp = ':';
+ dst = cp + 1;
+ cp = pColon + 1;
+ while (isspace (*cp)) {
+ cp++;
+ }
+ src = cp;
+ pColon = dst - 1;
+ if (src != dst) {
+ while (*src != 0) {
+ *dst = *src;
+ dst++; src++;
+ }
+ *dst = 0;
+ }
+ pColon = StringChr (pColon + 1, ':');
+ }
+}
+
+
+NLM_EXTERN void CleanOrgModList (OrgModPtr PNTR ompp)
+
+{
+ Char ch;
OrgModPtr last = NULL;
OrgModPtr next;
OrgModPtr omp;
OrgModPtr PNTR prev;
+ CharPtr ptr;
+ CharPtr tmp;
Boolean unlink;
if (ompp == NULL) return;
@@ -4793,6 +4838,8 @@ static void CleanOrgModList (OrgModPtr PNTR ompp)
omp->subname = NULL;
unlink = TRUE;
}
+ } else if (HasNoText (omp->subname)) {
+ unlink = TRUE;
} else {
last = omp;
}
@@ -4806,6 +4853,28 @@ static void CleanOrgModList (OrgModPtr PNTR ompp)
}
omp = next;
}
+
+ for (omp = *ompp; omp != NULL; omp = omp->next) {
+ if (omp->subtype != ORGMOD_specimen_voucher &&
+ omp->subtype != ORGMOD_culture_collection &&
+ omp->subtype != ORGMOD_bio_material) continue;
+ if (StringHasNoText (omp->subname)) continue;
+ RemoveSpaceBeforeAndAfterColon (omp->subname);
+ ptr = StringStr (omp->subname, "::");
+ if (ptr == NULL) continue;
+ ptr++;
+ tmp = ptr;
+ tmp++;
+ ch = *tmp;
+ while (ch != '\0') {
+ *ptr = ch;
+ ptr++;
+ tmp++;
+ ch = *tmp;
+ }
+ *ptr = '\0';
+
+ }
}
static int LIBCALLBACK SortBySubSourceSubtype (VoidPtr ptr1, VoidPtr ptr2)
@@ -4936,7 +5005,29 @@ static CharPtr CombineSplitQual (CharPtr origval, CharPtr newval)
return str;
}
-static void CleanSubSourceList (SubSourcePtr PNTR sspp)
+static Uint1 LocationForPlastidText (CharPtr plastid_name)
+{
+ if (StringICmp (plastid_name, "chloroplast") == 0) {
+ return GENOME_chloroplast;
+ } else if (StringICmp (plastid_name, "chromoplast") == 0) {
+ return GENOME_chromoplast;
+ } else if (StringICmp (plastid_name, "kinetoplast") == 0) {
+ return GENOME_kinetoplast;
+ } else if (StringICmp (plastid_name, "plastid") == 0) {
+ return GENOME_plastid;
+ } else if (StringICmp (plastid_name, "apicoplast") == 0) {
+ return GENOME_apicoplast;
+ } else if (StringICmp (plastid_name, "leucoplast") == 0) {
+ return GENOME_leucoplast;
+ } else if (StringICmp (plastid_name, "proplastid") == 0) {
+ return GENOME_proplastid;
+ } else {
+ return 0;
+ }
+}
+
+
+extern void CleanSubSourceList (SubSourcePtr PNTR sspp, Uint1 location)
{
Char ch;
@@ -5059,6 +5150,17 @@ static void CleanSubSourceList (SubSourcePtr PNTR sspp)
ssp->name = NULL;
unlink = TRUE;
}
+ } else if (HasNoText (ssp->name) &&
+ ssp->subtype != SUBSRC_germline &&
+ ssp->subtype != SUBSRC_rearranged &&
+ ssp->subtype != SUBSRC_transgenic &&
+ ssp->subtype != SUBSRC_environmental_sample &&
+ ssp->subtype != SUBSRC_metagenomic) {
+ unlink = TRUE;
+ } else if (ssp->subtype == SUBSRC_plastid_name &&
+ location != 0
+ && location == LocationForPlastidText (ssp->name)) {
+ unlink = TRUE;
} else {
last = ssp;
}
@@ -5412,7 +5514,6 @@ Nlm_QualNameAssoc current_subsource_subtype_alist[] = {
{"Map", SUBSRC_map},
{"Metagenomic", SUBSRC_metagenomic},
{"Plasmid-name", SUBSRC_plasmid_name},
- {"Plastid-name", SUBSRC_plastid_name},
{"Pop-variant", SUBSRC_pop_variant},
{"Rearranged", SUBSRC_rearranged},
{"Rev-PCR-primer-name", SUBSRC_rev_primer_name},
@@ -5426,6 +5527,7 @@ Nlm_QualNameAssoc current_subsource_subtype_alist[] = {
{ NULL, 0 } };
Nlm_QualNameAssoc discouraged_subsource_subtype_alist[] = {
+ {"Plastid-name", SUBSRC_plastid_name},
{ NULL, 0 } };
Nlm_QualNameAssoc discontinued_subsource_subtype_alist[] = {
@@ -6673,10 +6775,13 @@ static void NormalizePubdesc (PubdescPtr pdp, Boolean stripSerial, ValNodePtr PN
{
Char buf1 [121];
Char buf2 [121];
+ CitArtPtr cap;
CitGenPtr cgp;
+ CitJourPtr cjp;
Boolean fixInitials = TRUE;
Boolean hasArt = FALSE;
Boolean hasUid = FALSE;
+ ImprintPtr imp;
ValNodePtr next;
ValNodePtr PNTR prev;
ValNodePtr vnp;
@@ -6735,6 +6840,23 @@ static void NormalizePubdesc (PubdescPtr pdp, Boolean stripSerial, ValNodePtr PN
buf1 [0] = '\0';
PubLabelUnique (vnp, buf1, sizeof (buf1) - 1, OM_LABEL_CONTENT, TRUE);
NormalizeAPub (vnp, stripSerial, fixInitials);
+ if (vnp->choice == PUB_Article) {
+ cap = (CitArtPtr) vnp->data.ptrvalue;
+ if (cap != NULL && cap->from == 1) {
+ cjp = (CitJourPtr) cap->fromptr;
+ if (cjp != NULL) {
+ imp = cjp->imp;
+ if (imp != NULL) {
+ if (imp->pubstatus == PUBSTATUS_aheadofprint && imp->prepub != 2) {
+ imp->prepub = 2;
+ }
+ if (imp->pubstatus == PUBSTATUS_epublish && imp->prepub == 2) {
+ imp->prepub = 0;
+ }
+ }
+ }
+ }
+ }
if (vnp->choice == PUB_Gen && empty_citgen ((CitGenPtr) vnp->data.ptrvalue)) {
*prev = vnp->next;
vnp->next = NULL;
@@ -7534,11 +7656,13 @@ static void CleanupFeatureStrings (SeqFeatPtr sfp, Boolean stripSerial, ValNodeP
BioSourcePtr biop;
Char ch;
Uint1 codon [6];
+ GBQualPtr gbq;
GeneRefPtr grp;
ImpFeatPtr ifp;
Boolean is_fMet = FALSE;
Int2 j;
Boolean justTrnaText;
+ GBQualPtr last;
size_t len;
CharPtr name;
OrgNamePtr onp;
@@ -7923,9 +8047,14 @@ static void CleanupFeatureStrings (SeqFeatPtr sfp, Boolean stripSerial, ValNodeP
name++;
ch = *name;
}
+ /*
if (ch == 's' && StringCmp (name, "s ribosomal RNA") == 0) {
*name = 'S';
}
+ */
+ if (ch == 's' && name [1] == ' ') {
+ *name = 'S';
+ }
}
StrStripSpaces ((CharPtr) rrp->ext.value.ptrvalue);
name = (CharPtr) rrp->ext.value.ptrvalue;
@@ -8049,6 +8178,41 @@ static void CleanupFeatureStrings (SeqFeatPtr sfp, Boolean stripSerial, ValNodeP
rrp->ext.value.ptrvalue = MemFree (rrp->ext.value.ptrvalue);
rrp->ext.value.ptrvalue = StringSave ("internal transcribed spacer 3");
}
+
+ name = (CharPtr) rrp->ext.value.ptrvalue;
+ if (StringNICmp (name, "internal transcribed spacer", 27) == 0) {
+ gbq = GBQualNew ();
+ if (gbq != NULL) {
+ rrp->ext.value.ptrvalue = StringSave ("misc_RNA");
+ gbq->qual = StringSave ("product");
+ gbq->val = name;
+ if (sfp->qual == NULL) {
+ sfp->qual = gbq;
+ } else {
+ last = sfp->qual;
+ while (last->next != NULL) {
+ last = last->next;
+ }
+ last->next = gbq;
+ }
+ }
+ }
+
+ for (gbq = sfp->qual; gbq != NULL; gbq = gbq->next) {
+ if (StringCmp (gbq->qual, "product") != 0) continue;
+ name = gbq->val;
+ if (StringHasNoText (name)) continue;
+ if (StringICmp (name, "its1") == 0 || StringICmp (name, "its 1") == 0) {
+ gbq->val = MemFree (gbq->val);
+ gbq->val = StringSave ("internal transcribed spacer 1");
+ } else if (StringICmp (name, "its2") == 0 || StringICmp (name, "its 2") == 0) {
+ gbq->val = MemFree (gbq->val);
+ gbq->val = StringSave ("internal transcribed spacer 2");
+ } else if (StringICmp (name, "its3") == 0 || StringICmp (name, "its 3") == 0) {
+ gbq->val = MemFree (gbq->val);
+ gbq->val = StringSave ("internal transcribed spacer 3");
+ }
+ }
}
break;
case SEQFEAT_PUB :
@@ -8099,8 +8263,8 @@ static void CleanupFeatureStrings (SeqFeatPtr sfp, Boolean stripSerial, ValNodeP
CleanVisStringList (&(orp->mod));
OrpModToSubSource (&(orp->mod), &(biop->subtype));
}
- CleanSubSourceList (&(biop->subtype));
biop->subtype = SortSubSourceList (biop->subtype);
+ CleanSubSourceList (&(biop->subtype), biop->genome);
break;
default :
break;
@@ -8245,8 +8409,8 @@ static void CleanupDescriptorStrings (ValNodePtr sdp, Boolean stripSerial, ValNo
CleanVisStringList (&(orp->mod));
OrpModToSubSource (&(orp->mod), &(biop->subtype));
}
- CleanSubSourceList (&(biop->subtype));
biop->subtype = SortSubSourceList (biop->subtype);
+ CleanSubSourceList (&(biop->subtype), biop->genome);
break;
case Seq_descr_molinfo :
break;
@@ -8603,6 +8767,7 @@ static CodeBreakPtr SortCodeBreaks (SeqFeatPtr sfp, CodeBreakPtr list)
if (head [i].pos < pos) {
out_of_order = TRUE;
}
+ pos = head [i].pos;
}
if (out_of_order) {
@@ -8655,6 +8820,195 @@ static void CleanupDuplicatedCodeBreaks (CodeBreakPtr PNTR prevcbp)
}
}
+
+CharPtr ncrnaClassList[] = {
+"antisense_RNA",
+"autocatalytically_spliced_intron",
+"hammerhead_ribozyme",
+"RNase_P_RNA",
+"RNase_MRP_RNA",
+"telomerase_RNA",
+"guide_RNA",
+"rasiRNA",
+"scRNA",
+"siRNA",
+"miRNA",
+"piRNA",
+"snoRNA",
+"snRNA",
+"SRP_RNA",
+"vault_RNA",
+"Y_RNA",
+"other",
+NULL};
+
+Int4 NcrnaOTHER = sizeof (ncrnaClassList) / sizeof (CharPtr) - 1;
+
+
+extern Boolean IsStringInNcRNAClassList (CharPtr str)
+{
+ CharPtr PNTR p;
+
+ if (StringHasNoText (str)) return FALSE;
+ for (p = ncrnaClassList; *p != NULL; p++)
+ {
+ if (StringICmp (str, *p) == 0)
+ {
+ return TRUE;
+ }
+ }
+ return FALSE;
+}
+
+
+static void AddNonCopiedQual (SeqFeatPtr sfp, CharPtr qual, CharPtr class_val)
+{
+ GBQualPtr gbq;
+
+ if (sfp == NULL || StringHasNoText (qual) || StringHasNoText (class_val))
+ {
+ return;
+ }
+ gbq = sfp->qual;
+ while (gbq != NULL
+ && (StringCmp (gbq->qual, qual) != 0
+ || StringCmp (gbq->val, class_val) != 0))
+ {
+ gbq = gbq->next;
+ }
+ if (gbq == NULL)
+ {
+ gbq = GBQualNew ();
+ gbq->qual = StringSave (qual);
+ gbq->val = StringSave (class_val);
+ gbq->next = sfp->qual;
+ sfp->qual = gbq;
+ }
+
+}
+
+
+static CharPtr GetMiRNAProduct (CharPtr str)
+{
+ Int4 len;
+ CharPtr product = NULL;
+
+ if (StringHasNoText (str)) return NULL;
+ if (StringNCmp (str, "miRNA ", 6) == 0)
+ {
+ product = StringSave (str + 6);
+ }
+ else if (StringNCmp (str, "microRNA ", 9) == 0)
+ {
+ product = StringSave (str + 9);
+ }
+ else
+ {
+ len = StringLen (str);
+ if (len > 6 && StringCmp (str + len - 6, " miRNA") == 0
+ && (len < 15 || StringCmp (str - 15, "precursor miRNA") != 0))
+ {
+ product = (CharPtr) MemNew (sizeof (Char) * (len - 5));
+ StringNCpy (product, str, len - 6);
+ product[len - 6] = 0;
+ }
+ else if (len > 9 && StringCmp (str + len - 9, " microRNA") == 0
+ && (len < 21 || StringCmp (str - 21, "precursor microRNA") != 0))
+ {
+ product = (CharPtr) MemNew (sizeof (Char) * (len - 8));
+ StringNCpy (product, str, len - 9);
+ product[len - 9] = 0;
+ }
+ }
+ return product;
+}
+
+
+static Boolean ConvertToNcRNA (SeqFeatPtr sfp)
+{
+ GBQualPtr gbq;
+ RnaRefPtr rrp;
+ Boolean was_converted = FALSE;
+ CharPtr miRNAproduct = NULL;
+
+ if (sfp == NULL || sfp->data.choice != SEQFEAT_RNA || sfp->data.value.ptrvalue == NULL)
+ {
+ return FALSE;
+ }
+ rrp = (RnaRefPtr) sfp->data.value.ptrvalue;
+ if (rrp->type == 5 || rrp->type == 6 || rrp->type == 7)
+ {
+ if (rrp->type == 5)
+ {
+ AddNonCopiedQual (sfp, "ncRNA_class", "snRNA");
+ }
+ else if (rrp->type == 6)
+ {
+ AddNonCopiedQual (sfp, "ncRNA_class", "scRNA");
+ }
+ else if (rrp->type == 7)
+ {
+ AddNonCopiedQual (sfp, "ncRNA_class", "snoRNA");
+ }
+ if (rrp->ext.choice == 1)
+ {
+ AddNonCopiedQual (sfp, "product", rrp->ext.value.ptrvalue);
+ rrp->ext.value.ptrvalue = MemFree (rrp->ext.value.ptrvalue);
+ }
+ rrp->ext.choice = 1;
+ rrp->ext.value.ptrvalue = StringSave ("ncRNA");
+ rrp->type = 255;
+ was_converted = TRUE;
+ }
+ else if (rrp->type == 255 && rrp->ext.choice == 1)
+ {
+ if (IsStringInNcRNAClassList (rrp->ext.value.ptrvalue))
+ {
+ AddNonCopiedQual (sfp, "ncRNA_class", rrp->ext.value.ptrvalue);
+ rrp->ext.value.ptrvalue = MemFree (rrp->ext.value.ptrvalue);
+ rrp->ext.value.ptrvalue = StringSave ("ncRNA");
+ was_converted = TRUE;
+ }
+ else if ((miRNAproduct = GetMiRNAProduct (rrp->ext.value.ptrvalue)) != NULL)
+ {
+ AddNonCopiedQual (sfp, "ncRNA_class", "miRNA");
+ rrp->ext.value.ptrvalue = MemFree (rrp->ext.value.ptrvalue);
+ rrp->ext.value.ptrvalue = StringSave ("ncRNA");
+ AddNonCopiedQual (sfp, "product", miRNAproduct);
+ miRNAproduct = MemFree (miRNAproduct);
+ was_converted = TRUE;
+ }
+ else if (StringCmp (rrp->ext.value.ptrvalue, "ncRNA") != 0
+ && StringCmp (rrp->ext.value.ptrvalue, "tmRNA") != 0
+ && StringCmp (rrp->ext.value.ptrvalue, "misc_RNA") != 0)
+ {
+ AddNonCopiedQual (sfp, "product", rrp->ext.value.ptrvalue);
+ rrp->ext.value.ptrvalue = MemFree (rrp->ext.value.ptrvalue);
+ rrp->ext.value.ptrvalue = StringSave ("misc_RNA");
+ }
+ }
+ if (rrp->type == 255 && rrp->ext.choice == 0) {
+ rrp->ext.choice = 1;
+ rrp->ext.value.ptrvalue = StringSave ("misc_RNA");
+ }
+ if (rrp->type == 255 && rrp->ext.choice == 1 &&
+ StringCmp (rrp->ext.value.ptrvalue, "misc_RNA") == 0) {
+ for (gbq = sfp->qual; gbq != NULL; gbq = gbq->next) {
+ if (StringCmp (gbq->qual, "ncRNA_class") == 0) {
+ rrp->ext.value.ptrvalue = MemFree (rrp->ext.value.ptrvalue);
+ rrp->ext.value.ptrvalue = StringSave ("ncRNA");
+ was_converted = TRUE;
+ } else if (StringCmp (gbq->qual, "tag_peptide") == 0) {
+ rrp->ext.value.ptrvalue = MemFree (rrp->ext.value.ptrvalue);
+ rrp->ext.value.ptrvalue = StringSave ("tmRNA");
+ was_converted = TRUE;
+ }
+ }
+ }
+ return was_converted;
+}
+
+
NLM_EXTERN void CleanUpSeqFeat (
SeqFeatPtr sfp,
Boolean isEmblOrDdbj,
@@ -8843,6 +9197,9 @@ NLM_EXTERN void CleanUpSeqFeat (
}
}
}
+ if (ConvertToNcRNA (sfp)) {
+ sfp->idx.subtype = FindFeatDefType (sfp);
+ }
} else if (sfp->data.choice == SEQFEAT_REGION ||
sfp->data.choice == SEQFEAT_SITE ||
sfp->data.choice == SEQFEAT_BOND ||
@@ -8926,6 +9283,8 @@ static void BasicSeqEntryCleanupInternal (SeqEntryPtr sep, ValNodePtr PNTR publi
case MOLECULE_TYPE_CRNA :
case MOLECULE_TYPE_SNORNA :
case MOLECULE_TYPE_TRANSCRIBED_RNA :
+ case MOLECULE_TYPE_NCRNA :
+ case MOLECULE_TYPE_TMRNA :
bsp->mol = Seq_mol_rna;
break;
case MOLECULE_TYPE_PEPTIDE :
diff --git a/api/sqnutil2.c b/api/sqnutil2.c
index 6164be8f..5a439145 100644
--- a/api/sqnutil2.c
+++ b/api/sqnutil2.c
@@ -29,7 +29,7 @@
*
* Version Creation Date: 9/2/97
*
-* $Revision: 6.290 $
+* $Revision: 6.310 $
*
* File Description:
*
@@ -54,6 +54,8 @@
#include <tofasta.h>
#include <simple.h>
#include <validerr.h>
+#include <findrepl.h>
+#include <alignmgr2.h>
static CharPtr SqnTrimSpacesAroundString (CharPtr str)
@@ -1962,7 +1964,7 @@ NLM_EXTERN BioSourcePtr ParseTitleIntoBioSource (
static CharPtr molinfo_biomol_list [] = {
"?", "genomic", "precursor RNA", "mRNA", "rRNA", "tRNA", "snRNA",
"scRNA", "peptide", "other-genetic", "genomic-mRNA", "cRNA", "snoRNA",
- "transcribed RNA", NULL
+ "transcribed RNA", "non-coding RNA", "transfer-messenger RNA", NULL
};
static CharPtr molinfo_tech_list [] = {
@@ -5219,6 +5221,7 @@ static CharPtr okayInferencePrefixes [] = {
"nucleotide motif",
"protein motif",
"ab initio prediction",
+ "alignment",
NULL
};
@@ -5793,14 +5796,15 @@ static void AddQualifierToFeatureEx (SeqFeatPtr sfp, CharPtr qual, CharPtr val,
sfp->comment = str;
}
}
- } else {
+ return;
+ } else if (rrp->type != 255) {
if (rrp->ext.choice == 1) {
rrp->ext.value.ptrvalue = MemFree (rrp->ext.value.ptrvalue);
}
rrp->ext.choice = 1;
rrp->ext.value.ptrvalue = StringSave (val);
+ return;
}
- return;
} else if (qnum == GBQUAL_anticodon) {
if (ParseAnticodon (sfp, val, offset)) return;
}
@@ -6052,6 +6056,7 @@ static SeqAnnotPtr ReadFeatureTable (FileCachePtr fcp, CharPtr seqid, CharPtr an
GeneRefPtr grp;
Int2 idx;
ImpFeatPtr ifp;
+ Boolean inquals = FALSE;
Boolean isminus;
Boolean isnote;
Boolean ispoint;
@@ -6210,13 +6215,32 @@ static SeqAnnotPtr ReadFeatureTable (FileCachePtr fcp, CharPtr seqid, CharPtr an
} else if (StringCmp (feat, "rRNA") == 0) {
rnatype = 4;
} else if (StringCmp (feat, "snRNA") == 0) {
- rnatype = 5;
+ rnatype = 255;
+ rrp->ext.choice = 1;
+ rrp->ext.value.ptrvalue = StringSave ("ncRNA");
+ AddQualifierToFeatureEx (sfp, "ncRNA_class", feat, offset, lin_num);
} else if (StringCmp (feat, "scRNA") == 0) {
- rnatype = 6;
+ rnatype = 255;
+ rrp->ext.choice = 1;
+ rrp->ext.value.ptrvalue = StringSave ("ncRNA");
+ AddQualifierToFeatureEx (sfp, "ncRNA_class", feat, offset, lin_num);
} else if (StringCmp (feat, "snoRNA") == 0) {
- rnatype = 7;
+ rnatype = 255;
+ rrp->ext.choice = 1;
+ rrp->ext.value.ptrvalue = StringSave ("ncRNA");
+ AddQualifierToFeatureEx (sfp, "ncRNA_class", feat, offset, lin_num);
} else if (StringCmp (feat, "misc_RNA") == 0) {
rnatype = 255;
+ rrp->ext.choice = 1;
+ rrp->ext.value.ptrvalue = StringSave ("misc_RNA");
+ } else if (StringCmp (feat, "ncRNA") == 0) {
+ rnatype = 255;
+ rrp->ext.choice = 1;
+ rrp->ext.value.ptrvalue = StringSave ("ncRNA");
+ } else if (StringCmp (feat, "tmRNA") == 0) {
+ rnatype = 255;
+ rrp->ext.choice = 1;
+ rrp->ext.value.ptrvalue = StringSave ("tmRNA");
}
rrp->type = rnatype;
}
@@ -6329,12 +6353,21 @@ static SeqAnnotPtr ReadFeatureTable (FileCachePtr fcp, CharPtr seqid, CharPtr an
}
}
+ inquals = FALSE;
+
} else if (start >= 0 && stop >= 0 && feat == NULL && qual == NULL && val == NULL && sfp != NULL) {
- sfp->location = AddIntervalToLocation (sfp->location, sip, start, stop, partial5, partial3);
+ if (inquals) {
- if (partial5 || partial3) {
- sfp->partial = TRUE;
+ ErrPostEx (SEV_ERROR, ERR_SEQ_FEAT_ImpFeatBadLoc, "Unexpected intervals after qualifiers (start %ld, stop %ld)", (long) start, (long) stop);
+
+ } else {
+
+ sfp->location = AddIntervalToLocation (sfp->location, sip, start, stop, partial5, partial3);
+
+ if (partial5 || partial3) {
+ sfp->partial = TRUE;
+ }
}
} else if (sfp != NULL && qual != NULL &&
@@ -6348,6 +6381,8 @@ static SeqAnnotPtr ReadFeatureTable (FileCachePtr fcp, CharPtr seqid, CharPtr an
}
AddQualifierToFeatureEx (sfp, qual, val, offset, lin_num);
+ inquals = TRUE;
+
} else if (sfp != NULL && qual != NULL && val == NULL) {
label = (CharPtr) FeatDefTypeLabel (sfp);
@@ -8898,7 +8933,7 @@ NLM_EXTERN TextFsaPtr TextFsaFree (TextFsaPtr tbl)
if (stateTable != NULL) {
highState = tbl->highState;
- for (state = 0; state < highState; state++) {
+ for (state = 0; state <= highState; state++) {
sp = stateTable [state];
if (sp == NULL) continue;
@@ -8909,14 +8944,15 @@ NLM_EXTERN TextFsaPtr TextFsaFree (TextFsaPtr tbl)
gp = nxtgp;
}
- ValNodeFreeData (sp->matchfound);
- MemFree (sp);
+ sp->matchfound = ValNodeFreeData (sp->matchfound);
+ sp = MemFree (sp);
+ stateTable[state] = NULL;
}
- MemFree (stateTable);
+ stateTable = MemFree (stateTable);
}
- ValNodeFreeData (tbl->siteList);
+ tbl->siteList = ValNodeFreeData (tbl->siteList);
return MemFree (tbl);
}
@@ -10258,3 +10294,2348 @@ NLM_EXTERN SeqAnnotPtr PhrapGraphForContig (
return sap;
}
+/* Functions for correcting capitalization */
+
+typedef struct replaceitempair {
+ CharPtr FindString;
+ CharPtr ReplaceString;
+} ReplaceItemPair, PNTR ReplaceItemPairPtr;
+
+
+ReplaceItemPair AbbreviationList[] = {
+ { "arabidopsis thaliana", "Arabidopsis thaliana" },
+ { "adp", "ADP" },
+ { "adp-", "ADP-" },
+ { "atp", "ATP" },
+ { "atp-", "ATP-" },
+ { "bac", "BAC" },
+ { "caenorhabditis elegans", "Caenorhabditis elegans" },
+ { "cdna", "cDNA" },
+ { "cdnas", "cDNAs" },
+ { "coa", "CoA" },
+ { "coi", "COI" },
+ { "coii", "COII" },
+ { "danio rerio", "Danio rerio" },
+ { "dna", "DNA" },
+ { "dna-", "DNA-" },
+ { "drosophila melanogaster", "Drosophila melanogaster" },
+ { "dsrna", "dsRNA" },
+ { "escherichia coli", "Escherichia coli" },
+ { "hiv", "HIV" },
+ { "hiv-1", "HIV-1" },
+ { "hiv-2", "HIV-2" },
+ { "hnrna", "hnRNA" },
+ { "homo sapiens", "Homo sapiens" },
+ { "mhc", "MHC" },
+ { "mrna", "mRNA" },
+ { "mtdna", "mtDNA" },
+ { "mus musculus", "Mus musculus" },
+ { "nadh", "NADH" },
+ { "nov.", "nov." },
+ { "nov..", "nov.." },
+ { "pcr", "PCR" },
+ { "pcr-", "PCR-" },
+ { "rattus norvegicus", "Rattus norvegicus" },
+ { "rapd", "RAPD" },
+ { "rdna", "rDNA" },
+ { "rna", "RNA" },
+ { "rna-", "RNA-" },
+ { "rrna", "rRNA" },
+ { "rt-pcr", "RT-PCR" },
+ { "saccharomyces cerevisiae", "Saccharomyces cerevisiae" },
+ { "scrna", "scRNA" },
+ { "siv-1", "SIV-1" },
+ { "snp", "SNP" },
+ { "snps", "SNPs" },
+ { "snrna", "snRNA" },
+ { "sp.", "sp." },
+ { "sp..", "sp.." },
+ { "ssp.", "ssp." },
+ { "ssp..", "ssp.." },
+ { "ssrna", "ssRNA" },
+ { "subsp.", "subsp." },
+ { "subsp..", "subsp.." },
+ { "trna", "tRNA" },
+ { "trna-", "tRNA-" },
+ { "var.", "var." },
+ { "var..", "var.." },
+ { "usa", "USA" },
+ { "U.S.A.", "USA" },
+ { "U.S.A", "USA" },
+ { "United States of America", "USA" },
+ {"(hiv)", "(HIV)" },
+ {"(hiv1)", "(HIV1)" },
+ {"(hiv-1)", "(HIV-1)" }
+};
+
+ReplaceItemPair SpecialAbbreviationList[] = {
+ { "sp.", "sp." },
+ { "nov.", "nov." },
+ { "ssp.", "ssp." },
+ { "var.", "var." },
+ { "subsp.", "subsp." }
+};
+
+NLM_EXTERN void FixAbbreviationsInElement (CharPtr PNTR pEl)
+{
+ int i;
+ CharPtr NewPtr;
+ Boolean whole_word;
+
+ if (pEl == NULL) return;
+ if (*pEl == NULL) return;
+
+ for (i = 0; i < sizeof (AbbreviationList) / sizeof (ReplaceItemPair); i++)
+ {
+ if (AbbreviationList[i].FindString[StringLen (AbbreviationList[i].FindString) - 1] == '-')
+ {
+ whole_word = FALSE;
+ }
+ else
+ {
+ whole_word = TRUE;
+ }
+ FindReplaceString (pEl, AbbreviationList[i].FindString,
+ AbbreviationList[i].ReplaceString, FALSE, whole_word);
+ }
+ for (i = 0; i < sizeof (SpecialAbbreviationList) / sizeof (ReplaceItemPair); i++)
+ {
+ FindReplaceString (pEl, SpecialAbbreviationList[i].FindString,
+ SpecialAbbreviationList[i].ReplaceString, FALSE, TRUE);
+ if (StringLen (*pEl) >= StringLen (SpecialAbbreviationList[i].ReplaceString)
+ && StringCmp ((*pEl) + StringLen (*pEl) - StringLen (SpecialAbbreviationList[i].ReplaceString), SpecialAbbreviationList[i].ReplaceString) == 0)
+ {
+ NewPtr = MemNew (StringLen (*pEl) + 2);
+ if (NewPtr == NULL) return;
+ StringCpy (NewPtr, *pEl);
+ StringCat (NewPtr, ".");
+ MemFree (*pEl);
+ *pEl = NewPtr;
+ }
+ }
+}
+
+ReplaceItemPair ShortWordList[] = {
+ { "A", "a" },
+ { "About", "about" },
+ { "And", "and" },
+ { "At", "at" },
+ { "But", "but" },
+ { "By", "by" },
+ { "For", "for" },
+ { "In", "in" },
+ { "Is", "is" },
+ { "Of", "of" },
+ { "On", "on" },
+ { "Or", "or" },
+ { "The", "the" },
+ { "To", "to" },
+ { "With", "with" }
+};
+
+static void FixShortWordsInElement (CharPtr PNTR pEl)
+{
+ Int2 i;
+
+ if (pEl == NULL) return;
+ if (*pEl == NULL) return;
+
+ for (i = 0; i < sizeof (ShortWordList) / sizeof (ReplaceItemPair); i++)
+ {
+ FindReplaceString (pEl, ShortWordList[i].FindString,
+ ShortWordList[i].ReplaceString, FALSE, TRUE);
+ }
+ if (isalpha ((Int4)((*pEl)[0])))
+ {
+ (*pEl)[0] = toupper ((*pEl)[0]);
+ }
+}
+
+NLM_EXTERN void
+FixCapitalizationInElement
+(CharPtr PNTR pEl,
+ Boolean bAbbrev,
+ Boolean bShortWords,
+ Boolean bApostrophes)
+{
+ CharPtr pCh;
+ Boolean bSendToLower;
+
+ if(pEl == NULL) return;
+ if(*pEl == NULL) return;
+
+ bSendToLower = FALSE;
+ for(pCh = *pEl; *pCh != 0; pCh++)
+ {
+ if(isalpha((Int4)(*pCh)))
+ {
+ if(bSendToLower)
+ {
+ *pCh = tolower(*pCh);
+ }
+ else
+ {
+ *pCh = toupper(*pCh);
+ bSendToLower = TRUE;
+ }
+ }
+ else if (bApostrophes || *pCh != '\'')
+ {
+ bSendToLower = FALSE;
+ }
+ }
+ if (bShortWords)
+ FixShortWordsInElement (pEl);
+ if (bAbbrev)
+ FixAbbreviationsInElement (pEl);
+}
+
+
+NLM_EXTERN void FixOrgNamesInString (CharPtr str, ValNodePtr org_names)
+{
+ ValNodePtr vnp;
+ CharPtr cp, taxname;
+ Int4 taxname_len;
+
+ if (StringHasNoText (str) || org_names == NULL) return;
+ for (vnp = org_names; vnp != NULL; vnp = vnp->next)
+ {
+ taxname = (CharPtr) org_names->data.ptrvalue;
+ taxname_len = StringLen (taxname);
+ cp = StringISearch (str, taxname);
+ while (cp != NULL)
+ {
+ StringNCpy (cp, taxname, taxname_len);
+ cp = StringISearch (cp + taxname_len, taxname);
+ }
+ }
+}
+
+
+NLM_EXTERN void ResetCapitalization (Boolean first_is_upper, CharPtr pString)
+{
+ CharPtr pCh;
+ Boolean was_digit = FALSE;
+
+ pCh = pString;
+ if (pCh == NULL) return;
+ if (*pCh == '\0') return;
+
+ if (first_is_upper)
+ {
+ /* Set first character to upper */
+ *pCh = toupper (*pCh);
+ }
+ else
+ {
+ /* set first character to lower */
+ *pCh = tolower (*pCh);
+ }
+
+ if (isdigit ((Int4)(*pCh)))
+ {
+ was_digit = TRUE;
+ }
+ pCh++;
+ /* Set rest of characters to lower */
+ while (*pCh != '\0')
+ {
+ if (was_digit
+ && (*pCh == 'S' || *pCh == 's')
+ && (isspace ((Int4)(*(pCh + 1))) || *(pCh + 1) == 0))
+ {
+ *pCh = toupper (*pCh);
+ was_digit = FALSE;
+ }
+ else if (isdigit ((Int4)(*pCh)))
+ {
+ was_digit = TRUE;
+ }
+ else
+ {
+ was_digit = FALSE;
+ *pCh = tolower (*pCh);
+ }
+ pCh++;
+ }
+}
+
+
+static Boolean IsAllDigits (CharPtr str)
+{
+ CharPtr cp;
+
+ if (StringHasNoText (str)) return FALSE;
+
+ cp = str;
+ while (*cp != 0 && isdigit (*cp)) {
+ cp++;
+ }
+ if (*cp == 0) {
+ return TRUE;
+ } else {
+ return FALSE;
+ }
+}
+
+
+NLM_EXTERN SeqIdPtr CreateSeqIdFromText (CharPtr id_str, SeqEntryPtr sep)
+{
+ BioseqPtr bsp = NULL;
+ CharPtr tmpstr;
+ SeqIdPtr sip = NULL;
+ SeqEntryPtr scope;
+
+ if (StringStr (id_str, "|") == NULL) {
+ tmpstr = (CharPtr) MemNew (sizeof (Char) * (StringLen (id_str) + 20));
+ sprintf (tmpstr, "lcl|%s", id_str);
+ sip = SeqIdParse (tmpstr);
+ if (sip != NULL) {
+ scope = SeqEntrySetScope (sep);
+ bsp = BioseqFind (sip);
+ SeqEntrySetScope (scope);
+ if (bsp == NULL) {
+ sip = SeqIdFree (sip);
+ }
+ }
+ if (bsp == NULL) {
+ sprintf (tmpstr, "gb|%s", id_str);
+ sip = SeqIdParse (tmpstr);
+ if (sip != NULL) {
+ scope = SeqEntrySetScope (sep);
+ bsp = BioseqFind (sip);
+ SeqEntrySetScope (scope);
+ if (bsp == NULL) {
+ sip = SeqIdFree (sip);
+ }
+ }
+ }
+ if (bsp == NULL) {
+ sprintf (tmpstr, "gnl|%s", id_str);
+ sip = SeqIdParse (tmpstr);
+ if (sip != NULL) {
+ scope = SeqEntrySetScope (sep);
+ bsp = BioseqFind (sip);
+ SeqEntrySetScope (scope);
+ if (bsp == NULL) {
+ sip = SeqIdFree (sip);
+ }
+ }
+ }
+ if (bsp == NULL) {
+ if (StringNICmp (id_str, "bankit", 6) == 0) {
+ sprintf (tmpstr, "gnl|BankIt|%s", id_str + 6);
+ } else {
+ sprintf (tmpstr, "gnl|BankIt|%s", id_str);
+ }
+ sip = SeqIdParse (tmpstr);
+ if (sip != NULL) {
+ scope = SeqEntrySetScope (sep);
+ bsp = BioseqFind (sip);
+ SeqEntrySetScope (scope);
+ if (bsp == NULL) {
+ sip = SeqIdFree (sip);
+ }
+ }
+ }
+
+ if (bsp == NULL) {
+ sprintf (tmpstr, "gnl|NCBIFILE|%s", id_str);
+ sip = SeqIdParse (tmpstr);
+ if (sip != NULL) {
+ scope = SeqEntrySetScope (sep);
+ bsp = BioseqFind (sip);
+ SeqEntrySetScope (scope);
+ if (bsp == NULL) {
+ sip = SeqIdFree (sip);
+ }
+ }
+ }
+
+ if (bsp == NULL && IsAllDigits (id_str)) {
+ sprintf (tmpstr, "gi|%s", id_str);
+ sip = SeqIdParse (tmpstr);
+ if (sip != NULL) {
+ scope = SeqEntrySetScope (sep);
+ bsp = BioseqFind (sip);
+ SeqEntrySetScope (scope);
+ if (bsp == NULL) {
+ sip = SeqIdFree (sip);
+ }
+ }
+ }
+ MemFree (tmpstr);
+ } else {
+ sip = SeqIdParse (id_str);
+ if (sip != NULL) {
+ scope = SeqEntrySetScope (sep);
+ bsp = BioseqFind (sip);
+ SeqEntrySetScope (scope);
+ if (bsp == NULL) {
+ sip = SeqIdFree (sip);
+ }
+ }
+ }
+ return sip;
+}
+
+
+NLM_EXTERN SeqLocPtr SeqLocWholeNew (BioseqPtr bsp)
+{
+ ValNodePtr vnp;
+
+ if (bsp == NULL) return NULL;
+
+ vnp = ValNodeNew (NULL);
+
+ if (vnp == NULL) return NULL;
+
+ vnp->choice = SEQLOC_WHOLE;
+ vnp->data.ptrvalue = (Pointer) SeqIdDup (SeqIdFindBest (bsp->id, 0));
+ return (SeqLocPtr)vnp;
+}
+
+
+NLM_EXTERN Int4 GetDeltaSeqLen (DeltaSeqPtr dsp)
+{
+ Int4 len = 0;
+ SeqLitPtr slp;
+
+ if (dsp == NULL || dsp->data.ptrvalue == NULL) {
+ /* do nothing, empty */
+ } else if (dsp->choice == 1) {
+ len = SeqLocLen ((SeqLocPtr)(dsp->data.ptrvalue));
+ } else if (dsp->choice == 2) {
+ slp = (SeqLitPtr) dsp->data.ptrvalue;
+ len = slp->length;
+ }
+ return len;
+}
+
+
+/* The following section of code is used for retranslating a CDS and updating
+ * the protein features based on an alignment between the old and new protein
+ * sequences.
+ */
+static Int4 SeqEdRemapCoord (SeqAlignPtr salp, Int4 coord, Boolean move_up, Int4 len)
+
+{
+ Int4 aln_pos;
+
+ if (salp == NULL) return -1;
+ aln_pos = AlnMgr2MapBioseqToSeqAlign (salp, coord, 1);
+ while (aln_pos == -1)
+ {
+ if (move_up)
+ {
+ if (coord >= len - 1)
+ {
+ return len - 1;
+ }
+ else
+ {
+ coord ++;
+ }
+ }
+ else
+ {
+ if (coord <= 0)
+ {
+ return 0;
+ }
+ else
+ {
+ coord --;
+ }
+ }
+ aln_pos = AlnMgr2MapBioseqToSeqAlign (salp, coord, 1);
+ }
+ return AlnMgr2MapSeqAlignToBioseq (salp, aln_pos, 2);
+}
+
+
+static void SeqEdRemapSeqIntLoc (SeqAlignPtr salp, SeqIntPtr sintp, Int4 seq_len)
+
+{
+ if (salp == NULL || sintp == NULL) return;
+ sintp->from = SeqEdRemapCoord (salp, sintp->from, TRUE, seq_len);
+ sintp->to = SeqEdRemapCoord (salp, sintp->to, FALSE, seq_len);
+}
+
+static void SeqEdRemapSeqPntLoc (SeqAlignPtr salp, SeqPntPtr spp, Int4 seq_len)
+
+{
+ if (salp == NULL || spp == NULL) return;
+
+ spp->point = SeqEdRemapCoord (salp, spp->point, FALSE, seq_len);
+}
+
+
+static void SeqEdRemapPackSeqPnt (SeqAlignPtr salp, PackSeqPntPtr pspp, Int4 seq_len)
+
+{
+ Uint1 used;
+
+ if (salp == NULL || pspp == NULL) return;
+ for (used = 0; used < pspp->used; used++)
+ {
+ pspp->pnts [used] = SeqEdRemapCoord (salp, pspp->pnts [used], FALSE, seq_len);
+ }
+}
+
+
+NLM_EXTERN void SeqEdRemapLocation (SeqAlignPtr salp, SeqLocPtr slp, Int4 seq_len)
+
+{
+
+ if (slp == NULL) return;
+ switch (slp->choice) {
+ case SEQLOC_INT :
+ SeqEdRemapSeqIntLoc (salp, slp->data.ptrvalue, seq_len);
+ break;
+ case SEQLOC_PNT :
+ SeqEdRemapSeqPntLoc (salp, slp->data.ptrvalue, seq_len);
+ break;
+ case SEQLOC_PACKED_PNT :
+ SeqEdRemapPackSeqPnt (salp, slp->data.ptrvalue, seq_len);
+ break;
+ default :
+ break;
+ }
+}
+
+
+static void MakeLocationMatchEntireSequence (SeqLocPtr slp, BioseqPtr bsp)
+{
+ SeqIntPtr sip;
+
+ if (slp == NULL || bsp == NULL) return;
+
+ if (slp->choice == SEQLOC_WHOLE)
+ {
+ SeqIdFree (slp->data.ptrvalue);
+ slp->data.ptrvalue = SeqIdDup (bsp->id);
+ }
+ else if (slp->choice == SEQLOC_INT)
+ {
+ sip = (SeqIntPtr) slp->data.ptrvalue;
+ if (sip == NULL)
+ {
+ sip = SeqIntNew ();
+ slp->data.ptrvalue = sip;
+ }
+ if (sip != NULL)
+ {
+ sip->from = 0;
+ sip->to = bsp->length - 1;
+ }
+ }
+}
+
+
+NLM_EXTERN Boolean SeqEdFixProteinFeatures (BioseqPtr oldbsp, BioseqPtr newbsp, Boolean force_fix, GlobalAlignFunc align_func)
+{
+ SeqAlignPtr salp = NULL;
+ Boolean revcomp = FALSE;
+ SeqFeatPtr sfp;
+ Boolean tried_to_get_alignment = FALSE;
+ Boolean unmappable_feats = FALSE;
+ SeqLocPtr slp_tmp = NULL;
+ SeqAnnotPtr sap;
+ ProtRefPtr prp;
+
+ if (oldbsp == NULL || newbsp == NULL) return FALSE;
+
+ /* get alignment between old and new proteins */
+
+ if (ISA_na (oldbsp->mol) != ISA_na (newbsp->mol)) return FALSE;
+
+ /* iterate through the features on the old protein. Full length features
+ * should be set to the new length. Other features should be mapped through
+ * the alignment (if possible), otherwise warn the user that they could not
+ * be remapped. */
+
+ if (!force_fix)
+ {
+ for (sap = oldbsp->annot; sap != NULL && !unmappable_feats; sap = sap->next) {
+ if (sap->type == 1) {
+ for (sfp = sap->data; sfp != NULL && !unmappable_feats; sfp = sfp->next) {
+ if (sfp->data.choice != SEQFEAT_PROT || sfp->data.value.ptrvalue == NULL) {
+ continue;
+ }
+ prp = (ProtRefPtr) sfp->data.value.ptrvalue;
+ if (prp->processed != 0)
+ {
+ if (salp == NULL)
+ {
+ if (align_func != NULL)
+ {
+ salp = align_func (oldbsp, newbsp, &revcomp);
+ }
+ }
+ if (salp == NULL)
+ {
+ unmappable_feats = TRUE;
+ }
+ else
+ {
+ slp_tmp = (SeqLocPtr) AsnIoMemCopy (sfp->location,
+ (AsnReadFunc) SeqLocAsnRead,
+ (AsnWriteFunc) SeqLocAsnWrite);
+ SeqEdRemapLocation (salp, slp_tmp, newbsp->length);
+ if (slp_tmp == NULL)
+ {
+ unmappable_feats = TRUE;
+ }
+ else
+ {
+ slp_tmp = SeqLocFree (slp_tmp);
+ }
+ }
+ }
+ }
+ }
+ }
+ if (unmappable_feats)
+ {
+ return FALSE;
+ }
+ }
+
+ for (sap = oldbsp->annot; sap != NULL && !unmappable_feats; sap = sap->next) {
+ if (sap->type == 1) {
+ for (sfp = sap->data; sfp != NULL && !unmappable_feats; sfp = sfp->next) {
+ if (sfp->data.choice != SEQFEAT_PROT || sfp->data.value.ptrvalue == NULL) {
+ continue;
+ }
+ prp = (ProtRefPtr) sfp->data.value.ptrvalue;
+ if (prp->processed == 0)
+ {
+ /* make new location match new sequence length */
+ MakeLocationMatchEntireSequence (sfp->location, newbsp);
+ }
+ else
+ {
+ if (salp == NULL && !tried_to_get_alignment && align_func != NULL)
+ {
+ salp = align_func (oldbsp, newbsp, &revcomp);
+ tried_to_get_alignment = TRUE;
+ }
+ if (salp != NULL)
+ {
+ SeqEdRemapLocation (salp, sfp->location, newbsp->length);
+ }
+ else
+ {
+ unmappable_feats = TRUE;
+ }
+ }
+ }
+ }
+ }
+
+ if (salp != NULL)
+ {
+ SeqAlignFree (salp);
+ }
+ if (unmappable_feats)
+ {
+ return FALSE;
+ }
+ else
+ {
+ return TRUE;
+ }
+}
+
+
+NLM_EXTERN void SeqEdTranslateOneCDS (SeqFeatPtr sfp, BioseqPtr featbsp, Uint2 entityID, GlobalAlignFunc align_func)
+{
+ ByteStorePtr bs;
+ Char ch;
+ CharPtr prot;
+ CharPtr ptr;
+ Int4 star_at_end = 0;
+ BioseqPtr old_prot;
+ SeqIdPtr new_prot_id;
+ SeqEntryPtr parent, new_prot_sep;
+ SeqLocPtr slp;
+ Uint1 seq_data_type;
+ Int4 old_length;
+ BioseqPtr newbsp;
+ ProtRefPtr prp;
+ SeqFeatPtr prot_sfp;
+ SeqDataPtr sdp;
+
+ if (featbsp == NULL || sfp == NULL || sfp->location == NULL
+ || sfp->data.choice != SEQFEAT_CDREGION)
+ {
+ return;
+ }
+
+ old_prot = BioseqFindFromSeqLoc (sfp->product);
+ new_prot_id = SeqIdDup (SeqLocId (sfp->product));
+ if (new_prot_id == NULL)
+ {
+ new_prot_id = MakeNewProteinSeqId (sfp->location, featbsp->id);
+ }
+
+ bs = ProteinFromCdRegionEx (sfp, TRUE, FALSE);
+ if (bs != NULL) {
+ prot = BSMerge (bs, NULL);
+ bs = BSFree (bs);
+ if (prot != NULL) {
+ ptr = prot;
+ ch = *ptr;
+ while (ch != '\0') {
+ *ptr = TO_UPPER (ch);
+ if (ch == '*') {
+ star_at_end = 1;
+ } else {
+ star_at_end = 0;
+ }
+ ptr++;
+ ch = *ptr;
+ }
+ if (star_at_end)
+ {
+ *(ptr - 1) = 0;
+ }
+ bs = BSNew (1000);
+ if (bs != NULL) {
+ ptr = prot;
+ BSWrite (bs, (VoidPtr) ptr, (Int4) StringLen (ptr));
+ }
+ MemFree (prot);
+ }
+ newbsp = BioseqNew ();
+ if (newbsp != NULL) {
+ newbsp->id = SeqIdParse ("lcl|CdRgnTransl");
+ newbsp->repr = Seq_repr_raw;
+ newbsp->mol = Seq_mol_aa;
+ newbsp->seq_data_type = Seq_code_ncbieaa;
+ newbsp->seq_data = (SeqDataPtr) bs;
+ newbsp->length = BSLen (bs);
+
+ if (old_prot == NULL)
+ {
+ /* need to create a new protein sequence */
+ SeqIdFree (newbsp->id);
+ newbsp->id = new_prot_id;
+ new_prot_sep = SeqEntryNew ();
+ new_prot_sep->choice = 1;
+ new_prot_sep->data.ptrvalue = newbsp;
+ parent = GetBestTopParentForData (entityID, featbsp);
+ if (parent != NULL)
+ {
+ AddSeqEntryToSeqEntry (parent, new_prot_sep, TRUE);
+ }
+ slp = ValNodeNew (NULL);
+ if (slp != NULL)
+ {
+ slp->choice = SEQLOC_WHOLE;
+ slp->data.ptrvalue = SeqIdDup (new_prot_id);
+ }
+ sfp->product = slp;
+
+ /* create full length protein feature */
+ prp = ProtRefNew ();
+ prot_sfp = CreateNewFeature (new_prot_sep, NULL, SEQFEAT_PROT, NULL);
+ if (prot_sfp != NULL) {
+ prot_sfp->data.value.ptrvalue = (Pointer) prp;
+ }
+ }
+ else
+ {
+ /* propagate features to new protein */
+ if (!SeqEdFixProteinFeatures (old_prot, newbsp, TRUE, align_func))
+ {
+ Message (MSG_ERROR, "Unable to construct alignment between old and new "
+ "proteins - you will need to adjust the protein features "
+ "manually.");
+ }
+
+ /* then replace old protein with new */
+ seq_data_type = old_prot->seq_data_type;
+ sdp = old_prot->seq_data;
+ old_length = old_prot->length;
+ old_prot->seq_data_type = newbsp->seq_data_type;
+ old_prot->seq_data = newbsp->seq_data;
+ old_prot->length = newbsp->length;
+ newbsp->seq_data_type = seq_data_type;
+ newbsp->seq_data = sdp;
+ newbsp->length = old_length;
+ BioseqFree (newbsp);
+ }
+ }
+ }
+}
+
+
+static SeqLocPtr RemoveGapsFromSegmentedLocation (SeqLocPtr slp, BioseqPtr bsp)
+{
+ SeqLocPtr loc_slp, slp_new, slp_tmp, loc_list = NULL, loc_last = NULL;
+ SeqIdPtr sip;
+ Uint1 strand;
+ Int4 seq_offset, start_pos, end_pos, piece_len;
+
+ if (slp == NULL || bsp == NULL || bsp->repr != Seq_repr_seg)
+ {
+ return slp;
+ }
+
+ loc_slp = SeqLocFindNext (slp, NULL);
+
+ while (loc_slp != NULL)
+ {
+ strand = SeqLocStrand (loc_slp);
+ start_pos = SeqLocStart (loc_slp);
+ end_pos = SeqLocStop (loc_slp);
+
+ /* create list of locations */
+ slp_tmp = bsp->seq_ext;
+ seq_offset = 0;
+ while (slp_tmp != NULL)
+ {
+ piece_len = SeqLocLen (slp_tmp);
+
+ if (seq_offset < end_pos
+ && seq_offset + piece_len >= start_pos)
+ {
+ sip = SeqLocId (slp_tmp);
+
+ slp_new = SeqLocIntNew (MAX (0, start_pos - seq_offset),
+ MIN (piece_len, end_pos - seq_offset),
+ strand, sip);
+
+ if (slp_new != NULL)
+ {
+ if (loc_last == NULL)
+ {
+ loc_list = slp_new;
+ }
+ else
+ {
+ loc_last->next = slp_new;
+ }
+ loc_last = slp_new;
+ }
+ }
+ seq_offset += piece_len;
+ slp_tmp = slp_tmp->next;
+ }
+ loc_slp = SeqLocFindNext (slp, loc_slp);
+ }
+
+ if (loc_list == NULL)
+ {
+ /* failed to convert - do not change */
+ }
+ else if (loc_list->next == NULL)
+ {
+ /* only found one piece */
+ slp = SeqLocFree (slp);
+ slp = loc_list;
+ }
+ else
+ {
+ /* make mixed location */
+ slp_new = ValNodeNew (NULL);
+ if (slp_new != NULL)
+ {
+ slp_new->choice = SEQLOC_MIX;
+ slp_new->data.ptrvalue = loc_list;
+ slp = SeqLocFree (slp);
+ slp = slp_new;
+ }
+ }
+ return slp;
+}
+
+static Boolean PointInInterval (Int4 interval_start, Int4 interval_length, Int4 point)
+{
+ if (point >= interval_start && point < interval_start + interval_length)
+ {
+ return TRUE;
+ }
+ else
+ {
+ return FALSE;
+ }
+}
+
+NLM_EXTERN Boolean GapInLocation (Int4 seq_offset, Int4 length, SeqLocPtr loc)
+{
+ SeqLocPtr slp;
+ Int4 start, stop;
+ Boolean gap_in_location = FALSE;
+
+ slp = SeqLocFindNext (loc, NULL);
+
+ while (slp != NULL && ! gap_in_location)
+ {
+ start = SeqLocStart (slp);
+ stop = SeqLocStop (slp);
+
+ if (PointInInterval (seq_offset, length, start)
+ || PointInInterval (seq_offset, length, stop)
+ || PointInInterval (start, stop - start + 1, seq_offset)
+ || PointInInterval (start, stop - start + 1, seq_offset + length))
+ {
+ gap_in_location = TRUE;
+ }
+
+ slp = SeqLocFindNext (loc, slp);
+ }
+ return gap_in_location;
+}
+
+
+NLM_EXTERN void
+LocationContainsGaps
+(SeqLocPtr slp,
+ BioseqPtr bsp,
+ Boolean unknown_gaps,
+ Boolean known_gaps,
+ BoolPtr terminal_gaps,
+ BoolPtr internal_gaps,
+ BoolPtr entirely_in_gap)
+{
+ DeltaSeqPtr dsp;
+ Int4 seq_offset = 0;
+ Int4 dsp_len;
+ Boolean has_terminal_gaps = FALSE;
+ Boolean has_internal_gaps = FALSE;
+ Boolean all_sublocs_in_gap = TRUE, this_subloc_in_gap = FALSE, this_subloc_start_gap = FALSE, this_subloc_stop_gap = FALSE;
+ Boolean right_sublocs_in_gap = FALSE;
+ SeqLocPtr tmp_slp;
+ Int4 start, stop;
+
+ if (slp == NULL || bsp == NULL
+ || bsp->repr != Seq_repr_delta
+ || bsp->seq_ext_type != 4
+ || bsp->seq_ext == NULL)
+ {
+ return;
+ }
+
+ for (tmp_slp = SeqLocFindNext (slp, NULL);
+ tmp_slp != NULL;
+ tmp_slp = SeqLocFindNext (slp, tmp_slp))
+ {
+ seq_offset = 0;
+ start = SeqLocStart (tmp_slp);
+ stop = SeqLocStop (tmp_slp);
+ this_subloc_in_gap = FALSE;
+ this_subloc_start_gap = FALSE;
+ this_subloc_stop_gap = FALSE;
+ for (dsp = (DeltaSeqPtr) bsp->seq_ext;
+ dsp != NULL && seq_offset <= stop && !this_subloc_in_gap;
+ dsp = dsp->next)
+ {
+ dsp_len = GetDeltaSeqLen(dsp);
+ if (IsDeltaSeqGap (dsp) && !DoesDeltaSeqHaveGapTypeOrLinkage(dsp)
+ && ((unknown_gaps && IsDeltaSeqUnknownGap (dsp))
+ || (known_gaps && IsDeltaSeqKnownGap (dsp)))
+ && GapInLocation (seq_offset, dsp_len, tmp_slp))
+ {
+ if (PointInInterval (seq_offset, dsp_len, start)
+ && PointInInterval (seq_offset, dsp_len, stop))
+ {
+ this_subloc_in_gap = TRUE;
+ }
+ else if (PointInInterval (seq_offset, dsp_len, start))
+ {
+ this_subloc_start_gap = TRUE;
+ }
+ else if (PointInInterval (seq_offset, dsp_len, stop))
+ {
+ this_subloc_stop_gap = TRUE;
+ }
+ else
+ {
+ has_internal_gaps = TRUE;
+ }
+ }
+ seq_offset += dsp_len;
+ }
+
+ if (this_subloc_in_gap)
+ {
+ /* all sublocs up to this point have been in the gap, so still part of left gap */
+ if (all_sublocs_in_gap)
+ {
+ has_terminal_gaps = TRUE;
+ }
+ /* could be part of chain of sublocs on the right in gap */
+ right_sublocs_in_gap = TRUE;
+ }
+ else
+ {
+ if (right_sublocs_in_gap && !all_sublocs_in_gap)
+ {
+ /* a chain of prior gapped sublocs has ended that did not start at the left end */
+ has_internal_gaps = TRUE;
+ }
+
+ if (this_subloc_start_gap)
+ {
+ if (all_sublocs_in_gap)
+ {
+ has_terminal_gaps = TRUE;
+ }
+ else
+ {
+ /* gap on left, not part of chain of sublocs on left in gap */
+ has_internal_gaps = TRUE;
+ }
+ }
+
+ if (this_subloc_stop_gap)
+ {
+ /* could be start of chain of sublocs on the right in gap */
+ right_sublocs_in_gap = TRUE;
+ }
+ else
+ {
+ right_sublocs_in_gap = FALSE;
+ }
+ /* at least this subloc is not completely contained in a gap */
+ all_sublocs_in_gap = FALSE;
+ }
+ }
+
+ if (right_sublocs_in_gap)
+ {
+ has_terminal_gaps = TRUE;
+ }
+
+ if (all_sublocs_in_gap)
+ {
+ has_terminal_gaps = FALSE;
+ has_internal_gaps = FALSE;
+ }
+
+ if (terminal_gaps != NULL)
+ {
+ *terminal_gaps = has_terminal_gaps;
+ }
+
+ if (internal_gaps != NULL)
+ {
+ *internal_gaps = has_internal_gaps;
+ }
+
+ if (entirely_in_gap != NULL)
+ {
+ *entirely_in_gap = all_sublocs_in_gap;
+ }
+}
+
+
+static SeqLocPtr
+RemoveGapsFromDeltaLocation
+(SeqLocPtr slp,
+ BioseqPtr bsp,
+ Boolean unknown_gaps,
+ Boolean known_gaps,
+ Boolean trim_ends,
+ Boolean split_internal,
+ Boolean set_partial_ends,
+ BoolPtr split)
+{
+ DeltaSeqPtr dsp;
+ Int4 seq_offset = 0;
+ Int4 dsp_len;
+ SeqLocPtr loc_list = NULL, prev_loc = NULL;
+ SeqIdPtr sip, before_sip, after_sip;
+ Boolean changed, partial5, partial3;
+ SeqLocPtr before = NULL, after = NULL;
+ Int4 start, stop;
+ Boolean delete_for_this_gap;
+ Uint1 strand;
+
+ if (slp == NULL || bsp == NULL
+ || bsp->repr != Seq_repr_delta
+ || bsp->seq_ext_type != 4
+ || bsp->seq_ext == NULL)
+ {
+ return slp;
+ }
+
+ sip = SeqLocId (slp);
+ if (sip == NULL)
+ {
+ return slp;
+ }
+
+ CheckSeqLocForPartial (slp, &partial5, &partial3);
+
+ seq_offset = 0;
+ before = SeqLocCopy (slp);
+ loc_list = before;
+
+ for (dsp = (DeltaSeqPtr) bsp->seq_ext;
+ dsp != NULL;
+ dsp = dsp->next)
+ {
+ dsp_len = GetDeltaSeqLen(dsp);
+ if (IsDeltaSeqGap (dsp) && !DoesDeltaSeqHaveGapTypeOrLinkage(dsp)
+ && ((unknown_gaps && IsDeltaSeqUnknownGap (dsp))
+ || (known_gaps && IsDeltaSeqKnownGap (dsp)))
+ && GapInLocation (seq_offset, dsp_len, before))
+ {
+ delete_for_this_gap = TRUE;
+ start = SeqLocStart (before);
+ stop = SeqLocStop (before);
+ if (PointInInterval (seq_offset, dsp_len, start)
+ && PointInInterval (seq_offset, dsp_len, stop))
+ {
+ loc_list = SeqLocFree (loc_list);
+ before = NULL;
+ after = NULL;
+ break;
+ }
+ else if (!PointInInterval (seq_offset, dsp_len, start)
+ && !PointInInterval (seq_offset, dsp_len, stop))
+ {
+ if (!split_internal)
+ {
+ delete_for_this_gap = FALSE;
+ }
+ else
+ {
+ if (split != NULL)
+ {
+ *split = TRUE;
+ }
+ }
+ }
+ else if (!trim_ends)
+ {
+ delete_for_this_gap = FALSE;
+ }
+
+ if (delete_for_this_gap)
+ {
+ /* get strand - determines direction of partials */
+ strand = SeqLocStrand (before);
+
+ /* we make a copy of the original location */
+ after = SeqLocCopy (before);
+
+ /* note - we need to use duplicates of the SeqID returned by
+ * SeqLocId, just in case the first location in a mixed location
+ * is deleted, which would free the result from SeqLocId
+ */
+ after_sip = SeqIdDup (SeqLocId (after));
+ before_sip = SeqIdDup (SeqLocId (before));
+ /* in the "after" location, we free everything before the
+ * end of the gap.
+ */
+ after = SeqLocDeleteEx (after, after_sip,
+ 0, seq_offset + dsp_len - 1,
+ FALSE, &changed, &partial5, &partial3);
+
+ /* in the "before" location, we free everything after the
+ * beginning of the gap.
+ */
+ before = SeqLocDeleteEx (before, before_sip,
+ seq_offset, bsp->length,
+ FALSE, &changed, &partial5, &partial3);
+
+ /* handle partialness for ends */
+ CheckSeqLocForPartial (after, &partial5, &partial3);
+ if (strand == Seq_strand_minus)
+ {
+ if (before == NULL)
+ {
+ /* truncated at 3' end */
+ SetSeqLocPartial (after, partial5, set_partial_ends);
+ }
+ else
+ {
+ SetSeqLocPartial (after, partial5, TRUE);
+ }
+
+ }
+ else
+ {
+ if (before == NULL)
+ {
+ /* truncated at 5' end*/
+ SetSeqLocPartial (after, set_partial_ends, partial3);
+ }
+ else
+ {
+ SetSeqLocPartial (after, TRUE, partial3);
+ }
+ }
+
+ CheckSeqLocForPartial (before, &partial5, &partial3);
+ if (strand == Seq_strand_minus)
+ {
+ if (after == NULL)
+ {
+ /* truncated at 5' end*/
+ SetSeqLocPartial (before, set_partial_ends, partial3);
+ } else {
+ SetSeqLocPartial (before, TRUE, partial3);
+ }
+ }
+ else
+ {
+ if (after == NULL)
+ {
+ /* truncated */
+ SetSeqLocPartial (before, partial5, set_partial_ends);
+ } else {
+ SetSeqLocPartial (before, partial5, TRUE);
+ }
+ }
+
+ /* we're done with these IDs now */
+ after_sip = SeqIdFree (after_sip);
+ before_sip = SeqIdFree (before_sip);
+
+ if (before == NULL)
+ {
+ if (prev_loc == NULL)
+ {
+ loc_list = after;
+ }
+ else
+ {
+ prev_loc->next = after;
+ }
+ }
+ else
+ {
+ before->next = after;
+ prev_loc = before;
+ }
+ before = after;
+ }
+ }
+ seq_offset += dsp_len;
+ }
+
+ slp = SeqLocFree (slp);
+ return loc_list;
+}
+
+
+static SeqLocPtr
+RemoveGapsFromLocation
+(SeqLocPtr slp,
+ Boolean unknown_gaps,
+ Boolean known_gaps,
+ Boolean trim_ends,
+ Boolean split_internal,
+ Boolean set_partial_ends,
+ BoolPtr split)
+{
+ BioseqPtr bsp;
+ SeqIdPtr sip;
+
+ if (slp == NULL)
+ {
+ return slp;
+ }
+
+ sip = SeqLocId (slp);
+ if (sip == NULL)
+ {
+ return slp;
+ }
+
+ bsp = BioseqFind (sip);
+ if (bsp == NULL)
+ {
+ return slp;
+ }
+ else if (bsp->repr == Seq_repr_seg)
+ {
+ if (!split_internal) {
+ return slp;
+ } else {
+ return RemoveGapsFromSegmentedLocation (slp, bsp);
+ }
+ }
+ else if (bsp->repr == Seq_repr_delta
+ && bsp->seq_ext_type == 4
+ && bsp->seq_ext != NULL)
+ {
+ return RemoveGapsFromDeltaLocation (slp, bsp, unknown_gaps, known_gaps, trim_ends, split_internal, set_partial_ends, split);
+ }
+ else
+ {
+ return slp;
+ }
+}
+
+NLM_EXTERN void AdjustFrame (SeqFeatPtr sfp, BioseqPtr oldprot)
+{
+ ByteStorePtr bs;
+ CdRegionPtr crp;
+ CharPtr oldprot_str, newprot_str;
+ Uint1 orig_frame, best_frame = 0;
+
+ if (sfp == NULL || sfp->data.choice != SEQFEAT_CDREGION
+ || sfp->data.value.ptrvalue == NULL
+ || oldprot == NULL)
+ {
+ return;
+ }
+
+ crp = (CdRegionPtr) sfp->data.value.ptrvalue;
+
+ oldprot_str = GetSequenceByBsp (oldprot);
+
+ orig_frame = crp->frame;
+ for (crp->frame = 1; crp->frame <= 3 && best_frame == 0; crp->frame++)
+ {
+ newprot_str = NULL;
+ bs = ProteinFromCdRegionEx (sfp, TRUE, FALSE);
+ if (bs != NULL)
+ {
+ newprot_str = BSMerge (bs, NULL);
+ bs = BSFree (bs);
+ }
+
+ if (StringHasNoText (newprot_str))
+ {
+ newprot_str = MemFree (newprot_str);
+ continue;
+ }
+ if (StringSearch (oldprot_str, newprot_str) != NULL
+ || StringSearch (oldprot_str, newprot_str + 1) != NULL)
+ {
+ best_frame = crp->frame;
+ }
+ else
+ {
+ newprot_str [StringLen (newprot_str) - 1] = 0;
+ if (StringSearch (oldprot_str, newprot_str) != NULL
+ || StringSearch (oldprot_str, newprot_str + 1) != NULL)
+ {
+ best_frame = crp->frame;
+ }
+ }
+ newprot_str = MemFree (newprot_str);
+ }
+ oldprot_str = MemFree (oldprot_str);
+ if (best_frame > 0)
+ {
+ crp->frame = best_frame;
+ }
+ else
+ {
+ crp->frame = orig_frame;
+ }
+
+}
+
+
+NLM_EXTERN AdjustFeatForGapPtr AdjustFeatForGapFree (AdjustFeatForGapPtr agp)
+{
+ if (agp != NULL) {
+ agp->feature_list = ValNodeFree (agp->feature_list);
+ agp->features_in_gap = ValNodeFree (agp->features_in_gap);
+ agp = MemFree (agp);
+ }
+ return agp;
+}
+
+
+NLM_EXTERN Boolean FeatureOkForFeatureList (SeqFeatPtr sfp, ValNodePtr feature_list)
+{
+ ValNodePtr vnp;
+ Boolean rval = FALSE;
+
+ if (sfp == NULL) return FALSE;
+ if (feature_list == NULL) return TRUE;
+ for (vnp = feature_list; vnp != NULL && !rval; vnp = vnp->next) {
+ if (vnp->choice == 255 || vnp->choice == sfp->idx.subtype) {
+ rval = TRUE;
+ }
+ }
+ return rval;
+}
+
+
+NLM_EXTERN SeqFeatPtr GetGeneForFeature (SeqFeatPtr sfp)
+{
+ GeneRefPtr grp;
+ SeqFeatPtr overlap_gene;
+ Boolean is_suppressed;
+ SeqMgrFeatContext fcontext;
+
+ grp = SeqMgrGetGeneXref (sfp);
+ is_suppressed = SeqMgrGeneIsSuppressed (grp);
+ if (is_suppressed) return NULL;
+
+ if (grp != NULL) {
+ overlap_gene = SeqMgrGetGeneByLocusTag (BioseqFindFromSeqLoc(sfp->location), grp->locus_tag, &fcontext);
+ } else {
+ overlap_gene = SeqMgrGetOverlappingGene(sfp->location, &fcontext);
+ }
+ return overlap_gene;
+}
+
+
+const char *cds_gap_comment = "coding region disrupted by sequencing gap";
+
+NLM_EXTERN void AddCDSGapComment (SeqFeatPtr sfp)
+{
+ CharPtr new_comment = NULL;
+
+ if (sfp == NULL || StringSearch (sfp->comment, cds_gap_comment) != NULL)
+ {
+ return;
+ }
+
+ if (StringHasNoText (sfp->comment))
+ {
+ sfp->comment = MemFree (sfp->comment);
+ sfp->comment = StringSave (cds_gap_comment);
+ }
+ else
+ {
+ new_comment = (CharPtr) MemNew ((StringLen (sfp->comment)
+ + StringLen (cds_gap_comment)
+ + 4) * sizeof (Char));
+ StringCpy (new_comment, sfp->comment);
+ StringCat (new_comment, "; ");
+ StringCat (new_comment, cds_gap_comment);
+ sfp->comment = MemFree (sfp->comment);
+ sfp->comment = new_comment;
+ }
+}
+
+
+NLM_EXTERN BioseqPtr
+AddProteinSequenceCopy
+(BioseqPtr protbsp,
+ BioseqPtr featbsp,
+ SeqFeatPtr new_sfp,
+ Uint2 entityID)
+{
+ Char str [128];
+ SeqIdPtr new_id;
+ BioseqPtr new_protbsp;
+ SeqEntryPtr prot_sep, parent_sep;
+ SeqFeatPtr prot_sfp, prot_cpy;
+ SeqAnnotPtr sap;
+ SeqLocPtr slp;
+
+ if (protbsp == NULL || featbsp == NULL || new_sfp == NULL)
+ {
+ return NULL;
+ }
+
+ parent_sep = GetBestTopParentForData (entityID, featbsp);
+ if (parent_sep == NULL
+ || !IS_Bioseq_set (parent_sep)
+ || parent_sep->data.ptrvalue == NULL)
+ {
+ return NULL;
+ }
+
+ SeqIdWrite (protbsp->id, str, PRINTID_REPORT, sizeof (str) - 1);
+ new_id = MakeUniqueSeqID (str);
+ new_protbsp = BioseqCopyEx (new_id, protbsp, 0, protbsp->length - 1,
+ Seq_strand_plus, TRUE);
+ ValNodeLink (&(new_protbsp->descr),
+ AsnIoMemCopy ((Pointer) protbsp->descr,
+ (AsnReadFunc) SeqDescrAsnRead,
+ (AsnWriteFunc) SeqDescrAsnWrite));
+
+ prot_sep = SeqEntryNew ();
+ if (prot_sep != NULL)
+ {
+ prot_sep->choice = 1;
+ prot_sep->data.ptrvalue = new_protbsp;
+ SeqMgrSeqEntry (SM_BIOSEQ, (Pointer) new_protbsp, prot_sep);
+ AddSeqEntryToSeqEntry (parent_sep, prot_sep, TRUE);
+ }
+
+ SeqMgrAddToBioseqIndex (new_protbsp);
+ new_sfp->product = SeqLocWholeNew (new_protbsp);
+
+ for (sap = protbsp->annot; sap != NULL; sap = sap->next) {
+ if (sap->type == 1) {
+ for (prot_sfp = sap->data; prot_sfp != NULL; prot_sfp = prot_sfp->next) {
+ slp = SeqLocCopy (prot_sfp->location);
+ slp = SeqLocReplaceID (slp, new_protbsp->id);
+ prot_cpy = CreateNewFeatureOnBioseq (new_protbsp, SEQFEAT_PROT, slp);
+ prot_cpy->data.value.ptrvalue = AsnIoMemCopy (prot_sfp->data.value.ptrvalue, (AsnReadFunc) ProtRefAsnRead, (AsnWriteFunc) ProtRefAsnWrite);
+ }
+ }
+ }
+ SeqMgrIndexFeatures (entityID, NULL);
+ return new_protbsp;
+}
+
+
+NLM_EXTERN void SetProductSequencePartials (BioseqPtr protbsp, Boolean partial5, Boolean partial3)
+{
+ SeqFeatPtr prot_sfp;
+ SeqMgrFeatContext context;
+ SeqMgrDescContext dcontext;
+ SeqDescrPtr sdp;
+ MolInfoPtr mip;
+
+ if (protbsp == NULL)
+ {
+ return;
+ }
+
+ /* set partials on product */
+ prot_sfp = SeqMgrGetNextFeature (protbsp, NULL,
+ SEQFEAT_PROT, FEATDEF_PROT, &context);
+ if (prot_sfp != NULL)
+ {
+ SetSeqLocPartial (prot_sfp->location, partial5, partial3);
+ prot_sfp->partial = partial5 || partial3;
+ }
+
+ sdp = SeqMgrGetNextDescriptor (protbsp, NULL, Seq_descr_molinfo, &dcontext);
+ if (sdp != NULL)
+ {
+ mip = (MolInfoPtr) sdp->data.ptrvalue;
+ if (partial5 && partial3) {
+ mip->completeness = 5;
+ } else if (partial5) {
+ mip->completeness = 3;
+ } else if (partial3) {
+ mip->completeness = 4;
+ } else if (prot_sfp != NULL && prot_sfp->partial) {
+ mip->completeness = 2;
+ } else {
+ mip->completeness = 0;
+ }
+ }
+}
+
+
+static SeqLocPtr MakeMixedLocFromLocList (SeqLocPtr loc_list)
+{
+ SeqLocPtr slp_mix, tmp_slp, prev_slp = NULL, next_slp;
+
+ /* make location mixed */
+ slp_mix = ValNodeNew(NULL);
+ slp_mix->choice = SEQLOC_MIX;
+ slp_mix->data.ptrvalue = loc_list;
+ tmp_slp = loc_list;
+ while (tmp_slp != NULL) {
+ next_slp = tmp_slp->next;
+ if (tmp_slp->choice == SEQLOC_MIX) {
+ if (tmp_slp->data.ptrvalue == NULL) {
+ /* empty mixed loc, just remove it */
+ if (prev_slp == NULL) {
+ slp_mix->data.ptrvalue = tmp_slp->next;
+ } else {
+ prev_slp->next = tmp_slp->next;
+ }
+ tmp_slp->next = NULL;
+ tmp_slp = SeqLocFree (tmp_slp);
+ } else {
+ /* take sublocations and promote them */
+ if (prev_slp == NULL) {
+ slp_mix->data.ptrvalue = tmp_slp->data.ptrvalue;
+ } else {
+ prev_slp->next = tmp_slp->data.ptrvalue;
+ }
+ prev_slp = tmp_slp->data.ptrvalue;
+ while (prev_slp->next != NULL) {
+ prev_slp = prev_slp->next;
+ }
+ prev_slp->next = next_slp;
+ tmp_slp->next = NULL;
+ tmp_slp->data.ptrvalue = NULL;
+ tmp_slp = SeqLocFree (tmp_slp);
+ }
+ } else {
+ prev_slp = tmp_slp;
+ }
+ tmp_slp = next_slp;
+ }
+ return slp_mix;
+}
+
+
+NLM_EXTERN void AdjustFeatureForGapsCallback (SeqFeatPtr sfp, Pointer data)
+{
+ AdjustFeatForGapPtr afgp;
+ BioseqPtr protbsp = NULL, new_protbsp;
+ SeqFeatPtr new_sfp, tmp, gene, mrna;
+ Boolean partial5, partial3;
+ Uint2 entityID;
+ SeqLocPtr slp_new;
+ Boolean split;
+ Boolean split_internal;
+ ValNodePtr tmp_list;
+ BioseqPtr gapped_bioseq;
+ SeqMgrFeatContext fcontext;
+ Boolean set_partial_ends;
+
+ if (sfp == NULL || data == NULL) return;
+
+ afgp = (AdjustFeatForGapPtr) data;
+
+ if (!FeatureOkForFeatureList(sfp, afgp->feature_list)) return;
+
+ gapped_bioseq = BioseqFind (SeqLocId (sfp->location));
+
+ CheckSeqLocForPartial (sfp->location, &partial5, &partial3);
+ slp_new = (SeqLocPtr) AsnIoMemCopy (sfp->location,
+ (AsnReadFunc) SeqLocAsnRead,
+ (AsnWriteFunc) SeqLocAsnWrite);
+ split = FALSE;
+ set_partial_ends = afgp->make_partial;
+ if (set_partial_ends && ! afgp->partial_for_pseudo) {
+ if (sfp->pseudo) {
+ set_partial_ends = FALSE;
+ } else {
+ gene = GetGeneForFeature (sfp);
+ if (gene != NULL && gene->pseudo) {
+ set_partial_ends = FALSE;
+ }
+ }
+ }
+
+ /* handle overlapping features if coding region */
+ if (sfp->data.choice == SEQFEAT_CDREGION)
+ {
+ split_internal = afgp->split_internal;
+ afgp->split_internal = FALSE;
+ tmp_list = afgp->feature_list;
+ afgp->feature_list = NULL;
+ gene = GetGeneForFeature (sfp);
+ AdjustFeatureForGapsCallback (gene, afgp);
+ mrna = SeqMgrGetOverlappingmRNA (sfp->location, &fcontext);
+ afgp->split_internal = split_internal;
+ AdjustFeatureForGapsCallback (mrna, afgp);
+ afgp->feature_list = tmp_list;
+ }
+
+ slp_new = RemoveGapsFromLocation (slp_new, afgp->unknown_gaps, afgp->known_gaps, afgp->trim_ends, afgp->split_internal, set_partial_ends, &split);
+ if (slp_new == NULL) {
+ ValNodeAddPointer (&(afgp->features_in_gap), OBJ_SEQFEAT, sfp);
+ return;
+ } else if (SeqLocCompare (slp_new, sfp->location) == SLC_A_EQ_B) {
+ slp_new = SeqLocFree (slp_new);
+ return;
+ }
+
+ if (split) {
+ AddCDSGapComment(sfp);
+ }
+
+ sfp->location = SeqLocFree (sfp->location);
+ sfp->location = slp_new;
+
+ if (gapped_bioseq != NULL && gapped_bioseq->repr == Seq_repr_delta)
+ {
+ entityID = gapped_bioseq->idx.entityID;
+
+ while (sfp->location->next != NULL)
+ {
+ /* create a copy of the feature for each interval between gaps */
+ tmp = sfp->next;
+ sfp->next = NULL;
+ new_sfp = (SeqFeatPtr) AsnIoMemCopy (sfp,
+ (AsnReadFunc) SeqFeatAsnRead,
+ (AsnWriteFunc) SeqFeatAsnWrite);
+ sfp->next = new_sfp;
+ new_sfp->next = tmp;
+
+ new_sfp->location = sfp->location->next;
+ new_sfp->comment = StringSave (sfp->comment);
+
+ sfp->location->next = NULL;
+
+ /* fix partials */
+ CheckSeqLocForPartial (sfp->location, &partial5, &partial3);
+ sfp->partial = partial5 || partial3;
+
+ if (sfp->data.choice == SEQFEAT_CDREGION) {
+ protbsp = BioseqFindFromSeqLoc (sfp->product);
+ if (protbsp != NULL)
+ {
+ new_protbsp = AddProteinSequenceCopy (protbsp, gapped_bioseq, new_sfp, entityID);
+ }
+
+ /* adjust frame */
+ AdjustFrame (sfp, protbsp);
+
+ /* retranslate coding region */
+ SeqEdTranslateOneCDS (sfp, gapped_bioseq, entityID, afgp->align_func);
+
+ /* set partials on product */
+ if (protbsp == NULL)
+ {
+ protbsp = BioseqFindFromSeqLoc (sfp->product);
+ }
+ SetProductSequencePartials (protbsp, partial5, partial3);
+ protbsp = new_protbsp;
+ }
+ partial5 = TRUE;
+ sfp = new_sfp;
+ }
+ /* fix partials for last feature */
+ CheckSeqLocForPartial (sfp->location, &partial5, &partial3);
+ sfp->partial = partial5 || partial3;
+
+ if (sfp->data.choice == SEQFEAT_CDREGION)
+ {
+ /* adjust frame */
+ protbsp = BioseqFindFromSeqLoc (sfp->product);
+ AdjustFrame (sfp, protbsp);
+
+ /* retranslate coding region */
+ SeqEdTranslateOneCDS (sfp, gapped_bioseq, entityID, afgp->align_func);
+ /* set partials on product */
+ SetProductSequencePartials (protbsp, partial5, partial3);
+ }
+ }
+ else
+ {
+ /* make location mixed */
+ sfp->location = MakeMixedLocFromLocList (sfp->location);
+ }
+}
+
+
+NLM_EXTERN void MarkFeaturesInGapsForDeletion (AdjustFeatForGapPtr afgp)
+{
+ ValNodePtr vnp;
+ SeqFeatPtr sfp;
+ BioseqPtr product_bsp;
+
+ if (afgp == NULL || afgp->features_in_gap == NULL)
+ {
+ return;
+ }
+
+ for (vnp = afgp->features_in_gap; vnp != NULL; vnp = vnp->next)
+ {
+ sfp = (SeqFeatPtr) vnp->data.ptrvalue;
+ sfp->idx.deleteme = TRUE;
+ if (sfp->data.choice == SEQFEAT_CDREGION && sfp->product != NULL)
+ {
+ product_bsp = BioseqFindFromSeqLoc (sfp->product);
+ if (product_bsp != NULL)
+ {
+ product_bsp->idx.deleteme = TRUE;
+ }
+ }
+ }
+ afgp->features_in_gap = ValNodeFree (afgp->features_in_gap);
+}
+
+NLM_EXTERN void AdjustCDSLocationsForUnknownGapsCallback (SeqFeatPtr sfp, Pointer data)
+{
+ AdjustFeatForGapData agd;
+
+ agd.feature_list = NULL;
+
+ agd.unknown_gaps = TRUE;
+ agd.known_gaps = FALSE;
+ agd.make_partial = TRUE;
+ agd.partial_for_pseudo = FALSE;
+ agd.split_internal = TRUE;
+ agd.trim_ends = TRUE;
+ agd.align_func = data;
+
+ agd.features_in_gap = NULL;
+
+ AdjustFeatureForGapsCallback (sfp, &agd);
+ MarkFeaturesInGapsForDeletion (&agd);
+}
+
+
+static Boolean GetNumberInNthColumn (CharPtr line, Int4 n, Int4Ptr pVal)
+{
+ CharPtr cp, col_start;
+ Int4 col = 1, val = 0;
+ Boolean rval = FALSE;
+
+ if (line == NULL || pVal == NULL) return FALSE;
+
+ col_start = line;
+ cp = StringChr (col_start, '\t');
+ while (n > col && cp != NULL) {
+ col++;
+ col_start = cp + 1;
+ cp = StringChr (col_start, '\t');
+ }
+ if (n == col) {
+ if (cp != NULL) {
+ *cp = 0;
+ }
+ val = atoi (col_start);
+ if (cp != NULL) {
+ *cp = '\t';
+ }
+ *pVal = val;
+ rval = TRUE;
+ }
+ return rval;
+}
+
+
+
+static UserFieldPtr AddTranscriptomeNumberUserField (Int4 value, CharPtr label)
+{
+ UserFieldPtr ufp;
+ ObjectIdPtr oip;
+
+ ufp = UserFieldNew ();
+ oip = ObjectIdNew ();
+ oip->str = StringSave (label);
+ ufp->label = oip;
+ ufp->choice = 2; /* int */
+ ufp->data.intvalue = value;
+ return ufp;
+}
+
+
+static UserFieldPtr AddTranscriptomeStringUserField (CharPtr value, CharPtr label)
+{
+ UserFieldPtr ufp;
+ ObjectIdPtr oip;
+
+ ufp = UserFieldNew ();
+ oip = ObjectIdNew ();
+ oip->str = StringSave (label);
+ ufp->label = oip;
+ ufp->choice = 1; /* visible string */
+ ufp->data.ptrvalue = (Pointer) StringSave (value);
+ return ufp;
+}
+
+const CharPtr TSA_assembly_from = "assembly from";
+const CharPtr TSA_assembly_to = "assembly to";
+const CharPtr TSA_primary_id = "primary ID";
+const CharPtr TSA_primary_from = "primary from";
+const CharPtr TSA_primary_to = "primary to";
+
+NLM_EXTERN UserFieldPtr AddLineToTranscriptomeTable (Int4 assembly_from, Int4 assembly_to, CharPtr primary_id, Int4 primary_from, Int4 primary_to)
+{
+ UserFieldPtr row, list, ufp, prev = NULL;
+ ObjectIdPtr oip;
+
+ row = UserFieldNew ();
+ oip = ObjectIdNew ();
+ oip->id = 0;
+ row->label = oip;
+ row->choice = 11; /* user fields */
+
+ ufp = AddTranscriptomeNumberUserField (assembly_from, TSA_assembly_from);
+
+ list = ufp;
+ prev = list;
+
+ ufp = AddTranscriptomeNumberUserField (assembly_to, TSA_assembly_to);
+ prev->next = ufp;
+ prev = ufp;
+
+ ufp = AddTranscriptomeStringUserField (primary_id, TSA_primary_id);
+ prev->next = ufp;
+ prev = ufp;
+
+ ufp = AddTranscriptomeNumberUserField (primary_from, TSA_primary_from);
+ prev->next = ufp;
+ prev = ufp;
+
+ ufp = AddTranscriptomeNumberUserField (primary_to, TSA_primary_to);
+ prev->next = ufp;
+ prev = ufp;
+
+ row->data.ptrvalue = list;
+
+ return row;
+}
+
+
+NLM_EXTERN Boolean AddTranscriptomeTable (BioseqPtr bsp, FILE *fp)
+{
+ ReadBufferData rbd;
+ Int4 assembly_from, assembly_to, primary_from, primary_to;
+ CharPtr first_tab;
+ Int4 line_num = 1;
+ UserFieldPtr row_list = NULL, prev = NULL, ufp;
+ UserObjectPtr uop;
+ ObjectIdPtr oip;
+ Boolean rval = FALSE;
+ CharPtr line;
+
+ if (bsp == NULL || fp == NULL) return FALSE;
+
+ rbd.fp = fp;
+ rbd.current_data = NULL;
+
+ line = AbstractReadFunction (&rbd);
+ while (line != NULL) {
+ if (line[0] != ';') {
+ first_tab = StringChr (line, '\t');
+ if (first_tab == NULL
+ || !GetNumberInNthColumn (line, 7, &primary_from)
+ || !GetNumberInNthColumn (line, 8, &primary_to)
+ || !GetNumberInNthColumn (line, 3, &assembly_from)
+ || !GetNumberInNthColumn (line, 4, &assembly_to)) {
+ Message (MSG_POST, "Line %d could not be read", line_num);
+ } else {
+ *first_tab = 0;
+ ufp = AddLineToTranscriptomeTable (assembly_from, assembly_to, line, primary_from, primary_to);
+ *first_tab = '\t';
+ if (prev == NULL) {
+ row_list = ufp;
+ } else {
+ prev->next = ufp;
+ }
+ prev = ufp;
+ }
+ }
+ line = AbstractReadFunction (&rbd);
+ line++;
+ }
+
+ if (row_list == NULL) {
+ Message (MSG_POST, "No rows found for table");
+ } else {
+ uop = UserObjectNew ();
+ oip = ObjectIdNew ();
+ oip->str = StringSave ("TSA");
+ uop->type = oip;
+ uop->data = row_list;
+ SeqDescrAddPointer (&(bsp->descr), Seq_descr_user, (Pointer) uop);
+ rval = TRUE;
+ }
+ return rval;
+}
+
+
+static Int4 ReadNumberFromPortionOfString (CharPtr str, Int4 len)
+{
+ CharPtr num_buf;
+ Int4 val;
+
+ if (str == NULL) return -1;
+ num_buf = (CharPtr) MemNew (sizeof (Char) * (len + 1));
+ StringNCpy (num_buf, str, len);
+ num_buf[len] = 0;
+ val = atoi (num_buf);
+ num_buf = MemFree (num_buf);
+ return val;
+}
+
+
+NLM_EXTERN Boolean IsStringInSpanInList (CharPtr str, CharPtr list)
+{
+ CharPtr cp, hyphen;
+ Int4 prefix_len = 0;
+ CharPtr num_start, range_start;
+ Int4 start_val, end_val, swap_val, str_val;
+ Boolean rval = FALSE;
+
+ if (StringHasNoText (list) || StringHasNoText (str)) {
+ return FALSE;
+ }
+
+ cp = str;
+ while (isalpha (*cp)) {
+ prefix_len++;
+ cp++;
+ }
+ if (*cp == 0) {
+ return FALSE;
+ }
+
+ num_start = cp;
+ while (isdigit (*cp)) {
+ cp++;
+ }
+ if (*cp != 0) {
+ return FALSE;
+ }
+
+ /* find ranges */
+
+ hyphen = StringChr (list, '-');
+ while (hyphen != NULL && !rval) {
+ if (hyphen == list) {
+ hyphen = StringChr (hyphen + 1, '-');
+ } else {
+ /* is the second part of the range what we're looking for? */
+ if ((prefix_len == 0 || isdigit (*(hyphen + 1)) || StringNCmp (hyphen + 1, str, prefix_len) == 0)
+ && isdigit (*(hyphen + 1 + prefix_len))) {
+ cp = hyphen + 1 + prefix_len;
+ while (isdigit (*cp)) {
+ cp++;
+ }
+ if (*cp == 0 || ispunct (*cp) || isspace (*cp)) {
+ end_val = ReadNumberFromPortionOfString (hyphen + 1 + prefix_len, cp - hyphen - 1 - prefix_len);
+ if (end_val > -1) {
+ range_start = hyphen - 1;
+ while (range_start > list && isdigit (*range_start)) {
+ range_start --;
+ }
+ if (!isdigit (*range_start)) {
+ range_start++;
+ }
+ if (range_start - list >= prefix_len
+ /* make sure prefix matches */
+ && (prefix_len == 0 || StringNCmp (range_start - prefix_len, str, prefix_len) == 0)
+ /* make sure the prefix is at the beginning of the list, or else the character before is punctuation or space */
+ && (list == range_start - prefix_len
+ || ispunct (*(range_start - prefix_len - 1))
+ || isspace (*(range_start - prefix_len - 1)))) {
+ start_val = ReadNumberFromPortionOfString (range_start, hyphen - range_start);
+ if (start_val > end_val) {
+ swap_val = start_val;
+ start_val = end_val;
+ end_val = swap_val;
+ }
+ str_val = ReadNumberFromPortionOfString (str + prefix_len, StringLen (str + prefix_len));
+ if (str_val > start_val && str_val <= end_val) {
+ rval = TRUE;
+ }
+ }
+ }
+ }
+ }
+ hyphen = StringChr (hyphen + 1, '-');
+ }
+ }
+
+ return rval;
+}
+
+
+static void ParseGoTermsFromFieldsSfp (UserObjectPtr uop, Pointer userdata)
+{
+ ObjectIdPtr oip;
+ UserFieldPtr ufp_process, ufp_new, ufp2, ufp, ufp_last = NULL, new_list = NULL, last_new = NULL;
+ CharPtr cp;
+
+ if (uop == NULL) return;
+ oip = uop->type;
+ if (oip == NULL) return;
+ if (StringCmp (oip->str, "GeneOntology") == 0) {
+ for (ufp_process = uop->data; ufp_process != NULL; ufp_process = ufp_process->next) {
+ if (ufp_process->label == NULL
+ || (StringCmp (ufp_process->label->str, "Process") != 0
+ && StringCmp (ufp_process->label->str, "Function") != 0
+ && StringCmp (ufp_process->label->str, "Component") != 0)) {
+ continue;
+ }
+ for (ufp2 = ufp_process->data.ptrvalue; ufp2 != NULL; ufp2 = ufp2->next) {
+ if (ufp2->choice != 11) continue;
+ new_list = NULL;
+ ufp_last = NULL;
+ last_new = NULL;
+ for (ufp = ufp2->data.ptrvalue; ufp != NULL; ufp = ufp->next) {
+ ufp_last = ufp;
+ if (ufp->label != NULL && StringCmp (ufp->label->str, "text string") == 0
+ && (cp = StringISearch (ufp->data.ptrvalue, "GO:")) != NULL) {
+ ufp_new = UserFieldNew ();
+ ufp_new->label = ObjectIdNew ();
+ ufp_new->label->str = StringSave ("go id");
+ ufp_new->choice = 1; /* visible string - need to keep leading zeroes */
+ ufp_new->data.ptrvalue = StringSave (cp + 3);
+ *cp = 0;
+ cp--;
+ while (cp > (CharPtr) ufp->data.ptrvalue && isspace (*cp)) {
+ *cp = 0;
+ cp--;
+ }
+ if (last_new == NULL) {
+ new_list = ufp_new;
+ } else {
+ last_new->next = ufp_new;
+ }
+ last_new = ufp_new;
+ }
+ }
+ if (new_list != NULL) {
+ if (ufp_last == NULL) {
+ uop->data = new_list;
+ } else {
+ ufp_last->next = new_list;
+ }
+ }
+ }
+ }
+ }
+}
+
+
+static void ParseGoTermsFromFieldsCallback (SeqFeatPtr sfp, Pointer data)
+{
+ if (sfp == NULL || sfp->ext == NULL) return;
+
+ VisitUserObjectsInUop (sfp->ext, NULL, ParseGoTermsFromFieldsSfp);
+
+}
+
+
+NLM_EXTERN void ParseGoTermsFromFields (SeqEntryPtr sep)
+{
+ VisitFeaturesInSep (sep, NULL, ParseGoTermsFromFieldsCallback);
+}
+
+
+static ValNodePtr ReadOneColumnList (CharPtr line)
+{
+ CharPtr p_start, p_end;
+ Int4 plen;
+ Boolean found_end;
+ ValNodePtr col_list = NULL;
+
+ if (StringHasNoText (line)) return NULL;
+ p_start = line;
+ found_end = FALSE;
+ while (*p_start != 0 && !found_end)
+ {
+ plen = StringCSpn (p_start, "\t\n");
+ if (plen == 0)
+ {
+ if (col_list != NULL)
+ {
+ ValNodeAddStr (&col_list, 0, StringSave (""));
+ }
+ p_start++;
+ if (*p_start == 0) {
+ if (col_list != NULL)
+ {
+ ValNodeAddStr (&col_list, 0, StringSave (""));
+ }
+ }
+ continue;
+ }
+ if (plen == StringLen (p_start))
+ {
+ found_end = TRUE;
+ }
+ else
+ {
+ p_end = p_start + plen;
+ *p_end = 0;
+ }
+ TrimSpacesAroundString (p_start);
+ ValNodeAddStr (&col_list, 0, StringSave (p_start));
+ if (!found_end)
+ {
+ p_start = p_end + 1;
+ }
+ }
+ return col_list;
+}
+
+NLM_EXTERN ValNodePtr ReadTabTableFromFile (FILE *fp)
+{
+ Int4 max_columns, num_cols;
+ ValNodePtr header_line;
+ ValNodePtr line_list, column_list;
+ ValNodePtr vnp;
+ ReadBufferData rbd;
+ CharPtr line;
+
+ if (fp == NULL) return NULL;
+ rbd.fp = fp;
+ rbd.current_data = NULL;
+
+ line_list = NULL;
+ max_columns = 0;
+ header_line = NULL;
+ line = AbstractReadFunction (&rbd);
+ while (line != NULL)
+ {
+ column_list = ReadOneColumnList (line);
+ if (column_list != NULL)
+ {
+ vnp = ValNodeAddPointer (&line_list, 0, column_list);
+ num_cols = ValNodeLen (column_list);
+ if (num_cols > max_columns)
+ {
+ max_columns = num_cols;
+ header_line = vnp;
+ }
+ }
+ line = MemFree (line);
+ line = AbstractReadFunction (&rbd);
+ }
+ FileClose (rbd.fp);
+ /* throw out all lines before header line */
+ if (header_line != line_list)
+ {
+ vnp = line_list;
+ while (vnp != NULL && vnp->next != header_line)
+ {
+ vnp = vnp->next;
+ }
+ vnp->next = NULL;
+ ValNodeFreeData (line_list);
+ line_list = NULL;
+ }
+ return header_line;
+}
+
+
+NLM_EXTERN ValNodePtr FreeTabTable (ValNodePtr row_list)
+{
+ ValNodePtr row_vnp, column_list;
+
+ if (row_list != NULL)
+ {
+ /* free table text */
+ for (row_vnp = row_list; row_vnp != NULL; row_vnp = row_vnp->next)
+ {
+ column_list = (ValNodePtr) row_vnp->data.ptrvalue;
+ row_vnp->data.ptrvalue = ValNodeFreeData (column_list);
+ }
+ row_list = ValNodeFree (row_list);
+ }
+ return row_list;
+}
+
+
+NLM_EXTERN ValNodePtr CountTabTableBlanks (ValNodePtr row_list)
+{
+ ValNodePtr line_vnp, col_vnp, blank_vnp;
+ Int4 num_rows = 0;
+ ValNodePtr blank_list = NULL;
+
+ if (row_list == NULL) return NULL;
+
+ for (line_vnp = row_list; line_vnp != NULL; line_vnp = line_vnp->next)
+ {
+ col_vnp = line_vnp->data.ptrvalue;
+ blank_vnp = blank_list;
+ while (col_vnp != NULL || blank_vnp != NULL) {
+ if (blank_vnp == NULL) {
+ /* for all rows prior to this one, this column was blank */
+ blank_vnp = ValNodeAddInt (&blank_list, 0, num_rows);
+ }
+ if (col_vnp == NULL || StringHasNoText (col_vnp->data.ptrvalue)) {
+ blank_vnp->data.intvalue ++;
+ }
+ if (col_vnp != NULL) {
+ col_vnp = col_vnp->next;
+ }
+ blank_vnp = blank_vnp->next;
+ }
+ num_rows ++;
+ }
+ return blank_list;
+}
+
+
+static void AddToContextList (Char ch, CharPtr PNTR strp, ValNodePtr PNTR search_list)
+{
+ ValNodePtr vnp, vnp_last = NULL, vnp2, clist;
+
+ if (strp == NULL || search_list == NULL) return;
+
+ /* group contexts for the same character together */
+ vnp = *search_list;
+ while (vnp != NULL && vnp->choice != (Uint1)ch)
+ {
+ vnp_last = vnp;
+ vnp = vnp->next;
+ }
+ if (vnp == NULL)
+ {
+ vnp = ValNodeNew(NULL);
+ if (vnp_last == NULL)
+ {
+ *search_list = vnp;
+ }
+ else
+ {
+ vnp_last->next = vnp;
+ }
+ }
+ vnp->choice = (Uint1) ch;
+ clist = vnp->data.ptrvalue;
+ /* don't add the same string twice for the same character */
+ vnp2 = clist;
+ vnp_last = NULL;
+ while (vnp2 != NULL && vnp2->data.ptrvalue != strp)
+ {
+ vnp_last = vnp2;
+ vnp2 = vnp2->next;
+ }
+ if (vnp2 == NULL)
+ {
+ vnp2 = ValNodeNew (NULL);
+ vnp2->data.ptrvalue = strp;
+ if (vnp_last == NULL)
+ {
+ clist = vnp2;
+ }
+ else
+ {
+ vnp_last->next = vnp2;
+ }
+ }
+ vnp->data.ptrvalue = clist;
+}
+
+
+NLM_EXTERN ValNodePtr FreeContextList (ValNodePtr context_list)
+{
+ ValNodePtr vnp;
+
+ for (vnp = context_list; vnp != NULL; vnp = vnp->next)
+ {
+ vnp->data.ptrvalue = ValNodeFree (vnp->data.ptrvalue);
+ }
+ context_list = ValNodeFree (context_list);
+ return context_list;
+}
+
+
+NLM_EXTERN void SpecialCharFindWithContext (CharPtr PNTR strp, Pointer userdata, BoolPtr did_find, BoolPtr did_change)
+{
+ CharPtr cp;
+ Boolean found_any = FALSE;
+
+ if (strp == NULL || *strp == NULL || userdata == NULL) return;
+
+ cp = *strp;
+ while (*cp != 0)
+ {
+ if (*cp < ' ' || *cp > '~')
+ {
+ found_any = TRUE;
+ AddToContextList (*cp, strp, (ValNodePtr PNTR) userdata);
+ }
+ cp++;
+ }
+ if (found_any && did_find != NULL)
+ {
+ *did_find = TRUE;
+ }
+}
+
+
+NLM_EXTERN ValNodePtr ScanTabTableForSpecialCharacters (ValNodePtr row_list)
+{
+ ValNodePtr special_list = NULL, line_vnp, col_vnp;
+
+ if (row_list == NULL) return NULL;
+
+ for (line_vnp = row_list; line_vnp != NULL; line_vnp = line_vnp->next)
+ {
+ col_vnp = line_vnp->data.ptrvalue;
+ while (col_vnp != NULL) {
+ SpecialCharFindWithContext ((CharPtr PNTR)&(col_vnp->data.ptrvalue), &special_list, NULL, NULL);
+ col_vnp = col_vnp->next;
+ }
+ }
+ return special_list;
+}
diff --git a/api/sqnutil3.c b/api/sqnutil3.c
index 4735f56b..e208570c 100644
--- a/api/sqnutil3.c
+++ b/api/sqnutil3.c
@@ -29,7 +29,7 @@
*
* Version Creation Date: 2/7/00
*
-* $Revision: 6.183 $
+* $Revision: 6.231 $
*
* File Description:
*
@@ -61,6 +61,7 @@
#include <salpedit.h>
#include <alignmgr2.h>
#include <actutils.h>
+#include <utilpub.h>
/* included for discrepancy report */
#include <asn2gnbk.h>
#include <asn2gnbp.h>
@@ -1235,29 +1236,6 @@ static Int2 FindStr (CharPtr PNTR array, Int2 array_num, CharPtr str)
return -1;
}
-static ValNodePtr remove_node (ValNodePtr head, ValNodePtr x)
-
-{
- ValNodePtr v, p;
-
- if (head == NULL) return NULL;
- if (x == head) {
- head = x->next;
- x->next = NULL;
- ValNodeFree (x);
- return head;
- }
- for (v = head; v != NULL && v != x; v = v->next) {
- p = v;
- }
- if (v != NULL) {
- p->next = x->next;
- x->next = NULL;
- ValNodeFree (x);
- }
- return head;
-}
-
static SeqLocPtr fake_bond_loc (SeqLocPtr slp)
{
@@ -1446,25 +1424,7 @@ static void MergeAdjacentAnnotsCallback (SeqEntryPtr sep, Pointer mydata, Int4 i
}
}
-static Boolean empty_citgen (CitGenPtr cit)
-
-{
- if (cit == NULL) return TRUE;
- if (cit->cit) return FALSE;
- if (cit->authors) return FALSE;
- if (cit->muid > 0) return FALSE;
- if (cit->journal) return FALSE;
- if (cit->volume) return FALSE;
- if (cit->issue) return FALSE;
- if (cit->pages) return FALSE;
- if (cit->date) return FALSE;
- if (cit->serial_number > 0) return FALSE;
- if (cit->title) return FALSE;
- if (cit->pmid > 0) return FALSE;
- return TRUE;
-}
-
-static Boolean PubIsEffectivelyEmpty (PubdescPtr pdp)
+NLM_EXTERN Boolean PubIsEffectivelyEmpty (PubdescPtr pdp)
{
ValNodePtr vnp;
@@ -1627,7 +1587,7 @@ static void ConvertPubFeatDescProc (SeqFeatPtr sfp, Pointer userdata)
}
}
-static void ConvertSourceFeatDescProc (SeqFeatPtr sfp, Pointer userdata)
+extern void ConvertSourceFeatDescProc (SeqFeatPtr sfp, Pointer userdata)
{
BioSourcePtr biop;
@@ -1639,6 +1599,7 @@ static void ConvertSourceFeatDescProc (SeqFeatPtr sfp, Pointer userdata)
SeqIdPtr sip;
SubSourcePtr ssp;
ValNode vn;
+ ValNodePtr last_dbxref;
/* look for biosource features */
if (sfp == NULL || sfp->data.choice != SEQFEAT_BIOSRC) return;
@@ -1686,6 +1647,23 @@ static void ConvertSourceFeatDescProc (SeqFeatPtr sfp, Pointer userdata)
}
lastssp->next = ssp;
}
+
+ /* move dbxrefs on feature to source */
+ if (sfp->dbxref != NULL) {
+ if (biop->org == NULL) {
+ biop->org = OrgRefNew();
+ }
+ last_dbxref = biop->org->db;
+ while (last_dbxref != NULL && last_dbxref->next != NULL) {
+ last_dbxref = last_dbxref->next;
+ }
+ if (last_dbxref == NULL) {
+ biop->org->db = sfp->dbxref;
+ } else {
+ last_dbxref->next = sfp->dbxref;
+ }
+ sfp->dbxref = NULL;
+ }
}
static void PromoteOrgRefDescToBioSource (SeqDescrPtr sdp, Pointer userdata)
@@ -4783,7 +4761,7 @@ static SeqAlignPtr RemoveOneSequenceFromAlignment (SeqIdPtr sip, SeqAlignPtr sal
SeqIdPtr tmpsip;
SeqAlignPtr salp, salp_next, prev_salp, remove_salp, last_remove;
- if (!FindSeqIdinSeqAlign (salphead, sip)) return NULL;
+ if (!FindSeqIdinSeqAlign (salphead, sip)) return salphead;
salp = salphead;
prev_salp = NULL;
@@ -4943,20 +4921,64 @@ static CharPtr inferencePrefix [] = {
"nucleotide motif",
"protein motif",
"ab initio prediction",
+ "alignment",
NULL
};
+static Int2 ValidateInferenceAccession (CharPtr str, Char chr, Boolean fetchAccn, Boolean has_fetch_function)
+
+{
+ Int2 accnv, rsult;
+ ErrSev sev;
+ SeqIdPtr sip;
+ CharPtr tmp;
+
+ if (StringHasNoText (str)) return EMPTY_INFERENCE_STRING;
+
+ rsult = VALID_INFERENCE;
+
+ tmp = StringChr (str, chr);
+ if (tmp != NULL) {
+ *tmp = '\0';
+ tmp++;
+ TrimSpacesAroundString (str);
+ TrimSpacesAroundString (tmp);
+ if (StringDoesHaveText (tmp)) {
+ if (StringICmp (str, "INSD") == 0 || StringICmp (str, "RefSeq") == 0) {
+ accnv = ValidateAccnDotVer (tmp);
+ if (accnv == -5 || accnv == -6) {
+ rsult = BAD_INFERENCE_ACC_VERSION;
+ } else if (accnv != 0) {
+ rsult = BAD_INFERENCE_ACCESSION;
+ } else if (fetchAccn) {
+ sip = SeqIdFromAccessionDotVersion (tmp);
+ sev = ErrGetMessageLevel ();
+ ErrSetMessageLevel (SEV_ERROR);
+ if (has_fetch_function && GetGIForSeqId (sip) == 0) {
+ rsult = ACC_VERSION_NOT_PUBLIC;
+ }
+ ErrSetMessageLevel (sev);
+ SeqIdFree (sip);
+ }
+ }
+ }
+ if (StringChr (tmp, ' ') != NULL) rsult = SPACES_IN_INFERENCE;
+ } else {
+ rsult = SINGLE_INFERENCE_FIELD;
+ }
+
+ return rsult;
+}
+
NLM_EXTERN Int2 ValidateInferenceQualifier (CharPtr val, Boolean fetchAccn)
{
- Int2 accnv, best, j, rsult;
+ Int2 best, j, rsult, tmprsult;
Char ch;
Boolean has_fetch_function, same_species;
size_t len;
+ CharPtr nxt, ptr, rest, str;
ObjMgrProcPtr ompp = NULL;
- CharPtr rest, str, tmp;
- ErrSev sev;
- SeqIdPtr sip;
if (StringHasNoText (val)) return EMPTY_INFERENCE_STRING;
@@ -4996,45 +5018,35 @@ NLM_EXTERN Int2 ValidateInferenceQualifier (CharPtr val, Boolean fetchAccn)
rsult = SAME_SPECIES_MISUSED;
}
+ has_fetch_function = FALSE;
+ while ((ompp = ObjMgrProcFindNext(NULL, OMPROC_FETCH, OBJ_SEQID, OBJ_SEQID, ompp)) != NULL) {
+ if ((ompp->subinputtype == 0) && (ompp->suboutputtype == SEQID_GI)) {
+ has_fetch_function = TRUE;
+ }
+ }
+
str = StringSave (rest);
- tmp = StringChr (str, ':');
- if (tmp != NULL) {
- *tmp = '\0';
- tmp++;
- TrimSpacesAroundString (str);
- TrimSpacesAroundString (tmp);
- if (StringDoesHaveText (tmp)) {
- if (StringICmp (str, "INSD") == 0 || StringICmp (str, "RefSeq") == 0) {
- accnv = ValidateAccnDotVer (tmp);
- if (accnv == -5 || accnv == -6) {
- rsult = BAD_INFERENCE_ACC_VERSION;
- } else if (accnv != 0) {
- rsult = BAD_INFERENCE_ACCESSION;
- } else if (fetchAccn) {
- sip = SeqIdFromAccessionDotVersion (tmp);
- has_fetch_function = FALSE;
- while ((ompp = ObjMgrProcFindNext(NULL, OMPROC_FETCH, OBJ_SEQID, OBJ_SEQID, ompp)) != NULL) {
- if ((ompp->subinputtype == 0) && (ompp->suboutputtype == SEQID_GI)) {
- has_fetch_function = TRUE;
- }
- }
- sev = ErrGetMessageLevel ();
- ErrSetMessageLevel (SEV_ERROR);
- if (has_fetch_function && GetGIForSeqId (sip) == 0) {
- rsult = ACC_VERSION_NOT_PUBLIC;
- }
- ErrSetMessageLevel (sev);
- SeqIdFree (sip);
- }
+ if (best >= 1 && best <= 7) {
+ tmprsult = ValidateInferenceAccession (str, ':', fetchAccn, has_fetch_function);
+ if (tmprsult != VALID_INFERENCE) {
+ rsult = tmprsult;
+ }
+ } else if (best == 12) {
+ ptr = StringRChr (str, ':');
+ while (ptr != NULL) {
+ *ptr = '\0';
+ ptr++;
+ nxt = StringChr (ptr, ',');
+ if (nxt != NULL) {
+ *nxt = '\0';
}
+ tmprsult = ValidateInferenceAccession (ptr, '|', fetchAccn, has_fetch_function);
+ if (tmprsult != VALID_INFERENCE) {
+ rsult = tmprsult;
+ }
+ ptr = nxt;
}
- /*
- if (StringChr (str, ' ') != NULL) rsult = SPACES_IN_INFERENCE;
- */
- if (StringChr (tmp, ' ') != NULL) rsult = SPACES_IN_INFERENCE;
- } else {
- rsult = SINGLE_INFERENCE_FIELD;
}
MemFree (str);
@@ -5185,6 +5197,76 @@ extern void ExtendSingleGeneOnMRNA (BioseqPtr bsp, Pointer userdata)
/* Functions for the Discrepancy Report */
+
+static Boolean IsmRNASequenceInGenProdSet (BioseqPtr bsp)
+{
+ SeqMgrDescContext dcontext;
+ BioseqSetPtr bssp;
+ SeqDescrPtr sdp;
+ MolInfoPtr mip;
+ Boolean rval = FALSE;
+
+ if (bsp != NULL && bsp->mol == Seq_mol_rna && bsp->idx.parentptr != NULL && bsp->idx.parenttype == OBJ_BIOSEQSET) {
+ bssp = (BioseqSetPtr) bsp->idx.parentptr;
+ if (bssp->_class == BioseqseqSet_class_gen_prod_set) {
+ sdp = SeqMgrGetNextDescriptor (bsp, NULL, Seq_descr_molinfo, &dcontext);
+ if (sdp != NULL && sdp->data.ptrvalue != NULL && sdp->choice == Seq_descr_molinfo) {
+ mip = (MolInfoPtr) sdp->data.ptrvalue;
+ if (mip->biomol == MOLECULE_TYPE_MRNA) {
+ rval = TRUE;
+ }
+ }
+ } else if (bssp->_class == BioseqseqSet_class_nuc_prot && bssp->idx.parentptr != NULL && bssp->idx.parenttype == OBJ_BIOSEQSET) {
+ bssp = (BioseqSetPtr) bssp->idx.parentptr;
+ if (bssp->_class == BioseqseqSet_class_gen_prod_set) {
+ sdp = SeqMgrGetNextDescriptor (bsp, NULL, Seq_descr_molinfo, &dcontext);
+ if (sdp != NULL && sdp->data.ptrvalue != NULL && sdp->choice == Seq_descr_molinfo) {
+ mip = (MolInfoPtr) sdp->data.ptrvalue;
+ if (mip->biomol == MOLECULE_TYPE_MRNA) {
+ rval = TRUE;
+ }
+ }
+ }
+ }
+ }
+ return rval;
+}
+
+
+typedef struct skipmrnafeaturesingenprodset {
+ Pointer userdata;
+ VisitFeaturesFunc callback;
+} SkipmRNAFeaturesInGenProdSetData, PNTR SkipmRNAFeaturesInGenProdSetPtr;
+
+static void VisitGenProdSetFeaturesCallback (SeqFeatPtr sfp, Pointer userdata)
+{
+ SkipmRNAFeaturesInGenProdSetPtr p;
+
+ if (sfp == NULL || userdata == NULL) {
+ return;
+ }
+
+ p = (SkipmRNAFeaturesInGenProdSetPtr) userdata;
+ if (p->callback == NULL) {
+ return;
+ }
+
+ if (!IsmRNASequenceInGenProdSet(BioseqFindFromSeqLoc (sfp->location))) {
+ (p->callback) (sfp, p->userdata);
+ }
+}
+
+
+extern void VisitGenProdSetFeatures (SeqEntryPtr sep, Pointer userdata, VisitFeaturesFunc callback)
+{
+ SkipmRNAFeaturesInGenProdSetData d;
+
+ d.callback = callback;
+ d.userdata = userdata;
+ VisitFeaturesInSep (sep, &d, VisitGenProdSetFeaturesCallback);
+}
+
+
extern ClickableItemPtr
NewClickableItem
(Uint4 clickable_item_type,
@@ -5211,28 +5293,32 @@ NewClickableItem
}
+extern ClickableItemPtr ClickableItemFree (ClickableItemPtr cip)
+{
+ if (cip != NULL)
+ {
+ cip->description = MemFree (cip->description);
+ if (cip->datafree_func != NULL)
+ {
+ (cip->datafree_func) (cip->callback_data);
+ }
+ cip->item_list = ValNodeFree (cip->item_list);
+
+ cip->subcategories = FreeClickableList (cip->subcategories);
+ cip = MemFree (cip);
+ }
+ return cip;
+}
+
+
extern ValNodePtr FreeClickableList (ValNodePtr list)
{
- ClickableItemPtr cip;
ValNodePtr list_next;
while (list != NULL) {
list_next = list->next;
list->next = NULL;
- cip = (ClickableItemPtr) list->data.ptrvalue;
- if (cip != NULL)
- {
- cip->description = MemFree (cip->description);
- if (cip->datafree_func != NULL)
- {
- (cip->datafree_func) (cip->callback_data);
- }
- cip->item_list = ValNodeFree (cip->item_list);
-
- cip->subcategories = FreeClickableList (cip->subcategories);
- cip = MemFree (cip);
- list->data.ptrvalue = NULL;
- }
+ list->data.ptrvalue = ClickableItemFree (list->data.ptrvalue);
list = ValNodeFree (list);
list = list_next;
}
@@ -5287,6 +5373,434 @@ static ValNodePtr ItemListFromSubcategories (ValNodePtr subcategories)
return item_list;
}
+
+extern GlobalDiscrepancyPtr
+GlobalDiscrepancyNew (CharPtr str, Uint1 data_choice, Pointer data)
+{
+ GlobalDiscrepancyPtr g;
+
+ g = (GlobalDiscrepancyPtr) MemNew (sizeof (GlobalDiscrepancyData));
+ g->str = StringSave (str);
+ g->data_choice = data_choice;
+ if (g->data_choice == 0) {
+ g->data = StringSave (data);
+ } else {
+ g->data = data;
+ }
+ return g;
+}
+
+
+extern GlobalDiscrepancyPtr GlobalDiscrepancyFree (GlobalDiscrepancyPtr g)
+{
+ if (g != NULL) {
+ g->str = MemFree (g->str);
+ if (g->data_choice == 0) {
+ g->data = MemFree (g->data);
+ }
+ g = MemFree (g);
+ }
+ return g;
+}
+
+
+extern ValNodePtr FreeGlobalDiscrepancyList (ValNodePtr vnp)
+{
+ ValNodePtr vnp_next;
+
+ while (vnp != NULL) {
+ vnp_next = vnp->next;
+ vnp->next = NULL;
+ vnp->data.ptrvalue = GlobalDiscrepancyFree (vnp->data.ptrvalue);
+ vnp = ValNodeFree (vnp);
+ vnp = vnp_next;
+ }
+ return vnp;
+}
+
+
+extern void ConvertGlobalDiscrepancyToText (GlobalDiscrepancyPtr g, Boolean use_feature_fmt)
+{
+ ValNode vn;
+ ValNodePtr list_copy;
+
+ if (g == NULL || g->data_choice == 0) return;
+
+ vn.choice = g->data_choice;
+ vn.data.ptrvalue = g->data;
+ vn.next = NULL;
+
+ g->data_choice = 0;
+ if (use_feature_fmt) {
+ list_copy = ReplaceDiscrepancyItemWithFeatureTableStrings (&vn);
+ g->data = list_copy->data.ptrvalue;
+ list_copy = ValNodeFree (list_copy);
+ } else {
+ g->data = GetDiscrepancyItemText (&vn);
+ }
+}
+
+
+extern void ConvertGlobalDiscrepancyListToText (ValNodePtr vnp, Boolean use_feature_fmt)
+{
+ while (vnp != NULL) {
+ ConvertGlobalDiscrepancyToText (vnp->data.ptrvalue, use_feature_fmt);
+ vnp = vnp->next;
+ }
+}
+
+
+extern ValNodePtr GetGlobalDiscrepancyItem (GlobalDiscrepancyPtr g)
+{
+ ValNodePtr rval = NULL;
+ if (g != NULL) {
+ rval = ValNodeNew (NULL);
+ rval->choice = g->data_choice;
+ if (rval->choice == 0) {
+ rval->data.ptrvalue = StringSave (g->data);
+ } else {
+ rval->data.ptrvalue = g->data;
+ }
+ }
+ return rval;
+}
+
+
+extern CharPtr GetGlobalDiscrepancyStr (GlobalDiscrepancyPtr g)
+{
+ CharPtr rval = NULL;
+ if (g != NULL) {
+ rval = g->str;
+ }
+ return rval;
+}
+
+
+NLM_EXTERN int LIBCALLBACK SortVnpByGlobalDiscrepancyString (VoidPtr ptr1, VoidPtr ptr2)
+
+{
+ ValNodePtr vnp1;
+ ValNodePtr vnp2;
+ GlobalDiscrepancyPtr g1, g2;
+
+ if (ptr1 != NULL && ptr2 != NULL) {
+ vnp1 = *((ValNodePtr PNTR) ptr1);
+ vnp2 = *((ValNodePtr PNTR) ptr2);
+ if (vnp1 != NULL && vnp2 != NULL) {
+ g1 = (GlobalDiscrepancyPtr) vnp1->data.ptrvalue;
+ g2 = (GlobalDiscrepancyPtr) vnp2->data.ptrvalue;
+ if (g1 != NULL && g2 != NULL && g1->str != NULL && g2->str != NULL) {
+ return StringICmp (g1->str, g2->str);
+ }
+ }
+ }
+ return 0;
+}
+
+
+static Int4 CountDupGlobalDiscrepancy (ValNodePtr vnp)
+{
+ GlobalDiscrepancyPtr g1, g2;
+ Int4 num_dup = 1;
+
+ if (vnp == NULL
+ || (g1 = (GlobalDiscrepancyPtr) vnp->data.ptrvalue) == NULL
+ || StringHasNoText (g1->str)) {
+ return 0;
+ } else if (vnp->next == NULL) {
+ return 1;
+ }
+ vnp = vnp->next;
+ while (vnp != NULL
+ && (g2 = (GlobalDiscrepancyPtr) vnp->data.ptrvalue) != NULL
+ && StringICmp (g1->str, g2->str) == 0) {
+ num_dup++;
+ vnp = vnp->next;
+ }
+ return num_dup;
+}
+
+
+extern ClickableItemPtr
+ReportNonUniqueGlobalDiscrepancy
+(ValNodePtr vnp,
+ CharPtr label_fmt,
+ CharPtr ind_cat_fmt,
+ Uint4 clickable_item_type,
+ Boolean keep_top_category)
+
+{
+ Boolean print_heading = TRUE;
+ Int4 num_dup, total_dup = 0, i;
+ ValNodePtr item_list;
+ ClickableItemPtr cip = NULL;
+ ValNodePtr subcategories = NULL;
+ CharPtr str;
+
+ while (vnp != NULL) {
+ num_dup = CountDupGlobalDiscrepancy (vnp);
+ if (num_dup > 1) {
+ total_dup += num_dup;
+ str = GetGlobalDiscrepancyStr (vnp->data.ptrvalue);
+ if (str == NULL) str = "";
+ item_list = NULL;
+ i = num_dup;
+ while (i > 0) {
+ ValNodeLink (&item_list, GetGlobalDiscrepancyItem (vnp->data.ptrvalue));
+ vnp = vnp->next;
+ i--;
+ }
+ cip = (ClickableItemPtr) MemNew (sizeof (ClickableItemData));
+ cip->description = (CharPtr) MemNew (sizeof (Char) * (StringLen (ind_cat_fmt) + StringLen (str) + 15));
+ sprintf (cip->description, ind_cat_fmt, num_dup, str);
+ cip->clickable_item_type = clickable_item_type;
+ cip->item_list = item_list;
+ ValNodeAddPointer (&subcategories, 0, cip);
+ } else {
+ vnp = vnp->next;
+ }
+ }
+ if (subcategories != NULL) {
+ if (subcategories->next == NULL && !keep_top_category) {
+ cip = subcategories->data.ptrvalue;
+ subcategories = ValNodeFree (subcategories);
+ } else {
+ cip = (ClickableItemPtr) MemNew (sizeof (ClickableItemData));
+ cip->description = (CharPtr) MemNew (sizeof (Char) * (StringLen (label_fmt) + 15));
+ sprintf (cip->description, label_fmt, total_dup);
+ cip->clickable_item_type = clickable_item_type;
+ cip->subcategories = subcategories;
+ }
+ }
+ return cip;
+}
+
+
+static Boolean IsLocusTagFormatBad (CharPtr locus_tag)
+{
+ CharPtr cp;
+ Boolean after_underscore = FALSE;
+
+ if (StringHasNoText (locus_tag))
+ {
+ return FALSE;
+ }
+
+ cp = locus_tag;
+ if (!isalpha (*cp))
+ {
+ return TRUE;
+ }
+ cp++;
+ while (*cp != 0)
+ {
+ if (*cp == '_')
+ {
+ if (after_underscore)
+ {
+ return TRUE;
+ }
+ else
+ {
+ after_underscore = TRUE;
+ if (*(cp + 1) == 0)
+ {
+ return TRUE;
+ }
+ }
+ }
+ else if (!isalpha (*cp) && !isdigit (*cp))
+ {
+ return TRUE;
+ }
+ cp++;
+ }
+ if (after_underscore)
+ {
+ return FALSE;
+ }
+ else
+ {
+ return TRUE;
+ }
+}
+
+
+extern ClickableItemPtr ReportBadLocusTagFormat (ValNodePtr list)
+{
+ ValNodePtr vnp, item_list = NULL;
+ ClickableItemPtr cip = NULL;
+
+ for (vnp = list; vnp != NULL; vnp = vnp->next) {
+ if (IsLocusTagFormatBad (GetGlobalDiscrepancyStr (vnp->data.ptrvalue))) {
+ ValNodeLink (&item_list, GetGlobalDiscrepancyItem (vnp->data.ptrvalue));
+ }
+ }
+ if (item_list != NULL) {
+ cip = NewClickableItem (DISC_GENE_LOCUS_TAG_BAD_FORMAT, "%d locus tags are incorrectly formatted.", item_list);
+ }
+ return cip;
+}
+
+
+static CharPtr GetGlobalDiscrepancyPrefix (GlobalDiscrepancyPtr g)
+{
+ CharPtr cp, prefix = NULL;
+ Int4 len;
+
+ if (g == NULL) return NULL;
+ cp = StringChr (g->str, '_');
+ if (cp != NULL) {
+ len = cp - g->str;
+ prefix = MemNew (sizeof (Char) * (len + 1));
+ StringNCpy (prefix, g->str, len);
+ prefix[len] = 0;
+ }
+ return prefix;
+}
+
+
+static Int4 CountDupGlobalDiscrepancyPrefix (ValNodePtr vnp)
+{
+ GlobalDiscrepancyPtr g1, g2;
+ CharPtr cp;
+ Int4 len;
+ Int4 num_dup = 1;
+
+ if (vnp == NULL
+ || (g1 = (GlobalDiscrepancyPtr) vnp->data.ptrvalue) == NULL
+ || StringHasNoText (g1->str)
+ || (cp = StringChr (g1->str, '_')) == NULL) {
+ return 0;
+ } else if (vnp->next == NULL) {
+ return 1;
+ }
+ len = cp - g1->str + 1;
+ vnp = vnp->next;
+ while (vnp != NULL
+ && (g2 = (GlobalDiscrepancyPtr) vnp->data.ptrvalue) != NULL
+ && StringNCmp (g1->str, g2->str, len) == 0) {
+ num_dup++;
+ vnp = vnp->next;
+ }
+ return num_dup;
+}
+
+
+extern ValNodePtr ReportInconsistentGlobalDiscrepancyPrefixes
+(ValNodePtr vnp,
+ CharPtr label_fmt,
+ Uint4 clickable_item_type)
+
+{
+ Boolean print_heading = TRUE;
+ Int4 num_dup;
+ CharPtr prefix;
+ ValNodePtr disc_list = NULL;
+ ClickableItemPtr cip;
+
+ if (vnp == NULL) return NULL;
+
+ num_dup = CountDupGlobalDiscrepancyPrefix (vnp);
+ if (num_dup < ValNodeLen (vnp)) {
+ while (vnp != NULL) {
+ prefix = GetGlobalDiscrepancyPrefix (vnp->data.ptrvalue);
+ num_dup = CountDupGlobalDiscrepancyPrefix (vnp);
+ if (num_dup < 1) {
+ vnp = vnp->next;
+ } else if (prefix != NULL) {
+ cip = (ClickableItemPtr) MemNew (sizeof (ClickableItemData));
+ cip->clickable_item_type = clickable_item_type;
+ cip->description = (CharPtr) MemNew (sizeof (Char) * (StringLen (label_fmt) + StringLen (prefix) + 15));
+ sprintf (cip->description, label_fmt, num_dup, prefix);
+ /* skip duplicates without printing */
+ while (num_dup > 0) {
+ ValNodeLink (&cip->item_list, GetGlobalDiscrepancyItem (vnp->data.ptrvalue));
+ vnp = vnp->next;
+ num_dup--;
+ }
+ prefix = MemFree (prefix);
+ ValNodeAddPointer (&disc_list, 0, cip);
+ } else {
+ /* skip items without prefix */
+ while (num_dup > 0) {
+ vnp = vnp->next;
+ num_dup--;
+ }
+ }
+ }
+ }
+ return disc_list;
+}
+
+
+extern ValNodePtr ReportInconsistentGlobalDiscrepancyStrings
+(ValNodePtr vnp,
+ CharPtr label_fmt,
+ Uint4 clickable_item_type)
+
+{
+ Boolean print_heading = TRUE;
+ Int4 num_dup;
+ CharPtr prefix;
+ ValNodePtr disc_list = NULL;
+ ClickableItemPtr cip;
+
+ if (vnp == NULL) return NULL;
+
+ num_dup = CountDupGlobalDiscrepancy (vnp);
+ if (num_dup < ValNodeLen (vnp)) {
+ while (vnp != NULL) {
+ prefix = GetGlobalDiscrepancyStr (vnp->data.ptrvalue);
+ num_dup = CountDupGlobalDiscrepancy (vnp);
+ if (num_dup < 1) {
+ vnp = vnp->next;
+ } else if (prefix != NULL) {
+ cip = (ClickableItemPtr) MemNew (sizeof (ClickableItemData));
+ cip->clickable_item_type = clickable_item_type;
+ cip->description = (CharPtr) MemNew (sizeof (Char) * (StringLen (label_fmt) + StringLen (prefix) + 15));
+ sprintf (cip->description, label_fmt, num_dup, prefix);
+ /* skip duplicates without printing */
+ while (num_dup > 0) {
+ ValNodeLink (&cip->item_list, GetGlobalDiscrepancyItem (vnp->data.ptrvalue));
+ vnp = vnp->next;
+ num_dup--;
+ }
+ ValNodeAddPointer (&disc_list, 0, cip);
+ } else {
+ /* skip items without prefix */
+ while (num_dup > 0) {
+ vnp = vnp->next;
+ num_dup--;
+ }
+ }
+ }
+ }
+ return disc_list;
+}
+
+
+extern ClickableItemPtr ReportMissingFields (ValNodePtr list, CharPtr label_fmt, Uint4 clickable_item_type)
+{
+ ClickableItemPtr cip;
+
+ if (list == NULL) return NULL;
+
+ cip = (ClickableItemPtr) MemNew (sizeof (ClickableItemData));
+ cip->description = (CharPtr) MemNew (sizeof (Char) * (StringLen (label_fmt) + 15));
+ sprintf (cip->description, label_fmt, ValNodeLen (list));
+ cip->clickable_item_type = clickable_item_type;
+ while (list != NULL) {
+ ValNodeLink (&(cip->item_list), GetGlobalDiscrepancyItem (list->data.ptrvalue));
+ list = list->next;
+ }
+ return cip;
+}
+
+
+
+
+
/* declarations for discrepancy tests */
extern void AddMissingAndSuperfluousGeneDiscrepancies (ValNodePtr PNTR discrepancy_list, ValNodePtr sep_list);
extern void AddDiscrepanciesForMissingOrNonUniqueGeneLocusTags (ValNodePtr PNTR discrepancy_list, ValNodePtr sep_list);
@@ -5318,6 +5832,7 @@ extern void FindTranslExceptNotes (ValNodePtr PNTR discrepancy_list, ValNodePtr
extern void FindCDSOverlappingtRNAs (ValNodePtr PNTR discrepancy_list, ValNodePtr sep_list);
extern int LIBCALLBACK SortVnpByClickableItemDescription (VoidPtr ptr1, VoidPtr ptr2);
extern void CountProteins (ValNodePtr PNTR discrepancy_list, ValNodePtr sep_list);
+extern void FindFeaturesOverlappingSrcFeatures (ValNodePtr PNTR discrepancy_list, ValNodePtr sep_list);
/* functions for the missing and superfluous gene tests */
extern Boolean GeneRefMatch (GeneRefPtr grp1, GeneRefPtr grp2)
@@ -5701,7 +6216,7 @@ static ClickableItemPtr InconsistentPrefix (PrefixCheckPtr pcp, CharPtr bad_fmt,
dip = (ClickableItemPtr) MemNew (sizeof (ClickableItemData));
if (dip != NULL)
{
- dip->clickable_item_type = DISC_GENE_LOCUS_TAG_INCONSISTENT_PREFIX;
+ dip->clickable_item_type = disc_type;
dip->description = (CharPtr) MemNew (sizeof (Char) * (StringLen (bad_fmt) + StringLen (pcp->prefix)+ 15));
sprintf (dip->description, bad_fmt, ValNodeLen (pcp->feature_list), pcp->prefix);
dip->callback_func = NULL;
@@ -5714,44 +6229,29 @@ static ClickableItemPtr InconsistentPrefix (PrefixCheckPtr pcp, CharPtr bad_fmt,
}
-static ClickableItemPtr InconsistentLocusTagPrefix (PrefixCheckPtr pcp)
-{
- CharPtr bad_fmt = "%d features have locus tag prefix %s.";
-
- return InconsistentPrefix (pcp, bad_fmt, DISC_GENE_LOCUS_TAG_INCONSISTENT_PREFIX);
-}
-
+extern CharPtr discReportInconsistentLocusTagPrefixFmt = "%d features have locus tag prefix %s.";
+extern CharPtr discReportInconsistentProteinIDPrefixFmt = "%d sequences have protein ID prefix %s.";
+extern CharPtr discReportBadProteinIdFmt = "%d proteins have invalid IDs.";
-static ClickableItemPtr InconsistentProteinIDPrefix (PrefixCheckPtr pcp)
+static ClickableItemPtr InconsistentLocusTagPrefix (PrefixCheckPtr pcp)
{
- CharPtr bad_fmt = "%d sequences have protein ID prefix %s.";
-
- return InconsistentPrefix (pcp, bad_fmt, DISC_INCONSISTENT_PROTEIN_ID_PREFIX);
+ return InconsistentPrefix (pcp, discReportInconsistentLocusTagPrefixFmt, DISC_GENE_LOCUS_TAG_INCONSISTENT_PREFIX);
}
-typedef struct missinconstprotids
+extern void FindProteinIDCallback (BioseqPtr bsp, Pointer userdata)
{
- ValNodePtr missing_list;
- ValNodePtr inconsistent_list;
-} MissInconstProtIDsData, PNTR MissInconstProtIDsPtr;
-
+ ProtIdListsPtr pip;
+ SeqIdPtr sip;
+ DbtagPtr dbt = NULL;
-static void FindMissingAndInconsistentProteinIDsCallback (BioseqPtr bsp, Pointer userdata)
-{
- SeqIdPtr sip;
- MissInconstProtIDsPtr mipip;
- DbtagPtr dbt = NULL;
- PrefixCheckPtr pcp;
- ValNodePtr vnp;
-
if (bsp == NULL || ! ISA_aa (bsp->mol) || userdata == NULL)
{
return;
}
-
- mipip = (MissInconstProtIDsPtr) userdata;
-
+
+ pip = (ProtIdListsPtr) userdata;
+
for (sip = bsp->id; sip != NULL && dbt == NULL; sip = sip->next)
{
if (sip->choice == SEQID_GENERAL)
@@ -5765,90 +6265,47 @@ static void FindMissingAndInconsistentProteinIDsCallback (BioseqPtr bsp, Pointer
}
if (dbt == NULL)
{
- ValNodeAddPointer (&(mipip->missing_list), OBJ_BIOSEQ, bsp);
+ ValNodeAddPointer (&(pip->missing_gnl_list), 0, GlobalDiscrepancyNew (NULL, OBJ_BIOSEQ, bsp));
}
else
{
- /* look for inconsistent prefixes */
- pcp = NULL;
- for (vnp = mipip->inconsistent_list; vnp != NULL && pcp == NULL; vnp = vnp->next)
- {
- pcp = (PrefixCheckPtr) vnp->data.ptrvalue;
- if (pcp != NULL && StringCmp (pcp->prefix, dbt->db) == 0)
- {
- ValNodeAddPointer (&pcp->feature_list, OBJ_BIOSEQ, bsp);
- }
- else
- {
- pcp = NULL;
- }
- }
- if (pcp == NULL)
- {
- pcp = (PrefixCheckPtr) MemNew (sizeof (PrefixCheckData));
- if (pcp != NULL)
- {
- pcp->prefix = StringSave (dbt->db);
- pcp->feature_list = ValNodeNew (NULL);
- pcp->feature_list->choice = OBJ_BIOSEQ;
- pcp->feature_list->data.ptrvalue = bsp;
- pcp->feature_list->next = NULL;
- ValNodeAddPointer (&(mipip->inconsistent_list), 0, pcp);
- }
- }
- }
+ ValNodeAddPointer (&(pip->gnl_list), 0, GlobalDiscrepancyNew (dbt->db, OBJ_BIOSEQ, bsp));
+ }
}
+
extern void FindMissingProteinIDs (ValNodePtr PNTR discrepancy_list, ValNodePtr sep_list)
{
- CharPtr bad_fmt = "%d proteins have invalid IDs.";
- ClickableItemPtr dip;
- MissInconstProtIDsData mipid;
- ValNodePtr vnp;
+ ClickableItemPtr dip;
+ ProtIdListsData pid;
+ ValNodePtr vnp;
if (discrepancy_list == NULL) return;
- mipid.missing_list = NULL;
- mipid.inconsistent_list = NULL;
+ MemSet (&pid, 0, sizeof (ProtIdListsData));
for (vnp = sep_list; vnp != NULL; vnp = vnp->next) {
- VisitBioseqsInSep (vnp->data.ptrvalue, &mipid, FindMissingAndInconsistentProteinIDsCallback);
+ VisitBioseqsInSep (vnp->data.ptrvalue, &pid, FindProteinIDCallback);
}
- if (mipid.missing_list != NULL)
+ if (pid.missing_gnl_list != NULL)
{
- dip = (ClickableItemPtr) MemNew (sizeof (ClickableItemData));
- if (dip != NULL)
- {
- dip->clickable_item_type = DISC_MISSING_PROTEIN_ID;
- dip->description = (CharPtr) MemNew (sizeof (Char) * (StringLen (bad_fmt) + 15));
- sprintf (dip->description, bad_fmt, ValNodeLen (mipid.missing_list));
- dip->callback_func = NULL;
- dip->callback_data = NULL;
- dip->datafree_func = NULL;
- dip->item_list = mipid.missing_list;
+ dip = ReportMissingFields (pid.missing_gnl_list, discReportBadProteinIdFmt, DISC_MISSING_PROTEIN_ID);
+ if (dip != NULL) {
ValNodeAddPointer (discrepancy_list, 0, dip);
}
+ pid.missing_gnl_list = FreeGlobalDiscrepancyList (pid.missing_gnl_list);
}
-
-
- if (mipid.inconsistent_list != NULL)
+ if (pid.gnl_list != NULL)
{
- if (mipid.inconsistent_list->next != NULL)
- {
- for (vnp = mipid.inconsistent_list; vnp != NULL; vnp = vnp->next)
- {
- dip = InconsistentProteinIDPrefix (vnp->data.ptrvalue);
- if (dip != NULL)
- {
- ValNodeAddPointer (discrepancy_list, 0, dip);
- }
- }
- }
- mipid.inconsistent_list = FreePrefixCheckList (mipid.inconsistent_list);
- }
-
+ pid.gnl_list = ValNodeSort (pid.gnl_list, SortVnpByGlobalDiscrepancyString);
+ ValNodeLink (discrepancy_list,
+ ReportInconsistentGlobalDiscrepancyStrings (pid.gnl_list,
+ discReportInconsistentProteinIDPrefixFmt,
+ DISC_INCONSISTENT_PROTEIN_ID_PREFIX));
+ pid.gnl_list = FreeGlobalDiscrepancyList (pid.gnl_list);
+ }
}
@@ -5856,9 +6313,6 @@ typedef struct locustagcheck
{
ValNodePtr locus_tags_list;
ValNodePtr missing_list;
- ValNodePtr duplicate_list;
- ValNodePtr bad_format_list;
- ValNodePtr inconsistent_prefix;
} LocusTagCheckData, PNTR LocusTagCheckPtr;
static void GeneLocusTagDiscrepancyCallback (ValNodePtr item_list, Pointer userdata)
@@ -5866,46 +6320,39 @@ static void GeneLocusTagDiscrepancyCallback (ValNodePtr item_list, Pointer userd
Message (MSG_OK, "I could launch the editor for the individual gene...");
}
-static Boolean IsLocusTagFormatBad (CharPtr locus_tag)
+static void CheckGeneLocusTag (SeqFeatPtr sfp, Pointer userdata)
{
- CharPtr cp;
- Boolean after_underscore = FALSE;
+ GeneRefPtr grp;
+ LocusTagCheckPtr ltcp;
- if (StringHasNoText (locus_tag))
+ if (sfp == NULL || userdata == NULL || sfp->data.choice != SEQFEAT_GENE || sfp->data.value.ptrvalue == NULL)
{
- return FALSE;
+ return;
}
- cp = locus_tag;
- if (!isalpha (*cp))
- {
- return TRUE;
+ ltcp = (LocusTagCheckPtr) userdata;
+
+ grp = (GeneRefPtr) sfp->data.value.ptrvalue;
+ if (grp != NULL) {
+ if (grp->pseudo) return;
+ if (StringDoesHaveText (grp->locus_tag)) {
+ ValNodeAddPointer (&(ltcp->locus_tags_list), 0,
+ GlobalDiscrepancyNew (grp->locus_tag, OBJ_SEQFEAT, sfp));
+ } else {
+ ValNodeAddPointer (&(ltcp->missing_list), 0,
+ GlobalDiscrepancyNew (NULL, OBJ_SEQFEAT, sfp));
+ }
}
- cp++;
- while (*cp != 0)
+
+}
+
+static Boolean AlreadyInList (ValNodePtr vnp, SeqFeatPtr sfp)
+{
+ while (vnp != NULL && vnp->data.ptrvalue != sfp)
{
- if (*cp == '_')
- {
- if (after_underscore)
- {
- return TRUE;
- }
- else
- {
- after_underscore = TRUE;
- if (*(cp + 1) == 0)
- {
- return TRUE;
- }
- }
- }
- else if (!isalpha (*cp) && !isdigit (*cp))
- {
- return TRUE;
- }
- cp++;
+ vnp = vnp->next;
}
- if (after_underscore)
+ if (vnp == NULL)
{
return FALSE;
}
@@ -5915,288 +6362,215 @@ static Boolean IsLocusTagFormatBad (CharPtr locus_tag)
}
}
-static CharPtr GetLocusTagPrefix (CharPtr locus_tag)
+
+static SeqFeatPtr GetNextGene (SeqFeatPtr sfp)
{
- Int4 prefix_len;
- CharPtr prefix;
-
- if (StringHasNoText (locus_tag))
- {
- return NULL;
- }
-
- prefix_len = StringCSpn (locus_tag, "_");
- if (prefix_len == 0 || prefix_len == StringLen (locus_tag))
- {
- return NULL;
- }
- else
+ BioseqPtr bsp;
+ SeqFeatPtr sfp_next;
+ SeqMgrFeatContext fcontext;
+
+ if (sfp == NULL || sfp->data.choice != SEQFEAT_GENE) return NULL;
+
+ bsp = BioseqFindFromSeqLoc (sfp->location);
+ if (bsp == NULL) return NULL;
+ /* initialize fcontext for search */
+ sfp_next = SeqMgrGetNextFeature (bsp, NULL, SEQFEAT_GENE, FEATDEF_GENE, &fcontext);
+ while (sfp_next != sfp && sfp_next != NULL)
{
- prefix = (CharPtr) MemNew ((prefix_len + 1) * sizeof (Char));
- StringNCpy (prefix, locus_tag, prefix_len);
- prefix [prefix_len] = 0;
- return prefix;
+ sfp_next = SeqMgrGetNextFeature (bsp, sfp_next, SEQFEAT_GENE, FEATDEF_GENE, &fcontext);
}
+ if (sfp_next != sfp) return NULL;
+
+ sfp_next = SeqMgrGetNextFeature (bsp, sfp, SEQFEAT_GENE, FEATDEF_GENE, &fcontext);
+ return sfp_next;
}
-static void CheckGeneLocusTag (SeqFeatPtr sfp, Pointer userdata)
+
+static ValNodePtr FindValNodeForGlobalDiscrepancyFeature (ValNodePtr start_search, Int4 len_search, SeqFeatPtr sfp)
{
- GeneRefPtr grp, dup_grp;
- LocusTagCheckPtr ltcp;
- ValNodePtr vnp;
- Boolean found_duplicate;
- SeqFeatPtr dup_sfp = NULL;
- CharPtr prefix;
- PrefixCheckPtr pcp;
-
- if (sfp == NULL || userdata == NULL || sfp->data.choice != SEQFEAT_GENE || sfp->data.value.ptrvalue == NULL)
- {
- return;
- }
-
- ltcp = (LocusTagCheckPtr) userdata;
-
- grp = (GeneRefPtr) sfp->data.value.ptrvalue;
- if (StringHasNoText (grp->locus_tag))
- {
- ValNodeAddPointer (&(ltcp->missing_list), OBJ_SEQFEAT, sfp);
- }
- else
- {
- /* look for badly formatted locus tags */
- if (IsLocusTagFormatBad (grp->locus_tag))
- {
- ValNodeAddPointer (&(ltcp->bad_format_list), OBJ_SEQFEAT, sfp);
- }
-
- /* look for inconsistent locus tag prefixes */
- prefix = GetLocusTagPrefix (grp->locus_tag);
- if (prefix != NULL)
- {
- pcp = NULL;
- for (vnp = ltcp->inconsistent_prefix; vnp != NULL && pcp == NULL; vnp = vnp->next)
- {
- pcp = (PrefixCheckPtr) vnp->data.ptrvalue;
- if (pcp != NULL && StringCmp (pcp->prefix, prefix) == 0)
- {
- ValNodeAddPointer (&pcp->feature_list, OBJ_SEQFEAT, sfp);
- prefix = MemFree (prefix);
- }
- else
- {
- pcp = NULL;
- }
- }
- if (pcp == NULL)
- {
- pcp = (PrefixCheckPtr) MemNew (sizeof (PrefixCheckData));
- if (pcp != NULL)
- {
- pcp->prefix = prefix;
- pcp->feature_list = ValNodeNew (NULL);
- pcp->feature_list->choice = OBJ_SEQFEAT;
- pcp->feature_list->data.ptrvalue = sfp;
- pcp->feature_list->next = NULL;
- ValNodeAddPointer (&(ltcp->inconsistent_prefix), 0, pcp);
- }
- }
+ GlobalDiscrepancyPtr g;
+
+ while (start_search != NULL && len_search > 0) {
+ g = (GlobalDiscrepancyPtr) start_search->data.ptrvalue;
+ if (g != NULL && g->data_choice == OBJ_SEQFEAT && g->data == sfp) {
+ return start_search;
+ } else {
+ start_search = start_search->next;
+ len_search--;
}
-
+ }
+ return NULL;
+}
+
+
+static ValNodePtr FindAdjacentGenesInSubList (ValNodePtr sub_list, Int4 list_len)
+{
+ GlobalDiscrepancyPtr g;
+ SeqFeatPtr sfp, sfp_next;
+ ValNodePtr vnp, found_match, adj_list = NULL;
+ Int4 len;
- dup_sfp = NULL;
- for (vnp = ltcp->locus_tags_list, found_duplicate = FALSE;
- vnp != NULL && !found_duplicate;
- vnp = vnp->next)
- {
- dup_sfp = (SeqFeatPtr) vnp->data.ptrvalue;
- if (dup_sfp != NULL && dup_sfp->data.choice == SEQFEAT_GENE)
- {
- dup_grp = (GeneRefPtr) dup_sfp->data.value.ptrvalue;
- if (dup_grp != NULL && StringCmp (dup_grp->locus_tag, grp->locus_tag) == 0)
- {
- found_duplicate = TRUE;
- if (vnp->choice != 0)
- {
- dup_sfp = NULL;
- }
- else
- {
+ vnp = sub_list;
+ len = list_len;
+ while (vnp != NULL && len > 0) {
+ g = (GlobalDiscrepancyPtr) vnp->data.ptrvalue;
+ if (g->data_choice == OBJ_SEQFEAT && g->data != NULL) {
+ sfp = g->data;
+ sfp_next = GetNextGene (sfp);
+ if (sfp_next != NULL) {
+ found_match = FindValNodeForGlobalDiscrepancyFeature (sub_list, list_len, sfp_next);
+ if (found_match != NULL) {
+ if (vnp->choice == 0) {
+ ValNodeAddPointer (&adj_list, OBJ_SEQFEAT, sfp);
vnp->choice = 1;
}
- }
- else
- {
- dup_sfp = NULL;
+ if (found_match->choice == 0) {
+ ValNodeAddPointer (&adj_list, OBJ_SEQFEAT, sfp_next);
+ found_match->choice = 1;
+ }
}
}
- else
- {
- dup_sfp = NULL;
- }
- }
- if (!found_duplicate)
- {
- ValNodeAddPointer (&(ltcp->locus_tags_list), 0, sfp);
- }
- else
- {
- if (dup_sfp != NULL)
- {
- ValNodeAddPointer (&(ltcp->duplicate_list), OBJ_SEQFEAT, dup_sfp);
- }
- ValNodeAddPointer (&(ltcp->duplicate_list), OBJ_SEQFEAT, sfp);
}
+ vnp = vnp->next;
+ len --;
+ }
+ /* set choices back to zero */
+ for (vnp = sub_list, len = 0; vnp != NULL && len < list_len; vnp = vnp->next, len++) {
+ vnp->choice = 0;
}
+ return adj_list;
}
+
-static Boolean AlreadyInList (ValNodePtr vnp, SeqFeatPtr sfp)
+extern ClickableItemPtr FindAdjacentDuplicateLocusTagGenes (ValNodePtr locus_tag_list)
{
- while (vnp != NULL && vnp->data.ptrvalue != sfp)
- {
- vnp = vnp->next;
- }
- if (vnp == NULL)
- {
- return FALSE;
+ ValNodePtr vnp, adjacent_list = NULL;
+ ClickableItemPtr cip = NULL;
+ Int4 num_dup;
+ CharPtr duplicate_adjacent_fmt = "%d genes are adjacent to another gene with the same locus tag.";
+
+ vnp = locus_tag_list;
+ while (vnp != NULL) {
+ num_dup = CountDupGlobalDiscrepancy (vnp);
+ if (num_dup > 1) {
+ ValNodeLink (&adjacent_list, FindAdjacentGenesInSubList (vnp, num_dup));
+ while (num_dup > 0) {
+ vnp = vnp->next;
+ num_dup--;
+ }
+ } else {
+ vnp = vnp->next;
+ }
}
- else
- {
- return TRUE;
+
+ if (adjacent_list != NULL) {
+ cip = NewClickableItem (DISC_GENE_DUPLICATE_LOCUS_TAG, duplicate_adjacent_fmt, adjacent_list);
}
+ return cip;
}
-static ValNodePtr FindAdjacentDuplicateLocusTagGenes (ValNodePtr duplicate_list)
+NLM_EXTERN ValNodePtr ValNodeDupStringList (ValNodePtr vnp)
{
- ValNodePtr vnp, adjacent_list = NULL;
- SeqFeatPtr sfp, sfp_next;
- BioseqPtr bsp;
- SeqMgrFeatContext fcontext;
- GeneRefPtr grp, grp_next;
+ ValNodePtr cpy = NULL, last = NULL, tmp;
- for (vnp = duplicate_list; vnp != NULL; vnp = vnp->next)
+ while (vnp != NULL)
{
- sfp = (SeqFeatPtr) vnp->data.ptrvalue;
- if (sfp != NULL && sfp->data.choice == SEQFEAT_GENE && sfp->data.value.ptrvalue != NULL)
+ tmp = ValNodeNew (NULL);
+ tmp->choice = vnp->choice;
+ tmp->data.ptrvalue = StringSave (vnp->data.ptrvalue);
+ if (last == NULL)
{
- bsp = BioseqFindFromSeqLoc (sfp->location);
- if (bsp == NULL) continue;
- /* initialize fcontext for search */
- sfp_next = SeqMgrGetNextFeature (bsp, NULL, SEQFEAT_GENE, FEATDEF_GENE, &fcontext);
- while (sfp_next != sfp && sfp_next != NULL)
- {
- sfp_next = SeqMgrGetNextFeature (bsp, sfp_next, SEQFEAT_GENE, FEATDEF_GENE, &fcontext);
- }
- if (sfp_next != sfp) continue;
+ cpy = tmp;
+ }
+ else
+ {
+ last->next = tmp;
+ }
+ last = tmp;
+ vnp = vnp->next;
+ }
+ return cpy;
+}
+
- sfp_next = SeqMgrGetNextFeature (bsp, sfp, SEQFEAT_GENE, FEATDEF_GENE, &fcontext);
- if (sfp_next != NULL && sfp_next->data.choice == SEQFEAT_GENE && sfp_next->data.value.ptrvalue != NULL)
- {
- grp = sfp->data.value.ptrvalue;
- grp_next = sfp_next->data.value.ptrvalue;
- if (StringCmp (grp->locus_tag, grp_next->locus_tag) == 0 && !StringHasNoText (grp->locus_tag))
- {
- if (!AlreadyInList (adjacent_list, sfp))
- {
- ValNodeAddPointer (&adjacent_list, OBJ_SEQFEAT, sfp);
- }
- if (!AlreadyInList (adjacent_list, sfp_next))
- {
- ValNodeAddPointer (&adjacent_list, OBJ_SEQFEAT, sfp_next);
- }
- }
- }
+NLM_EXTERN ValNodePtr FindBadLocusTagsInList (ValNodePtr list)
+{
+ ValNodePtr bad_list = NULL, list_copy;
+ Boolean reported_last = FALSE;
+ ValNodePtr vnp;
+
+ list_copy = ValNodeDupStringList (list);
+ list_copy = ValNodeSort (list_copy, SortVnpByString);
+
+ for (vnp = list_copy; vnp != NULL; vnp = vnp->next) {
+ /* look for badly formatted locus tags */
+ if (IsLocusTagFormatBad (vnp->data.ptrvalue)) {
+ ValNodeAddPointer(&bad_list, eLocusTagErrorBadFormat, StringSave (vnp->data.ptrvalue));
}
}
- return adjacent_list;
+ list_copy = ValNodeFreeData (list_copy);
+ return bad_list;
}
+extern CharPtr discReportDuplicateLocusTagFmt = "%d genes have duplicate locus tags.";
+extern CharPtr discReportOneDuplicateLocusTagFmt = "%d genes have locus tag %s.";
+extern CharPtr discReportMissingLocusTags = "%d genes have no locus tags.";
+
extern void AddDiscrepanciesForMissingOrNonUniqueGeneLocusTags (ValNodePtr PNTR discrepancy_list, ValNodePtr sep_list)
{
LocusTagCheckData ltcd;
- ClickableItemPtr dip = NULL;
- CharPtr missing_fmt = "%d genes have no locus tags.";
- CharPtr duplicate_fmt = "%d genes have duplicate locus tags.";
- CharPtr duplicate_adjacent_fmt = "%d genes are adjacent to another gene with the same locus tag.";
+ ClickableItemPtr dip = NULL, dip_sub;
+ ValNodePtr duplicate_list = NULL;
CharPtr bad_fmt = "%d locus tags are incorrectly formatted.";
- ValNodePtr vnp, adjacent_list = NULL;
+ ValNodePtr vnp;
if (discrepancy_list == NULL) return;
ltcd.locus_tags_list = NULL;
ltcd.missing_list = NULL;
- ltcd.duplicate_list = NULL;
- ltcd.bad_format_list = NULL;
- ltcd.inconsistent_prefix = NULL;
for (vnp = sep_list; vnp != NULL; vnp = vnp->next) {
- VisitFeaturesInSep (vnp->data.ptrvalue, &ltcd, CheckGeneLocusTag);
+ VisitGenProdSetFeatures (vnp->data.ptrvalue, &ltcd, CheckGeneLocusTag);
}
- ltcd.locus_tags_list = ValNodeFree (ltcd.locus_tags_list);
- if (ltcd.missing_list != NULL)
- {
- dip = (ClickableItemPtr) MemNew (sizeof (ClickableItemData));
- if (dip != NULL)
- {
- dip->clickable_item_type = DISC_GENE_MISSING_LOCUS_TAG;
- dip->description = (CharPtr) MemNew (sizeof (Char) * (StringLen (missing_fmt) + 15));
- sprintf (dip->description, missing_fmt, ValNodeLen (ltcd.missing_list));
- dip->callback_func = NULL;
- dip->datafree_func = NULL;
- dip->callback_data = NULL;
- dip->item_list = ltcd.missing_list;
+ if (ltcd.locus_tags_list != NULL) {
+ ltcd.locus_tags_list = ValNodeSort (ltcd.locus_tags_list, SortVnpByGlobalDiscrepancyString);
+ ltcd.missing_list = ValNodeSort (ltcd.missing_list, SortVnpByGlobalDiscrepancyString);
+
+ if (ltcd.missing_list != NULL) {
+ dip = ReportMissingFields (ltcd.missing_list, discReportMissingLocusTags, DISC_GENE_MISSING_LOCUS_TAG);
+ if (dip != NULL) {
+ ValNodeAddPointer (discrepancy_list, 0, dip);
+ }
+ }
+ dip = ReportNonUniqueGlobalDiscrepancy (ltcd.locus_tags_list,
+ discReportDuplicateLocusTagFmt,
+ discReportOneDuplicateLocusTagFmt,
+ DISC_GENE_DUPLICATE_LOCUS_TAG,
+ FALSE);
+ if (dip != NULL) {
+ dip_sub = FindAdjacentDuplicateLocusTagGenes (ltcd.locus_tags_list);
+ if (dip_sub != NULL) {
+ ValNodeAddPointer (&(dip->subcategories), 0, dip_sub);
+ }
ValNodeAddPointer (discrepancy_list, 0, dip);
}
- }
-
- if (ltcd.duplicate_list != NULL)
- {
- adjacent_list = FindAdjacentDuplicateLocusTagGenes (ltcd.duplicate_list);
- dip = NewClickableItem (DISC_GENE_DUPLICATE_LOCUS_TAG, duplicate_fmt, ltcd.duplicate_list);
- if (dip != NULL)
- {
- ValNodeAddPointer (discrepancy_list, 0, dip);
-
- if (adjacent_list != NULL)
- {
- ValNodeAddPointer (&(dip->subcategories), 0, NewClickableItem (DISC_GENE_DUPLICATE_LOCUS_TAG, duplicate_adjacent_fmt, adjacent_list));
- }
- }
- }
-
- if (ltcd.bad_format_list != NULL)
- {
- dip = (ClickableItemPtr) MemNew (sizeof (ClickableItemData));
- if (dip != NULL)
- {
- dip->clickable_item_type = DISC_GENE_LOCUS_TAG_BAD_FORMAT;
- dip->description = (CharPtr) MemNew (sizeof (Char) * (StringLen (bad_fmt) + 15));
- sprintf (dip->description, bad_fmt, ValNodeLen (ltcd.bad_format_list));
- dip->callback_func = NULL;
- dip->datafree_func = NULL;
- dip->callback_data = NULL;
- dip->item_list = ltcd.bad_format_list;
+ /* inconsistent locus tags */
+ ValNodeLink (discrepancy_list,
+ ReportInconsistentGlobalDiscrepancyPrefixes (ltcd.locus_tags_list,
+ discReportInconsistentLocusTagPrefixFmt,
+ DISC_GENE_LOCUS_TAG_INCONSISTENT_PREFIX));
+ /* bad formats */
+ dip = ReportBadLocusTagFormat (ltcd.locus_tags_list);
+ if (dip != NULL) {
ValNodeAddPointer (discrepancy_list, 0, dip);
}
}
-
- if (ltcd.inconsistent_prefix != NULL)
- {
- if (ltcd.inconsistent_prefix->next != NULL)
- {
- for (vnp = ltcd.inconsistent_prefix; vnp != NULL; vnp = vnp->next)
- {
- dip = InconsistentLocusTagPrefix (vnp->data.ptrvalue);
- if (dip != NULL)
- {
- ValNodeAddPointer (discrepancy_list, 0, dip);
- }
- }
- }
- ltcd.inconsistent_prefix = FreePrefixCheckList (ltcd.inconsistent_prefix);
- }
+
+ ltcd.locus_tags_list = FreeGlobalDiscrepancyList (ltcd.locus_tags_list);
+ ltcd.missing_list = FreeGlobalDiscrepancyList (ltcd.missing_list);
}
static void AddDiscrepancyForNonGeneLocusTag (SeqFeatPtr sfp, Pointer userdata)
@@ -6353,7 +6727,7 @@ CheckFeatureTypeForLocationDiscrepancies
SeqFeatPtr sfp, gene_sfp;
Boolean found_match;
- if (bsp == NULL || ISA_aa (bsp->mol) || discrepancy_list == NULL)
+ if (bsp == NULL || ISA_aa (bsp->mol) || discrepancy_list == NULL || IsmRNASequenceInGenProdSet(bsp))
{
return;
}
@@ -6574,7 +6948,7 @@ extern void FindCDSGeneProductConflicts (ValNodePtr PNTR discrepancy_list, ValNo
ValNodePtr item_list = NULL, cds_vnp;
for (vnp = sep_list; vnp != NULL; vnp = vnp->next) {
- VisitFeaturesInSep (vnp->data.ptrvalue, &cds_list, FindCDSGeneProductConflictsCallback);
+ VisitGenProdSetFeatures (vnp->data.ptrvalue, &cds_list, FindCDSGeneProductConflictsCallback);
}
/* remove CDSs without conflicts */
@@ -6715,7 +7089,7 @@ extern void FindDuplicateGeneLocus (ValNodePtr PNTR discrepancy_list, ValNodePtr
ClickableItemPtr dip;
for (vnp = sep_list; vnp != NULL; vnp = vnp->next) {
- VisitFeaturesInSep (vnp->data.ptrvalue, &gene_list, DuplicateGeneLocusCallback);
+ VisitGenProdSetFeatures (vnp->data.ptrvalue, &gene_list, DuplicateGeneLocusCallback);
}
/* remove Genes without conflicts */
@@ -7361,6 +7735,8 @@ typedef struct cdsrnaoverlap {
ValNodePtr cds_in_rna;
ValNodePtr rna_in_cds;
ValNodePtr exact_match;
+ ValNodePtr overlap_same_strand;
+ ValNodePtr overlap_opp_strand;
ValNodePtr overlap;
ValNodePtr all;
} CDSRNAOverlapData, PNTR CDSRNAOverlapPtr;
@@ -7372,6 +7748,7 @@ static void FindCDSRNAOverlaps (BioseqPtr bsp, Pointer data)
ValNodePtr rna_list = NULL, vnp;
SeqMgrFeatContext fcontext;
Int2 cmp;
+ Uint1 strand1, strand2;
if (bsp == NULL || data == NULL) return;
@@ -7418,6 +7795,19 @@ static void FindCDSRNAOverlaps (BioseqPtr bsp, Pointer data)
}
else if (cmp != SLC_NO_MATCH)
{
+ strand1 = SeqLocStrand (sfp->location);
+ strand2 = SeqLocStrand (rna->location);
+ if ((strand1 == Seq_strand_minus && strand2 != Seq_strand_minus)
+ || (strand2 == Seq_strand_minus && strand1 != Seq_strand_minus))
+ {
+ ValNodeAddPointer (&(p->overlap_opp_strand), OBJ_SEQFEAT, sfp);
+ ValNodeAddPointer (&(p->overlap_opp_strand), OBJ_SEQFEAT, rna);
+ }
+ else
+ {
+ ValNodeAddPointer (&(p->overlap_same_strand), OBJ_SEQFEAT, sfp);
+ ValNodeAddPointer (&(p->overlap_same_strand), OBJ_SEQFEAT, rna);
+ }
ValNodeAddPointer (&(p->overlap), OBJ_SEQFEAT, sfp);
ValNodeAddPointer (&(p->overlap), OBJ_SEQFEAT, rna);
ValNodeAddPointer (&(p->all), OBJ_SEQFEAT, sfp);
@@ -7436,7 +7826,7 @@ static ClickableItemPtr DiscrepancyForPairs (Uint4 item_type, CharPtr bad_fmt, V
if (StringHasNoText (bad_fmt)) return NULL;
dip = (ClickableItemPtr) MemNew (sizeof (ClickableItemData));
- dip->clickable_item_type = DISC_RNA_CDS_OVERLAP;
+ dip->clickable_item_type = item_type;
dip->item_list = item_list;
num_feat = ValNodeLen (dip->item_list) / 2;
dip->description = (CharPtr) MemNew (sizeof (Char) * (StringLen (bad_fmt) + 15));
@@ -7447,8 +7837,8 @@ static ClickableItemPtr DiscrepancyForPairs (Uint4 item_type, CharPtr bad_fmt, V
extern void AddRNACDSOverlapDiscrepancies (ValNodePtr PNTR discrepancy_list, ValNodePtr sep_list)
{
- ClickableItemPtr dip;
- ValNodePtr overlap_feat = NULL, vnp;
+ ClickableItemPtr dip, overlap_dip;
+ ValNodePtr vnp;
CDSRNAOverlapData d;
if (discrepancy_list == NULL)
@@ -7487,10 +7877,22 @@ extern void AddRNACDSOverlapDiscrepancies (ValNodePtr PNTR discrepancy_list, Val
}
if (d.overlap != NULL)
{
- ValNodeAddPointer (&(dip->subcategories), 0,
- DiscrepancyForPairs (DISC_RNA_CDS_OVERLAP,
- "%d coding regions overlap RNAs (no containment)",
- d.overlap));
+ overlap_dip = DiscrepancyForPairs (DISC_RNA_CDS_OVERLAP,
+ "%d coding regions overlap RNAs (no containment)",
+ d.overlap);
+ if (d.overlap_same_strand != NULL) {
+ ValNodeAddPointer (&(overlap_dip->subcategories), 0,
+ DiscrepancyForPairs (DISC_RNA_CDS_OVERLAP,
+ "%d coding regions overlap RNAs on the same strand (no containment)",
+ d.overlap_same_strand));
+ }
+ if (d.overlap_same_strand != NULL) {
+ ValNodeAddPointer (&(overlap_dip->subcategories), 0,
+ DiscrepancyForPairs (DISC_RNA_CDS_OVERLAP,
+ "%d coding regions overlap RNAs on the opposite strand (no containment)",
+ d.overlap_opp_strand));
+ }
+ ValNodeAddPointer (&(dip->subcategories), 0, overlap_dip);
}
ValNodeAddPointer (discrepancy_list, 0, dip);
@@ -7502,8 +7904,11 @@ static void FindShortContigsCallback (BioseqPtr bsp, Pointer userdata)
{
ValNodePtr PNTR bioseq_list;
- if (bsp == NULL || !ISA_na (bsp->mol) || userdata == NULL || bsp->length >= 200)
- {
+ if (bsp == NULL || !ISA_na (bsp->mol) || userdata == NULL || bsp->length >= 200) {
+ return;
+ }
+
+ if (IsmRNASequenceInGenProdSet (bsp)) {
return;
}
@@ -7546,7 +7951,8 @@ static void FindShortSequencesCallback (BioseqPtr bsp, Pointer userdata)
ValNodePtr PNTR bioseq_list;
BioseqSetPtr bssp;
- if (bsp == NULL || !ISA_na (bsp->mol) || userdata == NULL || bsp->length >= 50)
+ if (bsp == NULL || !ISA_na (bsp->mol) || userdata == NULL || bsp->length >= 50
+ || IsmRNASequenceInGenProdSet (bsp))
{
return;
}
@@ -7809,7 +8215,7 @@ static CharPtr suspect_product_names[] =
"ttg start",
"domain protein domain protein",
"deletion",
-"truncated"
+"truncat"
};
const int num_suspect_product_names = sizeof (suspect_product_names) / sizeof (CharPtr);
@@ -8018,7 +8424,7 @@ static void FindSuspectProductNamesCallback (SeqFeatPtr sfp, Pointer userdata)
}
-static ClickableItemPtr SuspectPhrase (CharPtr phrase, CharPtr feat_type, ValNodePtr feature_list)
+static ClickableItemPtr SuspectPhrase (Uint4 clickable_item_type, CharPtr phrase, CharPtr feat_type, ValNodePtr feature_list)
{
ClickableItemPtr dip = NULL;
CharPtr bad_fmt = "%d %ss contain %s";
@@ -8031,7 +8437,7 @@ static ClickableItemPtr SuspectPhrase (CharPtr phrase, CharPtr feat_type, ValNod
dip = (ClickableItemPtr) MemNew (sizeof (ClickableItemData));
if (dip != NULL)
{
- dip->clickable_item_type = DISC_SUSPECT_PRODUCT_NAME;
+ dip->clickable_item_type = clickable_item_type;
dip->description = (CharPtr) MemNew (sizeof (Char) * (StringLen (bad_fmt) + StringLen (phrase) + StringLen (feat_type) + 15));
sprintf (dip->description, bad_fmt, ValNodeLen (feature_list), feat_type, phrase);
dip->callback_func = NULL;
@@ -8063,14 +8469,14 @@ extern void FindSuspectProductNames (ValNodePtr PNTR discrepancy_list, ValNodePt
for (vnp = sep_list; vnp != NULL; vnp = vnp->next)
{
- VisitFeaturesInSep (vnp->data.ptrvalue, feature_list, FindSuspectProductNamesCallback);
+ VisitGenProdSetFeatures (vnp->data.ptrvalue, feature_list, FindSuspectProductNamesCallback);
}
for (k = 0; k < num_suspect_product_names; k++)
{
if (feature_list[k] != NULL)
{
- dip = SuspectPhrase (suspect_product_names[k], "product name", feature_list[k]);
+ dip = SuspectPhrase (DISC_SUSPECT_PRODUCT_NAME, suspect_product_names[k], "product name", feature_list[k]);
if (dip != NULL)
{
ValNodeAddPointer (&subcategories, 0, dip);
@@ -8081,7 +8487,7 @@ extern void FindSuspectProductNames (ValNodePtr PNTR discrepancy_list, ValNodePt
if (master_list != NULL)
{
- dip = SuspectPhrase ("suspect phrase or characters", "product_name", master_list);
+ dip = SuspectPhrase (DISC_SUSPECT_PRODUCT_NAME, "suspect phrase or characters", "product_name", master_list);
if (dip != NULL)
{
dip->subcategories = subcategories;
@@ -8146,7 +8552,7 @@ extern void FindSuspectPhrases (ValNodePtr PNTR discrepancy_list, ValNodePtr sep
VisitFeaturesInSep (vnp->data.ptrvalue, &feature_list, FindSuspectPhrasesCallback);
}
- dip = SuspectPhrase ("fragment or frameshift", "cds comments or protein description", feature_list);
+ dip = SuspectPhrase (DISC_SUSPECT_PHRASES, "fragment or frameshift", "cds comments or protein description", feature_list);
if (dip != NULL)
{
ValNodeAddPointer (discrepancy_list, 0, dip);
@@ -9206,6 +9612,195 @@ extern void FindCDSOverlappingtRNAs (ValNodePtr PNTR discrepancy_list, ValNodePt
}
+static void FindFeaturesOverlappingSrcFeaturesBioseqCallback (BioseqPtr bsp, Pointer data)
+{
+ ClickableItemPtr cip;
+ SeqMgrFeatContext fcontext;
+ SeqFeatPtr sfp;
+ ValNodePtr this_list, src_vnp;
+
+ if (bsp == NULL || data == NULL) return;
+
+
+ sfp = SeqMgrGetNextFeature (bsp, NULL, 0, FEATDEF_BIOSRC, &fcontext);
+ while (sfp != NULL)
+ {
+ this_list = ListFeaturesOverlappingLocation (bsp, sfp->location, 0, 0);
+ if (this_list != NULL)
+ {
+ cip = NewClickableItem (DISC_FEAT_OVERLAP_SRCFEAT, "%d features overlap a source feature", this_list);
+ /* insert source feature at beginning of item list */
+ src_vnp = ValNodeNew (NULL);
+ src_vnp->choice = OBJ_SEQFEAT;
+ src_vnp->data.ptrvalue = sfp;
+ src_vnp->next = cip->item_list;
+ cip->item_list = src_vnp;
+ ValNodeAddPointer ((ValNodePtr PNTR) data, 0, cip);
+ }
+ sfp = SeqMgrGetNextFeature (bsp, sfp, 0, FEATDEF_BIOSRC, &fcontext);
+ }
+}
+
+
+extern void FindFeaturesOverlappingSrcFeatures (ValNodePtr PNTR discrepancy_list, ValNodePtr sep_list)
+{
+ ValNodePtr vnp;
+ SeqEntryPtr sep;
+
+ for (vnp = sep_list; vnp != NULL; vnp = vnp->next) {
+ sep = vnp->data.ptrvalue;
+ VisitBioseqsInSep (sep, discrepancy_list, FindFeaturesOverlappingSrcFeaturesBioseqCallback);
+ }
+}
+
+
+extern CharPtr discReportDuplicateProteinIDFmt = "%d coding regions have non-unique protein IDs";
+extern CharPtr discReportOneDuplicateProteinIDFmt = "%d coding regions have protein ID %s";
+extern CharPtr discReportMissingProteinIDFmt = "%d coding regions have missing protein IDs";
+extern CharPtr discReportDuplicateTranscriptIdFmt = "%d mRNAs have non-unique transcript IDs";
+extern CharPtr discReportOneDuplicateTranscriptIdFmt = "%d mRNAs have non-unique transcript ID %s";
+extern CharPtr discReportMissingTranscriptIDFmt = "%d mRNAs have missing transcript IDs";
+
+
+/* look for duplicate protein IDs and duplicate transcript IDs */
+/* every coding region should have a protein ID and a transcript ID */
+/* RNA should have a transcript ID to match. */
+static void CheckGenProdSetBioseq (BioseqPtr bsp, GenProdSetDiscrepancyListsPtr lists)
+{
+ SeqFeatPtr sfp;
+ SeqMgrFeatContext fcontext;
+ SeqIdPtr sip;
+ Char buf [96];
+
+ if (bsp == NULL || !ISA_na (bsp->mol) || lists == NULL) {
+ return;
+ }
+
+ /* look for missing protein IDs and duplicate protein IDs on coding regions */
+ for (sfp = SeqMgrGetNextFeature (bsp, NULL, SEQFEAT_CDREGION, 0, &fcontext);
+ sfp != NULL;
+ sfp = SeqMgrGetNextFeature (bsp, sfp, SEQFEAT_CDREGION, 0, &fcontext)) {
+ if (sfp->product == NULL) {
+ if (!sfp->pseudo) {
+ ValNodeAddPointer (&(lists->missing_protein_id), 0,
+ GlobalDiscrepancyNew (NULL, OBJ_SEQFEAT, sfp));
+ }
+ } else {
+ sip = SeqLocId (sfp->product);
+ SeqIdWrite (sip, buf, PRINTID_REPORT, sizeof (buf) - 1);
+ ValNodeAddPointer (&(lists->cds_product_list), 0,
+ GlobalDiscrepancyNew (buf, OBJ_SEQFEAT, sfp));
+ }
+ }
+
+ /* look for missing transcript IDs and duplicate transcript IDs on mRNAs */
+ for (sfp = SeqMgrGetNextFeature (bsp, NULL, 0, FEATDEF_mRNA, &fcontext);
+ sfp != NULL;
+ sfp = SeqMgrGetNextFeature (bsp, sfp, 0, FEATDEF_mRNA, &fcontext)) {
+ if (sfp->product == NULL) {
+ ValNodeAddPointer (&(lists->missing_mrna_product), 0,
+ GlobalDiscrepancyNew (NULL, OBJ_SEQFEAT, sfp));
+ } else {
+ sip = SeqLocId (sfp->product);
+ SeqIdWrite (sip, buf, PRINTID_REPORT, sizeof (buf) - 1);
+ ValNodeAddPointer (&(lists->mrna_product_list), 0,
+ GlobalDiscrepancyNew (buf, OBJ_SEQFEAT, sfp));
+ }
+ }
+}
+
+
+extern void CheckGenProdSetsInSeqEntry (SeqEntryPtr sep, GenProdSetDiscrepancyListsPtr lists)
+{
+ BioseqSetPtr bssp;
+
+ if (sep == NULL || !IS_Bioseq_set (sep) || sep->data.ptrvalue == NULL || lists == NULL) return;
+ bssp = (BioseqSetPtr) sep->data.ptrvalue;
+ if (bssp->_class == BioseqseqSet_class_gen_prod_set) {
+ if (IS_Bioseq (bssp->seq_set)) {
+ CheckGenProdSetBioseq(bssp->seq_set->data.ptrvalue, lists);
+ }
+ } else {
+ sep = bssp->seq_set;
+ while (sep != NULL) {
+ CheckGenProdSetsInSeqEntry (sep, lists);
+ sep = sep->next;
+ }
+ }
+}
+
+
+static void CheckListForGenProdSets (ValNodePtr PNTR discrepancy_list, ValNodePtr sep_list)
+{
+ ValNodePtr vnp, disc_list = NULL;
+ ClickableItemPtr cip;
+ GenProdSetDiscrepancyListsData lists;
+
+ MemSet (&lists, 0, sizeof (GenProdSetDiscrepancyListsData));
+ for (vnp = sep_list; vnp != NULL; vnp = vnp->next) {
+ CheckGenProdSetsInSeqEntry (vnp->data.ptrvalue, &lists);
+ }
+
+ if (lists.missing_protein_id != NULL) {
+ cip = ReportMissingFields (lists.missing_protein_id, discReportMissingProteinIDFmt, DISC_MISSING_GENPRODSET_PROTEIN);
+ if (cip != NULL) {
+ ValNodeAddPointer (&disc_list, 0, cip);
+ }
+ lists.missing_protein_id = FreeGlobalDiscrepancyList (lists.missing_protein_id);
+ }
+
+ if (lists.cds_product_list != NULL) {
+ lists.cds_product_list = ValNodeSort (lists.cds_product_list, SortVnpByGlobalDiscrepancyString);
+ cip = ReportNonUniqueGlobalDiscrepancy (lists.cds_product_list,
+ discReportDuplicateProteinIDFmt,
+ discReportOneDuplicateProteinIDFmt,
+ DISC_DUP_GENPRODSET_PROTEIN,
+ FALSE);
+ if (cip != NULL) {
+ ValNodeAddPointer (&disc_list, 0, cip);
+ }
+ lists.cds_product_list = FreeGlobalDiscrepancyList (lists.cds_product_list);
+ }
+
+
+ if (lists.missing_mrna_product != NULL) {
+ cip = ReportMissingFields (lists.missing_mrna_product, discReportMissingTranscriptIDFmt, DISC_MISSING_GENPRODSET_TRANSCRIPT_ID);
+ if (cip != NULL) {
+ ValNodeAddPointer (&disc_list, 0, cip);
+ }
+ lists.missing_mrna_product = FreeGlobalDiscrepancyList (lists.missing_mrna_product);
+ }
+
+
+ if (lists.mrna_product_list != NULL) {
+ lists.mrna_product_list = ValNodeSort (lists.mrna_product_list, SortVnpByGlobalDiscrepancyString);
+ cip = ReportNonUniqueGlobalDiscrepancy (lists.mrna_product_list,
+ discReportDuplicateTranscriptIdFmt,
+ discReportOneDuplicateTranscriptIdFmt,
+ DISC_DUP_GENPRODSET_TRANSCRIPT_ID,
+ FALSE);
+ if (cip != NULL) {
+ ValNodeAddPointer (&disc_list, 0, cip);
+ }
+ lists.mrna_product_list = FreeGlobalDiscrepancyList (lists.mrna_product_list);
+ }
+
+
+
+
+ if (disc_list != NULL) {
+ if (disc_list->next == NULL) {
+ ValNodeLink (discrepancy_list, disc_list);
+ } else {
+ cip = (ClickableItemPtr) MemNew (sizeof (ClickableItemData));
+ cip->description = StringSave ("GenProdSet Errors");
+ cip->subcategories = disc_list;
+ ValNodeAddPointer (discrepancy_list, 0, cip);
+ }
+ }
+}
+
+
static void CountProteinsBioseqCallback (BioseqPtr bsp, Pointer userdata)
{
if (bsp != NULL && ISA_aa (bsp->mol) && userdata != NULL) {
@@ -9300,7 +9895,7 @@ typedef struct discrepancyinfo
static DiscrepancyInfoData discrepancy_info_list[] =
{
{ "Missing Genes", "MISSING_GENES", AddMissingAndSuperfluousGeneDiscrepancies },
- { "Extra Genes", "EXTRA_GENES", AddDiscrepanciesForMissingOrNonUniqueGeneLocusTags },
+ { "Extra Genes", "EXTRA_GENES", AddMissingAndSuperfluousGeneDiscrepancies },
{ "Missing Locus Tags", "MISSING_LOCUS_TAGS", AddDiscrepanciesForMissingOrNonUniqueGeneLocusTags },
{ "Duplicate Locus Tags", "DUPLICATE_LOCUS_TAGS", AddDiscrepanciesForMissingOrNonUniqueGeneLocusTags },
{ "Bad Locus Tag Format", "BAD_LOCUS_TAG_FORMAT", AddDiscrepanciesForMissingOrNonUniqueGeneLocusTags },
@@ -9339,7 +9934,13 @@ static DiscrepancyInfoData discrepancy_info_list[] =
{ "Note without Transl_except", "NOTE_NO_TRANSL", FindTranslExceptNotes },
{ "Transl_except longer than 3", "TRANSL_TOO_LONG", FindTranslExceptNotes },
{ "CDS tRNA overlaps", "CDS_TRNA_OVERLAP", FindCDSOverlappingtRNAs },
- { "Count Proteins", "COUNT_PROTEINS", CountProteins }
+ { "Count Proteins", "COUNT_PROTEINS", CountProteins },
+ { "Features Intersecting Source Features", "DISC_FEAT_OVERLAP_SRCFEAT", FindFeaturesOverlappingSrcFeatures },
+ { "CDS on GenProdSet without protein", "MISSING_GENPRODSET_PROTEIN", CheckListForGenProdSets},
+ { "Multiple CDS on GenProdSet, same protein", "DUP_GENPRODSET_PROTEIN", CheckListForGenProdSets},
+ { "mRNA on GenProdSet without transcript ID", "MISSING_GENPRODSET_TRANSCRIPT_ID", CheckListForGenProdSets},
+ { "mRNA on GenProdSet with duplicate ID", "DISC_DUP_GENPRODSET_TRANSCRIPT_ID", CheckListForGenProdSets}
+
};
extern CharPtr GetDiscrepancyTestConfName (DiscrepancyType dtype)
@@ -9583,6 +10184,47 @@ extern CharPtr GetDiscrepancyItemText (ValNodePtr vnp)
return row_text;
}
+extern CharPtr GetParentLabelForDiscrepancyItem (ValNodePtr vnp)
+{
+ CharPtr label = NULL;
+ SeqFeatPtr sfp;
+ SeqDescrPtr sdp;
+ ObjValNodePtr ovn;
+ BioseqPtr bsp;
+
+ if (vnp == NULL || vnp->data.ptrvalue == NULL) return NULL;
+
+ switch (vnp->choice)
+ {
+ case OBJ_SEQFEAT:
+ sfp = (SeqFeatPtr) vnp->data.ptrvalue;
+ bsp = BioseqFindFromSeqLoc (sfp->location);
+ label = GetBioseqLabel (bsp);
+ break;
+ case OBJ_SEQDESC:
+ sdp = (SeqDescrPtr) vnp->data.ptrvalue;
+ if (sdp != NULL)
+ {
+ if (sdp->extended != 0) {
+ ovn = (ObjValNodePtr) sdp;
+ if (ovn->idx.parenttype == OBJ_BIOSEQ) {
+ label = GetBioseqLabel ((BioseqPtr) ovn->idx.parentptr);
+ } else if (ovn->idx.parenttype == OBJ_BIOSEQSET) {
+ label = GetBioseqSetLabel ((BioseqSetPtr) ovn->idx.parentptr);
+ }
+ }
+ }
+ break;
+ case OBJ_BIOSEQ:
+ label = GetBioseqLabel (vnp->data.ptrvalue);
+ break;
+ case OBJ_BIOSEQSET:
+ label = GetBioseqSetLabel (vnp->data.ptrvalue);
+ break;
+ }
+ return label;
+}
+
static ValNodePtr ValNodePointerDup (ValNodePtr vnp)
{
@@ -9598,7 +10240,36 @@ static ValNodePtr ValNodePointerDup (ValNodePtr vnp)
return vnp_new;
}
-static ValNodePtr ReplaceDiscrepancyItemWithFeatureTableStrings (ValNodePtr feat_list)
+
+typedef struct ftstrings {
+ CharPtr header;
+ CharPtr desc;
+} FTStringsData, PNTR FTStringsPtr;
+
+
+static FTStringsPtr FTStringsNew (CharPtr header, CharPtr desc)
+{
+ FTStringsPtr f;
+
+ f = (FTStringsPtr) MemNew (sizeof (FTStringsData));
+ f->header = header;
+ f->desc = desc;
+ return f;
+}
+
+
+static FTStringsPtr FTStringsFree (FTStringsPtr f)
+{
+ if (f != NULL) {
+ f->header = MemFree (f->header);
+ f->desc = MemFree (f->desc);
+ f = MemFree (f);
+ }
+ return f;
+}
+
+
+extern ValNodePtr ReplaceDiscrepancyItemWithFeatureTableStrings (ValNodePtr feat_list)
{
BioseqPtr bsp, prot_bsp;
CstType custom_flags = 0;
@@ -9608,6 +10279,7 @@ static ValNodePtr ReplaceDiscrepancyItemWithFeatureTableStrings (ValNodePtr feat
SeqFeatPtr sfp, cds;
ValNodePtr vnp, list_copy = NULL, list_vnp;
CharPtr feature_table_header = NULL, feat_desc;
+ FTStringsPtr fts;
if (feat_list == NULL) return NULL;
@@ -9663,14 +10335,7 @@ static ValNodePtr ReplaceDiscrepancyItemWithFeatureTableStrings (ValNodePtr feat
/* replace list feature with description, change choice */
list_vnp->choice = 0;
feat_desc = asn2gnbk_format (ajp, (Int4) index);
- if (feature_table_header == NULL) {
- list_vnp->data.ptrvalue = feat_desc;
- } else {
- list_vnp->data.ptrvalue = (CharPtr) MemNew (sizeof (Char) * (StringLen (feature_table_header) + StringLen (feat_desc) + 2));
- StringCpy (list_vnp->data.ptrvalue, feature_table_header);
- StringCat (list_vnp->data.ptrvalue, feat_desc);
- feature_table_header = MemFree (feature_table_header);
- }
+ list_vnp->data.ptrvalue = FTStringsNew (StringSave (feature_table_header), feat_desc);
}
}
}
@@ -9678,6 +10343,26 @@ static ValNodePtr ReplaceDiscrepancyItemWithFeatureTableStrings (ValNodePtr feat
asn2gnbk_cleanup (ajp);
feature_table_header = MemFree (feature_table_header);
}
+
+ /* now remove redundant headers */
+ for (list_vnp = list_copy; list_vnp != NULL; list_vnp = list_vnp->next) {
+ if (list_vnp->choice != 0) continue;
+ fts = (FTStringsPtr) list_vnp->data.ptrvalue;
+ if (feature_table_header == NULL
+ || StringCmp (feature_table_header, fts->header) != 0) {
+ feature_table_header = MemFree (feature_table_header);
+ feature_table_header = fts->header;
+ fts->header = NULL;
+ list_vnp->data.ptrvalue = (CharPtr) MemNew (sizeof (Char) * (StringLen (feature_table_header) + StringLen (fts->desc) + 2));
+ StringCpy (list_vnp->data.ptrvalue, feature_table_header);
+ StringCat (list_vnp->data.ptrvalue, fts->desc);
+ } else {
+ list_vnp->data.ptrvalue = fts->desc;
+ fts->desc = NULL;
+ }
+ fts = FTStringsFree (fts);
+ }
+ feature_table_header = MemFree (feature_table_header);
return list_copy;
}
@@ -9759,7 +10444,7 @@ extern void WriteDiscrepancyEx (FILE *fp, ClickableItemPtr dip, Boolean use_feat
while (vnp != NULL)
{
filename = NULL;
- if (vnp->choice == 0 && use_feature_table_fmt)
+ if (vnp->choice == 0)
{
row_text = vnp->data.ptrvalue;
}
@@ -9895,6 +10580,321 @@ extern void SaveDiscrepancyConfig (DiscrepancyConfigPtr dcp)
}
+extern CharPtr SetDiscrepancyReportTestsFromString (CharPtr list, Boolean enable, DiscrepancyConfigPtr dcp)
+{
+ CharPtr ptr, tmp, name_start, err_msg;
+ DiscrepancyType test_type;
+ CharPtr err_fmt = "%s is an unrecognized test name";
+
+ if (dcp == NULL) return StringSave ("Unable to configure");
+
+ if (!StringDoesHaveText (list)) {
+ return StringSave ("No tests specified!");
+ }
+
+ tmp = StringSave (list);
+ name_start = tmp;
+ while (name_start != NULL && StringDoesHaveText (name_start)) {
+ ptr = StringChr (name_start, ',');
+ if (ptr != NULL) {
+ *ptr = 0;
+ }
+ TrimSpacesAroundString (name_start);
+ test_type = GetDiscrepancyTypeFromSettingName (name_start);
+ if (test_type == MAX_DISC_TYPE) {
+ err_msg = (CharPtr) MemNew (StringLen (err_fmt) + StringLen (name_start));
+ sprintf (err_msg, err_fmt, name_start);
+ tmp = MemFree (tmp);
+ return err_msg;
+ }
+ dcp->conf_list[test_type] = enable;
+ if (ptr == NULL) {
+ name_start = NULL;
+ } else {
+ name_start = ptr + 1;
+ }
+ }
+ tmp = MemFree (tmp);
+ return NULL;
+}
+
+
+/* functions for writing discrepancy report to file */
+extern void WriteAsnDiscReport (ValNodePtr discrepancy_list, FILE *ofp, DiscReportOutputConfigPtr oc, Boolean use_flag)
+{
+ ValNodePtr vnp;
+ ClickableItemPtr cip;
+ CharPtr setting_name, prefix;
+ CharPtr prefix_fmt = "DiscRep:%s:";
+
+ if (ofp == NULL || oc == NULL) return;
+
+ for (vnp = discrepancy_list; vnp != NULL; vnp = vnp->next) {
+ cip = (ClickableItemPtr) vnp->data.ptrvalue;
+ if (cip != NULL) {
+ prefix = NULL;
+ if (use_flag) {
+ setting_name = GetDiscrepancyTestSettingName (cip->clickable_item_type);
+ if (StringHasNoText (setting_name)) {
+ prefix = StringSave ("DiscRep:");
+ } else {
+ prefix = (CharPtr) MemNew (sizeof (Char) * (StringLen (prefix_fmt) + StringLen (setting_name)));
+ sprintf (prefix, prefix_fmt, setting_name);
+ }
+ }
+ if (oc->summary_report) {
+ fprintf (ofp, "%s%s\n", prefix == NULL ? "" : prefix, cip->description);
+ } else {
+ WriteDiscrepancyEx (ofp, cip, oc->use_feature_table_format, oc->filename_list, prefix);
+ }
+ prefix = MemFree (prefix);
+ if ((cip->item_list == NULL || oc->expand_report_categories[cip->clickable_item_type]) && cip->subcategories != NULL) {
+ if (use_flag && cip->clickable_item_type == DISC_INCONSISTENT_BIOSRC_DEFLINE) {
+ WriteAsnDiscReport (cip->subcategories, ofp, oc, FALSE);
+ } else {
+ WriteAsnDiscReport (cip->subcategories, ofp, oc, use_flag);
+ }
+ }
+ }
+ }
+
+}
+
+
+static int LIBCALLBACK SortVnpByDiscrepancyType (VoidPtr ptr1, VoidPtr ptr2)
+
+{
+ ValNodePtr vnp1;
+ ValNodePtr vnp2;
+ ClickableItemPtr c1, c2;
+ CharPtr cp1, cp2;
+
+ if (ptr1 != NULL && ptr2 != NULL) {
+ vnp1 = *((ValNodePtr PNTR) ptr1);
+ vnp2 = *((ValNodePtr PNTR) ptr2);
+ if (vnp1 != NULL && vnp2 != NULL) {
+ c1 = (ClickableItemPtr) vnp1->data.ptrvalue;
+ c2 = (ClickableItemPtr) vnp2->data.ptrvalue;
+ if (c1 != NULL && c2 != NULL) {
+ if (c1->clickable_item_type < c2->clickable_item_type) {
+ return -1;
+ } else if (c1->clickable_item_type > c2->clickable_item_type) {
+ return 1;
+ } else {
+ if (c1->description == NULL && c2->description == NULL) {
+ return 0;
+ } else if (c1->description == NULL) {
+ return -1;
+ } else if (c2->description == NULL) {
+ return 1;
+ } else {
+ cp1 = c1->description;
+ while (isdigit (*cp1)) {
+ cp1++;
+ }
+ cp2 = c2->description;
+ while (isdigit (*cp2)) {
+ cp2++;
+ }
+ return StringCmp (cp1, cp2);
+ }
+ }
+ }
+ }
+ }
+ return 0;
+}
+
+
+static ClickableItemPtr CombineDiscrepancyReports (ClickableItemPtr cip1, ClickableItemPtr cip2)
+{
+ CharPtr cp1, cp2, num_start1, num_start2, num_buf;
+ Char fixed_buf[15];
+ Int4 common_start_len = 0, common_len_end = 0;
+ Int4 num_len1, num_len2, num_items1, num_items2;
+ ClickableItemPtr combined = NULL;
+
+
+ if (cip1 == NULL || cip2 == NULL || cip1->clickable_item_type != cip2->clickable_item_type
+ || StringHasNoText (cip1->description) || StringHasNoText (cip2->description)) {
+ return NULL;
+ }
+
+ cp1 = cip1->description;
+ cp2 = cip2->description;
+
+ while (*cp1 == *cp2 && *cp1 != 0 && *cp2 != 0 && !isdigit (*cp1)) {
+ cp1++;
+ cp2++;
+ common_start_len++;
+ }
+ if (*cp1 == 0 && *cp2 == 0) {
+ /* entire description matches */
+ combined = (ClickableItemPtr) MemNew (sizeof (ClickableItemData));
+ combined->clickable_item_type = cip1->clickable_item_type;
+ combined->description = StringSave (cip1->description);
+ combined->item_list = cip1->item_list;
+ cip1->item_list = NULL;
+ combined->subcategories = cip1->subcategories;
+ cip1->subcategories = NULL;
+ ValNodeLink (&(combined->item_list), cip2->item_list);
+ cip2->item_list = NULL;
+ ValNodeLink (&(combined->subcategories), cip2->subcategories);
+ cip2->subcategories = NULL;
+ } else if (isdigit (*cp1) && isdigit (*cp2) && (cp1 == cip1->description || isspace (*(cp1 - 1)))) {
+ num_start1 = cp1;
+ num_len1 = 0;
+ while (isdigit (*cp1)) {
+ cp1++;
+ num_len1++;
+ }
+ num_start2 = cp2;
+ num_len2 = 0;
+ while (isdigit (*cp2)) {
+ cp2++;
+ num_len2++;
+ }
+ if ((*cp1 == 0 || isspace (*cp1)) && StringCmp (cp1, cp2) == 0) {
+ /* matches on the other side of the number */
+ /* build combined description */
+ if (num_len1 < sizeof (fixed_buf)) {
+ StringNCpy (fixed_buf, num_start1, num_len1);
+ fixed_buf[num_len1] = 0;
+ num_items1 = atoi(fixed_buf);
+ } else {
+ num_buf = (CharPtr) MemNew (sizeof (Char) * (num_len1 + 1));
+ StringNCpy (num_buf, num_start1, num_len1);
+ num_buf[num_len1] = 0;
+ num_items1 = atoi (num_buf);
+ num_buf = MemFree (num_buf);
+ }
+ if (num_len2 < sizeof (fixed_buf) - 1) {
+ StringNCpy (fixed_buf, num_start2, num_len2);
+ fixed_buf[num_len2] = 0;
+ num_items2 = atoi(fixed_buf);
+ } else {
+ num_buf = (CharPtr) MemNew (sizeof (Char) * (num_len2 + 1));
+ StringNCpy (num_buf, num_start2, num_len2);
+ num_buf[num_len2] = 0;
+ num_items2 = atoi (num_buf);
+ num_buf = MemFree (num_buf);
+ }
+
+ combined = (ClickableItemPtr) MemNew (sizeof (ClickableItemData));
+
+ combined->description = (CharPtr) MemNew (sizeof (Char) * (common_start_len + sizeof (fixed_buf) + StringLen (cp1) + 1));
+ StringNCpy (combined->description, cip1->description, common_start_len);
+ sprintf (fixed_buf, "%d", num_items1 + num_items2);
+ StringCat (combined->description, fixed_buf);
+ StringCat (combined->description, cp1);
+
+ combined->clickable_item_type = cip1->clickable_item_type;
+ combined->item_list = cip1->item_list;
+ cip1->item_list = NULL;
+ combined->subcategories = cip1->subcategories;
+ cip1->subcategories = NULL;
+ ValNodeLink (&(combined->item_list), cip2->item_list);
+ cip2->item_list = NULL;
+ ValNodeLink (&(combined->subcategories), cip2->subcategories);
+ cip2->subcategories = NULL;
+ } else {
+ combined = NULL;
+ }
+ }
+ if (combined != NULL && combined->subcategories != NULL) {
+ CollateDiscrepancyReports (&(combined->subcategories));
+ }
+ return combined;
+}
+
+
+extern void CollateDiscrepancyReports (ValNodePtr PNTR discrepancy_reports)
+{
+ ValNodePtr vnp, tmp;
+ ClickableItemPtr combined;
+
+ *discrepancy_reports = ValNodeSort (*discrepancy_reports, SortVnpByDiscrepancyType);
+
+ vnp = *discrepancy_reports;
+ while (vnp != NULL && vnp->next != NULL) {
+ combined = CombineDiscrepancyReports (vnp->data.ptrvalue, vnp->next->data.ptrvalue);
+ if (combined != NULL) {
+ vnp->data.ptrvalue = ClickableItemFree (vnp->data.ptrvalue);
+ vnp->next->data.ptrvalue = ClickableItemFree (vnp->next->data.ptrvalue);
+ tmp = vnp->next;
+ vnp->next = vnp->next->next;
+ tmp->next = NULL;
+ tmp = ValNodeFree (tmp);
+ vnp->data.ptrvalue = combined;
+ } else {
+ vnp = vnp->next;
+ }
+ }
+}
+
+
+extern CharPtr ExpandDiscrepancyReportTestsFromString (CharPtr list, Boolean expand, DiscReportOutputConfigPtr dcp)
+{
+ CharPtr ptr, tmp, name_start, err_msg;
+ Int4 i;
+ DiscrepancyType test_type;
+ CharPtr err_fmt = "%s is an unrecognized test name";
+
+ if (dcp == NULL) return StringSave ("Unable to configure");
+
+ if (!StringDoesHaveText (list)) {
+ return NULL;
+ } else if (StringICmp (list, "all") == 0) {
+ for (i = 0; i < MAX_DISC_TYPE; i++) {
+ dcp->expand_report_categories[i] = expand;
+ }
+ } else {
+ tmp = StringSave (list);
+ name_start = tmp;
+ while (name_start != NULL && StringDoesHaveText (name_start)) {
+ ptr = StringChr (name_start, ',');
+ if (ptr != NULL) {
+ *ptr = 0;
+ }
+ TrimSpacesAroundString (name_start);
+ test_type = GetDiscrepancyTypeFromSettingName (name_start);
+ if (test_type == MAX_DISC_TYPE) {
+ err_msg = (CharPtr) MemNew (StringLen (err_fmt) + StringLen (name_start));
+ sprintf (err_msg, err_fmt, name_start);
+ tmp = MemFree (tmp);
+ return err_msg;
+ }
+ dcp->expand_report_categories[test_type] = expand;
+ if (ptr == NULL) {
+ name_start = NULL;
+ } else {
+ name_start = ptr + 1;
+ }
+ }
+ tmp = MemFree (tmp);
+ }
+ return NULL;
+}
+
+
+extern ValNodePtr FreeFilenameList (ValNodePtr filename_list)
+{
+ ValNodePtr vnp_next;
+
+ while (filename_list != NULL) {
+ vnp_next = filename_list->next;
+ filename_list->next = NULL;
+ if (filename_list->choice == FILENAME_LIST_FILENAME_ITEM) {
+ filename_list = ValNodeFreeData (filename_list);
+ } else {
+ filename_list = ValNodeFree (filename_list);
+ }
+ filename_list = vnp_next;
+ }
+ return filename_list;
+}
+
+
/* Barcode Discrepancy Function */
/*
@@ -10261,7 +11261,6 @@ BarcodeTestForSeqEntry
CharPtr fmt,
BarcodeTestConfigPtr cfg)
{
- ValNodePtr bsp_list = NULL;
BarcodeSearchData bsd;
bsd.bioseq_list = NULL;
@@ -10529,6 +11528,52 @@ extern CharPtr BarcodeTestGenbankIdString (BioseqPtr bsp)
}
+
+static CharPtr GetBarcodeTestFailureReasons (BarcodeTestResultsPtr res)
+{
+ Int4 i, msg_len = 0;
+ Boolean any_failed = FALSE;
+ CharPtr msg;
+ Char pct[5];
+
+ if (res == NULL || res->bsp == NULL) return NULL;
+
+ for (i = 0; i < eBarcodeTest_LAST; i++)
+ {
+ if (res->failed_tests[i])
+ {
+ msg_len += StringLen (GetBarcodeTestName (i)) + 2;
+ if (i == eBarcodeTest_PercentN)
+ {
+ msg_len += 5;
+ }
+ any_failed = TRUE;
+ }
+ }
+ if (!any_failed) return NULL;
+
+ msg = (CharPtr) MemNew (sizeof (Char) * msg_len);
+ for (i = 0; i < eBarcodeTest_LAST; i++)
+ {
+ if (res->failed_tests[i])
+ {
+ StringCat (msg, GetBarcodeTestName(i));
+ if (i == eBarcodeTest_PercentN)
+ {
+ sprintf (pct, ":%.1f", res->n_percent);
+ StringCat (msg, pct);
+ }
+ StringCat (msg, ",");
+ }
+ }
+ /* remove trailing comma */
+ msg[StringLen(msg) - 1] = 0;
+
+ return msg;
+
+}
+
+
static CharPtr SummaryTextFromBarcodeTestResults (BarcodeTestResultsPtr res)
{
Int4 i, msg_len = 0;
@@ -10742,6 +11787,33 @@ extern void WriteBarcodeTestCompliance (FILE *fp, ValNodePtr results_list)
}
+/* Report lists each Bioseq and whether the Bioseq passed all tests
+ * or failed at least one.
+ */
+extern void WriteBarcodeTestComprehensive (FILE *fp, ValNodePtr results_list)
+{
+ BarcodeTestResultsPtr res;
+ ValNodePtr vnp;
+ CharPtr barcode_id, genbank_id, reason;
+
+ if (fp == NULL) return;
+
+ for (vnp = results_list; vnp != NULL; vnp = vnp->next)
+ {
+ res = (BarcodeTestResultsPtr) vnp->data.ptrvalue;
+ barcode_id = BarcodeTestBarcodeIdString (res->bsp);
+ genbank_id = BarcodeTestGenbankIdString (res->bsp);
+ reason = GetBarcodeTestFailureReasons (res);
+ fprintf (fp, "%s\t%s\t%s\t%s\n", barcode_id, genbank_id,
+ PassBarcodeTests (res) ? "PASS" : "FAIL",
+ reason == NULL ? "" : reason);
+ barcode_id = MemFree (barcode_id);
+ genbank_id = MemFree (genbank_id);
+ reason = MemFree (reason);
+ }
+}
+
+
/* Create a tag table for updates */
extern void WriteBarcodeTagTable (FILE *fp, ValNodePtr results_list)
{
@@ -10879,6 +11951,61 @@ extern void AbstractReportError (
}
+
+extern Boolean ParseLatLon (
+ CharPtr lat_lon,
+ FloatHi PNTR latP,
+ FloatHi PNTR lonP
+)
+
+{
+ char ew;
+ double lat;
+ double lon;
+ char ns;
+
+ if (latP != NULL) {
+ *latP = 0.0;
+ }
+ if (lonP != NULL) {
+ *lonP = 0.0;
+ }
+
+ if (StringHasNoText (lat_lon)) return FALSE;
+
+ if (sscanf (lat_lon, "%lf %c %lf %c", &lat, &ns, &lon, &ew) == 4) {
+ if (lon < -180.0) {
+ lon = -180.0;
+ }
+ if (lat < -90.0) {
+ lat = -90.0;
+ }
+ if (lon > 180.0) {
+ lon = 180.0;
+ }
+ if (lat > 90.0) {
+ lat = 90.0;
+ }
+ if (ew == 'W') {
+ lon = -lon;
+ }
+ if (ns == 'S') {
+ lat = -lat;
+ }
+
+ if (latP != NULL) {
+ *latP = (FloatHi) lat;
+ }
+ if (lonP != NULL) {
+ *lonP = (FloatHi) lon;
+ }
+
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
static CharPtr print_lat_lon_fmt = "%.*f %c %.*f %c";
extern void IsCorrectLatLonFormat (CharPtr lat_lon, BoolPtr format_correct, BoolPtr lat_in_range, BoolPtr lon_in_range)
@@ -11820,10 +12947,12 @@ typedef struct countrystatelist {
CharPtr country_name;
} CountryStateListData, PNTR CountryStateListPtr;
-static Boolean IsMatchInSecondChoiceLists (CharPtr find_str, Int4 match_len, CountryStateListPtr second_choice_lists)
+static Boolean IsMatchInSecondChoiceLists (CharPtr find_str, Int4 match_len, CountryStateListPtr second_choice_lists, CharPtr whole_string)
{
Int4 i, j;
Boolean in_lists = FALSE;
+ CharPtr cp;
+ Int4 len_second_choice;
if (StringHasNoText (find_str) || match_len < 1 || second_choice_lists == NULL) return FALSE;
@@ -11831,7 +12960,14 @@ static Boolean IsMatchInSecondChoiceLists (CharPtr find_str, Int4 match_len, Cou
{
for (j = 0; second_choice_lists[i].state_list[j] != NULL && !in_lists; j++)
{
- if (StringNCmp (find_str, second_choice_lists[i].state_list[j], match_len) == 0)
+ len_second_choice = StringLen (second_choice_lists[i].state_list[j]);
+ if (len_second_choice == match_len
+ &&StringNCmp (find_str, second_choice_lists[i].state_list[j], match_len) == 0)
+ {
+ in_lists = TRUE;
+ }
+ else if ((cp = StringSearch (second_choice_lists[i].state_list[j], find_str)) != NULL
+ && StringSearch (whole_string, second_choice_lists[i].state_list[j]) != NULL)
{
in_lists = TRUE;
}
@@ -11841,81 +12977,187 @@ static Boolean IsMatchInSecondChoiceLists (CharPtr find_str, Int4 match_len, Cou
}
-static CharPtr FindBestStringMatch (CharPtr PNTR list, CharPtr find_str, Int4Ptr pMatchLen, CountryStateListPtr second_choice_lists)
+static Boolean IsBodyOfWater (CharPtr str)
+{
+ if (StringHasNoText (str)) return FALSE;
+ if (StringSearch (str, "Ocean") != NULL) return TRUE;
+ if (StringSearch (str, "Gulf") != NULL) return TRUE;
+ if (StringSearch (str, "Sea") != NULL) return TRUE;
+ return FALSE;
+}
+
+
+static Boolean IsSubstringOfStringInList (CharPtr whole_str, CharPtr match_p, CharPtr match_str, CharPtr PNTR list)
+{
+ CharPtr cp;
+ Int4 context_len, find_len;
+ Boolean rval = FALSE;
+
+ if (list == NULL || StringHasNoText (whole_str) || match_p == NULL || match_p < whole_str) {
+ return FALSE;
+ }
+ find_len = StringLen (match_str);
+ while (*list != NULL && !rval) {
+ context_len = StringLen (*list);
+ if (find_len < context_len) {
+ cp = StringSearch (whole_str, *list);
+ while (cp != NULL && !rval) {
+ if (match_p < cp) {
+ cp = NULL;
+ } else if (cp + context_len > match_p) {
+ rval = TRUE;
+ } else {
+ cp = StringSearch (cp + 1, *list);
+ }
+ }
+ }
+ list++;
+ }
+ return rval;
+}
+
+
+static CharPtr bad_context_names[] = {
+ "Gibraltar Range National Park",
+ "Western Australia",
+ "WSW Chihuahua",
+ "Mississippi River",
+ NULL };
+
+static Boolean IsBadContextName (CharPtr whole_str, CharPtr match_p, CharPtr match_str)
+{
+ Boolean rval;
+ Int4 len;
+
+ rval = IsSubstringOfStringInList (whole_str, match_p, match_str, bad_context_names);
+ if (!rval) {
+ len = StringLen (match_str);
+ if (StringCmp (match_p + len, " River") == 0) {
+ rval = TRUE;
+ } else if (StringCmp (match_p + len, " State University") == 0) {
+ rval = TRUE;
+ }
+ }
+ return rval;
+}
+
+
+static Boolean IsPartOfStateName (CharPtr whole_str, CharPtr match_p, CharPtr match_str, CountryStateListPtr second_choice_lists)
+{
+ Boolean rval = FALSE;
+ Int4 i;
+
+ if (second_choice_lists == NULL) return FALSE;
+
+ for (i = 0; second_choice_lists[i].state_list != NULL && !rval; i++) {
+ rval = IsSubstringOfStringInList (whole_str, match_p, match_str, second_choice_lists[i].state_list);
+ }
+ return rval;
+}
+
+
+static CharPtr
+FindStringInStringWithContext
+(CharPtr search_str, CharPtr look_for, CharPtr PNTR list, CountryStateListPtr second_choice_lists)
{
- CharPtr PNTR ptr;
Int4 len_match;
+ CharPtr cp;
+
+ if (StringHasNoText (search_str) || StringHasNoText (look_for)) {
+ return NULL;
+ }
+
+ cp = StringISearch (search_str, look_for);
+ len_match = StringLen (look_for);
+ while (cp != NULL) {
+ /* if character after match is alpha, continue */
+ if (isalpha ((Int4)(cp [len_match]))
+ /* if character before match is alpha, continue */
+ || (cp > search_str && isalpha ((Int4)(*(cp - 1))))
+ /* if match is part of a known "bad context", continue */
+ || IsBadContextName (search_str, cp, look_for)
+ /* if is shorter match for other item, continue */
+ || IsSubstringOfStringInList (search_str, cp, look_for, list)
+ || IsPartOfStateName (search_str, cp, look_for, second_choice_lists)) {
+ cp = StringSearch (cp + len_match, look_for);
+ } else {
+ return cp;
+ }
+ }
+ return cp;
+}
+
+
+static ValNodePtr FindBestStringMatch (CharPtr PNTR list, CharPtr find_str, CountryStateListPtr second_choice_lists)
+{
+ CharPtr PNTR ptr;
Int4 len_find;
- Int4 best_len = 0;
- CharPtr best_match = NULL;
CharPtr cp;
- CharPtr ocean_best, ocean_this;
+ Boolean ocean_best, ocean_this;
Boolean best_in_second, this_in_second;
+ ValNodePtr match_list = NULL, vnp, best_vnp;
if (list == NULL || find_str == NULL) return NULL;
len_find = StringLen (find_str);
+ /* first, find all matches */
for (ptr = list; ptr != NULL && *ptr != NULL; ptr++)
{
- len_match = StringLen (*ptr);
- cp = StringISearch (find_str, *ptr);
- /* if no match at all, continue */
- if (cp == NULL) continue;
- /* if character after match is alpha, continue */
- if (isalpha ((Int4)(cp [len_match]))) continue;
+ cp = FindStringInStringWithContext (find_str, *ptr, list, second_choice_lists);
+ if (cp != NULL) {
+ ValNodeAddPointer (&match_list, 1, *ptr);
+ }
+ }
+
+ if (match_list == NULL) return NULL;
- if (best_match != NULL)
+ /* now eliminate matches where we know we have a preference */
+ best_vnp = match_list;
+ for (vnp = match_list->next; vnp != NULL; vnp = vnp->next)
+ {
+ if (StringSearch (vnp->data.ptrvalue, best_vnp->data.ptrvalue) != NULL)
{
+ /* best is inside this one */
+ best_vnp->choice = 0;
+ best_vnp = vnp;
+ } else if (StringSearch (best_vnp->data.ptrvalue, vnp->data.ptrvalue) != NULL) {
+ /* this is inside best */
+ vnp->choice = 0;
+ } else {
/* prefer non-ocean to ocean */
- ocean_best = StringStr (best_match, "Ocean");
- ocean_this = StringStr (*ptr, "Ocean");
+ ocean_best = IsBodyOfWater (best_vnp->data.ptrvalue);
+ ocean_this = IsBodyOfWater (vnp->data.ptrvalue);
if (ocean_this && !ocean_best)
{
+ /* disregard this one */
+ vnp->choice = 0;
continue;
}
else if (!ocean_this && ocean_best)
{
/* definitely take this to replace best */
+ best_vnp->choice = 0;
+ best_vnp = vnp;
}
- else if (second_choice_lists == NULL)
- {
- if (len_match < best_len) continue;
- }
- else
+ else if (second_choice_lists != NULL)
{
- best_in_second = IsMatchInSecondChoiceLists (best_match, best_len, second_choice_lists);
- this_in_second = IsMatchInSecondChoiceLists (cp, len_match, second_choice_lists);
+ best_in_second = IsMatchInSecondChoiceLists (best_vnp->data.ptrvalue, StringLen (best_vnp->data.ptrvalue), second_choice_lists, find_str);
+ this_in_second = IsMatchInSecondChoiceLists (vnp->data.ptrvalue, StringLen (vnp->data.ptrvalue), second_choice_lists, find_str);
/* if this choice is a second choice, but the previous best wasn't, don't bother with this */
- if (this_in_second && !best_in_second) continue;
- /* if both choices are in the secondary lists, or neither are, choose the longer choice */
- if (((!this_in_second && !best_in_second) || (this_in_second && best_in_second)) && len_match < best_len) continue;
+ if (this_in_second && !best_in_second) {
+ vnp->choice = 0;
+ } else if (!this_in_second && best_in_second) {
+ /* if previous choice was in the secondary lists, prefer this and ignore previous */
+ best_vnp->choice = 0;
+ best_vnp = vnp;
+ }
}
}
-
- if (cp == find_str)
- {
- best_len = len_match;
- best_match = *ptr;
- }
- else if (!isalpha ((Int4)(*(cp - 1))))
- {
- best_len = len_match;
- best_match = *ptr;
- }
- }
- if (pMatchLen != NULL)
- {
- if (best_match == NULL)
- {
- *pMatchLen = 0;
- }
- else
- {
- *pMatchLen = best_len;
- }
}
- return best_match;
+ vnp = ValNodeExtract (&match_list, 0);
+ vnp = ValNodeFree (vnp);
+ return match_list;
}
static CharPtr usa_state_list[] =
@@ -12070,10 +13312,11 @@ static CountryStateListData country_state_list[] = {
};
-static CharPtr FindStateMatch (CharPtr search, CharPtr PNTR country, Int4Ptr state_len)
+static CharPtr FindStateMatch (CharPtr search, CharPtr PNTR country, Int4Ptr state_len, BoolPtr pMulti)
{
- CharPtr state_match = NULL, best_match = NULL;
- Int4 i, match_len, best_len = 0;
+ CharPtr best_match = NULL;
+ Int4 i;
+ ValNodePtr state_matches;
if (StringHasNoText (search)) return NULL;
if (country != NULL) {
@@ -12081,20 +13324,51 @@ static CharPtr FindStateMatch (CharPtr search, CharPtr PNTR country, Int4Ptr sta
}
for (i = 0; country_state_list[i].state_list != NULL; i++) {
- state_match = FindBestStringMatch (country_state_list[i].state_list, search, &match_len, NULL);
- if (state_match != NULL && (best_match == NULL || match_len > best_len)) {
- *country = country_state_list[i].country_name;
- best_len = match_len;
- best_match = state_match;
+ state_matches = FindBestStringMatch (country_state_list[i].state_list, search, NULL);
+ if (state_matches != NULL) {
+ if (state_matches->next == NULL && best_match == NULL) {
+ best_match = state_matches->data.ptrvalue;
+ *country = country_state_list[i].country_name;
+ } else {
+ *pMulti = TRUE;
+ return NULL;
+ }
+ state_matches = ValNodeFree (state_matches);
}
}
if (best_match != NULL && state_len != NULL) {
- *state_len = best_len;
+ *state_len = StringLen (best_match);
}
return best_match;
}
+static CharPtr FindStateMatchForCountry (CharPtr search, CharPtr country, BoolPtr pMulti)
+{
+ ValNodePtr state_matches;
+ CharPtr state_match = NULL;
+ Int4 i;
+
+ if (StringHasNoText (search) || StringHasNoText (country)) return NULL;
+
+ for (i = 0; country_state_list[i].state_list != NULL; i++) {
+ if (StringCmp (country, country_state_list[i].country_name) == 0) {
+ state_matches = FindBestStringMatch (country_state_list[i].state_list, search, NULL);
+ if (state_matches != NULL) {
+ if (state_matches->next == NULL) {
+ state_match = state_matches->data.ptrvalue;
+ } else {
+ *pMulti = TRUE;
+ }
+ state_matches = ValNodeFree (state_matches);
+ return state_match;
+ }
+ }
+ }
+ return NULL;
+}
+
+
static void FixCountryStringForStateName (CharPtr PNTR pCountry, CharPtr state_name, CharPtr country_name)
{
CharPtr cp;
@@ -12164,19 +13438,35 @@ static void FixCountryStringForStateName (CharPtr PNTR pCountry, CharPtr state_n
}
+static CharPtr FindCountryMatch (CharPtr search_str, CharPtr PNTR country_list, BoolPtr isMulti)
+{
+ ValNodePtr match_list;
+ CharPtr best_match = NULL;
+
+ if (StringSearch (search_str, "Yugoslavia")) {
+ *isMulti = TRUE;
+ return NULL;
+ }
+
+ match_list = FindBestStringMatch (country_list, search_str, country_state_list);
+ if (match_list != NULL) {
+ if (match_list->next == NULL) {
+ best_match = match_list->data.ptrvalue;
+ } else {
+ *isMulti = TRUE;
+ }
+ match_list = ValNodeFree (match_list);
+ }
+ return best_match;
+}
+
+
static ReplacePairData country_name_fixes[] = {
{"Vietnam", "Viet Nam"},
{"Ivory Coast", "Cote d'Ivoire"},
- {"UK", "United Kingdom"},
{"United States of America", "USA"},
- {"United States", "USA"},
{"U.S.A.", "USA"},
{"The Netherlands", "Netherlands"},
- {"New Guinea", "Papua New Guinea"},
- {"British Guiana", "Guyana"},
- {"Aleutian Island", "Aleutian Islands"},
- {"Aleutian Is.", "Aleutian Islands"},
- {"Washington, D.C.", "Washington, DC"},
{NULL, NULL}
};
@@ -12192,13 +13482,14 @@ static void FixCountryNames (CharPtr PNTR pCountry)
fix = country_name_fixes;
while (fix->find != NULL)
{
- if (StringStr (*pCountry, fix->replace) == NULL) {
+ if (StringStr (*pCountry, fix->replace) == NULL || StringSearch (fix->find, fix->replace) != NULL) {
FindReplaceString (pCountry, fix->find, fix->replace, FALSE, TRUE);
}
fix++;
}
}
+
static ReplacePairData us_state_abbrev_fixes[] = {
{"AL", "Alabama"},
{"AK", "Alaska"},
@@ -12226,7 +13517,7 @@ static ReplacePairData us_state_abbrev_fixes[] = {
{"MS", "Mississippi"},
{"MO", "Missouri"},
{"MT", "Montana"},
- {"NB", "Nebraska"},
+ {"NE", "Nebraska"},
{"NV", "Nevada"},
{"NH", "New Hampshire"},
{"NJ", "New Jersey"},
@@ -12253,6 +13544,23 @@ static ReplacePairData us_state_abbrev_fixes[] = {
{NULL, NULL}
};
+
+NLM_EXTERN CharPtr GetStateAbbreviation (CharPtr state)
+{
+ ReplacePairPtr fix;
+ CharPtr abbrev = NULL;
+
+ fix = us_state_abbrev_fixes;
+ while (fix->find != NULL && abbrev == NULL) {
+ if (StringICmp (fix->replace, state) == 0) {
+ abbrev = fix->find;
+ }
+ fix++;
+ }
+ return abbrev;
+}
+
+
static void FixUSStateAbbreviations (CharPtr PNTR pCountry)
{
ReplacePairPtr fix;
@@ -12421,49 +13729,79 @@ static void FixForNamedRegions (CharPtr PNTR pCountry)
static void FindCountryName (CharPtr PNTR pCountry, CharPtr PNTR country_list)
{
- CharPtr best_match, state_match, state_country = NULL;
+ CharPtr best_match = NULL, state_match, state_country = NULL;
CharPtr cp, before, newname, after;
Int4 len_cntry = 0, len_state = 0, len_qual, len_name;
+ Boolean state_multi = FALSE, country_multi = FALSE;
if (pCountry == NULL || StringHasNoText (*pCountry))
{
return;
}
- state_match = FindStateMatch (*pCountry, &state_country, &len_state);
+ best_match = FindCountryMatch (*pCountry, country_list, &country_multi);
+ if (country_multi) {
+ *pCountry = MemFree (*pCountry);
+ return;
+ }
+ state_match = FindStateMatch (*pCountry, &state_country, &len_state, &state_multi);
- best_match = FindBestStringMatch (country_list, *pCountry, &len_cntry, country_state_list);
+ if ((best_match == NULL && state_match == NULL) || (best_match == NULL && state_multi)) {
+ *pCountry = MemFree (*pCountry);
+ return;
+ } else if (best_match != NULL && state_match != NULL && StringCmp (best_match, state_country) != 0) {
+ state_match = NULL;
+ }
/* if match could be a country or a state, treat it as a country */
if (StringCmp (best_match, state_match) == 0) {
state_match = NULL;
}
- if (StringStr (state_match, best_match) != NULL)
+ if (IsBodyOfWater (best_match) && state_match != NULL)
{
- /* if we found the country in the state, use the state (i.e., Jersey vs. New Jersey)*/
+ /* prefer state to body of water */
best_match = NULL;
}
/* if we have a country and a state, but the state is for a different country, drop the state */
if (state_match != NULL && best_match != NULL && StringNCmp (state_country, best_match, len_cntry) != 0)
{
- state_match = NULL;
+ state_multi = FALSE;
+ state_match = FindStateMatchForCountry (*pCountry, best_match, &state_multi);
+ if (state_multi) {
+ *pCountry = MemFree (*pCountry);
+ return;
+ }
}
- if (best_match != NULL && StringNCmp (best_match, "USA", 3) == 0 && state_match == NULL)
+ if (best_match != NULL && StringCmp (best_match, "USA") == 0 && StringLen (*pCountry) > 3 && state_match == NULL)
{
FixUSStateAbbreviations (pCountry);
- FindReplaceString (pCountry, "USA:", "", TRUE, TRUE);
- best_match = NULL;
- state_match = FindStateMatch (*pCountry, &state_country, &len_state);
+ state_multi = FALSE;
+ state_match = FindStateMatchForCountry (*pCountry, best_match, &state_multi);
+ if (state_multi)
+ {
+ *pCountry = MemFree (*pCountry);
+ return;
+ }
+ if (state_match != NULL) {
+ FindReplaceString (pCountry, "USA:", "", TRUE, TRUE);
+ FindReplaceString (pCountry, "USA", "", TRUE, TRUE);
+ best_match = NULL;
+ state_country = "USA";
+ }
}
- if (best_match == NULL && state_match != NULL)
+ if (best_match == NULL && state_match == NULL) {
+ *pCountry = MemFree (*pCountry);
+ return;
+ }
+ else if (best_match == NULL && state_match != NULL)
{
FixCountryStringForStateName (pCountry, state_match, state_country);
}
- else if (best_match != NULL)
+ else
{
cp = StringISearch (*pCountry, best_match);
len_cntry = StringLen (best_match);
@@ -12515,12 +13853,12 @@ static void FindCountryName (CharPtr PNTR pCountry, CharPtr PNTR country_list)
|| newname [len_name - 1] == ':'
|| newname [len_name - 1] == ';')
{
- newname [len_name - 1] = 0;
- len_name --;
- }
- MemFree (*pCountry);
- *pCountry = newname;
- }
+ newname [len_name - 1] = 0;
+ len_name --;
+ }
+ MemFree (*pCountry);
+ *pCountry = newname;
+ }
}
}
@@ -12598,17 +13936,254 @@ static void RemoveDoubleCommas (CharPtr PNTR country_str)
}
+static Boolean ContainsMultipleCountryNames (CharPtr PNTR list, CharPtr search_str)
+{
+ CharPtr PNTR ptr;
+ Int4 len_match;
+ CharPtr cp;
+ Boolean found_one = FALSE;
+
+ if (list == NULL || search_str == NULL) return FALSE;
+
+ for (ptr = list; ptr != NULL && *ptr != NULL; ptr++)
+ {
+ cp = StringISearch (search_str, *ptr);
+ len_match = StringLen (*ptr);
+ while (cp != NULL) {
+ /* if character after match is alpha, continue */
+ if (isalpha ((Int4)(cp [len_match]))
+ /* if character before match is alpha, continue */
+ || (cp > search_str && isalpha ((Int4)(*(cp - 1))))
+ /* if is shorter match for other item, continue */
+ || IsSubstringOfStringInList (search_str, cp, *ptr, list)) {
+ cp = StringSearch (cp + len_match, *ptr);
+ } else if (found_one) {
+ return TRUE;
+ } else {
+ found_one = TRUE;
+ cp = StringSearch (cp + len_match, *ptr);
+ }
+ }
+ }
+ return FALSE;
+}
+
+
+static CharPtr NewFixCountry (CharPtr country, CharPtr PNTR country_list)
+{
+ CharPtr cp, next_sep, start_after;
+ CharPtr valid_country = NULL, new_country = NULL, tmp;
+ Char ch;
+ CharPtr separator_list = ",:";
+ Boolean too_many_countries = FALSE;
+ Int4 len_country, len_before, len_after, len_diff;
+ ReplacePairPtr fix;
+ Boolean fix_found;
+
+ country = StringSave (country);
+ cp = country;
+ while (*cp != 0 && !too_many_countries) {
+ next_sep = cp + StringCSpn (cp, separator_list);
+ ch = *next_sep;
+ *next_sep = 0;
+
+ if (CountryIsValid (cp, NULL)) {
+ if (valid_country == NULL) {
+ valid_country = cp;
+ } else {
+ too_many_countries = TRUE;
+ }
+ } else {
+ /* see if this is a fixable country */
+ fix = country_name_fixes;
+ fix_found = FALSE;
+ while (fix->find != NULL && !fix_found) {
+ if (StringCmp (fix->find, cp) == 0) {
+ fix_found = TRUE;
+ if (valid_country == NULL) {
+ len_before = cp - country;
+ if (ch == 0) {
+ len_after = 0;
+ } else {
+ len_after = StringLen (next_sep + 1) + 1;
+ }
+ len_diff = StringLen (fix->replace) - StringLen (fix->find);
+ len_country = StringLen (country) + len_diff + len_after + 1;
+ tmp = (CharPtr) MemNew (sizeof (Char) * len_country);
+ if (len_before > 0) {
+ StringNCpy (tmp, country, len_before);
+ }
+ StringCpy (tmp + len_before, fix->replace);
+ if (len_after > 0) {
+ StringCpy (tmp + len_before + StringLen (fix->replace) + 1, next_sep + 1);
+ }
+ cp = tmp + len_before;
+ valid_country = cp;
+ next_sep = tmp + (next_sep - country) + len_diff;
+ country = MemFree (country);
+ country = tmp;
+ } else {
+ too_many_countries = TRUE;
+ }
+ }
+ fix++;
+ }
+ }
+
+ *next_sep = ch;
+ if (*next_sep == 0) {
+ cp = next_sep;
+ } else {
+ cp = next_sep + 1;
+ while (isspace (*cp)) {
+ cp++;
+ }
+ }
+ }
+ if (valid_country != NULL && !too_many_countries) {
+ too_many_countries = ContainsMultipleCountryNames (country_list, country);
+ }
+
+ if (valid_country != NULL && !too_many_countries) {
+ len_country = StringCSpn (valid_country, separator_list);
+ len_before = valid_country - country;
+
+ while (len_before > 0
+ && (isspace (country [len_before - 1])
+ || StringChr (separator_list, country [len_before - 1]) != NULL)) {
+ len_before--;
+ }
+ start_after = valid_country + len_country;
+ while (*start_after != 0
+ && (isspace (*start_after)
+ || StringChr (separator_list, *start_after) != NULL)) {
+ start_after++;
+ }
+
+ len_after = StringLen (start_after);
+
+ new_country = MemNew (sizeof (Char) * (len_country + len_before + len_after + 5));
+
+ StringNCpy (new_country, valid_country, len_country);
+ if (len_before > 0 || len_after > 0) {
+ StringCat (new_country, ": ");
+ if (len_before > 0) {
+ StringNCat (new_country, country, len_before);
+ if (len_after > 0) {
+ StringCat (new_country, ", ");
+ }
+ }
+ if (len_after > 0) {
+ StringCat (new_country, start_after);
+ }
+ }
+ }
+ country = MemFree (country);
+ return new_country;
+}
+
+
extern CharPtr GetCountryFix (CharPtr country, CharPtr PNTR country_list)
{
CharPtr new_country;
if (StringHasNoText (country)) return NULL;
+#if 1
+ new_country = NewFixCountry (country, country_list);
+#else
new_country = StringSave (country);
FixCountryNames (&new_country);
FindCountryName (&new_country, country_list);
CountryColonToComma (&new_country);
RemoveDoubleCommas (&new_country);
FixForNamedRegions (&new_country);
+#endif
return new_country;
}
+
+extern ValNodePtr ListFeaturesInLocation (BioseqPtr bsp, SeqLocPtr slp, Uint1 seqfeatChoice, Uint1 featdefChoice)
+{
+ ValNodePtr feat_list = NULL;
+ SeqMgrFeatContext fcontext;
+ SeqFeatPtr sfp;
+ Int4 loc_left, loc_right, tmp;
+
+ if (bsp == NULL || slp == NULL) return NULL;
+
+ loc_left = SeqLocStart (slp);
+ loc_right = SeqLocStop (slp);
+ if (loc_left > loc_right) {
+ tmp = loc_left;
+ loc_left = loc_right;
+ loc_right = tmp;
+ }
+ for (sfp = SeqMgrGetNextFeature (bsp, NULL, seqfeatChoice, featdefChoice, &fcontext);
+ sfp != NULL && fcontext.left <= loc_right;
+ sfp = SeqMgrGetNextFeature (bsp, sfp, seqfeatChoice, featdefChoice, &fcontext))
+ {
+ if (fcontext.right < loc_left) continue;
+ if (SeqLocCompare (sfp->location, slp) == SLC_A_IN_B)
+ {
+ ValNodeAddPointer (&feat_list, OBJ_SEQFEAT, sfp);
+ }
+ }
+ return feat_list;
+}
+
+
+extern ValNodePtr ListFeaturesOverlappingLocation (BioseqPtr bsp, SeqLocPtr slp, Uint1 seqfeatChoice, Uint1 featdefChoice)
+{
+ ValNodePtr feat_list = NULL;
+ SeqMgrFeatContext fcontext;
+ SeqFeatPtr sfp;
+ Int4 loc_left, loc_right, tmp;
+ Int4 cmp;
+
+ if (bsp == NULL || slp == NULL) return NULL;
+
+ loc_left = SeqLocStart (slp);
+ loc_right = SeqLocStop (slp);
+ if (loc_left > loc_right) {
+ tmp = loc_left;
+ loc_left = loc_right;
+ loc_right = tmp;
+ }
+ for (sfp = SeqMgrGetNextFeature (bsp, NULL, seqfeatChoice, featdefChoice, &fcontext);
+ sfp != NULL && fcontext.left <= loc_right;
+ sfp = SeqMgrGetNextFeature (bsp, sfp, seqfeatChoice, featdefChoice, &fcontext))
+ {
+ cmp = SeqLocCompare (sfp->location, slp);
+ if (cmp != SLC_NO_MATCH)
+ {
+ ValNodeAddPointer (&feat_list, OBJ_SEQFEAT, sfp);
+ }
+ }
+ return feat_list;
+}
+
+
+static void CDSInSrcFeatCallback (BioseqPtr bsp, Pointer data)
+{
+ SeqMgrFeatContext fcontext;
+ SeqFeatPtr sfp;
+
+ if (bsp == NULL || ISA_aa (bsp->mol) || data == NULL) return;
+
+ sfp = SeqMgrGetNextFeature (bsp, NULL, 0, FEATDEF_BIOSRC, &fcontext);
+ while (sfp != NULL)
+ {
+ ValNodeLink ((ValNodePtr PNTR) data, ListFeaturesInLocation (bsp, sfp->location, 0, FEATDEF_CDS));
+ sfp = SeqMgrGetNextFeature (bsp, sfp, 0, FEATDEF_BIOSRC, &fcontext);
+ }
+}
+
+extern ValNodePtr ListCodingRegionsContainedInSourceFeatures (SeqEntryPtr sep)
+{
+ ValNodePtr feat_list = NULL;
+
+ VisitBioseqsInSep (sep, &feat_list, CDSInSrcFeatCallback);
+ return feat_list;
+}
+
+
diff --git a/api/sqnutil4.c b/api/sqnutil4.c
new file mode 100755
index 00000000..5e805abc
--- /dev/null
+++ b/api/sqnutil4.c
@@ -0,0 +1,10460 @@
+/* sqnutil4.c
+* ===========================================================================
+*
+* PUBLIC DOMAIN NOTICE
+* National Center for Biotechnology Information (NCBI)
+*
+* This software/database is a "United States Government Work" under the
+* terms of the United States Copyright Act. It was written as part of
+* the author's official duties as a United States Government employee and
+* thus cannot be copyrighted. This software/database is freely available
+* to the public for use. The National Library of Medicine and the U.S.
+* Government do not place any restriction on its use or reproduction.
+* We would, however, appreciate having the NCBI and the author cited in
+* any work or product based on this material
+*
+* Although all reasonable efforts have been taken to ensure the accuracy
+* and reliability of the software and data, the NLM and the U.S.
+* Government do not and cannot warrant the performance or results that
+* may be obtained by using this software or data. The NLM and the U.S.
+* Government disclaim all warranties, express or implied, including
+* warranties of performance, merchantability or fitness for any particular
+* purpose.
+*
+* ===========================================================================
+*
+* File Name: sqnutil4.c
+*
+* Author: Colleen Bollin
+*
+* Version Creation Date: 12/27/2007
+*
+* $Revision: 1.9 $
+*
+* File Description:
+* This file contains functions for automatically generating definition lines.
+*
+* Modifications:
+* --------------------------------------------------------------------------
+* Date Name Description of modification
+* ------- ---------- -----------------------------------------------------
+*
+*
+* ==========================================================================
+*/
+#include <sqnutils.h>
+#include <ncbilang.h>
+#include <objfdef.h>
+#include <gather.h>
+#include <explore.h>
+#include <edutil.h>
+#include <salutil.h>
+#include <tofasta.h>
+#include <gbftdef.h>
+#include <gbfeat.h>
+#include <findrepl.h>
+
+/* This is a list of the modifiers that are of interest */
+/* Note that if you modify the DefLineModifiers array, */
+/* you should make the corresponding change to the DefLinePos enum. */
+
+ModifierItemGlobalData DefLineModifiers[] = {
+ { "Acronym" , TRUE , ORGMOD_acronym },
+ { "Anamorph" , TRUE , ORGMOD_anamorph },
+ { "Authority" , TRUE , ORGMOD_authority },
+ { "Bio-material" , TRUE, ORGMOD_bio_material },
+ { "Biotype" , TRUE , ORGMOD_biotype },
+ { "Biovar" , TRUE , ORGMOD_biovar },
+ { "Breed" , TRUE , ORGMOD_breed },
+ { "Cell-line" , FALSE, SUBSRC_cell_line },
+ { "Cell-type" , FALSE, SUBSRC_cell_type },
+ { "Chemovar" , TRUE , ORGMOD_chemovar },
+ { "Chromosome" , FALSE, SUBSRC_chromosome },
+ { "Clone" , FALSE, SUBSRC_clone },
+ { "Clone-lib" , FALSE, SUBSRC_clone_lib },
+ { "Collected-by" , FALSE, SUBSRC_collected_by },
+ { "Collection-date" , FALSE, SUBSRC_collection_date },
+ { "Common" , TRUE , ORGMOD_common },
+ { "Country" , FALSE, SUBSRC_country },
+ { "Cultivar" , TRUE , ORGMOD_cultivar },
+ { "Culture-collection" , TRUE , ORGMOD_culture_collection },
+ { "Dev-stage" , FALSE, SUBSRC_dev_stage },
+ { "Ecotype" , TRUE , ORGMOD_ecotype },
+ { "Endogenous-virus-name", FALSE, SUBSRC_endogenous_virus_name},
+ { "Environmental-sample" , FALSE, SUBSRC_environmental_sample },
+ { "Forma" , TRUE , ORGMOD_forma },
+ { "Forma-specialis" , TRUE , ORGMOD_forma_specialis },
+ { "Frequency" , FALSE, SUBSRC_frequency },
+ { "Genotype" , FALSE, SUBSRC_genotype },
+ { "Germline" , FALSE, SUBSRC_germline },
+ { "Group" , TRUE , ORGMOD_group },
+ { "Haplotype" , FALSE, SUBSRC_haplotype },
+ { "Identified-by" , FALSE, SUBSRC_identified_by },
+ { "Isolate" , TRUE , ORGMOD_isolate },
+ { "Isolation-source" , FALSE, SUBSRC_isolation_source },
+ { "Lab-host" , FALSE, SUBSRC_lab_host },
+ { "Lat-lon" , FALSE, SUBSRC_lat_lon },
+ { "Map" , FALSE, SUBSRC_map },
+ { "Metagenomic" , FALSE, SUBSRC_metagenomic },
+ { "Note-OrgMod" , TRUE, ORGMOD_other },
+ { "Note-SubSrc" , FALSE, SUBSRC_other },
+ { "Pathovar" , TRUE , ORGMOD_pathovar },
+ { "Plasmid-name" , FALSE, SUBSRC_plasmid_name },
+ { "Plastid-name" , FALSE, SUBSRC_plastid_name },
+ { "Pop-variant" , FALSE, SUBSRC_pop_variant },
+ { "Rearranged" , FALSE, SUBSRC_rearranged },
+ { "Segment" , FALSE, SUBSRC_segment },
+ { "Serogroup" , TRUE , ORGMOD_serogroup },
+ { "Serotype" , TRUE , ORGMOD_serotype },
+ { "Serovar" , TRUE , ORGMOD_serovar },
+ { "Sex" , FALSE, SUBSRC_sex },
+ { "Specific-host" , TRUE , ORGMOD_nat_host },
+ { "Specimen voucher" , TRUE , ORGMOD_specimen_voucher },
+ { "Strain" , TRUE , ORGMOD_strain },
+ { "Subclone" , FALSE, SUBSRC_subclone },
+ { "Subgroup" , TRUE , ORGMOD_subgroup },
+ { "Sub-species" , TRUE , ORGMOD_sub_species },
+ { "Substrain" , TRUE , ORGMOD_substrain },
+ { "Subtype" , TRUE , ORGMOD_subtype },
+ { "Synonym" , TRUE , ORGMOD_synonym },
+ { "Teleomorph" , TRUE , ORGMOD_teleomorph },
+ { "Tissue-lib" , FALSE, SUBSRC_tissue_lib },
+ { "Tissue-type" , FALSE, SUBSRC_tissue_type },
+ { "Transgenic" , FALSE, SUBSRC_transgenic },
+ { "Type" , TRUE , ORGMOD_type },
+ { "Variety" , TRUE , ORGMOD_variety }
+};
+
+#define numDefLineModifiers (sizeof (DefLineModifiers) / sizeof (ModifierItemGlobalData))
+
+NLM_EXTERN size_t NumDefLineModifiers (void)
+
+{
+ return numDefLineModifiers;
+}
+
+NLM_EXTERN CharPtr MergeValNodeStrings (ValNodePtr list, Boolean useReturn)
+
+{
+ size_t len;
+ CharPtr ptr;
+ CharPtr str;
+ CharPtr tmp;
+ ValNodePtr vnp;
+
+
+ ptr = NULL;
+ if (list != NULL) {
+ vnp = list;
+ len = 0;
+ while (vnp != NULL) {
+ if (vnp->data.ptrvalue != NULL) {
+ len += StringLen ((CharPtr) vnp->data.ptrvalue) + 1;
+ }
+ vnp = vnp->next;
+ }
+ if (len > 0) {
+ ptr = MemNew (sizeof (Char) * (len + 2));
+ if (ptr != NULL) {
+ vnp = list;
+ tmp = NULL;
+ while (vnp != NULL) {
+ str = (CharPtr) vnp->data.ptrvalue;
+ if (str != NULL) {
+ if (tmp == NULL) {
+ tmp = ptr;
+ } else if (useReturn) {
+ tmp = StringMove (tmp, "\n");
+ } else if (IsJapanese () && (tmp - ptr > 2) &&
+ IsMBLetter (tmp - 2) && IsMBLetter (str)) {
+ /* no space required between two Japanese letters. */
+ tmp = tmp;
+ } else if (str [0] != ',' && str [0] != ';' && str [0] != ':') {
+ tmp = StringMove (tmp, " ");
+ } else {
+ tmp = StringMove (tmp, " ");
+ }
+ tmp = StringMove (tmp, str);
+ }
+ vnp = vnp->next;
+ }
+ }
+ }
+ }
+ return ptr;
+}
+
+
+/* The matchFunction functions are used to identify features that meet
+ * specific requirements, usually that the feature is of a particular type.
+ * This function is used instead of simply using the subtype for the feature
+ * because some features are identified based on the contents or presence of
+ * certain modifiers.
+ * Functions of this type should always return FALSE if handed a NULL argument.
+ */
+typedef Boolean (LIBCALLBACK *matchFunction) (
+ SeqFeatPtr sfp
+);
+
+static void ListClauses (
+ ValNodePtr clauselist,
+ ValNodePtr PNTR strings,
+ Boolean allow_semicolons,
+ Boolean suppress_final_and
+);
+
+static void LabelClauses
+( ValNodePtr clause_list,
+ Uint1 biomol,
+ BioseqPtr bsp,
+ DeflineFeatureRequestListPtr rp);
+
+static CharPtr GetProductName
+( SeqFeatPtr cds,
+ BioseqPtr bsp,
+ DeflineFeatureRequestListPtr rp);
+
+#define DEFLINE_FEATLIST 1
+#define DEFLINE_CLAUSEPLUS 2
+#define DEFLINE_REMOVEFEAT 3
+
+typedef struct featurelabeldata {
+ Boolean pluralizable;
+ Boolean is_typeword_first;
+ CharPtr typeword;
+ CharPtr description;
+ CharPtr productname;
+} FeatureLabelData, PNTR FeatureLabelPtr;
+
+
+typedef struct featureclause {
+ ValNodePtr featlist;
+ FeatureLabelData feature_label_data;
+ CharPtr allelename;
+ CharPtr interval;
+ Boolean is_alt_spliced;
+ Boolean has_mrna;
+ SeqLocPtr slp;
+ GeneRefPtr grp;
+ Boolean clause_info_only;
+ Boolean is_unknown;
+ Boolean make_plural;
+ Boolean delete_me;
+ /* this information used only for segments */
+ Int2 numivals;
+ Int4Ptr ivals;
+} FeatureClauseData, PNTR FeatureClausePtr;
+
+FeatureClausePtr NewFeatureClause (
+ SeqFeatPtr sfp,
+ BioseqPtr bsp,
+ DeflineFeatureRequestListPtr rp);
+
+static void PluralizeConsolidatedClauseDescription (
+ FeatureClausePtr fcp
+);
+
+typedef Boolean (LIBCALLBACK *ShouldRemoveFunction) (
+ SeqFeatPtr sfp,
+ FeatureClausePtr parent_fcp,
+ FeatureClausePtr this_fcp,
+ BioseqPtr bsp,
+ Boolean isLonely,
+ Boolean isRequested,
+ Boolean isSegment,
+ DeflineFeatureRequestListPtr rp
+);
+
+/* This section of the code contains some functions for dealing with
+ * linked lists of strings */
+
+/* This function finds the first occurrence of "search" in one of the
+ * strings in list "strings".
+ * "search" could be part of the string or could be the entire string.
+ */
+static ValNodePtr FindStringInStrings (
+ ValNodePtr strings,
+ CharPtr search
+)
+{
+ while (strings != NULL)
+ {
+ if (StringStr (strings->data.ptrvalue, search))
+ {
+ return strings;
+ }
+ strings = strings->next;
+ }
+ return NULL;
+}
+
+/* This function finds the first item in "strings" that is identical to
+ * "value".
+ */
+extern ValNodePtr FindExactStringInStrings (
+ ValNodePtr strings,
+ CharPtr value
+)
+{
+ ValNodePtr string_match;
+
+ for (string_match = FindStringInStrings (strings, value);
+ string_match != NULL
+ && StringCmp (string_match->data.ptrvalue, value) != 0;
+ string_match = FindStringInStrings (string_match->next, value))
+ {}
+ return string_match;
+}
+
+/* This function creates a new linked list of strings with copies of
+ * contents of orig.
+ */
+static ValNodePtr CopyStrings (
+ ValNodePtr orig
+)
+{
+ ValNodePtr new_string_start = NULL;
+
+ while (orig != NULL)
+ {
+ ValNodeAddStr (&new_string_start, 0,
+ StringSave (orig->data.ptrvalue));
+ orig = orig->next;
+ }
+ return new_string_start;
+}
+
+/*
+ * This section of the code contains functions and structures for obtaining a
+ * description of the organism in the record, including functions for finding
+ * the combination of modifiers that will make each organism description
+ * unique.
+ * The method used for determining the best combination of modifiers involves
+ * creating a list of required modifiers, and then creating a list of
+ * combinations of modifiers by adding modifiers one at a time
+ * to see if the additional modifiers provide any more differentiation in
+ * the list.
+ * In order to do this, I start with a list of required modifiers, and
+ * then create copies of this list. For each copy I add one of the modifiers
+ * that are present in the bio sources and not already on the list.
+ * If adding the modifier increases the differentiation, I add that copy to
+ * the list of possible combinations, otherwise I discard it.
+ * I then make copies of all of the new items I added to the list and
+ * add another modifier to each list, keeping the combinations that increase
+ * the differentiation and discarding the rest.
+ * This process continues until I have a combination that produces completely
+ * differentiated bio sources, or I run out of possible combinations.
+ * If I run out of possible combinations, I select the best combination from
+ * the list.
+ * This search process occurs in FindBestCombo. The majority of the functions
+ * in this section are here to support FindBestCombo, specifically to create,
+ * copy, and grow lists of combinations.
+ */
+
+/* BioSrcDescData is used to calculate the best possible combination of
+ * source and organism modifiers for uniqueness.
+ * biop contains the BioSourcePtr from a sequence in the record.
+ * strings contains a list of string representations of the modifiers
+ * for this combination for this organism.
+ */
+typedef struct biosrcdescdata {
+ BioSourcePtr biop;
+ ValNodePtr strings;
+ Pointer next;
+} BioSrcDescData, PNTR BioSrcDescPtr;
+
+/* OrgGroupData is used to calculate the best possible combination of
+ * source and organism modifiers for uniqueness.
+ * org_list is a list of all organisms that have identical descriptions
+ * using the current set of modifiers.
+ * num_organisms contains the number of organisms with identical descriptions.
+ */
+typedef struct orggroupdata {
+ BioSrcDescPtr org_list;
+ Int4 num_organisms;
+ Pointer next;
+} OrgGroupData, PNTR OrgGroupPtr;
+
+/* ModifierCombinationData is used to calculate the best possible combination
+ * of source and organism modifiers for uniqueness.
+ * num_groups is the number of groups of organisms with identical descriptions
+ * using the modifiers specified in modifier_indices.
+ * num_mods is the number of modifiers specified in modifier_indices.
+ * max_orgs_in_group is the maximum number of organisms in any one group.
+ * num_unique_orgs is the number of organisms that are alone in their groups
+ * i.e., their description is unique.
+ * modifier_indices is the list of modifier indices for this combination.
+ * group_list is the list of groups of organisms with identical descriptions
+ * using the modifiers specified in modifier_indices.
+ */
+typedef struct modifiercombination {
+ Int4 num_groups;
+ Int4 num_mods;
+ Int4 max_orgs_in_group;
+ Int4 num_unique_orgs;
+ ValNodePtr modifier_indices;
+ OrgGroupPtr group_list;
+ Pointer next;
+} ModifierCombinationData, PNTR ModifierCombinationPtr;
+
+static Boolean IsDeflineModifierRequiredByDefault (Boolean is_orgmod, Int2 index)
+{
+ if (!is_orgmod
+ && (index == SUBSRC_endogenous_virus_name
+ || index == SUBSRC_plasmid_name
+ || index == SUBSRC_transgenic)) {
+ return TRUE;
+ } else {
+ return FALSE;
+ }
+}
+
+
+static void AddOneSubtypeField (ValNodePtr PNTR sq_list, SourceQualDescPtr orig, CharPtr str, Uint1 subfield)
+{
+ SourceQualDescPtr sqdp_cpy;
+
+ if (sq_list == NULL || orig == NULL) {
+ return;
+ }
+ sqdp_cpy = (SourceQualDescPtr) MemNew (sizeof (SourceQualDescData));
+ MemCpy (sqdp_cpy, orig, sizeof (SourceQualDescData));
+
+ sqdp_cpy->name = str;
+ sqdp_cpy->subfield = subfield;
+
+ ValNodeAddPointer (sq_list, 0, sqdp_cpy);
+}
+
+
+static void AddSubtypeFields (ValNodePtr PNTR sq_list, SourceQualDescPtr orig)
+{
+ if (sq_list == NULL || orig == NULL) return;
+
+ if (orig->isOrgMod) {
+ switch (orig->subtype) {
+ case ORGMOD_specimen_voucher:
+ AddOneSubtypeField (sq_list, orig, "specimen-voucher INST", 1);
+ AddOneSubtypeField (sq_list, orig, "specimen-voucher COLL", 2);
+ AddOneSubtypeField (sq_list, orig, "specimen-voucher SpecID", 3);
+ break;
+ case ORGMOD_culture_collection:
+ AddOneSubtypeField (sq_list, orig, "culture-collection INST", 1);
+ AddOneSubtypeField (sq_list, orig, "culture-collection COLL", 2);
+ AddOneSubtypeField (sq_list, orig, "culture-collection SpecID", 3);
+ break;
+ case ORGMOD_bio_material:
+ AddOneSubtypeField (sq_list, orig, "bio-material INST", 1);
+ AddOneSubtypeField (sq_list, orig, "bio-material COLL", 2);
+ AddOneSubtypeField (sq_list, orig, "bio-material SpecID", 3);
+ break;
+ }
+ }
+}
+
+
+static void AddQualList (ValNodePtr PNTR list, Nlm_QualNameAssocPtr qual_list, Boolean is_orgmod, Boolean use_alternate_note_name)
+{
+ Int4 k;
+ SourceQualDescPtr sqdp;
+
+ for (k = 0; qual_list[k].name != NULL; k++) {
+ if (StringHasNoText (qual_list[k].name)) {
+ continue;
+ }
+ sqdp = (SourceQualDescPtr) MemNew (sizeof (SourceQualDescData));
+ if (sqdp != NULL)
+ {
+ if (use_alternate_note_name
+ && ((is_orgmod && qual_list[k].value == ORGMOD_other)
+ || (!is_orgmod && qual_list[k].value == SUBSRC_other)))
+ {
+ if (is_orgmod) {
+ sqdp->name = "Note -- OrgMod";
+ } else {
+ sqdp->name = "Note -- SubSource";
+ }
+ } else {
+ sqdp->name = qual_list[k].name;
+ }
+ sqdp->isOrgMod = is_orgmod;
+ sqdp->subtype = qual_list[k].value;
+ sqdp->subfield = 0;
+ ValNodeAddPointer (list, 0, sqdp);
+ }
+ AddSubtypeFields (list, sqdp);
+ }
+}
+
+
+static void AddNoteQual (ValNodePtr PNTR list, Boolean is_orgmod, Boolean use_alternate_note_name)
+{
+ SourceQualDescPtr sqdp;
+
+ if (list == NULL) return;
+
+ sqdp = (SourceQualDescPtr) MemNew (sizeof (SourceQualDescData));
+ if (sqdp != NULL)
+ {
+ if (use_alternate_note_name)
+ {
+ if (is_orgmod) {
+ sqdp->name = "Note -- OrgMod";
+ } else {
+ sqdp->name = "Note -- SubSource";
+ }
+ } else {
+ sqdp->name = "Note";
+ }
+ sqdp->isOrgMod = is_orgmod;
+ if (is_orgmod) {
+ sqdp->subtype = ORGMOD_other;
+ } else {
+ sqdp->subtype = SUBSRC_other;
+ }
+ sqdp->subfield = 0;
+ ValNodeAddPointer (list, 0, sqdp);
+ }
+}
+
+
+static int LIBCALLBACK SortVnpBySourceQualDesc (VoidPtr ptr1, VoidPtr ptr2)
+
+{
+ SourceQualDescPtr str1;
+ SourceQualDescPtr str2;
+ ValNodePtr vnp1;
+ ValNodePtr vnp2;
+
+ if (ptr1 != NULL && ptr2 != NULL) {
+ vnp1 = *((ValNodePtr PNTR) ptr1);
+ vnp2 = *((ValNodePtr PNTR) ptr2);
+ if (vnp1 != NULL && vnp2 != NULL) {
+ str1 = (SourceQualDescPtr) vnp1->data.ptrvalue;
+ str2 = (SourceQualDescPtr) vnp2->data.ptrvalue;
+ if (str1 != NULL && str2 != NULL
+ && str1->name != NULL && str2->name != NULL) {
+ return StringICmp (str1->name, str2->name);
+ }
+ }
+ }
+ return 0;
+}
+
+
+extern ValNodePtr GetSourceQualDescList (Boolean get_subsrc, Boolean get_orgmod, Boolean get_discouraged, Boolean get_discontinued)
+{
+ ValNodePtr source_qual_list = NULL;
+
+ if (get_orgmod) {
+ AddQualList (&source_qual_list, current_orgmod_subtype_alist, TRUE, get_subsrc);
+ if (get_discouraged) {
+ AddQualList (&source_qual_list, discouraged_orgmod_subtype_alist, TRUE, get_subsrc);
+ }
+ if (get_discontinued) {
+ AddQualList (&source_qual_list, discontinued_orgmod_subtype_alist, TRUE, get_subsrc);
+ }
+ AddNoteQual (&source_qual_list, TRUE, get_subsrc);
+ }
+ if (get_subsrc) {
+ AddQualList (&source_qual_list, current_subsource_subtype_alist, FALSE, get_orgmod);
+ if (get_discouraged) {
+ AddQualList (&source_qual_list, discouraged_subsource_subtype_alist, FALSE, get_orgmod);
+ }
+ if (get_discontinued) {
+ AddQualList (&source_qual_list, discontinued_subsource_subtype_alist, FALSE, get_orgmod);
+ }
+ AddNoteQual (&source_qual_list, FALSE, get_orgmod);
+ }
+
+ source_qual_list = ValNodeSort (source_qual_list, SortVnpBySourceQualDesc);
+ return source_qual_list;
+}
+
+/*
+ * The CountModifiersProc is used as the callback function for
+ * VisitBioSourcesInSep when we are getting a list of all the modifiers
+ * that appear in the sources. We also obtain, for each modifier class,
+ * the first value seen, whether or not each value seen is unique for
+ * for the modifier, and whether or not the modifier is present for all
+ * sources.
+ */
+static void CountModifiersProc (
+ BioSourcePtr biop,
+ Pointer userdata
+)
+{
+ ModifierItemLocalPtr ItemList;
+ OrgModPtr mod;
+ SubSourcePtr ssp;
+ Int2 i;
+ Boolean found_this_modifier;
+
+ if (biop == NULL) return;
+ ItemList = (ModifierItemLocalPtr) userdata;
+
+ for (i=0; i < numDefLineModifiers; i++)
+ {
+ found_this_modifier = FALSE;
+ if (DefLineModifiers[i].isOrgMod)
+ {
+ if ( biop->org != NULL && biop->org->orgname != NULL)
+ {
+ mod = biop->org->orgname->mod;
+ while (mod != NULL
+ && mod->subtype != DefLineModifiers[i].subtype)
+ {
+ mod = mod->next;
+ }
+ if (mod != NULL && mod->subname != NULL)
+ {
+ found_this_modifier = TRUE;
+ if (ItemList[i].first_value_seen != NULL)
+ {
+ if (StringCmp (ItemList[i].first_value_seen, mod->subname) != 0)
+ {
+ ItemList[i].is_unique = FALSE;
+ }
+ }
+ else
+ {
+ ItemList[i].first_value_seen = mod->subname;
+ }
+ if ( FindExactStringInStrings (ItemList[i].values_seen, mod->subname)
+ == NULL)
+ {
+ ValNodeAddStr (&ItemList[i].values_seen, 0, mod->subname);
+ }
+ else
+ {
+ ItemList[i].all_unique = FALSE;
+ }
+ }
+ }
+ } else {
+ ssp = biop->subtype;
+ while (ssp != NULL && ssp->subtype != DefLineModifiers[i].subtype)
+ {
+ ssp = ssp->next;
+ }
+ if (ssp != NULL && ssp->name != NULL)
+ {
+ found_this_modifier = TRUE;
+ if (ItemList[i].first_value_seen != NULL)
+ {
+ if (StringCmp (ItemList[i].first_value_seen, ssp->name) != 0)
+ {
+ ItemList[i].is_unique = FALSE;
+ }
+ }
+ else
+ {
+ ItemList[i].first_value_seen = ssp->name;
+ }
+ if ( FindExactStringInStrings (ItemList[i].values_seen, ssp->name)
+ == NULL)
+ {
+ ValNodeAddStr (&ItemList[i].values_seen, 0, ssp->name);
+ }
+ else
+ {
+ ItemList[i].all_unique = FALSE;
+ }
+ }
+ }
+ if (found_this_modifier)
+ {
+ ItemList[i].any_present = TRUE;
+ } else {
+ ItemList[i].all_present = FALSE;
+ }
+ }
+}
+
+/* The CountModifiers function visits all of the bio sources, determining
+ * which modifiers are present, which modifiers have only one value,
+ * which modifiers have all different values, and which modifiers are
+ * present in all sources.
+ * After this survey is complete, the function prepares a short summary
+ * of the above information for each modifier, which is used in the
+ * definition line options dialog.
+ */
+NLM_EXTERN void CountModifiers (
+ ModifierItemLocalPtr ItemList,
+ SeqEntryPtr sep
+)
+{
+ Int2 i;
+
+ for (i=0; i < numDefLineModifiers; i++)
+ {
+ ItemList[i].all_present = TRUE;
+ ItemList[i].is_unique = TRUE;
+ ItemList[i].first_value_seen = NULL;
+ ItemList[i].values_seen = NULL;
+ ItemList[i].all_unique = TRUE;
+ }
+
+ VisitBioSourcesInSep (sep, ItemList, CountModifiersProc);
+
+ for (i=0; i < numDefLineModifiers; i++)
+ {
+ if (ItemList[i].all_present && ItemList[i].all_unique)
+ {
+ ItemList[i].status = "All present, all unique";
+ }
+ else if (ItemList[i].all_present && ItemList[i].is_unique)
+ {
+ ItemList[i].status = "All present, one unique";
+ }
+ else if (ItemList[i].all_present && ! ItemList[i].is_unique)
+ {
+ ItemList[i].status = "All present, mixed";
+ }
+ else if (! ItemList[i].all_present && ItemList[i].all_unique)
+ {
+ ItemList[i].status = "Some missing, all unique";
+ }
+ else if (! ItemList[i].all_present && ItemList[i].is_unique)
+ {
+ ItemList[i].status = "Some missing, one unique";
+ }
+ else if (! ItemList[i].all_present && ! ItemList[i].is_unique)
+ {
+ ItemList[i].status = "Some missing, mixed";
+ }
+ }
+}
+
+/* The BioSrcDescData structure is used to hold a BioSourcePtr, a list
+ * of strings used to describe the biosource, including the taxonomy name
+ * and the values of all of the modifiers selected so far for this bio
+ * source, and a pointer to the next BioSrcDescData structure in the list.
+ */
+
+/* The CopyBioSrcDescPtr function creates a copy of the linked list of
+ * BioSrcDescData structures.
+ */
+static BioSrcDescPtr CopyBioSrcDescPtr (
+ BioSrcDescPtr orig
+)
+{
+ BioSrcDescPtr new_bsdp_start;
+
+ if (orig == NULL) return NULL;
+
+ new_bsdp_start = (BioSrcDescPtr) MemNew (sizeof (BioSrcDescData));
+ if (new_bsdp_start == NULL) return NULL;
+
+ new_bsdp_start->biop = orig->biop;
+ new_bsdp_start->strings = CopyStrings (orig->strings);
+ new_bsdp_start->next = CopyBioSrcDescPtr (orig->next);
+ return new_bsdp_start;
+}
+
+/* The FreeBioSrcDescPtr function frees the memory associated with a
+ * linked list of BioSrcDescData structures.
+ */
+static void FreeBioSrcDescPtr (
+ BioSrcDescPtr bsdp
+)
+{
+ if (bsdp == NULL) return;
+ FreeBioSrcDescPtr (bsdp->next);
+ bsdp->biop = NULL;
+ ValNodeFreeData (bsdp->strings);
+ MemFree (bsdp);
+}
+
+/* The AddQualToBioSrcDescPtr function finds the qualifier at the
+ * feature_index position in the DefLineModifiers array in the
+ * BioSourcePtr and adds the value for that modifier to the array
+ * of strings describing the bio source.
+ */
+static void AddQualToBioSrcDescPtr (
+ BioSrcDescPtr bsdp,
+ ModifierItemLocalPtr qual,
+ Int2 feature_index
+)
+{
+ OrgModPtr mod;
+ SubSourcePtr ssp;
+ CharPtr tmp;
+
+ if (bsdp == NULL) return;
+ if (bsdp->biop == NULL) return;
+
+ if (DefLineModifiers[feature_index].isOrgMod)
+ {
+ if (bsdp->biop->org == NULL || bsdp->biop->org->orgname == NULL) return;
+ mod = bsdp->biop->org->orgname->mod;
+ while (mod != NULL
+ && mod->subtype != DefLineModifiers[feature_index].subtype)
+ {
+ mod = mod->next;
+ }
+ if (mod != NULL && mod->subname != NULL)
+ {
+ if (mod->subtype == ORGMOD_specimen_voucher && StringNICmp (mod->subname, "personal:", 9) == 0)
+ {
+ tmp = mod->subname + 9;
+ while (isspace (*tmp))
+ {
+ tmp++;
+ }
+ }
+ else
+ {
+ tmp = mod->subname;
+ }
+ ValNodeCopyStr( &(bsdp->strings), 0, tmp);
+ }
+ } else {
+ ssp = bsdp->biop->subtype;
+ while (ssp != NULL
+ && ssp->subtype != DefLineModifiers[feature_index].subtype)
+ {
+ ssp = ssp->next;
+ }
+ if (ssp != NULL)
+ {
+ if (ssp->subtype == SUBSRC_transgenic)
+ {
+ ValNodeCopyStr( &(bsdp->strings), 0, "transgenic");
+ }
+ else if (ssp->name != NULL)
+ {
+ ValNodeCopyStr( &(bsdp->strings), 0, ssp->name);
+ }
+ }
+ }
+}
+
+/* The CompareOrganismDescriptors function compares the contents of the
+ * lists of strings for each BioSrcDesc item.
+ * The function returns:
+ * -1 if org1 < org2
+ * 0 if org1 = org2
+ * 1 if org1 > org2
+ */
+static int CompareOrganismDescriptors (
+ BioSrcDescPtr org1,
+ BioSrcDescPtr org2
+)
+{
+ ValNodePtr vnp1, vnp2;
+ int cmpval;
+
+ vnp1 = org1->strings;
+ vnp2 = org2->strings;
+
+ while (vnp1 != NULL && vnp2 != NULL)
+ {
+ cmpval = StringCmp (vnp1->data.ptrvalue, vnp2->data.ptrvalue);
+ if (cmpval != 0) return cmpval;
+
+ vnp1 = vnp1->next;
+ vnp2 = vnp2->next;
+ }
+ if (vnp1 == NULL && vnp2 == NULL)
+ {
+ return 0;
+ }
+ else if (vnp1 != NULL && vnp2 == NULL)
+ {
+ return 1;
+ }
+ else
+ {
+ return -1;
+ }
+}
+
+/* The OrgGroupData structure contains a list of BioSrcDescData items
+ * for which the contents of the descriptive strings list are identical,
+ * i.e., all the organisms in the group would have the same description
+ * if you used the modifiers used to generate this list of strings.
+ * The structure also contains the number of organisms in the list
+ * so that it will be easy to tell that the OrgGroup now contains a
+ * single organism with a unique description.
+ */
+
+/* The CopyOrgGroupList function creates a copy of the list of OrgGroups */
+static OrgGroupPtr CopyOrgGroupList (
+ OrgGroupPtr orig
+)
+{
+ OrgGroupPtr new_ogp_start;
+
+ if (orig == NULL) return NULL;
+
+ new_ogp_start = (OrgGroupPtr) MemNew (sizeof (OrgGroupData));
+ if (new_ogp_start == NULL) return NULL;
+
+ new_ogp_start->num_organisms = orig->num_organisms;
+ new_ogp_start->org_list = CopyBioSrcDescPtr (orig->org_list);
+ new_ogp_start->next = CopyOrgGroupList (orig->next);
+ return new_ogp_start;
+}
+
+/* The FreeOrgGroupPtr function frees the memory associated with a
+ * list of OrgGroups */
+static void FreeOrgGroupPtr (
+ OrgGroupPtr ogp
+)
+{
+ if (ogp == NULL) return;
+ FreeOrgGroupPtr (ogp->next);
+ FreeBioSrcDescPtr (ogp->org_list);
+ MemFree (ogp);
+ return;
+}
+
+/* The ReorderGroupOrgs function sorts the OrgGroup list based on the results
+ * of the CompareOrganismDescriptors function.
+ */
+static void ReorderGroupOrgs (
+ OrgGroupPtr this_group
+)
+{
+ BioSrcDescPtr bsdp;
+ BioSrcDescPtr nextBsdp;
+ BioSrcDescPtr prevBsdp;
+ Boolean swap_needed = TRUE;
+
+ if (this_group->org_list == NULL) return;
+ if (this_group->org_list->next == NULL) return;
+
+ while (swap_needed)
+ {
+ swap_needed = FALSE;
+ bsdp = this_group->org_list;
+ prevBsdp = NULL;
+ while (bsdp->next != NULL)
+ {
+ nextBsdp = bsdp->next;
+ if (CompareOrganismDescriptors (bsdp, nextBsdp) > 0)
+ {
+ swap_needed = TRUE;
+ bsdp->next = nextBsdp->next;
+ nextBsdp->next = bsdp;
+ if (prevBsdp == NULL)
+ {
+ this_group->org_list = nextBsdp;
+ }
+ else
+ {
+ prevBsdp->next = nextBsdp;
+ }
+ prevBsdp = nextBsdp;
+ }
+ else
+ {
+ prevBsdp = bsdp;
+ bsdp = bsdp->next;
+ }
+ }
+ }
+}
+
+/* The ReGroupOrgs function operates on a single OrgGroup item.
+ * If any of the BioSrcDesc items in the group now have different
+ * descriptions, the function breaks it up into smaller, homogenous OrgGroups.
+ */
+static void ReGroupOrgs (
+ OrgGroupPtr this_group
+)
+{
+ BioSrcDescPtr bsdp;
+ OrgGroupPtr new_group;
+ int num_organisms;
+
+ if (this_group == NULL) return;
+ bsdp = this_group->org_list;
+ if (bsdp == NULL) return;
+ num_organisms = 0;
+ while (bsdp->next != NULL)
+ {
+ num_organisms ++;
+ if (CompareOrganismDescriptors (bsdp, bsdp->next) != 0)
+ {
+ /* create new group to hold next set of organisms */
+ new_group = (OrgGroupPtr) MemNew (sizeof (OrgGroupData));
+ if (new_group == NULL) return;
+ new_group->org_list = bsdp->next;
+ new_group->num_organisms = this_group->num_organisms - num_organisms;
+ new_group->next = this_group->next;
+ this_group->next = new_group;
+ this_group->num_organisms = num_organisms;
+ bsdp->next = NULL;
+ ReGroupOrgs (new_group);
+ }
+ else
+ {
+ bsdp = bsdp->next;
+ }
+ }
+}
+
+/* The AddQualToGroup function operates on a single OrgGroup item.
+ * The function adds a qualifier to each BioSrcDesc item in the OrgGroup,
+ * breaks the group into multiple groups if the group is no longer
+ * homogenous, and sorts the new list.
+ */
+static void AddQualToGroup (
+ OrgGroupPtr this_group,
+ ModifierItemLocalPtr qual,
+ Int2 feature_index
+)
+{
+ BioSrcDescPtr bsdp;
+
+ if (this_group == NULL) return;
+
+ bsdp = this_group->org_list;
+ while (bsdp != NULL)
+ {
+ AddQualToBioSrcDescPtr (bsdp, qual, feature_index);
+ bsdp= bsdp->next;
+ }
+
+ /* now reorder organisms and break up group */
+ ReorderGroupOrgs (this_group);
+
+ ReGroupOrgs (this_group);
+}
+
+/* The AddQualToGroupList function operates on a list of OrgGroup items.
+ * It calls AddQualToGroup for each item in the list.
+ */
+static void AddQualToGroupList (
+ OrgGroupPtr group_list,
+ ModifierItemLocalPtr qual,
+ Int2 feature_index
+)
+{
+ OrgGroupPtr ogp;
+
+ ogp = group_list;
+ while (ogp != NULL)
+ {
+ AddQualToGroup (ogp, qual, feature_index);
+ ogp = ogp->next;
+ }
+}
+
+/* The CopyModifierIndices function creates a new ValNode list with the
+ * same data.intvalue values for each node as the original modifier_indices
+ * ValNode list.
+ */
+static ValNodePtr CopyModifierIndices (
+ ValNodePtr modifier_indices
+)
+{
+ ValNodePtr new_indices;
+
+ if (modifier_indices == NULL) return NULL;
+ new_indices = ValNodeNew (NULL);
+ if (new_indices == NULL) return NULL;
+ new_indices->choice = modifier_indices->choice;
+ new_indices->data.intvalue = modifier_indices->data.intvalue;
+ new_indices->next = CopyModifierIndices (modifier_indices->next);
+ return new_indices;
+}
+
+/* The CopyModifierCombo creates a copy of a ModificationCombination item.
+ * This includes creating a copy of the number and list of modifiers
+ * and a copy of the number and list of OrgGroups, as well as copying the
+ * maximum number of organisms in any one group and the number of unique
+ * organism descriptions produced by this combination of modifiers.
+ */
+static ModifierCombinationPtr CopyModifierCombo (
+ ModifierCombinationPtr m
+)
+{
+ ModifierCombinationPtr newm;
+ ValNodePtr vnp;
+ ValNodePtr newval;
+
+ newm = (ModifierCombinationPtr) MemNew (sizeof (ModifierCombinationData));
+ if (newm == NULL) return NULL;
+
+ newm->next = NULL;
+
+ /* copy list of modifier indices */
+ newm->num_mods = m->num_mods;
+ newm->modifier_indices = NULL;
+ vnp = m->modifier_indices;
+ if (vnp != NULL)
+ {
+ newm->modifier_indices = ValNodeNew (NULL);
+ if (newm->modifier_indices == NULL) return NULL;
+ newm->modifier_indices->data.intvalue = vnp->data.intvalue;
+ vnp = vnp->next;
+ while (vnp != NULL)
+ {
+ newval = ValNodeNew (newm->modifier_indices);
+ if (newval == NULL) return NULL;
+ newval->data.intvalue = vnp->data.intvalue;
+ vnp = vnp->next;
+ }
+ }
+
+ /* copy groups */
+ newm->num_groups = m->num_groups;
+ newm->group_list = CopyOrgGroupList (m->group_list);
+
+ return newm;
+}
+
+/* This function creates a new ModifierCombination item using the supplied
+ * OrgGroup list. It calculates the number of groups, maximum number of
+ * organisms in any one group, and number of unique organisms.
+ * Initially there are no modifiers.
+ */
+static ModifierCombinationPtr NewModifierCombo (
+ OrgGroupPtr group_list
+)
+{
+ ModifierCombinationPtr newm;
+ OrgGroupPtr ogp;
+
+ newm = (ModifierCombinationPtr) MemNew (sizeof (ModifierCombinationData));
+ if (newm == NULL) return NULL;
+
+ newm->num_mods = 0;
+ newm->modifier_indices = NULL;
+ newm->num_unique_orgs = 0;
+
+ /* copy groups */
+ newm->group_list = CopyOrgGroupList (group_list);
+
+ ogp = newm->group_list;
+ newm->max_orgs_in_group = 0;
+ newm->num_groups = 0;
+ while (ogp != NULL)
+ {
+ if (newm->max_orgs_in_group < ogp->num_organisms)
+ newm->max_orgs_in_group = ogp->num_organisms;
+ if (ogp->num_organisms == 1)
+ newm->num_unique_orgs ++;
+ newm->num_groups ++;
+ ogp = ogp->next;
+ }
+
+ newm->next = NULL;
+ return newm;
+}
+
+/* This function frees the memory associated with a list of
+ * ModifierCombination items.
+ */
+static void FreeModifierCombo (
+ ModifierCombinationPtr m
+)
+{
+ if (m == NULL) return;
+ FreeModifierCombo (m->next);
+ ValNodeFree (m->modifier_indices);
+ FreeOrgGroupPtr (m->group_list);
+ MemFree (m);
+}
+
+/* This function adds the qualifier at the feature_index position in the
+ * DefLineModifiers array to each OrgGroup in the list and recalculates
+ * the maximum number of organisms in any one group and the number of
+ * unique organism descriptions generated by this new combination of
+ * modifiers.
+ */
+static void AddQualToModifierCombo (
+ ModifierCombinationPtr m,
+ ModifierItemLocalPtr qual,
+ Int2 feature_index
+)
+{
+ OrgGroupPtr ogp;
+ ValNodePtr vnp;
+
+ if (m == NULL) return;
+
+ /* now try adding the modifier, see if the number of groups goes up */
+ /* if the number of organisms in each group is one, we can stop */
+ vnp = ValNodeNew (m->modifier_indices);
+ if (vnp == NULL) return;
+ if (m->modifier_indices == NULL)
+ {
+ m->modifier_indices = vnp;
+ }
+ vnp->data.intvalue = feature_index;
+ m->num_mods ++;
+ AddQualToGroupList (m->group_list, qual, feature_index);
+ ogp = m->group_list;
+ m->max_orgs_in_group = 0;
+ m->num_unique_orgs = 0;
+ m->num_groups = 0;
+ while (ogp != NULL)
+ {
+ if (m->max_orgs_in_group < ogp->num_organisms)
+ m->max_orgs_in_group = ogp->num_organisms;
+ if (ogp->num_organisms == 1)
+ m->num_unique_orgs ++;
+ m->num_groups ++;
+ ogp = ogp->next;
+ }
+}
+
+/* This function creates the initial OrgGroup list that is copied for every
+ * ModifierCombination item.
+ */
+static void BuildTaxOrgGroupList (
+ BioSourcePtr biop,
+ Pointer userdata
+)
+{
+ OrgGroupPtr ogp;
+ OrgGroupPtr prevOgp;
+ OrgGroupPtr PNTR pogp;
+ BioSrcDescPtr newBsdp;
+ OrgRefPtr orp;
+ int cmpval;
+
+ pogp = (OrgGroupPtr PNTR) userdata;
+ ogp = *pogp;
+
+ newBsdp = (BioSrcDescPtr) MemNew (sizeof (BioSrcDescData));
+ if (newBsdp == NULL) return;
+ newBsdp->biop = biop;
+ newBsdp->next = NULL;
+ newBsdp->strings = NULL;
+
+ /* add tax name as first string */
+ /* later, move this into a separate function and add special handling */
+ orp = biop->org;
+ if (orp != NULL && orp->taxname != NULL)
+ {
+ ValNodeCopyStr (&(newBsdp->strings), 0, orp->taxname);
+ }
+
+ prevOgp = NULL;
+ cmpval = -1;
+ while (ogp != NULL && cmpval < 0)
+ {
+ if (ogp->org_list != NULL)
+ {
+ cmpval = CompareOrganismDescriptors (ogp->org_list, newBsdp);
+ if (cmpval == 0)
+ {
+ newBsdp->next = ogp->org_list;
+ ogp->org_list = newBsdp;
+ ogp->num_organisms ++;
+ }
+ }
+ if (cmpval < 0)
+ {
+ prevOgp = ogp;
+ ogp = ogp->next;
+ }
+ }
+ if (cmpval != 0)
+ {
+ /* create new group */
+ ogp = (OrgGroupPtr) MemNew (sizeof (OrgGroupData));
+ if (ogp == NULL) return;
+ ogp->org_list = newBsdp;
+ ogp->num_organisms = 1;
+ ogp->next = NULL;
+ if (prevOgp == NULL)
+ {
+ ogp->next = *pogp;
+ *pogp = ogp;
+ }
+ else
+ {
+ ogp->next = prevOgp->next;
+ prevOgp->next = ogp;
+ }
+ }
+}
+
+typedef struct bestsortdata {
+ Int4 feature_index;
+ Boolean all_unique;
+ Boolean all_present;
+ Boolean is_unique;
+} BestSortData, PNTR BestSortPtr;
+
+static Boolean Index1FoundBeforeIndex2 (
+ Int4 index1,
+ Int4 index2,
+ ValNodePtr list
+)
+{
+ ValNodePtr vnp;
+ BestSortPtr bsp;
+ for (vnp = list; vnp != NULL; vnp = vnp->next)
+ {
+ if ((bsp = vnp->data.ptrvalue) == NULL)
+ {
+ continue;
+ }
+ if (bsp->feature_index == index1) return TRUE;
+ if (bsp->feature_index == index2) return FALSE;
+ }
+ return FALSE;
+}
+
+/* This function determines whether or not we should try adding this modifier
+ * to our combination. If we've already tried it and not added it to the list,
+ * there's no reason to try adding it again.
+ */
+static Boolean OkToTryAddingQual (
+ ModifierCombinationPtr m,
+ ModifierItemLocalPtr ItemList,
+ ValNodePtr available_modifiers_list,
+ Int2 feature_index
+)
+{
+ ValNodePtr vnp;
+
+ /* if feature_index indicates a value we don't use for best combos, skip */
+ if (feature_index == DEFLINE_POS_Map)
+ {
+ return FALSE;
+ }
+
+ if (m == NULL) return TRUE;
+
+ /* if feature_index is lower than anything else on list (other than */
+ /* a required value, this is a repeat combination, so skip it */
+ vnp = m->modifier_indices;
+ while (vnp != NULL)
+ {
+ if (feature_index == m->modifier_indices->data.intvalue)
+ return FALSE;
+ if (! ItemList[m->modifier_indices->data.intvalue].required &&
+ Index1FoundBeforeIndex2 (feature_index,
+ m->modifier_indices->data.intvalue,
+ available_modifiers_list))
+ {
+ return FALSE;
+ }
+ vnp = vnp->next;
+ }
+ return TRUE;
+}
+
+static ValNodePtr GetListOfAvailableModifiers ( ModifierItemLocalPtr ItemList)
+{
+ ValNodePtr vnp, head;
+ Int2 feature_index;
+ BestSortPtr bsp;
+
+ head = NULL;
+ for (feature_index = 0; feature_index < numDefLineModifiers; feature_index++)
+ {
+ if ( ItemList[feature_index].any_present)
+ {
+ bsp = (BestSortPtr) MemNew (sizeof (BestSortData));
+ if (bsp == NULL) return NULL;
+ bsp->feature_index = feature_index;
+ bsp->all_unique = ItemList[feature_index].all_unique;
+ bsp->all_present = ItemList[feature_index].all_present;
+ bsp->is_unique = ItemList[feature_index].is_unique;
+ vnp = ValNodeNew (head);
+ if (vnp == NULL) return NULL;
+ vnp->data.ptrvalue = bsp;
+ if (head == NULL) head = vnp;
+ }
+ }
+ return head;
+}
+
+static Int4 DefLineQualSortOrder [] = {
+ DEFLINE_POS_Transgenic,
+ DEFLINE_POS_Plasmid_name,
+ DEFLINE_POS_Endogenous_virus_name,
+ DEFLINE_POS_Strain,
+ DEFLINE_POS_Clone,
+ DEFLINE_POS_Isolate,
+ DEFLINE_POS_Haplotype,
+ DEFLINE_POS_Cultivar,
+ DEFLINE_POS_Specimen_voucher,
+ DEFLINE_POS_Ecotype,
+ DEFLINE_POS_Type,
+ DEFLINE_POS_Serotype,
+ DEFLINE_POS_Authority,
+ DEFLINE_POS_Breed
+};
+
+static int LIBCALLBACK SortByImportanceAndPresence (
+ VoidPtr ptr1,
+ VoidPtr ptr2
+)
+{
+ ValNodePtr vnp1;
+ ValNodePtr vnp2;
+ BestSortPtr bsp1, bsp2;
+ Int4 num_defline_qual_sort_order, index;
+
+ if (ptr1 == NULL && ptr2 == NULL) return 0;
+
+ if (ptr1 == NULL && ptr2 != NULL) return -1;
+ if (ptr1 != NULL && ptr2 == NULL) return 1;
+
+ vnp1 = *((ValNodePtr PNTR) ptr1);
+ vnp2 = *((ValNodePtr PNTR) ptr2);
+ if (vnp1 == NULL || vnp2 == NULL) return 0;
+ if (vnp1->data.ptrvalue == NULL || vnp2->data.ptrvalue == NULL) return 0;
+
+ bsp1 = vnp1->data.ptrvalue;
+ bsp2 = vnp2->data.ptrvalue;
+ if (bsp1->feature_index == bsp2->feature_index) return 0;
+
+ if (bsp1->all_present && bsp1->all_unique
+ && (! bsp2->all_present || ! bsp2->all_unique))
+ {
+ return -1;
+ }
+ if (bsp2->all_present && bsp2->all_unique
+ && (! bsp1->all_present || ! bsp1->all_unique))
+ {
+ return 1;
+ }
+
+ if ( ! bsp1->is_unique && bsp2->is_unique) return -1;
+ if ( ! bsp2->is_unique && bsp1->is_unique) return 1;
+
+ num_defline_qual_sort_order = sizeof (DefLineQualSortOrder) / sizeof (Int4);
+ for (index = 0; index < num_defline_qual_sort_order; index++)
+ {
+ if (bsp1->feature_index == DefLineQualSortOrder [ index ]) return -1;
+ if (bsp2->feature_index == DefLineQualSortOrder [ index ]) return 1;
+ }
+
+ if (bsp1->feature_index > bsp2->feature_index) return 1;
+ if (bsp1->feature_index < bsp2->feature_index) return -1;
+ return 0;
+}
+
+
+/* The function FindBestCombo tries to find the best combination of modifiers
+ * to create unique organism descriptions. This is accomplished by
+ * creating a list of required modifiers, and then creating a list of
+ * combinations of modifiers by adding modifiers one at a time
+ * to see if the additional modifiers provide any more differentiation in
+ * the list.
+ * In order to do this, I start with a list of required modifiers, and
+ * then create copies of this list. For each copy I add one of the modifiers
+ * that are present in the bio sources and not already on the list.
+ * If adding the modifier increases the differentiation, I add that copy to
+ * the list of possible combinations, otherwise I discard it.
+ * The function then makes copies of all of the new items added to the list,
+ * starting with the item pointed to by start_of_expand, and adds another
+ * modifier to each combination, keeping the combinations that increase
+ * the differentiation and discarding the rest.
+ * This process continues until I have a combination that produces completely
+ * differentiated bio sources, or I run out of possible combinations.
+ * If the list of possible combinations is exhausted before each organism
+ * has a unique description, the function selects the combination from the
+ * list with the largest number of unique organism descriptions. If more
+ * than one combination produces the largest number of unique organisms,
+ * the combination with the largest number of unique organisms and the
+ * largest number of groups will be selected.
+ */
+static ModifierCombinationPtr FindBestCombo(
+ SeqEntryPtr sep,
+ ModifierItemLocalPtr ItemList
+)
+{
+ OrgGroupPtr group_list;
+ ModifierCombinationPtr mc_list, start_of_expand, best_found, end_of_list;
+ ModifierCombinationPtr next_start_of_expand, m, newm;
+ Int4 num_to_expand, next_num_to_expand;
+ Int2 i;
+ ValNodePtr available_modifier_list, vnp;
+ BestSortPtr bsp;
+
+ best_found = NULL;
+
+ /* first, get list of organisms */
+ group_list = NULL;
+ VisitBioSourcesInSep (sep, &group_list, BuildTaxOrgGroupList);
+
+ /* create combo with just the org groups */
+ mc_list = NewModifierCombo (group_list);
+ if (mc_list == NULL) return NULL;
+
+ available_modifier_list = GetListOfAvailableModifiers (ItemList);
+
+ /* next, add in any required qualifiers */
+ for (vnp = available_modifier_list; vnp != NULL; vnp = vnp->next)
+ {
+ bsp = vnp->data.ptrvalue;
+ if (bsp == NULL) return NULL;
+ if (ItemList[bsp->feature_index].required)
+ {
+ AddQualToModifierCombo (mc_list, ItemList + bsp->feature_index,
+ bsp->feature_index);
+ }
+ }
+ if (mc_list->max_orgs_in_group == 1)
+ {
+ /* we're done - they're all unique */
+ best_found = mc_list;
+ return best_found;
+ }
+
+ available_modifier_list = ValNodeSort (available_modifier_list,
+ SortByImportanceAndPresence);
+ start_of_expand = mc_list;
+ end_of_list = mc_list;
+ num_to_expand = 1;
+ while (best_found == NULL && start_of_expand != NULL)
+ {
+ next_num_to_expand = 0;
+ next_start_of_expand = NULL;
+ for (i=0; i < num_to_expand && start_of_expand != NULL; i++)
+ {
+ /* try adding qualifiers */
+ for (vnp = available_modifier_list;
+ vnp != NULL && best_found == NULL;
+ vnp = vnp->next)
+ {
+ bsp = vnp->data.ptrvalue;
+ if (bsp == NULL) return NULL;
+ if (OkToTryAddingQual (start_of_expand, ItemList,
+ available_modifier_list,
+ bsp->feature_index))
+ {
+ newm = CopyModifierCombo (start_of_expand);
+ AddQualToModifierCombo (newm, ItemList + bsp->feature_index,
+ bsp->feature_index);
+ if (start_of_expand->num_groups >= newm->num_groups)
+ {
+ /* situation didn't get better, don't bother to add this one */
+ FreeModifierCombo (newm);
+ newm = NULL;
+ }
+ else if (newm->max_orgs_in_group == 1)
+ {
+ best_found = newm;
+ }
+ else
+ {
+ end_of_list->next = newm;
+ end_of_list = end_of_list->next;
+ if (next_start_of_expand == NULL)
+ next_start_of_expand = newm;
+ next_num_to_expand++;
+ }
+ }
+ }
+ if (start_of_expand != NULL)
+ {
+ start_of_expand = start_of_expand->next;
+ }
+ }
+ num_to_expand = next_num_to_expand;
+ if (start_of_expand != NULL)
+ {
+ start_of_expand = start_of_expand->next;
+ }
+ }
+
+ if (best_found != NULL)
+ {
+ FreeModifierCombo (mc_list);
+ return best_found;
+ }
+
+ /* we want to find the one with the highest number of unique organisms */
+ best_found = mc_list;
+ m = mc_list->next;
+ while (m!= NULL)
+ {
+ if (m->num_unique_orgs > best_found->num_unique_orgs)
+ {
+ best_found = m;
+ }
+ else if (m->num_unique_orgs == best_found->num_unique_orgs
+ && m->num_groups > best_found->num_groups)
+ {
+ best_found = m;
+ }
+ else if (m->num_unique_orgs == best_found->num_unique_orgs
+ && m->num_groups == best_found->num_groups
+ && m->num_mods < best_found->num_mods)
+ {
+ best_found = m;
+ }
+ m = m->next;
+ }
+
+ m = mc_list;
+ while (m != NULL)
+ {
+ if (m != best_found)
+ {
+ newm = m->next;
+ m->next = NULL;
+ FreeModifierCombo (m);
+ m = newm;
+ }
+ else
+ {
+ FreeModifierCombo (m->next);
+ m->next = NULL;
+ m = NULL;
+ }
+ }
+ return best_found;
+}
+
+
+NLM_EXTERN ValNodePtr FindBestModifiers(
+ SeqEntryPtr sep,
+ ModifierItemLocalPtr ItemList
+)
+
+{
+ ModifierCombinationPtr m;
+ ValNodePtr modifier_indices;
+
+ m = FindBestCombo (sep, ItemList);
+ modifier_indices = CopyModifierIndices (m->modifier_indices);
+ FreeModifierCombo (m);
+ return modifier_indices;
+}
+
+
+/* create combo with the specified modifiers */
+NLM_EXTERN ValNodePtr GetModifierIndicesFromModList (
+ ModifierItemLocalPtr modList
+)
+{
+ Int4 feature_index;
+ ValNodePtr modifier_indices = NULL;
+
+ if (modList == NULL) return NULL;
+ for (feature_index = 0; feature_index < numDefLineModifiers; feature_index++)
+ {
+ if (modList[feature_index].any_present && modList [feature_index].required)
+ {
+ ValNodeAddInt (&modifier_indices, 0, feature_index);
+ }
+ }
+ return modifier_indices;
+}
+
+
+/* This is the callback function for sorting the modifier list. It
+ * implements an order specified by the indexers.
+ */
+static Int4 DefLineQualPresentationOrder [] = {
+ DEFLINE_POS_Transgenic,
+ DEFLINE_POS_Strain,
+ DEFLINE_POS_Isolate,
+ DEFLINE_POS_Cultivar,
+ DEFLINE_POS_Specimen_voucher,
+ DEFLINE_POS_Ecotype,
+ DEFLINE_POS_Type,
+ DEFLINE_POS_Serotype,
+ DEFLINE_POS_Authority,
+ DEFLINE_POS_Breed
+};
+
+static int LIBCALLBACK SortByImportance (
+ VoidPtr ptr1,
+ VoidPtr ptr2
+)
+{
+ ValNodePtr vnp1;
+ ValNodePtr vnp2;
+ Int4 num_defline_qual_sort_order, index;
+
+ if (ptr1 == NULL && ptr2 == NULL) return 0;
+
+ if (ptr1 == NULL && ptr2 != NULL) return -1;
+ if (ptr1 != NULL && ptr2 == NULL) return 1;
+
+ vnp1 = *((ValNodePtr PNTR) ptr1);
+ vnp2 = *((ValNodePtr PNTR) ptr2);
+ if (vnp1 == NULL || vnp2 == NULL) return 0;
+ if (vnp1->data.intvalue == vnp2->data.intvalue) return 0;
+
+ num_defline_qual_sort_order = sizeof (DefLineQualPresentationOrder) / sizeof (Int4);
+ for (index = 0; index < num_defline_qual_sort_order; index++)
+ {
+ if (vnp1->data.intvalue == DefLineQualPresentationOrder [ index ]) return -1;
+ if (vnp2->data.intvalue == DefLineQualPresentationOrder [ index ]) return 1;
+ }
+
+ if ((vnp1->data.intvalue < 0 || vnp1->data.intvalue > numDefLineModifiers)
+ && (vnp2->data.intvalue < 0 || vnp2->data.intvalue > numDefLineModifiers))
+ {
+ return 0;
+ }
+ if (vnp1->data.intvalue < 0 || vnp1->data.intvalue > numDefLineModifiers)
+ {
+ return 1;
+ }
+ if (vnp2->data.intvalue < 0 || vnp2->data.intvalue > numDefLineModifiers)
+ {
+ return -1;
+ }
+
+ if (DefLineModifiers [ vnp1->data.intvalue].isOrgMod
+ && (! DefLineModifiers [ vnp2->data.intvalue].isOrgMod
+ || vnp2->data.intvalue == DEFLINE_POS_Plasmid_name
+ || vnp2->data.intvalue == DEFLINE_POS_Endogenous_virus_name))
+ {
+ return -1;
+ }
+ if (DefLineModifiers [ vnp2->data.intvalue].isOrgMod
+ && (! DefLineModifiers [ vnp1->data.intvalue].isOrgMod
+ || vnp1->data.intvalue == DEFLINE_POS_Plasmid_name
+ || vnp1->data.intvalue == DEFLINE_POS_Endogenous_virus_name))
+ {
+ return 1;
+ }
+
+ if (vnp1->data.intvalue == DEFLINE_POS_Plasmid_name)
+ {
+ return -1;
+ }
+ if (vnp2->data.intvalue == DEFLINE_POS_Plasmid_name)
+ {
+ return 1;
+ }
+
+ if (vnp1->data.intvalue == DEFLINE_POS_Endogenous_virus_name)
+ {
+ return -1;
+ }
+ if (vnp2->data.intvalue == DEFLINE_POS_Endogenous_virus_name)
+ {
+ return 1;
+ }
+
+ if (! DefLineModifiers [ vnp1->data.intvalue].isOrgMod
+ && vnp2->data.intvalue == DEFLINE_POS_Clone)
+ {
+ return 1;
+ }
+ if (! DefLineModifiers [ vnp2->data.intvalue].isOrgMod
+ && vnp1->data.intvalue == DEFLINE_POS_Clone)
+ {
+ return -1;
+ }
+
+ if (! DefLineModifiers [ vnp1->data.intvalue].isOrgMod
+ && vnp2->data.intvalue == DEFLINE_POS_Haplotype)
+ {
+ return 1;
+ }
+ if (! DefLineModifiers [ vnp2->data.intvalue].isOrgMod
+ && vnp1->data.intvalue == DEFLINE_POS_Haplotype)
+ {
+ return -1;
+ }
+
+ if (vnp1->data.intvalue > vnp2->data.intvalue) return 1;
+ if (vnp1->data.intvalue < vnp2->data.intvalue) return -1;
+ return 0;
+}
+
+static Boolean RecordHasModifier (
+ BioSourcePtr biop,
+ Int4 modifier_index
+)
+{
+ OrgModPtr mod;
+ OrgNamePtr onp;
+ SubSourcePtr ssp;
+
+ if (biop == NULL
+ || modifier_index < 0
+ || modifier_index >= numDefLineModifiers)
+ {
+ return FALSE;
+ }
+ if (DefLineModifiers[modifier_index].isOrgMod)
+ {
+ if (biop->org == NULL || (onp = biop->org->orgname) == NULL)
+ {
+ return FALSE;
+ }
+ mod = onp->mod;
+ while (mod != NULL
+ && mod->subtype != DefLineModifiers[modifier_index].subtype)
+ {
+ mod = mod->next;
+ }
+ if (mod != NULL && mod->subname != NULL)
+ {
+ return TRUE;
+ }
+ } else {
+ ssp = biop->subtype;
+ while (ssp != NULL && ssp->subtype != DefLineModifiers[modifier_index].subtype)
+ {
+ ssp = ssp->next;
+ }
+ if (ssp != NULL && ssp->name != NULL)
+ {
+ return TRUE;
+ }
+ }
+ return FALSE;
+}
+
+/* This function adds in required modifiers for HIV sequences */
+static void AddHIVModifierIndices (
+ ValNodePtr PNTR modifier_indices,
+ BioSourcePtr biop,
+ ModifierItemLocalPtr modList,
+ CharPtr taxName,
+ Int4 clone_isolate_HIV_rule_num
+)
+{
+ ValNodePtr vnp;
+ Boolean have_country_in_list;
+ Boolean have_isolate_in_list;
+ Boolean have_clone_in_list;
+ Boolean have_country_mod;
+ Boolean have_isolate_mod;
+ Boolean have_clone_mod;
+
+ /* special handling for HIV */
+ if (StringICmp (taxName, "HIV-1") != 0
+ && StringICmp (taxName, "HIV-2") != 0)
+ {
+ return;
+ }
+
+ have_country_in_list = FALSE;
+ have_isolate_in_list = FALSE;
+ have_clone_in_list = FALSE;
+ have_country_mod = RecordHasModifier (biop, DEFLINE_POS_Country);
+ have_isolate_mod = RecordHasModifier (biop, DEFLINE_POS_Isolate);
+ have_clone_mod = RecordHasModifier (biop, DEFLINE_POS_Clone);
+
+ if (modifier_indices != NULL)
+ {
+ for (vnp = *modifier_indices;
+ vnp != NULL
+ && (! have_country_in_list
+ || ! have_isolate_in_list
+ || ! have_clone_in_list);
+ vnp = vnp->next)
+ {
+ if (vnp->data.intvalue == DEFLINE_POS_Country)
+ {
+ have_country_in_list = TRUE;
+ }
+ else if (vnp->data.intvalue == DEFLINE_POS_Isolate)
+ {
+ have_isolate_in_list = TRUE;
+ }
+ else if (vnp->data.intvalue == DEFLINE_POS_Clone)
+ {
+ have_clone_in_list = TRUE;
+ }
+ }
+ }
+
+ if ( ! have_country_in_list && have_country_mod)
+ {
+ vnp = ValNodeNew (*modifier_indices);
+ vnp->data.intvalue = DEFLINE_POS_Country;
+ if (*modifier_indices == NULL) *modifier_indices = vnp;
+ }
+
+ if ((have_clone_in_list && have_clone_mod)
+ || (have_isolate_in_list && have_isolate_mod))
+ {
+ /* don't need HIV rule */
+ }
+ else
+ {
+ if ( ! have_isolate_in_list
+ && have_isolate_mod
+ && ( clone_isolate_HIV_rule_num == clone_isolate_HIV_rule_prefer_isolate
+ || clone_isolate_HIV_rule_num == clone_isolate_HIV_rule_want_both
+ || ! have_clone_mod))
+ {
+ vnp = ValNodeNew (*modifier_indices);
+ vnp->data.intvalue = DEFLINE_POS_Isolate;
+ if (*modifier_indices == NULL) *modifier_indices = vnp;
+ }
+
+ if ( ! have_clone_in_list
+ && have_clone_mod
+ && ( clone_isolate_HIV_rule_num == clone_isolate_HIV_rule_prefer_clone
+ || clone_isolate_HIV_rule_num == clone_isolate_HIV_rule_want_both
+ || ! have_isolate_mod))
+ {
+ vnp = ValNodeNew (*modifier_indices);
+ vnp->data.intvalue = DEFLINE_POS_Clone;
+ if (*modifier_indices == NULL) *modifier_indices = vnp;
+ }
+ }
+}
+
+/* This function looks for an OrgMod note that contains the phrase
+ * "type strain of". This function is used to determine whether
+ * strain is a required modifier for the defline for this source.
+ */
+static Boolean HasTypeStrainComment (BioSourcePtr biop)
+{
+ OrgModPtr mod;
+
+ if (biop == NULL || biop->org == NULL || biop->org->orgname == NULL)
+ {
+ return FALSE;
+ }
+
+ mod = biop->org->orgname->mod;
+ while (mod != NULL && mod->subtype != ORGMOD_strain)
+ {
+ mod = mod->next;
+ }
+
+ if (mod == NULL)
+ {
+ return FALSE;
+ }
+
+ if (!UseOrgModifier (mod, biop->org->taxname))
+ {
+ return FALSE;
+ }
+
+ mod = biop->org->orgname->mod;
+ while (mod != NULL)
+ {
+ if (mod->subtype == 255
+ && StringISearch (mod->subname, "type strain of") != NULL)
+ {
+ return TRUE;
+ }
+ mod = mod->next;
+ }
+ return FALSE;
+}
+
+
+/* This function checks to see if there is a type strain comment on
+ * the bio source. If there is one, it checks to see whether strain
+ * is already in the list of modifiers for the definition line.
+ * If strain is not already in the list, it is added.
+ */
+static void
+AddTypeStrainModifierIndices
+(ValNodePtr PNTR modifier_indices,
+ BioSourcePtr biop)
+{
+ ValNodePtr vnp;
+
+ if (modifier_indices == NULL || biop == NULL || ! HasTypeStrainComment (biop))
+ {
+ return;
+ }
+
+ for (vnp = *modifier_indices;
+ vnp != NULL && vnp->data.intvalue != DEFLINE_POS_Strain;
+ vnp = vnp->next)
+ {
+ }
+
+ if (vnp == NULL)
+ {
+ ValNodeAddInt (modifier_indices, 0, DEFLINE_POS_Strain);
+ }
+}
+
+static Boolean SpecialHandlingForSpecialTechniques (
+ BioseqPtr bsp
+);
+
+/* This function checks to see if the Bioseq has a WGS technique.
+ * If so, and if the strain text is not present in the taxname,
+ * and strain is not already in the list of modifiers for the
+ * definition line, add strain.
+ */
+static void
+AddWGSModifierIndices
+(ValNodePtr PNTR modifier_indices,
+ BioSourcePtr biop,
+ BioseqPtr bsp)
+{
+ ValNodePtr vnp;
+ OrgModPtr omp;
+
+ if (modifier_indices == NULL || biop == NULL
+ || biop->org == NULL
+ || biop->org->orgname == NULL
+ || biop->org->orgname->mod == NULL
+ || ! SpecialHandlingForSpecialTechniques (bsp))
+ {
+ return;
+ }
+
+ for (vnp = *modifier_indices;
+ vnp != NULL && vnp->data.intvalue != DEFLINE_POS_Strain;
+ vnp = vnp->next)
+ {
+ }
+
+ if (vnp == NULL)
+ {
+ omp = biop->org->orgname->mod;
+ while (omp != NULL && omp->subtype != ORGMOD_strain)
+ {
+ omp = omp->next;
+ }
+ if (omp != NULL)
+ {
+ if (StringStr (biop->org->taxname, omp->subname) != NULL)
+ {
+ /* don't add, present already */
+ } else {
+ /* add strain modifier */
+ ValNodeAddInt (modifier_indices, 0, DEFLINE_POS_Strain);
+ }
+ }
+ }
+}
+
+/* This function provides a label to be used in the definition line for
+ * each modifier that requires one. Most modifiers use a label that is
+ * similar to the name of the modifier displayed in the definition line
+ * options dialog.
+ */
+NLM_EXTERN void AddModifierLabel (
+ Boolean use_labels,
+ Boolean is_orgmod,
+ Uint1 subtype,
+ CharPtr modifier_text
+)
+{
+ CharPtr cp;
+ if (!is_orgmod && subtype == SUBSRC_endogenous_virus_name)
+ {
+ StringCpy (modifier_text, "endogenous virus");
+ }
+ else if (is_orgmod && subtype == ORGMOD_specimen_voucher)
+ {
+ if (use_labels)
+ {
+ StringCpy (modifier_text, "voucher");
+ }
+ else
+ {
+ modifier_text [0] = 0;
+ }
+ }
+ else if (use_labels
+ || (!is_orgmod
+ && (subtype == SUBSRC_transgenic
+ || subtype == SUBSRC_plasmid_name)))
+ {
+ if (is_orgmod)
+ {
+ StringCpy (modifier_text, GetOrgModQualName (subtype));
+ } else {
+ StringCpy (modifier_text, GetSubsourceQualName (subtype));
+ }
+ modifier_text[0] = tolower(modifier_text[0]);
+ cp = StringStr (modifier_text, "-name");
+ if (cp != NULL) *cp = 0;
+ }
+ else
+ {
+ modifier_text[0] = 0;
+ }
+}
+
+typedef struct orgmodabbrevdata {
+ Int2 subtype;
+ CharPtr abbrev;
+} OrgModAbbrevData, PNTR OrgModAbbrevPtr;
+
+static OrgModAbbrevData orgmod_abbrevs[] = {
+ { ORGMOD_variety, "var." },
+ { ORGMOD_forma, "f." },
+ { ORGMOD_forma_specialis, "f. sp." },
+ { ORGMOD_pathovar, "pv." }
+};
+
+/* The UseOrgModifier function looks for the values of certain kinds of
+ * modifiers in the taxonomy name, so that they will not be added to the
+ * definition line as modifiers if they are already present in the
+ * taxonomy name.
+ */
+NLM_EXTERN Boolean UseOrgModifier (
+ OrgModPtr mod,
+ CharPtr taxName
+)
+{
+ CharPtr value_found;
+ Int4 value_len;
+ Int4 num_abbrevs, i;
+ CharPtr abbrev_start;
+ Boolean other_abbrev_found;
+
+ if (mod == NULL || mod->subname == NULL) return FALSE;
+
+ num_abbrevs = sizeof (orgmod_abbrevs) / sizeof (OrgModAbbrevData);
+
+ /* If selected modifiers already appear in the tax Name, */
+ /* don't use them in the organism description again */
+ if (mod->subtype == ORGMOD_strain
+ || mod->subtype == ORGMOD_variety
+ || mod->subtype == ORGMOD_sub_species
+ || mod->subtype == ORGMOD_forma
+ || mod->subtype == ORGMOD_forma_specialis
+ || mod->subtype == ORGMOD_pathovar
+ || mod->subtype == ORGMOD_specimen_voucher)
+ {
+ value_found = StringStr (taxName, mod->subname);
+ value_len = StringLen (mod->subname);
+ while (value_found != NULL)
+ {
+ if (value_found == taxName)
+ {
+ value_found = StringStr (value_found + 1, mod->subname);
+ continue;
+ }
+ if (*(value_found - 1) != ' ' && *(value_found - 1) != '(')
+ {
+ value_found = StringStr (value_found + 1, mod->subname);
+ continue;
+ }
+ if (*(value_found - 1) == ')' && *(value_found + value_len) != ')')
+ {
+ value_found = StringStr (value_found + 1, mod->subname);
+ continue;
+ }
+ if (*(value_found + value_len) != ' ' && *(value_found + value_len) != 0)
+ {
+ value_found = StringStr (value_found + 1, mod->subname);
+ continue;
+ }
+ other_abbrev_found = FALSE;
+ for (i = 0; i < num_abbrevs; i++)
+ {
+ abbrev_start = value_found - StringLen (orgmod_abbrevs[i].abbrev) - 1;
+ if (abbrev_start > taxName
+ && StringNCmp (abbrev_start,
+ orgmod_abbrevs[i].abbrev,
+ StringLen (orgmod_abbrevs[i].abbrev)) == 0)
+ {
+ if (mod->subtype == orgmod_abbrevs[i].subtype)
+ {
+ return FALSE;
+ }
+ else
+ {
+ other_abbrev_found = TRUE;
+ }
+ }
+ }
+ if ( ! other_abbrev_found
+ && ( mod->subtype == ORGMOD_strain
+ || mod->subtype == ORGMOD_sub_species
+ || mod->subtype == ORGMOD_specimen_voucher))
+ {
+ return FALSE;
+ }
+ value_found = StringStr (value_found + 1, mod->subname);
+ }
+ }
+ return TRUE;
+}
+
+/* The SetRequiredModifiers function copies the default required values from
+ * the global DefLineModifiers array into the local list of modifier
+ * information.
+ */
+NLM_EXTERN void SetRequiredModifiers (
+ ModifierItemLocalPtr modList
+)
+{
+ Int4 item_index;
+
+ for (item_index = 0; item_index < numDefLineModifiers; item_index++)
+ {
+ modList[item_index].required = IsDeflineModifierRequiredByDefault(DefLineModifiers[item_index].isOrgMod,
+ DefLineModifiers[item_index].subtype);
+ }
+
+}
+
+/* This function fixes HIV abbreviations, removes items in parentheses,
+ * and trims spaces around the taxonomy name.
+ */
+NLM_EXTERN void CleanUpTaxName (
+ CharPtr taxName,
+ Boolean keep_in_paren
+)
+{
+ CharPtr ptr;
+
+ if (StringICmp (taxName, "Human immunodeficiency virus type 1") == 0
+ || StringICmp (taxName, "Human immunodeficiency virus 1") == 0)
+ {
+ StringCpy (taxName, "HIV-1");
+ }
+ else if (StringICmp (taxName, "Human immunodeficiency virus type 2") == 0
+ || StringICmp (taxName, "Human immunodeficiency virus 2") == 0)
+ {
+ StringCpy (taxName, "HIV-2");
+ }
+ else
+ {
+ if (! keep_in_paren)
+ {
+ ptr = StringStr (taxName, "(");
+ if (ptr != NULL)
+ *ptr = '\0';
+ }
+ TrimSpacesAroundString (taxName);
+ }
+}
+
+/* This function gets the BioSource descriptor for the BioSeq. */
+NLM_EXTERN BioSourcePtr GetBiopForBsp (
+ BioseqPtr bsp
+)
+{
+ SeqMgrDescContext dcontext;
+ SeqDescrPtr sdp;
+ BioSourcePtr biop;
+
+ if (bsp == NULL) return NULL;
+ sdp = SeqMgrGetNextDescriptor (bsp, NULL, Seq_descr_source, &dcontext);
+ if (sdp != NULL) {
+ biop = (BioSourcePtr) sdp->data.ptrvalue;
+ return biop;
+ }
+
+ return NULL;
+}
+
+
+NLM_EXTERN Boolean IsSpName (CharPtr taxName)
+{
+ CharPtr cp;
+
+ cp = StringStr (taxName, " sp.");
+ /* check to make sure not "f. sp." */
+ if (cp != NULL && cp[4] == ' '
+ && (cp - taxName < 2 || *(cp - 2) != 'f' || *(cp - 1) != '.'))
+ {
+ return TRUE;
+ }
+ else
+ {
+ return FALSE;
+ }
+}
+
+
+static ValNodePtr ValNodeIntCopy (ValNodePtr orig)
+{
+ ValNodePtr cpy = NULL, last = NULL, vnp;
+
+ while (orig != NULL) {
+ vnp = ValNodeNew (NULL);
+ vnp->choice = orig->choice;
+ vnp->data.intvalue = orig->data.intvalue;
+ if (last == NULL) {
+ cpy = vnp;
+ } else {
+ last->next = vnp;
+ }
+ last = vnp;
+ orig = orig->next;
+ }
+ return cpy;
+}
+
+
+/* This function generates a string describing the organism based on the
+ * modifiers selected and other organism description options.
+ */
+static CharPtr GetOrganismDescription (
+ BioseqPtr bsp,
+ ModifierItemLocalPtr modList,
+ ValNodePtr modifier_indices,
+ OrganismDescriptionModifiersPtr odmp
+)
+{
+ Char taxName [196];
+ Char modifier_text [256];
+ ValNodePtr strings;
+ BioSourcePtr biop;
+ OrgModPtr mod;
+ SubSourcePtr ssp;
+ ValNodePtr vnp;
+ Int2 feature_index;
+ CharPtr org_desc;
+ CharPtr cp;
+ Uint4 no_semicolon_len, label_len;
+ CharPtr tmp;
+
+ biop = NULL;
+ strings = NULL;
+ taxName [0] = '\0';
+
+ biop = GetBiopForBsp (bsp);
+ if (biop == NULL) return NULL;
+ if (biop->org == NULL) return NULL;
+ if (biop->org->taxname == NULL) return NULL;
+ StringNCpy (taxName, biop->org->taxname, sizeof (taxName) - 1);
+ taxName [ sizeof (taxName) - 1] = 0;
+
+ CleanUpTaxName (taxName, odmp->keep_paren);
+
+ if (odmp->exclude_sp && IsSpName(taxName))
+ {
+ return StringSave (taxName);
+ }
+
+ if (odmp->exclude_cf)
+ {
+ cp = StringStr (taxName, " cf.");
+ if (cp != NULL)
+ {
+ return StringSave (taxName);
+ }
+ }
+
+ if (odmp->exclude_aff)
+ {
+ cp = StringStr (taxName, " aff.");
+ if (cp != NULL)
+ {
+ return StringSave (taxName);
+ }
+ }
+ if (odmp->exclude_nr)
+ {
+ cp = StringStr (taxName, " nr.");
+ if (cp != NULL)
+ {
+ return StringSave (taxName);
+ }
+ }
+
+ if (biop->origin == ORG_MUT)
+ {
+ ValNodeAddStr (&strings, 0, StringSave ("Mutant"));
+ }
+
+ ValNodeAddStr (&strings, 0, StringSave (taxName));
+
+ if (HasTypeStrainComment (biop))
+ {
+
+ }
+
+ /* copy modifier indices list */
+ modifier_indices = ValNodeIntCopy (modifier_indices);
+ AddHIVModifierIndices (&modifier_indices, biop, modList, taxName,
+ odmp->clone_isolate_HIV_rule_num);
+ AddTypeStrainModifierIndices (&modifier_indices, biop);
+ AddWGSModifierIndices (&modifier_indices, biop, bsp);
+
+ modifier_indices = ValNodeSort (modifier_indices, SortByImportance);
+ for (vnp = modifier_indices;
+ vnp != NULL && (odmp->max_mods == -99 || odmp->max_mods > 0);
+ vnp = vnp->next)
+ {
+ feature_index = vnp->data.intvalue;
+ if (! odmp->use_modifiers && !IsDeflineModifierRequiredByDefault(DefLineModifiers[feature_index].isOrgMod,
+ DefLineModifiers[feature_index].subtype))
+ {
+ /* do nothing */
+ }
+ else if (DefLineModifiers[feature_index].isOrgMod)
+ {
+ if (biop->org == NULL || biop->org->orgname == NULL) continue;
+ mod = biop->org->orgname->mod;
+ while (mod != NULL
+ && mod->subtype != DefLineModifiers[feature_index].subtype)
+ {
+ mod = mod->next;
+ }
+ if ( UseOrgModifier (mod, taxName))
+ {
+ if (odmp->allow_semicolon_in_modifier) {
+ no_semicolon_len = StringLen (mod->subname);
+ } else {
+ no_semicolon_len = StringCSpn (mod->subname, ";");
+ }
+
+ if (mod->subtype == ORGMOD_nat_host)
+ {
+ sprintf (modifier_text, "from ");
+ if (no_semicolon_len > sizeof (modifier_text) - 6)
+ {
+ no_semicolon_len = sizeof (modifier_text) - 6;
+ }
+ StringNCpy (modifier_text + 5, mod->subname,
+ no_semicolon_len);
+ modifier_text[no_semicolon_len + 5] = 0;
+ }
+ else
+ {
+ AddModifierLabel (odmp->use_labels, TRUE, mod->subtype, modifier_text);
+ if (modifier_text[0] != 0)
+ StringCat (modifier_text, " ");
+ label_len = StringLen (modifier_text);
+ if (no_semicolon_len > (Int4) sizeof (modifier_text) - label_len - 1)
+ {
+ no_semicolon_len = (Int4) sizeof (modifier_text) - label_len - 1;
+ }
+ if (mod->subtype == ORGMOD_specimen_voucher && StringNICmp (mod->subname, "personal:", 9) == 0)
+ {
+ tmp = mod->subname + 9;
+ while (isspace (*tmp))
+ {
+ tmp++;
+ }
+ if (odmp->allow_semicolon_in_modifier) {
+ no_semicolon_len = StringLen (tmp);
+ } else {
+ no_semicolon_len = StringCSpn (tmp, ";");
+ }
+ }
+ else
+ {
+ tmp = mod->subname;
+ }
+
+ StringNCat (modifier_text, tmp,
+ no_semicolon_len);
+ modifier_text [ no_semicolon_len + label_len] = 0;
+ }
+ ValNodeCopyStr( &strings, 0, modifier_text);
+ if (odmp->max_mods != -99)
+ odmp->max_mods --;
+ }
+ } else {
+ ssp = biop->subtype;
+ while (ssp != NULL
+ && ssp->subtype != DefLineModifiers[feature_index].subtype)
+ {
+ ssp = ssp->next;
+ }
+ if (ssp != NULL)
+ {
+ if (odmp->include_country_extra || odmp->allow_semicolon_in_modifier)
+ {
+ no_semicolon_len = StringLen (ssp->name);
+ }
+ else
+ {
+ no_semicolon_len = StringCSpn (ssp->name, ";");
+ }
+ AddModifierLabel (odmp->use_labels, FALSE, ssp->subtype, modifier_text);
+ if (ssp->subtype == SUBSRC_transgenic)
+ {
+ /* do nothing, transgenic already captured from label */
+ }
+ else if (ssp->subtype == SUBSRC_country)
+ {
+ sprintf (modifier_text, "from ");
+ if (no_semicolon_len > sizeof (modifier_text) - 6)
+ {
+ no_semicolon_len = sizeof (modifier_text) - 6;
+ }
+ StringNCpy (modifier_text + 5, ssp->name, no_semicolon_len);
+ modifier_text[5 + no_semicolon_len] = 0;
+ if (!odmp->include_country_extra)
+ {
+ cp = StringChr (modifier_text, ':');
+ if (cp != NULL) *cp = 0;
+ }
+ }
+ else if (ssp->name != NULL && ssp->name[0] != 0
+ && (ssp->subtype != SUBSRC_plasmid_name
+ || StringCmp (ssp->name, "unnamed") != 0))
+ {
+ if (modifier_text[0] != 0)
+ StringCat (modifier_text, " ");
+ label_len = StringLen (modifier_text);
+ if (no_semicolon_len > sizeof (modifier_text) - 1 - label_len)
+ {
+ no_semicolon_len = sizeof (modifier_text) - 1 - label_len;
+ }
+ StringNCat (modifier_text, ssp->name, no_semicolon_len);
+ modifier_text [ no_semicolon_len + label_len ] = 0;
+ }
+ ValNodeCopyStr( &strings, 0, modifier_text);
+ if (odmp->max_mods != -99)
+ odmp->max_mods --;
+ }
+ }
+ }
+
+ org_desc = MergeValNodeStrings (strings, FALSE);
+ ValNodeFreeData (strings);
+ modifier_indices = ValNodeFree (modifier_indices);
+ return org_desc;
+
+}
+
+/* end of organism description section */
+
+/* This section of code contains functions which are useful for dealing
+ * with locations of features (SeqLocPtr objects).
+ */
+
+/* This function determines whether location A is on the same strand as
+ * location B
+ */
+static Boolean AreAAndBOnSameStrand (
+ SeqLocPtr slp1,
+ SeqLocPtr slp2
+)
+{
+ Uint1 strand1;
+ Uint2 strand2;
+
+ strand1 = SeqLocStrand (slp1);
+ strand2 = SeqLocStrand (slp2);
+ if (strand1 == Seq_strand_minus && strand2 != Seq_strand_minus)
+ return FALSE;
+ else if (strand1 != Seq_strand_minus && strand2 == Seq_strand_minus)
+ return FALSE;
+ else
+ return TRUE;
+}
+
+/* This function determines whether location A is contained in or equal to
+ * location B and on the same strand as location B.
+ */
+NLM_EXTERN Boolean IsLocAInBonSameStrand (
+ SeqLocPtr slp1,
+ SeqLocPtr slp2
+)
+{
+ if (! AreAAndBOnSameStrand ( slp1, slp2))
+ {
+ return FALSE;
+ }
+ else if ( SeqLocAinB (slp1, slp2) < 0)
+ {
+ return FALSE;
+ }
+ else
+ {
+ return TRUE;
+ }
+}
+
+/* This function calculates the intersection between two locations.
+ */
+static SeqLocPtr SeqLocIntersection (
+ SeqLocPtr slp1,
+ SeqLocPtr slp2,
+ BioseqPtr bsp
+)
+{
+ SeqLocPtr diff1, diff2, result;
+
+ diff1 = SeqLocMerge ( bsp, slp1, NULL, FALSE, TRUE, FALSE);
+ diff1 = SeqLocSubtract (diff1, slp2);
+ diff2 = SeqLocMerge ( bsp, slp2, NULL, FALSE, TRUE, FALSE);
+ diff2 = SeqLocSubtract (diff2, slp1);
+ result = SeqLocMerge ( bsp, slp1, slp2, FALSE, TRUE, FALSE);
+
+ if (diff1 != NULL)
+ {
+ result = SeqLocSubtract (result, diff1);
+ SeqLocFree (diff1);
+ if (result == NULL) return NULL;
+ }
+ if (diff2 != NULL)
+ {
+ result = SeqLocSubtract (result, diff2);
+ SeqLocFree (diff2);
+ if (result == NULL) return NULL;
+ }
+ return result;
+}
+
+#define ADJACENT_TYPE_ANY 0
+#define ADJACENT_TYPE_UPSTREAM 1
+#define ADJACENT_TYPE_DOWNSTREAM 2
+
+/* This function determines whether A is "next to" B and upstream or downstream
+ * from B. A cannot overlap B. If allow_interval is TRUE, there can be
+ * space between A and B.
+ */
+static Boolean IsAAdjacentToB (
+ SeqLocPtr a,
+ SeqLocPtr b,
+ BioseqPtr bsp,
+ Int2 adjacent_type,
+ Boolean allow_interval
+)
+{
+ Int4 a_end, b_end;
+ Uint2 strand;
+
+ if (adjacent_type != ADJACENT_TYPE_ANY
+ && adjacent_type != ADJACENT_TYPE_UPSTREAM
+ && adjacent_type != ADJACENT_TYPE_DOWNSTREAM)
+ {
+ return FALSE;
+ }
+
+ if ( ! AreAAndBOnSameStrand (a, b))
+ {
+ return FALSE;
+ }
+
+ strand = SeqLocStrand (a);
+ if ( adjacent_type == ADJACENT_TYPE_ANY)
+ {
+ a_end = GetOffsetInBioseq (a, bsp, SEQLOC_RIGHT_END);
+ b_end = GetOffsetInBioseq (b, bsp, SEQLOC_LEFT_END);
+ if ((allow_interval && b_end < a_end)
+ || b_end == a_end + 1)
+ {
+ return TRUE;
+ }
+ a_end = GetOffsetInBioseq (a, bsp, SEQLOC_LEFT_END);
+ b_end = GetOffsetInBioseq (b, bsp, SEQLOC_RIGHT_END);
+ if ((allow_interval && b_end > a_end)
+ || a_end == b_end + 1)
+ {
+ return TRUE;
+ }
+ return FALSE;
+ }
+ else if ( (strand == Seq_strand_minus
+ && adjacent_type == ADJACENT_TYPE_UPSTREAM)
+ || (strand != Seq_strand_minus
+ && adjacent_type == ADJACENT_TYPE_DOWNSTREAM))
+ {
+ a_end = GetOffsetInBioseq (a, bsp, SEQLOC_RIGHT_END);
+ b_end = GetOffsetInBioseq (b, bsp, SEQLOC_LEFT_END);
+ if ((allow_interval && b_end < a_end)
+ || b_end == a_end + 1)
+ {
+ return TRUE;
+ }
+ else
+ {
+ return FALSE;
+ }
+ }
+ else
+ {
+ a_end = GetOffsetInBioseq (a, bsp, SEQLOC_LEFT_END);
+ b_end = GetOffsetInBioseq (b, bsp, SEQLOC_RIGHT_END);
+ if ((allow_interval && b_end > a_end)
+ || a_end == b_end + 1)
+ {
+ return TRUE;
+ }
+ else
+ {
+ return FALSE;
+ }
+ }
+}
+
+static Boolean IsAEmptyIntervalOfB (SeqLocPtr a, SeqLocPtr b, BioseqPtr bsp)
+{
+ Int4 a_right, a_left, b_right, b_left, prev_right, prev_left;
+ SeqLocPtr slp;
+ Uint1 a_strand, b_strand;
+
+ if (a == NULL || b == NULL || bsp == NULL) return FALSE;
+
+ a_strand = SeqLocStrand (a);
+ b_strand = SeqLocStrand (b);
+ if ((a_strand == Seq_strand_minus && b_strand != Seq_strand_minus)
+ || (a_strand != Seq_strand_minus && b_strand == Seq_strand_minus)) {
+ return FALSE;
+ }
+
+ a_right = GetOffsetInBioseq (a, bsp, SEQLOC_RIGHT_END);
+ a_left = GetOffsetInBioseq (a, bsp, SEQLOC_LEFT_END);
+
+ slp = SeqLocFindNext (b, NULL);
+ prev_right = GetOffsetInBioseq (slp, bsp, SEQLOC_RIGHT_END);
+ prev_left = GetOffsetInBioseq (slp, bsp, SEQLOC_LEFT_END);
+ slp = SeqLocFindNext (b, slp);
+ while (slp != NULL) {
+ b_right = GetOffsetInBioseq (slp, bsp, SEQLOC_RIGHT_END);
+ b_left = GetOffsetInBioseq (slp, bsp, SEQLOC_LEFT_END);
+ if (a_left == prev_right + 1 && a_right == b_left - 1) {
+ return TRUE;
+ } else if (a_left == b_right + 1 && a_right == prev_left - 1) {
+ return TRUE;
+ } else {
+ prev_right = b_right;
+ prev_left = b_left;
+ slp = SeqLocFindNext (b, slp);
+ }
+ }
+ return FALSE;
+}
+
+
+static Boolean LocAContainsIntervalOfB (SeqLocPtr a, SeqLocPtr b)
+{
+ SeqLocPtr interval;
+ Boolean rval = FALSE;
+
+ if (a == NULL || b == NULL) return FALSE;
+
+ interval = SeqLocFindNext (b, NULL);
+ while (interval != NULL && !rval) {
+ if (IsLocAInBonSameStrand (interval, a)) {
+ rval = TRUE;
+ } else {
+ interval = SeqLocFindNext (b, interval);
+ }
+ }
+ return rval;
+}
+
+
+/* This section of code deals with identifying and labeling features
+ * for the definition line.
+ * The features currently handled are:
+ * genes
+ * exons
+ * introns
+ * LTRs
+ * 3' UTRs
+ * 5' UTRs
+ * CDSs
+ * rRNA
+ * mRNA
+ * misc RNA
+ * snRNA
+ * snoRNA
+ * insertion sequences
+ * integrons
+ * D-loops
+ * mRNA
+ * tRNA
+ * control regions
+ * misc feature listed as intergenic spacer in comment
+ * satellite sequences
+ * promoter regions
+ * endogenous virus source features
+ * transposons
+ */
+
+static Boolean LIBCALLBACK IsGene (
+ SeqFeatPtr sfp
+)
+{
+ if (sfp == NULL || sfp->data.choice != SEQFEAT_GENE) return FALSE;
+ return TRUE;
+}
+
+static CharPtr GetGeneName (GeneRefPtr grp, Boolean suppress_locus_tag)
+{
+ ValNodePtr syn;
+
+ if (grp == NULL) return NULL;
+ if (SeqMgrGeneIsSuppressed (grp)) return NULL;
+ if (StringDoesHaveText (grp->locus)) return grp->locus;
+ if (! suppress_locus_tag && StringDoesHaveText (grp->locus_tag))
+ return grp->locus_tag;
+ if (StringDoesHaveText (grp->desc)) return grp->desc;
+ for (syn = grp->syn; syn != NULL; syn = syn->next)
+ {
+ if (syn != NULL && syn->data.ptrvalue != NULL)
+ return syn->data.ptrvalue;
+ }
+ return NULL;
+}
+
+static CharPtr GetAlleleName (GeneRefPtr grp, Boolean suppress_locus_tag)
+{
+ size_t lenallele;
+ size_t lengenename;
+ CharPtr gene_name;
+ CharPtr buffer;
+
+ if (grp == NULL) return NULL;
+ if (StringHasNoText (grp->allele)) return NULL;
+ gene_name = GetGeneName (grp, suppress_locus_tag);
+ if (StringHasNoText (gene_name)) return NULL;
+ lenallele = StringLen (grp->allele);
+ lengenename = StringLen (gene_name);
+
+ if (lenallele > lengenename
+ && StringNICmp (gene_name, grp->allele, lengenename) == 0)
+ {
+ return StringSave (grp->allele);
+ }
+ else if (grp->allele[0] == '-')
+ {
+ buffer = MemNew (lenallele + lengenename + 1);
+ if (buffer == NULL) return NULL;
+ StringCpy (buffer, gene_name);
+ StringCat (buffer, grp->allele);
+ }
+ else
+ {
+ buffer = MemNew (lenallele + lengenename + 2);
+ if (buffer == NULL) return NULL;
+ StringCpy (buffer, gene_name);
+ StringCat (buffer, "-");
+ StringCat (buffer, grp->allele);
+ }
+
+ return buffer;
+}
+
+/* This function compares the gene names and allele names of the gene
+ * to see if they match.
+ */
+static Boolean DoGenesMatch
+(GeneRefPtr grp1,
+ GeneRefPtr grp2,
+ Boolean suppress_locus_tag)
+{
+ CharPtr name1;
+ CharPtr name2;
+
+ name1 = GetGeneName (grp1, suppress_locus_tag);
+ name2 = GetGeneName (grp2, suppress_locus_tag);
+ if (StringCmp (name1, name2) != 0) return FALSE;
+
+ name1 = GetAlleleName (grp1, suppress_locus_tag);
+ name2 = GetAlleleName (grp2, suppress_locus_tag);
+ if ((name1 == NULL && name2 != NULL)
+ || (name1 != NULL && name2 == NULL))
+ {
+ if (name1 != NULL) MemFree (name1);
+ if (name2 != NULL) MemFree (name2);
+ return FALSE;
+ }
+
+ if ((name1 == NULL && name2 == NULL)
+ || (StringCmp (name1, name2) == 0))
+ {
+ if (name1 != NULL) MemFree (name1);
+ if (name2 != NULL) MemFree (name2);
+ return TRUE;
+ }
+
+ if (name1 != NULL) MemFree (name1);
+ if (name2 != NULL) MemFree (name2);
+ return FALSE;
+}
+
+/* This function looks at the pseudo flag on the object itself as well as
+ * the pseudo flag on the gene reference for the object (if one is present).
+ */
+static Boolean IsPseudo (
+ SeqFeatPtr sfp
+)
+{
+ GeneRefPtr grp;
+ SeqMgrFeatContext context;
+
+ if (sfp == NULL) return FALSE;
+ if (sfp->pseudo) return TRUE;
+ if (sfp->data.choice == SEQFEAT_GENE)
+ {
+ grp = sfp->data.value.ptrvalue;
+ }
+ else
+ {
+ grp = SeqMgrGetGeneXref (sfp);
+ }
+ if (grp == NULL)
+ {
+ if (sfp->data.choice != SEQFEAT_GENE) {
+ sfp = SeqMgrGetOverlappingGene(sfp->location, &context);
+ return IsPseudo(sfp);
+ } else {
+ return FALSE;
+ }
+ } else {
+ return grp->pseudo;
+ }
+}
+
+static Boolean LIBCALLBACK IsExon (
+ SeqFeatPtr sfp
+)
+{
+ if (sfp == NULL || sfp->idx.subtype != FEATDEF_exon) return FALSE;
+ return TRUE;
+}
+
+static Boolean LIBCALLBACK IsIntron (
+ SeqFeatPtr sfp
+)
+{
+ if (sfp == NULL || sfp->idx.subtype != FEATDEF_intron) return FALSE;
+ return TRUE;
+}
+
+static Boolean LIBCALLBACK IsExonOrIntron (SeqFeatPtr sfp)
+{
+ return IsExon(sfp) || IsIntron(sfp);
+}
+
+static Boolean LIBCALLBACK IsLTR (
+ SeqFeatPtr sfp
+)
+{
+ if (sfp == NULL || sfp->idx.subtype != FEATDEF_LTR) return FALSE;
+ return TRUE;
+}
+
+static CharPtr GetLTRDescription (
+ SeqFeatPtr sfp
+)
+{
+ CharPtr description;
+ size_t comment_len;
+ if (sfp == NULL) return NULL;
+ if (sfp->comment == NULL) return NULL;
+ comment_len = StringLen (sfp->comment);
+ if (comment_len > 3 && StringCmp (sfp->comment + comment_len - 3, "LTR") == 0)
+ {
+ description = (CharPtr) MemNew (comment_len - 3);
+ if (description == NULL) return NULL;
+ StringNCpy (description, sfp->comment, comment_len - 4);
+ description[comment_len - 4] = 0;
+ }
+ else
+ {
+ description = StringSave (sfp->comment);
+ }
+ return description;
+}
+
+static Boolean LIBCALLBACK Is3UTR (
+ SeqFeatPtr sfp
+)
+{
+ if (sfp == NULL || sfp->idx.subtype != FEATDEF_3UTR) return FALSE;
+ return TRUE;
+}
+
+static Boolean LIBCALLBACK Is5UTR (
+ SeqFeatPtr sfp
+)
+{
+ if (sfp == NULL || sfp->idx.subtype != FEATDEF_5UTR) return FALSE;
+ return TRUE;
+}
+
+static Boolean LIBCALLBACK IsCDS (SeqFeatPtr sfp)
+{
+ if (sfp == NULL) return FALSE;
+ if (sfp->data.choice == SEQFEAT_CDREGION)
+ return TRUE;
+ return FALSE;
+}
+
+static Boolean LIBCALLBACK IsrRNA (
+ SeqFeatPtr sfp
+)
+{
+ if (sfp == NULL || sfp->idx.subtype != FEATDEF_rRNA) return FALSE;
+ return TRUE;
+}
+
+static Boolean LIBCALLBACK IsMiscRNA (
+ SeqFeatPtr sfp
+)
+{
+ if (sfp == NULL
+ || (sfp->idx.subtype != FEATDEF_misc_RNA
+ && sfp->idx.subtype != FEATDEF_otherRNA))
+ {
+ return FALSE;
+ }
+ return TRUE;
+}
+
+static Boolean LIBCALLBACK IsncRNA (
+ SeqFeatPtr sfp
+)
+{
+ RnaRefPtr rrp;
+
+ if (sfp == NULL || sfp->data.choice != SEQFEAT_RNA) return FALSE;
+ if (sfp->idx.subtype == FEATDEF_scRNA
+ || sfp->idx.subtype == FEATDEF_snRNA
+ || sfp->idx.subtype == FEATDEF_snoRNA
+ || sfp->idx.subtype == FEATDEF_ncRNA
+ || sfp->idx.subtype == FEATDEF_tmRNA)
+ {
+ return TRUE;
+ }
+ rrp = (RnaRefPtr) sfp->data.value.ptrvalue;
+ if (rrp == NULL || rrp->type != 255 || rrp->ext.choice != 1)
+ {
+ return FALSE;
+ }
+ else if (StringCmp (rrp->ext.value.ptrvalue, "ncRNA") == 0
+ || StringCmp (rrp->ext.value.ptrvalue, "tmRNA") == 0
+ || StringCmp (rrp->ext.value.ptrvalue, "misc_RNA") == 0
+ || IsStringInNcRNAClassList (rrp->ext.value.ptrvalue))
+ {
+ return TRUE;
+ }
+ else
+ {
+ return FALSE;
+ }
+}
+
+
+static CharPtr GetncRNAProduct (SeqFeatPtr sfp, Boolean use_ncrna_note)
+{
+ GBQualPtr gbq = NULL, q_class = NULL, q_product = NULL;
+ CharPtr product = NULL;
+
+ if (sfp == NULL)
+ {
+ return NULL;
+ }
+
+ gbq = sfp->qual;
+ while (gbq != NULL && q_product == NULL) {
+ if (StringICmp (gbq->qual, "ncRNA_class") == 0
+ && !StringHasNoText (gbq->val)) {
+ q_class = gbq;
+ } else if (StringICmp (gbq->qual, "product") == 0
+ && !StringHasNoText (gbq->val)) {
+ q_product = gbq;
+ }
+ gbq = gbq->next;
+ }
+ if (q_product != NULL) {
+ product = StringSave (q_product->val);
+ } else if (q_class != NULL) {
+ if (use_ncrna_note && !StringHasNoText (sfp->comment)) {
+ product = StringSave (sfp->comment);
+ } else {
+ product = StringSave (q_class->val);
+ }
+ } else if (use_ncrna_note && !StringHasNoText (sfp->comment)) {
+ product = StringSave (sfp->comment);
+ }
+ return product;
+}
+
+
+static Boolean LIBCALLBACK IsPrecursorRNA (SeqFeatPtr sfp)
+{
+ if (sfp == NULL || sfp->idx.subtype != FEATDEF_preRNA) return FALSE;
+ return TRUE;
+}
+
+
+static CharPtr mobile_element_keywords [] = {
+ "insertion sequence",
+ "retrotransposon",
+ "non-LTR retrotransposon",
+ "transposon",
+ "integron",
+ "other",
+ "SINE",
+ "MITE",
+ "LINE"
+};
+
+enum mobile_element_keyword_nums
+{
+ eMobileElementInsertionSequence = 0,
+ eMobileElementRetrotransposon,
+ eMobileElementNonLTRRetrotransposon,
+ eMobileElementTransposon,
+ eMobileElementIntegron,
+ eMobileElementOther,
+ eMobileElementSINE,
+ eMobileElementMITE,
+ eMobileElementLINE
+};
+
+static Int4 StartsWithMobileElementKeyword (CharPtr txt)
+{
+ Int4 i, keyword_len;
+
+ for (i=0; i < sizeof (mobile_element_keywords) / sizeof (CharPtr); i++) {
+ keyword_len = StringLen (mobile_element_keywords[i]);
+ if (StringNCmp (txt, mobile_element_keywords[i], keyword_len) == 0
+ && (*(txt + keyword_len) == ':' || *(txt + keyword_len) == 0)) {
+ return i;
+ }
+ }
+ return -1;
+}
+
+static Int4 IsMobileElementGBQual (GBQualPtr gbqual)
+{
+ Int4 keyword_idx;
+ if (gbqual == NULL || gbqual->qual == NULL || gbqual->val == NULL) return -1;
+ if (StringCmp (gbqual->qual, "mobile_element") != 0) return -1;
+ keyword_idx = StartsWithMobileElementKeyword (gbqual->val);
+ if (keyword_idx < 0) return -1;
+ if (keyword_idx == eMobileElementOther
+ && StringStr (gbqual->val, "transposable element") == NULL) {
+ return -1;
+ } else {
+ return keyword_idx;
+ }
+}
+
+
+static Boolean FeatureDoesNotGetPartialComplete (SeqFeatPtr sfp)
+{
+ GBQualPtr gbqual;
+ Int4 keyword_idx;
+ if (sfp == NULL || sfp->idx.subtype != FEATDEF_repeat_region) return FALSE;
+
+ for (gbqual = sfp->qual; gbqual != NULL; gbqual = gbqual->next)
+ {
+ keyword_idx = IsMobileElementGBQual(gbqual);
+ if (keyword_idx == eMobileElementSINE
+ || keyword_idx == eMobileElementLINE) {
+ return TRUE;
+ }
+ }
+ return FALSE;
+}
+
+
+NLM_EXTERN Boolean LIBCALLBACK IsMobileElement (SeqFeatPtr sfp)
+{
+ GBQualPtr gbqual;
+ if (sfp == NULL || sfp->idx.subtype != FEATDEF_repeat_region) return FALSE;
+
+ for (gbqual = sfp->qual; gbqual != NULL; gbqual = gbqual->next)
+ {
+ if (IsMobileElementGBQual(gbqual) > -1) {
+ return TRUE;
+ }
+ }
+ return FALSE;
+}
+
+static Boolean LIBCALLBACK IsRemovableMobileElement (SeqFeatPtr sfp)
+{
+ GBQualPtr gbqual;
+ Int4 keyword_idx;
+ if (sfp == NULL || sfp->idx.subtype != FEATDEF_repeat_region) return FALSE;
+
+ for (gbqual = sfp->qual; gbqual != NULL; gbqual = gbqual->next)
+ {
+ keyword_idx = IsMobileElementGBQual(gbqual);
+ if (keyword_idx >= eMobileElementSINE
+ && keyword_idx <= eMobileElementLINE) {
+ return TRUE;
+ }
+ }
+ return FALSE;
+}
+
+static CharPtr GetMobileElementTypeword (CharPtr desc_start, Int4 keyword_idx)
+{
+ if (keyword_idx < 0) return NULL;
+ if (StringHasNoText (desc_start)) {
+ return mobile_element_keywords[keyword_idx];
+ }
+ switch (keyword_idx) {
+ case eMobileElementTransposon:
+ if (StringStr (desc_start, "P-element") != NULL) {
+ return "P-element";
+ } else if (StringStr (desc_start, "MITE") != NULL) {
+ return "MITE";
+ } else {
+ return mobile_element_keywords[keyword_idx];
+ }
+ break;
+ case eMobileElementOther:
+ return "transposable element";
+ break;
+ case eMobileElementIntegron:
+ if (StringStr (desc_start, "superintegron") != NULL) {
+ return "superintegron";
+ } else {
+ return mobile_element_keywords[keyword_idx];
+ }
+ break;
+ default:
+ return mobile_element_keywords[keyword_idx];
+ break;
+ }
+}
+
+
+static void LIBCALLBACK GetMobileElementFeatureLabel (
+ ValNodePtr featlist,
+ BioseqPtr bsp,
+ Uint1 biomol,
+ FeatureLabelPtr flp
+)
+{
+ GBQualPtr gbqual;
+ Int4 keyword_idx = -1;
+ Int4 keyword_len;
+ Int4 val_len;
+ SeqFeatPtr sfp;
+ CharPtr desc_start = NULL, typeword, cp;
+
+ flp->pluralizable = TRUE;
+ flp->is_typeword_first = FALSE;
+ flp->typeword = NULL;
+ flp->description = NULL;
+
+ if (featlist == NULL) return;
+ sfp = featlist->data.ptrvalue;
+ if (sfp == NULL) return;
+
+ gbqual = sfp->qual;
+ while (gbqual != NULL
+ && (keyword_idx = IsMobileElementGBQual(gbqual)) < 0)
+ {
+ gbqual = gbqual->next;
+ }
+ if (gbqual == NULL) return;
+
+ keyword_len = StringLen (mobile_element_keywords[keyword_idx]);
+ desc_start = gbqual->val + keyword_len;
+ while (isspace (*desc_start) || *desc_start == ':') {
+ desc_start++;
+ }
+
+ /* find alternate typewords */
+ typeword = GetMobileElementTypeword(desc_start, keyword_idx);
+ if (typeword == NULL) return;
+ keyword_len = StringLen (typeword);
+
+ flp->typeword = StringSave (typeword);
+ val_len = StringLen (desc_start);
+
+ if (StringHasNoText (desc_start))
+ {
+ flp->is_typeword_first = FALSE;
+ flp->description = NULL;
+ } else if (StringCmp (desc_start, typeword) == 0) {
+ /* just the keyword */
+ flp->is_typeword_first = FALSE;
+ flp->description = NULL;
+ return;
+ } else if (StringNCmp (desc_start, typeword, keyword_len) == 0) {
+ /* starts with keyword */
+ /* if keyword is hyphenated portion of name, no pluralization */
+ if (desc_start[keyword_len] == '-') {
+ flp->description = StringSave (desc_start);
+ flp->typeword = MemFree (flp->typeword);
+ flp->typeword = StringSave ("");
+ flp->pluralizable = FALSE;
+ } else {
+ flp->is_typeword_first = TRUE;
+ flp->description = StringSave (desc_start + keyword_len + 1);
+ }
+ return;
+ } else if (val_len > 8 && StringCmp (desc_start + val_len - keyword_len, typeword) == 0
+ && val_len - keyword_len - 1 >= 0
+ && isspace (*(desc_start + val_len - keyword_len - 1))) {
+ /* ends with keyword */
+ flp->is_typeword_first = FALSE;
+ flp->description = MemNew (val_len - keyword_len);
+ if (flp->description == NULL) return;
+ StringNCpy (flp->description, desc_start, val_len - keyword_len - 1);
+ flp->description[val_len - keyword_len -1] = 0;
+ } else if ((cp = StringStr (desc_start, typeword)) != NULL
+ && cp != desc_start
+ && isspace (*(cp -1))) {
+ /* keyword in the middle */
+ flp->description = StringSave (desc_start);
+ flp->typeword = MemFree (flp->typeword);
+ flp->typeword = StringSave ("");
+ flp->pluralizable = FALSE;
+ } else {
+ /* keyword not in description */
+ if (StringICmp (flp->typeword, "integron") == 0) {
+ flp->is_typeword_first = FALSE;
+ } else {
+ flp->is_typeword_first = TRUE;
+ }
+ flp->description = StringSave (desc_start);
+ if (StringCmp (flp->description, "") == 0) {
+ flp->is_typeword_first = FALSE;
+ }
+ }
+ if (StringCmp (flp->description, "unnamed") == 0) {
+ flp->description = MemFree (flp->description);
+ }
+}
+
+
+static Boolean LIBCALLBACK IsEndogenousVirusSequence (
+ SeqFeatPtr sfp
+)
+{
+ GBQualPtr gbqual;
+ if (sfp == NULL || sfp->idx.subtype != FEATDEF_repeat_region) return FALSE;
+
+ for (gbqual = sfp->qual; gbqual != NULL; gbqual = gbqual->next)
+ {
+ if (StringCmp (gbqual->qual, "endogenous_virus") == 0)
+ return TRUE;
+ }
+ return FALSE;
+}
+
+static CharPtr GetEndogenousVirusSequenceDescription (
+ SeqFeatPtr sfp
+)
+{
+ GBQualPtr gbqual;
+
+ if (sfp == NULL) return NULL;
+
+ gbqual = sfp->qual;
+ while (gbqual != NULL && StringCmp (gbqual->qual, "endogenous_virus") != 0)
+ {
+ gbqual = gbqual->next;
+ }
+ if (gbqual != NULL)
+ {
+ if (StringDoesHaveText (gbqual->val)
+ && StringCmp (gbqual->val, "unnamed") != 0)
+ {
+ return StringSave (gbqual->val);
+ }
+ }
+ return NULL;
+}
+
+static Boolean LIBCALLBACK IsDloop (
+ SeqFeatPtr sfp
+)
+{
+ if (sfp == NULL || sfp->idx.subtype != FEATDEF_D_loop) return FALSE;
+ return TRUE;
+}
+
+static Boolean LIBCALLBACK IsmRNA (
+ SeqFeatPtr sfp
+)
+{
+ if (sfp == NULL || sfp->idx.subtype != FEATDEF_mRNA) return FALSE;
+ return TRUE;
+}
+
+static Boolean LIBCALLBACK IstRNA (
+ SeqFeatPtr sfp
+)
+{
+ if (sfp == NULL || sfp->idx.subtype != FEATDEF_tRNA) return FALSE;
+ return TRUE;
+}
+
+static Boolean LIBCALLBACK IsControlRegion (
+ SeqFeatPtr sfp
+)
+{
+ if (sfp == NULL
+ || sfp->idx.subtype != FEATDEF_misc_feature
+ || sfp->comment == NULL
+ || StringNCmp (sfp->comment, "control region", StringLen ("control region")) != 0)
+ {
+ return FALSE;
+ }
+ return TRUE;
+}
+
+static Boolean LIBCALLBACK IsGeneCluster (
+ SeqFeatPtr sfp
+)
+{
+ if (sfp == NULL
+ || sfp->idx.subtype != FEATDEF_misc_feature
+ || sfp->comment == NULL
+ || (StringStr (sfp->comment, "gene cluster") == NULL
+ && StringStr (sfp->comment, "gene locus") == NULL))
+ {
+ return FALSE;
+ }
+ return TRUE;
+}
+
+
+static void LIBCALLBACK GetGeneClusterFeatureLabel (
+ ValNodePtr featlist,
+ BioseqPtr bsp,
+ Uint1 biomol,
+ FeatureLabelPtr flp
+)
+{
+ SeqFeatPtr main_feat;
+ CharPtr cp;
+ Int4 datalen;
+
+ if (featlist == NULL || featlist->data.ptrvalue == NULL) return;
+ main_feat = featlist->data.ptrvalue;
+ if (StringHasNoText (main_feat->comment)) return;
+ cp = StringStr (main_feat->comment, "gene cluster");
+ if (cp == NULL)
+ {
+ cp = StringStr (main_feat->comment, "gene locus");
+ if (cp == NULL) return;
+ flp->typeword = StringSave ("gene locus");
+ }
+ else
+ {
+ flp->typeword = StringSave ("gene cluster");
+ }
+ flp->pluralizable = FALSE;
+ flp->is_typeword_first = FALSE;
+ datalen = cp - main_feat->comment;
+ if (datalen > 0)
+ {
+ flp->description = (CharPtr) MemNew ((datalen + 1) * sizeof (Char));
+ StringNCpy (flp->description, main_feat->comment, datalen);
+ flp->description [datalen] = 0;
+ TrimSpacesAroundString (flp->description);
+ }
+ else
+ {
+ flp->description = NULL;
+ }
+}
+
+
+static Boolean LIBCALLBACK IsIntergenicSpacer (
+ SeqFeatPtr sfp
+)
+{
+ if (sfp == NULL
+ || sfp->idx.subtype != FEATDEF_misc_feature
+ || sfp->comment == NULL
+ || StringStr (sfp->comment, "intergenic spacer") == NULL)
+ {
+ return FALSE;
+ }
+ return TRUE;
+}
+
+/* This function produces the default definition line label for a misc_feature
+ * that has the word "intergenic spacer" in the comment. If the comment starts
+ * with the word "contains", "contains" is ignored. If "intergenic spacer"
+ * appears first in the comment (or first after the word "contains", the text
+ * after the words "intergenic spacer" but before the first semicolon (if any)
+ * appear after the words "intergenic spacer" in the definition line. If there
+ * are words after "contains" or at the beginning of the comment before the words
+ * "intergenic spacer", this text will appear in the definition line before the words
+ * "intergenic spacer".
+ */
+static void LIBCALLBACK GetIntergenicSpacerFeatureLabel (
+ ValNodePtr featlist,
+ BioseqPtr bsp,
+ Uint1 biomol,
+ FeatureLabelPtr flp
+)
+{
+ SeqFeatPtr main_feat;
+ CharPtr cp, buffer;
+ Int4 datalen, offset;
+
+ if (featlist == NULL || featlist->data.ptrvalue == NULL) return;
+ main_feat = featlist->data.ptrvalue;
+ if (StringHasNoText (main_feat->comment)) return;
+ if (StringNCmp (main_feat->comment, "contains ", 9) == 0)
+ {
+ buffer = main_feat->comment + 9;
+ }
+ else
+ {
+ buffer = main_feat->comment;
+ }
+ cp = StringStr (buffer, "intergenic spacer");
+ if (cp == NULL) return;
+ flp->typeword = StringSave ("intergenic spacer");
+ flp->pluralizable = FALSE;
+ if (cp == buffer)
+ {
+ flp->is_typeword_first = TRUE;
+ offset = StringLen ("intergenic spacer") + 1;
+ if (StringNCmp (cp + offset, "and ", 4) == 0
+ || *(cp + StringLen("intergenic spacer")) == 0)
+ {
+ flp->description = NULL;
+ }
+ else
+ {
+ flp->description = StringSave (cp + StringLen ("intergenic spacer") + 1);
+ cp = StringChr (flp->description, ';');
+ if (cp != NULL)
+ {
+ *cp = 0;
+ }
+ }
+ }
+ else
+ {
+ flp->is_typeword_first = FALSE;
+ datalen = cp - buffer;
+ flp->description = MemNew ( datalen + 1);
+ if (flp->description == NULL) return;
+ StringNCpy (flp->description, buffer, datalen);
+ flp->description [datalen] = 0;
+ TrimSpacesAroundString (flp->description);
+ }
+}
+
+/* These structures are used for parsing tRNA and intergenic spacer information
+ * from misc_feature comments.
+ */
+typedef struct commentfeat
+{
+ CharPtr product_name;
+ CharPtr gene_name;
+} CommentFeatData, PNTR CommentFeatPtr;
+
+
+static CommentFeatPtr CommentFeatFree (CommentFeatPtr cfp)
+{
+ if (cfp != NULL) {
+ cfp->product_name = MemFree (cfp->product_name);
+ cfp->gene_name = MemFree (cfp->gene_name);
+ cfp = MemFree (cfp);
+ }
+ return cfp;
+}
+
+
+typedef struct intergenicspacerdef
+{
+ CharPtr first_gene;
+ CharPtr second_gene;
+} IntergenicSpacerDefData, PNTR IntergenicSpacerDefPtr;
+
+static IntergenicSpacerDefPtr IntergenicSpacerDefFree (IntergenicSpacerDefPtr ip)
+{
+ if (ip != NULL) {
+ ip->first_gene = MemFree (ip->first_gene);
+ ip->second_gene = MemFree (ip->second_gene);
+ ip = MemFree (ip);
+ }
+ return ip;
+}
+
+
+static Boolean IsUpperCaseChar (Char ch)
+{
+ if (StringChr("ABCDEFGHIJKLMNOPQRSTUVWXYZ",ch) != NULL)
+ return TRUE;
+ else
+ return FALSE;
+}
+
+static Boolean IsLowerCaseChar (Char ch)
+{
+ if (StringChr("abcdefghijklmnopqrstuvwxyz",ch) != NULL)
+ return TRUE;
+ else
+ return FALSE;
+}
+
+static CommentFeatPtr ParseGeneFromNoteForDefLine (CharPtr PNTR comment)
+{
+ CommentFeatPtr tdp;
+ CharPtr product_start, product_end, gene_start, gene_end, cp;
+ Int4 product_len, gene_len;
+
+ if (comment == NULL || *comment == NULL)
+ {
+ return NULL;
+ }
+
+ /* tRNA name must start with "tRNA-" and be followed by one uppercase letter and
+ * two lowercase letters.
+ */
+ product_start = *comment;
+ gene_start = product_start;
+ while (*gene_start != 0 && !isspace (*gene_start)) {
+ gene_start++;
+ }
+ if (gene_start == product_start) {
+ return NULL;
+ }
+ product_end = gene_start;
+ while (isspace (*gene_start)) {
+ gene_start++;
+ }
+ if (*gene_start != '(') {
+ return NULL;
+ }
+ gene_start++;
+ gene_end = gene_start;
+ while (*gene_end != 0 && *gene_end != ')') {
+ gene_end++;
+ }
+ if (*gene_end == 0) {
+ return NULL;
+ }
+ cp = gene_end + 1;
+ while (*cp != 0 && isspace (*cp)) {
+ cp++;
+ }
+
+ if (StringNCmp (cp, "gene", 4) != 0) {
+ return NULL;
+ }
+
+ tdp = (CommentFeatPtr) MemNew (sizeof (CommentFeatData));
+ if (tdp == NULL)
+ {
+ return NULL;
+ }
+ product_len = product_end - product_start;
+ tdp->product_name = (CharPtr) MemNew (sizeof (Char) * (1 + product_len));
+ StringNCpy (tdp->product_name, product_start, product_len);
+ tdp->product_name[product_len] = 0;
+
+ gene_len = gene_end - gene_start;
+ tdp->gene_name = (CharPtr) MemNew (sizeof (Char) * (1 + gene_len));
+ StringNCpy (tdp->gene_name, gene_start, gene_len);
+ tdp->gene_name[gene_len] = 0;
+
+ *comment = cp + 4;
+ return tdp;
+}
+
+
+static IntergenicSpacerDefPtr ParseIntergenicSpacerFromNoteForDef (CharPtr PNTR comment)
+{
+ IntergenicSpacerDefPtr idp;
+ CharPtr first_gene_start, dash, second_gene_start, second_gene_end, cp;
+ Int4 first_gene_len, second_gene_len;
+
+ if (comment == NULL || *comment == NULL)
+ {
+ return NULL;
+ }
+
+ /* description must start with "trn" and be followed by one uppercase letter, followed
+ * by a dash, followed by "trn", followed by one uppercase letter, followed by whitespace,
+ * followed by the phrase "intergenic spacer".
+ */
+ first_gene_start = *comment;
+ dash = first_gene_start;
+ while (*dash != 0 && isalpha (*dash)) {
+ dash++;
+ }
+ if (*dash != '-') {
+ return NULL;
+ }
+ second_gene_start = dash + 1;
+ second_gene_end = second_gene_start;
+ while (*second_gene_end != 0 && isalpha (*second_gene_end)) {
+ second_gene_end ++;
+ }
+ if (!isspace (*second_gene_end)) {
+ return NULL;
+ }
+ cp = second_gene_end;
+ while (isspace (*cp)) {
+ cp++;
+ }
+ if (StringNCmp (cp, "intergenic spacer", 17) != 0) {
+ return NULL;
+ }
+
+ idp = (IntergenicSpacerDefPtr) MemNew (sizeof (IntergenicSpacerDefData));
+ if (idp == NULL)
+ {
+ return NULL;
+ }
+
+ first_gene_len = dash - first_gene_start;
+ idp->first_gene = (CharPtr) MemNew (sizeof (Char) * (1 + first_gene_len));
+ StringNCpy (idp->first_gene, first_gene_start, first_gene_len);
+ idp->first_gene [first_gene_len] = 0;
+
+ second_gene_len = second_gene_end - second_gene_start;
+ idp->second_gene = (CharPtr) MemNew (sizeof (Char) * (1 + second_gene_len));
+ StringNCpy (idp->second_gene, second_gene_start, second_gene_len);
+ idp->second_gene [second_gene_len] = 0;
+
+ *comment = cp + 17;
+ return idp;
+}
+
+/* This creates a feature clause from a tRNADef structure. */
+static FeatureClausePtr
+FeatureClauseFromParsedComment
+(CommentFeatPtr tdp,
+ SeqFeatPtr misc_feat,
+ Boolean is_partial,
+ BioseqPtr bsp,
+ DeflineFeatureRequestListPtr rp)
+{
+ FeatureClausePtr fcp;
+
+ if (tdp == NULL)
+ {
+ return NULL;
+ }
+
+ fcp = NewFeatureClause ( misc_feat, bsp, rp);
+ if (fcp != NULL)
+ {
+ fcp->feature_label_data.is_typeword_first = FALSE;
+ fcp->feature_label_data.typeword = StringSave ("gene");
+ fcp->feature_label_data.description = (CharPtr) MemNew (16 * sizeof (Char));
+ if (fcp->feature_label_data.description != NULL)
+ {
+ sprintf (fcp->feature_label_data.description, "%s (%s)",
+ tdp->product_name, tdp->gene_name);
+ }
+ if (is_partial)
+ {
+ fcp->interval = StringSave ("partial sequence");
+ }
+ else
+ {
+ fcp->interval = StringSave ("complete sequence");
+ }
+ }
+ return fcp;
+}
+
+/* This function produces a feature clause list that should replace the original
+ * single clause for a misc_feat that contains a note with one or more tRNAs and
+ * an intergenic spacer.
+ */
+static ValNodePtr
+ParsetRNAIntergenicSpacerElements
+(SeqFeatPtr misc_feat,
+BioseqPtr bsp,
+DeflineFeatureRequestListPtr rp)
+{
+ FeatureClausePtr fcp;
+ ValNodePtr head, vnp;
+ Boolean partial5, partial3;
+ CharPtr cp;
+ IntergenicSpacerDefPtr spacer = NULL;
+ CommentFeatPtr gene1 = NULL, gene2 = NULL;
+ Boolean parse_list = TRUE;
+
+
+ if (misc_feat == NULL
+ || StringHasNoText (misc_feat->comment))
+ {
+ return NULL;
+ }
+
+ /* for list, must start with the word "contains" */
+ if (StringNICmp (misc_feat->comment, "contains ", 9) == 0)
+ {
+ cp = misc_feat->comment + 9;
+ }
+ else
+ {
+ return NULL;
+ }
+
+ while (isspace (*cp))
+ {
+ cp ++;
+ }
+
+ gene1 = ParseGeneFromNoteForDefLine (&cp);
+ if (gene1 != NULL)
+ {
+ if (*cp == ',')
+ {
+ cp++;
+ }
+ if (StringNCmp (cp, " and", 4) == 0)
+ {
+ cp += 4;
+ }
+ while (isspace (*cp))
+ {
+ cp++;
+ }
+ }
+
+ spacer = ParseIntergenicSpacerFromNoteForDef (&cp);
+
+ if (spacer == NULL) {
+ gene1 = CommentFeatFree (gene1);
+ return NULL;
+ }
+ if (spacer != NULL)
+ {
+ if (*cp == ',')
+ {
+ cp++;
+ }
+ if (StringNCmp (cp, " and", 4) == 0)
+ {
+ cp += 4;
+ }
+ while (isspace (*cp))
+ {
+ cp++;
+ }
+ }
+
+ gene2 = ParseGeneFromNoteForDefLine (&cp);
+
+ while (isspace (*cp))
+ {
+ cp++;
+ }
+
+ head = NULL;
+ CheckSeqLocForPartial (misc_feat->location, &partial5, &partial3);
+
+ if ((*cp != 0 && *cp != ';') /* this must be the complete note or be separated from
+ * the rest of the note by a semicolon
+ */
+ || ! parse_list /* didn't start with "contains" */
+ || spacer == NULL /* no spacer */
+ /* don't parse if genes don't match up */
+ || (gene1 != NULL && StringCmp (gene1->gene_name, spacer->first_gene) != 0)
+ || (gene2 != NULL && StringCmp (gene2->gene_name, spacer->second_gene) != 0))
+ {
+ /* do nothing - special parse conditions not met */
+ gene1 = CommentFeatFree (gene1);
+ gene2 = CommentFeatFree (gene2);
+ spacer = IntergenicSpacerDefFree (spacer);
+ return NULL;
+ }
+
+ /* add clause for tRNA before spacer (if any) */
+ fcp = FeatureClauseFromParsedComment (gene1, misc_feat, partial5, bsp, rp);
+ if (fcp != NULL)
+ {
+ vnp = ValNodeNew (head);
+ if (head == NULL) head = vnp;
+ if (vnp == NULL) return NULL;
+ vnp->data.ptrvalue = fcp;
+ vnp->choice = DEFLINE_CLAUSEPLUS;
+ }
+
+ /* spacer was already checked, so we know it is not NULL */
+ fcp = NewFeatureClause ( misc_feat, bsp, rp);
+ if (fcp != NULL)
+ {
+ fcp->feature_label_data.is_typeword_first = FALSE;
+ fcp->feature_label_data.typeword = StringSave ("intergenic spacer");
+ fcp->feature_label_data.description = (CharPtr) MemNew (10 * sizeof (Char));
+ if (fcp->feature_label_data.description != NULL)
+ {
+ sprintf (fcp->feature_label_data.description, "%s-%s",
+ spacer->first_gene, spacer->second_gene);
+ }
+ if ((gene1 == NULL && partial5) || (gene2 == NULL && partial3))
+ {
+ fcp->interval = StringSave ("partial sequence");
+ }
+ else
+ {
+ fcp->interval = StringSave ("complete sequence");
+ }
+
+ vnp = ValNodeNew (head);
+ if (head == NULL) head = vnp;
+ if (vnp == NULL) return NULL;
+ vnp->data.ptrvalue = fcp;
+ vnp->choice = DEFLINE_CLAUSEPLUS;
+ }
+
+ /* add clause for tRNA after spacer (if any) */
+ fcp = FeatureClauseFromParsedComment (gene2, misc_feat, partial3, bsp, rp);
+ if (fcp != NULL)
+ {
+ vnp = ValNodeNew (head);
+ if (head == NULL) head = vnp;
+ if (vnp == NULL) return NULL;
+ vnp->data.ptrvalue = fcp;
+ vnp->choice = DEFLINE_CLAUSEPLUS;
+ }
+ spacer = IntergenicSpacerDefFree (spacer);
+ gene1 = CommentFeatFree (gene1);
+ gene2 = CommentFeatFree (gene2);
+
+ return head;
+}
+
+static Boolean LIBCALLBACK IsSatelliteSequence (
+ SeqFeatPtr sfp
+)
+{
+ GBQualPtr gbqual;
+ if (sfp == NULL
+ || sfp->idx.subtype != FEATDEF_repeat_region
+ || StringHasNoText (sfp->comment)
+ || (StringNCmp (sfp->comment, "microsatellite", 14) != 0
+ && StringNCmp (sfp->comment, "satellite", 9) != 0))
+ {
+ return FALSE;
+ }
+
+ for (gbqual = sfp->qual; gbqual != NULL; gbqual = gbqual->next)
+ {
+ if (StringCmp (gbqual->qual, "rpt_type") == 0
+ && StringCmp (gbqual->val, "tandem") == 0)
+ {
+ return TRUE;
+ }
+ }
+ return FALSE;
+}
+
+static Boolean LIBCALLBACK IsPromoter (
+ SeqFeatPtr sfp
+)
+{
+ if (sfp == NULL || sfp->idx.subtype != FEATDEF_promoter) return FALSE;
+ return TRUE;
+}
+
+static Boolean LIBCALLBACK IsEndogenousVirusSourceFeature (
+ SeqFeatPtr sfp
+)
+{
+ BioSourcePtr biop;
+ SubSourcePtr ssp;
+
+ if (sfp == NULL || sfp->idx.subtype != FEATDEF_BIOSRC) return FALSE;
+ if ((biop = sfp->data.value.ptrvalue) == NULL) return FALSE;
+ ssp = biop->subtype;
+ while (ssp != NULL && ssp->subtype != SUBSRC_endogenous_virus_name)
+ {
+ ssp = ssp->next;
+ }
+ if (ssp != NULL) return TRUE;
+ return FALSE;
+}
+
+static CharPtr GetEndogenousVirusSourceFeatureDescription (
+ SeqFeatPtr sfp
+)
+{
+ BioSourcePtr biop;
+ SubSourcePtr ssp;
+
+ if (sfp == NULL || sfp->idx.subtype != FEATDEF_BIOSRC) return NULL;
+ if ((biop = sfp->data.value.ptrvalue) == NULL) return NULL;
+ ssp = biop->subtype;
+ while (ssp != NULL && ssp->subtype != SUBSRC_endogenous_virus_name)
+ {
+ ssp = ssp->next;
+ }
+ if (ssp != NULL && ssp->name != NULL)
+ {
+ return StringSave (ssp->name);
+ }
+ return NULL;
+}
+
+
+static CharPtr noncoding_feature_keywords[] = {
+ "similar to ",
+ "contains "
+};
+
+static CharPtr find_noncoding_feature_keyword (
+ CharPtr comment
+)
+{
+ Int4 i, num_noncoding_feature_keywords, keywordlen;
+ CharPtr cp, buffer;
+
+ if (comment == NULL) return NULL;
+ num_noncoding_feature_keywords = sizeof (noncoding_feature_keywords) / sizeof (CharPtr);
+ for (i=0; i < num_noncoding_feature_keywords; i++)
+ {
+ keywordlen = StringLen (noncoding_feature_keywords [i]);
+ buffer = comment;
+ while ((cp = StringStr (buffer, noncoding_feature_keywords [i])) != NULL)
+ {
+ if ( StringNCmp (cp + keywordlen,
+ "GenBank Accession Number",
+ StringLen ("GenBank Accession Number")) != 0)
+ {
+ return cp + keywordlen;
+ }
+ else
+ {
+ buffer = cp + 1;
+ }
+ }
+ }
+ return NULL;
+}
+
+static Boolean LIBCALLBACK IsNoncodingProductFeat (
+ SeqFeatPtr sfp
+)
+{
+ if ( sfp == NULL
+ || sfp->idx.subtype != FEATDEF_misc_feature
+ || sfp->comment == NULL
+ || StringStr (sfp->comment, "intergenic") != NULL
+ || (find_noncoding_feature_keyword (sfp->comment) == NULL
+ && (StringStr (sfp->comment, "nonfunctional ") == NULL
+ || StringStr (sfp->comment, " due to ") == NULL)))
+ {
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+static CharPtr GetNoncodingProductFeatProduct (
+ SeqFeatPtr sfp
+)
+{
+ CharPtr productname;
+ Int4 namelen, compare_len;
+ CharPtr name_start, sep;
+
+ if (sfp == NULL || sfp->comment == NULL) return NULL;
+
+ if ((name_start = StringStr (sfp->comment, "nonfunctional ")) != NULL
+ && (sep = StringStr (sfp->comment, " due to ")) != NULL
+ && sep > name_start)
+ {
+ productname = StringSave (name_start);
+ productname [ sep - name_start] = 0;
+ return productname;
+ }
+
+ name_start = find_noncoding_feature_keyword (sfp->comment);
+ if (name_start == NULL) return NULL;
+
+ sep = StringStr (name_start, ";");
+ if (sep == NULL)
+ {
+ namelen = StringLen (name_start);
+ }
+ else
+ {
+ namelen = sep - name_start;
+ }
+
+ productname = MemNew (namelen + 6);
+ if (productname == NULL) return NULL;
+
+ StringNCpy (productname, name_start, namelen);
+ productname [namelen] = 0;
+
+ /* remove sequence from end of name if present */
+ compare_len = StringLen (" sequence");
+ if (StringCmp (productname + namelen - compare_len, " sequence") == 0)
+ {
+ productname [ namelen - compare_len] = 0;
+ namelen = StringLen (productname);
+ }
+ /* add "-like" if not present */
+ compare_len = StringLen ("-like");
+ if (StringCmp (productname + namelen - compare_len, "-like") != 0)
+ {
+ StringCat (productname, "-like");
+ namelen = StringLen (productname);
+ }
+ return productname;
+}
+
+static Boolean LIBCALLBACK IsMiscFeat (
+ SeqFeatPtr sfp
+)
+{
+ if ( sfp == NULL
+ || sfp->idx.subtype != FEATDEF_misc_feature
+ || sfp->comment == NULL)
+ {
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+static Boolean LIBCALLBACK IsOperon (
+ SeqFeatPtr sfp
+)
+{
+ if (sfp == NULL
+ || sfp->idx.subtype != FEATDEF_operon)
+ {
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+static Boolean IsRecognizedFeature (
+ SeqFeatPtr sfp
+)
+{
+ if (IsGene (sfp)
+ || IsCDS (sfp)
+ || IsExon (sfp)
+ || IsIntron (sfp)
+ || IsLTR (sfp)
+ || IsrRNA (sfp)
+ || IstRNA (sfp)
+ || IsmRNA (sfp)
+ || IsMiscRNA (sfp)
+ || IsncRNA (sfp)
+ || IsPrecursorRNA (sfp)
+ || Is3UTR (sfp)
+ || Is5UTR (sfp)
+ || IsMobileElement (sfp)
+ || IsEndogenousVirusSequence (sfp)
+ || IsEndogenousVirusSourceFeature (sfp)
+ || IsDloop (sfp)
+ || IsSatelliteSequence (sfp)
+ || IsControlRegion (sfp)
+ || IsIntergenicSpacer (sfp)
+ || IsGeneCluster (sfp)
+ || IsNoncodingProductFeat (sfp)
+ || IsPromoter (sfp)
+ || IsMiscFeat (sfp)
+ || IsOperon (sfp))
+ {
+ return TRUE;
+ }
+ else
+ {
+ return FALSE;
+ }
+}
+
+/* The following section of code contains functions for dealing with lists of
+ * clauses.
+ */
+
+/* The functions for freeing the memory associated with lists of clauses
+ * are recursive.
+ */
+static void FreeListElement (ValNodePtr element);
+
+/* This function simply frees the ValNodePtr, since there is no extra
+ * memory associated with a DEFLINE_FEATLIST item - the sfp that is
+ * pointed to by data.ptrvalue came from the sequence indexing functions
+ * and should under no circumstances be freed.
+ */
+static void FreeFeatlist (
+ ValNodePtr featlist
+)
+{
+
+ if (featlist == NULL) return;
+ ValNodeFree (featlist);
+}
+
+/* This function frees the memory associated with a FeatureClause, including
+ * the memory associated with any subclauses.
+ */
+static void FreeClausePlusData (
+ FeatureClausePtr fcp
+)
+{
+ if (fcp->interval != NULL)
+ {
+ MemFree (fcp->interval);
+ fcp->interval = NULL;
+ }
+ if (fcp->allelename != NULL)
+ {
+ MemFree (fcp->allelename);
+ fcp->allelename = NULL;
+ }
+ if (fcp->feature_label_data.typeword != NULL)
+ {
+ MemFree (fcp->feature_label_data.typeword);
+ fcp->feature_label_data.typeword = NULL;
+ }
+ if (fcp->feature_label_data.description != NULL)
+ {
+ MemFree (fcp->feature_label_data.description);
+ fcp->feature_label_data.description = NULL;
+ }
+ if (fcp->feature_label_data.productname != NULL)
+ {
+ MemFree (fcp->feature_label_data.productname);
+ fcp->feature_label_data.productname = NULL;
+ }
+ if (fcp->featlist != NULL)
+ {
+ FreeListElement (fcp->featlist);
+ fcp->featlist = NULL;
+ }
+ if (fcp->slp != NULL)
+ {
+ SeqLocFree (fcp->slp);
+ }
+}
+
+/* This function frees the data associated with the FeatureClause
+ * and then frees the ValNode.
+ */
+static void FreeClausePlus (
+ ValNodePtr clauseplus
+)
+{
+ FeatureClausePtr data_struct;
+
+ if (clauseplus == NULL) return;
+ data_struct = (FeatureClausePtr) clauseplus->data.ptrvalue;
+ if (data_struct != NULL)
+ {
+ FreeClausePlusData (data_struct);
+ MemFree (data_struct);
+ clauseplus->data.ptrvalue = NULL;
+ }
+ ValNodeFree (clauseplus);
+}
+
+/* This function frees a list of DEFLINE_FEATLIST, DEFLINE_REMOVEFEAT,
+ * and DEFLINE_CLAUSEPLUS items, starting with the last item in the list.
+ * It recursively frees memory associated with subclauses.
+ */
+static void FreeListElement (
+ ValNodePtr element
+)
+{
+ if (element == NULL) return;
+
+ FreeListElement (element->next);
+ element->next = NULL;
+ if (element->choice == DEFLINE_FEATLIST
+ || element->choice == DEFLINE_REMOVEFEAT)
+ {
+ FreeFeatlist (element);
+ }
+ else if (element->choice == DEFLINE_CLAUSEPLUS)
+ {
+ FreeClausePlus (element);
+ }
+}
+
+/* This function excises from the list pointed to by head all of the clauses
+ * with the delete_me flag set to TRUE and all of the ValNodes with a choice
+ * of DEFLINE_REMOVEFEAT.
+ */
+static void DeleteFeatureClauses (
+ ValNodePtr PNTR head
+)
+{
+ ValNodePtr vnp, prev;
+ FeatureClausePtr fcp;
+ Boolean delete_this_one;
+
+ if (head == NULL) return;
+
+ prev = NULL;
+ vnp = *head;
+ while (vnp != NULL)
+ {
+ delete_this_one = FALSE;
+
+ if (vnp->choice == DEFLINE_CLAUSEPLUS)
+ {
+ fcp = vnp->data.ptrvalue;
+ if (fcp == NULL || fcp->delete_me || fcp->featlist == NULL)
+ {
+ delete_this_one = TRUE;
+ }
+ else
+ {
+ DeleteFeatureClauses (&fcp->featlist);
+ if (fcp->featlist == NULL) delete_this_one = TRUE;
+ }
+ }
+ else if (vnp->choice == DEFLINE_REMOVEFEAT)
+ {
+ delete_this_one = TRUE;
+ }
+
+ if (delete_this_one)
+ {
+ if (prev == NULL)
+ {
+ *head = vnp->next;
+ vnp->next = NULL;
+ FreeListElement (vnp);
+ if (*head == NULL) return;
+ vnp = *head;
+ }
+ else
+ {
+ prev->next = vnp->next;
+ vnp->next = NULL;
+ FreeListElement (vnp);
+ vnp = prev->next;
+ }
+ }
+ else
+ {
+ prev = vnp;
+ vnp = vnp->next;
+ }
+ }
+}
+
+/* This function counts the number of features in the feature list that
+ * satisfy the itemmatch function (or all of them, if itemmatch is NULL).
+ * If recurse_past_found_item, the function will not count features in
+ * subclauses of features that satisfy itemmatch.
+ */
+static Int4 CountFeatures (
+ ValNodePtr clause_list,
+ matchFunction itemmatch,
+ Boolean recurse_past_found_item
+)
+{
+ ValNodePtr vnp;
+ Int4 num_features;
+ FeatureClausePtr fcp;
+
+ num_features = 0;
+ for (vnp = clause_list;
+ vnp != NULL;
+ vnp = vnp->next)
+ {
+ if (vnp->choice == DEFLINE_FEATLIST
+ && (itemmatch == NULL || itemmatch (vnp->data.ptrvalue)))
+ {
+ num_features++;
+ if (! recurse_past_found_item)
+ {
+ return num_features;
+ }
+ }
+ else if (vnp->choice == DEFLINE_CLAUSEPLUS
+ && (fcp = vnp->data.ptrvalue) != NULL)
+ {
+ num_features += CountFeatures (fcp->featlist,
+ itemmatch,
+ recurse_past_found_item);
+ }
+ }
+ return num_features;
+}
+
+/* The following section of code contains functions for grouping features. */
+
+typedef struct matchruledata {
+ matchFunction is_item;
+ Int4 num_match_rules;
+ matchFunction *match_rules;
+} MatchRuleData, PNTR MatchRulePtr;
+
+static void InitRuleForTopLevelClauses (MatchRulePtr mrp)
+{
+ if (mrp == NULL)
+ {
+ return;
+ }
+ mrp->num_match_rules = 4;
+ mrp->match_rules = MemNew (mrp->num_match_rules
+ * sizeof (matchFunction));
+ if (mrp->match_rules == NULL) return;
+ mrp->match_rules[0] = IsMobileElement;
+ mrp->match_rules[1] = IsEndogenousVirusSourceFeature;
+ mrp->match_rules[2] = IsOperon;
+ mrp->match_rules[3] = IsGeneCluster;
+}
+
+static void InitRuleForBottomLevelClauses (MatchRulePtr mrp)
+{
+ if (mrp == NULL)
+ {
+ return;
+ }
+ mrp->num_match_rules = 6;
+ mrp->match_rules = MemNew (mrp->num_match_rules
+ * sizeof (matchFunction));
+ if (mrp->match_rules == NULL) return;
+ mrp->match_rules[0] = IsCDS;
+ mrp->match_rules[1] = IsmRNA;
+ mrp->match_rules[2] = IsGene;
+ mrp->match_rules[3] = IsEndogenousVirusSourceFeature;
+ mrp->match_rules[4] = IsOperon;
+ mrp->match_rules[5] = IsGeneCluster;
+}
+
+/* NumGroupingRules is the number of features for which there is a list of
+ * features to group under.
+ * When grouping features, each feature in the list is examined sequentially.
+ * If there is a rule set that applies to that feature, the entire feature
+ * list is searched for each feature type that this feature might group
+ * beneath. This preserves the biological order that was generated by the
+ * original listing of features by sequence indexing.
+ */
+#define NumGroupingRules 13
+static MatchRulePtr InitializeGroupingRules()
+{
+ MatchRulePtr grouping_rules;
+
+ grouping_rules = MemNew (NumGroupingRules * sizeof (MatchRuleData));
+ if (grouping_rules == NULL) return NULL;
+
+ grouping_rules[0].is_item = IsExon;
+ grouping_rules[0].num_match_rules = 8;
+ grouping_rules[0].match_rules = MemNew (grouping_rules[0].num_match_rules
+ * sizeof (matchFunction));
+ if (grouping_rules[0].match_rules == NULL) return NULL;
+ grouping_rules[0].match_rules[0] = IsCDS;
+ grouping_rules[0].match_rules[1] = IsNoncodingProductFeat;
+ grouping_rules[0].match_rules[2] = IsDloop;
+ grouping_rules[0].match_rules[3] = IsmRNA;
+ grouping_rules[0].match_rules[4] = IsGene;
+ grouping_rules[0].match_rules[5] = IsEndogenousVirusSourceFeature;
+ grouping_rules[0].match_rules[6] = IsOperon;
+ grouping_rules[0].match_rules[7] = IsGeneCluster;
+
+ grouping_rules[1].is_item = IsIntron;
+ grouping_rules[1].num_match_rules = 8;
+ grouping_rules[1].match_rules = MemNew (grouping_rules[1].num_match_rules
+ * sizeof (matchFunction));
+ if (grouping_rules[1].match_rules == NULL) return NULL;
+ grouping_rules[1].match_rules[0] = IsCDS;
+ grouping_rules[1].match_rules[1] = IsNoncodingProductFeat;
+ grouping_rules[1].match_rules[2] = IstRNA;
+ grouping_rules[1].match_rules[3] = IsDloop;
+ grouping_rules[1].match_rules[4] = IsGene;
+ grouping_rules[1].match_rules[5] = IsEndogenousVirusSourceFeature;
+ grouping_rules[1].match_rules[6] = IsOperon;
+ grouping_rules[1].match_rules[7] = IsGeneCluster;
+
+ grouping_rules[2].is_item = IsPromoter;
+ InitRuleForBottomLevelClauses (grouping_rules + 2);
+
+ grouping_rules[3].is_item = IsCDS;
+ grouping_rules[3].num_match_rules = 5;
+ grouping_rules[3].match_rules = MemNew (grouping_rules[3].num_match_rules
+ * sizeof (matchFunction));
+ if (grouping_rules[3].match_rules == NULL) return NULL;
+ grouping_rules[3].match_rules[0] = IsmRNA;
+ grouping_rules[3].match_rules[1] = IsMobileElement;
+ grouping_rules[3].match_rules[2] = IsEndogenousVirusSourceFeature;
+ grouping_rules[3].match_rules[3] = IsOperon;
+ grouping_rules[3].match_rules[4] = IsGeneCluster;
+
+ grouping_rules[4].is_item = IsMobileElement;
+ InitRuleForTopLevelClauses (grouping_rules + 4);
+
+ grouping_rules[5].is_item = Is3UTR;
+ InitRuleForBottomLevelClauses (grouping_rules + 5);
+
+ grouping_rules[6].is_item = Is5UTR;
+ InitRuleForBottomLevelClauses (grouping_rules + 6);
+
+ grouping_rules[7].is_item = IsLTR;
+ InitRuleForBottomLevelClauses (grouping_rules + 7);
+
+ grouping_rules[8].is_item = IsGene;
+ InitRuleForTopLevelClauses (grouping_rules + 8);
+
+ grouping_rules[9].is_item = IsIntergenicSpacer;
+ InitRuleForTopLevelClauses (grouping_rules + 9);
+
+ grouping_rules[10].is_item = IsNoncodingProductFeat;
+ InitRuleForTopLevelClauses (grouping_rules + 10);
+
+ grouping_rules[11].is_item = IsOperon;
+ InitRuleForTopLevelClauses (grouping_rules + 11);
+
+ grouping_rules[12].is_item = IsGeneCluster;
+ InitRuleForTopLevelClauses (grouping_rules + 12);
+
+ return grouping_rules;
+}
+
+static void FreeGroupingRules(
+ MatchRulePtr grouping_rules
+)
+{
+ Int4 i;
+
+ if (grouping_rules == NULL) return;
+
+ for (i = 0; i < NumGroupingRules; i++)
+ {
+ if (grouping_rules[i].match_rules != NULL)
+ MemFree (grouping_rules[i].match_rules);
+ grouping_rules[i].match_rules = NULL;
+ }
+ MemFree (grouping_rules);
+}
+
+static Boolean IsmRNASequence (BioseqPtr bsp)
+{
+ SeqDescrPtr sdp;
+ MolInfoPtr mip;
+
+ if (bsp == NULL || bsp->mol != Seq_mol_rna || bsp->descr == NULL)
+ {
+ return FALSE;
+ }
+ sdp = bsp->descr;
+ while (sdp != NULL && sdp->choice != Seq_descr_molinfo)
+ {
+ sdp = sdp->next;
+ }
+ if (sdp == NULL || sdp->data.ptrvalue == NULL)
+ {
+ return FALSE;
+ }
+ mip = (MolInfoPtr) sdp->data.ptrvalue;
+
+ if (mip->biomol == 3)
+ {
+ return TRUE;
+ }
+ else
+ {
+ return FALSE;
+ }
+}
+
+typedef struct matchcandidate
+{
+ ValNodePtr matched_clause;
+ SeqLocPtr slp;
+} MatchCandidateData, PNTR MatchCandidatePtr;
+
+/* This function searches the search_list for features that satisfy the
+ * match function and satisfy locational requirements relative to the
+ * clause.
+ * If more than one clause meets the match requirements, the smallest one
+ * is chosen.
+ */
+static void FindBestMatchCandidate
+(FeatureClausePtr clause,
+ ValNodePtr search_list,
+ FeatureClausePtr search_parent,
+ matchFunction match,
+ Boolean gene_cluster_opp_strand,
+ BioseqPtr bsp,
+ MatchCandidatePtr current_candidate)
+{
+ ValNodePtr search_clause;
+ SeqFeatPtr addsfp, clause_sfp;
+ FeatureClausePtr searchfcp;
+ SeqLocPtr slp;
+
+ if (clause == NULL || clause->slp == NULL || current_candidate == NULL) return;
+
+ clause_sfp = (SeqFeatPtr) (clause->featlist->data.ptrvalue);
+
+ for (search_clause = search_list;
+ search_clause != NULL;
+ search_clause = search_clause->next)
+ {
+ if (search_clause->data.ptrvalue == clause)
+ continue;
+ if (search_clause->choice == DEFLINE_FEATLIST
+ && search_clause->data.ptrvalue != NULL)
+ {
+ addsfp = search_clause->data.ptrvalue;
+ /* slp is the location of the feature we are trying to
+ * group this feature with
+ */
+ if (search_parent != NULL)
+ {
+ slp = search_parent->slp;
+ }
+ else
+ {
+ slp = addsfp->location;
+ }
+ if (match (search_clause->data.ptrvalue))
+ {
+ /* Transposons, insertion sequences, integrons, and endogenous virii
+ * take subfeatures regardless of whether the subfeature is
+ * on the same strand.
+ * Gene Clusters can optionally take subfeatures on either
+ * strand (gene_cluster_opp_strand is flag).
+ * Promoters will match up to features that are adjacent.
+ * Introns will match up to coding regions whose intervals
+ * are adjacent to the endpoints of the intron, or to other
+ * features if the intron location is inside the other feature.
+ * All other feature matches must be that the feature to
+ * go into the clause must fit inside the location of the
+ * other clause.
+ */
+ if (((match == IsMobileElement
+ || match == IsEndogenousVirusSourceFeature
+ || (match == IsGeneCluster && gene_cluster_opp_strand))
+ && SeqLocAinB (clause->slp, slp) > -1)
+ || IsLocAInBonSameStrand (clause->slp, slp)
+ || ( IsPromoter (clause_sfp)
+ && IsAAdjacentToB (clause->slp, search_parent->slp, bsp,
+ ADJACENT_TYPE_UPSTREAM, TRUE))
+ || (IsmRNASequence (bsp)
+ && match != IsMobileElement
+ && match != IsEndogenousVirusSourceFeature
+ && match != IsGeneCluster)
+ || (match == IsCDS
+ && IsIntron (clause_sfp)
+ && IsAEmptyIntervalOfB (clause->slp, slp, bsp))
+ || (match == IsCDS
+ && IsExon (clause_sfp)
+ && LocAContainsIntervalOfB (clause->slp, slp)))
+ {
+ /* if we don't already have a candidate, or if this
+ * candidate's location is inside the current candidate,
+ * take this candidate.
+ */
+ if (current_candidate->matched_clause == NULL
+ || SeqLocAinB (slp, current_candidate->slp) > 0)
+ {
+ current_candidate->matched_clause = search_clause;
+ current_candidate->slp = slp;
+ }
+ }
+ }
+ }
+ else if (search_clause->choice == DEFLINE_CLAUSEPLUS
+ && search_clause->data.ptrvalue != NULL)
+ {
+ searchfcp = search_clause->data.ptrvalue;
+ FindBestMatchCandidate (clause, searchfcp->featlist, searchfcp,
+ match, gene_cluster_opp_strand, bsp,
+ current_candidate);
+ }
+ }
+}
+
+
+/* This function iterates through the matches in the specified grouping rule.
+ * If more than one match is found, the clause with the smallest location is
+ * used.
+ * If a match is found, the clause is added to the list of clauses for that
+ * feature's parent clause.
+ */
+static Boolean GroupClauseByRule (
+ FeatureClausePtr clause,
+ ValNodePtr search_list,
+ MatchRulePtr grouping_rule,
+ Boolean gene_cluster_opp_strand,
+ BioseqPtr bsp
+)
+{
+ Int4 rule_index;
+ MatchCandidateData mcd;
+ Boolean rval = FALSE;
+ ValNodePtr newfeat;
+
+ mcd.slp = NULL;
+ mcd.matched_clause = NULL;
+
+ for (rule_index = 0;
+ rule_index < grouping_rule->num_match_rules;
+ rule_index ++)
+ {
+
+ FindBestMatchCandidate (clause, search_list, NULL,
+ grouping_rule->match_rules[rule_index],
+ gene_cluster_opp_strand, bsp, &mcd);
+ }
+ if (mcd.matched_clause != NULL)
+ {
+ newfeat = ValNodeNew (mcd.matched_clause);
+ if (newfeat == NULL) return FALSE;
+ newfeat->choice = DEFLINE_CLAUSEPLUS;
+ newfeat->data.ptrvalue = clause;
+ rval = TRUE;
+ }
+ return rval;
+}
+
+
+/* This function determines whether a subclause contains just a 3' UTR feature
+ * and no other details.
+ */
+static Boolean Is3UTRClause (FeatureClausePtr clause)
+{
+ if (clause == NULL
+ || clause->featlist == NULL
+ || clause->featlist->choice != DEFLINE_FEATLIST
+ || clause->featlist->data.ptrvalue == NULL
+ || clause->featlist->next != NULL)
+ {
+ return FALSE;
+ }
+ return Is3UTR(clause->featlist->data.ptrvalue);
+}
+
+
+/* This function will move 3' UTRs to the end of any subfeat lists
+ * so that they can be listed after the partial/complete CDS.
+ */
+static void Move3UTRToEndOfSubFeatList (ValNodePtr clause_list)
+{
+ ValNodePtr vnp, prev, last_vnp;
+ FeatureClausePtr clause;
+
+ if (clause_list == NULL || clause_list->next == NULL)
+ {
+ return;
+ }
+ prev = clause_list;
+ for (vnp = clause_list->next; vnp != NULL; vnp = vnp->next)
+ {
+ if (vnp->data.ptrvalue != NULL && vnp->choice == DEFLINE_CLAUSEPLUS)
+ {
+ clause = vnp->data.ptrvalue;
+ if (Is3UTRClause (clause))
+ {
+ if (vnp->next != NULL)
+ {
+ /* move to end of clause list */
+ last_vnp = vnp->next;
+ while (last_vnp->next != NULL)
+ {
+ last_vnp = last_vnp->next;
+ }
+ prev->next = vnp->next;
+ last_vnp->next = vnp;
+ vnp->next = NULL;
+ }
+ }
+ else
+ {
+ prev = vnp;
+ Move3UTRToEndOfSubFeatList (clause->featlist);
+ }
+ }
+ else
+ {
+ prev = vnp;
+ }
+ }
+}
+
+/* This function iterates over the list of features, attempting to find and
+ * apply grouping rules for each feature.
+ */
+static void GroupAllClauses (
+ ValNodePtr PNTR clause_list,
+ Boolean gene_cluster_opp_strand,
+ BioseqPtr bsp
+)
+{
+ MatchRulePtr grouping_rules;
+ ValNodePtr vnp, prev;
+ FeatureClausePtr clause;
+ SeqFeatPtr main_feat;
+ Int4 rule_index;
+
+ grouping_rules = InitializeGroupingRules();
+ if (grouping_rules == NULL) return;
+
+ for (vnp = *clause_list; vnp != NULL; vnp = vnp->next)
+ {
+ if (vnp->choice == DEFLINE_CLAUSEPLUS && vnp->data.ptrvalue != NULL)
+ {
+ clause = vnp->data.ptrvalue;
+ if (clause->featlist != NULL
+ && clause->featlist->choice == DEFLINE_FEATLIST
+ && clause->featlist->data.ptrvalue != NULL)
+ {
+ main_feat = clause->featlist->data.ptrvalue;
+ for (rule_index = 0;
+ rule_index < NumGroupingRules
+ && ! grouping_rules[rule_index].is_item (main_feat);
+ rule_index++)
+ {
+ }
+ if (rule_index < NumGroupingRules)
+ {
+ if ( GroupClauseByRule (clause, *clause_list,
+ grouping_rules + rule_index,
+ gene_cluster_opp_strand,
+ bsp))
+ {
+ vnp->data.ptrvalue = NULL;
+ }
+ }
+ }
+ }
+ }
+ FreeGroupingRules(grouping_rules);
+
+ vnp = *clause_list;
+ prev = NULL;
+ while (vnp != NULL)
+ {
+ if (vnp->data.ptrvalue == NULL)
+ {
+ if (prev == NULL)
+ {
+ *clause_list = vnp->next;
+ vnp->next = NULL;
+ ValNodeFree (vnp);
+ vnp = *clause_list;
+ }
+ else
+ {
+ prev->next = vnp->next;
+ vnp->next = NULL;
+ ValNodeFree (vnp);
+ vnp = prev->next;
+ }
+ }
+ else
+ {
+ prev = vnp;
+ vnp = vnp->next;
+ }
+ }
+
+ Move3UTRToEndOfSubFeatList (*clause_list);
+}
+
+/* This function exists to handle the special case where two or more exons
+ * are alternatively spliced, but there are no CDSs to represent some of the
+ * alternatively spliced forms. In order to make sure that all of the exons
+ * that are alternatively spliced together appear with the CDS, they are
+ * temporarily consolidated into a single clause with a location that
+ * is the intersection of the exons' locations. The clause will be
+ * re-expanded after grouping by the ExpandAltSplicedExons function.
+ */
+static void GroupAltSplicedExons (
+ ValNodePtr PNTR clause_list,
+ BioseqPtr bsp,
+ Boolean delete_now
+)
+{
+ ValNodePtr clause, search_clause, vnp;
+ FeatureClausePtr fcp, search_fcp;
+ SeqFeatPtr sfp, search_sfp;
+ SeqLocPtr new_slp;
+
+ if (clause_list == NULL) return;
+
+ for (clause = *clause_list; clause != NULL; clause = clause->next)
+ {
+ if (clause->choice != DEFLINE_CLAUSEPLUS
+ || clause->data.ptrvalue == NULL)
+ {
+ continue;
+ }
+ fcp = clause->data.ptrvalue;
+ if ( ! fcp->is_alt_spliced
+ || fcp->delete_me
+ || fcp->featlist == NULL
+ || fcp->featlist->choice != DEFLINE_FEATLIST)
+ {
+ continue;
+ }
+ sfp = fcp->featlist->data.ptrvalue;
+ if ( ! IsExon (sfp))
+ {
+ continue;
+ }
+
+ for ( search_clause = clause->next;
+ search_clause != NULL
+ && search_clause->choice == DEFLINE_CLAUSEPLUS
+ && search_clause->data.ptrvalue != NULL
+ && (search_fcp = search_clause->data.ptrvalue) != NULL
+ && ! search_fcp->delete_me
+ && search_fcp->is_alt_spliced
+ && search_fcp->featlist != NULL
+ && search_fcp->featlist->choice == DEFLINE_FEATLIST
+ && (search_sfp = search_fcp->featlist->data.ptrvalue) != NULL
+ && IsExon (search_sfp)
+ && TestFeatOverlap (sfp, search_sfp, SIMPLE_OVERLAP) != -1;
+ search_clause = search_clause->next)
+ {
+ vnp = ValNodeNew (fcp->featlist);
+ if (vnp == NULL) return;
+ vnp->choice = DEFLINE_FEATLIST;
+ vnp->data.ptrvalue = search_sfp;
+ search_fcp->delete_me = TRUE;
+ new_slp = SeqLocIntersection (fcp->slp, search_fcp->slp, bsp);
+ SeqLocFree (fcp->slp);
+ fcp->slp = new_slp;
+ }
+ }
+ if (delete_now)
+ {
+ DeleteFeatureClauses (clause_list);
+ }
+}
+
+/* This function expands a clause filled with alternatively-spliced exons
+ * that was created in the GroupAltSplicedExons function.
+ */
+static void ExpandAltSplicedExons (
+ ValNodePtr clause_list,
+ BioseqPtr bsp,
+ DeflineFeatureRequestListPtr rp)
+{
+ ValNodePtr clause, rest_of_list, featlist, new_clause;
+ FeatureClausePtr fcp, new_fcp;
+ SeqFeatPtr sfp;
+
+ for (clause = clause_list;
+ clause != NULL;
+ clause = clause->next)
+ {
+ if (clause->choice != DEFLINE_CLAUSEPLUS
+ || (fcp = clause->data.ptrvalue) == NULL
+ || fcp->featlist == NULL)
+ {
+ continue;
+ }
+ if ( fcp->featlist->choice == DEFLINE_FEATLIST
+ && (sfp = fcp->featlist->data.ptrvalue) != NULL
+ && IsExon (sfp)
+ && fcp->featlist->next != NULL
+ && fcp->featlist->next->choice == DEFLINE_FEATLIST
+ && IsExon (fcp->featlist->next->data.ptrvalue))
+ {
+ rest_of_list = clause->next;
+ clause->next = NULL;
+ for (featlist = fcp->featlist->next;
+ featlist != NULL
+ && featlist->choice == DEFLINE_FEATLIST
+ && IsExon (featlist->data.ptrvalue);
+ featlist = featlist->next)
+ {
+ new_clause = ValNodeNew (clause);
+ if (new_clause == NULL) return;
+ new_fcp = NewFeatureClause (featlist->data.ptrvalue, bsp, rp);
+ if (new_fcp == NULL) return;
+ new_fcp->grp = fcp->grp;
+ new_fcp->is_alt_spliced = fcp->is_alt_spliced;
+ new_fcp->make_plural = fcp->make_plural;
+ new_clause->choice = DEFLINE_CLAUSEPLUS;
+ new_clause->data.ptrvalue = new_fcp;
+ }
+ ValNodeFree (fcp->featlist->next);
+ fcp->featlist->next = NULL;
+ new_clause->next = rest_of_list;
+
+ /* put back location for first exon - was reduced to union of
+ * all exon intervals in GroupAltSplicedExons
+ */
+ SeqLocFree (fcp->slp);
+ sfp = fcp->featlist->data.ptrvalue;
+ fcp->slp = SeqLocMerge (bsp, sfp->location, NULL, FALSE, TRUE, FALSE);
+ }
+ else
+ {
+ ExpandAltSplicedExons (fcp->featlist, bsp, rp);
+ }
+ }
+}
+
+
+
+static Boolean DoFeaturesShareGene (SeqFeatPtr sfp1, SeqFeatPtr sfp2)
+{
+ Boolean share_gene = FALSE;
+ SeqFeatPtr found_gene1, found_gene2;
+
+ if (sfp1 != NULL && sfp2 != NULL
+ && !SeqMgrGeneIsSuppressed (SeqMgrGetGeneXref(sfp1))
+ && !SeqMgrGeneIsSuppressed (SeqMgrGetGeneXref(sfp2)))
+ {
+ found_gene1 = SeqMgrGetOverlappingGene (sfp1->location, NULL);
+ found_gene2 = SeqMgrGetOverlappingGene (sfp2->location, NULL);
+ if (found_gene1 == found_gene2 && found_gene1 != NULL)
+ {
+ share_gene = TRUE;
+ }
+ }
+ return share_gene;
+}
+
+/* This function determines whether two features share the same product name */
+static Boolean
+DoProductNamesMatch
+(SeqFeatPtr sfp1,
+ SeqFeatPtr sfp2,
+ BioseqPtr bsp,
+ DeflineFeatureRequestListPtr rp)
+{
+ CharPtr productname1;
+ CharPtr productname2;
+ Boolean names_match = FALSE;
+
+ productname1 = GetProductName (sfp1, bsp, rp);
+ productname2 = GetProductName (sfp2, bsp, rp);
+ if (StringHasNoText (productname1) && StringHasNoText (productname2))
+ {
+ names_match = TRUE;
+ }
+ else if (StringCmp (productname1, productname2) == 0)
+ {
+ names_match = TRUE;
+ }
+
+ productname1 = MemFree (productname1);
+ productname2 = MemFree (productname2);
+
+ return names_match;
+}
+
+/* This function should combine CDSs that do not have a joined location
+ * but are part of the same gene and have the same protein name.
+ */
+static void GroupSegmentedCDSs (
+ ValNodePtr PNTR clause_list,
+ BioseqPtr bsp,
+ Boolean delete_now,
+ DeflineFeatureRequestListPtr rp
+)
+{
+ ValNodePtr clause, search_clause, vnp;
+ FeatureClausePtr fcp, search_fcp;
+ SeqFeatPtr sfp, search_sfp;
+ SeqLocPtr new_slp;
+
+ if (clause_list == NULL) return;
+
+ for (clause = *clause_list; clause != NULL; clause = clause->next)
+ {
+ if (clause->choice != DEFLINE_CLAUSEPLUS
+ || clause->data.ptrvalue == NULL)
+ {
+ continue;
+ }
+ fcp = clause->data.ptrvalue;
+ if (fcp->delete_me
+ || fcp->featlist == NULL
+ || fcp->featlist->choice != DEFLINE_FEATLIST)
+ {
+ continue;
+ }
+ sfp = fcp->featlist->data.ptrvalue;
+ if ( ! IsCDS (sfp))
+ {
+ continue;
+ }
+
+ for ( search_clause = clause->next;
+ search_clause != NULL;
+ search_clause = search_clause->next)
+ {
+ if (search_clause->choice != DEFLINE_CLAUSEPLUS
+ || search_clause->data.ptrvalue == NULL
+ || (search_fcp = search_clause->data.ptrvalue) == NULL
+ || search_fcp->delete_me
+ || search_fcp->featlist == NULL
+ || search_fcp->featlist->choice != DEFLINE_FEATLIST
+ || (search_sfp = search_fcp->featlist->data.ptrvalue) == NULL
+ || ! IsCDS (search_sfp)
+ || ! DoFeaturesShareGene (sfp, search_sfp)
+ || ! DoProductNamesMatch (sfp, search_sfp, bsp, rp))
+ {
+ continue;
+ }
+ vnp = ValNodeNew (fcp->featlist);
+ if (vnp == NULL) return;
+ vnp->choice = DEFLINE_FEATLIST;
+ vnp->data.ptrvalue = search_sfp;
+ search_fcp->delete_me = TRUE;
+ new_slp = SeqLocMerge (bsp, fcp->slp, search_fcp->slp,
+ FALSE, TRUE, FALSE);
+
+ SeqLocFree (fcp->slp);
+ fcp->slp = new_slp;
+ }
+ }
+ if (delete_now)
+ {
+ DeleteFeatureClauses (clause_list);
+ }
+}
+
+
+/* This function searches this list for clauses to which this gene should
+ * apply. This is not taken care of by the GroupAllClauses function
+ * because genes are added to clauses as a GeneRefPtr instead of as an
+ * additional feature in the list, and because a gene can apply to more
+ * than one clause, while other features should really only belong to
+ * one clause.
+ */
+static Boolean AddGeneToClauses
+( SeqFeatPtr gene,
+ CharPtr gene_productname,
+ ValNodePtr clause_list,
+ Boolean suppress_locus_tag)
+{
+ ValNodePtr clause;
+ FeatureClausePtr fcp;
+ SeqFeatPtr sfp, found_gene;
+ GeneRefPtr grp;
+ Boolean used_gene;
+
+ if (gene == NULL || gene->data.value.ptrvalue == NULL) return FALSE;
+ if (clause_list == NULL) return FALSE;
+
+ used_gene = FALSE;
+ grp = gene->data.value.ptrvalue;
+ for (clause = clause_list; clause != NULL; clause = clause->next)
+ {
+ fcp = clause->data.ptrvalue;
+ if (fcp == NULL || fcp->featlist == NULL) return FALSE;
+ sfp = fcp->featlist->data.ptrvalue;
+ if (sfp != NULL && !SeqMgrGeneIsSuppressed (SeqMgrGetGeneXref(sfp))
+ && (IsCDS (sfp)
+ || IsrRNA (sfp)
+ || IstRNA (sfp)
+ || IsmRNA (sfp)
+ || IsMiscRNA (sfp)
+ || IsncRNA (sfp)
+ || IsPrecursorRNA (sfp)
+ || IsNoncodingProductFeat (sfp)))
+ {
+ if (fcp->grp == NULL)
+ {
+ found_gene = SeqMgrGetOverlappingGene (sfp->location, NULL);
+ if (found_gene != NULL)
+ {
+ fcp->grp = (GeneRefPtr) found_gene->data.value.ptrvalue;
+ }
+ }
+
+ if (fcp->grp != NULL && DoGenesMatch (fcp->grp, grp, suppress_locus_tag))
+ {
+ used_gene = TRUE;
+ if (gene_productname != NULL
+ && fcp->feature_label_data.productname == NULL
+ && IsCDS (sfp))
+ {
+ fcp->feature_label_data.productname =
+ StringSave (gene_productname);
+ }
+ }
+ else if (fcp->grp == NULL
+ && IsLocAInBonSameStrand (sfp->location, gene->location))
+ {
+ fcp->grp = grp;
+ used_gene = TRUE;
+ if (gene_productname != NULL
+ && fcp->feature_label_data.productname == NULL
+ && IsCDS (sfp))
+ {
+ fcp->feature_label_data.productname =
+ StringSave (gene_productname);
+ }
+ }
+ }
+ }
+ return used_gene;
+}
+
+/* This function iterates through the list of features and calls
+ * AddGeneToClauses for each gene feature it finds.
+ */
+static void GroupGenes (ValNodePtr PNTR clause_list, Boolean suppress_locus_tag)
+{
+ ValNodePtr vnp;
+ ValNodePtr featlist;
+ FeatureClausePtr fcp;
+
+ for (vnp = *clause_list; vnp != NULL; vnp = vnp->next)
+ {
+ if (vnp->choice != DEFLINE_CLAUSEPLUS) return;
+ fcp = (FeatureClausePtr) vnp->data.ptrvalue;
+ if (fcp == NULL) return;
+
+ featlist = fcp->featlist;
+ if (featlist != NULL
+ && featlist->choice == DEFLINE_FEATLIST
+ && IsGene (featlist->data.ptrvalue))
+ {
+ AddGeneToClauses (featlist->data.ptrvalue,
+ fcp->feature_label_data.productname,
+ vnp->next, suppress_locus_tag);
+ }
+ }
+}
+
+/* This function searches this list for clauses to which this mRNA should
+ * apply. This is not taken care of by the GroupAllClauses function
+ * because when an mRNA is added to a CDS, the product for the clause is
+ * replaced and the location for the clause is expanded, rather than simply
+ * adding the mRNA as an additional feature in the list, and because an
+ * mRNA can apply to more than one clause, while other features should
+ * really only belong to one clause.
+ */
+static Boolean AddmRNAToClauses
+( SeqFeatPtr mRNA,
+ ValNodePtr clause_list,
+ BioseqPtr bsp,
+ DeflineFeatureRequestListPtr rp)
+{
+ ValNodePtr clause;
+ FeatureClausePtr fcp;
+ SeqFeatPtr sfp;
+ Boolean used_mRNA;
+ CharPtr productname;
+ SeqLocPtr new_slp;
+
+ if (mRNA == NULL || mRNA->data.value.ptrvalue == NULL) return FALSE;
+ if (clause_list == NULL) return FALSE;
+
+ used_mRNA = FALSE;
+ productname = GetProductName (mRNA, bsp, rp);
+ if (productname == NULL) return TRUE;
+
+ for (clause = clause_list; clause != NULL; clause = clause->next)
+ {
+ fcp = clause->data.ptrvalue;
+ if (fcp == NULL || fcp->featlist == NULL) return FALSE;
+ sfp = fcp->featlist->data.ptrvalue;
+ if (sfp == NULL)
+ {
+ }
+ else if (IsCDS (sfp)
+ && fcp->feature_label_data.productname != NULL
+ && StringCmp (fcp->feature_label_data.productname, productname) == 0)
+ {
+ used_mRNA = TRUE;
+ fcp->has_mrna = TRUE;
+ if (IsLocAInBonSameStrand (sfp->location, mRNA->location))
+ {
+ new_slp = SeqLocMerge (bsp, fcp->slp, mRNA->location,
+ FALSE, TRUE, FALSE);
+ if (new_slp == NULL) return FALSE;
+ if (fcp->slp != NULL)
+ {
+ SeqLocFree (fcp->slp);
+ }
+ fcp->slp = new_slp;
+ }
+ }
+ else if (fcp->feature_label_data.productname == NULL
+ && (IsCDS (sfp) || IsGene (sfp))
+ && (IsLocAInBonSameStrand (sfp->location, mRNA->location)
+ || IsLocAInBonSameStrand (mRNA->location, sfp->location)))
+ {
+ fcp->feature_label_data.productname = StringSave (productname);
+ used_mRNA = TRUE;
+ fcp->has_mrna = TRUE;
+ new_slp = SeqLocMerge (bsp, fcp->slp, mRNA->location,
+ FALSE, TRUE, FALSE);
+ if (new_slp == NULL) return FALSE;
+ if (fcp->slp != NULL)
+ {
+ SeqLocFree (fcp->slp);
+ }
+ fcp->slp = new_slp;
+ }
+ }
+ return used_mRNA;
+}
+
+/* This function iterates through the list of features and calls
+ * AddmRNAToClauses for each mRNA feature it finds.
+ */
+static void GroupmRNAs (
+ ValNodePtr PNTR clause_list,
+ BioseqPtr bsp,
+ DeflineFeatureRequestListPtr rp
+)
+{
+ ValNodePtr vnp;
+ ValNodePtr featlist;
+ FeatureClausePtr fcp;
+
+ for (vnp = *clause_list; vnp != NULL; vnp = vnp->next)
+ {
+ if (vnp->choice != DEFLINE_CLAUSEPLUS) return;
+ fcp = (FeatureClausePtr) vnp->data.ptrvalue;
+ if (fcp == NULL) return;
+
+ featlist = fcp->featlist;
+ if (featlist != NULL
+ && featlist->choice == DEFLINE_FEATLIST
+ && IsmRNA (featlist->data.ptrvalue))
+ {
+ if (AddmRNAToClauses (featlist->data.ptrvalue, *clause_list, bsp, rp))
+ {
+ fcp->delete_me = TRUE;
+ }
+ }
+ }
+ DeleteFeatureClauses (clause_list);
+}
+
+/* This section of code contains functions for generating labels for
+ * clauses for the definition lines.
+ */
+
+/* This function examines the specified typeword and determines whether it
+ * should appear before or after the description of the feature in the
+ * definition line.
+ */
+static Boolean IsTypeWordFirst (
+ CharPtr typeword
+)
+{
+ Int4 i;
+ if (typeword == NULL) return FALSE;
+ if (StringCmp (typeword, "exon") == 0
+ || StringCmp (typeword, "intron") == 0
+ || StringCmp (typeword, "endogenous virus") == 0)
+ {
+ return TRUE;
+ }
+ else
+ {
+ i = StartsWithMobileElementKeyword (typeword);
+ if (i >= 0 && i != eMobileElementIntegron) {
+ return TRUE;
+ }
+ return FALSE;
+ }
+}
+
+/* This function determines the word to use to indicate what type of feature
+ * is being described in the definition line. For certain feature types,
+ * the word to use in the definition line varies based on the type of
+ * molecule in the record.
+ */
+static CharPtr GetFeatureTypeWord (
+ Uint1 biomol,
+ SeqFeatPtr sfp
+)
+{
+ if (sfp == NULL) return NULL;
+ if ( IsExon (sfp))
+ {
+ return StringSave ("exon");
+ }
+ else if(IsIntron (sfp))
+ {
+ return StringSave ("intron");
+ }
+ else if (IsEndogenousVirusSequence (sfp))
+ {
+ return StringSave ("endogenous virus");
+ }
+ else if (IsControlRegion (sfp))
+ {
+ return StringSave ("control region");
+ }
+ else if (IsEndogenousVirusSourceFeature (sfp))
+ {
+ return StringSave ("endogenous virus");
+ }
+ else if (IsDloop (sfp))
+ {
+ return StringSave ("D-loop");
+ }
+ else if (IsLTR (sfp))
+ {
+ return StringSave ("LTR");
+ }
+ else if (Is3UTR (sfp))
+ {
+ return StringSave ("3' UTR");
+ }
+ else if (Is5UTR (sfp))
+ {
+ return StringSave ("5' UTR");
+ }
+ else if (IsOperon (sfp))
+ {
+ return StringSave ("operon");
+ }
+ else if (biomol == MOLECULE_TYPE_GENOMIC || biomol == MOLECULE_TYPE_CRNA)
+ {
+ if (IsPseudo (sfp))
+ {
+ return StringSave ("pseudogene");
+ }
+ else
+ {
+ return StringSave ("gene");
+ }
+ }
+ else if ( IsrRNA (sfp) || IsncRNA (sfp))
+ {
+ return NULL;
+ }
+ else if (IsPrecursorRNA (sfp))
+ {
+ return StringSave ("precursor RNA");
+ }
+ else if (biomol == MOLECULE_TYPE_MRNA)
+ {
+ if (IsPseudo (sfp))
+ {
+ return StringSave ("pseudogene mRNA");
+ }
+ else
+ {
+ return StringSave ("mRNA");
+ }
+ }
+ else if (biomol == MOLECULE_TYPE_PRE_MRNA)
+ {
+ if (IsPseudo (sfp))
+ {
+ return StringSave ("pseudogene precursor RNA");
+ }
+ else
+ {
+ return StringSave ("precursor RNA");
+ }
+ }
+ else if (biomol == MOLECULE_TYPE_OTHER_GENETIC_MATERIAL)
+ {
+ return StringSave ("gene");
+ }
+ return StringSave ("");
+}
+
+/* Frequently the product associated with a feature is listed as part of the
+ * description of the feature in the definition line. This function determines
+ * the name of the product associated with this specific feature. Some
+ * features will be listed with the product of a feature that is associated
+ * with the feature being described - this function does not look at other
+ * features to determine a product name.
+ * If the feature is a misc_feat with particular keywords in the comment,
+ * the product will be determined based on the contents of the comment.
+ * If the feature is a CDS and is marked as pseudo, the product will be
+ * determined based on the contents of the comment.
+ * If the feature is a gene and has different strings in the description than
+ * in the locus or locus tag, the description will be used as the product for
+ * the gene.
+ * If none of the above conditions apply, the sequence indexing context label
+ * will be used to obtain the product name for the feature.
+ */
+static CharPtr GetProductName
+( SeqFeatPtr cds,
+ BioseqPtr bsp,
+ DeflineFeatureRequestListPtr rp)
+{
+ CharPtr protein_name;
+ CharPtr semicolon;
+ size_t len_to_copy;
+ SeqMgrFeatContext context;
+ GeneRefPtr grp;
+ CharPtr gene_name;
+ RnaRefPtr rrp;
+ Boolean suppress_locus_tag = FALSE;
+
+ if (cds == NULL) return NULL;
+ protein_name = NULL;
+ if (rp != NULL)
+ {
+ suppress_locus_tag = rp->suppress_locus_tags;
+ }
+ if (IsNoncodingProductFeat (cds))
+ {
+ return GetNoncodingProductFeatProduct (cds);
+ }
+ else if (cds->data.choice == SEQFEAT_CDREGION && cds->pseudo)
+ {
+ if (cds->comment != NULL)
+ {
+ semicolon = StringChr (cds->comment, ';');
+ if (semicolon != NULL)
+ {
+ len_to_copy = semicolon - cds->comment;
+ }
+ else
+ {
+ len_to_copy = StringLen (cds->comment);
+ }
+ protein_name = MemNew (len_to_copy + 1);
+ if (protein_name == NULL) return NULL;
+ StringNCpy (protein_name, cds->comment, len_to_copy);
+ protein_name[len_to_copy] = 0;
+ }
+ return protein_name;
+ }
+ else if (cds->data.choice == SEQFEAT_GENE)
+ {
+ grp = (GeneRefPtr) cds->data.value.ptrvalue;
+ if (grp == NULL) return NULL;
+ gene_name = GetGeneName (grp, suppress_locus_tag);
+ if (grp->desc != NULL
+ && StringCmp (grp->desc, gene_name) != 0)
+ {
+ return StringSave (grp->desc);
+ }
+#if 0
+ /* removed by request from Linda Yankie */
+ if (grp->locus_tag != NULL && ! suppress_locus_tag
+ && StringCmp (grp->locus_tag, gene_name) != 0)
+ {
+ return StringSave (grp->locus_tag);
+ }
+#endif
+ }
+ else if (IsncRNA (cds))
+ {
+ return GetncRNAProduct(cds, rp == NULL ? FALSE : rp->use_ncrna_note);
+ }
+ else if (IstRNA (cds)
+ && SeqMgrGetDesiredFeature (0, bsp, 0, 0, cds, &context) == cds
+ && context.label != NULL)
+ {
+ if (StringCmp (context.label, "Xxx") == 0) {
+ protein_name = StringSave ("tRNA-OTHER");
+ } else {
+ protein_name = MemNew ( StringLen (context.label) + 6);
+ if ( protein_name == NULL) return NULL;
+ sprintf (protein_name, "tRNA-%s", context.label);
+ }
+ return protein_name;
+ }
+ else if (cds->data.choice == SEQFEAT_RNA)
+ {
+
+ rrp = (RnaRefPtr) cds->data.value.ptrvalue;
+ if (rrp != NULL && rrp->ext.choice == 1 && !StringHasNoText (rrp->ext.value.ptrvalue))
+ {
+ return StringSave (rrp->ext.value.ptrvalue);
+ }
+ }
+ else if (SeqMgrGetDesiredFeature (0, bsp, 0, 0, cds, &context) == cds
+ && context.label != NULL)
+ {
+ if ((IsCDS(cds) && StringCmp (context.label, "CDS") != 0)
+ || (IsmRNA(cds) && StringCmp (context.label, "mRNA") != 0)
+ || (! IsCDS(cds) && ! IsmRNA(cds)))
+ {
+ protein_name = StringSave (context.label);
+ return protein_name;
+ }
+ }
+ return NULL;
+}
+
+/* This function searches a list of features recursively for a
+ * feature that satisfies the itemmatch condition and is associated with
+ * the same gene as the fcp clause passed to the function.
+ * This is used to obtain a product for a feature that may share a gene with
+ * a product-producing feature but may not be contained in the interval of
+ * the product-producing feature.
+ */
+static FeatureClausePtr FindProductInFeatureList (
+ FeatureClausePtr fcp,
+ ValNodePtr clause_list,
+ matchFunction itemmatch,
+ Boolean suppress_locus_tag)
+{
+ ValNodePtr vnp;
+ FeatureClausePtr vnp_fcp;
+
+ for (vnp = clause_list; vnp != NULL; vnp = vnp->next)
+ {
+ if (vnp->choice == DEFLINE_CLAUSEPLUS && vnp->data.ptrvalue != NULL)
+ {
+ vnp_fcp = vnp->data.ptrvalue;
+ if (DoGenesMatch (vnp_fcp->grp, fcp->grp, suppress_locus_tag)
+ && vnp_fcp->featlist != NULL
+ && vnp_fcp->featlist->choice == DEFLINE_FEATLIST
+ && itemmatch (vnp_fcp->featlist->data.ptrvalue))
+ {
+ return vnp_fcp;
+ }
+ else
+ {
+ vnp_fcp = FindProductInFeatureList (fcp, vnp_fcp->featlist,
+ itemmatch, suppress_locus_tag);
+ if (vnp_fcp != NULL) return vnp_fcp;
+ }
+ }
+ }
+ return NULL;
+}
+
+/* This function uses the available information in the clause to generate
+ * a description from the name of the gene (if any) and the name of the
+ * product for the feature (if any).
+ * If there is only a gene, the description will be the name of the gene.
+ * If there is only a product, the description will be the name of the product.
+ * If there is a gene and a product, the description will be the name of
+ * the product followed by the name of the gene in parentheses.
+ */
+static CharPtr GetGeneProtDescription
+( FeatureClausePtr fcp,
+ BioseqPtr bsp,
+ DeflineFeatureRequestListPtr rp)
+{
+ SeqFeatPtr sfp;
+ CharPtr protein_name;
+ CharPtr gene_name;
+ size_t description_length;
+ CharPtr description;
+
+ if (fcp == NULL
+ || fcp->featlist == NULL
+ || fcp->featlist->data.ptrvalue == NULL)
+ {
+ return NULL;
+ }
+ sfp = fcp->featlist->data.ptrvalue;
+
+ description_length = 0;
+
+ if (fcp->feature_label_data.productname != NULL)
+ {
+ protein_name = StringSave (fcp->feature_label_data.productname);
+ }
+ else
+ {
+ protein_name = GetProductName (sfp, bsp, rp);
+ if (protein_name == NULL && IsGene (sfp))
+ {
+
+ }
+ }
+ if (protein_name != NULL)
+ {
+ description_length += StringLen (protein_name);
+ }
+
+ gene_name = GetGeneName (fcp->grp, rp == NULL ? FALSE : rp->suppress_locus_tags);
+ if (gene_name != NULL)
+ {
+ description_length += StringLen (gene_name);
+ if (protein_name != NULL)
+ {
+ description_length += 3;
+ }
+ }
+ description = (CharPtr) MemNew (description_length + 1);
+ if (description == NULL) return NULL;
+ if (protein_name != NULL)
+ {
+ if (gene_name != NULL)
+ {
+ sprintf (description, "%s (%s)", protein_name, gene_name);
+ }
+ else
+ {
+ sprintf (description, "%s", protein_name);
+ }
+ }
+ else
+ {
+ if (gene_name != NULL)
+ sprintf (description, gene_name);
+ }
+ if (protein_name != NULL) MemFree (protein_name);
+ return description;
+}
+
+/* This array of match functions is used to identify, in order of preference,
+ * the features that might be used to generate a product for a gene-protein
+ * description if the feature has not already been grouped with a product
+ * feature.
+ */
+static matchFunction productfeatures[] = {
+ IsCDS, IsmRNA, IstRNA
+};
+
+/* This function finds gene features without products and looks for
+ * features that might provide products for them.
+ */
+static void FindGeneProducts
+( ValNodePtr clause_list,
+ BioseqPtr bsp,
+ DeflineFeatureRequestListPtr rp)
+{
+ ValNodePtr vnp;
+ FeatureClausePtr fcp, productfcp;
+ Int4 i, NumProductFeatureTypes;
+ Boolean suppress_locus_tag = (rp == NULL ? FALSE : rp->suppress_locus_tags);
+
+ NumProductFeatureTypes = sizeof (productfeatures) / sizeof (matchFunction);
+
+ for (vnp = clause_list; vnp != NULL; vnp = vnp->next)
+ {
+ if (vnp->choice == DEFLINE_CLAUSEPLUS
+ && (fcp = vnp->data.ptrvalue) != NULL
+ && fcp->featlist != NULL)
+ {
+ if (fcp->featlist->choice == DEFLINE_FEATLIST
+ && IsGene (fcp->featlist->data.ptrvalue)
+ && fcp->feature_label_data.productname == NULL)
+ {
+ productfcp = NULL;
+ for (i=0; i < NumProductFeatureTypes && productfcp == NULL; i++)
+ {
+ productfcp = FindProductInFeatureList (fcp, clause_list,
+ productfeatures[i],
+ suppress_locus_tag);
+ }
+ if (productfcp != NULL)
+ {
+ fcp->is_alt_spliced = productfcp->is_alt_spliced;
+ if (productfcp->feature_label_data.productname != NULL)
+ {
+ fcp->feature_label_data.productname =
+ StringSave (productfcp->feature_label_data.productname);
+ }
+ else
+ {
+ fcp->feature_label_data.productname
+ = GetProductName (productfcp->featlist->data.ptrvalue,
+ bsp, rp);
+ }
+ if (fcp->feature_label_data.description != NULL)
+ {
+ MemFree (fcp->feature_label_data.description);
+ fcp->feature_label_data.description = NULL;
+ }
+ fcp->feature_label_data.description =
+ GetGeneProtDescription (fcp, bsp, rp);
+ }
+ }
+ else
+ {
+ FindGeneProducts (fcp->featlist, bsp, rp);
+ }
+ }
+ }
+}
+
+static Boolean ShowInterval (
+ SeqFeatPtr sfp
+)
+{
+ if (IsSatelliteSequence (sfp) || IsExon (sfp) || IsIntron (sfp)
+ || IsPromoter (sfp) || Is3UTR (sfp) || Is5UTR (sfp))
+ return FALSE;
+ return TRUE;
+}
+
+static CharPtr GetExonDescription (
+ BioseqPtr bsp,
+ SeqFeatPtr sfp
+)
+{
+ SeqMgrFeatContext context;
+ SeqFeatPtr new_sfp;
+ CharPtr label;
+
+ if ((new_sfp = SeqMgrGetDesiredFeature (sfp->idx.entityID, bsp, 0, 0, sfp, &context)) != sfp
+ || context.label == NULL)
+ {
+ if ((new_sfp = SeqMgrGetDesiredFeature (0, bsp, 0, 0, sfp, &context)) != sfp
+ || context.label == NULL)
+ {
+ return NULL;
+ }
+ }
+ if ((IsExon (sfp) && StringCmp (context.label, "exon") == 0)
+ || (IsIntron (sfp) && StringCmp (context.label, "intron") == 0))
+ {
+ return NULL;
+ }
+
+ label = StringSave (context.label);
+ return label;
+}
+
+static CharPtr GetFeatureDescription
+( FeatureClausePtr fcp,
+ BioseqPtr bsp,
+ DeflineFeatureRequestListPtr rp)
+{
+ SeqFeatPtr sfp;
+
+ if ( fcp == NULL
+ || fcp->featlist == NULL
+ || fcp->featlist->data.ptrvalue == NULL)
+ {
+ return NULL;
+ }
+ sfp = fcp->featlist->data.ptrvalue;
+ if (sfp == NULL) return NULL;
+
+ if (IsExon (sfp) || IsIntron (sfp))
+ {
+ return GetExonDescription (bsp, sfp);
+ }
+ else if (IsEndogenousVirusSequence (sfp))
+ {
+ return GetEndogenousVirusSequenceDescription (sfp);
+ }
+ else if (IsEndogenousVirusSourceFeature (sfp))
+ {
+ return GetEndogenousVirusSourceFeatureDescription (sfp);
+ }
+ else if (IsControlRegion (sfp))
+ {
+ return NULL;
+ }
+ else if (IsDloop (sfp))
+ {
+ return NULL;
+ }
+ else if (Is3UTR (sfp))
+ {
+ return NULL;
+ }
+ else if (Is5UTR (sfp))
+ {
+ return NULL;
+ }
+ else if (IsLTR (sfp))
+ {
+ return GetLTRDescription (sfp);
+ }
+ else
+ {
+ return GetGeneProtDescription (fcp, bsp, rp);
+ }
+}
+
+static void LIBCALLBACK GetSatelliteFeatureLabel (
+ ValNodePtr featlist,
+ BioseqPtr bsp,
+ Uint1 biomol,
+ FeatureLabelPtr flp
+)
+{
+ SeqFeatPtr main_feat;
+ CharPtr semicolon;
+
+ flp->description = NULL;
+ flp->typeword = StringSave ("sequence");
+ flp->pluralizable = FALSE;
+ flp->is_typeword_first = FALSE;
+
+ if (featlist == NULL) return;
+ main_feat = featlist->data.ptrvalue;
+ if (main_feat == NULL) return;
+ if (StringHasNoText (main_feat->comment)) return;
+
+ flp->description = StringSave (main_feat->comment);
+ if ((semicolon = StringStr (flp->description, ";")) != NULL)
+ {
+ *semicolon = 0;
+ }
+}
+
+static void LIBCALLBACK GetPromoterFeatureLabel (
+ ValNodePtr featlist,
+ BioseqPtr bsp,
+ Uint1 biomol,
+ FeatureLabelPtr flp
+)
+{
+ SeqFeatPtr main_feat;
+
+ flp->description = NULL;
+ flp->typeword = StringSave ("promoter region");
+
+ if (featlist == NULL) return;
+ main_feat = featlist->data.ptrvalue;
+ if (main_feat == NULL) return;
+
+ flp->description = NULL;
+ flp->pluralizable = FALSE;
+ flp->is_typeword_first = FALSE;
+
+}
+
+/* This function temporarily removes a 3' UTR clause from the end of
+ * a clause list so that it will not be included in the list of subfeatures
+ * before a CDS in the definition line.
+ * The 3' UTR clause should be put back if it was not the only clause in the
+ * list.
+ */
+static ValNodePtr Remove3UTRFromEndOfFeatList (ValNodePtr PNTR featlist)
+{
+ ValNodePtr vnp, prev = NULL;
+
+ if (featlist == NULL || *featlist == NULL) return NULL;
+
+ for (vnp = *featlist; vnp != NULL && vnp->next != NULL; vnp = vnp->next)
+ {
+ prev = vnp;
+ }
+ if (vnp->choice == DEFLINE_CLAUSEPLUS && Is3UTRClause (vnp->data.ptrvalue))
+ {
+ if (prev == NULL)
+ {
+ *featlist = NULL;
+ }
+ else
+ {
+ prev->next = NULL;
+ }
+ }
+ else
+ {
+ vnp = NULL;
+ }
+ return vnp;
+}
+
+static Uint1 GetMoleculeType (BioseqPtr bsp, Uint2 entityID);
+static void ConsolidateClauses (
+ ValNodePtr PNTR list,
+ BioseqPtr bsp,
+ Uint1 biomol,
+ Boolean delete_now,
+ DeflineFeatureRequestListPtr rp);
+
+
+/* This function calculates the "interval" for a clause in the definition
+ * line. The interval could be an empty string, it could indicate whether
+ * the location of the feature is partial or complete and whether or not
+ * the feature is a CDS, the interval could be a description of the
+ * subfeatures of the clause, or the interval could be a combination of the
+ * last two items if the feature is a CDS.
+ */
+static CharPtr GetGenericInterval
+( FeatureClausePtr fcp,
+ Uint1 biomol,
+ BioseqPtr bsp,
+ DeflineFeatureRequestListPtr rp)
+{
+ CharPtr interval;
+ Boolean partial5, partial3;
+ SeqFeatPtr sfp;
+ ValNodePtr featlist, strings, prev_feat;
+ CharPtr subfeatlist;
+ Int4 len;
+ Boolean suppress_final_and;
+ ValNodePtr utr3vnp = NULL;
+ ValNodePtr last_feat;
+ Uint1 molecule_type;
+
+ if ( fcp == NULL || fcp->featlist == NULL) return NULL;
+ if (fcp->is_unknown) return NULL;
+ featlist = fcp->featlist;
+ sfp = featlist->data.ptrvalue;
+ if (sfp == NULL) return NULL;
+ if ( IsExon (sfp) && fcp->is_alt_spliced)
+ {
+ return StringSave ("alternatively spliced");
+ }
+ if ( ! ShowInterval (sfp)) return NULL;
+
+ subfeatlist = NULL;
+ len = 50;
+ CheckSeqLocForPartial (sfp->location, &partial5, &partial3);
+
+ strings = NULL;
+ prev_feat = NULL;
+ while (featlist != NULL && featlist->choice != DEFLINE_CLAUSEPLUS)
+ {
+ prev_feat = featlist;
+ featlist = featlist->next;
+ }
+ if (IsCDS (sfp))
+ {
+ utr3vnp = Remove3UTRFromEndOfFeatList (&featlist);
+ }
+ if (featlist != NULL)
+ {
+ suppress_final_and = FALSE;
+ if (( IsCDS (sfp) && ! fcp->clause_info_only)
+ || utr3vnp != NULL)
+ {
+ suppress_final_and = TRUE;
+ }
+ LabelClauses (featlist, biomol, bsp, rp);
+
+ molecule_type = GetMoleculeType (bsp, bsp->idx.entityID);
+ /* consolidate genes/proteins with the same names (usually hypothetical proteins) */
+ ConsolidateClauses (&featlist, bsp, molecule_type, TRUE,
+ rp);
+
+ /* make sure featlist is still intact - may have consolidated it */
+ if (prev_feat == NULL)
+ {
+ fcp->featlist = featlist;
+ }
+ else
+ {
+ prev_feat->next = featlist;
+ }
+
+ ListClauses (featlist, &strings, FALSE, suppress_final_and);
+ subfeatlist = MergeValNodeStrings (strings, FALSE);
+ ValNodeFreeData (strings);
+ len += StringLen (subfeatlist) + 7;
+
+ if (utr3vnp != NULL)
+ {
+ len += 14;
+ }
+ }
+
+ interval = (CharPtr) MemNew (len * sizeof (Char));
+ if (interval == NULL) return NULL;
+ interval[0] = 0;
+
+ if (StringDoesHaveText (subfeatlist))
+ {
+ StringCat (interval, subfeatlist);
+ if ( ! IsCDS (sfp) || fcp->clause_info_only)
+ {
+ if (utr3vnp != NULL)
+ {
+ if (featlist->next != NULL)
+ {
+ StringCat (interval, ",");
+ }
+ StringCat (interval, " and 3' UTR");
+ /* put 3' UTR back at end of featlist */
+ if (featlist != NULL)
+ {
+ last_feat = featlist;
+ while (last_feat != NULL && last_feat->next != NULL)
+ {
+ last_feat = last_feat->next;
+ }
+ last_feat->next = utr3vnp;
+ }
+ }
+ if (subfeatlist != NULL) MemFree (subfeatlist);
+ return interval;
+ }
+ if (utr3vnp == NULL)
+ {
+ StringCat (interval, " and ");
+ }
+ else
+ {
+ StringCat (interval, ", ");
+ }
+ }
+
+ if (FeatureDoesNotGetPartialComplete (sfp))
+ {
+ /* don't add partial or complete */
+ }
+ else if (partial5 || partial3)
+ {
+ StringCat (interval, "partial ");
+ }
+ else
+ {
+ StringCat (interval, "complete ");
+ }
+ if (IsCDS (sfp) && ! IsPseudo (sfp))
+ {
+ StringCat (interval, "cds");
+ if (fcp->is_alt_spliced)
+ StringCat (interval, ", alternatively spliced");
+ }
+ else
+ {
+ StringCat (interval, "sequence");
+ if (IsNoncodingProductFeat (sfp) && fcp->is_alt_spliced)
+ {
+ StringCat (interval, ", alternatively spliced");
+ }
+ }
+
+ if (utr3vnp != NULL)
+ {
+ /* tack UTR3 on at end of clause */
+ if (StringDoesHaveText (subfeatlist))
+ {
+ StringCat (interval, ",");
+ }
+ StringCat (interval, " and 3' UTR");
+
+ /* put 3' UTR back at end of featlist */
+ if (featlist != NULL)
+ {
+ last_feat = featlist;
+ while (last_feat != NULL && last_feat->next != NULL)
+ {
+ last_feat = last_feat->next;
+ }
+ last_feat->next = utr3vnp;
+ }
+ }
+
+ if (subfeatlist != NULL) MemFree (subfeatlist);
+
+ return interval;
+}
+
+
+/* This function is used to generate feature label information for
+ * a feature clause. It is called by the LabelFeature function if
+ * a "GetFeatureLabel" function is not found for the specific feature
+ * type.
+ * In the future it may be advisable to create "GetFeatureLabel" functions
+ * for more of the specific feature types, to reduce the number of times
+ * that the feature must be identified as being a certain type.
+ */
+static void LIBCALLBACK GetGenericFeatureLabel
+( FeatureClausePtr fcp,
+ BioseqPtr bsp,
+ Uint1 biomol,
+ FeatureLabelPtr flp,
+ DeflineFeatureRequestListPtr rp)
+{
+ SeqFeatPtr main_feat;
+
+ if (fcp == NULL
+ || fcp->featlist == NULL
+ || fcp->featlist->data.ptrvalue == NULL)
+ {
+ return;
+ }
+ main_feat = fcp->featlist->data.ptrvalue;
+ if (main_feat == NULL) return;
+
+ if (flp->typeword == NULL)
+ {
+ flp->typeword = GetFeatureTypeWord (biomol, main_feat);
+ flp->is_typeword_first = IsTypeWordFirst (flp->typeword);
+ flp->pluralizable = TRUE;
+ }
+ if (flp->productname == NULL)
+ {
+ flp->productname = GetProductName (main_feat, bsp, rp);
+ }
+ if (flp->description == NULL
+ && (! IsMiscRNA (main_feat)
+ || StringStr (flp->productname, "spacer") == NULL ))
+ {
+ flp->description = GetFeatureDescription (fcp, bsp, rp);
+ }
+
+}
+
+typedef void (LIBCALLBACK *GetFeatureLabelFunction) (
+ ValNodePtr featlist,
+ BioseqPtr bsp,
+ Uint1 biomol,
+ FeatureLabelPtr flp
+);
+
+typedef struct matchlabelfunction {
+ matchFunction itemmatch;
+ GetFeatureLabelFunction labelfunction;
+} MatchLabelFunctionData, PNTR MatchLabelFunctionPtr;
+
+static MatchLabelFunctionData label_functions[] = {
+ { IsSatelliteSequence, GetSatelliteFeatureLabel },
+ { IsMobileElement, GetMobileElementFeatureLabel },
+ { IsPromoter, GetPromoterFeatureLabel },
+ { IsIntergenicSpacer, GetIntergenicSpacerFeatureLabel },
+ { IsGeneCluster, GetGeneClusterFeatureLabel }
+};
+
+typedef enum {
+ DEFLINE_FEATLABEL_Satellite = 0,
+ DEFLINE_FEATLABEL_Transposon,
+ DEFLINE_FEATLABEL_Promoter,
+ DEFLINE_FEATLABEL_IntergenicSpacer,
+ DEFLINE_FEATLABEL_GeneCluster,
+ NumDefLineFeatLabels
+} DefLineFeatLabel;
+
+static void LabelFeature
+( BioseqPtr bsp,
+ Uint1 biomol,
+ FeatureClausePtr new_clauseplus,
+ DeflineFeatureRequestListPtr rp)
+{
+ Int4 i;
+ SeqFeatPtr main_feat;
+
+ if (new_clauseplus == NULL || new_clauseplus->featlist == NULL) return;
+
+ if (new_clauseplus->featlist->choice == DEFLINE_FEATLIST)
+ {
+ main_feat = (SeqFeatPtr) new_clauseplus->featlist->data.ptrvalue;
+
+ new_clauseplus->allelename = GetAlleleName (new_clauseplus->grp,
+ rp == NULL ? FALSE : rp->suppress_locus_tags);
+ if (new_clauseplus->interval == NULL)
+ {
+ new_clauseplus->interval =
+ GetGenericInterval (new_clauseplus, biomol, bsp, rp);
+ }
+
+ for (i=0; i < NumDefLineFeatLabels; i++)
+ {
+ if (label_functions [i].itemmatch (main_feat))
+ {
+ label_functions [i].labelfunction ( new_clauseplus->featlist,
+ bsp, biomol,
+ &new_clauseplus->feature_label_data);
+ return;
+ }
+ }
+
+ GetGenericFeatureLabel ( new_clauseplus, bsp, biomol,
+ &new_clauseplus->feature_label_data, rp);
+ return;
+ }
+}
+
+/* This function is used to calculate the parts of a product name that
+ * are "the same" for use as the name of an alternatively spliced product.
+ * The common portion of the string must end at a recognized separator,
+ * such as a space, comma, or dash instead of in the middle of a word.
+ * The matching portions of the string could occur at the beginning or end
+ * of the string, or even occasionally at the beginning and end of a
+ * string, but not as the center of the string with a different beginning
+ * and ending.
+ */
+static CharPtr FindStringIntersection (
+ CharPtr str1,
+ CharPtr str2,
+ Boolean str1_previously_stripped
+)
+{
+ Int4 matchleftlen = 0;
+ Int4 matchlefttoken = 0;
+ Int4 matchrightidx1 = 0;
+ Int4 matchrightidx2 = 0;
+ Int4 matchrighttoken = 0;
+ CharPtr match_string;
+ Int4 len1;
+ Int4 len2;
+ Int4 match_len;
+
+ if (str1 == NULL || str2 == NULL) return NULL;
+ if (StringCmp (str1, str2) == 0) return StringSave (str1);
+ len1 = StringLen (str1);
+ len2 = StringLen (str2);
+
+ while (str1[matchleftlen] != 0 && str2[matchleftlen] != 0
+ && str1[matchleftlen] == str2[matchleftlen])
+ {
+ if (str1 [matchleftlen] == ','
+ || str1 [matchleftlen] == '-')
+ {
+ matchlefttoken = matchleftlen;
+ }
+ else if (str1 [matchleftlen] == ' '
+ && matchlefttoken != matchleftlen - 1)
+ {
+ matchlefttoken = matchleftlen;
+ }
+ matchleftlen++;
+ }
+ if (matchleftlen == len1 && str1_previously_stripped)
+ {
+ matchlefttoken = matchleftlen;
+ }
+ else
+ {
+ matchleftlen = matchlefttoken;
+ }
+
+ matchrightidx1 = len1;
+ matchrightidx2 = len2;
+
+ while (matchrightidx1 > -1 && matchrightidx2 > -1
+ && str1[matchrightidx1] == str2[matchrightidx2])
+ {
+ if (str1 [matchrightidx1] == ' '
+ || str1[matchrightidx1] == ','
+ || str1[matchrightidx1] == '-')
+ {
+ matchrighttoken = matchrightidx1;
+ }
+ matchrightidx1--;
+ matchrightidx2--;
+ }
+ if (matchrightidx1 == -1)
+ {
+ matchrighttoken = matchrightidx1;
+ }
+ else if (matchrighttoken > 0)
+ {
+ matchrightidx1 = matchrighttoken;
+ }
+ else if (str1_previously_stripped && matchrightidx1 < len1 - 1)
+ {
+ /* matchrightidx1 = matchrighttoken; */
+ /* do nothing, leave right index where it is */
+ }
+ else
+ {
+ matchrightidx1 = len1;
+ }
+
+ match_len = matchleftlen;
+ if (matchrightidx1 < len1 - 1)
+ {
+ match_len += len1 - matchrightidx1 - 1;
+ }
+
+ if (match_len <= 0) return NULL;
+
+ match_string = MemNew (match_len + 2);
+ if (match_string == NULL) return NULL;
+ if (matchleftlen != 0)
+ {
+ StringNCpy (match_string, str1, matchleftlen);
+ match_string[matchleftlen] = 0;
+ }
+ else
+ {
+ match_string[0] = 0;
+ }
+ if (matchrightidx1 < len1)
+ {
+ if (match_string[0] != 0) StringCat (match_string, " ");
+ StringCat (match_string, str1 + matchrightidx1 + 1);
+ }
+ return match_string;
+}
+
+/* These are the words that are used to introduced the part of the protein
+ * name that differs in alt-spliced products - they should not be part of
+ * the alt-spliced product name.
+ * Note that splice variant is listed before "variant" so that it will be
+ * found first and "variant" will not be removed from "splice variant", leaving
+ * splice as an orphan.
+ */
+
+static CharPtr UnwantedWords [] = {
+ "splice variant",
+ "splice product",
+ "variant",
+ "isoform"
+};
+
+static void TrimUnwantedWordsFromAltSpliceProductName (
+ CharPtr productname
+)
+{
+ Int4 num_unwanted_words, i;
+ size_t unwanted_word_len;
+ CharPtr cp, tmp;
+
+ num_unwanted_words = sizeof (UnwantedWords) / sizeof (CharPtr);
+ for (i = 0; i < num_unwanted_words; i++)
+ {
+ unwanted_word_len = StringLen (UnwantedWords [i]);
+ cp = StringStr (productname, UnwantedWords [i]);
+ if (cp != NULL)
+ {
+ if (cp == productname)
+ {
+ /* word occurs in beginning of phrase */
+ tmp = StringSave (productname + unwanted_word_len);
+ StringCpy (productname, tmp);
+ MemFree (tmp);
+ }
+ else if (cp - productname < StringLen (productname) - unwanted_word_len)
+ {
+ /* word occurs in middle of phrase */
+ tmp = StringSave (cp + unwanted_word_len);
+ StringCpy (cp - 1, tmp);
+ MemFree (tmp);
+ }
+ else
+ {
+ /* word occurs at end of phrase */
+ *cp = 0;
+ }
+ }
+ }
+}
+
+
+static Boolean PreviouslyStripped (SeqFeatPtr cds, BioseqPtr bsp, CharPtr productname)
+{
+ CharPtr expected_product_name;
+ Boolean rval = FALSE;
+
+ if (cds == NULL || StringHasNoText (productname)) return FALSE;
+ expected_product_name = GetProductName (cds, bsp, FALSE);
+ if (StringCmp (productname, expected_product_name) != 0) {
+ rval = TRUE;
+ }
+ expected_product_name = MemFree (expected_product_name);
+ return rval;
+}
+
+/* This function determines whether two CDSs meet the conditions for
+ * alternative splicing, and if so, it returns the name of the alternatively
+ * spliced product. In order to be alternatively spliced, the two CDSs
+ * must have the same gene, must share a complete interval, and must have
+ * similarly named products.
+ */
+static CharPtr MeetAltSpliceRules
+( FeatureClausePtr cdsfcp1,
+ FeatureClausePtr cdsfcp2,
+ BioseqPtr bsp,
+ DeflineFeatureRequestListPtr rp)
+{
+ SeqFeatPtr cds1, cds2;
+ CharPtr match_string;
+ Int4 res;
+
+ if (cdsfcp1 == NULL || cdsfcp2 == NULL
+ || cdsfcp1->featlist == NULL || cdsfcp2->featlist == NULL)
+ {
+ return NULL;
+ }
+
+ cds1 = cdsfcp1->featlist->data.ptrvalue;
+ cds2 = cdsfcp2->featlist->data.ptrvalue;
+ if (! DoGenesMatch (cdsfcp1->grp, cdsfcp2->grp, rp == NULL ? FALSE : rp->suppress_locus_tags))
+ return NULL;
+
+ if ( (res = TestFeatOverlap (cds1, cds2, COMMON_INTERVAL)) != -1)
+ {
+ match_string = FindStringIntersection (
+ cdsfcp1->feature_label_data.productname,
+ cdsfcp2->feature_label_data.productname,
+ PreviouslyStripped(cds1, bsp, cdsfcp1->feature_label_data.productname));
+ return match_string;
+ }
+ return NULL;
+}
+
+/* This function is used by the FindAltSplices function to locate the
+ * next CDS in a list of feature clauses.
+ */
+static ValNodePtr FindNextCDSClause (ValNodePtr vnp)
+{
+ FeatureClausePtr fcp;
+
+ while (vnp != NULL)
+ {
+ if (vnp->choice == DEFLINE_CLAUSEPLUS)
+ {
+ fcp = vnp->data.ptrvalue;
+ if (fcp != NULL && !fcp->delete_me && fcp->featlist != NULL
+ && IsCDS (fcp->featlist->data.ptrvalue))
+ {
+ return vnp;
+ }
+ }
+ vnp = vnp->next;
+ }
+ return NULL;
+}
+
+/* This function is used by the FindAltSplices function to move the features
+ * and subclauses from the second CDS in an alternatively spliced pair of
+ * CDSs to the feature clause for the first CDS, so that the subfeatures
+ * can be properly listed.
+ */
+static void MoveSubclauses (
+ FeatureClausePtr dstfcp,
+ FeatureClausePtr srcfcp
+)
+{
+ ValNodePtr dst_last_feat, dst_first_clause, dst_last_clause;
+ ValNodePtr src_last_feat, src_first_clause;
+
+ if (dstfcp == NULL || srcfcp == NULL || srcfcp->featlist == NULL) return;
+
+ dst_first_clause = NULL;
+ dst_last_clause = NULL;
+ src_first_clause = NULL;
+
+ dst_last_feat = dstfcp->featlist;
+ while (dst_last_feat != NULL
+ && dst_last_feat->next != NULL
+ && dst_last_feat->next->choice == DEFLINE_FEATLIST)
+ {
+ dst_last_feat = dst_last_feat->next;
+ }
+ if (dst_last_feat != NULL)
+ {
+ dst_first_clause = dst_last_feat->next;
+ }
+ dst_last_clause = dst_first_clause;
+ while (dst_last_clause != NULL && dst_last_clause->next != NULL)
+ {
+ dst_last_clause = dst_last_clause->next;
+ }
+
+ src_last_feat = srcfcp->featlist;
+ while (src_last_feat != NULL
+ && src_last_feat->next != NULL
+ && src_last_feat->next->choice == DEFLINE_FEATLIST)
+ {
+ src_last_feat = src_last_feat->next;
+ }
+ if (src_last_feat != NULL)
+ {
+ src_first_clause = src_last_feat->next;
+ }
+
+ /* insert features before clauses */
+ if (dst_last_feat == NULL)
+ {
+ dstfcp->featlist = srcfcp->featlist;
+ dst_last_feat = src_last_feat;
+ }
+ else
+ {
+ dst_last_feat->next = srcfcp->featlist;
+ }
+ /* insert clauses after feats */
+ if (dst_first_clause != NULL)
+ {
+ src_last_feat->next = dst_first_clause;
+ dst_last_clause->next = src_first_clause;
+ }
+ srcfcp->featlist = NULL;
+}
+
+/* we want to look through the list for CDS features */
+/* if we find two CDSs that are alternatively spliced, */
+/* we replace the first alternatively spliced CDS feature */
+/* with a new CDS feature that has the new protein name as */
+/* a comment and a data.choice value that indicates alt splicing */
+/* we remove the second alternatively spliced CDS feature from the list */
+
+static void FindAltSplices
+( ValNodePtr clause_list,
+ BioseqPtr bsp,
+ DeflineFeatureRequestListPtr rp)
+{
+ FeatureClausePtr fcp1, fcp2;
+ ValNodePtr cdsclause1, cdsclause2;
+ ValNodePtr searchclause;
+ CharPtr combined_protein_name;
+ Boolean partial3_1, partial5_1, partial3_2, partial5_2;
+ Int4 left1, left2, right1, right2;
+
+ if (clause_list == NULL) return;
+
+ cdsclause1 = FindNextCDSClause (clause_list);
+ while (cdsclause1 != NULL)
+ {
+ fcp1 = (FeatureClausePtr) cdsclause1->data.ptrvalue;
+ if (fcp1->feature_label_data.productname == NULL)
+ {
+ fcp1->feature_label_data.productname =
+ GetProductName (fcp1->featlist->data.ptrvalue, bsp, rp);
+ }
+ searchclause = cdsclause1->next;
+ cdsclause2 = FindNextCDSClause (searchclause);
+ while (cdsclause2 != NULL)
+ {
+ fcp2 = (FeatureClausePtr) cdsclause2->data.ptrvalue;
+ if (fcp2->feature_label_data.productname == NULL)
+ {
+ fcp2->feature_label_data.productname =
+ GetProductName (fcp2->featlist->data.ptrvalue, bsp, rp);
+ }
+ combined_protein_name = MeetAltSpliceRules (fcp1, fcp2, bsp, rp);
+ if (combined_protein_name != NULL)
+ {
+ /* get rid of variant, splice variant, splice product, isoform, etc.*/
+ TrimUnwantedWordsFromAltSpliceProductName (combined_protein_name);
+
+ /* get rid of trailing spaces in protein name */
+ TrimSpacesAroundString (combined_protein_name);
+
+ /* copy new protein name into first clause */
+ MemFree (fcp1->feature_label_data.productname);
+ fcp1->feature_label_data.productname = combined_protein_name;
+ CheckSeqLocForPartial (fcp1->slp, &partial5_1, &partial3_1);
+ left1 = GetOffsetInBioseq (fcp1->slp, bsp, SEQLOC_LEFT_END);
+ right1 = GetOffsetInBioseq (fcp1->slp, bsp, SEQLOC_RIGHT_END);
+ CheckSeqLocForPartial (fcp2->slp, &partial5_2, &partial3_2);
+ left2 = GetOffsetInBioseq (fcp2->slp, bsp, SEQLOC_LEFT_END);
+ right2 = GetOffsetInBioseq (fcp2->slp, bsp, SEQLOC_RIGHT_END);
+ fcp1->slp = SeqLocMerge (bsp, fcp1->slp, fcp2->slp,
+ FALSE, TRUE, FALSE);
+ if (left1 == left2)
+ {
+ partial5_1 |= partial5_2;
+ }
+ else
+ {
+ partial5_1 = left1 < left2 ? partial5_1 : partial5_2;
+ }
+ if (right1 == right2)
+ {
+ partial3_1 |= partial3_2;
+ }
+ else
+ {
+ partial3_1 = right1 > right2 ? partial3_1 : partial3_2;
+ }
+ SetSeqLocPartial (fcp1->slp, partial5_1, partial3_1);
+ fcp1->is_alt_spliced = TRUE;
+
+ /* copy over fcp2 subclauses */
+ MoveSubclauses (fcp1, fcp2);
+
+ /* remove second clause */
+ fcp2->delete_me = TRUE;
+ }
+ searchclause = cdsclause2->next;
+ cdsclause2 = FindNextCDSClause (searchclause);
+ }
+ cdsclause1 = FindNextCDSClause (cdsclause1->next);
+ }
+ DeleteFeatureClauses (&clause_list);
+}
+
+static void LabelClauses
+( ValNodePtr clause_list,
+ Uint1 biomol,
+ BioseqPtr bsp,
+ DeflineFeatureRequestListPtr rp)
+{
+ ValNodePtr clause;
+
+ clause = clause_list;
+ while (clause != NULL)
+ {
+ LabelFeature ( bsp, biomol, clause->data.ptrvalue, rp);
+ clause = clause->next;
+ }
+}
+
+static CharPtr misc_words [] = {
+ "internal transcribed spacer",
+ "external transcribed spacer",
+ "ribosomal RNA intergenic spacer",
+ "ribosomal RNA",
+ "intergenic spacer"
+};
+
+typedef enum {
+ MISC_RNA_WORD_INTERNAL_SPACER = 0,
+ MISC_RNA_WORD_EXTERNAL_SPACER,
+ MISC_RNA_WORD_RNA_INTERGENIC_SPACER,
+ MISC_RNA_WORD_RNA,
+ MISC_RNA_WORD_INTERGENIC_SPACER,
+ NUM_MISC_RNA_WORDS
+} MiscWord;
+
+static CharPtr separators [] = {
+ ", and ",
+ " and ",
+ ", ",
+ "; "
+};
+
+#define num_separators 3
+
+static ValNodePtr GetMiscRNAelements
+( SeqFeatPtr misc_rna,
+ BioseqPtr bsp,
+ DeflineFeatureRequestListPtr rp)
+{
+ CharPtr buffer;
+ Int4 i, best_i;
+ CharPtr cansep [num_separators];
+ CharPtr dataval;
+ Int4 datalen;
+ FeatureClausePtr fcp;
+ FeatureClausePtr lastfcp;
+ Int4 num_clauses;
+ ValNodePtr head, vnp;
+ Boolean partial5, partial3;
+ Int4 word_i;
+ CharPtr to_free;
+ CharPtr word_loc;
+
+ to_free = NULL;
+
+ if (misc_rna == NULL) return NULL;
+ buffer = GetProductName (misc_rna, bsp, rp);
+ to_free = buffer;
+ if (buffer == NULL)
+ {
+ buffer = misc_rna->comment;
+ }
+ else if (StringNCmp (buffer, misc_rna->comment, StringLen (buffer) -1) == 0
+ && buffer [ StringLen (buffer) - 1] == '>')
+ {
+ MemFree (buffer);
+ to_free = NULL;
+ buffer = misc_rna->comment;
+ }
+
+ if ( StringStr (buffer, "spacer") == NULL)
+ {
+ if (to_free != NULL)
+ {
+ MemFree (to_free);
+ }
+ return NULL;
+ }
+
+ if (StringNCmp (buffer, "contains ", 9) == 0)
+ {
+ buffer = buffer + 9;
+ }
+
+ head = NULL;
+ CheckSeqLocForPartial (misc_rna->location, &partial5, &partial3);
+ num_clauses = 0;
+
+ while (buffer != NULL
+ && buffer[0] != 0)
+ {
+ best_i = -1;
+ for (i=0; i < num_separators; i++)
+ {
+ cansep [i] = StringStr (buffer, separators [i]);
+ if (cansep [i] != NULL
+ && (best_i == -1
+ || cansep [i] < cansep [best_i]))
+ {
+ best_i = i;
+ }
+ }
+
+ if (best_i == -1)
+ {
+ datalen = StringLen (buffer);
+ }
+ else
+ {
+ datalen = cansep [best_i] - buffer;
+ }
+
+ dataval = MemNew (datalen + 1);
+ if (dataval == NULL) return NULL;
+ StringNCpy (dataval, buffer, datalen);
+ dataval [datalen] = 0;
+
+ for (word_i=0;
+ word_i < NUM_MISC_RNA_WORDS
+ && (word_loc = StringStr (dataval, misc_words [word_i])) == NULL;
+ word_i++) {}
+ if (word_i < NUM_MISC_RNA_WORDS)
+ {
+ fcp = NewFeatureClause ( misc_rna, bsp, rp);
+ if (fcp == NULL) return NULL;
+ if (word_i == MISC_RNA_WORD_INTERNAL_SPACER
+ || word_i == MISC_RNA_WORD_EXTERNAL_SPACER
+ || word_i == MISC_RNA_WORD_RNA_INTERGENIC_SPACER
+ || word_i == MISC_RNA_WORD_INTERGENIC_SPACER)
+ {
+ if (word_loc == dataval)
+ {
+ fcp->feature_label_data.is_typeword_first = TRUE;
+ fcp->feature_label_data.typeword = StringSave (misc_words [word_i]);
+ if (StringLen (misc_words [word_i]) + 1 < StringLen (dataval))
+ {
+ fcp->feature_label_data.description =
+ StringSave ( dataval + StringLen (misc_words [word_i]) + 1);
+ }
+ }
+ else
+ {
+ fcp->feature_label_data.is_typeword_first = FALSE;
+ fcp->feature_label_data.typeword = StringSave (misc_words [word_i]);
+ if (StringLen (misc_words [word_i]) + 1 < StringLen (dataval))
+ {
+ fcp->feature_label_data.description =
+ StringSave ( dataval);
+ fcp->feature_label_data.description [word_loc - dataval - 1] = 0;
+ }
+ }
+ MemFree (dataval);
+ }
+ else if (word_i == MISC_RNA_WORD_RNA)
+ {
+ fcp->feature_label_data.description = dataval;
+ }
+ if (num_clauses == 0 && partial5)
+ {
+ fcp->interval = StringSave ("partial sequence");
+ }
+ else
+ {
+ fcp->interval = StringSave ("complete sequence");
+ }
+
+ num_clauses ++;
+ lastfcp = fcp;
+
+ vnp = ValNodeNew (head);
+ if (head == NULL) head = vnp;
+ if (vnp == NULL) return NULL;
+ vnp->data.ptrvalue = fcp;
+ vnp->choice = DEFLINE_CLAUSEPLUS;
+ }
+ else
+ {
+ MemFree (dataval);
+ }
+ buffer += datalen;
+ if (best_i != -1)
+ {
+ buffer += StringLen ( separators [best_i]);
+ }
+ }
+
+ if ((num_clauses == 1 && partial3 && ! partial5)
+ || (num_clauses > 1 && partial3))
+ {
+ MemFree (lastfcp->interval);
+ lastfcp->interval = StringSave ("partial sequence");
+ }
+ if (to_free != NULL) MemFree (to_free);
+ return head;
+}
+
+/* Some misc_RNA clauses have a comment that actually lists multiple
+ * features. This function creates a clause for each element in the
+ * comment and inserts the list of new clauses into the feature list
+ * at the point where the single previous clause was.
+ */
+static void ReplaceRNAClauses (
+ ValNodePtr PNTR clause_list,
+ BioseqPtr bsp,
+ DeflineFeatureRequestListPtr rp)
+{
+ FeatureClausePtr fcp;
+ SeqFeatPtr main_feat;
+ ValNodePtr clause, replacement_clauses, nextclause, vnp;
+
+ if (clause_list == NULL || *clause_list == NULL) return;
+ clause = *clause_list;
+ while (clause != NULL)
+ {
+ nextclause = clause->next;
+ fcp = (clause->data.ptrvalue);
+ if (fcp == NULL
+ || fcp->featlist == NULL
+ || fcp->featlist->choice != DEFLINE_FEATLIST)
+ {
+ return;
+ }
+ main_feat = (SeqFeatPtr) fcp->featlist->data.ptrvalue;
+
+ if (IsrRNA (main_feat) || IsMiscRNA (main_feat))
+ {
+ replacement_clauses = GetMiscRNAelements ( main_feat, bsp, rp );
+ if (replacement_clauses != NULL)
+ {
+ for (vnp = replacement_clauses; vnp->next != NULL; vnp = vnp->next) {}
+ vnp->next = clause->next;
+ clause->next = replacement_clauses;
+ fcp->delete_me = TRUE;
+ }
+ }
+ clause = nextclause;
+ }
+ DeleteFeatureClauses (clause_list);
+}
+
+/* Some misc_feat clauses have a comment that lists one or more tRNAs and
+ * an intergenic spacer. This function creates a clause for each element
+ * in the comment and inserts the list of new clauses into the feature list
+ * at the point where the single previous clause was.
+ */
+static void ReplaceIntergenicSpacerClauses (
+ ValNodePtr PNTR clause_list,
+ BioseqPtr bsp,
+ DeflineFeatureRequestListPtr rp)
+{
+ FeatureClausePtr fcp;
+ SeqFeatPtr main_feat;
+ ValNodePtr clause, replacement_clauses, nextclause, vnp;
+
+ if (clause_list == NULL || *clause_list == NULL) return;
+ clause = *clause_list;
+ while (clause != NULL)
+ {
+ nextclause = clause->next;
+ fcp = (clause->data.ptrvalue);
+ if (fcp == NULL
+ || fcp->featlist == NULL
+ || fcp->featlist->choice != DEFLINE_FEATLIST)
+ {
+ return;
+ }
+ main_feat = (SeqFeatPtr) fcp->featlist->data.ptrvalue;
+
+ if (IsIntergenicSpacer (main_feat)
+ && (replacement_clauses = ParsetRNAIntergenicSpacerElements ( main_feat, bsp, rp)) != NULL)
+ {
+ for (vnp = replacement_clauses; vnp->next != NULL; vnp = vnp->next) {}
+ vnp->next = clause->next;
+ clause->next = replacement_clauses;
+ fcp->delete_me = TRUE;
+ }
+ clause = nextclause;
+ }
+ DeleteFeatureClauses (clause_list);
+}
+
+/* If we are applying a different rule for misc_feats, we need to recalculate
+ * their descriptions.
+ */
+static void RenameMiscFeats (ValNodePtr clause_list, Uint1 biomol)
+{
+ ValNodePtr vnp, featlist;
+ FeatureClausePtr fcp, featlistclause;
+ SeqFeatPtr sfp;
+ Int4 name_len;
+
+ for (vnp = clause_list; vnp != NULL; vnp = vnp->next)
+ {
+ if (vnp->choice != DEFLINE_CLAUSEPLUS || vnp->data.ptrvalue == NULL)
+ {
+ continue;
+ }
+ fcp = vnp->data.ptrvalue;
+ for (featlist = fcp->featlist; featlist != NULL; featlist = featlist->next)
+ {
+ if ( featlist->data.ptrvalue == NULL)
+ {
+ continue;
+ }
+ if (featlist->choice == DEFLINE_CLAUSEPLUS)
+ {
+ featlistclause = featlist->data.ptrvalue;
+ RenameMiscFeats (featlistclause->featlist, biomol);
+ continue;
+ }
+ if (featlist->choice != DEFLINE_FEATLIST)
+ {
+ continue;
+ }
+ sfp = featlist->data.ptrvalue;
+ if (sfp->idx.subtype != FEATDEF_misc_feature
+ || sfp->comment == NULL
+ || IsIntergenicSpacer (sfp)
+ || IsGeneCluster (sfp)
+ || IsControlRegion (sfp))
+ {
+ continue;
+ }
+ if (fcp->feature_label_data.description != NULL)
+ {
+ fcp->feature_label_data.description
+ = MemFree (fcp->feature_label_data.description);
+ }
+ name_len = StringCSpn (sfp->comment, ";");
+ /* make sure we have space for terminating NULL */
+ fcp->feature_label_data.description = MemNew ((name_len + 1) * sizeof (Char));
+ if (fcp->feature_label_data.description == NULL) return;
+ StringNCpy (fcp->feature_label_data.description, sfp->comment, name_len);
+ fcp->feature_label_data.description [ name_len ] = 0;
+ fcp->feature_label_data.typeword =
+ MemFree (fcp->feature_label_data.typeword);
+ if (biomol == MOLECULE_TYPE_GENOMIC)
+ {
+ fcp->feature_label_data.typeword = StringSave ("genomic sequence");
+ }
+ else if (biomol == MOLECULE_TYPE_MRNA)
+ {
+ fcp->feature_label_data.typeword = StringSave ("mRNA sequence");
+ }
+ else
+ {
+ fcp->feature_label_data.typeword = StringSave ("sequence");
+ }
+
+ fcp->interval = MemFree (fcp->interval);
+ fcp->interval = StringSave ("");
+ }
+ }
+}
+
+static void RemoveUnwantedMiscFeats (
+ ValNodePtr PNTR clause_list,
+ Boolean delete_now
+)
+{
+ ValNodePtr vnp, featlist;
+ FeatureClausePtr fcp, featlistclause;
+ SeqFeatPtr sfp;
+
+ for (vnp = *clause_list; vnp != NULL; vnp = vnp->next)
+ {
+ if (vnp->choice != DEFLINE_CLAUSEPLUS || vnp->data.ptrvalue == NULL)
+ {
+ continue;
+ }
+ fcp = vnp->data.ptrvalue;
+ for (featlist = fcp->featlist; featlist != NULL; featlist = featlist->next)
+ {
+ if ( featlist->data.ptrvalue == NULL)
+ {
+ continue;
+ }
+ if (featlist->choice == DEFLINE_CLAUSEPLUS)
+ {
+ featlistclause = featlist->data.ptrvalue;
+ RemoveUnwantedMiscFeats (&(featlistclause->featlist), FALSE);
+ continue;
+ }
+ if (featlist->choice != DEFLINE_FEATLIST)
+ {
+ continue;
+ }
+ sfp = featlist->data.ptrvalue;
+ if ( sfp->idx.subtype == FEATDEF_misc_feature
+ && ! IsNoncodingProductFeat (sfp)
+ && ! IsControlRegion (sfp)
+ && ! IsIntergenicSpacer (sfp)
+ && ! IsGeneCluster (sfp))
+ {
+ fcp->delete_me = TRUE;
+ }
+ }
+ }
+ DeleteFeatureClauses (clause_list);
+}
+
+/* When a feature is on the minus strand, the clauses are listed by
+ * sequence indexing in reverse biological order - we reverse the subclauses
+ * for the feature in order to have them listed in the definition line
+ * in biological order.
+ * This is most noticeable when the main feature is a CDS with multiple
+ * exons numbered sequentially. If the exons are on the minus strand and
+ * appear as 9, 8, 7, 6, we want to display them in the definition line as
+ * 6, 7, 8, 9.
+ */
+static void ReverseClauses (
+ ValNodePtr PNTR clause_list,
+ matchFunction itemmatch
+)
+{
+ ValNodePtr vnp, last_feat, first_feat, next_item, new_list;
+ FeatureClausePtr fcp;
+
+ if (clause_list == NULL || *clause_list == NULL) return;
+
+ last_feat = NULL;
+ first_feat = NULL;
+ new_list = NULL;
+ vnp = *clause_list;
+ while (vnp != NULL)
+ {
+ next_item = vnp->next;
+ fcp = NULL;
+ if (vnp->choice == DEFLINE_CLAUSEPLUS
+ && (fcp = vnp->data.ptrvalue) != NULL
+ && fcp->slp != NULL
+ && SeqLocStrand (fcp->slp) == Seq_strand_minus
+ && fcp->featlist != NULL
+ && fcp->featlist->choice == DEFLINE_FEATLIST
+ && itemmatch (fcp->featlist->data.ptrvalue))
+ {
+ vnp->next = new_list;
+ new_list = vnp;
+ }
+ else
+ {
+ if (first_feat == NULL)
+ {
+ first_feat = vnp;
+ last_feat = vnp;
+ }
+ else
+ {
+ last_feat->next = vnp;
+ last_feat = vnp;
+ last_feat->next = NULL;
+ }
+ }
+ if (fcp != NULL)
+ {
+ ReverseClauses (&(fcp->featlist), itemmatch);
+ }
+ vnp = next_item;
+ }
+ if (first_feat == NULL)
+ {
+ *clause_list = new_list;
+ }
+ else
+ {
+ last_feat->next = new_list;
+ *clause_list = first_feat;
+ }
+}
+
+/* This function is used to determine whether two features are both exons
+ * and whether they are numerically sequential - i.e., exon 7 and exon 8
+ * are a pair of consecutive exons, exon 7 and exon 9 are not, and exon 7
+ * and intron 9 are not.
+ */
+static Boolean ClausePairIsTwoConsecutiveExons (
+ ValNodePtr vnp1,
+ ValNodePtr vnp2,
+ BioseqPtr bsp
+)
+{
+ FeatureClausePtr fcp1, fcp2;
+ SeqFeatPtr exon1, exon2;
+ Int4 num1, num2;
+ CharPtr exdesc1, exdesc2;
+
+ if (vnp1 == NULL || vnp2 == NULL
+ || vnp1->choice != DEFLINE_CLAUSEPLUS
+ || vnp2->choice != DEFLINE_CLAUSEPLUS
+ || vnp1->data.ptrvalue == NULL
+ || vnp2->data.ptrvalue == NULL)
+ {
+ return FALSE;
+ }
+ fcp1 = vnp1->data.ptrvalue;
+ fcp2 = vnp2->data.ptrvalue;
+ if ( fcp1->featlist == NULL
+ || fcp1->featlist->data.ptrvalue == NULL
+ || fcp2->featlist == NULL
+ || fcp2->featlist->data.ptrvalue == NULL
+ || fcp1->featlist->choice != DEFLINE_FEATLIST
+ || fcp2->featlist->choice != DEFLINE_FEATLIST
+ || ! IsExon (fcp1->featlist->data.ptrvalue)
+ || ! IsExon (fcp2->featlist->data.ptrvalue)
+ || (fcp1->is_alt_spliced && ! fcp2->is_alt_spliced)
+ || (! fcp1->is_alt_spliced && fcp2->is_alt_spliced))
+ {
+ return FALSE;
+ }
+
+ exon1 = (SeqFeatPtr)(fcp1->featlist->data.ptrvalue);
+ exon2 = (SeqFeatPtr)(fcp2->featlist->data.ptrvalue);
+
+ exdesc1 = GetExonDescription (bsp, exon1);
+ exdesc2 = GetExonDescription (bsp, exon2);
+ if (exdesc1 == NULL || exdesc2 == NULL)
+ {
+ if (exdesc1 != NULL) MemFree (exdesc1);
+ if (exdesc2 != NULL) MemFree (exdesc2);
+ return FALSE;
+ }
+
+ num1 = atoi (exdesc1);
+ num2 = atoi (exdesc2);
+ MemFree (exdesc1);
+ MemFree (exdesc2);
+
+ if (abs (num1 - num2) == 1)
+ {
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
+/* This function counts the number of consecutive exons in a list.
+ */
+static Int4 GetNumberOfConsecutiveExons (
+ ValNodePtr list,
+ BioseqPtr bsp
+)
+{
+ ValNodePtr check;
+ Int4 num_exons;
+
+ num_exons = 0;
+ check = list->next;
+ if ( ! ClausePairIsTwoConsecutiveExons (list, check, bsp)) return 0;
+
+ num_exons = 2;
+ while ( check != NULL
+ && ClausePairIsTwoConsecutiveExons (check, check->next, bsp))
+ {
+ num_exons++;
+ check = check->next;
+ }
+ return num_exons;
+}
+
+/* This function replaces a list of three or more consecutive exon clauses
+ * with a single "summary" clause that gives the range of exons present -
+ * i.e., if you have exons 1, 2, 3, and 4, a clause will be created that
+ * contains all four of those features and has a description of "1 through 4".
+ */
+static void ReplaceExonClauseList (
+ FeatureClausePtr fcp,
+ ValNodePtr clause,
+ Int4 num_exons,
+ BioseqPtr bsp
+)
+{
+ ValNodePtr lastfeat, tmpclause;
+ FeatureClausePtr tmpfcp;
+ Int4 i;
+ CharPtr new_description;
+ Int4 new_description_len;
+ CharPtr exdesc1, exdesc2;
+
+ if (fcp == NULL || clause == NULL) return;
+
+ lastfeat = fcp->featlist;
+ while (lastfeat != NULL && lastfeat->next != NULL)
+ {
+ lastfeat = lastfeat->next;
+ }
+ tmpclause = clause->next;
+ for (i=0; i < num_exons - 1 && tmpclause != NULL; i++)
+ {
+ tmpfcp = tmpclause->data.ptrvalue;
+ tmpfcp->delete_me = TRUE;
+ if (lastfeat == NULL)
+ {
+ fcp->featlist = tmpfcp->featlist;
+ }
+ else
+ {
+ lastfeat->next = tmpfcp->featlist;
+ }
+ tmpfcp->featlist = NULL;
+ while (lastfeat != NULL && lastfeat->next != NULL)
+ {
+ lastfeat = lastfeat->next;
+ }
+
+ tmpclause = tmpclause->next;
+ }
+
+ exdesc1 = GetExonDescription (bsp, fcp->featlist->data.ptrvalue);
+ exdesc2 = GetExonDescription (bsp, lastfeat->data.ptrvalue);
+ if (exdesc1 == NULL || exdesc2 == NULL)
+ {
+ if (exdesc1 != NULL) MemFree (exdesc1);
+ if (exdesc2 != NULL) MemFree (exdesc2);
+ return;
+ }
+ new_description_len =
+ StringLen (exdesc1)
+ + StringLen (exdesc2)
+ + StringLen (" through ")
+ + 1;
+ new_description = MemNew (new_description_len * sizeof (Char));
+ if (new_description == NULL) return;
+ sprintf (new_description, "%s through %s", exdesc1, exdesc2);
+ MemFree (exdesc1);
+ MemFree (exdesc2);
+ if (fcp->feature_label_data.description != NULL)
+ {
+ MemFree (fcp->feature_label_data.description);
+ }
+ fcp->feature_label_data.description = new_description;
+}
+
+/* This function recursively searches for lists of consecutive exons
+ * and calls ReplaceExonClauseList to consolidate the exons into a list
+ * clause.
+ */
+static void RenameExonSequences (
+ ValNodePtr PNTR list,
+ BioseqPtr bsp,
+ Boolean delete_now
+)
+{
+ ValNodePtr clause;
+ Int4 num_exons;
+ FeatureClausePtr fcp;
+
+ if (list == NULL) return;
+ clause = *list;
+ while (clause != NULL)
+ {
+ if (clause->choice == DEFLINE_CLAUSEPLUS
+ && clause->data.ptrvalue != NULL)
+ {
+ fcp = clause->data.ptrvalue;
+ if ( ! fcp->delete_me)
+ {
+ num_exons = GetNumberOfConsecutiveExons (clause, bsp);
+ if (num_exons > 2)
+ {
+ ReplaceExonClauseList (fcp, clause, num_exons, bsp);
+ }
+ else
+ {
+ RenameExonSequences (&fcp->featlist, bsp, FALSE);
+ }
+ }
+ }
+ clause = clause->next;
+ }
+ if (delete_now) DeleteFeatureClauses (list);
+}
+
+static CharPtr organelleByGenome [] = {
+ NULL,
+ NULL,
+ "chloroplast",
+ "chromoplast",
+ "kinetoplast",
+ "mitochondrial",
+ "plastid",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "cyanelle",
+ "",
+ "",
+ "",
+ "apicoplast",
+ "leucoplast",
+ "proplastid",
+ "",
+ "hydrogenosome",
+ NULL,
+};
+
+static CharPtr organelleByPopup [] = {
+ NULL,
+ "mitochondrial",
+ "chloroplast",
+ "kinetoplast",
+ "plastid",
+ "chromoplast",
+ "cyanelle",
+ "apicoplast",
+ "leucoplast",
+ "proplastid",
+ NULL
+};
+
+static void
+AddProductEnding
+(CharPtr str,
+ BioseqPtr bsp,
+ Int2 mitochloroflag,
+ ValNodePtr strings)
+{
+ Char orgnelle [80];
+ BioSourcePtr biop;
+ ValNodePtr last_string;
+ Int4 num_genes;
+ SubSourcePtr ssp;
+
+ num_genes = 0;
+ biop = GetBiopForBsp (bsp);
+
+ if (biop != NULL) {
+ if (FindStringInStrings (strings, "genes"))
+ {
+ num_genes = 2;
+ }
+ else if ((last_string = FindStringInStrings (strings, "gene")) != NULL
+ && last_string->next != NULL
+ && (last_string = FindStringInStrings (last_string->next, "gene")) != NULL)
+ {
+ num_genes = 2;
+ }
+ else
+ {
+ num_genes = 1;
+ }
+
+ orgnelle [0] = '\0';
+
+ switch (biop->genome) {
+ case GENOME_macronuclear :
+ StringCat (str, "; macronuclear");
+ break;
+ case GENOME_nucleomorph :
+ StringCat (str, "; nucleomorph");
+ break;
+ case GENOME_apicoplast :
+ case GENOME_chloroplast :
+ case GENOME_chromoplast :
+ case GENOME_kinetoplast :
+ case GENOME_mitochondrion :
+ case GENOME_plastid :
+ case GENOME_cyanelle :
+ case GENOME_leucoplast :
+ case GENOME_proplastid :
+ case GENOME_hydrogenosome :
+ sprintf (orgnelle, "; %s", organelleByGenome [biop->genome]);
+ StringCat (str, orgnelle);
+ break;
+ default :
+ ssp = biop->subtype;
+ while (ssp != NULL && ssp->subtype != 255)
+ {
+ ssp = ssp->next;
+ }
+ if (ssp != NULL
+ && ssp->name != NULL
+ && StringStr (ssp->name, "micronuclear"))
+ {
+ StringCat (str, "; micronuclear");
+ }
+ else if (mitochloroflag > 0) {
+ if (mitochloroflag > 9) {
+ /* beyond list */
+ }
+ else {
+ if (num_genes > 1)
+ {
+ sprintf (orgnelle, "; nuclear genes for %s products",
+ organelleByPopup [mitochloroflag]);
+ }
+ else
+ {
+ sprintf (orgnelle, "; nuclear gene for %s product",
+ organelleByPopup [mitochloroflag]);
+ }
+ StringCat (str, orgnelle);
+ }
+ }
+ break;
+ }
+ }
+}
+
+/*---------------------------------------------------------------------*/
+/* */
+/* AutoDef_AddEnding () -- Add an ending on to the definition line */
+/* after the last feature. */
+/* */
+/*---------------------------------------------------------------------*/
+
+static void AutoDef_AddEnding (
+ ValNodePtr clause_list,
+ ValNodePtr PNTR strings,
+ BioseqPtr bsp,
+ Int2 mitochloroflag,
+ Boolean alternate_splice_flag
+)
+{
+ Char str [200];
+ ValNodePtr last_string;
+ Int4 new_data_len;
+ CharPtr new_data;
+
+ str[0] = 0;
+ AddProductEnding (str, bsp, mitochloroflag, *strings);
+ if (alternate_splice_flag) {
+ StringCat (str, ", alternatively spliced");
+ }
+
+ StringCat (str, ".");
+
+ last_string = *strings;
+ if (last_string == NULL)
+ {
+ ValNodeAddStr (strings, 0, StringSave ( str));
+ }
+ else
+ {
+ while (last_string->next != NULL) last_string = last_string->next;
+ new_data_len = StringLen (last_string->data.ptrvalue) + StringLen (str) + 1;
+ new_data = (CharPtr) MemNew (new_data_len);
+ if (new_data == NULL) return;
+ StringCpy (new_data, last_string->data.ptrvalue);
+ StringCat (new_data, str);
+ MemFree (last_string->data.ptrvalue);
+ last_string->data.ptrvalue = new_data;
+ }
+}
+
+static Boolean LastIntervalChangeBeforeEnd (
+ FeatureClausePtr onebefore,
+ FeatureClausePtr thisclause,
+ ValNodePtr rest_of_list
+)
+{
+ ValNodePtr vnp;
+ FeatureClausePtr fcp;
+
+ if (onebefore == NULL || rest_of_list == NULL) return FALSE;
+
+ if (StringCmp (onebefore->interval, thisclause->interval) == 0) return FALSE;
+
+ for (vnp = rest_of_list; vnp != NULL; vnp = vnp->next)
+ {
+ if (vnp->choice == DEFLINE_CLAUSEPLUS && vnp->data.ptrvalue != NULL)
+ {
+ fcp = vnp->data.ptrvalue;
+ if (StringCmp (thisclause->interval, fcp->interval) != 0) return FALSE;
+ }
+ }
+ return TRUE;
+
+}
+
+static void PluralizeClauseIntervals (
+ FeatureClausePtr fcp
+)
+{
+ CharPtr new_interval, cp;
+
+ if (fcp->interval != NULL
+ && (cp = StringStr (fcp->interval, "gene, ")) != NULL)
+ {
+ new_interval = MemNew (StringLen (fcp->interval) + 2);
+ if (new_interval == NULL) return;
+ StringCpy (new_interval, fcp->interval);
+ new_interval [ cp - fcp->interval + 4] = 's';
+ StringCpy (new_interval + (cp - fcp->interval) + 5,
+ cp + 4);
+ MemFree (fcp->interval);
+ fcp->interval = new_interval;
+ }
+}
+
+static Boolean DisplayAlleleName (FeatureClausePtr thisclause)
+{
+ if (thisclause == NULL) return FALSE;
+ if (StringCmp (thisclause->feature_label_data.typeword, "gene") == 0
+ || StringCmp (thisclause->feature_label_data.typeword, "pseudogene") == 0
+ || StringCmp (thisclause->feature_label_data.typeword, "mRNA") == 0
+ || StringCmp (thisclause->feature_label_data.typeword, "pseudogene mRNA") == 0
+ || StringCmp (thisclause->feature_label_data.typeword, "precursor RNA") == 0
+ || StringCmp (thisclause->feature_label_data.typeword, "pseudogene precursor RNA") == 0)
+ {
+ return TRUE;
+ }
+ return FALSE;
+}
+
+static void ListClauses (
+ ValNodePtr clauselist,
+ ValNodePtr PNTR strings,
+ Boolean allow_semicolons,
+ Boolean suppress_final_and
+)
+{
+ FeatureClausePtr thisclause, onebefore, twobefore, oneafter, twoafter;
+ Boolean print_typeword;
+ Boolean print_and;
+ Boolean print_comma;
+ Boolean print_semicolon;
+ Boolean print_comma_between_description_and_typeword;
+ Boolean typeword_is_plural;
+ size_t clause_len;
+ CharPtr clause_string;
+ Boolean oneafter_has_detail_change;
+ Boolean oneafter_has_interval_change;
+ Boolean oneafter_has_typeword_change;
+ Boolean onebefore_has_detail_change;
+ Boolean onebefore_has_interval_change;
+ Boolean onebefore_has_typeword_change;
+ SeqFeatPtr main_feat;
+ CharPtr new_interval;
+ ValNodePtr voneafter, vtwoafter;
+
+ while (clauselist != NULL && clauselist->choice != DEFLINE_CLAUSEPLUS)
+ {
+ clauselist = clauselist->next;
+ }
+ if (clauselist == NULL) return;
+
+ thisclause = clauselist->data.ptrvalue;
+ onebefore = NULL;
+ twobefore = NULL;
+
+ while (thisclause != NULL)
+ {
+ oneafter_has_detail_change = FALSE;
+ oneafter_has_interval_change = FALSE;
+ oneafter_has_typeword_change = FALSE;
+ onebefore_has_detail_change = FALSE;
+ onebefore_has_interval_change = FALSE;
+ onebefore_has_typeword_change = FALSE;
+ if (onebefore != NULL)
+ {
+ if (StringCmp (onebefore->interval, thisclause->interval) != 0)
+ onebefore_has_interval_change = TRUE;
+ if (StringCmp (onebefore->feature_label_data.typeword,
+ thisclause->feature_label_data.typeword) != 0)
+ {
+ onebefore_has_typeword_change = TRUE;
+ }
+ if (onebefore_has_typeword_change || onebefore_has_interval_change
+ || (DisplayAlleleName (onebefore) && StringLen (onebefore->allelename) != 0)
+ || (DisplayAlleleName (thisclause) && StringLen (thisclause->allelename) != 0))
+ {
+ onebefore_has_detail_change = TRUE;
+ }
+ }
+ voneafter = clauselist->next;
+ while (voneafter != NULL && voneafter->choice != DEFLINE_CLAUSEPLUS)
+ {
+ voneafter = voneafter->next;
+ }
+ if (voneafter == NULL)
+ {
+ vtwoafter = NULL;
+ }
+ else
+ {
+ vtwoafter = voneafter->next;
+ while (vtwoafter != NULL && vtwoafter->choice != DEFLINE_CLAUSEPLUS)
+ {
+ vtwoafter = vtwoafter->next;
+ }
+ }
+
+ if (voneafter != NULL)
+ {
+ oneafter = voneafter->data.ptrvalue;
+ if (StringCmp (oneafter->interval, thisclause->interval) != 0)
+ oneafter_has_interval_change = TRUE;
+ if (StringCmp (oneafter->feature_label_data.typeword,
+ thisclause->feature_label_data.typeword) != 0)
+ {
+ oneafter_has_typeword_change = TRUE;
+ }
+ if (oneafter_has_typeword_change || oneafter_has_interval_change
+ || (DisplayAlleleName (thisclause) && StringLen (thisclause->allelename) != 0)
+ || (DisplayAlleleName (oneafter) && StringLen (oneafter->allelename) != 0))
+ {
+ oneafter_has_detail_change = TRUE;
+ }
+ if (vtwoafter != NULL)
+ {
+ twoafter = vtwoafter->data.ptrvalue;
+ }
+ else
+ {
+ twoafter = NULL;
+ }
+ }
+ else
+ {
+ oneafter = NULL;
+ twoafter = NULL;
+ }
+ print_typeword = FALSE;
+ typeword_is_plural = FALSE;
+ print_and = FALSE;
+ print_comma = FALSE;
+ print_semicolon = FALSE;
+
+ if (thisclause->feature_label_data.is_typeword_first)
+ {
+ if (onebefore == NULL || onebefore_has_detail_change)
+ {
+ print_typeword = TRUE;
+ if (oneafter != NULL && ! oneafter_has_detail_change)
+ {
+ typeword_is_plural = TRUE;
+ }
+ else if (StringStr (thisclause->feature_label_data.description, " through ") != NULL
+ && StringCmp (thisclause->feature_label_data.typeword, "exon") == 0)
+ {
+ typeword_is_plural = TRUE;
+ }
+ }
+ }
+ else
+ {
+ if (oneafter == NULL || oneafter_has_detail_change)
+ {
+ print_typeword = TRUE;
+ if (onebefore != NULL && ! onebefore_has_detail_change)
+ {
+ typeword_is_plural = TRUE;
+ }
+ }
+ }
+
+ /* when to print and before this section */
+ if ( onebefore != NULL
+ && ! onebefore_has_detail_change
+ && (oneafter == NULL || oneafter_has_detail_change))
+ {
+ print_and = TRUE;
+ }
+ else if (oneafter == NULL && onebefore != NULL)
+ {
+ print_and = TRUE;
+ }
+ else if (onebefore != NULL
+ && ! onebefore_has_interval_change
+ && oneafter_has_interval_change)
+ {
+ print_and = TRUE;
+ }
+ else if ( LastIntervalChangeBeforeEnd ( onebefore,
+ thisclause,
+ clauselist->next))
+ {
+ print_and = TRUE;
+ }
+
+ if (suppress_final_and && oneafter == NULL)
+ {
+ print_and = FALSE;
+ }
+ if (suppress_final_and && oneafter != NULL && twoafter == NULL)
+ {
+ print_comma = TRUE;
+ }
+
+ /* when to print semicolon after this section */
+ /* after every interval change except when exons change "interval" */
+ /* exons changing interval are going from alt-spliced to not */
+ /* or vice versa, in either case we don't want a semicolon or comma */
+ if (oneafter != NULL && oneafter_has_interval_change
+ && (StringCmp (thisclause->feature_label_data.typeword, "exon") != 0
+ || StringCmp (oneafter->feature_label_data.typeword, "exon") != 0))
+ {
+ print_semicolon = TRUE;
+ }
+
+ /* when to print comma after this section */
+ if (onebefore != NULL && oneafter != NULL
+ && ! onebefore_has_detail_change
+ && ! oneafter_has_detail_change )
+ {
+ print_comma = TRUE;
+ }
+ else if (oneafter != NULL && onebefore != NULL
+ && ! onebefore_has_interval_change && ! oneafter_has_interval_change
+ && onebefore_has_typeword_change && oneafter_has_typeword_change)
+ {
+ print_comma = TRUE;
+ }
+ else if (oneafter != NULL && twoafter != NULL
+ && ! oneafter_has_detail_change
+ && StringCmp (twoafter->feature_label_data.typeword,
+ thisclause->feature_label_data.typeword) == 0
+ && StringCmp (twoafter->interval,
+ thisclause->interval) == 0)
+ {
+ print_comma = TRUE;
+ }
+ else if (oneafter != NULL && twoafter != NULL
+ && oneafter_has_typeword_change
+ && StringCmp (twoafter->feature_label_data.typeword,
+ oneafter->feature_label_data.typeword) == 0
+ && StringCmp (twoafter->interval,
+ oneafter->interval) == 0
+ && ! print_and)
+ {
+ print_comma = TRUE;
+ }
+ else if (((oneafter_has_interval_change || oneafter == NULL)
+ && StringDoesHaveText (thisclause->interval))
+ || (oneafter_has_interval_change && oneafter != NULL && ! print_semicolon))
+ {
+ print_comma = TRUE;
+ }
+ else if (oneafter != NULL && twoafter != NULL
+ && !oneafter_has_interval_change
+ && StringCmp (thisclause->interval, twoafter->interval) == 0
+ && oneafter_has_typeword_change
+ && StringCmp (thisclause->feature_label_data.typeword,
+ twoafter->feature_label_data.typeword) != 0)
+ {
+ print_comma = TRUE;
+ }
+ else if (oneafter != NULL && onebefore != NULL && twoafter != NULL
+ && ! oneafter_has_interval_change && ! onebefore_has_interval_change
+ && StringCmp (thisclause->interval, twoafter->interval) == 0
+ && oneafter_has_typeword_change)
+ {
+ print_comma = TRUE;
+ }
+ else if (oneafter != NULL && twoafter != NULL
+ && oneafter_has_typeword_change
+ && StringCmp (oneafter->feature_label_data.typeword,
+ twoafter->feature_label_data.typeword) != 0
+ && ! oneafter_has_interval_change
+ && StringCmp (oneafter->interval, twoafter->interval) == 0)
+ {
+ /* spacer 1, foo RNA gene, and spacer2, complete sequence */
+ /* ^ */
+ print_comma = TRUE;
+ }
+ else if (oneafter != NULL && twoafter != NULL
+ && ! oneafter_has_interval_change && StringCmp (thisclause->interval, twoafter->interval) == 0
+ && ((DisplayAlleleName (oneafter) && StringLen (oneafter->allelename) > 0)
+ || (DisplayAlleleName (thisclause) && StringLen (thisclause->allelename) > 0)))
+ {
+ print_comma = TRUE;
+ }
+ else if (oneafter != NULL && onebefore != NULL
+ && ! oneafter_has_interval_change && ! onebefore_has_interval_change
+ && ((DisplayAlleleName (oneafter) && StringLen (oneafter->allelename) > 0)
+ || (DisplayAlleleName (thisclause) && StringLen (thisclause->allelename) > 0)))
+ {
+ print_comma = TRUE;
+ }
+
+ if (thisclause->featlist != NULL
+ && thisclause->featlist->data.ptrvalue != NULL
+ && StringDoesHaveText (thisclause->interval)
+ && StringNCmp (thisclause->interval, "partial", 7) != 0
+ && StringNCmp (thisclause->interval, "complete", 8) != 0)
+ {
+ main_feat = thisclause->featlist->data.ptrvalue;
+ if (IsMobileElement (main_feat)
+ || IsEndogenousVirusSourceFeature (main_feat) )
+ {
+ print_comma = FALSE;
+ }
+ }
+
+ if (onebefore != NULL
+ && ! onebefore_has_interval_change
+ && (oneafter_has_interval_change || oneafter == NULL))
+ {
+ PluralizeClauseIntervals (thisclause);
+ }
+
+ if ( thisclause->make_plural )
+ {
+ if ((onebefore != NULL && ! onebefore_has_detail_change)
+ || (oneafter != NULL && !oneafter_has_detail_change))
+ {
+ PluralizeConsolidatedClauseDescription (thisclause);
+ }
+ else
+ {
+ typeword_is_plural = TRUE;
+ }
+ }
+
+ clause_len = StringLen (thisclause->feature_label_data.description) + 1;
+
+ /* add one in case we need to add the semicolon to this clause (when
+ * the interval has changed because this clause has no interval and
+ * the next one does).
+ */
+ clause_len++;
+
+ /* we need to place a comma between the description and the type word
+ * when the description ends with "precursor" or when the type word
+ * starts with "precursor"
+ */
+ if ( thisclause->feature_label_data.description != NULL
+ && ! thisclause->feature_label_data.is_typeword_first
+ && print_typeword
+ && ! StringHasNoText (thisclause->feature_label_data.typeword)
+ && ((StringNCmp (thisclause->feature_label_data.typeword, "precursor", 9) == 0
+ && thisclause->feature_label_data.description [StringLen (thisclause->feature_label_data.description) - 1] != ')')
+ || (clause_len > StringLen ("precursor")
+ && StringCmp ( thisclause->feature_label_data.description
+ + clause_len - StringLen ("precursor") - 2,
+ "precursor") == 0)))
+ {
+ print_comma_between_description_and_typeword = TRUE;
+ clause_len += 1;
+ }
+ else
+ {
+ print_comma_between_description_and_typeword = FALSE;
+ }
+
+ if (print_typeword)
+ clause_len += StringLen (thisclause->feature_label_data.typeword) + 1;
+ if (typeword_is_plural)
+ clause_len += 1;
+ if (print_and)
+ clause_len += 4;
+ if (print_comma)
+ clause_len += 2;
+ if (DisplayAlleleName (thisclause))
+ {
+ clause_len += StringLen (thisclause->allelename) + 10;
+ if (StringLen (thisclause->allelename) > 0)
+ {
+ clause_len += StringLen (thisclause->allelename) + StringLen ("allele ");
+ }
+ }
+
+ clause_string = (CharPtr) MemNew (clause_len);
+ if (clause_string == NULL)
+ return;
+ clause_string[0] = 0;
+ if (print_and)
+ StringCat (clause_string, "and ");
+ if (thisclause->feature_label_data.is_typeword_first && print_typeword
+ && thisclause->feature_label_data.typeword != NULL
+ && ! StringHasNoText (thisclause->feature_label_data.typeword))
+ {
+ StringCat (clause_string, thisclause->feature_label_data.typeword);
+ if (typeword_is_plural)
+ StringCat (clause_string, "s");
+ if (thisclause->feature_label_data.description != NULL)
+ StringCat (clause_string, " ");
+ }
+ if (thisclause->feature_label_data.description != NULL)
+ {
+ StringCat (clause_string, thisclause->feature_label_data.description);
+ if (print_comma_between_description_and_typeword)
+ {
+ StringCat (clause_string, ",");
+ }
+ }
+ if (! thisclause->feature_label_data.is_typeword_first && print_typeword
+ && thisclause->feature_label_data.typeword != NULL
+ && ! StringHasNoText (thisclause->feature_label_data.typeword))
+ {
+ if (thisclause->feature_label_data.description != NULL)
+ StringCat (clause_string, " ");
+ StringCat (clause_string, thisclause->feature_label_data.typeword);
+ if (typeword_is_plural)
+ StringCat (clause_string, "s");
+ if (DisplayAlleleName (thisclause)
+ && thisclause->allelename != NULL)
+ {
+ StringCat (clause_string, ", ");
+ StringCat (clause_string, thisclause->allelename);
+ StringCat (clause_string, " allele");
+ }
+ }
+ if (StringLen (clause_string) > 0 )
+ {
+ if (print_comma)
+ StringCat (clause_string, ",");
+ ValNodeAddStr (strings, 0, clause_string);
+ }
+ else
+ {
+ MemFree (clause_string);
+ clause_string = NULL;
+ }
+
+ if (oneafter == NULL || oneafter_has_interval_change)
+ {
+ if (print_semicolon) {
+ if (thisclause->interval == NULL
+ || StringHasNoText(thisclause->interval)) {
+ if (clause_string != NULL) {
+ StringCat (clause_string, ";");
+ }
+ } else if (thisclause->interval[StringLen (thisclause->interval)] != ';') {
+ new_interval = MemNew (StringLen (thisclause->interval) + 2);
+ if (new_interval == NULL) return;
+ StringCpy (new_interval, thisclause->interval);
+ if (allow_semicolons)
+ {
+ StringCat (new_interval, ";");
+ }
+ else
+ {
+ StringCat (new_interval, ",");
+ }
+ MemFree (thisclause->interval);
+ thisclause->interval = new_interval;
+ }
+ }
+ if (thisclause->interval != NULL
+ && !StringHasNoText (thisclause->interval))
+ {
+ ValNodeAddStr (strings, 0, StringSave (thisclause->interval));
+ }
+ }
+ twobefore = onebefore;
+ onebefore = thisclause;
+ thisclause = oneafter;
+ clauselist = voneafter;
+ }
+}
+
+static Uint1 GetMoleculeType
+(BioseqPtr bsp,
+ Uint2 entityID)
+{
+ SeqDescPtr sdp;
+ MolInfoPtr mip;
+ SeqMgrDescContext dcontext;
+
+ if (bsp == NULL) return MOLECULE_TYPE_GENOMIC;
+ sdp = SeqMgrGetNextDescriptor (bsp, NULL, Seq_descr_molinfo, &dcontext);
+ if (sdp == NULL) return MOLECULE_TYPE_GENOMIC;
+ mip = (MolInfoPtr) sdp->data.ptrvalue;
+ if (mip == NULL) return MOLECULE_TYPE_GENOMIC;
+ return mip->biomol;
+}
+
+static Boolean SpecialHandlingForSpecialTechniques (
+ BioseqPtr bsp
+)
+{
+ SeqDescPtr sdp;
+ MolInfoPtr mip;
+ ValNodePtr vnp;
+
+ if (bsp == NULL) return MOLECULE_TYPE_GENOMIC;
+ sdp = SeqMgrGetNextDescriptor (bsp, NULL, Seq_descr_molinfo, NULL);
+ if (sdp == NULL)
+ {
+ for (sdp = bsp->descr;
+ sdp != NULL && sdp->choice != Seq_descr_molinfo;
+ sdp = sdp->next)
+ {}
+ }
+ if (sdp == NULL) return FALSE;
+ mip = (MolInfoPtr) sdp->data.ptrvalue;
+ if (mip == NULL) return FALSE;
+ if (mip->tech == MI_TECH_htgs_0 ||
+ mip->tech == MI_TECH_htgs_1 ||
+ mip->tech == MI_TECH_htgs_2 ||
+ mip->tech == MI_TECH_est ||
+ mip->tech == MI_TECH_sts ||
+ mip->tech == MI_TECH_survey ||
+ mip->tech == MI_TECH_wgs) {
+ vnp = ValNodeExtract (&(bsp->descr), Seq_descr_title);
+ if (vnp != NULL)
+ vnp = ValNodeFreeData (vnp);
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
+static Boolean LIBCALLBACK ShouldRemoveExon (
+ SeqFeatPtr sfp,
+ FeatureClausePtr parent_fcp,
+ FeatureClausePtr this_fcp,
+ BioseqPtr bsp,
+ Boolean isLonely,
+ Boolean isRequested,
+ Boolean isSegment,
+ DeflineFeatureRequestListPtr rp
+)
+{
+ Boolean partial3, partial5;
+ SeqFeatPtr main_feat;
+
+ if (isSegment || isLonely || isRequested) return FALSE;
+ if (parent_fcp == NULL
+ || parent_fcp->featlist == NULL
+ || parent_fcp->featlist->data.ptrvalue == NULL)
+ {
+ return TRUE;
+ }
+
+ main_feat = parent_fcp->featlist->data.ptrvalue;
+ if ( IsCDS (main_feat))
+ {
+ CheckSeqLocForPartial (main_feat->location, &partial5, &partial3);
+ if (partial5 || partial3) return FALSE;
+ }
+ else if (IsmRNA (main_feat) || parent_fcp->has_mrna)
+ {
+ return FALSE;
+ }
+ return TRUE;
+}
+
+static Boolean LIBCALLBACK ShouldRemoveCDS (
+ SeqFeatPtr sfp,
+ FeatureClausePtr parent_fcp,
+ FeatureClausePtr this_fcp,
+ BioseqPtr bsp,
+ Boolean isLonely,
+ Boolean isRequested,
+ Boolean isSegment,
+ DeflineFeatureRequestListPtr rp)
+{
+ CharPtr description;
+ Boolean retval = FALSE;
+
+ description = GetGeneProtDescription (this_fcp, bsp, rp);
+ if (StringHasNoText (description))
+ {
+ retval = TRUE;
+ }
+ if (description != NULL) MemFree (description);
+ return retval;
+}
+
+static Boolean LIBCALLBACK ShouldRemoveNoncodingProductFeat (
+ SeqFeatPtr sfp,
+ FeatureClausePtr parent_fcp,
+ FeatureClausePtr this_fcp,
+ BioseqPtr bsp, Boolean isLonely,
+ Boolean isRequested,
+ Boolean isSegment,
+ DeflineFeatureRequestListPtr rp
+)
+{
+ if (isRequested) return FALSE;
+ return TRUE;
+}
+
+static Boolean LIBCALLBACK ShouldRemovePromoter (
+ SeqFeatPtr sfp,
+ FeatureClausePtr parent_fcp,
+ FeatureClausePtr this_fcp,
+ BioseqPtr bsp, Boolean isLonely,
+ Boolean isRequested,
+ Boolean isSegment,
+ DeflineFeatureRequestListPtr rp
+)
+{
+ /* remove a promoter if it is in an mRNA or gene clause */
+ if (isRequested)
+ {
+ return FALSE;
+ }
+ else if (parent_fcp != NULL
+ && (parent_fcp->has_mrna
+ || (parent_fcp->featlist != NULL
+ && parent_fcp->featlist->choice == DEFLINE_FEATLIST
+ && parent_fcp->featlist->data.ptrvalue != NULL
+ && IsmRNA (parent_fcp->featlist->data.ptrvalue))))
+ {
+ return TRUE;
+ }
+ else if (isLonely)
+ {
+ return FALSE;
+ }
+ else
+ {
+ return TRUE;
+ }
+}
+
+static Boolean LIBCALLBACK ShouldRemoveLTR (
+ SeqFeatPtr sfp,
+ FeatureClausePtr parent_fcp,
+ FeatureClausePtr this_fcp,
+ BioseqPtr bsp,
+ Boolean isLonely,
+ Boolean isRequested,
+ Boolean isSegment,
+ DeflineFeatureRequestListPtr rp
+)
+{
+ if (isRequested)
+ {
+ return FALSE;
+ }
+ else if (parent_fcp != NULL)
+ {
+ return TRUE;
+ }
+ else if (isLonely)
+ return FALSE;
+ else
+ return TRUE;
+}
+
+static Boolean LIBCALLBACK ShouldRemove3UTR (
+ SeqFeatPtr sfp,
+ FeatureClausePtr parent_fcp,
+ FeatureClausePtr this_fcp,
+ BioseqPtr bsp,
+ Boolean isLonely,
+ Boolean isRequested,
+ Boolean isSegment,
+ DeflineFeatureRequestListPtr rp
+)
+{
+ if (isLonely || isRequested)
+ return FALSE;
+ else
+ return TRUE;
+}
+
+static Boolean LIBCALLBACK ShouldRemove5UTR (
+ SeqFeatPtr sfp,
+ FeatureClausePtr parent_fcp,
+ FeatureClausePtr this_fcp,
+ BioseqPtr bsp,
+ Boolean isLonely,
+ Boolean isRequested,
+ Boolean isSegment,
+ DeflineFeatureRequestListPtr rp
+)
+{
+ if (isLonely || isRequested)
+ return FALSE;
+ else
+ return TRUE;
+}
+
+static Boolean LIBCALLBACK ShouldRemoveIntron (
+ SeqFeatPtr sfp,
+ FeatureClausePtr parent_fcp,
+ FeatureClausePtr this_fcp,
+ BioseqPtr bsp, Boolean isLonely,
+ Boolean isRequested,
+ Boolean isSegment,
+ DeflineFeatureRequestListPtr rp
+)
+{
+ if (isRequested)
+ {
+ return FALSE;
+ }
+ else if (parent_fcp != NULL
+ && (parent_fcp->has_mrna
+ || (parent_fcp->featlist != NULL
+ && parent_fcp->featlist->choice == DEFLINE_FEATLIST
+ && parent_fcp->featlist->data.ptrvalue != NULL
+ && IsmRNA (parent_fcp->featlist->data.ptrvalue))))
+ {
+ return TRUE;
+ }
+ else if (isLonely)
+ {
+ return FALSE;
+ }
+ else
+ {
+ return TRUE;
+ }
+}
+
+static Boolean LIBCALLBACK ShouldRemoveMobileElement
+( SeqFeatPtr sfp,
+ FeatureClausePtr parent_fcp,
+ FeatureClausePtr this_fcp,
+ BioseqPtr bsp,
+ Boolean isLonely,
+ Boolean isRequested,
+ Boolean isSegment,
+ DeflineFeatureRequestListPtr rp)
+{
+ return (!isLonely && !isRequested);
+}
+
+static Boolean LIBCALLBACK ShouldRemoveGeneric
+( SeqFeatPtr sfp,
+ FeatureClausePtr parent_fcp,
+ FeatureClausePtr this_fcp,
+ BioseqPtr bsp,
+ Boolean isLonely,
+ Boolean isRequested,
+ Boolean isSegment,
+ DeflineFeatureRequestListPtr rp)
+{
+ CharPtr productname;
+ Boolean rval;
+
+ rval = FALSE;
+ if (IsMiscRNA (sfp) && ( productname = GetProductName (sfp, bsp, rp)) != NULL)
+ {
+ if (StringStr (productname, "trans-spliced leader") != NULL)
+ {
+ rval = TRUE;
+ }
+ MemFree (productname);
+ }
+
+ return rval;
+}
+
+
+static Boolean IsBioseqPrecursorRNA (BioseqPtr bsp)
+{
+ SeqDescrPtr sdp;
+ SeqMgrDescContext context;
+ MolInfoPtr mol;
+
+ if (bsp == NULL) return FALSE;
+
+ sdp = SeqMgrGetNextDescriptor (bsp, NULL, Seq_descr_molinfo, &context);
+ if (sdp != NULL && sdp->data.ptrvalue != NULL)
+ {
+ mol = (MolInfoPtr) sdp->data.ptrvalue;
+ if (mol->biomol == 2)
+ {
+ return TRUE;
+ }
+ }
+ return FALSE;
+}
+
+static Boolean LIBCALLBACK ShouldRemovePrecursorRNA
+( SeqFeatPtr sfp,
+ FeatureClausePtr parent_fcp,
+ FeatureClausePtr this_fcp,
+ BioseqPtr bsp,
+ Boolean isLonely,
+ Boolean isRequested,
+ Boolean isSegment,
+ DeflineFeatureRequestListPtr rp)
+{
+ if (!isLonely && IsBioseqPrecursorRNA(bsp))
+ {
+ return TRUE;
+ }
+ else
+ {
+ return ShouldRemoveGeneric (sfp, parent_fcp, this_fcp, bsp, isLonely,
+ isRequested, isSegment, rp);
+ }
+}
+
+
+typedef struct removableitemglobal {
+ matchFunction itemmatch;
+ ShouldRemoveFunction ShouldRemove;
+ CharPtr group_name;
+} RemovableItemGlobalData, PNTR RemovableItemGlobalPtr;
+
+typedef struct removableitemlocal {
+/* ButtoN keep_request; */
+ Boolean keep;
+} RemovableItemLocalData, PNTR RemovableItemLocalPtr;
+
+static RemovableItemGlobalData remove_items[] = {
+ { IsExon, ShouldRemoveExon, "Exons" },
+ { IsIntron, ShouldRemoveIntron, "Introns" },
+ { Is5UTR, ShouldRemove5UTR, "5' UTRs" },
+ { Is3UTR, ShouldRemove3UTR, "3' UTRs" },
+ { IsCDS, ShouldRemoveCDS, "CDSs" },
+ { IsPromoter, ShouldRemovePromoter, "Promoters:" },
+ { IsLTR, ShouldRemoveLTR, "LTRs" },
+ { IsNoncodingProductFeat, ShouldRemoveNoncodingProductFeat, "Misc feats with comments:" },
+ { IsRemovableMobileElement, ShouldRemoveMobileElement, "Optional Mobile Element" },
+ { IsPrecursorRNA, ShouldRemovePrecursorRNA, "Precursor RNAs" }
+};
+
+
+NLM_EXTERN CharPtr GetRemovableItemName (Int4 i)
+{
+ if (i < 0 || i >= NumRemovableItems) {
+ return NULL;
+ } else {
+ return remove_items[i].group_name;
+ }
+}
+
+NLM_EXTERN void InitFeatureRequests (
+ DeflineFeatureRequestListPtr feature_requests
+)
+{
+ Int4 i;
+ for (i=0; i < NumRemovableItems; i++)
+ {
+ feature_requests->keep_items[i] = FALSE;
+ }
+ feature_requests->add_fake_promoters = TRUE;
+ feature_requests->suppress_alt_splice_phrase = FALSE;
+ feature_requests->remove_subfeatures = FALSE;
+ feature_requests->feature_list_type = DEFLINE_USE_FEATURES;
+ feature_requests->misc_feat_parse_rule = 2;
+ feature_requests->suppress_locus_tags = FALSE;
+ feature_requests->suppressed_feature_list = NULL;
+ feature_requests->use_ncrna_note = FALSE;
+}
+
+static Boolean RemoveCondition (
+ SeqFeatPtr sfp,
+ FeatureClausePtr parent_fcp,
+ FeatureClausePtr this_fcp,
+ BioseqPtr bsp,
+ Boolean isLonely,
+ Boolean isSegment,
+ DeflineFeatureRequestList *feature_requests
+)
+{
+ Int4 i;
+ if (sfp == NULL) return TRUE;
+ for (i=0; i < NumRemovableItems; i++)
+ {
+ if (remove_items[i].itemmatch (sfp))
+ return remove_items[i].ShouldRemove (sfp, parent_fcp, this_fcp, bsp,
+ isLonely, feature_requests->keep_items[i],
+ isSegment,
+ feature_requests);
+ }
+ return ShouldRemoveGeneric(sfp, parent_fcp, this_fcp, bsp, isLonely, FALSE,
+ isSegment, feature_requests);
+}
+
+static Boolean FindOtherGeneClause
+( ValNodePtr feature_list,
+ ValNodePtr me,
+ GeneRefPtr grp,
+ Boolean suppress_locus_tag)
+{
+ ValNodePtr vnp;
+ FeatureClausePtr fcp;
+
+ if (grp == NULL) return FALSE;
+
+ for (vnp = feature_list; vnp != NULL; vnp = vnp->next)
+ {
+ if (vnp == me) continue;
+ if (vnp->choice == DEFLINE_CLAUSEPLUS && vnp->data.ptrvalue != NULL)
+ {
+ fcp = vnp->data.ptrvalue;
+ if (fcp->delete_me) continue;
+ if ( fcp->grp == grp
+ || (fcp->grp != NULL && DoGenesMatch (fcp->grp, grp, suppress_locus_tag)))
+ {
+ return TRUE;
+ }
+ if ( FindOtherGeneClause (fcp->featlist, me, grp, suppress_locus_tag))
+ {
+ return TRUE;
+ }
+ }
+ }
+ return FALSE;
+}
+
+static void RemoveGenesMentionedElsewhere
+( ValNodePtr PNTR feature_list,
+ ValNodePtr search_list,
+ Boolean delete_now,
+ Boolean suppress_locus_tag)
+{
+ ValNodePtr vnp;
+ FeatureClausePtr fcp;
+
+ for (vnp = *feature_list; vnp != NULL; vnp = vnp->next)
+ {
+ if (vnp->choice == DEFLINE_CLAUSEPLUS && vnp->data.ptrvalue != NULL)
+ {
+ fcp = vnp->data.ptrvalue;
+ if (fcp->featlist == NULL)
+ {
+ continue;
+ }
+ if ( IsGene (fcp->featlist->data.ptrvalue)
+ && fcp->featlist->next == NULL
+ && FindOtherGeneClause ( search_list, vnp, fcp->grp, suppress_locus_tag))
+ {
+ fcp->delete_me = TRUE;
+ }
+ else
+ {
+ RemoveGenesMentionedElsewhere ( &(fcp->featlist), search_list, FALSE, suppress_locus_tag);
+ }
+ }
+ }
+ if (delete_now)
+ {
+ DeleteFeatureClauses (feature_list);
+ }
+}
+
+static void MarkUnwantedFeatureClauseForRemoval (
+ ValNodePtr clause,
+ BioseqPtr bsp,
+ Boolean isLonely,
+ FeatureClausePtr parent_fcp,
+ Boolean isSegment,
+ DeflineFeatureRequestList PNTR feature_requests
+)
+{
+ FeatureClausePtr fcp;
+ ValNodePtr featlist;
+ ValNodePtr firstfeat;
+ Int4 clause_count;
+ SeqFeatPtr sfp;
+
+ if (clause == NULL
+ || clause->choice != DEFLINE_CLAUSEPLUS
+ || clause->data.ptrvalue == NULL)
+ {
+ return;
+ }
+
+ fcp = clause->data.ptrvalue;
+ firstfeat = fcp->featlist;
+ clause_count = 0;
+ for (featlist = firstfeat;
+ featlist != NULL && isLonely;
+ featlist = featlist->next)
+ {
+ if (featlist->choice == DEFLINE_CLAUSEPLUS)
+ {
+ clause_count ++;
+ if (clause_count > 1)
+ {
+ isLonely = FALSE;
+ }
+ }
+ }
+
+ featlist = firstfeat;
+ while (featlist != NULL)
+ {
+ if (featlist->choice == DEFLINE_FEATLIST
+ && featlist->data.ptrvalue != NULL)
+ {
+ sfp = (SeqFeatPtr) featlist->data.ptrvalue;
+ if (RemoveCondition (featlist->data.ptrvalue, parent_fcp, fcp, bsp,
+ isLonely, isSegment, feature_requests))
+ {
+ fcp->delete_me = TRUE;
+ }
+ else if (! IsGene (sfp) && ! IsmRNA (sfp))
+ {
+ isLonely = FALSE;
+ }
+ }
+ else if (featlist->choice == DEFLINE_CLAUSEPLUS
+ && featlist->data.ptrvalue != NULL)
+ {
+ MarkUnwantedFeatureClauseForRemoval (featlist, bsp, isLonely, fcp,
+ isSegment,
+ feature_requests);
+ }
+ featlist = featlist->next;
+ }
+}
+
+static void RemoveUnwantedFeatures (
+ ValNodePtr PNTR list,
+ BioseqPtr bsp,
+ Boolean isSegment,
+ DeflineFeatureRequestList PNTR feature_requests
+)
+{
+ ValNodePtr vnp;
+ Boolean isLonely;
+
+ if (list == NULL) return;
+
+ isLonely = TRUE;
+
+ for (vnp = *list; vnp != NULL; vnp = vnp->next)
+ {
+ if (vnp->next != NULL) isLonely = FALSE;
+ if (vnp->choice == DEFLINE_CLAUSEPLUS)
+ {
+ MarkUnwantedFeatureClauseForRemoval (vnp, bsp, isLonely, NULL,
+ isSegment, feature_requests);
+ }
+ }
+ DeleteFeatureClauses (list);
+}
+
+static Boolean IsFeatureInSelectionList (SeqFeatPtr sfp, ValNodePtr feat_list)
+{
+ ValNodePtr vnp;
+
+ if (sfp == NULL || feat_list == NULL)
+ {
+ return FALSE;
+ }
+
+ for (vnp = feat_list; vnp != NULL && sfp->idx.subtype != vnp->choice; vnp = vnp->next)
+ {
+ }
+ if (vnp == NULL)
+ {
+ return FALSE;
+ }
+ else
+ {
+ return TRUE;
+ }
+}
+
+static void MarkSuppressedFeatureClauseForRemoval (
+ ValNodePtr clause,
+ ValNodePtr suppressed_feature_list
+)
+{
+ FeatureClausePtr fcp;
+ ValNodePtr featlist;
+ ValNodePtr firstfeat;
+ SeqFeatPtr sfp;
+
+ if (clause == NULL
+ || clause->choice != DEFLINE_CLAUSEPLUS
+ || clause->data.ptrvalue == NULL)
+ {
+ return;
+ }
+
+ fcp = clause->data.ptrvalue;
+ firstfeat = fcp->featlist;
+
+ featlist = firstfeat;
+ while (featlist != NULL)
+ {
+ if (featlist->choice == DEFLINE_FEATLIST
+ && featlist->data.ptrvalue != NULL)
+ {
+ sfp = (SeqFeatPtr) featlist->data.ptrvalue;
+ if (IsFeatureInSelectionList (sfp, suppressed_feature_list))
+ {
+ fcp->delete_me = TRUE;
+ }
+ }
+ else if (featlist->choice == DEFLINE_CLAUSEPLUS
+ && featlist->data.ptrvalue != NULL)
+ {
+ MarkSuppressedFeatureClauseForRemoval (featlist, suppressed_feature_list);
+ }
+ featlist = featlist->next;
+ }
+}
+
+static void RemoveSuppressedFeatures (ValNodePtr PNTR list,
+ ValNodePtr suppressed_feature_list)
+{
+ ValNodePtr vnp;
+
+ if (list == NULL || *list == NULL || suppressed_feature_list == NULL)
+ {
+ return;
+ }
+
+ for (vnp = *list; vnp != NULL; vnp = vnp->next)
+ {
+ if (vnp->choice == DEFLINE_CLAUSEPLUS)
+ {
+ MarkSuppressedFeatureClauseForRemoval (vnp, suppressed_feature_list);
+ }
+ }
+ DeleteFeatureClauses (list);
+}
+
+static Boolean LIBCALLBACK IsMasterClause (
+ SeqFeatPtr sfp
+)
+{
+ if ( IsMobileElement (sfp)) return TRUE;
+ return FALSE;
+}
+
+static void DeleteSubfeatures (
+ ValNodePtr PNTR feature_list,
+ Boolean delete_now
+)
+{
+ ValNodePtr clause, featlist;
+ FeatureClausePtr clause_fcp, fcp;
+
+ if (feature_list == NULL) return;
+ for (clause = *feature_list; clause != NULL; clause = clause->next)
+ {
+ if (clause->choice != DEFLINE_CLAUSEPLUS
+ || (clause_fcp = clause->data.ptrvalue) == NULL
+ || clause_fcp->featlist == NULL)
+ {
+ continue;
+ }
+ if (clause_fcp->featlist->choice == DEFLINE_FEATLIST
+ && IsMasterClause (clause_fcp->featlist->data.ptrvalue))
+ {
+ for (featlist = clause_fcp->featlist->next;
+ featlist != NULL;
+ featlist = featlist->next)
+ {
+ if (featlist->choice == DEFLINE_CLAUSEPLUS
+ && (fcp = featlist->data.ptrvalue) != NULL)
+ {
+ fcp->delete_me = TRUE;
+ }
+ }
+ }
+ else
+ {
+ DeleteSubfeatures ( &(clause_fcp->featlist), FALSE);
+ }
+ }
+ if (delete_now)
+ {
+ DeleteFeatureClauses (feature_list);
+ }
+}
+
+static void DeleteOperonAndGeneClusterSubfeatures (
+ ValNodePtr PNTR feature_list,
+ Boolean delete_now
+)
+{
+ ValNodePtr clause, featlist;
+ FeatureClausePtr clause_fcp, fcp;
+
+ if (feature_list == NULL) return;
+ for (clause = *feature_list; clause != NULL; clause = clause->next)
+ {
+ if (clause->choice != DEFLINE_CLAUSEPLUS
+ || (clause_fcp = clause->data.ptrvalue) == NULL
+ || clause_fcp->featlist == NULL)
+ {
+ continue;
+ }
+ if (clause_fcp->featlist->choice == DEFLINE_FEATLIST
+ && (IsOperon (clause_fcp->featlist->data.ptrvalue)
+ || IsGeneCluster (clause_fcp->featlist->data.ptrvalue)))
+ {
+ for (featlist = clause_fcp->featlist->next;
+ featlist != NULL;
+ featlist = featlist->next)
+ {
+ if (featlist->choice == DEFLINE_CLAUSEPLUS
+ && (fcp = featlist->data.ptrvalue) != NULL)
+ {
+ fcp->delete_me = TRUE;
+ }
+ }
+ }
+ else
+ {
+ DeleteOperonAndGeneClusterSubfeatures ( &(clause_fcp->featlist), FALSE);
+ }
+ }
+ if (delete_now)
+ {
+ DeleteFeatureClauses (feature_list);
+ }
+}
+
+static void RemoveFeats (
+ ValNodePtr list,
+ matchFunction itemmatch
+)
+{
+ ValNodePtr vnp;
+ FeatureClausePtr fcp;
+
+ if (list == NULL) return;
+
+ for (vnp = list; vnp != NULL; vnp = vnp->next)
+ {
+ if (vnp->choice == DEFLINE_FEATLIST
+ && itemmatch (vnp->data.ptrvalue))
+ {
+ vnp->choice = DEFLINE_REMOVEFEAT;
+ }
+ else if (vnp->choice == DEFLINE_CLAUSEPLUS
+ && (fcp = vnp->data.ptrvalue) != NULL)
+ {
+ RemoveFeats (fcp->featlist, itemmatch);
+ }
+ }
+}
+
+/* A clause is "tall" if it has only one clause at any level */
+static Boolean IsClauseTall (
+ FeatureClausePtr fcp
+)
+{
+ ValNodePtr featlist;
+ Int4 num_clauses;
+ FeatureClausePtr subclause;
+
+ num_clauses = 0;
+ if (fcp == NULL) return FALSE;
+ subclause = NULL;
+ if (fcp->featlist == NULL) return FALSE;
+ for (featlist = fcp->featlist;
+ featlist != NULL;
+ featlist = featlist->next)
+ {
+ if (featlist->choice == DEFLINE_CLAUSEPLUS)
+ {
+ subclause = featlist->data.ptrvalue;
+ if (subclause == NULL || ! IsClauseTall (subclause))
+ {
+ return FALSE;
+ }
+ num_clauses ++;
+ if (num_clauses > 1) return FALSE;
+ }
+ }
+ if (subclause == NULL || ! subclause->feature_label_data.is_typeword_first)
+ {
+ return TRUE;
+ }
+ return FALSE;
+}
+
+static void SmashOneTallClause (
+ FeatureClausePtr fcp
+)
+{
+ FeatureClausePtr subclause;
+ ValNodePtr featlist;
+ ValNodePtr subclause_featlist;
+ ValNodePtr subclause_firstclause;
+ CharPtr new_description;
+ Int4 new_description_len;
+ SeqFeatPtr main_feat;
+
+ if (fcp == NULL || fcp->featlist == NULL) return;
+
+ /* move features up */
+ featlist = fcp->featlist;
+ if (featlist->choice == DEFLINE_FEATLIST)
+ {
+ main_feat = fcp->featlist->data.ptrvalue;
+ }
+ else
+ {
+ main_feat = NULL;
+ }
+
+ while (featlist != NULL && featlist->choice != DEFLINE_CLAUSEPLUS)
+ {
+ featlist = featlist->next;
+ }
+ if (featlist == NULL) return;
+ subclause = featlist->data.ptrvalue;
+ if (subclause == NULL) return;
+
+ /* move subclause feats to top of list */
+ if (subclause->featlist != NULL
+ && subclause->featlist->choice == DEFLINE_FEATLIST)
+ {
+ subclause_featlist = subclause->featlist;
+ while (subclause->featlist != NULL
+ && subclause->featlist->next != NULL
+ && subclause->featlist->next->choice == DEFLINE_FEATLIST)
+ {
+ subclause->featlist = subclause->featlist->next;
+ }
+ if (subclause->featlist != NULL)
+ {
+ subclause_firstclause = subclause->featlist->next;
+ subclause->featlist->next = fcp->featlist;
+ fcp->featlist = subclause->featlist;
+ subclause->featlist = subclause_firstclause;
+ }
+ }
+
+ /* create new description */
+ new_description_len = StringLen (subclause->feature_label_data.description)
+ + StringLen (fcp->feature_label_data.description)
+ + StringLen (fcp->feature_label_data.typeword)
+ + 4;
+ new_description = (CharPtr) MemNew (new_description_len);
+ if (new_description == NULL) return;
+ new_description [0] = 0;
+ if ( fcp->feature_label_data.is_typeword_first)
+ {
+ StringCat (new_description, fcp->feature_label_data.typeword);
+ StringCat (new_description, " ");
+ }
+ StringCat (new_description, fcp->feature_label_data.description);
+ if ( ! fcp->feature_label_data.is_typeword_first)
+ {
+ StringCat (new_description, fcp->feature_label_data.typeword);
+ }
+
+ if ( ! IsMobileElement (main_feat)
+ && ! IsEndogenousVirusSourceFeature (main_feat))
+ {
+ StringCat (new_description, ",");
+ }
+ StringCat (new_description, " ");
+ StringCat (new_description, subclause->feature_label_data.description);
+
+ if (fcp->feature_label_data.description != NULL)
+ {
+ MemFree (fcp->feature_label_data.description);
+ }
+ fcp->feature_label_data.description = new_description;
+
+ /* move interval up */
+ if (fcp->interval != NULL)
+ {
+ MemFree (fcp->interval);
+ }
+ fcp->interval = subclause->interval;
+ subclause->interval = NULL;
+
+ /* move typeword up */
+ fcp->feature_label_data.typeword = subclause->feature_label_data.typeword;
+ fcp->feature_label_data.is_typeword_first =
+ subclause->feature_label_data.is_typeword_first;
+ subclause->feature_label_data.typeword = NULL;
+ subclause->delete_me = TRUE;
+
+}
+
+
+static void SmashTallClauses (
+ ValNodePtr PNTR clause_list,
+ Boolean delete_now
+)
+{
+ ValNodePtr clause;
+ FeatureClausePtr fcp;
+
+ if (clause_list == NULL) return;
+ for (clause = *clause_list; clause != NULL; clause = clause->next)
+ {
+ if (clause->choice != DEFLINE_CLAUSEPLUS || clause->data.ptrvalue == NULL)
+ {
+ continue;
+ }
+ fcp = clause->data.ptrvalue;
+ if ( IsClauseTall (fcp))
+ {
+ SmashOneTallClause (fcp);
+ }
+ else
+ {
+ SmashTallClauses (& (fcp->featlist), FALSE);
+ }
+ }
+ if (delete_now)
+ {
+ DeleteFeatureClauses (clause_list);
+ }
+}
+
+static ValNodePtr RemoveAllButLastCDS (
+ ValNodePtr list,
+ ValNodePtr last_cds
+)
+{
+ ValNodePtr vnp;
+ FeatureClausePtr fcp;
+
+ /* now remove all CDSs except the last one */
+ for (vnp = list; vnp != NULL; vnp = vnp->next)
+ {
+ if (vnp->choice == DEFLINE_FEATLIST
+ && IsCDS (vnp->data.ptrvalue))
+ {
+ if (last_cds != NULL)
+ {
+ last_cds->choice = DEFLINE_REMOVEFEAT;
+ }
+ last_cds = vnp;
+ }
+ else if (vnp->choice == DEFLINE_CLAUSEPLUS
+ && (fcp = vnp->data.ptrvalue) != NULL)
+ {
+ last_cds = RemoveAllButLastCDS (fcp->featlist, last_cds);
+ }
+ }
+ return last_cds;
+}
+
+static Boolean OkToConsolidate (
+ CharPtr last_desc,
+ CharPtr new_desc,
+ Boolean last_partial,
+ Boolean new_partial,
+ FeatureClausePtr last_fcp,
+ FeatureClausePtr fcp
+)
+{
+ if (StringCmp (last_desc, new_desc) != 0) return FALSE;
+ if (new_partial != last_partial) return FALSE;
+ if ( ( fcp->is_alt_spliced && ! last_fcp->is_alt_spliced)
+ || (! fcp->is_alt_spliced && last_fcp->is_alt_spliced))
+ {
+ return FALSE;
+ }
+ if (fcp->featlist == NULL || last_fcp->featlist == NULL) return FALSE;
+ if ( fcp->featlist->choice != DEFLINE_FEATLIST) return FALSE;
+ if ( last_fcp->featlist->choice != DEFLINE_FEATLIST) return FALSE;
+ if ( (IsCDS (fcp->featlist->data.ptrvalue)
+ && ! IsCDS (last_fcp->featlist->data.ptrvalue)
+ && ! IsGene (last_fcp->featlist->data.ptrvalue))
+ || (! IsCDS (fcp->featlist->data.ptrvalue)
+ && ! IsGene (fcp->featlist->data.ptrvalue)
+ && IsCDS (last_fcp->featlist->data.ptrvalue)))
+ {
+ return FALSE;
+ }
+ if ((IsExon (fcp->featlist->data.ptrvalue) && !IsExon(last_fcp->featlist->data.ptrvalue))
+ || (IsExon (last_fcp->featlist->data.ptrvalue) && !IsExon(fcp->featlist->data.ptrvalue))
+ || (IsIntron (fcp->featlist->data.ptrvalue) && !IsIntron(last_fcp->featlist->data.ptrvalue))
+ || (IsIntron (last_fcp->featlist->data.ptrvalue) && !IsIntron(fcp->featlist->data.ptrvalue)))
+ {
+ return FALSE;
+ }
+ return TRUE;
+}
+
+static void RemoveRedundantGeneFeatureFromConsolidatedClause (
+ FeatureClausePtr fcp
+)
+{
+ ValNodePtr featlist, prevfeat, tmpfeat;
+ SeqFeatPtr feat1, feat2;
+
+ prevfeat = NULL;
+ featlist = fcp->featlist;
+ while ( featlist != NULL
+ && featlist->choice == DEFLINE_FEATLIST
+ && featlist->next != NULL
+ && featlist->next->choice == DEFLINE_FEATLIST)
+ {
+ feat1 = featlist->data.ptrvalue;
+ feat2 = featlist->next->data.ptrvalue;
+ if (feat1 == NULL || feat2 == NULL) return;
+ if (IsGene (feat1) && ! IsGene (feat2))
+ {
+ if (prevfeat == NULL)
+ {
+ fcp->featlist = featlist->next;
+ featlist->next = NULL;
+ FreeListElement (featlist);
+ featlist = fcp->featlist->next;
+ }
+ else
+ {
+ prevfeat->next = featlist->next;
+ featlist->next = NULL;
+ FreeListElement (featlist);
+ featlist = prevfeat->next;
+ }
+ }
+ else if ( !IsGene (feat1) && IsGene (feat2))
+ {
+ tmpfeat = featlist->next;
+ featlist->next = tmpfeat->next;
+ tmpfeat->next = NULL;
+ FreeListElement (tmpfeat);
+ }
+ else
+ {
+ featlist = featlist->next;
+ }
+ }
+}
+
+static void PluralizeConsolidatedClauseDescription (
+ FeatureClausePtr fcp
+)
+{
+ CharPtr new_desc;
+
+ /* prevent crash */
+ if (fcp == NULL || fcp->feature_label_data.description == NULL) return;
+
+ /* don't pluralize tRNA names */
+ if (StringNCmp (fcp->feature_label_data.description, "tRNA-", 5) ==0) return;
+
+ new_desc = MemNew (StringLen (fcp->feature_label_data.description) + 2);
+ if (new_desc == NULL) return;
+
+ StringCpy (new_desc, fcp->feature_label_data.description);
+ StringCat (new_desc, "s");
+ MemFree (fcp->feature_label_data.description);
+ fcp->feature_label_data.description = new_desc;
+}
+
+static void ConsolidateClauses (
+ ValNodePtr PNTR list,
+ BioseqPtr bsp,
+ Uint1 biomol,
+ Boolean delete_now,
+ DeflineFeatureRequestListPtr rp)
+{
+ ValNodePtr vnp;
+ FeatureClausePtr fcp;
+ FeatureClausePtr last_cds_fcp;
+ CharPtr last_desc, new_desc;
+ Boolean last_partial, new_partial, partial3, partial5;
+
+ if (list == NULL || *list == NULL) return;
+ last_cds_fcp = NULL;
+ last_desc = NULL;
+ for (vnp = *list; vnp != NULL; vnp = vnp->next)
+ {
+ if (vnp->choice != DEFLINE_CLAUSEPLUS
+ || (fcp = vnp->data.ptrvalue) == NULL
+ || fcp->featlist == NULL
+ || fcp->featlist->choice != DEFLINE_FEATLIST)
+ {
+ continue;
+ }
+
+ ConsolidateClauses (&(fcp->featlist), bsp, biomol, FALSE, rp);
+
+ if (last_cds_fcp == NULL)
+ {
+ last_cds_fcp = fcp;
+ if (fcp->feature_label_data.description == NULL)
+ {
+ last_desc = GetGeneProtDescription (fcp, bsp, rp);
+ }
+ else
+ {
+ last_desc = StringSave (fcp->feature_label_data.description);
+ }
+ CheckSeqLocForPartial (fcp->slp, &partial5, &partial3);
+ if (partial5 || partial3)
+ {
+ last_partial = TRUE;
+ }
+ else
+ {
+ last_partial = FALSE;
+ }
+ }
+ else
+ {
+ if (fcp->feature_label_data.description == NULL)
+ {
+ new_desc = GetGeneProtDescription (fcp, bsp, rp);
+ }
+ else
+ {
+ new_desc = StringSave (fcp->feature_label_data.description);
+ }
+ CheckSeqLocForPartial (fcp->slp, &partial5, &partial3);
+ if (partial5 || partial3)
+ {
+ new_partial = TRUE;
+ }
+ else
+ {
+ new_partial = FALSE;
+ }
+ if ( OkToConsolidate (last_desc, new_desc,
+ last_partial, new_partial,
+ last_cds_fcp, fcp))
+ {
+ /* two clauses have identical descriptions - combine them */
+ MoveSubclauses (last_cds_fcp, fcp);
+ RemoveRedundantGeneFeatureFromConsolidatedClause (last_cds_fcp);
+ fcp->featlist = NULL;
+ fcp->delete_me = TRUE;
+ last_cds_fcp->slp = SeqLocMerge (bsp, last_cds_fcp->slp, fcp->slp,
+ FALSE, TRUE, FALSE);
+ /* if we have two clauses that are really identical instead of
+ * just sharing a "prefix", make the description plural
+ */
+ if (StringCmp (last_cds_fcp->interval, fcp->interval) == 0)
+ {
+ last_cds_fcp->make_plural = TRUE;
+/* PluralizeConsolidatedClauseDescription (last_cds_fcp); */
+ }
+
+ /* Recalculate the interval */
+ if (last_cds_fcp->interval != NULL)
+ {
+ MemFree (last_cds_fcp->interval);
+ }
+ last_cds_fcp->interval =
+ GetGenericInterval (last_cds_fcp, biomol, bsp, rp);
+ MemFree (new_desc);
+ }
+ else
+ {
+ MemFree (last_desc);
+ last_desc = new_desc;
+ last_cds_fcp = fcp;
+ last_partial = new_partial;
+ }
+ }
+ }
+ if (delete_now)
+ {
+ DeleteFeatureClauses (list);
+ }
+}
+
+static void CountUnknownGenes (
+ ValNodePtr PNTR clause_list,
+ BioseqPtr bsp,
+ DeflineFeatureRequestListPtr rp)
+{
+ FeatureClausePtr fcp, new_fcp;
+ ValNodePtr vnp, new_vnp;
+ CharPtr gene_name;
+ Int4 num_unknown_genes;
+
+ num_unknown_genes = 0;
+ vnp = *clause_list;
+ new_vnp = NULL;
+ new_fcp = NULL;
+ while (vnp != NULL)
+ {
+ if (vnp->choice == DEFLINE_CLAUSEPLUS
+ && (fcp = vnp->data.ptrvalue) != NULL
+ && ! fcp->is_unknown)
+ {
+ CountUnknownGenes (&(fcp->featlist), bsp, rp);
+ gene_name = GetGeneProtDescription (fcp, bsp, rp);
+ if (StringCmp (gene_name, "unknown") == 0
+ && fcp->featlist != NULL
+ && fcp->featlist->choice == DEFLINE_FEATLIST)
+ {
+ if (new_fcp == NULL)
+ {
+ new_vnp = ValNodeNew (*clause_list);
+ if (new_vnp == NULL) return;
+ new_fcp = NewFeatureClause (fcp->featlist->data.ptrvalue,
+ bsp, rp);
+ new_fcp->is_unknown = TRUE;
+ new_vnp->choice = DEFLINE_CLAUSEPLUS;
+ new_vnp->data.ptrvalue = new_fcp;
+ }
+ else
+ {
+ new_vnp = ValNodeNew (new_fcp->featlist);
+ if (new_vnp == NULL) return;
+ new_vnp->choice = DEFLINE_FEATLIST;
+ new_vnp->data.ptrvalue = fcp->featlist->data.ptrvalue;
+ }
+ num_unknown_genes ++;
+ fcp->delete_me = TRUE;
+ }
+ }
+ vnp = vnp->next;
+ }
+
+ if (num_unknown_genes > 0)
+ {
+ DeleteFeatureClauses (clause_list);
+ if (num_unknown_genes > 1)
+ {
+ new_fcp->feature_label_data.typeword = StringSave ("genes");
+ }
+ }
+}
+
+static void ReplaceDefinitionLine (
+ SeqEntryPtr sep,
+ CharPtr defline
+)
+{
+ ValNodePtr ttl;
+ if (sep == NULL || defline == NULL) return;
+
+ ttl = SeqEntryGetSeqDescr (sep, Seq_descr_title, NULL);
+ if (ttl == NULL)
+ ttl = CreateNewDescriptor (sep, Seq_descr_title);
+ if (ttl != NULL) {
+ MemFree (ttl->data.ptrvalue);
+ ttl->data.ptrvalue = defline;
+ defline = NULL;
+ }
+ MemFree (defline);
+}
+
+FeatureClausePtr NewFeatureClause
+( SeqFeatPtr sfp,
+ BioseqPtr bsp,
+ DeflineFeatureRequestListPtr rp)
+{
+ FeatureClausePtr fcp;
+ Boolean partial5, partial3;
+
+ fcp = (FeatureClausePtr) MemNew (sizeof (FeatureClauseData));
+ if (fcp == NULL) return NULL;
+
+ fcp->feature_label_data.typeword = NULL;
+ fcp->feature_label_data.description = NULL;
+ fcp->feature_label_data.productname = NULL;
+ fcp->feature_label_data.pluralizable = FALSE;
+ fcp->feature_label_data.is_typeword_first = FALSE;
+ fcp->allelename = NULL;
+ fcp->interval = NULL;
+ fcp->featlist = NULL;
+ fcp->delete_me = FALSE;
+ fcp->clause_info_only = FALSE;
+ fcp->make_plural = FALSE;
+ fcp->is_unknown = FALSE;
+ fcp->grp = NULL;
+ if (sfp == NULL) return fcp;
+ CheckSeqLocForPartial (sfp->location, &partial5, &partial3);
+ fcp->slp = SeqLocMerge (bsp, sfp->location, NULL,
+ FALSE, TRUE, FALSE);
+ SetSeqLocPartial (fcp->slp, partial5, partial3);
+
+ if (sfp->data.choice == SEQFEAT_GENE)
+ {
+ fcp->grp = sfp->data.value.ptrvalue;
+ }
+ else
+ {
+ fcp->grp = SeqMgrGetGeneXref (sfp);
+ }
+ if (( IsCDS (sfp) || IsExon (sfp) || IsNoncodingProductFeat (sfp))
+ && StringStr (sfp->comment, "alternatively spliced") != NULL)
+ {
+ fcp->is_alt_spliced = TRUE;
+ }
+ else
+ {
+ fcp->is_alt_spliced = FALSE;
+ }
+ if (IsCDS (sfp))
+ {
+ fcp->feature_label_data.productname = GetProductName (sfp, bsp, rp);
+ }
+ fcp->featlist = ValNodeNew (NULL);
+ if (fcp->featlist == NULL)
+ {
+ MemFree (fcp);
+ return NULL;
+ }
+
+ fcp->featlist->data.ptrvalue = sfp;
+ fcp->featlist->choice = DEFLINE_FEATLIST;
+
+ return fcp;
+}
+
+static ValNodePtr GetFeatureList (BioseqPtr bsp, DeflineFeatureRequestListPtr rp)
+{
+ ValNodePtr head, vnp;
+ SeqFeatPtr sfp;
+ FeatureClausePtr fcp;
+ SeqMgrFeatContext fcontext;
+
+ if (bsp == NULL) return NULL;
+
+ /* get list of all recognized features */
+ head = NULL;
+ sfp = SeqMgrGetNextFeature (bsp, NULL, 0, 0, &fcontext);
+ while (sfp != NULL)
+ {
+ if (IsRecognizedFeature (sfp))
+ {
+ fcp = NewFeatureClause (sfp, bsp, rp);
+ if (fcp == NULL) return NULL;
+ fcp->numivals = fcontext.numivals;
+ fcp->ivals = fcontext.ivals;
+ vnp = ValNodeNew (head);
+ if (head == NULL) head = vnp;
+ if (vnp == NULL) return NULL;
+ vnp->data.ptrvalue = fcp;
+ vnp->choice = DEFLINE_CLAUSEPLUS;
+ }
+ sfp = SeqMgrGetNextFeature (bsp, sfp, 0, 0, &fcontext);
+ }
+ return head;
+}
+
+static void ExtractSegmentClauses (
+ ValNodePtr segment_features,
+ ValNodePtr parent_features,
+ ValNodePtr PNTR segment_clauses
+);
+
+static Boolean FeatureIsOnSegment (
+ SeqFeatPtr sfp,
+ ValNodePtr segment_features
+)
+{
+ ValNodePtr vnp, featclause;
+ FeatureClausePtr fcp;
+
+ for (vnp = segment_features; vnp != NULL; vnp = vnp->next)
+ {
+ fcp = vnp->data.ptrvalue;
+ if (fcp != NULL)
+ {
+ for (featclause = fcp->featlist;
+ featclause != NULL;
+ featclause = featclause->next)
+ {
+ if (featclause->data.ptrvalue == sfp) return TRUE;
+ }
+ }
+ }
+ return FALSE;
+}
+
+static Boolean FeatureClauseIsOnSegment (
+ FeatureClausePtr fcp,
+ ValNodePtr segment_features
+)
+{
+ ValNodePtr vnp;
+
+ if (fcp == NULL || fcp->featlist == NULL) return FALSE;
+ for (vnp = fcp->featlist; vnp != NULL; vnp = vnp->next)
+ {
+ if (vnp->choice == DEFLINE_FEATLIST
+ && FeatureIsOnSegment (vnp->data.ptrvalue, segment_features))
+ {
+ return TRUE;
+ }
+ else if (vnp->choice == DEFLINE_CLAUSEPLUS)
+ {
+ if (FeatureClauseIsOnSegment (vnp->data.ptrvalue, segment_features))
+ {
+ return TRUE;
+ }
+ }
+ }
+ return FALSE;
+}
+
+static FeatureClausePtr CopyMatchingClauses (
+ FeatureClausePtr fcp,
+ ValNodePtr segment_features
+)
+{
+ FeatureClausePtr new_fcp, copy_clause;
+ ValNodePtr featlist, new_feat;
+ Boolean found_feat_on_segment;
+ Boolean partial5, partial3;
+
+ new_fcp = (FeatureClausePtr) MemNew (sizeof (FeatureClauseData));
+ if (new_fcp == NULL) return NULL;
+ new_fcp->feature_label_data.pluralizable =
+ fcp->feature_label_data.pluralizable;
+ new_fcp->feature_label_data.is_typeword_first =
+ fcp->feature_label_data.is_typeword_first;
+ new_fcp->feature_label_data.typeword =
+ StringSave (fcp->feature_label_data.typeword);
+ new_fcp->feature_label_data.description =
+ StringSave (fcp->feature_label_data.description);
+ new_fcp->feature_label_data.productname =
+ StringSave (fcp->feature_label_data.productname);
+ new_fcp->allelename = StringSave (fcp->allelename);
+ new_fcp->interval = StringSave (fcp->interval);
+ new_fcp->is_alt_spliced = fcp->is_alt_spliced;
+ CheckSeqLocForPartial (fcp->slp, &partial5, &partial3);
+ new_fcp->slp = (SeqLocPtr) AsnIoMemCopy (fcp->slp, (AsnReadFunc) SeqLocAsnRead,
+ (AsnWriteFunc) SeqLocAsnWrite);
+ SetSeqLocPartial (new_fcp->slp, partial5, partial3);
+ new_fcp->grp = fcp->grp;
+ new_fcp->has_mrna = fcp->has_mrna;
+ new_fcp->delete_me = FALSE;
+ new_fcp->clause_info_only = fcp->clause_info_only;
+ new_fcp->featlist = NULL;
+ found_feat_on_segment = FALSE;
+ for (featlist = fcp->featlist; featlist != NULL; featlist = featlist->next)
+ {
+ new_feat = NULL;
+ if (featlist->choice == DEFLINE_FEATLIST)
+ {
+ new_feat = ValNodeNew (new_fcp->featlist);
+ if (new_feat == NULL) return NULL;
+ new_feat->data.ptrvalue = featlist->data.ptrvalue;
+ new_feat->choice = DEFLINE_FEATLIST;
+
+ /* some portions of the clause are present for product and gene info */
+ /* if they aren't actually on the segment */
+ if ( segment_features == NULL
+ || FeatureIsOnSegment (new_feat->data.ptrvalue, segment_features))
+ {
+ found_feat_on_segment = TRUE;
+ }
+ }
+ else if (featlist->choice == DEFLINE_CLAUSEPLUS)
+ {
+ copy_clause = featlist->data.ptrvalue;
+ if ( segment_features == NULL
+ || FeatureClauseIsOnSegment ( copy_clause, segment_features))
+ {
+ new_feat = ValNodeNew (new_fcp->featlist);
+ if (new_feat == NULL) return NULL;
+ new_feat->data.ptrvalue = CopyMatchingClauses ( copy_clause,
+ segment_features);
+ new_feat->choice = DEFLINE_CLAUSEPLUS;
+ }
+ }
+ if (new_feat != NULL && new_fcp->featlist == NULL)
+ {
+ new_fcp->featlist = new_feat;
+ }
+ }
+ if (found_feat_on_segment)
+ {
+ new_fcp->clause_info_only = FALSE;
+ }
+ else
+ {
+ new_fcp->clause_info_only = TRUE;
+ }
+ return new_fcp;
+}
+
+static void CopyFeatureList (
+ ValNodePtr match_features,
+ ValNodePtr parent_features,
+ ValNodePtr PNTR new_list
+)
+{
+ ValNodePtr vnp, addvnp;
+
+ for (vnp = parent_features;
+ vnp != NULL;
+ vnp = vnp->next)
+ {
+ if (vnp->choice == DEFLINE_FEATLIST
+ && (match_features == NULL
+ || FeatureIsOnSegment ( vnp->data.ptrvalue, match_features)))
+ {
+ addvnp = ValNodeNew (*new_list);
+ if (addvnp == NULL) return;
+ addvnp->data.ptrvalue = vnp->data.ptrvalue;
+ addvnp->choice = DEFLINE_FEATLIST;
+ if (*new_list == NULL) *new_list = addvnp;
+ }
+ else if (vnp->choice == DEFLINE_CLAUSEPLUS
+ && (match_features == NULL
+ || FeatureClauseIsOnSegment ( vnp->data.ptrvalue, match_features)))
+ {
+ addvnp = ValNodeNew (*new_list);
+ if (addvnp == NULL) return;
+ addvnp->data.ptrvalue = CopyMatchingClauses ( vnp->data.ptrvalue,
+ match_features);
+ addvnp->choice = DEFLINE_CLAUSEPLUS;
+ if (*new_list == NULL) *new_list = addvnp;
+ }
+ }
+
+}
+
+static void ExtractSegmentClauses (
+ ValNodePtr segment_features,
+ ValNodePtr parent_features,
+ ValNodePtr PNTR segment_clauses
+)
+{
+ CopyFeatureList (segment_features, parent_features, segment_clauses);
+}
+
+typedef struct segmentdeflinedata {
+ BioseqPtr parent_bsp;
+ ValNodePtr parent_feature_list;
+ Uint1 molecule_type;
+ DeflineFeatureRequestList PNTR feature_requests;
+ ModifierCombinationPtr m;
+ ModifierItemLocalPtr modList;
+ OrganismDescriptionModifiersPtr odmp;
+ Int2 product_flag;
+} SegmentDefLineData, PNTR SegmentDefLinePtr;
+
+typedef struct segmentdeflinefeatureclausedata {
+ BioseqPtr parent_bsp;
+ ValNodePtr parent_feature_list;
+ Uint1 molecule_type;
+ DeflineFeatureRequestList PNTR feature_requests;
+ Int2 product_flag;
+ Boolean alternate_splice_flag;
+ Boolean gene_cluster_opp_strand;
+ ValNodePtr PNTR list;
+} SegmentDefLineFeatureClauseData, PNTR SegmentDefLineFeatureClausePtr;
+
+typedef struct deflinefeatclause {
+ SeqEntryPtr sep;
+ BioseqPtr bsp;
+ CharPtr clauselist;
+} DefLineFeatClauseData, PNTR DefLineFeatClausePtr;
+
+NLM_EXTERN void DefLineFeatClauseListFree (ValNodePtr vnp)
+{
+ DefLineFeatClausePtr deflist;
+
+ if (vnp == NULL) return;
+ DefLineFeatClauseListFree (vnp->next);
+ vnp->next = NULL;
+ deflist = vnp->data.ptrvalue;
+ if (deflist != NULL)
+ {
+ MemFree (deflist->clauselist);
+ MemFree (deflist);
+ }
+ ValNodeFree (vnp);
+}
+
+
+static Boolean IntervalIntersectsIvals
+(Int2 numivals,
+ Int4Ptr ivals,
+ SeqMgrSegmentContextPtr context)
+{
+ Int2 idx;
+ Int4 start, stop;
+
+ if (numivals == 0 || ivals == NULL || context == NULL) return FALSE;
+
+ for (idx = 0; idx < numivals; idx ++) {
+ start = ivals [idx * 2];
+ stop = ivals [idx * 2 + 1];
+ if ( start <= context->cumOffset + context->to - context->from
+ && stop >= context->cumOffset)
+ {
+ return TRUE;
+ }
+ }
+ return FALSE;
+}
+
+
+/* if there are no features at all on this segment, select the genes that
+ * traverse the segment.
+ */
+static ValNodePtr GrabTraversingGenes
+(ValNodePtr parent_feature_list,
+ SeqMgrSegmentContextPtr context,
+ BioseqPtr parent_bsp,
+ DeflineFeatureRequestListPtr rp)
+{
+ FeatureClausePtr fcp, new_fcp;
+ ValNodePtr clause;
+ SeqFeatPtr sfp;
+ ValNodePtr segment_feature_list;
+ ValNodePtr vnp;
+
+ segment_feature_list = NULL;
+ for (clause = parent_feature_list;
+ clause != NULL;
+ clause = clause->next)
+ {
+ fcp = clause->data.ptrvalue;
+
+ if (fcp != NULL && fcp->featlist != NULL
+ && (sfp = fcp->featlist->data.ptrvalue) != NULL
+ && sfp->idx.subtype == FEATDEF_GENE
+ && fcp->ivals != NULL && fcp->numivals > 0)
+ {
+ if (IntervalIntersectsIvals (fcp->numivals, fcp->ivals, context)) {
+ new_fcp = NewFeatureClause (fcp->featlist->data.ptrvalue, parent_bsp,
+ rp);
+ if (new_fcp == NULL) return FALSE;
+ vnp = ValNodeNew (segment_feature_list);
+ if (vnp == NULL) return FALSE;
+ vnp->data.ptrvalue = new_fcp;
+ vnp->choice = DEFLINE_CLAUSEPLUS;
+ if (segment_feature_list == NULL) segment_feature_list = vnp;
+ }
+ }
+ }
+ return segment_feature_list;
+}
+
+
+static CharPtr BuildFeatureClauses (
+ BioseqPtr bsp,
+ Uint1 molecule_type,
+ SeqEntryPtr sep,
+ ValNodePtr PNTR feature_list,
+ Boolean isSegment,
+ ValNodePtr PNTR seg_feature_list,
+ Int2 product_flag,
+ Boolean alternate_splice_flag,
+ Boolean gene_cluster_opp_strand,
+ DeflineFeatureRequestList PNTR feature_requests
+);
+
+static Boolean LIBCALLBACK GetFeatureClauseForSeg (
+ SeqLocPtr slp,
+ SeqMgrSegmentContextPtr context)
+{
+ SegmentDefLineFeatureClausePtr sdlp;
+ ValNodePtr clause, tmp_parent_list;
+ FeatureClausePtr fcp, new_fcp;
+ Int2 idx;
+ Int4 start, stop;
+ ValNodePtr segment_feature_list, vnp;
+ SeqIdPtr sip;
+ BioseqPtr bsp;
+ Uint2 entityID;
+ SeqLocPtr loc;
+ DefLineFeatClausePtr deflist;
+
+ if (slp == NULL || context == NULL) return FALSE;
+ sdlp = (SegmentDefLineFeatureClausePtr) context->userdata;
+
+ sip = SeqLocId (slp);
+
+ if (sip == NULL) {
+ loc = SeqLocFindNext (slp, NULL);
+ if (loc != NULL) {
+ sip = SeqLocId (loc);
+ }
+ }
+ if (sip == NULL) return TRUE;
+
+ bsp = BioseqFind (sip);
+
+ if (bsp == NULL) return TRUE;
+
+
+ segment_feature_list = NULL;
+ for (clause = sdlp->parent_feature_list;
+ clause != NULL;
+ clause = clause->next)
+ {
+ fcp = clause->data.ptrvalue;
+
+ if (fcp != NULL && fcp->ivals != NULL && fcp->numivals > 0)
+ {
+ idx = (fcp->numivals - 1) * 2;
+ start = fcp->ivals [idx];
+ stop = fcp->ivals [idx + 1];
+ if ( stop <= context->cumOffset + context->to - context->from
+ && stop >= context->cumOffset)
+ {
+ new_fcp = NewFeatureClause (fcp->featlist->data.ptrvalue,
+ sdlp->parent_bsp,
+ sdlp->feature_requests);
+ if (new_fcp == NULL) return FALSE;
+ vnp = ValNodeNew (segment_feature_list);
+ if (vnp == NULL) return FALSE;
+ vnp->data.ptrvalue = new_fcp;
+ vnp->choice = DEFLINE_CLAUSEPLUS;
+ if (segment_feature_list == NULL) segment_feature_list = vnp;
+ }
+ }
+ }
+
+ if (segment_feature_list == NULL) {
+ segment_feature_list = GrabTraversingGenes (sdlp->parent_feature_list,
+ context, sdlp->parent_bsp,
+ sdlp->feature_requests);
+ }
+
+ entityID = ObjMgrGetEntityIDForPointer (bsp);
+
+ tmp_parent_list = NULL;
+ CopyFeatureList (NULL, sdlp->parent_feature_list, &tmp_parent_list);
+
+ deflist = (DefLineFeatClausePtr) MemNew (sizeof (DefLineFeatClauseData));
+ if (deflist == NULL) return TRUE;
+ deflist->sep = SeqMgrGetSeqEntryForData (bsp);
+ deflist->bsp = bsp;
+ deflist->clauselist = BuildFeatureClauses (sdlp->parent_bsp,
+ sdlp->molecule_type,
+ SeqMgrGetSeqEntryForData (bsp),
+ &tmp_parent_list,
+ TRUE,
+ &segment_feature_list,
+ sdlp->product_flag,
+ sdlp->alternate_splice_flag,
+ sdlp->gene_cluster_opp_strand,
+ sdlp->feature_requests);
+ vnp = ValNodeNew (*(sdlp->list));
+ if (vnp == NULL) return TRUE;
+ if (*(sdlp->list) == NULL) *(sdlp->list) = vnp;
+ vnp->data.ptrvalue = deflist;
+
+ FreeListElement (tmp_parent_list);
+ FreeListElement (segment_feature_list);
+ DeleteMarkedObjects (entityID, 0, NULL);
+ return TRUE;
+}
+
+static Boolean HasAnyPromoters (BioseqPtr bsp)
+{
+ SeqFeatPtr sfp;
+ SeqMgrFeatContext fcontext;
+
+ sfp = SeqMgrGetNextFeature (bsp, NULL, 0, FEATDEF_promoter, &fcontext);
+ if (sfp == NULL) {
+ return FALSE;
+ } else {
+ return TRUE;
+ }
+}
+
+static void AddFakePromoterClause (ValNodePtr PNTR feature_list, BioseqPtr bsp, DeflineFeatureRequestListPtr rp)
+{
+ FeatureClausePtr fcp;
+ SeqFeatPtr sfp = NULL;
+
+ /* create fake promoter */
+ sfp = CreateNewFeature (SeqMgrGetSeqEntryForData (bsp), NULL,
+ SEQFEAT_IMP, NULL);
+
+ sfp->location = SeqLocIntNew (0, bsp->length - 1, Seq_strand_plus, SeqIdDup (bsp->id));
+ sfp->data.choice = SEQFEAT_IMP;
+ sfp->idx.subtype = FEATDEF_promoter;
+ /* mark promoter for deletion */
+ sfp->idx.deleteme = TRUE;
+
+ fcp = NewFeatureClause (sfp, bsp, rp);
+ if (fcp == NULL) return;
+ fcp->numivals = 1;
+ fcp->ivals = (Int4Ptr) MemNew (sizeof (Int4) * 2);
+ fcp->ivals[0] = 0;
+ fcp->ivals[1] = bsp->length - 1;
+ ValNodeAddPointer (feature_list, DEFLINE_CLAUSEPLUS, fcp);
+
+}
+
+static Boolean IsInGenProdSet (BioseqPtr bsp)
+{
+ BioseqSetPtr bssp;
+ if (bsp == NULL || bsp->idx.parentptr == NULL || bsp->idx.parenttype != OBJ_BIOSEQSET) {
+ return FALSE;
+ }
+ bssp = (BioseqSetPtr) bsp->idx.parentptr;
+ if (bssp->_class != BioseqseqSet_class_nuc_prot || bssp->idx.parentptr == NULL || bsp->idx.parenttype != OBJ_BIOSEQSET) {
+ return FALSE;
+ }
+ bssp = bssp->idx.parentptr;
+ if (bssp->_class == BioseqseqSet_class_gen_prod_set) {
+ return TRUE;
+ } else {
+ return FALSE;
+ }
+}
+
+/* NOTE: under some circumstances this function will create features that
+ * are marked for deletion, so DeleteMarkedObjects should always be called
+ * at some later point.
+ */
+static CharPtr BuildFeatureClauses (
+ BioseqPtr bsp,
+ Uint1 molecule_type,
+ SeqEntryPtr sep,
+ ValNodePtr PNTR feature_list,
+ Boolean isSegment,
+ ValNodePtr PNTR seg_feature_list,
+ Int2 product_flag,
+ Boolean alternate_splice_flag,
+ Boolean gene_cluster_opp_strand,
+ DeflineFeatureRequestList PNTR feature_requests
+)
+{
+ ValNodePtr strings = NULL;
+ ValNodePtr clause;
+ CharPtr str = NULL;
+ Char ending_str [200];
+ ValNodePtr tmp_feat_list;
+ BioSourcePtr biop;
+
+ if ((feature_requests->feature_list_type == DEFLINE_USE_FEATURES
+ || (IsmRNASequence(bsp) && IsInGenProdSet(bsp)))
+ && (! isSegment || (seg_feature_list != NULL && *seg_feature_list != NULL)))
+ {
+ /* remove features that indexer has chosen to suppress before they are grouped
+ * with other features or used to determine loneliness etc.
+ */
+ RemoveSuppressedFeatures (feature_list, feature_requests->suppressed_feature_list);
+
+ GroupmRNAs (feature_list, bsp, feature_requests);
+
+ /* genes are added to other clauses */
+ GroupGenes (feature_list, feature_requests->suppress_locus_tags);
+
+ if (! feature_requests->suppress_alt_splice_phrase)
+ {
+ /* find alt-spliced CDSs */
+ FindAltSplices (*feature_list, bsp, feature_requests);
+ }
+
+ GroupAltSplicedExons (feature_list, bsp, TRUE);
+
+ if (!isSegment)
+ {
+ /* group CDSs that have the same name and are under the same gene together */
+ GroupSegmentedCDSs (feature_list, bsp, TRUE, feature_requests);
+ }
+
+ /* per Susan's request, if promoters are requested and no promoters are found, add a promoter */
+ if (feature_requests->keep_items[RemovablePromoter]
+ && feature_requests->add_fake_promoters
+ && !HasAnyPromoters (bsp)) {
+ AddFakePromoterClause (feature_list, bsp, feature_requests);
+ }
+
+ /* now group clauses */
+ GroupAllClauses ( feature_list, gene_cluster_opp_strand, bsp );
+
+ ExpandAltSplicedExons (*feature_list, bsp, feature_requests);
+
+ FindGeneProducts (*feature_list, bsp, feature_requests);
+
+ if (seg_feature_list != NULL && *seg_feature_list != NULL)
+ {
+ tmp_feat_list = NULL;
+ ExtractSegmentClauses ( *seg_feature_list, *feature_list, &tmp_feat_list);
+ FreeListElement (*feature_list);
+ DeleteMarkedObjects (bsp->idx.entityID, 0, NULL);
+ *feature_list = tmp_feat_list;
+ }
+
+ /* remove exons and other unwanted features */
+ RemoveUnwantedFeatures (feature_list, bsp, isSegment, feature_requests);
+
+ RemoveGenesMentionedElsewhere (feature_list, *feature_list, TRUE,
+ feature_requests->suppress_locus_tags);
+
+ if (feature_requests->remove_subfeatures)
+ {
+ DeleteSubfeatures (feature_list, TRUE);
+ }
+
+ DeleteOperonAndGeneClusterSubfeatures (feature_list, TRUE);
+
+ CountUnknownGenes (feature_list, bsp, feature_requests);
+
+ if (feature_requests->misc_feat_parse_rule == 1)
+ {
+ RenameMiscFeats (*feature_list, molecule_type);
+ }
+ else
+ {
+ RemoveUnwantedMiscFeats (feature_list, TRUE);
+ }
+
+ ReplaceRNAClauses (feature_list, bsp, feature_requests);
+
+ /* take any exons on the minus strand */
+ /* and reverse their order within the clause */
+ ReverseClauses (feature_list, IsExonOrIntron);
+
+ RenameExonSequences ( feature_list, bsp, TRUE);
+
+ LabelClauses (*feature_list, molecule_type, bsp,
+ feature_requests);
+
+ /* parse lists of tRNA and intergenic spacer clauses in misc_feat notes */
+ /* need to do this after LabelClauses, since LabelClauses labels intergenic
+ * spacers with more relaxed restrictions. The labels from LabelClauses
+ * for intergenic spacers are the default values.
+ */
+ ReplaceIntergenicSpacerClauses (feature_list, bsp, feature_requests);
+
+ ConsolidateClauses (feature_list, bsp, molecule_type, TRUE,
+ feature_requests);
+
+ /* this allows genes to be listed together even if they are from */
+ /* separate sequences */
+/* SmashTallClauses (feature_list, TRUE); */
+
+ clause = *feature_list;
+ ListClauses (clause, &strings, TRUE, FALSE);
+
+ AutoDef_AddEnding (clause, &strings, bsp,
+ product_flag, alternate_splice_flag);
+ str = MergeValNodeStrings (strings, FALSE);
+ ValNodeFreeData (strings);
+ }
+ else if (feature_requests->feature_list_type == DEFLINE_COMPLETE_SEQUENCE)
+ {
+ str = StringSave (", complete sequence.");
+ }
+ else if (feature_requests->feature_list_type == DEFLINE_COMPLETE_GENOME)
+ {
+ ending_str [0] = 0;
+ biop = GetBiopForBsp (bsp);
+ if (biop != NULL)
+ {
+ switch (biop->genome) {
+ case GENOME_macronuclear :
+ sprintf (ending_str, "macronuclear");
+ break;
+ case GENOME_nucleomorph :
+ sprintf (ending_str, "nucleomorph");
+ break;
+ case GENOME_mitochondrion :
+ sprintf (ending_str, "mitochondrion");
+ break;
+ case GENOME_apicoplast :
+ case GENOME_chloroplast :
+ case GENOME_chromoplast :
+ case GENOME_kinetoplast :
+ case GENOME_plastid :
+ case GENOME_cyanelle :
+ case GENOME_leucoplast :
+ case GENOME_proplastid :
+ case GENOME_hydrogenosome :
+ sprintf (ending_str, "%s", organelleByGenome [biop->genome]);
+ break;
+ }
+ }
+ StringCat (ending_str, ", complete genome.");
+ str = StringSave (ending_str);
+ }
+ else
+ {
+ str = StringSave ("");
+ }
+
+ return str;
+}
+
+/* This function looks at the product names for the CDSs on the Bioseq,
+ * and sets the flag for the "nuclear genes for X products" ending
+ * based on the contents of the CDS products. */
+static Int2 GetProductFlagFromCDSProductNames (BioseqPtr bsp)
+{
+ SeqMgrFeatContext context;
+ SeqFeatPtr cds = NULL;
+ Int2 product_flag;
+ Int2 i;
+ CharPtr found;
+ Char ch_before, ch_after;
+
+ product_flag = 0;
+ for (cds = SeqMgrGetNextFeature (bsp, cds, SEQFEAT_CDREGION, 0, &context);
+ cds != NULL && product_flag == 0;
+ cds = cds->next)
+ {
+ for (i = 1; organelleByPopup[i] != NULL && product_flag == 0; i++)
+ {
+ found = StringStr (context.label, organelleByPopup[i]);
+ if (found != NULL)
+ {
+ if (found == context.label) {
+ ch_before = ' ';
+ } else {
+ ch_before = *(found - 1);
+ }
+ ch_after = *(found + StringLen (organelleByPopup[i]));
+ if (ch_before == ' ' && (ch_after == 0 || ch_after == ' '))
+ {
+ product_flag = i;
+ }
+ }
+ }
+ }
+
+ return product_flag;
+}
+
+NLM_EXTERN void BuildDefLineFeatClauseList (
+ SeqEntryPtr sep,
+ Uint2 entityID,
+ DeflineFeatureRequestList PNTR feature_requests,
+ Int2 product_flag,
+ Boolean alternate_splice_flag,
+ Boolean gene_cluster_opp_strand,
+ ValNodePtr PNTR list
+)
+{
+ BioseqSetPtr bssp;
+ BioseqPtr bsp;
+ ValNodePtr head;
+ Uint1 molecule_type;
+ SeqEntryPtr nsep;
+ SegmentDefLineFeatureClauseData sdld;
+ DefLineFeatClausePtr deflist;
+ ValNodePtr vnp;
+
+ if (sep == NULL || list == NULL) return;
+
+ if ( IS_Bioseq_set (sep))
+ {
+ bssp = (BioseqSetPtr) sep->data.ptrvalue;
+ if (bssp == NULL) return;
+ if ( bssp->_class == 7 || IsPopPhyEtcSet (bssp->_class)
+ || bssp->_class == BioseqseqSet_class_gen_prod_set
+ || bssp->_class == BioseqseqSet_class_not_set)
+ {
+ for (sep = bssp->seq_set; sep != NULL; sep = sep->next)
+ {
+ BuildDefLineFeatClauseList (sep, entityID, feature_requests,
+ product_flag, alternate_splice_flag,
+ gene_cluster_opp_strand, list);
+ }
+ return;
+ }
+ }
+
+ nsep = FindNucSeqEntry (sep);
+ if (nsep != NULL)
+ {
+ bsp = (BioseqPtr) nsep->data.ptrvalue;
+ if ( SpecialHandlingForSpecialTechniques (bsp))
+ {
+ return;
+ }
+ if (bsp != NULL && bsp->repr == Seq_repr_seg &&
+ bsp->seq_ext != NULL && bsp->seq_ext_type == 1)
+ {
+ /* get default product flag if necessary */
+ if (product_flag == -1 || product_flag == DEFAULT_ORGANELLE_CLAUSE) {
+ product_flag = GetProductFlagFromCDSProductNames (bsp);
+ }
+
+ sdld.parent_bsp = bsp;
+ sdld.molecule_type = GetMoleculeType (bsp, entityID);
+ sdld.parent_feature_list = GetFeatureList (bsp,
+ feature_requests);
+
+ sdld.feature_requests = feature_requests;
+ sdld.product_flag = product_flag;
+ sdld.alternate_splice_flag = alternate_splice_flag;
+ sdld.gene_cluster_opp_strand = gene_cluster_opp_strand;
+ sdld.list = list;
+ SeqMgrExploreSegments (bsp, (Pointer) &sdld, GetFeatureClauseForSeg);
+ deflist = (DefLineFeatClausePtr) MemNew (sizeof (DefLineFeatClauseData));
+ if (deflist == NULL) return;
+ deflist->sep = SeqMgrGetSeqEntryForData (bsp),
+ deflist->bsp = bsp;
+
+ deflist->clauselist = BuildFeatureClauses (bsp,
+ sdld.molecule_type,
+ SeqMgrGetSeqEntryForData (bsp),
+ &sdld.parent_feature_list,
+ FALSE,
+ NULL,
+ product_flag,
+ alternate_splice_flag,
+ gene_cluster_opp_strand,
+ feature_requests);
+ vnp = ValNodeNew (*list);
+ if (vnp == NULL) return;
+ if (*list == NULL) *list = vnp;
+ vnp->data.ptrvalue = deflist;
+ FreeListElement (sdld.parent_feature_list);
+ DeleteMarkedObjects (entityID, 0, NULL);
+ return;
+ }
+ }
+
+ if (nsep != NULL && nsep != sep)
+ sep = nsep;
+
+
+ if (! IS_Bioseq (sep)) return;
+
+ /* get list of all recognized features */
+ bsp = (BioseqPtr) sep->data.ptrvalue;
+ if (bsp == NULL) return;
+ if ( SpecialHandlingForSpecialTechniques (bsp))
+ {
+ return;
+ }
+ molecule_type = GetMoleculeType (bsp, entityID);
+ head = GetFeatureList (bsp, feature_requests);
+
+ /* get default product flag if necessary */
+ if (product_flag == -1 || product_flag == DEFAULT_ORGANELLE_CLAUSE) {
+ product_flag = GetProductFlagFromCDSProductNames (bsp);
+ }
+
+ deflist = (DefLineFeatClausePtr) MemNew (sizeof (DefLineFeatClauseData));
+ if (deflist == NULL) return;
+ deflist->sep = SeqMgrGetSeqEntryForData (bsp),
+ deflist->bsp = bsp;
+ deflist->clauselist = BuildFeatureClauses (bsp,
+ molecule_type,
+ SeqMgrGetSeqEntryForData (bsp),
+ &head,
+ FALSE,
+ NULL,
+ product_flag,
+ alternate_splice_flag,
+ gene_cluster_opp_strand,
+ feature_requests);
+ vnp = ValNodeNew (*list);
+ if (vnp == NULL) return;
+ if (*list == NULL) *list = vnp;
+ vnp->data.ptrvalue = deflist;
+ FreeListElement (head);
+ DeleteMarkedObjects (entityID, 0, NULL);
+}
+
+static Boolean IdenticalExceptForPartialComplete (CharPtr str1, CharPtr str2)
+{
+ CharPtr cp, word_in_first, word_in_second;
+ Int4 first_len, second_len, compare_len;
+
+ if (StringHasNoText (str1) && StringHasNoText (str2)) {
+ return TRUE;
+ } else if (StringHasNoText (str1) || StringHasNoText (str2)) {
+ return FALSE;
+ }
+
+ word_in_first = StringISearch (str1, "partial");
+ cp = StringISearch (str1, "complete");
+ if (word_in_first == NULL || (cp != NULL && word_in_first > cp)) {
+ word_in_first = cp;
+ first_len = 8;
+ } else {
+ first_len = 7;
+ }
+
+ word_in_second = StringISearch (str2, "partial");
+ cp = StringISearch (str2, "complete");
+ if (word_in_second == NULL || (cp != NULL && word_in_second > cp)) {
+ word_in_second = cp;
+ second_len = 8;
+ } else {
+ second_len = 7;
+ }
+
+ if (word_in_first == NULL && word_in_second == NULL) {
+ if (StringCmp (str1, str2) == 0) {
+ return TRUE;
+ } else {
+ return FALSE;
+ }
+ } else if (word_in_first == NULL || word_in_second == NULL) {
+ return FALSE;
+ } else if ((compare_len = word_in_first - str1) != word_in_second - str2) {
+ return FALSE;
+ } else if (StringNCmp (str1, str2, compare_len) != 0) {
+ return FALSE;
+ } else {
+ return IdenticalExceptForPartialComplete (word_in_first + first_len, word_in_second + second_len);
+ }
+}
+
+
+NLM_EXTERN Boolean AreFeatureClausesUnique (ValNodePtr list)
+{
+ ValNodePtr vnp1, vnp2;
+ DefLineFeatClausePtr deflist1, deflist2;
+
+ for (vnp1 = list; vnp1 != NULL && vnp1->next != NULL; vnp1 = vnp1->next)
+ {
+ deflist1 = vnp1->data.ptrvalue;
+ if (deflist1 == NULL || deflist1->clauselist == NULL) return FALSE;
+
+ for (vnp2 = vnp1->next; vnp2 != NULL; vnp2 = vnp2->next)
+ {
+ deflist2 = vnp2->data.ptrvalue;
+ if (deflist2 == NULL || deflist2->clauselist == NULL
+ || IdenticalExceptForPartialComplete (deflist1->clauselist, deflist2->clauselist))
+ {
+ return FALSE;
+ }
+ }
+ }
+ return TRUE;
+}
+
+
+static CharPtr GetKeywordPrefix (SeqEntryPtr sep)
+{
+ ValNodePtr vnp;
+ GBBlockPtr gbp;
+
+ vnp = SeqEntryGetSeqDescr (sep, Seq_descr_genbank, NULL);
+ if (vnp != NULL) {
+ gbp = (GBBlockPtr) vnp->data.ptrvalue;
+ if (gbp != NULL)
+ {
+ for (vnp = gbp->keywords; vnp != NULL; vnp = vnp->next)
+ {
+ if (StringICmp((CharPtr)vnp->data.ptrvalue, "TPA:inferential") == 0)
+ {
+ return "TPA_inf: ";
+ }
+ else if (StringICmp((CharPtr)vnp->data.ptrvalue, "TPA:experimental") == 0)
+ {
+ return "TPA_exp: ";
+ }
+ }
+ }
+ }
+ return "";
+}
+
+NLM_EXTERN void BuildDefinitionLinesFromFeatureClauseLists (
+ ValNodePtr list,
+ ModifierItemLocalPtr modList,
+ ValNodePtr modifier_indices,
+ OrganismDescriptionModifiersPtr odmp
+)
+{
+ ValNodePtr vnp;
+ DefLineFeatClausePtr defline_featclause;
+ CharPtr org_desc, tmp_str, keyword_prefix;
+
+ for (vnp = list; vnp != NULL; vnp = vnp->next)
+ {
+ if (vnp->data.ptrvalue != NULL)
+ {
+ defline_featclause = vnp->data.ptrvalue;
+
+ keyword_prefix = GetKeywordPrefix (defline_featclause->sep);
+
+ org_desc = GetOrganismDescription (defline_featclause->bsp,
+ modList, modifier_indices, odmp);
+ tmp_str = (CharPtr) MemNew (StringLen (keyword_prefix)
+ + StringLen (org_desc)
+ + StringLen (defline_featclause->clauselist) + 2);
+ if (tmp_str == NULL) return;
+ tmp_str [0] = 0;
+ if (keyword_prefix != NULL)
+ {
+ StringCat (tmp_str, keyword_prefix);
+ }
+ StringCat (tmp_str, org_desc);
+ if (defline_featclause->clauselist != NULL
+ && defline_featclause->clauselist [0] != ','
+ && defline_featclause->clauselist [0] != '.'
+ && defline_featclause->clauselist [0] != 0)
+ {
+ StringCat (tmp_str, " ");
+ }
+ StringCat (tmp_str, defline_featclause->clauselist);
+ tmp_str [0] = toupper (tmp_str [0]);
+ ReplaceDefinitionLine (defline_featclause->sep, tmp_str);
+ MemFree (org_desc);
+ }
+ }
+}
+
+
+/* This removes redundant titles on nuc-prot sets, which will not be
+ * visible in the flat file if all sequences in the nuc-prot set have
+ * their own title.
+ */
+NLM_EXTERN void RemoveNucProtSetTitles (SeqEntryPtr sep)
+{
+ BioseqSetPtr bssp;
+ SeqEntryPtr this_sep;
+ SeqDescrPtr sdp, prev = NULL, sdp_next;
+
+ if (sep == NULL || ! IS_Bioseq_set (sep))
+ {
+ return;
+ }
+ bssp = (BioseqSetPtr) sep->data.ptrvalue;
+ if (bssp == NULL) return;
+ for (this_sep = bssp->seq_set; this_sep != NULL; this_sep = this_sep->next)
+ {
+ RemoveNucProtSetTitles (this_sep);
+ }
+
+ if (bssp->_class != BioseqseqSet_class_nuc_prot)
+ {
+ return;
+ }
+ for (sdp = bssp->descr; sdp != NULL; sdp = sdp_next)
+ {
+ sdp_next = sdp->next;
+ if (sdp->choice == Seq_descr_title)
+ {
+ if (prev == NULL)
+ {
+ bssp->descr = sdp->next;
+ }
+ else
+ {
+ prev->next = sdp->next;
+ }
+ sdp->next = NULL;
+ SeqDescrFree (sdp);
+ }
+ else
+ {
+ prev = sdp;
+ }
+ }
+}
+
+
+NLM_EXTERN void
+AutoDefForSeqEntry
+(SeqEntryPtr sep,
+ Uint2 entityID,
+ OrganismDescriptionModifiersPtr odmp,
+ ModifierItemLocalPtr modList,
+ ValNodePtr modifier_indices,
+ DeflineFeatureRequestListPtr feature_requests,
+ Int2 product_flag,
+ Boolean alternate_splice_flag,
+ Boolean gene_cluster_opp_strand)
+{
+ ValNodePtr defline_clauses = NULL;
+
+ if (sep == NULL) return;
+
+ RemoveNucProtSetTitles (sep);
+
+ SeqEntrySetScope (sep);
+
+ BuildDefLineFeatClauseList (sep, entityID,
+ feature_requests,
+ product_flag, alternate_splice_flag,
+ gene_cluster_opp_strand,
+ &defline_clauses);
+
+/* dlfp->feature_requests.suppressed_feature_list = ValNodeFree (dlfp->feature_requests.suppressed_feature_list); */
+
+ BuildDefinitionLinesFromFeatureClauseLists (defline_clauses, modList,
+ modifier_indices, odmp);
+ DefLineFeatClauseListFree (defline_clauses);
+ ClearProteinTitlesInNucProts (entityID, NULL);
+ InstantiateProteinTitles (entityID, NULL);
+}
+
+
+/* functions for editing seq-locs */
+NLM_EXTERN Int4 ExtendSeqLocToEnd (SeqLocPtr slp, BioseqPtr bsp, Boolean end5)
+{
+ Uint1 strand;
+ SeqLocPtr slp_to_change, slp_index;
+ Int4 extent_to_change;
+ Int4 start, stop;
+ SeqIdPtr sip;
+ Int4 start_diff = 0;
+
+ if (slp == NULL || bsp == NULL) return 0;
+
+ slp_to_change = NULL;
+ strand = SeqLocStrand (slp);
+ switch (slp->choice)
+ {
+ case SEQLOC_INT:
+ slp_to_change = slp;
+ break;
+ case SEQLOC_MIX:
+ case SEQLOC_PACKED_INT:
+ sip = SeqLocId (slp);
+ if (sip == NULL) return 0; /* can only process if all on one bioseq */
+ slp_to_change = NULL;
+ if ((strand == Seq_strand_minus && end5)
+ || (strand != Seq_strand_minus && !end5))
+ {
+ extent_to_change = 0;
+ for (slp_index = (SeqLocPtr)slp->data.ptrvalue; slp_index != NULL; slp_index = slp_index->next)
+ {
+ stop = GetOffsetInBioseq (slp_index, bsp, SEQLOC_STOP);
+ if (stop > extent_to_change)
+ {
+ slp_to_change = slp_index;
+ extent_to_change = stop;
+ }
+ }
+ }
+ else
+ {
+ extent_to_change = bsp->length;
+ for (slp_index = (SeqLocPtr)slp->data.ptrvalue; slp_index != NULL; slp_index = slp_index->next)
+ {
+ start = GetOffsetInBioseq (slp_index, bsp, SEQLOC_START);
+ if (start < extent_to_change)
+ {
+ slp_to_change = slp_index;
+ extent_to_change = start;
+ }
+ }
+ }
+ break;
+ }
+
+ if (slp_to_change != NULL)
+ {
+ if ((strand == Seq_strand_minus && end5)
+ || (strand != Seq_strand_minus && !end5))
+ {
+ start = GetOffsetInBioseq (slp_to_change, bsp, SEQLOC_START);
+ stop = bsp->length - 1;
+ }
+ else
+ {
+ start = 0;
+ stop = GetOffsetInBioseq (slp_to_change, bsp, SEQLOC_STOP);
+ }
+ if (end5) {
+ if (strand == Seq_strand_minus) {
+ start_diff = bsp->length - 1 - GetOffsetInBioseq(slp_to_change, bsp, SEQLOC_START);
+ } else {
+ start_diff = GetOffsetInBioseq(slp_to_change, bsp, SEQLOC_START);
+ }
+ }
+
+ expand_seq_loc (start, stop, strand, slp_to_change);
+ }
+ return start_diff;
+}
+
+
+
+
+
diff --git a/api/sqnutils.h b/api/sqnutils.h
index 37e977ba..e2a0dc53 100644
--- a/api/sqnutils.h
+++ b/api/sqnutils.h
@@ -29,7 +29,7 @@
*
* Version Creation Date: 9/2/97
*
-* $Revision: 6.186 $
+* $Revision: 6.224 $
*
* File Description:
*
@@ -50,6 +50,7 @@
#include <objpubme.h>
#include <objentgene.h>
#include <util/creaders/alnread.h>
+#include <subutil.h>
#undef NLM_EXTERN
#ifdef NLM_IMPORT
@@ -547,6 +548,12 @@ NLM_EXTERN void AddQualifierToFeature (SeqFeatPtr sfp, CharPtr qual, CharPtr val
NLM_EXTERN CharPtr TrimSpacesAndSemicolons (CharPtr str);
NLM_EXTERN CharPtr TrimSpacesAndJunkFromEnds (CharPtr str, Boolean allowEllipsis);
+/* specialized cleanup for subsource and orgmod lists */
+NLM_EXTERN void CleanSubSourceList (SubSourcePtr PNTR sspp, Uint1 location);
+NLM_EXTERN void CleanOrgModList (OrgModPtr PNTR ompp);
+
+NLM_EXTERN Boolean PubIsEffectivelyEmpty (PubdescPtr pdp);
+
/* BasicSeqEntryCleanup cleans up strings, moves gbquals to the appropriate field, and
does several other conversions, all without changing the itemID structure (which would
require reindexing) */
@@ -807,9 +814,10 @@ NewClickableItem
CharPtr description_fmt,
ValNodePtr item_list);
+extern ClickableItemPtr ClickableItemFree (ClickableItemPtr cip);
extern ValNodePtr FreeClickableList (ValNodePtr list);
-
+extern int LIBCALLBACK SortVnpByClickableItemDescription (VoidPtr ptr1, VoidPtr ptr2);
/* To add a new type of test, do ALL Of the following:
* 1. add an item to the DiscrepancyType enum (this will fill the clickable_item_type value)
@@ -861,6 +869,11 @@ typedef enum {
DISC_TRANSL_TOO_LONG,
DISC_CDS_OVERLAP_TRNA,
DISC_COUNT_PROTEINS,
+ DISC_FEAT_OVERLAP_SRCFEAT,
+ DISC_MISSING_GENPRODSET_PROTEIN,
+ DISC_DUP_GENPRODSET_PROTEIN,
+ DISC_MISSING_GENPRODSET_TRANSCRIPT_ID,
+ DISC_DUP_GENPRODSET_TRANSCRIPT_ID,
MAX_DISC_TYPE
} DiscrepancyType;
@@ -879,16 +892,96 @@ extern DiscrepancyConfigPtr DiscrepancyConfigNew (void);
extern DiscrepancyConfigPtr ReadDiscrepancyConfig (void);
extern void SaveDiscrepancyConfig (DiscrepancyConfigPtr dcp);
extern void DisableTRNATests (DiscrepancyConfigPtr dcp);
+extern CharPtr SetDiscrepancyReportTestsFromString (CharPtr list, Boolean enable, DiscrepancyConfigPtr dcp);
typedef void (*PerformDiscrepancyTest) PROTO ((ValNodePtr PNTR, ValNodePtr));
extern ValNodePtr CollectDiscrepancies (DiscrepancyConfigPtr dcp, ValNodePtr sep_list, PerformDiscrepancyTest taxlookup);
extern CharPtr GetDiscrepancyItemText (ValNodePtr vnp);
+extern void VisitGenProdSetFeatures (SeqEntryPtr sep, Pointer userdata, VisitFeaturesFunc callback);
+extern ValNodePtr ReplaceDiscrepancyItemWithFeatureTableStrings (ValNodePtr feat_list);
+extern CharPtr GetParentLabelForDiscrepancyItem (ValNodePtr vnp);
extern void WriteDiscrepancy (FILE *fp, ClickableItemPtr dip, Boolean use_feature_table_fmt);
extern void WriteDiscrepancyEx (FILE *fp, ClickableItemPtr dip, Boolean use_feature_table_fmt, ValNodePtr filename_list, CharPtr descr_prefix);
+/* structure shared by tbl2asn and discrepancy report functions */
+typedef struct genprodsetdiscrepancylists {
+ ValNodePtr cds_product_list;
+ ValNodePtr mrna_product_list;
+ ValNodePtr missing_mrna_product;
+ ValNodePtr missing_protein_id;
+} GenProdSetDiscrepancyListsData, PNTR GenProdSetDiscrepancyListsPtr;
+
+extern void CheckGenProdSetsInSeqEntry (SeqEntryPtr sep, GenProdSetDiscrepancyListsPtr lists);
+
+
+typedef struct protidlists {
+ ValNodePtr missing_gnl_list;
+ ValNodePtr gnl_list;
+} ProtIdListsData, PNTR ProtIdListsPtr;
+
+/* structure shared by tbl2asn and discrepancy report functions */
+typedef struct globaldiscrepancy {
+ CharPtr str;
+ Uint1 data_choice;
+ Pointer data;
+} GlobalDiscrepancyData, PNTR GlobalDiscrepancyPtr;
+
+extern GlobalDiscrepancyPtr GlobalDiscrepancyNew (CharPtr str, Uint1 data_choice, Pointer data);
+extern GlobalDiscrepancyPtr GlobalDiscrepancyFree (GlobalDiscrepancyPtr g);
+extern ValNodePtr FreeGlobalDiscrepancyList (ValNodePtr vnp);
+extern void ConvertGlobalDiscrepancyToText (GlobalDiscrepancyPtr g, Boolean use_feature_fmt);
+extern void ConvertGlobalDiscrepancyListToText (ValNodePtr vnp, Boolean use_feature_fmt);
+extern ValNodePtr GetGlobalDiscrepancyItem (GlobalDiscrepancyPtr g);
+extern CharPtr GetGlobalDiscrepancyStr (GlobalDiscrepancyPtr g);
+NLM_EXTERN int LIBCALLBACK SortVnpByGlobalDiscrepancyString (VoidPtr ptr1, VoidPtr ptr2);
+extern ClickableItemPtr
+ReportNonUniqueGlobalDiscrepancy
+(ValNodePtr vnp,
+ CharPtr label_fmt,
+ CharPtr ind_cat_fmt,
+ Uint4 clickable_item_type,
+ Boolean keep_top_category);
+extern ValNodePtr ReportInconsistentGlobalDiscrepancyPrefixes
+(ValNodePtr vnp,
+ CharPtr label_fmt,
+ Uint4 clickable_item_type);
+extern ValNodePtr ReportInconsistentGlobalDiscrepancyStrings
+(ValNodePtr vnp,
+ CharPtr label_fmt,
+ Uint4 clickable_item_type);
+extern ClickableItemPtr ReportMissingFields (ValNodePtr list, CharPtr label_fmt, Uint4 clickable_item_type);
+extern ClickableItemPtr ReportBadLocusTagFormat (ValNodePtr list);
+extern ClickableItemPtr FindAdjacentDuplicateLocusTagGenes (ValNodePtr locus_tag_list);
+extern void FindProteinIDCallback (BioseqPtr bsp, Pointer userdata);
+
+
+/* formats for global discrepancies also used by tbl2asn */
+extern CharPtr discReportDuplicateLocusTagFmt;
+extern CharPtr discReportOneDuplicateLocusTagFmt;
+extern CharPtr discReportDuplicateProteinIDFmt;
+extern CharPtr discReportOneDuplicateProteinIDFmt;
+extern CharPtr discReportDuplicateTranscriptIdFmt;
+extern CharPtr discReportOneDuplicateTranscriptIdFmt;
+extern CharPtr discReportInconsistentLocusTagPrefixFmt;
+extern CharPtr discReportMissingLocusTags;
+extern CharPtr discReportInconsistentProteinIDPrefixFmt;
+extern CharPtr discReportBadProteinIdFmt;
+extern CharPtr discReportMissingTranscriptIDFmt;
+
extern CharPtr GetBioseqSetLabel (BioseqSetPtr bssp);
+NLM_EXTERN ValNodePtr ValNodeDupStringList (ValNodePtr vnp);
+
+
+typedef enum {
+ eLocusTagErrorBadFormat,
+ eLocusTagErrorDuplicate,
+ eLocusTagErrorInconsistentPrefix
+} ELocusTagError;
+
+NLM_EXTERN ValNodePtr FindBadLocusTagsInList (ValNodePtr list);
+
/* for the Barcode Discrepancy Test */
typedef enum {
eBarcodeTest_Length = 0,
@@ -935,6 +1028,8 @@ extern ValNodePtr GetBarcodeDiscrepancies (ValNodePtr sep_list, BarcodeTestConfi
/* This one lists accessions that fail */
extern ValNodePtr GetBarcodeFailedAccessionList (SeqEntryPtr sep, BarcodeTestConfigPtr cfg);
extern ValNodePtr GetBarcodePassFail (SeqEntryPtr sep, BarcodeTestConfigPtr cfg);
+/* This one lists passes and failures, with reasons for failures */
+extern void WriteBarcodeTestComprehensive (FILE *fp, ValNodePtr results_list);
extern void WriteBarcodeDiscrepancies (FILE *fp, ValNodePtr results_list);
extern void WriteBarcodeTestCompliance (FILE *fp, ValNodePtr results_list);
extern void WriteBarcodeTagTable (FILE *fp, ValNodePtr results_list);
@@ -947,6 +1042,20 @@ extern Boolean PassBarcodeTests (BarcodeTestResultsPtr res);
#define FILENAME_LIST_ENTITY_ID_ITEM 1
#define FILENAME_LIST_FILENAME_ITEM 2
+extern ValNodePtr FreeFilenameList (ValNodePtr filename_list);
+
+typedef struct discreportoutputconfig {
+ Boolean use_feature_table_format;
+ Boolean expand_report_categories[MAX_DISC_TYPE];
+ Boolean summary_report;
+ ValNodePtr filename_list;
+} DiscReportOutputConfigData, PNTR DiscReportOutputConfigPtr;
+
+extern CharPtr ExpandDiscrepancyReportTestsFromString (CharPtr list, Boolean expand, DiscReportOutputConfigPtr dcp);
+extern void CollateDiscrepancyReports (ValNodePtr PNTR discrepancy_reports);
+extern void WriteAsnDiscReport (ValNodePtr discrepancy_list, FILE *ofp, DiscReportOutputConfigPtr oc, Boolean use_flag);
+
+
/* extern to allow access to subsource_subtype_alist */
typedef struct Nlm_qual_name_assoc {
Nlm_CharPtr name;
@@ -976,10 +1085,335 @@ extern Boolean GeneRefMatch (GeneRefPtr grp1, GeneRefPtr grp2);
extern void IsCorrectLatLonFormat (CharPtr lat_lon, BoolPtr format_correct, BoolPtr lat_in_range, BoolPtr lon_in_range);
extern CharPtr FixLatLonFormat (CharPtr orig_lat_lon);
+extern Boolean ParseLatLon (CharPtr lat_lon, FloatHi PNTR latP, FloatHi PNTR lonP);
extern void ApplyBarcodeDbxrefsToBioseq (BioseqPtr bsp, Pointer data);
extern CharPtr GetCountryFix (CharPtr country, CharPtr PNTR country_list);
+extern CharPtr ncrnaClassList[];
+extern Int4 NcrnaOTHER;
+extern Boolean IsStringInNcRNAClassList (CharPtr str);
+extern ValNodePtr ListFeaturesInLocation (BioseqPtr bsp, SeqLocPtr slp, Uint1 seqfeatChoice, Uint1 featdefChoice);
+extern ValNodePtr ListCodingRegionsContainedInSourceFeatures (SeqEntryPtr sep);
+extern ValNodePtr ListFeaturesOverlappingLocation (BioseqPtr bsp, SeqLocPtr slp, Uint1 seqfeatChoice, Uint1 featdefChoice);
+
+extern void ConvertSourceFeatDescProc (SeqFeatPtr sfp, Pointer userdata);
+
+/* for correcting capitalization */
+NLM_EXTERN void
+FixCapitalizationInElement
+(CharPtr PNTR pEl,
+ Boolean bAbbrev,
+ Boolean bShortWords,
+ Boolean bApostrophes);
+
+NLM_EXTERN void FixAbbreviationsInElement (CharPtr PNTR pEl);
+NLM_EXTERN void FixOrgNamesInString (CharPtr str, ValNodePtr org_names);
+NLM_EXTERN void ResetCapitalization (Boolean first_is_upper, CharPtr pString);
+
+NLM_EXTERN SeqIdPtr CreateSeqIdFromText (CharPtr id_str, SeqEntryPtr sep);
+NLM_EXTERN SeqLocPtr SeqLocWholeNew (BioseqPtr bsp);
+NLM_EXTERN Int4 GetDeltaSeqLen (DeltaSeqPtr dsp);
+
+typedef SeqAlignPtr (*GlobalAlignFunc) PROTO ((BioseqPtr, BioseqPtr, BoolPtr));
+
+typedef struct adjustfeatforgap {
+ ValNodePtr feature_list;
+ Boolean unknown_gaps;
+ Boolean known_gaps;
+ Boolean make_partial;
+ Boolean partial_for_pseudo;
+ Boolean trim_ends;
+ Boolean split_internal;
+ GlobalAlignFunc align_func;
+ ValNodePtr features_in_gap;
+} AdjustFeatForGapData, PNTR AdjustFeatForGapPtr;
+
+NLM_EXTERN AdjustFeatForGapPtr AdjustFeatForGapFree (AdjustFeatForGapPtr agp);
+NLM_EXTERN Boolean FeatureOkForFeatureList (SeqFeatPtr sfp, ValNodePtr feature_list);
+NLM_EXTERN void
+LocationContainsGaps
+(SeqLocPtr slp,
+ BioseqPtr bsp,
+ Boolean unknown_gaps,
+ Boolean known_gaps,
+ BoolPtr terminal_gaps,
+ BoolPtr internal_gaps,
+ BoolPtr entirely_in_gap);
+
+NLM_EXTERN void AdjustFeatureForGapsCallback (SeqFeatPtr sfp, Pointer data);
+NLM_EXTERN void MarkFeaturesInGapsForDeletion (AdjustFeatForGapPtr afgp);
+NLM_EXTERN void AdjustCDSLocationsForUnknownGapsCallback (SeqFeatPtr sfp, Pointer data);
+NLM_EXTERN Boolean GapInLocation (Int4 seq_offset, Int4 length, SeqLocPtr loc);
+NLM_EXTERN BioseqPtr
+AddProteinSequenceCopy
+(BioseqPtr protbsp,
+ BioseqPtr featbsp,
+ SeqFeatPtr new_sfp,
+ Uint2 entityID);
+NLM_EXTERN void AdjustFrame (SeqFeatPtr sfp, BioseqPtr oldprot);
+NLM_EXTERN void SetProductSequencePartials (BioseqPtr protbsp, Boolean partial5, Boolean partial3);
+NLM_EXTERN void AddCDSGapComment (SeqFeatPtr sfp);
+
+
+NLM_EXTERN Boolean SeqEdFixProteinFeatures (BioseqPtr oldbsp, BioseqPtr newbsp, Boolean force_fix, GlobalAlignFunc align_func);
+NLM_EXTERN void SeqEdTranslateOneCDS (SeqFeatPtr sfp, BioseqPtr featbsp, Uint2 entityID, GlobalAlignFunc align_func);
+
+NLM_EXTERN CharPtr GetStateAbbreviation (CharPtr state);
+
+extern const CharPtr TSA_assembly_from;
+extern const CharPtr TSA_assembly_to;
+extern const CharPtr TSA_primary_id;
+extern const CharPtr TSA_primary_from;
+extern const CharPtr TSA_primary_to;
+
+NLM_EXTERN UserFieldPtr AddLineToTranscriptomeTable (Int4 assembly_from, Int4 assembly_to, CharPtr primary_id, Int4 primary_from, Int4 primary_to);
+NLM_EXTERN Boolean AddTranscriptomeTable (BioseqPtr bsp, FILE *fp);
+NLM_EXTERN SeqFeatPtr GetGeneForFeature (SeqFeatPtr sfp);
+
+NLM_EXTERN Boolean IsStringInSpanInList (CharPtr str, CharPtr list);
+
+NLM_EXTERN void ParseGoTermsFromFields (SeqEntryPtr sep);
+
+/* for autodef */
+typedef enum {
+ RemovableExon = 0,
+ RemovableIntron,
+ Removable5UTR,
+ Removable3UTR,
+ RemovableCDS,
+ RemovablePromoter,
+ RemovableLTR,
+ RemovableNoncodingProductFeat,
+ RemovableMobileElement,
+ RemovablePrecursorRNA,
+ NumRemovableItems
+} RemovableList;
+NLM_EXTERN CharPtr GetRemovableItemName (Int4 i);
+
+typedef enum {
+ DEFLINE_USE_FEATURES = 1,
+ DEFLINE_COMPLETE_SEQUENCE,
+ DEFLINE_COMPLETE_GENOME
+} DefLineType;
+
+typedef struct deflinefeaturerequestlist {
+ Boolean keep_items[NumRemovableItems];
+ Boolean add_fake_promoters;
+ Boolean suppress_alt_splice_phrase;
+ Boolean remove_subfeatures;
+ DefLineType feature_list_type;
+ Int4 misc_feat_parse_rule;
+ Boolean suppress_locus_tags;
+ ValNodePtr suppressed_feature_list;
+ Boolean use_ncrna_note;
+} DeflineFeatureRequestList, PNTR DeflineFeatureRequestListPtr;
+
+NLM_EXTERN void InitFeatureRequests (DeflineFeatureRequestListPtr feature_requests);
+
+
+/* ModifierItemLocalData is used to store information about the results of
+ * a search of the set of organisms in a record and the results of user
+ * input to a dialog for deciding which modifiers should be used in the
+ * organism description.
+ */
+typedef struct modifieritemlocal {
+/* ButtoN button; */
+ Boolean any_present;
+ Boolean all_present;
+ Boolean is_unique;
+ CharPtr first_value_seen;
+ ValNodePtr values_seen;
+ Boolean all_unique;
+ CharPtr status;
+ Boolean required;
+} ModifierItemLocalData, PNTR ModifierItemLocalPtr;
+
+typedef enum {
+ DEFLINE_POS_Acronym = 0,
+ DEFLINE_POS_Anamorph,
+ DEFLINE_POS_Authority,
+ DEFLINE_POS_Bio_material,
+ DEFLINE_POS_Biotype,
+ DEFLINE_POS_Biovar,
+ DEFLINE_POS_Breed,
+ DEFLINE_POS_Cell_line,
+ DEFLINE_POS_Cell_type,
+ DEFLINE_POS_Chemovar,
+ DEFLINE_POS_Chromosome,
+ DEFLINE_POS_Clone,
+ DEFLINE_POS_Clone_lib,
+ DEFLINE_POS_Collected_by,
+ DEFLINE_POS_Collection_date,
+ DEFLINE_POS_Common,
+ DEFLINE_POS_Country,
+ DEFLINE_POS_Cultivar,
+ DEFLINE_POS_Culture_collection,
+ DEFLINE_POS_Dev_stage,
+ DEFLINE_POS_Ecotype,
+ DEFLINE_POS_Endogenous_virus_name,
+ DEFLINE_POS_Environmental_sample,
+ DEFLINE_POS_Forma,
+ DEFLINE_POS_Forma_specialis,
+ DEFLINE_POS_Frequency,
+ DEFLINE_POS_Genotype,
+ DEFLINE_POS_Germline,
+ DEFLINE_POS_Group,
+ DEFLINE_POS_Haplotype,
+ DEFLINE_POS_Identified_by,
+ DEFLINE_POS_Isolate,
+ DEFLINE_POS_Isolation_source,
+ DEFLINE_POS_Lab_host,
+ DEFLINE_POS_Lat_lon,
+ DEFLINE_POS_Map,
+ DEFLINE_POS_Metagenomic,
+ DEFLINE_POS_Note_orgmod,
+ DEFLINE_POS_Note_subsrc,
+ DEFLINE_POS_Pathovar,
+ DEFLINE_POS_Plasmid_name,
+ DEFLINE_POS_Plastid_name,
+ DEFLINE_POS_Pop_variant,
+ DEFLINE_POS_Rearranged,
+ DEFLINE_POS_Segment,
+ DEFLINE_POS_Serogroup,
+ DEFLINE_POS_Serotype,
+ DEFLINE_POS_Serovar,
+ DEFLINE_POS_Sex,
+ DEFLINE_POS_Specific_host,
+ DEFLINE_POS_Specimen_voucher,
+ DEFLINE_POS_Strain,
+ DEFLINE_POS_Subclone,
+ DEFLINE_POS_Subgroup,
+ DEFLINE_POS_Sub_species,
+ DEFLINE_POS_Substrain,
+ DEFLINE_POS_Subtype,
+ DEFLINE_POS_Synonym,
+ DEFLINE_POS_Teleomorph,
+ DEFLINE_POS_Tissue_lib,
+ DEFLINE_POS_Tissue_type,
+ DEFLINE_POS_Transgenic,
+ DEFLINE_POS_Type,
+ DEFLINE_POS_Variety
+} DefLinePos;
+
+/* ModifierItemGlobalData is used to store information about the available
+ * modifiers - the name to use when displaying a list of checkboxes, whether
+ * the modifier is an Organism modifier or a Source modifier, the subtype
+ * to use when looking for the modifier in the organism qualifier list,
+ * and whether this modifier is required by default.
+ */
+typedef struct modifieritemglobal {
+ CharPtr name;
+ Boolean isOrgMod;
+ Uint1 subtype;
+} ModifierItemGlobalData, PNTR ModifierItemGlobalPtr;
+
+extern ModifierItemGlobalData DefLineModifiers[];
+NLM_EXTERN size_t NumDefLineModifiers (void);
+
+/* OrganismDescriptionModifiers is used to apply specific user preferences
+ * for how to construct the organism descriptions - whether or not to use
+ * labels for the modifiers, whether and how to limit the number of modifiers
+ * used in any one organism description, whether to keep or remove modifier
+ * information in parentheses in the organism taxonomy name, and whether or
+ * not to apply modifiers to organisms with "sp." in the middle of the
+ * taxonomy name.
+ */
+typedef struct organismdescriptionmodifiers {
+ Boolean use_labels;
+ Int2 max_mods;
+ Boolean keep_paren;
+ Boolean exclude_sp;
+ Boolean exclude_cf;
+ Boolean exclude_aff;
+ Boolean exclude_nr;
+ Boolean include_country_extra;
+ Int4 clone_isolate_HIV_rule_num;
+ Boolean use_modifiers;
+ Boolean allow_semicolon_in_modifier;
+} OrganismDescriptionModifiers, PNTR OrganismDescriptionModifiersPtr;
+
+/* These values are used for the clone_isolate_HIV_rule_num value in OrganismDescriptionModifiers */
+typedef enum {
+ clone_isolate_HIV_rule_prefer_clone = 1,
+ clone_isolate_HIV_rule_prefer_isolate,
+ clone_isolate_HIV_rule_want_both
+} clone_isolate_HIV_rule_values;
+
+
+typedef struct sourcequaldesc
+{
+ CharPtr name;
+ Boolean isOrgMod;
+ Uint1 subtype;
+ Uint1 subfield;
+} SourceQualDescData, PNTR SourceQualDescPtr;
+
+NLM_EXTERN void SetRequiredModifiers (ModifierItemLocalPtr modList);
+NLM_EXTERN void CountModifiers (ModifierItemLocalPtr ItemList, SeqEntryPtr sep);
+NLM_EXTERN ValNodePtr FindBestModifiers(SeqEntryPtr sep, ModifierItemLocalPtr ItemList);
+NLM_EXTERN ValNodePtr GetModifierIndicesFromModList (ModifierItemLocalPtr modList);
+
+
+
+NLM_EXTERN CharPtr MergeValNodeStrings (ValNodePtr list, Boolean useReturn);
+
+NLM_EXTERN void BuildDefLineFeatClauseList
+( SeqEntryPtr sep,
+ Uint2 entityID,
+ DeflineFeatureRequestList PNTR feature_requests,
+ Int2 product_flag,
+ Boolean alternate_splice_flag,
+ Boolean gene_cluster_opp_strand,
+ ValNodePtr PNTR list);
+
+NLM_EXTERN Boolean AreFeatureClausesUnique (ValNodePtr list);
+NLM_EXTERN void DefLineFeatClauseListFree (ValNodePtr vnp);
+
+NLM_EXTERN void
+BuildDefinitionLinesFromFeatureClauseLists
+(ValNodePtr list,
+ ModifierItemLocalPtr modList,
+ ValNodePtr modifier_indices,
+ OrganismDescriptionModifiersPtr odmp);
+
+NLM_EXTERN void
+AutoDefForSeqEntry
+(SeqEntryPtr sep,
+ Uint2 entityID,
+ OrganismDescriptionModifiersPtr odmp,
+ ModifierItemLocalPtr modList,
+ ValNodePtr modifier_indices,
+ DeflineFeatureRequestListPtr feature_requests,
+ Int2 product_flag,
+ Boolean alternate_splice_flag,
+ Boolean gene_cluster_opp_strand);
+
+NLM_EXTERN Boolean IsSpName (CharPtr taxName);
+
+#define DEFAULT_ORGANELLE_CLAUSE 10
+NLM_EXTERN BioSourcePtr GetBiopForBsp (BioseqPtr bsp);
+NLM_EXTERN Boolean IsLocAInBonSameStrand (SeqLocPtr slp1, SeqLocPtr slp2);
+NLM_EXTERN void CleanUpTaxName (CharPtr taxName, Boolean keep_in_paren);
+NLM_EXTERN Boolean UseOrgModifier (OrgModPtr mod, CharPtr taxName);
+NLM_EXTERN void AddModifierLabel
+( Boolean use_labels,
+ Boolean is_orgmod,
+ Uint1 subtype,
+ CharPtr modifier_text);
+NLM_EXTERN Boolean LIBCALLBACK IsMobileElement (SeqFeatPtr sfp);
+NLM_EXTERN void RemoveNucProtSetTitles (SeqEntryPtr sep);
+
+
+NLM_EXTERN ValNodePtr ReadTabTableFromFile (FILE *fp);
+NLM_EXTERN ValNodePtr FreeTabTable (ValNodePtr row_list);
+NLM_EXTERN ValNodePtr CountTabTableBlanks (ValNodePtr row_list);
+NLM_EXTERN ValNodePtr ScanTabTableForSpecialCharacters (ValNodePtr row_list);
+
+NLM_EXTERN void SpecialCharFindWithContext (CharPtr PNTR strp, Pointer userdata, BoolPtr did_find, BoolPtr did_change);
+NLM_EXTERN ValNodePtr FreeContextList (ValNodePtr context_list);
+
+NLM_EXTERN Int4 ExtendSeqLocToEnd (SeqLocPtr slp, BioseqPtr bsp, Boolean end5);
#ifdef __cplusplus
}
diff --git a/api/subutil.c b/api/subutil.c
index d962350e..416c2521 100644
--- a/api/subutil.c
+++ b/api/subutil.c
@@ -29,7 +29,7 @@
*
* Version Creation Date: 11/3/93
*
-* $Revision: 6.71 $
+* $Revision: 6.72 $
*
* File Description: Utilities for creating ASN.1 submissions
*
@@ -39,339 +39,6 @@
* ------- ---------- -----------------------------------------------------
*
*
-* $Log: subutil.c,v $
-* Revision 6.71 2007/06/26 15:50:57 kans
-* cleanup GO: and GO_REF: prefixes on go id or go ref
-*
-* Revision 6.70 2007/06/08 14:48:46 kans
-* AddToGeneOntologyUserObject adds goref argument
-*
-* Revision 6.69 2007/05/07 13:28:35 kans
-* added casts for Seq-data.gap (SeqDataPtr, SeqGapPtr, ByteStorePtr)
-*
-* Revision 6.68 2007/04/05 19:14:13 bollin
-* Added function for adding a Pnt location to another location without creating
-* an intermediate SeqFeat.
-*
-* Revision 6.67 2006/09/22 15:00:56 kans
-* removed NCBI from StructuredCommentPrefix/Suffix
-*
-* Revision 6.66 2006/09/18 18:40:30 kans
-* special symbols for structured comment prefix, suffix, for parsing flatfile
-*
-* Revision 6.65 2006/07/13 17:06:39 bollin
-* use Uint4 instead of Uint2 for itemID values
-* removed unused variables
-* resolved compiler warnings
-*
-* Revision 6.64 2006/05/05 19:49:40 kans
-* added StructuredComment user object creation functions
-*
-* Revision 6.63 2006/03/23 19:35:55 kans
-* expand keywords with semicolons in AddGenBankBlockToEntry, not BSEC - already done in ParseTitleIntoGenBank
-*
-* Revision 6.62 2006/02/06 19:00:15 kans
-* added CreateFeatureFetchPolicyUserObject
-*
-* Revision 6.61 2006/01/23 20:57:04 kans
-* cosmetic change
-*
-* Revision 6.60 2006/01/23 16:39:57 kans
-* added CreateAnnotDescCommentPolicyUserObject
-*
-* Revision 6.59 2006/01/17 20:47:05 kans
-* fixed AddIDsToGenomeProjectsDBUserObject
-*
-* Revision 6.58 2006/01/17 18:25:06 kans
-* support for genomeprojectsdb user object
-*
-* Revision 6.57 2005/10/26 21:30:46 kans
-* bug fix in AddSecondaryAccnToEntry provided by Joe Carlson
-*
-* Revision 6.56 2005/03/30 21:13:49 bollin
-* added function AddIntToSeqLoc
-*
-* Revision 6.55 2003/10/16 17:16:33 mjohnson
-*
-* Added ORG_* and IS_ORG_* defines for origins. Use these constants
-* and macros instead of small integers.
-*
-* Revision 6.54 2003/10/08 16:46:44 kans
-* fix in AddCompleteness (KT)
-*
-* Revision 6.53 2003/07/11 18:22:45 kans
-* AddSourceToRefGeneTrackUserObject
-*
-* Revision 6.52 2002/11/05 17:01:55 kans
-* refgene tracking user object uses comment as name if accession is empty
-*
-* Revision 6.51 2002/09/30 16:31:36 kans
-* support for new BioseqseqSet_class_wgs_set
-*
-* Revision 6.50 2002/07/10 14:36:29 kans
-* fixed TpaAssembly user object - from and to were being placed at wrong level
-*
-* Revision 6.49 2002/07/09 16:25:45 kans
-* if from and to are 0, do not add those fields to TPA user object
-*
-* Revision 6.48 2002/07/09 16:17:35 kans
-* AddAccessionToTpaAssemblyUserObject takes from and to parameters
-*
-* Revision 6.47 2002/06/04 14:40:29 kans
-* added AddPntToSeqFeat
-*
-* Revision 6.46 2002/03/27 19:26:31 kans
-* AddToGeneOntologyUserObject takes string for GO id to keep leading zeroes
-*
-* Revision 6.45 2001/12/11 16:50:41 kans
-* added TpaAssembly user object creation functions
-*
-* Revision 6.44 2001/11/09 19:51:42 kans
-* fix in FindModelEvidenceField
-*
-* Revision 6.43 2001/11/09 15:12:21 kans
-* moved collaborator to separate function per user object
-*
-* Revision 6.42 2001/11/09 13:21:08 kans
-* added collaborator field to reftrack user object
-*
-* Revision 6.41 2001/11/09 12:54:47 kans
-* added model evidence user object functions
-*
-* Revision 6.40 2001/10/12 21:55:20 kans
-* convert nucleotide X to N
-*
-* Revision 6.39 2001/07/30 19:54:14 kans
-* forgot to set dbt->db to taxon
-*
-* Revision 6.38 2001/07/29 16:23:58 kans
-* added AddOrganismToEntryEx to allow entry of taxonID
-*
-* Revision 6.37 2001/02/14 23:58:42 kans
-* handle BioseqseqSet_class_eco_set
-*
-* Revision 6.36 2001/01/25 19:55:13 kans
-* added AddGenBankSetToSubmission for patents and other bulk submissions of unrelated sequences
-*
-* Revision 6.35 2000/11/15 23:17:59 kans
-* gene ontology user object functions
-*
-* Revision 6.34 2000/09/25 23:19:52 kans
-* mrna prot link user object now uses fasta long on the single best id, preferring refseq
-*
-* Revision 6.33 2000/09/20 12:32:53 kans
-* removed AddMethodToRefGeneTrackUserObject and AddSupportToRefGeneTrackUserObject
-*
-* Revision 6.32 2000/08/29 22:27:01 kans
-* reftrack support now has organism field
-*
-* Revision 6.31 2000/07/21 11:08:00 kans
-* place method after status and above accession or support user object fields
-*
-* Revision 6.30 2000/07/21 10:54:13 kans
-* added functions for adding Method and Support to RefGeneTrack user object
-*
-* Revision 6.29 2000/03/14 13:33:32 kans
-* NCBISubValidate sets indexing, adds AppProperty to shut off specific messages to be decided later
-*
-* Revision 6.28 2000/03/10 18:35:45 kans
-* added CreateContigCloneUserObject for genome contig RefSeq records
-*
-* Revision 6.27 2000/02/28 19:02:57 kans
-* AddSecondaryAccnToEntry does not need submission parameter set
-*
-* Revision 6.26 2000/02/28 18:46:12 kans
-* fixes for add phrap to seqlit
-*
-* Revision 6.25 2000/02/26 23:55:33 kans
-* added AddPhrapGraphToSeqLit, using internal extended SeqLit to track, readjust graphs to current position of seqlit in delta seq - may need to move fields to public SeqLit if problems arise
-*
-* Revision 6.24 2000/02/24 23:15:00 kans
-* added AddSecondaryAccnToEntry
-*
-* Revision 6.23 2000/02/23 19:25:53 kans
-* AddFakeGapToDeltaSeq returns SeqLitPtr so program can set fuzz after SpreadGapsInDeltaSeq is no longer being called
-*
-* Revision 6.22 2000/02/23 18:28:38 kans
-* added AddFakeGapToDeltaSeq to set fuzz even if nonzero length is passed in
-*
-* Revision 6.21 2000/02/07 16:48:07 ostell
-* added AddDeltaSeqToNucProtEntry()
-*
-* Revision 6.20 1999/12/23 17:26:29 kans
-* free old reftrack status string if replacing
-*
-* Revision 6.19 1999/12/20 20:35:12 kans
-* fixed problem with add refseq status field
-*
-* Revision 6.18 1999/12/20 19:57:44 kans
-* added AddStatusToRefGeneTrackUserObject
-*
-* Revision 6.17 1999/12/08 20:00:14 kans
-* AddOrgModToEntry calls OrgNameNew if necessary
-*
-* Revision 6.16 1999/10/05 17:24:54 kans
-* SeqDescrNew and SeqDescrAdd for new descriptors
-*
-* Revision 6.15 1999/08/05 20:43:44 kans
-* added CreateSubmissionUserObject (JP)
-*
-* Revision 6.14 1998/12/09 20:38:25 kans
-* changed compl to compr to avoid new c++ symbol collision
-*
-* Revision 6.13 1998/10/02 17:48:11 kans
-* new parameters to AddAccessionToRefGeneTrackUserObject, and added CreateMrnaProteinLinkUserObject
-*
-* Revision 6.12 1998/09/23 16:41:48 kans
-* removed from and to from AddAccessionToRefGeneTrackUserObject
-*
-* Revision 6.11 1998/08/20 20:36:58 kans
-* add comment parameter to reftrack user object function
-*
-* Revision 6.10 1998/08/11 22:27:25 kans
-* added CreateRefGeneTrackUserObject and AddAccessionToRefGeneTrackUserObject
-*
-* Revision 6.9 1998/05/27 20:42:05 kans
-* default hup is one year from the end of current month
-*
-* Revision 6.8 1998/03/02 17:19:15 kans
-* changed SixMonthsFromToday to DateAdvance
-*
-* Revision 6.7 1998/03/02 17:13:46 shavirin
-* ... and in the case when hold_until_publish == TRUE
-*
-* Revision 6.6 1998/03/02 17:08:39 shavirin
-* Added SixMonthsFromToday(NULL); in NCBISubCreate()
-*
-* Revision 6.5 1998/02/05 19:19:25 kans
-* added AddPhrapGraph
-*
-* Revision 6.4 1998/01/09 20:16:47 shavirin
-* Removed creation of Imprint in CitArtBuild () and CitSubUpdateBuild()
-*
-* Revision 6.3 1998/01/06 03:29:46 ostell
-* added AddGeneticCodetoEntry()
-*
-* Revision 6.2 1997/12/15 17:31:43 kans
-* backed out accidental checkin
-*
-* Revision 6.0 1997/08/25 18:07:35 madden
-* Revision changed to 6.0
-*
-* Revision 5.19 1997/08/19 17:15:11 kans
-* included utilpars.h
-*
-* Revision 5.18 1997/08/19 16:51:52 tatiana
-* added ValidAminoAcid() to MakeRNAFeature
-*
-* Revision 5.17 1997/07/11 18:23:24 kans
-* added Add[Pop/Phy/Mut]SetToSubmission
-*
-* Revision 5.16 1997/06/19 18:39:09 vakatov
-* [WIN32,MSVC++] Adopted for the "NCBIOBJ.LIB" DLL'ization
-*
-* Revision 5.15 1997/05/16 19:13:57 ostell
-* moved prototype of NewDescrOnSeqEntry from subutil.c to subutil.h to make
-* it external.
-*
- * Revision 5.14 1996/09/05 20:20:28 ostell
- * added CitSubUpdateBuild()
- *
- * Revision 5.13 1996/09/04 22:33:06 ostell
- * added MakeCommentFeature()
- *
- * Revision 5.12 1996/08/30 13:17:01 ostell
- * made accession check allow 2+6 form
- *
- * Revision 5.11 1996/08/20 15:32:10 tatiana
- * static removed from AddBasesToByteStore and AddAAsToByteStore
- *
- * Revision 5.10 1996/08/15 20:29:19 ostell
- * in MaketRNAFeature() added support for 'U' in codon and for 'R'and 'Y' as
- * wobble bases
- *
- * Revision 5.9 1996/07/19 22:13:13 ostell
- * added SpreadGapsInDeltaSeq()
- *
- * Revision 5.8 1996/06/18 01:21:56 ostell
- * removed the step of adding exp-ev qualifier as well as etting flag in feat
- *
- * Revision 5.7 1996/06/14 19:01:54 ostell
- * minor fixes
- *
- * Revision 5.6 1996/06/14 19:00:06 ostell
- * fixed line wraps
- *
- * Revision 5.5 1996/06/14 18:07:38 ostell
- * added AddOrgModToEntry() and AddSubSourceToEntry()
- *
- * Revision 5.4 1996/06/14 17:14:55 ostell
- * fixed make of Dbtag
- *
- * Revision 5.3 1996/06/14 14:11:46 kans
- * fixed proper uninitialized seqlit variable (JO)
- *
- * Revision 5.2 1996/06/14 00:13:35 ostell
- * fixed unitnitialized variable
- *
- * Revision 5.1 1996/06/13 03:34:53 ostell
- * added support for delta seqs and submittor_key
- * fixed memory leak in AddAminoAcidsToBioseq()
- *
- * Revision 5.0 1996/05/28 13:23:23 ostell
- * Set to revision 5.0
- *
- * Revision 4.9 1996/03/12 13:48:41 ostell
- * added a cast
- *
- * Revision 4.8 1996/03/05 17:05:25 tatiana
- * change in NCBISubNewBioseq, moltype goes to MolInfo
- * ,
- *
- * Revision 4.7 1996/02/01 18:12:42 ostell
- * added curley braces to make gcc happy
- *
- * Revision 4.6 1996/01/31 02:35:00 ostell
- * added AddCodeBreakToCdRegion() and AddAntiCodonTotRNA()
- *
- * Revision 4.5 1995/10/05 14:48:29 tatiana
- * error msg added "Illegal character in Bioseq"
- *
- * Revision 4.4 1995/09/28 17:30:41 kans
- * added static to GetDNAConv and GetProteinConv
- *
- * Revision 4.3 1995/09/28 16:28:54 tatiana
- * a bug fixed in AddBasesToBioseq()
- *
- * Revision 4.2 1995/09/27 19:50:39 tatiana
- * check for illegal residues added
- *
- * Revision 4.1 1995/08/31 20:49:57 tatiana
- * strain length is set to 70 not to exeed the buffer length
- *
- * Revision 4.0 1995/07/26 13:49:01 ostell
- * force revision to 4.0
- *
- * Revision 1.20 1995/07/25 14:47:09 tatiana
- * remove static
- *
- * Revision 1.19 1995/07/20 19:37:31 tatiana
- * change SeqIdprint to SeqIdWrite
- *
- * Revision 1.18 1995/07/20 17:48:27 kans
- * removed static on AddModifierToEntry and AddPubToEntry
- *
- * Revision 1.17 1995/07/14 18:33:34 kans
- * added statics to functions, removed unused variables
- *
- * Revision 1.16 1995/07/14 18:08:43 tatiana
- * BioSource added
- *
- * Revision 1.11 1995/05/15 21:46:05 ostell
- * added Log line
- *
-*
-*
* ==========================================================================
*/
@@ -4551,6 +4218,43 @@ NLM_EXTERN void AddStatusToRefGeneTrackUserObject (UserObjectPtr uop, CharPtr st
curr->data.ptrvalue = (Pointer) StringSave (status);
}
+NLM_EXTERN void AddGeneratedToRefGeneTrackUserObject (UserObjectPtr uop, Boolean generated)
+
+{
+ UserFieldPtr curr;
+ ObjectIdPtr oip;
+ UserFieldPtr prev = NULL;
+
+ if (uop == NULL) return;
+ oip = uop->type;
+ if (oip == NULL || StringICmp (oip->str, "RefGeneTracking") != 0) return;
+
+ for (curr = uop->data; curr != NULL; curr = curr->next) {
+ oip = curr->label;
+ if (oip != NULL && StringICmp (oip->str, "Generated") == 0) {
+ break;
+ }
+ prev = curr;
+ }
+
+ if (curr == NULL) {
+ curr = UserFieldNew ();
+ oip = ObjectIdNew ();
+ oip->str = StringSave ("Generated");
+ curr->label = oip;
+ curr->choice = 4; /* boolean */
+ curr->data.boolvalue = generated;
+
+ /* link source at end of list */
+
+ if (prev != NULL) {
+ prev->next = curr;
+ } else {
+ uop->data = curr;
+ }
+ }
+}
+
NLM_EXTERN void AddCuratorToRefGeneTrackUserObject (UserObjectPtr uop, CharPtr collaborator)
{
@@ -4640,10 +4344,8 @@ NLM_EXTERN void AddSourceToRefGeneTrackUserObject (UserObjectPtr uop, CharPtr ge
}
NLM_EXTERN void AddAccessionToRefGeneTrackUserObject (UserObjectPtr uop, CharPtr field,
- CharPtr accn, Int4 gi,
- Boolean sequenceChange,
- Boolean annotationChange,
- CharPtr comment)
+ CharPtr accn, Int4 gi, Int4 from,
+ Int4 to, CharPtr comment)
{
UserFieldPtr curr;
@@ -4731,28 +4433,6 @@ NLM_EXTERN void AddAccessionToRefGeneTrackUserObject (UserObjectPtr uop, CharPtr
last = ufp;
}
- if (sequenceChange) {
- ufp = UserFieldNew ();
- oip = ObjectIdNew ();
- oip->str = StringSave ("sequenceChange");
- ufp->label = oip;
- ufp->choice = 4; /* Boolean */
- ufp->data.boolvalue = sequenceChange;
- last->next = ufp;
- last = ufp;
- }
-
- if (annotationChange) {
- ufp = UserFieldNew ();
- oip = ObjectIdNew ();
- oip->str = StringSave ("annotationChange");
- ufp->label = oip;
- ufp->choice = 4; /* Boolean */
- ufp->data.boolvalue = annotationChange;
- last->next = ufp;
- last = ufp;
- }
-
if (comment != NULL && *comment != '\0') {
ufp = UserFieldNew ();
oip = ObjectIdNew ();
@@ -4763,6 +4443,27 @@ NLM_EXTERN void AddAccessionToRefGeneTrackUserObject (UserObjectPtr uop, CharPtr
last->next = ufp;
last = ufp;
}
+
+ if (from == 0 && to == 0) return;
+ oip = curr->label;
+ if (oip == NULL || StringICmp (oip->str, "Assembly") != 0) return;
+
+ ufp = UserFieldNew ();
+ oip = ObjectIdNew ();
+ oip->str = StringSave ("from");
+ ufp->label = oip;
+ ufp->choice = 2; /* integer */
+ ufp->data.intvalue = from;
+ last->next = ufp;
+ last = ufp;
+
+ ufp = UserFieldNew ();
+ oip = ObjectIdNew ();
+ oip->str = StringSave ("to");
+ ufp->label = oip;
+ ufp->choice = 2; /* integer */
+ ufp->data.intvalue = to;
+ last->next = ufp;
}
NLM_EXTERN UserObjectPtr CreateMrnaProteinLinkUserObject (BioseqPtr bsp)
diff --git a/api/subutil.h b/api/subutil.h
index e593ef95..cfc2debc 100644
--- a/api/subutil.h
+++ b/api/subutil.h
@@ -31,7 +31,7 @@
*
* Version Creation Date: 11/3/93
*
-* $Revision: 6.61 $
+* $Revision: 6.64 $
*
* File Description: Utilities for creating ASN.1 submissions
*
@@ -42,6 +42,15 @@
*
*
* $Log: subutil.h,v $
+* Revision 6.64 2007/11/28 21:47:58 kans
+* added defines for mip->biomol ncRNA and tmRNA
+*
+* Revision 6.63 2007/11/08 16:43:18 kans
+* added chromosome and chromatophore to BioSource.genome defines
+*
+* Revision 6.62 2007/10/11 21:57:44 kans
+* added AddGeneratedToRefGeneTrackUserObject, changed AddAccessionToRefGeneTrackUserObject
+*
* Revision 6.61 2007/07/17 14:46:42 kans
* added support for metagenome_source orgmod
*
@@ -703,6 +712,8 @@ NLM_EXTERN SeqLitPtr AddLiteralToDeltaSeq (
#define MOLECULE_TYPE_CRNA 11
#define MOLECULE_TYPE_SNORNA 12
#define MOLECULE_TYPE_TRANSCRIBED_RNA 13
+#define MOLECULE_TYPE_NCRNA 14
+#define MOLECULE_TYPE_TMRNA 15
#define TOPOLOGY_LINEAR 1
#define TOPOLOGY_CIRCULAR 2
@@ -876,6 +887,8 @@ NLM_EXTERN Boolean AddGenBankBlockToEntry (
#define GENOME_proplastid 18
#define GENOME_endogenous_virus 19
#define GENOME_hydrogenosome 20
+#define GENOME_chromosome 21
+#define GENOME_chromatophore 22
/********************************************
* Genome describes the type of genome from which the DNA or gene for
@@ -1664,13 +1677,12 @@ NLM_EXTERN Boolean AddPhrapGraphToSeqLit (
/* internal functions for reference gene project */
NLM_EXTERN UserObjectPtr CreateRefGeneTrackUserObject (void);
NLM_EXTERN void AddStatusToRefGeneTrackUserObject (UserObjectPtr uop, CharPtr status);
+NLM_EXTERN void AddGeneratedToRefGeneTrackUserObject (UserObjectPtr uop, Boolean generated);
NLM_EXTERN void AddCuratorToRefGeneTrackUserObject (UserObjectPtr uop, CharPtr collaborator);
NLM_EXTERN void AddSourceToRefGeneTrackUserObject (UserObjectPtr uop, CharPtr genomicSource);
NLM_EXTERN void AddAccessionToRefGeneTrackUserObject (UserObjectPtr uop, CharPtr field,
- CharPtr accn, Int4 gi,
- Boolean sequenceChange,
- Boolean annotationChange,
- CharPtr comment);
+ CharPtr accn, Int4 gi, Int4 from,
+ Int4 to, CharPtr comment);
/* experimental function to associate mRNA with protein product in cases of alt splicing */
NLM_EXTERN UserObjectPtr CreateMrnaProteinLinkUserObject (BioseqPtr protbsp);
diff --git a/api/tofasta.c b/api/tofasta.c
index ac5dcfeb..8eb545d0 100644
--- a/api/tofasta.c
+++ b/api/tofasta.c
@@ -29,7 +29,7 @@
*
* Version Creation Date: 7/12/91
*
-* $Revision: 6.159 $
+* $Revision: 6.165 $
*
* File Description: various sequence objects to fasta output
*
@@ -38,703 +38,6 @@
* Date Name Description of modification
* ------- ---------- -----------------------------------------------------
*
-* $Log: tofasta.c,v $
-* Revision 6.159 2007/08/14 13:08:17 bollin
-* Corrected bug - not allocating enough memory for plasmid phrase in
-* auto-generated definition line.
-*
-* Revision 6.158 2007/06/12 15:23:36 kans
-* UseOrgMods takes tech argument, adds plasmid if wgs
-*
-* Revision 6.157 2007/05/07 13:28:35 kans
-* added casts for Seq-data.gap (SeqDataPtr, SeqGapPtr, ByteStorePtr)
-*
-* Revision 6.156 2007/04/12 21:23:49 kans
-* BioseqFastaStreamInternalEx removes > characters from FASTA defline - should only occur at start of line before seq-id
-*
-* Revision 6.155 2007/01/29 17:20:46 bollin
-* Added Ex methods to allow substitution of nucleotide sequence ID when exporting
-* protein FASTA.
-*
-* Revision 6.154 2006/11/16 22:05:34 kans
-* StrainNotAtEndOfTaxname now checks for strain in single quotes at end of orgname
-*
-* Revision 6.153 2006/07/13 17:06:39 bollin
-* use Uint4 instead of Uint2 for itemID values
-* removed unused variables
-* resolved compiler warnings
-*
-* Revision 6.152 2006/03/29 16:04:47 kans
-* in AddNcTitles, do not clear mip->completeness - cannot determine why this was done in the past
-*
-* Revision 6.151 2006/03/08 21:29:47 kans
-* FindNMDefLine calls ReplaceFlyDashPwithDashR if Drosophila melanogaster curated RefSeq
-*
-* Revision 6.150 2006/01/10 22:19:29 kans
-* CreateDefLine calls DoTpaPrefix to handle TPA_exp and TPA_inf
-*
-* Revision 6.149 2005/12/07 19:49:46 kans
-* in BioseqFastaStreamInternal, bail if virtual Bioseq
-*
-* Revision 6.148 2005/09/12 17:44:21 kans
-* in complete chromosome title, use virus instead of virion
-*
-* Revision 6.147 2005/07/15 19:01:37 kans
-* minor fixes for Xcode warnings
-*
-* Revision 6.146 2005/07/13 20:58:27 kans
-* FindNMDefLine looks for isoform in refseq record, changes to transcript variant for mrna title
-*
-* Revision 6.145 2005/06/15 20:26:13 dondosha
-* In FastaReadSequenceChunk, check for lines starting with comment characters # or !
-*
-* Revision 6.144 2005/06/01 18:03:27 camacho
-* Augmented FASTA_BUFFER_LEN by a factor of 4
-*
-* Revision 6.143 2005/05/23 15:44:37 dondosha
-* Skip empty lines in FastaReadSequenceChunk, also fixing a bug when one line is exactly 4096 characters long
-*
-* Revision 6.142 2005/04/27 14:30:33 kans
-* gpipe was making TPA defline, moved to its own case
-*
-* Revision 6.141 2005/04/26 21:33:52 kans
-* added SEQID_GPIPE
-*
-* Revision 6.140 2005/03/21 22:15:09 kans
-* added SeqLocFastaStream
-*
-* Revision 6.139 2004/10/22 19:56:45 kans
-* UseOrgMods has strain before chromosome and other qualifiers
-*
-* Revision 6.138 2004/10/14 19:36:34 kans
-* CreateDefLineExEx has extProtTitle argument, normally only use first protein name in defline
-*
-* Revision 6.137 2004/09/29 17:29:49 kans
-* FastaReadSequenceChunk checks return result of fgets, nulls out sequence [1] if failed
-*
-* Revision 6.136 2004/09/24 20:09:40 bollin
-* use best SeqID instead of first SeqID when exporting FASTA
-*
-* Revision 6.135 2004/07/23 20:55:52 kans
-* added BioseqFastaMemStream that takes byte store instead of file pointer
-*
-* Revision 6.134 2004/07/16 19:37:37 kans
-* SeqPortStream and FastaStream functions return Int4, negative count if any fetch failures
-*
-* Revision 6.133 2004/06/02 20:11:14 kans
-* In SeqEntryToFasta, if defline is >?unk100, make special local ID, recognized by tbl2asn
-*
-* Revision 6.132 2004/05/07 20:55:54 kans
-* MakeCompleteChromTitle handles organelles with multiple chromosomes, e.g., Guillardia theta nucleomorph
-*
-* Revision 6.131 2004/05/03 15:32:07 kans
-* BioseqFastaStream uses larger buffer for seqid because some RefSeqs use more than 41 characters for FASTA_LONG
-*
-* Revision 6.130 2004/04/21 14:42:36 kans
-* added blocklen and grouplen parameters to BioseqFastaStream and SeqEntryFastaStream, former also has do_defline parameter
-*
-* Revision 6.129 2004/04/20 20:38:03 kans
-* SimpleSegSeqTitle puts strain, clone, or isolate after organism name if no cds product present
-*
-* Revision 6.128 2004/04/06 14:03:32 bollin
-* use "extrachromosomal" instead of "extrachrom" in NC titles generated by
-* Special->Defline->NC_Cleanup
-*
-* Revision 6.127 2004/03/16 17:28:09 kans
-* BioseqFastaStream indexes features if no title to speed up creation
-*
-* Revision 6.126 2004/03/15 19:56:09 kans
-* BioseqFastaStream takes StreamFlgType flags parameter, added SeqEntryFastaStream for exploration
-*
-* Revision 6.125 2004/01/21 19:22:14 kans
-* UseOrgMods capitalizes first letter of created defline
-*
-* Revision 6.124 2003/12/23 20:58:51 kans
-* ProtDefLine takes prp->activity if prp->name and prp->desc are not set
-*
-* Revision 6.123 2003/11/18 19:04:29 kans
-* added BioseqFastaStream, rapid generator based on SeqPortStream
-*
-* Revision 6.122 2003/11/05 19:24:55 kans
-* BioseqToFastaX checks for virtual with do_virtual not set, prints a single dash as the sequence
-*
-* Revision 6.121 2003/08/04 19:51:02 kans
-* for complete chromosome title, if > 3 clones (by counting semicolons) then just display count, not full text of clones
-*
-* Revision 6.120 2003/07/25 16:15:25 kans
-* FindProtDefLine of hypothetical protein only needs to look for locus_tag
-*
-* Revision 6.119 2003/07/25 15:34:07 kans
-* protect FindProtDefLine against no parent CDS (e.g., SWISS-PROT segmented record P33072)
-*
-* Revision 6.118 2003/07/24 21:51:04 kans
-* if hypothetical protein, find gene and add to name
-*
-* Revision 6.117 2003/07/23 20:37:02 kans
-* if making htgs title, do not set iip values
-*
-* Revision 6.116 2003/07/22 18:31:44 kans
-* Added support for EMBLBlockPtr keywords in addition to GBBlockPtr keywords in suppressing sequencing in progress message
-*
-* Revision 6.115 2003/05/02 16:22:24 kans
-* added FindNRDefLine to make NR_ deflines on the fly
-*
-* Revision 6.114 2003/03/25 17:00:53 kans
-* CreateDefLine htgs suffix only shows if delta seq with more than 0 gaps
-*
-* Revision 6.113 2003/01/17 21:26:28 kans
-* because getc fails in OS_UNIX_DARWIN, NLM_GETC used to choose between fgetc or getc
-*
-* Revision 6.112 2002/11/27 18:58:46 kans
-* FindProtDefLine, called from CreateDefLineEx, adds unnamed protein product as last resort
-*
-* Revision 6.111 2002/11/14 16:20:26 kans
-* added FindNMDefLine for default NM_ defline if no title instantiated
-*
-* Revision 6.110 2002/08/22 17:33:39 madden
-* Print range on FASTA output if only partial sequence written
-*
-* Revision 6.109 2002/07/18 19:28:35 kans
-* working implementation of BioseqRawToFastaExtraEx, always zero out all of MyFsa struct, no need for fake seqloc
-*
-* Revision 6.107 2002/07/15 21:18:49 camacho
-* Fixed problem with revision 6.105
-*
-* Revision 6.105 2002/07/14 21:04:32 camacho
-* Added option to print a subsequence of a raw bioseq to fasta format
-*
-* Revision 6.104 2002/07/02 20:57:38 kimelman
-* GatherDescrOnBioseq: added parameter if only the first one required
-*
-* Revision 6.103 2002/06/19 13:56:25 kans
-* htgs_cancelled keyword suppresses sequencing in progress phrase in defline
-*
-* Revision 6.102 2002/05/28 19:02:53 dondosha
-* Correction to change in MakeTrustedID in revision 6.96
-*
-* Revision 6.101 2002/05/13 17:32:40 kans
-* restored complete sequence on phase 3
-*
-* Revision 6.100 2002/04/26 13:58:25 kans
-* phase 3 should not say complete sequence
-*
-* Revision 6.99 2002/04/25 20:34:08 kans
-* segments or pieces = CountGapsInDeltaSeq numgaps + 1, not numsegs - numgaps
-*
-* Revision 6.98 2002/04/24 18:47:21 kans
-* if >? construct, set is_gap variable, do not call FastaReadSequenceInternalEx, which overrides bsp->length
-*
-* Revision 6.97 2002/04/01 15:34:47 kans
-* changes for WGS master, individual deflines
-*
-* Revision 6.96 2002/03/11 21:21:35 dondosha
-* Change in MakeTrustedID: make use of the prefix argument
-*
-* Revision 6.95 2002/02/26 21:35:02 kans
-* UseOrgMods calls StrainNotAtEndOfTaxname
-*
-* Revision 6.94 2002/02/21 17:06:47 kans
-* CreateDefLineEx handles MI_TECH_wgs
-*
-* Revision 6.93 2002/01/16 17:02:04 camacho
-* Changed buflen and seqlen in MyFsa struct. to use Uint4, as well as some function prototypes
-*
-* Revision 6.92 2001/12/05 18:18:32 kans
-* for protein defline organism, check stop list before looking for overlapping source feature of parent CDS
-*
-* Revision 6.91 2001/10/12 21:55:21 kans
-* convert nucleotide X to N
-*
-* Revision 6.90 2001/10/09 15:28:04 kans
-* CreateDefLine adds TPA: prefix if third-party annotation record
-*
-* Revision 6.89 2001/08/31 15:29:53 kans
-* added CreateDefLineEx to ignore existing title descriptor, force generation of protein title computationally
-*
-* Revision 6.88 2001/08/17 13:56:18 kans
-* clear proteins only in NPS
-*
-* Revision 6.87 2001/08/17 13:27:26 kans
-* ClearProteinTitlesInNucProts, do not do it for outside protein databases
-*
-* Revision 6.86 2001/08/16 18:38:09 kans
-* ClearProtTitlesProc checks for ISA_aa (bsp->mol)
-*
-* Revision 6.85 2001/08/07 17:22:52 kans
-* added support for third party annotation SeqIDs
-*
-* Revision 6.84 2001/08/06 22:13:12 kans
-* using NUM_SEQID, added TPA ids to arrays
-*
-* Revision 6.83 2001/07/29 16:57:16 kans
-* MakeCompleteChromTitle adds the word segment unless it or DNA or RNA is in the ssp->name - additional logic may be desired later
-*
-* Revision 6.82 2001/06/25 23:47:47 kans
-* added InstantiateProteinTitles and ClearProteinTitles
-*
-* Revision 6.81 2001/06/08 14:41:35 kans
-* FindProtDefLine sees if features are indexed, and if so never calls the old gather-based functions if the indexed function returns NULL
-*
-* Revision 6.80 2001/04/18 22:07:41 kans
-* initialized mfa.printid_general in SeqEntrysToDefline
-*
-* Revision 6.79 2001/04/18 21:17:21 madden
-* set printid_general to fix umr in BioseqRawToFastaExtra
-*
-* Revision 6.78 2001/02/27 21:52:37 madden
-* Added BioseqToFastaDump and FastaDumpFileFunc for dumping BLAST db in FASTA
-*
-* Revision 6.77 2001/01/31 23:08:08 dondosha
-* Allow tab as well as space to be a separator between id and description
-*
-* Revision 6.76 2000/12/01 00:17:04 kans
-* MakeCompleteChromTitle uses completeness flag to say complete or partial sequence, complete genome or just genome
-*
-* Revision 6.75 2000/10/27 20:15:04 shavirin
-* Changed creation of Protein SeqIds to MT-safe function.
-*
-* Revision 6.74 2000/10/12 16:03:57 kans
-* added SeqEntryToFastaEx, printid_general field to MyFsa structure, to support processing software that requires gnl ID in FASTA defline even in the presence of higher-priority ref ID
-*
-* Revision 6.73 2000/07/20 17:48:58 dondosha
-* Added function FastaToSeqBuffForDb analogous to FastaToSeqEntryForDb
-*
-* Revision 6.72 2000/07/12 16:22:43 madden
-* Fixed problem with reading FASTA definition lines
-*
-* Revision 6.71 2000/06/23 13:25:18 madden
-* Fix for comment lines
-*
-* Revision 6.70 2000/06/19 21:22:52 kans
-* FastaReadSequenceChunk looks for null byte to limit length, otherwise can be fooled by text pasted in from web with no newline at end
-*
-* Revision 6.69 2000/06/14 19:07:48 kans
-* chrom defline generator now handles the new SUBSRC_segment
-*
-* Revision 6.68 2000/06/14 14:50:11 madden
-* Fix for multiple line returns between sequences
-*
-* Revision 6.67 2000/05/31 20:13:23 madden
-* More replacement of getc with fgets
-*
-* Revision 6.66 2000/05/30 19:44:44 ostell
-* added FastaSeqLineEx() with another parameter, do_virtual
-*
-* Revision 6.65 2000/05/25 16:53:31 kans
-* FastaToSeqEntryInternalExEx and MakeTrustedID called by FastaToSeqEntryForDb to delay seqid indexing
-*
-* Revision 6.64 2000/05/23 21:11:13 madden
-* use fgets in place of getc
-*
-* Revision 6.63 2000/05/19 15:18:04 kans
-* parsing of >? now skips white space before scanning size, so can handle >?# and >? #
-*
-* Revision 6.62 2000/05/16 15:12:50 kans
-* moved SeqMgrAddToBioseqIndex call after assignment of bsp->id
-*
-* Revision 6.61 2000/04/28 20:10:44 kans
-* if organism has virus in name, and /virion or /proviral, do not add organelle to NC_ defline
-*
-* Revision 6.60 2000/04/27 15:30:26 kans
-* changed proviral to provirus if NC_ and not plasmid
-*
-* Revision 6.59 2000/04/26 21:27:30 kans
-* more changes to genome defline, cleanup of its code
-*
-* Revision 6.58 2000/04/22 00:13:48 kans
-* nc_ genome titles handles genomic or other_genetic (usually plasmids), and lower cases any Plasmid or Element text in the defline (JK and TW)
-*
-* Revision 6.57 2000/04/04 17:02:44 kans
-* cleanup keywords is now also part of NC_Cleanup
-*
-* Revision 6.56 2000/04/03 22:09:26 kans
-* added ClearGenBankKeywords for RefSeq processing
-*
-* Revision 6.55 2000/03/29 22:00:23 kans
-* added NC_Cleanup function used internally for genome RefSeq processing
-*
-* Revision 6.54 2000/03/22 13:08:27 madden
-* Enlarged buffer for definition lines
-*
-* Revision 6.53 2000/03/10 17:07:41 kans
-* do not read dash into sequence (SW)
-*
-* Revision 6.52 2000/03/02 18:13:48 kans
-* improvements to complete chromosome defline
-*
-* Revision 6.51 2000/03/01 19:09:33 shavirin
-* Added parameter SeqIdPtr into function FastaReadSequenceInternalEx().
-*
-* Revision 6.50 2000/02/28 16:04:05 kans
-* After CreateDefLine calls FindProtDefLine, if the organism parameter is NULL it does an indexed search for BioSource, using the results to set organism - this will simplify production of BLAST deflines
-*
-* Revision 6.49 2000/02/17 17:20:57 sicotte
-* Add Reading of Lowercase Characters as SeqLoc for inputting masking informatioin. Use FastaToSeqEntryForDb or FastaToSeqEntryInternalEx
-*
-* Revision 6.48 2000/02/04 16:38:28 kans
-* added FastaToSeqEntryForDb and FastaToSeqEntryInternalEx, giving control over generation of unique SeqID
-*
-* Revision 6.47 2000/02/01 23:22:48 kans
-* indexed get descr now copies values to iip if not NULL
-*
-* Revision 6.46 2000/02/01 19:43:39 kans
-* FindProtDefLine calls indexed explore functions first to avoid multiple targeted gathers
-*
-* Revision 6.45 2000/01/16 19:08:55 kans
-* MakeCompleteChromTitle handles plasmids, does not need completedness flag set, does not override existing title descriptor in CreateDefLine
-*
-* Revision 6.44 1999/12/15 19:15:33 kans
-* FindProtDefLine now handles gene xrefs, initializes diff_lowest to INT4_MAX so SeqLocAinB test works
-*
-* Revision 6.43 1999/12/14 21:47:02 kans
-* FindProtDefLine already did gene product with grp->locus, now cascades down to first synonym, then description
-*
-* Revision 6.42 1999/11/30 20:58:56 kans
-* fasta read functions also report error for question mark in input data
-*
-* Revision 6.41 1999/10/30 00:38:53 kans
-* CreateDefLine says complete chromosome only for NC_ reference sequence, and say SEQUENCING IN PROGRESS unless HTGS_DRAFT keyword, in which case say WORKING DRAFT SEQUENCE
-*
-* Revision 6.40 1999/10/06 20:29:55 bazhin
-* Removed memory leak.
-*
-* Revision 6.39 1999/10/05 21:44:06 kans
-* CreateDefLine calls SimpleSegSeqTitle for bsp->repr == Seq_repr_seg if no title descriptor - more work to be done later
-*
-* Revision 6.38 1999/09/30 21:38:19 kans
-* create title valnode with SeqDescrNew
-*
-* Revision 6.37 1999/09/29 18:34:29 kans
-* fix to CreateDefLine to return title IDs unless actually using MolInfo
-*
-* Revision 6.36 1999/09/22 23:03:05 kans
-* changed wording of complete mitochondrial chromosome
-*
-* Revision 6.35 1999/09/22 22:36:11 kans
-* added MakeCompleteChromTitle so CreateDefLine generates standard title for complete chromosome
-*
-* Revision 6.34 1999/09/20 18:36:30 shavirin
-* Added function Int4 GetOrderBySeqId().
-*
-* Revision 6.33 1999/08/05 11:37:04 kans
-* allow # or ! as comment symbols
-*
-* Revision 6.32 1999/08/04 22:59:00 kans
-* FastaToSeqEntry ignores lines beginning with ! if read from file
-*
-* Revision 6.31 1999/04/07 12:49:06 ostell
-* made changes to rank RefSeq ids higher for BLAST deflines
-*
-* Revision 6.30 1999/03/22 19:15:02 ostell
-* forced generation of unfinished HTG deflines
-*
-* Revision 6.29 1999/03/16 13:42:27 ostell
-* corrected oversight in CreateDefLine so sometimes [organism] would be
-* dropped from protein deflines.
-*
-* Revision 6.28 1999/03/12 18:38:40 kans
-* fixed ErrPostEx cast
-*
-* Revision 6.27 1999/03/12 15:52:21 kans
-* changes to CreateDefLine for HTGS phrases (JO)
-*
-* Revision 6.26 1999/03/11 23:32:08 kans
-* sprintf casts
-*
-* Revision 6.25 1998/11/03 21:43:57 kans
-* call SeqMapTableConvert to map asterisk to appropriate alphabet - BLAST is using ncbistdaa, not ncbieaa or iupacaa
-*
-* Revision 6.24 1998/10/26 22:35:53 kans
-* filter out terminal asterisk in protein sequence
-*
-* Revision 6.23 1998/10/06 21:04:43 tatiana
-* a bug fixed in CreateDefline()
-*
-* Revision 6.22 1998/09/04 13:09:22 volodya
-* fix the memory bug and the memory leaks in CreateDefLine()
-*
-* Revision 6.21 1998/07/10 12:47:56 egorov
-* Sequence code bug fixed
-*
-* Revision 6.20 1998/07/07 18:43:06 egorov
-* Revert the BioseqToFastaX() to use FASTA_ID as it was before
-*
-* Revision 6.19 1998/03/19 21:14:29 kans
-* defline says map instead of from for map source qualifier
-*
-* Revision 6.18 1998/03/12 17:40:52 kans
-* added GSS to defline handling
-*
-* Revision 6.17 1998/02/25 20:06:30 kans
-* default deflines for est, sts records
-*
-* Revision 6.16 1998/02/23 16:51:24 egorov
-* Changes to make the tofasta.c independent on readdb.h
-*
-* Revision 6.15 1998/02/12 21:44:57 madden
-* Set code before callto BioseqToFastaX
-*
-* Revision 6.14 1998/02/11 20:36:40 tatiana
-* ABW error fixed
-*
-* Revision 6.13 1998/02/11 19:05:35 madden
-* Changes to allow formatdb to take ASN.1 as input
-*
-* Revision 6.12 1998/02/09 18:54:07 kans
-* MakeSeqID only in sqnutils, makes oid->id if numeric
-*
-* Revision 6.11 1998/01/27 20:28:08 madden
-* Added BioseqRawToFastaExtra with line_length arg
-*
-* Revision 6.10 1997/12/08 18:15:19 ostell
-* Hsiu-chuan sets tech value back to zero for repeated loading in HSP
-*
-* Revision 6.9 1997/12/02 19:04:45 shavirin
-* Fixed typecast warnings and removed unused functions
-*
-* Revision 6.8 1997/11/28 15:55:47 shavirin
-* Fixed some warnings. Removed redundant "*" and added function return type
-*
-* Revision 6.7 1997/11/14 15:49:47 tatiana
-* added pdbip protection in CreateDefline()
-*
-* Revision 6.6 1997/11/13 19:39:59 tatiana
-* *** empty log message ***
-*
-* Revision 6.5 1997/11/12 21:24:07 tatiana
-* PDB special case in CreateDefline
-*
-* Revision 6.4 1997/11/05 19:25:23 kans
-* special_symbol returned for &{}[]
-*
-* Revision 6.3 1997/11/03 20:46:54 shavirin
-* Removed memory leak
-*
-* Revision 6.2 1997/10/22 16:43:06 shavirin
-* Added new external functions FastaReadSequence() and FastaReadSequenceMem()
-*
-* Revision 6.1 1997/08/27 14:35:02 kans
-* fixed memory leak in FastaReadSequenceInternal where an error message buffer was allocated but no bad characters were found
-*
-* Revision 6.0 1997/08/25 18:07:44 madden
-* Revision changed to 6.0
-*
-* Revision 5.46 1997/06/20 19:13:34 kans
-* treat - as illegal character for errmsg
-*
-* Revision 5.45 1997/06/19 18:39:17 vakatov
-* [WIN32,MSVC++] Adopted for the "NCBIOBJ.LIB" DLL'ization
-*
-* Revision 5.44 1997/05/28 18:38:17 tatiana
-* a typo fixed in CreateDefLine
-*
-* Revision 5.43 1997/05/21 17:42:09 tatiana
-* fixed uninitialized iip in UseOrgMods
-*
-* Revision 5.42 1997/05/21 17:22:00 tatiana
-* CreateDefLine changed to take info from BioSource.mod
-*
-* Revision 5.41 1997/04/17 17:19:06 shavirin
-* Removed truncation of one character in sequence without '>' in
-* the beginning.
-* FastaToSeqEntry()
-*
- * Revision 5.40 1997/04/10 20:03:47 shavirin
- * Fixed bug in function FastaToSeqBuff()
- *
- *
- * Revision 5.39 1997/04/01 21:36:49 shavirin
- * Function FastaToSeqEntryInternal() was disintegrated into 2
- * functions: new function FastaReadSequenceInternal() was added
- * for this reason. This function may use used to create sequence
- * reding functions without creation SeqEntryPtr.
- *
- * Revision 5.38 1997/03/28 21:41:40 tatiana
- * turn off HTG phase 3 in CreateDefLine()
- *
- * Revision 5.37 1997/03/13 15:21:05 tatiana
- * CreateFeLine change to protect from 'HTG phase' duplication
- *
- * Revision 5.36 1997/02/20 15:07:54 kans
- * added call to SeqMgrAddToBioseqIndex, removed obsolete FastaIntSec
- * and GetLineFromBuff functions, added kludge to convert U to T for
- * nucleotides prior to SeqMapTableConvert lookup
- *
- * Revision 5.35 1997/02/11 01:14:10 kans
- * CountGapsInDeltaSeq takes 0, not NULL, as last parameter
- *
- * Revision 5.34 1997/02/10 22:08:20 tatiana
- * a bug fixed in CreateDefLine()
- *
- * Revision 5.32 1997/01/21 17:03:47 tatiana
- * added a check for SEQUENCING IN PROGRESS already existing in title
- * in CreateDefLine()
- *
- * Revision 5.31 1997/01/15 17:35:06 tatiana
- * a bug fixed in CreateDefLine()
- *
- * Revision 5.30 1997/01/13 23:20:54 tatiana
- * added SEQUENCING IN PROGRESS for htg phase 1 and 2 in CreateDefLine()
- *
- * Revision 5.28 1997/01/08 22:49:50 tatiana
- * buf and buflen arguments added to CountGapsInDeltaSeq()
- *
- * Revision 5.27 1996/11/25 18:59:52 shavirin
- * Reading from file in FastaToSeqEntryInternal() changed from FileRead
- * to getc back (from revision 5.16 due to Windows specific problems
- *
- * Revision 5.26 1996/11/19 22:45:09 tatiana
- * CreateDefLine changed for HTG
- *
- * Revision 5.25 1996/11/18 20:36:39 shavirin
- * Default coding for protein is set to ncbieaa in
- * FastaToSeqEntryInternal()
- *
- * Revision 5.24 1996/11/15 17:44:51 shavirin
- * Removed difference in upper and lower bad characters
- *
- * Revision 5.23 1996/11/04 17:59:33 tatiana
- * memory leaks cleaning in CreateDefline
- *
- * Revision 5.22 1996/10/30 16:52:07 kans
- * SeqIdDup now calls SeqIdFindBest first. Also, removed unused variable.
- *
- * Revision 5.21 1996/10/28 21:51:47 tatiana
- * a bug fixed in FastaToSeqEntryInternal()
- *
- * Revision 5.20 1996/10/25 21:48:14 shavirin
- * Windows NT specific change - in FastaToSeqEntryInternal()
- * changed \n \r check to opposite id defline processing.
- *
- * Revision 5.19 1996/10/22 16:01:25 shavirin
- * Added support to disable sequence printing with new
- * parameter no_sequence and removed unused variables and functions
- *
- * Revision 5.18 1996/10/21 21:36:28 shavirin
- * Added new functions : SeqEntrysToDefline() and static DeflineFunc()
- *
- * Revision 5.17 1996/10/18 18:54:30 shavirin
- * Changed getc() macros to FileRead() function,
- * exit(1) to return NULL end ErrLogPrintf to ErrPostEx()
- *
- * Revision 5.16 1996/10/16 17:41:26 zjing
- * replace ch in getc from Char to Int1
- *
- * Revision 5.15 1996/10/11 20:30:09 shavirin
- * *** empty log message ***
- *
- * Revision 5.14 1996/10/11 18:47:01 shavirin
- * In FastaToSeqEntryInternal removed bad characters processing if
- * we do not require it
- *
- * Revision 5.13 1996/10/09 00:06:39 shavirin
- * Removed few unused variables and function definitions
- *
- * Revision 5.12 1996/10/08 22:25:52 shavirin
- * Rewritten engine for FastaToSeqEntry functions set.
- * Removed hardcoded limit of 255 characters for defline.
- *
- * Revision 5.11 1996/09/27 20:00:32 ostell
- * made FastaToSeqEntry call BioseqPack instead of BioseqConvert(ncbi4na)
- *
- * Revision 5.10 1996/08/30 14:57:11 tatiana
- * memory leak cleaned up in GatherDescrOnBioseq()
- *
- * Revision 5.9 1996/08/26 20:45:43 kans
- * FindProtDefLine length was uninitialized, also now protects against
- * prp->name with NULL ->data.ptrvalue. (The latter is fixed in cdrgn.c.)
- *
- * Revision 5.8 1996/08/19 18:02:27 tatiana
- * a bug fixed in FindProtDefLine
- *
- * Revision 5.6 1996/08/15 18:15:52 tatiana
- * CreateDefLine() added
- *
- * Revision 5.5 1996/07/29 15:20:12 kans
- * converted errpost to errpostex
- *
- * Revision 5.4 1996/07/25 02:32:26 ostell
- * changed fastadefline() for elta seqs
- *
- * Revision 5.3 1996/07/11 16:25:31 kans
- * FastaToSeqEntry now calls MakeNewProteinSeqId to make unique ID
- *
- * Revision 5.2 1996/07/05 15:57:07 shavirin
- * Added support to parce buffers with multiple fasta entries in FastaToSeqBuff()
- *
- * Revision 5.1 1996/06/15 17:29:44 ostell
- * changed MyFsa structure by adding do_virtual and tech fields
- * added value of 3 for group_segs
- * addes support of tech to FastaDefLine()
- *
- * Revision 5.0 1996/05/28 13:23:23 ostell
- * Set to revision 5.0
- *
- * Revision 4.14 1996/05/07 21:25:17 madden
- * GetLineFromBuff has new check for length of buffer.
- *
- * Revision 4.13 1996/05/01 21:41:47 vakatov
- * GetLineFromBuff() function rewritten so that it can process DOS end-of-line
- * sequence
- *
- * Revision 4.12 1996/04/30 21:23:41 shavirin
- * Fixed bug for Macintosh in FastaToSeqBuff() function
- *
- * Revision 4.10 1996/04/03 15:15:06 kans
- * added parseSeqId to "Ex" functions
- *
- * Revision 4.9 1996/03/27 04:10:18 shavirin
- * Fixed problem with one-line sequence in
- * the function FastaToSeqBuff()
- *
- * Revision 4.8 1996/03/13 19:42:50 shavirin
- * Added new functions FastaToSeqBuff() and FastaToSeqBuffEx() that allow to transfer
- * FASTA entries into SeqEntry structure.
- * Redefined functions FastaToSeqEntry() and FastaToSeqEntryEx() using common engine -
- * internal function FastaIntSeq.
- * Added auxiliary function CharPtr GetLineFromBuff()
- *
- * Revision 4.7 1996/02/23 15:44:51 kans
- * FastaToSeqEntry now allows selenocysteine (U)
- *
- * Revision 4.6 1996/02/19 20:29:08 kans
- * FastaToSeqEntryEx now reports counts of individual illegal characters
- *
- * Revision 4.5 1996/02/17 00:51:54 kans
- * new FastaToSeqEntryEx hidden function
- *
- * Revision 4.4 1996/01/17 18:32:34 kans
- * added TrimSpacesAroundString, called by FastaToSeqEntry for each line
- *
- * Revision 4.3 1995/10/13 21:36:59 madden
- * ID's that contain a "|", but are not legal, are put in a local
- * ID in MakeSeqID.
- *
- * Revision 4.2 1995/09/29 15:03:06 ostell
- * changed FastaToSeqentry() so that if seqid fails to parse, makes a type local
- *
- * Revision 4.1 1995/09/26 12:52:57 ostell
- * removed extra newline from PATENT def line
- *
- * Revision 4.0 1995/07/26 13:49:01 ostell
- * force revision to 4.0
- *
- * Revision 2.26 1995/07/20 19:42:53 tatiana
- * change SeqIdPrint to SeqIdWrite
- *
- * Revision 2.25 1995/06/07 18:52:39 kans
- * kludge to allow - in nucleotide sequence, convert to Seq_code_ncbi4na)
- *
- * Revision 2.24 1995/06/07 16:59:41 kans
- * allow - and * in proteins, use Seq_code_ncbieaa
- *
- * Revision 2.23 1995/05/26 20:34:57 kans
- * gap of unknown length now makes virtual sequence of length -1
- *
- * Revision 2.22 1995/05/09 18:43:09 ostell
- * added support for (accession) on GenPept deflines and [organism] on
- * GenPept and PRF deflines
- *
*
* ==========================================================================
*/
@@ -799,7 +102,7 @@ static Uint1 aa_order[NUM_SEQID] = { /* order of nucleic acid deflines */
60 /* 18 = tpd */
};
-#define FASTA_BUFFER_LEN 262144
+#define FASTA_BUFFER_LEN 524288
#define PATENT_ORDER 110 /* order for any patent */
/*****************************************************************************
@@ -3320,14 +2623,34 @@ static ValNodePtr IndexedGatherDescrOnBioseq (ItemInfoPtr iip, BioseqPtr bsp, Ui
static ValNodePtr GatherDescrOnBioseq(ItemInfoPtr iip, BioseqPtr bsp, Uint1 choice, Boolean get_first)
{
- ValNodePtr vnp;
-
- GatherScope gsc;
- SeqLocPtr slp = NULL;
- Uint2 bspID;
- DescrInfoPtr dsp;
- Uint2 entityID;
+ ValNodePtr vnp = NULL;
+ /*
+ GatherScope gsc;
+ SeqLocPtr slp;
+ Uint2 bspID;
+ DescrInfoPtr dsp;
+ Uint2 entityID;
+ */
+ ObjValNodePtr ovp;
+
+ if (ISA_aa(bsp->mol) && !is_pdb(bsp)) {
+ vnp = BioseqGetSeqDescr (bsp, choice, NULL);
+ } else {
+ vnp = GetNextDescriptorUnindexed (bsp, choice, NULL);
+ }
+ if (vnp != NULL) {
+ if (iip != NULL) {
+ if (vnp->extended != 0) {
+ ovp = (ObjValNodePtr) vnp;
+ iip->entityID = ovp->idx.entityID;
+ iip->itemtype = ovp->idx.itemtype;
+ iip->itemID = ovp->idx.itemID;
+ }
+ }
+ }
+ return vnp;
+#if 0
entityID = ObjMgrGetEntityIDForPointer (bsp);
if (SeqMgrFeaturesAreIndexed (entityID)) {
return IndexedGatherDescrOnBioseq (iip, bsp, choice);
@@ -3375,8 +2698,210 @@ static ValNodePtr GatherDescrOnBioseq(ItemInfoPtr iip, BioseqPtr bsp, Uint1 choi
MemFree(dsp->iip);
MemFree(dsp);
return NULL;
+#endif
+}
+
+/* more efficient versions of feature gather functions for protein defline */
+
+typedef struct unidxfeatdata {
+ SeqIdPtr bspid;
+ SeqLocPtr loc;
+ Int4 longest;
+ Int4 shortest;
+ SeqFeatPtr sfp;
+} UndxFeatData, PNTR UndxFeatPtr;
+
+static void GetLongestProtFeat (
+ SeqFeatPtr sfp,
+ Pointer userdata
+)
+
+{
+ Int4 len;
+ SeqIdPtr sip;
+ UndxFeatPtr ufp;
+
+ if (sfp == NULL || sfp->data.choice != SEQFEAT_PROT) return;
+ ufp = (UndxFeatPtr) userdata;
+ if (ufp == NULL) return;
+
+ sip = SeqLocId (sfp->location);
+ if (sip == NULL) return;
+ if (! SeqIdIn (sip, ufp->bspid)) return;
+
+ len = SeqLocLen (sfp->location);
+ if (len == -1) return;
+
+ if (len > ufp->longest) {
+ ufp->sfp = sfp;
+ ufp->longest = len;
+ }
}
+static SeqFeatPtr GetLongestProteinUnindexed (
+ BioseqPtr bsp
+)
+
+{
+ BioseqSetPtr bssp = NULL;
+ UndxFeatData ufd;
+
+ if (bsp == NULL) return NULL;
+
+ MemSet ((Pointer) &ufd, 0, sizeof (UndxFeatData));
+ ufd.bspid = bsp->id;
+ ufd.longest = 0;
+ ufd.sfp = NULL;
+
+ VisitFeaturesOnBsp (bsp, (Pointer) &ufd, GetLongestProtFeat);
+
+ if (bsp->idx.parenttype == OBJ_BIOSEQSET) {
+ bssp = (BioseqSetPtr) bsp->idx.parentptr;
+ }
+
+ if (bssp != NULL && bssp->_class == BioseqseqSet_class_parts) {
+ VisitFeaturesOnSet (bssp, (Pointer) &ufd, GetLongestProtFeat);
+ if (bssp->idx.parenttype == OBJ_BIOSEQSET) {
+ bssp = (BioseqSetPtr) bssp->idx.parentptr;
+ }
+ }
+
+ if (bssp != NULL && bssp->_class == BioseqseqSet_class_segset) {
+ VisitFeaturesOnSet (bssp, (Pointer) &ufd, GetLongestProtFeat);
+ }
+
+ return ufd.sfp;
+}
+
+static void GetCDSProtFeat (
+ SeqFeatPtr sfp,
+ Pointer userdata
+)
+
+{
+ SeqIdPtr sip;
+ UndxFeatPtr ufp;
+
+ if (sfp == NULL || sfp->data.choice != SEQFEAT_CDREGION) return;
+ ufp = (UndxFeatPtr) userdata;
+ if (ufp == NULL) return;
+
+ sip = SeqLocId (sfp->product);
+ if (sip == NULL) return;
+ if (! SeqIdIn (sip, ufp->bspid)) return;
+
+ ufp->sfp = sfp;
+}
+
+static SeqFeatPtr GetCDSProtUnindexed (
+ BioseqPtr bsp
+)
+
+{
+ Uint2 entityID;
+ SeqEntryPtr sep;
+ UndxFeatData ufd;
+
+ if (bsp == NULL) return NULL;
+
+ entityID = ObjMgrGetEntityIDForPointer (bsp);
+ sep = GetTopSeqEntryForEntityID (entityID);
+ if (sep == NULL) return NULL;
+
+ MemSet ((Pointer) &ufd, 0, sizeof (UndxFeatData));
+ ufd.bspid = bsp->id;
+ ufd.sfp = NULL;
+
+ VisitFeaturesInSep (sep, (Pointer) &ufd, GetCDSProtFeat);
+
+ return ufd.sfp;
+}
+
+static void GetBestGeneFeat (
+ SeqFeatPtr sfp,
+ Pointer userdata
+)
+
+{
+ Int4 diff;
+ SeqIdPtr sip;
+ UndxFeatPtr ufp;
+
+ if (sfp == NULL || sfp->data.choice != SEQFEAT_GENE) return;
+ ufp = (UndxFeatPtr) userdata;
+ if (ufp == NULL) return;
+
+ sip = SeqLocId (sfp->location);
+ if (sip == NULL) return;
+ if (! SeqIdIn (sip, ufp->bspid)) return;
+
+ diff = SeqLocAinB (ufp->loc, sfp->location);
+ if (diff >= 0) {
+ if (diff < ufp->shortest)
+ ufp->sfp = sfp;
+ ufp->shortest = diff;
+ }
+}
+
+static SeqFeatPtr GetBestGeneUnindexed (
+ SeqLocPtr slp,
+ Uint2 entityID
+)
+
+{
+ BioseqPtr bsp;
+ SeqEntryPtr sep;
+ SeqIdPtr sip;
+ UndxFeatData ufd;
+
+ if (slp == NULL) return NULL;
+ sip = SeqLocId (slp);
+ if (sip == NULL) return NULL;
+ bsp = BioseqFindCore (sip);
+ if (bsp == NULL) return NULL;
+
+ sep = GetTopSeqEntryForEntityID (entityID);
+ if (sep == NULL) return NULL;
+
+ MemSet ((Pointer) &ufd, 0, sizeof (UndxFeatData));
+ ufd.bspid = bsp->id;
+ ufd.loc = slp;
+ ufd.shortest = INT4_MAX;
+ ufd.sfp = NULL;
+
+ VisitFeaturesInSep (sep, (Pointer) &ufd, GetBestGeneFeat);
+
+ return ufd.sfp;
+}
+
+/* GatherProtCDS is still faster than GetCDSProtUnindexed for some reason */
+
+static SeqFeatPtr GatherProtCDS(BioseqPtr bsp)
+{
+ GatherScope gsc;
+ SeqLocPtr slp = NULL;
+ Uint2 bspID;
+ SeqFeatPtr sfp;
+
+ MemSet ((Pointer) (&gsc), 0, sizeof (GatherScope));
+ MemSet ((Pointer) (gsc.ignore), (int)(TRUE), (size_t) (OBJ_MAX * sizeof(Boolean)));
+ gsc.ignore[OBJ_SEQFEAT] = FALSE;
+ gsc.ignore[OBJ_SEQANNOT] = FALSE;
+ gsc.get_feats_product = TRUE;
+ bspID = ObjMgrGetEntityIDForPointer(bsp);
+ slp = ValNodeNew(NULL);
+ slp->choice = SEQLOC_WHOLE;
+ slp->data.ptrvalue = (SeqIdPtr) SeqIdDup (SeqIdFindBest (bsp->id, 0));
+ gsc.target = slp;
+ sfp = NULL;
+ GatherEntity(bspID, &sfp, GetFeatCDS, &gsc);
+ SeqLocFree(slp);
+
+ return sfp;
+}
+
+/* obsolete functions, replaced by Unindexed versions */
+
static SeqFeatPtr GatherSeqFeatProt(BioseqPtr bsp)
{
GatherScope gsc;
@@ -3388,6 +2913,9 @@ static SeqFeatPtr GatherSeqFeatProt(BioseqPtr bsp)
Int4 length, longest_length=0;
MemSet ((Pointer) (&gsc), 0, sizeof (GatherScope));
+ MemSet ((Pointer) (gsc.ignore), (int)(TRUE), (size_t) (OBJ_MAX * sizeof(Boolean)));
+ gsc.ignore[OBJ_SEQFEAT] = FALSE;
+ gsc.ignore[OBJ_SEQANNOT] = FALSE;
gsc.get_feats_location = TRUE;
bspID = ObjMgrGetEntityIDForPointer(bsp);
slp = ValNodeNew(NULL);
@@ -3411,26 +2939,6 @@ static SeqFeatPtr GatherSeqFeatProt(BioseqPtr bsp)
return sfp;
}
-static SeqFeatPtr GatherProtCDS(BioseqPtr bsp)
-{
- GatherScope gsc;
- SeqLocPtr slp = NULL;
- Uint2 bspID;
- SeqFeatPtr sfp;
-
- MemSet ((Pointer) (&gsc), 0, sizeof (GatherScope));
- gsc.get_feats_product = TRUE;
- bspID = ObjMgrGetEntityIDForPointer(bsp);
- slp = ValNodeNew(NULL);
- slp->choice = SEQLOC_WHOLE;
- slp->data.ptrvalue = (SeqIdPtr) SeqIdDup (SeqIdFindBest (bsp->id, 0));
- gsc.target = slp;
- sfp = NULL;
- GatherEntity(bspID, &sfp, GetFeatCDS, &gsc);
- SeqLocFree(slp);
-
- return sfp;
-}
static ValNodePtr GatherGenesForCDS(SeqLocPtr slp)
{
GatherScope gsc;
@@ -3443,6 +2951,9 @@ static ValNodePtr GatherGenesForCDS(SeqLocPtr slp)
return NULL;
bspID = ObjMgrGetEntityIDForPointer(bsp);
MemSet ((Pointer) (&gsc), 0, sizeof (GatherScope));
+ MemSet ((Pointer) (gsc.ignore), (int)(TRUE), (size_t) (OBJ_MAX * sizeof(Boolean)));
+ gsc.ignore[OBJ_SEQFEAT] = FALSE;
+ gsc.ignore[OBJ_SEQANNOT] = FALSE;
gsc.get_feats_location = TRUE;
gsc.target = slp;
vnp = NULL;
@@ -3690,6 +3201,12 @@ static CharPtr FindNRDefLine (BioseqPtr bsp)
case MOLECULE_TYPE_TRANSCRIBED_RNA :
rna = "miscRNA";
break;
+ case MOLECULE_TYPE_NCRNA :
+ rna = "ncRNA";
+ break;
+ case MOLECULE_TYPE_TMRNA :
+ rna = "tmRNA";
+ break;
default :
break;
}
@@ -3711,14 +3228,16 @@ static CharPtr FindNRDefLine (BioseqPtr bsp)
static CharPtr FindProtDefLine(BioseqPtr bsp, Boolean extProtTitle)
{
- SeqFeatPtr sfp = NULL, f;
+ SeqFeatPtr sfp = NULL /* , f */;
ProtRefPtr prp;
SeqFeatXrefPtr xref;
GeneRefPtr grp=NULL;
- ValNodePtr vnp, v, syn;
+ ValNodePtr vnp, /* v, */ syn;
SeqLocPtr loc;
CharPtr title = NULL, s, geneprod;
- Int4 diff_lowest = /* 0 */ INT4_MAX, diff_current;
+ /*
+ Int4 diff_lowest = INT4_MAX, diff_current;
+ */
Int2 length = 0;
SeqFeatPtr best_gene = NULL;
Uint2 entityID;
@@ -3734,7 +3253,12 @@ static CharPtr FindProtDefLine(BioseqPtr bsp, Boolean extProtTitle)
if (indexed) {
sfp = SeqMgrGetBestProteinFeature (bsp, NULL);
} else {
- sfp = GatherSeqFeatProt(bsp);
+ sfp = GetLongestProteinUnindexed (bsp);
+ /*
+ if (sfp == NULL) {
+ sfp = GatherSeqFeatProt(bsp);
+ }
+ */
}
if (sfp != NULL) {
prp = (ProtRefPtr) sfp->data.value.ptrvalue;
@@ -3761,6 +3285,9 @@ static CharPtr FindProtDefLine(BioseqPtr bsp, Boolean extProtTitle)
if (indexed) {
sfp = SeqMgrGetCDSgivenProduct (bsp, NULL);
} else {
+ /*
+ sfp = GetCDSProtUnindexed (bsp);
+ */
sfp = GatherProtCDS(bsp);
}
if (sfp != NULL) {
@@ -3771,6 +3298,8 @@ static CharPtr FindProtDefLine(BioseqPtr bsp, Boolean extProtTitle)
if (indexed) {
best_gene = SeqMgrGetOverlappingGene (loc, NULL);
} else {
+ best_gene = GetBestGeneUnindexed (loc, entityID);
+ /*
vnp = GatherGenesForCDS(loc);
for (v=vnp; v; v=v->next) {
f = (SeqFeatPtr) v->data.ptrvalue;
@@ -3786,6 +3315,7 @@ static CharPtr FindProtDefLine(BioseqPtr bsp, Boolean extProtTitle)
}
}
ValNodeFree(vnp);
+ */
}
if (best_gene != NULL) {
grp = (GeneRefPtr) best_gene->data.value.ptrvalue;
@@ -3820,6 +3350,9 @@ static CharPtr FindProtDefLine(BioseqPtr bsp, Boolean extProtTitle)
if (indexed) {
sfp = SeqMgrGetCDSgivenProduct (bsp, NULL);
} else {
+ /*
+ sfp = GetCDSProtUnindexed (bsp);
+ */
sfp = GatherProtCDS(bsp);
}
if (sfp != NULL) {
@@ -3850,6 +3383,8 @@ static CharPtr FindProtDefLine(BioseqPtr bsp, Boolean extProtTitle)
if (indexed) {
best_gene = SeqMgrGetOverlappingGene (loc, NULL);
} else {
+ best_gene = GetBestGeneUnindexed (loc, entityID);
+ /*
vnp = GatherGenesForCDS(loc);
for (v=vnp; v; v=v->next) {
f = (SeqFeatPtr) v->data.ptrvalue;
@@ -3865,6 +3400,7 @@ static CharPtr FindProtDefLine(BioseqPtr bsp, Boolean extProtTitle)
}
}
ValNodeFree(vnp);
+ */
}
if (best_gene != NULL) {
grp = (GeneRefPtr) best_gene->data.value.ptrvalue;
@@ -4335,8 +3871,8 @@ static CharPtr MakeCompleteChromTitle (BioseqPtr bsp, Uint1 biomol, Uint1 comple
} else {
orgnl = organelleByItself [genome];
}
- if (StringISearch (name, "virus") != NULL) {
- if (genome == 13 || genome == 14) {
+ if (StringISearch (name, "virus") != NULL || StringISearch (name, "phage") != NULL) {
+ if (genome == GENOME_proviral || genome == GENOME_virion) {
orgnl = NULL;
}
}
@@ -4550,9 +4086,19 @@ NLM_EXTERN Boolean CreateDefLineExEx (ItemInfoPtr iip, BioseqPtr bsp, CharPtr bu
SeqMgrDescContext dcontext;
SeqMgrFeatContext fcontext;
SeqFeatPtr sfp, src;
+ Uint2 entityID;
if ((bsp == NULL) || (buf == NULL) || buflen == 0) return FALSE;
+ /* now using GetNextDescriptorUnindexed, so need to have called AssignIDsInEntityEx */
+
+ if (bsp->idx.entityID == 0) {
+ entityID = ObjMgrGetEntityIDForPointer (bsp);
+ if (entityID != 0) {
+ AssignIDsInEntityEx (entityID, 0, NULL, NULL);
+ }
+ }
+
for (sip = bsp->id; sip != NULL; sip = sip->next) {
switch (sip->choice) {
case SEQID_OTHER :
diff --git a/api/txalign.c b/api/txalign.c
index 80e7de41..5877f9c4 100644
--- a/api/txalign.c
+++ b/api/txalign.c
@@ -1,4 +1,4 @@
-/* $Id: txalign.c,v 6.94 2007/05/07 13:28:35 kans Exp $
+/* $Id: txalign.c,v 6.95 2008/01/07 23:20:06 bealer Exp $
***************************************************************************
* *
* COPYRIGHT NOTICE *
@@ -27,13 +27,17 @@
*
* File Name: txalign.c
*
-* $Revision: 6.94 $
+* $Revision: 6.95 $
*
* File Description: Formating of text alignment for the BLAST output
*
* Modifications:
* --------------------------------------------------------------------------
* $Log: txalign.c,v $
+* Revision 6.95 2008/01/07 23:20:06 bealer
+* - Fix condition found by valgrind - conditional statement on
+* unassigned location.
+*
* Revision 6.94 2007/05/07 13:28:35 kans
* added casts for Seq-data.gap (SeqDataPtr, SeqGapPtr, ByteStorePtr)
*
@@ -3760,6 +3764,8 @@ static Boolean ShowAlignNodeText2Ex(ValNodePtr anp_list, Int2 num_node, Int4 lin
as.target_sip = anp->sip;
as.is_aa = (m_bsp->mol == Seq_mol_aa);
as.ooframe = FALSE; /* Not supported */
+ as.m_frame_set = FALSE;
+ as.t_frame_set = FALSE;
asp = &as;
} else
asp = NULL;
diff --git a/api/utilpub.c b/api/utilpub.c
index c58d4897..3d3dd5ad 100644
--- a/api/utilpub.c
+++ b/api/utilpub.c
@@ -1442,7 +1442,7 @@ NLM_EXTERN void cleanup_pub(ValNodePtr pub)
}
}
-static Boolean empty_citgen(CitGenPtr cit)
+NLM_EXTERN Boolean empty_citgen(CitGenPtr cit)
{
if (cit == NULL)
return TRUE;
diff --git a/api/utilpub.h b/api/utilpub.h
index d7a6fe9f..a712195d 100644
--- a/api/utilpub.h
+++ b/api/utilpub.h
@@ -60,6 +60,8 @@ NLM_EXTERN ValNodePtr OrganizePubList PROTO((ValNodePtr vnp));
NLM_EXTERN void cleanup_pub PROTO((ValNodePtr pub));
+NLM_EXTERN Boolean empty_citgen PROTO((CitGenPtr cit));
+
NLM_EXTERN void EntryStripSerialNumber PROTO((SeqEntryPtr sep));
NLM_EXTERN void VnpHeapSort PROTO ((ValNodePtr PNTR vnp, int (LIBCALLBACK *compar )PROTO ((Nlm_VoidPtr, Nlm_VoidPtr ))));
diff --git a/api/valid.c b/api/valid.c
index 79590e93..4ae1a41a 100644
--- a/api/valid.c
+++ b/api/valid.c
@@ -29,7 +29,7 @@
*
* Version Creation Date: 1/1/94
*
-* $Revision: 6.970 $
+* $Revision: 6.1032 $
*
* File Description: Sequence editing utilities
*
@@ -101,7 +101,7 @@ NLM_EXTERN void SpliceCheck (ValidStructPtr vsp, SeqFeatPtr sfp);
static void CdConflictCheck (ValidStructPtr vsp, SeqFeatPtr sfp);
static void SpliceCheckEx (ValidStructPtr vsp, SeqFeatPtr sfp, Boolean checkAll);
static void CdsProductIdCheck (ValidStructPtr vsp, SeqFeatPtr sfp);
-static void ValidateBioSource (ValidStructPtr vsp, GatherContextPtr gcp, BioSourcePtr biop, SeqFeatPtr sfp);
+static void ValidateBioSource (ValidStructPtr vsp, GatherContextPtr gcp, BioSourcePtr biop, SeqFeatPtr sfp, ValNodePtr sdp);
static void ValidatePubdesc (ValidStructPtr vsp, GatherContextPtr gcp, PubdescPtr pdp);
static void LookForMultiplePubs (ValidStructPtr vsp, GatherContextPtr gcp, SeqDescrPtr sdp);
static void ValidateSfpCit (ValidStructPtr vsp, GatherContextPtr gcp, SeqFeatPtr sfp);
@@ -573,7 +573,9 @@ static CharPtr err2Label [] = {
"LatLonRange",
"LatLonValue",
"LatLonCountry",
- "LatLonState"
+ "LatLonState",
+ "BadSpecificHost",
+ "RefGeneTrackingIllegalStatus"
};
static CharPtr err3Label [] = {
@@ -760,7 +762,11 @@ static CharPtr err5Label [] = {
"BadAuthorSuffix",
"BadAnticodonAA",
"BadAnticodonCodon",
- "BadAnticodonStrand"
+ "BadAnticodonStrand",
+ "UndesiredGeneSynonym",
+ "UndesiredProteinName",
+ "FeatureBeginsOrEndsInGap",
+ "GeneOntologyTermMissingGOID"
};
static CharPtr err6Label [] = {
@@ -1471,7 +1477,7 @@ static Boolean Valid1GatherProc (GatherContextPtr gcp)
if (sfp != NULL) {
if (sfp->data.choice == SEQFEAT_BIOSRC) {
biop = (BioSourcePtr) sfp->data.value.ptrvalue;
- ValidateBioSource (vsp, gcp, biop, sfp);
+ ValidateBioSource (vsp, gcp, biop, sfp, NULL);
}
if (sfp->data.choice == SEQFEAT_PUB) {
pdp = (PubdescPtr) sfp->data.value.ptrvalue;
@@ -1545,7 +1551,7 @@ static Boolean Valid1GatherProc (GatherContextPtr gcp)
if (sdp != NULL) {
if (sdp->choice == Seq_descr_source) {
biop = (BioSourcePtr) sdp->data.ptrvalue;
- ValidateBioSource (vsp, gcp, biop, NULL);
+ ValidateBioSource (vsp, gcp, biop, NULL, sdp);
}
if (sdp->choice == Seq_descr_pub) {
pdp = (PubdescPtr) sdp->data.ptrvalue;
@@ -2256,6 +2262,21 @@ typedef struct vsicdata {
ValNodePtr tailid;
} VsicData, PNTR VsicDataPtr;
+static Boolean IsNCBIFileID (SeqIdPtr sip)
+{
+ DbtagPtr dbt;
+
+ if (sip == NULL || sip->choice != SEQID_GENERAL) return FALSE;
+ dbt = (DbtagPtr) sip->data.ptrvalue;
+ if (dbt == NULL) return FALSE;
+ if (StringCmp (dbt->db, "NCBIFILE") == 0) {
+ return TRUE;
+ } else {
+ return FALSE;
+ }
+}
+
+
static void CaptureTextSeqIDs (BioseqPtr bsp, Pointer userdata)
{
@@ -2269,6 +2290,7 @@ static void CaptureTextSeqIDs (BioseqPtr bsp, Pointer userdata)
for (sip = bsp->id; sip != NULL; sip = sip->next) {
if (sip->choice == SEQID_GI || sip->choice == SEQID_GIBBSQ || sip->choice == SEQID_GIBBMT) continue;
+ if (IsNCBIFileID (sip)) continue;
SeqIdWrite (sip, buf, PRINTID_FASTA_SHORT, sizeof (buf) - 1);
vnp = ValNodeCopyStr (&(vdp->tailid), 0, buf);
if (vdp->headid == NULL) {
@@ -2593,6 +2615,7 @@ typedef struct vvmdata {
Boolean accounted_for;
Boolean products_unique;
Boolean featid_matched;
+ Boolean feat_touches_gap;
SeqFeatPtr nearbygene;
SeqFeatPtr nearbycds;
SeqFeatPtr nearbymrna;
@@ -3575,6 +3598,94 @@ static Boolean CheckForInconsistentBiosources (SeqEntryPtr sep, ValidStructPtr v
return TRUE;
}
+static Boolean CheckForInconsistentMolInfos (SeqEntryPtr sep, ValidStructPtr vsp, MolInfoPtr PNTR mipp, BioseqSetPtr top)
+
+{
+ BioseqPtr bsp;
+ BioseqSetPtr bssp;
+ SeqMgrDescContext dcontext;
+ Uint2 entityID = 0, oldEntityID;
+ MolInfoPtr firstmip;
+ GatherContextPtr gcp;
+ Uint4 itemID = 0, oldItemID;
+ Uint2 itemtype = 0, oldItemtype;
+ MolInfoPtr mip;
+ ValNodePtr sdp;
+ SeqEntryPtr tmp;
+
+ if (sep == NULL || vsp == NULL || mipp == NULL)
+ return FALSE;
+ gcp = vsp->gcp;
+
+ if (IS_Bioseq_set (sep)) {
+ bssp = (BioseqSetPtr) sep->data.ptrvalue;
+ if (bssp == NULL)
+ return FALSE;
+ for (tmp = bssp->seq_set; tmp != NULL; tmp = tmp->next) {
+ if (CheckForInconsistentMolInfos (tmp, vsp, mipp, top))
+ return TRUE;
+ }
+ return FALSE;
+ }
+
+ if (!IS_Bioseq (sep))
+ return FALSE;
+ bsp = (BioseqPtr) sep->data.ptrvalue;
+ if (bsp == NULL)
+ return FALSE;
+
+ sdp = SeqMgrGetNextDescriptor (bsp, NULL, Seq_descr_molinfo, &dcontext);
+ if (sdp == NULL) return FALSE;
+ mip = (MolInfoPtr) sdp->data.ptrvalue;
+ if (mip == NULL || mip->biomol == MOLECULE_TYPE_PEPTIDE) return FALSE;
+
+ firstmip = *mipp;
+ if (firstmip == NULL) {
+ *mipp = mip;
+ return FALSE;
+ }
+
+ if (mip->biomol == firstmip->biomol) return FALSE;
+
+ oldEntityID = gcp->entityID;
+ oldItemID = gcp->itemID;
+ oldItemtype = gcp->thistype;
+
+ gcp->entityID = entityID;
+ gcp->itemID = itemID;
+ gcp->thistype = itemtype;
+
+ if (top != NULL) {
+ gcp->entityID = top->idx.entityID;
+ gcp->itemID = top->idx.itemID;
+ gcp->thistype = OBJ_BIOSEQSET;
+ }
+
+ /* only report the first one that doesn't match */
+
+ ValidErr (vsp, SEV_WARNING, ERR_SEQ_PKG_InconsistentMolInfoBiomols, "Pop/phy/mut/eco set contains inconsistent MolInfo biomols");
+
+ gcp->entityID = oldEntityID;
+ gcp->itemID = oldItemID;
+ gcp->thistype = oldItemtype;
+
+ return TRUE;
+}
+
+static void LookForMolInfoInconsistency (BioseqSetPtr bssp, ValidStructPtr vsp)
+
+{
+ MolInfoPtr mip = NULL;
+ SeqEntryPtr sep;
+
+ if (bssp == NULL) return;
+
+ for (sep = bssp->seq_set; sep != NULL; sep = sep->next) {
+ if (CheckForInconsistentMolInfos (sep, vsp, &mip, bssp))
+ return;
+ }
+}
+
static void ValidatePopSet (BioseqSetPtr bssp, ValidStructPtr vsp)
{
@@ -3596,6 +3707,8 @@ static void ValidatePopSet (BioseqSetPtr bssp, ValidStructPtr vsp)
}
}
+ LookForMolInfoInconsistency (bssp, vsp);
+
for (sep = bssp->seq_set; sep != NULL; sep = sep->next) {
if (CheckForInconsistentBiosources (sep, vsp, &orp, bssp))
return;
@@ -3636,6 +3749,8 @@ static void ValidatePhyMutEcoWgsSet (BioseqSetPtr bssp, ValidStructPtr vsp)
"Bioseq-set contains internal GenBank Bioseq-set");
}
}
+
+ LookForMolInfoInconsistency (bssp, vsp);
}
static void ValidateGenProdSet (BioseqSetPtr bssp, ValidStructPtr vsp)
@@ -4405,6 +4520,18 @@ static void CheckDeltaForReuse (ValidStructPtr vsp, GatherContextPtr gcp, Bioseq
ValNodeFreeData (head);
}
+static CharPtr legal_refgene_status_strings [] = {
+ "Inferred",
+ "Provisional",
+ "Predicted",
+ "Validated",
+ "Reviewed",
+ "Model",
+ "WGS",
+ "Pipeline",
+ NULL
+};
+
static void ValidateBioseqInst (GatherContextPtr gcp)
{
Boolean retval = TRUE;
@@ -4459,14 +4586,17 @@ static void ValidateBioseqInst (GatherContextPtr gcp)
Boolean in_N;
Boolean isActiveFin = FALSE;
Boolean isDraft = FALSE;
+ Boolean isFullTop = FALSE;
Boolean isGB = FALSE;
Boolean isPatent = FALSE;
Boolean isPDB = FALSE;
+ Boolean isPreFin = FALSE;
Boolean isNC = FALSE;
Boolean isNTorNC = FALSE;
Boolean isNZ;
Boolean is_gps = FALSE;
Boolean isRefSeq = FALSE;
+ Boolean isSwissProt = FALSE;
Boolean last_is_gap;
Boolean non_interspersed_gaps;
Int2 num_adjacent_gaps;
@@ -4497,6 +4627,7 @@ static void ValidateBioseqInst (GatherContextPtr gcp)
ObjectIdPtr oip;
Boolean hasRefGeneTracking = FALSE;
Boolean hasRefTrackStatus;
+ Boolean hasLegalStatus;
Int2 accn_count = 0;
Int2 gi_count = 0;
Int4 runsofn;
@@ -4548,6 +4679,8 @@ static void ValidateBioseqInst (GatherContextPtr gcp)
hasGi = TRUE;
} else if (sip1->choice == SEQID_GENBANK) {
isGB = TRUE;
+ } else if (sip1->choice == SEQID_SWISSPROT) {
+ isSwissProt = TRUE;
}
for (sip2 = sip1->next; sip2 != NULL; sip2 = sip2->next) {
@@ -4774,10 +4907,30 @@ static void ValidateBioseqInst (GatherContextPtr gcp)
} else if (oip != NULL && StringICmp (oip->str, "RefGeneTracking") == 0) {
hasRefGeneTracking = TRUE;
hasRefTrackStatus = FALSE;
+ hasLegalStatus = FALSE;
for (ufp = uop->data; ufp != NULL; ufp = ufp->next) {
oip = ufp->label;
if (oip != NULL && StringCmp (oip->str, "Status") == 0) {
hasRefTrackStatus = TRUE;
+ str = (CharPtr) ufp->data.ptrvalue;
+ if (StringHasNoText (str)) {
+ str = "?";
+ }
+ for (i = 0; legal_refgene_status_strings [i] != NULL; i++) {
+ if (StringICmp (str, legal_refgene_status_strings [i]) == 0) {
+ hasLegalStatus = TRUE;
+ break;
+ }
+ }
+ if (! hasLegalStatus) {
+ olditemid = gcp->itemID;
+ olditemtype = gcp->thistype;
+ gcp->itemID = context.itemID;
+ gcp->thistype = OBJ_SEQDESC;
+ ValidErr (vsp, SEV_ERROR, ERR_SEQ_DESCR_RefGeneTrackingIllegalStatus, "RefGeneTracking object has illegal Status '%s'", str);
+ gcp->itemID = olditemid;
+ gcp->thistype = olditemtype;
+ }
}
}
if (! hasRefTrackStatus) {
@@ -5346,6 +5499,10 @@ static void ValidateBioseqInst (GatherContextPtr gcp)
isActiveFin = TRUE;
} else if (StringICmp (str, "HTGS_DRAFT") == 0) {
isDraft = TRUE;
+ } else if (StringICmp (str, "HTGS_FULLTOP") == 0) {
+ isFullTop = TRUE;
+ } else if (StringICmp (str, "HTGS_PREFIN") == 0) {
+ isPreFin = TRUE;
}
}
}
@@ -5473,11 +5630,16 @@ static void ValidateBioseqInst (GatherContextPtr gcp)
}
}
} else if (slitp->length == 0) {
+ if (isSwissProt) {
+ sev = SEV_WARNING;
+ } else {
+ sev = SEV_ERROR;
+ }
ifp = slitp->fuzz;
if (ifp == NULL || ifp->choice != 4 || ifp->a != 0) {
- ValidErr (vsp, SEV_ERROR, ERR_SEQ_INST_SeqLitGapLength0, "Gap of length 0 in delta chain");
+ ValidErr (vsp, sev, ERR_SEQ_INST_SeqLitGapLength0, "Gap of length 0 in delta chain");
} else {
- ValidErr (vsp, SEV_ERROR, ERR_SEQ_INST_SeqLitGapLength0, "Gap of length 0 with unknown fuzz in delta chain");
+ ValidErr (vsp, sev, ERR_SEQ_INST_SeqLitGapLength0, "Gap of length 0 with unknown fuzz in delta chain");
}
}
len += slitp->length;
@@ -5628,9 +5790,18 @@ static void ValidateBioseqInst (GatherContextPtr gcp)
}
}
- if (mip != NULL) {
- if (isDraft && mip->tech == MI_TECH_htgs_3) {
- ValidErr (vsp, SEV_WARNING, ERR_SEQ_INST_BadHTGSeq, "HTGS 3 sequence should not have HTGS_DRAFT keyword");
+ if (mip != NULL && mip->tech == MI_TECH_htgs_3) {
+ if (isDraft) {
+ ValidErr (vsp, SEV_ERROR, ERR_SEQ_INST_BadHTGSeq, "HTGS 3 sequence should not have HTGS_DRAFT keyword");
+ }
+ if (isPreFin) {
+ ValidErr (vsp, SEV_ERROR, ERR_SEQ_INST_BadHTGSeq, "HTGS 3 sequence should not have HTGS_PREFIN keyword");
+ }
+ if (isActiveFin) {
+ ValidErr (vsp, SEV_ERROR, ERR_SEQ_INST_BadHTGSeq, "HTGS 3 sequence should not have HTGS_ACTIVEFIN keyword");
+ }
+ if (isFullTop) {
+ ValidErr (vsp, SEV_ERROR, ERR_SEQ_INST_BadHTGSeq, "HTGS 3 sequence should not have HTGS_FULLTOP keyword");
}
}
@@ -5783,6 +5954,14 @@ static void ValidateBioseqInst (GatherContextPtr gcp)
/* check generated protein defline with first prp->name - new convention */
if (buf != NULL && CreateDefLineExEx (&ii, bsp, buf, buflen, tech, NULL, NULL, TRUE, FALSE)) {
if (StringICmp (buf, title) != 0) {
+ /* okay if instantiated title has single trailing period */
+ len2 = StringLen (buf);
+ len3 = StringLen (title);
+ if (len3 == len2 + 1 && title [len3 - 1] == '.' && len3 > 3 && title [len3 - 2] != '.') {
+ StringCat (buf, ".");
+ }
+ }
+ if (StringICmp (buf, title) != 0) {
/* also check generated protein defline with all prp->names - old convention */
if (CreateDefLineExEx (&ii, bsp, buf, buflen, tech, NULL, NULL, TRUE, TRUE)) {
if (StringICmp (buf, title) != 0) {
@@ -6561,6 +6740,9 @@ static void ValidatePubdesc (ValidStructPtr vsp, GatherContextPtr gcp, PubdescPt
if (imp->pubstatus == PUBSTATUS_aheadofprint && imp->prepub != 2) {
ValidErr (vsp, SEV_WARNING, ERR_GENERIC_PublicationInconsistency, "Ahead-of-print without in-press");
}
+ if (imp->pubstatus == PUBSTATUS_epublish && imp->prepub == 2) {
+ ValidErr (vsp, SEV_WARNING, ERR_GENERIC_PublicationInconsistency, "Electronic-only publication should not also be in-press");
+ }
}
}
break;
@@ -7270,7 +7452,6 @@ static CharPtr Nlm_valid_country_codes [] = {
"Saudi Arabia",
"Senegal",
"Serbia",
- "Serbia and Montenegro",
"Seychelles",
"Sierra Leone",
"Singapore",
@@ -7321,19 +7502,31 @@ static CharPtr Nlm_valid_country_codes [] = {
"West Bank",
"Western Sahara",
"Yemen",
- "Yugoslavia",
"Zambia",
"Zimbabwe",
NULL
};
+static CharPtr Nlm_formerly_valid_country_codes [] = {
+ "British Guiana",
+ "Burma",
+ "Czechoslovakia",
+ "Ivory Coast",
+ "Serbia and Montenegro",
+ "Siam",
+ "USSR",
+ "Yugoslavia",
+ "Zaire",
+ NULL
+};
+
NLM_EXTERN CharPtr PNTR GetValidCountryList (void)
{
return (CharPtr PNTR) Nlm_valid_country_codes;
}
-static Boolean CountryIsValid (CharPtr name)
+NLM_EXTERN Boolean CountryIsValid (CharPtr name, BoolPtr old_countryP)
{
Int2 L, R, mid;
CharPtr ptr;
@@ -7363,6 +7556,25 @@ static Boolean CountryIsValid (CharPtr name)
return TRUE;
}
+ L = 0;
+ R = sizeof (Nlm_formerly_valid_country_codes) / sizeof (Nlm_formerly_valid_country_codes[0]) - 1; /* -1 because now NULL terminated */
+
+ while (L < R) {
+ mid = (L + R) / 2;
+ if (StringICmp (Nlm_formerly_valid_country_codes[mid], str) < 0) {
+ L = mid + 1;
+ } else {
+ R = mid;
+ }
+ }
+
+ if (StringICmp (Nlm_formerly_valid_country_codes[R], str) == 0) {
+ if (old_countryP != NULL) {
+ *old_countryP = TRUE;
+ }
+ return FALSE;
+ }
+
return FALSE;
}
@@ -7439,7 +7651,8 @@ static CharPtr ctry_lat_lon [] = {
"Central African Republic\tCT\t14.4\t2.2\t27.5\t11.0",
"Chad\tCD\t13.4\t7.4\t24.0\t23.5",
"Chile\tCI\t-75.8\t-56.0\t-66.4\t-17.5",
- "China\tCH\t73.5\t20.2\t134.8\t53.6",
+ "China\tCH\t73.5\t20.2\t134.8\t53.6\t108.6\t18.1\t111.1\t20.2",
+ "China: Hainan\tXX\t108.6\t18.1\t111.1\t20.2",
"Christmas Island\tKT\t105.5\t-10.6\t105.7\t-10.4",
"Clipperton Island\tIP\t-109.3\t10.2\t-109.2\t10.3",
"Cocos Islands\tCK\t96.8\t-12.2\t96.9\t-11.8",
@@ -7609,7 +7822,6 @@ static CharPtr ctry_lat_lon [] = {
"Saudi Arabia\tSA\t34.4\t15.6\t55.7\t32.2",
"Senegal\tSG\t-17.6\t12.3\t-11.4\t16.7",
"Serbia\tRB\t18.8\t41.8\t23.1\t46.2",
- "Serbia and Montenegro\tYI\t",
"Seychelles\tSE\t50.7\t-9.6\t51.1\t-9.2\t52.7\t-7.2\t52.8\t-7.0\t53.0\t-6.3\t53.7\t-5.1\t55.2\t-5.9\t56.0\t-3.7\t56.2\t-7.2\t56.3\t-7.1",
"Sierra Leone\tSL\t-13.4\t6.9\t-10.3\t10.0",
"Singapore\tSN\t103.6\t1.1\t104.1\t1.5",
@@ -7712,40 +7924,57 @@ static CharPtr ctry_lat_lon [] = {
"West Bank\tWE\t34.8\t31.3\t35.6\t32.6",
"Western Sahara\tWI\t-17.2\t20.7\t-8.7\t27.7",
"Yemen\tYM\t41.8\t11.7\t54.5\t19.0",
- "Yugoslavia\tXX\t13.3\t40.8\t23.0\t46.9",
"Zambia\tZA\t21.9\t-18.1\t33.7\t-8.2",
"Zimbabwe\tZI\t25.2\t-22.5\t33.1\t-15.6",
NULL
};
-typedef struct ctdata {
- CharPtr country;
+
+/* one CtBlock for each discontiguous area per country */
+
+typedef struct ctblock {
+ CharPtr country; /* points to instance in countries list */
FloatHi minx;
FloatHi miny;
FloatHi maxx;
FloatHi maxy;
-} CtData, PNTR CtDataPtr;
-
-typedef struct ctlist {
- ValNodePtr countries;
- ValNodePtr boundaries;
- CtDataPtr PNTR ctarray;
- CtDataPtr PNTR bdarray;
- Int2 num;
-} CtList, PNTR CtListPtr;
-
-static int LIBCALLBACK SortCdpByCountry (VoidPtr ptr1, VoidPtr ptr2)
+} CtBlock, PNTR CtBlockPtr;
+
+/* one CtGrid for each 10-degree-by-10-degree area touched by a CtBlock */
+
+typedef struct ctgrid {
+ CtBlockPtr cbp;
+ Int2 xindex;
+ Int2 yindex;
+} CtGrid, PNTR CtGridPtr;
+
+/* main structure for country/lat-lon lookup */
+
+typedef struct ctset {
+ ValNodePtr countries;
+ ValNodePtr blocks;
+ ValNodePtr grids;
+ CtBlockPtr PNTR bkarray; /* sorted by country name */
+ CtGridPtr PNTR gdarray; /* sorted by geographic index */
+ Int4 num_blocks;
+ Int4 num_grids;
+} CtSet, PNTR CtSetPtr;
+
+static int LIBCALLBACK SortCbpByCountry (
+ VoidPtr ptr1,
+ VoidPtr ptr2
+)
{
- int compare;
- CtDataPtr cdp1, cdp2;
+ int compare;
+ CtBlockPtr cbp1, cbp2;
if (ptr1 == NULL || ptr2 == NULL) return 0;
- cdp1 = *((CtDataPtr PNTR) ptr1);
- cdp2 = *((CtDataPtr PNTR) ptr2);
- if (cdp1 == NULL || cdp2 == NULL) return 0;
+ cbp1 = *((CtBlockPtr PNTR) ptr1);
+ cbp2 = *((CtBlockPtr PNTR) ptr2);
+ if (cbp1 == NULL || cbp2 == NULL) return 0;
- compare = StringICmp (cdp1->country, cdp2->country);
+ compare = StringICmp (cbp1->country, cbp2->country);
if (compare > 0) {
return 1;
} else if (compare < 0) {
@@ -7755,98 +7984,172 @@ static int LIBCALLBACK SortCdpByCountry (VoidPtr ptr1, VoidPtr ptr2)
return 0;
}
-static int LIBCALLBACK SortCdpByBounds (VoidPtr ptr1, VoidPtr ptr2)
+static int CgpGridComp (
+ CtGridPtr cgp1,
+ Int2 xindex,
+ Int2 yindex
+)
{
- CtDataPtr cdp1, cdp2;
+ if (cgp1 == NULL) return 0;
+
+ if (cgp1->xindex > xindex) {
+ return 1;
+ } else if (cgp1->xindex < xindex) {
+ return -1;
+ }
+
+ if (cgp1->yindex > yindex) {
+ return 1;
+ } else if (cgp1->yindex < yindex) {
+ return -1;
+ }
+
+ return 0;
+}
+
+static int LIBCALLBACK SortCgpByGrid (
+ VoidPtr ptr1,
+ VoidPtr ptr2
+)
+
+{
+ CtBlockPtr cbp1, cbp2;
+ CtGridPtr cgp1, cgp2;
+ int compare;
if (ptr1 == NULL || ptr2 == NULL) return 0;
- cdp1 = *((CtDataPtr PNTR) ptr1);
- cdp2 = *((CtDataPtr PNTR) ptr2);
- if (cdp1 == NULL || cdp2 == NULL) return 0;
+ cgp1 = *((CtGridPtr PNTR) ptr1);
+ cgp2 = *((CtGridPtr PNTR) ptr2);
+ if (cgp1 == NULL || cgp2 == NULL) return 0;
- if (cdp1->minx > cdp2->minx) {
+ compare = CgpGridComp (cgp1, cgp2->xindex, cgp2->yindex);
+ if (compare > 0) {
return 1;
- } else if (cdp1->minx < cdp2->minx) {
+ } else if (compare < 0) {
return -1;
}
- if (cdp1->maxx > cdp2->maxx) {
+ cbp1 = cgp1->cbp;
+ cbp2 = cgp2->cbp;
+ if (cbp1 == NULL || cbp2 == NULL) return 0;
+
+ if (cbp1->minx > cbp2->minx) {
+ return 1;
+ } else if (cbp1->minx < cbp2->minx) {
return -1;
- } else if (cdp1->maxx < cdp2->maxx) {
+ }
+
+ if (cbp1->maxx > cbp2->maxx) {
+ return -1;
+ } else if (cbp1->maxx < cbp2->maxx) {
return 1;
}
- if (cdp1->miny > cdp2->miny) {
+ if (cbp1->miny > cbp2->miny) {
return 1;
- } else if (cdp1->miny < cdp2->miny) {
+ } else if (cbp1->miny < cbp2->miny) {
return -1;
}
- if (cdp1->maxy > cdp2->maxy) {
+ if (cbp1->maxy > cbp2->maxy) {
return -1;
- } else if (cdp1->maxy < cdp2->maxy) {
+ } else if (cbp1->maxy < cbp2->maxy) {
return 1;
}
+ compare = StringICmp (cbp1->country, cbp2->country);
+ if (compare > 0) {
+ return 1;
+ } else if (compare < 0) {
+ return -1;
+ }
+
return 0;
}
-static CtListPtr CtLatLonDataFree (
- CtListPtr clp
+static Int2 LatLonDegreeToIndex (
+ FloatHi coord
)
{
- if (clp == NULL) return NULL;
+ double fval;
+ long ival;
- ValNodeFreeData (clp->countries);
- ValNodeFreeData (clp->boundaries);
+ fval = coord;
+ fval += 200.0;
+ fval /= 10.0;
+ ival = (long) fval;
+ ival -= 20;
- MemFree (clp->ctarray);
- MemFree (clp->bdarray);
+ return ival;
+}
+
+static CtSetPtr CtSetDataFree (
+ CtSetPtr csp
+)
+
+{
+ if (csp == NULL) return NULL;
+
+ ValNodeFreeData (csp->countries);
+ ValNodeFreeData (csp->blocks);
+ ValNodeFreeData (csp->grids);
- MemFree (clp);
+ MemFree (csp->bkarray);
+ MemFree (csp->gdarray);
+
+ MemFree (csp);
return NULL;
}
-static Boolean ct_list_not_found = FALSE;
+static Boolean ct_set_not_found = FALSE;
-static CtListPtr GetCtLatLonDataInt (
+static CtSetPtr GetCtSetLatLonDataInt (
CharPtr prop,
CharPtr file,
CharPtr PNTR local
)
{
- ValNodePtr boundaries = NULL;
- FloatHi bounds [4];
- CtDataPtr cdp;
- CtDataPtr PNTR ctarray;
- CtDataPtr PNTR bdarray;
- CtListPtr clp;
- ValNodePtr countries = NULL;
- CharPtr country;
- FileCache fc;
- FILE *fp = NULL;
- Int2 i;
- Int2 j = 0;
- ValNodePtr lastbdry = NULL;
- ValNodePtr lastctry = NULL;
- Char line [1024];
- Int4 num;
- Char path [PATH_MAX];
- CharPtr ptr;
- ErrSev sev;
- CharPtr str = NULL;
- double val;
- ValNodePtr vnp;
- CharPtr wrk;
-
- clp = (CtListPtr) GetAppProperty (prop);
- if (clp != NULL) return clp;
-
- if (ct_list_not_found) return NULL;
+ CtBlockPtr PNTR bkarray;
+ ValNodePtr blocks = NULL;
+ FloatHi bounds [4];
+ CtBlockPtr cbp;
+ CtGridPtr cgp;
+ ValNodePtr countries = NULL;
+ CharPtr country;
+ CtSetPtr csp;
+ FileCache fc;
+ FILE *fp = NULL;
+ CtGridPtr PNTR gdarray;
+ ValNodePtr grids = NULL;
+ Int2 hix;
+ Int2 hiy;
+ Int2 i;
+ Int2 j = 0;
+ ValNodePtr lastblk = NULL;
+ ValNodePtr lastctry = NULL;
+ ValNodePtr lastgrd = NULL;
+ Char line [1024];
+ Int2 lox;
+ Int2 loy;
+ Int4 num;
+ Char path [PATH_MAX];
+ CharPtr ptr;
+ ErrSev sev;
+ CharPtr str = NULL;
+ double val;
+ ValNodePtr vnp;
+ CharPtr wrk;
+ Int2 x;
+ Int2 y;
+
+ csp = (CtSetPtr) GetAppProperty (prop);
+ if (csp != NULL) return csp;
+
+ if (ct_set_not_found) return NULL;
if (FindPath ("ncbi", "ncbi", "data", path, sizeof (path))) {
FileBuildPath (path, NULL, file);
@@ -7888,42 +8191,69 @@ static CtListPtr GetCtLatLonDataInt (
wrk = StringSave (ptr);
str = wrk;
i = 0;
+
while (StringDoesHaveText (str)) {
ptr = StringChr (str, '\t');
if (ptr != NULL) {
*ptr = '\0';
ptr++;
}
+
if (sscanf (str, "%lf", &val) == 1) {
bounds [i] = (FloatHi) val;
i++;
if (i > 3) {
- cdp = (CtDataPtr) MemNew (sizeof (CtData));
- if (cdp != NULL) {
- cdp->country = country;
- cdp->minx = bounds [0];
- cdp->miny = bounds [1];
- cdp->maxx = bounds [2];
- cdp->maxy = bounds [3];
-
- vnp = ValNodeAddPointer (&lastbdry, 0, (Pointer) cdp);
- if (boundaries == NULL) {
- boundaries = vnp;
+ cbp = (CtBlockPtr) MemNew (sizeof (CtBlock));
+ if (cbp != NULL) {
+ cbp->country = country;
+ cbp->minx = bounds [0];
+ cbp->miny = bounds [1];
+ cbp->maxx = bounds [2];
+ cbp->maxy = bounds [3];
+
+ vnp = ValNodeAddPointer (&lastblk, 0, (Pointer) cbp);
+ if (blocks == NULL) {
+ blocks = vnp;
+ }
+ lastblk = vnp;
+
+ lox = LatLonDegreeToIndex (cbp->minx);
+ loy = LatLonDegreeToIndex (cbp->miny);
+ hix = LatLonDegreeToIndex (cbp->maxx);
+ hiy = LatLonDegreeToIndex (cbp->maxy);
+
+ for (x = lox; x <= hix; x++) {
+ for (y = loy; y <= hiy; y++) {
+ cgp = (CtGridPtr) MemNew (sizeof (CtGrid));
+ if (cgp != NULL) {
+ cgp->cbp = cbp;
+ cgp->xindex = x;
+ cgp->yindex = y;
+
+ vnp = ValNodeAddPointer (&lastgrd, 0, (Pointer) cgp);
+ if (grids == NULL) {
+ grids = vnp;
+ }
+ lastgrd = vnp;
+ }
+ }
}
- lastbdry = vnp;
}
i = 0;
}
}
+
str = ptr;
}
+
MemFree (wrk);
}
}
}
}
+
if (fp != NULL) {
str = FileCacheReadLine (&fc, line, sizeof (line), NULL);
} else {
@@ -7940,55 +8270,59 @@ static CtListPtr GetCtLatLonDataInt (
FileClose (fp);
}
- if (countries == NULL || boundaries == NULL) {
- ct_list_not_found = TRUE;
+ if (countries == NULL || blocks == NULL || grids == NULL) {
+ ct_set_not_found = TRUE;
return NULL;
}
- clp = (CtListPtr) MemNew (sizeof (CtList));
- if (clp == NULL) return NULL;
+ csp = (CtSetPtr) MemNew (sizeof (CtSet));
+ if (csp == NULL) return NULL;
/* now populate, heap sort arrays */
- num = ValNodeLen (boundaries);
+ num = ValNodeLen (blocks);
- clp->countries = countries;
- clp->boundaries = boundaries;
- clp->num = (Int2) num;
+ csp->countries = countries;
+ csp->blocks = blocks;
+ csp->num_blocks = (Int2) num;
- ctarray = (CtDataPtr PNTR) MemNew (sizeof (CtDataPtr) * (num + 1));
- if (ctarray != NULL) {
- for (vnp = boundaries, i = 0; vnp != NULL; vnp = vnp->next, i++) {
- cdp = (CtDataPtr) vnp->data.ptrvalue;
- ctarray [i] = cdp;
+ bkarray = (CtBlockPtr PNTR) MemNew (sizeof (CtBlockPtr) * (num + 1));
+ if (bkarray != NULL) {
+ for (vnp = blocks, i = 0; vnp != NULL; vnp = vnp->next, i++) {
+ cbp = (CtBlockPtr) vnp->data.ptrvalue;
+ bkarray [i] = cbp;
}
- HeapSort (ctarray, (size_t) num, sizeof (CtDataPtr), SortCdpByCountry);
- clp->ctarray = ctarray;
+ HeapSort (bkarray, (size_t) num, sizeof (CtBlockPtr), SortCbpByCountry);
+ csp->bkarray = bkarray;
}
- bdarray = (CtDataPtr PNTR) MemNew (sizeof (CtDataPtr) * (num + 1));
- if (bdarray != NULL) {
- for (vnp = boundaries, i = 0; vnp != NULL; vnp = vnp->next, i++) {
- cdp = (CtDataPtr) vnp->data.ptrvalue;
- bdarray [i] = cdp;
+ num = ValNodeLen (grids);
+
+ csp->num_grids = (Int2) num;
+
+ gdarray = (CtGridPtr PNTR) MemNew (sizeof (CtGridPtr) * (num + 1));
+ if (gdarray != NULL) {
+ for (vnp = grids, i = 0; vnp != NULL; vnp = vnp->next, i++) {
+ cgp = (CtGridPtr) vnp->data.ptrvalue;
+ gdarray [i] = cgp;
}
- HeapSort (bdarray, (size_t) num, sizeof (CtDataPtr), SortCdpByBounds);
- clp->bdarray = bdarray;
+ HeapSort (gdarray, (size_t) num, sizeof (CtGridPtr), SortCgpByGrid);
+ csp->gdarray = gdarray;
}
- SetAppProperty (prop, (Pointer) clp);
+ SetAppProperty (prop, (Pointer) csp);
- return clp;
+ return csp;
}
-static CtListPtr GetCtLatLonData (
+static CtSetPtr GetCtSetLatLonData (
void
)
{
- return GetCtLatLonDataInt ("CountryLatLonList", "country_lat_lon.txt", ctry_lat_lon);
+ return GetCtSetLatLonDataInt ("CountryLatLonList", "country_lat_lon.txt", ctry_lat_lon);
}
NLM_EXTERN Boolean IsCountryInLatLonList (
@@ -7996,34 +8330,34 @@ NLM_EXTERN Boolean IsCountryInLatLonList (
)
{
- CtDataPtr cdp;
- CtDataPtr PNTR ctarray;
- CtListPtr clp;
- Int2 L, R, mid;
+ CtBlockPtr cbp;
+ CtBlockPtr PNTR bkarray;
+ CtSetPtr csp;
+ Int2 L, R, mid;
if (StringHasNoText (country)) return FALSE;
- clp = GetCtLatLonData ();
- if (clp == NULL) return FALSE;
+ csp = GetCtSetLatLonData ();
+ if (csp == NULL) return FALSE;
- ctarray = clp->ctarray;
- if (ctarray == NULL) return FALSE;
+ bkarray = csp->bkarray;
+ if (bkarray == NULL) return FALSE;
L = 0;
- R = clp->num - 1;
+ R = csp->num_blocks - 1;
while (L < R) {
mid = (L + R) / 2;
- cdp = ctarray [mid];
- if (cdp != NULL && StringICmp (cdp->country, country) < 0) {
+ cbp = bkarray [mid];
+ if (cbp != NULL && StringICmp (cbp->country, country) < 0) {
L = mid + 1;
} else {
R = mid;
}
}
- cdp = ctarray [R];
- if (cdp != NULL && StringICmp (cdp->country, country) == 0) return TRUE;
+ cbp = bkarray [R];
+ if (cbp != NULL && StringICmp (cbp->country, country) == 0) return TRUE;
return FALSE;
}
@@ -8035,37 +8369,37 @@ NLM_EXTERN Boolean TestLatLonForCountry (
)
{
- CtDataPtr cdp;
- CtDataPtr PNTR ctarray;
- CtListPtr clp;
- Int2 L, R, mid;
+ CtBlockPtr cbp;
+ CtBlockPtr PNTR bkarray;
+ CtSetPtr csp;
+ Int2 L, R, mid;
if (StringHasNoText (country)) return FALSE;
- clp = GetCtLatLonData ();
- if (clp == NULL) return FALSE;
+ csp = GetCtSetLatLonData ();
+ if (csp == NULL) return FALSE;
- ctarray = clp->ctarray;
- if (ctarray == NULL) return FALSE;
+ bkarray = csp->bkarray;
+ if (bkarray == NULL) return FALSE;
L = 0;
- R = clp->num - 1;
+ R = csp->num_blocks - 1;
while (L < R) {
mid = (L + R) / 2;
- cdp = ctarray [mid];
- if (cdp != NULL && StringICmp (cdp->country, country) < 0) {
+ cbp = bkarray [mid];
+ if (cbp != NULL && StringICmp (cbp->country, country) < 0) {
L = mid + 1;
} else {
R = mid;
}
}
- while (R < clp->num) {
- cdp = ctarray [R];
- if (cdp == NULL) return FALSE;
- if (StringICmp (cdp->country, country) != 0) return FALSE;
- if (lon >= cdp->minx && lat >= cdp->miny && lon <= cdp->maxx && lat <= cdp->maxy) return TRUE;
+ while (R < csp->num_blocks) {
+ cbp = bkarray [R];
+ if (cbp == NULL) return FALSE;
+ if (StringICmp (cbp->country, country) != 0) return FALSE;
+ if (lon >= cbp->minx && lat >= cbp->miny && lon <= cbp->maxx && lat <= cbp->maxy) return TRUE;
R++;
}
@@ -8078,44 +8412,53 @@ NLM_EXTERN CharPtr GuessCountryForLatLon (
)
{
- CtDataPtr PNTR bdarray;
- CtDataPtr cdp;
- CtListPtr clp;
+ CtBlockPtr cbp;
+ CtGridPtr cgp;
CharPtr country = NULL;
+ CtSetPtr csp;
+ CtGridPtr PNTR gdarray;
Int2 L, R, mid;
+ Int2 x;
+ Int2 y;
- clp = GetCtLatLonData ();
- if (clp == NULL) return NULL;
+ csp = GetCtSetLatLonData ();
+ if (csp == NULL) return NULL;
- bdarray = clp->bdarray;
- if (bdarray == NULL) return NULL;
+ gdarray = csp->gdarray;
+ if (gdarray == NULL) return NULL;
L = 0;
- R = clp->num - 1;
+ R = csp->num_grids - 1;
+
+ x = LatLonDegreeToIndex (lon);
+ y = LatLonDegreeToIndex (lat);
while (L < R) {
mid = (L + R) / 2;
- cdp = bdarray [mid];
- if (cdp != NULL && cdp->maxx < lon) {
+ cgp = gdarray [mid];
+ if (cgp != NULL && CgpGridComp (cgp, x, y) < 0) {
L = mid + 1;
} else {
R = mid;
}
}
- while (mid < clp->num) {
- cdp = bdarray [mid];
- if (cdp == NULL) return country;
- if (cdp->minx > lon) return country;
- if (lon >= cdp->minx && lat >= cdp->miny && lon <= cdp->maxx && lat <= cdp->maxy) {
- country = cdp->country;
+ while (R < csp->num_grids) {
+ cgp = gdarray [R];
+ if (cgp == NULL) return country;
+ if (cgp->xindex != x || cgp->yindex != y) return country;
+ cbp = cgp->cbp;
+ if (cbp == NULL) return country;
+ if (lon >= cbp->minx && lat >= cbp->miny && lon <= cbp->maxx && lat <= cbp->maxy) {
+ country = cbp->country;
}
- mid++;
+ R++;
}
return country;
}
+
static CharPtr bodiesOfWater [] = {
"Bay",
"Canal",
@@ -8166,7 +8509,7 @@ static TextFsaPtr GetBodiesOfWaterFSA (void)
return fsa;
}
-static Boolean StringContainsBodyOfWater (CharPtr str)
+NLM_EXTERN Boolean StringContainsBodyOfWater (CharPtr str)
{
Char ch;
@@ -8200,61 +8543,6 @@ static Boolean StringContainsBodyOfWater (CharPtr str)
-NLM_EXTERN Boolean ParseLatLon (
- CharPtr lat_lon,
- FloatHi PNTR latP,
- FloatHi PNTR lonP
-)
-
-{
- char ew;
- double lat;
- double lon;
- char ns;
-
- if (latP != NULL) {
- *latP = 0.0;
- }
- if (lonP != NULL) {
- *lonP = 0.0;
- }
-
- if (StringHasNoText (lat_lon)) return FALSE;
-
- if (sscanf (lat_lon, "%lf %c %lf %c", &lat, &ns, &lon, &ew) == 4) {
- if (lon < -180.0) {
- lon = -180.0;
- }
- if (lat < -90.0) {
- lat = -90.0;
- }
- if (lon > 180.0) {
- lon = 180.0;
- }
- if (lat > 90.0) {
- lat = 90.0;
- }
- if (ew == 'W') {
- lon = -lon;
- }
- if (ns == 'S') {
- lat = -lat;
- }
-
- if (latP != NULL) {
- *latP = (FloatHi) lat;
- }
- if (lonP != NULL) {
- *lonP = (FloatHi) lon;
- }
-
- return TRUE;
- }
-
- return FALSE;
-}
-
-
static CharPtr GetDash (CharPtr str)
@@ -9049,12 +9337,13 @@ static void ValidateLatLon (ValidStructPtr vsp, CharPtr lat_lon)
* Gather callback helper function for validating context on a Bioseq
*
*****************************************************************************/
-static void ValidateBioSource (ValidStructPtr vsp, GatherContextPtr gcp, BioSourcePtr biop, SeqFeatPtr sfp)
+static void ValidateBioSource (ValidStructPtr vsp, GatherContextPtr gcp, BioSourcePtr biop, SeqFeatPtr sfp, ValNodePtr sdp)
{
Char badch;
Boolean bad_frequency;
+ BioseqPtr bsp;
+ BioseqSetPtr bssp;
Char buf [256];
- CharPtr casecounts;
Char ch;
Boolean chromconf = FALSE;
Int2 chromcount = 0;
@@ -9063,38 +9352,46 @@ static void ValidateBioSource (ValidStructPtr vsp, GatherContextPtr gcp, BioSour
ValNodePtr db;
DbtagPtr dbt;
Boolean format_ok;
+ CharPtr gb_synonym = NULL;
Boolean germline = FALSE;
CharPtr guess = NULL;
Boolean has_strain = FALSE;
Boolean has_fwd_pcr_seq = FALSE;
Boolean has_rev_pcr_seq = FALSE;
Boolean has_pcr_name = FALSE;
- Int2 i;
+ Boolean has_metagenome_source = FALSE;
Int4 id;
Boolean is_env_sample = FALSE;
Boolean is_iso_source = FALSE;
Boolean is_metagenomic = FALSE;
Boolean is_specific_host = FALSE;
Boolean is_transgenic = FALSE;
+ Boolean isViral = FALSE;
CharPtr last_db = NULL;
FloatHi lat = 0.0;
FloatHi lon = 0.0;
CharPtr lat_lon = NULL;
Boolean lat_in_range;
Boolean lon_in_range;
+ Boolean old_country = FALSE;
OrgNamePtr onp;
OrgModPtr omp;
OrgRefPtr orp;
+ ObjValNodePtr ovp;
Int4 primer_len_before;
Int4 primer_len_after;
ValNodePtr pset;
CharPtr ptr;
Boolean rearranged = FALSE;
+ SeqEntryPtr sep;
ErrSev sev;
SubSourcePtr ssp;
CharPtr str;
Boolean strict = TRUE;
+ CharPtr synonym = NULL;
Char tmp [128];
+ Int4 dbvalid;
+ CharPtr dbxerr;
if (vsp->sourceQualTags == NULL) {
InitializeSourceQualTags (vsp);
@@ -9105,6 +9402,17 @@ static void ValidateBioSource (ValidStructPtr vsp, GatherContextPtr gcp, BioSour
ValidErr (vsp, SEV_WARNING, ERR_SEQ_DESCR_ObsoleteSourceLocation,
"Transposon and insertion sequence are no longer legal locations");
}
+
+ orp = biop->org;
+ if (orp != NULL) {
+ onp = orp->orgname;
+ if (onp != NULL) {
+ if (StringNICmp (onp->lineage, "Viruses; ", 9) == 0) {
+ isViral = TRUE;
+ }
+ }
+ }
+
ssp = biop->subtype;
while (ssp != NULL) {
if (ssp->subtype == SUBSRC_country) {
@@ -9112,11 +9420,15 @@ static void ValidateBioSource (ValidStructPtr vsp, GatherContextPtr gcp, BioSour
ValidErr (vsp, SEV_WARNING, ERR_SEQ_DESCR_BadCountryCode, "Multiple country names on BioSource");
}
countryname = ssp->name;
- if (! CountryIsValid (countryname)) {
+ if (! CountryIsValid (countryname, &old_country)) {
if (StringHasNoText (countryname)) {
countryname = "?";
}
- ValidErr (vsp, SEV_ERROR, ERR_SEQ_DESCR_BadCountryCode, "Bad country name [%s]", countryname);
+ if (old_country) {
+ ValidErr (vsp, SEV_WARNING, ERR_SEQ_DESCR_BadCountryCode, "Replaced country name [%s]", countryname);
+ } else {
+ ValidErr (vsp, SEV_ERROR, ERR_SEQ_DESCR_BadCountryCode, "Bad country name [%s]", countryname);
+ }
}
} else if (ssp->subtype == SUBSRC_chromosome) {
chromcount++;
@@ -9166,10 +9478,42 @@ static void ValidateBioSource (ValidStructPtr vsp, GatherContextPtr gcp, BioSour
}
} else if (ssp->subtype == SUBSRC_isolation_source) {
is_iso_source = TRUE;
- } else if (ssp->subtype == SUBSRC_plasmid_name) {
+ } else if (ssp->subtype == SUBSRC_plasmid_name) {
if (biop->genome != GENOME_plasmid) {
ValidErr (vsp, SEV_WARNING, ERR_SEQ_DESCR_BioSourceInconsistency, "Plasmid subsource but not plasmid location");
}
+ } else if (ssp->subtype == SUBSRC_plastid_name) {
+ if (StringCmp (ssp->name, "chloroplast") == 0) {
+ if (biop->genome != GENOME_chloroplast) {
+ ValidErr (vsp, SEV_WARNING, ERR_SEQ_DESCR_BioSourceInconsistency, "Plastid name subsource chloroplast but not chloroplast location");
+ }
+ } else if (StringCmp (ssp->name, "chromoplast") == 0) {
+ if (biop->genome != GENOME_chromoplast) {
+ ValidErr (vsp, SEV_WARNING, ERR_SEQ_DESCR_BioSourceInconsistency, "Plastid name subsource chromoplast but not chromoplast location");
+ }
+ } else if (StringCmp (ssp->name, "kinetoplast") == 0) {
+ if (biop->genome != GENOME_kinetoplast) {
+ ValidErr (vsp, SEV_WARNING, ERR_SEQ_DESCR_BioSourceInconsistency, "Plastid name subsource kinetoplast but not kinetoplast location");
+ }
+ } else if (StringCmp (ssp->name, "plastid") == 0) {
+ if (biop->genome != GENOME_plastid) {
+ ValidErr (vsp, SEV_WARNING, ERR_SEQ_DESCR_BioSourceInconsistency, "Plastid name subsource plastid but not plastid location");
+ }
+ } else if (StringCmp (ssp->name, "apicoplast") == 0) {
+ if (biop->genome != GENOME_apicoplast) {
+ ValidErr (vsp, SEV_WARNING, ERR_SEQ_DESCR_BioSourceInconsistency, "Plastid name subsource apicoplast but not apicoplast location");
+ }
+ } else if (StringCmp (ssp->name, "leucoplast") == 0) {
+ if (biop->genome != GENOME_leucoplast) {
+ ValidErr (vsp, SEV_WARNING, ERR_SEQ_DESCR_BioSourceInconsistency, "Plastid name subsource leucoplast but not leucoplast location");
+ }
+ } else if (StringCmp (ssp->name, "proplastid") == 0) {
+ if (biop->genome != GENOME_proplastid) {
+ ValidErr (vsp, SEV_WARNING, ERR_SEQ_DESCR_BioSourceInconsistency, "Plastid name subsource proplastid but not proplastid location");
+ }
+ } else {
+ ValidErr (vsp, SEV_WARNING, ERR_SEQ_DESCR_BioSourceInconsistency, "Plastid name subsource contains unrecognized value");
+ }
} else if (ssp->subtype == SUBSRC_collection_date) {
if (! CollectionDateIsValid (ssp->name)) {
ValidErr (vsp, SEV_WARNING, ERR_SEQ_DESCR_BadCollectionDate, "Collection_date format is not in DD-Mmm-YYYY format");
@@ -9258,6 +9602,14 @@ static void ValidateBioSource (ValidStructPtr vsp, GatherContextPtr gcp, BioSour
ValidErr (vsp, SEV_WARNING, ERR_SEQ_DESCR_BioSourceInconsistency, "bad frequency qualifier value %s", ssp->name);
}
}
+ } else if (ssp->subtype == SUBSRC_sex && isViral) {
+ ValidErr (vsp, SEV_WARNING, ERR_SEQ_DESCR_BioSourceInconsistency, "Virus has unexpected sex qualifier");
+ } else if (ssp->subtype == SUBSRC_cell_line && isViral) {
+ ValidErr (vsp, SEV_WARNING, ERR_SEQ_DESCR_BioSourceInconsistency, "Virus has unexpected cell_line qualifier");
+ } else if (ssp->subtype == SUBSRC_cell_type && isViral) {
+ ValidErr (vsp, SEV_WARNING, ERR_SEQ_DESCR_BioSourceInconsistency, "Virus has unexpected cell_type qualifier");
+ } else if (ssp->subtype == SUBSRC_tissue_type && isViral) {
+ ValidErr (vsp, SEV_WARNING, ERR_SEQ_DESCR_BioSourceInconsistency, "Virus has unexpected tissue_type qualifier");
}
ssp = ssp->next;
}
@@ -9330,9 +9682,10 @@ static void ValidateBioSource (ValidStructPtr vsp, GatherContextPtr gcp, BioSour
*/
} else if (TestLatLonForCountry (buf, lon, lat)) {
ValidErr (vsp, SEV_WARNING, ERR_SEQ_DESCR_LatLonValue, "Latitude and longitude values appear to be exchanged");
+ /*
} else if (strict) {
- /* single unqualified country name, report at info level for now */
ValidErr (vsp, SEV_INFO, ERR_SEQ_DESCR_LatLonCountry, "Lat_lon '%s' does not map to '%s'", lat_lon, buf);
+ */
} else {
if (vsp->strictLatLonCountry || (! StringContainsBodyOfWater (countryname))) {
guess = GuessCountryForLatLon (lat, lon);
@@ -9398,6 +9751,35 @@ static void ValidateBioSource (ValidStructPtr vsp, GatherContextPtr gcp, BioSour
if (biop->genome != GENOME_proviral && biop->genome != GENOME_virion) {
ValidErr (vsp, SEV_WARNING, ERR_SEQ_DESCR_BioSourceInconsistency, "HIV should be proviral or virion");
}
+ } else if (StringICmp (orp->taxname, "uncultured bacterium") == 0) {
+ bsp = NULL;
+ if (sfp != NULL) {
+ bsp = BioseqFindFromSeqLoc (sfp->location);
+ } else if (sdp != NULL && sdp->extended != 0) {
+ ovp = (ObjValNodePtr) sdp;
+ if (ovp->idx.parenttype == OBJ_BIOSEQ) {
+ bsp = (BioseqPtr) ovp->idx.parentptr;
+ } else if (ovp->idx.parenttype == OBJ_BIOSEQSET) {
+ bssp = (BioseqSetPtr) ovp->idx.parentptr;
+ if (bssp != NULL) {
+ sep = bssp->seqentry;
+ if (sep != NULL) {
+ sep = FindNthBioseq (sep, 1);
+ if (sep != NULL && IS_Bioseq (sep)) {
+ bsp = (BioseqPtr) sep->data.ptrvalue;
+ }
+ }
+ }
+ }
+ }
+ if (bsp != NULL && bsp->length >= 10000) {
+ ValidErr (vsp, SEV_WARNING, ERR_SEQ_DESCR_BioSourceInconsistency, "Uncultured bacterium sequence length is suspiciously high");
+ }
+ }
+ if (StringNICmp (orp->taxname, "uncultured ", 11) == 0) {
+ if (! is_env_sample) {
+ ValidErr (vsp, SEV_WARNING, ERR_SEQ_DESCR_BioSourceInconsistency, "Uncultured should also have /environmental_sample");
+ }
}
}
if (orp == NULL || (StringHasNoText (orp->taxname) && StringHasNoText (orp->common))) {
@@ -9435,6 +9817,14 @@ static void ValidateBioSource (ValidStructPtr vsp, GatherContextPtr gcp, BioSour
ValidErr (vsp, SEV_WARNING, ERR_SEQ_DESCR_BadOrganelle, "Only Chlorarachniophyceae and Cryptophyta have nucleomorphs");
}
}
+
+ /* warn if bacteria has organelle location */
+ if (StringCmp (onp->div, "BCT") == 0
+ && biop->genome != GENOME_unknown
+ && biop->genome != GENOME_genomic
+ && biop->genome != GENOME_plasmid) {
+ ValidErr (vsp, SEV_WARNING, ERR_SEQ_DESCR_BioSourceInconsistency, "Bacterial source should not have organelle location");
+ }
}
for (db = orp->db; db != NULL; db = db->next) {
dbt = (DbtagPtr) db->data.ptrvalue;
@@ -9458,12 +9848,15 @@ static void ValidateBioSource (ValidStructPtr vsp, GatherContextPtr gcp, BioSour
}
has_strain = TRUE;
} else if (omp->subtype == ORGMOD_variety) {
- if ((! StringHasNoText (onp->div)) && StringICmp (onp->div, "PLN") != 0) {
- ValidErr (vsp, SEV_WARNING, ERR_SEQ_DESCR_BadOrgMod, "Orgmod variety should only be in plants or fungi");
+ if ((! StringHasNoText (onp->div)) && StringICmp (onp->div, "PLN") != 0 && StringStr (onp->lineage, "Cyanobacteria") == 0) {
+ ValidErr (vsp, SEV_WARNING, ERR_SEQ_DESCR_BadOrgMod, "Orgmod variety should only be in plants, fungi, or cyanobacteria");
}
ValidateOrgModInTaxName (vsp, omp, orp->taxname);
} else if (omp->subtype == ORGMOD_nat_host) {
is_specific_host = TRUE;
+ if (StringICmp (omp->subname, orp->taxname) == 0) {
+ ValidErr (vsp, SEV_WARNING, ERR_SEQ_DESCR_BadOrgMod, "Specific host is identical to taxname");
+ }
} else if (omp->subtype == ORGMOD_other) {
ValidateSourceQualTags (vsp, gcp, biop, omp->subname);
} else if (omp->subtype == ORGMOD_biovar
@@ -9472,6 +9865,16 @@ static void ValidateBioSource (ValidStructPtr vsp, GatherContextPtr gcp, BioSour
|| omp->subtype == ORGMOD_sub_species
|| omp->subtype == ORGMOD_pathovar) {
ValidateOrgModInTaxName (vsp, omp, orp->taxname);
+ } else if (omp->subtype == ORGMOD_metagenome_source) {
+ has_metagenome_source = TRUE;
+ } else if (omp->subtype == ORGMOD_common) {
+ if (StringICmp (omp->subname, orp->common) == 0) {
+ ValidErr (vsp, SEV_WARNING, ERR_SEQ_DESCR_BadOrgMod, "OrgMod common is identical to Org-ref common");
+ }
+ } else if (omp->subtype == ORGMOD_synonym) {
+ synonym = omp->subname;
+ } else if (omp->subtype == ORGMOD_gb_synonym) {
+ gb_synonym = omp->subname;
}
omp = omp->next;
}
@@ -9482,38 +9885,25 @@ static void ValidateBioSource (ValidStructPtr vsp, GatherContextPtr gcp, BioSour
if (is_env_sample && (! is_iso_source) && (! is_specific_host)) {
ValidErr (vsp, SEV_WARNING, ERR_SEQ_DESCR_BioSourceInconsistency, "Environmental sample should also have isolation source or specific host annotated");
}
+ if (has_metagenome_source && (! is_metagenomic)) {
+ ValidErr (vsp, SEV_ERROR, ERR_SEQ_DESCR_BioSourceInconsistency, "Metagenome source should also have metagenomic qualifier");
+ }
+ if (StringDoesHaveText (synonym) && StringDoesHaveText (gb_synonym)) {
+ if (StringICmp (synonym, gb_synonym) == 0) {
+ ValidErr (vsp, SEV_WARNING, ERR_SEQ_DESCR_BioSourceInconsistency, "OrgMod synonym is identical to OrgMod gb_synonym");
+ }
+ }
for (db = orp->db; db != NULL; db = db->next) {
id = -1;
dbt = (DbtagPtr) db->data.ptrvalue;
if (dbt != NULL && dbt->db != NULL) {
- casecounts = NULL;
- for (i = 0; legalDbXrefs [i] != NULL; i++) {
- if (StringCmp (dbt->db, legalDbXrefs [i]) == 0) {
- id = i;
- break;
- } else if (StringICmp (dbt->db, legalDbXrefs [i]) == 0) {
- casecounts = legalDbXrefs [i];
- }
- }
- if (id == -1 || id < 4) {
- if (StringDoesHaveText (casecounts)) {
- ValidErr (vsp, SEV_WARNING, ERR_SEQ_FEAT_IllegalDbXref, "Illegal db_xref type %s, legal capitalization is %s", dbt->db, casecounts);
- } else {
- ValidErr (vsp, SEV_WARNING, ERR_SEQ_FEAT_IllegalDbXref, "Illegal db_xref type %s", dbt->db);
- }
- }
- }
- }
-
- if (sfp != NULL) {
- for (db = sfp->dbxref; db != NULL; db = db->next) {
- dbt = (DbtagPtr) db->data.ptrvalue;
- if (dbt != NULL) {
- if (StringICmp (dbt->db, "taxon") == 0) {
- ValidErr (vsp, SEV_WARNING, ERR_SEQ_FEAT_TaxonDbxrefOnFeature, "BioSource feature has taxon xref in common feature db_xref list");
- }
- }
+ dbxerr = NULL;
+ dbvalid = IsDbxrefValid (dbt->db, NULL, orp, FALSE, &dbxerr);
+ if (dbxerr != NULL) {
+ ValidErr (vsp, SEV_WARNING, ERR_SEQ_FEAT_IllegalDbXref, dbxerr);
+ dbxerr = MemFree (dbxerr);
+ }
}
}
@@ -9861,7 +10251,7 @@ static Boolean ValidateSeqDescrCommon (ValNodePtr sdp, BioseqValidStrPtr bvsp, V
ValidErr (vsp, SEV_WARNING, ERR_SEQ_DESCR_InvalidForType, "Molinfo-biomol other should be used if Biosource-location is synthetic");
}
}
- /* ValidateBioSource (vsp, gcp, biop, NULL); */
+ /* ValidateBioSource (vsp, gcp, biop, NULL, vnp); */
this_org = biop->org;
/* fall into Seq_descr_org */
case Seq_descr_org:
@@ -10205,6 +10595,20 @@ static Boolean IsGenBankAccn (SeqEntryPtr sep, SeqLocPtr location)
return FALSE;
}
+static Boolean IsEMBLAccn (SeqEntryPtr sep, SeqLocPtr location)
+{
+ BioseqPtr bsp;
+ SeqIdPtr sip;
+
+ bsp = BioseqFindFromSeqLoc (location);
+ if (bsp != NULL) {
+ for (sip = bsp->id; sip != NULL; sip = sip->next) {
+ if (sip->choice == SEQID_EMBL) return TRUE;
+ }
+ }
+ return FALSE;
+}
+
static Boolean IsGeneralAccn (SeqEntryPtr sep, SeqLocPtr location)
{
BioseqPtr bsp;
@@ -10836,6 +11240,8 @@ static void ValidateCDSmRNAmatch (
{
BioSourcePtr biop;
+ ValNodePtr cdshead = NULL;
+ ValNodePtr cdstail = NULL;
SeqMgrDescContext dcontext;
SeqMgrFeatContext fcontext, rcontext;
GatherContextPtr gcp;
@@ -10846,6 +11252,7 @@ static void ValidateCDSmRNAmatch (
Int2 i, j, k, numfeats, tmpnumcds, tmpnummrna, count;
Boolean is_genbank = FALSE;
LpData ld;
+ Int2 num_no_mrna = 0;
Int4 num_repeat_regions;
Uint2 olditemtype = 0;
Uint4 olditemid = 0;
@@ -10859,6 +11266,7 @@ static void ValidateCDSmRNAmatch (
SeqFeatPtr sfp;
SeqIdPtr sip;
VvmDataPtr vdp;
+ ValNodePtr vnp;
if (vsp == NULL || bsp == NULL) return;
if (! ISA_na (bsp->mol)) return;
@@ -11078,6 +11486,7 @@ static void ValidateCDSmRNAmatch (
rpt_region = SeqMgrGetOverlappingFeature (sfp->location, 0, repeat_region_array, num_repeat_regions,
NULL, CONTAINED_WITHIN, &rcontext);
if (rpt_region == NULL) {
+ /*
if (gcp != NULL) {
gcp->itemID = sfp->idx.itemID;
gcp->thistype = OBJ_SEQFEAT;
@@ -11085,6 +11494,13 @@ static void ValidateCDSmRNAmatch (
vsp->descr = NULL;
vsp->sfp = sfp;
ValidErr (vsp, SEV_WARNING, ERR_SEQ_FEAT_CDSwithNoMRNAOverlap, "CDS overlapped by 0 mRNAs");
+ */
+ vnp = ValNodeAddPointer (&cdstail, 0, (Pointer) sfp);
+ if (cdshead == NULL) {
+ cdshead = vnp;
+ }
+ cdstail = vnp;
+ num_no_mrna++;
}
}
}
@@ -11094,6 +11510,34 @@ static void ValidateCDSmRNAmatch (
MemFree (repeat_region_array);
+ if (num_no_mrna > 0) {
+ if (num_no_mrna >= 10) {
+ if (gcp != NULL) {
+ gcp->itemID = olditemid;
+ gcp->thistype = olditemtype;
+ }
+ vsp->descr = NULL;
+ vsp->sfp = NULL;
+ vsp->bsp = bsp;
+ ValidErr (vsp, SEV_WARNING, ERR_SEQ_FEAT_CDSwithNoMRNAOverlap,
+ "%d out of %d CDSs overlapped by 0 mRNAs", (int) num_no_mrna, (int) numcds);
+ } else {
+ for (vnp = cdshead; vnp != NULL; vnp = vnp->next) {
+ sfp = (SeqFeatPtr) vnp->data.ptrvalue;
+ if (sfp == NULL) continue;
+ if (gcp != NULL) {
+ gcp->itemID = sfp->idx.itemID;
+ gcp->thistype = OBJ_SEQFEAT;
+ }
+ vsp->descr = NULL;
+ vsp->sfp = sfp;
+ ValidErr (vsp, SEV_WARNING, ERR_SEQ_FEAT_CDSwithNoMRNAOverlap, "CDS overlapped by 0 mRNAs");
+ }
+ }
+ }
+
+ ValNodeFree (cdshead);
+
if (gcp != NULL) {
gcp->itemID = olditemid;
gcp->thistype = olditemtype;
@@ -11138,6 +11582,7 @@ static Boolean HaveUniqueFeatIDXrefs (SeqFeatXrefPtr xref1, SeqFeatXrefPtr xref2
static Int2 WhichRNA (SeqFeatPtr sfp)
{
+ GBQualPtr gbq;
RnaRefPtr rrp;
CharPtr str;
@@ -11168,6 +11613,13 @@ static Int2 WhichRNA (SeqFeatPtr sfp)
if (StringNICmp (str, "23 ", 3) == 0) return RIGHT_RIBOSOMAL_SUBUNIT;
}
if (rrp->type == 255) {
+ if (StringICmp (str, "misc_RNA") == 0) {
+ for (gbq = sfp->qual; gbq != NULL; gbq = gbq->next) {
+ if (StringICmp (gbq->qual, "product") != 0) continue;
+ if (StringHasNoText (gbq->val)) continue;
+ str = gbq->val;
+ }
+ }
if (StringICmp (str, "internal transcribed spacer 1") == 0) return INTERNAL_SPACER_1;
if (StringICmp (str, "internal transcribed spacer 2") == 0) return INTERNAL_SPACER_2;
/* variant spellings */
@@ -11285,17 +11737,24 @@ static Boolean LIBCALLBACK GetFeatsInGaps (
)
{
+ BioseqPtr bsp;
Int4 dashes;
Int2 first = 0;
GatherContextPtr gcp;
Int2 last = 0;
+ Int4 len;
+ SeqLocPtr loc;
+ Boolean needToStream = TRUE;
Int4 Ns;
Uint2 olditemtype = 0;
Uint4 olditemid = 0;
Int4 plusses;
+ Int2 prefix = 0;
+ Int2 suffix = 0;
Int4 realBases;
Int2 res;
StreamCache sc;
+ SeqIntPtr sintp;
ValidStructPtr vsp;
if (sfp == NULL || fcontext == NULL) return FALSE;
@@ -11305,6 +11764,8 @@ static Boolean LIBCALLBACK GetFeatsInGaps (
if (gcp == NULL) return FALSE;
if (sfp->idx.subtype == FEATDEF_gap) return TRUE;
+ loc = sfp->location;
+ if (loc == NULL) return TRUE;
olditemid = gcp->itemID;
olditemtype = gcp->thistype;
@@ -11319,7 +11780,43 @@ static Boolean LIBCALLBACK GetFeatsInGaps (
Ns = 0;
realBases = 0;
- if (StreamCacheSetup (NULL, sfp->location, EXPAND_GAPS_TO_DASHES | KNOWN_GAP_AS_PLUS, &sc)) {
+ /* special check for single interval misc_features that may exactly cover a gap */
+ if (loc->choice == SEQLOC_INT && sfp->idx.subtype == FEATDEF_misc_feature) {
+ sintp = (SeqIntPtr) loc->data.ptrvalue;
+ if (sintp != NULL) {
+ bsp = BioseqFind (sintp->id);
+ if (bsp != NULL && sintp->from > 0 && sintp->to < bsp->length - 1) {
+ len = SeqLocLen (loc);
+ if (StreamCacheSetup (bsp, NULL, EXPAND_GAPS_TO_DASHES | KNOWN_GAP_AS_PLUS, &sc)) {
+ StreamCacheSetPosition (&sc, sintp->from - 1);
+ prefix = StreamCacheGetResidue (&sc);
+ while ((res = StreamCacheGetResidue (&sc)) != '\0' && len > 0) {
+ if (IS_LOWER (res)) {
+ res = TO_UPPER (res);
+ }
+ if (first == 0) {
+ first = res;
+ }
+ last = res;
+ if (res == '-') {
+ dashes++;
+ } else if (res == '+') {
+ plusses++;
+ } else if (res == 'N') {
+ Ns++;
+ } else if (res != 0) {
+ realBases++;
+ }
+ len--;
+ }
+ suffix = StreamCacheGetResidue (&sc);
+ needToStream = FALSE;
+ }
+ }
+ }
+ }
+
+ if (needToStream && StreamCacheSetup (NULL, loc, EXPAND_GAPS_TO_DASHES | KNOWN_GAP_AS_PLUS, &sc)) {
while ((res = StreamCacheGetResidue (&sc)) != '\0') {
if (IS_LOWER (res)) {
res = TO_UPPER (res);
@@ -11334,7 +11831,7 @@ static Boolean LIBCALLBACK GetFeatsInGaps (
plusses++;
} else if (res == 'N') {
Ns++;
- } else {
+ } else if (res != 0) {
realBases++;
}
}
@@ -11344,7 +11841,9 @@ static Boolean LIBCALLBACK GetFeatsInGaps (
/* ignore features that do not cover any gap characters */
} else if (first == '-' || first == '+' || last == '-' || last == '+') {
if (realBases > 0) {
- ValidErr (vsp, SEV_WARNING, ERR_SEQ_FEAT_FeatureCrossesGap, "Feature crosses sequence gap");
+ ValidErr (vsp, SEV_WARNING, ERR_SEQ_FEAT_FeatureBeginsOrEndsInGap, "Feature begins or ends in gap");
+ } else if (IS_ALPHA (prefix) && IS_ALPHA (suffix)) {
+ /* ignore (misc_) features that exactly cover the gap */
} else {
ValidErr (vsp, SEV_WARNING, ERR_SEQ_FEAT_FeatureInsideGap, "Feature inside sequence gap");
}
@@ -11352,17 +11851,19 @@ static Boolean LIBCALLBACK GetFeatsInGaps (
/* ignore genes, unless they start or stop in a gap */
} else if (dashes == 0 && plusses == 0 && Ns > 0) {
if (realBases > 0) {
+ /*
ValidErr (vsp, SEV_WARNING, ERR_SEQ_FEAT_FeatureCrossesGap, "Feature crosses gap of Ns");
+ */
} else {
ValidErr (vsp, SEV_WARNING, ERR_SEQ_FEAT_FeatureInsideGap, "Feature inside gap of Ns");
}
} else if (dashes > 0) {
if (realBases > 0) {
if (sfp->idx.subtype == FEATDEF_CDS || sfp->idx.subtype == FEATDEF_mRNA) {
- ValidErr (vsp, SEV_WARNING, ERR_SEQ_FEAT_FeatureCrossesGap, "Feature crosses sequence gap");
+ ValidErr (vsp, SEV_WARNING, ERR_SEQ_FEAT_FeatureCrossesGap, "Feature crosses gap of unknown length");
}
} else {
- ValidErr (vsp, SEV_WARNING, ERR_SEQ_FEAT_FeatureInsideGap, "Feature inside sequence gap");
+ ValidErr (vsp, SEV_WARNING, ERR_SEQ_FEAT_FeatureInsideGap, "Feature inside gap of unknown length");
}
} else if (plusses > 0) {
if (realBases > 0) {
@@ -11381,19 +11882,39 @@ static Boolean LIBCALLBACK GetFeatsInGaps (
return TRUE;
}
+static Boolean LIBCALLBACK MarkFeatsInGaps (
+ SeqFeatPtr sfp,
+ SeqMgrFeatContextPtr fcontext
+)
+
+{
+ VvmDataPtr vdp;
+
+ if (sfp == NULL) return TRUE;
+ vdp = (VvmDataPtr) sfp->idx.scratch;
+ if (vdp == NULL) return TRUE;
+
+ vdp->feat_touches_gap = TRUE;
+
+ return TRUE;
+}
+
static void CheckBioseqForFeatsInGap (
BioseqPtr bsp,
ValidStructPtr vsp
)
{
- Int4 currpos = 0;
- SeqLitPtr litp;
- SeqInt si;
- SeqIdPtr sip;
- SeqLoc sl;
- SeqLocPtr slp;
- ValNodePtr vnp;
+ Int4 currpos = 0;
+ SeqMgrFeatContext fcontext;
+ SeqLitPtr litp;
+ SeqFeatPtr sfp;
+ SeqInt si;
+ SeqIdPtr sip;
+ SeqLoc sl;
+ SeqLocPtr slp;
+ VvmDataPtr vdp;
+ ValNodePtr vnp;
if (bsp == NULL || bsp->repr != Seq_repr_delta || ISA_aa (bsp->mol)) return;
sip = SeqIdFindBest (bsp->id, 0);
@@ -11417,11 +11938,22 @@ static void CheckBioseqForFeatsInGap (
si.id = sip;
sl.choice = SEQLOC_INT;
sl.data.ptrvalue = (Pointer) &si;
- SeqMgrExploreFeatures (bsp, (Pointer) vsp, GetFeatsInGaps, &sl, NULL, NULL);
+ SeqMgrExploreFeatures (bsp, (Pointer) vsp, MarkFeatsInGaps, &sl, NULL, NULL);
+ /* SeqMgrExploreFeatures (bsp, (Pointer) vsp, GetFeatsInGaps, &sl, NULL, NULL); */
}
currpos += litp->length;
}
}
+
+ sfp = SeqMgrGetNextFeature (bsp, NULL, 0, 0, &fcontext);
+ while (sfp != NULL) {
+ vdp = (VvmDataPtr) sfp->idx.scratch;
+ if (vdp != NULL && vdp->feat_touches_gap) {
+ fcontext.userdata = (Pointer) vsp;
+ GetFeatsInGaps (sfp, &fcontext);
+ }
+ sfp = SeqMgrGetNextFeature (bsp, sfp, 0, 0, &fcontext);
+ }
}
static Boolean ValidateBioseqContextIndexed (BioseqPtr bsp, BioseqValidStrPtr bvsp)
@@ -11872,7 +12404,7 @@ static Boolean ValidateBioseqContextIndexed (BioseqPtr bsp, BioseqValidStrPtr bv
if (suppress_duplicate_messages && (featdeftype == FEATDEF_CDS || featdeftype == FEATDEF_mRNA) && HaveUniqueFeatIDXrefs (xref, sfp->xref)) {
/* do not report CDS or mRNA if every one has a unique product and unique featID xrefs */
} else {
- ValidErr (vsp, severity, ERR_SEQ_FEAT_DuplicateFeat, "Features have identical intervals, but labels differ (packaged in different feature table)");
+ ValidErr (vsp, /* severity */ SEV_WARNING, ERR_SEQ_FEAT_DuplicateFeat, "Features have identical intervals, but labels differ (packaged in different feature table)");
}
}
}
@@ -12642,6 +13174,7 @@ static void ValidateBioseqContext (GatherContextPtr gcp)
Boolean is_neg_strand_virus = FALSE;
Boolean is_ambisense_virus = FALSE;
Boolean is_transgenic = FALSE;
+ Boolean has_cds = FALSE;
ErrSev sev;
SubSourcePtr ssp;
CharPtr str;
@@ -12804,6 +13337,7 @@ static void ValidateBioseqContext (GatherContextPtr gcp)
sfp = SeqMgrGetNextFeature (bsp, NULL, SEQFEAT_CDREGION, 0, &fcontext);
while (sfp != NULL) {
+ has_cds = TRUE;
if (SeqLocStrand (sfp->location) == Seq_strand_minus) {
if (mip->biomol != MOLECULE_TYPE_GENOMIC) {
ValidErr (vsp, SEV_WARNING, ERR_SEQ_DESCR_BioSourceInconsistency, "Negative-strand virus with minus strand CDS should be genomic");
@@ -12815,6 +13349,23 @@ static void ValidateBioseqContext (GatherContextPtr gcp)
}
sfp = SeqMgrGetNextFeature (bsp, sfp, SEQFEAT_CDREGION, 0, &fcontext);
}
+ if (! has_cds) {
+ sfp = SeqMgrGetNextFeature (bsp, NULL, 0, FEATDEF_misc_feature, &fcontext);
+ while (sfp != NULL) {
+ if (StringISearch (sfp->comment, "nonfunctional") != NULL) {
+ if (SeqLocStrand (sfp->location) == Seq_strand_minus) {
+ if (mip->biomol != MOLECULE_TYPE_GENOMIC) {
+ ValidErr (vsp, SEV_WARNING, ERR_SEQ_DESCR_BioSourceInconsistency, "Negative-strand virus with nonfunctional minus strand misc_feature should be mRNA or cRNA");
+ }
+ } else {
+ if (mip->biomol != MOLECULE_TYPE_MRNA && mip->biomol != MOLECULE_TYPE_CRNA && (! is_ambisense_virus)) {
+ ValidErr (vsp, SEV_WARNING, ERR_SEQ_DESCR_BioSourceInconsistency, "Negative-strand virus with nonfunctional plus strand misc_feature should be mRNA or cRNA");
+ }
+ }
+ }
+ sfp = SeqMgrGetNextFeature (bsp, sfp, 0, FEATDEF_misc_feature, &fcontext);
+ }
+ }
gcp->entityID = oldEntityID;
gcp->itemID = oldItemID;
@@ -14120,7 +14671,7 @@ static Boolean ValidateECnumber (CharPtr str)
NLM_EXTERN void ECNumberFSAFreeAll (void)
{
- CtListPtr clp;
+ CtSetPtr csp;
TextFsaPtr fsa;
fsa = (TextFsaPtr) GetAppProperty ("SpecificECNumberFSA");
@@ -14153,10 +14704,10 @@ NLM_EXTERN void ECNumberFSAFreeAll (void)
TextFsaFree (fsa);
}
- clp = (CtListPtr) GetAppProperty ("CountryLatLonList");
- if (clp != NULL) {
+ csp = (CtSetPtr) GetAppProperty ("CountryLatLonList");
+ if (csp != NULL) {
SetAppProperty ("CountryLatLonList", NULL);
- CtLatLonDataFree (clp);
+ CtSetDataFree (csp);
}
}
@@ -14723,6 +15274,10 @@ static void ValidateImpFeat (ValidStructPtr vsp, GatherContextPtr gcp, SeqFeatPt
if (!found) {
ValidErr (vsp, SEV_WARNING, ERR_SEQ_FEAT_InvalidQualifierValue, "%s is not a legal value for qualifier %s", gbqual->val, gbqual->qual);
}
+ } else if (val == GBQUAL_frequency) {
+ if (StringCmp (gbqual->val, "1") == 0 || StringCmp (gbqual->val, "1.0") == 0 || StringCmp (gbqual->val, "1.00") == 0) {
+ ValidErr (vsp, SEV_WARNING, ERR_SEQ_FEAT_InvalidQualifierValue, "%s is a suspicious value for qualifier %s", gbqual->val, gbqual->qual);
+ }
} else if (val == GBQUAL_compare) {
multi_compare = FALSE;
ptr = gbqual->val;
@@ -15157,6 +15712,85 @@ static Boolean PartialAtSpliceSiteOrGap (ValidStructPtr vsp, SeqLocPtr head, Uin
return rsult;
}
+
+static void
+ValidateIntronEndsAtSpliceSiteOrGap
+(ValidStructPtr vsp,
+ SeqLocPtr slp)
+{
+ BioseqPtr bsp;
+ SeqIdPtr sip;
+ Uint1 strand;
+ Int4 strt, stop, pos;
+ Boolean partial5, partial3;
+ Char buf[3];
+ Char id_buf[150];
+
+ if (slp == NULL) return;
+ CheckSeqLocForPartial (slp, &partial5, &partial3);
+ if (partial5 && partial3) return;
+
+ sip = SeqLocId (slp);
+ if (sip == NULL)
+ return;
+
+ bsp = NULL;
+ if (sip != NULL && (sip->choice != SEQID_GI || sip->data.intvalue > 0)) {
+ bsp = BioseqLockById (sip);
+ }
+ if (bsp == NULL)
+ return;
+
+ BioseqLabel (bsp, id_buf, sizeof (id_buf) - 1, OM_LABEL_CONTENT);
+
+ strt = SeqLocStart (slp);
+ stop = SeqLocStop (slp);
+
+ strand = SeqLocStrand (slp);
+
+ if (!partial5) {
+ if (strand == Seq_strand_minus) {
+ SeqPortStreamInt (bsp, stop - 1, stop, Seq_strand_minus, EXPAND_GAPS_TO_DASHES, (Pointer) buf, NULL);
+ pos = stop;
+ } else {
+ SeqPortStreamInt (bsp, strt, strt + 1, Seq_strand_plus, EXPAND_GAPS_TO_DASHES, (Pointer) buf, NULL);
+ pos = strt;
+ }
+ if ((buf[0] == '-' && buf[1] == '-')
+ || (buf[0] == 'G' && buf[1] == 'T')
+ || (buf[0] == 'G' && buf[1] == 'C')) {
+ /* location is ok */
+ } else if (pos == 0 || pos == bsp->length - 1) {
+ ValidErr (vsp, SEV_INFO, ERR_SEQ_FEAT_NotSpliceConsensusDonor,
+ "Splice donor consensus (GT) not found at start of terminal intron, position %ld of %s", (long) (pos + 1), id_buf);
+ } else {
+ ValidErr (vsp, SEV_WARNING, ERR_SEQ_FEAT_NotSpliceConsensusDonor,
+ "Splice donor consensus (GT) not found at start of intron, position %ld of %s", (long) (pos + 1), id_buf);
+ }
+ }
+ if (!partial3) {
+ if (strand == Seq_strand_minus) {
+ SeqPortStreamInt (bsp, strt, strt + 1, Seq_strand_minus, EXPAND_GAPS_TO_DASHES, (Pointer) buf, NULL);
+ pos = strt;
+ } else {
+ SeqPortStreamInt (bsp, stop - 1, stop, Seq_strand_plus, EXPAND_GAPS_TO_DASHES, (Pointer) buf, NULL);
+ pos = stop;
+ }
+ if ((buf[0] == '-' && buf[1] == '-')
+ || (buf[0] == 'A' && buf[1] == 'G')) {
+ /* location is ok */
+ } else if (pos == 0 || pos == bsp->length - 1) {
+ ValidErr (vsp, SEV_INFO, ERR_SEQ_FEAT_NotSpliceConsensusAcceptor,
+ "Splice acceptor consensus (AG) not found at end of terminal intron, position %ld of %s, but at end of sequence", (long) (pos + 1), id_buf);
+ } else {
+ ValidErr (vsp, SEV_WARNING, ERR_SEQ_FEAT_NotSpliceConsensusAcceptor,
+ "Splice acceptor consensus (AG) not found at end of intron, position %ld of %s", (long) (pos + 1), id_buf);
+ }
+ }
+ BioseqUnlock (bsp);
+}
+
+
#if 0
static void CheckTrnaCodons (ValidStructPtr vsp, GatherContextPtr gcp, SeqFeatPtr sfp, tRNAPtr trp)
{
@@ -16129,67 +16763,27 @@ static Boolean OverlappingGeneIsPseudo (SeqFeatPtr sfp)
return FALSE;
}
-static CharPtr legalDbXrefOnRefSeq [] = {
- "GenBank",
- "EMBL",
- "DDBJ",
- NULL
-};
-
-static CharPtr badDbXref [] = {
- "PIDe",
- "PIDd",
- "PIDg",
- "PID",
- "NID",
- "GI",
- NULL
-};
-
static void CheckForIllegalDbxref (ValidStructPtr vsp, GatherContextPtr gcp, SeqFeatPtr sfp, ValNodePtr dbxref)
{
- CharPtr casecounts;
+ CharPtr dbxerr;
DbtagPtr db;
- Int2 i;
Int4 id;
ValNodePtr vnp;
+ Boolean valid;
for (vnp = dbxref; vnp != NULL; vnp = vnp->next) {
id = -1;
db = (DbtagPtr) vnp->data.ptrvalue;
if (db != NULL && db->db != NULL) {
- casecounts = NULL;
- for (i = 0; legalDbXrefs [i] != NULL; i++) {
- if (StringCmp (db->db, legalDbXrefs [i]) == 0) {
- id = i;
- break;
- } else if (StringICmp (db->db, legalDbXrefs [i]) == 0) {
- casecounts = legalDbXrefs [i];
- }
- }
- if (id == -1 && GPSorRefSeq (vsp->sep, sfp->location)) {
- for (i = 0; legalDbXrefOnRefSeq [i] != NULL; i++) {
- if (StringCmp (db->db, legalDbXrefOnRefSeq [i]) == 0) return;
- }
- for (i = 0; legalRefSeqDbXrefs [i] != NULL; i++) {
- if (StringCmp (db->db, legalRefSeqDbXrefs [i]) == 0) return;
- }
- }
- if (id == -1 || (sfp->data.choice != SEQFEAT_CDREGION && id < 4)) {
- if (StringDoesHaveText (casecounts)) {
- ValidErr (vsp, SEV_WARNING, ERR_SEQ_FEAT_IllegalDbXref, "Illegal db_xref type %s, legal capitalization is %s", db->db, casecounts);
- } else {
- ValidErr (vsp, SEV_WARNING, ERR_SEQ_FEAT_IllegalDbXref, "Illegal db_xref type %s", db->db);
- }
- } else {
- for (i = 0; badDbXref [i] != NULL; i++) {
- if (StringICmp (db->db, badDbXref [i]) == 0) {
- ValidErr (vsp, SEV_ERROR, ERR_SEQ_FEAT_IllegalDbXref,
- "db_xref type %s is only created by the flatfile generator, and should not be in the record as a separate xref", db->db);
- }
- }
- }
+ dbxerr = NULL;
+ valid = IsDbxrefValid (db->db, sfp, NULL,
+ GPSorRefSeq (vsp->sep, sfp->location),
+ &dbxerr);
+ if (dbxerr != NULL) {
+ ValidErr (vsp, SEV_WARNING, ERR_SEQ_FEAT_IllegalDbXref, dbxerr);
+ dbxerr = MemFree (dbxerr);
+ }
}
}
}
@@ -17133,6 +17727,9 @@ static void ValidateGoTerms (
for (vnp = head; vnp != NULL; vnp = vnp->next) {
gsp = (GovStrucPtr) vnp->data.ptrvalue;
if (gsp == NULL) continue;
+ if (StringHasNoText (gsp->goid)) {
+ ValidErr (vsp, SEV_WARNING, ERR_SEQ_FEAT_GeneOntologyTermMissingGOID, "GO term does not have GO identifier");
+ }
if (lastgsp != NULL) {
if (StringICmp (gsp->term, lastgsp->term) == 0 || StringICmp (gsp->goid, lastgsp->goid) == 0) {
if (gsp->pmid == lastgsp->pmid && StringICmp (gsp->evidence, lastgsp->evidence) == 0) {
@@ -17333,6 +17930,227 @@ static Boolean ValStrandsMatch (Uint1 featstrand, Uint1 locstrand)
return FALSE;
}
+static CharPtr badGeneSyn [] = {
+ "alpha",
+ "alternative",
+ "beta",
+ "cellular",
+ "cytokine",
+ "drosophila",
+ "gamma",
+ "HLA",
+ "homolog",
+ "mouse",
+ "orf",
+ "partial",
+ "plasma",
+ "precursor",
+ "pseudogene",
+ "putative",
+ "rearranged",
+ "small",
+ "trna",
+ "unknown function",
+ "unknown protein",
+ "unknown",
+ "unnamed",
+ NULL
+};
+
+static CharPtr badProtName [] = {
+ "'hypothetical protein",
+ "alpha",
+ "alternative",
+ "alternatively spliced",
+ "bacteriophage hypothetical protein",
+ "beta",
+ "cellular",
+ "cnserved hypothetical protein",
+ "conesrved hypothetical protein",
+ "conserevd hypothetical protein",
+ "conserved archaeal protein",
+ "conserved domain protein",
+ "conserved hypohetical protein",
+ "conserved hypotehtical protein",
+ "conserved hypotheical protein",
+ "conserved hypothertical protein",
+ "conserved hypothetcial protein",
+ "conserved hypothetical exported protein",
+ "conserved hypothetical integral membrane protein",
+ "conserved hypothetical membrane protein",
+ "conserved hypothetical phage protein",
+ "conserved hypothetical prophage protein",
+ "conserved hypothetical protein - phage associated",
+ "conserved hypothetical protein fragment 3",
+ "conserved hypothetical protein, fragment",
+ "conserved hypothetical protein, putative",
+ "conserved hypothetical protein, truncated",
+ "conserved hypothetical protein, truncation",
+ "conserved hypothetical protein; possible membrane protein",
+ "conserved hypothetical protein; putative membrane protein",
+ "conserved hypothetical protein.",
+ "conserved hypothetical protein",
+ "conserved hypothetical proteins",
+ "conserved hypothetical protien",
+ "conserved hypothetical transmembrane protein",
+ "conserved hypothetical",
+ "conserved hypotheticcal protein",
+ "conserved hypthetical protein",
+ "conserved in bacteria",
+ "conserved membrane protein",
+ "conserved protein of unknown function ; putative membrane protein",
+ "conserved protein of unknown function",
+ "conserved protein",
+ "conserved unknown protein",
+ "conservedhypothetical protein",
+ "conserverd hypothetical protein",
+ "conservered hypothetical protein",
+ "consrved hypothetical protein",
+ "converved hypothetical protein",
+ "cytokine",
+ "drosophila",
+ "duplicated hypothetical protein",
+ "gamma",
+ "HLA",
+ "homeodomain protein",
+ "homeodomain",
+ "homolog",
+ "hyopthetical protein",
+ "hypotethical",
+ "hypotheical protein",
+ "hypothertical protein",
+ "hypothetcical protein",
+ "hypothetical protein",
+ "hypothetical conserved protein",
+ "hypothetical exported protein",
+ "hypothetical novel protein",
+ "hypothetical orf",
+ "hypothetical phage protein",
+ "hypothetical prophage protein",
+ "hypothetical protein - phage associated",
+ "hypothetical protein (fragment)",
+ "hypothetical protein (multi-domain)",
+ "hypothetical protein (phage associated)",
+ "hypothetical protein fragment ",
+ "hypothetical protein fragment 1",
+ "hypothetical protein predicted by genemark",
+ "hypothetical protein predicted by glimmer",
+ "hypothetical protein predicted by glimmer/critica",
+ "hypothetical protein-putative conserved hypothetical protein",
+ "hypothetical protein, conserved",
+ "hypothetical protein, phage associated",
+ "hypothetical protein, truncated",
+ "hypothetical protein.",
+ "hypothetical protein",
+ "hypothetical proteins",
+ "hypothetical protien",
+ "hypothetical transmembrane protein",
+ "hypothetical",
+ "hypothetoical protein",
+ "hypothteical protein",
+ "identified by sequence similarity; putative; ORF located\nusing Blastx/FrameD",
+ "identified by sequence similarity; putative; ORF located\nusing Blastx/Glimmer/Genemark",
+ "ion channel",
+ "membrane protein, putative",
+ "mouse",
+ "narrowly conserved hypothetical protein ",
+ "novel protein",
+ "orf, conserved hypothetical protein",
+ "orf, hypothetical protein",
+ "orf, hypothetical, fragment",
+ "orf, hypothetical",
+ "orf, partial conserved hypothetical protein",
+ "orf; hypothetical protein",
+ "orf; unknown function",
+ "orf",
+ "partial cds, hypothetical",
+ "partial",
+ "partially conserved hypothetical protein",
+ "phage hypothetical protein",
+ "phage-related conserved hypothetical protein",
+ "phage-related protein",
+ "plasma",
+ "possible hypothetical protein",
+ "precursor",
+ "predicted coding region",
+ "predicted protein (pseudogene)",
+ "predicted protein family",
+ "predicted protein",
+ "product uncharacterised protein family",
+ "protein family",
+ "protein of unknown function",
+ "pseudogene",
+ "putative conserved protein",
+ "putative exported protein",
+ "putative hypothetical protein",
+ "putative membrane protein",
+ "putative orf; unknown function",
+ "putative phage protein",
+ "putative protein",
+ "putative",
+ "putative",
+ "rearranged",
+ "repeats containing protein",
+ "reserved",
+ "ribosomal protein",
+ "similar to",
+ "small hypothetical protein",
+ "small",
+ "transmembrane protein",
+ "trna",
+ "trp repeat",
+ "trp-repeat protein",
+ "truncated conserved hypothetical protein",
+ "truncated hypothetical protein",
+ "uncharacterized conserved membrane protein",
+ "uncharacterized conserved protein",
+ "uncharacterized conserved secreted protein",
+ "uncharacterized protein conserved in archaea",
+ "uncharacterized protein conserved in bacteria",
+ "uncharacterized protein",
+ "unique hypothetical protein",
+ "unique hypothetical",
+ "unknown CDS",
+ "unknown function",
+ "unknown gene",
+ "unknown protein",
+ "unknown protein",
+ "unknown-related protein",
+ "unknown, conserved protein",
+ "unknown, hypothetical",
+ "unknown; predicted coding region",
+ "unknown",
+ "unknown",
+ "unnamed protein product",
+ "unnamed",
+ "very hypothetical protein",
+ NULL
+};
+
+static Boolean NameInList (CharPtr name, CharPtr PNTR list, size_t numelements)
+
+{
+ Int2 L, R, mid;
+
+ if (StringHasNoText (name) || list == NULL || numelements < 1) return FALSE;
+
+ L = 0;
+ R = numelements - 1; /* -1 because now NULL terminated */
+
+ while (L < R) {
+ mid = (L + R) / 2;
+ if (StringICmp (list [mid], name) < 0) {
+ L = mid + 1;
+ } else {
+ R = mid;
+ }
+ }
+
+ if (StringICmp (list [R], name) == 0) return TRUE;
+
+ return FALSE;
+}
+
NLM_EXTERN void ValidateSeqFeat (GatherContextPtr gcp)
{
Int2 type, i, j;
@@ -17403,6 +18221,7 @@ NLM_EXTERN void ValidateSeqFeat (GatherContextPtr gcp)
Boolean isgap;
Boolean badseq;
Boolean is_seqloc_bond;
+ SeqBondPtr sbp;
SeqFeatXrefPtr xref, matchxref;
SeqFeatPtr matchsfp, origsfp;
Boolean hasxref;
@@ -17420,6 +18239,7 @@ NLM_EXTERN void ValidateSeqFeat (GatherContextPtr gcp)
Boolean farFetchProd;
Boolean skip;
Boolean is_nc = FALSE;
+ Boolean no_nonconsensus_except = TRUE;
vsp = (ValidStructPtr) (gcp->userdata);
@@ -17458,6 +18278,16 @@ NLM_EXTERN void ValidateSeqFeat (GatherContextPtr gcp)
partials[0] = SeqLocPartialCheckEx (sfp->product, farFetchProd);
partials[1] = SeqLocPartialCheck (sfp->location);
+ if (sfp->excpt) {
+ if (StringISearch (sfp->except_text, "nonconsensus splice site") != NULL) {
+ no_nonconsensus_except = FALSE;
+ }
+ }
+
+ if (sfp->idx.subtype == FEATDEF_intron && no_nonconsensus_except) {
+ ValidateIntronEndsAtSpliceSiteOrGap (vsp, sfp->location);
+ }
+
if ((partials[0] != SLP_COMPLETE) || (partials[1] != SLP_COMPLETE) || (sfp->partial)) { /* partialness */
/* a feature on a partial sequence should be partial -- if often isn't */
if ((!sfp->partial) && (partials[1] != SLP_COMPLETE) && (sfp->location->choice == SEQLOC_WHOLE)) {
@@ -17588,13 +18418,17 @@ NLM_EXTERN void ValidateSeqFeat (GatherContextPtr gcp)
} else if (sfp->data.choice == SEQFEAT_CDREGION && sfp->excpt &&
StringStr (sfp->except_text, "rearrangement required for product") != NULL) {
} else if (sfp->data.choice == SEQFEAT_CDREGION && j == 0) {
- ValidErr (vsp, SEV_WARNING, ERR_SEQ_FEAT_PartialProblem,
- "%s: %s", parterr[i], "5' partial is not at start AND"
- " is not at consensus splice site");
+ if (no_nonconsensus_except) {
+ ValidErr (vsp, SEV_WARNING, ERR_SEQ_FEAT_PartialProblem,
+ "%s: %s", parterr[i], "5' partial is not at start AND"
+ " is not at consensus splice site");
+ }
} else if (sfp->data.choice == SEQFEAT_CDREGION && j == 1) {
- ValidErr (vsp, SEV_WARNING, ERR_SEQ_FEAT_PartialProblem,
- "%s: %s", parterr[i], "3' partial is not at stop AND"
- " is not at consensus splice site");
+ if (no_nonconsensus_except) {
+ ValidErr (vsp, SEV_WARNING, ERR_SEQ_FEAT_PartialProblem,
+ "%s: %s", parterr[i], "3' partial is not at stop AND"
+ " is not at consensus splice site");
+ }
} else {
ValidErr (vsp, SEV_WARNING, ERR_SEQ_FEAT_PartialProblem,
"%s: %s", parterr[i], parterrs[j]);
@@ -17700,6 +18534,21 @@ NLM_EXTERN void ValidateSeqFeat (GatherContextPtr gcp)
}
}
}
+ if (grp->syn != NULL && vsp->is_refseq_in_sep) {
+ for (vnp = grp->syn; vnp != NULL; vnp = vnp->next) {
+ str = (CharPtr) vnp->data.ptrvalue;
+ if (StringHasNoText (str)) continue;
+ if (NameInList (str, badGeneSyn, sizeof (badGeneSyn) / sizeof (badGeneSyn [0]))) {
+ ValidErr (vsp, SEV_WARNING, ERR_SEQ_FEAT_UndesiredGeneSynonym, "Uninformative gene synonym '%s", str);
+ }
+ if (StringDoesHaveText (grp->locus) && StringCmp (grp->locus, str) == 0) {
+ ValidErr (vsp, SEV_WARNING, ERR_SEQ_FEAT_UndesiredGeneSynonym, "gene synonym has same value as gene locus");
+ }
+ }
+ }
+ if (StringDoesHaveText (grp->locus) && StringDoesHaveText (grp->desc) && StringCmp (grp->locus, grp->desc) == 0) {
+ ValidErr (vsp, SEV_WARNING, ERR_SEQ_FEAT_UndesiredGeneSynonym, "gene description has same value as gene locus");
+ }
/* - need to ignore if curated drosophila - add to vsp internal flags for efficiency?
if (StringDoesHaveText (grp->locus)) {
for (gbq = sfp->qual; gbq != NULL; gbq = gbq->next) {
@@ -17802,7 +18651,7 @@ NLM_EXTERN void ValidateSeqFeat (GatherContextPtr gcp)
}
}
if (pseudo && SeqMgrGetProtXref (sfp) != NULL) {
- if (NGorNT (vsp->sep, sfp->location, &is_nc)) {
+ if (NGorNT (vsp->sep, sfp->location, &is_nc) || IsEMBLAccn (vsp->sep, sfp->location)) {
sev = SEV_WARNING;
} else {
sev = SEV_ERROR;
@@ -17992,7 +18841,7 @@ NLM_EXTERN void ValidateSeqFeat (GatherContextPtr gcp)
if (ECnumberWasDeleted (str)) {
ValidErr (vsp, SEV_WARNING, ERR_SEQ_FEAT_BadEcNumberValue, "EC_number %s was deleted", str);
} else if (ECnumberWasReplaced (str)) {
- ValidErr (vsp, SEV_WARNING, ERR_SEQ_FEAT_BadEcNumberValue, "EC_number %s was replaced", str);
+ ValidErr (vsp, SEV_WARNING, ERR_SEQ_FEAT_BadEcNumberValue, "EC_number %s was transferred and is no longer valid", str);
} else {
ValidErr (vsp, SEV_WARNING, ERR_SEQ_FEAT_BadEcNumberValue, "%s is not a legal value for qualifier EC_number", str);
}
@@ -18002,6 +18851,15 @@ NLM_EXTERN void ValidateSeqFeat (GatherContextPtr gcp)
}
}
}
+ if (prp->name != NULL && vsp->is_refseq_in_sep) {
+ for (vnp = prp->name; vnp != NULL; vnp = vnp->next) {
+ str = (CharPtr) vnp->data.ptrvalue;
+ if (StringHasNoText (str)) continue;
+ if (NameInList (str, badProtName, sizeof (badProtName) / sizeof (badProtName [0]))) {
+ ValidErr (vsp, SEV_WARNING, ERR_SEQ_FEAT_UndesiredProteinName, "Uninformative protein name '%s'", str);
+ }
+ }
+ }
break;
case 5: /* RNA-ref */
rrp = (RnaRefPtr) (sfp->data.value.ptrvalue);
@@ -18101,6 +18959,17 @@ NLM_EXTERN void ValidateSeqFeat (GatherContextPtr gcp)
}
}
}
+ if (rrp->type == 255 && rrp->ext.choice == 1) {
+ str = (CharPtr) rrp->ext.value.ptrvalue;
+ if (StringICmp (str, "ncRNA") == 0) {
+ for (gbq = sfp->qual; gbq != NULL; gbq = gbq->next) {
+ if (StringICmp (gbq->qual, "ncRNA_class") != 0) continue;
+ if (StringHasNoText (gbq->val)) continue;
+ if (IsStringInNcRNAClassList (gbq->val)) continue;
+ ValidErr (vsp, SEV_WARNING, ERR_SEQ_FEAT_InvalidQualifierValue, "Illegal ncRNA_class value '%s'", gbq->val);
+ }
+ }
+ }
if (sfp->product != NULL) {
CheckRnaProductType (vsp, gcp, sfp, rrp);
}
@@ -18197,14 +19066,32 @@ NLM_EXTERN void ValidateSeqFeat (GatherContextPtr gcp)
}
}
/*
- ValidateBioSource (vsp, gcp, biop, sfp);
+ ValidateBioSource (vsp, gcp, biop, sfp, NULL);
*/
break;
default:
ValidErr (vsp, SEV_ERROR, ERR_SEQ_FEAT_InvalidType, "Invalid SeqFeat type [%d]", (int) (type));
break;
}
- if (type != SEQFEAT_BOND) {
+ if (type == SEQFEAT_HET) {
+ /* heterogen can have mix of bonds with just "a" point specified */
+ is_seqloc_bond = FALSE;
+ slp = SeqLocFindNext (sfp->location, NULL);
+ while (slp != NULL) {
+ if (slp->choice == SEQLOC_BOND) {
+ sbp = (SeqBondPtr) slp->data.ptrvalue;
+ if (sbp != NULL) {
+ if (sbp->a == NULL || sbp->b != NULL) {
+ is_seqloc_bond = TRUE;
+ }
+ }
+ }
+ slp = SeqLocFindNext (sfp->location, slp);
+ }
+ if (is_seqloc_bond) {
+ ValidErr (vsp, SEV_WARNING, ERR_SEQ_FEAT_ImproperBondLocation, "Bond location should only be on bond features");
+ }
+ } else if (type != SEQFEAT_BOND) {
is_seqloc_bond = FALSE;
slp = SeqLocFindNext (sfp->location, NULL);
while (slp != NULL) {
@@ -19882,7 +20769,8 @@ static void SpliceCheckEx (ValidStructPtr vsp, SeqFeatPtr sfp, Boolean checkAll)
residue2 = SeqPortGetResidue (spp);
*/
if (residue1 == '-' && residue2 == '-') {
- /* ignore gap */
+ /* ignore gap, and suppress UnnecessaryException message */
+ has_errors = TRUE;
} else if (IS_residue (residue1) && IS_residue (residue2)) {
if (residue1 != 'G' || residue2 != 'T') { /* not T */
if (residue1 == 'G' && residue2 == 'C') { /* GC minor splice site */
@@ -19947,7 +20835,8 @@ static void SpliceCheckEx (ValidStructPtr vsp, SeqFeatPtr sfp, Boolean checkAll)
residue2 = SeqPortGetResidue (spp);
*/
if (residue1 == '-' && residue2 == '-') {
- /* ignore gap */
+ /* ignore gap, and suppress UnnecessaryException message */
+ has_errors = TRUE;
} else if (IS_residue (residue1) && IS_residue (residue2)) {
if (residue1 != 'A' || residue2 != 'G') {
if (gpsOrRefSeq) {
diff --git a/api/valid.h b/api/valid.h
index e56c7cfe..ae0c486a 100644
--- a/api/valid.h
+++ b/api/valid.h
@@ -29,7 +29,7 @@
*
* Version Creation Date: 1/1/94
*
-* $Revision: 6.36 $
+* $Revision: 6.39 $
*
* File Description: Sequence editing utilities
*
@@ -178,13 +178,13 @@ NLM_EXTERN CharPtr GetValidErrorName (int errcode, int subcode);
NLM_EXTERN CharPtr GetValidExplanation (int errcode, int subcode);
NLM_EXTERN CharPtr PNTR GetValidCountryList (void);
+NLM_EXTERN Boolean CountryIsValid (CharPtr name, BoolPtr old_countryP);
NLM_EXTERN Boolean LookForECnumberPattern (CharPtr str);
NLM_EXTERN Boolean IsCountryInLatLonList (CharPtr country);
NLM_EXTERN Boolean TestLatLonForCountry (CharPtr country, FloatHi lat, FloatHi lon);
NLM_EXTERN CharPtr GuessCountryForLatLon (FloatHi lat, FloatHi lon);
-
-NLM_EXTERN Boolean ParseLatLon (CharPtr lat_lon, FloatHi PNTR latP, FloatHi PNTR lonP);
+NLM_EXTERN Boolean StringContainsBodyOfWater (CharPtr str);
/* EC_number finite state machine persists to avoid expensive reload, should free on program exit */
NLM_EXTERN void ECNumberFSAFreeAll (void);
diff --git a/api/valid.msg b/api/valid.msg
index ea171b43..c17a4f2b 100644
--- a/api/valid.msg
+++ b/api/valid.msg
@@ -404,6 +404,14 @@ The lat_lon coordinate does not map to the indicated country.
$^ LatLonState, 49
The lat_lon coordinate does not map to the indicated state or province.
+$^ BadSpecificHost, 50
+A BioSource descriptor or feature has a specific host value that may
+require a taxonomy consult.
+
+$^ RefGeneTrackingIllegalStatus, 51
+The RefGeneTracking user object has an illegal Status value.
+
+
$$ GENERIC, 3
$^ NonAsciiAsn, 1
@@ -490,7 +498,7 @@ Bioseq packaged in the set, perhaps within a nuc-prot set. RefSeq records may
however be referenced remotely.
$^ InconsistentMolInfoBiomols, 12
-Mol-info.biomol is inconsistent within a segset or parts set.
+Mol-info.biomol is inconsistent within a segset, parts set, or pop/phy/mut/eco set.
$^ ArchaicFeatureLocation, 13
A feature location should refer to the accession or gi number, not a local or general ID.
@@ -1080,6 +1088,18 @@ and wobble expansion of the anticodon sequence.
$^ BadAnticodonStrand, 147
The tRNA feature location and anticodon location are not on the same strand.
+$^ UndesiredGeneSynonym, 148
+The gene synonym is uninformative.
+
+$^ UndesiredProteinName, 149
+The protein name is uninformative.
+
+$^ FeatureBeginsOrEndsInGap, 150
+The feature starts or stops within a sequence gap.
+
+$^ GeneOntologyTermMissingGOID, 151
+A Gene Ontology (GO) term is missing the GO Identifier.
+
$$ SEQ_ALIGN, 6
$^ SeqIdProblem, 1
diff --git a/api/validerr.h b/api/validerr.h
index 482a04ed..7478931d 100644
--- a/api/validerr.h
+++ b/api/validerr.h
@@ -114,6 +114,8 @@
#define ERR_SEQ_DESCR_LatLonValue 2,47
#define ERR_SEQ_DESCR_LatLonCountry 2,48
#define ERR_SEQ_DESCR_LatLonState 2,49
+#define ERR_SEQ_DESCR_BadSpecificHost 2,50
+#define ERR_SEQ_DESCR_RefGeneTrackingIllegalStatus 2,51
#define ERR_GENERIC 3,0
#define ERR_GENERIC_NonAsciiAsn 3,1
#define ERR_GENERIC_Spell 3,2
@@ -292,6 +294,10 @@
#define ERR_SEQ_FEAT_BadAnticodonAA 5,145
#define ERR_SEQ_FEAT_BadAnticodonCodon 5,146
#define ERR_SEQ_FEAT_BadAnticodonStrand 5,147
+#define ERR_SEQ_FEAT_UndesiredGeneSynonym 5,148
+#define ERR_SEQ_FEAT_UndesiredProteinName 5,149
+#define ERR_SEQ_FEAT_FeatureBeginsOrEndsInGap 5,150
+#define ERR_SEQ_FEAT_GeneOntologyTermMissingGOID 5,151
#define ERR_SEQ_ALIGN 6,0
#define ERR_SEQ_ALIGN_SeqIdProblem 6,1
#define ERR_SEQ_ALIGN_StrandRev 6,2
diff --git a/asn/all.bat b/asn/all.bat
index d3aab846..f196a4c0 100644
--- a/asn/all.bat
+++ b/asn/all.bat
@@ -5,6 +5,6 @@ copy head.all+general.asn+biblio.asn+medline.asn+pubmed.asn+medlars.asn 1.tmp
copy 1.tmp+pub.asn+seqloc.asn+seq.asn+seqset.asn+seqcode.asn+seqblock.asn 2.tmp
copy 2.tmp+seqfeat.asn+seqalign.asn+seqres.asn+submit.asn+..\biostruc\cn3d\cn3d.asn 3.tmp
copy 3.tmp+proj.asn+access.asn+featdef.asn+ncbimime.asn+objprt.asn 4.tmp
-copy 4.tmp+gbseq.asn+insdseq.asn+tinyseq.asn asn.all
+copy 4.tmp+gbseq.asn+insdseq.asn+tinyseq.asn+seqtable.asn+..\sequin\macro.asn asn.all
del 1.tmp 2.tmp 3.tmp 4.tmp
diff --git a/asn/all.mac b/asn/all.mac
index 3aaf3592..3627508c 100644
--- a/asn/all.mac
+++ b/asn/all.mac
@@ -1,4 +1,4 @@
#
-mpwsh 'Directory "::asn:"; Delete -i asn.all; Catenate head.all general.asn biblio.asn medline.asn pubmed.asn medlars.asn pub.asn seqloc.asn seq.asn seqset.asn seqcode.asn seqblock.asn seqfeat.asn seqalign.asn seqres.asn submit.asn ::biostruc:cn3d:cn3d.asn proj.asn access.asn featdef.asn ncbimime.asn objprt.asn > asn.all; Exit {Status}'
+mpwsh 'Directory "::asn:"; Delete -i asn.all; Catenate head.all general.asn biblio.asn medline.asn pubmed.asn medlars.asn pub.asn seqloc.asn seq.asn seqset.asn seqcode.asn seqblock.asn seqfeat.asn seqtable.asn seqalign.asn seqres.asn submit.asn ::biostruc:cn3d:cn3d.asn proj.asn access.asn featdef.asn ncbimime.asn objprt.asn ::sequin:macro.asn > asn.all; Exit {Status}'
echo "all.mac: Done."
diff --git a/asn/all.unx b/asn/all.unx
index 673c9963..aaf3e2e5 100755
--- a/asn/all.unx
+++ b/asn/all.unx
@@ -3,9 +3,9 @@
rm -f asn.all
FILES="\
head.all general.asn biblio.asn medline.asn pubmed.asn medlars.asn pub.asn \
-seqloc.asn seq.asn seqset.asn seqcode.asn seqblock.asn \
-seqfeat.asn seqalign.asn seqres.asn submit.asn ../biostruc/cn3d/cn3d.asn \
+seqloc.asn seq.asn seqset.asn seqcode.asn seqblock.asn seqfeat.asn \
+seqtable.asn seqalign.asn seqres.asn submit.asn ../biostruc/cn3d/cn3d.asn \
proj.asn access.asn featdef.asn ncbimime.asn objprt.asn gbseq.asn insdseq.asn \
-tinyseq.asn scoremat.asn "
+tinyseq.asn scoremat.asn ../sequin/macro.asn "
cat $FILES > asn.all
exit $?
diff --git a/asn/asn.all b/asn/asn.all
index ffea182e..7286a595 100644
--- a/asn/asn.all
+++ b/asn/asn.all
@@ -740,7 +740,7 @@ Seq-loc-equiv ::= SET OF Seq-loc -- for a set of equivalent locations
END
---$Revision: 6.16 $
+--$Revision: 6.19 $
--**********************************************************************
--
-- NCBI Sequence elements
@@ -769,7 +769,8 @@ IMPORTS Date, Int-fuzz, Dbtag, Object-id, User-object FROM NCBI-General
EMBL-block FROM EMBL-General
SP-block FROM SP-General
PRF-block FROM PRF-General
- PDB-block FROM PDB-General;
+ PDB-block FROM PDB-General
+ Seq-table FROM NCBI-SeqTable;
--*** Sequence ********************************
--*
@@ -844,6 +845,8 @@ MolInfo ::= SEQUENCE {
cRNA (11) , -- viral RNA genome copy intermediate
snoRNA (12) , -- small nucleolar RNA
transcribed-RNA (13) , -- transcribed RNA other than existing classes
+ ncRNA (14) ,
+ tmRNA (15) ,
other (255) } DEFAULT unknown ,
tech INTEGER {
unknown (0) ,
@@ -869,6 +872,7 @@ MolInfo ::= SEQUENCE {
wgs (20) , -- whole genome shotgun sequencing
barcode (21) , -- barcode of life project
composite-wgs-htgs (22) , -- composite of WGS and HTGS
+ tsa (23) , -- transcriptome shotgun assembly
other (255) } -- use Source.techexp
DEFAULT unknown ,
techexp VisibleString OPTIONAL , -- explanation if tech not enough
@@ -887,7 +891,8 @@ MolInfo ::= SEQUENCE {
no-ends (5) , -- missing both ends
has-left (6) , -- 5' or NH3 end present
has-right (7) , -- 3' or COOH end present
- other (255) } DEFAULT unknown }
+ other (255) } DEFAULT unknown ,
+ gbmoltype VisibleString OPTIONAL } -- identifies particular ncRNA
GIBB-mol ::= ENUMERATED { -- type of molecule represented
@@ -981,12 +986,12 @@ Pubdesc ::= SEQUENCE { -- how sequence presented in pub
seq-raw StringStore OPTIONAL , -- original sequence from paper
align-group INTEGER OPTIONAL , -- this seq aligned with others in paper
comment VisibleString OPTIONAL, -- any comment on this pub in context
- reftype INTEGER { -- type of reference in a GenBank record
- seq (0) , -- refers to sequence
- sites (1) , -- refers to unspecified features
- feats (2) , -- refers to specified features
- no-target (3) } -- nothing specified (EMBL)
- DEFAULT seq }
+ reftype INTEGER { -- type of reference in a GenBank record
+ seq (0) , -- refers to sequence
+ sites (1) , -- refers to unspecified features
+ feats (2) , -- refers to specified features
+ no-target (3) } -- nothing specified (EMBL)
+ DEFAULT seq }
Heterogen ::= VisibleString -- cofactor, prosthetic group, inhibitor, etc
@@ -1175,8 +1180,9 @@ Seq-annot ::= SEQUENCE {
ftable SET OF Seq-feat ,
align SET OF Seq-align ,
graph SET OF Seq-graph ,
- ids SET OF Seq-id , -- used for communication between tools
- locs SET OF Seq-loc } } -- used for communication between tools
+ ids SET OF Seq-id , -- used for communication between tools
+ locs SET OF Seq-loc , -- used for communication between tools
+ seq-table Seq-table } } -- features in table form
END
@@ -1537,7 +1543,7 @@ PDB-replace ::= SEQUENCE {
END
---$Revision: 6.18 $
+--$Revision: 6.19 $
--**********************************************************************
--
-- NCBI Sequence Feature elements
@@ -1983,7 +1989,8 @@ BioSource ::= SEQUENCE {
proplastid (18) ,
endogenous-virus (19) ,
hydrogenosome (20) ,
- chromosome (21)
+ chromosome (21) ,
+ chromatophore (22)
} DEFAULT unknown ,
origin INTEGER {
unknown (0) ,
@@ -2159,6 +2166,232 @@ Tx-evidence ::= SEQUENCE {
END
+--$Revision: 1.5 $
+-- ----------------------------------------------------------------------------
+--
+-- PUBLIC DOMAIN NOTICE
+-- National Center for Biotechnology Information
+--
+-- This software/database is a "United States Government Work" under the terms
+-- of the United States Copyright Act. It was written as part of the author's
+-- official duties as a United States Government employee and thus cannot be
+-- copyrighted. This software/database is freely available to the public for
+-- use. The National Library of Medicine and the U.S. Government have not
+-- placed any restriction on its use or reproduction.
+--
+-- Although all reasonable efforts have been taken to ensure the accuracy and
+-- reliability of the software and data, the NLM and the U.S. Government do not
+-- and cannot warrant the performance or results that may be obtained by using
+-- this software or data. The NLM and the U.S. Government disclaim all
+-- warranties, express or implied, including warranties of performance,
+-- merchantability or fitness for any particular purpose.
+--
+-- Please cite the authors in any work or product based on this material.
+--
+-- ----------------------------------------------------------------------------
+--
+-- Authors: Mike DiCuccio, Eugene Vasilchenko
+--
+-- ASN.1 interface to table readers
+--
+-- ----------------------------------------------------------------------------
+
+NCBI-SeqTable DEFINITIONS ::=
+
+BEGIN
+
+EXPORTS
+ SeqTable-column-info, SeqTable-column, Seq-table;
+
+IMPORTS
+ Seq-id, Seq-loc, Seq-interval FROM NCBI-Seqloc;
+
+
+SeqTable-column-info ::= SEQUENCE {
+ -- user friendly column name, can be skipped
+ title VisibleString OPTIONAL,
+
+ -- identification of the column data in the objects described by the table
+ field-id INTEGER { -- known column data types
+ -- position types
+ location (0), -- location as Seq-loc
+ location-id (1), -- location Seq-id
+ location-gi (2), -- gi
+ location-from (3), -- interval from
+ location-to (4), -- interval to
+ location-strand (5), -- location strand
+ location-fuzz-from-lim (6),
+ location-fuzz-to-lim (7),
+
+ product (10), -- product as Seq-loc
+ product-id (11), -- product Seq-id
+ product-gi (12), -- product gi
+ product-from (13), -- product interval from
+ product-to (14), -- product interval to
+ product-strand (15), -- product strand
+ product-fuzz-from-lim (16),
+ product-fuzz-to-lim (17),
+
+ -- main feature fields
+ id-local (20), -- id.local.id
+ xref-id-local (21), -- xref.id.local.id
+ partial (22),
+ comment (23),
+ title (24),
+ ext (25), -- field-name must be "E.xxx", see below
+ qual (26), -- field-name must be "Q.xxx", see below
+ dbxref (27), -- field-name must be "D.xxx", see below
+
+ -- various data fields
+ data-imp-key (30),
+ data-region (31),
+ data-cdregion-frame (32),
+
+ -- extra fields, see also special values for str below
+ ext-type (40),
+ qual-qual (41),
+ qual-val (42),
+ dbxref-db (43),
+ dbxref-tag (44)
+ } OPTIONAL,
+
+ -- any column can be identified by ASN.1 text locator string
+ -- with omitted object type.
+ -- examples:
+ -- "data.gene.locus" for Seq-feat.data.gene.locus
+ -- "data.imp.key" for Seq-feat.data.imp.key
+ -- "qual.qual"
+ -- - Seq-feat.qual is SEQUENCE so several columns are allowed
+ -- see also "Q.xxx" special value for shorter qual representation
+ -- "ext.type.str"
+ -- "ext.data.label.str"
+ -- "ext.data.data.int"
+ -- see also "E.xxx" special value for shorter ext representation
+ -- special values start with capital letter:
+ -- "E.xxx" - ext.data.label.str = xxx, ext.data.data = data
+ -- - Seq-feat.ext.data is SEQUENCE so several columns are allowed
+ -- "Q.xxx" - qual.qual = xxx, qual.val = data
+ -- - Seq-feat.qual is SEQUENCE so several columns are allowed
+ -- "D.xxx" - dbxref.id = xxx, dbxref.tag = data
+ -- - Seq-feat.dbxref is SET so several columns are allowed
+ field-name VisibleString OPTIONAL
+}
+
+
+CommonString-table ::= SEQUENCE {
+ -- set of possible values
+ strings SEQUENCE OF VisibleString,
+
+ -- indexes of values
+ indexes SEQUENCE OF INTEGER
+}
+
+
+CommonBytes-table ::= SEQUENCE {
+ -- set of possible values
+ bytes SEQUENCE OF OCTET STRING,
+
+ -- indexes of values
+ indexes SEQUENCE OF INTEGER
+}
+
+
+SeqTable-multi-data ::= CHOICE {
+ -- a set of integers, one per row
+ int SEQUENCE OF INTEGER,
+
+ -- a set of reals, one per row
+ real SEQUENCE OF REAL,
+
+ -- a set of strings, one per row
+ string SEQUENCE OF VisibleString,
+
+ -- a set of byte arrays, one per row
+ bytes SEQUENCE OF OCTET STRING,
+
+ -- a set of string with small set of possible values
+ common-string CommonString-table,
+
+ -- a set of byte arrays with small set of possible values
+ common-bytes CommonBytes-table,
+
+ -- a set of bits, one per row
+ -- this uses bm::bvector<> as its storage mechanism
+ bit OCTET STRING,
+
+ -- a set of locations, one per row
+ loc SEQUENCE OF Seq-loc,
+ id SEQUENCE OF Seq-id,
+ interval SEQUENCE OF Seq-interval
+}
+
+
+SeqTable-single-data ::= CHOICE {
+ -- integer
+ int INTEGER,
+
+ -- real
+ real REAL,
+
+ -- string
+ string VisibleString,
+
+ -- byte array
+ bytes OCTET STRING,
+
+ -- bit
+ bit BOOLEAN,
+
+ -- location
+ loc Seq-loc,
+ id Seq-id,
+ interval Seq-interval
+}
+
+
+SeqTable-sparse-index ::= CHOICE {
+ -- indexed of rows with values
+ indexes SEQUENCE OF INTEGER,
+
+ -- bitset of rows with values
+ bit-set OCTET STRING
+}
+
+
+SeqTable-column ::= SEQUENCE {
+ -- column description or reference to previously defined info
+ header SeqTable-column-info, -- information about data
+
+ -- row data
+ data SeqTable-multi-data OPTIONAL,
+
+ -- in case not all rows contain data this field will contain sparse info
+ sparse SeqTable-sparse-index OPTIONAL,
+
+ -- default value for sparse table, or if row data is too short
+ default SeqTable-single-data OPTIONAL,
+
+ -- single value for indexes not listed in sparse table
+ sparse-other SeqTable-single-data OPTIONAL
+}
+
+
+Seq-table ::= SEQUENCE {
+ -- type of features in this table, equal to Seq-feat.data variant index
+ feat-type INTEGER,
+
+ -- subtype of features in this table, defined in header SeqFeatData.hpp
+ feat-subtype INTEGER OPTIONAL,
+
+ -- number of rows
+ num-rows INTEGER,
+
+ -- data in columns
+ columns SEQUENCE OF SeqTable-column
+}
+
+
+END
--$Revision: 6.3 $
--**********************************************************************
--
@@ -3854,3 +4087,817 @@ PssmWithParameters ::= SEQUENCE {
}
END
+--$Revision: 1.13 $
+--**********************************************************************
+--
+-- NCBI ASN.1 macro editing language specifications
+--
+-- by Colleen Bollin, 2007
+--
+--**********************************************************************
+
+NCBI-Macro DEFINITIONS ::=
+BEGIN
+
+EXPORTS AECR-action, Parse-action, Macro-action-list;
+
+-- simple constraints --
+
+String-location ::= ENUMERATED {
+ contains (1) ,
+ equals (2) ,
+ starts (3) ,
+ ends (4) ,
+ inlist (5) }
+
+String-constraint ::= SEQUENCE {
+ match-text VisibleString ,
+ match-location String-location DEFAULT contains ,
+ case-sensitive BOOLEAN DEFAULT FALSE ,
+ whole-word BOOLEAN DEFAULT FALSE ,
+ not-present BOOLEAN DEFAULT FALSE }
+
+Strand-constraint ::= ENUMERATED {
+ any (0) ,
+ plus (1) ,
+ minus (2) }
+
+Seqtype-constraint ::= ENUMERATED {
+ any (0) ,
+ nuc (1) ,
+ prot (2) }
+
+Location-constraint ::= SEQUENCE {
+ strand Strand-constraint DEFAULT any ,
+ seq-type Seqtype-constraint DEFAULT any }
+
+Object-type-constraint ::= ENUMERATED {
+ any (0) ,
+ feature (1) ,
+ descriptor (2) }
+
+
+-- feature values --
+
+Feature-type ::= ENUMERATED {
+ any (0) ,
+ gene (1) ,
+ org (2) ,
+ cds (3) ,
+ prot (4) ,
+ preRNA (5) ,
+ mRNA (6) ,
+ tRNA (7) ,
+ rRNA (8) ,
+ snRNA (9) ,
+ scRNA (10) ,
+ otherRNA (11) ,
+ pub (12) ,
+ seq (13) ,
+ imp (14) ,
+ allele (15) ,
+ attenuator (16) ,
+ c-region (17) ,
+ caat-signal (18) ,
+ imp-CDS (19) ,
+ conflict (20) ,
+ d-loop (21) ,
+ d-segment (22) ,
+ enhancer (23) ,
+ exon (24) ,
+ gC-signal (25) ,
+ iDNA (26) ,
+ intron (27) ,
+ j-segment (28) ,
+ ltr (29) ,
+ mat-peptide (30) ,
+ misc-binding (31) ,
+ misc-difference (32) ,
+ misc-feature (33) ,
+ misc-recomb (34) ,
+ misc-RNA (35) ,
+ misc-signal (36) ,
+ misc-structure (37) ,
+ modified-base (38) ,
+ mutation (39) ,
+ n-region (40) ,
+ old-sequence (41) ,
+ polyA-signal (42) ,
+ polyA-site (43) ,
+ precursor-RNA (44) ,
+ prim-transcript (45) ,
+ primer-bind (46) ,
+ promoter (47) ,
+ protein-bind (48) ,
+ rbs (49) ,
+ repeat-region (50) ,
+ repeat-unit (51) ,
+ rep-origin (52) ,
+ s-region (53) ,
+ satellite (54) ,
+ sig-peptide (55) ,
+ source (56) ,
+ stem-loop (57) ,
+ sts (58) ,
+ tata-signal (59) ,
+ terminator (60) ,
+ transit-peptide (61) ,
+ unsure (62) ,
+ v-region (63) ,
+ v-segment (64) ,
+ variation (65) ,
+ virion (66) ,
+ n3clip (67) ,
+ n3UTR (68) ,
+ n5clip (69) ,
+ n5UTR (70) ,
+ n10-signal (71) ,
+ n35-signal (72) ,
+ site-ref (73) ,
+ region (74) ,
+ comment (75) ,
+ bond (76) ,
+ site (77) ,
+ rsite (78) ,
+ user (79) ,
+ txinit (80) ,
+ num (81) ,
+ psec-str (82) ,
+ non-std-residue (83) ,
+ het (84) ,
+ biosrc (85) ,
+ preprotein (86) ,
+ mat-peptide-aa (87) ,
+ sig-peptide-aa (88) ,
+ transit-peptide-aa (89) ,
+ snoRNA (90) ,
+ gap (91) ,
+ operon (92) ,
+ oriT (93) ,
+ ncRNA (94) ,
+ tmRNA (95) }
+
+Feat-qual-legal ::= ENUMERATED {
+ allele (1) ,
+ activity (2) ,
+ anticodon (3) ,
+ bound-moiety (4) ,
+ chromosome (5),
+ citation (6),
+ codon (7) ,
+ codon-start (8) ,
+ codons-recognized (9) ,
+ compare (10) ,
+ cons-splice (11) ,
+ db-xref (12) ,
+ description (13) ,
+ direction (14) ,
+ ec-number (15) ,
+ environmental-sample (16) ,
+ evidence (17) ,
+ exception (18) ,
+ experiment (19) ,
+ focus (20) ,
+ frequency (21) ,
+ function (22) ,
+ gene (23) ,
+ gene-description (24) ,
+ inference (25) ,
+ label (26) ,
+ locus-tag (27) ,
+ map (28) ,
+ mobile-element (29) ,
+ mod-base (30) ,
+ mol-type (31) ,
+ ncRNA-class (32) ,
+ note (33) ,
+ number (34) ,
+ old-locus-tag (35) ,
+ operon (36) ,
+ organism (37) ,
+ organelle (38) ,
+ partial (39) ,
+ phenotype (40) ,
+ plasmid (41) ,
+ product (42) ,
+ protein-id (43) ,
+ pseudo (44) ,
+ rearranged (45) ,
+ replace (46) ,
+ rpt-family (47) ,
+ rpt-type (48) ,
+ rpt-unit (49) ,
+ rpt-unit-seq (50) ,
+ rpt-unit-range (51) ,
+ segment (52) ,
+ sequenced-mol (53) ,
+ standard-name (54) ,
+ synonym (55) ,
+ transcript-id (56) ,
+ transgenic (57) ,
+ translation (58) ,
+ transl-except (59) ,
+ transl-table (60) ,
+ usedin (61) }
+
+Feat-qual-legal-val ::= SEQUENCE {
+ qual Feat-qual-legal ,
+ val VisibleString }
+
+Feat-qual-legal-val-choice ::= CHOICE {
+ qual Feat-qual-legal-val }
+
+Feat-qual-legal-set ::= SET OF Feat-qual-legal-val-choice
+
+Feat-qual-choice ::= CHOICE {
+ legal-qual Feat-qual-legal ,
+ illegal-qual String-constraint }
+
+Feature-field ::= SEQUENCE {
+ type Feature-type ,
+ field Feat-qual-choice }
+
+Feature-field-legal ::= SEQUENCE {
+ type Feature-type ,
+ field Feat-qual-legal }
+
+Feature-field-pair ::= SEQUENCE {
+ type Feature-type ,
+ field-from Feat-qual-choice ,
+ field-to Feat-qual-choice }
+
+Source-qual ::= ENUMERATED {
+ acronym (1) ,
+ anamorph (2) ,
+ authority (3) ,
+ bio-material (4) ,
+ biotype (5) ,
+ biovar (6) ,
+ breed (7) ,
+ cell-line (8) ,
+ cell-type (9) ,
+ chemovar (10) ,
+ chromosome (11) ,
+ clone (12) ,
+ clone-lib (13) ,
+ collected-by (14) ,
+ collection-date (15) ,
+ common (16) ,
+ common-name (17) ,
+ country (18) ,
+ cultivar (19) ,
+ culture-collection (20) ,
+ dev-stage (21) ,
+ division (22) ,
+ dosage (23) ,
+ ecotype (24) ,
+ endogenous-virus-name (25) ,
+ environmental-sample (26) ,
+ forma (27) ,
+ forma-specialis (28) ,
+ frequency (29) ,
+ fwd-primer-name (30) ,
+ fwd-primer-seq (31) ,
+ gb-acronym (32) ,
+ gb-anamorph (33) ,
+ gb-synonym (34) ,
+ genotype (35) ,
+ germline (36) ,
+ group (37) ,
+ haplotype (38) ,
+ identified-by (39) ,
+ insertion-seq-name (40) ,
+ isolate (41) ,
+ isolation-source (42) ,
+ lab-host (43) ,
+ lat-lon (44) ,
+ lineage (45) ,
+ map (46) ,
+ metagenome-source (47) ,
+ metagenomic (48) ,
+ old-lineage (49) ,
+ old-name (50) ,
+ orgmod-note (51) ,
+ nat-host (52) ,
+ pathovar (53) ,
+ plasmid-name (54) ,
+ plastid-name (55) ,
+ pop-variant (56) ,
+ rearranged (57) ,
+ rev-primer-name (58) ,
+ rev-primer-seq (59) ,
+ segment (60) ,
+ serogroup (61) ,
+ serotype (62) ,
+ serovar (63) ,
+ sex (64) ,
+ specimen-voucher (65) ,
+ strain (66) ,
+ subclone (67) ,
+ subgroup (68) ,
+ subsource-note (69),
+ sub-species (70) ,
+ substrain (71) ,
+ subtype (72) ,
+ synonym (73) ,
+ taxname (74) ,
+ teleomorph (75) ,
+ tissue-lib (76) ,
+ tissue-type (77) ,
+ transgenic (78) ,
+ transposon-name (79) ,
+ type (80) ,
+ variety (81) }
+
+Source-qual-pair ::= SEQUENCE {
+ field-from Source-qual ,
+ field-to Source-qual }
+
+Source-location ::= ENUMERATED {
+ unknown (0) ,
+ genomic (1) ,
+ chloroplast (2) ,
+ chromoplast (3) ,
+ kinetoplast (4) ,
+ mitochondrion (5) ,
+ plastid (6) ,
+ macronuclear (7) ,
+ extrachrom (8) ,
+ plasmid (9) ,
+ transposon (10) ,
+ insertion-seq (11) ,
+ cyanelle (12) ,
+ proviral (13) ,
+ virion (14) ,
+ nucleomorph (15) ,
+ apicoplast (16) ,
+ leucoplast (17) ,
+ proplastid (18) ,
+ endogenous-virus (19) ,
+ hydrogenosome (20) ,
+ chromosome (21) ,
+ chromatophore (22) }
+
+Source-origin ::= ENUMERATED {
+ unknown (0) ,
+ natural (1) ,
+ natmut (2) ,
+ mut (3) ,
+ artificial (4) ,
+ synthetic (5) ,
+ other (255) }
+
+Source-qual-choice ::= CHOICE {
+ textqual Source-qual ,
+ location Source-location,
+ origin Source-origin }
+
+
+CDSGeneProt-field ::= ENUMERATED {
+ cds-comment (1) ,
+ gene-locus (2) ,
+ gene-description (3) ,
+ gene-comment (4) ,
+ gene-allele (5) ,
+ gene-maploc (6) ,
+ gene-locus-tag (7) ,
+ gene-synonym (8) ,
+ gene-old-locus-tag (9) ,
+ mrna-product (10) ,
+ mrna-comment (11) ,
+ prot-name (12) ,
+ prot-description (13) ,
+ prot-ec-number (14) ,
+ prot-activity (15) ,
+ prot-comment (16) ,
+ mat-peptide-name (17) ,
+ mat-peptide-description (18) ,
+ mat-peptide-ec-number (19) ,
+ mat-peptide-activity (20) ,
+ mat-peptide-comment (21) }
+
+CDSGeneProt-field-pair ::= SEQUENCE {
+ field-from CDSGeneProt-field ,
+ field-to CDSGeneProt-field }
+
+Molecule-type ::= ENUMERATED {
+ unknown (0) ,
+ genomic (1) ,
+ precursor-RNA (2) ,
+ mRNA (3) ,
+ rRNA (4) ,
+ tRNA (5) ,
+ snRNA (6) ,
+ scRNA (7) ,
+ genomic-mRNA (8) ,
+ cRNA (9) ,
+ snoRNA (10) ,
+ transcribed-RNA (11) ,
+ ncRNA (12) ,
+ transfer-messenger-RNA (13) ,
+ other (14) }
+
+Technique-type ::= ENUMERATED {
+ unknown (0) ,
+ standard (1) ,
+ est (2) ,
+ sts (3) ,
+ survey (4) ,
+ genetic-map (5) ,
+ physical-map (6) ,
+ derived (7) ,
+ concept-trans (8) ,
+ seq-pept (9) ,
+ both (10) ,
+ seq-pept-overlap (11) ,
+ seq-pept-homol (12) ,
+ concept-trans-a (13) ,
+ htgs-1 (14) ,
+ htgs-2 (15) ,
+ htgs-3 (16) ,
+ fli-cDNA (17) ,
+ htgs-0 (18) ,
+ htc (19) ,
+ wgs (20) ,
+ barcode (21) ,
+ composite-wgs-htgs (22) ,
+ tsa (23) ,
+ other (24) }
+
+Completedness-type ::= ENUMERATED {
+ unknown (0) ,
+ complete (1) ,
+ partial (2) ,
+ no-left (3) ,
+ no-right (4) ,
+ no-ends (5) ,
+ has-left (6) ,
+ has-right (7) ,
+ other (6) }
+
+Molecule-class-type ::= ENUMERATED {
+ unknown (0) ,
+ dna (1) ,
+ rna (2) ,
+ protein (3) ,
+ nucleotide (4),
+ other (5) }
+
+Topology-type ::= ENUMERATED {
+ unknown (0) ,
+ linear (1) ,
+ circular (2) ,
+ tandem (3) ,
+ other (4) }
+
+Strand-type ::= ENUMERATED {
+ unknown (0) ,
+ single (1) ,
+ double (2) ,
+ mixed (3) ,
+ mixed-rev (4) ,
+ other (5) }
+
+Molinfo-field ::= CHOICE {
+ molecule Molecule-type ,
+ technique Technique-type ,
+ completedness Completedness-type ,
+ mol-class Molecule-class-type ,
+ topology Topology-type ,
+ strand Strand-type }
+
+Molinfo-molecule-pair ::= SEQUENCE {
+ from Molecule-type ,
+ to Molecule-type }
+
+Molinfo-technique-pair ::= SEQUENCE {
+ from Technique-type ,
+ to Technique-type }
+
+Molinfo-completedness-pair ::= SEQUENCE {
+ from Completedness-type ,
+ to Completedness-type }
+
+Molinfo-mol-class-pair ::= SEQUENCE {
+ from Molecule-class-type ,
+ to Molecule-class-type }
+
+Molinfo-topology-pair ::= SEQUENCE {
+ from Topology-type ,
+ to Topology-type }
+
+Molinfo-strand-pair ::= SEQUENCE {
+ from Strand-type ,
+ to Strand-type }
+
+Molinfo-field-pair ::= CHOICE {
+ molecule Molinfo-molecule-pair ,
+ technique Molinfo-technique-pair ,
+ completedness Molinfo-completedness-pair ,
+ mol-class Molinfo-mol-class-pair ,
+ topology Molinfo-topology-pair ,
+ strand Molinfo-strand-pair }
+
+
+-- complex constraints --
+
+Source-constraint ::= SEQUENCE {
+ field1 Source-qual-choice OPTIONAL ,
+ field2 Source-qual-choice OPTIONAL ,
+ constraint String-constraint OPTIONAL ,
+ type-constraint Object-type-constraint OPTIONAL }
+
+CDSGeneProt-feature-type-constraint ::= ENUMERATED {
+ gene (1) ,
+ mRNA (2) ,
+ cds (3) ,
+ prot (4) ,
+ exon (5) ,
+ mat-peptide (6) }
+
+CDSGeneProt-pseudo-constraint ::= SEQUENCE {
+ feature CDSGeneProt-feature-type-constraint ,
+ is-pseudo BOOLEAN DEFAULT TRUE }
+
+CDSGeneProt-constraint-field ::= CHOICE {
+ field CDSGeneProt-field }
+
+CDSGeneProt-qual-constraint ::= SEQUENCE {
+ field1 CDSGeneProt-constraint-field OPTIONAL ,
+ field2 CDSGeneProt-constraint-field OPTIONAL ,
+ constraint String-constraint OPTIONAL }
+
+Sequence-constraint-rnamol ::= ENUMERATED {
+ any (0) ,
+ genomic (1) ,
+ precursor-RNA (2) ,
+ mRNA (3) ,
+ rRNA (4) ,
+ tRNA (5) ,
+ snRNA (6) ,
+ scRNA (7) ,
+ genomic-mRNA (8) ,
+ cRNA (9) ,
+ snoRNA (10) ,
+ transcribed-RNA (11) ,
+ ncRNA (12) ,
+ transfer-messenger-RNA (13) }
+
+Sequence-constraint-mol-type-constraint ::= CHOICE {
+ any NULL ,
+ nucleotide NULL ,
+ dna NULL ,
+ rna Sequence-constraint-rnamol ,
+ protein NULL }
+
+Sequence-constraint ::= SEQUENCE {
+ seqtype Sequence-constraint-mol-type-constraint OPTIONAL ,
+ id String-constraint OPTIONAL ,
+ feature Feature-type }
+
+Constraint-choice ::= CHOICE {
+ string String-constraint ,
+ location Location-constraint ,
+ source Source-constraint,
+ cdsgeneprot-qual CDSGeneProt-qual-constraint ,
+ cdsgeneprot-pseudo CDSGeneProt-pseudo-constraint ,
+ sequence Sequence-constraint }
+
+Constraint-choice-set ::= SET OF Constraint-choice
+
+Text-portion ::= SEQUENCE {
+ left-text VisibleString OPTIONAL ,
+ include-left BOOLEAN ,
+ right-text VisibleString OPTIONAL ,
+ include-right BOOLEAN ,
+ inside BOOLEAN ,
+ case-sensitive BOOLEAN DEFAULT FALSE ,
+ whole-word BOOLEAN DEFAULT FALSE }
+
+Field-edit-location ::= ENUMERATED {
+ anywhere (0) ,
+ beginning (1) ,
+ end (2) }
+
+Field-edit ::= SEQUENCE {
+ find-txt VisibleString ,
+ repl-txt VisibleString OPTIONAL ,
+ location Field-edit-location DEFAULT anywhere }
+
+Field-type ::= CHOICE {
+ source-qual Source-qual-choice ,
+ feature-field Feature-field ,
+ cds-gene-prot CDSGeneProt-field ,
+ molinfo-field Molinfo-field }
+
+Field-pair-type ::= CHOICE {
+ source-qual Source-qual-pair ,
+ feature-field Feature-field-pair ,
+ cds-gene-prot CDSGeneProt-field-pair ,
+ molinfo-field Molinfo-field-pair }
+
+ExistingTextOption ::= ENUMERATED {
+ replace-old (1) ,
+ append-semi (2) ,
+ append-space (3) ,
+ append-colon (4) ,
+ append-none (5) ,
+ prefix-semi (6) ,
+ prefix-space (7) ,
+ prefix-colon (8) ,
+ prefix-none (9) ,
+ leave-old (10) }
+
+
+Apply-action ::= SEQUENCE {
+ field Field-type ,
+ value VisibleString ,
+ existing-text ExistingTextOption }
+
+Edit-action ::= SEQUENCE {
+ edit Field-edit ,
+ field Field-type }
+
+Convert-action ::= SEQUENCE {
+ fields Field-pair-type ,
+ existing-text ExistingTextOption }
+
+Copy-action ::= SEQUENCE {
+ fields Field-pair-type ,
+ existing-text ExistingTextOption }
+
+Swap-action ::= SEQUENCE {
+ fields Field-pair-type ,
+ field-to Field-type }
+
+AECRParse-action ::= SEQUENCE {
+ portion Text-portion ,
+ fields Field-pair-type ,
+ remove-from-parsed BOOLEAN DEFAULT FALSE ,
+ existing-text ExistingTextOption }
+
+Remove-action ::= SEQUENCE {
+ field Field-type }
+
+Action-choice ::= CHOICE {
+ apply Apply-action ,
+ edit Edit-action ,
+ convert Convert-action ,
+ copy Copy-action ,
+ swap Swap-action ,
+ remove Remove-action ,
+ parse AECRParse-action }
+
+AECR-action ::= SEQUENCE {
+ action Action-choice ,
+ constraint Constraint-choice-set OPTIONAL }
+
+Cap-change ::= ENUMERATED {
+ none (0) ,
+ tolower (1) ,
+ toupper (2) ,
+ firstcap (3) }
+
+Parse-src-org-choice ::= CHOICE {
+ source-qual Source-qual ,
+ taxname-after-binomial NULL }
+
+Parse-src-org ::= SEQUENCE {
+ field Parse-src-org-choice ,
+ type Object-type-constraint DEFAULT any }
+
+Parse-src ::= CHOICE {
+ defline NULL ,
+ flatfile NULL ,
+ local-id NULL ,
+ org Parse-src-org ,
+ comment NULL ,
+ bankit-comment NULL ,
+ structured-comment VisibleString ,
+ file-id NULL }
+
+Parse-dst-org ::= SEQUENCE {
+ field Source-qual-choice ,
+ type Object-type-constraint DEFAULT any }
+
+Parse-dest ::= CHOICE {
+ defline NULL ,
+ org Parse-dst-org ,
+ featqual Feature-field-legal ,
+ dbxref VisibleString }
+
+Parse-action ::= SEQUENCE {
+ portion Text-portion ,
+ src Parse-src ,
+ dest Parse-dest ,
+ capitalization Cap-change DEFAULT none ,
+ remove-from-parsed BOOLEAN DEFAULT FALSE ,
+ existing-text ExistingTextOption }
+
+
+Location-interval ::= SEQUENCE {
+ from INTEGER ,
+ to INTEGER }
+
+Location-choice ::= CHOICE {
+ interval Location-interval ,
+ whole-sequence NULL }
+
+Sequence-list ::= SET OF VisibleString
+Sequence-list-choice ::= CHOICE {
+ list Sequence-list ,
+ all NULL }
+
+Apply-feature-action ::= SEQUENCE {
+ type Feature-type ,
+ partial5 BOOLEAN DEFAULT FALSE ,
+ partial3 BOOLEAN DEFAULT FALSE ,
+ plus-strand BOOLEAN DEFAULT TRUE ,
+ location Location-choice ,
+ seq-list Sequence-list-choice ,
+ add-redundant BOOLEAN DEFAULT TRUE ,
+ add-mrna BOOLEAN DEFAULT FALSE ,
+ apply-to-parts BOOLEAN DEFAULT FALSE ,
+ only-seg-num INTEGER DEFAULT -1 ,
+ fields Feat-qual-legal-set OPTIONAL }
+
+Remove-feature-action ::= SEQUENCE {
+ type Feature-type ,
+ constraint Constraint-choice-set OPTIONAL }
+
+Feature-location-strand-from ::= ENUMERATED {
+ any (0) ,
+ plus (1) ,
+ minus (2) ,
+ unknown (3) ,
+ both (4) }
+
+Feature-location-strand-to ::= ENUMERATED {
+ plus (1) ,
+ minus (2) ,
+ unknown (3) ,
+ both (4) ,
+ reverse (5) }
+
+Edit-location-strand ::= SEQUENCE {
+ strand-from Feature-location-strand-from ,
+ strand-to Feature-location-strand-to }
+
+Partial-5-set-constraint ::= ENUMERATED {
+ all (0) ,
+ at-end (1) ,
+ bad-start (2) ,
+ frame-not-one (3) }
+
+Partial-5-set-action ::= SEQUENCE {
+ constraint Partial-5-set-constraint ,
+ extend BOOLEAN }
+
+Partial-5-clear-constraint ::= ENUMERATED {
+ all (0) ,
+ not-at-end (1) ,
+ good-start (2) }
+
+Partial-3-set-constraint ::= ENUMERATED {
+ all (0) ,
+ at-end (1) ,
+ bad-end (2) }
+
+Partial-3-set-action ::= SEQUENCE {
+ constraint Partial-3-set-constraint ,
+ extend BOOLEAN }
+
+Partial-3-clear-constraint ::= ENUMERATED {
+ all (0) ,
+ not-at-end (1) ,
+ good-end (2) }
+
+Convert-location-type ::= ENUMERATED {
+ join (1) ,
+ order (2) ,
+ merge (3) }
+
+Location-edit-type ::= CHOICE {
+ strand Edit-location-strand ,
+ set-5-partial Partial-5-set-action ,
+ clear-5-partial Partial-5-clear-constraint ,
+ set-3-partial Partial-3-set-action ,
+ clear-3-partial Partial-3-clear-constraint ,
+ convert Convert-location-type }
+
+Edit-feature-location-action ::= SEQUENCE {
+ type Feature-type ,
+ action Location-edit-type ,
+ constraint Constraint-choice-set OPTIONAL }
+
+Macro-action-choice ::= CHOICE {
+ aecr AECR-action ,
+ parse Parse-action ,
+ add-feature Apply-feature-action ,
+ remove-feature Remove-feature-action ,
+ edit-location Edit-feature-location-action }
+
+
+Macro-action-list ::= SET OF Macro-action-choice
+
+END
diff --git a/asn/makeload.bat b/asn/makeload.bat
index b8bd01b2..2e521ee6 100644
--- a/asn/makeload.bat
+++ b/asn/makeload.bat
@@ -1,6 +1,7 @@
asntool -m ..\asn\general.asn -l asngen.h
asntool -m ..\asn\seqset.asn -l asnsset.h
asntool -m ..\asn\seqfeat.asn -l asnfeat.h
+asntool -m ..\asn\seqtable.asn -l asntable.h
asntool -m ..\asn\seqalign.asn -l asnalign.h
asntool -m ..\asn\seqloc.asn -l asnloc.h
asntool -m ..\asn\seqres.asn -l asnres.h
diff --git a/asn/makeload.unx b/asn/makeload.unx
index 66f39535..55e44ba0 100755
--- a/asn/makeload.unx
+++ b/asn/makeload.unx
@@ -1,6 +1,7 @@
asntool -m ../asn/general.asn -l asngen.h
asntool -m ../asn/seqset.asn -l asnsset.h
asntool -m ../asn/seqfeat.asn -l asnfeat.h
+asntool -m ../asn/seqtable.asn -l asntable.h
asntool -m ../asn/seqalign.asn -l asnalign.h
asntool -m ../asn/seqloc.asn -l asnloc.h
asntool -m ../asn/seqres.asn -l asnres.h
diff --git a/asn/makestat.bat b/asn/makestat.bat
index 8f33674d..899af2db 100644
--- a/asn/makestat.bat
+++ b/asn/makestat.bat
@@ -1,6 +1,7 @@
asntool -m ..\asn\general.asn -o asngen.h
asntool -m ..\asn\seqset.asn -o asnsset.h
asntool -m ..\asn\seqfeat.asn -o asnfeat.h
+asntool -m ..\asn\seqtable.asn -o asntable.h
asntool -m ..\asn\seqalign.asn -o asnalign.h
asntool -m ..\asn\seqloc.asn -o asnloc.h
asntool -m ..\asn\seqres.asn -o asnres.h
@@ -42,3 +43,4 @@ asntool -m ..\access\mla2.asn -o asnmla2.h
asntool -m ..\asn\gbseq.asn -o asngbseq.h
asntool -m ..\asn\insdseq.asn -o asninsdseq.h
asntool -m ..\asn\tinyseq.asn -o asntseq.h
+asntool -m ..\sequin\macro.asn -o asnmacro.h
diff --git a/asn/makestat.unx b/asn/makestat.unx
index 8eb52e0e..c82fefa6 100755
--- a/asn/makestat.unx
+++ b/asn/makestat.unx
@@ -1,6 +1,7 @@
asntool -m ../asn/general.asn -o asngen.h
asntool -m ../asn/seqset.asn -o asnsset.h
asntool -m ../asn/seqfeat.asn -o asnfeat.h
+asntool -m ../asn/seqtable.asn -o asntable.h
asntool -m ../asn/seqalign.asn -o asnalign.h
asntool -m ../asn/seqloc.asn -o asnloc.h
asntool -m ../asn/seqres.asn -o asnres.h
@@ -42,3 +43,4 @@ asntool -m ../access/mla2.asn -o asnmla2.h
asntool -m ../asn/gbseq.asn -o asngbseq.h
asntool -m ../asn/insdseq.asn -o asninsdseq.h
asntool -m ../asn/tinyseq.asn -o asntseq.h
+asntool -m ../sequin/macro.asn -o asnmacro.h
diff --git a/asn/seq.asn b/asn/seq.asn
index 9696a68b..6b5ffce2 100644
--- a/asn/seq.asn
+++ b/asn/seq.asn
@@ -1,4 +1,4 @@
---$Revision: 6.16 $
+--$Revision: 6.19 $
--**********************************************************************
--
-- NCBI Sequence elements
@@ -27,7 +27,8 @@ IMPORTS Date, Int-fuzz, Dbtag, Object-id, User-object FROM NCBI-General
EMBL-block FROM EMBL-General
SP-block FROM SP-General
PRF-block FROM PRF-General
- PDB-block FROM PDB-General;
+ PDB-block FROM PDB-General
+ Seq-table FROM NCBI-SeqTable;
--*** Sequence ********************************
--*
@@ -102,6 +103,8 @@ MolInfo ::= SEQUENCE {
cRNA (11) , -- viral RNA genome copy intermediate
snoRNA (12) , -- small nucleolar RNA
transcribed-RNA (13) , -- transcribed RNA other than existing classes
+ ncRNA (14) ,
+ tmRNA (15) ,
other (255) } DEFAULT unknown ,
tech INTEGER {
unknown (0) ,
@@ -127,6 +130,7 @@ MolInfo ::= SEQUENCE {
wgs (20) , -- whole genome shotgun sequencing
barcode (21) , -- barcode of life project
composite-wgs-htgs (22) , -- composite of WGS and HTGS
+ tsa (23) , -- transcriptome shotgun assembly
other (255) } -- use Source.techexp
DEFAULT unknown ,
techexp VisibleString OPTIONAL , -- explanation if tech not enough
@@ -145,7 +149,8 @@ MolInfo ::= SEQUENCE {
no-ends (5) , -- missing both ends
has-left (6) , -- 5' or NH3 end present
has-right (7) , -- 3' or COOH end present
- other (255) } DEFAULT unknown }
+ other (255) } DEFAULT unknown ,
+ gbmoltype VisibleString OPTIONAL } -- identifies particular ncRNA
GIBB-mol ::= ENUMERATED { -- type of molecule represented
@@ -239,12 +244,12 @@ Pubdesc ::= SEQUENCE { -- how sequence presented in pub
seq-raw StringStore OPTIONAL , -- original sequence from paper
align-group INTEGER OPTIONAL , -- this seq aligned with others in paper
comment VisibleString OPTIONAL, -- any comment on this pub in context
- reftype INTEGER { -- type of reference in a GenBank record
- seq (0) , -- refers to sequence
- sites (1) , -- refers to unspecified features
- feats (2) , -- refers to specified features
- no-target (3) } -- nothing specified (EMBL)
- DEFAULT seq }
+ reftype INTEGER { -- type of reference in a GenBank record
+ seq (0) , -- refers to sequence
+ sites (1) , -- refers to unspecified features
+ feats (2) , -- refers to specified features
+ no-target (3) } -- nothing specified (EMBL)
+ DEFAULT seq }
Heterogen ::= VisibleString -- cofactor, prosthetic group, inhibitor, etc
@@ -433,8 +438,9 @@ Seq-annot ::= SEQUENCE {
ftable SET OF Seq-feat ,
align SET OF Seq-align ,
graph SET OF Seq-graph ,
- ids SET OF Seq-id , -- used for communication between tools
- locs SET OF Seq-loc } } -- used for communication between tools
+ ids SET OF Seq-id , -- used for communication between tools
+ locs SET OF Seq-loc , -- used for communication between tools
+ seq-table Seq-table } } -- features in table form
END
diff --git a/asn/seqfeat.asn b/asn/seqfeat.asn
index 1752344a..f9b636ae 100644
--- a/asn/seqfeat.asn
+++ b/asn/seqfeat.asn
@@ -1,4 +1,4 @@
---$Revision: 6.18 $
+--$Revision: 6.19 $
--**********************************************************************
--
-- NCBI Sequence Feature elements
@@ -444,7 +444,8 @@ BioSource ::= SEQUENCE {
proplastid (18) ,
endogenous-virus (19) ,
hydrogenosome (20) ,
- chromosome (21)
+ chromosome (21) ,
+ chromatophore (22)
} DEFAULT unknown ,
origin INTEGER {
unknown (0) ,
diff --git a/asn/seqtable.asn b/asn/seqtable.asn
new file mode 100644
index 00000000..0cfd7957
--- /dev/null
+++ b/asn/seqtable.asn
@@ -0,0 +1,226 @@
+--$Revision: 1.5 $
+-- ----------------------------------------------------------------------------
+--
+-- PUBLIC DOMAIN NOTICE
+-- National Center for Biotechnology Information
+--
+-- This software/database is a "United States Government Work" under the terms
+-- of the United States Copyright Act. It was written as part of the author's
+-- official duties as a United States Government employee and thus cannot be
+-- copyrighted. This software/database is freely available to the public for
+-- use. The National Library of Medicine and the U.S. Government have not
+-- placed any restriction on its use or reproduction.
+--
+-- Although all reasonable efforts have been taken to ensure the accuracy and
+-- reliability of the software and data, the NLM and the U.S. Government do not
+-- and cannot warrant the performance or results that may be obtained by using
+-- this software or data. The NLM and the U.S. Government disclaim all
+-- warranties, express or implied, including warranties of performance,
+-- merchantability or fitness for any particular purpose.
+--
+-- Please cite the authors in any work or product based on this material.
+--
+-- ----------------------------------------------------------------------------
+--
+-- Authors: Mike DiCuccio, Eugene Vasilchenko
+--
+-- ASN.1 interface to table readers
+--
+-- ----------------------------------------------------------------------------
+
+NCBI-SeqTable DEFINITIONS ::=
+
+BEGIN
+
+EXPORTS
+ SeqTable-column-info, SeqTable-column, Seq-table;
+
+IMPORTS
+ Seq-id, Seq-loc, Seq-interval FROM NCBI-Seqloc;
+
+
+SeqTable-column-info ::= SEQUENCE {
+ -- user friendly column name, can be skipped
+ title VisibleString OPTIONAL,
+
+ -- identification of the column data in the objects described by the table
+ field-id INTEGER { -- known column data types
+ -- position types
+ location (0), -- location as Seq-loc
+ location-id (1), -- location Seq-id
+ location-gi (2), -- gi
+ location-from (3), -- interval from
+ location-to (4), -- interval to
+ location-strand (5), -- location strand
+ location-fuzz-from-lim (6),
+ location-fuzz-to-lim (7),
+
+ product (10), -- product as Seq-loc
+ product-id (11), -- product Seq-id
+ product-gi (12), -- product gi
+ product-from (13), -- product interval from
+ product-to (14), -- product interval to
+ product-strand (15), -- product strand
+ product-fuzz-from-lim (16),
+ product-fuzz-to-lim (17),
+
+ -- main feature fields
+ id-local (20), -- id.local.id
+ xref-id-local (21), -- xref.id.local.id
+ partial (22),
+ comment (23),
+ title (24),
+ ext (25), -- field-name must be "E.xxx", see below
+ qual (26), -- field-name must be "Q.xxx", see below
+ dbxref (27), -- field-name must be "D.xxx", see below
+
+ -- various data fields
+ data-imp-key (30),
+ data-region (31),
+ data-cdregion-frame (32),
+
+ -- extra fields, see also special values for str below
+ ext-type (40),
+ qual-qual (41),
+ qual-val (42),
+ dbxref-db (43),
+ dbxref-tag (44)
+ } OPTIONAL,
+
+ -- any column can be identified by ASN.1 text locator string
+ -- with omitted object type.
+ -- examples:
+ -- "data.gene.locus" for Seq-feat.data.gene.locus
+ -- "data.imp.key" for Seq-feat.data.imp.key
+ -- "qual.qual"
+ -- - Seq-feat.qual is SEQUENCE so several columns are allowed
+ -- see also "Q.xxx" special value for shorter qual representation
+ -- "ext.type.str"
+ -- "ext.data.label.str"
+ -- "ext.data.data.int"
+ -- see also "E.xxx" special value for shorter ext representation
+ -- special values start with capital letter:
+ -- "E.xxx" - ext.data.label.str = xxx, ext.data.data = data
+ -- - Seq-feat.ext.data is SEQUENCE so several columns are allowed
+ -- "Q.xxx" - qual.qual = xxx, qual.val = data
+ -- - Seq-feat.qual is SEQUENCE so several columns are allowed
+ -- "D.xxx" - dbxref.id = xxx, dbxref.tag = data
+ -- - Seq-feat.dbxref is SET so several columns are allowed
+ field-name VisibleString OPTIONAL
+}
+
+
+CommonString-table ::= SEQUENCE {
+ -- set of possible values
+ strings SEQUENCE OF VisibleString,
+
+ -- indexes of values
+ indexes SEQUENCE OF INTEGER
+}
+
+
+CommonBytes-table ::= SEQUENCE {
+ -- set of possible values
+ bytes SEQUENCE OF OCTET STRING,
+
+ -- indexes of values
+ indexes SEQUENCE OF INTEGER
+}
+
+
+SeqTable-multi-data ::= CHOICE {
+ -- a set of integers, one per row
+ int SEQUENCE OF INTEGER,
+
+ -- a set of reals, one per row
+ real SEQUENCE OF REAL,
+
+ -- a set of strings, one per row
+ string SEQUENCE OF VisibleString,
+
+ -- a set of byte arrays, one per row
+ bytes SEQUENCE OF OCTET STRING,
+
+ -- a set of string with small set of possible values
+ common-string CommonString-table,
+
+ -- a set of byte arrays with small set of possible values
+ common-bytes CommonBytes-table,
+
+ -- a set of bits, one per row
+ -- this uses bm::bvector<> as its storage mechanism
+ bit OCTET STRING,
+
+ -- a set of locations, one per row
+ loc SEQUENCE OF Seq-loc,
+ id SEQUENCE OF Seq-id,
+ interval SEQUENCE OF Seq-interval
+}
+
+
+SeqTable-single-data ::= CHOICE {
+ -- integer
+ int INTEGER,
+
+ -- real
+ real REAL,
+
+ -- string
+ string VisibleString,
+
+ -- byte array
+ bytes OCTET STRING,
+
+ -- bit
+ bit BOOLEAN,
+
+ -- location
+ loc Seq-loc,
+ id Seq-id,
+ interval Seq-interval
+}
+
+
+SeqTable-sparse-index ::= CHOICE {
+ -- indexed of rows with values
+ indexes SEQUENCE OF INTEGER,
+
+ -- bitset of rows with values
+ bit-set OCTET STRING
+}
+
+
+SeqTable-column ::= SEQUENCE {
+ -- column description or reference to previously defined info
+ header SeqTable-column-info, -- information about data
+
+ -- row data
+ data SeqTable-multi-data OPTIONAL,
+
+ -- in case not all rows contain data this field will contain sparse info
+ sparse SeqTable-sparse-index OPTIONAL,
+
+ -- default value for sparse table, or if row data is too short
+ default SeqTable-single-data OPTIONAL,
+
+ -- single value for indexes not listed in sparse table
+ sparse-other SeqTable-single-data OPTIONAL
+}
+
+
+Seq-table ::= SEQUENCE {
+ -- type of features in this table, equal to Seq-feat.data variant index
+ feat-type INTEGER,
+
+ -- subtype of features in this table, defined in header SeqFeatData.hpp
+ feat-subtype INTEGER OPTIONAL,
+
+ -- number of rows
+ num-rows INTEGER,
+
+ -- data in columns
+ columns SEQUENCE OF SeqTable-column
+}
+
+
+END
diff --git a/asnlib/asnprint.c b/asnlib/asnprint.c
index da2d8840..ee10504f 100644
--- a/asnlib/asnprint.c
+++ b/asnlib/asnprint.c
@@ -29,7 +29,7 @@
*
* Version Creation Date: 3/4/91
*
-* $Revision: 6.22 $
+* $Revision: 6.23 $
*
* File Description:
* Routines for printing ASN.1 value notation (text) messages and
@@ -42,6 +42,9 @@
* 3/4/91 Kans Stricter typecasting for GNU C and C++
*
* $Log: asnprint.c,v $
+* Revision 6.23 2007/12/03 18:15:31 gouriano
+* Corrected line length in AsnPrintString
+*
* Revision 6.22 2004/12/08 04:39:38 beloslyu
* c++ comment changed to c-style one. Anrdrei, please be careful
*
@@ -1650,7 +1653,7 @@ NLM_EXTERN Boolean AsnPrintString (CharPtr the_string, AsnIoPtr aip)
*current = *(str+1);
*(current+1) = 0;
pos = AsnPrintGetWordBreak(str_begin,
- aip->linelength - linepos_start);
+ aip->linepos - linepos_start);
/* Save rest of string */
diff --git a/asnstat/all.h b/asnstat/all.h
index 4b709a29..e793b3de 100644
--- a/asnstat/all.h
+++ b/asnstat/all.h
@@ -10,7 +10,7 @@
#endif
static char * asnfilename = "all.h60";
-static AsnValxNode avnx[617] = {
+static AsnValxNode avnx[1107] = {
{20,"unk" ,0,0.0,&avnx[1] } ,
{20,"gt" ,1,0.0,&avnx[2] } ,
{20,"lt" ,2,0.0,&avnx[3] } ,
@@ -273,363 +273,853 @@ static AsnValxNode avnx[617] = {
{20,"proplastid" ,18,0.0,&avnx[260] } ,
{20,"endogenous-virus" ,19,0.0,&avnx[261] } ,
{20,"hydrogenosome" ,20,0.0,&avnx[262] } ,
- {20,"chromosome" ,21,0.0,NULL } ,
+ {20,"chromosome" ,21,0.0,&avnx[263] } ,
+ {20,"chromatophore" ,22,0.0,NULL } ,
{3,NULL,0,0.0,NULL } ,
- {20,"unknown" ,0,0.0,&avnx[265] } ,
- {20,"natural" ,1,0.0,&avnx[266] } ,
- {20,"natmut" ,2,0.0,&avnx[267] } ,
- {20,"mut" ,3,0.0,&avnx[268] } ,
- {20,"artificial" ,4,0.0,&avnx[269] } ,
- {20,"synthetic" ,5,0.0,&avnx[270] } ,
+ {20,"unknown" ,0,0.0,&avnx[266] } ,
+ {20,"natural" ,1,0.0,&avnx[267] } ,
+ {20,"natmut" ,2,0.0,&avnx[268] } ,
+ {20,"mut" ,3,0.0,&avnx[269] } ,
+ {20,"artificial" ,4,0.0,&avnx[270] } ,
+ {20,"synthetic" ,5,0.0,&avnx[271] } ,
{20,"other" ,255,0.0,NULL } ,
{3,NULL,0,0.0,NULL } ,
- {20,"chromosome" ,1,0.0,&avnx[273] } ,
- {20,"map" ,2,0.0,&avnx[274] } ,
- {20,"clone" ,3,0.0,&avnx[275] } ,
- {20,"subclone" ,4,0.0,&avnx[276] } ,
- {20,"haplotype" ,5,0.0,&avnx[277] } ,
- {20,"genotype" ,6,0.0,&avnx[278] } ,
- {20,"sex" ,7,0.0,&avnx[279] } ,
- {20,"cell-line" ,8,0.0,&avnx[280] } ,
- {20,"cell-type" ,9,0.0,&avnx[281] } ,
- {20,"tissue-type" ,10,0.0,&avnx[282] } ,
- {20,"clone-lib" ,11,0.0,&avnx[283] } ,
- {20,"dev-stage" ,12,0.0,&avnx[284] } ,
- {20,"frequency" ,13,0.0,&avnx[285] } ,
- {20,"germline" ,14,0.0,&avnx[286] } ,
- {20,"rearranged" ,15,0.0,&avnx[287] } ,
- {20,"lab-host" ,16,0.0,&avnx[288] } ,
- {20,"pop-variant" ,17,0.0,&avnx[289] } ,
- {20,"tissue-lib" ,18,0.0,&avnx[290] } ,
- {20,"plasmid-name" ,19,0.0,&avnx[291] } ,
- {20,"transposon-name" ,20,0.0,&avnx[292] } ,
- {20,"insertion-seq-name" ,21,0.0,&avnx[293] } ,
- {20,"plastid-name" ,22,0.0,&avnx[294] } ,
- {20,"country" ,23,0.0,&avnx[295] } ,
- {20,"segment" ,24,0.0,&avnx[296] } ,
- {20,"endogenous-virus-name" ,25,0.0,&avnx[297] } ,
- {20,"transgenic" ,26,0.0,&avnx[298] } ,
- {20,"environmental-sample" ,27,0.0,&avnx[299] } ,
- {20,"isolation-source" ,28,0.0,&avnx[300] } ,
- {20,"lat-lon" ,29,0.0,&avnx[301] } ,
- {20,"collection-date" ,30,0.0,&avnx[302] } ,
- {20,"collected-by" ,31,0.0,&avnx[303] } ,
- {20,"identified-by" ,32,0.0,&avnx[304] } ,
- {20,"fwd-primer-seq" ,33,0.0,&avnx[305] } ,
- {20,"rev-primer-seq" ,34,0.0,&avnx[306] } ,
- {20,"fwd-primer-name" ,35,0.0,&avnx[307] } ,
- {20,"rev-primer-name" ,36,0.0,&avnx[308] } ,
- {20,"metagenomic" ,37,0.0,&avnx[309] } ,
+ {20,"chromosome" ,1,0.0,&avnx[274] } ,
+ {20,"map" ,2,0.0,&avnx[275] } ,
+ {20,"clone" ,3,0.0,&avnx[276] } ,
+ {20,"subclone" ,4,0.0,&avnx[277] } ,
+ {20,"haplotype" ,5,0.0,&avnx[278] } ,
+ {20,"genotype" ,6,0.0,&avnx[279] } ,
+ {20,"sex" ,7,0.0,&avnx[280] } ,
+ {20,"cell-line" ,8,0.0,&avnx[281] } ,
+ {20,"cell-type" ,9,0.0,&avnx[282] } ,
+ {20,"tissue-type" ,10,0.0,&avnx[283] } ,
+ {20,"clone-lib" ,11,0.0,&avnx[284] } ,
+ {20,"dev-stage" ,12,0.0,&avnx[285] } ,
+ {20,"frequency" ,13,0.0,&avnx[286] } ,
+ {20,"germline" ,14,0.0,&avnx[287] } ,
+ {20,"rearranged" ,15,0.0,&avnx[288] } ,
+ {20,"lab-host" ,16,0.0,&avnx[289] } ,
+ {20,"pop-variant" ,17,0.0,&avnx[290] } ,
+ {20,"tissue-lib" ,18,0.0,&avnx[291] } ,
+ {20,"plasmid-name" ,19,0.0,&avnx[292] } ,
+ {20,"transposon-name" ,20,0.0,&avnx[293] } ,
+ {20,"insertion-seq-name" ,21,0.0,&avnx[294] } ,
+ {20,"plastid-name" ,22,0.0,&avnx[295] } ,
+ {20,"country" ,23,0.0,&avnx[296] } ,
+ {20,"segment" ,24,0.0,&avnx[297] } ,
+ {20,"endogenous-virus-name" ,25,0.0,&avnx[298] } ,
+ {20,"transgenic" ,26,0.0,&avnx[299] } ,
+ {20,"environmental-sample" ,27,0.0,&avnx[300] } ,
+ {20,"isolation-source" ,28,0.0,&avnx[301] } ,
+ {20,"lat-lon" ,29,0.0,&avnx[302] } ,
+ {20,"collection-date" ,30,0.0,&avnx[303] } ,
+ {20,"collected-by" ,31,0.0,&avnx[304] } ,
+ {20,"identified-by" ,32,0.0,&avnx[305] } ,
+ {20,"fwd-primer-seq" ,33,0.0,&avnx[306] } ,
+ {20,"rev-primer-seq" ,34,0.0,&avnx[307] } ,
+ {20,"fwd-primer-name" ,35,0.0,&avnx[308] } ,
+ {20,"rev-primer-name" ,36,0.0,&avnx[309] } ,
+ {20,"metagenomic" ,37,0.0,&avnx[310] } ,
{20,"other" ,255,0.0,NULL } ,
- {20,"unknown" ,0,0.0,&avnx[311] } ,
- {20,"genomic" ,1,0.0,&avnx[312] } ,
- {20,"pre-RNA" ,2,0.0,&avnx[313] } ,
- {20,"mRNA" ,3,0.0,&avnx[314] } ,
- {20,"rRNA" ,4,0.0,&avnx[315] } ,
- {20,"tRNA" ,5,0.0,&avnx[316] } ,
- {20,"snRNA" ,6,0.0,&avnx[317] } ,
- {20,"scRNA" ,7,0.0,&avnx[318] } ,
- {20,"peptide" ,8,0.0,&avnx[319] } ,
- {20,"other-genetic" ,9,0.0,&avnx[320] } ,
- {20,"genomic-mRNA" ,10,0.0,&avnx[321] } ,
- {20,"cRNA" ,11,0.0,&avnx[322] } ,
- {20,"snoRNA" ,12,0.0,&avnx[323] } ,
- {20,"transcribed-RNA" ,13,0.0,&avnx[324] } ,
+ {20,"unknown" ,0,0.0,&avnx[312] } ,
+ {20,"genomic" ,1,0.0,&avnx[313] } ,
+ {20,"pre-RNA" ,2,0.0,&avnx[314] } ,
+ {20,"mRNA" ,3,0.0,&avnx[315] } ,
+ {20,"rRNA" ,4,0.0,&avnx[316] } ,
+ {20,"tRNA" ,5,0.0,&avnx[317] } ,
+ {20,"snRNA" ,6,0.0,&avnx[318] } ,
+ {20,"scRNA" ,7,0.0,&avnx[319] } ,
+ {20,"peptide" ,8,0.0,&avnx[320] } ,
+ {20,"other-genetic" ,9,0.0,&avnx[321] } ,
+ {20,"genomic-mRNA" ,10,0.0,&avnx[322] } ,
+ {20,"cRNA" ,11,0.0,&avnx[323] } ,
+ {20,"snoRNA" ,12,0.0,&avnx[324] } ,
+ {20,"transcribed-RNA" ,13,0.0,&avnx[325] } ,
+ {20,"ncRNA" ,14,0.0,&avnx[326] } ,
+ {20,"tmRNA" ,15,0.0,&avnx[327] } ,
{20,"other" ,255,0.0,NULL } ,
{3,NULL,0,0.0,NULL } ,
- {20,"unknown" ,0,0.0,&avnx[327] } ,
- {20,"standard" ,1,0.0,&avnx[328] } ,
- {20,"est" ,2,0.0,&avnx[329] } ,
- {20,"sts" ,3,0.0,&avnx[330] } ,
- {20,"survey" ,4,0.0,&avnx[331] } ,
- {20,"genemap" ,5,0.0,&avnx[332] } ,
- {20,"physmap" ,6,0.0,&avnx[333] } ,
- {20,"derived" ,7,0.0,&avnx[334] } ,
- {20,"concept-trans" ,8,0.0,&avnx[335] } ,
- {20,"seq-pept" ,9,0.0,&avnx[336] } ,
- {20,"both" ,10,0.0,&avnx[337] } ,
- {20,"seq-pept-overlap" ,11,0.0,&avnx[338] } ,
- {20,"seq-pept-homol" ,12,0.0,&avnx[339] } ,
- {20,"concept-trans-a" ,13,0.0,&avnx[340] } ,
- {20,"htgs-1" ,14,0.0,&avnx[341] } ,
- {20,"htgs-2" ,15,0.0,&avnx[342] } ,
- {20,"htgs-3" ,16,0.0,&avnx[343] } ,
- {20,"fli-cdna" ,17,0.0,&avnx[344] } ,
- {20,"htgs-0" ,18,0.0,&avnx[345] } ,
- {20,"htc" ,19,0.0,&avnx[346] } ,
- {20,"wgs" ,20,0.0,&avnx[347] } ,
- {20,"barcode" ,21,0.0,&avnx[348] } ,
- {20,"composite-wgs-htgs" ,22,0.0,&avnx[349] } ,
+ {20,"unknown" ,0,0.0,&avnx[330] } ,
+ {20,"standard" ,1,0.0,&avnx[331] } ,
+ {20,"est" ,2,0.0,&avnx[332] } ,
+ {20,"sts" ,3,0.0,&avnx[333] } ,
+ {20,"survey" ,4,0.0,&avnx[334] } ,
+ {20,"genemap" ,5,0.0,&avnx[335] } ,
+ {20,"physmap" ,6,0.0,&avnx[336] } ,
+ {20,"derived" ,7,0.0,&avnx[337] } ,
+ {20,"concept-trans" ,8,0.0,&avnx[338] } ,
+ {20,"seq-pept" ,9,0.0,&avnx[339] } ,
+ {20,"both" ,10,0.0,&avnx[340] } ,
+ {20,"seq-pept-overlap" ,11,0.0,&avnx[341] } ,
+ {20,"seq-pept-homol" ,12,0.0,&avnx[342] } ,
+ {20,"concept-trans-a" ,13,0.0,&avnx[343] } ,
+ {20,"htgs-1" ,14,0.0,&avnx[344] } ,
+ {20,"htgs-2" ,15,0.0,&avnx[345] } ,
+ {20,"htgs-3" ,16,0.0,&avnx[346] } ,
+ {20,"fli-cdna" ,17,0.0,&avnx[347] } ,
+ {20,"htgs-0" ,18,0.0,&avnx[348] } ,
+ {20,"htc" ,19,0.0,&avnx[349] } ,
+ {20,"wgs" ,20,0.0,&avnx[350] } ,
+ {20,"barcode" ,21,0.0,&avnx[351] } ,
+ {20,"composite-wgs-htgs" ,22,0.0,&avnx[352] } ,
+ {20,"tsa" ,23,0.0,&avnx[353] } ,
{20,"other" ,255,0.0,NULL } ,
{3,NULL,0,0.0,NULL } ,
- {20,"unknown" ,0,0.0,&avnx[352] } ,
- {20,"complete" ,1,0.0,&avnx[353] } ,
- {20,"partial" ,2,0.0,&avnx[354] } ,
- {20,"no-left" ,3,0.0,&avnx[355] } ,
- {20,"no-right" ,4,0.0,&avnx[356] } ,
- {20,"no-ends" ,5,0.0,&avnx[357] } ,
- {20,"has-left" ,6,0.0,&avnx[358] } ,
- {20,"has-right" ,7,0.0,&avnx[359] } ,
+ {20,"unknown" ,0,0.0,&avnx[356] } ,
+ {20,"complete" ,1,0.0,&avnx[357] } ,
+ {20,"partial" ,2,0.0,&avnx[358] } ,
+ {20,"no-left" ,3,0.0,&avnx[359] } ,
+ {20,"no-right" ,4,0.0,&avnx[360] } ,
+ {20,"no-ends" ,5,0.0,&avnx[361] } ,
+ {20,"has-left" ,6,0.0,&avnx[362] } ,
+ {20,"has-right" ,7,0.0,&avnx[363] } ,
{20,"other" ,255,0.0,NULL } ,
{3,NULL,0,0.0,NULL } ,
- {20,"not-set" ,0,0.0,&avnx[362] } ,
- {20,"virtual" ,1,0.0,&avnx[363] } ,
- {20,"raw" ,2,0.0,&avnx[364] } ,
- {20,"seg" ,3,0.0,&avnx[365] } ,
- {20,"const" ,4,0.0,&avnx[366] } ,
- {20,"ref" ,5,0.0,&avnx[367] } ,
- {20,"consen" ,6,0.0,&avnx[368] } ,
- {20,"map" ,7,0.0,&avnx[369] } ,
- {20,"delta" ,8,0.0,&avnx[370] } ,
+ {20,"not-set" ,0,0.0,&avnx[366] } ,
+ {20,"virtual" ,1,0.0,&avnx[367] } ,
+ {20,"raw" ,2,0.0,&avnx[368] } ,
+ {20,"seg" ,3,0.0,&avnx[369] } ,
+ {20,"const" ,4,0.0,&avnx[370] } ,
+ {20,"ref" ,5,0.0,&avnx[371] } ,
+ {20,"consen" ,6,0.0,&avnx[372] } ,
+ {20,"map" ,7,0.0,&avnx[373] } ,
+ {20,"delta" ,8,0.0,&avnx[374] } ,
{20,"other" ,255,0.0,NULL } ,
- {20,"not-set" ,0,0.0,&avnx[372] } ,
- {20,"dna" ,1,0.0,&avnx[373] } ,
- {20,"rna" ,2,0.0,&avnx[374] } ,
- {20,"aa" ,3,0.0,&avnx[375] } ,
- {20,"na" ,4,0.0,&avnx[376] } ,
+ {20,"not-set" ,0,0.0,&avnx[376] } ,
+ {20,"dna" ,1,0.0,&avnx[377] } ,
+ {20,"rna" ,2,0.0,&avnx[378] } ,
+ {20,"aa" ,3,0.0,&avnx[379] } ,
+ {20,"na" ,4,0.0,&avnx[380] } ,
{20,"other" ,255,0.0,NULL } ,
- {20,"not-set" ,0,0.0,&avnx[378] } ,
- {20,"linear" ,1,0.0,&avnx[379] } ,
- {20,"circular" ,2,0.0,&avnx[380] } ,
- {20,"tandem" ,3,0.0,&avnx[381] } ,
+ {20,"not-set" ,0,0.0,&avnx[382] } ,
+ {20,"linear" ,1,0.0,&avnx[383] } ,
+ {20,"circular" ,2,0.0,&avnx[384] } ,
+ {20,"tandem" ,3,0.0,&avnx[385] } ,
{20,"other" ,255,0.0,NULL } ,
{3,NULL,1,0.0,NULL } ,
- {20,"not-set" ,0,0.0,&avnx[384] } ,
- {20,"ss" ,1,0.0,&avnx[385] } ,
- {20,"ds" ,2,0.0,&avnx[386] } ,
- {20,"mixed" ,3,0.0,&avnx[387] } ,
+ {20,"not-set" ,0,0.0,&avnx[388] } ,
+ {20,"ss" ,1,0.0,&avnx[389] } ,
+ {20,"ds" ,2,0.0,&avnx[390] } ,
+ {20,"mixed" ,3,0.0,&avnx[391] } ,
{20,"other" ,255,0.0,NULL } ,
- {20,"unknown" ,0,0.0,&avnx[389] } ,
- {20,"fragment" ,1,0.0,&avnx[390] } ,
- {20,"clone" ,2,0.0,&avnx[391] } ,
- {20,"short-arm" ,3,0.0,&avnx[392] } ,
- {20,"heterochromatin" ,4,0.0,&avnx[393] } ,
- {20,"centromere" ,5,0.0,&avnx[394] } ,
- {20,"telomere" ,6,0.0,&avnx[395] } ,
- {20,"repeat" ,7,0.0,&avnx[396] } ,
- {20,"contig" ,8,0.0,&avnx[397] } ,
+ {20,"unknown" ,0,0.0,&avnx[393] } ,
+ {20,"fragment" ,1,0.0,&avnx[394] } ,
+ {20,"clone" ,2,0.0,&avnx[395] } ,
+ {20,"short-arm" ,3,0.0,&avnx[396] } ,
+ {20,"heterochromatin" ,4,0.0,&avnx[397] } ,
+ {20,"centromere" ,5,0.0,&avnx[398] } ,
+ {20,"telomere" ,6,0.0,&avnx[399] } ,
+ {20,"repeat" ,7,0.0,&avnx[400] } ,
+ {20,"contig" ,8,0.0,&avnx[401] } ,
{20,"other" ,255,0.0,NULL } ,
- {20,"unlinked" ,0,0.0,&avnx[399] } ,
- {20,"linked" ,1,0.0,&avnx[400] } ,
+ {20,"unlinked" ,0,0.0,&avnx[403] } ,
+ {20,"linked" ,1,0.0,&avnx[404] } ,
{20,"other" ,255,0.0,NULL } ,
{2,NULL,0,0.0,NULL } ,
- {20,"not-set" ,0,0.0,&avnx[403] } ,
- {20,"one" ,1,0.0,&avnx[404] } ,
- {20,"two" ,2,0.0,&avnx[405] } ,
+ {20,"not-set" ,0,0.0,&avnx[407] } ,
+ {20,"one" ,1,0.0,&avnx[408] } ,
+ {20,"two" ,2,0.0,&avnx[409] } ,
{20,"three" ,3,0.0,NULL } ,
{3,NULL,0,0.0,NULL } ,
- {20,"not-set" ,0,0.0,&avnx[408] } ,
- {20,"preprotein" ,1,0.0,&avnx[409] } ,
- {20,"mature" ,2,0.0,&avnx[410] } ,
- {20,"signal-peptide" ,3,0.0,&avnx[411] } ,
+ {20,"not-set" ,0,0.0,&avnx[412] } ,
+ {20,"preprotein" ,1,0.0,&avnx[413] } ,
+ {20,"mature" ,2,0.0,&avnx[414] } ,
+ {20,"signal-peptide" ,3,0.0,&avnx[415] } ,
{20,"transit-peptide" ,4,0.0,NULL } ,
{3,NULL,0,0.0,NULL } ,
- {20,"unknown" ,0,0.0,&avnx[414] } ,
- {20,"premsg" ,1,0.0,&avnx[415] } ,
- {20,"mRNA" ,2,0.0,&avnx[416] } ,
- {20,"tRNA" ,3,0.0,&avnx[417] } ,
- {20,"rRNA" ,4,0.0,&avnx[418] } ,
- {20,"snRNA" ,5,0.0,&avnx[419] } ,
- {20,"scRNA" ,6,0.0,&avnx[420] } ,
- {20,"snoRNA" ,7,0.0,&avnx[421] } ,
+ {20,"unknown" ,0,0.0,&avnx[418] } ,
+ {20,"premsg" ,1,0.0,&avnx[419] } ,
+ {20,"mRNA" ,2,0.0,&avnx[420] } ,
+ {20,"tRNA" ,3,0.0,&avnx[421] } ,
+ {20,"rRNA" ,4,0.0,&avnx[422] } ,
+ {20,"snRNA" ,5,0.0,&avnx[423] } ,
+ {20,"scRNA" ,6,0.0,&avnx[424] } ,
+ {20,"snoRNA" ,7,0.0,&avnx[425] } ,
{20,"other" ,255,0.0,NULL } ,
- {20,"disulfide" ,1,0.0,&avnx[423] } ,
- {20,"thiolester" ,2,0.0,&avnx[424] } ,
- {20,"xlink" ,3,0.0,&avnx[425] } ,
- {20,"thioether" ,4,0.0,&avnx[426] } ,
+ {20,"disulfide" ,1,0.0,&avnx[427] } ,
+ {20,"thiolester" ,2,0.0,&avnx[428] } ,
+ {20,"xlink" ,3,0.0,&avnx[429] } ,
+ {20,"thioether" ,4,0.0,&avnx[430] } ,
{20,"other" ,255,0.0,NULL } ,
- {20,"active" ,1,0.0,&avnx[428] } ,
- {20,"binding" ,2,0.0,&avnx[429] } ,
- {20,"cleavage" ,3,0.0,&avnx[430] } ,
- {20,"inhibit" ,4,0.0,&avnx[431] } ,
- {20,"modified" ,5,0.0,&avnx[432] } ,
- {20,"glycosylation" ,6,0.0,&avnx[433] } ,
- {20,"myristoylation" ,7,0.0,&avnx[434] } ,
- {20,"mutagenized" ,8,0.0,&avnx[435] } ,
- {20,"metal-binding" ,9,0.0,&avnx[436] } ,
- {20,"phosphorylation" ,10,0.0,&avnx[437] } ,
- {20,"acetylation" ,11,0.0,&avnx[438] } ,
- {20,"amidation" ,12,0.0,&avnx[439] } ,
- {20,"methylation" ,13,0.0,&avnx[440] } ,
- {20,"hydroxylation" ,14,0.0,&avnx[441] } ,
- {20,"sulfatation" ,15,0.0,&avnx[442] } ,
- {20,"oxidative-deamination" ,16,0.0,&avnx[443] } ,
- {20,"pyrrolidone-carboxylic-acid" ,17,0.0,&avnx[444] } ,
- {20,"gamma-carboxyglutamic-acid" ,18,0.0,&avnx[445] } ,
- {20,"blocked" ,19,0.0,&avnx[446] } ,
- {20,"lipid-binding" ,20,0.0,&avnx[447] } ,
- {20,"np-binding" ,21,0.0,&avnx[448] } ,
- {20,"dna-binding" ,22,0.0,&avnx[449] } ,
- {20,"signal-peptide" ,23,0.0,&avnx[450] } ,
- {20,"transit-peptide" ,24,0.0,&avnx[451] } ,
- {20,"transmembrane-region" ,25,0.0,&avnx[452] } ,
- {20,"nitrosylation" ,26,0.0,&avnx[453] } ,
+ {20,"active" ,1,0.0,&avnx[432] } ,
+ {20,"binding" ,2,0.0,&avnx[433] } ,
+ {20,"cleavage" ,3,0.0,&avnx[434] } ,
+ {20,"inhibit" ,4,0.0,&avnx[435] } ,
+ {20,"modified" ,5,0.0,&avnx[436] } ,
+ {20,"glycosylation" ,6,0.0,&avnx[437] } ,
+ {20,"myristoylation" ,7,0.0,&avnx[438] } ,
+ {20,"mutagenized" ,8,0.0,&avnx[439] } ,
+ {20,"metal-binding" ,9,0.0,&avnx[440] } ,
+ {20,"phosphorylation" ,10,0.0,&avnx[441] } ,
+ {20,"acetylation" ,11,0.0,&avnx[442] } ,
+ {20,"amidation" ,12,0.0,&avnx[443] } ,
+ {20,"methylation" ,13,0.0,&avnx[444] } ,
+ {20,"hydroxylation" ,14,0.0,&avnx[445] } ,
+ {20,"sulfatation" ,15,0.0,&avnx[446] } ,
+ {20,"oxidative-deamination" ,16,0.0,&avnx[447] } ,
+ {20,"pyrrolidone-carboxylic-acid" ,17,0.0,&avnx[448] } ,
+ {20,"gamma-carboxyglutamic-acid" ,18,0.0,&avnx[449] } ,
+ {20,"blocked" ,19,0.0,&avnx[450] } ,
+ {20,"lipid-binding" ,20,0.0,&avnx[451] } ,
+ {20,"np-binding" ,21,0.0,&avnx[452] } ,
+ {20,"dna-binding" ,22,0.0,&avnx[453] } ,
+ {20,"signal-peptide" ,23,0.0,&avnx[454] } ,
+ {20,"transit-peptide" ,24,0.0,&avnx[455] } ,
+ {20,"transmembrane-region" ,25,0.0,&avnx[456] } ,
+ {20,"nitrosylation" ,26,0.0,&avnx[457] } ,
{20,"other" ,255,0.0,NULL } ,
- {20,"unknown" ,0,0.0,&avnx[455] } ,
- {20,"pol1" ,1,0.0,&avnx[456] } ,
- {20,"pol2" ,2,0.0,&avnx[457] } ,
- {20,"pol3" ,3,0.0,&avnx[458] } ,
- {20,"bacterial" ,4,0.0,&avnx[459] } ,
- {20,"viral" ,5,0.0,&avnx[460] } ,
- {20,"rna" ,6,0.0,&avnx[461] } ,
- {20,"organelle" ,7,0.0,&avnx[462] } ,
+ {20,"unknown" ,0,0.0,&avnx[459] } ,
+ {20,"pol1" ,1,0.0,&avnx[460] } ,
+ {20,"pol2" ,2,0.0,&avnx[461] } ,
+ {20,"pol3" ,3,0.0,&avnx[462] } ,
+ {20,"bacterial" ,4,0.0,&avnx[463] } ,
+ {20,"viral" ,5,0.0,&avnx[464] } ,
+ {20,"rna" ,6,0.0,&avnx[465] } ,
+ {20,"organelle" ,7,0.0,&avnx[466] } ,
{20,"other" ,255,0.0,NULL } ,
{2,NULL,0,0.0,NULL } ,
{2,NULL,0,0.0,NULL } ,
- {20,"unknown" ,0,0.0,&avnx[466] } ,
- {20,"single" ,1,0.0,&avnx[467] } ,
- {20,"multiple" ,2,0.0,&avnx[468] } ,
- {20,"region" ,3,0.0,NULL } ,
{20,"unknown" ,0,0.0,&avnx[470] } ,
- {20,"rna-seq" ,1,0.0,&avnx[471] } ,
- {20,"rna-size" ,2,0.0,&avnx[472] } ,
- {20,"np-map" ,3,0.0,&avnx[473] } ,
- {20,"np-size" ,4,0.0,&avnx[474] } ,
- {20,"pe-seq" ,5,0.0,&avnx[475] } ,
- {20,"cDNA-seq" ,6,0.0,&avnx[476] } ,
- {20,"pe-map" ,7,0.0,&avnx[477] } ,
- {20,"pe-size" ,8,0.0,&avnx[478] } ,
- {20,"pseudo-seq" ,9,0.0,&avnx[479] } ,
- {20,"rev-pe-map" ,10,0.0,&avnx[480] } ,
+ {20,"single" ,1,0.0,&avnx[471] } ,
+ {20,"multiple" ,2,0.0,&avnx[472] } ,
+ {20,"region" ,3,0.0,NULL } ,
+ {20,"unknown" ,0,0.0,&avnx[474] } ,
+ {20,"rna-seq" ,1,0.0,&avnx[475] } ,
+ {20,"rna-size" ,2,0.0,&avnx[476] } ,
+ {20,"np-map" ,3,0.0,&avnx[477] } ,
+ {20,"np-size" ,4,0.0,&avnx[478] } ,
+ {20,"pe-seq" ,5,0.0,&avnx[479] } ,
+ {20,"cDNA-seq" ,6,0.0,&avnx[480] } ,
+ {20,"pe-map" ,7,0.0,&avnx[481] } ,
+ {20,"pe-size" ,8,0.0,&avnx[482] } ,
+ {20,"pseudo-seq" ,9,0.0,&avnx[483] } ,
+ {20,"rev-pe-map" ,10,0.0,&avnx[484] } ,
{20,"other" ,255,0.0,NULL } ,
- {20,"unknown" ,0,0.0,&avnx[482] } ,
- {20,"physiological" ,1,0.0,&avnx[483] } ,
- {20,"in-vitro" ,2,0.0,&avnx[484] } ,
- {20,"oocyte" ,3,0.0,&avnx[485] } ,
- {20,"transfection" ,4,0.0,&avnx[486] } ,
- {20,"transgenic" ,5,0.0,&avnx[487] } ,
+ {20,"unknown" ,0,0.0,&avnx[486] } ,
+ {20,"physiological" ,1,0.0,&avnx[487] } ,
+ {20,"in-vitro" ,2,0.0,&avnx[488] } ,
+ {20,"oocyte" ,3,0.0,&avnx[489] } ,
+ {20,"transfection" ,4,0.0,&avnx[490] } ,
+ {20,"transgenic" ,5,0.0,&avnx[491] } ,
{20,"other" ,255,0.0,NULL } ,
{3,NULL,1,0.0,NULL } ,
{2,NULL,0,0.0,NULL } ,
{2,NULL,0,0.0,NULL } ,
- {20,"helix" ,1,0.0,&avnx[492] } ,
- {20,"sheet" ,2,0.0,&avnx[493] } ,
+ {20,"helix" ,1,0.0,&avnx[496] } ,
+ {20,"sheet" ,2,0.0,&avnx[497] } ,
{20,"turn" ,3,0.0,NULL } ,
- {20,"experimental" ,1,0.0,&avnx[495] } ,
+ {20,"experimental" ,1,0.0,&avnx[499] } ,
{20,"not-experimental" ,2,0.0,NULL } ,
- {20,"genbank" ,1,0.0,&avnx[497] } ,
- {20,"embl" ,2,0.0,&avnx[498] } ,
- {20,"ddbj" ,3,0.0,&avnx[499] } ,
- {20,"pir" ,4,0.0,&avnx[500] } ,
- {20,"sp" ,5,0.0,&avnx[501] } ,
- {20,"bbone" ,6,0.0,&avnx[502] } ,
- {20,"pdb" ,7,0.0,&avnx[503] } ,
+ {20,"genbank" ,1,0.0,&avnx[501] } ,
+ {20,"embl" ,2,0.0,&avnx[502] } ,
+ {20,"ddbj" ,3,0.0,&avnx[503] } ,
+ {20,"pir" ,4,0.0,&avnx[504] } ,
+ {20,"sp" ,5,0.0,&avnx[505] } ,
+ {20,"bbone" ,6,0.0,&avnx[506] } ,
+ {20,"pdb" ,7,0.0,&avnx[507] } ,
{20,"other" ,255,0.0,NULL } ,
- {20,"not-set" ,0,0.0,&avnx[505] } ,
- {20,"nuc-prot" ,1,0.0,&avnx[506] } ,
- {20,"segset" ,2,0.0,&avnx[507] } ,
- {20,"conset" ,3,0.0,&avnx[508] } ,
- {20,"parts" ,4,0.0,&avnx[509] } ,
- {20,"gibb" ,5,0.0,&avnx[510] } ,
- {20,"gi" ,6,0.0,&avnx[511] } ,
- {20,"genbank" ,7,0.0,&avnx[512] } ,
- {20,"pir" ,8,0.0,&avnx[513] } ,
- {20,"pub-set" ,9,0.0,&avnx[514] } ,
- {20,"equiv" ,10,0.0,&avnx[515] } ,
- {20,"swissprot" ,11,0.0,&avnx[516] } ,
- {20,"pdb-entry" ,12,0.0,&avnx[517] } ,
- {20,"mut-set" ,13,0.0,&avnx[518] } ,
- {20,"pop-set" ,14,0.0,&avnx[519] } ,
- {20,"phy-set" ,15,0.0,&avnx[520] } ,
- {20,"eco-set" ,16,0.0,&avnx[521] } ,
- {20,"gen-prod-set" ,17,0.0,&avnx[522] } ,
- {20,"wgs-set" ,18,0.0,&avnx[523] } ,
+ {20,"location" ,0,0.0,&avnx[509] } ,
+ {20,"location-id" ,1,0.0,&avnx[510] } ,
+ {20,"location-gi" ,2,0.0,&avnx[511] } ,
+ {20,"location-from" ,3,0.0,&avnx[512] } ,
+ {20,"location-to" ,4,0.0,&avnx[513] } ,
+ {20,"location-strand" ,5,0.0,&avnx[514] } ,
+ {20,"location-fuzz-from-lim" ,6,0.0,&avnx[515] } ,
+ {20,"location-fuzz-to-lim" ,7,0.0,&avnx[516] } ,
+ {20,"product" ,10,0.0,&avnx[517] } ,
+ {20,"product-id" ,11,0.0,&avnx[518] } ,
+ {20,"product-gi" ,12,0.0,&avnx[519] } ,
+ {20,"product-from" ,13,0.0,&avnx[520] } ,
+ {20,"product-to" ,14,0.0,&avnx[521] } ,
+ {20,"product-strand" ,15,0.0,&avnx[522] } ,
+ {20,"product-fuzz-from-lim" ,16,0.0,&avnx[523] } ,
+ {20,"product-fuzz-to-lim" ,17,0.0,&avnx[524] } ,
+ {20,"id-local" ,20,0.0,&avnx[525] } ,
+ {20,"xref-id-local" ,21,0.0,&avnx[526] } ,
+ {20,"partial" ,22,0.0,&avnx[527] } ,
+ {20,"comment" ,23,0.0,&avnx[528] } ,
+ {20,"title" ,24,0.0,&avnx[529] } ,
+ {20,"ext" ,25,0.0,&avnx[530] } ,
+ {20,"qual" ,26,0.0,&avnx[531] } ,
+ {20,"dbxref" ,27,0.0,&avnx[532] } ,
+ {20,"data-imp-key" ,30,0.0,&avnx[533] } ,
+ {20,"data-region" ,31,0.0,&avnx[534] } ,
+ {20,"data-cdregion-frame" ,32,0.0,&avnx[535] } ,
+ {20,"ext-type" ,40,0.0,&avnx[536] } ,
+ {20,"qual-qual" ,41,0.0,&avnx[537] } ,
+ {20,"qual-val" ,42,0.0,&avnx[538] } ,
+ {20,"dbxref-db" ,43,0.0,&avnx[539] } ,
+ {20,"dbxref-tag" ,44,0.0,NULL } ,
+ {20,"not-set" ,0,0.0,&avnx[541] } ,
+ {20,"nuc-prot" ,1,0.0,&avnx[542] } ,
+ {20,"segset" ,2,0.0,&avnx[543] } ,
+ {20,"conset" ,3,0.0,&avnx[544] } ,
+ {20,"parts" ,4,0.0,&avnx[545] } ,
+ {20,"gibb" ,5,0.0,&avnx[546] } ,
+ {20,"gi" ,6,0.0,&avnx[547] } ,
+ {20,"genbank" ,7,0.0,&avnx[548] } ,
+ {20,"pir" ,8,0.0,&avnx[549] } ,
+ {20,"pub-set" ,9,0.0,&avnx[550] } ,
+ {20,"equiv" ,10,0.0,&avnx[551] } ,
+ {20,"swissprot" ,11,0.0,&avnx[552] } ,
+ {20,"pdb-entry" ,12,0.0,&avnx[553] } ,
+ {20,"mut-set" ,13,0.0,&avnx[554] } ,
+ {20,"pop-set" ,14,0.0,&avnx[555] } ,
+ {20,"phy-set" ,15,0.0,&avnx[556] } ,
+ {20,"eco-set" ,16,0.0,&avnx[557] } ,
+ {20,"gen-prod-set" ,17,0.0,&avnx[558] } ,
+ {20,"wgs-set" ,18,0.0,&avnx[559] } ,
{20,"other" ,255,0.0,NULL } ,
{3,NULL,0,0.0,NULL } ,
- {20,"iupacna" ,1,0.0,&avnx[526] } ,
- {20,"iupacaa" ,2,0.0,&avnx[527] } ,
- {20,"ncbi2na" ,3,0.0,&avnx[528] } ,
- {20,"ncbi4na" ,4,0.0,&avnx[529] } ,
- {20,"ncbi8na" ,5,0.0,&avnx[530] } ,
- {20,"ncbipna" ,6,0.0,&avnx[531] } ,
- {20,"ncbi8aa" ,7,0.0,&avnx[532] } ,
- {20,"ncbieaa" ,8,0.0,&avnx[533] } ,
- {20,"ncbipaa" ,9,0.0,&avnx[534] } ,
- {20,"iupacaa3" ,10,0.0,&avnx[535] } ,
+ {20,"iupacna" ,1,0.0,&avnx[562] } ,
+ {20,"iupacaa" ,2,0.0,&avnx[563] } ,
+ {20,"ncbi2na" ,3,0.0,&avnx[564] } ,
+ {20,"ncbi4na" ,4,0.0,&avnx[565] } ,
+ {20,"ncbi8na" ,5,0.0,&avnx[566] } ,
+ {20,"ncbipna" ,6,0.0,&avnx[567] } ,
+ {20,"ncbi8aa" ,7,0.0,&avnx[568] } ,
+ {20,"ncbieaa" ,8,0.0,&avnx[569] } ,
+ {20,"ncbipaa" ,9,0.0,&avnx[570] } ,
+ {20,"iupacaa3" ,10,0.0,&avnx[571] } ,
{20,"ncbistdaa" ,11,0.0,NULL } ,
{3,NULL,0,0.0,NULL } ,
{3,NULL,0,0.0,NULL } ,
{2,NULL,0,0.0,NULL } ,
- {20,"new" ,1,0.0,&avnx[540] } ,
- {20,"update" ,2,0.0,&avnx[541] } ,
- {20,"revision" ,3,0.0,&avnx[542] } ,
+ {20,"new" ,1,0.0,&avnx[576] } ,
+ {20,"update" ,2,0.0,&avnx[577] } ,
+ {20,"revision" ,3,0.0,&avnx[578] } ,
{20,"other" ,255,0.0,NULL } ,
- {20,"off" ,1,0.0,&avnx[544] } ,
- {20,"trace" ,2,0.0,&avnx[545] } ,
- {20,"partial" ,3,0.0,&avnx[546] } ,
+ {20,"off" ,1,0.0,&avnx[580] } ,
+ {20,"trace" ,2,0.0,&avnx[581] } ,
+ {20,"partial" ,3,0.0,&avnx[582] } ,
{20,"complete" ,4,0.0,NULL } ,
- {20,"wire" ,1,0.0,&avnx[548] } ,
- {20,"tubes" ,2,0.0,&avnx[549] } ,
- {20,"ball-and-stick" ,3,0.0,&avnx[550] } ,
- {20,"space-fill" ,4,0.0,&avnx[551] } ,
- {20,"wire-worm" ,5,0.0,&avnx[552] } ,
- {20,"tube-worm" ,6,0.0,&avnx[553] } ,
- {20,"with-arrows" ,7,0.0,&avnx[554] } ,
+ {20,"wire" ,1,0.0,&avnx[584] } ,
+ {20,"tubes" ,2,0.0,&avnx[585] } ,
+ {20,"ball-and-stick" ,3,0.0,&avnx[586] } ,
+ {20,"space-fill" ,4,0.0,&avnx[587] } ,
+ {20,"wire-worm" ,5,0.0,&avnx[588] } ,
+ {20,"tube-worm" ,6,0.0,&avnx[589] } ,
+ {20,"with-arrows" ,7,0.0,&avnx[590] } ,
{20,"without-arrows" ,8,0.0,NULL } ,
- {20,"element" ,1,0.0,&avnx[556] } ,
- {20,"object" ,2,0.0,&avnx[557] } ,
- {20,"molecule" ,3,0.0,&avnx[558] } ,
- {20,"domain" ,4,0.0,&avnx[559] } ,
- {20,"residue" ,20,0.0,&avnx[560] } ,
- {20,"secondary-structure" ,5,0.0,&avnx[561] } ,
- {20,"user-select" ,6,0.0,&avnx[562] } ,
- {20,"aligned" ,7,0.0,&avnx[563] } ,
- {20,"identity" ,8,0.0,&avnx[564] } ,
- {20,"variety" ,9,0.0,&avnx[565] } ,
- {20,"weighted-variety" ,10,0.0,&avnx[566] } ,
- {20,"information-content" ,11,0.0,&avnx[567] } ,
- {20,"fit" ,12,0.0,&avnx[568] } ,
- {20,"block-fit" ,17,0.0,&avnx[569] } ,
- {20,"block-z-fit" ,18,0.0,&avnx[570] } ,
- {20,"block-row-fit" ,19,0.0,&avnx[571] } ,
- {20,"temperature" ,13,0.0,&avnx[572] } ,
- {20,"hydrophobicity" ,14,0.0,&avnx[573] } ,
- {20,"charge" ,15,0.0,&avnx[574] } ,
+ {20,"element" ,1,0.0,&avnx[592] } ,
+ {20,"object" ,2,0.0,&avnx[593] } ,
+ {20,"molecule" ,3,0.0,&avnx[594] } ,
+ {20,"domain" ,4,0.0,&avnx[595] } ,
+ {20,"residue" ,20,0.0,&avnx[596] } ,
+ {20,"secondary-structure" ,5,0.0,&avnx[597] } ,
+ {20,"user-select" ,6,0.0,&avnx[598] } ,
+ {20,"aligned" ,7,0.0,&avnx[599] } ,
+ {20,"identity" ,8,0.0,&avnx[600] } ,
+ {20,"variety" ,9,0.0,&avnx[601] } ,
+ {20,"weighted-variety" ,10,0.0,&avnx[602] } ,
+ {20,"information-content" ,11,0.0,&avnx[603] } ,
+ {20,"fit" ,12,0.0,&avnx[604] } ,
+ {20,"block-fit" ,17,0.0,&avnx[605] } ,
+ {20,"block-z-fit" ,18,0.0,&avnx[606] } ,
+ {20,"block-row-fit" ,19,0.0,&avnx[607] } ,
+ {20,"temperature" ,13,0.0,&avnx[608] } ,
+ {20,"hydrophobicity" ,14,0.0,&avnx[609] } ,
+ {20,"charge" ,15,0.0,&avnx[610] } ,
{20,"rainbow" ,16,0.0,NULL } ,
{3,NULL,255,0.0,NULL } ,
{3,NULL,255,0.0,NULL } ,
- {20,"one-letter" ,1,0.0,&avnx[578] } ,
+ {20,"one-letter" ,1,0.0,&avnx[614] } ,
{20,"three-letter" ,2,0.0,NULL } ,
- {20,"none" ,0,0.0,&avnx[580] } ,
- {20,"sequential" ,1,0.0,&avnx[581] } ,
+ {20,"none" ,0,0.0,&avnx[616] } ,
+ {20,"sequential" ,1,0.0,&avnx[617] } ,
{20,"pdb" ,2,0.0,NULL } ,
- {20,"aa" ,1,0.0,&avnx[583] } ,
- {20,"na" ,2,0.0,&avnx[584] } ,
+ {20,"aa" ,1,0.0,&avnx[619] } ,
+ {20,"na" ,2,0.0,&avnx[620] } ,
{20,"both" ,3,0.0,NULL } ,
- {20,"docsum" ,1,0.0,&avnx[586] } ,
- {20,"genbank" ,2,0.0,&avnx[587] } ,
- {20,"genpept" ,3,0.0,&avnx[588] } ,
- {20,"fasta" ,4,0.0,&avnx[589] } ,
- {20,"asn1" ,5,0.0,&avnx[590] } ,
- {20,"graphic" ,6,0.0,&avnx[591] } ,
- {20,"alignment" ,7,0.0,&avnx[592] } ,
- {20,"globalview" ,8,0.0,&avnx[593] } ,
- {20,"report" ,9,0.0,&avnx[594] } ,
- {20,"medlars" ,10,0.0,&avnx[595] } ,
- {20,"embl" ,11,0.0,&avnx[596] } ,
- {20,"pdb" ,12,0.0,&avnx[597] } ,
+ {20,"docsum" ,1,0.0,&avnx[622] } ,
+ {20,"genbank" ,2,0.0,&avnx[623] } ,
+ {20,"genpept" ,3,0.0,&avnx[624] } ,
+ {20,"fasta" ,4,0.0,&avnx[625] } ,
+ {20,"asn1" ,5,0.0,&avnx[626] } ,
+ {20,"graphic" ,6,0.0,&avnx[627] } ,
+ {20,"alignment" ,7,0.0,&avnx[628] } ,
+ {20,"globalview" ,8,0.0,&avnx[629] } ,
+ {20,"report" ,9,0.0,&avnx[630] } ,
+ {20,"medlars" ,10,0.0,&avnx[631] } ,
+ {20,"embl" ,11,0.0,&avnx[632] } ,
+ {20,"pdb" ,12,0.0,&avnx[633] } ,
{20,"kinemage" ,13,0.0,NULL } ,
- {20,"ncbi-backbone" ,2,0.0,&avnx[599] } ,
- {20,"ncbi-all-atom" ,3,0.0,&avnx[600] } ,
+ {20,"ncbi-backbone" ,2,0.0,&avnx[635] } ,
+ {20,"ncbi-all-atom" ,3,0.0,&avnx[636] } ,
{20,"pdb-model" ,4,0.0,NULL } ,
- {20,"nucleotide" ,1,0.0,&avnx[602] } ,
+ {20,"nucleotide" ,1,0.0,&avnx[638] } ,
{20,"protein" ,2,0.0,NULL } ,
{2,NULL,1,0.0,NULL } ,
{2,NULL,0,0.0,NULL } ,
{3,NULL,1,0.0,NULL } ,
- {20,"unassigned" ,0,0.0,&avnx[607] } ,
- {20,"threshold" ,1,0.0,&avnx[608] } ,
- {20,"minscore" ,2,0.0,&avnx[609] } ,
- {20,"maxscore" ,3,0.0,&avnx[610] } ,
- {20,"meanscore" ,4,0.0,&avnx[611] } ,
- {20,"variance" ,5,0.0,&avnx[612] } ,
- {20,"name" ,10,0.0,&avnx[613] } ,
- {20,"is-optional" ,20,0.0,&avnx[614] } ,
+ {20,"unassigned" ,0,0.0,&avnx[643] } ,
+ {20,"threshold" ,1,0.0,&avnx[644] } ,
+ {20,"minscore" ,2,0.0,&avnx[645] } ,
+ {20,"maxscore" ,3,0.0,&avnx[646] } ,
+ {20,"meanscore" ,4,0.0,&avnx[647] } ,
+ {20,"variance" ,5,0.0,&avnx[648] } ,
+ {20,"name" ,10,0.0,&avnx[649] } ,
+ {20,"is-optional" ,20,0.0,&avnx[650] } ,
{20,"other" ,255,0.0,NULL } ,
{3,NULL,0,0.0,NULL } ,
- {3,NULL,100000,0.0,NULL } };
-
-static AsnType atx[1758] = {
+ {3,NULL,100000,0.0,NULL } ,
+ {20,"acronym" ,1,0.0,&avnx[654] } ,
+ {20,"anamorph" ,2,0.0,&avnx[655] } ,
+ {20,"authority" ,3,0.0,&avnx[656] } ,
+ {20,"bio-material" ,4,0.0,&avnx[657] } ,
+ {20,"biotype" ,5,0.0,&avnx[658] } ,
+ {20,"biovar" ,6,0.0,&avnx[659] } ,
+ {20,"breed" ,7,0.0,&avnx[660] } ,
+ {20,"cell-line" ,8,0.0,&avnx[661] } ,
+ {20,"cell-type" ,9,0.0,&avnx[662] } ,
+ {20,"chemovar" ,10,0.0,&avnx[663] } ,
+ {20,"chromosome" ,11,0.0,&avnx[664] } ,
+ {20,"clone" ,12,0.0,&avnx[665] } ,
+ {20,"clone-lib" ,13,0.0,&avnx[666] } ,
+ {20,"collected-by" ,14,0.0,&avnx[667] } ,
+ {20,"collection-date" ,15,0.0,&avnx[668] } ,
+ {20,"common" ,16,0.0,&avnx[669] } ,
+ {20,"common-name" ,17,0.0,&avnx[670] } ,
+ {20,"country" ,18,0.0,&avnx[671] } ,
+ {20,"cultivar" ,19,0.0,&avnx[672] } ,
+ {20,"culture-collection" ,20,0.0,&avnx[673] } ,
+ {20,"dev-stage" ,21,0.0,&avnx[674] } ,
+ {20,"division" ,22,0.0,&avnx[675] } ,
+ {20,"dosage" ,23,0.0,&avnx[676] } ,
+ {20,"ecotype" ,24,0.0,&avnx[677] } ,
+ {20,"endogenous-virus-name" ,25,0.0,&avnx[678] } ,
+ {20,"environmental-sample" ,26,0.0,&avnx[679] } ,
+ {20,"forma" ,27,0.0,&avnx[680] } ,
+ {20,"forma-specialis" ,28,0.0,&avnx[681] } ,
+ {20,"frequency" ,29,0.0,&avnx[682] } ,
+ {20,"fwd-primer-name" ,30,0.0,&avnx[683] } ,
+ {20,"fwd-primer-seq" ,31,0.0,&avnx[684] } ,
+ {20,"gb-acronym" ,32,0.0,&avnx[685] } ,
+ {20,"gb-anamorph" ,33,0.0,&avnx[686] } ,
+ {20,"gb-synonym" ,34,0.0,&avnx[687] } ,
+ {20,"genotype" ,35,0.0,&avnx[688] } ,
+ {20,"germline" ,36,0.0,&avnx[689] } ,
+ {20,"group" ,37,0.0,&avnx[690] } ,
+ {20,"haplotype" ,38,0.0,&avnx[691] } ,
+ {20,"identified-by" ,39,0.0,&avnx[692] } ,
+ {20,"insertion-seq-name" ,40,0.0,&avnx[693] } ,
+ {20,"isolate" ,41,0.0,&avnx[694] } ,
+ {20,"isolation-source" ,42,0.0,&avnx[695] } ,
+ {20,"lab-host" ,43,0.0,&avnx[696] } ,
+ {20,"lat-lon" ,44,0.0,&avnx[697] } ,
+ {20,"lineage" ,45,0.0,&avnx[698] } ,
+ {20,"map" ,46,0.0,&avnx[699] } ,
+ {20,"metagenome-source" ,47,0.0,&avnx[700] } ,
+ {20,"metagenomic" ,48,0.0,&avnx[701] } ,
+ {20,"old-lineage" ,49,0.0,&avnx[702] } ,
+ {20,"old-name" ,50,0.0,&avnx[703] } ,
+ {20,"orgmod-note" ,51,0.0,&avnx[704] } ,
+ {20,"nat-host" ,52,0.0,&avnx[705] } ,
+ {20,"pathovar" ,53,0.0,&avnx[706] } ,
+ {20,"plasmid-name" ,54,0.0,&avnx[707] } ,
+ {20,"plastid-name" ,55,0.0,&avnx[708] } ,
+ {20,"pop-variant" ,56,0.0,&avnx[709] } ,
+ {20,"rearranged" ,57,0.0,&avnx[710] } ,
+ {20,"rev-primer-name" ,58,0.0,&avnx[711] } ,
+ {20,"rev-primer-seq" ,59,0.0,&avnx[712] } ,
+ {20,"segment" ,60,0.0,&avnx[713] } ,
+ {20,"serogroup" ,61,0.0,&avnx[714] } ,
+ {20,"serotype" ,62,0.0,&avnx[715] } ,
+ {20,"serovar" ,63,0.0,&avnx[716] } ,
+ {20,"sex" ,64,0.0,&avnx[717] } ,
+ {20,"specimen-voucher" ,65,0.0,&avnx[718] } ,
+ {20,"strain" ,66,0.0,&avnx[719] } ,
+ {20,"subclone" ,67,0.0,&avnx[720] } ,
+ {20,"subgroup" ,68,0.0,&avnx[721] } ,
+ {20,"subsource-note" ,69,0.0,&avnx[722] } ,
+ {20,"sub-species" ,70,0.0,&avnx[723] } ,
+ {20,"substrain" ,71,0.0,&avnx[724] } ,
+ {20,"subtype" ,72,0.0,&avnx[725] } ,
+ {20,"synonym" ,73,0.0,&avnx[726] } ,
+ {20,"taxname" ,74,0.0,&avnx[727] } ,
+ {20,"teleomorph" ,75,0.0,&avnx[728] } ,
+ {20,"tissue-lib" ,76,0.0,&avnx[729] } ,
+ {20,"tissue-type" ,77,0.0,&avnx[730] } ,
+ {20,"transgenic" ,78,0.0,&avnx[731] } ,
+ {20,"transposon-name" ,79,0.0,&avnx[732] } ,
+ {20,"type" ,80,0.0,&avnx[733] } ,
+ {20,"variety" ,81,0.0,NULL } ,
+ {20,"unknown" ,0,0.0,&avnx[735] } ,
+ {20,"genomic" ,1,0.0,&avnx[736] } ,
+ {20,"chloroplast" ,2,0.0,&avnx[737] } ,
+ {20,"chromoplast" ,3,0.0,&avnx[738] } ,
+ {20,"kinetoplast" ,4,0.0,&avnx[739] } ,
+ {20,"mitochondrion" ,5,0.0,&avnx[740] } ,
+ {20,"plastid" ,6,0.0,&avnx[741] } ,
+ {20,"macronuclear" ,7,0.0,&avnx[742] } ,
+ {20,"extrachrom" ,8,0.0,&avnx[743] } ,
+ {20,"plasmid" ,9,0.0,&avnx[744] } ,
+ {20,"transposon" ,10,0.0,&avnx[745] } ,
+ {20,"insertion-seq" ,11,0.0,&avnx[746] } ,
+ {20,"cyanelle" ,12,0.0,&avnx[747] } ,
+ {20,"proviral" ,13,0.0,&avnx[748] } ,
+ {20,"virion" ,14,0.0,&avnx[749] } ,
+ {20,"nucleomorph" ,15,0.0,&avnx[750] } ,
+ {20,"apicoplast" ,16,0.0,&avnx[751] } ,
+ {20,"leucoplast" ,17,0.0,&avnx[752] } ,
+ {20,"proplastid" ,18,0.0,&avnx[753] } ,
+ {20,"endogenous-virus" ,19,0.0,&avnx[754] } ,
+ {20,"hydrogenosome" ,20,0.0,&avnx[755] } ,
+ {20,"chromosome" ,21,0.0,&avnx[756] } ,
+ {20,"chromatophore" ,22,0.0,NULL } ,
+ {20,"unknown" ,0,0.0,&avnx[758] } ,
+ {20,"natural" ,1,0.0,&avnx[759] } ,
+ {20,"natmut" ,2,0.0,&avnx[760] } ,
+ {20,"mut" ,3,0.0,&avnx[761] } ,
+ {20,"artificial" ,4,0.0,&avnx[762] } ,
+ {20,"synthetic" ,5,0.0,&avnx[763] } ,
+ {20,"other" ,255,0.0,NULL } ,
+ {20,"any" ,0,0.0,&avnx[765] } ,
+ {20,"gene" ,1,0.0,&avnx[766] } ,
+ {20,"org" ,2,0.0,&avnx[767] } ,
+ {20,"cds" ,3,0.0,&avnx[768] } ,
+ {20,"prot" ,4,0.0,&avnx[769] } ,
+ {20,"preRNA" ,5,0.0,&avnx[770] } ,
+ {20,"mRNA" ,6,0.0,&avnx[771] } ,
+ {20,"tRNA" ,7,0.0,&avnx[772] } ,
+ {20,"rRNA" ,8,0.0,&avnx[773] } ,
+ {20,"snRNA" ,9,0.0,&avnx[774] } ,
+ {20,"scRNA" ,10,0.0,&avnx[775] } ,
+ {20,"otherRNA" ,11,0.0,&avnx[776] } ,
+ {20,"pub" ,12,0.0,&avnx[777] } ,
+ {20,"seq" ,13,0.0,&avnx[778] } ,
+ {20,"imp" ,14,0.0,&avnx[779] } ,
+ {20,"allele" ,15,0.0,&avnx[780] } ,
+ {20,"attenuator" ,16,0.0,&avnx[781] } ,
+ {20,"c-region" ,17,0.0,&avnx[782] } ,
+ {20,"caat-signal" ,18,0.0,&avnx[783] } ,
+ {20,"imp-CDS" ,19,0.0,&avnx[784] } ,
+ {20,"conflict" ,20,0.0,&avnx[785] } ,
+ {20,"d-loop" ,21,0.0,&avnx[786] } ,
+ {20,"d-segment" ,22,0.0,&avnx[787] } ,
+ {20,"enhancer" ,23,0.0,&avnx[788] } ,
+ {20,"exon" ,24,0.0,&avnx[789] } ,
+ {20,"gC-signal" ,25,0.0,&avnx[790] } ,
+ {20,"iDNA" ,26,0.0,&avnx[791] } ,
+ {20,"intron" ,27,0.0,&avnx[792] } ,
+ {20,"j-segment" ,28,0.0,&avnx[793] } ,
+ {20,"ltr" ,29,0.0,&avnx[794] } ,
+ {20,"mat-peptide" ,30,0.0,&avnx[795] } ,
+ {20,"misc-binding" ,31,0.0,&avnx[796] } ,
+ {20,"misc-difference" ,32,0.0,&avnx[797] } ,
+ {20,"misc-feature" ,33,0.0,&avnx[798] } ,
+ {20,"misc-recomb" ,34,0.0,&avnx[799] } ,
+ {20,"misc-RNA" ,35,0.0,&avnx[800] } ,
+ {20,"misc-signal" ,36,0.0,&avnx[801] } ,
+ {20,"misc-structure" ,37,0.0,&avnx[802] } ,
+ {20,"modified-base" ,38,0.0,&avnx[803] } ,
+ {20,"mutation" ,39,0.0,&avnx[804] } ,
+ {20,"n-region" ,40,0.0,&avnx[805] } ,
+ {20,"old-sequence" ,41,0.0,&avnx[806] } ,
+ {20,"polyA-signal" ,42,0.0,&avnx[807] } ,
+ {20,"polyA-site" ,43,0.0,&avnx[808] } ,
+ {20,"precursor-RNA" ,44,0.0,&avnx[809] } ,
+ {20,"prim-transcript" ,45,0.0,&avnx[810] } ,
+ {20,"primer-bind" ,46,0.0,&avnx[811] } ,
+ {20,"promoter" ,47,0.0,&avnx[812] } ,
+ {20,"protein-bind" ,48,0.0,&avnx[813] } ,
+ {20,"rbs" ,49,0.0,&avnx[814] } ,
+ {20,"repeat-region" ,50,0.0,&avnx[815] } ,
+ {20,"repeat-unit" ,51,0.0,&avnx[816] } ,
+ {20,"rep-origin" ,52,0.0,&avnx[817] } ,
+ {20,"s-region" ,53,0.0,&avnx[818] } ,
+ {20,"satellite" ,54,0.0,&avnx[819] } ,
+ {20,"sig-peptide" ,55,0.0,&avnx[820] } ,
+ {20,"source" ,56,0.0,&avnx[821] } ,
+ {20,"stem-loop" ,57,0.0,&avnx[822] } ,
+ {20,"sts" ,58,0.0,&avnx[823] } ,
+ {20,"tata-signal" ,59,0.0,&avnx[824] } ,
+ {20,"terminator" ,60,0.0,&avnx[825] } ,
+ {20,"transit-peptide" ,61,0.0,&avnx[826] } ,
+ {20,"unsure" ,62,0.0,&avnx[827] } ,
+ {20,"v-region" ,63,0.0,&avnx[828] } ,
+ {20,"v-segment" ,64,0.0,&avnx[829] } ,
+ {20,"variation" ,65,0.0,&avnx[830] } ,
+ {20,"virion" ,66,0.0,&avnx[831] } ,
+ {20,"n3clip" ,67,0.0,&avnx[832] } ,
+ {20,"n3UTR" ,68,0.0,&avnx[833] } ,
+ {20,"n5clip" ,69,0.0,&avnx[834] } ,
+ {20,"n5UTR" ,70,0.0,&avnx[835] } ,
+ {20,"n10-signal" ,71,0.0,&avnx[836] } ,
+ {20,"n35-signal" ,72,0.0,&avnx[837] } ,
+ {20,"site-ref" ,73,0.0,&avnx[838] } ,
+ {20,"region" ,74,0.0,&avnx[839] } ,
+ {20,"comment" ,75,0.0,&avnx[840] } ,
+ {20,"bond" ,76,0.0,&avnx[841] } ,
+ {20,"site" ,77,0.0,&avnx[842] } ,
+ {20,"rsite" ,78,0.0,&avnx[843] } ,
+ {20,"user" ,79,0.0,&avnx[844] } ,
+ {20,"txinit" ,80,0.0,&avnx[845] } ,
+ {20,"num" ,81,0.0,&avnx[846] } ,
+ {20,"psec-str" ,82,0.0,&avnx[847] } ,
+ {20,"non-std-residue" ,83,0.0,&avnx[848] } ,
+ {20,"het" ,84,0.0,&avnx[849] } ,
+ {20,"biosrc" ,85,0.0,&avnx[850] } ,
+ {20,"preprotein" ,86,0.0,&avnx[851] } ,
+ {20,"mat-peptide-aa" ,87,0.0,&avnx[852] } ,
+ {20,"sig-peptide-aa" ,88,0.0,&avnx[853] } ,
+ {20,"transit-peptide-aa" ,89,0.0,&avnx[854] } ,
+ {20,"snoRNA" ,90,0.0,&avnx[855] } ,
+ {20,"gap" ,91,0.0,&avnx[856] } ,
+ {20,"operon" ,92,0.0,&avnx[857] } ,
+ {20,"oriT" ,93,0.0,&avnx[858] } ,
+ {20,"ncRNA" ,94,0.0,&avnx[859] } ,
+ {20,"tmRNA" ,95,0.0,NULL } ,
+ {20,"allele" ,1,0.0,&avnx[861] } ,
+ {20,"activity" ,2,0.0,&avnx[862] } ,
+ {20,"anticodon" ,3,0.0,&avnx[863] } ,
+ {20,"bound-moiety" ,4,0.0,&avnx[864] } ,
+ {20,"chromosome" ,5,0.0,&avnx[865] } ,
+ {20,"citation" ,6,0.0,&avnx[866] } ,
+ {20,"codon" ,7,0.0,&avnx[867] } ,
+ {20,"codon-start" ,8,0.0,&avnx[868] } ,
+ {20,"codons-recognized" ,9,0.0,&avnx[869] } ,
+ {20,"compare" ,10,0.0,&avnx[870] } ,
+ {20,"cons-splice" ,11,0.0,&avnx[871] } ,
+ {20,"db-xref" ,12,0.0,&avnx[872] } ,
+ {20,"description" ,13,0.0,&avnx[873] } ,
+ {20,"direction" ,14,0.0,&avnx[874] } ,
+ {20,"ec-number" ,15,0.0,&avnx[875] } ,
+ {20,"environmental-sample" ,16,0.0,&avnx[876] } ,
+ {20,"evidence" ,17,0.0,&avnx[877] } ,
+ {20,"exception" ,18,0.0,&avnx[878] } ,
+ {20,"experiment" ,19,0.0,&avnx[879] } ,
+ {20,"focus" ,20,0.0,&avnx[880] } ,
+ {20,"frequency" ,21,0.0,&avnx[881] } ,
+ {20,"function" ,22,0.0,&avnx[882] } ,
+ {20,"gene" ,23,0.0,&avnx[883] } ,
+ {20,"gene-description" ,24,0.0,&avnx[884] } ,
+ {20,"inference" ,25,0.0,&avnx[885] } ,
+ {20,"label" ,26,0.0,&avnx[886] } ,
+ {20,"locus-tag" ,27,0.0,&avnx[887] } ,
+ {20,"map" ,28,0.0,&avnx[888] } ,
+ {20,"mobile-element" ,29,0.0,&avnx[889] } ,
+ {20,"mod-base" ,30,0.0,&avnx[890] } ,
+ {20,"mol-type" ,31,0.0,&avnx[891] } ,
+ {20,"ncRNA-class" ,32,0.0,&avnx[892] } ,
+ {20,"note" ,33,0.0,&avnx[893] } ,
+ {20,"number" ,34,0.0,&avnx[894] } ,
+ {20,"old-locus-tag" ,35,0.0,&avnx[895] } ,
+ {20,"operon" ,36,0.0,&avnx[896] } ,
+ {20,"organism" ,37,0.0,&avnx[897] } ,
+ {20,"organelle" ,38,0.0,&avnx[898] } ,
+ {20,"partial" ,39,0.0,&avnx[899] } ,
+ {20,"phenotype" ,40,0.0,&avnx[900] } ,
+ {20,"plasmid" ,41,0.0,&avnx[901] } ,
+ {20,"product" ,42,0.0,&avnx[902] } ,
+ {20,"protein-id" ,43,0.0,&avnx[903] } ,
+ {20,"pseudo" ,44,0.0,&avnx[904] } ,
+ {20,"rearranged" ,45,0.0,&avnx[905] } ,
+ {20,"replace" ,46,0.0,&avnx[906] } ,
+ {20,"rpt-family" ,47,0.0,&avnx[907] } ,
+ {20,"rpt-type" ,48,0.0,&avnx[908] } ,
+ {20,"rpt-unit" ,49,0.0,&avnx[909] } ,
+ {20,"rpt-unit-seq" ,50,0.0,&avnx[910] } ,
+ {20,"rpt-unit-range" ,51,0.0,&avnx[911] } ,
+ {20,"segment" ,52,0.0,&avnx[912] } ,
+ {20,"sequenced-mol" ,53,0.0,&avnx[913] } ,
+ {20,"standard-name" ,54,0.0,&avnx[914] } ,
+ {20,"synonym" ,55,0.0,&avnx[915] } ,
+ {20,"transcript-id" ,56,0.0,&avnx[916] } ,
+ {20,"transgenic" ,57,0.0,&avnx[917] } ,
+ {20,"translation" ,58,0.0,&avnx[918] } ,
+ {20,"transl-except" ,59,0.0,&avnx[919] } ,
+ {20,"transl-table" ,60,0.0,&avnx[920] } ,
+ {20,"usedin" ,61,0.0,NULL } ,
+ {3,NULL,1,0.0,NULL } ,
+ {20,"contains" ,1,0.0,&avnx[923] } ,
+ {20,"equals" ,2,0.0,&avnx[924] } ,
+ {20,"starts" ,3,0.0,&avnx[925] } ,
+ {20,"ends" ,4,0.0,&avnx[926] } ,
+ {20,"inlist" ,5,0.0,NULL } ,
+ {2,NULL,0,0.0,NULL } ,
+ {2,NULL,0,0.0,NULL } ,
+ {2,NULL,0,0.0,NULL } ,
+ {20,"cds-comment" ,1,0.0,&avnx[931] } ,
+ {20,"gene-locus" ,2,0.0,&avnx[932] } ,
+ {20,"gene-description" ,3,0.0,&avnx[933] } ,
+ {20,"gene-comment" ,4,0.0,&avnx[934] } ,
+ {20,"gene-allele" ,5,0.0,&avnx[935] } ,
+ {20,"gene-maploc" ,6,0.0,&avnx[936] } ,
+ {20,"gene-locus-tag" ,7,0.0,&avnx[937] } ,
+ {20,"gene-synonym" ,8,0.0,&avnx[938] } ,
+ {20,"gene-old-locus-tag" ,9,0.0,&avnx[939] } ,
+ {20,"mrna-product" ,10,0.0,&avnx[940] } ,
+ {20,"mrna-comment" ,11,0.0,&avnx[941] } ,
+ {20,"prot-name" ,12,0.0,&avnx[942] } ,
+ {20,"prot-description" ,13,0.0,&avnx[943] } ,
+ {20,"prot-ec-number" ,14,0.0,&avnx[944] } ,
+ {20,"prot-activity" ,15,0.0,&avnx[945] } ,
+ {20,"prot-comment" ,16,0.0,&avnx[946] } ,
+ {20,"mat-peptide-name" ,17,0.0,&avnx[947] } ,
+ {20,"mat-peptide-description" ,18,0.0,&avnx[948] } ,
+ {20,"mat-peptide-ec-number" ,19,0.0,&avnx[949] } ,
+ {20,"mat-peptide-activity" ,20,0.0,&avnx[950] } ,
+ {20,"mat-peptide-comment" ,21,0.0,NULL } ,
+ {20,"unknown" ,0,0.0,&avnx[952] } ,
+ {20,"genomic" ,1,0.0,&avnx[953] } ,
+ {20,"precursor-RNA" ,2,0.0,&avnx[954] } ,
+ {20,"mRNA" ,3,0.0,&avnx[955] } ,
+ {20,"rRNA" ,4,0.0,&avnx[956] } ,
+ {20,"tRNA" ,5,0.0,&avnx[957] } ,
+ {20,"snRNA" ,6,0.0,&avnx[958] } ,
+ {20,"scRNA" ,7,0.0,&avnx[959] } ,
+ {20,"genomic-mRNA" ,8,0.0,&avnx[960] } ,
+ {20,"cRNA" ,9,0.0,&avnx[961] } ,
+ {20,"snoRNA" ,10,0.0,&avnx[962] } ,
+ {20,"transcribed-RNA" ,11,0.0,&avnx[963] } ,
+ {20,"ncRNA" ,12,0.0,&avnx[964] } ,
+ {20,"transfer-messenger-RNA" ,13,0.0,&avnx[965] } ,
+ {20,"other" ,14,0.0,NULL } ,
+ {20,"unknown" ,0,0.0,&avnx[967] } ,
+ {20,"standard" ,1,0.0,&avnx[968] } ,
+ {20,"est" ,2,0.0,&avnx[969] } ,
+ {20,"sts" ,3,0.0,&avnx[970] } ,
+ {20,"survey" ,4,0.0,&avnx[971] } ,
+ {20,"genetic-map" ,5,0.0,&avnx[972] } ,
+ {20,"physical-map" ,6,0.0,&avnx[973] } ,
+ {20,"derived" ,7,0.0,&avnx[974] } ,
+ {20,"concept-trans" ,8,0.0,&avnx[975] } ,
+ {20,"seq-pept" ,9,0.0,&avnx[976] } ,
+ {20,"both" ,10,0.0,&avnx[977] } ,
+ {20,"seq-pept-overlap" ,11,0.0,&avnx[978] } ,
+ {20,"seq-pept-homol" ,12,0.0,&avnx[979] } ,
+ {20,"concept-trans-a" ,13,0.0,&avnx[980] } ,
+ {20,"htgs-1" ,14,0.0,&avnx[981] } ,
+ {20,"htgs-2" ,15,0.0,&avnx[982] } ,
+ {20,"htgs-3" ,16,0.0,&avnx[983] } ,
+ {20,"fli-cDNA" ,17,0.0,&avnx[984] } ,
+ {20,"htgs-0" ,18,0.0,&avnx[985] } ,
+ {20,"htc" ,19,0.0,&avnx[986] } ,
+ {20,"wgs" ,20,0.0,&avnx[987] } ,
+ {20,"barcode" ,21,0.0,&avnx[988] } ,
+ {20,"composite-wgs-htgs" ,22,0.0,&avnx[989] } ,
+ {20,"tsa" ,23,0.0,&avnx[990] } ,
+ {20,"other" ,24,0.0,NULL } ,
+ {20,"unknown" ,0,0.0,&avnx[992] } ,
+ {20,"complete" ,1,0.0,&avnx[993] } ,
+ {20,"partial" ,2,0.0,&avnx[994] } ,
+ {20,"no-left" ,3,0.0,&avnx[995] } ,
+ {20,"no-right" ,4,0.0,&avnx[996] } ,
+ {20,"no-ends" ,5,0.0,&avnx[997] } ,
+ {20,"has-left" ,6,0.0,&avnx[998] } ,
+ {20,"has-right" ,7,0.0,&avnx[999] } ,
+ {20,"other" ,6,0.0,NULL } ,
+ {20,"unknown" ,0,0.0,&avnx[1001] } ,
+ {20,"dna" ,1,0.0,&avnx[1002] } ,
+ {20,"rna" ,2,0.0,&avnx[1003] } ,
+ {20,"protein" ,3,0.0,&avnx[1004] } ,
+ {20,"nucleotide" ,4,0.0,&avnx[1005] } ,
+ {20,"other" ,5,0.0,NULL } ,
+ {20,"unknown" ,0,0.0,&avnx[1007] } ,
+ {20,"linear" ,1,0.0,&avnx[1008] } ,
+ {20,"circular" ,2,0.0,&avnx[1009] } ,
+ {20,"tandem" ,3,0.0,&avnx[1010] } ,
+ {20,"other" ,4,0.0,NULL } ,
+ {20,"unknown" ,0,0.0,&avnx[1012] } ,
+ {20,"single" ,1,0.0,&avnx[1013] } ,
+ {20,"double" ,2,0.0,&avnx[1014] } ,
+ {20,"mixed" ,3,0.0,&avnx[1015] } ,
+ {20,"mixed-rev" ,4,0.0,&avnx[1016] } ,
+ {20,"other" ,5,0.0,NULL } ,
+ {20,"replace-old" ,1,0.0,&avnx[1018] } ,
+ {20,"append-semi" ,2,0.0,&avnx[1019] } ,
+ {20,"append-space" ,3,0.0,&avnx[1020] } ,
+ {20,"append-colon" ,4,0.0,&avnx[1021] } ,
+ {20,"append-none" ,5,0.0,&avnx[1022] } ,
+ {20,"prefix-semi" ,6,0.0,&avnx[1023] } ,
+ {20,"prefix-space" ,7,0.0,&avnx[1024] } ,
+ {20,"prefix-colon" ,8,0.0,&avnx[1025] } ,
+ {20,"prefix-none" ,9,0.0,&avnx[1026] } ,
+ {20,"leave-old" ,10,0.0,NULL } ,
+ {3,NULL,0,0.0,NULL } ,
+ {20,"anywhere" ,0,0.0,&avnx[1029] } ,
+ {20,"beginning" ,1,0.0,&avnx[1030] } ,
+ {20,"end" ,2,0.0,NULL } ,
+ {2,NULL,0,0.0,NULL } ,
+ {2,NULL,0,0.0,NULL } ,
+ {2,NULL,0,0.0,NULL } ,
+ {3,NULL,0,0.0,NULL } ,
+ {20,"any" ,0,0.0,&avnx[1036] } ,
+ {20,"plus" ,1,0.0,&avnx[1037] } ,
+ {20,"minus" ,2,0.0,NULL } ,
+ {3,NULL,0,0.0,NULL } ,
+ {20,"any" ,0,0.0,&avnx[1040] } ,
+ {20,"nuc" ,1,0.0,&avnx[1041] } ,
+ {20,"prot" ,2,0.0,NULL } ,
+ {20,"any" ,0,0.0,&avnx[1043] } ,
+ {20,"feature" ,1,0.0,&avnx[1044] } ,
+ {20,"descriptor" ,2,0.0,NULL } ,
+ {20,"gene" ,1,0.0,&avnx[1046] } ,
+ {20,"mRNA" ,2,0.0,&avnx[1047] } ,
+ {20,"cds" ,3,0.0,&avnx[1048] } ,
+ {20,"prot" ,4,0.0,&avnx[1049] } ,
+ {20,"exon" ,5,0.0,&avnx[1050] } ,
+ {20,"mat-peptide" ,6,0.0,NULL } ,
+ {2,NULL,1,0.0,NULL } ,
+ {20,"any" ,0,0.0,&avnx[1053] } ,
+ {20,"genomic" ,1,0.0,&avnx[1054] } ,
+ {20,"precursor-RNA" ,2,0.0,&avnx[1055] } ,
+ {20,"mRNA" ,3,0.0,&avnx[1056] } ,
+ {20,"rRNA" ,4,0.0,&avnx[1057] } ,
+ {20,"tRNA" ,5,0.0,&avnx[1058] } ,
+ {20,"snRNA" ,6,0.0,&avnx[1059] } ,
+ {20,"scRNA" ,7,0.0,&avnx[1060] } ,
+ {20,"genomic-mRNA" ,8,0.0,&avnx[1061] } ,
+ {20,"cRNA" ,9,0.0,&avnx[1062] } ,
+ {20,"snoRNA" ,10,0.0,&avnx[1063] } ,
+ {20,"transcribed-RNA" ,11,0.0,&avnx[1064] } ,
+ {20,"ncRNA" ,12,0.0,&avnx[1065] } ,
+ {20,"transfer-messenger-RNA" ,13,0.0,NULL } ,
+ {3,NULL,0,0.0,NULL } ,
+ {3,NULL,0,0.0,NULL } ,
+ {3,NULL,0,0.0,NULL } ,
+ {20,"none" ,0,0.0,&avnx[1070] } ,
+ {20,"tolower" ,1,0.0,&avnx[1071] } ,
+ {20,"toupper" ,2,0.0,&avnx[1072] } ,
+ {20,"firstcap" ,3,0.0,NULL } ,
+ {2,NULL,0,0.0,NULL } ,
+ {2,NULL,0,0.0,NULL } ,
+ {2,NULL,0,0.0,NULL } ,
+ {2,NULL,1,0.0,NULL } ,
+ {2,NULL,1,0.0,NULL } ,
+ {2,NULL,0,0.0,NULL } ,
+ {2,NULL,0,0.0,NULL } ,
+ {3,NULL,-1,0.0,NULL } ,
+ {20,"any" ,0,0.0,&avnx[1082] } ,
+ {20,"plus" ,1,0.0,&avnx[1083] } ,
+ {20,"minus" ,2,0.0,&avnx[1084] } ,
+ {20,"unknown" ,3,0.0,&avnx[1085] } ,
+ {20,"both" ,4,0.0,NULL } ,
+ {20,"plus" ,1,0.0,&avnx[1087] } ,
+ {20,"minus" ,2,0.0,&avnx[1088] } ,
+ {20,"unknown" ,3,0.0,&avnx[1089] } ,
+ {20,"both" ,4,0.0,&avnx[1090] } ,
+ {20,"reverse" ,5,0.0,NULL } ,
+ {20,"all" ,0,0.0,&avnx[1092] } ,
+ {20,"at-end" ,1,0.0,&avnx[1093] } ,
+ {20,"bad-start" ,2,0.0,&avnx[1094] } ,
+ {20,"frame-not-one" ,3,0.0,NULL } ,
+ {20,"all" ,0,0.0,&avnx[1096] } ,
+ {20,"not-at-end" ,1,0.0,&avnx[1097] } ,
+ {20,"good-start" ,2,0.0,NULL } ,
+ {20,"all" ,0,0.0,&avnx[1099] } ,
+ {20,"at-end" ,1,0.0,&avnx[1100] } ,
+ {20,"bad-end" ,2,0.0,NULL } ,
+ {20,"all" ,0,0.0,&avnx[1102] } ,
+ {20,"not-at-end" ,1,0.0,&avnx[1103] } ,
+ {20,"good-end" ,2,0.0,NULL } ,
+ {20,"join" ,1,0.0,&avnx[1105] } ,
+ {20,"order" ,2,0.0,&avnx[1106] } ,
+ {20,"merge" ,3,0.0,NULL } };
+
+static AsnType atx[2093] = {
{401, "Date" ,1,0,0,0,0,1,0,0,NULL,&atx[14],&atx[1],0,&atx[15]} ,
{0, "str" ,128,0,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[3]} ,
{323, "VisibleString" ,0,26,0,0,0,0,0,0,NULL,NULL,NULL,0,NULL} ,
@@ -1058,20 +1548,20 @@ static AsnType atx[1758] = {
{0, "b" ,128,1,0,1,0,0,0,0,NULL,&atx[404],NULL,0,NULL} ,
{0, "feat" ,128,10,0,0,0,0,0,0,NULL,&atx[427],NULL,0,NULL} ,
{414, "Feat-id" ,1,0,0,0,0,0,1,0,NULL,&atx[428],NULL,0,&atx[355]} ,
- {402, "Feat-id" ,1,0,0,0,0,1,0,0,NULL,&atx[14],&atx[429],0,&atx[912]} ,
+ {402, "Feat-id" ,1,0,0,0,0,1,0,0,NULL,&atx[14],&atx[429],0,&atx[913]} ,
{0, "gibb" ,128,0,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[430]} ,
{0, "giim" ,128,1,0,0,0,0,0,0,NULL,&atx[431],NULL,0,&atx[432]} ,
- {410, "Giimport-id" ,1,0,0,0,0,0,1,0,NULL,&atx[350],NULL,0,&atx[965]} ,
+ {410, "Giimport-id" ,1,0,0,0,0,0,1,0,NULL,&atx[350],NULL,0,&atx[966]} ,
{0, "local" ,128,2,0,0,0,0,0,0,NULL,&atx[433],NULL,0,&atx[434]} ,
{417, "Object-id" ,1,0,0,0,0,0,1,0,NULL,&atx[20],NULL,0,&atx[435]} ,
{0, "general" ,128,3,0,0,0,0,0,0,NULL,&atx[435],NULL,0,NULL} ,
- {418, "Dbtag" ,1,0,0,0,0,0,1,0,NULL,&atx[17],NULL,0,&atx[983]} ,
+ {418, "Dbtag" ,1,0,0,0,0,0,1,0,NULL,&atx[17],NULL,0,&atx[984]} ,
{401, "Annotdesc" ,1,0,0,0,0,1,0,0,NULL,&atx[14],&atx[437],0,&atx[641]} ,
{0, "name" ,128,0,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[438]} ,
{0, "title" ,128,1,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[439]} ,
{0, "comment" ,128,2,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[440]} ,
{0, "pub" ,128,3,0,0,0,0,0,0,NULL,&atx[441],NULL,0,&atx[627]} ,
- {408, "Pubdesc" ,1,0,0,0,0,1,0,0,NULL,&atx[13],&atx[442],0,&atx[1074]} ,
+ {408, "Pubdesc" ,1,0,0,0,0,1,0,0,NULL,&atx[13],&atx[442],0,&atx[1075]} ,
{0, "pub" ,128,0,0,0,0,0,0,0,NULL,&atx[443],NULL,0,&atx[444]} ,
{426, "Pub-equiv" ,1,0,0,0,0,0,1,0,NULL,&atx[325],NULL,0,&atx[660]} ,
{0, "name" ,128,1,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[445]} ,
@@ -1079,20 +1569,20 @@ static AsnType atx[1758] = {
{0, "num" ,128,3,0,1,0,0,0,0,NULL,&atx[447],NULL,0,&atx[619]} ,
{407, "Numbering" ,1,0,0,0,0,1,0,0,NULL,&atx[14],&atx[448],0,&atx[441]} ,
{0, "cont" ,128,0,0,0,0,0,0,0,NULL,&atx[449],NULL,0,&atx[453]} ,
- {439, "Num-cont" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[450],0,&atx[454]} ,
+ {440, "Num-cont" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[450],0,&atx[454]} ,
{0, "refnum" ,128,0,0,0,1,0,0,0,&avnx[78],&atx[6],NULL,0,&atx[451]} ,
{0, "has-zero" ,128,1,0,0,1,0,0,0,&avnx[79],&atx[60],NULL,0,&atx[452]} ,
{0, "ascending" ,128,2,0,0,1,0,0,0,&avnx[80],&atx[60],NULL,0,NULL} ,
{0, "enum" ,128,1,0,0,0,0,0,0,NULL,&atx[454],NULL,0,&atx[458]} ,
- {440, "Num-enum" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[455],0,&atx[459]} ,
+ {441, "Num-enum" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[455],0,&atx[459]} ,
{0, "num" ,128,0,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[456]} ,
{0, "names" ,128,1,0,0,0,0,0,0,NULL,&atx[66],&atx[457],0,NULL} ,
{0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[2],NULL,0,NULL} ,
{0, "ref" ,128,2,0,0,0,0,0,0,NULL,&atx[459],NULL,0,&atx[614]} ,
- {441, "Num-ref" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[460],0,&atx[615]} ,
+ {442, "Num-ref" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[460],0,&atx[615]} ,
{0, "type" ,128,0,0,0,0,0,0,0,NULL,&atx[42],&avnx[81],0,&atx[461]} ,
{0, "aligns" ,128,1,0,1,0,0,0,0,NULL,&atx[462],NULL,0,NULL} ,
- {423, "Seq-align" ,1,0,0,0,0,0,1,0,NULL,&atx[463],NULL,0,&atx[883]} ,
+ {423, "Seq-align" ,1,0,0,0,0,0,1,0,NULL,&atx[463],NULL,0,&atx[884]} ,
{401, "Seq-align" ,1,0,0,0,0,1,0,0,NULL,&atx[13],&atx[464],0,&atx[468]} ,
{0, "type" ,128,0,0,0,0,0,0,0,NULL,&atx[42],&avnx[84],0,&atx[465]} ,
{0, "dim" ,128,1,0,1,0,0,0,0,NULL,&atx[6],NULL,0,&atx[466]} ,
@@ -1245,7 +1735,7 @@ static AsnType atx[1758] = {
{0, "ext" ,128,6,0,1,0,0,0,0,NULL,&atx[66],&atx[613],0,NULL} ,
{0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[575],NULL,0,NULL} ,
{0, "real" ,128,3,0,0,0,0,0,0,NULL,&atx[615],NULL,0,NULL} ,
- {442, "Num-real" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[616],0,&atx[876]} ,
+ {443, "Num-real" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[616],0,&atx[877]} ,
{0, "a" ,128,0,0,0,0,0,0,0,NULL,&atx[58],NULL,0,&atx[617]} ,
{0, "b" ,128,1,0,0,0,0,0,0,NULL,&atx[58],NULL,0,&atx[618]} ,
{0, "units" ,128,2,0,1,0,0,0,0,NULL,&atx[2],NULL,0,NULL} ,
@@ -1260,12 +1750,12 @@ static AsnType atx[1758] = {
{0, "user" ,128,4,0,0,0,0,0,0,NULL,&atx[628],NULL,0,&atx[629]} ,
{422, "User-object" ,1,0,0,0,0,0,1,0,NULL,&atx[46],NULL,0,&atx[462]} ,
{0, "create-date" ,128,5,0,0,0,0,0,0,NULL,&atx[630],NULL,0,&atx[631]} ,
- {418, "Date" ,1,0,0,0,0,0,1,0,NULL,&atx[0],NULL,0,&atx[844]} ,
+ {418, "Date" ,1,0,0,0,0,0,1,0,NULL,&atx[0],NULL,0,&atx[845]} ,
{0, "update-date" ,128,6,0,0,0,0,0,0,NULL,&atx[630],NULL,0,&atx[632]} ,
{0, "src" ,128,7,0,0,0,0,0,0,NULL,&atx[633],NULL,0,&atx[634]} ,
{429, "Seq-id" ,1,0,0,0,0,0,1,0,NULL,&atx[344],NULL,0,&atx[640]} ,
{0, "align" ,128,8,0,0,0,0,0,0,NULL,&atx[635],NULL,0,&atx[639]} ,
- {460, "Align-def" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[636],0,NULL} ,
+ {461, "Align-def" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[636],0,NULL} ,
{0, "align-type" ,128,0,0,0,0,0,0,0,NULL,&atx[6],&avnx[102],0,&atx[637]} ,
{0, "ids" ,128,1,0,1,0,0,0,0,NULL,&atx[45],&atx[638],0,NULL} ,
{0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[633],NULL,0,NULL} ,
@@ -1276,17 +1766,17 @@ static AsnType atx[1758] = {
{403, "Bioseq" ,1,0,0,0,0,1,0,0,NULL,&atx[13],&atx[644],0,&atx[651]} ,
{0, "id" ,128,0,0,0,0,0,0,0,NULL,&atx[45],&atx[645],0,&atx[646]} ,
{0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[633],NULL,0,NULL} ,
- {0, "descr" ,128,1,0,1,0,0,0,0,NULL,&atx[647],NULL,0,&atx[838]} ,
- {412, "Seq-descr" ,1,0,0,0,0,1,0,0,NULL,&atx[45],&atx[648],0,&atx[874]} ,
+ {0, "descr" ,128,1,0,1,0,0,0,0,NULL,&atx[647],NULL,0,&atx[839]} ,
+ {412, "Seq-descr" ,1,0,0,0,0,1,0,0,NULL,&atx[45],&atx[648],0,&atx[875]} ,
{0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[649],NULL,0,NULL} ,
{411, "Seqdesc" ,1,0,0,0,0,1,0,0,NULL,&atx[14],&atx[650],0,&atx[647]} ,
{0, "mol-type" ,128,0,0,0,0,0,0,0,NULL,&atx[651],NULL,0,&atx[652]} ,
{404, "GIBB-mol" ,1,0,0,0,0,1,0,0,NULL,&atx[42],&avnx[106],0,&atx[817]} ,
{0, "modif" ,128,1,0,0,0,0,0,0,NULL,&atx[45],&atx[653],0,&atx[655]} ,
{0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[654],NULL,0,NULL} ,
- {437, "GIBB-mod" ,1,0,0,0,0,0,0,0,NULL,&atx[42],&avnx[118],0,&atx[656]} ,
+ {438, "GIBB-mod" ,1,0,0,0,0,0,0,0,NULL,&atx[42],&avnx[118],0,&atx[656]} ,
{0, "method" ,128,2,0,0,0,0,0,0,NULL,&atx[656],NULL,0,&atx[657]} ,
- {438, "GIBB-method" ,1,0,0,0,0,0,0,0,NULL,&atx[42],&avnx[146],0,&atx[449]} ,
+ {439, "GIBB-method" ,1,0,0,0,0,0,0,0,NULL,&atx[42],&avnx[146],0,&atx[449]} ,
{0, "name" ,128,3,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[658]} ,
{0, "title" ,128,4,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[659]} ,
{0, "org" ,128,5,0,0,0,0,0,0,NULL,&atx[660],NULL,0,&atx[702]} ,
@@ -1335,7 +1825,7 @@ static AsnType atx[1758] = {
{0, "comment" ,128,6,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[703]} ,
{0, "num" ,128,7,0,0,0,0,0,0,NULL,&atx[447],NULL,0,&atx[704]} ,
{0, "maploc" ,128,8,0,0,0,0,0,0,NULL,&atx[705],NULL,0,&atx[706]} ,
- {420, "Dbtag" ,1,0,0,0,0,0,1,0,NULL,&atx[17],NULL,0,&atx[1079]} ,
+ {420, "Dbtag" ,1,0,0,0,0,0,1,0,NULL,&atx[17],NULL,0,&atx[1080]} ,
{0, "pir" ,128,9,0,0,0,0,0,0,NULL,&atx[707],NULL,0,&atx[725]} ,
{432, "PIR-block" ,1,0,0,0,0,0,1,0,NULL,&atx[708],NULL,0,&atx[765]} ,
{401, "PIR-block" ,1,0,0,0,0,1,0,0,NULL,&atx[13],&atx[709],0,&atx[724]} ,
@@ -1431,7 +1921,7 @@ static AsnType atx[1758] = {
{0, "keywords" ,128,1,0,1,0,0,0,0,NULL,&atx[66],&atx[799],0,NULL} ,
{0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[2],NULL,0,NULL} ,
{0, "pdb" ,128,20,0,0,0,0,0,0,NULL,&atx[801],NULL,0,&atx[816]} ,
- {436, "PDB-block" ,1,0,0,0,0,0,1,0,NULL,&atx[802],NULL,0,&atx[654]} ,
+ {436, "PDB-block" ,1,0,0,0,0,0,1,0,NULL,&atx[802],NULL,0,&atx[1131]} ,
{401, "PDB-block" ,1,0,0,0,0,1,0,0,NULL,&atx[13],&atx[803],0,&atx[804]} ,
{0, "deposition" ,128,0,0,0,0,0,0,0,NULL,&atx[804],NULL,0,&atx[805]} ,
{402, "Date" ,1,0,0,0,0,0,1,0,NULL,&atx[0],NULL,0,&atx[812]} ,
@@ -1451,945 +1941,1280 @@ static AsnType atx[1758] = {
{0, "source" ,128,22,0,0,0,0,0,0,NULL,&atx[819],NULL,0,&atx[832]} ,
{428, "BioSource" ,1,0,0,0,0,0,1,0,NULL,&atx[820],NULL,0,&atx[633]} ,
{401, "BioSource" ,1,0,0,0,0,1,0,0,NULL,&atx[13],&atx[821],0,&atx[824]} ,
- {0, "genome" ,128,0,0,0,1,0,0,0,&avnx[263],&atx[6],&avnx[241],0,&atx[822]} ,
- {0, "origin" ,128,1,0,0,1,0,0,0,&avnx[271],&atx[6],&avnx[264],0,&atx[823]} ,
+ {0, "genome" ,128,0,0,0,1,0,0,0,&avnx[264],&atx[6],&avnx[241],0,&atx[822]} ,
+ {0, "origin" ,128,1,0,0,1,0,0,0,&avnx[272],&atx[6],&avnx[265],0,&atx[823]} ,
{0, "org" ,128,2,0,0,0,0,0,0,NULL,&atx[824],NULL,0,&atx[825]} ,
{402, "Org-ref" ,1,0,0,0,0,0,1,0,NULL,&atx[661],NULL,0,&atx[827]} ,
{0, "subtype" ,128,3,0,1,0,0,0,0,NULL,&atx[66],&atx[826],0,&atx[831]} ,
{0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[827],NULL,0,NULL} ,
{403, "SubSource" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[828],0,NULL} ,
- {0, "subtype" ,128,0,0,0,0,0,0,0,NULL,&atx[6],&avnx[272],0,&atx[829]} ,
+ {0, "subtype" ,128,0,0,0,0,0,0,0,NULL,&atx[6],&avnx[273],0,&atx[829]} ,
{0, "name" ,128,1,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[830]} ,
{0, "attrib" ,128,2,0,1,0,0,0,0,NULL,&atx[2],NULL,0,NULL} ,
{0, "is-focus" ,128,4,0,1,0,0,0,0,NULL,&atx[387],NULL,0,NULL} ,
{0, "molinfo" ,128,23,0,0,0,0,0,0,NULL,&atx[833],NULL,0,NULL} ,
{406, "MolInfo" ,1,0,0,0,0,1,0,0,NULL,&atx[13],&atx[834],0,&atx[447]} ,
- {0, "biomol" ,128,0,0,0,1,0,0,0,&avnx[325],&atx[6],&avnx[310],0,&atx[835]} ,
- {0, "tech" ,128,1,0,0,1,0,0,0,&avnx[350],&atx[6],&avnx[326],0,&atx[836]} ,
+ {0, "biomol" ,128,0,0,0,1,0,0,0,&avnx[328],&atx[6],&avnx[311],0,&atx[835]} ,
+ {0, "tech" ,128,1,0,0,1,0,0,0,&avnx[354],&atx[6],&avnx[329],0,&atx[836]} ,
{0, "techexp" ,128,2,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[837]} ,
- {0, "completeness" ,128,3,0,0,1,0,0,0,&avnx[360],&atx[6],&avnx[351],0,NULL} ,
- {0, "inst" ,128,2,0,0,0,0,0,0,NULL,&atx[839],NULL,0,&atx[1072]} ,
- {415, "Seq-inst" ,1,0,0,0,0,1,0,0,NULL,&atx[13],&atx[840],0,&atx[1055]} ,
- {0, "repr" ,128,0,0,0,0,0,0,0,NULL,&atx[42],&avnx[361],0,&atx[841]} ,
- {0, "mol" ,128,1,0,0,0,0,0,0,NULL,&atx[42],&avnx[371],0,&atx[842]} ,
- {0, "length" ,128,2,0,1,0,0,0,0,NULL,&atx[6],NULL,0,&atx[843]} ,
- {0, "fuzz" ,128,3,0,1,0,0,0,0,NULL,&atx[844],NULL,0,&atx[845]} ,
+ {0, "completeness" ,128,3,0,0,1,0,0,0,&avnx[364],&atx[6],&avnx[355],0,&atx[838]} ,
+ {0, "gbmoltype" ,128,4,0,1,0,0,0,0,NULL,&atx[2],NULL,0,NULL} ,
+ {0, "inst" ,128,2,0,0,0,0,0,0,NULL,&atx[840],NULL,0,&atx[1073]} ,
+ {415, "Seq-inst" ,1,0,0,0,0,1,0,0,NULL,&atx[13],&atx[841],0,&atx[1056]} ,
+ {0, "repr" ,128,0,0,0,0,0,0,0,NULL,&atx[42],&avnx[365],0,&atx[842]} ,
+ {0, "mol" ,128,1,0,0,0,0,0,0,NULL,&atx[42],&avnx[375],0,&atx[843]} ,
+ {0, "length" ,128,2,0,1,0,0,0,0,NULL,&atx[6],NULL,0,&atx[844]} ,
+ {0, "fuzz" ,128,3,0,1,0,0,0,0,NULL,&atx[845],NULL,0,&atx[846]} ,
{419, "Int-fuzz" ,1,0,0,0,0,0,1,0,NULL,&atx[35],NULL,0,&atx[705]} ,
- {0, "topology" ,128,4,0,0,1,0,0,0,&avnx[382],&atx[42],&avnx[377],0,&atx[846]} ,
- {0, "strand" ,128,5,0,1,0,0,0,0,NULL,&atx[42],&avnx[383],0,&atx[847]} ,
- {0, "seq-data" ,128,6,0,1,0,0,0,0,NULL,&atx[848],NULL,0,&atx[873]} ,
- {410, "Seq-data" ,1,0,0,0,0,1,0,0,NULL,&atx[14],&atx[849],0,&atx[649]} ,
- {0, "iupacna" ,128,0,0,0,0,0,0,0,NULL,&atx[850],NULL,0,&atx[851]} ,
- {448, "IUPACna" ,1,0,0,0,0,0,0,0,NULL,&atx[623],NULL,0,&atx[852]} ,
- {0, "iupacaa" ,128,1,0,0,0,0,0,0,NULL,&atx[852],NULL,0,&atx[853]} ,
- {449, "IUPACaa" ,1,0,0,0,0,0,0,0,NULL,&atx[623],NULL,0,&atx[854]} ,
- {0, "ncbi2na" ,128,2,0,0,0,0,0,0,NULL,&atx[854],NULL,0,&atx[855]} ,
- {450, "NCBI2na" ,1,0,0,0,0,0,0,0,NULL,&atx[62],NULL,0,&atx[856]} ,
- {0, "ncbi4na" ,128,3,0,0,0,0,0,0,NULL,&atx[856],NULL,0,&atx[857]} ,
- {451, "NCBI4na" ,1,0,0,0,0,0,0,0,NULL,&atx[62],NULL,0,&atx[858]} ,
- {0, "ncbi8na" ,128,4,0,0,0,0,0,0,NULL,&atx[858],NULL,0,&atx[859]} ,
- {452, "NCBI8na" ,1,0,0,0,0,0,0,0,NULL,&atx[62],NULL,0,&atx[860]} ,
- {0, "ncbipna" ,128,5,0,0,0,0,0,0,NULL,&atx[860],NULL,0,&atx[861]} ,
- {453, "NCBIpna" ,1,0,0,0,0,0,0,0,NULL,&atx[62],NULL,0,&atx[862]} ,
- {0, "ncbi8aa" ,128,6,0,0,0,0,0,0,NULL,&atx[862],NULL,0,&atx[863]} ,
- {454, "NCBI8aa" ,1,0,0,0,0,0,0,0,NULL,&atx[62],NULL,0,&atx[864]} ,
- {0, "ncbieaa" ,128,7,0,0,0,0,0,0,NULL,&atx[864],NULL,0,&atx[865]} ,
- {455, "NCBIeaa" ,1,0,0,0,0,0,0,0,NULL,&atx[623],NULL,0,&atx[866]} ,
- {0, "ncbipaa" ,128,8,0,0,0,0,0,0,NULL,&atx[866],NULL,0,&atx[867]} ,
- {456, "NCBIpaa" ,1,0,0,0,0,0,0,0,NULL,&atx[62],NULL,0,&atx[868]} ,
- {0, "ncbistdaa" ,128,9,0,0,0,0,0,0,NULL,&atx[868],NULL,0,&atx[869]} ,
- {457, "NCBIstdaa" ,1,0,0,0,0,0,0,0,NULL,&atx[62],NULL,0,&atx[870]} ,
- {0, "gap" ,128,10,0,0,0,0,0,0,NULL,&atx[870],NULL,0,NULL} ,
- {458, "Seq-gap" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[871],0,&atx[1077]} ,
- {0, "type" ,128,0,0,0,0,0,0,0,NULL,&atx[6],&avnx[388],0,&atx[872]} ,
- {0, "linkage" ,128,1,0,1,0,0,0,0,NULL,&atx[6],&avnx[398],0,NULL} ,
- {0, "ext" ,128,7,0,1,0,0,0,0,NULL,&atx[874],NULL,0,&atx[1059]} ,
- {413, "Seq-ext" ,1,0,0,0,0,1,0,0,NULL,&atx[14],&atx[875],0,&atx[1060]} ,
- {0, "seg" ,128,0,0,0,0,0,0,0,NULL,&atx[876],NULL,0,&atx[878]} ,
- {443, "Seg-ext" ,1,0,0,0,0,0,0,0,NULL,&atx[66],&atx[877],0,&atx[879]} ,
+ {0, "topology" ,128,4,0,0,1,0,0,0,&avnx[386],&atx[42],&avnx[381],0,&atx[847]} ,
+ {0, "strand" ,128,5,0,1,0,0,0,0,NULL,&atx[42],&avnx[387],0,&atx[848]} ,
+ {0, "seq-data" ,128,6,0,1,0,0,0,0,NULL,&atx[849],NULL,0,&atx[874]} ,
+ {410, "Seq-data" ,1,0,0,0,0,1,0,0,NULL,&atx[14],&atx[850],0,&atx[649]} ,
+ {0, "iupacna" ,128,0,0,0,0,0,0,0,NULL,&atx[851],NULL,0,&atx[852]} ,
+ {449, "IUPACna" ,1,0,0,0,0,0,0,0,NULL,&atx[623],NULL,0,&atx[853]} ,
+ {0, "iupacaa" ,128,1,0,0,0,0,0,0,NULL,&atx[853],NULL,0,&atx[854]} ,
+ {450, "IUPACaa" ,1,0,0,0,0,0,0,0,NULL,&atx[623],NULL,0,&atx[855]} ,
+ {0, "ncbi2na" ,128,2,0,0,0,0,0,0,NULL,&atx[855],NULL,0,&atx[856]} ,
+ {451, "NCBI2na" ,1,0,0,0,0,0,0,0,NULL,&atx[62],NULL,0,&atx[857]} ,
+ {0, "ncbi4na" ,128,3,0,0,0,0,0,0,NULL,&atx[857],NULL,0,&atx[858]} ,
+ {452, "NCBI4na" ,1,0,0,0,0,0,0,0,NULL,&atx[62],NULL,0,&atx[859]} ,
+ {0, "ncbi8na" ,128,4,0,0,0,0,0,0,NULL,&atx[859],NULL,0,&atx[860]} ,
+ {453, "NCBI8na" ,1,0,0,0,0,0,0,0,NULL,&atx[62],NULL,0,&atx[861]} ,
+ {0, "ncbipna" ,128,5,0,0,0,0,0,0,NULL,&atx[861],NULL,0,&atx[862]} ,
+ {454, "NCBIpna" ,1,0,0,0,0,0,0,0,NULL,&atx[62],NULL,0,&atx[863]} ,
+ {0, "ncbi8aa" ,128,6,0,0,0,0,0,0,NULL,&atx[863],NULL,0,&atx[864]} ,
+ {455, "NCBI8aa" ,1,0,0,0,0,0,0,0,NULL,&atx[62],NULL,0,&atx[865]} ,
+ {0, "ncbieaa" ,128,7,0,0,0,0,0,0,NULL,&atx[865],NULL,0,&atx[866]} ,
+ {456, "NCBIeaa" ,1,0,0,0,0,0,0,0,NULL,&atx[623],NULL,0,&atx[867]} ,
+ {0, "ncbipaa" ,128,8,0,0,0,0,0,0,NULL,&atx[867],NULL,0,&atx[868]} ,
+ {457, "NCBIpaa" ,1,0,0,0,0,0,0,0,NULL,&atx[62],NULL,0,&atx[869]} ,
+ {0, "ncbistdaa" ,128,9,0,0,0,0,0,0,NULL,&atx[869],NULL,0,&atx[870]} ,
+ {458, "NCBIstdaa" ,1,0,0,0,0,0,0,0,NULL,&atx[62],NULL,0,&atx[871]} ,
+ {0, "gap" ,128,10,0,0,0,0,0,0,NULL,&atx[871],NULL,0,NULL} ,
+ {459, "Seq-gap" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[872],0,&atx[1078]} ,
+ {0, "type" ,128,0,0,0,0,0,0,0,NULL,&atx[6],&avnx[392],0,&atx[873]} ,
+ {0, "linkage" ,128,1,0,1,0,0,0,0,NULL,&atx[6],&avnx[402],0,NULL} ,
+ {0, "ext" ,128,7,0,1,0,0,0,0,NULL,&atx[875],NULL,0,&atx[1060]} ,
+ {413, "Seq-ext" ,1,0,0,0,0,1,0,0,NULL,&atx[14],&atx[876],0,&atx[1061]} ,
+ {0, "seg" ,128,0,0,0,0,0,0,0,NULL,&atx[877],NULL,0,&atx[879]} ,
+ {444, "Seg-ext" ,1,0,0,0,0,0,0,0,NULL,&atx[66],&atx[878],0,&atx[880]} ,
{0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[640],NULL,0,NULL} ,
- {0, "ref" ,128,1,0,0,0,0,0,0,NULL,&atx[879],NULL,0,&atx[880]} ,
- {444, "Ref-ext" ,1,0,0,0,0,0,0,0,NULL,&atx[640],NULL,0,&atx[881]} ,
- {0, "map" ,128,2,0,0,0,0,0,0,NULL,&atx[881],NULL,0,&atx[1049]} ,
- {445, "Map-ext" ,1,0,0,0,0,0,0,0,NULL,&atx[66],&atx[882],0,&atx[1052]} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[883],NULL,0,NULL} ,
- {424, "Seq-feat" ,1,0,0,0,0,0,1,0,NULL,&atx[884],NULL,0,&atx[1092]} ,
- {401, "Seq-feat" ,1,0,0,0,0,1,0,0,NULL,&atx[13],&atx[885],0,&atx[428]} ,
- {0, "id" ,128,0,0,1,0,0,0,0,NULL,&atx[428],NULL,0,&atx[886]} ,
- {0, "data" ,128,1,0,0,0,0,0,0,NULL,&atx[887],NULL,0,&atx[1021]} ,
- {420, "SeqFeatData" ,1,0,0,0,0,0,0,0,NULL,&atx[14],&atx[888],0,&atx[1028]} ,
- {0, "gene" ,128,0,0,0,0,0,0,0,NULL,&atx[889],NULL,0,&atx[902]} ,
- {404, "Gene-ref" ,1,0,0,0,0,0,1,0,NULL,&atx[890],NULL,0,&atx[933]} ,
- {401, "Gene-ref" ,1,0,0,0,0,1,0,0,NULL,&atx[13],&atx[891],0,&atx[898]} ,
- {0, "locus" ,128,0,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[892]} ,
- {0, "allele" ,128,1,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[893]} ,
- {0, "desc" ,128,2,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[894]} ,
- {0, "maploc" ,128,3,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[895]} ,
- {0, "pseudo" ,128,4,0,0,1,0,0,0,&avnx[401],&atx[60],NULL,0,&atx[896]} ,
- {0, "db" ,128,5,0,1,0,0,0,0,NULL,&atx[45],&atx[897],0,&atx[899]} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[898],NULL,0,NULL} ,
+ {0, "ref" ,128,1,0,0,0,0,0,0,NULL,&atx[880],NULL,0,&atx[881]} ,
+ {445, "Ref-ext" ,1,0,0,0,0,0,0,0,NULL,&atx[640],NULL,0,&atx[882]} ,
+ {0, "map" ,128,2,0,0,0,0,0,0,NULL,&atx[882],NULL,0,&atx[1050]} ,
+ {446, "Map-ext" ,1,0,0,0,0,0,0,0,NULL,&atx[66],&atx[883],0,&atx[1053]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[884],NULL,0,NULL} ,
+ {424, "Seq-feat" ,1,0,0,0,0,0,1,0,NULL,&atx[885],NULL,0,&atx[1093]} ,
+ {401, "Seq-feat" ,1,0,0,0,0,1,0,0,NULL,&atx[13],&atx[886],0,&atx[428]} ,
+ {0, "id" ,128,0,0,1,0,0,0,0,NULL,&atx[428],NULL,0,&atx[887]} ,
+ {0, "data" ,128,1,0,0,0,0,0,0,NULL,&atx[888],NULL,0,&atx[1022]} ,
+ {420, "SeqFeatData" ,1,0,0,0,0,0,0,0,NULL,&atx[14],&atx[889],0,&atx[1029]} ,
+ {0, "gene" ,128,0,0,0,0,0,0,0,NULL,&atx[890],NULL,0,&atx[903]} ,
+ {404, "Gene-ref" ,1,0,0,0,0,0,1,0,NULL,&atx[891],NULL,0,&atx[934]} ,
+ {401, "Gene-ref" ,1,0,0,0,0,1,0,0,NULL,&atx[13],&atx[892],0,&atx[899]} ,
+ {0, "locus" ,128,0,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[893]} ,
+ {0, "allele" ,128,1,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[894]} ,
+ {0, "desc" ,128,2,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[895]} ,
+ {0, "maploc" ,128,3,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[896]} ,
+ {0, "pseudo" ,128,4,0,0,1,0,0,0,&avnx[405],&atx[60],NULL,0,&atx[897]} ,
+ {0, "db" ,128,5,0,1,0,0,0,0,NULL,&atx[45],&atx[898],0,&atx[900]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[899],NULL,0,NULL} ,
{402, "Dbtag" ,1,0,0,0,0,0,1,0,NULL,&atx[17],NULL,0,NULL} ,
- {0, "syn" ,128,6,0,1,0,0,0,0,NULL,&atx[45],&atx[900],0,&atx[901]} ,
+ {0, "syn" ,128,6,0,1,0,0,0,0,NULL,&atx[45],&atx[901],0,&atx[902]} ,
{0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[2],NULL,0,NULL} ,
{0, "locus-tag" ,128,7,0,1,0,0,0,0,NULL,&atx[2],NULL,0,NULL} ,
- {0, "org" ,128,1,0,0,0,0,0,0,NULL,&atx[903],NULL,0,&atx[904]} ,
- {406, "Org-ref" ,1,0,0,0,0,0,1,0,NULL,&atx[661],NULL,0,&atx[1020]} ,
- {0, "cdregion" ,128,2,0,0,0,0,0,0,NULL,&atx[905],NULL,0,&atx[932]} ,
- {423, "Cdregion" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[906],0,&atx[968]} ,
- {0, "orf" ,128,0,0,1,0,0,0,0,NULL,&atx[60],NULL,0,&atx[907]} ,
- {0, "frame" ,128,1,0,0,1,0,0,0,&avnx[406],&atx[42],&avnx[402],0,&atx[908]} ,
- {0, "conflict" ,128,2,0,1,0,0,0,0,NULL,&atx[60],NULL,0,&atx[909]} ,
- {0, "gaps" ,128,3,0,1,0,0,0,0,NULL,&atx[6],NULL,0,&atx[910]} ,
- {0, "mismatch" ,128,4,0,1,0,0,0,0,NULL,&atx[6],NULL,0,&atx[911]} ,
- {0, "code" ,128,5,0,1,0,0,0,0,NULL,&atx[912],NULL,0,&atx[922]} ,
- {403, "Genetic-code" ,1,0,0,0,0,1,0,0,NULL,&atx[45],&atx[913],0,&atx[889]} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[14],&atx[914],0,NULL} ,
- {0, "name" ,128,0,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[915]} ,
- {0, "id" ,128,1,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[916]} ,
- {0, "ncbieaa" ,128,2,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[917]} ,
- {0, "ncbi8aa" ,128,3,0,0,0,0,0,0,NULL,&atx[62],NULL,0,&atx[918]} ,
- {0, "ncbistdaa" ,128,4,0,0,0,0,0,0,NULL,&atx[62],NULL,0,&atx[919]} ,
- {0, "sncbieaa" ,128,5,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[920]} ,
- {0, "sncbi8aa" ,128,6,0,0,0,0,0,0,NULL,&atx[62],NULL,0,&atx[921]} ,
+ {0, "org" ,128,1,0,0,0,0,0,0,NULL,&atx[904],NULL,0,&atx[905]} ,
+ {406, "Org-ref" ,1,0,0,0,0,0,1,0,NULL,&atx[661],NULL,0,&atx[1021]} ,
+ {0, "cdregion" ,128,2,0,0,0,0,0,0,NULL,&atx[906],NULL,0,&atx[933]} ,
+ {423, "Cdregion" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[907],0,&atx[969]} ,
+ {0, "orf" ,128,0,0,1,0,0,0,0,NULL,&atx[60],NULL,0,&atx[908]} ,
+ {0, "frame" ,128,1,0,0,1,0,0,0,&avnx[410],&atx[42],&avnx[406],0,&atx[909]} ,
+ {0, "conflict" ,128,2,0,1,0,0,0,0,NULL,&atx[60],NULL,0,&atx[910]} ,
+ {0, "gaps" ,128,3,0,1,0,0,0,0,NULL,&atx[6],NULL,0,&atx[911]} ,
+ {0, "mismatch" ,128,4,0,1,0,0,0,0,NULL,&atx[6],NULL,0,&atx[912]} ,
+ {0, "code" ,128,5,0,1,0,0,0,0,NULL,&atx[913],NULL,0,&atx[923]} ,
+ {403, "Genetic-code" ,1,0,0,0,0,1,0,0,NULL,&atx[45],&atx[914],0,&atx[890]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[14],&atx[915],0,NULL} ,
+ {0, "name" ,128,0,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[916]} ,
+ {0, "id" ,128,1,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[917]} ,
+ {0, "ncbieaa" ,128,2,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[918]} ,
+ {0, "ncbi8aa" ,128,3,0,0,0,0,0,0,NULL,&atx[62],NULL,0,&atx[919]} ,
+ {0, "ncbistdaa" ,128,4,0,0,0,0,0,0,NULL,&atx[62],NULL,0,&atx[920]} ,
+ {0, "sncbieaa" ,128,5,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[921]} ,
+ {0, "sncbi8aa" ,128,6,0,0,0,0,0,0,NULL,&atx[62],NULL,0,&atx[922]} ,
{0, "sncbistdaa" ,128,7,0,0,0,0,0,0,NULL,&atx[62],NULL,0,NULL} ,
- {0, "code-break" ,128,6,0,1,0,0,0,0,NULL,&atx[66],&atx[923],0,&atx[931]} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[924],NULL,0,NULL} ,
- {425, "Code-break" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[925],0,&atx[1174]} ,
- {0, "loc" ,128,0,0,0,0,0,0,0,NULL,&atx[926],NULL,0,&atx[927]} ,
+ {0, "code-break" ,128,6,0,1,0,0,0,0,NULL,&atx[66],&atx[924],0,&atx[932]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[925],NULL,0,NULL} ,
+ {425, "Code-break" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[926],0,&atx[1237]} ,
+ {0, "loc" ,128,0,0,0,0,0,0,0,NULL,&atx[927],NULL,0,&atx[928]} ,
{409, "Seq-loc" ,1,0,0,0,0,0,1,0,NULL,&atx[385],NULL,0,&atx[431]} ,
- {0, "aa" ,128,1,0,0,0,0,0,0,NULL,&atx[14],&atx[928],0,NULL} ,
- {0, "ncbieaa" ,128,0,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[929]} ,
- {0, "ncbi8aa" ,128,1,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[930]} ,
+ {0, "aa" ,128,1,0,0,0,0,0,0,NULL,&atx[14],&atx[929],0,NULL} ,
+ {0, "ncbieaa" ,128,0,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[930]} ,
+ {0, "ncbi8aa" ,128,1,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[931]} ,
{0, "ncbistdaa" ,128,2,0,0,0,0,0,0,NULL,&atx[6],NULL,0,NULL} ,
{0, "stops" ,128,7,0,1,0,0,0,0,NULL,&atx[6],NULL,0,NULL} ,
- {0, "prot" ,128,3,0,0,0,0,0,0,NULL,&atx[933],NULL,0,&atx[946]} ,
- {405, "Prot-ref" ,1,0,0,0,0,0,1,0,NULL,&atx[934],NULL,0,&atx[903]} ,
- {401, "Prot-ref" ,1,0,0,0,0,1,0,0,NULL,&atx[13],&atx[935],0,&atx[944]} ,
- {0, "name" ,128,0,0,1,0,0,0,0,NULL,&atx[45],&atx[936],0,&atx[937]} ,
+ {0, "prot" ,128,3,0,0,0,0,0,0,NULL,&atx[934],NULL,0,&atx[947]} ,
+ {405, "Prot-ref" ,1,0,0,0,0,0,1,0,NULL,&atx[935],NULL,0,&atx[904]} ,
+ {401, "Prot-ref" ,1,0,0,0,0,1,0,0,NULL,&atx[13],&atx[936],0,&atx[945]} ,
+ {0, "name" ,128,0,0,1,0,0,0,0,NULL,&atx[45],&atx[937],0,&atx[938]} ,
{0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[2],NULL,0,NULL} ,
- {0, "desc" ,128,1,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[938]} ,
- {0, "ec" ,128,2,0,1,0,0,0,0,NULL,&atx[45],&atx[939],0,&atx[940]} ,
+ {0, "desc" ,128,1,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[939]} ,
+ {0, "ec" ,128,2,0,1,0,0,0,0,NULL,&atx[45],&atx[940],0,&atx[941]} ,
{0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[2],NULL,0,NULL} ,
- {0, "activity" ,128,3,0,1,0,0,0,0,NULL,&atx[45],&atx[941],0,&atx[942]} ,
+ {0, "activity" ,128,3,0,1,0,0,0,0,NULL,&atx[45],&atx[942],0,&atx[943]} ,
{0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[2],NULL,0,NULL} ,
- {0, "db" ,128,4,0,1,0,0,0,0,NULL,&atx[45],&atx[943],0,&atx[945]} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[944],NULL,0,NULL} ,
+ {0, "db" ,128,4,0,1,0,0,0,0,NULL,&atx[45],&atx[944],0,&atx[946]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[945],NULL,0,NULL} ,
{402, "Dbtag" ,1,0,0,0,0,0,1,0,NULL,&atx[17],NULL,0,NULL} ,
- {0, "processed" ,128,5,0,0,1,0,0,0,&avnx[412],&atx[42],&avnx[407],0,NULL} ,
- {0, "rna" ,128,4,0,0,0,0,0,0,NULL,&atx[947],NULL,0,&atx[964]} ,
- {408, "RNA-ref" ,1,0,0,0,0,0,1,0,NULL,&atx[948],NULL,0,&atx[926]} ,
- {401, "RNA-ref" ,1,0,0,0,0,1,0,0,NULL,&atx[13],&atx[949],0,&atx[954]} ,
- {0, "type" ,128,0,0,0,0,0,0,0,NULL,&atx[42],&avnx[413],0,&atx[950]} ,
- {0, "pseudo" ,128,1,0,1,0,0,0,0,NULL,&atx[60],NULL,0,&atx[951]} ,
- {0, "ext" ,128,2,0,1,0,0,0,0,NULL,&atx[14],&atx[952],0,NULL} ,
- {0, "name" ,128,0,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[953]} ,
- {0, "tRNA" ,128,1,0,0,0,0,0,0,NULL,&atx[954],NULL,0,NULL} ,
- {402, "Trna-ext" ,1,0,0,0,0,1,0,0,NULL,&atx[13],&atx[955],0,&atx[963]} ,
- {0, "aa" ,128,0,0,1,0,0,0,0,NULL,&atx[14],&atx[956],0,&atx[960]} ,
- {0, "iupacaa" ,128,0,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[957]} ,
- {0, "ncbieaa" ,128,1,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[958]} ,
- {0, "ncbi8aa" ,128,2,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[959]} ,
+ {0, "processed" ,128,5,0,0,1,0,0,0,&avnx[416],&atx[42],&avnx[411],0,NULL} ,
+ {0, "rna" ,128,4,0,0,0,0,0,0,NULL,&atx[948],NULL,0,&atx[965]} ,
+ {408, "RNA-ref" ,1,0,0,0,0,0,1,0,NULL,&atx[949],NULL,0,&atx[927]} ,
+ {401, "RNA-ref" ,1,0,0,0,0,1,0,0,NULL,&atx[13],&atx[950],0,&atx[955]} ,
+ {0, "type" ,128,0,0,0,0,0,0,0,NULL,&atx[42],&avnx[417],0,&atx[951]} ,
+ {0, "pseudo" ,128,1,0,1,0,0,0,0,NULL,&atx[60],NULL,0,&atx[952]} ,
+ {0, "ext" ,128,2,0,1,0,0,0,0,NULL,&atx[14],&atx[953],0,NULL} ,
+ {0, "name" ,128,0,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[954]} ,
+ {0, "tRNA" ,128,1,0,0,0,0,0,0,NULL,&atx[955],NULL,0,NULL} ,
+ {402, "Trna-ext" ,1,0,0,0,0,1,0,0,NULL,&atx[13],&atx[956],0,&atx[964]} ,
+ {0, "aa" ,128,0,0,1,0,0,0,0,NULL,&atx[14],&atx[957],0,&atx[961]} ,
+ {0, "iupacaa" ,128,0,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[958]} ,
+ {0, "ncbieaa" ,128,1,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[959]} ,
+ {0, "ncbi8aa" ,128,2,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[960]} ,
{0, "ncbistdaa" ,128,3,0,0,0,0,0,0,NULL,&atx[6],NULL,0,NULL} ,
- {0, "codon" ,128,1,0,1,0,0,0,0,NULL,&atx[45],&atx[961],0,&atx[962]} ,
+ {0, "codon" ,128,1,0,1,0,0,0,0,NULL,&atx[45],&atx[962],0,&atx[963]} ,
{0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[6],NULL,0,NULL} ,
- {0, "anticodon" ,128,2,0,1,0,0,0,0,NULL,&atx[963],NULL,0,NULL} ,
+ {0, "anticodon" ,128,2,0,1,0,0,0,0,NULL,&atx[964],NULL,0,NULL} ,
{403, "Seq-loc" ,1,0,0,0,0,0,1,0,NULL,&atx[385],NULL,0,NULL} ,
- {0, "pub" ,128,5,0,0,0,0,0,0,NULL,&atx[965],NULL,0,&atx[966]} ,
- {411, "Pubdesc" ,1,0,0,0,0,0,1,0,NULL,&atx[441],NULL,0,&atx[1014]} ,
- {0, "seq" ,128,6,0,0,0,0,0,0,NULL,&atx[926],NULL,0,&atx[967]} ,
- {0, "imp" ,128,7,0,0,0,0,0,0,NULL,&atx[968],NULL,0,&atx[972]} ,
- {424, "Imp-feat" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[969],0,&atx[924]} ,
- {0, "key" ,128,0,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[970]} ,
- {0, "loc" ,128,1,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[971]} ,
+ {0, "pub" ,128,5,0,0,0,0,0,0,NULL,&atx[966],NULL,0,&atx[967]} ,
+ {411, "Pubdesc" ,1,0,0,0,0,0,1,0,NULL,&atx[441],NULL,0,&atx[1015]} ,
+ {0, "seq" ,128,6,0,0,0,0,0,0,NULL,&atx[927],NULL,0,&atx[968]} ,
+ {0, "imp" ,128,7,0,0,0,0,0,0,NULL,&atx[969],NULL,0,&atx[973]} ,
+ {424, "Imp-feat" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[970],0,&atx[925]} ,
+ {0, "key" ,128,0,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[971]} ,
+ {0, "loc" ,128,1,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[972]} ,
{0, "descr" ,128,2,0,1,0,0,0,0,NULL,&atx[2],NULL,0,NULL} ,
- {0, "region" ,128,8,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[973]} ,
- {0, "comment" ,128,9,0,0,0,0,0,0,NULL,&atx[387],NULL,0,&atx[974]} ,
- {0, "bond" ,128,10,0,0,0,0,0,0,NULL,&atx[42],&avnx[422],0,&atx[975]} ,
- {0, "site" ,128,11,0,0,0,0,0,0,NULL,&atx[42],&avnx[427],0,&atx[976]} ,
- {0, "rsite" ,128,12,0,0,0,0,0,0,NULL,&atx[977],NULL,0,&atx[982]} ,
- {414, "Rsite-ref" ,1,0,0,0,0,0,1,0,NULL,&atx[978],NULL,0,&atx[985]} ,
- {401, "Rsite-ref" ,1,0,0,0,0,1,0,0,NULL,&atx[14],&atx[979],0,&atx[981]} ,
- {0, "str" ,128,0,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[980]} ,
- {0, "db" ,128,1,0,0,0,0,0,0,NULL,&atx[981],NULL,0,NULL} ,
+ {0, "region" ,128,8,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[974]} ,
+ {0, "comment" ,128,9,0,0,0,0,0,0,NULL,&atx[387],NULL,0,&atx[975]} ,
+ {0, "bond" ,128,10,0,0,0,0,0,0,NULL,&atx[42],&avnx[426],0,&atx[976]} ,
+ {0, "site" ,128,11,0,0,0,0,0,0,NULL,&atx[42],&avnx[431],0,&atx[977]} ,
+ {0, "rsite" ,128,12,0,0,0,0,0,0,NULL,&atx[978],NULL,0,&atx[983]} ,
+ {414, "Rsite-ref" ,1,0,0,0,0,0,1,0,NULL,&atx[979],NULL,0,&atx[986]} ,
+ {401, "Rsite-ref" ,1,0,0,0,0,1,0,0,NULL,&atx[14],&atx[980],0,&atx[982]} ,
+ {0, "str" ,128,0,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[981]} ,
+ {0, "db" ,128,1,0,0,0,0,0,0,NULL,&atx[982],NULL,0,NULL} ,
{402, "Dbtag" ,1,0,0,0,0,0,1,0,NULL,&atx[17],NULL,0,NULL} ,
- {0, "user" ,128,13,0,0,0,0,0,0,NULL,&atx[983],NULL,0,&atx[984]} ,
- {419, "User-object" ,1,0,0,0,0,0,1,0,NULL,&atx[46],NULL,0,&atx[887]} ,
- {0, "txinit" ,128,14,0,0,0,0,0,0,NULL,&atx[985],NULL,0,&atx[1013]} ,
- {415, "Txinit" ,1,0,0,0,0,0,1,0,NULL,&atx[986],NULL,0,&atx[1034]} ,
- {401, "Txinit" ,1,0,0,0,0,1,0,0,NULL,&atx[13],&atx[987],0,&atx[992]} ,
- {0, "name" ,128,0,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[988]} ,
- {0, "syn" ,128,1,0,1,0,0,0,0,NULL,&atx[66],&atx[989],0,&atx[990]} ,
+ {0, "user" ,128,13,0,0,0,0,0,0,NULL,&atx[984],NULL,0,&atx[985]} ,
+ {419, "User-object" ,1,0,0,0,0,0,1,0,NULL,&atx[46],NULL,0,&atx[888]} ,
+ {0, "txinit" ,128,14,0,0,0,0,0,0,NULL,&atx[986],NULL,0,&atx[1014]} ,
+ {415, "Txinit" ,1,0,0,0,0,0,1,0,NULL,&atx[987],NULL,0,&atx[1035]} ,
+ {401, "Txinit" ,1,0,0,0,0,1,0,0,NULL,&atx[13],&atx[988],0,&atx[993]} ,
+ {0, "name" ,128,0,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[989]} ,
+ {0, "syn" ,128,1,0,1,0,0,0,0,NULL,&atx[66],&atx[990],0,&atx[991]} ,
{0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[2],NULL,0,NULL} ,
- {0, "gene" ,128,2,0,1,0,0,0,0,NULL,&atx[66],&atx[991],0,&atx[993]} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[992],NULL,0,NULL} ,
- {402, "Gene-ref" ,1,0,0,0,0,0,1,0,NULL,&atx[890],NULL,0,&atx[995]} ,
- {0, "protein" ,128,3,0,1,0,0,0,0,NULL,&atx[66],&atx[994],0,&atx[996]} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[995],NULL,0,NULL} ,
- {403, "Prot-ref" ,1,0,0,0,0,0,1,0,NULL,&atx[934],NULL,0,&atx[1002]} ,
- {0, "rna" ,128,4,0,1,0,0,0,0,NULL,&atx[66],&atx[997],0,&atx[998]} ,
+ {0, "gene" ,128,2,0,1,0,0,0,0,NULL,&atx[66],&atx[992],0,&atx[994]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[993],NULL,0,NULL} ,
+ {402, "Gene-ref" ,1,0,0,0,0,0,1,0,NULL,&atx[891],NULL,0,&atx[996]} ,
+ {0, "protein" ,128,3,0,1,0,0,0,0,NULL,&atx[66],&atx[995],0,&atx[997]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[996],NULL,0,NULL} ,
+ {403, "Prot-ref" ,1,0,0,0,0,0,1,0,NULL,&atx[935],NULL,0,&atx[1003]} ,
+ {0, "rna" ,128,4,0,1,0,0,0,0,NULL,&atx[66],&atx[998],0,&atx[999]} ,
{0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[2],NULL,0,NULL} ,
- {0, "expression" ,128,5,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[999]} ,
- {0, "txsystem" ,128,6,0,0,0,0,0,0,NULL,&atx[42],&avnx[454],0,&atx[1000]} ,
- {0, "txdescr" ,128,7,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1001]} ,
- {0, "txorg" ,128,8,0,1,0,0,0,0,NULL,&atx[1002],NULL,0,&atx[1003]} ,
- {404, "Org-ref" ,1,0,0,0,0,0,1,0,NULL,&atx[661],NULL,0,&atx[1008]} ,
- {0, "mapping-precise" ,128,9,0,0,1,0,0,0,&avnx[463],&atx[60],NULL,0,&atx[1004]} ,
- {0, "location-accurate" ,128,10,0,0,1,0,0,0,&avnx[464],&atx[60],NULL,0,&atx[1005]} ,
- {0, "inittype" ,128,11,0,1,0,0,0,0,NULL,&atx[42],&avnx[465],0,&atx[1006]} ,
- {0, "evidence" ,128,12,0,1,0,0,0,0,NULL,&atx[45],&atx[1007],0,NULL} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1008],NULL,0,NULL} ,
- {405, "Tx-evidence" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1009],0,NULL} ,
- {0, "exp-code" ,128,0,0,0,0,0,0,0,NULL,&atx[42],&avnx[469],0,&atx[1010]} ,
- {0, "expression-system" ,128,1,0,0,1,0,0,0,&avnx[488],&atx[42],&avnx[481],0,&atx[1011]} ,
- {0, "low-prec-data" ,128,2,0,0,1,0,0,0,&avnx[489],&atx[60],NULL,0,&atx[1012]} ,
- {0, "from-homolog" ,128,3,0,0,1,0,0,0,&avnx[490],&atx[60],NULL,0,NULL} ,
- {0, "num" ,128,15,0,0,0,0,0,0,NULL,&atx[1014],NULL,0,&atx[1015]} ,
- {412, "Numbering" ,1,0,0,0,0,0,1,0,NULL,&atx[447],NULL,0,&atx[1018]} ,
- {0, "psec-str" ,128,16,0,0,0,0,0,0,NULL,&atx[42],&avnx[491],0,&atx[1016]} ,
- {0, "non-std-residue" ,128,17,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1017]} ,
- {0, "het" ,128,18,0,0,0,0,0,0,NULL,&atx[1018],NULL,0,&atx[1019]} ,
- {413, "Heterogen" ,1,0,0,0,0,0,1,0,NULL,&atx[817],NULL,0,&atx[977]} ,
- {0, "biosrc" ,128,19,0,0,0,0,0,0,NULL,&atx[1020],NULL,0,NULL} ,
- {407, "BioSource" ,1,0,0,0,0,0,1,0,NULL,&atx[820],NULL,0,&atx[947]} ,
- {0, "partial" ,128,2,0,1,0,0,0,0,NULL,&atx[60],NULL,0,&atx[1022]} ,
- {0, "except" ,128,3,0,1,0,0,0,0,NULL,&atx[60],NULL,0,&atx[1023]} ,
- {0, "comment" ,128,4,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1024]} ,
- {0, "product" ,128,5,0,1,0,0,0,0,NULL,&atx[926],NULL,0,&atx[1025]} ,
- {0, "location" ,128,6,0,0,0,0,0,0,NULL,&atx[926],NULL,0,&atx[1026]} ,
- {0, "qual" ,128,7,0,1,0,0,0,0,NULL,&atx[66],&atx[1027],0,&atx[1031]} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1028],NULL,0,NULL} ,
- {421, "Gb-qual" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1029],0,&atx[1038]} ,
- {0, "qual" ,128,0,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1030]} ,
+ {0, "expression" ,128,5,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1000]} ,
+ {0, "txsystem" ,128,6,0,0,0,0,0,0,NULL,&atx[42],&avnx[458],0,&atx[1001]} ,
+ {0, "txdescr" ,128,7,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1002]} ,
+ {0, "txorg" ,128,8,0,1,0,0,0,0,NULL,&atx[1003],NULL,0,&atx[1004]} ,
+ {404, "Org-ref" ,1,0,0,0,0,0,1,0,NULL,&atx[661],NULL,0,&atx[1009]} ,
+ {0, "mapping-precise" ,128,9,0,0,1,0,0,0,&avnx[467],&atx[60],NULL,0,&atx[1005]} ,
+ {0, "location-accurate" ,128,10,0,0,1,0,0,0,&avnx[468],&atx[60],NULL,0,&atx[1006]} ,
+ {0, "inittype" ,128,11,0,1,0,0,0,0,NULL,&atx[42],&avnx[469],0,&atx[1007]} ,
+ {0, "evidence" ,128,12,0,1,0,0,0,0,NULL,&atx[45],&atx[1008],0,NULL} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1009],NULL,0,NULL} ,
+ {405, "Tx-evidence" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1010],0,NULL} ,
+ {0, "exp-code" ,128,0,0,0,0,0,0,0,NULL,&atx[42],&avnx[473],0,&atx[1011]} ,
+ {0, "expression-system" ,128,1,0,0,1,0,0,0,&avnx[492],&atx[42],&avnx[485],0,&atx[1012]} ,
+ {0, "low-prec-data" ,128,2,0,0,1,0,0,0,&avnx[493],&atx[60],NULL,0,&atx[1013]} ,
+ {0, "from-homolog" ,128,3,0,0,1,0,0,0,&avnx[494],&atx[60],NULL,0,NULL} ,
+ {0, "num" ,128,15,0,0,0,0,0,0,NULL,&atx[1015],NULL,0,&atx[1016]} ,
+ {412, "Numbering" ,1,0,0,0,0,0,1,0,NULL,&atx[447],NULL,0,&atx[1019]} ,
+ {0, "psec-str" ,128,16,0,0,0,0,0,0,NULL,&atx[42],&avnx[495],0,&atx[1017]} ,
+ {0, "non-std-residue" ,128,17,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1018]} ,
+ {0, "het" ,128,18,0,0,0,0,0,0,NULL,&atx[1019],NULL,0,&atx[1020]} ,
+ {413, "Heterogen" ,1,0,0,0,0,0,1,0,NULL,&atx[817],NULL,0,&atx[978]} ,
+ {0, "biosrc" ,128,19,0,0,0,0,0,0,NULL,&atx[1021],NULL,0,NULL} ,
+ {407, "BioSource" ,1,0,0,0,0,0,1,0,NULL,&atx[820],NULL,0,&atx[948]} ,
+ {0, "partial" ,128,2,0,1,0,0,0,0,NULL,&atx[60],NULL,0,&atx[1023]} ,
+ {0, "except" ,128,3,0,1,0,0,0,0,NULL,&atx[60],NULL,0,&atx[1024]} ,
+ {0, "comment" ,128,4,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1025]} ,
+ {0, "product" ,128,5,0,1,0,0,0,0,NULL,&atx[927],NULL,0,&atx[1026]} ,
+ {0, "location" ,128,6,0,0,0,0,0,0,NULL,&atx[927],NULL,0,&atx[1027]} ,
+ {0, "qual" ,128,7,0,1,0,0,0,0,NULL,&atx[66],&atx[1028],0,&atx[1032]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1029],NULL,0,NULL} ,
+ {421, "Gb-qual" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1030],0,&atx[1039]} ,
+ {0, "qual" ,128,0,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1031]} ,
{0, "val" ,128,1,0,0,0,0,0,0,NULL,&atx[2],NULL,0,NULL} ,
- {0, "title" ,128,8,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1032]} ,
- {0, "ext" ,128,9,0,1,0,0,0,0,NULL,&atx[983],NULL,0,&atx[1033]} ,
- {0, "cit" ,128,10,0,1,0,0,0,0,NULL,&atx[1034],NULL,0,&atx[1035]} ,
+ {0, "title" ,128,8,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1033]} ,
+ {0, "ext" ,128,9,0,1,0,0,0,0,NULL,&atx[984],NULL,0,&atx[1034]} ,
+ {0, "cit" ,128,10,0,1,0,0,0,0,NULL,&atx[1035],NULL,0,&atx[1036]} ,
{416, "Pub-set" ,1,0,0,0,0,0,1,0,NULL,&atx[329],NULL,0,&atx[433]} ,
- {0, "exp-ev" ,128,11,0,1,0,0,0,0,NULL,&atx[42],&avnx[494],0,&atx[1036]} ,
- {0, "xref" ,128,12,0,1,0,0,0,0,NULL,&atx[45],&atx[1037],0,&atx[1041]} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1038],NULL,0,NULL} ,
- {422, "SeqFeatXref" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1039],0,&atx[905]} ,
- {0, "id" ,128,0,0,1,0,0,0,0,NULL,&atx[428],NULL,0,&atx[1040]} ,
- {0, "data" ,128,1,0,1,0,0,0,0,NULL,&atx[887],NULL,0,NULL} ,
- {0, "dbxref" ,128,13,0,1,0,0,0,0,NULL,&atx[45],&atx[1042],0,&atx[1043]} ,
+ {0, "exp-ev" ,128,11,0,1,0,0,0,0,NULL,&atx[42],&avnx[498],0,&atx[1037]} ,
+ {0, "xref" ,128,12,0,1,0,0,0,0,NULL,&atx[45],&atx[1038],0,&atx[1042]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1039],NULL,0,NULL} ,
+ {422, "SeqFeatXref" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1040],0,&atx[906]} ,
+ {0, "id" ,128,0,0,1,0,0,0,0,NULL,&atx[428],NULL,0,&atx[1041]} ,
+ {0, "data" ,128,1,0,1,0,0,0,0,NULL,&atx[888],NULL,0,NULL} ,
+ {0, "dbxref" ,128,13,0,1,0,0,0,0,NULL,&atx[45],&atx[1043],0,&atx[1044]} ,
{0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[435],NULL,0,NULL} ,
- {0, "pseudo" ,128,14,0,1,0,0,0,0,NULL,&atx[60],NULL,0,&atx[1044]} ,
- {0, "except-text" ,128,15,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1045]} ,
- {0, "ids" ,128,16,0,1,0,0,0,0,NULL,&atx[45],&atx[1046],0,&atx[1047]} ,
+ {0, "pseudo" ,128,14,0,1,0,0,0,0,NULL,&atx[60],NULL,0,&atx[1045]} ,
+ {0, "except-text" ,128,15,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1046]} ,
+ {0, "ids" ,128,16,0,1,0,0,0,0,NULL,&atx[45],&atx[1047],0,&atx[1048]} ,
{0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[428],NULL,0,NULL} ,
- {0, "exts" ,128,17,0,1,0,0,0,0,NULL,&atx[45],&atx[1048],0,NULL} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[983],NULL,0,NULL} ,
- {0, "delta" ,128,3,0,0,0,0,0,0,NULL,&atx[1050],NULL,0,NULL} ,
- {417, "Delta-ext" ,1,0,0,0,0,1,0,0,NULL,&atx[66],&atx[1051],0,&atx[630]} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1052],NULL,0,NULL} ,
- {446, "Delta-seq" ,1,0,0,0,0,0,0,0,NULL,&atx[14],&atx[1053],0,&atx[1064]} ,
- {0, "loc" ,128,0,0,0,0,0,0,0,NULL,&atx[640],NULL,0,&atx[1054]} ,
- {0, "literal" ,128,1,0,0,0,0,0,0,NULL,&atx[1055],NULL,0,NULL} ,
- {416, "Seq-literal" ,1,0,0,0,0,1,0,0,NULL,&atx[13],&atx[1056],0,&atx[1050]} ,
- {0, "length" ,128,0,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1057]} ,
- {0, "fuzz" ,128,1,0,1,0,0,0,0,NULL,&atx[844],NULL,0,&atx[1058]} ,
- {0, "seq-data" ,128,2,0,1,0,0,0,0,NULL,&atx[848],NULL,0,NULL} ,
- {0, "hist" ,128,8,0,1,0,0,0,0,NULL,&atx[1060],NULL,0,NULL} ,
- {414, "Seq-hist" ,1,0,0,0,0,1,0,0,NULL,&atx[13],&atx[1061],0,&atx[839]} ,
- {0, "assembly" ,128,0,0,1,0,0,0,0,NULL,&atx[45],&atx[1062],0,&atx[1063]} ,
+ {0, "exts" ,128,17,0,1,0,0,0,0,NULL,&atx[45],&atx[1049],0,NULL} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[984],NULL,0,NULL} ,
+ {0, "delta" ,128,3,0,0,0,0,0,0,NULL,&atx[1051],NULL,0,NULL} ,
+ {417, "Delta-ext" ,1,0,0,0,0,1,0,0,NULL,&atx[66],&atx[1052],0,&atx[630]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1053],NULL,0,NULL} ,
+ {447, "Delta-seq" ,1,0,0,0,0,0,0,0,NULL,&atx[14],&atx[1054],0,&atx[1065]} ,
+ {0, "loc" ,128,0,0,0,0,0,0,0,NULL,&atx[640],NULL,0,&atx[1055]} ,
+ {0, "literal" ,128,1,0,0,0,0,0,0,NULL,&atx[1056],NULL,0,NULL} ,
+ {416, "Seq-literal" ,1,0,0,0,0,1,0,0,NULL,&atx[13],&atx[1057],0,&atx[1051]} ,
+ {0, "length" ,128,0,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1058]} ,
+ {0, "fuzz" ,128,1,0,1,0,0,0,0,NULL,&atx[845],NULL,0,&atx[1059]} ,
+ {0, "seq-data" ,128,2,0,1,0,0,0,0,NULL,&atx[849],NULL,0,NULL} ,
+ {0, "hist" ,128,8,0,1,0,0,0,0,NULL,&atx[1061],NULL,0,NULL} ,
+ {414, "Seq-hist" ,1,0,0,0,0,1,0,0,NULL,&atx[13],&atx[1062],0,&atx[840]} ,
+ {0, "assembly" ,128,0,0,1,0,0,0,0,NULL,&atx[45],&atx[1063],0,&atx[1064]} ,
{0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[462],NULL,0,NULL} ,
- {0, "replaces" ,128,1,0,1,0,0,0,0,NULL,&atx[1064],NULL,0,&atx[1068]} ,
- {447, "Seq-hist-rec" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1065],0,&atx[850]} ,
- {0, "date" ,128,0,0,1,0,0,0,0,NULL,&atx[630],NULL,0,&atx[1066]} ,
- {0, "ids" ,128,1,0,0,0,0,0,0,NULL,&atx[45],&atx[1067],0,NULL} ,
+ {0, "replaces" ,128,1,0,1,0,0,0,0,NULL,&atx[1065],NULL,0,&atx[1069]} ,
+ {448, "Seq-hist-rec" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1066],0,&atx[851]} ,
+ {0, "date" ,128,0,0,1,0,0,0,0,NULL,&atx[630],NULL,0,&atx[1067]} ,
+ {0, "ids" ,128,1,0,0,0,0,0,0,NULL,&atx[45],&atx[1068],0,NULL} ,
{0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[633],NULL,0,NULL} ,
- {0, "replaced-by" ,128,2,0,1,0,0,0,0,NULL,&atx[1064],NULL,0,&atx[1069]} ,
- {0, "deleted" ,128,3,0,1,0,0,0,0,NULL,&atx[14],&atx[1070],0,NULL} ,
- {0, "bool" ,128,0,0,0,0,0,0,0,NULL,&atx[60],NULL,0,&atx[1071]} ,
+ {0, "replaced-by" ,128,2,0,1,0,0,0,0,NULL,&atx[1065],NULL,0,&atx[1070]} ,
+ {0, "deleted" ,128,3,0,1,0,0,0,0,NULL,&atx[14],&atx[1071],0,NULL} ,
+ {0, "bool" ,128,0,0,0,0,0,0,0,NULL,&atx[60],NULL,0,&atx[1072]} ,
{0, "date" ,128,1,0,0,0,0,0,0,NULL,&atx[630],NULL,0,NULL} ,
- {0, "annot" ,128,3,0,1,0,0,0,0,NULL,&atx[45],&atx[1073],0,NULL} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1074],NULL,0,NULL} ,
- {409, "Seq-annot" ,1,0,0,0,0,1,0,0,NULL,&atx[13],&atx[1075],0,&atx[848]} ,
- {0, "id" ,128,0,0,1,0,0,0,0,NULL,&atx[45],&atx[1076],0,&atx[1082]} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1077],NULL,0,NULL} ,
- {459, "Annot-id" ,1,0,0,0,0,0,0,0,NULL,&atx[14],&atx[1078],0,&atx[635]} ,
- {0, "local" ,128,0,0,0,0,0,0,0,NULL,&atx[1079],NULL,0,&atx[1080]} ,
+ {0, "annot" ,128,3,0,1,0,0,0,0,NULL,&atx[45],&atx[1074],0,NULL} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1075],NULL,0,NULL} ,
+ {409, "Seq-annot" ,1,0,0,0,0,1,0,0,NULL,&atx[13],&atx[1076],0,&atx[849]} ,
+ {0, "id" ,128,0,0,1,0,0,0,0,NULL,&atx[45],&atx[1077],0,&atx[1083]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1078],NULL,0,NULL} ,
+ {460, "Annot-id" ,1,0,0,0,0,0,0,0,NULL,&atx[14],&atx[1079],0,&atx[635]} ,
+ {0, "local" ,128,0,0,0,0,0,0,0,NULL,&atx[1080],NULL,0,&atx[1081]} ,
{421, "Object-id" ,1,0,0,0,0,0,1,0,NULL,&atx[20],NULL,0,&atx[628]} ,
- {0, "ncbi" ,128,1,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1081]} ,
+ {0, "ncbi" ,128,1,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1082]} ,
{0, "general" ,128,2,0,0,0,0,0,0,NULL,&atx[705],NULL,0,NULL} ,
- {0, "db" ,128,1,0,1,0,0,0,0,NULL,&atx[6],&avnx[496],0,&atx[1083]} ,
- {0, "name" ,128,2,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1084]} ,
- {0, "desc" ,128,3,0,1,0,0,0,0,NULL,&atx[641],NULL,0,&atx[1085]} ,
- {0, "data" ,128,4,0,0,0,0,0,0,NULL,&atx[14],&atx[1086],0,NULL} ,
- {0, "ftable" ,128,0,0,0,0,0,0,0,NULL,&atx[45],&atx[1087],0,&atx[1088]} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[883],NULL,0,NULL} ,
- {0, "align" ,128,1,0,0,0,0,0,0,NULL,&atx[45],&atx[1089],0,&atx[1090]} ,
+ {0, "db" ,128,1,0,1,0,0,0,0,NULL,&atx[6],&avnx[500],0,&atx[1084]} ,
+ {0, "name" ,128,2,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1085]} ,
+ {0, "desc" ,128,3,0,1,0,0,0,0,NULL,&atx[641],NULL,0,&atx[1086]} ,
+ {0, "data" ,128,4,0,0,0,0,0,0,NULL,&atx[14],&atx[1087],0,NULL} ,
+ {0, "ftable" ,128,0,0,0,0,0,0,0,NULL,&atx[45],&atx[1088],0,&atx[1089]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[884],NULL,0,NULL} ,
+ {0, "align" ,128,1,0,0,0,0,0,0,NULL,&atx[45],&atx[1090],0,&atx[1091]} ,
{0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[462],NULL,0,NULL} ,
- {0, "graph" ,128,2,0,0,0,0,0,0,NULL,&atx[45],&atx[1091],0,&atx[1125]} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1092],NULL,0,NULL} ,
- {425, "Seq-graph" ,1,0,0,0,0,0,1,0,NULL,&atx[1093],NULL,0,&atx[443]} ,
- {401, "Seq-graph" ,1,0,0,0,0,1,0,0,NULL,&atx[13],&atx[1094],0,&atx[1097]} ,
- {0, "title" ,128,0,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1095]} ,
- {0, "comment" ,128,1,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1096]} ,
- {0, "loc" ,128,2,0,0,0,0,0,0,NULL,&atx[1097],NULL,0,&atx[1098]} ,
- {402, "Seq-loc" ,1,0,0,0,0,0,1,0,NULL,&atx[385],NULL,0,&atx[1106]} ,
- {0, "title-x" ,128,3,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1099]} ,
- {0, "title-y" ,128,4,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1100]} ,
- {0, "comp" ,128,5,0,1,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1101]} ,
- {0, "a" ,128,6,0,1,0,0,0,0,NULL,&atx[58],NULL,0,&atx[1102]} ,
- {0, "b" ,128,7,0,1,0,0,0,0,NULL,&atx[58],NULL,0,&atx[1103]} ,
- {0, "numval" ,128,8,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1104]} ,
- {0, "graph" ,128,9,0,0,0,0,0,0,NULL,&atx[14],&atx[1105],0,NULL} ,
- {0, "real" ,128,0,0,0,0,0,0,0,NULL,&atx[1106],NULL,0,&atx[1112]} ,
- {403, "Real-graph" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1107],0,&atx[1113]} ,
- {0, "max" ,128,0,0,0,0,0,0,0,NULL,&atx[58],NULL,0,&atx[1108]} ,
- {0, "min" ,128,1,0,0,0,0,0,0,NULL,&atx[58],NULL,0,&atx[1109]} ,
- {0, "axis" ,128,2,0,0,0,0,0,0,NULL,&atx[58],NULL,0,&atx[1110]} ,
- {0, "values" ,128,3,0,0,0,0,0,0,NULL,&atx[66],&atx[1111],0,NULL} ,
+ {0, "graph" ,128,2,0,0,0,0,0,0,NULL,&atx[45],&atx[1092],0,&atx[1126]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1093],NULL,0,NULL} ,
+ {425, "Seq-graph" ,1,0,0,0,0,0,1,0,NULL,&atx[1094],NULL,0,&atx[443]} ,
+ {401, "Seq-graph" ,1,0,0,0,0,1,0,0,NULL,&atx[13],&atx[1095],0,&atx[1098]} ,
+ {0, "title" ,128,0,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1096]} ,
+ {0, "comment" ,128,1,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1097]} ,
+ {0, "loc" ,128,2,0,0,0,0,0,0,NULL,&atx[1098],NULL,0,&atx[1099]} ,
+ {402, "Seq-loc" ,1,0,0,0,0,0,1,0,NULL,&atx[385],NULL,0,&atx[1107]} ,
+ {0, "title-x" ,128,3,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1100]} ,
+ {0, "title-y" ,128,4,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1101]} ,
+ {0, "comp" ,128,5,0,1,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1102]} ,
+ {0, "a" ,128,6,0,1,0,0,0,0,NULL,&atx[58],NULL,0,&atx[1103]} ,
+ {0, "b" ,128,7,0,1,0,0,0,0,NULL,&atx[58],NULL,0,&atx[1104]} ,
+ {0, "numval" ,128,8,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1105]} ,
+ {0, "graph" ,128,9,0,0,0,0,0,0,NULL,&atx[14],&atx[1106],0,NULL} ,
+ {0, "real" ,128,0,0,0,0,0,0,0,NULL,&atx[1107],NULL,0,&atx[1113]} ,
+ {403, "Real-graph" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1108],0,&atx[1114]} ,
+ {0, "max" ,128,0,0,0,0,0,0,0,NULL,&atx[58],NULL,0,&atx[1109]} ,
+ {0, "min" ,128,1,0,0,0,0,0,0,NULL,&atx[58],NULL,0,&atx[1110]} ,
+ {0, "axis" ,128,2,0,0,0,0,0,0,NULL,&atx[58],NULL,0,&atx[1111]} ,
+ {0, "values" ,128,3,0,0,0,0,0,0,NULL,&atx[66],&atx[1112],0,NULL} ,
{0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[58],NULL,0,NULL} ,
- {0, "int" ,128,1,0,0,0,0,0,0,NULL,&atx[1113],NULL,0,&atx[1119]} ,
- {404, "Int-graph" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1114],0,&atx[1120]} ,
- {0, "max" ,128,0,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1115]} ,
- {0, "min" ,128,1,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1116]} ,
- {0, "axis" ,128,2,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1117]} ,
- {0, "values" ,128,3,0,0,0,0,0,0,NULL,&atx[66],&atx[1118],0,NULL} ,
+ {0, "int" ,128,1,0,0,0,0,0,0,NULL,&atx[1114],NULL,0,&atx[1120]} ,
+ {404, "Int-graph" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1115],0,&atx[1121]} ,
+ {0, "max" ,128,0,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1116]} ,
+ {0, "min" ,128,1,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1117]} ,
+ {0, "axis" ,128,2,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1118]} ,
+ {0, "values" ,128,3,0,0,0,0,0,0,NULL,&atx[66],&atx[1119],0,NULL} ,
{0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[6],NULL,0,NULL} ,
- {0, "byte" ,128,2,0,0,0,0,0,0,NULL,&atx[1120],NULL,0,NULL} ,
- {405, "Byte-graph" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1121],0,NULL} ,
- {0, "max" ,128,0,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1122]} ,
- {0, "min" ,128,1,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1123]} ,
- {0, "axis" ,128,2,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1124]} ,
+ {0, "byte" ,128,2,0,0,0,0,0,0,NULL,&atx[1121],NULL,0,NULL} ,
+ {405, "Byte-graph" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1122],0,NULL} ,
+ {0, "max" ,128,0,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1123]} ,
+ {0, "min" ,128,1,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1124]} ,
+ {0, "axis" ,128,2,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1125]} ,
{0, "values" ,128,3,0,0,0,0,0,0,NULL,&atx[62],NULL,0,NULL} ,
- {0, "ids" ,128,3,0,0,0,0,0,0,NULL,&atx[45],&atx[1126],0,&atx[1127]} ,
+ {0, "ids" ,128,3,0,0,0,0,0,0,NULL,&atx[45],&atx[1127],0,&atx[1128]} ,
{0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[633],NULL,0,NULL} ,
- {0, "locs" ,128,4,0,0,0,0,0,0,NULL,&atx[45],&atx[1128],0,NULL} ,
+ {0, "locs" ,128,4,0,0,0,0,0,0,NULL,&atx[45],&atx[1129],0,&atx[1130]} ,
{0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[640],NULL,0,NULL} ,
- {401, "Bioseq-set" ,1,0,0,0,0,1,0,0,NULL,&atx[13],&atx[1130],0,&atx[1143]} ,
- {0, "id" ,128,0,0,1,0,0,0,0,NULL,&atx[1131],NULL,0,&atx[1132]} ,
- {406, "Object-id" ,1,0,0,0,0,0,1,0,NULL,&atx[20],NULL,0,&atx[1133]} ,
- {0, "coll" ,128,1,0,1,0,0,0,0,NULL,&atx[1133],NULL,0,&atx[1134]} ,
- {407, "Dbtag" ,1,0,0,0,0,0,1,0,NULL,&atx[17],NULL,0,&atx[1138]} ,
- {0, "level" ,128,2,0,1,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1135]} ,
- {0, "class" ,128,3,0,0,1,0,0,0,&avnx[524],&atx[42],&avnx[504],0,&atx[1136]} ,
- {0, "release" ,128,4,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1137]} ,
- {0, "date" ,128,5,0,1,0,0,0,0,NULL,&atx[1138],NULL,0,&atx[1139]} ,
+ {0, "seq-table" ,128,5,0,0,0,0,0,0,NULL,&atx[1131],NULL,0,NULL} ,
+ {437, "Seq-table" ,1,0,0,0,0,0,1,0,NULL,&atx[1132],NULL,0,&atx[654]} ,
+ {403, "Seq-table" ,1,0,0,0,0,1,0,0,NULL,&atx[13],&atx[1133],0,&atx[1172]} ,
+ {0, "feat-type" ,128,0,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1134]} ,
+ {0, "feat-subtype" ,128,1,0,1,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1135]} ,
+ {0, "num-rows" ,128,2,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1136]} ,
+ {0, "columns" ,128,3,0,0,0,0,0,0,NULL,&atx[66],&atx[1137],0,NULL} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1138],NULL,0,NULL} ,
+ {402, "SeqTable-column" ,1,0,0,0,0,1,0,0,NULL,&atx[13],&atx[1139],0,&atx[1132]} ,
+ {0, "header" ,128,0,0,0,0,0,0,0,NULL,&atx[1140],NULL,0,&atx[1144]} ,
+ {401, "SeqTable-column-info" ,1,0,0,0,0,1,0,0,NULL,&atx[13],&atx[1141],0,&atx[1138]} ,
+ {0, "title" ,128,0,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1142]} ,
+ {0, "field-id" ,128,1,0,1,0,0,0,0,NULL,&atx[6],&avnx[508],0,&atx[1143]} ,
+ {0, "field-name" ,128,2,0,1,0,0,0,0,NULL,&atx[2],NULL,0,NULL} ,
+ {0, "data" ,128,1,0,1,0,0,0,0,NULL,&atx[1145],NULL,0,&atx[1176]} ,
+ {409, "SeqTable-multi-data" ,1,0,0,0,0,0,0,0,NULL,&atx[14],&atx[1146],0,&atx[1182]} ,
+ {0, "int" ,128,0,0,0,0,0,0,0,NULL,&atx[66],&atx[1147],0,&atx[1148]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[6],NULL,0,NULL} ,
+ {0, "real" ,128,1,0,0,0,0,0,0,NULL,&atx[66],&atx[1149],0,&atx[1150]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[58],NULL,0,NULL} ,
+ {0, "string" ,128,2,0,0,0,0,0,0,NULL,&atx[66],&atx[1151],0,&atx[1152]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[2],NULL,0,NULL} ,
+ {0, "bytes" ,128,3,0,0,0,0,0,0,NULL,&atx[66],&atx[1153],0,&atx[1154]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[62],NULL,0,NULL} ,
+ {0, "common-string" ,128,4,0,0,0,0,0,0,NULL,&atx[1155],NULL,0,&atx[1160]} ,
+ {407, "CommonString-table" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1156],0,&atx[1161]} ,
+ {0, "strings" ,128,0,0,0,0,0,0,0,NULL,&atx[66],&atx[1157],0,&atx[1158]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[2],NULL,0,NULL} ,
+ {0, "indexes" ,128,1,0,0,0,0,0,0,NULL,&atx[66],&atx[1159],0,NULL} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[6],NULL,0,NULL} ,
+ {0, "common-bytes" ,128,5,0,0,0,0,0,0,NULL,&atx[1161],NULL,0,&atx[1166]} ,
+ {408, "CommonBytes-table" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1162],0,&atx[1145]} ,
+ {0, "bytes" ,128,0,0,0,0,0,0,0,NULL,&atx[66],&atx[1163],0,&atx[1164]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[62],NULL,0,NULL} ,
+ {0, "indexes" ,128,1,0,0,0,0,0,0,NULL,&atx[66],&atx[1165],0,NULL} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[6],NULL,0,NULL} ,
+ {0, "bit" ,128,6,0,0,0,0,0,0,NULL,&atx[62],NULL,0,&atx[1167]} ,
+ {0, "loc" ,128,7,0,0,0,0,0,0,NULL,&atx[66],&atx[1168],0,&atx[1170]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1169],NULL,0,NULL} ,
+ {405, "Seq-loc" ,1,0,0,0,0,0,1,0,NULL,&atx[385],NULL,0,&atx[1175]} ,
+ {0, "id" ,128,8,0,0,0,0,0,0,NULL,&atx[66],&atx[1171],0,&atx[1173]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1172],NULL,0,NULL} ,
+ {404, "Seq-id" ,1,0,0,0,0,0,1,0,NULL,&atx[344],NULL,0,&atx[1169]} ,
+ {0, "interval" ,128,9,0,0,0,0,0,0,NULL,&atx[66],&atx[1174],0,NULL} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1175],NULL,0,NULL} ,
+ {406, "Seq-interval" ,1,0,0,0,0,0,1,0,NULL,&atx[391],NULL,0,&atx[1155]} ,
+ {0, "sparse" ,128,2,0,1,0,0,0,0,NULL,&atx[1177],NULL,0,&atx[1181]} ,
+ {411, "SeqTable-sparse-index" ,1,0,0,0,0,0,0,0,NULL,&atx[14],&atx[1178],0,NULL} ,
+ {0, "indexes" ,128,0,0,0,0,0,0,0,NULL,&atx[66],&atx[1179],0,&atx[1180]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[6],NULL,0,NULL} ,
+ {0, "bit-set" ,128,1,0,0,0,0,0,0,NULL,&atx[62],NULL,0,NULL} ,
+ {0, "default" ,128,3,0,1,0,0,0,0,NULL,&atx[1182],NULL,0,&atx[1191]} ,
+ {410, "SeqTable-single-data" ,1,0,0,0,0,0,0,0,NULL,&atx[14],&atx[1183],0,&atx[1177]} ,
+ {0, "int" ,128,0,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1184]} ,
+ {0, "real" ,128,1,0,0,0,0,0,0,NULL,&atx[58],NULL,0,&atx[1185]} ,
+ {0, "string" ,128,2,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1186]} ,
+ {0, "bytes" ,128,3,0,0,0,0,0,0,NULL,&atx[62],NULL,0,&atx[1187]} ,
+ {0, "bit" ,128,4,0,0,0,0,0,0,NULL,&atx[60],NULL,0,&atx[1188]} ,
+ {0, "loc" ,128,5,0,0,0,0,0,0,NULL,&atx[1169],NULL,0,&atx[1189]} ,
+ {0, "id" ,128,6,0,0,0,0,0,0,NULL,&atx[1172],NULL,0,&atx[1190]} ,
+ {0, "interval" ,128,7,0,0,0,0,0,0,NULL,&atx[1175],NULL,0,NULL} ,
+ {0, "sparse-other" ,128,4,0,1,0,0,0,0,NULL,&atx[1182],NULL,0,NULL} ,
+ {401, "Bioseq-set" ,1,0,0,0,0,1,0,0,NULL,&atx[13],&atx[1193],0,&atx[1206]} ,
+ {0, "id" ,128,0,0,1,0,0,0,0,NULL,&atx[1194],NULL,0,&atx[1195]} ,
+ {406, "Object-id" ,1,0,0,0,0,0,1,0,NULL,&atx[20],NULL,0,&atx[1196]} ,
+ {0, "coll" ,128,1,0,1,0,0,0,0,NULL,&atx[1196],NULL,0,&atx[1197]} ,
+ {407, "Dbtag" ,1,0,0,0,0,0,1,0,NULL,&atx[17],NULL,0,&atx[1201]} ,
+ {0, "level" ,128,2,0,1,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1198]} ,
+ {0, "class" ,128,3,0,0,1,0,0,0,&avnx[560],&atx[42],&avnx[540],0,&atx[1199]} ,
+ {0, "release" ,128,4,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1200]} ,
+ {0, "date" ,128,5,0,1,0,0,0,0,NULL,&atx[1201],NULL,0,&atx[1202]} ,
{408, "Date" ,1,0,0,0,0,0,1,0,NULL,&atx[0],NULL,0,NULL} ,
- {0, "descr" ,128,6,0,1,0,0,0,0,NULL,&atx[1140],NULL,0,&atx[1141]} ,
- {405, "Seq-descr" ,1,0,0,0,0,0,1,0,NULL,&atx[647],NULL,0,&atx[1131]} ,
- {0, "seq-set" ,128,7,0,0,0,0,0,0,NULL,&atx[66],&atx[1142],0,&atx[1147]} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1143],NULL,0,NULL} ,
- {402, "Seq-entry" ,1,0,0,0,0,1,0,0,NULL,&atx[14],&atx[1144],0,&atx[1145]} ,
- {0, "seq" ,128,0,0,0,0,0,0,0,NULL,&atx[1145],NULL,0,&atx[1146]} ,
- {403, "Bioseq" ,1,0,0,0,0,0,1,0,NULL,&atx[643],NULL,0,&atx[1149]} ,
- {0, "set" ,128,1,0,0,0,0,0,0,NULL,&atx[1129],NULL,0,NULL} ,
- {0, "annot" ,128,8,0,1,0,0,0,0,NULL,&atx[45],&atx[1148],0,NULL} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1149],NULL,0,NULL} ,
- {404, "Seq-annot" ,1,0,0,0,0,0,1,0,NULL,&atx[1074],NULL,0,&atx[1140]} ,
- {401, "Seq-code-table" ,1,0,0,0,0,1,0,0,NULL,&atx[13],&atx[1151],0,&atx[1162]} ,
- {0, "code" ,128,0,0,0,0,0,0,0,NULL,&atx[1152],NULL,0,&atx[1153]} ,
- {404, "Seq-code-type" ,1,0,0,0,0,0,0,0,NULL,&atx[42],&avnx[525],0,NULL} ,
- {0, "num" ,128,1,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1154]} ,
- {0, "one-letter" ,128,2,0,0,0,0,0,0,NULL,&atx[60],NULL,0,&atx[1155]} ,
- {0, "start-at" ,128,3,0,0,1,0,0,0,&avnx[536],&atx[6],NULL,0,&atx[1156]} ,
- {0, "table" ,128,4,0,0,0,0,0,0,NULL,&atx[66],&atx[1157],0,&atx[1160]} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[13],&atx[1158],0,NULL} ,
- {0, "symbol" ,128,0,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1159]} ,
+ {0, "descr" ,128,6,0,1,0,0,0,0,NULL,&atx[1203],NULL,0,&atx[1204]} ,
+ {405, "Seq-descr" ,1,0,0,0,0,0,1,0,NULL,&atx[647],NULL,0,&atx[1194]} ,
+ {0, "seq-set" ,128,7,0,0,0,0,0,0,NULL,&atx[66],&atx[1205],0,&atx[1210]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1206],NULL,0,NULL} ,
+ {402, "Seq-entry" ,1,0,0,0,0,1,0,0,NULL,&atx[14],&atx[1207],0,&atx[1208]} ,
+ {0, "seq" ,128,0,0,0,0,0,0,0,NULL,&atx[1208],NULL,0,&atx[1209]} ,
+ {403, "Bioseq" ,1,0,0,0,0,0,1,0,NULL,&atx[643],NULL,0,&atx[1212]} ,
+ {0, "set" ,128,1,0,0,0,0,0,0,NULL,&atx[1192],NULL,0,NULL} ,
+ {0, "annot" ,128,8,0,1,0,0,0,0,NULL,&atx[45],&atx[1211],0,NULL} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1212],NULL,0,NULL} ,
+ {404, "Seq-annot" ,1,0,0,0,0,0,1,0,NULL,&atx[1075],NULL,0,&atx[1203]} ,
+ {401, "Seq-code-table" ,1,0,0,0,0,1,0,0,NULL,&atx[13],&atx[1214],0,&atx[1225]} ,
+ {0, "code" ,128,0,0,0,0,0,0,0,NULL,&atx[1215],NULL,0,&atx[1216]} ,
+ {404, "Seq-code-type" ,1,0,0,0,0,0,0,0,NULL,&atx[42],&avnx[561],0,NULL} ,
+ {0, "num" ,128,1,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1217]} ,
+ {0, "one-letter" ,128,2,0,0,0,0,0,0,NULL,&atx[60],NULL,0,&atx[1218]} ,
+ {0, "start-at" ,128,3,0,0,1,0,0,0,&avnx[572],&atx[6],NULL,0,&atx[1219]} ,
+ {0, "table" ,128,4,0,0,0,0,0,0,NULL,&atx[66],&atx[1220],0,&atx[1223]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[13],&atx[1221],0,NULL} ,
+ {0, "symbol" ,128,0,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1222]} ,
{0, "name" ,128,1,0,0,0,0,0,0,NULL,&atx[2],NULL,0,NULL} ,
- {0, "comps" ,128,5,0,1,0,0,0,0,NULL,&atx[66],&atx[1161],0,NULL} ,
+ {0, "comps" ,128,5,0,1,0,0,0,0,NULL,&atx[66],&atx[1224],0,NULL} ,
{0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[6],NULL,0,NULL} ,
- {402, "Seq-map-table" ,1,0,0,0,0,1,0,0,NULL,&atx[13],&atx[1163],0,&atx[1169]} ,
- {0, "from" ,128,0,0,0,0,0,0,0,NULL,&atx[1152],NULL,0,&atx[1164]} ,
- {0, "to" ,128,1,0,0,0,0,0,0,NULL,&atx[1152],NULL,0,&atx[1165]} ,
- {0, "num" ,128,2,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1166]} ,
- {0, "start-at" ,128,3,0,0,1,0,0,0,&avnx[537],&atx[6],NULL,0,&atx[1167]} ,
- {0, "table" ,128,4,0,0,0,0,0,0,NULL,&atx[66],&atx[1168],0,NULL} ,
+ {402, "Seq-map-table" ,1,0,0,0,0,1,0,0,NULL,&atx[13],&atx[1226],0,&atx[1232]} ,
+ {0, "from" ,128,0,0,0,0,0,0,0,NULL,&atx[1215],NULL,0,&atx[1227]} ,
+ {0, "to" ,128,1,0,0,0,0,0,0,NULL,&atx[1215],NULL,0,&atx[1228]} ,
+ {0, "num" ,128,2,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1229]} ,
+ {0, "start-at" ,128,3,0,0,1,0,0,0,&avnx[573],&atx[6],NULL,0,&atx[1230]} ,
+ {0, "table" ,128,4,0,0,0,0,0,0,NULL,&atx[66],&atx[1231],0,NULL} ,
{0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[6],NULL,0,NULL} ,
- {403, "Seq-code-set" ,1,0,0,0,0,1,0,0,NULL,&atx[13],&atx[1170],0,&atx[1152]} ,
- {0, "codes" ,128,0,0,1,0,0,0,0,NULL,&atx[45],&atx[1171],0,&atx[1172]} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1150],NULL,0,NULL} ,
- {0, "maps" ,128,1,0,1,0,0,0,0,NULL,&atx[45],&atx[1173],0,NULL} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1162],NULL,0,NULL} ,
- {426, "Genetic-code-table" ,1,0,0,0,0,0,0,0,NULL,&atx[45],&atx[1175],0,NULL} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[912],NULL,0,NULL} ,
- {401, "Seq-submit" ,1,0,0,0,0,1,0,0,NULL,&atx[13],&atx[1177],0,&atx[1180]} ,
- {0, "sub" ,128,0,0,0,0,0,0,0,NULL,&atx[1178],NULL,0,&atx[1205]} ,
- {410, "Submit-block" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1179],0,NULL} ,
- {0, "contact" ,128,0,0,0,0,0,0,0,NULL,&atx[1180],NULL,0,&atx[1196]} ,
- {402, "Contact-info" ,1,0,0,0,0,1,0,0,NULL,&atx[13],&atx[1181],0,&atx[1197]} ,
- {0, "name" ,128,0,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1182]} ,
- {0, "address" ,128,1,0,1,0,0,0,0,NULL,&atx[66],&atx[1183],0,&atx[1184]} ,
+ {403, "Seq-code-set" ,1,0,0,0,0,1,0,0,NULL,&atx[13],&atx[1233],0,&atx[1215]} ,
+ {0, "codes" ,128,0,0,1,0,0,0,0,NULL,&atx[45],&atx[1234],0,&atx[1235]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1213],NULL,0,NULL} ,
+ {0, "maps" ,128,1,0,1,0,0,0,0,NULL,&atx[45],&atx[1236],0,NULL} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1225],NULL,0,NULL} ,
+ {426, "Genetic-code-table" ,1,0,0,0,0,0,0,0,NULL,&atx[45],&atx[1238],0,NULL} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[913],NULL,0,NULL} ,
+ {401, "Seq-submit" ,1,0,0,0,0,1,0,0,NULL,&atx[13],&atx[1240],0,&atx[1243]} ,
+ {0, "sub" ,128,0,0,0,0,0,0,0,NULL,&atx[1241],NULL,0,&atx[1268]} ,
+ {410, "Submit-block" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1242],0,NULL} ,
+ {0, "contact" ,128,0,0,0,0,0,0,0,NULL,&atx[1243],NULL,0,&atx[1259]} ,
+ {402, "Contact-info" ,1,0,0,0,0,1,0,0,NULL,&atx[13],&atx[1244],0,&atx[1260]} ,
+ {0, "name" ,128,0,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1245]} ,
+ {0, "address" ,128,1,0,1,0,0,0,0,NULL,&atx[66],&atx[1246],0,&atx[1247]} ,
{0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[2],NULL,0,NULL} ,
- {0, "phone" ,128,2,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1185]} ,
- {0, "fax" ,128,3,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1186]} ,
- {0, "email" ,128,4,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1187]} ,
- {0, "telex" ,128,5,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1188]} ,
- {0, "owner-id" ,128,6,0,1,0,0,0,0,NULL,&atx[1189],NULL,0,&atx[1190]} ,
- {406, "Object-id" ,1,0,0,0,0,0,1,0,NULL,&atx[20],NULL,0,&atx[1211]} ,
- {0, "password" ,128,7,0,1,0,0,0,0,NULL,&atx[62],NULL,0,&atx[1191]} ,
- {0, "last-name" ,128,8,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1192]} ,
- {0, "first-name" ,128,9,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1193]} ,
- {0, "middle-initial" ,128,10,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1194]} ,
- {0, "contact" ,128,11,0,1,0,0,0,0,NULL,&atx[1195],NULL,0,NULL} ,
- {404, "Author" ,1,0,0,0,0,0,1,0,NULL,&atx[96],NULL,0,&atx[1200]} ,
- {0, "cit" ,128,1,0,0,0,0,0,0,NULL,&atx[1197],NULL,0,&atx[1198]} ,
- {403, "Cit-sub" ,1,0,0,0,0,0,1,0,NULL,&atx[227],NULL,0,&atx[1195]} ,
- {0, "hup" ,128,2,0,0,1,0,0,0,&avnx[538],&atx[60],NULL,0,&atx[1199]} ,
- {0, "reldate" ,128,3,0,1,0,0,0,0,NULL,&atx[1200],NULL,0,&atx[1201]} ,
- {405, "Date" ,1,0,0,0,0,0,1,0,NULL,&atx[0],NULL,0,&atx[1189]} ,
- {0, "subtype" ,128,4,0,1,0,0,0,0,NULL,&atx[6],&avnx[539],0,&atx[1202]} ,
- {0, "tool" ,128,5,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1203]} ,
- {0, "user-tag" ,128,6,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1204]} ,
+ {0, "phone" ,128,2,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1248]} ,
+ {0, "fax" ,128,3,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1249]} ,
+ {0, "email" ,128,4,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1250]} ,
+ {0, "telex" ,128,5,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1251]} ,
+ {0, "owner-id" ,128,6,0,1,0,0,0,0,NULL,&atx[1252],NULL,0,&atx[1253]} ,
+ {406, "Object-id" ,1,0,0,0,0,0,1,0,NULL,&atx[20],NULL,0,&atx[1274]} ,
+ {0, "password" ,128,7,0,1,0,0,0,0,NULL,&atx[62],NULL,0,&atx[1254]} ,
+ {0, "last-name" ,128,8,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1255]} ,
+ {0, "first-name" ,128,9,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1256]} ,
+ {0, "middle-initial" ,128,10,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1257]} ,
+ {0, "contact" ,128,11,0,1,0,0,0,0,NULL,&atx[1258],NULL,0,NULL} ,
+ {404, "Author" ,1,0,0,0,0,0,1,0,NULL,&atx[96],NULL,0,&atx[1263]} ,
+ {0, "cit" ,128,1,0,0,0,0,0,0,NULL,&atx[1260],NULL,0,&atx[1261]} ,
+ {403, "Cit-sub" ,1,0,0,0,0,0,1,0,NULL,&atx[227],NULL,0,&atx[1258]} ,
+ {0, "hup" ,128,2,0,0,1,0,0,0,&avnx[574],&atx[60],NULL,0,&atx[1262]} ,
+ {0, "reldate" ,128,3,0,1,0,0,0,0,NULL,&atx[1263],NULL,0,&atx[1264]} ,
+ {405, "Date" ,1,0,0,0,0,0,1,0,NULL,&atx[0],NULL,0,&atx[1252]} ,
+ {0, "subtype" ,128,4,0,1,0,0,0,0,NULL,&atx[6],&avnx[575],0,&atx[1265]} ,
+ {0, "tool" ,128,5,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1266]} ,
+ {0, "user-tag" ,128,6,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1267]} ,
{0, "comment" ,128,7,0,1,0,0,0,0,NULL,&atx[2],NULL,0,NULL} ,
- {0, "data" ,128,1,0,0,0,0,0,0,NULL,&atx[14],&atx[1206],0,NULL} ,
- {0, "entrys" ,128,0,0,0,0,0,0,0,NULL,&atx[45],&atx[1207],0,&atx[1209]} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1208],NULL,0,NULL} ,
- {409, "Seq-entry" ,1,0,0,0,0,0,1,0,NULL,&atx[1143],NULL,0,&atx[1178]} ,
- {0, "annots" ,128,1,0,0,0,0,0,0,NULL,&atx[45],&atx[1210],0,&atx[1212]} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1211],NULL,0,NULL} ,
- {407, "Seq-annot" ,1,0,0,0,0,0,1,0,NULL,&atx[1074],NULL,0,&atx[1214]} ,
- {0, "delete" ,128,2,0,0,0,0,0,0,NULL,&atx[45],&atx[1213],0,NULL} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1214],NULL,0,NULL} ,
- {408, "Seq-id" ,1,0,0,0,0,0,1,0,NULL,&atx[344],NULL,0,&atx[1208]} ,
- {401, "Cn3d-style-dictionary" ,1,0,0,0,0,1,0,0,NULL,&atx[13],&atx[1216],0,&atx[1275]} ,
- {0, "global-style" ,128,0,0,0,0,0,0,0,NULL,&atx[1217],NULL,0,&atx[1269]} ,
- {413, "Cn3d-style-settings" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1218],0,&atx[1330]} ,
- {0, "name" ,128,0,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1219]} ,
- {0, "protein-backbone" ,128,1,0,0,0,0,0,0,NULL,&atx[1220],NULL,0,&atx[1234]} ,
- {410, "Cn3d-backbone-style" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1221],0,&atx[1236]} ,
- {0, "type" ,128,0,0,0,0,0,0,0,NULL,&atx[1222],NULL,0,&atx[1223]} ,
- {406, "Cn3d-backbone-type" ,1,0,0,0,0,0,0,0,NULL,&atx[42],&avnx[543],0,&atx[1224]} ,
- {0, "style" ,128,1,0,0,0,0,0,0,NULL,&atx[1224],NULL,0,&atx[1225]} ,
- {407, "Cn3d-drawing-style" ,1,0,0,0,0,0,0,0,NULL,&atx[42],&avnx[547],0,&atx[1226]} ,
- {0, "color-scheme" ,128,2,0,0,0,0,0,0,NULL,&atx[1226],NULL,0,&atx[1227]} ,
- {408, "Cn3d-color-scheme" ,1,0,0,0,0,0,0,0,NULL,&atx[42],&avnx[555],0,&atx[1228]} ,
- {0, "user-color" ,128,3,0,0,0,0,0,0,NULL,&atx[1228],NULL,0,NULL} ,
- {409, "Cn3d-color" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1229],0,&atx[1220]} ,
- {0, "scale-factor" ,128,0,0,0,1,0,0,0,&avnx[575],&atx[6],NULL,0,&atx[1230]} ,
- {0, "red" ,128,1,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1231]} ,
- {0, "green" ,128,2,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1232]} ,
- {0, "blue" ,128,3,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1233]} ,
- {0, "alpha" ,128,4,0,0,1,0,0,0,&avnx[576],&atx[6],NULL,0,NULL} ,
- {0, "nucleotide-backbone" ,128,2,0,0,0,0,0,0,NULL,&atx[1220],NULL,0,&atx[1235]} ,
- {0, "protein-sidechains" ,128,3,0,0,0,0,0,0,NULL,&atx[1236],NULL,0,&atx[1241]} ,
- {411, "Cn3d-general-style" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1237],0,&atx[1261]} ,
- {0, "is-on" ,128,0,0,0,0,0,0,0,NULL,&atx[60],NULL,0,&atx[1238]} ,
- {0, "style" ,128,1,0,0,0,0,0,0,NULL,&atx[1224],NULL,0,&atx[1239]} ,
- {0, "color-scheme" ,128,2,0,0,0,0,0,0,NULL,&atx[1226],NULL,0,&atx[1240]} ,
- {0, "user-color" ,128,3,0,0,0,0,0,0,NULL,&atx[1228],NULL,0,NULL} ,
- {0, "nucleotide-sidechains" ,128,4,0,0,0,0,0,0,NULL,&atx[1236],NULL,0,&atx[1242]} ,
- {0, "heterogens" ,128,5,0,0,0,0,0,0,NULL,&atx[1236],NULL,0,&atx[1243]} ,
- {0, "solvents" ,128,6,0,0,0,0,0,0,NULL,&atx[1236],NULL,0,&atx[1244]} ,
- {0, "connections" ,128,7,0,0,0,0,0,0,NULL,&atx[1236],NULL,0,&atx[1245]} ,
- {0, "helix-objects" ,128,8,0,0,0,0,0,0,NULL,&atx[1236],NULL,0,&atx[1246]} ,
- {0, "strand-objects" ,128,9,0,0,0,0,0,0,NULL,&atx[1236],NULL,0,&atx[1247]} ,
- {0, "virtual-disulfides-on" ,128,10,0,0,0,0,0,0,NULL,&atx[60],NULL,0,&atx[1248]} ,
- {0, "virtual-disulfide-color" ,128,11,0,0,0,0,0,0,NULL,&atx[1228],NULL,0,&atx[1249]} ,
- {0, "hydrogens-on" ,128,12,0,0,0,0,0,0,NULL,&atx[60],NULL,0,&atx[1250]} ,
- {0, "background-color" ,128,13,0,0,0,0,0,0,NULL,&atx[1228],NULL,0,&atx[1251]} ,
- {0, "scale-factor" ,128,14,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1252]} ,
- {0, "space-fill-proportion" ,128,15,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1253]} ,
- {0, "ball-radius" ,128,16,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1254]} ,
- {0, "stick-radius" ,128,17,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1255]} ,
- {0, "tube-radius" ,128,18,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1256]} ,
- {0, "tube-worm-radius" ,128,19,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1257]} ,
- {0, "helix-radius" ,128,20,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1258]} ,
- {0, "strand-width" ,128,21,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1259]} ,
- {0, "strand-thickness" ,128,22,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1260]} ,
- {0, "protein-labels" ,128,23,0,1,0,0,0,0,NULL,&atx[1261],NULL,0,&atx[1267]} ,
- {412, "Cn3d-backbone-label-style" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1262],0,&atx[1217]} ,
- {0, "spacing" ,128,0,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1263]} ,
- {0, "type" ,128,1,0,0,0,0,0,0,NULL,&atx[42],&avnx[577],0,&atx[1264]} ,
- {0, "number" ,128,2,0,0,0,0,0,0,NULL,&atx[42],&avnx[579],0,&atx[1265]} ,
- {0, "termini" ,128,3,0,0,0,0,0,0,NULL,&atx[60],NULL,0,&atx[1266]} ,
+ {0, "data" ,128,1,0,0,0,0,0,0,NULL,&atx[14],&atx[1269],0,NULL} ,
+ {0, "entrys" ,128,0,0,0,0,0,0,0,NULL,&atx[45],&atx[1270],0,&atx[1272]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1271],NULL,0,NULL} ,
+ {409, "Seq-entry" ,1,0,0,0,0,0,1,0,NULL,&atx[1206],NULL,0,&atx[1241]} ,
+ {0, "annots" ,128,1,0,0,0,0,0,0,NULL,&atx[45],&atx[1273],0,&atx[1275]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1274],NULL,0,NULL} ,
+ {407, "Seq-annot" ,1,0,0,0,0,0,1,0,NULL,&atx[1075],NULL,0,&atx[1277]} ,
+ {0, "delete" ,128,2,0,0,0,0,0,0,NULL,&atx[45],&atx[1276],0,NULL} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1277],NULL,0,NULL} ,
+ {408, "Seq-id" ,1,0,0,0,0,0,1,0,NULL,&atx[344],NULL,0,&atx[1271]} ,
+ {401, "Cn3d-style-dictionary" ,1,0,0,0,0,1,0,0,NULL,&atx[13],&atx[1279],0,&atx[1338]} ,
+ {0, "global-style" ,128,0,0,0,0,0,0,0,NULL,&atx[1280],NULL,0,&atx[1332]} ,
+ {413, "Cn3d-style-settings" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1281],0,&atx[1393]} ,
+ {0, "name" ,128,0,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1282]} ,
+ {0, "protein-backbone" ,128,1,0,0,0,0,0,0,NULL,&atx[1283],NULL,0,&atx[1297]} ,
+ {410, "Cn3d-backbone-style" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1284],0,&atx[1299]} ,
+ {0, "type" ,128,0,0,0,0,0,0,0,NULL,&atx[1285],NULL,0,&atx[1286]} ,
+ {406, "Cn3d-backbone-type" ,1,0,0,0,0,0,0,0,NULL,&atx[42],&avnx[579],0,&atx[1287]} ,
+ {0, "style" ,128,1,0,0,0,0,0,0,NULL,&atx[1287],NULL,0,&atx[1288]} ,
+ {407, "Cn3d-drawing-style" ,1,0,0,0,0,0,0,0,NULL,&atx[42],&avnx[583],0,&atx[1289]} ,
+ {0, "color-scheme" ,128,2,0,0,0,0,0,0,NULL,&atx[1289],NULL,0,&atx[1290]} ,
+ {408, "Cn3d-color-scheme" ,1,0,0,0,0,0,0,0,NULL,&atx[42],&avnx[591],0,&atx[1291]} ,
+ {0, "user-color" ,128,3,0,0,0,0,0,0,NULL,&atx[1291],NULL,0,NULL} ,
+ {409, "Cn3d-color" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1292],0,&atx[1283]} ,
+ {0, "scale-factor" ,128,0,0,0,1,0,0,0,&avnx[611],&atx[6],NULL,0,&atx[1293]} ,
+ {0, "red" ,128,1,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1294]} ,
+ {0, "green" ,128,2,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1295]} ,
+ {0, "blue" ,128,3,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1296]} ,
+ {0, "alpha" ,128,4,0,0,1,0,0,0,&avnx[612],&atx[6],NULL,0,NULL} ,
+ {0, "nucleotide-backbone" ,128,2,0,0,0,0,0,0,NULL,&atx[1283],NULL,0,&atx[1298]} ,
+ {0, "protein-sidechains" ,128,3,0,0,0,0,0,0,NULL,&atx[1299],NULL,0,&atx[1304]} ,
+ {411, "Cn3d-general-style" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1300],0,&atx[1324]} ,
+ {0, "is-on" ,128,0,0,0,0,0,0,0,NULL,&atx[60],NULL,0,&atx[1301]} ,
+ {0, "style" ,128,1,0,0,0,0,0,0,NULL,&atx[1287],NULL,0,&atx[1302]} ,
+ {0, "color-scheme" ,128,2,0,0,0,0,0,0,NULL,&atx[1289],NULL,0,&atx[1303]} ,
+ {0, "user-color" ,128,3,0,0,0,0,0,0,NULL,&atx[1291],NULL,0,NULL} ,
+ {0, "nucleotide-sidechains" ,128,4,0,0,0,0,0,0,NULL,&atx[1299],NULL,0,&atx[1305]} ,
+ {0, "heterogens" ,128,5,0,0,0,0,0,0,NULL,&atx[1299],NULL,0,&atx[1306]} ,
+ {0, "solvents" ,128,6,0,0,0,0,0,0,NULL,&atx[1299],NULL,0,&atx[1307]} ,
+ {0, "connections" ,128,7,0,0,0,0,0,0,NULL,&atx[1299],NULL,0,&atx[1308]} ,
+ {0, "helix-objects" ,128,8,0,0,0,0,0,0,NULL,&atx[1299],NULL,0,&atx[1309]} ,
+ {0, "strand-objects" ,128,9,0,0,0,0,0,0,NULL,&atx[1299],NULL,0,&atx[1310]} ,
+ {0, "virtual-disulfides-on" ,128,10,0,0,0,0,0,0,NULL,&atx[60],NULL,0,&atx[1311]} ,
+ {0, "virtual-disulfide-color" ,128,11,0,0,0,0,0,0,NULL,&atx[1291],NULL,0,&atx[1312]} ,
+ {0, "hydrogens-on" ,128,12,0,0,0,0,0,0,NULL,&atx[60],NULL,0,&atx[1313]} ,
+ {0, "background-color" ,128,13,0,0,0,0,0,0,NULL,&atx[1291],NULL,0,&atx[1314]} ,
+ {0, "scale-factor" ,128,14,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1315]} ,
+ {0, "space-fill-proportion" ,128,15,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1316]} ,
+ {0, "ball-radius" ,128,16,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1317]} ,
+ {0, "stick-radius" ,128,17,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1318]} ,
+ {0, "tube-radius" ,128,18,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1319]} ,
+ {0, "tube-worm-radius" ,128,19,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1320]} ,
+ {0, "helix-radius" ,128,20,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1321]} ,
+ {0, "strand-width" ,128,21,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1322]} ,
+ {0, "strand-thickness" ,128,22,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1323]} ,
+ {0, "protein-labels" ,128,23,0,1,0,0,0,0,NULL,&atx[1324],NULL,0,&atx[1330]} ,
+ {412, "Cn3d-backbone-label-style" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1325],0,&atx[1280]} ,
+ {0, "spacing" ,128,0,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1326]} ,
+ {0, "type" ,128,1,0,0,0,0,0,0,NULL,&atx[42],&avnx[613],0,&atx[1327]} ,
+ {0, "number" ,128,2,0,0,0,0,0,0,NULL,&atx[42],&avnx[615],0,&atx[1328]} ,
+ {0, "termini" ,128,3,0,0,0,0,0,0,NULL,&atx[60],NULL,0,&atx[1329]} ,
{0, "white" ,128,4,0,0,0,0,0,0,NULL,&atx[60],NULL,0,NULL} ,
- {0, "nucleotide-labels" ,128,24,0,1,0,0,0,0,NULL,&atx[1261],NULL,0,&atx[1268]} ,
+ {0, "nucleotide-labels" ,128,24,0,1,0,0,0,0,NULL,&atx[1324],NULL,0,&atx[1331]} ,
{0, "ion-labels" ,128,25,0,1,0,0,0,0,NULL,&atx[60],NULL,0,NULL} ,
- {0, "style-table" ,128,1,0,1,0,0,0,0,NULL,&atx[66],&atx[1270],0,NULL} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1271],NULL,0,NULL} ,
- {416, "Cn3d-style-table-item" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1272],0,&atx[1294]} ,
- {0, "id" ,128,0,0,0,0,0,0,0,NULL,&atx[1273],NULL,0,&atx[1274]} ,
- {415, "Cn3d-style-table-id" ,1,0,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1271]} ,
- {0, "style" ,128,1,0,0,0,0,0,0,NULL,&atx[1217],NULL,0,NULL} ,
- {402, "Cn3d-user-annotations" ,1,0,0,0,0,1,0,0,NULL,&atx[13],&atx[1276],0,&atx[1286]} ,
- {0, "annotations" ,128,0,0,1,0,0,0,0,NULL,&atx[66],&atx[1277],0,&atx[1299]} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1278],NULL,0,NULL} ,
- {420, "Cn3d-user-annotation" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1279],0,&atx[1308]} ,
- {0, "name" ,128,0,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1280]} ,
- {0, "description" ,128,1,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1281]} ,
- {0, "style-id" ,128,2,0,0,0,0,0,0,NULL,&atx[1273],NULL,0,&atx[1282]} ,
- {0, "residues" ,128,3,0,0,0,0,0,0,NULL,&atx[66],&atx[1283],0,&atx[1298]} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1284],NULL,0,NULL} ,
- {419, "Cn3d-object-location" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1285],0,&atx[1278]} ,
- {0, "structure-id" ,128,0,0,0,0,0,0,0,NULL,&atx[1286],NULL,0,&atx[1287]} ,
- {403, "Biostruc-id" ,1,0,0,0,0,0,1,0,NULL,NULL,NULL,0,&atx[1291]} ,
- {0, "residues" ,128,1,0,0,0,0,0,0,NULL,&atx[66],&atx[1288],0,NULL} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1289],NULL,0,NULL} ,
- {418, "Cn3d-molecule-location" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1290],0,&atx[1284]} ,
- {0, "molecule-id" ,128,0,0,0,0,0,0,0,NULL,&atx[1291],NULL,0,&atx[1292]} ,
- {404, "Molecule-id" ,1,0,0,0,0,0,1,0,NULL,NULL,NULL,0,&atx[1296]} ,
- {0, "residues" ,128,1,0,1,0,0,0,0,NULL,&atx[66],&atx[1293],0,NULL} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1294],NULL,0,NULL} ,
- {417, "Cn3d-residue-range" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1295],0,&atx[1289]} ,
- {0, "from" ,128,0,0,0,0,0,0,0,NULL,&atx[1296],NULL,0,&atx[1297]} ,
- {405, "Residue-id" ,1,0,0,0,0,0,1,0,NULL,NULL,NULL,0,&atx[1222]} ,
- {0, "to" ,128,1,0,0,0,0,0,0,NULL,&atx[1296],NULL,0,NULL} ,
+ {0, "style-table" ,128,1,0,1,0,0,0,0,NULL,&atx[66],&atx[1333],0,NULL} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1334],NULL,0,NULL} ,
+ {416, "Cn3d-style-table-item" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1335],0,&atx[1357]} ,
+ {0, "id" ,128,0,0,0,0,0,0,0,NULL,&atx[1336],NULL,0,&atx[1337]} ,
+ {415, "Cn3d-style-table-id" ,1,0,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1334]} ,
+ {0, "style" ,128,1,0,0,0,0,0,0,NULL,&atx[1280],NULL,0,NULL} ,
+ {402, "Cn3d-user-annotations" ,1,0,0,0,0,1,0,0,NULL,&atx[13],&atx[1339],0,&atx[1349]} ,
+ {0, "annotations" ,128,0,0,1,0,0,0,0,NULL,&atx[66],&atx[1340],0,&atx[1362]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1341],NULL,0,NULL} ,
+ {420, "Cn3d-user-annotation" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1342],0,&atx[1371]} ,
+ {0, "name" ,128,0,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1343]} ,
+ {0, "description" ,128,1,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1344]} ,
+ {0, "style-id" ,128,2,0,0,0,0,0,0,NULL,&atx[1336],NULL,0,&atx[1345]} ,
+ {0, "residues" ,128,3,0,0,0,0,0,0,NULL,&atx[66],&atx[1346],0,&atx[1361]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1347],NULL,0,NULL} ,
+ {419, "Cn3d-object-location" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1348],0,&atx[1341]} ,
+ {0, "structure-id" ,128,0,0,0,0,0,0,0,NULL,&atx[1349],NULL,0,&atx[1350]} ,
+ {403, "Biostruc-id" ,1,0,0,0,0,0,1,0,NULL,NULL,NULL,0,&atx[1354]} ,
+ {0, "residues" ,128,1,0,0,0,0,0,0,NULL,&atx[66],&atx[1351],0,NULL} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1352],NULL,0,NULL} ,
+ {418, "Cn3d-molecule-location" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1353],0,&atx[1347]} ,
+ {0, "molecule-id" ,128,0,0,0,0,0,0,0,NULL,&atx[1354],NULL,0,&atx[1355]} ,
+ {404, "Molecule-id" ,1,0,0,0,0,0,1,0,NULL,NULL,NULL,0,&atx[1359]} ,
+ {0, "residues" ,128,1,0,1,0,0,0,0,NULL,&atx[66],&atx[1356],0,NULL} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1357],NULL,0,NULL} ,
+ {417, "Cn3d-residue-range" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1358],0,&atx[1352]} ,
+ {0, "from" ,128,0,0,0,0,0,0,0,NULL,&atx[1359],NULL,0,&atx[1360]} ,
+ {405, "Residue-id" ,1,0,0,0,0,0,1,0,NULL,NULL,NULL,0,&atx[1285]} ,
+ {0, "to" ,128,1,0,0,0,0,0,0,NULL,&atx[1359],NULL,0,NULL} ,
{0, "is-on" ,128,4,0,0,0,0,0,0,NULL,&atx[60],NULL,0,NULL} ,
- {0, "view" ,128,1,0,1,0,0,0,0,NULL,&atx[1300],NULL,0,NULL} ,
- {423, "Cn3d-view-settings" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1301],0,NULL} ,
- {0, "camera-distance" ,128,0,0,0,0,0,0,0,NULL,&atx[58],NULL,0,&atx[1302]} ,
- {0, "camera-angle-rad" ,128,1,0,0,0,0,0,0,NULL,&atx[58],NULL,0,&atx[1303]} ,
- {0, "camera-look-at-X" ,128,2,0,0,0,0,0,0,NULL,&atx[58],NULL,0,&atx[1304]} ,
- {0, "camera-look-at-Y" ,128,3,0,0,0,0,0,0,NULL,&atx[58],NULL,0,&atx[1305]} ,
- {0, "camera-clip-near" ,128,4,0,0,0,0,0,0,NULL,&atx[58],NULL,0,&atx[1306]} ,
- {0, "camera-clip-far" ,128,5,0,0,0,0,0,0,NULL,&atx[58],NULL,0,&atx[1307]} ,
- {0, "matrix" ,128,6,0,0,0,0,0,0,NULL,&atx[1308],NULL,0,&atx[1325]} ,
- {421, "Cn3d-GL-matrix" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1309],0,&atx[1326]} ,
- {0, "m0" ,128,0,0,0,0,0,0,0,NULL,&atx[58],NULL,0,&atx[1310]} ,
- {0, "m1" ,128,1,0,0,0,0,0,0,NULL,&atx[58],NULL,0,&atx[1311]} ,
- {0, "m2" ,128,2,0,0,0,0,0,0,NULL,&atx[58],NULL,0,&atx[1312]} ,
- {0, "m3" ,128,3,0,0,0,0,0,0,NULL,&atx[58],NULL,0,&atx[1313]} ,
- {0, "m4" ,128,4,0,0,0,0,0,0,NULL,&atx[58],NULL,0,&atx[1314]} ,
- {0, "m5" ,128,5,0,0,0,0,0,0,NULL,&atx[58],NULL,0,&atx[1315]} ,
- {0, "m6" ,128,6,0,0,0,0,0,0,NULL,&atx[58],NULL,0,&atx[1316]} ,
- {0, "m7" ,128,7,0,0,0,0,0,0,NULL,&atx[58],NULL,0,&atx[1317]} ,
- {0, "m8" ,128,8,0,0,0,0,0,0,NULL,&atx[58],NULL,0,&atx[1318]} ,
- {0, "m9" ,128,9,0,0,0,0,0,0,NULL,&atx[58],NULL,0,&atx[1319]} ,
- {0, "m10" ,128,10,0,0,0,0,0,0,NULL,&atx[58],NULL,0,&atx[1320]} ,
- {0, "m11" ,128,11,0,0,0,0,0,0,NULL,&atx[58],NULL,0,&atx[1321]} ,
- {0, "m12" ,128,12,0,0,0,0,0,0,NULL,&atx[58],NULL,0,&atx[1322]} ,
- {0, "m13" ,128,13,0,0,0,0,0,0,NULL,&atx[58],NULL,0,&atx[1323]} ,
- {0, "m14" ,128,14,0,0,0,0,0,0,NULL,&atx[58],NULL,0,&atx[1324]} ,
+ {0, "view" ,128,1,0,1,0,0,0,0,NULL,&atx[1363],NULL,0,NULL} ,
+ {423, "Cn3d-view-settings" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1364],0,NULL} ,
+ {0, "camera-distance" ,128,0,0,0,0,0,0,0,NULL,&atx[58],NULL,0,&atx[1365]} ,
+ {0, "camera-angle-rad" ,128,1,0,0,0,0,0,0,NULL,&atx[58],NULL,0,&atx[1366]} ,
+ {0, "camera-look-at-X" ,128,2,0,0,0,0,0,0,NULL,&atx[58],NULL,0,&atx[1367]} ,
+ {0, "camera-look-at-Y" ,128,3,0,0,0,0,0,0,NULL,&atx[58],NULL,0,&atx[1368]} ,
+ {0, "camera-clip-near" ,128,4,0,0,0,0,0,0,NULL,&atx[58],NULL,0,&atx[1369]} ,
+ {0, "camera-clip-far" ,128,5,0,0,0,0,0,0,NULL,&atx[58],NULL,0,&atx[1370]} ,
+ {0, "matrix" ,128,6,0,0,0,0,0,0,NULL,&atx[1371],NULL,0,&atx[1388]} ,
+ {421, "Cn3d-GL-matrix" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1372],0,&atx[1389]} ,
+ {0, "m0" ,128,0,0,0,0,0,0,0,NULL,&atx[58],NULL,0,&atx[1373]} ,
+ {0, "m1" ,128,1,0,0,0,0,0,0,NULL,&atx[58],NULL,0,&atx[1374]} ,
+ {0, "m2" ,128,2,0,0,0,0,0,0,NULL,&atx[58],NULL,0,&atx[1375]} ,
+ {0, "m3" ,128,3,0,0,0,0,0,0,NULL,&atx[58],NULL,0,&atx[1376]} ,
+ {0, "m4" ,128,4,0,0,0,0,0,0,NULL,&atx[58],NULL,0,&atx[1377]} ,
+ {0, "m5" ,128,5,0,0,0,0,0,0,NULL,&atx[58],NULL,0,&atx[1378]} ,
+ {0, "m6" ,128,6,0,0,0,0,0,0,NULL,&atx[58],NULL,0,&atx[1379]} ,
+ {0, "m7" ,128,7,0,0,0,0,0,0,NULL,&atx[58],NULL,0,&atx[1380]} ,
+ {0, "m8" ,128,8,0,0,0,0,0,0,NULL,&atx[58],NULL,0,&atx[1381]} ,
+ {0, "m9" ,128,9,0,0,0,0,0,0,NULL,&atx[58],NULL,0,&atx[1382]} ,
+ {0, "m10" ,128,10,0,0,0,0,0,0,NULL,&atx[58],NULL,0,&atx[1383]} ,
+ {0, "m11" ,128,11,0,0,0,0,0,0,NULL,&atx[58],NULL,0,&atx[1384]} ,
+ {0, "m12" ,128,12,0,0,0,0,0,0,NULL,&atx[58],NULL,0,&atx[1385]} ,
+ {0, "m13" ,128,13,0,0,0,0,0,0,NULL,&atx[58],NULL,0,&atx[1386]} ,
+ {0, "m14" ,128,14,0,0,0,0,0,0,NULL,&atx[58],NULL,0,&atx[1387]} ,
{0, "m15" ,128,15,0,0,0,0,0,0,NULL,&atx[58],NULL,0,NULL} ,
- {0, "rotation-center" ,128,7,0,0,0,0,0,0,NULL,&atx[1326],NULL,0,NULL} ,
- {422, "Cn3d-vector" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1327],0,&atx[1300]} ,
- {0, "x" ,128,0,0,0,0,0,0,0,NULL,&atx[58],NULL,0,&atx[1328]} ,
- {0, "y" ,128,1,0,0,0,0,0,0,NULL,&atx[58],NULL,0,&atx[1329]} ,
+ {0, "rotation-center" ,128,7,0,0,0,0,0,0,NULL,&atx[1389],NULL,0,NULL} ,
+ {422, "Cn3d-vector" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1390],0,&atx[1363]} ,
+ {0, "x" ,128,0,0,0,0,0,0,0,NULL,&atx[58],NULL,0,&atx[1391]} ,
+ {0, "y" ,128,1,0,0,0,0,0,0,NULL,&atx[58],NULL,0,&atx[1392]} ,
{0, "z" ,128,2,0,0,0,0,0,0,NULL,&atx[58],NULL,0,NULL} ,
- {414, "Cn3d-style-settings-set" ,1,0,0,0,0,0,0,0,NULL,&atx[45],&atx[1331],0,&atx[1273]} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1217],NULL,0,NULL} ,
- {401, "Project" ,1,0,0,0,0,1,0,0,NULL,&atx[13],&atx[1333],0,&atx[1349]} ,
- {0, "descr" ,128,0,0,1,0,0,0,0,NULL,&atx[1334],NULL,0,&atx[1348]} ,
- {411, "Project-descr" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1335],0,&atx[1337]} ,
- {0, "id" ,128,0,0,0,0,0,0,0,NULL,&atx[45],&atx[1336],0,&atx[1338]} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1337],NULL,0,NULL} ,
- {412, "Project-id" ,1,0,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1341]} ,
- {0, "name" ,128,1,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1339]} ,
- {0, "descr" ,128,2,0,1,0,0,0,0,NULL,&atx[45],&atx[1340],0,NULL} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1341],NULL,0,NULL} ,
- {413, "Projdesc" ,1,0,0,0,0,0,0,0,NULL,&atx[14],&atx[1342],0,NULL} ,
- {0, "pub" ,128,0,0,0,0,0,0,0,NULL,&atx[1343],NULL,0,&atx[1344]} ,
- {408, "Pubdesc" ,1,0,0,0,0,0,1,0,NULL,&atx[441],NULL,0,&atx[1380]} ,
- {0, "date" ,128,1,0,0,0,0,0,0,NULL,&atx[1345],NULL,0,&atx[1346]} ,
- {403, "Date" ,1,0,0,0,0,0,1,0,NULL,&atx[0],NULL,0,&atx[1364]} ,
- {0, "comment" ,128,2,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1347]} ,
+ {414, "Cn3d-style-settings-set" ,1,0,0,0,0,0,0,0,NULL,&atx[45],&atx[1394],0,&atx[1336]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1280],NULL,0,NULL} ,
+ {401, "Project" ,1,0,0,0,0,1,0,0,NULL,&atx[13],&atx[1396],0,&atx[1412]} ,
+ {0, "descr" ,128,0,0,1,0,0,0,0,NULL,&atx[1397],NULL,0,&atx[1411]} ,
+ {411, "Project-descr" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1398],0,&atx[1400]} ,
+ {0, "id" ,128,0,0,0,0,0,0,0,NULL,&atx[45],&atx[1399],0,&atx[1401]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1400],NULL,0,NULL} ,
+ {412, "Project-id" ,1,0,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1404]} ,
+ {0, "name" ,128,1,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1402]} ,
+ {0, "descr" ,128,2,0,1,0,0,0,0,NULL,&atx[45],&atx[1403],0,NULL} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1404],NULL,0,NULL} ,
+ {413, "Projdesc" ,1,0,0,0,0,0,0,0,NULL,&atx[14],&atx[1405],0,NULL} ,
+ {0, "pub" ,128,0,0,0,0,0,0,0,NULL,&atx[1406],NULL,0,&atx[1407]} ,
+ {408, "Pubdesc" ,1,0,0,0,0,0,1,0,NULL,&atx[441],NULL,0,&atx[1443]} ,
+ {0, "date" ,128,1,0,0,0,0,0,0,NULL,&atx[1408],NULL,0,&atx[1409]} ,
+ {403, "Date" ,1,0,0,0,0,0,1,0,NULL,&atx[0],NULL,0,&atx[1427]} ,
+ {0, "comment" ,128,2,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1410]} ,
{0, "title" ,128,3,0,0,0,0,0,0,NULL,&atx[2],NULL,0,NULL} ,
- {0, "data" ,128,1,0,0,0,0,0,0,NULL,&atx[1349],NULL,0,NULL} ,
- {402, "Project-item" ,1,0,0,0,0,1,0,0,NULL,&atx[14],&atx[1350],0,&atx[1345]} ,
- {0, "pmuid" ,128,0,0,0,0,0,0,0,NULL,&atx[45],&atx[1351],0,&atx[1352]} ,
+ {0, "data" ,128,1,0,0,0,0,0,0,NULL,&atx[1412],NULL,0,NULL} ,
+ {402, "Project-item" ,1,0,0,0,0,1,0,0,NULL,&atx[14],&atx[1413],0,&atx[1408]} ,
+ {0, "pmuid" ,128,0,0,0,0,0,0,0,NULL,&atx[45],&atx[1414],0,&atx[1415]} ,
{0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[6],NULL,0,NULL} ,
- {0, "protuid" ,128,1,0,0,0,0,0,0,NULL,&atx[45],&atx[1353],0,&atx[1354]} ,
+ {0, "protuid" ,128,1,0,0,0,0,0,0,NULL,&atx[45],&atx[1416],0,&atx[1417]} ,
{0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[6],NULL,0,NULL} ,
- {0, "nucuid" ,128,2,0,0,0,0,0,0,NULL,&atx[45],&atx[1355],0,&atx[1356]} ,
+ {0, "nucuid" ,128,2,0,0,0,0,0,0,NULL,&atx[45],&atx[1418],0,&atx[1419]} ,
{0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[6],NULL,0,NULL} ,
- {0, "sequid" ,128,3,0,0,0,0,0,0,NULL,&atx[45],&atx[1357],0,&atx[1358]} ,
+ {0, "sequid" ,128,3,0,0,0,0,0,0,NULL,&atx[45],&atx[1420],0,&atx[1421]} ,
{0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[6],NULL,0,NULL} ,
- {0, "genomeuid" ,128,4,0,0,0,0,0,0,NULL,&atx[45],&atx[1359],0,&atx[1360]} ,
+ {0, "genomeuid" ,128,4,0,0,0,0,0,0,NULL,&atx[45],&atx[1422],0,&atx[1423]} ,
{0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[6],NULL,0,NULL} ,
- {0, "structuid" ,128,5,0,0,0,0,0,0,NULL,&atx[45],&atx[1361],0,&atx[1362]} ,
+ {0, "structuid" ,128,5,0,0,0,0,0,0,NULL,&atx[45],&atx[1424],0,&atx[1425]} ,
{0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[6],NULL,0,NULL} ,
- {0, "pmid" ,128,6,0,0,0,0,0,0,NULL,&atx[45],&atx[1363],0,&atx[1365]} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1364],NULL,0,NULL} ,
- {404, "PubMedId" ,1,0,0,0,0,0,1,0,NULL,&atx[170],NULL,0,&atx[1367]} ,
- {0, "protid" ,128,7,0,0,0,0,0,0,NULL,&atx[45],&atx[1366],0,&atx[1368]} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1367],NULL,0,NULL} ,
- {405, "Seq-id" ,1,0,0,0,0,0,1,0,NULL,&atx[344],NULL,0,&atx[1393]} ,
- {0, "nucid" ,128,8,0,0,0,0,0,0,NULL,&atx[45],&atx[1369],0,&atx[1370]} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1367],NULL,0,NULL} ,
- {0, "seqid" ,128,9,0,0,0,0,0,0,NULL,&atx[45],&atx[1371],0,&atx[1372]} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1367],NULL,0,NULL} ,
- {0, "genomeid" ,128,10,0,0,0,0,0,0,NULL,&atx[45],&atx[1373],0,&atx[1374]} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1367],NULL,0,NULL} ,
- {0, "structid" ,128,11,0,0,0,0,0,0,NULL,&atx[387],NULL,0,&atx[1375]} ,
- {0, "pment" ,128,12,0,0,0,0,0,0,NULL,&atx[45],&atx[1376],0,&atx[1378]} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1377],NULL,0,NULL} ,
- {410, "Pubmed-entry" ,1,0,0,0,0,0,1,0,NULL,&atx[280],NULL,0,&atx[1334]} ,
- {0, "protent" ,128,13,0,0,0,0,0,0,NULL,&atx[45],&atx[1379],0,&atx[1381]} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1380],NULL,0,NULL} ,
- {409, "Seq-entry" ,1,0,0,0,0,0,1,0,NULL,&atx[1143],NULL,0,&atx[1377]} ,
- {0, "nucent" ,128,14,0,0,0,0,0,0,NULL,&atx[45],&atx[1382],0,&atx[1383]} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1380],NULL,0,NULL} ,
- {0, "seqent" ,128,15,0,0,0,0,0,0,NULL,&atx[45],&atx[1384],0,&atx[1385]} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1380],NULL,0,NULL} ,
- {0, "genomeent" ,128,16,0,0,0,0,0,0,NULL,&atx[45],&atx[1386],0,&atx[1387]} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1380],NULL,0,NULL} ,
- {0, "structent" ,128,17,0,0,0,0,0,0,NULL,&atx[387],NULL,0,&atx[1388]} ,
- {0, "seqannot" ,128,18,0,0,0,0,0,0,NULL,&atx[45],&atx[1389],0,&atx[1391]} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1390],NULL,0,NULL} ,
- {407, "Seq-annot" ,1,0,0,0,0,0,1,0,NULL,&atx[1074],NULL,0,&atx[1343]} ,
- {0, "loc" ,128,19,0,0,0,0,0,0,NULL,&atx[45],&atx[1392],0,&atx[1394]} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1393],NULL,0,NULL} ,
- {406, "Seq-loc" ,1,0,0,0,0,0,1,0,NULL,&atx[385],NULL,0,&atx[1390]} ,
- {0, "proj" ,128,20,0,0,0,0,0,0,NULL,&atx[45],&atx[1395],0,NULL} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1332],NULL,0,NULL} ,
- {401, "Link-set" ,1,0,0,0,0,1,0,0,NULL,&atx[13],&atx[1397],0,NULL} ,
- {0, "num" ,128,0,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1398]} ,
- {0, "uids" ,128,1,0,1,0,0,0,0,NULL,&atx[66],&atx[1399],0,&atx[1400]} ,
+ {0, "pmid" ,128,6,0,0,0,0,0,0,NULL,&atx[45],&atx[1426],0,&atx[1428]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1427],NULL,0,NULL} ,
+ {404, "PubMedId" ,1,0,0,0,0,0,1,0,NULL,&atx[170],NULL,0,&atx[1430]} ,
+ {0, "protid" ,128,7,0,0,0,0,0,0,NULL,&atx[45],&atx[1429],0,&atx[1431]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1430],NULL,0,NULL} ,
+ {405, "Seq-id" ,1,0,0,0,0,0,1,0,NULL,&atx[344],NULL,0,&atx[1456]} ,
+ {0, "nucid" ,128,8,0,0,0,0,0,0,NULL,&atx[45],&atx[1432],0,&atx[1433]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1430],NULL,0,NULL} ,
+ {0, "seqid" ,128,9,0,0,0,0,0,0,NULL,&atx[45],&atx[1434],0,&atx[1435]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1430],NULL,0,NULL} ,
+ {0, "genomeid" ,128,10,0,0,0,0,0,0,NULL,&atx[45],&atx[1436],0,&atx[1437]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1430],NULL,0,NULL} ,
+ {0, "structid" ,128,11,0,0,0,0,0,0,NULL,&atx[387],NULL,0,&atx[1438]} ,
+ {0, "pment" ,128,12,0,0,0,0,0,0,NULL,&atx[45],&atx[1439],0,&atx[1441]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1440],NULL,0,NULL} ,
+ {410, "Pubmed-entry" ,1,0,0,0,0,0,1,0,NULL,&atx[280],NULL,0,&atx[1397]} ,
+ {0, "protent" ,128,13,0,0,0,0,0,0,NULL,&atx[45],&atx[1442],0,&atx[1444]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1443],NULL,0,NULL} ,
+ {409, "Seq-entry" ,1,0,0,0,0,0,1,0,NULL,&atx[1206],NULL,0,&atx[1440]} ,
+ {0, "nucent" ,128,14,0,0,0,0,0,0,NULL,&atx[45],&atx[1445],0,&atx[1446]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1443],NULL,0,NULL} ,
+ {0, "seqent" ,128,15,0,0,0,0,0,0,NULL,&atx[45],&atx[1447],0,&atx[1448]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1443],NULL,0,NULL} ,
+ {0, "genomeent" ,128,16,0,0,0,0,0,0,NULL,&atx[45],&atx[1449],0,&atx[1450]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1443],NULL,0,NULL} ,
+ {0, "structent" ,128,17,0,0,0,0,0,0,NULL,&atx[387],NULL,0,&atx[1451]} ,
+ {0, "seqannot" ,128,18,0,0,0,0,0,0,NULL,&atx[45],&atx[1452],0,&atx[1454]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1453],NULL,0,NULL} ,
+ {407, "Seq-annot" ,1,0,0,0,0,0,1,0,NULL,&atx[1075],NULL,0,&atx[1406]} ,
+ {0, "loc" ,128,19,0,0,0,0,0,0,NULL,&atx[45],&atx[1455],0,&atx[1457]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1456],NULL,0,NULL} ,
+ {406, "Seq-loc" ,1,0,0,0,0,0,1,0,NULL,&atx[385],NULL,0,&atx[1453]} ,
+ {0, "proj" ,128,20,0,0,0,0,0,0,NULL,&atx[45],&atx[1458],0,NULL} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1395],NULL,0,NULL} ,
+ {401, "Link-set" ,1,0,0,0,0,1,0,0,NULL,&atx[13],&atx[1460],0,NULL} ,
+ {0, "num" ,128,0,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1461]} ,
+ {0, "uids" ,128,1,0,1,0,0,0,0,NULL,&atx[66],&atx[1462],0,&atx[1463]} ,
{0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[6],NULL,0,NULL} ,
- {0, "weights" ,128,2,0,1,0,0,0,0,NULL,&atx[66],&atx[1401],0,NULL} ,
+ {0, "weights" ,128,2,0,1,0,0,0,0,NULL,&atx[66],&atx[1464],0,NULL} ,
{0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[6],NULL,0,NULL} ,
- {401, "FeatDef" ,1,0,0,0,0,1,0,0,NULL,&atx[13],&atx[1403],0,&atx[1411]} ,
- {0, "typelabel" ,128,0,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1404]} ,
- {0, "menulabel" ,128,1,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1405]} ,
- {0, "featdef-key" ,128,2,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1406]} ,
- {0, "seqfeat-key" ,128,3,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1407]} ,
- {0, "entrygroup" ,128,4,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1408]} ,
- {0, "displaygroup" ,128,5,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1409]} ,
- {0, "molgroup" ,128,6,0,0,0,0,0,0,NULL,&atx[1410],NULL,0,NULL} ,
- {405, "FeatMolType" ,1,0,0,0,0,0,0,0,NULL,&atx[42],&avnx[582],0,&atx[1418]} ,
- {402, "FeatDefSet" ,1,0,0,0,0,1,0,0,NULL,&atx[66],&atx[1412],0,&atx[1413]} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1402],NULL,0,NULL} ,
- {403, "FeatDispGroup" ,1,0,0,0,0,1,0,0,NULL,&atx[13],&atx[1414],0,&atx[1416]} ,
- {0, "groupkey" ,128,0,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1415]} ,
+ {401, "FeatDef" ,1,0,0,0,0,1,0,0,NULL,&atx[13],&atx[1466],0,&atx[1474]} ,
+ {0, "typelabel" ,128,0,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1467]} ,
+ {0, "menulabel" ,128,1,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1468]} ,
+ {0, "featdef-key" ,128,2,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1469]} ,
+ {0, "seqfeat-key" ,128,3,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1470]} ,
+ {0, "entrygroup" ,128,4,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1471]} ,
+ {0, "displaygroup" ,128,5,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1472]} ,
+ {0, "molgroup" ,128,6,0,0,0,0,0,0,NULL,&atx[1473],NULL,0,NULL} ,
+ {405, "FeatMolType" ,1,0,0,0,0,0,0,0,NULL,&atx[42],&avnx[618],0,&atx[1481]} ,
+ {402, "FeatDefSet" ,1,0,0,0,0,1,0,0,NULL,&atx[66],&atx[1475],0,&atx[1476]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1465],NULL,0,NULL} ,
+ {403, "FeatDispGroup" ,1,0,0,0,0,1,0,0,NULL,&atx[13],&atx[1477],0,&atx[1479]} ,
+ {0, "groupkey" ,128,0,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1478]} ,
{0, "groupname" ,128,1,0,0,0,0,0,0,NULL,&atx[2],NULL,0,NULL} ,
- {404, "FeatDispGroupSet" ,1,0,0,0,0,1,0,0,NULL,&atx[66],&atx[1417],0,&atx[1410]} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1413],NULL,0,NULL} ,
- {406, "FeatDefGroupSet" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1419],0,NULL} ,
- {0, "groups" ,128,0,0,0,0,0,0,0,NULL,&atx[1416],NULL,0,&atx[1420]} ,
- {0, "defs" ,128,1,0,0,0,0,0,0,NULL,&atx[1411],NULL,0,NULL} ,
- {401, "Ncbi-mime-asn1" ,1,0,0,0,0,1,0,0,NULL,&atx[14],&atx[1422],0,&atx[1433]} ,
- {0, "entrez" ,128,0,0,0,0,0,0,0,NULL,&atx[1423],NULL,0,&atx[1439]} ,
- {410, "Entrez-general" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1424],0,&atx[1440]} ,
- {0, "title" ,128,0,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1425]} ,
- {0, "data" ,128,1,0,0,0,0,0,0,NULL,&atx[14],&atx[1426],0,&atx[1436]} ,
- {0, "ml" ,128,0,0,0,0,0,0,0,NULL,&atx[1427],NULL,0,&atx[1428]} ,
- {407, "Medline-entry" ,1,0,0,0,0,0,1,0,NULL,&atx[233],NULL,0,&atx[1451]} ,
- {0, "prot" ,128,1,0,0,0,0,0,0,NULL,&atx[1429],NULL,0,&atx[1430]} ,
- {405, "Seq-entry" ,1,0,0,0,0,0,1,0,NULL,&atx[1143],NULL,0,&atx[1449]} ,
- {0, "nuc" ,128,2,0,0,0,0,0,0,NULL,&atx[1429],NULL,0,&atx[1431]} ,
- {0, "genome" ,128,3,0,0,0,0,0,0,NULL,&atx[1429],NULL,0,&atx[1432]} ,
- {0, "structure" ,128,4,0,0,0,0,0,0,NULL,&atx[1433],NULL,0,&atx[1434]} ,
- {402, "Biostruc" ,1,0,0,0,0,0,1,0,NULL,NULL,NULL,0,&atx[1435]} ,
- {0, "strucAnnot" ,128,5,0,0,0,0,0,0,NULL,&atx[1435],NULL,0,NULL} ,
- {403, "Biostruc-annot-set" ,1,0,0,0,0,0,1,0,NULL,NULL,NULL,0,&atx[1493]} ,
- {0, "style" ,128,2,0,0,0,0,0,0,NULL,&atx[1437],NULL,0,&atx[1438]} ,
- {417, "Entrez-style" ,1,0,0,0,0,0,0,0,NULL,&atx[42],&avnx[585],0,NULL} ,
+ {404, "FeatDispGroupSet" ,1,0,0,0,0,1,0,0,NULL,&atx[66],&atx[1480],0,&atx[1473]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1476],NULL,0,NULL} ,
+ {406, "FeatDefGroupSet" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1482],0,NULL} ,
+ {0, "groups" ,128,0,0,0,0,0,0,0,NULL,&atx[1479],NULL,0,&atx[1483]} ,
+ {0, "defs" ,128,1,0,0,0,0,0,0,NULL,&atx[1474],NULL,0,NULL} ,
+ {401, "Ncbi-mime-asn1" ,1,0,0,0,0,1,0,0,NULL,&atx[14],&atx[1485],0,&atx[1496]} ,
+ {0, "entrez" ,128,0,0,0,0,0,0,0,NULL,&atx[1486],NULL,0,&atx[1502]} ,
+ {410, "Entrez-general" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1487],0,&atx[1503]} ,
+ {0, "title" ,128,0,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1488]} ,
+ {0, "data" ,128,1,0,0,0,0,0,0,NULL,&atx[14],&atx[1489],0,&atx[1499]} ,
+ {0, "ml" ,128,0,0,0,0,0,0,0,NULL,&atx[1490],NULL,0,&atx[1491]} ,
+ {407, "Medline-entry" ,1,0,0,0,0,0,1,0,NULL,&atx[233],NULL,0,&atx[1514]} ,
+ {0, "prot" ,128,1,0,0,0,0,0,0,NULL,&atx[1492],NULL,0,&atx[1493]} ,
+ {405, "Seq-entry" ,1,0,0,0,0,0,1,0,NULL,&atx[1206],NULL,0,&atx[1512]} ,
+ {0, "nuc" ,128,2,0,0,0,0,0,0,NULL,&atx[1492],NULL,0,&atx[1494]} ,
+ {0, "genome" ,128,3,0,0,0,0,0,0,NULL,&atx[1492],NULL,0,&atx[1495]} ,
+ {0, "structure" ,128,4,0,0,0,0,0,0,NULL,&atx[1496],NULL,0,&atx[1497]} ,
+ {402, "Biostruc" ,1,0,0,0,0,0,1,0,NULL,NULL,NULL,0,&atx[1498]} ,
+ {0, "strucAnnot" ,128,5,0,0,0,0,0,0,NULL,&atx[1498],NULL,0,NULL} ,
+ {403, "Biostruc-annot-set" ,1,0,0,0,0,0,1,0,NULL,NULL,NULL,0,&atx[1556]} ,
+ {0, "style" ,128,2,0,0,0,0,0,0,NULL,&atx[1500],NULL,0,&atx[1501]} ,
+ {417, "Entrez-style" ,1,0,0,0,0,0,0,0,NULL,&atx[42],&avnx[621],0,NULL} ,
{0, "location" ,128,3,0,1,0,0,0,0,NULL,&atx[2],NULL,0,NULL} ,
- {0, "alignstruc" ,128,1,0,0,0,0,0,0,NULL,&atx[1440],NULL,0,&atx[1454]} ,
- {411, "Biostruc-align" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1441],0,&atx[1455]} ,
- {0, "master" ,128,0,0,0,0,0,0,0,NULL,&atx[1433],NULL,0,&atx[1442]} ,
- {0, "slaves" ,128,1,0,0,0,0,0,0,NULL,&atx[45],&atx[1443],0,&atx[1444]} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1433],NULL,0,NULL} ,
- {0, "alignments" ,128,2,0,0,0,0,0,0,NULL,&atx[1435],NULL,0,&atx[1445]} ,
- {0, "sequences" ,128,3,0,0,0,0,0,0,NULL,&atx[45],&atx[1446],0,&atx[1447]} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1429],NULL,0,NULL} ,
- {0, "seqalign" ,128,4,0,0,0,0,0,0,NULL,&atx[45],&atx[1448],0,&atx[1450]} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1449],NULL,0,NULL} ,
- {406, "Seq-annot" ,1,0,0,0,0,0,1,0,NULL,&atx[1074],NULL,0,&atx[1427]} ,
- {0, "style-dictionary" ,128,5,0,1,0,0,0,0,NULL,&atx[1451],NULL,0,&atx[1452]} ,
- {408, "Cn3d-style-dictionary" ,1,0,0,0,0,0,1,0,NULL,&atx[1215],NULL,0,&atx[1453]} ,
- {0, "user-annotations" ,128,6,0,1,0,0,0,0,NULL,&atx[1453],NULL,0,NULL} ,
- {409, "Cn3d-user-annotations" ,1,0,0,0,0,0,1,0,NULL,&atx[1275],NULL,0,&atx[1423]} ,
- {0, "alignseq" ,128,2,0,0,0,0,0,0,NULL,&atx[1455],NULL,0,&atx[1462]} ,
- {412, "Biostruc-align-seq" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1456],0,&atx[1463]} ,
- {0, "sequences" ,128,0,0,0,0,0,0,0,NULL,&atx[45],&atx[1457],0,&atx[1458]} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1429],NULL,0,NULL} ,
- {0, "seqalign" ,128,1,0,0,0,0,0,0,NULL,&atx[45],&atx[1459],0,&atx[1460]} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1449],NULL,0,NULL} ,
- {0, "style-dictionary" ,128,2,0,1,0,0,0,0,NULL,&atx[1451],NULL,0,&atx[1461]} ,
- {0, "user-annotations" ,128,3,0,1,0,0,0,0,NULL,&atx[1453],NULL,0,NULL} ,
- {0, "strucseq" ,128,3,0,0,0,0,0,0,NULL,&atx[1463],NULL,0,&atx[1469]} ,
- {413, "Biostruc-seq" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1464],0,&atx[1470]} ,
- {0, "structure" ,128,0,0,0,0,0,0,0,NULL,&atx[1433],NULL,0,&atx[1465]} ,
- {0, "sequences" ,128,1,0,0,0,0,0,0,NULL,&atx[45],&atx[1466],0,&atx[1467]} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1429],NULL,0,NULL} ,
- {0, "style-dictionary" ,128,2,0,1,0,0,0,0,NULL,&atx[1451],NULL,0,&atx[1468]} ,
- {0, "user-annotations" ,128,3,0,1,0,0,0,0,NULL,&atx[1453],NULL,0,NULL} ,
- {0, "strucseqs" ,128,4,0,0,0,0,0,0,NULL,&atx[1470],NULL,0,&atx[1478]} ,
- {414, "Biostruc-seqs" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1471],0,&atx[1479]} ,
- {0, "structure" ,128,0,0,0,0,0,0,0,NULL,&atx[1433],NULL,0,&atx[1472]} ,
- {0, "sequences" ,128,1,0,0,0,0,0,0,NULL,&atx[45],&atx[1473],0,&atx[1474]} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1429],NULL,0,NULL} ,
- {0, "seqalign" ,128,2,0,0,0,0,0,0,NULL,&atx[45],&atx[1475],0,&atx[1476]} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1449],NULL,0,NULL} ,
- {0, "style-dictionary" ,128,3,0,1,0,0,0,0,NULL,&atx[1451],NULL,0,&atx[1477]} ,
- {0, "user-annotations" ,128,4,0,1,0,0,0,0,NULL,&atx[1453],NULL,0,NULL} ,
- {0, "general" ,128,5,0,0,0,0,0,0,NULL,&atx[1479],NULL,0,NULL} ,
- {415, "Biostruc-seqs-aligns-cdd" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1480],0,&atx[1482]} ,
- {0, "seq-align-data" ,128,0,0,0,0,0,0,0,NULL,&atx[14],&atx[1481],0,&atx[1494]} ,
- {0, "bundle" ,128,0,0,0,0,0,0,0,NULL,&atx[1482],NULL,0,&atx[1492]} ,
- {416, "Bundle-seqs-aligns" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1483],0,&atx[1437]} ,
- {0, "sequences" ,128,0,0,1,0,0,0,0,NULL,&atx[45],&atx[1484],0,&atx[1485]} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1429],NULL,0,NULL} ,
- {0, "seqaligns" ,128,1,0,1,0,0,0,0,NULL,&atx[45],&atx[1486],0,&atx[1487]} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1449],NULL,0,NULL} ,
- {0, "strucaligns" ,128,2,0,1,0,0,0,0,NULL,&atx[1435],NULL,0,&atx[1488]} ,
- {0, "imports" ,128,3,0,1,0,0,0,0,NULL,&atx[45],&atx[1489],0,&atx[1490]} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1449],NULL,0,NULL} ,
- {0, "style-dictionary" ,128,4,0,1,0,0,0,0,NULL,&atx[1451],NULL,0,&atx[1491]} ,
- {0, "user-annotations" ,128,5,0,1,0,0,0,0,NULL,&atx[1453],NULL,0,NULL} ,
- {0, "cdd" ,128,1,0,0,0,0,0,0,NULL,&atx[1493],NULL,0,NULL} ,
- {404, "Cdd" ,1,0,0,0,0,0,1,0,NULL,NULL,NULL,0,&atx[1429]} ,
- {0, "structures" ,128,1,0,1,0,0,0,0,NULL,&atx[45],&atx[1495],0,&atx[1496]} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1433],NULL,0,NULL} ,
- {0, "structure-type" ,128,2,0,1,0,0,0,0,NULL,&atx[42],&avnx[598],0,NULL} ,
- {401, "PrintTemplate" ,1,0,0,0,0,1,0,0,NULL,&atx[13],&atx[1498],0,&atx[1531]} ,
- {0, "name" ,128,0,0,0,0,0,0,0,NULL,&atx[1499],NULL,0,&atx[1500]} ,
- {403, "TemplateName" ,1,0,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1502]} ,
- {0, "labelfrom" ,128,1,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1501]} ,
- {0, "format" ,128,2,0,0,0,0,0,0,NULL,&atx[1502],NULL,0,NULL} ,
- {404, "PrintFormat" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1503],0,&atx[1508]} ,
- {0, "asn1" ,128,0,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1504]} ,
- {0, "label" ,128,1,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1505]} ,
- {0, "prefix" ,128,2,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1506]} ,
- {0, "suffix" ,128,3,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1507]} ,
- {0, "form" ,128,4,0,0,0,0,0,0,NULL,&atx[1508],NULL,0,NULL} ,
- {405, "PrintForm" ,1,0,0,0,0,0,0,0,NULL,&atx[14],&atx[1509],0,&atx[1510]} ,
- {0, "block" ,128,0,0,0,0,0,0,0,NULL,&atx[1510],NULL,0,&atx[1514]} ,
- {406, "PrintFormBlock" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1511],0,&atx[1515]} ,
- {0, "separator" ,128,0,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1512]} ,
- {0, "components" ,128,1,0,0,0,0,0,0,NULL,&atx[66],&atx[1513],0,NULL} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1502],NULL,0,NULL} ,
- {0, "boolean" ,128,1,0,0,0,0,0,0,NULL,&atx[1515],NULL,0,&atx[1518]} ,
- {407, "PrintFormBoolean" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1516],0,&atx[1519]} ,
- {0, "true" ,128,0,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1517]} ,
+ {0, "alignstruc" ,128,1,0,0,0,0,0,0,NULL,&atx[1503],NULL,0,&atx[1517]} ,
+ {411, "Biostruc-align" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1504],0,&atx[1518]} ,
+ {0, "master" ,128,0,0,0,0,0,0,0,NULL,&atx[1496],NULL,0,&atx[1505]} ,
+ {0, "slaves" ,128,1,0,0,0,0,0,0,NULL,&atx[45],&atx[1506],0,&atx[1507]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1496],NULL,0,NULL} ,
+ {0, "alignments" ,128,2,0,0,0,0,0,0,NULL,&atx[1498],NULL,0,&atx[1508]} ,
+ {0, "sequences" ,128,3,0,0,0,0,0,0,NULL,&atx[45],&atx[1509],0,&atx[1510]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1492],NULL,0,NULL} ,
+ {0, "seqalign" ,128,4,0,0,0,0,0,0,NULL,&atx[45],&atx[1511],0,&atx[1513]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1512],NULL,0,NULL} ,
+ {406, "Seq-annot" ,1,0,0,0,0,0,1,0,NULL,&atx[1075],NULL,0,&atx[1490]} ,
+ {0, "style-dictionary" ,128,5,0,1,0,0,0,0,NULL,&atx[1514],NULL,0,&atx[1515]} ,
+ {408, "Cn3d-style-dictionary" ,1,0,0,0,0,0,1,0,NULL,&atx[1278],NULL,0,&atx[1516]} ,
+ {0, "user-annotations" ,128,6,0,1,0,0,0,0,NULL,&atx[1516],NULL,0,NULL} ,
+ {409, "Cn3d-user-annotations" ,1,0,0,0,0,0,1,0,NULL,&atx[1338],NULL,0,&atx[1486]} ,
+ {0, "alignseq" ,128,2,0,0,0,0,0,0,NULL,&atx[1518],NULL,0,&atx[1525]} ,
+ {412, "Biostruc-align-seq" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1519],0,&atx[1526]} ,
+ {0, "sequences" ,128,0,0,0,0,0,0,0,NULL,&atx[45],&atx[1520],0,&atx[1521]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1492],NULL,0,NULL} ,
+ {0, "seqalign" ,128,1,0,0,0,0,0,0,NULL,&atx[45],&atx[1522],0,&atx[1523]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1512],NULL,0,NULL} ,
+ {0, "style-dictionary" ,128,2,0,1,0,0,0,0,NULL,&atx[1514],NULL,0,&atx[1524]} ,
+ {0, "user-annotations" ,128,3,0,1,0,0,0,0,NULL,&atx[1516],NULL,0,NULL} ,
+ {0, "strucseq" ,128,3,0,0,0,0,0,0,NULL,&atx[1526],NULL,0,&atx[1532]} ,
+ {413, "Biostruc-seq" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1527],0,&atx[1533]} ,
+ {0, "structure" ,128,0,0,0,0,0,0,0,NULL,&atx[1496],NULL,0,&atx[1528]} ,
+ {0, "sequences" ,128,1,0,0,0,0,0,0,NULL,&atx[45],&atx[1529],0,&atx[1530]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1492],NULL,0,NULL} ,
+ {0, "style-dictionary" ,128,2,0,1,0,0,0,0,NULL,&atx[1514],NULL,0,&atx[1531]} ,
+ {0, "user-annotations" ,128,3,0,1,0,0,0,0,NULL,&atx[1516],NULL,0,NULL} ,
+ {0, "strucseqs" ,128,4,0,0,0,0,0,0,NULL,&atx[1533],NULL,0,&atx[1541]} ,
+ {414, "Biostruc-seqs" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1534],0,&atx[1542]} ,
+ {0, "structure" ,128,0,0,0,0,0,0,0,NULL,&atx[1496],NULL,0,&atx[1535]} ,
+ {0, "sequences" ,128,1,0,0,0,0,0,0,NULL,&atx[45],&atx[1536],0,&atx[1537]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1492],NULL,0,NULL} ,
+ {0, "seqalign" ,128,2,0,0,0,0,0,0,NULL,&atx[45],&atx[1538],0,&atx[1539]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1512],NULL,0,NULL} ,
+ {0, "style-dictionary" ,128,3,0,1,0,0,0,0,NULL,&atx[1514],NULL,0,&atx[1540]} ,
+ {0, "user-annotations" ,128,4,0,1,0,0,0,0,NULL,&atx[1516],NULL,0,NULL} ,
+ {0, "general" ,128,5,0,0,0,0,0,0,NULL,&atx[1542],NULL,0,NULL} ,
+ {415, "Biostruc-seqs-aligns-cdd" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1543],0,&atx[1545]} ,
+ {0, "seq-align-data" ,128,0,0,0,0,0,0,0,NULL,&atx[14],&atx[1544],0,&atx[1557]} ,
+ {0, "bundle" ,128,0,0,0,0,0,0,0,NULL,&atx[1545],NULL,0,&atx[1555]} ,
+ {416, "Bundle-seqs-aligns" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1546],0,&atx[1500]} ,
+ {0, "sequences" ,128,0,0,1,0,0,0,0,NULL,&atx[45],&atx[1547],0,&atx[1548]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1492],NULL,0,NULL} ,
+ {0, "seqaligns" ,128,1,0,1,0,0,0,0,NULL,&atx[45],&atx[1549],0,&atx[1550]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1512],NULL,0,NULL} ,
+ {0, "strucaligns" ,128,2,0,1,0,0,0,0,NULL,&atx[1498],NULL,0,&atx[1551]} ,
+ {0, "imports" ,128,3,0,1,0,0,0,0,NULL,&atx[45],&atx[1552],0,&atx[1553]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1512],NULL,0,NULL} ,
+ {0, "style-dictionary" ,128,4,0,1,0,0,0,0,NULL,&atx[1514],NULL,0,&atx[1554]} ,
+ {0, "user-annotations" ,128,5,0,1,0,0,0,0,NULL,&atx[1516],NULL,0,NULL} ,
+ {0, "cdd" ,128,1,0,0,0,0,0,0,NULL,&atx[1556],NULL,0,NULL} ,
+ {404, "Cdd" ,1,0,0,0,0,0,1,0,NULL,NULL,NULL,0,&atx[1492]} ,
+ {0, "structures" ,128,1,0,1,0,0,0,0,NULL,&atx[45],&atx[1558],0,&atx[1559]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1496],NULL,0,NULL} ,
+ {0, "structure-type" ,128,2,0,1,0,0,0,0,NULL,&atx[42],&avnx[634],0,NULL} ,
+ {401, "PrintTemplate" ,1,0,0,0,0,1,0,0,NULL,&atx[13],&atx[1561],0,&atx[1594]} ,
+ {0, "name" ,128,0,0,0,0,0,0,0,NULL,&atx[1562],NULL,0,&atx[1563]} ,
+ {403, "TemplateName" ,1,0,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1565]} ,
+ {0, "labelfrom" ,128,1,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1564]} ,
+ {0, "format" ,128,2,0,0,0,0,0,0,NULL,&atx[1565],NULL,0,NULL} ,
+ {404, "PrintFormat" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1566],0,&atx[1571]} ,
+ {0, "asn1" ,128,0,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1567]} ,
+ {0, "label" ,128,1,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1568]} ,
+ {0, "prefix" ,128,2,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1569]} ,
+ {0, "suffix" ,128,3,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1570]} ,
+ {0, "form" ,128,4,0,0,0,0,0,0,NULL,&atx[1571],NULL,0,NULL} ,
+ {405, "PrintForm" ,1,0,0,0,0,0,0,0,NULL,&atx[14],&atx[1572],0,&atx[1573]} ,
+ {0, "block" ,128,0,0,0,0,0,0,0,NULL,&atx[1573],NULL,0,&atx[1577]} ,
+ {406, "PrintFormBlock" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1574],0,&atx[1578]} ,
+ {0, "separator" ,128,0,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1575]} ,
+ {0, "components" ,128,1,0,0,0,0,0,0,NULL,&atx[66],&atx[1576],0,NULL} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1565],NULL,0,NULL} ,
+ {0, "boolean" ,128,1,0,0,0,0,0,0,NULL,&atx[1578],NULL,0,&atx[1581]} ,
+ {407, "PrintFormBoolean" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1579],0,&atx[1582]} ,
+ {0, "true" ,128,0,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1580]} ,
{0, "false" ,128,1,0,1,0,0,0,0,NULL,&atx[2],NULL,0,NULL} ,
- {0, "enum" ,128,2,0,0,0,0,0,0,NULL,&atx[1519],NULL,0,&atx[1522]} ,
- {408, "PrintFormEnum" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1520],0,&atx[1523]} ,
- {0, "values" ,128,0,0,1,0,0,0,0,NULL,&atx[66],&atx[1521],0,NULL} ,
+ {0, "enum" ,128,2,0,0,0,0,0,0,NULL,&atx[1582],NULL,0,&atx[1585]} ,
+ {408, "PrintFormEnum" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1583],0,&atx[1586]} ,
+ {0, "values" ,128,0,0,1,0,0,0,0,NULL,&atx[66],&atx[1584],0,NULL} ,
{0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[2],NULL,0,NULL} ,
- {0, "text" ,128,3,0,0,0,0,0,0,NULL,&atx[1523],NULL,0,&atx[1525]} ,
- {409, "PrintFormText" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1524],0,&atx[1527]} ,
+ {0, "text" ,128,3,0,0,0,0,0,0,NULL,&atx[1586],NULL,0,&atx[1588]} ,
+ {409, "PrintFormText" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1587],0,&atx[1590]} ,
{0, "textfunc" ,128,0,0,1,0,0,0,0,NULL,&atx[2],NULL,0,NULL} ,
- {0, "use-template" ,128,4,0,0,0,0,0,0,NULL,&atx[1499],NULL,0,&atx[1526]} ,
- {0, "user" ,128,5,0,0,0,0,0,0,NULL,&atx[1527],NULL,0,&atx[1530]} ,
- {410, "UserFormat" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1528],0,NULL} ,
- {0, "printfunc" ,128,0,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1529]} ,
+ {0, "use-template" ,128,4,0,0,0,0,0,0,NULL,&atx[1562],NULL,0,&atx[1589]} ,
+ {0, "user" ,128,5,0,0,0,0,0,0,NULL,&atx[1590],NULL,0,&atx[1593]} ,
+ {410, "UserFormat" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1591],0,NULL} ,
+ {0, "printfunc" ,128,0,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1592]} ,
{0, "defaultfunc" ,128,1,0,1,0,0,0,0,NULL,&atx[2],NULL,0,NULL} ,
{0, "null" ,128,6,0,0,0,0,0,0,NULL,&atx[387],NULL,0,NULL} ,
- {402, "PrintTemplateSet" ,1,0,0,0,0,1,0,0,NULL,&atx[66],&atx[1532],0,&atx[1499]} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1497],NULL,0,NULL} ,
- {401, "GBSeq" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1534],0,&atx[1550]} ,
- {0, "locus" ,128,0,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1535]} ,
- {0, "length" ,128,1,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1536]} ,
- {0, "strandedness" ,128,2,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1537]} ,
- {0, "moltype" ,128,3,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1538]} ,
- {0, "topology" ,128,4,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1539]} ,
- {0, "division" ,128,5,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1540]} ,
- {0, "update-date" ,128,6,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1541]} ,
- {0, "create-date" ,128,7,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1542]} ,
- {0, "update-release" ,128,8,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1543]} ,
- {0, "create-release" ,128,9,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1544]} ,
- {0, "definition" ,128,10,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1545]} ,
- {0, "primary-accession" ,128,11,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1546]} ,
- {0, "entry-version" ,128,12,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1547]} ,
- {0, "accession-version" ,128,13,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1548]} ,
- {0, "other-seqids" ,128,14,0,1,0,0,0,0,NULL,&atx[66],&atx[1549],0,&atx[1551]} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1550],NULL,0,NULL} ,
- {402, "GBSeqid" ,1,0,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1553]} ,
- {0, "secondary-accessions" ,128,15,0,1,0,0,0,0,NULL,&atx[66],&atx[1552],0,&atx[1554]} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1553],NULL,0,NULL} ,
- {403, "GBSecondary-accn" ,1,0,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1557]} ,
- {0, "project" ,128,16,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1555]} ,
- {0, "keywords" ,128,17,0,1,0,0,0,0,NULL,&atx[66],&atx[1556],0,&atx[1558]} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1557],NULL,0,NULL} ,
- {404, "GBKeyword" ,1,0,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1564]} ,
- {0, "segment" ,128,18,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1559]} ,
- {0, "source" ,128,19,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1560]} ,
- {0, "organism" ,128,20,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1561]} ,
- {0, "taxonomy" ,128,21,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1562]} ,
- {0, "references" ,128,22,0,1,0,0,0,0,NULL,&atx[66],&atx[1563],0,&atx[1580]} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1564],NULL,0,NULL} ,
- {405, "GBReference" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1565],0,&atx[1586]} ,
- {0, "reference" ,128,0,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1566]} ,
- {0, "position" ,128,1,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1567]} ,
- {0, "authors" ,128,2,0,1,0,0,0,0,NULL,&atx[66],&atx[1568],0,&atx[1570]} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1569],NULL,0,NULL} ,
- {407, "GBAuthor" ,1,0,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1575]} ,
- {0, "consortium" ,128,3,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1571]} ,
- {0, "title" ,128,4,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1572]} ,
- {0, "journal" ,128,5,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1573]} ,
- {0, "xref" ,128,6,0,1,0,0,0,0,NULL,&atx[45],&atx[1574],0,&atx[1578]} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1575],NULL,0,NULL} ,
- {408, "GBXref" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1576],0,&atx[1591]} ,
- {0, "dbname" ,128,0,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1577]} ,
+ {402, "PrintTemplateSet" ,1,0,0,0,0,1,0,0,NULL,&atx[66],&atx[1595],0,&atx[1562]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1560],NULL,0,NULL} ,
+ {401, "GBSeq" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1597],0,&atx[1613]} ,
+ {0, "locus" ,128,0,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1598]} ,
+ {0, "length" ,128,1,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1599]} ,
+ {0, "strandedness" ,128,2,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1600]} ,
+ {0, "moltype" ,128,3,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1601]} ,
+ {0, "topology" ,128,4,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1602]} ,
+ {0, "division" ,128,5,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1603]} ,
+ {0, "update-date" ,128,6,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1604]} ,
+ {0, "create-date" ,128,7,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1605]} ,
+ {0, "update-release" ,128,8,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1606]} ,
+ {0, "create-release" ,128,9,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1607]} ,
+ {0, "definition" ,128,10,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1608]} ,
+ {0, "primary-accession" ,128,11,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1609]} ,
+ {0, "entry-version" ,128,12,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1610]} ,
+ {0, "accession-version" ,128,13,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1611]} ,
+ {0, "other-seqids" ,128,14,0,1,0,0,0,0,NULL,&atx[66],&atx[1612],0,&atx[1614]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1613],NULL,0,NULL} ,
+ {402, "GBSeqid" ,1,0,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1616]} ,
+ {0, "secondary-accessions" ,128,15,0,1,0,0,0,0,NULL,&atx[66],&atx[1615],0,&atx[1617]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1616],NULL,0,NULL} ,
+ {403, "GBSecondary-accn" ,1,0,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1620]} ,
+ {0, "project" ,128,16,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1618]} ,
+ {0, "keywords" ,128,17,0,1,0,0,0,0,NULL,&atx[66],&atx[1619],0,&atx[1621]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1620],NULL,0,NULL} ,
+ {404, "GBKeyword" ,1,0,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1627]} ,
+ {0, "segment" ,128,18,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1622]} ,
+ {0, "source" ,128,19,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1623]} ,
+ {0, "organism" ,128,20,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1624]} ,
+ {0, "taxonomy" ,128,21,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1625]} ,
+ {0, "references" ,128,22,0,1,0,0,0,0,NULL,&atx[66],&atx[1626],0,&atx[1643]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1627],NULL,0,NULL} ,
+ {405, "GBReference" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1628],0,&atx[1649]} ,
+ {0, "reference" ,128,0,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1629]} ,
+ {0, "position" ,128,1,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1630]} ,
+ {0, "authors" ,128,2,0,1,0,0,0,0,NULL,&atx[66],&atx[1631],0,&atx[1633]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1632],NULL,0,NULL} ,
+ {407, "GBAuthor" ,1,0,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1638]} ,
+ {0, "consortium" ,128,3,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1634]} ,
+ {0, "title" ,128,4,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1635]} ,
+ {0, "journal" ,128,5,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1636]} ,
+ {0, "xref" ,128,6,0,1,0,0,0,0,NULL,&atx[45],&atx[1637],0,&atx[1641]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1638],NULL,0,NULL} ,
+ {408, "GBXref" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1639],0,&atx[1654]} ,
+ {0, "dbname" ,128,0,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1640]} ,
{0, "id" ,128,1,0,0,0,0,0,0,NULL,&atx[2],NULL,0,NULL} ,
- {0, "pubmed" ,128,7,0,1,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1579]} ,
+ {0, "pubmed" ,128,7,0,1,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1642]} ,
{0, "remark" ,128,8,0,1,0,0,0,0,NULL,&atx[2],NULL,0,NULL} ,
- {0, "comment" ,128,23,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1581]} ,
- {0, "primary" ,128,24,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1582]} ,
- {0, "source-db" ,128,25,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1583]} ,
- {0, "database-reference" ,128,26,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1584]} ,
- {0, "feature-table" ,128,27,0,1,0,0,0,0,NULL,&atx[66],&atx[1585],0,&atx[1606]} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1586],NULL,0,NULL} ,
- {406, "GBFeature" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1587],0,&atx[1569]} ,
- {0, "key" ,128,0,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1588]} ,
- {0, "location" ,128,1,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1589]} ,
- {0, "intervals" ,128,2,0,1,0,0,0,0,NULL,&atx[66],&atx[1590],0,&atx[1598]} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1591],NULL,0,NULL} ,
- {409, "GBInterval" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1592],0,&atx[1603]} ,
- {0, "from" ,128,0,0,1,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1593]} ,
- {0, "to" ,128,1,0,1,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1594]} ,
- {0, "point" ,128,2,0,1,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1595]} ,
- {0, "iscomp" ,128,3,0,1,0,0,0,0,NULL,&atx[60],NULL,0,&atx[1596]} ,
- {0, "interbp" ,128,4,0,1,0,0,0,0,NULL,&atx[60],NULL,0,&atx[1597]} ,
+ {0, "comment" ,128,23,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1644]} ,
+ {0, "primary" ,128,24,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1645]} ,
+ {0, "source-db" ,128,25,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1646]} ,
+ {0, "database-reference" ,128,26,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1647]} ,
+ {0, "feature-table" ,128,27,0,1,0,0,0,0,NULL,&atx[66],&atx[1648],0,&atx[1669]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1649],NULL,0,NULL} ,
+ {406, "GBFeature" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1650],0,&atx[1632]} ,
+ {0, "key" ,128,0,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1651]} ,
+ {0, "location" ,128,1,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1652]} ,
+ {0, "intervals" ,128,2,0,1,0,0,0,0,NULL,&atx[66],&atx[1653],0,&atx[1661]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1654],NULL,0,NULL} ,
+ {409, "GBInterval" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1655],0,&atx[1666]} ,
+ {0, "from" ,128,0,0,1,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1656]} ,
+ {0, "to" ,128,1,0,1,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1657]} ,
+ {0, "point" ,128,2,0,1,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1658]} ,
+ {0, "iscomp" ,128,3,0,1,0,0,0,0,NULL,&atx[60],NULL,0,&atx[1659]} ,
+ {0, "interbp" ,128,4,0,1,0,0,0,0,NULL,&atx[60],NULL,0,&atx[1660]} ,
{0, "accession" ,128,5,0,0,0,0,0,0,NULL,&atx[2],NULL,0,NULL} ,
- {0, "operator" ,128,3,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1599]} ,
- {0, "partial5" ,128,4,0,1,0,0,0,0,NULL,&atx[60],NULL,0,&atx[1600]} ,
- {0, "partial3" ,128,5,0,1,0,0,0,0,NULL,&atx[60],NULL,0,&atx[1601]} ,
- {0, "quals" ,128,6,0,1,0,0,0,0,NULL,&atx[66],&atx[1602],0,NULL} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1603],NULL,0,NULL} ,
- {410, "GBQualifier" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1604],0,&atx[1608]} ,
- {0, "name" ,128,0,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1605]} ,
+ {0, "operator" ,128,3,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1662]} ,
+ {0, "partial5" ,128,4,0,1,0,0,0,0,NULL,&atx[60],NULL,0,&atx[1663]} ,
+ {0, "partial3" ,128,5,0,1,0,0,0,0,NULL,&atx[60],NULL,0,&atx[1664]} ,
+ {0, "quals" ,128,6,0,1,0,0,0,0,NULL,&atx[66],&atx[1665],0,NULL} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1666],NULL,0,NULL} ,
+ {410, "GBQualifier" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1667],0,&atx[1671]} ,
+ {0, "name" ,128,0,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1668]} ,
{0, "value" ,128,1,0,1,0,0,0,0,NULL,&atx[2],NULL,0,NULL} ,
- {0, "sequence" ,128,28,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1607]} ,
+ {0, "sequence" ,128,28,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1670]} ,
{0, "contig" ,128,29,0,1,0,0,0,0,NULL,&atx[2],NULL,0,NULL} ,
- {411, "GBSet" ,1,0,0,0,0,0,0,0,NULL,&atx[66],&atx[1609],0,NULL} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1533],NULL,0,NULL} ,
- {401, "INSDSeq" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1611],0,&atx[1627]} ,
- {0, "locus" ,128,0,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1612]} ,
- {0, "length" ,128,1,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1613]} ,
- {0, "strandedness" ,128,2,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1614]} ,
- {0, "moltype" ,128,3,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1615]} ,
- {0, "topology" ,128,4,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1616]} ,
- {0, "division" ,128,5,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1617]} ,
- {0, "update-date" ,128,6,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1618]} ,
- {0, "create-date" ,128,7,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1619]} ,
- {0, "update-release" ,128,8,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1620]} ,
- {0, "create-release" ,128,9,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1621]} ,
- {0, "definition" ,128,10,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1622]} ,
- {0, "primary-accession" ,128,11,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1623]} ,
- {0, "entry-version" ,128,12,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1624]} ,
- {0, "accession-version" ,128,13,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1625]} ,
- {0, "other-seqids" ,128,14,0,1,0,0,0,0,NULL,&atx[66],&atx[1626],0,&atx[1628]} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1627],NULL,0,NULL} ,
- {402, "INSDSeqid" ,1,0,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1630]} ,
- {0, "secondary-accessions" ,128,15,0,1,0,0,0,0,NULL,&atx[66],&atx[1629],0,&atx[1631]} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1630],NULL,0,NULL} ,
- {403, "INSDSecondary-accn" ,1,0,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1634]} ,
- {0, "project" ,128,16,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1632]} ,
- {0, "keywords" ,128,17,0,1,0,0,0,0,NULL,&atx[66],&atx[1633],0,&atx[1635]} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1634],NULL,0,NULL} ,
- {404, "INSDKeyword" ,1,0,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1641]} ,
- {0, "segment" ,128,18,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1636]} ,
- {0, "source" ,128,19,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1637]} ,
- {0, "organism" ,128,20,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1638]} ,
- {0, "taxonomy" ,128,21,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1639]} ,
- {0, "references" ,128,22,0,1,0,0,0,0,NULL,&atx[66],&atx[1640],0,&atx[1657]} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1641],NULL,0,NULL} ,
- {405, "INSDReference" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1642],0,&atx[1663]} ,
- {0, "reference" ,128,0,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1643]} ,
- {0, "position" ,128,1,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1644]} ,
- {0, "authors" ,128,2,0,1,0,0,0,0,NULL,&atx[66],&atx[1645],0,&atx[1647]} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1646],NULL,0,NULL} ,
- {407, "INSDAuthor" ,1,0,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1652]} ,
- {0, "consortium" ,128,3,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1648]} ,
- {0, "title" ,128,4,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1649]} ,
- {0, "journal" ,128,5,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1650]} ,
- {0, "xref" ,128,6,0,1,0,0,0,0,NULL,&atx[45],&atx[1651],0,&atx[1655]} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1652],NULL,0,NULL} ,
- {408, "INSDXref" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1653],0,&atx[1668]} ,
- {0, "dbname" ,128,0,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1654]} ,
+ {411, "GBSet" ,1,0,0,0,0,0,0,0,NULL,&atx[66],&atx[1672],0,NULL} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1596],NULL,0,NULL} ,
+ {401, "INSDSeq" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1674],0,&atx[1690]} ,
+ {0, "locus" ,128,0,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1675]} ,
+ {0, "length" ,128,1,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1676]} ,
+ {0, "strandedness" ,128,2,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1677]} ,
+ {0, "moltype" ,128,3,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1678]} ,
+ {0, "topology" ,128,4,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1679]} ,
+ {0, "division" ,128,5,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1680]} ,
+ {0, "update-date" ,128,6,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1681]} ,
+ {0, "create-date" ,128,7,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1682]} ,
+ {0, "update-release" ,128,8,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1683]} ,
+ {0, "create-release" ,128,9,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1684]} ,
+ {0, "definition" ,128,10,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1685]} ,
+ {0, "primary-accession" ,128,11,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1686]} ,
+ {0, "entry-version" ,128,12,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1687]} ,
+ {0, "accession-version" ,128,13,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1688]} ,
+ {0, "other-seqids" ,128,14,0,1,0,0,0,0,NULL,&atx[66],&atx[1689],0,&atx[1691]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1690],NULL,0,NULL} ,
+ {402, "INSDSeqid" ,1,0,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1693]} ,
+ {0, "secondary-accessions" ,128,15,0,1,0,0,0,0,NULL,&atx[66],&atx[1692],0,&atx[1694]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1693],NULL,0,NULL} ,
+ {403, "INSDSecondary-accn" ,1,0,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1697]} ,
+ {0, "project" ,128,16,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1695]} ,
+ {0, "keywords" ,128,17,0,1,0,0,0,0,NULL,&atx[66],&atx[1696],0,&atx[1698]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1697],NULL,0,NULL} ,
+ {404, "INSDKeyword" ,1,0,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1704]} ,
+ {0, "segment" ,128,18,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1699]} ,
+ {0, "source" ,128,19,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1700]} ,
+ {0, "organism" ,128,20,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1701]} ,
+ {0, "taxonomy" ,128,21,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1702]} ,
+ {0, "references" ,128,22,0,1,0,0,0,0,NULL,&atx[66],&atx[1703],0,&atx[1720]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1704],NULL,0,NULL} ,
+ {405, "INSDReference" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1705],0,&atx[1726]} ,
+ {0, "reference" ,128,0,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1706]} ,
+ {0, "position" ,128,1,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1707]} ,
+ {0, "authors" ,128,2,0,1,0,0,0,0,NULL,&atx[66],&atx[1708],0,&atx[1710]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1709],NULL,0,NULL} ,
+ {407, "INSDAuthor" ,1,0,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1715]} ,
+ {0, "consortium" ,128,3,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1711]} ,
+ {0, "title" ,128,4,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1712]} ,
+ {0, "journal" ,128,5,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1713]} ,
+ {0, "xref" ,128,6,0,1,0,0,0,0,NULL,&atx[45],&atx[1714],0,&atx[1718]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1715],NULL,0,NULL} ,
+ {408, "INSDXref" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1716],0,&atx[1731]} ,
+ {0, "dbname" ,128,0,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1717]} ,
{0, "id" ,128,1,0,0,0,0,0,0,NULL,&atx[2],NULL,0,NULL} ,
- {0, "pubmed" ,128,7,0,1,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1656]} ,
+ {0, "pubmed" ,128,7,0,1,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1719]} ,
{0, "remark" ,128,8,0,1,0,0,0,0,NULL,&atx[2],NULL,0,NULL} ,
- {0, "comment" ,128,23,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1658]} ,
- {0, "primary" ,128,24,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1659]} ,
- {0, "source-db" ,128,25,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1660]} ,
- {0, "database-reference" ,128,26,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1661]} ,
- {0, "feature-table" ,128,27,0,1,0,0,0,0,NULL,&atx[66],&atx[1662],0,&atx[1683]} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1663],NULL,0,NULL} ,
- {406, "INSDFeature" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1664],0,&atx[1646]} ,
- {0, "key" ,128,0,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1665]} ,
- {0, "location" ,128,1,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1666]} ,
- {0, "intervals" ,128,2,0,1,0,0,0,0,NULL,&atx[66],&atx[1667],0,&atx[1675]} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1668],NULL,0,NULL} ,
- {409, "INSDInterval" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1669],0,&atx[1680]} ,
- {0, "from" ,128,0,0,1,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1670]} ,
- {0, "to" ,128,1,0,1,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1671]} ,
- {0, "point" ,128,2,0,1,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1672]} ,
- {0, "iscomp" ,128,3,0,1,0,0,0,0,NULL,&atx[60],NULL,0,&atx[1673]} ,
- {0, "interbp" ,128,4,0,1,0,0,0,0,NULL,&atx[60],NULL,0,&atx[1674]} ,
+ {0, "comment" ,128,23,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1721]} ,
+ {0, "primary" ,128,24,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1722]} ,
+ {0, "source-db" ,128,25,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1723]} ,
+ {0, "database-reference" ,128,26,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1724]} ,
+ {0, "feature-table" ,128,27,0,1,0,0,0,0,NULL,&atx[66],&atx[1725],0,&atx[1746]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1726],NULL,0,NULL} ,
+ {406, "INSDFeature" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1727],0,&atx[1709]} ,
+ {0, "key" ,128,0,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1728]} ,
+ {0, "location" ,128,1,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1729]} ,
+ {0, "intervals" ,128,2,0,1,0,0,0,0,NULL,&atx[66],&atx[1730],0,&atx[1738]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1731],NULL,0,NULL} ,
+ {409, "INSDInterval" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1732],0,&atx[1743]} ,
+ {0, "from" ,128,0,0,1,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1733]} ,
+ {0, "to" ,128,1,0,1,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1734]} ,
+ {0, "point" ,128,2,0,1,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1735]} ,
+ {0, "iscomp" ,128,3,0,1,0,0,0,0,NULL,&atx[60],NULL,0,&atx[1736]} ,
+ {0, "interbp" ,128,4,0,1,0,0,0,0,NULL,&atx[60],NULL,0,&atx[1737]} ,
{0, "accession" ,128,5,0,0,0,0,0,0,NULL,&atx[2],NULL,0,NULL} ,
- {0, "operator" ,128,3,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1676]} ,
- {0, "partial5" ,128,4,0,1,0,0,0,0,NULL,&atx[60],NULL,0,&atx[1677]} ,
- {0, "partial3" ,128,5,0,1,0,0,0,0,NULL,&atx[60],NULL,0,&atx[1678]} ,
- {0, "quals" ,128,6,0,1,0,0,0,0,NULL,&atx[66],&atx[1679],0,NULL} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1680],NULL,0,NULL} ,
- {410, "INSDQualifier" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1681],0,&atx[1685]} ,
- {0, "name" ,128,0,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1682]} ,
+ {0, "operator" ,128,3,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1739]} ,
+ {0, "partial5" ,128,4,0,1,0,0,0,0,NULL,&atx[60],NULL,0,&atx[1740]} ,
+ {0, "partial3" ,128,5,0,1,0,0,0,0,NULL,&atx[60],NULL,0,&atx[1741]} ,
+ {0, "quals" ,128,6,0,1,0,0,0,0,NULL,&atx[66],&atx[1742],0,NULL} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1743],NULL,0,NULL} ,
+ {410, "INSDQualifier" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1744],0,&atx[1748]} ,
+ {0, "name" ,128,0,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1745]} ,
{0, "value" ,128,1,0,1,0,0,0,0,NULL,&atx[2],NULL,0,NULL} ,
- {0, "sequence" ,128,28,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1684]} ,
+ {0, "sequence" ,128,28,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1747]} ,
{0, "contig" ,128,29,0,1,0,0,0,0,NULL,&atx[2],NULL,0,NULL} ,
- {411, "INSDSet" ,1,0,0,0,0,0,0,0,NULL,&atx[66],&atx[1686],0,NULL} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1610],NULL,0,NULL} ,
- {401, "TSeq" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1688],0,&atx[1698]} ,
- {0, "seqtype" ,128,0,0,0,0,0,0,0,NULL,&atx[42],&avnx[601],0,&atx[1689]} ,
- {0, "gi" ,128,1,0,1,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1690]} ,
- {0, "accver" ,128,2,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1691]} ,
- {0, "sid" ,128,3,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1692]} ,
- {0, "local" ,128,4,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1693]} ,
- {0, "taxid" ,128,5,0,1,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1694]} ,
- {0, "orgname" ,128,6,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1695]} ,
- {0, "defline" ,128,7,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1696]} ,
- {0, "length" ,128,8,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1697]} ,
+ {411, "INSDSet" ,1,0,0,0,0,0,0,0,NULL,&atx[66],&atx[1749],0,NULL} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1673],NULL,0,NULL} ,
+ {401, "TSeq" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1751],0,&atx[1761]} ,
+ {0, "seqtype" ,128,0,0,0,0,0,0,0,NULL,&atx[42],&avnx[637],0,&atx[1752]} ,
+ {0, "gi" ,128,1,0,1,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1753]} ,
+ {0, "accver" ,128,2,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1754]} ,
+ {0, "sid" ,128,3,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1755]} ,
+ {0, "local" ,128,4,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1756]} ,
+ {0, "taxid" ,128,5,0,1,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1757]} ,
+ {0, "orgname" ,128,6,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1758]} ,
+ {0, "defline" ,128,7,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1759]} ,
+ {0, "length" ,128,8,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1760]} ,
{0, "sequence" ,128,9,0,0,0,0,0,0,NULL,&atx[2],NULL,0,NULL} ,
- {402, "TSeqSet" ,1,0,0,0,0,0,0,0,NULL,&atx[66],&atx[1699],0,NULL} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1687],NULL,0,NULL} ,
- {401, "Pssm" ,1,0,0,0,0,1,0,0,NULL,&atx[13],&atx[1701],0,&atx[1712]} ,
- {0, "isProtein" ,128,0,0,0,1,0,0,0,&avnx[603],&atx[60],NULL,0,&atx[1702]} ,
- {0, "identifier" ,128,1,0,1,0,0,0,0,NULL,&atx[1703],NULL,0,&atx[1704]} ,
- {406, "Object-id" ,1,0,0,0,0,0,1,0,NULL,&atx[20],NULL,0,&atx[1710]} ,
- {0, "numRows" ,128,2,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1705]} ,
- {0, "numColumns" ,128,3,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1706]} ,
- {0, "rowLabels" ,128,4,0,1,0,0,0,0,NULL,&atx[66],&atx[1707],0,&atx[1708]} ,
+ {402, "TSeqSet" ,1,0,0,0,0,0,0,0,NULL,&atx[66],&atx[1762],0,NULL} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1750],NULL,0,NULL} ,
+ {401, "Pssm" ,1,0,0,0,0,1,0,0,NULL,&atx[13],&atx[1764],0,&atx[1775]} ,
+ {0, "isProtein" ,128,0,0,0,1,0,0,0,&avnx[639],&atx[60],NULL,0,&atx[1765]} ,
+ {0, "identifier" ,128,1,0,1,0,0,0,0,NULL,&atx[1766],NULL,0,&atx[1767]} ,
+ {406, "Object-id" ,1,0,0,0,0,0,1,0,NULL,&atx[20],NULL,0,&atx[1773]} ,
+ {0, "numRows" ,128,2,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1768]} ,
+ {0, "numColumns" ,128,3,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1769]} ,
+ {0, "rowLabels" ,128,4,0,1,0,0,0,0,NULL,&atx[66],&atx[1770],0,&atx[1771]} ,
{0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[2],NULL,0,NULL} ,
- {0, "byRow" ,128,5,0,0,1,0,0,0,&avnx[604],&atx[60],NULL,0,&atx[1709]} ,
- {0, "query" ,128,6,0,1,0,0,0,0,NULL,&atx[1710],NULL,0,&atx[1711]} ,
- {407, "Seq-entry" ,1,0,0,0,0,0,1,0,NULL,&atx[1143],NULL,0,&atx[1746]} ,
- {0, "intermediateData" ,128,7,0,1,0,0,0,0,NULL,&atx[1712],NULL,0,&atx[1719]} ,
- {402, "PssmIntermediateData" ,1,0,0,0,0,1,0,0,NULL,&atx[13],&atx[1713],0,&atx[1720]} ,
- {0, "resFreqsPerPos" ,128,0,0,1,0,0,0,0,NULL,&atx[66],&atx[1714],0,&atx[1715]} ,
+ {0, "byRow" ,128,5,0,0,1,0,0,0,&avnx[640],&atx[60],NULL,0,&atx[1772]} ,
+ {0, "query" ,128,6,0,1,0,0,0,0,NULL,&atx[1773],NULL,0,&atx[1774]} ,
+ {407, "Seq-entry" ,1,0,0,0,0,0,1,0,NULL,&atx[1206],NULL,0,&atx[1809]} ,
+ {0, "intermediateData" ,128,7,0,1,0,0,0,0,NULL,&atx[1775],NULL,0,&atx[1782]} ,
+ {402, "PssmIntermediateData" ,1,0,0,0,0,1,0,0,NULL,&atx[13],&atx[1776],0,&atx[1783]} ,
+ {0, "resFreqsPerPos" ,128,0,0,1,0,0,0,0,NULL,&atx[66],&atx[1777],0,&atx[1778]} ,
{0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[6],NULL,0,NULL} ,
- {0, "weightedResFreqsPerPos" ,128,1,0,1,0,0,0,0,NULL,&atx[66],&atx[1716],0,&atx[1717]} ,
+ {0, "weightedResFreqsPerPos" ,128,1,0,1,0,0,0,0,NULL,&atx[66],&atx[1779],0,&atx[1780]} ,
{0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[58],NULL,0,NULL} ,
- {0, "freqRatios" ,128,2,0,0,0,0,0,0,NULL,&atx[66],&atx[1718],0,NULL} ,
+ {0, "freqRatios" ,128,2,0,0,0,0,0,0,NULL,&atx[66],&atx[1781],0,NULL} ,
{0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[58],NULL,0,NULL} ,
- {0, "finalData" ,128,8,0,1,0,0,0,0,NULL,&atx[1720],NULL,0,NULL} ,
- {403, "PssmFinalData" ,1,0,0,0,0,1,0,0,NULL,&atx[13],&atx[1721],0,&atx[1727]} ,
- {0, "scores" ,128,0,0,0,0,0,0,0,NULL,&atx[66],&atx[1722],0,&atx[1723]} ,
+ {0, "finalData" ,128,8,0,1,0,0,0,0,NULL,&atx[1783],NULL,0,NULL} ,
+ {403, "PssmFinalData" ,1,0,0,0,0,1,0,0,NULL,&atx[13],&atx[1784],0,&atx[1790]} ,
+ {0, "scores" ,128,0,0,0,0,0,0,0,NULL,&atx[66],&atx[1785],0,&atx[1786]} ,
{0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[6],NULL,0,NULL} ,
- {0, "lambda" ,128,1,0,0,0,0,0,0,NULL,&atx[58],NULL,0,&atx[1724]} ,
- {0, "kappa" ,128,2,0,0,0,0,0,0,NULL,&atx[58],NULL,0,&atx[1725]} ,
- {0, "h" ,128,3,0,0,0,0,0,0,NULL,&atx[58],NULL,0,&atx[1726]} ,
- {0, "scalingFactor" ,128,4,0,0,1,0,0,0,&avnx[605],&atx[6],NULL,0,NULL} ,
- {404, "PssmParameters" ,1,0,0,0,0,1,0,0,NULL,&atx[13],&atx[1728],0,&atx[1755]} ,
- {0, "pseudocount" ,128,0,0,1,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1729]} ,
- {0, "rpsdbparams" ,128,1,0,1,0,0,0,0,NULL,&atx[1730],NULL,0,&atx[1734]} ,
- {412, "FormatRpsDbParameters" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1731],0,NULL} ,
- {0, "matrixName" ,128,0,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1732]} ,
- {0, "gapOpen" ,128,1,0,1,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1733]} ,
+ {0, "lambda" ,128,1,0,0,0,0,0,0,NULL,&atx[58],NULL,0,&atx[1787]} ,
+ {0, "kappa" ,128,2,0,0,0,0,0,0,NULL,&atx[58],NULL,0,&atx[1788]} ,
+ {0, "h" ,128,3,0,0,0,0,0,0,NULL,&atx[58],NULL,0,&atx[1789]} ,
+ {0, "scalingFactor" ,128,4,0,0,1,0,0,0,&avnx[641],&atx[6],NULL,0,NULL} ,
+ {404, "PssmParameters" ,1,0,0,0,0,1,0,0,NULL,&atx[13],&atx[1791],0,&atx[1818]} ,
+ {0, "pseudocount" ,128,0,0,1,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1792]} ,
+ {0, "rpsdbparams" ,128,1,0,1,0,0,0,0,NULL,&atx[1793],NULL,0,&atx[1797]} ,
+ {412, "FormatRpsDbParameters" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1794],0,NULL} ,
+ {0, "matrixName" ,128,0,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1795]} ,
+ {0, "gapOpen" ,128,1,0,1,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1796]} ,
{0, "gapExtend" ,128,2,0,1,0,0,0,0,NULL,&atx[6],NULL,0,NULL} ,
- {0, "constraints" ,128,2,0,1,0,0,0,0,NULL,&atx[1735],NULL,0,NULL} ,
- {411, "CoreDef" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1736],0,&atx[1730]} ,
- {0, "nblocks" ,128,0,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1737]} ,
- {0, "blocks" ,128,1,0,0,0,0,0,0,NULL,&atx[66],&atx[1738],0,&atx[1750]} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1739],NULL,0,NULL} ,
- {409, "CoreBlock" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1740],0,&atx[1752]} ,
- {0, "start" ,128,0,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1741]} ,
- {0, "stop" ,128,1,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1742]} ,
- {0, "minstart" ,128,2,0,1,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1743]} ,
- {0, "maxstop" ,128,3,0,1,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1744]} ,
- {0, "property" ,128,4,0,1,0,0,0,0,NULL,&atx[66],&atx[1745],0,NULL} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1746],NULL,0,NULL} ,
- {408, "BlockProperty" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1747],0,&atx[1739]} ,
- {0, "type" ,128,0,0,0,0,0,0,0,NULL,&atx[6],&avnx[606],0,&atx[1748]} ,
- {0, "intvalue" ,128,1,0,1,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1749]} ,
+ {0, "constraints" ,128,2,0,1,0,0,0,0,NULL,&atx[1798],NULL,0,NULL} ,
+ {411, "CoreDef" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1799],0,&atx[1793]} ,
+ {0, "nblocks" ,128,0,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1800]} ,
+ {0, "blocks" ,128,1,0,0,0,0,0,0,NULL,&atx[66],&atx[1801],0,&atx[1813]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1802],NULL,0,NULL} ,
+ {409, "CoreBlock" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1803],0,&atx[1815]} ,
+ {0, "start" ,128,0,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1804]} ,
+ {0, "stop" ,128,1,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1805]} ,
+ {0, "minstart" ,128,2,0,1,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1806]} ,
+ {0, "maxstop" ,128,3,0,1,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1807]} ,
+ {0, "property" ,128,4,0,1,0,0,0,0,NULL,&atx[66],&atx[1808],0,NULL} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1809],NULL,0,NULL} ,
+ {408, "BlockProperty" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1810],0,&atx[1802]} ,
+ {0, "type" ,128,0,0,0,0,0,0,0,NULL,&atx[6],&avnx[642],0,&atx[1811]} ,
+ {0, "intvalue" ,128,1,0,1,0,0,0,0,NULL,&atx[6],NULL,0,&atx[1812]} ,
{0, "textvalue" ,128,2,0,1,0,0,0,0,NULL,&atx[2],NULL,0,NULL} ,
- {0, "loops" ,128,2,0,0,0,0,0,0,NULL,&atx[66],&atx[1751],0,NULL} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1752],NULL,0,NULL} ,
- {410, "LoopConstraint" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1753],0,&atx[1735]} ,
- {0, "minlength" ,128,0,0,0,1,0,0,0,&avnx[615],&atx[6],NULL,0,&atx[1754]} ,
- {0, "maxlength" ,128,1,0,0,1,0,0,0,&avnx[616],&atx[6],NULL,0,NULL} ,
- {405, "PssmWithParameters" ,1,0,0,0,0,1,0,0,NULL,&atx[13],&atx[1756],0,&atx[1703]} ,
- {0, "pssm" ,128,0,0,0,0,0,0,0,NULL,&atx[1700],NULL,0,&atx[1757]} ,
- {0, "params" ,128,1,0,1,0,0,0,0,NULL,&atx[1727],NULL,0,NULL} };
-
-static AsnModule ampx[37] = {
+ {0, "loops" ,128,2,0,0,0,0,0,0,NULL,&atx[66],&atx[1814],0,NULL} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1815],NULL,0,NULL} ,
+ {410, "LoopConstraint" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1816],0,&atx[1798]} ,
+ {0, "minlength" ,128,0,0,0,1,0,0,0,&avnx[651],&atx[6],NULL,0,&atx[1817]} ,
+ {0, "maxlength" ,128,1,0,0,1,0,0,0,&avnx[652],&atx[6],NULL,0,NULL} ,
+ {405, "PssmWithParameters" ,1,0,0,0,0,1,0,0,NULL,&atx[13],&atx[1819],0,&atx[1766]} ,
+ {0, "pssm" ,128,0,0,0,0,0,0,0,NULL,&atx[1763],NULL,0,&atx[1820]} ,
+ {0, "params" ,128,1,0,1,0,0,0,0,NULL,&atx[1790],NULL,0,NULL} ,
+ {401, "AECR-action" ,1,0,0,0,0,1,0,0,NULL,&atx[13],&atx[1822],0,&atx[1991]} ,
+ {0, "action" ,128,0,0,0,0,0,0,0,NULL,&atx[1823],NULL,0,&atx[1949]} ,
+ {463, "Action-choice" ,1,0,0,0,0,0,0,0,NULL,&atx[14],&atx[1824],0,&atx[2022]} ,
+ {0, "apply" ,128,0,0,0,0,0,0,0,NULL,&atx[1825],NULL,0,&atx[1871]} ,
+ {456, "Apply-action" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1826],0,&atx[1872]} ,
+ {0, "field" ,128,0,0,0,0,0,0,0,NULL,&atx[1827],NULL,0,&atx[1868]} ,
+ {453, "Field-type" ,1,0,0,0,0,0,0,0,NULL,&atx[14],&atx[1828],0,&atx[1883]} ,
+ {0, "source-qual" ,128,0,0,0,0,0,0,0,NULL,&atx[1829],NULL,0,&atx[1836]} ,
+ {423, "Source-qual-choice" ,1,0,0,0,0,0,0,0,NULL,&atx[14],&atx[1830],0,&atx[1853]} ,
+ {0, "textqual" ,128,0,0,0,0,0,0,0,NULL,&atx[1831],NULL,0,&atx[1832]} ,
+ {419, "Source-qual" ,1,0,0,0,0,0,0,0,NULL,&atx[42],&avnx[653],0,&atx[1885]} ,
+ {0, "location" ,128,1,0,0,0,0,0,0,NULL,&atx[1833],NULL,0,&atx[1834]} ,
+ {421, "Source-location" ,1,0,0,0,0,0,0,0,NULL,&atx[42],&avnx[734],0,&atx[1835]} ,
+ {0, "origin" ,128,2,0,0,0,0,0,0,NULL,&atx[1835],NULL,0,NULL} ,
+ {422, "Source-origin" ,1,0,0,0,0,0,0,0,NULL,&atx[42],&avnx[757],0,&atx[1829]} ,
+ {0, "feature-field" ,128,1,0,0,0,0,0,0,NULL,&atx[1837],NULL,0,&atx[1852]} ,
+ {416, "Feature-field" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1838],0,&atx[2017]} ,
+ {0, "type" ,128,0,0,0,0,0,0,0,NULL,&atx[1839],NULL,0,&atx[1840]} ,
+ {410, "Feature-type" ,1,0,0,0,0,0,0,0,NULL,&atx[42],&avnx[764],0,&atx[1843]} ,
+ {0, "field" ,128,1,0,0,0,0,0,0,NULL,&atx[1841],NULL,0,NULL} ,
+ {415, "Feat-qual-choice" ,1,0,0,0,0,0,0,0,NULL,&atx[14],&atx[1842],0,&atx[1837]} ,
+ {0, "legal-qual" ,128,0,0,0,0,0,0,0,NULL,&atx[1843],NULL,0,&atx[1844]} ,
+ {411, "Feat-qual-legal" ,1,0,0,0,0,0,0,0,NULL,&atx[42],&avnx[860],0,&atx[2058]} ,
+ {0, "illegal-qual" ,128,1,0,0,0,0,0,0,NULL,&atx[1845],NULL,0,NULL} ,
+ {405, "String-constraint" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1846],0,&atx[1957]} ,
+ {0, "match-text" ,128,0,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1847]} ,
+ {0, "match-location" ,128,1,0,0,1,0,0,0,&avnx[921],&atx[1848],NULL,0,&atx[1849]} ,
+ {404, "String-location" ,1,0,0,0,0,0,0,0,NULL,&atx[42],&avnx[922],0,&atx[1845]} ,
+ {0, "case-sensitive" ,128,2,0,0,1,0,0,0,&avnx[927],&atx[60],NULL,0,&atx[1850]} ,
+ {0, "whole-word" ,128,3,0,0,1,0,0,0,&avnx[928],&atx[60],NULL,0,&atx[1851]} ,
+ {0, "not-present" ,128,4,0,0,1,0,0,0,&avnx[929],&atx[60],NULL,0,NULL} ,
+ {0, "cds-gene-prot" ,128,2,0,0,0,0,0,0,NULL,&atx[1853],NULL,0,&atx[1854]} ,
+ {424, "CDSGeneProt-field" ,1,0,0,0,0,0,0,0,NULL,&atx[42],&avnx[930],0,&atx[1894]} ,
+ {0, "molinfo-field" ,128,3,0,0,0,0,0,0,NULL,&atx[1855],NULL,0,NULL} ,
+ {432, "Molinfo-field" ,1,0,0,0,0,0,0,0,NULL,&atx[14],&atx[1856],0,&atx[1900]} ,
+ {0, "molecule" ,128,0,0,0,0,0,0,0,NULL,&atx[1857],NULL,0,&atx[1858]} ,
+ {426, "Molecule-type" ,1,0,0,0,0,0,0,0,NULL,&atx[42],&avnx[951],0,&atx[1859]} ,
+ {0, "technique" ,128,1,0,0,0,0,0,0,NULL,&atx[1859],NULL,0,&atx[1860]} ,
+ {427, "Technique-type" ,1,0,0,0,0,0,0,0,NULL,&atx[42],&avnx[966],0,&atx[1861]} ,
+ {0, "completedness" ,128,2,0,0,0,0,0,0,NULL,&atx[1861],NULL,0,&atx[1862]} ,
+ {428, "Completedness-type" ,1,0,0,0,0,0,0,0,NULL,&atx[42],&avnx[991],0,&atx[1863]} ,
+ {0, "mol-class" ,128,3,0,0,0,0,0,0,NULL,&atx[1863],NULL,0,&atx[1864]} ,
+ {429, "Molecule-class-type" ,1,0,0,0,0,0,0,0,NULL,&atx[42],&avnx[1000],0,&atx[1865]} ,
+ {0, "topology" ,128,4,0,0,0,0,0,0,NULL,&atx[1865],NULL,0,&atx[1866]} ,
+ {430, "Topology-type" ,1,0,0,0,0,0,0,0,NULL,&atx[42],&avnx[1006],0,&atx[1867]} ,
+ {0, "strand" ,128,5,0,0,0,0,0,0,NULL,&atx[1867],NULL,0,NULL} ,
+ {431, "Strand-type" ,1,0,0,0,0,0,0,0,NULL,&atx[42],&avnx[1011],0,&atx[1855]} ,
+ {0, "value" ,128,1,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1869]} ,
+ {0, "existing-text" ,128,2,0,0,0,0,0,0,NULL,&atx[1870],NULL,0,NULL} ,
+ {455, "ExistingTextOption" ,1,0,0,0,0,0,0,0,NULL,&atx[42],&avnx[1017],0,&atx[1825]} ,
+ {0, "edit" ,128,1,0,0,0,0,0,0,NULL,&atx[1872],NULL,0,&atx[1880]} ,
+ {457, "Edit-action" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1873],0,&atx[1881]} ,
+ {0, "edit" ,128,0,0,0,0,0,0,0,NULL,&atx[1874],NULL,0,&atx[1879]} ,
+ {452, "Field-edit" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1875],0,&atx[1827]} ,
+ {0, "find-txt" ,128,0,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1876]} ,
+ {0, "repl-txt" ,128,1,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1877]} ,
+ {0, "location" ,128,2,0,0,1,0,0,0,&avnx[1027],&atx[1878],NULL,0,NULL} ,
+ {451, "Field-edit-location" ,1,0,0,0,0,0,0,0,NULL,&atx[42],&avnx[1028],0,&atx[1874]} ,
+ {0, "field" ,128,1,0,0,0,0,0,0,NULL,&atx[1827],NULL,0,NULL} ,
+ {0, "convert" ,128,2,0,0,0,0,0,0,NULL,&atx[1881],NULL,0,&atx[1924]} ,
+ {458, "Convert-action" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1882],0,&atx[1925]} ,
+ {0, "fields" ,128,0,0,0,0,0,0,0,NULL,&atx[1883],NULL,0,&atx[1923]} ,
+ {454, "Field-pair-type" ,1,0,0,0,0,0,0,0,NULL,&atx[14],&atx[1884],0,&atx[1870]} ,
+ {0, "source-qual" ,128,0,0,0,0,0,0,0,NULL,&atx[1885],NULL,0,&atx[1888]} ,
+ {420, "Source-qual-pair" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1886],0,&atx[1833]} ,
+ {0, "field-from" ,128,0,0,0,0,0,0,0,NULL,&atx[1831],NULL,0,&atx[1887]} ,
+ {0, "field-to" ,128,1,0,0,0,0,0,0,NULL,&atx[1831],NULL,0,NULL} ,
+ {0, "feature-field" ,128,1,0,0,0,0,0,0,NULL,&atx[1889],NULL,0,&atx[1893]} ,
+ {418, "Feature-field-pair" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1890],0,&atx[1831]} ,
+ {0, "type" ,128,0,0,0,0,0,0,0,NULL,&atx[1839],NULL,0,&atx[1891]} ,
+ {0, "field-from" ,128,1,0,0,0,0,0,0,NULL,&atx[1841],NULL,0,&atx[1892]} ,
+ {0, "field-to" ,128,2,0,0,0,0,0,0,NULL,&atx[1841],NULL,0,NULL} ,
+ {0, "cds-gene-prot" ,128,2,0,0,0,0,0,0,NULL,&atx[1894],NULL,0,&atx[1897]} ,
+ {425, "CDSGeneProt-field-pair" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1895],0,&atx[1857]} ,
+ {0, "field-from" ,128,0,0,0,0,0,0,0,NULL,&atx[1853],NULL,0,&atx[1896]} ,
+ {0, "field-to" ,128,1,0,0,0,0,0,0,NULL,&atx[1853],NULL,0,NULL} ,
+ {0, "molinfo-field" ,128,3,0,0,0,0,0,0,NULL,&atx[1898],NULL,0,NULL} ,
+ {439, "Molinfo-field-pair" ,1,0,0,0,0,0,0,0,NULL,&atx[14],&atx[1899],0,&atx[1961]} ,
+ {0, "molecule" ,128,0,0,0,0,0,0,0,NULL,&atx[1900],NULL,0,&atx[1903]} ,
+ {433, "Molinfo-molecule-pair" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1901],0,&atx[1904]} ,
+ {0, "from" ,128,0,0,0,0,0,0,0,NULL,&atx[1857],NULL,0,&atx[1902]} ,
+ {0, "to" ,128,1,0,0,0,0,0,0,NULL,&atx[1857],NULL,0,NULL} ,
+ {0, "technique" ,128,1,0,0,0,0,0,0,NULL,&atx[1904],NULL,0,&atx[1907]} ,
+ {434, "Molinfo-technique-pair" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1905],0,&atx[1908]} ,
+ {0, "from" ,128,0,0,0,0,0,0,0,NULL,&atx[1859],NULL,0,&atx[1906]} ,
+ {0, "to" ,128,1,0,0,0,0,0,0,NULL,&atx[1859],NULL,0,NULL} ,
+ {0, "completedness" ,128,2,0,0,0,0,0,0,NULL,&atx[1908],NULL,0,&atx[1911]} ,
+ {435, "Molinfo-completedness-pair" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1909],0,&atx[1912]} ,
+ {0, "from" ,128,0,0,0,0,0,0,0,NULL,&atx[1861],NULL,0,&atx[1910]} ,
+ {0, "to" ,128,1,0,0,0,0,0,0,NULL,&atx[1861],NULL,0,NULL} ,
+ {0, "mol-class" ,128,3,0,0,0,0,0,0,NULL,&atx[1912],NULL,0,&atx[1915]} ,
+ {436, "Molinfo-mol-class-pair" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1913],0,&atx[1916]} ,
+ {0, "from" ,128,0,0,0,0,0,0,0,NULL,&atx[1863],NULL,0,&atx[1914]} ,
+ {0, "to" ,128,1,0,0,0,0,0,0,NULL,&atx[1863],NULL,0,NULL} ,
+ {0, "topology" ,128,4,0,0,0,0,0,0,NULL,&atx[1916],NULL,0,&atx[1919]} ,
+ {437, "Molinfo-topology-pair" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1917],0,&atx[1920]} ,
+ {0, "from" ,128,0,0,0,0,0,0,0,NULL,&atx[1865],NULL,0,&atx[1918]} ,
+ {0, "to" ,128,1,0,0,0,0,0,0,NULL,&atx[1865],NULL,0,NULL} ,
+ {0, "strand" ,128,5,0,0,0,0,0,0,NULL,&atx[1920],NULL,0,NULL} ,
+ {438, "Molinfo-strand-pair" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1921],0,&atx[1898]} ,
+ {0, "from" ,128,0,0,0,0,0,0,0,NULL,&atx[1867],NULL,0,&atx[1922]} ,
+ {0, "to" ,128,1,0,0,0,0,0,0,NULL,&atx[1867],NULL,0,NULL} ,
+ {0, "existing-text" ,128,1,0,0,0,0,0,0,NULL,&atx[1870],NULL,0,NULL} ,
+ {0, "copy" ,128,3,0,0,0,0,0,0,NULL,&atx[1925],NULL,0,&atx[1928]} ,
+ {459, "Copy-action" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1926],0,&atx[1929]} ,
+ {0, "fields" ,128,0,0,0,0,0,0,0,NULL,&atx[1883],NULL,0,&atx[1927]} ,
+ {0, "existing-text" ,128,1,0,0,0,0,0,0,NULL,&atx[1870],NULL,0,NULL} ,
+ {0, "swap" ,128,4,0,0,0,0,0,0,NULL,&atx[1929],NULL,0,&atx[1932]} ,
+ {460, "Swap-action" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1930],0,&atx[1936]} ,
+ {0, "fields" ,128,0,0,0,0,0,0,0,NULL,&atx[1883],NULL,0,&atx[1931]} ,
+ {0, "field-to" ,128,1,0,0,0,0,0,0,NULL,&atx[1827],NULL,0,NULL} ,
+ {0, "remove" ,128,5,0,0,0,0,0,0,NULL,&atx[1933],NULL,0,&atx[1935]} ,
+ {462, "Remove-action" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1934],0,&atx[1823]} ,
+ {0, "field" ,128,0,0,0,0,0,0,0,NULL,&atx[1827],NULL,0,NULL} ,
+ {0, "parse" ,128,6,0,0,0,0,0,0,NULL,&atx[1936],NULL,0,NULL} ,
+ {461, "AECRParse-action" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1937],0,&atx[1933]} ,
+ {0, "portion" ,128,0,0,0,0,0,0,0,NULL,&atx[1938],NULL,0,&atx[1946]} ,
+ {450, "Text-portion" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1939],0,&atx[1878]} ,
+ {0, "left-text" ,128,0,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1940]} ,
+ {0, "include-left" ,128,1,0,0,0,0,0,0,NULL,&atx[60],NULL,0,&atx[1941]} ,
+ {0, "right-text" ,128,2,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[1942]} ,
+ {0, "include-right" ,128,3,0,0,0,0,0,0,NULL,&atx[60],NULL,0,&atx[1943]} ,
+ {0, "inside" ,128,4,0,0,0,0,0,0,NULL,&atx[60],NULL,0,&atx[1944]} ,
+ {0, "case-sensitive" ,128,5,0,0,1,0,0,0,&avnx[1031],&atx[60],NULL,0,&atx[1945]} ,
+ {0, "whole-word" ,128,6,0,0,1,0,0,0,&avnx[1032],&atx[60],NULL,0,NULL} ,
+ {0, "fields" ,128,1,0,0,0,0,0,0,NULL,&atx[1883],NULL,0,&atx[1947]} ,
+ {0, "remove-from-parsed" ,128,2,0,0,1,0,0,0,&avnx[1033],&atx[60],NULL,0,&atx[1948]} ,
+ {0, "existing-text" ,128,3,0,0,0,0,0,0,NULL,&atx[1870],NULL,0,NULL} ,
+ {0, "constraint" ,128,1,0,1,0,0,0,0,NULL,&atx[1950],NULL,0,NULL} ,
+ {449, "Constraint-choice-set" ,1,0,0,0,0,0,0,0,NULL,&atx[45],&atx[1951],0,&atx[1938]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[1952],NULL,0,NULL} ,
+ {448, "Constraint-choice" ,1,0,0,0,0,0,0,0,NULL,&atx[14],&atx[1953],0,&atx[1950]} ,
+ {0, "string" ,128,0,0,0,0,0,0,0,NULL,&atx[1845],NULL,0,&atx[1954]} ,
+ {0, "location" ,128,1,0,0,0,0,0,0,NULL,&atx[1955],NULL,0,&atx[1960]} ,
+ {408, "Location-constraint" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1956],0,&atx[1966]} ,
+ {0, "strand" ,128,0,0,0,1,0,0,0,&avnx[1034],&atx[1957],NULL,0,&atx[1958]} ,
+ {406, "Strand-constraint" ,1,0,0,0,0,0,0,0,NULL,&atx[42],&avnx[1035],0,&atx[1959]} ,
+ {0, "seq-type" ,128,1,0,0,1,0,0,0,&avnx[1038],&atx[1959],NULL,0,NULL} ,
+ {407, "Seqtype-constraint" ,1,0,0,0,0,0,0,0,NULL,&atx[42],&avnx[1039],0,&atx[1955]} ,
+ {0, "source" ,128,2,0,0,0,0,0,0,NULL,&atx[1961],NULL,0,&atx[1967]} ,
+ {440, "Source-constraint" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1962],0,&atx[1977]} ,
+ {0, "field1" ,128,0,0,1,0,0,0,0,NULL,&atx[1829],NULL,0,&atx[1963]} ,
+ {0, "field2" ,128,1,0,1,0,0,0,0,NULL,&atx[1829],NULL,0,&atx[1964]} ,
+ {0, "constraint" ,128,2,0,1,0,0,0,0,NULL,&atx[1845],NULL,0,&atx[1965]} ,
+ {0, "type-constraint" ,128,3,0,1,0,0,0,0,NULL,&atx[1966],NULL,0,NULL} ,
+ {409, "Object-type-constraint" ,1,0,0,0,0,0,0,0,NULL,&atx[42],&avnx[1042],0,&atx[1839]} ,
+ {0, "cdsgeneprot-qual" ,128,3,0,0,0,0,0,0,NULL,&atx[1968],NULL,0,&atx[1974]} ,
+ {444, "CDSGeneProt-qual-constraint" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1969],0,&atx[1987]} ,
+ {0, "field1" ,128,0,0,1,0,0,0,0,NULL,&atx[1970],NULL,0,&atx[1972]} ,
+ {443, "CDSGeneProt-constraint-field" ,1,0,0,0,0,0,0,0,NULL,&atx[14],&atx[1971],0,&atx[1968]} ,
+ {0, "field" ,128,0,0,0,0,0,0,0,NULL,&atx[1853],NULL,0,NULL} ,
+ {0, "field2" ,128,1,0,1,0,0,0,0,NULL,&atx[1970],NULL,0,&atx[1973]} ,
+ {0, "constraint" ,128,2,0,1,0,0,0,0,NULL,&atx[1845],NULL,0,NULL} ,
+ {0, "cdsgeneprot-pseudo" ,128,4,0,0,0,0,0,0,NULL,&atx[1975],NULL,0,&atx[1979]} ,
+ {442, "CDSGeneProt-pseudo-constraint" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1976],0,&atx[1970]} ,
+ {0, "feature" ,128,0,0,0,0,0,0,0,NULL,&atx[1977],NULL,0,&atx[1978]} ,
+ {441, "CDSGeneProt-feature-type-constraint" ,1,0,0,0,0,0,0,0,NULL,&atx[42],&avnx[1045],0,&atx[1975]} ,
+ {0, "is-pseudo" ,128,1,0,0,1,0,0,0,&avnx[1051],&atx[60],NULL,0,NULL} ,
+ {0, "sequence" ,128,5,0,0,0,0,0,0,NULL,&atx[1980],NULL,0,NULL} ,
+ {447, "Sequence-constraint" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[1981],0,&atx[1952]} ,
+ {0, "seqtype" ,128,0,0,1,0,0,0,0,NULL,&atx[1982],NULL,0,&atx[1989]} ,
+ {446, "Sequence-constraint-mol-type-constraint" ,1,0,0,0,0,0,0,0,NULL,&atx[14],&atx[1983],0,&atx[1980]} ,
+ {0, "any" ,128,0,0,0,0,0,0,0,NULL,&atx[387],NULL,0,&atx[1984]} ,
+ {0, "nucleotide" ,128,1,0,0,0,0,0,0,NULL,&atx[387],NULL,0,&atx[1985]} ,
+ {0, "dna" ,128,2,0,0,0,0,0,0,NULL,&atx[387],NULL,0,&atx[1986]} ,
+ {0, "rna" ,128,3,0,0,0,0,0,0,NULL,&atx[1987],NULL,0,&atx[1988]} ,
+ {445, "Sequence-constraint-rnamol" ,1,0,0,0,0,0,0,0,NULL,&atx[42],&avnx[1052],0,&atx[1982]} ,
+ {0, "protein" ,128,4,0,0,0,0,0,0,NULL,&atx[387],NULL,0,NULL} ,
+ {0, "id" ,128,1,0,1,0,0,0,0,NULL,&atx[1845],NULL,0,&atx[1990]} ,
+ {0, "feature" ,128,2,0,0,0,0,0,0,NULL,&atx[1839],NULL,0,NULL} ,
+ {402, "Parse-action" ,1,0,0,0,0,1,0,0,NULL,&atx[13],&atx[1992],0,&atx[2025]} ,
+ {0, "portion" ,128,0,0,0,0,0,0,0,NULL,&atx[1938],NULL,0,&atx[1993]} ,
+ {0, "src" ,128,1,0,0,0,0,0,0,NULL,&atx[1994],NULL,0,&atx[2009]} ,
+ {467, "Parse-src" ,1,0,0,0,0,0,0,0,NULL,&atx[14],&atx[1995],0,&atx[2013]} ,
+ {0, "defline" ,128,0,0,0,0,0,0,0,NULL,&atx[387],NULL,0,&atx[1996]} ,
+ {0, "flatfile" ,128,1,0,0,0,0,0,0,NULL,&atx[387],NULL,0,&atx[1997]} ,
+ {0, "local-id" ,128,2,0,0,0,0,0,0,NULL,&atx[387],NULL,0,&atx[1998]} ,
+ {0, "org" ,128,3,0,0,0,0,0,0,NULL,&atx[1999],NULL,0,&atx[2005]} ,
+ {466, "Parse-src-org" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[2000],0,&atx[1994]} ,
+ {0, "field" ,128,0,0,0,0,0,0,0,NULL,&atx[2001],NULL,0,&atx[2004]} ,
+ {465, "Parse-src-org-choice" ,1,0,0,0,0,0,0,0,NULL,&atx[14],&atx[2002],0,&atx[1999]} ,
+ {0, "source-qual" ,128,0,0,0,0,0,0,0,NULL,&atx[1831],NULL,0,&atx[2003]} ,
+ {0, "taxname-after-binomial" ,128,1,0,0,0,0,0,0,NULL,&atx[387],NULL,0,NULL} ,
+ {0, "type" ,128,1,0,0,1,0,0,0,&avnx[1066],&atx[1966],NULL,0,NULL} ,
+ {0, "comment" ,128,4,0,0,0,0,0,0,NULL,&atx[387],NULL,0,&atx[2006]} ,
+ {0, "bankit-comment" ,128,5,0,0,0,0,0,0,NULL,&atx[387],NULL,0,&atx[2007]} ,
+ {0, "structured-comment" ,128,6,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[2008]} ,
+ {0, "file-id" ,128,7,0,0,0,0,0,0,NULL,&atx[387],NULL,0,NULL} ,
+ {0, "dest" ,128,2,0,0,0,0,0,0,NULL,&atx[2010],NULL,0,&atx[2021]} ,
+ {469, "Parse-dest" ,1,0,0,0,0,0,0,0,NULL,&atx[14],&atx[2011],0,&atx[2039]} ,
+ {0, "defline" ,128,0,0,0,0,0,0,0,NULL,&atx[387],NULL,0,&atx[2012]} ,
+ {0, "org" ,128,1,0,0,0,0,0,0,NULL,&atx[2013],NULL,0,&atx[2016]} ,
+ {468, "Parse-dst-org" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[2014],0,&atx[2010]} ,
+ {0, "field" ,128,0,0,0,0,0,0,0,NULL,&atx[1829],NULL,0,&atx[2015]} ,
+ {0, "type" ,128,1,0,0,1,0,0,0,&avnx[1067],&atx[1966],NULL,0,NULL} ,
+ {0, "featqual" ,128,2,0,0,0,0,0,0,NULL,&atx[2017],NULL,0,&atx[2020]} ,
+ {417, "Feature-field-legal" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[2018],0,&atx[1889]} ,
+ {0, "type" ,128,0,0,0,0,0,0,0,NULL,&atx[1839],NULL,0,&atx[2019]} ,
+ {0, "field" ,128,1,0,0,0,0,0,0,NULL,&atx[1843],NULL,0,NULL} ,
+ {0, "dbxref" ,128,3,0,0,0,0,0,0,NULL,&atx[2],NULL,0,NULL} ,
+ {0, "capitalization" ,128,3,0,0,1,0,0,0,&avnx[1068],&atx[2022],NULL,0,&atx[2023]} ,
+ {464, "Cap-change" ,1,0,0,0,0,0,0,0,NULL,&atx[42],&avnx[1069],0,&atx[2001]} ,
+ {0, "remove-from-parsed" ,128,4,0,0,1,0,0,0,&avnx[1073],&atx[60],NULL,0,&atx[2024]} ,
+ {0, "existing-text" ,128,5,0,0,0,0,0,0,NULL,&atx[1870],NULL,0,NULL} ,
+ {403, "Macro-action-list" ,1,0,0,0,0,1,0,0,NULL,&atx[45],&atx[2026],0,&atx[1848]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[2027],NULL,0,NULL} ,
+ {488, "Macro-action-choice" ,1,0,0,0,0,0,0,0,NULL,&atx[14],&atx[2028],0,NULL} ,
+ {0, "aecr" ,128,0,0,0,0,0,0,0,NULL,&atx[1821],NULL,0,&atx[2029]} ,
+ {0, "parse" ,128,1,0,0,0,0,0,0,NULL,&atx[1991],NULL,0,&atx[2030]} ,
+ {0, "add-feature" ,128,2,0,0,0,0,0,0,NULL,&atx[2031],NULL,0,&atx[2061]} ,
+ {474, "Apply-feature-action" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[2032],0,&atx[2062]} ,
+ {0, "type" ,128,0,0,0,0,0,0,0,NULL,&atx[1839],NULL,0,&atx[2033]} ,
+ {0, "partial5" ,128,1,0,0,1,0,0,0,&avnx[1074],&atx[60],NULL,0,&atx[2034]} ,
+ {0, "partial3" ,128,2,0,0,1,0,0,0,&avnx[1075],&atx[60],NULL,0,&atx[2035]} ,
+ {0, "plus-strand" ,128,3,0,0,1,0,0,0,&avnx[1076],&atx[60],NULL,0,&atx[2036]} ,
+ {0, "location" ,128,4,0,0,0,0,0,0,NULL,&atx[2037],NULL,0,&atx[2043]} ,
+ {471, "Location-choice" ,1,0,0,0,0,0,0,0,NULL,&atx[14],&atx[2038],0,&atx[2046]} ,
+ {0, "interval" ,128,0,0,0,0,0,0,0,NULL,&atx[2039],NULL,0,&atx[2042]} ,
+ {470, "Location-interval" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[2040],0,&atx[2037]} ,
+ {0, "from" ,128,0,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[2041]} ,
+ {0, "to" ,128,1,0,0,0,0,0,0,NULL,&atx[6],NULL,0,NULL} ,
+ {0, "whole-sequence" ,128,1,0,0,0,0,0,0,NULL,&atx[387],NULL,0,NULL} ,
+ {0, "seq-list" ,128,5,0,0,0,0,0,0,NULL,&atx[2044],NULL,0,&atx[2049]} ,
+ {473, "Sequence-list-choice" ,1,0,0,0,0,0,0,0,NULL,&atx[14],&atx[2045],0,&atx[2031]} ,
+ {0, "list" ,128,0,0,0,0,0,0,0,NULL,&atx[2046],NULL,0,&atx[2048]} ,
+ {472, "Sequence-list" ,1,0,0,0,0,0,0,0,NULL,&atx[45],&atx[2047],0,&atx[2044]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[2],NULL,0,NULL} ,
+ {0, "all" ,128,1,0,0,0,0,0,0,NULL,&atx[387],NULL,0,NULL} ,
+ {0, "add-redundant" ,128,6,0,0,1,0,0,0,&avnx[1077],&atx[60],NULL,0,&atx[2050]} ,
+ {0, "add-mrna" ,128,7,0,0,1,0,0,0,&avnx[1078],&atx[60],NULL,0,&atx[2051]} ,
+ {0, "apply-to-parts" ,128,8,0,0,1,0,0,0,&avnx[1079],&atx[60],NULL,0,&atx[2052]} ,
+ {0, "only-seg-num" ,128,9,0,0,1,0,0,0,&avnx[1080],&atx[6],NULL,0,&atx[2053]} ,
+ {0, "fields" ,128,10,0,1,0,0,0,0,NULL,&atx[2054],NULL,0,NULL} ,
+ {414, "Feat-qual-legal-set" ,1,0,0,0,0,0,0,0,NULL,&atx[45],&atx[2055],0,&atx[1841]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[2056],NULL,0,NULL} ,
+ {413, "Feat-qual-legal-val-choice" ,1,0,0,0,0,0,0,0,NULL,&atx[14],&atx[2057],0,&atx[2054]} ,
+ {0, "qual" ,128,0,0,0,0,0,0,0,NULL,&atx[2058],NULL,0,NULL} ,
+ {412, "Feat-qual-legal-val" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[2059],0,&atx[2056]} ,
+ {0, "qual" ,128,0,0,0,0,0,0,0,NULL,&atx[1843],NULL,0,&atx[2060]} ,
+ {0, "val" ,128,1,0,0,0,0,0,0,NULL,&atx[2],NULL,0,NULL} ,
+ {0, "remove-feature" ,128,3,0,0,0,0,0,0,NULL,&atx[2062],NULL,0,&atx[2065]} ,
+ {475, "Remove-feature-action" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[2063],0,&atx[2073]} ,
+ {0, "type" ,128,0,0,0,0,0,0,0,NULL,&atx[1839],NULL,0,&atx[2064]} ,
+ {0, "constraint" ,128,1,0,1,0,0,0,0,NULL,&atx[1950],NULL,0,NULL} ,
+ {0, "edit-location" ,128,4,0,0,0,0,0,0,NULL,&atx[2066],NULL,0,NULL} ,
+ {487, "Edit-feature-location-action" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[2067],0,&atx[2027]} ,
+ {0, "type" ,128,0,0,0,0,0,0,0,NULL,&atx[1839],NULL,0,&atx[2068]} ,
+ {0, "action" ,128,1,0,0,0,0,0,0,NULL,&atx[2069],NULL,0,&atx[2092]} ,
+ {486, "Location-edit-type" ,1,0,0,0,0,0,0,0,NULL,&atx[14],&atx[2070],0,&atx[2066]} ,
+ {0, "strand" ,128,0,0,0,0,0,0,0,NULL,&atx[2071],NULL,0,&atx[2076]} ,
+ {478, "Edit-location-strand" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[2072],0,&atx[2079]} ,
+ {0, "strand-from" ,128,0,0,0,0,0,0,0,NULL,&atx[2073],NULL,0,&atx[2074]} ,
+ {476, "Feature-location-strand-from" ,1,0,0,0,0,0,0,0,NULL,&atx[42],&avnx[1081],0,&atx[2075]} ,
+ {0, "strand-to" ,128,1,0,0,0,0,0,0,NULL,&atx[2075],NULL,0,NULL} ,
+ {477, "Feature-location-strand-to" ,1,0,0,0,0,0,0,0,NULL,&atx[42],&avnx[1086],0,&atx[2071]} ,
+ {0, "set-5-partial" ,128,1,0,0,0,0,0,0,NULL,&atx[2077],NULL,0,&atx[2081]} ,
+ {480, "Partial-5-set-action" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[2078],0,&atx[2082]} ,
+ {0, "constraint" ,128,0,0,0,0,0,0,0,NULL,&atx[2079],NULL,0,&atx[2080]} ,
+ {479, "Partial-5-set-constraint" ,1,0,0,0,0,0,0,0,NULL,&atx[42],&avnx[1091],0,&atx[2077]} ,
+ {0, "extend" ,128,1,0,0,0,0,0,0,NULL,&atx[60],NULL,0,NULL} ,
+ {0, "clear-5-partial" ,128,2,0,0,0,0,0,0,NULL,&atx[2082],NULL,0,&atx[2083]} ,
+ {481, "Partial-5-clear-constraint" ,1,0,0,0,0,0,0,0,NULL,&atx[42],&avnx[1095],0,&atx[2086]} ,
+ {0, "set-3-partial" ,128,3,0,0,0,0,0,0,NULL,&atx[2084],NULL,0,&atx[2088]} ,
+ {483, "Partial-3-set-action" ,1,0,0,0,0,0,0,0,NULL,&atx[13],&atx[2085],0,&atx[2089]} ,
+ {0, "constraint" ,128,0,0,0,0,0,0,0,NULL,&atx[2086],NULL,0,&atx[2087]} ,
+ {482, "Partial-3-set-constraint" ,1,0,0,0,0,0,0,0,NULL,&atx[42],&avnx[1098],0,&atx[2084]} ,
+ {0, "extend" ,128,1,0,0,0,0,0,0,NULL,&atx[60],NULL,0,NULL} ,
+ {0, "clear-3-partial" ,128,4,0,0,0,0,0,0,NULL,&atx[2089],NULL,0,&atx[2090]} ,
+ {484, "Partial-3-clear-constraint" ,1,0,0,0,0,0,0,0,NULL,&atx[42],&avnx[1101],0,&atx[2091]} ,
+ {0, "convert" ,128,5,0,0,0,0,0,0,NULL,&atx[2091],NULL,0,NULL} ,
+ {485, "Convert-location-type" ,1,0,0,0,0,0,0,0,NULL,&atx[42],&avnx[1104],0,&atx[2069]} ,
+ {0, "constraint" ,128,2,0,1,0,0,0,0,NULL,&atx[1950],NULL,0,NULL} };
+
+static AsnModule ampx[39] = {
{ "NCBI-General" , "all.h60",&atx[0],NULL,&ampx[1],0,0} ,
{ "NCBI-Biblio" , NULL,&atx[77],NULL,&ampx[2],0,0} ,
{ "NCBI-Medline" , NULL,&atx[233],NULL,&ampx[3],0,0} ,
@@ -2398,35 +3223,37 @@ static AsnModule ampx[37] = {
{ "NCBI-Pub" , NULL,&atx[302],NULL,&ampx[6],0,0} ,
{ "NCBI-Seqloc" , NULL,&atx[344],NULL,&ampx[7],0,0} ,
{ "NCBI-Sequence" , NULL,&atx[436],NULL,&ampx[8],0,0} ,
- { "NCBI-Seqset" , NULL,&atx[1129],NULL,&ampx[9],0,0} ,
- { "NCBI-SeqCode" , NULL,&atx[1150],NULL,&ampx[10],0,0} ,
+ { "NCBI-Seqset" , NULL,&atx[1192],NULL,&ampx[9],0,0} ,
+ { "NCBI-SeqCode" , NULL,&atx[1213],NULL,&ampx[10],0,0} ,
{ "EMBL-General" , NULL,&atx[780],NULL,&ampx[11],0,0} ,
{ "SP-General" , NULL,&atx[744],NULL,&ampx[12],0,0} ,
{ "PIR-General" , NULL,&atx[708],NULL,&ampx[13],0,0} ,
{ "GenBank-General" , NULL,&atx[727],NULL,&ampx[14],0,0} ,
{ "PRF-General" , NULL,&atx[790],NULL,&ampx[15],0,0} ,
{ "PDB-General" , NULL,&atx[802],NULL,&ampx[16],0,0} ,
- { "NCBI-Seqfeat" , NULL,&atx[884],NULL,&ampx[17],0,0} ,
- { "NCBI-Rsite" , NULL,&atx[978],NULL,&ampx[18],0,0} ,
- { "NCBI-RNA" , NULL,&atx[948],NULL,&ampx[19],0,0} ,
- { "NCBI-Gene" , NULL,&atx[890],NULL,&ampx[20],0,0} ,
+ { "NCBI-Seqfeat" , NULL,&atx[885],NULL,&ampx[17],0,0} ,
+ { "NCBI-Rsite" , NULL,&atx[979],NULL,&ampx[18],0,0} ,
+ { "NCBI-RNA" , NULL,&atx[949],NULL,&ampx[19],0,0} ,
+ { "NCBI-Gene" , NULL,&atx[891],NULL,&ampx[20],0,0} ,
{ "NCBI-Organism" , NULL,&atx[661],NULL,&ampx[21],0,0} ,
{ "NCBI-BioSource" , NULL,&atx[820],NULL,&ampx[22],0,0} ,
- { "NCBI-Protein" , NULL,&atx[934],NULL,&ampx[23],0,0} ,
- { "NCBI-TxInit" , NULL,&atx[986],NULL,&ampx[24],0,0} ,
- { "NCBI-Seqalign" , NULL,&atx[463],NULL,&ampx[25],0,0} ,
- { "NCBI-Seqres" , NULL,&atx[1093],NULL,&ampx[26],0,0} ,
- { "NCBI-Submit" , NULL,&atx[1176],NULL,&ampx[27],0,0} ,
- { "NCBI-Cn3d" , NULL,&atx[1215],NULL,&ampx[28],0,0} ,
- { "NCBI-Project" , NULL,&atx[1332],NULL,&ampx[29],0,0} ,
- { "NCBI-Access" , NULL,&atx[1396],NULL,&ampx[30],0,0} ,
- { "NCBI-FeatDef" , NULL,&atx[1402],NULL,&ampx[31],0,0} ,
- { "NCBI-Mime" , NULL,&atx[1421],NULL,&ampx[32],0,0} ,
- { "NCBI-ObjPrt" , NULL,&atx[1497],NULL,&ampx[33],0,0} ,
- { "NCBI-GBSeq" , NULL,&atx[1533],NULL,&ampx[34],0,0} ,
- { "INSD-INSDSeq" , NULL,&atx[1610],NULL,&ampx[35],0,0} ,
- { "NCBI-TSeq" , NULL,&atx[1687],NULL,&ampx[36],0,0} ,
- { "NCBI-ScoreMat" , NULL,&atx[1700],NULL,NULL,0,0} };
+ { "NCBI-Protein" , NULL,&atx[935],NULL,&ampx[23],0,0} ,
+ { "NCBI-TxInit" , NULL,&atx[987],NULL,&ampx[24],0,0} ,
+ { "NCBI-SeqTable" , NULL,&atx[1140],NULL,&ampx[25],0,0} ,
+ { "NCBI-Seqalign" , NULL,&atx[463],NULL,&ampx[26],0,0} ,
+ { "NCBI-Seqres" , NULL,&atx[1094],NULL,&ampx[27],0,0} ,
+ { "NCBI-Submit" , NULL,&atx[1239],NULL,&ampx[28],0,0} ,
+ { "NCBI-Cn3d" , NULL,&atx[1278],NULL,&ampx[29],0,0} ,
+ { "NCBI-Project" , NULL,&atx[1395],NULL,&ampx[30],0,0} ,
+ { "NCBI-Access" , NULL,&atx[1459],NULL,&ampx[31],0,0} ,
+ { "NCBI-FeatDef" , NULL,&atx[1465],NULL,&ampx[32],0,0} ,
+ { "NCBI-Mime" , NULL,&atx[1484],NULL,&ampx[33],0,0} ,
+ { "NCBI-ObjPrt" , NULL,&atx[1560],NULL,&ampx[34],0,0} ,
+ { "NCBI-GBSeq" , NULL,&atx[1596],NULL,&ampx[35],0,0} ,
+ { "INSD-INSDSeq" , NULL,&atx[1673],NULL,&ampx[36],0,0} ,
+ { "NCBI-TSeq" , NULL,&atx[1750],NULL,&ampx[37],0,0} ,
+ { "NCBI-ScoreMat" , NULL,&atx[1763],NULL,&ampx[38],0,0} ,
+ { "NCBI-Macro" , NULL,&atx[1821],NULL,NULL,0,0} };
static AsnValxNodePtr avn = avnx;
static AsnTypePtr at = atx;
@@ -2966,9 +3793,9 @@ static AsnModulePtr amp = ampx;
#define BIOSEQ_id &at[644]
#define BIOSEQ_id_E &at[645]
#define BIOSEQ_descr &at[646]
-#define BIOSEQ_inst &at[838]
-#define BIOSEQ_annot &at[1072]
-#define BIOSEQ_annot_E &at[1073]
+#define BIOSEQ_inst &at[839]
+#define BIOSEQ_annot &at[1073]
+#define BIOSEQ_annot_E &at[1074]
#define GIBB_MOL &at[651]
@@ -2979,6 +3806,7 @@ static AsnModulePtr amp = ampx;
#define MOLINFO_tech &at[835]
#define MOLINFO_techexp &at[836]
#define MOLINFO_completeness &at[837]
+#define MOLINFO_gbmoltype &at[838]
#define NUMBERING &at[447]
#define NUMBERING_cont &at[448]
@@ -2999,36 +3827,37 @@ static AsnModulePtr amp = ampx;
#define PUBDESC_comment &at[625]
#define PUBDESC_reftype &at[626]
-#define SEQ_ANNOT &at[1074]
-#define SEQ_ANNOT_id &at[1075]
-#define SEQ_ANNOT_id_E &at[1076]
-#define SEQ_ANNOT_db &at[1082]
-#define SEQ_ANNOT_name &at[1083]
-#define SEQ_ANNOT_desc &at[1084]
-#define SEQ_ANNOT_data &at[1085]
-#define SEQ_ANNOT_data_ftable &at[1086]
-#define SEQ_ANNOT_data_ftable_E &at[1087]
-#define SEQ_ANNOT_data_align &at[1088]
-#define SEQ_ANNOT_data_align_E &at[1089]
-#define SEQ_ANNOT_data_graph &at[1090]
-#define SEQ_ANNOT_data_graph_E &at[1091]
-#define SEQ_ANNOT_data_ids &at[1125]
-#define SEQ_ANNOT_data_ids_E &at[1126]
-#define SEQ_ANNOT_data_locs &at[1127]
-#define SEQ_ANNOT_data_locs_E &at[1128]
-
-#define SEQ_DATA &at[848]
-#define SEQ_DATA_iupacna &at[849]
-#define SEQ_DATA_iupacaa &at[851]
-#define SEQ_DATA_ncbi2na &at[853]
-#define SEQ_DATA_ncbi4na &at[855]
-#define SEQ_DATA_ncbi8na &at[857]
-#define SEQ_DATA_ncbipna &at[859]
-#define SEQ_DATA_ncbi8aa &at[861]
-#define SEQ_DATA_ncbieaa &at[863]
-#define SEQ_DATA_ncbipaa &at[865]
-#define SEQ_DATA_ncbistdaa &at[867]
-#define SEQ_DATA_gap &at[869]
+#define SEQ_ANNOT &at[1075]
+#define SEQ_ANNOT_id &at[1076]
+#define SEQ_ANNOT_id_E &at[1077]
+#define SEQ_ANNOT_db &at[1083]
+#define SEQ_ANNOT_name &at[1084]
+#define SEQ_ANNOT_desc &at[1085]
+#define SEQ_ANNOT_data &at[1086]
+#define SEQ_ANNOT_data_ftable &at[1087]
+#define SEQ_ANNOT_data_ftable_E &at[1088]
+#define SEQ_ANNOT_data_align &at[1089]
+#define SEQ_ANNOT_data_align_E &at[1090]
+#define SEQ_ANNOT_data_graph &at[1091]
+#define SEQ_ANNOT_data_graph_E &at[1092]
+#define SEQ_ANNOT_data_ids &at[1126]
+#define SEQ_ANNOT_data_ids_E &at[1127]
+#define SEQ_ANNOT_data_locs &at[1128]
+#define SEQ_ANNOT_data_locs_E &at[1129]
+#define SEQ_ANNOT_data_seq_table &at[1130]
+
+#define SEQ_DATA &at[849]
+#define SEQ_DATA_iupacna &at[850]
+#define SEQ_DATA_iupacaa &at[852]
+#define SEQ_DATA_ncbi2na &at[854]
+#define SEQ_DATA_ncbi4na &at[856]
+#define SEQ_DATA_ncbi8na &at[858]
+#define SEQ_DATA_ncbipna &at[860]
+#define SEQ_DATA_ncbi8aa &at[862]
+#define SEQ_DATA_ncbieaa &at[864]
+#define SEQ_DATA_ncbipaa &at[866]
+#define SEQ_DATA_ncbistdaa &at[868]
+#define SEQ_DATA_gap &at[870]
#define SEQDESC &at[649]
#define SEQDESC_mol_type &at[650]
@@ -3060,39 +3889,39 @@ static AsnModulePtr amp = ampx;
#define SEQ_DESCR &at[647]
#define SEQ_DESCR_E &at[648]
-#define SEQ_EXT &at[874]
-#define SEQ_EXT_seg &at[875]
-#define SEQ_EXT_ref &at[878]
-#define SEQ_EXT_map &at[880]
-#define SEQ_EXT_delta &at[1049]
-
-#define SEQ_HIST &at[1060]
-#define SEQ_HIST_assembly &at[1061]
-#define SEQ_HIST_assembly_E &at[1062]
-#define SEQ_HIST_replaces &at[1063]
-#define SEQ_HIST_replaced_by &at[1068]
-#define SEQ_HIST_deleted &at[1069]
-#define SEQ_HIST_deleted_bool &at[1070]
-#define SEQ_HIST_deleted_date &at[1071]
-
-#define SEQ_INST &at[839]
-#define SEQ_INST_repr &at[840]
-#define SEQ_INST_mol &at[841]
-#define SEQ_INST_length &at[842]
-#define SEQ_INST_fuzz &at[843]
-#define SEQ_INST_topology &at[845]
-#define SEQ_INST_strand &at[846]
-#define SEQ_INST_seq_data &at[847]
-#define SEQ_INST_ext &at[873]
-#define SEQ_INST_hist &at[1059]
-
-#define SEQ_LITERAL &at[1055]
-#define SEQ_LITERAL_length &at[1056]
-#define SEQ_LITERAL_fuzz &at[1057]
-#define SEQ_LITERAL_seq_data &at[1058]
-
-#define DELTA_EXT &at[1050]
-#define DELTA_EXT_E &at[1051]
+#define SEQ_EXT &at[875]
+#define SEQ_EXT_seg &at[876]
+#define SEQ_EXT_ref &at[879]
+#define SEQ_EXT_map &at[881]
+#define SEQ_EXT_delta &at[1050]
+
+#define SEQ_HIST &at[1061]
+#define SEQ_HIST_assembly &at[1062]
+#define SEQ_HIST_assembly_E &at[1063]
+#define SEQ_HIST_replaces &at[1064]
+#define SEQ_HIST_replaced_by &at[1069]
+#define SEQ_HIST_deleted &at[1070]
+#define SEQ_HIST_deleted_bool &at[1071]
+#define SEQ_HIST_deleted_date &at[1072]
+
+#define SEQ_INST &at[840]
+#define SEQ_INST_repr &at[841]
+#define SEQ_INST_mol &at[842]
+#define SEQ_INST_length &at[843]
+#define SEQ_INST_fuzz &at[844]
+#define SEQ_INST_topology &at[846]
+#define SEQ_INST_strand &at[847]
+#define SEQ_INST_seq_data &at[848]
+#define SEQ_INST_ext &at[874]
+#define SEQ_INST_hist &at[1060]
+
+#define SEQ_LITERAL &at[1056]
+#define SEQ_LITERAL_length &at[1057]
+#define SEQ_LITERAL_fuzz &at[1058]
+#define SEQ_LITERAL_seq_data &at[1059]
+
+#define DELTA_EXT &at[1051]
+#define DELTA_EXT_E &at[1052]
#define GIBB_MOD &at[654]
@@ -3117,51 +3946,51 @@ static AsnModulePtr amp = ampx;
#define NUM_REAL_b &at[617]
#define NUM_REAL_units &at[618]
-#define SEG_EXT &at[876]
-#define SEG_EXT_E &at[877]
+#define SEG_EXT &at[877]
+#define SEG_EXT_E &at[878]
-#define REF_EXT &at[879]
+#define REF_EXT &at[880]
-#define MAP_EXT &at[881]
-#define MAP_EXT_E &at[882]
+#define MAP_EXT &at[882]
+#define MAP_EXT_E &at[883]
-#define DELTA_SEQ &at[1052]
-#define DELTA_SEQ_loc &at[1053]
-#define DELTA_SEQ_literal &at[1054]
+#define DELTA_SEQ &at[1053]
+#define DELTA_SEQ_loc &at[1054]
+#define DELTA_SEQ_literal &at[1055]
-#define SEQ_HIST_REC &at[1064]
-#define SEQ_HIST_REC_date &at[1065]
-#define SEQ_HIST_REC_ids &at[1066]
-#define SEQ_HIST_REC_ids_E &at[1067]
+#define SEQ_HIST_REC &at[1065]
+#define SEQ_HIST_REC_date &at[1066]
+#define SEQ_HIST_REC_ids &at[1067]
+#define SEQ_HIST_REC_ids_E &at[1068]
-#define IUPACNA &at[850]
+#define IUPACNA &at[851]
-#define IUPACAA &at[852]
+#define IUPACAA &at[853]
-#define NCBI2NA &at[854]
+#define NCBI2NA &at[855]
-#define NCBI4NA &at[856]
+#define NCBI4NA &at[857]
-#define NCBI8NA &at[858]
+#define NCBI8NA &at[859]
-#define NCBIPNA &at[860]
+#define NCBIPNA &at[861]
-#define NCBI8AA &at[862]
+#define NCBI8AA &at[863]
-#define NCBIEAA &at[864]
+#define NCBIEAA &at[865]
-#define NCBIPAA &at[866]
+#define NCBIPAA &at[867]
-#define NCBISTDAA &at[868]
+#define NCBISTDAA &at[869]
-#define SEQ_GAP &at[870]
-#define SEQ_GAP_type &at[871]
-#define SEQ_GAP_linkage &at[872]
+#define SEQ_GAP &at[871]
+#define SEQ_GAP_type &at[872]
+#define SEQ_GAP_linkage &at[873]
-#define ANNOT_ID &at[1077]
-#define ANNOT_ID_local &at[1078]
-#define ANNOT_ID_ncbi &at[1080]
-#define ANNOT_ID_general &at[1081]
+#define ANNOT_ID &at[1078]
+#define ANNOT_ID_local &at[1079]
+#define ANNOT_ID_ncbi &at[1081]
+#define ANNOT_ID_general &at[1082]
#define ALIGN_DEF &at[635]
#define ALIGN_DEF_align_type &at[636]
@@ -3175,22 +4004,22 @@ static AsnModulePtr amp = ampx;
*
**************************************************/
-#define BIOSEQ_SET &at[1129]
-#define BIOSEQ_SET_id &at[1130]
-#define BIOSEQ_SET_coll &at[1132]
-#define BIOSEQ_SET_level &at[1134]
-#define BIOSEQ_SET_class &at[1135]
-#define BIOSEQ_SET_release &at[1136]
-#define BIOSEQ_SET_date &at[1137]
-#define BIOSEQ_SET_descr &at[1139]
-#define BIOSEQ_SET_seq_set &at[1141]
-#define BIOSEQ_SET_seq_set_E &at[1142]
-#define BIOSEQ_SET_annot &at[1147]
-#define BIOSEQ_SET_annot_E &at[1148]
+#define BIOSEQ_SET &at[1192]
+#define BIOSEQ_SET_id &at[1193]
+#define BIOSEQ_SET_coll &at[1195]
+#define BIOSEQ_SET_level &at[1197]
+#define BIOSEQ_SET_class &at[1198]
+#define BIOSEQ_SET_release &at[1199]
+#define BIOSEQ_SET_date &at[1200]
+#define BIOSEQ_SET_descr &at[1202]
+#define BIOSEQ_SET_seq_set &at[1204]
+#define BIOSEQ_SET_seq_set_E &at[1205]
+#define BIOSEQ_SET_annot &at[1210]
+#define BIOSEQ_SET_annot_E &at[1211]
-#define SEQ_ENTRY &at[1143]
-#define SEQ_ENTRY_seq &at[1144]
-#define SEQ_ENTRY_set &at[1146]
+#define SEQ_ENTRY &at[1206]
+#define SEQ_ENTRY_seq &at[1207]
+#define SEQ_ENTRY_set &at[1209]
/**************************************************
@@ -3199,33 +4028,33 @@ static AsnModulePtr amp = ampx;
*
**************************************************/
-#define SEQ_CODE_TABLE &at[1150]
-#define SEQ_CODE_TABLE_code &at[1151]
-#define SEQ_CODE_TABLE_num &at[1153]
-#define SEQ_CODE_TABLE_one_letter &at[1154]
-#define SEQ_CODE_TABLE_start_at &at[1155]
-#define SEQ_CODE_TABLE_table &at[1156]
-#define SEQ_CODE_TABLE_table_E &at[1157]
-#define SEQ_CODE_TABLE_table_E_symbol &at[1158]
-#define SEQ_CODE_TABLE_table_E_name &at[1159]
-#define SEQ_CODE_TABLE_comps &at[1160]
-#define SEQ_CODE_TABLE_comps_E &at[1161]
-
-#define SEQ_MAP_TABLE &at[1162]
-#define SEQ_MAP_TABLE_from &at[1163]
-#define SEQ_MAP_TABLE_to &at[1164]
-#define SEQ_MAP_TABLE_num &at[1165]
-#define SEQ_MAP_TABLE_start_at &at[1166]
-#define SEQ_MAP_TABLE_table &at[1167]
-#define SEQ_MAP_TABLE_table_E &at[1168]
-
-#define SEQ_CODE_SET &at[1169]
-#define SEQ_CODE_SET_codes &at[1170]
-#define SEQ_CODE_SET_codes_E &at[1171]
-#define SEQ_CODE_SET_maps &at[1172]
-#define SEQ_CODE_SET_maps_E &at[1173]
-
-#define SEQ_CODE_TYPE &at[1152]
+#define SEQ_CODE_TABLE &at[1213]
+#define SEQ_CODE_TABLE_code &at[1214]
+#define SEQ_CODE_TABLE_num &at[1216]
+#define SEQ_CODE_TABLE_one_letter &at[1217]
+#define SEQ_CODE_TABLE_start_at &at[1218]
+#define SEQ_CODE_TABLE_table &at[1219]
+#define SEQ_CODE_TABLE_table_E &at[1220]
+#define SEQ_CODE_TABLE_table_E_symbol &at[1221]
+#define SEQ_CODE_TABLE_table_E_name &at[1222]
+#define SEQ_CODE_TABLE_comps &at[1223]
+#define SEQ_CODE_TABLE_comps_E &at[1224]
+
+#define SEQ_MAP_TABLE &at[1225]
+#define SEQ_MAP_TABLE_from &at[1226]
+#define SEQ_MAP_TABLE_to &at[1227]
+#define SEQ_MAP_TABLE_num &at[1228]
+#define SEQ_MAP_TABLE_start_at &at[1229]
+#define SEQ_MAP_TABLE_table &at[1230]
+#define SEQ_MAP_TABLE_table_E &at[1231]
+
+#define SEQ_CODE_SET &at[1232]
+#define SEQ_CODE_SET_codes &at[1233]
+#define SEQ_CODE_SET_codes_E &at[1234]
+#define SEQ_CODE_SET_maps &at[1235]
+#define SEQ_CODE_SET_maps_E &at[1236]
+
+#define SEQ_CODE_TYPE &at[1215]
/**************************************************
@@ -3370,30 +4199,30 @@ static AsnModulePtr amp = ampx;
*
**************************************************/
-#define SEQ_FEAT &at[884]
-#define SEQ_FEAT_id &at[885]
-#define SEQ_FEAT_data &at[886]
-#define SEQ_FEAT_partial &at[1021]
-#define SEQ_FEAT_except &at[1022]
-#define SEQ_FEAT_comment &at[1023]
-#define SEQ_FEAT_product &at[1024]
-#define SEQ_FEAT_location &at[1025]
-#define SEQ_FEAT_qual &at[1026]
-#define SEQ_FEAT_qual_E &at[1027]
-#define SEQ_FEAT_title &at[1031]
-#define SEQ_FEAT_ext &at[1032]
-#define SEQ_FEAT_cit &at[1033]
-#define SEQ_FEAT_exp_ev &at[1035]
-#define SEQ_FEAT_xref &at[1036]
-#define SEQ_FEAT_xref_E &at[1037]
-#define SEQ_FEAT_dbxref &at[1041]
-#define SEQ_FEAT_dbxref_E &at[1042]
-#define SEQ_FEAT_pseudo &at[1043]
-#define SEQ_FEAT_except_text &at[1044]
-#define SEQ_FEAT_ids &at[1045]
-#define SEQ_FEAT_ids_E &at[1046]
-#define SEQ_FEAT_exts &at[1047]
-#define SEQ_FEAT_exts_E &at[1048]
+#define SEQ_FEAT &at[885]
+#define SEQ_FEAT_id &at[886]
+#define SEQ_FEAT_data &at[887]
+#define SEQ_FEAT_partial &at[1022]
+#define SEQ_FEAT_except &at[1023]
+#define SEQ_FEAT_comment &at[1024]
+#define SEQ_FEAT_product &at[1025]
+#define SEQ_FEAT_location &at[1026]
+#define SEQ_FEAT_qual &at[1027]
+#define SEQ_FEAT_qual_E &at[1028]
+#define SEQ_FEAT_title &at[1032]
+#define SEQ_FEAT_ext &at[1033]
+#define SEQ_FEAT_cit &at[1034]
+#define SEQ_FEAT_exp_ev &at[1036]
+#define SEQ_FEAT_xref &at[1037]
+#define SEQ_FEAT_xref_E &at[1038]
+#define SEQ_FEAT_dbxref &at[1042]
+#define SEQ_FEAT_dbxref_E &at[1043]
+#define SEQ_FEAT_pseudo &at[1044]
+#define SEQ_FEAT_except_text &at[1045]
+#define SEQ_FEAT_ids &at[1046]
+#define SEQ_FEAT_ids_E &at[1047]
+#define SEQ_FEAT_exts &at[1048]
+#define SEQ_FEAT_exts_E &at[1049]
#define FEAT_ID &at[428]
#define FEAT_ID_gibb &at[429]
@@ -3401,72 +4230,72 @@ static AsnModulePtr amp = ampx;
#define FEAT_ID_local &at[432]
#define FEAT_ID_general &at[434]
-#define GENETIC_CODE &at[912]
-#define GENETIC_CODE_E &at[913]
-#define GENETIC_CODE_E_name &at[914]
-#define GENETIC_CODE_E_id &at[915]
-#define GENETIC_CODE_E_ncbieaa &at[916]
-#define GENETIC_CODE_E_ncbi8aa &at[917]
-#define GENETIC_CODE_E_ncbistdaa &at[918]
-#define GENETIC_CODE_E_sncbieaa &at[919]
-#define GENETIC_CODE_E_sncbi8aa &at[920]
-#define GENETIC_CODE_E_sncbistdaa &at[921]
-
-#define SEQFEATDATA &at[887]
-#define SEQFEATDATA_gene &at[888]
-#define SEQFEATDATA_org &at[902]
-#define SEQFEATDATA_cdregion &at[904]
-#define SEQFEATDATA_prot &at[932]
-#define SEQFEATDATA_rna &at[946]
-#define SEQFEATDATA_pub &at[964]
-#define SEQFEATDATA_seq &at[966]
-#define SEQFEATDATA_imp &at[967]
-#define SEQFEATDATA_region &at[972]
-#define SEQFEATDATA_comment &at[973]
-#define SEQFEATDATA_bond &at[974]
-#define SEQFEATDATA_site &at[975]
-#define SEQFEATDATA_rsite &at[976]
-#define SEQFEATDATA_user &at[982]
-#define SEQFEATDATA_txinit &at[984]
-#define SEQFEATDATA_num &at[1013]
-#define SEQFEATDATA_psec_str &at[1015]
-#define SEQFEATDATA_non_std_residue &at[1016]
-#define SEQFEATDATA_het &at[1017]
-#define SEQFEATDATA_biosrc &at[1019]
-
-#define GB_QUAL &at[1028]
-#define GB_QUAL_qual &at[1029]
-#define GB_QUAL_val &at[1030]
-
-#define SEQFEATXREF &at[1038]
-#define SEQFEATXREF_id &at[1039]
-#define SEQFEATXREF_data &at[1040]
-
-#define CDREGION &at[905]
-#define CDREGION_orf &at[906]
-#define CDREGION_frame &at[907]
-#define CDREGION_conflict &at[908]
-#define CDREGION_gaps &at[909]
-#define CDREGION_mismatch &at[910]
-#define CDREGION_code &at[911]
-#define CDREGION_code_break &at[922]
-#define CDREGION_code_break_E &at[923]
-#define CDREGION_stops &at[931]
-
-#define IMP_FEAT &at[968]
-#define IMP_FEAT_key &at[969]
-#define IMP_FEAT_loc &at[970]
-#define IMP_FEAT_descr &at[971]
-
-#define CODE_BREAK &at[924]
-#define CODE_BREAK_loc &at[925]
-#define CODE_BREAK_aa &at[927]
-#define CODE_BREAK_aa_ncbieaa &at[928]
-#define CODE_BREAK_aa_ncbi8aa &at[929]
-#define CODE_BREAK_aa_ncbistdaa &at[930]
-
-#define GENETIC_CODE_TABLE &at[1174]
-#define GENETIC_CODE_TABLE_E &at[1175]
+#define GENETIC_CODE &at[913]
+#define GENETIC_CODE_E &at[914]
+#define GENETIC_CODE_E_name &at[915]
+#define GENETIC_CODE_E_id &at[916]
+#define GENETIC_CODE_E_ncbieaa &at[917]
+#define GENETIC_CODE_E_ncbi8aa &at[918]
+#define GENETIC_CODE_E_ncbistdaa &at[919]
+#define GENETIC_CODE_E_sncbieaa &at[920]
+#define GENETIC_CODE_E_sncbi8aa &at[921]
+#define GENETIC_CODE_E_sncbistdaa &at[922]
+
+#define SEQFEATDATA &at[888]
+#define SEQFEATDATA_gene &at[889]
+#define SEQFEATDATA_org &at[903]
+#define SEQFEATDATA_cdregion &at[905]
+#define SEQFEATDATA_prot &at[933]
+#define SEQFEATDATA_rna &at[947]
+#define SEQFEATDATA_pub &at[965]
+#define SEQFEATDATA_seq &at[967]
+#define SEQFEATDATA_imp &at[968]
+#define SEQFEATDATA_region &at[973]
+#define SEQFEATDATA_comment &at[974]
+#define SEQFEATDATA_bond &at[975]
+#define SEQFEATDATA_site &at[976]
+#define SEQFEATDATA_rsite &at[977]
+#define SEQFEATDATA_user &at[983]
+#define SEQFEATDATA_txinit &at[985]
+#define SEQFEATDATA_num &at[1014]
+#define SEQFEATDATA_psec_str &at[1016]
+#define SEQFEATDATA_non_std_residue &at[1017]
+#define SEQFEATDATA_het &at[1018]
+#define SEQFEATDATA_biosrc &at[1020]
+
+#define GB_QUAL &at[1029]
+#define GB_QUAL_qual &at[1030]
+#define GB_QUAL_val &at[1031]
+
+#define SEQFEATXREF &at[1039]
+#define SEQFEATXREF_id &at[1040]
+#define SEQFEATXREF_data &at[1041]
+
+#define CDREGION &at[906]
+#define CDREGION_orf &at[907]
+#define CDREGION_frame &at[908]
+#define CDREGION_conflict &at[909]
+#define CDREGION_gaps &at[910]
+#define CDREGION_mismatch &at[911]
+#define CDREGION_code &at[912]
+#define CDREGION_code_break &at[923]
+#define CDREGION_code_break_E &at[924]
+#define CDREGION_stops &at[932]
+
+#define IMP_FEAT &at[969]
+#define IMP_FEAT_key &at[970]
+#define IMP_FEAT_loc &at[971]
+#define IMP_FEAT_descr &at[972]
+
+#define CODE_BREAK &at[925]
+#define CODE_BREAK_loc &at[926]
+#define CODE_BREAK_aa &at[928]
+#define CODE_BREAK_aa_ncbieaa &at[929]
+#define CODE_BREAK_aa_ncbi8aa &at[930]
+#define CODE_BREAK_aa_ncbistdaa &at[931]
+
+#define GENETIC_CODE_TABLE &at[1237]
+#define GENETIC_CODE_TABLE_E &at[1238]
/**************************************************
@@ -3475,9 +4304,9 @@ static AsnModulePtr amp = ampx;
*
**************************************************/
-#define RSITE_REF &at[978]
-#define RSITE_REF_str &at[979]
-#define RSITE_REF_db &at[980]
+#define RSITE_REF &at[979]
+#define RSITE_REF_str &at[980]
+#define RSITE_REF_db &at[981]
/**************************************************
@@ -3486,22 +4315,22 @@ static AsnModulePtr amp = ampx;
*
**************************************************/
-#define RNA_REF &at[948]
-#define RNA_REF_type &at[949]
-#define RNA_REF_pseudo &at[950]
-#define RNA_REF_ext &at[951]
-#define RNA_REF_ext_name &at[952]
-#define RNA_REF_ext_tRNA &at[953]
+#define RNA_REF &at[949]
+#define RNA_REF_type &at[950]
+#define RNA_REF_pseudo &at[951]
+#define RNA_REF_ext &at[952]
+#define RNA_REF_ext_name &at[953]
+#define RNA_REF_ext_tRNA &at[954]
-#define TRNA_EXT &at[954]
-#define TRNA_EXT_aa &at[955]
-#define TRNA_EXT_aa_iupacaa &at[956]
-#define TRNA_EXT_aa_ncbieaa &at[957]
-#define TRNA_EXT_aa_ncbi8aa &at[958]
-#define TRNA_EXT_aa_ncbistdaa &at[959]
-#define TRNA_EXT_codon &at[960]
-#define TRNA_EXT_codon_E &at[961]
-#define TRNA_EXT_anticodon &at[962]
+#define TRNA_EXT &at[955]
+#define TRNA_EXT_aa &at[956]
+#define TRNA_EXT_aa_iupacaa &at[957]
+#define TRNA_EXT_aa_ncbieaa &at[958]
+#define TRNA_EXT_aa_ncbi8aa &at[959]
+#define TRNA_EXT_aa_ncbistdaa &at[960]
+#define TRNA_EXT_codon &at[961]
+#define TRNA_EXT_codon_E &at[962]
+#define TRNA_EXT_anticodon &at[963]
/**************************************************
@@ -3510,17 +4339,17 @@ static AsnModulePtr amp = ampx;
*
**************************************************/
-#define GENE_REF &at[890]
-#define GENE_REF_locus &at[891]
-#define GENE_REF_allele &at[892]
-#define GENE_REF_desc &at[893]
-#define GENE_REF_maploc &at[894]
-#define GENE_REF_pseudo &at[895]
-#define GENE_REF_db &at[896]
-#define GENE_REF_db_E &at[897]
-#define GENE_REF_syn &at[899]
-#define GENE_REF_syn_E &at[900]
-#define GENE_REF_locus_tag &at[901]
+#define GENE_REF &at[891]
+#define GENE_REF_locus &at[892]
+#define GENE_REF_allele &at[893]
+#define GENE_REF_desc &at[894]
+#define GENE_REF_maploc &at[895]
+#define GENE_REF_pseudo &at[896]
+#define GENE_REF_db &at[897]
+#define GENE_REF_db_E &at[898]
+#define GENE_REF_syn &at[900]
+#define GENE_REF_syn_E &at[901]
+#define GENE_REF_locus_tag &at[902]
/**************************************************
@@ -3603,17 +4432,17 @@ static AsnModulePtr amp = ampx;
*
**************************************************/
-#define PROT_REF &at[934]
-#define PROT_REF_name &at[935]
-#define PROT_REF_name_E &at[936]
-#define PROT_REF_desc &at[937]
-#define PROT_REF_ec &at[938]
-#define PROT_REF_ec_E &at[939]
-#define PROT_REF_activity &at[940]
-#define PROT_REF_activity_E &at[941]
-#define PROT_REF_db &at[942]
-#define PROT_REF_db_E &at[943]
-#define PROT_REF_processed &at[945]
+#define PROT_REF &at[935]
+#define PROT_REF_name &at[936]
+#define PROT_REF_name_E &at[937]
+#define PROT_REF_desc &at[938]
+#define PROT_REF_ec &at[939]
+#define PROT_REF_ec_E &at[940]
+#define PROT_REF_activity &at[941]
+#define PROT_REF_activity_E &at[942]
+#define PROT_REF_db &at[943]
+#define PROT_REF_db_E &at[944]
+#define PROT_REF_processed &at[946]
/**************************************************
@@ -3622,31 +4451,103 @@ static AsnModulePtr amp = ampx;
*
**************************************************/
-#define TXINIT &at[986]
-#define TXINIT_name &at[987]
-#define TXINIT_syn &at[988]
-#define TXINIT_syn_E &at[989]
-#define TXINIT_gene &at[990]
-#define TXINIT_gene_E &at[991]
-#define TXINIT_protein &at[993]
-#define TXINIT_protein_E &at[994]
-#define TXINIT_rna &at[996]
-#define TXINIT_rna_E &at[997]
-#define TXINIT_expression &at[998]
-#define TXINIT_txsystem &at[999]
-#define TXINIT_txdescr &at[1000]
-#define TXINIT_txorg &at[1001]
-#define TXINIT_mapping_precise &at[1003]
-#define TXINIT_location_accurate &at[1004]
-#define TXINIT_inittype &at[1005]
-#define TXINIT_evidence &at[1006]
-#define TXINIT_evidence_E &at[1007]
-
-#define TX_EVIDENCE &at[1008]
-#define TX_EVIDENCE_exp_code &at[1009]
-#define TX_EVIDENCE_expression_system &at[1010]
-#define TX_EVIDENCE_low_prec_data &at[1011]
-#define TX_EVIDENCE_from_homolog &at[1012]
+#define TXINIT &at[987]
+#define TXINIT_name &at[988]
+#define TXINIT_syn &at[989]
+#define TXINIT_syn_E &at[990]
+#define TXINIT_gene &at[991]
+#define TXINIT_gene_E &at[992]
+#define TXINIT_protein &at[994]
+#define TXINIT_protein_E &at[995]
+#define TXINIT_rna &at[997]
+#define TXINIT_rna_E &at[998]
+#define TXINIT_expression &at[999]
+#define TXINIT_txsystem &at[1000]
+#define TXINIT_txdescr &at[1001]
+#define TXINIT_txorg &at[1002]
+#define TXINIT_mapping_precise &at[1004]
+#define TXINIT_location_accurate &at[1005]
+#define TXINIT_inittype &at[1006]
+#define TXINIT_evidence &at[1007]
+#define TXINIT_evidence_E &at[1008]
+
+#define TX_EVIDENCE &at[1009]
+#define TX_EVIDENCE_exp_code &at[1010]
+#define TX_EVIDENCE_expression_system &at[1011]
+#define TX_EVIDENCE_low_prec_data &at[1012]
+#define TX_EVIDENCE_from_homolog &at[1013]
+
+
+/**************************************************
+*
+* Defines for Module NCBI-SeqTable
+*
+**************************************************/
+
+#define SEQTABLE_COLUMN_INFO &at[1140]
+#define SEQTABLE_COLUMN_INFO_title &at[1141]
+#define SEQTABLE_COLUMN_INFO_field_id &at[1142]
+#define SEQTABLE_COLUMN_INFO_field_name &at[1143]
+
+#define SEQTABLE_COLUMN &at[1138]
+#define SEQTABLE_COLUMN_header &at[1139]
+#define SEQTABLE_COLUMN_data &at[1144]
+#define SEQTABLE_COLUMN_sparse &at[1176]
+#define SEQTABLE_COLUMN_default &at[1181]
+#define SEQTABLE_COLUMN_sparse_other &at[1191]
+
+#define SEQ_TABLE &at[1132]
+#define SEQ_TABLE_feat_type &at[1133]
+#define SEQ_TABLE_feat_subtype &at[1134]
+#define SEQ_TABLE_num_rows &at[1135]
+#define SEQ_TABLE_columns &at[1136]
+#define SEQ_TABLE_columns_E &at[1137]
+
+#define COMMONSTRING_TABLE &at[1155]
+#define COMMONSTRING_TABLE_strings &at[1156]
+#define COMMONSTRING_TABLE_strings_E &at[1157]
+#define COMMONSTRING_TABLE_indexes &at[1158]
+#define COMMONSTRING_TABLE_indexes_E &at[1159]
+
+#define COMMONBYTES_TABLE &at[1161]
+#define COMMONBYTES_TABLE_bytes &at[1162]
+#define COMMONBYTES_TABLE_bytes_E &at[1163]
+#define COMMONBYTES_TABLE_indexes &at[1164]
+#define COMMONBYTES_TABLE_indexes_E &at[1165]
+
+#define SEQTABLE_MULTI_DATA &at[1145]
+#define SEQTABLE_MULTI_DATA_int &at[1146]
+#define SEQTABLE_MULTI_DATA_int_E &at[1147]
+#define SEQTABLE_MULTI_DATA_real &at[1148]
+#define SEQTABLE_MULTI_DATA_real_E &at[1149]
+#define SEQTABLE_MULTI_DATA_string &at[1150]
+#define SEQTABLE_MULTI_DATA_string_E &at[1151]
+#define SEQTABLE_MULTI_DATA_bytes &at[1152]
+#define SEQTABLE_MULTI_DATA_bytes_E &at[1153]
+#define MULTI_DATA_common_string &at[1154]
+#define MULTI_DATA_common_bytes &at[1160]
+#define SEQTABLE_MULTI_DATA_bit &at[1166]
+#define SEQTABLE_MULTI_DATA_loc &at[1167]
+#define SEQTABLE_MULTI_DATA_loc_E &at[1168]
+#define SEQTABLE_MULTI_DATA_id &at[1170]
+#define SEQTABLE_MULTI_DATA_id_E &at[1171]
+#define SEQTABLE_MULTI_DATA_interval &at[1173]
+#define SEQTABLE_MULTI_DATA_interval_E &at[1174]
+
+#define SEQTABLE_SINGLE_DATA &at[1182]
+#define SEQTABLE_SINGLE_DATA_int &at[1183]
+#define SEQTABLE_SINGLE_DATA_real &at[1184]
+#define SEQTABLE_SINGLE_DATA_string &at[1185]
+#define SEQTABLE_SINGLE_DATA_bytes &at[1186]
+#define SEQTABLE_SINGLE_DATA_bit &at[1187]
+#define SEQTABLE_SINGLE_DATA_loc &at[1188]
+#define SEQTABLE_SINGLE_DATA_id &at[1189]
+#define SEQTABLE_SINGLE_DATA_interval &at[1190]
+
+#define SEQTABLE_SPARSE_INDEX &at[1177]
+#define SEQTABLE_SPARSE_INDEX_indexes &at[1178]
+#define SEQTABLE_SPARSE_INDEX_indexes_E &at[1179]
+#define SEQTABLE_SPARSE_INDEX_bit_set &at[1180]
/**************************************************
@@ -3826,40 +4727,40 @@ static AsnModulePtr amp = ampx;
*
**************************************************/
-#define SEQ_GRAPH &at[1093]
-#define SEQ_GRAPH_title &at[1094]
-#define SEQ_GRAPH_comment &at[1095]
-#define SEQ_GRAPH_loc &at[1096]
-#define SEQ_GRAPH_title_x &at[1098]
-#define SEQ_GRAPH_title_y &at[1099]
-#define SEQ_GRAPH_comp &at[1100]
-#define SEQ_GRAPH_a &at[1101]
-#define SEQ_GRAPH_b &at[1102]
-#define SEQ_GRAPH_numval &at[1103]
-#define SEQ_GRAPH_graph &at[1104]
-#define SEQ_GRAPH_graph_real &at[1105]
-#define SEQ_GRAPH_graph_int &at[1112]
-#define SEQ_GRAPH_graph_byte &at[1119]
-
-#define REAL_GRAPH &at[1106]
-#define REAL_GRAPH_max &at[1107]
-#define REAL_GRAPH_min &at[1108]
-#define REAL_GRAPH_axis &at[1109]
-#define REAL_GRAPH_values &at[1110]
-#define REAL_GRAPH_values_E &at[1111]
-
-#define INT_GRAPH &at[1113]
-#define INT_GRAPH_max &at[1114]
-#define INT_GRAPH_min &at[1115]
-#define INT_GRAPH_axis &at[1116]
-#define INT_GRAPH_values &at[1117]
-#define INT_GRAPH_values_E &at[1118]
-
-#define BYTE_GRAPH &at[1120]
-#define BYTE_GRAPH_max &at[1121]
-#define BYTE_GRAPH_min &at[1122]
-#define BYTE_GRAPH_axis &at[1123]
-#define BYTE_GRAPH_values &at[1124]
+#define SEQ_GRAPH &at[1094]
+#define SEQ_GRAPH_title &at[1095]
+#define SEQ_GRAPH_comment &at[1096]
+#define SEQ_GRAPH_loc &at[1097]
+#define SEQ_GRAPH_title_x &at[1099]
+#define SEQ_GRAPH_title_y &at[1100]
+#define SEQ_GRAPH_comp &at[1101]
+#define SEQ_GRAPH_a &at[1102]
+#define SEQ_GRAPH_b &at[1103]
+#define SEQ_GRAPH_numval &at[1104]
+#define SEQ_GRAPH_graph &at[1105]
+#define SEQ_GRAPH_graph_real &at[1106]
+#define SEQ_GRAPH_graph_int &at[1113]
+#define SEQ_GRAPH_graph_byte &at[1120]
+
+#define REAL_GRAPH &at[1107]
+#define REAL_GRAPH_max &at[1108]
+#define REAL_GRAPH_min &at[1109]
+#define REAL_GRAPH_axis &at[1110]
+#define REAL_GRAPH_values &at[1111]
+#define REAL_GRAPH_values_E &at[1112]
+
+#define INT_GRAPH &at[1114]
+#define INT_GRAPH_max &at[1115]
+#define INT_GRAPH_min &at[1116]
+#define INT_GRAPH_axis &at[1117]
+#define INT_GRAPH_values &at[1118]
+#define INT_GRAPH_values_E &at[1119]
+
+#define BYTE_GRAPH &at[1121]
+#define BYTE_GRAPH_max &at[1122]
+#define BYTE_GRAPH_min &at[1123]
+#define BYTE_GRAPH_axis &at[1124]
+#define BYTE_GRAPH_values &at[1125]
/**************************************************
@@ -3868,40 +4769,40 @@ static AsnModulePtr amp = ampx;
*
**************************************************/
-#define SEQ_SUBMIT &at[1176]
-#define SEQ_SUBMIT_sub &at[1177]
-#define SEQ_SUBMIT_data &at[1205]
-#define SEQ_SUBMIT_data_entrys &at[1206]
-#define SEQ_SUBMIT_data_entrys_E &at[1207]
-#define SEQ_SUBMIT_data_annots &at[1209]
-#define SEQ_SUBMIT_data_annots_E &at[1210]
-#define SEQ_SUBMIT_data_delete &at[1212]
-#define SEQ_SUBMIT_data_delete_E &at[1213]
-
-#define CONTACT_INFO &at[1180]
-#define CONTACT_INFO_name &at[1181]
-#define CONTACT_INFO_address &at[1182]
-#define CONTACT_INFO_address_E &at[1183]
-#define CONTACT_INFO_phone &at[1184]
-#define CONTACT_INFO_fax &at[1185]
-#define CONTACT_INFO_email &at[1186]
-#define CONTACT_INFO_telex &at[1187]
-#define CONTACT_INFO_owner_id &at[1188]
-#define CONTACT_INFO_password &at[1190]
-#define CONTACT_INFO_last_name &at[1191]
-#define CONTACT_INFO_first_name &at[1192]
-#define CONTACT_INFO_middle_initial &at[1193]
-#define CONTACT_INFO_contact &at[1194]
-
-#define SUBMIT_BLOCK &at[1178]
-#define SUBMIT_BLOCK_contact &at[1179]
-#define SUBMIT_BLOCK_cit &at[1196]
-#define SUBMIT_BLOCK_hup &at[1198]
-#define SUBMIT_BLOCK_reldate &at[1199]
-#define SUBMIT_BLOCK_subtype &at[1201]
-#define SUBMIT_BLOCK_tool &at[1202]
-#define SUBMIT_BLOCK_user_tag &at[1203]
-#define SUBMIT_BLOCK_comment &at[1204]
+#define SEQ_SUBMIT &at[1239]
+#define SEQ_SUBMIT_sub &at[1240]
+#define SEQ_SUBMIT_data &at[1268]
+#define SEQ_SUBMIT_data_entrys &at[1269]
+#define SEQ_SUBMIT_data_entrys_E &at[1270]
+#define SEQ_SUBMIT_data_annots &at[1272]
+#define SEQ_SUBMIT_data_annots_E &at[1273]
+#define SEQ_SUBMIT_data_delete &at[1275]
+#define SEQ_SUBMIT_data_delete_E &at[1276]
+
+#define CONTACT_INFO &at[1243]
+#define CONTACT_INFO_name &at[1244]
+#define CONTACT_INFO_address &at[1245]
+#define CONTACT_INFO_address_E &at[1246]
+#define CONTACT_INFO_phone &at[1247]
+#define CONTACT_INFO_fax &at[1248]
+#define CONTACT_INFO_email &at[1249]
+#define CONTACT_INFO_telex &at[1250]
+#define CONTACT_INFO_owner_id &at[1251]
+#define CONTACT_INFO_password &at[1253]
+#define CONTACT_INFO_last_name &at[1254]
+#define CONTACT_INFO_first_name &at[1255]
+#define CONTACT_INFO_middle_initial &at[1256]
+#define CONTACT_INFO_contact &at[1257]
+
+#define SUBMIT_BLOCK &at[1241]
+#define SUBMIT_BLOCK_contact &at[1242]
+#define SUBMIT_BLOCK_cit &at[1259]
+#define SUBMIT_BLOCK_hup &at[1261]
+#define SUBMIT_BLOCK_reldate &at[1262]
+#define SUBMIT_BLOCK_subtype &at[1264]
+#define SUBMIT_BLOCK_tool &at[1265]
+#define SUBMIT_BLOCK_user_tag &at[1266]
+#define SUBMIT_BLOCK_comment &at[1267]
/**************************************************
@@ -3910,139 +4811,139 @@ static AsnModulePtr amp = ampx;
*
**************************************************/
-#define CN3D_STYLE_DICTIONARY &at[1215]
-#define STYLE_DICTIONARY_global_style &at[1216]
-#define STYLE_DICTIONARY_style_table &at[1269]
-#define STYLE_DICTIONARY_style_table_E &at[1270]
-
-#define CN3D_USER_ANNOTATIONS &at[1275]
-#define USER_ANNOTATIONS_annotations &at[1276]
-#define USER_ANNOTATIONS_annotations_E &at[1277]
-#define CN3D_USER_ANNOTATIONS_view &at[1299]
-
-#define CN3D_BACKBONE_TYPE &at[1222]
-
-#define CN3D_DRAWING_STYLE &at[1224]
-
-#define CN3D_COLOR_SCHEME &at[1226]
-
-#define CN3D_COLOR &at[1228]
-#define CN3D_COLOR_scale_factor &at[1229]
-#define CN3D_COLOR_red &at[1230]
-#define CN3D_COLOR_green &at[1231]
-#define CN3D_COLOR_blue &at[1232]
-#define CN3D_COLOR_alpha &at[1233]
-
-#define CN3D_BACKBONE_STYLE &at[1220]
-#define CN3D_BACKBONE_STYLE_type &at[1221]
-#define CN3D_BACKBONE_STYLE_style &at[1223]
-#define BACKBONE_STYLE_color_scheme &at[1225]
-#define CN3D_BACKBONE_STYLE_user_color &at[1227]
-
-#define CN3D_GENERAL_STYLE &at[1236]
-#define CN3D_GENERAL_STYLE_is_on &at[1237]
-#define CN3D_GENERAL_STYLE_style &at[1238]
-#define CN3D_GENERAL_STYLE_color_scheme &at[1239]
-#define CN3D_GENERAL_STYLE_user_color &at[1240]
-
-#define CN3D_BACKBONE_LABEL_STYLE &at[1261]
-#define BACKBONE_LABEL_STYLE_spacing &at[1262]
-#define CN3D_BACKBONE_LABEL_STYLE_type &at[1263]
-#define BACKBONE_LABEL_STYLE_number &at[1264]
-#define BACKBONE_LABEL_STYLE_termini &at[1265]
-#define CN3D_BACKBONE_LABEL_STYLE_white &at[1266]
-
-#define CN3D_STYLE_SETTINGS &at[1217]
-#define CN3D_STYLE_SETTINGS_name &at[1218]
-#define SETTINGS_protein_backbone &at[1219]
-#define SETTINGS_nucleotide_backbone &at[1234]
-#define SETTINGS_protein_sidechains &at[1235]
-#define SETTINGS_nucleotide_sidechains &at[1241]
-#define CN3D_STYLE_SETTINGS_heterogens &at[1242]
-#define CN3D_STYLE_SETTINGS_solvents &at[1243]
-#define CN3D_STYLE_SETTINGS_connections &at[1244]
-#define STYLE_SETTINGS_helix_objects &at[1245]
-#define STYLE_SETTINGS_strand_objects &at[1246]
-#define SETTINGS_virtual_disulfides_on &at[1247]
-#define virtual_disulfide_color &at[1248]
-#define STYLE_SETTINGS_hydrogens_on &at[1249]
-#define SETTINGS_background_color &at[1250]
-#define STYLE_SETTINGS_scale_factor &at[1251]
-#define SETTINGS_space_fill_proportion &at[1252]
-#define CN3D_STYLE_SETTINGS_ball_radius &at[1253]
-#define STYLE_SETTINGS_stick_radius &at[1254]
-#define CN3D_STYLE_SETTINGS_tube_radius &at[1255]
-#define SETTINGS_tube_worm_radius &at[1256]
-#define STYLE_SETTINGS_helix_radius &at[1257]
-#define STYLE_SETTINGS_strand_width &at[1258]
-#define SETTINGS_strand_thickness &at[1259]
-#define STYLE_SETTINGS_protein_labels &at[1260]
-#define SETTINGS_nucleotide_labels &at[1267]
-#define CN3D_STYLE_SETTINGS_ion_labels &at[1268]
-
-#define CN3D_STYLE_SETTINGS_SET &at[1330]
-#define CN3D_STYLE_SETTINGS_SET_E &at[1331]
-
-#define CN3D_STYLE_TABLE_ID &at[1273]
-
-#define CN3D_STYLE_TABLE_ITEM &at[1271]
-#define CN3D_STYLE_TABLE_ITEM_id &at[1272]
-#define CN3D_STYLE_TABLE_ITEM_style &at[1274]
-
-#define CN3D_RESIDUE_RANGE &at[1294]
-#define CN3D_RESIDUE_RANGE_from &at[1295]
-#define CN3D_RESIDUE_RANGE_to &at[1297]
-
-#define CN3D_MOLECULE_LOCATION &at[1289]
-#define MOLECULE_LOCATION_molecule_id &at[1290]
-#define CN3D_MOLECULE_LOCATION_residues &at[1292]
-#define MOLECULE_LOCATION_residues_E &at[1293]
-
-#define CN3D_OBJECT_LOCATION &at[1284]
-#define OBJECT_LOCATION_structure_id &at[1285]
-#define CN3D_OBJECT_LOCATION_residues &at[1287]
-#define CN3D_OBJECT_LOCATION_residues_E &at[1288]
-
-#define CN3D_USER_ANNOTATION &at[1278]
-#define CN3D_USER_ANNOTATION_name &at[1279]
-#define USER_ANNOTATION_description &at[1280]
-#define CN3D_USER_ANNOTATION_style_id &at[1281]
-#define CN3D_USER_ANNOTATION_residues &at[1282]
-#define CN3D_USER_ANNOTATION_residues_E &at[1283]
-#define CN3D_USER_ANNOTATION_is_on &at[1298]
-
-#define CN3D_GL_MATRIX &at[1308]
-#define CN3D_GL_MATRIX_m0 &at[1309]
-#define CN3D_GL_MATRIX_m1 &at[1310]
-#define CN3D_GL_MATRIX_m2 &at[1311]
-#define CN3D_GL_MATRIX_m3 &at[1312]
-#define CN3D_GL_MATRIX_m4 &at[1313]
-#define CN3D_GL_MATRIX_m5 &at[1314]
-#define CN3D_GL_MATRIX_m6 &at[1315]
-#define CN3D_GL_MATRIX_m7 &at[1316]
-#define CN3D_GL_MATRIX_m8 &at[1317]
-#define CN3D_GL_MATRIX_m9 &at[1318]
-#define CN3D_GL_MATRIX_m10 &at[1319]
-#define CN3D_GL_MATRIX_m11 &at[1320]
-#define CN3D_GL_MATRIX_m12 &at[1321]
-#define CN3D_GL_MATRIX_m13 &at[1322]
-#define CN3D_GL_MATRIX_m14 &at[1323]
-#define CN3D_GL_MATRIX_m15 &at[1324]
-
-#define CN3D_VECTOR &at[1326]
-#define CN3D_VECTOR_x &at[1327]
-#define CN3D_VECTOR_y &at[1328]
-#define CN3D_VECTOR_z &at[1329]
-
-#define CN3D_VIEW_SETTINGS &at[1300]
-#define VIEW_SETTINGS_camera_distance &at[1301]
-#define VIEW_SETTINGS_camera_angle_rad &at[1302]
-#define VIEW_SETTINGS_camera_look_at_X &at[1303]
-#define VIEW_SETTINGS_camera_look_at_Y &at[1304]
-#define VIEW_SETTINGS_camera_clip_near &at[1305]
-#define VIEW_SETTINGS_camera_clip_far &at[1306]
-#define CN3D_VIEW_SETTINGS_matrix &at[1307]
-#define VIEW_SETTINGS_rotation_center &at[1325]
+#define CN3D_STYLE_DICTIONARY &at[1278]
+#define STYLE_DICTIONARY_global_style &at[1279]
+#define STYLE_DICTIONARY_style_table &at[1332]
+#define STYLE_DICTIONARY_style_table_E &at[1333]
+
+#define CN3D_USER_ANNOTATIONS &at[1338]
+#define USER_ANNOTATIONS_annotations &at[1339]
+#define USER_ANNOTATIONS_annotations_E &at[1340]
+#define CN3D_USER_ANNOTATIONS_view &at[1362]
+
+#define CN3D_BACKBONE_TYPE &at[1285]
+
+#define CN3D_DRAWING_STYLE &at[1287]
+
+#define CN3D_COLOR_SCHEME &at[1289]
+
+#define CN3D_COLOR &at[1291]
+#define CN3D_COLOR_scale_factor &at[1292]
+#define CN3D_COLOR_red &at[1293]
+#define CN3D_COLOR_green &at[1294]
+#define CN3D_COLOR_blue &at[1295]
+#define CN3D_COLOR_alpha &at[1296]
+
+#define CN3D_BACKBONE_STYLE &at[1283]
+#define CN3D_BACKBONE_STYLE_type &at[1284]
+#define CN3D_BACKBONE_STYLE_style &at[1286]
+#define BACKBONE_STYLE_color_scheme &at[1288]
+#define CN3D_BACKBONE_STYLE_user_color &at[1290]
+
+#define CN3D_GENERAL_STYLE &at[1299]
+#define CN3D_GENERAL_STYLE_is_on &at[1300]
+#define CN3D_GENERAL_STYLE_style &at[1301]
+#define CN3D_GENERAL_STYLE_color_scheme &at[1302]
+#define CN3D_GENERAL_STYLE_user_color &at[1303]
+
+#define CN3D_BACKBONE_LABEL_STYLE &at[1324]
+#define BACKBONE_LABEL_STYLE_spacing &at[1325]
+#define CN3D_BACKBONE_LABEL_STYLE_type &at[1326]
+#define BACKBONE_LABEL_STYLE_number &at[1327]
+#define BACKBONE_LABEL_STYLE_termini &at[1328]
+#define CN3D_BACKBONE_LABEL_STYLE_white &at[1329]
+
+#define CN3D_STYLE_SETTINGS &at[1280]
+#define CN3D_STYLE_SETTINGS_name &at[1281]
+#define SETTINGS_protein_backbone &at[1282]
+#define SETTINGS_nucleotide_backbone &at[1297]
+#define SETTINGS_protein_sidechains &at[1298]
+#define SETTINGS_nucleotide_sidechains &at[1304]
+#define CN3D_STYLE_SETTINGS_heterogens &at[1305]
+#define CN3D_STYLE_SETTINGS_solvents &at[1306]
+#define CN3D_STYLE_SETTINGS_connections &at[1307]
+#define STYLE_SETTINGS_helix_objects &at[1308]
+#define STYLE_SETTINGS_strand_objects &at[1309]
+#define SETTINGS_virtual_disulfides_on &at[1310]
+#define virtual_disulfide_color &at[1311]
+#define STYLE_SETTINGS_hydrogens_on &at[1312]
+#define SETTINGS_background_color &at[1313]
+#define STYLE_SETTINGS_scale_factor &at[1314]
+#define SETTINGS_space_fill_proportion &at[1315]
+#define CN3D_STYLE_SETTINGS_ball_radius &at[1316]
+#define STYLE_SETTINGS_stick_radius &at[1317]
+#define CN3D_STYLE_SETTINGS_tube_radius &at[1318]
+#define SETTINGS_tube_worm_radius &at[1319]
+#define STYLE_SETTINGS_helix_radius &at[1320]
+#define STYLE_SETTINGS_strand_width &at[1321]
+#define SETTINGS_strand_thickness &at[1322]
+#define STYLE_SETTINGS_protein_labels &at[1323]
+#define SETTINGS_nucleotide_labels &at[1330]
+#define CN3D_STYLE_SETTINGS_ion_labels &at[1331]
+
+#define CN3D_STYLE_SETTINGS_SET &at[1393]
+#define CN3D_STYLE_SETTINGS_SET_E &at[1394]
+
+#define CN3D_STYLE_TABLE_ID &at[1336]
+
+#define CN3D_STYLE_TABLE_ITEM &at[1334]
+#define CN3D_STYLE_TABLE_ITEM_id &at[1335]
+#define CN3D_STYLE_TABLE_ITEM_style &at[1337]
+
+#define CN3D_RESIDUE_RANGE &at[1357]
+#define CN3D_RESIDUE_RANGE_from &at[1358]
+#define CN3D_RESIDUE_RANGE_to &at[1360]
+
+#define CN3D_MOLECULE_LOCATION &at[1352]
+#define MOLECULE_LOCATION_molecule_id &at[1353]
+#define CN3D_MOLECULE_LOCATION_residues &at[1355]
+#define MOLECULE_LOCATION_residues_E &at[1356]
+
+#define CN3D_OBJECT_LOCATION &at[1347]
+#define OBJECT_LOCATION_structure_id &at[1348]
+#define CN3D_OBJECT_LOCATION_residues &at[1350]
+#define CN3D_OBJECT_LOCATION_residues_E &at[1351]
+
+#define CN3D_USER_ANNOTATION &at[1341]
+#define CN3D_USER_ANNOTATION_name &at[1342]
+#define USER_ANNOTATION_description &at[1343]
+#define CN3D_USER_ANNOTATION_style_id &at[1344]
+#define CN3D_USER_ANNOTATION_residues &at[1345]
+#define CN3D_USER_ANNOTATION_residues_E &at[1346]
+#define CN3D_USER_ANNOTATION_is_on &at[1361]
+
+#define CN3D_GL_MATRIX &at[1371]
+#define CN3D_GL_MATRIX_m0 &at[1372]
+#define CN3D_GL_MATRIX_m1 &at[1373]
+#define CN3D_GL_MATRIX_m2 &at[1374]
+#define CN3D_GL_MATRIX_m3 &at[1375]
+#define CN3D_GL_MATRIX_m4 &at[1376]
+#define CN3D_GL_MATRIX_m5 &at[1377]
+#define CN3D_GL_MATRIX_m6 &at[1378]
+#define CN3D_GL_MATRIX_m7 &at[1379]
+#define CN3D_GL_MATRIX_m8 &at[1380]
+#define CN3D_GL_MATRIX_m9 &at[1381]
+#define CN3D_GL_MATRIX_m10 &at[1382]
+#define CN3D_GL_MATRIX_m11 &at[1383]
+#define CN3D_GL_MATRIX_m12 &at[1384]
+#define CN3D_GL_MATRIX_m13 &at[1385]
+#define CN3D_GL_MATRIX_m14 &at[1386]
+#define CN3D_GL_MATRIX_m15 &at[1387]
+
+#define CN3D_VECTOR &at[1389]
+#define CN3D_VECTOR_x &at[1390]
+#define CN3D_VECTOR_y &at[1391]
+#define CN3D_VECTOR_z &at[1392]
+
+#define CN3D_VIEW_SETTINGS &at[1363]
+#define VIEW_SETTINGS_camera_distance &at[1364]
+#define VIEW_SETTINGS_camera_angle_rad &at[1365]
+#define VIEW_SETTINGS_camera_look_at_X &at[1366]
+#define VIEW_SETTINGS_camera_look_at_Y &at[1367]
+#define VIEW_SETTINGS_camera_clip_near &at[1368]
+#define VIEW_SETTINGS_camera_clip_far &at[1369]
+#define CN3D_VIEW_SETTINGS_matrix &at[1370]
+#define VIEW_SETTINGS_rotation_center &at[1388]
/**************************************************
@@ -4051,66 +4952,66 @@ static AsnModulePtr amp = ampx;
*
**************************************************/
-#define PROJECT &at[1332]
-#define PROJECT_descr &at[1333]
-#define PROJECT_data &at[1348]
-
-#define PROJECT_ITEM &at[1349]
-#define PROJECT_ITEM_pmuid &at[1350]
-#define PROJECT_ITEM_pmuid_E &at[1351]
-#define PROJECT_ITEM_protuid &at[1352]
-#define PROJECT_ITEM_protuid_E &at[1353]
-#define PROJECT_ITEM_nucuid &at[1354]
-#define PROJECT_ITEM_nucuid_E &at[1355]
-#define PROJECT_ITEM_sequid &at[1356]
-#define PROJECT_ITEM_sequid_E &at[1357]
-#define PROJECT_ITEM_genomeuid &at[1358]
-#define PROJECT_ITEM_genomeuid_E &at[1359]
-#define PROJECT_ITEM_structuid &at[1360]
-#define PROJECT_ITEM_structuid_E &at[1361]
-#define PROJECT_ITEM_pmid &at[1362]
-#define PROJECT_ITEM_pmid_E &at[1363]
-#define PROJECT_ITEM_protid &at[1365]
-#define PROJECT_ITEM_protid_E &at[1366]
-#define PROJECT_ITEM_nucid &at[1368]
-#define PROJECT_ITEM_nucid_E &at[1369]
-#define PROJECT_ITEM_seqid &at[1370]
-#define PROJECT_ITEM_seqid_E &at[1371]
-#define PROJECT_ITEM_genomeid &at[1372]
-#define PROJECT_ITEM_genomeid_E &at[1373]
-#define PROJECT_ITEM_structid &at[1374]
-#define PROJECT_ITEM_pment &at[1375]
-#define PROJECT_ITEM_pment_E &at[1376]
-#define PROJECT_ITEM_protent &at[1378]
-#define PROJECT_ITEM_protent_E &at[1379]
-#define PROJECT_ITEM_nucent &at[1381]
-#define PROJECT_ITEM_nucent_E &at[1382]
-#define PROJECT_ITEM_seqent &at[1383]
-#define PROJECT_ITEM_seqent_E &at[1384]
-#define PROJECT_ITEM_genomeent &at[1385]
-#define PROJECT_ITEM_genomeent_E &at[1386]
-#define PROJECT_ITEM_structent &at[1387]
-#define PROJECT_ITEM_seqannot &at[1388]
-#define PROJECT_ITEM_seqannot_E &at[1389]
-#define PROJECT_ITEM_loc &at[1391]
-#define PROJECT_ITEM_loc_E &at[1392]
-#define PROJECT_ITEM_proj &at[1394]
-#define PROJECT_ITEM_proj_E &at[1395]
-
-#define PROJECT_DESCR &at[1334]
-#define PROJECT_DESCR_id &at[1335]
-#define PROJECT_DESCR_id_E &at[1336]
-#define PROJECT_DESCR_name &at[1338]
-#define PROJECT_DESCR_descr &at[1339]
-#define PROJECT_DESCR_descr_E &at[1340]
-
-#define PROJECT_ID &at[1337]
-
-#define PROJDESC &at[1341]
-#define PROJDESC_pub &at[1342]
-#define PROJDESC_date &at[1344]
-#define PROJDESC_comment &at[1346]
-#define PROJDESC_title &at[1347]
+#define PROJECT &at[1395]
+#define PROJECT_descr &at[1396]
+#define PROJECT_data &at[1411]
+
+#define PROJECT_ITEM &at[1412]
+#define PROJECT_ITEM_pmuid &at[1413]
+#define PROJECT_ITEM_pmuid_E &at[1414]
+#define PROJECT_ITEM_protuid &at[1415]
+#define PROJECT_ITEM_protuid_E &at[1416]
+#define PROJECT_ITEM_nucuid &at[1417]
+#define PROJECT_ITEM_nucuid_E &at[1418]
+#define PROJECT_ITEM_sequid &at[1419]
+#define PROJECT_ITEM_sequid_E &at[1420]
+#define PROJECT_ITEM_genomeuid &at[1421]
+#define PROJECT_ITEM_genomeuid_E &at[1422]
+#define PROJECT_ITEM_structuid &at[1423]
+#define PROJECT_ITEM_structuid_E &at[1424]
+#define PROJECT_ITEM_pmid &at[1425]
+#define PROJECT_ITEM_pmid_E &at[1426]
+#define PROJECT_ITEM_protid &at[1428]
+#define PROJECT_ITEM_protid_E &at[1429]
+#define PROJECT_ITEM_nucid &at[1431]
+#define PROJECT_ITEM_nucid_E &at[1432]
+#define PROJECT_ITEM_seqid &at[1433]
+#define PROJECT_ITEM_seqid_E &at[1434]
+#define PROJECT_ITEM_genomeid &at[1435]
+#define PROJECT_ITEM_genomeid_E &at[1436]
+#define PROJECT_ITEM_structid &at[1437]
+#define PROJECT_ITEM_pment &at[1438]
+#define PROJECT_ITEM_pment_E &at[1439]
+#define PROJECT_ITEM_protent &at[1441]
+#define PROJECT_ITEM_protent_E &at[1442]
+#define PROJECT_ITEM_nucent &at[1444]
+#define PROJECT_ITEM_nucent_E &at[1445]
+#define PROJECT_ITEM_seqent &at[1446]
+#define PROJECT_ITEM_seqent_E &at[1447]
+#define PROJECT_ITEM_genomeent &at[1448]
+#define PROJECT_ITEM_genomeent_E &at[1449]
+#define PROJECT_ITEM_structent &at[1450]
+#define PROJECT_ITEM_seqannot &at[1451]
+#define PROJECT_ITEM_seqannot_E &at[1452]
+#define PROJECT_ITEM_loc &at[1454]
+#define PROJECT_ITEM_loc_E &at[1455]
+#define PROJECT_ITEM_proj &at[1457]
+#define PROJECT_ITEM_proj_E &at[1458]
+
+#define PROJECT_DESCR &at[1397]
+#define PROJECT_DESCR_id &at[1398]
+#define PROJECT_DESCR_id_E &at[1399]
+#define PROJECT_DESCR_name &at[1401]
+#define PROJECT_DESCR_descr &at[1402]
+#define PROJECT_DESCR_descr_E &at[1403]
+
+#define PROJECT_ID &at[1400]
+
+#define PROJDESC &at[1404]
+#define PROJDESC_pub &at[1405]
+#define PROJDESC_date &at[1407]
+#define PROJDESC_comment &at[1409]
+#define PROJDESC_title &at[1410]
/**************************************************
@@ -4119,12 +5020,12 @@ static AsnModulePtr amp = ampx;
*
**************************************************/
-#define LINK_SET &at[1396]
-#define LINK_SET_num &at[1397]
-#define LINK_SET_uids &at[1398]
-#define LINK_SET_uids_E &at[1399]
-#define LINK_SET_weights &at[1400]
-#define LINK_SET_weights_E &at[1401]
+#define LINK_SET &at[1459]
+#define LINK_SET_num &at[1460]
+#define LINK_SET_uids &at[1461]
+#define LINK_SET_uids_E &at[1462]
+#define LINK_SET_weights &at[1463]
+#define LINK_SET_weights_E &at[1464]
/**************************************************
@@ -4133,30 +5034,30 @@ static AsnModulePtr amp = ampx;
*
**************************************************/
-#define FEATDEF &at[1402]
-#define FEATDEF_typelabel &at[1403]
-#define FEATDEF_menulabel &at[1404]
-#define FEATDEF_featdef_key &at[1405]
-#define FEATDEF_seqfeat_key &at[1406]
-#define FEATDEF_entrygroup &at[1407]
-#define FEATDEF_displaygroup &at[1408]
-#define FEATDEF_molgroup &at[1409]
+#define FEATDEF &at[1465]
+#define FEATDEF_typelabel &at[1466]
+#define FEATDEF_menulabel &at[1467]
+#define FEATDEF_featdef_key &at[1468]
+#define FEATDEF_seqfeat_key &at[1469]
+#define FEATDEF_entrygroup &at[1470]
+#define FEATDEF_displaygroup &at[1471]
+#define FEATDEF_molgroup &at[1472]
-#define FEATDEFSET &at[1411]
-#define FEATDEFSET_E &at[1412]
+#define FEATDEFSET &at[1474]
+#define FEATDEFSET_E &at[1475]
-#define FEATDISPGROUP &at[1413]
-#define FEATDISPGROUP_groupkey &at[1414]
-#define FEATDISPGROUP_groupname &at[1415]
+#define FEATDISPGROUP &at[1476]
+#define FEATDISPGROUP_groupkey &at[1477]
+#define FEATDISPGROUP_groupname &at[1478]
-#define FEATDISPGROUPSET &at[1416]
-#define FEATDISPGROUPSET_E &at[1417]
+#define FEATDISPGROUPSET &at[1479]
+#define FEATDISPGROUPSET_E &at[1480]
-#define FEATMOLTYPE &at[1410]
+#define FEATMOLTYPE &at[1473]
-#define FEATDEFGROUPSET &at[1418]
-#define FEATDEFGROUPSET_groups &at[1419]
-#define FEATDEFGROUPSET_defs &at[1420]
+#define FEATDEFGROUPSET &at[1481]
+#define FEATDEFGROUPSET_groups &at[1482]
+#define FEATDEFGROUPSET_defs &at[1483]
/**************************************************
@@ -4165,82 +5066,82 @@ static AsnModulePtr amp = ampx;
*
**************************************************/
-#define NCBI_MIME_ASN1 &at[1421]
-#define NCBI_MIME_ASN1_entrez &at[1422]
-#define NCBI_MIME_ASN1_alignstruc &at[1439]
-#define NCBI_MIME_ASN1_alignseq &at[1454]
-#define NCBI_MIME_ASN1_strucseq &at[1462]
-#define NCBI_MIME_ASN1_strucseqs &at[1469]
-#define NCBI_MIME_ASN1_general &at[1478]
-
-#define ENTREZ_GENERAL &at[1423]
-#define ENTREZ_GENERAL_title &at[1424]
-#define ENTREZ_GENERAL_data &at[1425]
-#define ENTREZ_GENERAL_data_ml &at[1426]
-#define ENTREZ_GENERAL_data_prot &at[1428]
-#define ENTREZ_GENERAL_data_nuc &at[1430]
-#define ENTREZ_GENERAL_data_genome &at[1431]
-#define ENTREZ_GENERAL_data_structure &at[1432]
-#define ENTREZ_GENERAL_data_strucAnnot &at[1434]
-#define ENTREZ_GENERAL_style &at[1436]
-#define ENTREZ_GENERAL_location &at[1438]
-
-#define BIOSTRUC_ALIGN &at[1440]
-#define BIOSTRUC_ALIGN_master &at[1441]
-#define BIOSTRUC_ALIGN_slaves &at[1442]
-#define BIOSTRUC_ALIGN_slaves_E &at[1443]
-#define BIOSTRUC_ALIGN_alignments &at[1444]
-#define BIOSTRUC_ALIGN_sequences &at[1445]
-#define BIOSTRUC_ALIGN_sequences_E &at[1446]
-#define BIOSTRUC_ALIGN_seqalign &at[1447]
-#define BIOSTRUC_ALIGN_seqalign_E &at[1448]
-#define BIOSTRUC_ALIGN_style_dictionary &at[1450]
-#define BIOSTRUC_ALIGN_user_annotations &at[1452]
-
-#define BIOSTRUC_ALIGN_SEQ &at[1455]
-#define BIOSTRUC_ALIGN_SEQ_sequences &at[1456]
-#define BIOSTRUC_ALIGN_SEQ_sequences_E &at[1457]
-#define BIOSTRUC_ALIGN_SEQ_seqalign &at[1458]
-#define BIOSTRUC_ALIGN_SEQ_seqalign_E &at[1459]
-#define ALIGN_SEQ_style_dictionary &at[1460]
-#define ALIGN_SEQ_user_annotations &at[1461]
-
-#define BIOSTRUC_SEQ &at[1463]
-#define BIOSTRUC_SEQ_structure &at[1464]
-#define BIOSTRUC_SEQ_sequences &at[1465]
-#define BIOSTRUC_SEQ_sequences_E &at[1466]
-#define BIOSTRUC_SEQ_style_dictionary &at[1467]
-#define BIOSTRUC_SEQ_user_annotations &at[1468]
-
-#define BIOSTRUC_SEQS &at[1470]
-#define BIOSTRUC_SEQS_structure &at[1471]
-#define BIOSTRUC_SEQS_sequences &at[1472]
-#define BIOSTRUC_SEQS_sequences_E &at[1473]
-#define BIOSTRUC_SEQS_seqalign &at[1474]
-#define BIOSTRUC_SEQS_seqalign_E &at[1475]
-#define BIOSTRUC_SEQS_style_dictionary &at[1476]
-#define BIOSTRUC_SEQS_user_annotations &at[1477]
-
-#define BIOSTRUC_SEQS_ALIGNS_CDD &at[1479]
-#define SEQS_ALIGNS_CDD_seq_align_data &at[1480]
-#define CDD_seq_align_data_bundle &at[1481]
-#define ALIGNS_CDD_seq_align_data_cdd &at[1492]
-#define SEQS_ALIGNS_CDD_structures &at[1494]
-#define SEQS_ALIGNS_CDD_structures_E &at[1495]
-#define SEQS_ALIGNS_CDD_structure_type &at[1496]
-
-#define BUNDLE_SEQS_ALIGNS &at[1482]
-#define BUNDLE_SEQS_ALIGNS_sequences &at[1483]
-#define BUNDLE_SEQS_ALIGNS_sequences_E &at[1484]
-#define BUNDLE_SEQS_ALIGNS_seqaligns &at[1485]
-#define BUNDLE_SEQS_ALIGNS_seqaligns_E &at[1486]
-#define BUNDLE_SEQS_ALIGNS_strucaligns &at[1487]
-#define BUNDLE_SEQS_ALIGNS_imports &at[1488]
-#define BUNDLE_SEQS_ALIGNS_imports_E &at[1489]
-#define SEQS_ALIGNS_style_dictionary &at[1490]
-#define SEQS_ALIGNS_user_annotations &at[1491]
-
-#define ENTREZ_STYLE &at[1437]
+#define NCBI_MIME_ASN1 &at[1484]
+#define NCBI_MIME_ASN1_entrez &at[1485]
+#define NCBI_MIME_ASN1_alignstruc &at[1502]
+#define NCBI_MIME_ASN1_alignseq &at[1517]
+#define NCBI_MIME_ASN1_strucseq &at[1525]
+#define NCBI_MIME_ASN1_strucseqs &at[1532]
+#define NCBI_MIME_ASN1_general &at[1541]
+
+#define ENTREZ_GENERAL &at[1486]
+#define ENTREZ_GENERAL_title &at[1487]
+#define ENTREZ_GENERAL_data &at[1488]
+#define ENTREZ_GENERAL_data_ml &at[1489]
+#define ENTREZ_GENERAL_data_prot &at[1491]
+#define ENTREZ_GENERAL_data_nuc &at[1493]
+#define ENTREZ_GENERAL_data_genome &at[1494]
+#define ENTREZ_GENERAL_data_structure &at[1495]
+#define ENTREZ_GENERAL_data_strucAnnot &at[1497]
+#define ENTREZ_GENERAL_style &at[1499]
+#define ENTREZ_GENERAL_location &at[1501]
+
+#define BIOSTRUC_ALIGN &at[1503]
+#define BIOSTRUC_ALIGN_master &at[1504]
+#define BIOSTRUC_ALIGN_slaves &at[1505]
+#define BIOSTRUC_ALIGN_slaves_E &at[1506]
+#define BIOSTRUC_ALIGN_alignments &at[1507]
+#define BIOSTRUC_ALIGN_sequences &at[1508]
+#define BIOSTRUC_ALIGN_sequences_E &at[1509]
+#define BIOSTRUC_ALIGN_seqalign &at[1510]
+#define BIOSTRUC_ALIGN_seqalign_E &at[1511]
+#define BIOSTRUC_ALIGN_style_dictionary &at[1513]
+#define BIOSTRUC_ALIGN_user_annotations &at[1515]
+
+#define BIOSTRUC_ALIGN_SEQ &at[1518]
+#define BIOSTRUC_ALIGN_SEQ_sequences &at[1519]
+#define BIOSTRUC_ALIGN_SEQ_sequences_E &at[1520]
+#define BIOSTRUC_ALIGN_SEQ_seqalign &at[1521]
+#define BIOSTRUC_ALIGN_SEQ_seqalign_E &at[1522]
+#define ALIGN_SEQ_style_dictionary &at[1523]
+#define ALIGN_SEQ_user_annotations &at[1524]
+
+#define BIOSTRUC_SEQ &at[1526]
+#define BIOSTRUC_SEQ_structure &at[1527]
+#define BIOSTRUC_SEQ_sequences &at[1528]
+#define BIOSTRUC_SEQ_sequences_E &at[1529]
+#define BIOSTRUC_SEQ_style_dictionary &at[1530]
+#define BIOSTRUC_SEQ_user_annotations &at[1531]
+
+#define BIOSTRUC_SEQS &at[1533]
+#define BIOSTRUC_SEQS_structure &at[1534]
+#define BIOSTRUC_SEQS_sequences &at[1535]
+#define BIOSTRUC_SEQS_sequences_E &at[1536]
+#define BIOSTRUC_SEQS_seqalign &at[1537]
+#define BIOSTRUC_SEQS_seqalign_E &at[1538]
+#define BIOSTRUC_SEQS_style_dictionary &at[1539]
+#define BIOSTRUC_SEQS_user_annotations &at[1540]
+
+#define BIOSTRUC_SEQS_ALIGNS_CDD &at[1542]
+#define SEQS_ALIGNS_CDD_seq_align_data &at[1543]
+#define CDD_seq_align_data_bundle &at[1544]
+#define ALIGNS_CDD_seq_align_data_cdd &at[1555]
+#define SEQS_ALIGNS_CDD_structures &at[1557]
+#define SEQS_ALIGNS_CDD_structures_E &at[1558]
+#define SEQS_ALIGNS_CDD_structure_type &at[1559]
+
+#define BUNDLE_SEQS_ALIGNS &at[1545]
+#define BUNDLE_SEQS_ALIGNS_sequences &at[1546]
+#define BUNDLE_SEQS_ALIGNS_sequences_E &at[1547]
+#define BUNDLE_SEQS_ALIGNS_seqaligns &at[1548]
+#define BUNDLE_SEQS_ALIGNS_seqaligns_E &at[1549]
+#define BUNDLE_SEQS_ALIGNS_strucaligns &at[1550]
+#define BUNDLE_SEQS_ALIGNS_imports &at[1551]
+#define BUNDLE_SEQS_ALIGNS_imports_E &at[1552]
+#define SEQS_ALIGNS_style_dictionary &at[1553]
+#define SEQS_ALIGNS_user_annotations &at[1554]
+
+#define ENTREZ_STYLE &at[1500]
/**************************************************
@@ -4249,51 +5150,51 @@ static AsnModulePtr amp = ampx;
*
**************************************************/
-#define PRINTTEMPLATE &at[1497]
-#define PRINTTEMPLATE_name &at[1498]
-#define PRINTTEMPLATE_labelfrom &at[1500]
-#define PRINTTEMPLATE_format &at[1501]
+#define PRINTTEMPLATE &at[1560]
+#define PRINTTEMPLATE_name &at[1561]
+#define PRINTTEMPLATE_labelfrom &at[1563]
+#define PRINTTEMPLATE_format &at[1564]
-#define PRINTTEMPLATESET &at[1531]
-#define PRINTTEMPLATESET_E &at[1532]
+#define PRINTTEMPLATESET &at[1594]
+#define PRINTTEMPLATESET_E &at[1595]
-#define TEMPLATENAME &at[1499]
+#define TEMPLATENAME &at[1562]
-#define PRINTFORMAT &at[1502]
-#define PRINTFORMAT_asn1 &at[1503]
-#define PRINTFORMAT_label &at[1504]
-#define PRINTFORMAT_prefix &at[1505]
-#define PRINTFORMAT_suffix &at[1506]
-#define PRINTFORMAT_form &at[1507]
+#define PRINTFORMAT &at[1565]
+#define PRINTFORMAT_asn1 &at[1566]
+#define PRINTFORMAT_label &at[1567]
+#define PRINTFORMAT_prefix &at[1568]
+#define PRINTFORMAT_suffix &at[1569]
+#define PRINTFORMAT_form &at[1570]
-#define PRINTFORM &at[1508]
-#define PRINTFORM_block &at[1509]
-#define PRINTFORM_boolean &at[1514]
-#define PRINTFORM_enum &at[1518]
-#define PRINTFORM_text &at[1522]
-#define PRINTFORM_use_template &at[1525]
-#define PRINTFORM_user &at[1526]
-#define PRINTFORM_null &at[1530]
+#define PRINTFORM &at[1571]
+#define PRINTFORM_block &at[1572]
+#define PRINTFORM_boolean &at[1577]
+#define PRINTFORM_enum &at[1581]
+#define PRINTFORM_text &at[1585]
+#define PRINTFORM_use_template &at[1588]
+#define PRINTFORM_user &at[1589]
+#define PRINTFORM_null &at[1593]
-#define PRINTFORMBLOCK &at[1510]
-#define PRINTFORMBLOCK_separator &at[1511]
-#define PRINTFORMBLOCK_components &at[1512]
-#define PRINTFORMBLOCK_components_E &at[1513]
+#define PRINTFORMBLOCK &at[1573]
+#define PRINTFORMBLOCK_separator &at[1574]
+#define PRINTFORMBLOCK_components &at[1575]
+#define PRINTFORMBLOCK_components_E &at[1576]
-#define PRINTFORMBOOLEAN &at[1515]
-#define PRINTFORMBOOLEAN_true &at[1516]
-#define PRINTFORMBOOLEAN_false &at[1517]
+#define PRINTFORMBOOLEAN &at[1578]
+#define PRINTFORMBOOLEAN_true &at[1579]
+#define PRINTFORMBOOLEAN_false &at[1580]
-#define PRINTFORMENUM &at[1519]
-#define PRINTFORMENUM_values &at[1520]
-#define PRINTFORMENUM_values_E &at[1521]
+#define PRINTFORMENUM &at[1582]
+#define PRINTFORMENUM_values &at[1583]
+#define PRINTFORMENUM_values_E &at[1584]
-#define PRINTFORMTEXT &at[1523]
-#define PRINTFORMTEXT_textfunc &at[1524]
+#define PRINTFORMTEXT &at[1586]
+#define PRINTFORMTEXT_textfunc &at[1587]
-#define USERFORMAT &at[1527]
-#define USERFORMAT_printfunc &at[1528]
-#define USERFORMAT_defaultfunc &at[1529]
+#define USERFORMAT &at[1590]
+#define USERFORMAT_printfunc &at[1591]
+#define USERFORMAT_defaultfunc &at[1592]
/**************************************************
@@ -4302,93 +5203,93 @@ static AsnModulePtr amp = ampx;
*
**************************************************/
-#define GBSEQ &at[1533]
-#define GBSEQ_locus &at[1534]
-#define GBSEQ_length &at[1535]
-#define GBSEQ_strandedness &at[1536]
-#define GBSEQ_moltype &at[1537]
-#define GBSEQ_topology &at[1538]
-#define GBSEQ_division &at[1539]
-#define GBSEQ_update_date &at[1540]
-#define GBSEQ_create_date &at[1541]
-#define GBSEQ_update_release &at[1542]
-#define GBSEQ_create_release &at[1543]
-#define GBSEQ_definition &at[1544]
-#define GBSEQ_primary_accession &at[1545]
-#define GBSEQ_entry_version &at[1546]
-#define GBSEQ_accession_version &at[1547]
-#define GBSEQ_other_seqids &at[1548]
-#define GBSEQ_other_seqids_E &at[1549]
-#define GBSEQ_secondary_accessions &at[1551]
-#define GBSEQ_secondary_accessions_E &at[1552]
-#define GBSEQ_project &at[1554]
-#define GBSEQ_keywords &at[1555]
-#define GBSEQ_keywords_E &at[1556]
-#define GBSEQ_segment &at[1558]
-#define GBSEQ_source &at[1559]
-#define GBSEQ_organism &at[1560]
-#define GBSEQ_taxonomy &at[1561]
-#define GBSEQ_references &at[1562]
-#define GBSEQ_references_E &at[1563]
-#define GBSEQ_comment &at[1580]
-#define GBSEQ_primary &at[1581]
-#define GBSEQ_source_db &at[1582]
-#define GBSEQ_database_reference &at[1583]
-#define GBSEQ_feature_table &at[1584]
-#define GBSEQ_feature_table_E &at[1585]
-#define GBSEQ_sequence &at[1606]
-#define GBSEQ_contig &at[1607]
-
-#define GBSEQID &at[1550]
-
-#define GBSECONDARY_ACCN &at[1553]
-
-#define GBKEYWORD &at[1557]
-
-#define GBREFERENCE &at[1564]
-#define GBREFERENCE_reference &at[1565]
-#define GBREFERENCE_position &at[1566]
-#define GBREFERENCE_authors &at[1567]
-#define GBREFERENCE_authors_E &at[1568]
-#define GBREFERENCE_consortium &at[1570]
-#define GBREFERENCE_title &at[1571]
-#define GBREFERENCE_journal &at[1572]
-#define GBREFERENCE_xref &at[1573]
-#define GBREFERENCE_xref_E &at[1574]
-#define GBREFERENCE_pubmed &at[1578]
-#define GBREFERENCE_remark &at[1579]
-
-#define GBFEATURE &at[1586]
-#define GBFEATURE_key &at[1587]
-#define GBFEATURE_location &at[1588]
-#define GBFEATURE_intervals &at[1589]
-#define GBFEATURE_intervals_E &at[1590]
-#define GBFEATURE_operator &at[1598]
-#define GBFEATURE_partial5 &at[1599]
-#define GBFEATURE_partial3 &at[1600]
-#define GBFEATURE_quals &at[1601]
-#define GBFEATURE_quals_E &at[1602]
-
-#define GBAUTHOR &at[1569]
-
-#define GBXREF &at[1575]
-#define GBXREF_dbname &at[1576]
-#define GBXREF_id &at[1577]
-
-#define GBINTERVAL &at[1591]
-#define GBINTERVAL_from &at[1592]
-#define GBINTERVAL_to &at[1593]
-#define GBINTERVAL_point &at[1594]
-#define GBINTERVAL_iscomp &at[1595]
-#define GBINTERVAL_interbp &at[1596]
-#define GBINTERVAL_accession &at[1597]
-
-#define GBQUALIFIER &at[1603]
-#define GBQUALIFIER_name &at[1604]
-#define GBQUALIFIER_value &at[1605]
-
-#define GBSET &at[1608]
-#define GBSET_E &at[1609]
+#define GBSEQ &at[1596]
+#define GBSEQ_locus &at[1597]
+#define GBSEQ_length &at[1598]
+#define GBSEQ_strandedness &at[1599]
+#define GBSEQ_moltype &at[1600]
+#define GBSEQ_topology &at[1601]
+#define GBSEQ_division &at[1602]
+#define GBSEQ_update_date &at[1603]
+#define GBSEQ_create_date &at[1604]
+#define GBSEQ_update_release &at[1605]
+#define GBSEQ_create_release &at[1606]
+#define GBSEQ_definition &at[1607]
+#define GBSEQ_primary_accession &at[1608]
+#define GBSEQ_entry_version &at[1609]
+#define GBSEQ_accession_version &at[1610]
+#define GBSEQ_other_seqids &at[1611]
+#define GBSEQ_other_seqids_E &at[1612]
+#define GBSEQ_secondary_accessions &at[1614]
+#define GBSEQ_secondary_accessions_E &at[1615]
+#define GBSEQ_project &at[1617]
+#define GBSEQ_keywords &at[1618]
+#define GBSEQ_keywords_E &at[1619]
+#define GBSEQ_segment &at[1621]
+#define GBSEQ_source &at[1622]
+#define GBSEQ_organism &at[1623]
+#define GBSEQ_taxonomy &at[1624]
+#define GBSEQ_references &at[1625]
+#define GBSEQ_references_E &at[1626]
+#define GBSEQ_comment &at[1643]
+#define GBSEQ_primary &at[1644]
+#define GBSEQ_source_db &at[1645]
+#define GBSEQ_database_reference &at[1646]
+#define GBSEQ_feature_table &at[1647]
+#define GBSEQ_feature_table_E &at[1648]
+#define GBSEQ_sequence &at[1669]
+#define GBSEQ_contig &at[1670]
+
+#define GBSEQID &at[1613]
+
+#define GBSECONDARY_ACCN &at[1616]
+
+#define GBKEYWORD &at[1620]
+
+#define GBREFERENCE &at[1627]
+#define GBREFERENCE_reference &at[1628]
+#define GBREFERENCE_position &at[1629]
+#define GBREFERENCE_authors &at[1630]
+#define GBREFERENCE_authors_E &at[1631]
+#define GBREFERENCE_consortium &at[1633]
+#define GBREFERENCE_title &at[1634]
+#define GBREFERENCE_journal &at[1635]
+#define GBREFERENCE_xref &at[1636]
+#define GBREFERENCE_xref_E &at[1637]
+#define GBREFERENCE_pubmed &at[1641]
+#define GBREFERENCE_remark &at[1642]
+
+#define GBFEATURE &at[1649]
+#define GBFEATURE_key &at[1650]
+#define GBFEATURE_location &at[1651]
+#define GBFEATURE_intervals &at[1652]
+#define GBFEATURE_intervals_E &at[1653]
+#define GBFEATURE_operator &at[1661]
+#define GBFEATURE_partial5 &at[1662]
+#define GBFEATURE_partial3 &at[1663]
+#define GBFEATURE_quals &at[1664]
+#define GBFEATURE_quals_E &at[1665]
+
+#define GBAUTHOR &at[1632]
+
+#define GBXREF &at[1638]
+#define GBXREF_dbname &at[1639]
+#define GBXREF_id &at[1640]
+
+#define GBINTERVAL &at[1654]
+#define GBINTERVAL_from &at[1655]
+#define GBINTERVAL_to &at[1656]
+#define GBINTERVAL_point &at[1657]
+#define GBINTERVAL_iscomp &at[1658]
+#define GBINTERVAL_interbp &at[1659]
+#define GBINTERVAL_accession &at[1660]
+
+#define GBQUALIFIER &at[1666]
+#define GBQUALIFIER_name &at[1667]
+#define GBQUALIFIER_value &at[1668]
+
+#define GBSET &at[1671]
+#define GBSET_E &at[1672]
/**************************************************
@@ -4397,93 +5298,93 @@ static AsnModulePtr amp = ampx;
*
**************************************************/
-#define INSDSEQ &at[1610]
-#define INSDSEQ_locus &at[1611]
-#define INSDSEQ_length &at[1612]
-#define INSDSEQ_strandedness &at[1613]
-#define INSDSEQ_moltype &at[1614]
-#define INSDSEQ_topology &at[1615]
-#define INSDSEQ_division &at[1616]
-#define INSDSEQ_update_date &at[1617]
-#define INSDSEQ_create_date &at[1618]
-#define INSDSEQ_update_release &at[1619]
-#define INSDSEQ_create_release &at[1620]
-#define INSDSEQ_definition &at[1621]
-#define INSDSEQ_primary_accession &at[1622]
-#define INSDSEQ_entry_version &at[1623]
-#define INSDSEQ_accession_version &at[1624]
-#define INSDSEQ_other_seqids &at[1625]
-#define INSDSEQ_other_seqids_E &at[1626]
-#define INSDSEQ_secondary_accessions &at[1628]
-#define INSDSEQ_secondary_accessions_E &at[1629]
-#define INSDSEQ_project &at[1631]
-#define INSDSEQ_keywords &at[1632]
-#define INSDSEQ_keywords_E &at[1633]
-#define INSDSEQ_segment &at[1635]
-#define INSDSEQ_source &at[1636]
-#define INSDSEQ_organism &at[1637]
-#define INSDSEQ_taxonomy &at[1638]
-#define INSDSEQ_references &at[1639]
-#define INSDSEQ_references_E &at[1640]
-#define INSDSEQ_comment &at[1657]
-#define INSDSEQ_primary &at[1658]
-#define INSDSEQ_source_db &at[1659]
-#define INSDSEQ_database_reference &at[1660]
-#define INSDSEQ_feature_table &at[1661]
-#define INSDSEQ_feature_table_E &at[1662]
-#define INSDSEQ_sequence &at[1683]
-#define INSDSEQ_contig &at[1684]
-
-#define INSDSEQID &at[1627]
-
-#define INSDSECONDARY_ACCN &at[1630]
-
-#define INSDKEYWORD &at[1634]
-
-#define INSDREFERENCE &at[1641]
-#define INSDREFERENCE_reference &at[1642]
-#define INSDREFERENCE_position &at[1643]
-#define INSDREFERENCE_authors &at[1644]
-#define INSDREFERENCE_authors_E &at[1645]
-#define INSDREFERENCE_consortium &at[1647]
-#define INSDREFERENCE_title &at[1648]
-#define INSDREFERENCE_journal &at[1649]
-#define INSDREFERENCE_xref &at[1650]
-#define INSDREFERENCE_xref_E &at[1651]
-#define INSDREFERENCE_pubmed &at[1655]
-#define INSDREFERENCE_remark &at[1656]
-
-#define INSDFEATURE &at[1663]
-#define INSDFEATURE_key &at[1664]
-#define INSDFEATURE_location &at[1665]
-#define INSDFEATURE_intervals &at[1666]
-#define INSDFEATURE_intervals_E &at[1667]
-#define INSDFEATURE_operator &at[1675]
-#define INSDFEATURE_partial5 &at[1676]
-#define INSDFEATURE_partial3 &at[1677]
-#define INSDFEATURE_quals &at[1678]
-#define INSDFEATURE_quals_E &at[1679]
-
-#define INSDAUTHOR &at[1646]
-
-#define INSDXREF &at[1652]
-#define INSDXREF_dbname &at[1653]
-#define INSDXREF_id &at[1654]
-
-#define INSDINTERVAL &at[1668]
-#define INSDINTERVAL_from &at[1669]
-#define INSDINTERVAL_to &at[1670]
-#define INSDINTERVAL_point &at[1671]
-#define INSDINTERVAL_iscomp &at[1672]
-#define INSDINTERVAL_interbp &at[1673]
-#define INSDINTERVAL_accession &at[1674]
-
-#define INSDQUALIFIER &at[1680]
-#define INSDQUALIFIER_name &at[1681]
-#define INSDQUALIFIER_value &at[1682]
-
-#define INSDSET &at[1685]
-#define INSDSET_E &at[1686]
+#define INSDSEQ &at[1673]
+#define INSDSEQ_locus &at[1674]
+#define INSDSEQ_length &at[1675]
+#define INSDSEQ_strandedness &at[1676]
+#define INSDSEQ_moltype &at[1677]
+#define INSDSEQ_topology &at[1678]
+#define INSDSEQ_division &at[1679]
+#define INSDSEQ_update_date &at[1680]
+#define INSDSEQ_create_date &at[1681]
+#define INSDSEQ_update_release &at[1682]
+#define INSDSEQ_create_release &at[1683]
+#define INSDSEQ_definition &at[1684]
+#define INSDSEQ_primary_accession &at[1685]
+#define INSDSEQ_entry_version &at[1686]
+#define INSDSEQ_accession_version &at[1687]
+#define INSDSEQ_other_seqids &at[1688]
+#define INSDSEQ_other_seqids_E &at[1689]
+#define INSDSEQ_secondary_accessions &at[1691]
+#define INSDSEQ_secondary_accessions_E &at[1692]
+#define INSDSEQ_project &at[1694]
+#define INSDSEQ_keywords &at[1695]
+#define INSDSEQ_keywords_E &at[1696]
+#define INSDSEQ_segment &at[1698]
+#define INSDSEQ_source &at[1699]
+#define INSDSEQ_organism &at[1700]
+#define INSDSEQ_taxonomy &at[1701]
+#define INSDSEQ_references &at[1702]
+#define INSDSEQ_references_E &at[1703]
+#define INSDSEQ_comment &at[1720]
+#define INSDSEQ_primary &at[1721]
+#define INSDSEQ_source_db &at[1722]
+#define INSDSEQ_database_reference &at[1723]
+#define INSDSEQ_feature_table &at[1724]
+#define INSDSEQ_feature_table_E &at[1725]
+#define INSDSEQ_sequence &at[1746]
+#define INSDSEQ_contig &at[1747]
+
+#define INSDSEQID &at[1690]
+
+#define INSDSECONDARY_ACCN &at[1693]
+
+#define INSDKEYWORD &at[1697]
+
+#define INSDREFERENCE &at[1704]
+#define INSDREFERENCE_reference &at[1705]
+#define INSDREFERENCE_position &at[1706]
+#define INSDREFERENCE_authors &at[1707]
+#define INSDREFERENCE_authors_E &at[1708]
+#define INSDREFERENCE_consortium &at[1710]
+#define INSDREFERENCE_title &at[1711]
+#define INSDREFERENCE_journal &at[1712]
+#define INSDREFERENCE_xref &at[1713]
+#define INSDREFERENCE_xref_E &at[1714]
+#define INSDREFERENCE_pubmed &at[1718]
+#define INSDREFERENCE_remark &at[1719]
+
+#define INSDFEATURE &at[1726]
+#define INSDFEATURE_key &at[1727]
+#define INSDFEATURE_location &at[1728]
+#define INSDFEATURE_intervals &at[1729]
+#define INSDFEATURE_intervals_E &at[1730]
+#define INSDFEATURE_operator &at[1738]
+#define INSDFEATURE_partial5 &at[1739]
+#define INSDFEATURE_partial3 &at[1740]
+#define INSDFEATURE_quals &at[1741]
+#define INSDFEATURE_quals_E &at[1742]
+
+#define INSDAUTHOR &at[1709]
+
+#define INSDXREF &at[1715]
+#define INSDXREF_dbname &at[1716]
+#define INSDXREF_id &at[1717]
+
+#define INSDINTERVAL &at[1731]
+#define INSDINTERVAL_from &at[1732]
+#define INSDINTERVAL_to &at[1733]
+#define INSDINTERVAL_point &at[1734]
+#define INSDINTERVAL_iscomp &at[1735]
+#define INSDINTERVAL_interbp &at[1736]
+#define INSDINTERVAL_accession &at[1737]
+
+#define INSDQUALIFIER &at[1743]
+#define INSDQUALIFIER_name &at[1744]
+#define INSDQUALIFIER_value &at[1745]
+
+#define INSDSET &at[1748]
+#define INSDSET_E &at[1749]
/**************************************************
@@ -4492,20 +5393,20 @@ static AsnModulePtr amp = ampx;
*
**************************************************/
-#define TSEQ &at[1687]
-#define TSEQ_seqtype &at[1688]
-#define TSEQ_gi &at[1689]
-#define TSEQ_accver &at[1690]
-#define TSEQ_sid &at[1691]
-#define TSEQ_local &at[1692]
-#define TSEQ_taxid &at[1693]
-#define TSEQ_orgname &at[1694]
-#define TSEQ_defline &at[1695]
-#define TSEQ_length &at[1696]
-#define TSEQ_sequence &at[1697]
+#define TSEQ &at[1750]
+#define TSEQ_seqtype &at[1751]
+#define TSEQ_gi &at[1752]
+#define TSEQ_accver &at[1753]
+#define TSEQ_sid &at[1754]
+#define TSEQ_local &at[1755]
+#define TSEQ_taxid &at[1756]
+#define TSEQ_orgname &at[1757]
+#define TSEQ_defline &at[1758]
+#define TSEQ_length &at[1759]
+#define TSEQ_sequence &at[1760]
-#define TSEQSET &at[1698]
-#define TSEQSET_E &at[1699]
+#define TSEQSET &at[1761]
+#define TSEQSET_E &at[1762]
/**************************************************
@@ -4514,68 +5415,435 @@ static AsnModulePtr amp = ampx;
*
**************************************************/
-#define PSSM &at[1700]
-#define PSSM_isProtein &at[1701]
-#define PSSM_identifier &at[1702]
-#define PSSM_numRows &at[1704]
-#define PSSM_numColumns &at[1705]
-#define PSSM_rowLabels &at[1706]
-#define PSSM_rowLabels_E &at[1707]
-#define PSSM_byRow &at[1708]
-#define PSSM_query &at[1709]
-#define PSSM_intermediateData &at[1711]
-#define PSSM_finalData &at[1719]
-
-#define PSSMINTERMEDIATEDATA &at[1712]
-#define resFreqsPerPos &at[1713]
-#define resFreqsPerPos_E &at[1714]
-#define weightedResFreqsPerPos &at[1715]
-#define weightedResFreqsPerPos_E &at[1716]
-#define PSSMINTERMEDIATEDATA_freqRatios &at[1717]
-#define freqRatios_E &at[1718]
-
-#define PSSMFINALDATA &at[1720]
-#define PSSMFINALDATA_scores &at[1721]
-#define PSSMFINALDATA_scores_E &at[1722]
-#define PSSMFINALDATA_lambda &at[1723]
-#define PSSMFINALDATA_kappa &at[1724]
-#define PSSMFINALDATA_h &at[1725]
-#define PSSMFINALDATA_scalingFactor &at[1726]
-
-#define PSSMPARAMETERS &at[1727]
-#define PSSMPARAMETERS_pseudocount &at[1728]
-#define PSSMPARAMETERS_rpsdbparams &at[1729]
-#define PSSMPARAMETERS_constraints &at[1734]
-
-#define PSSMWITHPARAMETERS &at[1755]
-#define PSSMWITHPARAMETERS_pssm &at[1756]
-#define PSSMWITHPARAMETERS_params &at[1757]
-
-#define BLOCKPROPERTY &at[1746]
-#define BLOCKPROPERTY_type &at[1747]
-#define BLOCKPROPERTY_intvalue &at[1748]
-#define BLOCKPROPERTY_textvalue &at[1749]
-
-#define COREBLOCK &at[1739]
-#define COREBLOCK_start &at[1740]
-#define COREBLOCK_stop &at[1741]
-#define COREBLOCK_minstart &at[1742]
-#define COREBLOCK_maxstop &at[1743]
-#define COREBLOCK_property &at[1744]
-#define COREBLOCK_property_E &at[1745]
-
-#define LOOPCONSTRAINT &at[1752]
-#define LOOPCONSTRAINT_minlength &at[1753]
-#define LOOPCONSTRAINT_maxlength &at[1754]
-
-#define COREDEF &at[1735]
-#define COREDEF_nblocks &at[1736]
-#define COREDEF_blocks &at[1737]
-#define COREDEF_blocks_E &at[1738]
-#define COREDEF_loops &at[1750]
-#define COREDEF_loops_E &at[1751]
-
-#define FORMATRPSDBPARAMETERS &at[1730]
-#define matrixName &at[1731]
-#define FORMATRPSDBPARAMETERS_gapOpen &at[1732]
-#define FORMATRPSDBPARAMETERS_gapExtend &at[1733]
+#define PSSM &at[1763]
+#define PSSM_isProtein &at[1764]
+#define PSSM_identifier &at[1765]
+#define PSSM_numRows &at[1767]
+#define PSSM_numColumns &at[1768]
+#define PSSM_rowLabels &at[1769]
+#define PSSM_rowLabels_E &at[1770]
+#define PSSM_byRow &at[1771]
+#define PSSM_query &at[1772]
+#define PSSM_intermediateData &at[1774]
+#define PSSM_finalData &at[1782]
+
+#define PSSMINTERMEDIATEDATA &at[1775]
+#define resFreqsPerPos &at[1776]
+#define resFreqsPerPos_E &at[1777]
+#define weightedResFreqsPerPos &at[1778]
+#define weightedResFreqsPerPos_E &at[1779]
+#define PSSMINTERMEDIATEDATA_freqRatios &at[1780]
+#define freqRatios_E &at[1781]
+
+#define PSSMFINALDATA &at[1783]
+#define PSSMFINALDATA_scores &at[1784]
+#define PSSMFINALDATA_scores_E &at[1785]
+#define PSSMFINALDATA_lambda &at[1786]
+#define PSSMFINALDATA_kappa &at[1787]
+#define PSSMFINALDATA_h &at[1788]
+#define PSSMFINALDATA_scalingFactor &at[1789]
+
+#define PSSMPARAMETERS &at[1790]
+#define PSSMPARAMETERS_pseudocount &at[1791]
+#define PSSMPARAMETERS_rpsdbparams &at[1792]
+#define PSSMPARAMETERS_constraints &at[1797]
+
+#define PSSMWITHPARAMETERS &at[1818]
+#define PSSMWITHPARAMETERS_pssm &at[1819]
+#define PSSMWITHPARAMETERS_params &at[1820]
+
+#define BLOCKPROPERTY &at[1809]
+#define BLOCKPROPERTY_type &at[1810]
+#define BLOCKPROPERTY_intvalue &at[1811]
+#define BLOCKPROPERTY_textvalue &at[1812]
+
+#define COREBLOCK &at[1802]
+#define COREBLOCK_start &at[1803]
+#define COREBLOCK_stop &at[1804]
+#define COREBLOCK_minstart &at[1805]
+#define COREBLOCK_maxstop &at[1806]
+#define COREBLOCK_property &at[1807]
+#define COREBLOCK_property_E &at[1808]
+
+#define LOOPCONSTRAINT &at[1815]
+#define LOOPCONSTRAINT_minlength &at[1816]
+#define LOOPCONSTRAINT_maxlength &at[1817]
+
+#define COREDEF &at[1798]
+#define COREDEF_nblocks &at[1799]
+#define COREDEF_blocks &at[1800]
+#define COREDEF_blocks_E &at[1801]
+#define COREDEF_loops &at[1813]
+#define COREDEF_loops_E &at[1814]
+
+#define FORMATRPSDBPARAMETERS &at[1793]
+#define matrixName &at[1794]
+#define FORMATRPSDBPARAMETERS_gapOpen &at[1795]
+#define FORMATRPSDBPARAMETERS_gapExtend &at[1796]
+
+
+/**************************************************
+*
+* Defines for Module NCBI-Macro
+*
+**************************************************/
+
+#define AECR_ACTION &at[1821]
+#define AECR_ACTION_action &at[1822]
+#define AECR_ACTION_constraint &at[1949]
+
+#define PARSE_ACTION &at[1991]
+#define PARSE_ACTION_portion &at[1992]
+#define PARSE_ACTION_src &at[1993]
+#define PARSE_ACTION_dest &at[2009]
+#define PARSE_ACTION_capitalization &at[2021]
+#define PARSE_ACTION_remove_from_parsed &at[2023]
+#define PARSE_ACTION_existing_text &at[2024]
+
+#define MACRO_ACTION_LIST &at[2025]
+#define MACRO_ACTION_LIST_E &at[2026]
+
+#define STRING_LOCATION &at[1848]
+
+#define STRING_CONSTRAINT &at[1845]
+#define STRING_CONSTRAINT_match_text &at[1846]
+#define CONSTRAINT_match_location &at[1847]
+#define CONSTRAINT_case_sensitive &at[1849]
+#define STRING_CONSTRAINT_whole_word &at[1850]
+#define STRING_CONSTRAINT_not_present &at[1851]
+
+#define STRAND_CONSTRAINT &at[1957]
+
+#define SEQTYPE_CONSTRAINT &at[1959]
+
+#define LOCATION_CONSTRAINT &at[1955]
+#define LOCATION_CONSTRAINT_strand &at[1956]
+#define LOCATION_CONSTRAINT_seq_type &at[1958]
+
+#define OBJECT_TYPE_CONSTRAINT &at[1966]
+
+#define FEATURE_TYPE &at[1839]
+
+#define FEAT_QUAL_LEGAL &at[1843]
+
+#define FEAT_QUAL_LEGAL_VAL &at[2058]
+#define FEAT_QUAL_LEGAL_VAL_qual &at[2059]
+#define FEAT_QUAL_LEGAL_VAL_val &at[2060]
+
+#define FEAT_QUAL_LEGAL_VAL_CHOICE &at[2056]
+#define FEAT_QUAL_LEGAL_VAL_CHOICE_qual &at[2057]
+
+#define FEAT_QUAL_LEGAL_SET &at[2054]
+#define FEAT_QUAL_LEGAL_SET_E &at[2055]
+
+#define FEAT_QUAL_CHOICE &at[1841]
+#define FEAT_QUAL_CHOICE_legal_qual &at[1842]
+#define FEAT_QUAL_CHOICE_illegal_qual &at[1844]
+
+#define FEATURE_FIELD &at[1837]
+#define FEATURE_FIELD_type &at[1838]
+#define FEATURE_FIELD_field &at[1840]
+
+#define FEATURE_FIELD_LEGAL &at[2017]
+#define FEATURE_FIELD_LEGAL_type &at[2018]
+#define FEATURE_FIELD_LEGAL_field &at[2019]
+
+#define FEATURE_FIELD_PAIR &at[1889]
+#define FEATURE_FIELD_PAIR_type &at[1890]
+#define FEATURE_FIELD_PAIR_field_from &at[1891]
+#define FEATURE_FIELD_PAIR_field_to &at[1892]
+
+#define SOURCE_QUAL &at[1831]
+
+#define SOURCE_QUAL_PAIR &at[1885]
+#define SOURCE_QUAL_PAIR_field_from &at[1886]
+#define SOURCE_QUAL_PAIR_field_to &at[1887]
+
+#define SOURCE_LOCATION &at[1833]
+
+#define SOURCE_ORIGIN &at[1835]
+
+#define SOURCE_QUAL_CHOICE &at[1829]
+#define SOURCE_QUAL_CHOICE_textqual &at[1830]
+#define SOURCE_QUAL_CHOICE_location &at[1832]
+#define SOURCE_QUAL_CHOICE_origin &at[1834]
+
+#define CDSGENEPROT_FIELD &at[1853]
+
+#define CDSGENEPROT_FIELD_PAIR &at[1894]
+#define FIELD_PAIR_field_from &at[1895]
+#define CDSGENEPROT_FIELD_PAIR_field_to &at[1896]
+
+#define MOLECULE_TYPE &at[1857]
+
+#define TECHNIQUE_TYPE &at[1859]
+
+#define COMPLETEDNESS_TYPE &at[1861]
+
+#define MOLECULE_CLASS_TYPE &at[1863]
+
+#define TOPOLOGY_TYPE &at[1865]
+
+#define STRAND_TYPE &at[1867]
+
+#define MOLINFO_FIELD &at[1855]
+#define MOLINFO_FIELD_molecule &at[1856]
+#define MOLINFO_FIELD_technique &at[1858]
+#define MOLINFO_FIELD_completedness &at[1860]
+#define MOLINFO_FIELD_mol_class &at[1862]
+#define MOLINFO_FIELD_topology &at[1864]
+#define MOLINFO_FIELD_strand &at[1866]
+
+#define MOLINFO_MOLECULE_PAIR &at[1900]
+#define MOLINFO_MOLECULE_PAIR_from &at[1901]
+#define MOLINFO_MOLECULE_PAIR_to &at[1902]
+
+#define MOLINFO_TECHNIQUE_PAIR &at[1904]
+#define MOLINFO_TECHNIQUE_PAIR_from &at[1905]
+#define MOLINFO_TECHNIQUE_PAIR_to &at[1906]
+
+#define MOLINFO_COMPLETEDNESS_PAIR &at[1908]
+#define MOLINFO_COMPLETEDNESS_PAIR_from &at[1909]
+#define MOLINFO_COMPLETEDNESS_PAIR_to &at[1910]
+
+#define MOLINFO_MOL_CLASS_PAIR &at[1912]
+#define MOLINFO_MOL_CLASS_PAIR_from &at[1913]
+#define MOLINFO_MOL_CLASS_PAIR_to &at[1914]
+
+#define MOLINFO_TOPOLOGY_PAIR &at[1916]
+#define MOLINFO_TOPOLOGY_PAIR_from &at[1917]
+#define MOLINFO_TOPOLOGY_PAIR_to &at[1918]
+
+#define MOLINFO_STRAND_PAIR &at[1920]
+#define MOLINFO_STRAND_PAIR_from &at[1921]
+#define MOLINFO_STRAND_PAIR_to &at[1922]
+
+#define MOLINFO_FIELD_PAIR &at[1898]
+#define MOLINFO_FIELD_PAIR_molecule &at[1899]
+#define MOLINFO_FIELD_PAIR_technique &at[1903]
+#define FIELD_PAIR_completedness &at[1907]
+#define MOLINFO_FIELD_PAIR_mol_class &at[1911]
+#define MOLINFO_FIELD_PAIR_topology &at[1915]
+#define MOLINFO_FIELD_PAIR_strand &at[1919]
+
+#define SOURCE_CONSTRAINT &at[1961]
+#define SOURCE_CONSTRAINT_field1 &at[1962]
+#define SOURCE_CONSTRAINT_field2 &at[1963]
+#define SOURCE_CONSTRAINT_constraint &at[1964]
+#define CONSTRAINT_type_constraint &at[1965]
+
+#define FEATURE_TYPE_CONSTRAINT &at[1977]
+
+#define CDSGENEPROT_PSEUDO_CONSTRAINT &at[1975]
+#define PSEUDO_CONSTRAINT_feature &at[1976]
+#define PSEUDO_CONSTRAINT_is_pseudo &at[1978]
+
+#define CDSGENEPROT_CONSTRAINT_FIELD &at[1970]
+#define CONSTRAINT_FIELD_field &at[1971]
+
+#define CDSGENEPROT_QUAL_CONSTRAINT &at[1968]
+#define QUAL_CONSTRAINT_field1 &at[1969]
+#define QUAL_CONSTRAINT_field2 &at[1972]
+#define QUAL_CONSTRAINT_constraint &at[1973]
+
+#define SEQUENCE_CONSTRAINT_RNAMOL &at[1987]
+
+#define CONSTRAINT_MOL_TYPE_CONSTRAINT &at[1982]
+#define MOL_TYPE_CONSTRAINT_any &at[1983]
+#define MOL_TYPE_CONSTRAINT_nucleotide &at[1984]
+#define MOL_TYPE_CONSTRAINT_dna &at[1985]
+#define MOL_TYPE_CONSTRAINT_rna &at[1986]
+#define MOL_TYPE_CONSTRAINT_protein &at[1988]
+
+#define SEQUENCE_CONSTRAINT &at[1980]
+#define SEQUENCE_CONSTRAINT_seqtype &at[1981]
+#define SEQUENCE_CONSTRAINT_id &at[1989]
+#define SEQUENCE_CONSTRAINT_feature &at[1990]
+
+#define CONSTRAINT_CHOICE &at[1952]
+#define CONSTRAINT_CHOICE_string &at[1953]
+#define CONSTRAINT_CHOICE_location &at[1954]
+#define CONSTRAINT_CHOICE_source &at[1960]
+#define CHOICE_cdsgeneprot_qual &at[1967]
+#define CHOICE_cdsgeneprot_pseudo &at[1974]
+#define CONSTRAINT_CHOICE_sequence &at[1979]
+
+#define CONSTRAINT_CHOICE_SET &at[1950]
+#define CONSTRAINT_CHOICE_SET_E &at[1951]
+
+#define TEXT_PORTION &at[1938]
+#define TEXT_PORTION_left_text &at[1939]
+#define TEXT_PORTION_include_left &at[1940]
+#define TEXT_PORTION_right_text &at[1941]
+#define TEXT_PORTION_include_right &at[1942]
+#define TEXT_PORTION_inside &at[1943]
+#define TEXT_PORTION_case_sensitive &at[1944]
+#define TEXT_PORTION_whole_word &at[1945]
+
+#define FIELD_EDIT_LOCATION &at[1878]
+
+#define FIELD_EDIT &at[1874]
+#define FIELD_EDIT_find_txt &at[1875]
+#define FIELD_EDIT_repl_txt &at[1876]
+#define FIELD_EDIT_location &at[1877]
+
+#define FIELD_TYPE &at[1827]
+#define FIELD_TYPE_source_qual &at[1828]
+#define FIELD_TYPE_feature_field &at[1836]
+#define FIELD_TYPE_cds_gene_prot &at[1852]
+#define FIELD_TYPE_molinfo_field &at[1854]
+
+#define FIELD_PAIR_TYPE &at[1883]
+#define FIELD_PAIR_TYPE_source_qual &at[1884]
+#define FIELD_PAIR_TYPE_feature_field &at[1888]
+#define FIELD_PAIR_TYPE_cds_gene_prot &at[1893]
+#define FIELD_PAIR_TYPE_molinfo_field &at[1897]
+
+#define EXISTINGTEXTOPTION &at[1870]
+
+#define APPLY_ACTION &at[1825]
+#define APPLY_ACTION_field &at[1826]
+#define APPLY_ACTION_value &at[1868]
+#define APPLY_ACTION_existing_text &at[1869]
+
+#define EDIT_ACTION &at[1872]
+#define EDIT_ACTION_edit &at[1873]
+#define EDIT_ACTION_field &at[1879]
+
+#define CONVERT_ACTION &at[1881]
+#define CONVERT_ACTION_fields &at[1882]
+#define CONVERT_ACTION_existing_text &at[1923]
+
+#define COPY_ACTION &at[1925]
+#define COPY_ACTION_fields &at[1926]
+#define COPY_ACTION_existing_text &at[1927]
+
+#define SWAP_ACTION &at[1929]
+#define SWAP_ACTION_fields &at[1930]
+#define SWAP_ACTION_field_to &at[1931]
+
+#define AECRPARSE_ACTION &at[1936]
+#define AECRPARSE_ACTION_portion &at[1937]
+#define AECRPARSE_ACTION_fields &at[1946]
+#define ACTION_remove_from_parsed &at[1947]
+#define AECRPARSE_ACTION_existing_text &at[1948]
+
+#define REMOVE_ACTION &at[1933]
+#define REMOVE_ACTION_field &at[1934]
+
+#define ACTION_CHOICE &at[1823]
+#define ACTION_CHOICE_apply &at[1824]
+#define ACTION_CHOICE_edit &at[1871]
+#define ACTION_CHOICE_convert &at[1880]
+#define ACTION_CHOICE_copy &at[1924]
+#define ACTION_CHOICE_swap &at[1928]
+#define ACTION_CHOICE_remove &at[1932]
+#define ACTION_CHOICE_parse &at[1935]
+
+#define CAP_CHANGE &at[2022]
+
+#define PARSE_SRC_ORG_CHOICE &at[2001]
+#define SRC_ORG_CHOICE_source_qual &at[2002]
+#define CHOICE_taxname_after_binomial &at[2003]
+
+#define PARSE_SRC_ORG &at[1999]
+#define PARSE_SRC_ORG_field &at[2000]
+#define PARSE_SRC_ORG_type &at[2004]
+
+#define PARSE_SRC &at[1994]
+#define PARSE_SRC_defline &at[1995]
+#define PARSE_SRC_flatfile &at[1996]
+#define PARSE_SRC_local_id &at[1997]
+#define PARSE_SRC_org &at[1998]
+#define PARSE_SRC_comment &at[2005]
+#define PARSE_SRC_bankit_comment &at[2006]
+#define PARSE_SRC_structured_comment &at[2007]
+#define PARSE_SRC_file_id &at[2008]
+
+#define PARSE_DST_ORG &at[2013]
+#define PARSE_DST_ORG_field &at[2014]
+#define PARSE_DST_ORG_type &at[2015]
+
+#define PARSE_DEST &at[2010]
+#define PARSE_DEST_defline &at[2011]
+#define PARSE_DEST_org &at[2012]
+#define PARSE_DEST_featqual &at[2016]
+#define PARSE_DEST_dbxref &at[2020]
+
+#define LOCATION_INTERVAL &at[2039]
+#define LOCATION_INTERVAL_from &at[2040]
+#define LOCATION_INTERVAL_to &at[2041]
+
+#define LOCATION_CHOICE &at[2037]
+#define LOCATION_CHOICE_interval &at[2038]
+#define LOCATION_CHOICE_whole_sequence &at[2042]
+
+#define SEQUENCE_LIST &at[2046]
+#define SEQUENCE_LIST_E &at[2047]
+
+#define SEQUENCE_LIST_CHOICE &at[2044]
+#define SEQUENCE_LIST_CHOICE_list &at[2045]
+#define SEQUENCE_LIST_CHOICE_all &at[2048]
+
+#define APPLY_FEATURE_ACTION &at[2031]
+#define APPLY_FEATURE_ACTION_type &at[2032]
+#define APPLY_FEATURE_ACTION_partial5 &at[2033]
+#define APPLY_FEATURE_ACTION_partial3 &at[2034]
+#define FEATURE_ACTION_plus_strand &at[2035]
+#define APPLY_FEATURE_ACTION_location &at[2036]
+#define APPLY_FEATURE_ACTION_seq_list &at[2043]
+#define FEATURE_ACTION_add_redundant &at[2049]
+#define APPLY_FEATURE_ACTION_add_mrna &at[2050]
+#define FEATURE_ACTION_apply_to_parts &at[2051]
+#define FEATURE_ACTION_only_seg_num &at[2052]
+#define APPLY_FEATURE_ACTION_fields &at[2053]
+
+#define REMOVE_FEATURE_ACTION &at[2062]
+#define REMOVE_FEATURE_ACTION_type &at[2063]
+#define FEATURE_ACTION_constraint &at[2064]
+
+#define FEATURE_LOCATION_STRAND_FROM &at[2073]
+
+#define FEATURE_LOCATION_STRAND_TO &at[2075]
+
+#define EDIT_LOCATION_STRAND &at[2071]
+#define LOCATION_STRAND_strand_from &at[2072]
+#define EDIT_LOCATION_STRAND_strand_to &at[2074]
+
+#define PARTIAL_5_SET_CONSTRAINT &at[2079]
+
+#define PARTIAL_5_SET_ACTION &at[2077]
+#define PARTIAL_5_SET_ACTION_constraint &at[2078]
+#define PARTIAL_5_SET_ACTION_extend &at[2080]
+
+#define PARTIAL_5_CLEAR_CONSTRAINT &at[2082]
+
+#define PARTIAL_3_SET_CONSTRAINT &at[2086]
+
+#define PARTIAL_3_SET_ACTION &at[2084]
+#define PARTIAL_3_SET_ACTION_constraint &at[2085]
+#define PARTIAL_3_SET_ACTION_extend &at[2087]
+
+#define PARTIAL_3_CLEAR_CONSTRAINT &at[2089]
+
+#define CONVERT_LOCATION_TYPE &at[2091]
+
+#define LOCATION_EDIT_TYPE &at[2069]
+#define LOCATION_EDIT_TYPE_strand &at[2070]
+#define EDIT_TYPE_set_5_partial &at[2076]
+#define EDIT_TYPE_clear_5_partial &at[2081]
+#define EDIT_TYPE_set_3_partial &at[2083]
+#define EDIT_TYPE_clear_3_partial &at[2088]
+#define LOCATION_EDIT_TYPE_convert &at[2090]
+
+#define EDIT_FEATURE_LOCATION_ACTION &at[2066]
+#define FEATURE_LOCATION_ACTION_type &at[2067]
+#define FEATURE_LOCATION_ACTION_action &at[2068]
+#define LOCATION_ACTION_constraint &at[2092]
+
+#define MACRO_ACTION_CHOICE &at[2027]
+#define MACRO_ACTION_CHOICE_aecr &at[2028]
+#define MACRO_ACTION_CHOICE_parse &at[2029]
+#define MACRO_ACTION_CHOICE_add_feature &at[2030]
+#define ACTION_CHOICE_remove_feature &at[2061]
+#define ACTION_CHOICE_edit_location &at[2065]
diff --git a/asnstat/asnfeat.h b/asnstat/asnfeat.h
index c0db8a96..819471e8 100644
--- a/asnstat/asnfeat.h
+++ b/asnstat/asnfeat.h
@@ -9,8 +9,8 @@
#include <asn.h>
#endif
-static char * asnfilename = "asnfeat.h18";
-static AsnValxNode avnx[207] = {
+static char * asnfilename = "asnfeat.h19";
+static AsnValxNode avnx[208] = {
{2,NULL,0,0.0,NULL } ,
{20,"other" ,0,0.0,&avnx[2] } ,
{20,"family" ,1,0.0,&avnx[3] } ,
@@ -168,55 +168,56 @@ static AsnValxNode avnx[207] = {
{20,"proplastid" ,18,0.0,&avnx[155] } ,
{20,"endogenous-virus" ,19,0.0,&avnx[156] } ,
{20,"hydrogenosome" ,20,0.0,&avnx[157] } ,
- {20,"chromosome" ,21,0.0,NULL } ,
+ {20,"chromosome" ,21,0.0,&avnx[158] } ,
+ {20,"chromatophore" ,22,0.0,NULL } ,
{3,NULL,0,0.0,NULL } ,
- {20,"unknown" ,0,0.0,&avnx[160] } ,
- {20,"natural" ,1,0.0,&avnx[161] } ,
- {20,"natmut" ,2,0.0,&avnx[162] } ,
- {20,"mut" ,3,0.0,&avnx[163] } ,
- {20,"artificial" ,4,0.0,&avnx[164] } ,
- {20,"synthetic" ,5,0.0,&avnx[165] } ,
+ {20,"unknown" ,0,0.0,&avnx[161] } ,
+ {20,"natural" ,1,0.0,&avnx[162] } ,
+ {20,"natmut" ,2,0.0,&avnx[163] } ,
+ {20,"mut" ,3,0.0,&avnx[164] } ,
+ {20,"artificial" ,4,0.0,&avnx[165] } ,
+ {20,"synthetic" ,5,0.0,&avnx[166] } ,
{20,"other" ,255,0.0,NULL } ,
{3,NULL,0,0.0,NULL } ,
- {20,"chromosome" ,1,0.0,&avnx[168] } ,
- {20,"map" ,2,0.0,&avnx[169] } ,
- {20,"clone" ,3,0.0,&avnx[170] } ,
- {20,"subclone" ,4,0.0,&avnx[171] } ,
- {20,"haplotype" ,5,0.0,&avnx[172] } ,
- {20,"genotype" ,6,0.0,&avnx[173] } ,
- {20,"sex" ,7,0.0,&avnx[174] } ,
- {20,"cell-line" ,8,0.0,&avnx[175] } ,
- {20,"cell-type" ,9,0.0,&avnx[176] } ,
- {20,"tissue-type" ,10,0.0,&avnx[177] } ,
- {20,"clone-lib" ,11,0.0,&avnx[178] } ,
- {20,"dev-stage" ,12,0.0,&avnx[179] } ,
- {20,"frequency" ,13,0.0,&avnx[180] } ,
- {20,"germline" ,14,0.0,&avnx[181] } ,
- {20,"rearranged" ,15,0.0,&avnx[182] } ,
- {20,"lab-host" ,16,0.0,&avnx[183] } ,
- {20,"pop-variant" ,17,0.0,&avnx[184] } ,
- {20,"tissue-lib" ,18,0.0,&avnx[185] } ,
- {20,"plasmid-name" ,19,0.0,&avnx[186] } ,
- {20,"transposon-name" ,20,0.0,&avnx[187] } ,
- {20,"insertion-seq-name" ,21,0.0,&avnx[188] } ,
- {20,"plastid-name" ,22,0.0,&avnx[189] } ,
- {20,"country" ,23,0.0,&avnx[190] } ,
- {20,"segment" ,24,0.0,&avnx[191] } ,
- {20,"endogenous-virus-name" ,25,0.0,&avnx[192] } ,
- {20,"transgenic" ,26,0.0,&avnx[193] } ,
- {20,"environmental-sample" ,27,0.0,&avnx[194] } ,
- {20,"isolation-source" ,28,0.0,&avnx[195] } ,
- {20,"lat-lon" ,29,0.0,&avnx[196] } ,
- {20,"collection-date" ,30,0.0,&avnx[197] } ,
- {20,"collected-by" ,31,0.0,&avnx[198] } ,
- {20,"identified-by" ,32,0.0,&avnx[199] } ,
- {20,"fwd-primer-seq" ,33,0.0,&avnx[200] } ,
- {20,"rev-primer-seq" ,34,0.0,&avnx[201] } ,
- {20,"fwd-primer-name" ,35,0.0,&avnx[202] } ,
- {20,"rev-primer-name" ,36,0.0,&avnx[203] } ,
- {20,"metagenomic" ,37,0.0,&avnx[204] } ,
+ {20,"chromosome" ,1,0.0,&avnx[169] } ,
+ {20,"map" ,2,0.0,&avnx[170] } ,
+ {20,"clone" ,3,0.0,&avnx[171] } ,
+ {20,"subclone" ,4,0.0,&avnx[172] } ,
+ {20,"haplotype" ,5,0.0,&avnx[173] } ,
+ {20,"genotype" ,6,0.0,&avnx[174] } ,
+ {20,"sex" ,7,0.0,&avnx[175] } ,
+ {20,"cell-line" ,8,0.0,&avnx[176] } ,
+ {20,"cell-type" ,9,0.0,&avnx[177] } ,
+ {20,"tissue-type" ,10,0.0,&avnx[178] } ,
+ {20,"clone-lib" ,11,0.0,&avnx[179] } ,
+ {20,"dev-stage" ,12,0.0,&avnx[180] } ,
+ {20,"frequency" ,13,0.0,&avnx[181] } ,
+ {20,"germline" ,14,0.0,&avnx[182] } ,
+ {20,"rearranged" ,15,0.0,&avnx[183] } ,
+ {20,"lab-host" ,16,0.0,&avnx[184] } ,
+ {20,"pop-variant" ,17,0.0,&avnx[185] } ,
+ {20,"tissue-lib" ,18,0.0,&avnx[186] } ,
+ {20,"plasmid-name" ,19,0.0,&avnx[187] } ,
+ {20,"transposon-name" ,20,0.0,&avnx[188] } ,
+ {20,"insertion-seq-name" ,21,0.0,&avnx[189] } ,
+ {20,"plastid-name" ,22,0.0,&avnx[190] } ,
+ {20,"country" ,23,0.0,&avnx[191] } ,
+ {20,"segment" ,24,0.0,&avnx[192] } ,
+ {20,"endogenous-virus-name" ,25,0.0,&avnx[193] } ,
+ {20,"transgenic" ,26,0.0,&avnx[194] } ,
+ {20,"environmental-sample" ,27,0.0,&avnx[195] } ,
+ {20,"isolation-source" ,28,0.0,&avnx[196] } ,
+ {20,"lat-lon" ,29,0.0,&avnx[197] } ,
+ {20,"collection-date" ,30,0.0,&avnx[198] } ,
+ {20,"collected-by" ,31,0.0,&avnx[199] } ,
+ {20,"identified-by" ,32,0.0,&avnx[200] } ,
+ {20,"fwd-primer-seq" ,33,0.0,&avnx[201] } ,
+ {20,"rev-primer-seq" ,34,0.0,&avnx[202] } ,
+ {20,"fwd-primer-name" ,35,0.0,&avnx[203] } ,
+ {20,"rev-primer-name" ,36,0.0,&avnx[204] } ,
+ {20,"metagenomic" ,37,0.0,&avnx[205] } ,
{20,"other" ,255,0.0,NULL } ,
- {20,"experimental" ,1,0.0,&avnx[206] } ,
+ {20,"experimental" ,1,0.0,&avnx[207] } ,
{20,"not-experimental" ,2,0.0,NULL } };
static AsnType atx[238] = {
@@ -417,14 +418,14 @@ static AsnType atx[238] = {
{0, "biosrc" ,128,19,0,0,0,0,0,0,NULL,&atx[195],NULL,0,NULL} ,
{407, "BioSource" ,1,0,0,0,0,0,1,0,NULL,&atx[196],NULL,0,&atx[121]} ,
{401, "BioSource" ,1,0,0,0,0,1,0,0,NULL,&atx[31],&atx[197],0,&atx[200]} ,
- {0, "genome" ,128,0,0,0,1,0,0,0,&avnx[158],&atx[4],&avnx[136],0,&atx[198]} ,
- {0, "origin" ,128,1,0,0,1,0,0,0,&avnx[166],&atx[4],&avnx[159],0,&atx[199]} ,
+ {0, "genome" ,128,0,0,0,1,0,0,0,&avnx[159],&atx[4],&avnx[136],0,&atx[198]} ,
+ {0, "origin" ,128,1,0,0,1,0,0,0,&avnx[167],&atx[4],&avnx[160],0,&atx[199]} ,
{0, "org" ,128,2,0,0,0,0,0,0,NULL,&atx[200],NULL,0,&atx[201]} ,
{402, "Org-ref" ,1,0,0,0,0,0,1,0,NULL,&atx[34],NULL,0,&atx[203]} ,
{0, "subtype" ,128,3,0,1,0,0,0,0,NULL,&atx[56],&atx[202],0,&atx[207]} ,
{0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[203],NULL,0,NULL} ,
{403, "SubSource" ,1,0,0,0,0,0,0,0,NULL,&atx[31],&atx[204],0,NULL} ,
- {0, "subtype" ,128,0,0,0,0,0,0,0,NULL,&atx[4],&avnx[167],0,&atx[205]} ,
+ {0, "subtype" ,128,0,0,0,0,0,0,0,NULL,&atx[4],&avnx[168],0,&atx[205]} ,
{0, "name" ,128,1,0,0,0,0,0,0,NULL,&atx[18],NULL,0,&atx[206]} ,
{0, "attrib" ,128,2,0,1,0,0,0,0,NULL,&atx[18],NULL,0,NULL} ,
{0, "is-focus" ,128,4,0,1,0,0,0,0,NULL,&atx[148],NULL,0,NULL} ,
@@ -442,7 +443,7 @@ static AsnType atx[238] = {
{0, "ext" ,128,9,0,1,0,0,0,0,NULL,&atx[158],NULL,0,&atx[220]} ,
{0, "cit" ,128,10,0,1,0,0,0,0,NULL,&atx[221],NULL,0,&atx[222]} ,
{416, "Pub-set" ,1,0,0,0,0,0,1,0,NULL,NULL,NULL,0,&atx[8]} ,
- {0, "exp-ev" ,128,11,0,1,0,0,0,0,NULL,&atx[80],&avnx[205],0,&atx[223]} ,
+ {0, "exp-ev" ,128,11,0,1,0,0,0,0,NULL,&atx[80],&avnx[206],0,&atx[223]} ,
{0, "xref" ,128,12,0,1,0,0,0,0,NULL,&atx[27],&atx[224],0,&atx[228]} ,
{0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[225],NULL,0,NULL} ,
{422, "SeqFeatXref" ,1,0,0,0,0,0,0,0,NULL,&atx[31],&atx[226],0,&atx[77]} ,
@@ -460,7 +461,7 @@ static AsnType atx[238] = {
{0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[85],NULL,0,NULL} };
static AsnModule ampx[8] = {
- { "NCBI-Seqfeat" , "asnfeat.h18",&atx[0],NULL,&ampx[1],0,0} ,
+ { "NCBI-Seqfeat" , "asnfeat.h19",&atx[0],NULL,&ampx[1],0,0} ,
{ "NCBI-Rsite" , NULL,&atx[153],NULL,&ampx[2],0,0} ,
{ "NCBI-RNA" , NULL,&atx[122],NULL,&ampx[3],0,0} ,
{ "NCBI-Gene" , NULL,&atx[16],NULL,&ampx[4],0,0} ,
diff --git a/asnstat/asnmacro.h b/asnstat/asnmacro.h
new file mode 100644
index 00000000..33b54494
--- /dev/null
+++ b/asnstat/asnmacro.h
@@ -0,0 +1,1124 @@
+/***********************************************************************
+*
+**
+* Automatic header module from ASNTOOL
+*
+************************************************************************/
+
+#ifndef _ASNTOOL_
+#include <asn.h>
+#endif
+
+static char * asnfilename = "asnmacro.h13";
+static AsnValxNode avnx[454] = {
+ {20,"acronym" ,1,0.0,&avnx[1] } ,
+ {20,"anamorph" ,2,0.0,&avnx[2] } ,
+ {20,"authority" ,3,0.0,&avnx[3] } ,
+ {20,"bio-material" ,4,0.0,&avnx[4] } ,
+ {20,"biotype" ,5,0.0,&avnx[5] } ,
+ {20,"biovar" ,6,0.0,&avnx[6] } ,
+ {20,"breed" ,7,0.0,&avnx[7] } ,
+ {20,"cell-line" ,8,0.0,&avnx[8] } ,
+ {20,"cell-type" ,9,0.0,&avnx[9] } ,
+ {20,"chemovar" ,10,0.0,&avnx[10] } ,
+ {20,"chromosome" ,11,0.0,&avnx[11] } ,
+ {20,"clone" ,12,0.0,&avnx[12] } ,
+ {20,"clone-lib" ,13,0.0,&avnx[13] } ,
+ {20,"collected-by" ,14,0.0,&avnx[14] } ,
+ {20,"collection-date" ,15,0.0,&avnx[15] } ,
+ {20,"common" ,16,0.0,&avnx[16] } ,
+ {20,"common-name" ,17,0.0,&avnx[17] } ,
+ {20,"country" ,18,0.0,&avnx[18] } ,
+ {20,"cultivar" ,19,0.0,&avnx[19] } ,
+ {20,"culture-collection" ,20,0.0,&avnx[20] } ,
+ {20,"dev-stage" ,21,0.0,&avnx[21] } ,
+ {20,"division" ,22,0.0,&avnx[22] } ,
+ {20,"dosage" ,23,0.0,&avnx[23] } ,
+ {20,"ecotype" ,24,0.0,&avnx[24] } ,
+ {20,"endogenous-virus-name" ,25,0.0,&avnx[25] } ,
+ {20,"environmental-sample" ,26,0.0,&avnx[26] } ,
+ {20,"forma" ,27,0.0,&avnx[27] } ,
+ {20,"forma-specialis" ,28,0.0,&avnx[28] } ,
+ {20,"frequency" ,29,0.0,&avnx[29] } ,
+ {20,"fwd-primer-name" ,30,0.0,&avnx[30] } ,
+ {20,"fwd-primer-seq" ,31,0.0,&avnx[31] } ,
+ {20,"gb-acronym" ,32,0.0,&avnx[32] } ,
+ {20,"gb-anamorph" ,33,0.0,&avnx[33] } ,
+ {20,"gb-synonym" ,34,0.0,&avnx[34] } ,
+ {20,"genotype" ,35,0.0,&avnx[35] } ,
+ {20,"germline" ,36,0.0,&avnx[36] } ,
+ {20,"group" ,37,0.0,&avnx[37] } ,
+ {20,"haplotype" ,38,0.0,&avnx[38] } ,
+ {20,"identified-by" ,39,0.0,&avnx[39] } ,
+ {20,"insertion-seq-name" ,40,0.0,&avnx[40] } ,
+ {20,"isolate" ,41,0.0,&avnx[41] } ,
+ {20,"isolation-source" ,42,0.0,&avnx[42] } ,
+ {20,"lab-host" ,43,0.0,&avnx[43] } ,
+ {20,"lat-lon" ,44,0.0,&avnx[44] } ,
+ {20,"lineage" ,45,0.0,&avnx[45] } ,
+ {20,"map" ,46,0.0,&avnx[46] } ,
+ {20,"metagenome-source" ,47,0.0,&avnx[47] } ,
+ {20,"metagenomic" ,48,0.0,&avnx[48] } ,
+ {20,"old-lineage" ,49,0.0,&avnx[49] } ,
+ {20,"old-name" ,50,0.0,&avnx[50] } ,
+ {20,"orgmod-note" ,51,0.0,&avnx[51] } ,
+ {20,"nat-host" ,52,0.0,&avnx[52] } ,
+ {20,"pathovar" ,53,0.0,&avnx[53] } ,
+ {20,"plasmid-name" ,54,0.0,&avnx[54] } ,
+ {20,"plastid-name" ,55,0.0,&avnx[55] } ,
+ {20,"pop-variant" ,56,0.0,&avnx[56] } ,
+ {20,"rearranged" ,57,0.0,&avnx[57] } ,
+ {20,"rev-primer-name" ,58,0.0,&avnx[58] } ,
+ {20,"rev-primer-seq" ,59,0.0,&avnx[59] } ,
+ {20,"segment" ,60,0.0,&avnx[60] } ,
+ {20,"serogroup" ,61,0.0,&avnx[61] } ,
+ {20,"serotype" ,62,0.0,&avnx[62] } ,
+ {20,"serovar" ,63,0.0,&avnx[63] } ,
+ {20,"sex" ,64,0.0,&avnx[64] } ,
+ {20,"specimen-voucher" ,65,0.0,&avnx[65] } ,
+ {20,"strain" ,66,0.0,&avnx[66] } ,
+ {20,"subclone" ,67,0.0,&avnx[67] } ,
+ {20,"subgroup" ,68,0.0,&avnx[68] } ,
+ {20,"subsource-note" ,69,0.0,&avnx[69] } ,
+ {20,"sub-species" ,70,0.0,&avnx[70] } ,
+ {20,"substrain" ,71,0.0,&avnx[71] } ,
+ {20,"subtype" ,72,0.0,&avnx[72] } ,
+ {20,"synonym" ,73,0.0,&avnx[73] } ,
+ {20,"taxname" ,74,0.0,&avnx[74] } ,
+ {20,"teleomorph" ,75,0.0,&avnx[75] } ,
+ {20,"tissue-lib" ,76,0.0,&avnx[76] } ,
+ {20,"tissue-type" ,77,0.0,&avnx[77] } ,
+ {20,"transgenic" ,78,0.0,&avnx[78] } ,
+ {20,"transposon-name" ,79,0.0,&avnx[79] } ,
+ {20,"type" ,80,0.0,&avnx[80] } ,
+ {20,"variety" ,81,0.0,NULL } ,
+ {20,"unknown" ,0,0.0,&avnx[82] } ,
+ {20,"genomic" ,1,0.0,&avnx[83] } ,
+ {20,"chloroplast" ,2,0.0,&avnx[84] } ,
+ {20,"chromoplast" ,3,0.0,&avnx[85] } ,
+ {20,"kinetoplast" ,4,0.0,&avnx[86] } ,
+ {20,"mitochondrion" ,5,0.0,&avnx[87] } ,
+ {20,"plastid" ,6,0.0,&avnx[88] } ,
+ {20,"macronuclear" ,7,0.0,&avnx[89] } ,
+ {20,"extrachrom" ,8,0.0,&avnx[90] } ,
+ {20,"plasmid" ,9,0.0,&avnx[91] } ,
+ {20,"transposon" ,10,0.0,&avnx[92] } ,
+ {20,"insertion-seq" ,11,0.0,&avnx[93] } ,
+ {20,"cyanelle" ,12,0.0,&avnx[94] } ,
+ {20,"proviral" ,13,0.0,&avnx[95] } ,
+ {20,"virion" ,14,0.0,&avnx[96] } ,
+ {20,"nucleomorph" ,15,0.0,&avnx[97] } ,
+ {20,"apicoplast" ,16,0.0,&avnx[98] } ,
+ {20,"leucoplast" ,17,0.0,&avnx[99] } ,
+ {20,"proplastid" ,18,0.0,&avnx[100] } ,
+ {20,"endogenous-virus" ,19,0.0,&avnx[101] } ,
+ {20,"hydrogenosome" ,20,0.0,&avnx[102] } ,
+ {20,"chromosome" ,21,0.0,&avnx[103] } ,
+ {20,"chromatophore" ,22,0.0,NULL } ,
+ {20,"unknown" ,0,0.0,&avnx[105] } ,
+ {20,"natural" ,1,0.0,&avnx[106] } ,
+ {20,"natmut" ,2,0.0,&avnx[107] } ,
+ {20,"mut" ,3,0.0,&avnx[108] } ,
+ {20,"artificial" ,4,0.0,&avnx[109] } ,
+ {20,"synthetic" ,5,0.0,&avnx[110] } ,
+ {20,"other" ,255,0.0,NULL } ,
+ {20,"any" ,0,0.0,&avnx[112] } ,
+ {20,"gene" ,1,0.0,&avnx[113] } ,
+ {20,"org" ,2,0.0,&avnx[114] } ,
+ {20,"cds" ,3,0.0,&avnx[115] } ,
+ {20,"prot" ,4,0.0,&avnx[116] } ,
+ {20,"preRNA" ,5,0.0,&avnx[117] } ,
+ {20,"mRNA" ,6,0.0,&avnx[118] } ,
+ {20,"tRNA" ,7,0.0,&avnx[119] } ,
+ {20,"rRNA" ,8,0.0,&avnx[120] } ,
+ {20,"snRNA" ,9,0.0,&avnx[121] } ,
+ {20,"scRNA" ,10,0.0,&avnx[122] } ,
+ {20,"otherRNA" ,11,0.0,&avnx[123] } ,
+ {20,"pub" ,12,0.0,&avnx[124] } ,
+ {20,"seq" ,13,0.0,&avnx[125] } ,
+ {20,"imp" ,14,0.0,&avnx[126] } ,
+ {20,"allele" ,15,0.0,&avnx[127] } ,
+ {20,"attenuator" ,16,0.0,&avnx[128] } ,
+ {20,"c-region" ,17,0.0,&avnx[129] } ,
+ {20,"caat-signal" ,18,0.0,&avnx[130] } ,
+ {20,"imp-CDS" ,19,0.0,&avnx[131] } ,
+ {20,"conflict" ,20,0.0,&avnx[132] } ,
+ {20,"d-loop" ,21,0.0,&avnx[133] } ,
+ {20,"d-segment" ,22,0.0,&avnx[134] } ,
+ {20,"enhancer" ,23,0.0,&avnx[135] } ,
+ {20,"exon" ,24,0.0,&avnx[136] } ,
+ {20,"gC-signal" ,25,0.0,&avnx[137] } ,
+ {20,"iDNA" ,26,0.0,&avnx[138] } ,
+ {20,"intron" ,27,0.0,&avnx[139] } ,
+ {20,"j-segment" ,28,0.0,&avnx[140] } ,
+ {20,"ltr" ,29,0.0,&avnx[141] } ,
+ {20,"mat-peptide" ,30,0.0,&avnx[142] } ,
+ {20,"misc-binding" ,31,0.0,&avnx[143] } ,
+ {20,"misc-difference" ,32,0.0,&avnx[144] } ,
+ {20,"misc-feature" ,33,0.0,&avnx[145] } ,
+ {20,"misc-recomb" ,34,0.0,&avnx[146] } ,
+ {20,"misc-RNA" ,35,0.0,&avnx[147] } ,
+ {20,"misc-signal" ,36,0.0,&avnx[148] } ,
+ {20,"misc-structure" ,37,0.0,&avnx[149] } ,
+ {20,"modified-base" ,38,0.0,&avnx[150] } ,
+ {20,"mutation" ,39,0.0,&avnx[151] } ,
+ {20,"n-region" ,40,0.0,&avnx[152] } ,
+ {20,"old-sequence" ,41,0.0,&avnx[153] } ,
+ {20,"polyA-signal" ,42,0.0,&avnx[154] } ,
+ {20,"polyA-site" ,43,0.0,&avnx[155] } ,
+ {20,"precursor-RNA" ,44,0.0,&avnx[156] } ,
+ {20,"prim-transcript" ,45,0.0,&avnx[157] } ,
+ {20,"primer-bind" ,46,0.0,&avnx[158] } ,
+ {20,"promoter" ,47,0.0,&avnx[159] } ,
+ {20,"protein-bind" ,48,0.0,&avnx[160] } ,
+ {20,"rbs" ,49,0.0,&avnx[161] } ,
+ {20,"repeat-region" ,50,0.0,&avnx[162] } ,
+ {20,"repeat-unit" ,51,0.0,&avnx[163] } ,
+ {20,"rep-origin" ,52,0.0,&avnx[164] } ,
+ {20,"s-region" ,53,0.0,&avnx[165] } ,
+ {20,"satellite" ,54,0.0,&avnx[166] } ,
+ {20,"sig-peptide" ,55,0.0,&avnx[167] } ,
+ {20,"source" ,56,0.0,&avnx[168] } ,
+ {20,"stem-loop" ,57,0.0,&avnx[169] } ,
+ {20,"sts" ,58,0.0,&avnx[170] } ,
+ {20,"tata-signal" ,59,0.0,&avnx[171] } ,
+ {20,"terminator" ,60,0.0,&avnx[172] } ,
+ {20,"transit-peptide" ,61,0.0,&avnx[173] } ,
+ {20,"unsure" ,62,0.0,&avnx[174] } ,
+ {20,"v-region" ,63,0.0,&avnx[175] } ,
+ {20,"v-segment" ,64,0.0,&avnx[176] } ,
+ {20,"variation" ,65,0.0,&avnx[177] } ,
+ {20,"virion" ,66,0.0,&avnx[178] } ,
+ {20,"n3clip" ,67,0.0,&avnx[179] } ,
+ {20,"n3UTR" ,68,0.0,&avnx[180] } ,
+ {20,"n5clip" ,69,0.0,&avnx[181] } ,
+ {20,"n5UTR" ,70,0.0,&avnx[182] } ,
+ {20,"n10-signal" ,71,0.0,&avnx[183] } ,
+ {20,"n35-signal" ,72,0.0,&avnx[184] } ,
+ {20,"site-ref" ,73,0.0,&avnx[185] } ,
+ {20,"region" ,74,0.0,&avnx[186] } ,
+ {20,"comment" ,75,0.0,&avnx[187] } ,
+ {20,"bond" ,76,0.0,&avnx[188] } ,
+ {20,"site" ,77,0.0,&avnx[189] } ,
+ {20,"rsite" ,78,0.0,&avnx[190] } ,
+ {20,"user" ,79,0.0,&avnx[191] } ,
+ {20,"txinit" ,80,0.0,&avnx[192] } ,
+ {20,"num" ,81,0.0,&avnx[193] } ,
+ {20,"psec-str" ,82,0.0,&avnx[194] } ,
+ {20,"non-std-residue" ,83,0.0,&avnx[195] } ,
+ {20,"het" ,84,0.0,&avnx[196] } ,
+ {20,"biosrc" ,85,0.0,&avnx[197] } ,
+ {20,"preprotein" ,86,0.0,&avnx[198] } ,
+ {20,"mat-peptide-aa" ,87,0.0,&avnx[199] } ,
+ {20,"sig-peptide-aa" ,88,0.0,&avnx[200] } ,
+ {20,"transit-peptide-aa" ,89,0.0,&avnx[201] } ,
+ {20,"snoRNA" ,90,0.0,&avnx[202] } ,
+ {20,"gap" ,91,0.0,&avnx[203] } ,
+ {20,"operon" ,92,0.0,&avnx[204] } ,
+ {20,"oriT" ,93,0.0,&avnx[205] } ,
+ {20,"ncRNA" ,94,0.0,&avnx[206] } ,
+ {20,"tmRNA" ,95,0.0,NULL } ,
+ {20,"allele" ,1,0.0,&avnx[208] } ,
+ {20,"activity" ,2,0.0,&avnx[209] } ,
+ {20,"anticodon" ,3,0.0,&avnx[210] } ,
+ {20,"bound-moiety" ,4,0.0,&avnx[211] } ,
+ {20,"chromosome" ,5,0.0,&avnx[212] } ,
+ {20,"citation" ,6,0.0,&avnx[213] } ,
+ {20,"codon" ,7,0.0,&avnx[214] } ,
+ {20,"codon-start" ,8,0.0,&avnx[215] } ,
+ {20,"codons-recognized" ,9,0.0,&avnx[216] } ,
+ {20,"compare" ,10,0.0,&avnx[217] } ,
+ {20,"cons-splice" ,11,0.0,&avnx[218] } ,
+ {20,"db-xref" ,12,0.0,&avnx[219] } ,
+ {20,"description" ,13,0.0,&avnx[220] } ,
+ {20,"direction" ,14,0.0,&avnx[221] } ,
+ {20,"ec-number" ,15,0.0,&avnx[222] } ,
+ {20,"environmental-sample" ,16,0.0,&avnx[223] } ,
+ {20,"evidence" ,17,0.0,&avnx[224] } ,
+ {20,"exception" ,18,0.0,&avnx[225] } ,
+ {20,"experiment" ,19,0.0,&avnx[226] } ,
+ {20,"focus" ,20,0.0,&avnx[227] } ,
+ {20,"frequency" ,21,0.0,&avnx[228] } ,
+ {20,"function" ,22,0.0,&avnx[229] } ,
+ {20,"gene" ,23,0.0,&avnx[230] } ,
+ {20,"gene-description" ,24,0.0,&avnx[231] } ,
+ {20,"inference" ,25,0.0,&avnx[232] } ,
+ {20,"label" ,26,0.0,&avnx[233] } ,
+ {20,"locus-tag" ,27,0.0,&avnx[234] } ,
+ {20,"map" ,28,0.0,&avnx[235] } ,
+ {20,"mobile-element" ,29,0.0,&avnx[236] } ,
+ {20,"mod-base" ,30,0.0,&avnx[237] } ,
+ {20,"mol-type" ,31,0.0,&avnx[238] } ,
+ {20,"ncRNA-class" ,32,0.0,&avnx[239] } ,
+ {20,"note" ,33,0.0,&avnx[240] } ,
+ {20,"number" ,34,0.0,&avnx[241] } ,
+ {20,"old-locus-tag" ,35,0.0,&avnx[242] } ,
+ {20,"operon" ,36,0.0,&avnx[243] } ,
+ {20,"organism" ,37,0.0,&avnx[244] } ,
+ {20,"organelle" ,38,0.0,&avnx[245] } ,
+ {20,"partial" ,39,0.0,&avnx[246] } ,
+ {20,"phenotype" ,40,0.0,&avnx[247] } ,
+ {20,"plasmid" ,41,0.0,&avnx[248] } ,
+ {20,"product" ,42,0.0,&avnx[249] } ,
+ {20,"protein-id" ,43,0.0,&avnx[250] } ,
+ {20,"pseudo" ,44,0.0,&avnx[251] } ,
+ {20,"rearranged" ,45,0.0,&avnx[252] } ,
+ {20,"replace" ,46,0.0,&avnx[253] } ,
+ {20,"rpt-family" ,47,0.0,&avnx[254] } ,
+ {20,"rpt-type" ,48,0.0,&avnx[255] } ,
+ {20,"rpt-unit" ,49,0.0,&avnx[256] } ,
+ {20,"rpt-unit-seq" ,50,0.0,&avnx[257] } ,
+ {20,"rpt-unit-range" ,51,0.0,&avnx[258] } ,
+ {20,"segment" ,52,0.0,&avnx[259] } ,
+ {20,"sequenced-mol" ,53,0.0,&avnx[260] } ,
+ {20,"standard-name" ,54,0.0,&avnx[261] } ,
+ {20,"synonym" ,55,0.0,&avnx[262] } ,
+ {20,"transcript-id" ,56,0.0,&avnx[263] } ,
+ {20,"transgenic" ,57,0.0,&avnx[264] } ,
+ {20,"translation" ,58,0.0,&avnx[265] } ,
+ {20,"transl-except" ,59,0.0,&avnx[266] } ,
+ {20,"transl-table" ,60,0.0,&avnx[267] } ,
+ {20,"usedin" ,61,0.0,NULL } ,
+ {3,NULL,1,0.0,NULL } ,
+ {20,"contains" ,1,0.0,&avnx[270] } ,
+ {20,"equals" ,2,0.0,&avnx[271] } ,
+ {20,"starts" ,3,0.0,&avnx[272] } ,
+ {20,"ends" ,4,0.0,&avnx[273] } ,
+ {20,"inlist" ,5,0.0,NULL } ,
+ {2,NULL,0,0.0,NULL } ,
+ {2,NULL,0,0.0,NULL } ,
+ {2,NULL,0,0.0,NULL } ,
+ {20,"cds-comment" ,1,0.0,&avnx[278] } ,
+ {20,"gene-locus" ,2,0.0,&avnx[279] } ,
+ {20,"gene-description" ,3,0.0,&avnx[280] } ,
+ {20,"gene-comment" ,4,0.0,&avnx[281] } ,
+ {20,"gene-allele" ,5,0.0,&avnx[282] } ,
+ {20,"gene-maploc" ,6,0.0,&avnx[283] } ,
+ {20,"gene-locus-tag" ,7,0.0,&avnx[284] } ,
+ {20,"gene-synonym" ,8,0.0,&avnx[285] } ,
+ {20,"gene-old-locus-tag" ,9,0.0,&avnx[286] } ,
+ {20,"mrna-product" ,10,0.0,&avnx[287] } ,
+ {20,"mrna-comment" ,11,0.0,&avnx[288] } ,
+ {20,"prot-name" ,12,0.0,&avnx[289] } ,
+ {20,"prot-description" ,13,0.0,&avnx[290] } ,
+ {20,"prot-ec-number" ,14,0.0,&avnx[291] } ,
+ {20,"prot-activity" ,15,0.0,&avnx[292] } ,
+ {20,"prot-comment" ,16,0.0,&avnx[293] } ,
+ {20,"mat-peptide-name" ,17,0.0,&avnx[294] } ,
+ {20,"mat-peptide-description" ,18,0.0,&avnx[295] } ,
+ {20,"mat-peptide-ec-number" ,19,0.0,&avnx[296] } ,
+ {20,"mat-peptide-activity" ,20,0.0,&avnx[297] } ,
+ {20,"mat-peptide-comment" ,21,0.0,NULL } ,
+ {20,"unknown" ,0,0.0,&avnx[299] } ,
+ {20,"genomic" ,1,0.0,&avnx[300] } ,
+ {20,"precursor-RNA" ,2,0.0,&avnx[301] } ,
+ {20,"mRNA" ,3,0.0,&avnx[302] } ,
+ {20,"rRNA" ,4,0.0,&avnx[303] } ,
+ {20,"tRNA" ,5,0.0,&avnx[304] } ,
+ {20,"snRNA" ,6,0.0,&avnx[305] } ,
+ {20,"scRNA" ,7,0.0,&avnx[306] } ,
+ {20,"genomic-mRNA" ,8,0.0,&avnx[307] } ,
+ {20,"cRNA" ,9,0.0,&avnx[308] } ,
+ {20,"snoRNA" ,10,0.0,&avnx[309] } ,
+ {20,"transcribed-RNA" ,11,0.0,&avnx[310] } ,
+ {20,"ncRNA" ,12,0.0,&avnx[311] } ,
+ {20,"transfer-messenger-RNA" ,13,0.0,&avnx[312] } ,
+ {20,"other" ,14,0.0,NULL } ,
+ {20,"unknown" ,0,0.0,&avnx[314] } ,
+ {20,"standard" ,1,0.0,&avnx[315] } ,
+ {20,"est" ,2,0.0,&avnx[316] } ,
+ {20,"sts" ,3,0.0,&avnx[317] } ,
+ {20,"survey" ,4,0.0,&avnx[318] } ,
+ {20,"genetic-map" ,5,0.0,&avnx[319] } ,
+ {20,"physical-map" ,6,0.0,&avnx[320] } ,
+ {20,"derived" ,7,0.0,&avnx[321] } ,
+ {20,"concept-trans" ,8,0.0,&avnx[322] } ,
+ {20,"seq-pept" ,9,0.0,&avnx[323] } ,
+ {20,"both" ,10,0.0,&avnx[324] } ,
+ {20,"seq-pept-overlap" ,11,0.0,&avnx[325] } ,
+ {20,"seq-pept-homol" ,12,0.0,&avnx[326] } ,
+ {20,"concept-trans-a" ,13,0.0,&avnx[327] } ,
+ {20,"htgs-1" ,14,0.0,&avnx[328] } ,
+ {20,"htgs-2" ,15,0.0,&avnx[329] } ,
+ {20,"htgs-3" ,16,0.0,&avnx[330] } ,
+ {20,"fli-cDNA" ,17,0.0,&avnx[331] } ,
+ {20,"htgs-0" ,18,0.0,&avnx[332] } ,
+ {20,"htc" ,19,0.0,&avnx[333] } ,
+ {20,"wgs" ,20,0.0,&avnx[334] } ,
+ {20,"barcode" ,21,0.0,&avnx[335] } ,
+ {20,"composite-wgs-htgs" ,22,0.0,&avnx[336] } ,
+ {20,"tsa" ,23,0.0,&avnx[337] } ,
+ {20,"other" ,24,0.0,NULL } ,
+ {20,"unknown" ,0,0.0,&avnx[339] } ,
+ {20,"complete" ,1,0.0,&avnx[340] } ,
+ {20,"partial" ,2,0.0,&avnx[341] } ,
+ {20,"no-left" ,3,0.0,&avnx[342] } ,
+ {20,"no-right" ,4,0.0,&avnx[343] } ,
+ {20,"no-ends" ,5,0.0,&avnx[344] } ,
+ {20,"has-left" ,6,0.0,&avnx[345] } ,
+ {20,"has-right" ,7,0.0,&avnx[346] } ,
+ {20,"other" ,6,0.0,NULL } ,
+ {20,"unknown" ,0,0.0,&avnx[348] } ,
+ {20,"dna" ,1,0.0,&avnx[349] } ,
+ {20,"rna" ,2,0.0,&avnx[350] } ,
+ {20,"protein" ,3,0.0,&avnx[351] } ,
+ {20,"nucleotide" ,4,0.0,&avnx[352] } ,
+ {20,"other" ,5,0.0,NULL } ,
+ {20,"unknown" ,0,0.0,&avnx[354] } ,
+ {20,"linear" ,1,0.0,&avnx[355] } ,
+ {20,"circular" ,2,0.0,&avnx[356] } ,
+ {20,"tandem" ,3,0.0,&avnx[357] } ,
+ {20,"other" ,4,0.0,NULL } ,
+ {20,"unknown" ,0,0.0,&avnx[359] } ,
+ {20,"single" ,1,0.0,&avnx[360] } ,
+ {20,"double" ,2,0.0,&avnx[361] } ,
+ {20,"mixed" ,3,0.0,&avnx[362] } ,
+ {20,"mixed-rev" ,4,0.0,&avnx[363] } ,
+ {20,"other" ,5,0.0,NULL } ,
+ {20,"replace-old" ,1,0.0,&avnx[365] } ,
+ {20,"append-semi" ,2,0.0,&avnx[366] } ,
+ {20,"append-space" ,3,0.0,&avnx[367] } ,
+ {20,"append-colon" ,4,0.0,&avnx[368] } ,
+ {20,"append-none" ,5,0.0,&avnx[369] } ,
+ {20,"prefix-semi" ,6,0.0,&avnx[370] } ,
+ {20,"prefix-space" ,7,0.0,&avnx[371] } ,
+ {20,"prefix-colon" ,8,0.0,&avnx[372] } ,
+ {20,"prefix-none" ,9,0.0,&avnx[373] } ,
+ {20,"leave-old" ,10,0.0,NULL } ,
+ {3,NULL,0,0.0,NULL } ,
+ {20,"anywhere" ,0,0.0,&avnx[376] } ,
+ {20,"beginning" ,1,0.0,&avnx[377] } ,
+ {20,"end" ,2,0.0,NULL } ,
+ {2,NULL,0,0.0,NULL } ,
+ {2,NULL,0,0.0,NULL } ,
+ {2,NULL,0,0.0,NULL } ,
+ {3,NULL,0,0.0,NULL } ,
+ {20,"any" ,0,0.0,&avnx[383] } ,
+ {20,"plus" ,1,0.0,&avnx[384] } ,
+ {20,"minus" ,2,0.0,NULL } ,
+ {3,NULL,0,0.0,NULL } ,
+ {20,"any" ,0,0.0,&avnx[387] } ,
+ {20,"nuc" ,1,0.0,&avnx[388] } ,
+ {20,"prot" ,2,0.0,NULL } ,
+ {20,"any" ,0,0.0,&avnx[390] } ,
+ {20,"feature" ,1,0.0,&avnx[391] } ,
+ {20,"descriptor" ,2,0.0,NULL } ,
+ {20,"gene" ,1,0.0,&avnx[393] } ,
+ {20,"mRNA" ,2,0.0,&avnx[394] } ,
+ {20,"cds" ,3,0.0,&avnx[395] } ,
+ {20,"prot" ,4,0.0,&avnx[396] } ,
+ {20,"exon" ,5,0.0,&avnx[397] } ,
+ {20,"mat-peptide" ,6,0.0,NULL } ,
+ {2,NULL,1,0.0,NULL } ,
+ {20,"any" ,0,0.0,&avnx[400] } ,
+ {20,"genomic" ,1,0.0,&avnx[401] } ,
+ {20,"precursor-RNA" ,2,0.0,&avnx[402] } ,
+ {20,"mRNA" ,3,0.0,&avnx[403] } ,
+ {20,"rRNA" ,4,0.0,&avnx[404] } ,
+ {20,"tRNA" ,5,0.0,&avnx[405] } ,
+ {20,"snRNA" ,6,0.0,&avnx[406] } ,
+ {20,"scRNA" ,7,0.0,&avnx[407] } ,
+ {20,"genomic-mRNA" ,8,0.0,&avnx[408] } ,
+ {20,"cRNA" ,9,0.0,&avnx[409] } ,
+ {20,"snoRNA" ,10,0.0,&avnx[410] } ,
+ {20,"transcribed-RNA" ,11,0.0,&avnx[411] } ,
+ {20,"ncRNA" ,12,0.0,&avnx[412] } ,
+ {20,"transfer-messenger-RNA" ,13,0.0,NULL } ,
+ {3,NULL,0,0.0,NULL } ,
+ {3,NULL,0,0.0,NULL } ,
+ {3,NULL,0,0.0,NULL } ,
+ {20,"none" ,0,0.0,&avnx[417] } ,
+ {20,"tolower" ,1,0.0,&avnx[418] } ,
+ {20,"toupper" ,2,0.0,&avnx[419] } ,
+ {20,"firstcap" ,3,0.0,NULL } ,
+ {2,NULL,0,0.0,NULL } ,
+ {2,NULL,0,0.0,NULL } ,
+ {2,NULL,0,0.0,NULL } ,
+ {2,NULL,1,0.0,NULL } ,
+ {2,NULL,1,0.0,NULL } ,
+ {2,NULL,0,0.0,NULL } ,
+ {2,NULL,0,0.0,NULL } ,
+ {3,NULL,-1,0.0,NULL } ,
+ {20,"any" ,0,0.0,&avnx[429] } ,
+ {20,"plus" ,1,0.0,&avnx[430] } ,
+ {20,"minus" ,2,0.0,&avnx[431] } ,
+ {20,"unknown" ,3,0.0,&avnx[432] } ,
+ {20,"both" ,4,0.0,NULL } ,
+ {20,"plus" ,1,0.0,&avnx[434] } ,
+ {20,"minus" ,2,0.0,&avnx[435] } ,
+ {20,"unknown" ,3,0.0,&avnx[436] } ,
+ {20,"both" ,4,0.0,&avnx[437] } ,
+ {20,"reverse" ,5,0.0,NULL } ,
+ {20,"all" ,0,0.0,&avnx[439] } ,
+ {20,"at-end" ,1,0.0,&avnx[440] } ,
+ {20,"bad-start" ,2,0.0,&avnx[441] } ,
+ {20,"frame-not-one" ,3,0.0,NULL } ,
+ {20,"all" ,0,0.0,&avnx[443] } ,
+ {20,"not-at-end" ,1,0.0,&avnx[444] } ,
+ {20,"good-start" ,2,0.0,NULL } ,
+ {20,"all" ,0,0.0,&avnx[446] } ,
+ {20,"at-end" ,1,0.0,&avnx[447] } ,
+ {20,"bad-end" ,2,0.0,NULL } ,
+ {20,"all" ,0,0.0,&avnx[449] } ,
+ {20,"not-at-end" ,1,0.0,&avnx[450] } ,
+ {20,"good-end" ,2,0.0,NULL } ,
+ {20,"join" ,1,0.0,&avnx[452] } ,
+ {20,"order" ,2,0.0,&avnx[453] } ,
+ {20,"merge" ,3,0.0,NULL } };
+
+static AsnType atx[280] = {
+ {401, "AECR-action" ,1,0,0,0,0,1,0,0,NULL,&atx[35],&atx[1],0,&atx[177]} ,
+ {0, "action" ,128,0,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[133]} ,
+ {463, "Action-choice" ,1,0,0,0,0,0,0,0,NULL,&atx[16],&atx[3],0,&atx[208]} ,
+ {0, "apply" ,128,0,0,0,0,0,0,0,NULL,&atx[4],NULL,0,&atx[55]} ,
+ {456, "Apply-action" ,1,0,0,0,0,0,0,0,NULL,&atx[35],&atx[5],0,&atx[56]} ,
+ {0, "field" ,128,0,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[52]} ,
+ {453, "Field-type" ,1,0,0,0,0,0,0,0,NULL,&atx[16],&atx[7],0,&atx[67]} ,
+ {0, "source-qual" ,128,0,0,0,0,0,0,0,NULL,&atx[8],NULL,0,&atx[17]} ,
+ {423, "Source-qual-choice" ,1,0,0,0,0,0,0,0,NULL,&atx[16],&atx[9],0,&atx[37]} ,
+ {0, "textqual" ,128,0,0,0,0,0,0,0,NULL,&atx[10],NULL,0,&atx[12]} ,
+ {419, "Source-qual" ,1,0,0,0,0,0,0,0,NULL,&atx[11],&avnx[0],0,&atx[69]} ,
+ {310, "ENUMERATED" ,0,10,0,0,0,0,0,0,NULL,NULL,NULL,0,NULL} ,
+ {0, "location" ,128,1,0,0,0,0,0,0,NULL,&atx[13],NULL,0,&atx[14]} ,
+ {421, "Source-location" ,1,0,0,0,0,0,0,0,NULL,&atx[11],&avnx[81],0,&atx[15]} ,
+ {0, "origin" ,128,2,0,0,0,0,0,0,NULL,&atx[15],NULL,0,NULL} ,
+ {422, "Source-origin" ,1,0,0,0,0,0,0,0,NULL,&atx[11],&avnx[104],0,&atx[8]} ,
+ {315, "CHOICE" ,0,-1,0,0,0,0,0,0,NULL,NULL,NULL,0,NULL} ,
+ {0, "feature-field" ,128,1,0,0,0,0,0,0,NULL,&atx[18],NULL,0,&atx[36]} ,
+ {416, "Feature-field" ,1,0,0,0,0,0,0,0,NULL,&atx[35],&atx[19],0,&atx[203]} ,
+ {0, "type" ,128,0,0,0,0,0,0,0,NULL,&atx[20],NULL,0,&atx[21]} ,
+ {410, "Feature-type" ,1,0,0,0,0,0,0,0,NULL,&atx[11],&avnx[111],0,&atx[24]} ,
+ {0, "field" ,128,1,0,0,0,0,0,0,NULL,&atx[22],NULL,0,NULL} ,
+ {415, "Feat-qual-choice" ,1,0,0,0,0,0,0,0,NULL,&atx[16],&atx[23],0,&atx[18]} ,
+ {0, "legal-qual" ,128,0,0,0,0,0,0,0,NULL,&atx[24],NULL,0,&atx[25]} ,
+ {411, "Feat-qual-legal" ,1,0,0,0,0,0,0,0,NULL,&atx[11],&avnx[207],0,&atx[245]} ,
+ {0, "illegal-qual" ,128,1,0,0,0,0,0,0,NULL,&atx[26],NULL,0,NULL} ,
+ {405, "String-constraint" ,1,0,0,0,0,0,0,0,NULL,&atx[35],&atx[27],0,&atx[141]} ,
+ {0, "match-text" ,128,0,0,0,0,0,0,0,NULL,&atx[28],NULL,0,&atx[29]} ,
+ {323, "VisibleString" ,0,26,0,0,0,0,0,0,NULL,NULL,NULL,0,NULL} ,
+ {0, "match-location" ,128,1,0,0,1,0,0,0,&avnx[268],&atx[30],NULL,0,&atx[31]} ,
+ {404, "String-location" ,1,0,0,0,0,0,0,0,NULL,&atx[11],&avnx[269],0,&atx[26]} ,
+ {0, "case-sensitive" ,128,2,0,0,1,0,0,0,&avnx[274],&atx[32],NULL,0,&atx[33]} ,
+ {301, "BOOLEAN" ,0,1,0,0,0,0,0,0,NULL,NULL,NULL,0,NULL} ,
+ {0, "whole-word" ,128,3,0,0,1,0,0,0,&avnx[275],&atx[32],NULL,0,&atx[34]} ,
+ {0, "not-present" ,128,4,0,0,1,0,0,0,&avnx[276],&atx[32],NULL,0,NULL} ,
+ {311, "SEQUENCE" ,0,16,0,0,0,0,0,0,NULL,NULL,NULL,0,NULL} ,
+ {0, "cds-gene-prot" ,128,2,0,0,0,0,0,0,NULL,&atx[37],NULL,0,&atx[38]} ,
+ {424, "CDSGeneProt-field" ,1,0,0,0,0,0,0,0,NULL,&atx[11],&avnx[277],0,&atx[78]} ,
+ {0, "molinfo-field" ,128,3,0,0,0,0,0,0,NULL,&atx[39],NULL,0,NULL} ,
+ {432, "Molinfo-field" ,1,0,0,0,0,0,0,0,NULL,&atx[16],&atx[40],0,&atx[84]} ,
+ {0, "molecule" ,128,0,0,0,0,0,0,0,NULL,&atx[41],NULL,0,&atx[42]} ,
+ {426, "Molecule-type" ,1,0,0,0,0,0,0,0,NULL,&atx[11],&avnx[298],0,&atx[43]} ,
+ {0, "technique" ,128,1,0,0,0,0,0,0,NULL,&atx[43],NULL,0,&atx[44]} ,
+ {427, "Technique-type" ,1,0,0,0,0,0,0,0,NULL,&atx[11],&avnx[313],0,&atx[45]} ,
+ {0, "completedness" ,128,2,0,0,0,0,0,0,NULL,&atx[45],NULL,0,&atx[46]} ,
+ {428, "Completedness-type" ,1,0,0,0,0,0,0,0,NULL,&atx[11],&avnx[338],0,&atx[47]} ,
+ {0, "mol-class" ,128,3,0,0,0,0,0,0,NULL,&atx[47],NULL,0,&atx[48]} ,
+ {429, "Molecule-class-type" ,1,0,0,0,0,0,0,0,NULL,&atx[11],&avnx[347],0,&atx[49]} ,
+ {0, "topology" ,128,4,0,0,0,0,0,0,NULL,&atx[49],NULL,0,&atx[50]} ,
+ {430, "Topology-type" ,1,0,0,0,0,0,0,0,NULL,&atx[11],&avnx[353],0,&atx[51]} ,
+ {0, "strand" ,128,5,0,0,0,0,0,0,NULL,&atx[51],NULL,0,NULL} ,
+ {431, "Strand-type" ,1,0,0,0,0,0,0,0,NULL,&atx[11],&avnx[358],0,&atx[39]} ,
+ {0, "value" ,128,1,0,0,0,0,0,0,NULL,&atx[28],NULL,0,&atx[53]} ,
+ {0, "existing-text" ,128,2,0,0,0,0,0,0,NULL,&atx[54],NULL,0,NULL} ,
+ {455, "ExistingTextOption" ,1,0,0,0,0,0,0,0,NULL,&atx[11],&avnx[364],0,&atx[4]} ,
+ {0, "edit" ,128,1,0,0,0,0,0,0,NULL,&atx[56],NULL,0,&atx[64]} ,
+ {457, "Edit-action" ,1,0,0,0,0,0,0,0,NULL,&atx[35],&atx[57],0,&atx[65]} ,
+ {0, "edit" ,128,0,0,0,0,0,0,0,NULL,&atx[58],NULL,0,&atx[63]} ,
+ {452, "Field-edit" ,1,0,0,0,0,0,0,0,NULL,&atx[35],&atx[59],0,&atx[6]} ,
+ {0, "find-txt" ,128,0,0,0,0,0,0,0,NULL,&atx[28],NULL,0,&atx[60]} ,
+ {0, "repl-txt" ,128,1,0,1,0,0,0,0,NULL,&atx[28],NULL,0,&atx[61]} ,
+ {0, "location" ,128,2,0,0,1,0,0,0,&avnx[374],&atx[62],NULL,0,NULL} ,
+ {451, "Field-edit-location" ,1,0,0,0,0,0,0,0,NULL,&atx[11],&avnx[375],0,&atx[58]} ,
+ {0, "field" ,128,1,0,0,0,0,0,0,NULL,&atx[6],NULL,0,NULL} ,
+ {0, "convert" ,128,2,0,0,0,0,0,0,NULL,&atx[65],NULL,0,&atx[108]} ,
+ {458, "Convert-action" ,1,0,0,0,0,0,0,0,NULL,&atx[35],&atx[66],0,&atx[109]} ,
+ {0, "fields" ,128,0,0,0,0,0,0,0,NULL,&atx[67],NULL,0,&atx[107]} ,
+ {454, "Field-pair-type" ,1,0,0,0,0,0,0,0,NULL,&atx[16],&atx[68],0,&atx[54]} ,
+ {0, "source-qual" ,128,0,0,0,0,0,0,0,NULL,&atx[69],NULL,0,&atx[72]} ,
+ {420, "Source-qual-pair" ,1,0,0,0,0,0,0,0,NULL,&atx[35],&atx[70],0,&atx[13]} ,
+ {0, "field-from" ,128,0,0,0,0,0,0,0,NULL,&atx[10],NULL,0,&atx[71]} ,
+ {0, "field-to" ,128,1,0,0,0,0,0,0,NULL,&atx[10],NULL,0,NULL} ,
+ {0, "feature-field" ,128,1,0,0,0,0,0,0,NULL,&atx[73],NULL,0,&atx[77]} ,
+ {418, "Feature-field-pair" ,1,0,0,0,0,0,0,0,NULL,&atx[35],&atx[74],0,&atx[10]} ,
+ {0, "type" ,128,0,0,0,0,0,0,0,NULL,&atx[20],NULL,0,&atx[75]} ,
+ {0, "field-from" ,128,1,0,0,0,0,0,0,NULL,&atx[22],NULL,0,&atx[76]} ,
+ {0, "field-to" ,128,2,0,0,0,0,0,0,NULL,&atx[22],NULL,0,NULL} ,
+ {0, "cds-gene-prot" ,128,2,0,0,0,0,0,0,NULL,&atx[78],NULL,0,&atx[81]} ,
+ {425, "CDSGeneProt-field-pair" ,1,0,0,0,0,0,0,0,NULL,&atx[35],&atx[79],0,&atx[41]} ,
+ {0, "field-from" ,128,0,0,0,0,0,0,0,NULL,&atx[37],NULL,0,&atx[80]} ,
+ {0, "field-to" ,128,1,0,0,0,0,0,0,NULL,&atx[37],NULL,0,NULL} ,
+ {0, "molinfo-field" ,128,3,0,0,0,0,0,0,NULL,&atx[82],NULL,0,NULL} ,
+ {439, "Molinfo-field-pair" ,1,0,0,0,0,0,0,0,NULL,&atx[16],&atx[83],0,&atx[145]} ,
+ {0, "molecule" ,128,0,0,0,0,0,0,0,NULL,&atx[84],NULL,0,&atx[87]} ,
+ {433, "Molinfo-molecule-pair" ,1,0,0,0,0,0,0,0,NULL,&atx[35],&atx[85],0,&atx[88]} ,
+ {0, "from" ,128,0,0,0,0,0,0,0,NULL,&atx[41],NULL,0,&atx[86]} ,
+ {0, "to" ,128,1,0,0,0,0,0,0,NULL,&atx[41],NULL,0,NULL} ,
+ {0, "technique" ,128,1,0,0,0,0,0,0,NULL,&atx[88],NULL,0,&atx[91]} ,
+ {434, "Molinfo-technique-pair" ,1,0,0,0,0,0,0,0,NULL,&atx[35],&atx[89],0,&atx[92]} ,
+ {0, "from" ,128,0,0,0,0,0,0,0,NULL,&atx[43],NULL,0,&atx[90]} ,
+ {0, "to" ,128,1,0,0,0,0,0,0,NULL,&atx[43],NULL,0,NULL} ,
+ {0, "completedness" ,128,2,0,0,0,0,0,0,NULL,&atx[92],NULL,0,&atx[95]} ,
+ {435, "Molinfo-completedness-pair" ,1,0,0,0,0,0,0,0,NULL,&atx[35],&atx[93],0,&atx[96]} ,
+ {0, "from" ,128,0,0,0,0,0,0,0,NULL,&atx[45],NULL,0,&atx[94]} ,
+ {0, "to" ,128,1,0,0,0,0,0,0,NULL,&atx[45],NULL,0,NULL} ,
+ {0, "mol-class" ,128,3,0,0,0,0,0,0,NULL,&atx[96],NULL,0,&atx[99]} ,
+ {436, "Molinfo-mol-class-pair" ,1,0,0,0,0,0,0,0,NULL,&atx[35],&atx[97],0,&atx[100]} ,
+ {0, "from" ,128,0,0,0,0,0,0,0,NULL,&atx[47],NULL,0,&atx[98]} ,
+ {0, "to" ,128,1,0,0,0,0,0,0,NULL,&atx[47],NULL,0,NULL} ,
+ {0, "topology" ,128,4,0,0,0,0,0,0,NULL,&atx[100],NULL,0,&atx[103]} ,
+ {437, "Molinfo-topology-pair" ,1,0,0,0,0,0,0,0,NULL,&atx[35],&atx[101],0,&atx[104]} ,
+ {0, "from" ,128,0,0,0,0,0,0,0,NULL,&atx[49],NULL,0,&atx[102]} ,
+ {0, "to" ,128,1,0,0,0,0,0,0,NULL,&atx[49],NULL,0,NULL} ,
+ {0, "strand" ,128,5,0,0,0,0,0,0,NULL,&atx[104],NULL,0,NULL} ,
+ {438, "Molinfo-strand-pair" ,1,0,0,0,0,0,0,0,NULL,&atx[35],&atx[105],0,&atx[82]} ,
+ {0, "from" ,128,0,0,0,0,0,0,0,NULL,&atx[51],NULL,0,&atx[106]} ,
+ {0, "to" ,128,1,0,0,0,0,0,0,NULL,&atx[51],NULL,0,NULL} ,
+ {0, "existing-text" ,128,1,0,0,0,0,0,0,NULL,&atx[54],NULL,0,NULL} ,
+ {0, "copy" ,128,3,0,0,0,0,0,0,NULL,&atx[109],NULL,0,&atx[112]} ,
+ {459, "Copy-action" ,1,0,0,0,0,0,0,0,NULL,&atx[35],&atx[110],0,&atx[113]} ,
+ {0, "fields" ,128,0,0,0,0,0,0,0,NULL,&atx[67],NULL,0,&atx[111]} ,
+ {0, "existing-text" ,128,1,0,0,0,0,0,0,NULL,&atx[54],NULL,0,NULL} ,
+ {0, "swap" ,128,4,0,0,0,0,0,0,NULL,&atx[113],NULL,0,&atx[116]} ,
+ {460, "Swap-action" ,1,0,0,0,0,0,0,0,NULL,&atx[35],&atx[114],0,&atx[120]} ,
+ {0, "fields" ,128,0,0,0,0,0,0,0,NULL,&atx[67],NULL,0,&atx[115]} ,
+ {0, "field-to" ,128,1,0,0,0,0,0,0,NULL,&atx[6],NULL,0,NULL} ,
+ {0, "remove" ,128,5,0,0,0,0,0,0,NULL,&atx[117],NULL,0,&atx[119]} ,
+ {462, "Remove-action" ,1,0,0,0,0,0,0,0,NULL,&atx[35],&atx[118],0,&atx[2]} ,
+ {0, "field" ,128,0,0,0,0,0,0,0,NULL,&atx[6],NULL,0,NULL} ,
+ {0, "parse" ,128,6,0,0,0,0,0,0,NULL,&atx[120],NULL,0,NULL} ,
+ {461, "AECRParse-action" ,1,0,0,0,0,0,0,0,NULL,&atx[35],&atx[121],0,&atx[117]} ,
+ {0, "portion" ,128,0,0,0,0,0,0,0,NULL,&atx[122],NULL,0,&atx[130]} ,
+ {450, "Text-portion" ,1,0,0,0,0,0,0,0,NULL,&atx[35],&atx[123],0,&atx[62]} ,
+ {0, "left-text" ,128,0,0,1,0,0,0,0,NULL,&atx[28],NULL,0,&atx[124]} ,
+ {0, "include-left" ,128,1,0,0,0,0,0,0,NULL,&atx[32],NULL,0,&atx[125]} ,
+ {0, "right-text" ,128,2,0,1,0,0,0,0,NULL,&atx[28],NULL,0,&atx[126]} ,
+ {0, "include-right" ,128,3,0,0,0,0,0,0,NULL,&atx[32],NULL,0,&atx[127]} ,
+ {0, "inside" ,128,4,0,0,0,0,0,0,NULL,&atx[32],NULL,0,&atx[128]} ,
+ {0, "case-sensitive" ,128,5,0,0,1,0,0,0,&avnx[378],&atx[32],NULL,0,&atx[129]} ,
+ {0, "whole-word" ,128,6,0,0,1,0,0,0,&avnx[379],&atx[32],NULL,0,NULL} ,
+ {0, "fields" ,128,1,0,0,0,0,0,0,NULL,&atx[67],NULL,0,&atx[131]} ,
+ {0, "remove-from-parsed" ,128,2,0,0,1,0,0,0,&avnx[380],&atx[32],NULL,0,&atx[132]} ,
+ {0, "existing-text" ,128,3,0,0,0,0,0,0,NULL,&atx[54],NULL,0,NULL} ,
+ {0, "constraint" ,128,1,0,1,0,0,0,0,NULL,&atx[134],NULL,0,NULL} ,
+ {449, "Constraint-choice-set" ,1,0,0,0,0,0,0,0,NULL,&atx[176],&atx[135],0,&atx[122]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[136],NULL,0,NULL} ,
+ {448, "Constraint-choice" ,1,0,0,0,0,0,0,0,NULL,&atx[16],&atx[137],0,&atx[134]} ,
+ {0, "string" ,128,0,0,0,0,0,0,0,NULL,&atx[26],NULL,0,&atx[138]} ,
+ {0, "location" ,128,1,0,0,0,0,0,0,NULL,&atx[139],NULL,0,&atx[144]} ,
+ {408, "Location-constraint" ,1,0,0,0,0,0,0,0,NULL,&atx[35],&atx[140],0,&atx[150]} ,
+ {0, "strand" ,128,0,0,0,1,0,0,0,&avnx[381],&atx[141],NULL,0,&atx[142]} ,
+ {406, "Strand-constraint" ,1,0,0,0,0,0,0,0,NULL,&atx[11],&avnx[382],0,&atx[143]} ,
+ {0, "seq-type" ,128,1,0,0,1,0,0,0,&avnx[385],&atx[143],NULL,0,NULL} ,
+ {407, "Seqtype-constraint" ,1,0,0,0,0,0,0,0,NULL,&atx[11],&avnx[386],0,&atx[139]} ,
+ {0, "source" ,128,2,0,0,0,0,0,0,NULL,&atx[145],NULL,0,&atx[151]} ,
+ {440, "Source-constraint" ,1,0,0,0,0,0,0,0,NULL,&atx[35],&atx[146],0,&atx[161]} ,
+ {0, "field1" ,128,0,0,1,0,0,0,0,NULL,&atx[8],NULL,0,&atx[147]} ,
+ {0, "field2" ,128,1,0,1,0,0,0,0,NULL,&atx[8],NULL,0,&atx[148]} ,
+ {0, "constraint" ,128,2,0,1,0,0,0,0,NULL,&atx[26],NULL,0,&atx[149]} ,
+ {0, "type-constraint" ,128,3,0,1,0,0,0,0,NULL,&atx[150],NULL,0,NULL} ,
+ {409, "Object-type-constraint" ,1,0,0,0,0,0,0,0,NULL,&atx[11],&avnx[389],0,&atx[20]} ,
+ {0, "cdsgeneprot-qual" ,128,3,0,0,0,0,0,0,NULL,&atx[152],NULL,0,&atx[158]} ,
+ {444, "CDSGeneProt-qual-constraint" ,1,0,0,0,0,0,0,0,NULL,&atx[35],&atx[153],0,&atx[172]} ,
+ {0, "field1" ,128,0,0,1,0,0,0,0,NULL,&atx[154],NULL,0,&atx[156]} ,
+ {443, "CDSGeneProt-constraint-field" ,1,0,0,0,0,0,0,0,NULL,&atx[16],&atx[155],0,&atx[152]} ,
+ {0, "field" ,128,0,0,0,0,0,0,0,NULL,&atx[37],NULL,0,NULL} ,
+ {0, "field2" ,128,1,0,1,0,0,0,0,NULL,&atx[154],NULL,0,&atx[157]} ,
+ {0, "constraint" ,128,2,0,1,0,0,0,0,NULL,&atx[26],NULL,0,NULL} ,
+ {0, "cdsgeneprot-pseudo" ,128,4,0,0,0,0,0,0,NULL,&atx[159],NULL,0,&atx[163]} ,
+ {442, "CDSGeneProt-pseudo-constraint" ,1,0,0,0,0,0,0,0,NULL,&atx[35],&atx[160],0,&atx[154]} ,
+ {0, "feature" ,128,0,0,0,0,0,0,0,NULL,&atx[161],NULL,0,&atx[162]} ,
+ {441, "CDSGeneProt-feature-type-constraint" ,1,0,0,0,0,0,0,0,NULL,&atx[11],&avnx[392],0,&atx[159]} ,
+ {0, "is-pseudo" ,128,1,0,0,1,0,0,0,&avnx[398],&atx[32],NULL,0,NULL} ,
+ {0, "sequence" ,128,5,0,0,0,0,0,0,NULL,&atx[164],NULL,0,NULL} ,
+ {447, "Sequence-constraint" ,1,0,0,0,0,0,0,0,NULL,&atx[35],&atx[165],0,&atx[136]} ,
+ {0, "seqtype" ,128,0,0,1,0,0,0,0,NULL,&atx[166],NULL,0,&atx[174]} ,
+ {446, "Sequence-constraint-mol-type-constraint" ,1,0,0,0,0,0,0,0,NULL,&atx[16],&atx[167],0,&atx[164]} ,
+ {0, "any" ,128,0,0,0,0,0,0,0,NULL,&atx[168],NULL,0,&atx[169]} ,
+ {305, "NULL" ,0,5,0,0,0,0,0,0,NULL,NULL,NULL,0,NULL} ,
+ {0, "nucleotide" ,128,1,0,0,0,0,0,0,NULL,&atx[168],NULL,0,&atx[170]} ,
+ {0, "dna" ,128,2,0,0,0,0,0,0,NULL,&atx[168],NULL,0,&atx[171]} ,
+ {0, "rna" ,128,3,0,0,0,0,0,0,NULL,&atx[172],NULL,0,&atx[173]} ,
+ {445, "Sequence-constraint-rnamol" ,1,0,0,0,0,0,0,0,NULL,&atx[11],&avnx[399],0,&atx[166]} ,
+ {0, "protein" ,128,4,0,0,0,0,0,0,NULL,&atx[168],NULL,0,NULL} ,
+ {0, "id" ,128,1,0,1,0,0,0,0,NULL,&atx[26],NULL,0,&atx[175]} ,
+ {0, "feature" ,128,2,0,0,0,0,0,0,NULL,&atx[20],NULL,0,NULL} ,
+ {314, "SET OF" ,0,17,0,0,0,0,0,0,NULL,NULL,NULL,0,NULL} ,
+ {402, "Parse-action" ,1,0,0,0,0,1,0,0,NULL,&atx[35],&atx[178],0,&atx[211]} ,
+ {0, "portion" ,128,0,0,0,0,0,0,0,NULL,&atx[122],NULL,0,&atx[179]} ,
+ {0, "src" ,128,1,0,0,0,0,0,0,NULL,&atx[180],NULL,0,&atx[195]} ,
+ {467, "Parse-src" ,1,0,0,0,0,0,0,0,NULL,&atx[16],&atx[181],0,&atx[199]} ,
+ {0, "defline" ,128,0,0,0,0,0,0,0,NULL,&atx[168],NULL,0,&atx[182]} ,
+ {0, "flatfile" ,128,1,0,0,0,0,0,0,NULL,&atx[168],NULL,0,&atx[183]} ,
+ {0, "local-id" ,128,2,0,0,0,0,0,0,NULL,&atx[168],NULL,0,&atx[184]} ,
+ {0, "org" ,128,3,0,0,0,0,0,0,NULL,&atx[185],NULL,0,&atx[191]} ,
+ {466, "Parse-src-org" ,1,0,0,0,0,0,0,0,NULL,&atx[35],&atx[186],0,&atx[180]} ,
+ {0, "field" ,128,0,0,0,0,0,0,0,NULL,&atx[187],NULL,0,&atx[190]} ,
+ {465, "Parse-src-org-choice" ,1,0,0,0,0,0,0,0,NULL,&atx[16],&atx[188],0,&atx[185]} ,
+ {0, "source-qual" ,128,0,0,0,0,0,0,0,NULL,&atx[10],NULL,0,&atx[189]} ,
+ {0, "taxname-after-binomial" ,128,1,0,0,0,0,0,0,NULL,&atx[168],NULL,0,NULL} ,
+ {0, "type" ,128,1,0,0,1,0,0,0,&avnx[413],&atx[150],NULL,0,NULL} ,
+ {0, "comment" ,128,4,0,0,0,0,0,0,NULL,&atx[168],NULL,0,&atx[192]} ,
+ {0, "bankit-comment" ,128,5,0,0,0,0,0,0,NULL,&atx[168],NULL,0,&atx[193]} ,
+ {0, "structured-comment" ,128,6,0,0,0,0,0,0,NULL,&atx[28],NULL,0,&atx[194]} ,
+ {0, "file-id" ,128,7,0,0,0,0,0,0,NULL,&atx[168],NULL,0,NULL} ,
+ {0, "dest" ,128,2,0,0,0,0,0,0,NULL,&atx[196],NULL,0,&atx[207]} ,
+ {469, "Parse-dest" ,1,0,0,0,0,0,0,0,NULL,&atx[16],&atx[197],0,&atx[225]} ,
+ {0, "defline" ,128,0,0,0,0,0,0,0,NULL,&atx[168],NULL,0,&atx[198]} ,
+ {0, "org" ,128,1,0,0,0,0,0,0,NULL,&atx[199],NULL,0,&atx[202]} ,
+ {468, "Parse-dst-org" ,1,0,0,0,0,0,0,0,NULL,&atx[35],&atx[200],0,&atx[196]} ,
+ {0, "field" ,128,0,0,0,0,0,0,0,NULL,&atx[8],NULL,0,&atx[201]} ,
+ {0, "type" ,128,1,0,0,1,0,0,0,&avnx[414],&atx[150],NULL,0,NULL} ,
+ {0, "featqual" ,128,2,0,0,0,0,0,0,NULL,&atx[203],NULL,0,&atx[206]} ,
+ {417, "Feature-field-legal" ,1,0,0,0,0,0,0,0,NULL,&atx[35],&atx[204],0,&atx[73]} ,
+ {0, "type" ,128,0,0,0,0,0,0,0,NULL,&atx[20],NULL,0,&atx[205]} ,
+ {0, "field" ,128,1,0,0,0,0,0,0,NULL,&atx[24],NULL,0,NULL} ,
+ {0, "dbxref" ,128,3,0,0,0,0,0,0,NULL,&atx[28],NULL,0,NULL} ,
+ {0, "capitalization" ,128,3,0,0,1,0,0,0,&avnx[415],&atx[208],NULL,0,&atx[209]} ,
+ {464, "Cap-change" ,1,0,0,0,0,0,0,0,NULL,&atx[11],&avnx[416],0,&atx[187]} ,
+ {0, "remove-from-parsed" ,128,4,0,0,1,0,0,0,&avnx[420],&atx[32],NULL,0,&atx[210]} ,
+ {0, "existing-text" ,128,5,0,0,0,0,0,0,NULL,&atx[54],NULL,0,NULL} ,
+ {403, "Macro-action-list" ,1,0,0,0,0,1,0,0,NULL,&atx[176],&atx[212],0,&atx[30]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[213],NULL,0,NULL} ,
+ {488, "Macro-action-choice" ,1,0,0,0,0,0,0,0,NULL,&atx[16],&atx[214],0,NULL} ,
+ {0, "aecr" ,128,0,0,0,0,0,0,0,NULL,&atx[0],NULL,0,&atx[215]} ,
+ {0, "parse" ,128,1,0,0,0,0,0,0,NULL,&atx[177],NULL,0,&atx[216]} ,
+ {0, "add-feature" ,128,2,0,0,0,0,0,0,NULL,&atx[217],NULL,0,&atx[248]} ,
+ {474, "Apply-feature-action" ,1,0,0,0,0,0,0,0,NULL,&atx[35],&atx[218],0,&atx[249]} ,
+ {0, "type" ,128,0,0,0,0,0,0,0,NULL,&atx[20],NULL,0,&atx[219]} ,
+ {0, "partial5" ,128,1,0,0,1,0,0,0,&avnx[421],&atx[32],NULL,0,&atx[220]} ,
+ {0, "partial3" ,128,2,0,0,1,0,0,0,&avnx[422],&atx[32],NULL,0,&atx[221]} ,
+ {0, "plus-strand" ,128,3,0,0,1,0,0,0,&avnx[423],&atx[32],NULL,0,&atx[222]} ,
+ {0, "location" ,128,4,0,0,0,0,0,0,NULL,&atx[223],NULL,0,&atx[230]} ,
+ {471, "Location-choice" ,1,0,0,0,0,0,0,0,NULL,&atx[16],&atx[224],0,&atx[233]} ,
+ {0, "interval" ,128,0,0,0,0,0,0,0,NULL,&atx[225],NULL,0,&atx[229]} ,
+ {470, "Location-interval" ,1,0,0,0,0,0,0,0,NULL,&atx[35],&atx[226],0,&atx[223]} ,
+ {0, "from" ,128,0,0,0,0,0,0,0,NULL,&atx[227],NULL,0,&atx[228]} ,
+ {302, "INTEGER" ,0,2,0,0,0,0,0,0,NULL,NULL,NULL,0,NULL} ,
+ {0, "to" ,128,1,0,0,0,0,0,0,NULL,&atx[227],NULL,0,NULL} ,
+ {0, "whole-sequence" ,128,1,0,0,0,0,0,0,NULL,&atx[168],NULL,0,NULL} ,
+ {0, "seq-list" ,128,5,0,0,0,0,0,0,NULL,&atx[231],NULL,0,&atx[236]} ,
+ {473, "Sequence-list-choice" ,1,0,0,0,0,0,0,0,NULL,&atx[16],&atx[232],0,&atx[217]} ,
+ {0, "list" ,128,0,0,0,0,0,0,0,NULL,&atx[233],NULL,0,&atx[235]} ,
+ {472, "Sequence-list" ,1,0,0,0,0,0,0,0,NULL,&atx[176],&atx[234],0,&atx[231]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[28],NULL,0,NULL} ,
+ {0, "all" ,128,1,0,0,0,0,0,0,NULL,&atx[168],NULL,0,NULL} ,
+ {0, "add-redundant" ,128,6,0,0,1,0,0,0,&avnx[424],&atx[32],NULL,0,&atx[237]} ,
+ {0, "add-mrna" ,128,7,0,0,1,0,0,0,&avnx[425],&atx[32],NULL,0,&atx[238]} ,
+ {0, "apply-to-parts" ,128,8,0,0,1,0,0,0,&avnx[426],&atx[32],NULL,0,&atx[239]} ,
+ {0, "only-seg-num" ,128,9,0,0,1,0,0,0,&avnx[427],&atx[227],NULL,0,&atx[240]} ,
+ {0, "fields" ,128,10,0,1,0,0,0,0,NULL,&atx[241],NULL,0,NULL} ,
+ {414, "Feat-qual-legal-set" ,1,0,0,0,0,0,0,0,NULL,&atx[176],&atx[242],0,&atx[22]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[243],NULL,0,NULL} ,
+ {413, "Feat-qual-legal-val-choice" ,1,0,0,0,0,0,0,0,NULL,&atx[16],&atx[244],0,&atx[241]} ,
+ {0, "qual" ,128,0,0,0,0,0,0,0,NULL,&atx[245],NULL,0,NULL} ,
+ {412, "Feat-qual-legal-val" ,1,0,0,0,0,0,0,0,NULL,&atx[35],&atx[246],0,&atx[243]} ,
+ {0, "qual" ,128,0,0,0,0,0,0,0,NULL,&atx[24],NULL,0,&atx[247]} ,
+ {0, "val" ,128,1,0,0,0,0,0,0,NULL,&atx[28],NULL,0,NULL} ,
+ {0, "remove-feature" ,128,3,0,0,0,0,0,0,NULL,&atx[249],NULL,0,&atx[252]} ,
+ {475, "Remove-feature-action" ,1,0,0,0,0,0,0,0,NULL,&atx[35],&atx[250],0,&atx[260]} ,
+ {0, "type" ,128,0,0,0,0,0,0,0,NULL,&atx[20],NULL,0,&atx[251]} ,
+ {0, "constraint" ,128,1,0,1,0,0,0,0,NULL,&atx[134],NULL,0,NULL} ,
+ {0, "edit-location" ,128,4,0,0,0,0,0,0,NULL,&atx[253],NULL,0,NULL} ,
+ {487, "Edit-feature-location-action" ,1,0,0,0,0,0,0,0,NULL,&atx[35],&atx[254],0,&atx[213]} ,
+ {0, "type" ,128,0,0,0,0,0,0,0,NULL,&atx[20],NULL,0,&atx[255]} ,
+ {0, "action" ,128,1,0,0,0,0,0,0,NULL,&atx[256],NULL,0,&atx[279]} ,
+ {486, "Location-edit-type" ,1,0,0,0,0,0,0,0,NULL,&atx[16],&atx[257],0,&atx[253]} ,
+ {0, "strand" ,128,0,0,0,0,0,0,0,NULL,&atx[258],NULL,0,&atx[263]} ,
+ {478, "Edit-location-strand" ,1,0,0,0,0,0,0,0,NULL,&atx[35],&atx[259],0,&atx[266]} ,
+ {0, "strand-from" ,128,0,0,0,0,0,0,0,NULL,&atx[260],NULL,0,&atx[261]} ,
+ {476, "Feature-location-strand-from" ,1,0,0,0,0,0,0,0,NULL,&atx[11],&avnx[428],0,&atx[262]} ,
+ {0, "strand-to" ,128,1,0,0,0,0,0,0,NULL,&atx[262],NULL,0,NULL} ,
+ {477, "Feature-location-strand-to" ,1,0,0,0,0,0,0,0,NULL,&atx[11],&avnx[433],0,&atx[258]} ,
+ {0, "set-5-partial" ,128,1,0,0,0,0,0,0,NULL,&atx[264],NULL,0,&atx[268]} ,
+ {480, "Partial-5-set-action" ,1,0,0,0,0,0,0,0,NULL,&atx[35],&atx[265],0,&atx[269]} ,
+ {0, "constraint" ,128,0,0,0,0,0,0,0,NULL,&atx[266],NULL,0,&atx[267]} ,
+ {479, "Partial-5-set-constraint" ,1,0,0,0,0,0,0,0,NULL,&atx[11],&avnx[438],0,&atx[264]} ,
+ {0, "extend" ,128,1,0,0,0,0,0,0,NULL,&atx[32],NULL,0,NULL} ,
+ {0, "clear-5-partial" ,128,2,0,0,0,0,0,0,NULL,&atx[269],NULL,0,&atx[270]} ,
+ {481, "Partial-5-clear-constraint" ,1,0,0,0,0,0,0,0,NULL,&atx[11],&avnx[442],0,&atx[273]} ,
+ {0, "set-3-partial" ,128,3,0,0,0,0,0,0,NULL,&atx[271],NULL,0,&atx[275]} ,
+ {483, "Partial-3-set-action" ,1,0,0,0,0,0,0,0,NULL,&atx[35],&atx[272],0,&atx[276]} ,
+ {0, "constraint" ,128,0,0,0,0,0,0,0,NULL,&atx[273],NULL,0,&atx[274]} ,
+ {482, "Partial-3-set-constraint" ,1,0,0,0,0,0,0,0,NULL,&atx[11],&avnx[445],0,&atx[271]} ,
+ {0, "extend" ,128,1,0,0,0,0,0,0,NULL,&atx[32],NULL,0,NULL} ,
+ {0, "clear-3-partial" ,128,4,0,0,0,0,0,0,NULL,&atx[276],NULL,0,&atx[277]} ,
+ {484, "Partial-3-clear-constraint" ,1,0,0,0,0,0,0,0,NULL,&atx[11],&avnx[448],0,&atx[278]} ,
+ {0, "convert" ,128,5,0,0,0,0,0,0,NULL,&atx[278],NULL,0,NULL} ,
+ {485, "Convert-location-type" ,1,0,0,0,0,0,0,0,NULL,&atx[11],&avnx[451],0,&atx[256]} ,
+ {0, "constraint" ,128,2,0,1,0,0,0,0,NULL,&atx[134],NULL,0,NULL} };
+
+static AsnModule ampx[1] = {
+ { "NCBI-Macro" , "asnmacro.h13",&atx[0],NULL,NULL,0,0} };
+
+static AsnValxNodePtr avn = avnx;
+static AsnTypePtr at = atx;
+static AsnModulePtr amp = ampx;
+
+
+
+/**************************************************
+*
+* Defines for Module NCBI-Macro
+*
+**************************************************/
+
+#define AECR_ACTION &at[0]
+#define AECR_ACTION_action &at[1]
+#define AECR_ACTION_constraint &at[133]
+
+#define PARSE_ACTION &at[177]
+#define PARSE_ACTION_portion &at[178]
+#define PARSE_ACTION_src &at[179]
+#define PARSE_ACTION_dest &at[195]
+#define PARSE_ACTION_capitalization &at[207]
+#define PARSE_ACTION_remove_from_parsed &at[209]
+#define PARSE_ACTION_existing_text &at[210]
+
+#define MACRO_ACTION_LIST &at[211]
+#define MACRO_ACTION_LIST_E &at[212]
+
+#define STRING_LOCATION &at[30]
+
+#define STRING_CONSTRAINT &at[26]
+#define STRING_CONSTRAINT_match_text &at[27]
+#define CONSTRAINT_match_location &at[29]
+#define CONSTRAINT_case_sensitive &at[31]
+#define STRING_CONSTRAINT_whole_word &at[33]
+#define STRING_CONSTRAINT_not_present &at[34]
+
+#define STRAND_CONSTRAINT &at[141]
+
+#define SEQTYPE_CONSTRAINT &at[143]
+
+#define LOCATION_CONSTRAINT &at[139]
+#define LOCATION_CONSTRAINT_strand &at[140]
+#define LOCATION_CONSTRAINT_seq_type &at[142]
+
+#define OBJECT_TYPE_CONSTRAINT &at[150]
+
+#define FEATURE_TYPE &at[20]
+
+#define FEAT_QUAL_LEGAL &at[24]
+
+#define FEAT_QUAL_LEGAL_VAL &at[245]
+#define FEAT_QUAL_LEGAL_VAL_qual &at[246]
+#define FEAT_QUAL_LEGAL_VAL_val &at[247]
+
+#define FEAT_QUAL_LEGAL_VAL_CHOICE &at[243]
+#define FEAT_QUAL_LEGAL_VAL_CHOICE_qual &at[244]
+
+#define FEAT_QUAL_LEGAL_SET &at[241]
+#define FEAT_QUAL_LEGAL_SET_E &at[242]
+
+#define FEAT_QUAL_CHOICE &at[22]
+#define FEAT_QUAL_CHOICE_legal_qual &at[23]
+#define FEAT_QUAL_CHOICE_illegal_qual &at[25]
+
+#define FEATURE_FIELD &at[18]
+#define FEATURE_FIELD_type &at[19]
+#define FEATURE_FIELD_field &at[21]
+
+#define FEATURE_FIELD_LEGAL &at[203]
+#define FEATURE_FIELD_LEGAL_type &at[204]
+#define FEATURE_FIELD_LEGAL_field &at[205]
+
+#define FEATURE_FIELD_PAIR &at[73]
+#define FEATURE_FIELD_PAIR_type &at[74]
+#define FEATURE_FIELD_PAIR_field_from &at[75]
+#define FEATURE_FIELD_PAIR_field_to &at[76]
+
+#define SOURCE_QUAL &at[10]
+
+#define SOURCE_QUAL_PAIR &at[69]
+#define SOURCE_QUAL_PAIR_field_from &at[70]
+#define SOURCE_QUAL_PAIR_field_to &at[71]
+
+#define SOURCE_LOCATION &at[13]
+
+#define SOURCE_ORIGIN &at[15]
+
+#define SOURCE_QUAL_CHOICE &at[8]
+#define SOURCE_QUAL_CHOICE_textqual &at[9]
+#define SOURCE_QUAL_CHOICE_location &at[12]
+#define SOURCE_QUAL_CHOICE_origin &at[14]
+
+#define CDSGENEPROT_FIELD &at[37]
+
+#define CDSGENEPROT_FIELD_PAIR &at[78]
+#define FIELD_PAIR_field_from &at[79]
+#define CDSGENEPROT_FIELD_PAIR_field_to &at[80]
+
+#define MOLECULE_TYPE &at[41]
+
+#define TECHNIQUE_TYPE &at[43]
+
+#define COMPLETEDNESS_TYPE &at[45]
+
+#define MOLECULE_CLASS_TYPE &at[47]
+
+#define TOPOLOGY_TYPE &at[49]
+
+#define STRAND_TYPE &at[51]
+
+#define MOLINFO_FIELD &at[39]
+#define MOLINFO_FIELD_molecule &at[40]
+#define MOLINFO_FIELD_technique &at[42]
+#define MOLINFO_FIELD_completedness &at[44]
+#define MOLINFO_FIELD_mol_class &at[46]
+#define MOLINFO_FIELD_topology &at[48]
+#define MOLINFO_FIELD_strand &at[50]
+
+#define MOLINFO_MOLECULE_PAIR &at[84]
+#define MOLINFO_MOLECULE_PAIR_from &at[85]
+#define MOLINFO_MOLECULE_PAIR_to &at[86]
+
+#define MOLINFO_TECHNIQUE_PAIR &at[88]
+#define MOLINFO_TECHNIQUE_PAIR_from &at[89]
+#define MOLINFO_TECHNIQUE_PAIR_to &at[90]
+
+#define MOLINFO_COMPLETEDNESS_PAIR &at[92]
+#define MOLINFO_COMPLETEDNESS_PAIR_from &at[93]
+#define MOLINFO_COMPLETEDNESS_PAIR_to &at[94]
+
+#define MOLINFO_MOL_CLASS_PAIR &at[96]
+#define MOLINFO_MOL_CLASS_PAIR_from &at[97]
+#define MOLINFO_MOL_CLASS_PAIR_to &at[98]
+
+#define MOLINFO_TOPOLOGY_PAIR &at[100]
+#define MOLINFO_TOPOLOGY_PAIR_from &at[101]
+#define MOLINFO_TOPOLOGY_PAIR_to &at[102]
+
+#define MOLINFO_STRAND_PAIR &at[104]
+#define MOLINFO_STRAND_PAIR_from &at[105]
+#define MOLINFO_STRAND_PAIR_to &at[106]
+
+#define MOLINFO_FIELD_PAIR &at[82]
+#define MOLINFO_FIELD_PAIR_molecule &at[83]
+#define MOLINFO_FIELD_PAIR_technique &at[87]
+#define FIELD_PAIR_completedness &at[91]
+#define MOLINFO_FIELD_PAIR_mol_class &at[95]
+#define MOLINFO_FIELD_PAIR_topology &at[99]
+#define MOLINFO_FIELD_PAIR_strand &at[103]
+
+#define SOURCE_CONSTRAINT &at[145]
+#define SOURCE_CONSTRAINT_field1 &at[146]
+#define SOURCE_CONSTRAINT_field2 &at[147]
+#define SOURCE_CONSTRAINT_constraint &at[148]
+#define CONSTRAINT_type_constraint &at[149]
+
+#define FEATURE_TYPE_CONSTRAINT &at[161]
+
+#define CDSGENEPROT_PSEUDO_CONSTRAINT &at[159]
+#define PSEUDO_CONSTRAINT_feature &at[160]
+#define PSEUDO_CONSTRAINT_is_pseudo &at[162]
+
+#define CDSGENEPROT_CONSTRAINT_FIELD &at[154]
+#define CONSTRAINT_FIELD_field &at[155]
+
+#define CDSGENEPROT_QUAL_CONSTRAINT &at[152]
+#define QUAL_CONSTRAINT_field1 &at[153]
+#define QUAL_CONSTRAINT_field2 &at[156]
+#define QUAL_CONSTRAINT_constraint &at[157]
+
+#define SEQUENCE_CONSTRAINT_RNAMOL &at[172]
+
+#define CONSTRAINT_MOL_TYPE_CONSTRAINT &at[166]
+#define MOL_TYPE_CONSTRAINT_any &at[167]
+#define MOL_TYPE_CONSTRAINT_nucleotide &at[169]
+#define MOL_TYPE_CONSTRAINT_dna &at[170]
+#define MOL_TYPE_CONSTRAINT_rna &at[171]
+#define MOL_TYPE_CONSTRAINT_protein &at[173]
+
+#define SEQUENCE_CONSTRAINT &at[164]
+#define SEQUENCE_CONSTRAINT_seqtype &at[165]
+#define SEQUENCE_CONSTRAINT_id &at[174]
+#define SEQUENCE_CONSTRAINT_feature &at[175]
+
+#define CONSTRAINT_CHOICE &at[136]
+#define CONSTRAINT_CHOICE_string &at[137]
+#define CONSTRAINT_CHOICE_location &at[138]
+#define CONSTRAINT_CHOICE_source &at[144]
+#define CHOICE_cdsgeneprot_qual &at[151]
+#define CHOICE_cdsgeneprot_pseudo &at[158]
+#define CONSTRAINT_CHOICE_sequence &at[163]
+
+#define CONSTRAINT_CHOICE_SET &at[134]
+#define CONSTRAINT_CHOICE_SET_E &at[135]
+
+#define TEXT_PORTION &at[122]
+#define TEXT_PORTION_left_text &at[123]
+#define TEXT_PORTION_include_left &at[124]
+#define TEXT_PORTION_right_text &at[125]
+#define TEXT_PORTION_include_right &at[126]
+#define TEXT_PORTION_inside &at[127]
+#define TEXT_PORTION_case_sensitive &at[128]
+#define TEXT_PORTION_whole_word &at[129]
+
+#define FIELD_EDIT_LOCATION &at[62]
+
+#define FIELD_EDIT &at[58]
+#define FIELD_EDIT_find_txt &at[59]
+#define FIELD_EDIT_repl_txt &at[60]
+#define FIELD_EDIT_location &at[61]
+
+#define FIELD_TYPE &at[6]
+#define FIELD_TYPE_source_qual &at[7]
+#define FIELD_TYPE_feature_field &at[17]
+#define FIELD_TYPE_cds_gene_prot &at[36]
+#define FIELD_TYPE_molinfo_field &at[38]
+
+#define FIELD_PAIR_TYPE &at[67]
+#define FIELD_PAIR_TYPE_source_qual &at[68]
+#define FIELD_PAIR_TYPE_feature_field &at[72]
+#define FIELD_PAIR_TYPE_cds_gene_prot &at[77]
+#define FIELD_PAIR_TYPE_molinfo_field &at[81]
+
+#define EXISTINGTEXTOPTION &at[54]
+
+#define APPLY_ACTION &at[4]
+#define APPLY_ACTION_field &at[5]
+#define APPLY_ACTION_value &at[52]
+#define APPLY_ACTION_existing_text &at[53]
+
+#define EDIT_ACTION &at[56]
+#define EDIT_ACTION_edit &at[57]
+#define EDIT_ACTION_field &at[63]
+
+#define CONVERT_ACTION &at[65]
+#define CONVERT_ACTION_fields &at[66]
+#define CONVERT_ACTION_existing_text &at[107]
+
+#define COPY_ACTION &at[109]
+#define COPY_ACTION_fields &at[110]
+#define COPY_ACTION_existing_text &at[111]
+
+#define SWAP_ACTION &at[113]
+#define SWAP_ACTION_fields &at[114]
+#define SWAP_ACTION_field_to &at[115]
+
+#define AECRPARSE_ACTION &at[120]
+#define AECRPARSE_ACTION_portion &at[121]
+#define AECRPARSE_ACTION_fields &at[130]
+#define ACTION_remove_from_parsed &at[131]
+#define AECRPARSE_ACTION_existing_text &at[132]
+
+#define REMOVE_ACTION &at[117]
+#define REMOVE_ACTION_field &at[118]
+
+#define ACTION_CHOICE &at[2]
+#define ACTION_CHOICE_apply &at[3]
+#define ACTION_CHOICE_edit &at[55]
+#define ACTION_CHOICE_convert &at[64]
+#define ACTION_CHOICE_copy &at[108]
+#define ACTION_CHOICE_swap &at[112]
+#define ACTION_CHOICE_remove &at[116]
+#define ACTION_CHOICE_parse &at[119]
+
+#define CAP_CHANGE &at[208]
+
+#define PARSE_SRC_ORG_CHOICE &at[187]
+#define SRC_ORG_CHOICE_source_qual &at[188]
+#define CHOICE_taxname_after_binomial &at[189]
+
+#define PARSE_SRC_ORG &at[185]
+#define PARSE_SRC_ORG_field &at[186]
+#define PARSE_SRC_ORG_type &at[190]
+
+#define PARSE_SRC &at[180]
+#define PARSE_SRC_defline &at[181]
+#define PARSE_SRC_flatfile &at[182]
+#define PARSE_SRC_local_id &at[183]
+#define PARSE_SRC_org &at[184]
+#define PARSE_SRC_comment &at[191]
+#define PARSE_SRC_bankit_comment &at[192]
+#define PARSE_SRC_structured_comment &at[193]
+#define PARSE_SRC_file_id &at[194]
+
+#define PARSE_DST_ORG &at[199]
+#define PARSE_DST_ORG_field &at[200]
+#define PARSE_DST_ORG_type &at[201]
+
+#define PARSE_DEST &at[196]
+#define PARSE_DEST_defline &at[197]
+#define PARSE_DEST_org &at[198]
+#define PARSE_DEST_featqual &at[202]
+#define PARSE_DEST_dbxref &at[206]
+
+#define LOCATION_INTERVAL &at[225]
+#define LOCATION_INTERVAL_from &at[226]
+#define LOCATION_INTERVAL_to &at[228]
+
+#define LOCATION_CHOICE &at[223]
+#define LOCATION_CHOICE_interval &at[224]
+#define LOCATION_CHOICE_whole_sequence &at[229]
+
+#define SEQUENCE_LIST &at[233]
+#define SEQUENCE_LIST_E &at[234]
+
+#define SEQUENCE_LIST_CHOICE &at[231]
+#define SEQUENCE_LIST_CHOICE_list &at[232]
+#define SEQUENCE_LIST_CHOICE_all &at[235]
+
+#define APPLY_FEATURE_ACTION &at[217]
+#define APPLY_FEATURE_ACTION_type &at[218]
+#define APPLY_FEATURE_ACTION_partial5 &at[219]
+#define APPLY_FEATURE_ACTION_partial3 &at[220]
+#define FEATURE_ACTION_plus_strand &at[221]
+#define APPLY_FEATURE_ACTION_location &at[222]
+#define APPLY_FEATURE_ACTION_seq_list &at[230]
+#define FEATURE_ACTION_add_redundant &at[236]
+#define APPLY_FEATURE_ACTION_add_mrna &at[237]
+#define FEATURE_ACTION_apply_to_parts &at[238]
+#define FEATURE_ACTION_only_seg_num &at[239]
+#define APPLY_FEATURE_ACTION_fields &at[240]
+
+#define REMOVE_FEATURE_ACTION &at[249]
+#define REMOVE_FEATURE_ACTION_type &at[250]
+#define FEATURE_ACTION_constraint &at[251]
+
+#define FEATURE_LOCATION_STRAND_FROM &at[260]
+
+#define FEATURE_LOCATION_STRAND_TO &at[262]
+
+#define EDIT_LOCATION_STRAND &at[258]
+#define LOCATION_STRAND_strand_from &at[259]
+#define EDIT_LOCATION_STRAND_strand_to &at[261]
+
+#define PARTIAL_5_SET_CONSTRAINT &at[266]
+
+#define PARTIAL_5_SET_ACTION &at[264]
+#define PARTIAL_5_SET_ACTION_constraint &at[265]
+#define PARTIAL_5_SET_ACTION_extend &at[267]
+
+#define PARTIAL_5_CLEAR_CONSTRAINT &at[269]
+
+#define PARTIAL_3_SET_CONSTRAINT &at[273]
+
+#define PARTIAL_3_SET_ACTION &at[271]
+#define PARTIAL_3_SET_ACTION_constraint &at[272]
+#define PARTIAL_3_SET_ACTION_extend &at[274]
+
+#define PARTIAL_3_CLEAR_CONSTRAINT &at[276]
+
+#define CONVERT_LOCATION_TYPE &at[278]
+
+#define LOCATION_EDIT_TYPE &at[256]
+#define LOCATION_EDIT_TYPE_strand &at[257]
+#define EDIT_TYPE_set_5_partial &at[263]
+#define EDIT_TYPE_clear_5_partial &at[268]
+#define EDIT_TYPE_set_3_partial &at[270]
+#define EDIT_TYPE_clear_3_partial &at[275]
+#define LOCATION_EDIT_TYPE_convert &at[277]
+
+#define EDIT_FEATURE_LOCATION_ACTION &at[253]
+#define FEATURE_LOCATION_ACTION_type &at[254]
+#define FEATURE_LOCATION_ACTION_action &at[255]
+#define LOCATION_ACTION_constraint &at[279]
+
+#define MACRO_ACTION_CHOICE &at[213]
+#define MACRO_ACTION_CHOICE_aecr &at[214]
+#define MACRO_ACTION_CHOICE_parse &at[215]
+#define MACRO_ACTION_CHOICE_add_feature &at[216]
+#define ACTION_CHOICE_remove_feature &at[248]
+#define ACTION_CHOICE_edit_location &at[252]
diff --git a/asnstat/asnseq.h b/asnstat/asnseq.h
index 857aa20f..f8dad1af 100644
--- a/asnstat/asnseq.h
+++ b/asnstat/asnseq.h
@@ -9,8 +9,8 @@
#include <asn.h>
#endif
-static char * asnfilename = "asnseq.h16";
-static AsnValxNode avnx[161] = {
+static char * asnfilename = "asnseq.h19";
+static AsnValxNode avnx[164] = {
{3,NULL,1,0.0,NULL } ,
{2,NULL,0,0.0,NULL } ,
{2,NULL,1,0.0,NULL } ,
@@ -87,100 +87,103 @@ static AsnValxNode avnx[161] = {
{20,"cRNA" ,11,0.0,&avnx[74] } ,
{20,"snoRNA" ,12,0.0,&avnx[75] } ,
{20,"transcribed-RNA" ,13,0.0,&avnx[76] } ,
+ {20,"ncRNA" ,14,0.0,&avnx[77] } ,
+ {20,"tmRNA" ,15,0.0,&avnx[78] } ,
{20,"other" ,255,0.0,NULL } ,
{3,NULL,0,0.0,NULL } ,
- {20,"unknown" ,0,0.0,&avnx[79] } ,
- {20,"standard" ,1,0.0,&avnx[80] } ,
- {20,"est" ,2,0.0,&avnx[81] } ,
- {20,"sts" ,3,0.0,&avnx[82] } ,
- {20,"survey" ,4,0.0,&avnx[83] } ,
- {20,"genemap" ,5,0.0,&avnx[84] } ,
- {20,"physmap" ,6,0.0,&avnx[85] } ,
- {20,"derived" ,7,0.0,&avnx[86] } ,
- {20,"concept-trans" ,8,0.0,&avnx[87] } ,
- {20,"seq-pept" ,9,0.0,&avnx[88] } ,
- {20,"both" ,10,0.0,&avnx[89] } ,
- {20,"seq-pept-overlap" ,11,0.0,&avnx[90] } ,
- {20,"seq-pept-homol" ,12,0.0,&avnx[91] } ,
- {20,"concept-trans-a" ,13,0.0,&avnx[92] } ,
- {20,"htgs-1" ,14,0.0,&avnx[93] } ,
- {20,"htgs-2" ,15,0.0,&avnx[94] } ,
- {20,"htgs-3" ,16,0.0,&avnx[95] } ,
- {20,"fli-cdna" ,17,0.0,&avnx[96] } ,
- {20,"htgs-0" ,18,0.0,&avnx[97] } ,
- {20,"htc" ,19,0.0,&avnx[98] } ,
- {20,"wgs" ,20,0.0,&avnx[99] } ,
- {20,"barcode" ,21,0.0,&avnx[100] } ,
- {20,"composite-wgs-htgs" ,22,0.0,&avnx[101] } ,
+ {20,"unknown" ,0,0.0,&avnx[81] } ,
+ {20,"standard" ,1,0.0,&avnx[82] } ,
+ {20,"est" ,2,0.0,&avnx[83] } ,
+ {20,"sts" ,3,0.0,&avnx[84] } ,
+ {20,"survey" ,4,0.0,&avnx[85] } ,
+ {20,"genemap" ,5,0.0,&avnx[86] } ,
+ {20,"physmap" ,6,0.0,&avnx[87] } ,
+ {20,"derived" ,7,0.0,&avnx[88] } ,
+ {20,"concept-trans" ,8,0.0,&avnx[89] } ,
+ {20,"seq-pept" ,9,0.0,&avnx[90] } ,
+ {20,"both" ,10,0.0,&avnx[91] } ,
+ {20,"seq-pept-overlap" ,11,0.0,&avnx[92] } ,
+ {20,"seq-pept-homol" ,12,0.0,&avnx[93] } ,
+ {20,"concept-trans-a" ,13,0.0,&avnx[94] } ,
+ {20,"htgs-1" ,14,0.0,&avnx[95] } ,
+ {20,"htgs-2" ,15,0.0,&avnx[96] } ,
+ {20,"htgs-3" ,16,0.0,&avnx[97] } ,
+ {20,"fli-cdna" ,17,0.0,&avnx[98] } ,
+ {20,"htgs-0" ,18,0.0,&avnx[99] } ,
+ {20,"htc" ,19,0.0,&avnx[100] } ,
+ {20,"wgs" ,20,0.0,&avnx[101] } ,
+ {20,"barcode" ,21,0.0,&avnx[102] } ,
+ {20,"composite-wgs-htgs" ,22,0.0,&avnx[103] } ,
+ {20,"tsa" ,23,0.0,&avnx[104] } ,
{20,"other" ,255,0.0,NULL } ,
{3,NULL,0,0.0,NULL } ,
- {20,"unknown" ,0,0.0,&avnx[104] } ,
- {20,"complete" ,1,0.0,&avnx[105] } ,
- {20,"partial" ,2,0.0,&avnx[106] } ,
- {20,"no-left" ,3,0.0,&avnx[107] } ,
- {20,"no-right" ,4,0.0,&avnx[108] } ,
- {20,"no-ends" ,5,0.0,&avnx[109] } ,
- {20,"has-left" ,6,0.0,&avnx[110] } ,
- {20,"has-right" ,7,0.0,&avnx[111] } ,
+ {20,"unknown" ,0,0.0,&avnx[107] } ,
+ {20,"complete" ,1,0.0,&avnx[108] } ,
+ {20,"partial" ,2,0.0,&avnx[109] } ,
+ {20,"no-left" ,3,0.0,&avnx[110] } ,
+ {20,"no-right" ,4,0.0,&avnx[111] } ,
+ {20,"no-ends" ,5,0.0,&avnx[112] } ,
+ {20,"has-left" ,6,0.0,&avnx[113] } ,
+ {20,"has-right" ,7,0.0,&avnx[114] } ,
{20,"other" ,255,0.0,NULL } ,
{3,NULL,0,0.0,NULL } ,
- {20,"not-set" ,0,0.0,&avnx[114] } ,
- {20,"virtual" ,1,0.0,&avnx[115] } ,
- {20,"raw" ,2,0.0,&avnx[116] } ,
- {20,"seg" ,3,0.0,&avnx[117] } ,
- {20,"const" ,4,0.0,&avnx[118] } ,
- {20,"ref" ,5,0.0,&avnx[119] } ,
- {20,"consen" ,6,0.0,&avnx[120] } ,
- {20,"map" ,7,0.0,&avnx[121] } ,
- {20,"delta" ,8,0.0,&avnx[122] } ,
+ {20,"not-set" ,0,0.0,&avnx[117] } ,
+ {20,"virtual" ,1,0.0,&avnx[118] } ,
+ {20,"raw" ,2,0.0,&avnx[119] } ,
+ {20,"seg" ,3,0.0,&avnx[120] } ,
+ {20,"const" ,4,0.0,&avnx[121] } ,
+ {20,"ref" ,5,0.0,&avnx[122] } ,
+ {20,"consen" ,6,0.0,&avnx[123] } ,
+ {20,"map" ,7,0.0,&avnx[124] } ,
+ {20,"delta" ,8,0.0,&avnx[125] } ,
{20,"other" ,255,0.0,NULL } ,
- {20,"not-set" ,0,0.0,&avnx[124] } ,
- {20,"dna" ,1,0.0,&avnx[125] } ,
- {20,"rna" ,2,0.0,&avnx[126] } ,
- {20,"aa" ,3,0.0,&avnx[127] } ,
- {20,"na" ,4,0.0,&avnx[128] } ,
+ {20,"not-set" ,0,0.0,&avnx[127] } ,
+ {20,"dna" ,1,0.0,&avnx[128] } ,
+ {20,"rna" ,2,0.0,&avnx[129] } ,
+ {20,"aa" ,3,0.0,&avnx[130] } ,
+ {20,"na" ,4,0.0,&avnx[131] } ,
{20,"other" ,255,0.0,NULL } ,
- {20,"not-set" ,0,0.0,&avnx[130] } ,
- {20,"linear" ,1,0.0,&avnx[131] } ,
- {20,"circular" ,2,0.0,&avnx[132] } ,
- {20,"tandem" ,3,0.0,&avnx[133] } ,
+ {20,"not-set" ,0,0.0,&avnx[133] } ,
+ {20,"linear" ,1,0.0,&avnx[134] } ,
+ {20,"circular" ,2,0.0,&avnx[135] } ,
+ {20,"tandem" ,3,0.0,&avnx[136] } ,
{20,"other" ,255,0.0,NULL } ,
{3,NULL,1,0.0,NULL } ,
- {20,"not-set" ,0,0.0,&avnx[136] } ,
- {20,"ss" ,1,0.0,&avnx[137] } ,
- {20,"ds" ,2,0.0,&avnx[138] } ,
- {20,"mixed" ,3,0.0,&avnx[139] } ,
+ {20,"not-set" ,0,0.0,&avnx[139] } ,
+ {20,"ss" ,1,0.0,&avnx[140] } ,
+ {20,"ds" ,2,0.0,&avnx[141] } ,
+ {20,"mixed" ,3,0.0,&avnx[142] } ,
{20,"other" ,255,0.0,NULL } ,
- {20,"unknown" ,0,0.0,&avnx[141] } ,
- {20,"fragment" ,1,0.0,&avnx[142] } ,
- {20,"clone" ,2,0.0,&avnx[143] } ,
- {20,"short-arm" ,3,0.0,&avnx[144] } ,
- {20,"heterochromatin" ,4,0.0,&avnx[145] } ,
- {20,"centromere" ,5,0.0,&avnx[146] } ,
- {20,"telomere" ,6,0.0,&avnx[147] } ,
- {20,"repeat" ,7,0.0,&avnx[148] } ,
- {20,"contig" ,8,0.0,&avnx[149] } ,
+ {20,"unknown" ,0,0.0,&avnx[144] } ,
+ {20,"fragment" ,1,0.0,&avnx[145] } ,
+ {20,"clone" ,2,0.0,&avnx[146] } ,
+ {20,"short-arm" ,3,0.0,&avnx[147] } ,
+ {20,"heterochromatin" ,4,0.0,&avnx[148] } ,
+ {20,"centromere" ,5,0.0,&avnx[149] } ,
+ {20,"telomere" ,6,0.0,&avnx[150] } ,
+ {20,"repeat" ,7,0.0,&avnx[151] } ,
+ {20,"contig" ,8,0.0,&avnx[152] } ,
{20,"other" ,255,0.0,NULL } ,
- {20,"unlinked" ,0,0.0,&avnx[151] } ,
- {20,"linked" ,1,0.0,&avnx[152] } ,
+ {20,"unlinked" ,0,0.0,&avnx[154] } ,
+ {20,"linked" ,1,0.0,&avnx[155] } ,
{20,"other" ,255,0.0,NULL } ,
- {20,"genbank" ,1,0.0,&avnx[154] } ,
- {20,"embl" ,2,0.0,&avnx[155] } ,
- {20,"ddbj" ,3,0.0,&avnx[156] } ,
- {20,"pir" ,4,0.0,&avnx[157] } ,
- {20,"sp" ,5,0.0,&avnx[158] } ,
- {20,"bbone" ,6,0.0,&avnx[159] } ,
- {20,"pdb" ,7,0.0,&avnx[160] } ,
+ {20,"genbank" ,1,0.0,&avnx[157] } ,
+ {20,"embl" ,2,0.0,&avnx[158] } ,
+ {20,"ddbj" ,3,0.0,&avnx[159] } ,
+ {20,"pir" ,4,0.0,&avnx[160] } ,
+ {20,"sp" ,5,0.0,&avnx[161] } ,
+ {20,"bbone" ,6,0.0,&avnx[162] } ,
+ {20,"pdb" ,7,0.0,&avnx[163] } ,
{20,"other" ,255,0.0,NULL } };
-static AsnType atx[210] = {
+static AsnType atx[213] = {
{401, "Annotdesc" ,1,0,0,0,0,1,0,0,NULL,&atx[39],&atx[1],0,&atx[63]} ,
{0, "name" ,128,0,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[3]} ,
{323, "VisibleString" ,0,26,0,0,0,0,0,0,NULL,NULL,NULL,0,NULL} ,
{0, "title" ,128,1,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[4]} ,
{0, "comment" ,128,2,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[5]} ,
{0, "pub" ,128,3,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[48]} ,
- {408, "Pubdesc" ,1,0,0,0,0,1,0,0,NULL,&atx[20],&atx[7],0,&atx[187]} ,
+ {408, "Pubdesc" ,1,0,0,0,0,1,0,0,NULL,&atx[20],&atx[7],0,&atx[188]} ,
{0, "pub" ,128,0,0,0,0,0,0,0,NULL,&atx[8],NULL,0,&atx[9]} ,
{426, "Pub-equiv" ,1,0,0,0,0,0,1,0,NULL,NULL,NULL,0,&atx[82]} ,
{0, "name" ,128,1,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[10]} ,
@@ -188,7 +191,7 @@ static AsnType atx[210] = {
{0, "num" ,128,3,0,1,0,0,0,0,NULL,&atx[12],NULL,0,&atx[40]} ,
{407, "Numbering" ,1,0,0,0,0,1,0,0,NULL,&atx[39],&atx[13],0,&atx[6]} ,
{0, "cont" ,128,0,0,0,0,0,0,0,NULL,&atx[14],NULL,0,&atx[21]} ,
- {439, "Num-cont" ,1,0,0,0,0,0,0,0,NULL,&atx[20],&atx[15],0,&atx[22]} ,
+ {440, "Num-cont" ,1,0,0,0,0,0,0,0,NULL,&atx[20],&atx[15],0,&atx[22]} ,
{0, "refnum" ,128,0,0,0,1,0,0,0,&avnx[0],&atx[16],NULL,0,&atx[17]} ,
{302, "INTEGER" ,0,2,0,0,0,0,0,0,NULL,NULL,NULL,0,NULL} ,
{0, "has-zero" ,128,1,0,0,1,0,0,0,&avnx[1],&atx[18],NULL,0,&atx[19]} ,
@@ -196,19 +199,19 @@ static AsnType atx[210] = {
{0, "ascending" ,128,2,0,0,1,0,0,0,&avnx[2],&atx[18],NULL,0,NULL} ,
{311, "SEQUENCE" ,0,16,0,0,0,0,0,0,NULL,NULL,NULL,0,NULL} ,
{0, "enum" ,128,1,0,0,0,0,0,0,NULL,&atx[22],NULL,0,&atx[27]} ,
- {440, "Num-enum" ,1,0,0,0,0,0,0,0,NULL,&atx[20],&atx[23],0,&atx[28]} ,
+ {441, "Num-enum" ,1,0,0,0,0,0,0,0,NULL,&atx[20],&atx[23],0,&atx[28]} ,
{0, "num" ,128,0,0,0,0,0,0,0,NULL,&atx[16],NULL,0,&atx[24]} ,
{0, "names" ,128,1,0,0,0,0,0,0,NULL,&atx[26],&atx[25],0,NULL} ,
{0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[2],NULL,0,NULL} ,
{312, "SEQUENCE OF" ,0,16,0,0,0,0,0,0,NULL,NULL,NULL,0,NULL} ,
{0, "ref" ,128,2,0,0,0,0,0,0,NULL,&atx[28],NULL,0,&atx[33]} ,
- {441, "Num-ref" ,1,0,0,0,0,0,0,0,NULL,&atx[20],&atx[29],0,&atx[34]} ,
+ {442, "Num-ref" ,1,0,0,0,0,0,0,0,NULL,&atx[20],&atx[29],0,&atx[34]} ,
{0, "type" ,128,0,0,0,0,0,0,0,NULL,&atx[30],&avnx[3],0,&atx[31]} ,
{310, "ENUMERATED" ,0,10,0,0,0,0,0,0,NULL,NULL,NULL,0,NULL} ,
{0, "aligns" ,128,1,0,1,0,0,0,0,NULL,&atx[32],NULL,0,NULL} ,
- {423, "Seq-align" ,1,0,0,0,0,0,1,0,NULL,NULL,NULL,0,&atx[161]} ,
+ {423, "Seq-align" ,1,0,0,0,0,0,1,0,NULL,NULL,NULL,0,&atx[162]} ,
{0, "real" ,128,3,0,0,0,0,0,0,NULL,&atx[34],NULL,0,NULL} ,
- {442, "Num-real" ,1,0,0,0,0,0,0,0,NULL,&atx[20],&atx[35],0,&atx[154]} ,
+ {443, "Num-real" ,1,0,0,0,0,0,0,0,NULL,&atx[20],&atx[35],0,&atx[155]} ,
{0, "a" ,128,0,0,0,0,0,0,0,NULL,&atx[36],NULL,0,&atx[37]} ,
{309, "REAL" ,0,9,0,0,0,0,0,0,NULL,NULL,NULL,0,NULL} ,
{0, "b" ,128,1,0,0,0,0,0,0,NULL,&atx[36],NULL,0,&atx[38]} ,
@@ -225,12 +228,12 @@ static AsnType atx[210] = {
{0, "user" ,128,4,0,0,0,0,0,0,NULL,&atx[49],NULL,0,&atx[50]} ,
{422, "User-object" ,1,0,0,0,0,0,1,0,NULL,NULL,NULL,0,&atx[32]} ,
{0, "create-date" ,128,5,0,0,0,0,0,0,NULL,&atx[51],NULL,0,&atx[52]} ,
- {418, "Date" ,1,0,0,0,0,0,1,0,NULL,NULL,NULL,0,&atx[121]} ,
+ {418, "Date" ,1,0,0,0,0,0,1,0,NULL,NULL,NULL,0,&atx[122]} ,
{0, "update-date" ,128,6,0,0,0,0,0,0,NULL,&atx[51],NULL,0,&atx[53]} ,
{0, "src" ,128,7,0,0,0,0,0,0,NULL,&atx[54],NULL,0,&atx[55]} ,
{429, "Seq-id" ,1,0,0,0,0,0,1,0,NULL,NULL,NULL,0,&atx[62]} ,
{0, "align" ,128,8,0,0,0,0,0,0,NULL,&atx[56],NULL,0,&atx[61]} ,
- {460, "Align-def" ,1,0,0,0,0,0,0,0,NULL,&atx[20],&atx[57],0,NULL} ,
+ {461, "Align-def" ,1,0,0,0,0,0,0,0,NULL,&atx[20],&atx[57],0,NULL} ,
{0, "align-type" ,128,0,0,0,0,0,0,0,NULL,&atx[16],&avnx[11],0,&atx[58]} ,
{0, "ids" ,128,1,0,1,0,0,0,0,NULL,&atx[60],&atx[59],0,NULL} ,
{0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[54],NULL,0,NULL} ,
@@ -242,17 +245,17 @@ static AsnType atx[210] = {
{403, "Bioseq" ,1,0,0,0,0,1,0,0,NULL,&atx[20],&atx[66],0,&atx[73]} ,
{0, "id" ,128,0,0,0,0,0,0,0,NULL,&atx[60],&atx[67],0,&atx[68]} ,
{0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[54],NULL,0,NULL} ,
- {0, "descr" ,128,1,0,1,0,0,0,0,NULL,&atx[69],NULL,0,&atx[115]} ,
- {412, "Seq-descr" ,1,0,0,0,0,1,0,0,NULL,&atx[60],&atx[70],0,&atx[152]} ,
+ {0, "descr" ,128,1,0,1,0,0,0,0,NULL,&atx[69],NULL,0,&atx[116]} ,
+ {412, "Seq-descr" ,1,0,0,0,0,1,0,0,NULL,&atx[60],&atx[70],0,&atx[153]} ,
{0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[71],NULL,0,NULL} ,
{411, "Seqdesc" ,1,0,0,0,0,1,0,0,NULL,&atx[39],&atx[72],0,&atx[69]} ,
{0, "mol-type" ,128,0,0,0,0,0,0,0,NULL,&atx[73],NULL,0,&atx[74]} ,
{404, "GIBB-mol" ,1,0,0,0,0,1,0,0,NULL,&atx[30],&avnx[15],0,&atx[106]} ,
{0, "modif" ,128,1,0,0,0,0,0,0,NULL,&atx[60],&atx[75],0,&atx[77]} ,
{0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[76],NULL,0,NULL} ,
- {437, "GIBB-mod" ,1,0,0,0,0,0,0,0,NULL,&atx[30],&avnx[27],0,&atx[78]} ,
+ {438, "GIBB-mod" ,1,0,0,0,0,0,0,0,NULL,&atx[30],&avnx[27],0,&atx[78]} ,
{0, "method" ,128,2,0,0,0,0,0,0,NULL,&atx[78],NULL,0,&atx[79]} ,
- {438, "GIBB-method" ,1,0,0,0,0,0,0,0,NULL,&atx[30],&avnx[55],0,&atx[14]} ,
+ {439, "GIBB-method" ,1,0,0,0,0,0,0,0,NULL,&atx[30],&avnx[55],0,&atx[14]} ,
{0, "name" ,128,3,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[80]} ,
{0, "title" ,128,4,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[81]} ,
{0, "org" ,128,5,0,0,0,0,0,0,NULL,&atx[82],NULL,0,&atx[83]} ,
@@ -260,7 +263,7 @@ static AsnType atx[210] = {
{0, "comment" ,128,6,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[84]} ,
{0, "num" ,128,7,0,0,0,0,0,0,NULL,&atx[12],NULL,0,&atx[85]} ,
{0, "maploc" ,128,8,0,0,0,0,0,0,NULL,&atx[86],NULL,0,&atx[87]} ,
- {420, "Dbtag" ,1,0,0,0,0,0,1,0,NULL,NULL,NULL,0,&atx[192]} ,
+ {420, "Dbtag" ,1,0,0,0,0,0,1,0,NULL,NULL,NULL,0,&atx[193]} ,
{0, "pir" ,128,9,0,0,0,0,0,0,NULL,&atx[88],NULL,0,&atx[89]} ,
{432, "PIR-block" ,1,0,0,0,0,0,1,0,NULL,NULL,NULL,0,&atx[98]} ,
{0, "genbank" ,128,10,0,0,0,0,0,0,NULL,&atx[90],NULL,0,&atx[91]} ,
@@ -278,115 +281,118 @@ static AsnType atx[210] = {
{0, "prf" ,128,19,0,0,0,0,0,0,NULL,&atx[102],NULL,0,&atx[103]} ,
{435, "PRF-block" ,1,0,0,0,0,0,1,0,NULL,NULL,NULL,0,&atx[104]} ,
{0, "pdb" ,128,20,0,0,0,0,0,0,NULL,&atx[104],NULL,0,&atx[105]} ,
- {436, "PDB-block" ,1,0,0,0,0,0,1,0,NULL,NULL,NULL,0,&atx[76]} ,
+ {436, "PDB-block" ,1,0,0,0,0,0,1,0,NULL,NULL,NULL,0,&atx[212]} ,
{0, "het" ,128,21,0,0,0,0,0,0,NULL,&atx[106],NULL,0,&atx[107]} ,
{405, "Heterogen" ,1,0,0,0,0,1,0,0,NULL,&atx[2],NULL,0,&atx[110]} ,
{0, "source" ,128,22,0,0,0,0,0,0,NULL,&atx[108],NULL,0,&atx[109]} ,
{428, "BioSource" ,1,0,0,0,0,0,1,0,NULL,NULL,NULL,0,&atx[54]} ,
{0, "molinfo" ,128,23,0,0,0,0,0,0,NULL,&atx[110],NULL,0,NULL} ,
{406, "MolInfo" ,1,0,0,0,0,1,0,0,NULL,&atx[20],&atx[111],0,&atx[12]} ,
- {0, "biomol" ,128,0,0,0,1,0,0,0,&avnx[77],&atx[16],&avnx[62],0,&atx[112]} ,
- {0, "tech" ,128,1,0,0,1,0,0,0,&avnx[102],&atx[16],&avnx[78],0,&atx[113]} ,
+ {0, "biomol" ,128,0,0,0,1,0,0,0,&avnx[79],&atx[16],&avnx[62],0,&atx[112]} ,
+ {0, "tech" ,128,1,0,0,1,0,0,0,&avnx[105],&atx[16],&avnx[80],0,&atx[113]} ,
{0, "techexp" ,128,2,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[114]} ,
- {0, "completeness" ,128,3,0,0,1,0,0,0,&avnx[112],&atx[16],&avnx[103],0,NULL} ,
- {0, "inst" ,128,2,0,0,0,0,0,0,NULL,&atx[116],NULL,0,&atx[185]} ,
- {415, "Seq-inst" ,1,0,0,0,0,1,0,0,NULL,&atx[20],&atx[117],0,&atx[168]} ,
- {0, "repr" ,128,0,0,0,0,0,0,0,NULL,&atx[30],&avnx[113],0,&atx[118]} ,
- {0, "mol" ,128,1,0,0,0,0,0,0,NULL,&atx[30],&avnx[123],0,&atx[119]} ,
- {0, "length" ,128,2,0,1,0,0,0,0,NULL,&atx[16],NULL,0,&atx[120]} ,
- {0, "fuzz" ,128,3,0,1,0,0,0,0,NULL,&atx[121],NULL,0,&atx[122]} ,
+ {0, "completeness" ,128,3,0,0,1,0,0,0,&avnx[115],&atx[16],&avnx[106],0,&atx[115]} ,
+ {0, "gbmoltype" ,128,4,0,1,0,0,0,0,NULL,&atx[2],NULL,0,NULL} ,
+ {0, "inst" ,128,2,0,0,0,0,0,0,NULL,&atx[117],NULL,0,&atx[186]} ,
+ {415, "Seq-inst" ,1,0,0,0,0,1,0,0,NULL,&atx[20],&atx[118],0,&atx[169]} ,
+ {0, "repr" ,128,0,0,0,0,0,0,0,NULL,&atx[30],&avnx[116],0,&atx[119]} ,
+ {0, "mol" ,128,1,0,0,0,0,0,0,NULL,&atx[30],&avnx[126],0,&atx[120]} ,
+ {0, "length" ,128,2,0,1,0,0,0,0,NULL,&atx[16],NULL,0,&atx[121]} ,
+ {0, "fuzz" ,128,3,0,1,0,0,0,0,NULL,&atx[122],NULL,0,&atx[123]} ,
{419, "Int-fuzz" ,1,0,0,0,0,0,1,0,NULL,NULL,NULL,0,&atx[86]} ,
- {0, "topology" ,128,4,0,0,1,0,0,0,&avnx[134],&atx[30],&avnx[129],0,&atx[123]} ,
- {0, "strand" ,128,5,0,1,0,0,0,0,NULL,&atx[30],&avnx[135],0,&atx[124]} ,
- {0, "seq-data" ,128,6,0,1,0,0,0,0,NULL,&atx[125],NULL,0,&atx[151]} ,
- {410, "Seq-data" ,1,0,0,0,0,1,0,0,NULL,&atx[39],&atx[126],0,&atx[71]} ,
- {0, "iupacna" ,128,0,0,0,0,0,0,0,NULL,&atx[127],NULL,0,&atx[128]} ,
- {448, "IUPACna" ,1,0,0,0,0,0,0,0,NULL,&atx[44],NULL,0,&atx[129]} ,
- {0, "iupacaa" ,128,1,0,0,0,0,0,0,NULL,&atx[129],NULL,0,&atx[130]} ,
- {449, "IUPACaa" ,1,0,0,0,0,0,0,0,NULL,&atx[44],NULL,0,&atx[131]} ,
- {0, "ncbi2na" ,128,2,0,0,0,0,0,0,NULL,&atx[131],NULL,0,&atx[133]} ,
- {450, "NCBI2na" ,1,0,0,0,0,0,0,0,NULL,&atx[132],NULL,0,&atx[134]} ,
+ {0, "topology" ,128,4,0,0,1,0,0,0,&avnx[137],&atx[30],&avnx[132],0,&atx[124]} ,
+ {0, "strand" ,128,5,0,1,0,0,0,0,NULL,&atx[30],&avnx[138],0,&atx[125]} ,
+ {0, "seq-data" ,128,6,0,1,0,0,0,0,NULL,&atx[126],NULL,0,&atx[152]} ,
+ {410, "Seq-data" ,1,0,0,0,0,1,0,0,NULL,&atx[39],&atx[127],0,&atx[71]} ,
+ {0, "iupacna" ,128,0,0,0,0,0,0,0,NULL,&atx[128],NULL,0,&atx[129]} ,
+ {449, "IUPACna" ,1,0,0,0,0,0,0,0,NULL,&atx[44],NULL,0,&atx[130]} ,
+ {0, "iupacaa" ,128,1,0,0,0,0,0,0,NULL,&atx[130],NULL,0,&atx[131]} ,
+ {450, "IUPACaa" ,1,0,0,0,0,0,0,0,NULL,&atx[44],NULL,0,&atx[132]} ,
+ {0, "ncbi2na" ,128,2,0,0,0,0,0,0,NULL,&atx[132],NULL,0,&atx[134]} ,
+ {451, "NCBI2na" ,1,0,0,0,0,0,0,0,NULL,&atx[133],NULL,0,&atx[135]} ,
{304, "OCTET STRING" ,0,4,0,0,0,0,0,0,NULL,NULL,NULL,0,NULL} ,
- {0, "ncbi4na" ,128,3,0,0,0,0,0,0,NULL,&atx[134],NULL,0,&atx[135]} ,
- {451, "NCBI4na" ,1,0,0,0,0,0,0,0,NULL,&atx[132],NULL,0,&atx[136]} ,
- {0, "ncbi8na" ,128,4,0,0,0,0,0,0,NULL,&atx[136],NULL,0,&atx[137]} ,
- {452, "NCBI8na" ,1,0,0,0,0,0,0,0,NULL,&atx[132],NULL,0,&atx[138]} ,
- {0, "ncbipna" ,128,5,0,0,0,0,0,0,NULL,&atx[138],NULL,0,&atx[139]} ,
- {453, "NCBIpna" ,1,0,0,0,0,0,0,0,NULL,&atx[132],NULL,0,&atx[140]} ,
- {0, "ncbi8aa" ,128,6,0,0,0,0,0,0,NULL,&atx[140],NULL,0,&atx[141]} ,
- {454, "NCBI8aa" ,1,0,0,0,0,0,0,0,NULL,&atx[132],NULL,0,&atx[142]} ,
- {0, "ncbieaa" ,128,7,0,0,0,0,0,0,NULL,&atx[142],NULL,0,&atx[143]} ,
- {455, "NCBIeaa" ,1,0,0,0,0,0,0,0,NULL,&atx[44],NULL,0,&atx[144]} ,
- {0, "ncbipaa" ,128,8,0,0,0,0,0,0,NULL,&atx[144],NULL,0,&atx[145]} ,
- {456, "NCBIpaa" ,1,0,0,0,0,0,0,0,NULL,&atx[132],NULL,0,&atx[146]} ,
- {0, "ncbistdaa" ,128,9,0,0,0,0,0,0,NULL,&atx[146],NULL,0,&atx[147]} ,
- {457, "NCBIstdaa" ,1,0,0,0,0,0,0,0,NULL,&atx[132],NULL,0,&atx[148]} ,
- {0, "gap" ,128,10,0,0,0,0,0,0,NULL,&atx[148],NULL,0,NULL} ,
- {458, "Seq-gap" ,1,0,0,0,0,0,0,0,NULL,&atx[20],&atx[149],0,&atx[190]} ,
- {0, "type" ,128,0,0,0,0,0,0,0,NULL,&atx[16],&avnx[140],0,&atx[150]} ,
- {0, "linkage" ,128,1,0,1,0,0,0,0,NULL,&atx[16],&avnx[150],0,NULL} ,
- {0, "ext" ,128,7,0,1,0,0,0,0,NULL,&atx[152],NULL,0,&atx[172]} ,
- {413, "Seq-ext" ,1,0,0,0,0,1,0,0,NULL,&atx[39],&atx[153],0,&atx[173]} ,
- {0, "seg" ,128,0,0,0,0,0,0,0,NULL,&atx[154],NULL,0,&atx[156]} ,
- {443, "Seg-ext" ,1,0,0,0,0,0,0,0,NULL,&atx[26],&atx[155],0,&atx[157]} ,
+ {0, "ncbi4na" ,128,3,0,0,0,0,0,0,NULL,&atx[135],NULL,0,&atx[136]} ,
+ {452, "NCBI4na" ,1,0,0,0,0,0,0,0,NULL,&atx[133],NULL,0,&atx[137]} ,
+ {0, "ncbi8na" ,128,4,0,0,0,0,0,0,NULL,&atx[137],NULL,0,&atx[138]} ,
+ {453, "NCBI8na" ,1,0,0,0,0,0,0,0,NULL,&atx[133],NULL,0,&atx[139]} ,
+ {0, "ncbipna" ,128,5,0,0,0,0,0,0,NULL,&atx[139],NULL,0,&atx[140]} ,
+ {454, "NCBIpna" ,1,0,0,0,0,0,0,0,NULL,&atx[133],NULL,0,&atx[141]} ,
+ {0, "ncbi8aa" ,128,6,0,0,0,0,0,0,NULL,&atx[141],NULL,0,&atx[142]} ,
+ {455, "NCBI8aa" ,1,0,0,0,0,0,0,0,NULL,&atx[133],NULL,0,&atx[143]} ,
+ {0, "ncbieaa" ,128,7,0,0,0,0,0,0,NULL,&atx[143],NULL,0,&atx[144]} ,
+ {456, "NCBIeaa" ,1,0,0,0,0,0,0,0,NULL,&atx[44],NULL,0,&atx[145]} ,
+ {0, "ncbipaa" ,128,8,0,0,0,0,0,0,NULL,&atx[145],NULL,0,&atx[146]} ,
+ {457, "NCBIpaa" ,1,0,0,0,0,0,0,0,NULL,&atx[133],NULL,0,&atx[147]} ,
+ {0, "ncbistdaa" ,128,9,0,0,0,0,0,0,NULL,&atx[147],NULL,0,&atx[148]} ,
+ {458, "NCBIstdaa" ,1,0,0,0,0,0,0,0,NULL,&atx[133],NULL,0,&atx[149]} ,
+ {0, "gap" ,128,10,0,0,0,0,0,0,NULL,&atx[149],NULL,0,NULL} ,
+ {459, "Seq-gap" ,1,0,0,0,0,0,0,0,NULL,&atx[20],&atx[150],0,&atx[191]} ,
+ {0, "type" ,128,0,0,0,0,0,0,0,NULL,&atx[16],&avnx[143],0,&atx[151]} ,
+ {0, "linkage" ,128,1,0,1,0,0,0,0,NULL,&atx[16],&avnx[153],0,NULL} ,
+ {0, "ext" ,128,7,0,1,0,0,0,0,NULL,&atx[153],NULL,0,&atx[173]} ,
+ {413, "Seq-ext" ,1,0,0,0,0,1,0,0,NULL,&atx[39],&atx[154],0,&atx[174]} ,
+ {0, "seg" ,128,0,0,0,0,0,0,0,NULL,&atx[155],NULL,0,&atx[157]} ,
+ {444, "Seg-ext" ,1,0,0,0,0,0,0,0,NULL,&atx[26],&atx[156],0,&atx[158]} ,
{0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[62],NULL,0,NULL} ,
- {0, "ref" ,128,1,0,0,0,0,0,0,NULL,&atx[157],NULL,0,&atx[158]} ,
- {444, "Ref-ext" ,1,0,0,0,0,0,0,0,NULL,&atx[62],NULL,0,&atx[159]} ,
- {0, "map" ,128,2,0,0,0,0,0,0,NULL,&atx[159],NULL,0,&atx[162]} ,
- {445, "Map-ext" ,1,0,0,0,0,0,0,0,NULL,&atx[26],&atx[160],0,&atx[165]} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[161],NULL,0,NULL} ,
- {424, "Seq-feat" ,1,0,0,0,0,0,1,0,NULL,NULL,NULL,0,&atx[205]} ,
- {0, "delta" ,128,3,0,0,0,0,0,0,NULL,&atx[163],NULL,0,NULL} ,
- {417, "Delta-ext" ,1,0,0,0,0,1,0,0,NULL,&atx[26],&atx[164],0,&atx[51]} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[165],NULL,0,NULL} ,
- {446, "Delta-seq" ,1,0,0,0,0,0,0,0,NULL,&atx[39],&atx[166],0,&atx[177]} ,
- {0, "loc" ,128,0,0,0,0,0,0,0,NULL,&atx[62],NULL,0,&atx[167]} ,
- {0, "literal" ,128,1,0,0,0,0,0,0,NULL,&atx[168],NULL,0,NULL} ,
- {416, "Seq-literal" ,1,0,0,0,0,1,0,0,NULL,&atx[20],&atx[169],0,&atx[163]} ,
- {0, "length" ,128,0,0,0,0,0,0,0,NULL,&atx[16],NULL,0,&atx[170]} ,
- {0, "fuzz" ,128,1,0,1,0,0,0,0,NULL,&atx[121],NULL,0,&atx[171]} ,
- {0, "seq-data" ,128,2,0,1,0,0,0,0,NULL,&atx[125],NULL,0,NULL} ,
- {0, "hist" ,128,8,0,1,0,0,0,0,NULL,&atx[173],NULL,0,NULL} ,
- {414, "Seq-hist" ,1,0,0,0,0,1,0,0,NULL,&atx[20],&atx[174],0,&atx[116]} ,
- {0, "assembly" ,128,0,0,1,0,0,0,0,NULL,&atx[60],&atx[175],0,&atx[176]} ,
+ {0, "ref" ,128,1,0,0,0,0,0,0,NULL,&atx[158],NULL,0,&atx[159]} ,
+ {445, "Ref-ext" ,1,0,0,0,0,0,0,0,NULL,&atx[62],NULL,0,&atx[160]} ,
+ {0, "map" ,128,2,0,0,0,0,0,0,NULL,&atx[160],NULL,0,&atx[163]} ,
+ {446, "Map-ext" ,1,0,0,0,0,0,0,0,NULL,&atx[26],&atx[161],0,&atx[166]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[162],NULL,0,NULL} ,
+ {424, "Seq-feat" ,1,0,0,0,0,0,1,0,NULL,NULL,NULL,0,&atx[206]} ,
+ {0, "delta" ,128,3,0,0,0,0,0,0,NULL,&atx[164],NULL,0,NULL} ,
+ {417, "Delta-ext" ,1,0,0,0,0,1,0,0,NULL,&atx[26],&atx[165],0,&atx[51]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[166],NULL,0,NULL} ,
+ {447, "Delta-seq" ,1,0,0,0,0,0,0,0,NULL,&atx[39],&atx[167],0,&atx[178]} ,
+ {0, "loc" ,128,0,0,0,0,0,0,0,NULL,&atx[62],NULL,0,&atx[168]} ,
+ {0, "literal" ,128,1,0,0,0,0,0,0,NULL,&atx[169],NULL,0,NULL} ,
+ {416, "Seq-literal" ,1,0,0,0,0,1,0,0,NULL,&atx[20],&atx[170],0,&atx[164]} ,
+ {0, "length" ,128,0,0,0,0,0,0,0,NULL,&atx[16],NULL,0,&atx[171]} ,
+ {0, "fuzz" ,128,1,0,1,0,0,0,0,NULL,&atx[122],NULL,0,&atx[172]} ,
+ {0, "seq-data" ,128,2,0,1,0,0,0,0,NULL,&atx[126],NULL,0,NULL} ,
+ {0, "hist" ,128,8,0,1,0,0,0,0,NULL,&atx[174],NULL,0,NULL} ,
+ {414, "Seq-hist" ,1,0,0,0,0,1,0,0,NULL,&atx[20],&atx[175],0,&atx[117]} ,
+ {0, "assembly" ,128,0,0,1,0,0,0,0,NULL,&atx[60],&atx[176],0,&atx[177]} ,
{0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[32],NULL,0,NULL} ,
- {0, "replaces" ,128,1,0,1,0,0,0,0,NULL,&atx[177],NULL,0,&atx[181]} ,
- {447, "Seq-hist-rec" ,1,0,0,0,0,0,0,0,NULL,&atx[20],&atx[178],0,&atx[127]} ,
- {0, "date" ,128,0,0,1,0,0,0,0,NULL,&atx[51],NULL,0,&atx[179]} ,
- {0, "ids" ,128,1,0,0,0,0,0,0,NULL,&atx[60],&atx[180],0,NULL} ,
+ {0, "replaces" ,128,1,0,1,0,0,0,0,NULL,&atx[178],NULL,0,&atx[182]} ,
+ {448, "Seq-hist-rec" ,1,0,0,0,0,0,0,0,NULL,&atx[20],&atx[179],0,&atx[128]} ,
+ {0, "date" ,128,0,0,1,0,0,0,0,NULL,&atx[51],NULL,0,&atx[180]} ,
+ {0, "ids" ,128,1,0,0,0,0,0,0,NULL,&atx[60],&atx[181],0,NULL} ,
{0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[54],NULL,0,NULL} ,
- {0, "replaced-by" ,128,2,0,1,0,0,0,0,NULL,&atx[177],NULL,0,&atx[182]} ,
- {0, "deleted" ,128,3,0,1,0,0,0,0,NULL,&atx[39],&atx[183],0,NULL} ,
- {0, "bool" ,128,0,0,0,0,0,0,0,NULL,&atx[18],NULL,0,&atx[184]} ,
+ {0, "replaced-by" ,128,2,0,1,0,0,0,0,NULL,&atx[178],NULL,0,&atx[183]} ,
+ {0, "deleted" ,128,3,0,1,0,0,0,0,NULL,&atx[39],&atx[184],0,NULL} ,
+ {0, "bool" ,128,0,0,0,0,0,0,0,NULL,&atx[18],NULL,0,&atx[185]} ,
{0, "date" ,128,1,0,0,0,0,0,0,NULL,&atx[51],NULL,0,NULL} ,
- {0, "annot" ,128,3,0,1,0,0,0,0,NULL,&atx[60],&atx[186],0,NULL} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[187],NULL,0,NULL} ,
- {409, "Seq-annot" ,1,0,0,0,0,1,0,0,NULL,&atx[20],&atx[188],0,&atx[125]} ,
- {0, "id" ,128,0,0,1,0,0,0,0,NULL,&atx[60],&atx[189],0,&atx[195]} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[190],NULL,0,NULL} ,
- {459, "Annot-id" ,1,0,0,0,0,0,0,0,NULL,&atx[39],&atx[191],0,&atx[56]} ,
- {0, "local" ,128,0,0,0,0,0,0,0,NULL,&atx[192],NULL,0,&atx[193]} ,
+ {0, "annot" ,128,3,0,1,0,0,0,0,NULL,&atx[60],&atx[187],0,NULL} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[188],NULL,0,NULL} ,
+ {409, "Seq-annot" ,1,0,0,0,0,1,0,0,NULL,&atx[20],&atx[189],0,&atx[126]} ,
+ {0, "id" ,128,0,0,1,0,0,0,0,NULL,&atx[60],&atx[190],0,&atx[196]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[191],NULL,0,NULL} ,
+ {460, "Annot-id" ,1,0,0,0,0,0,0,0,NULL,&atx[39],&atx[192],0,&atx[56]} ,
+ {0, "local" ,128,0,0,0,0,0,0,0,NULL,&atx[193],NULL,0,&atx[194]} ,
{421, "Object-id" ,1,0,0,0,0,0,1,0,NULL,NULL,NULL,0,&atx[49]} ,
- {0, "ncbi" ,128,1,0,0,0,0,0,0,NULL,&atx[16],NULL,0,&atx[194]} ,
+ {0, "ncbi" ,128,1,0,0,0,0,0,0,NULL,&atx[16],NULL,0,&atx[195]} ,
{0, "general" ,128,2,0,0,0,0,0,0,NULL,&atx[86],NULL,0,NULL} ,
- {0, "db" ,128,1,0,1,0,0,0,0,NULL,&atx[16],&avnx[153],0,&atx[196]} ,
- {0, "name" ,128,2,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[197]} ,
- {0, "desc" ,128,3,0,1,0,0,0,0,NULL,&atx[63],NULL,0,&atx[198]} ,
- {0, "data" ,128,4,0,0,0,0,0,0,NULL,&atx[39],&atx[199],0,NULL} ,
- {0, "ftable" ,128,0,0,0,0,0,0,0,NULL,&atx[60],&atx[200],0,&atx[201]} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[161],NULL,0,NULL} ,
- {0, "align" ,128,1,0,0,0,0,0,0,NULL,&atx[60],&atx[202],0,&atx[203]} ,
+ {0, "db" ,128,1,0,1,0,0,0,0,NULL,&atx[16],&avnx[156],0,&atx[197]} ,
+ {0, "name" ,128,2,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[198]} ,
+ {0, "desc" ,128,3,0,1,0,0,0,0,NULL,&atx[63],NULL,0,&atx[199]} ,
+ {0, "data" ,128,4,0,0,0,0,0,0,NULL,&atx[39],&atx[200],0,NULL} ,
+ {0, "ftable" ,128,0,0,0,0,0,0,0,NULL,&atx[60],&atx[201],0,&atx[202]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[162],NULL,0,NULL} ,
+ {0, "align" ,128,1,0,0,0,0,0,0,NULL,&atx[60],&atx[203],0,&atx[204]} ,
{0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[32],NULL,0,NULL} ,
- {0, "graph" ,128,2,0,0,0,0,0,0,NULL,&atx[60],&atx[204],0,&atx[206]} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[205],NULL,0,NULL} ,
+ {0, "graph" ,128,2,0,0,0,0,0,0,NULL,&atx[60],&atx[205],0,&atx[207]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[206],NULL,0,NULL} ,
{425, "Seq-graph" ,1,0,0,0,0,0,1,0,NULL,NULL,NULL,0,&atx[8]} ,
- {0, "ids" ,128,3,0,0,0,0,0,0,NULL,&atx[60],&atx[207],0,&atx[208]} ,
+ {0, "ids" ,128,3,0,0,0,0,0,0,NULL,&atx[60],&atx[208],0,&atx[209]} ,
{0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[54],NULL,0,NULL} ,
- {0, "locs" ,128,4,0,0,0,0,0,0,NULL,&atx[60],&atx[209],0,NULL} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[62],NULL,0,NULL} };
+ {0, "locs" ,128,4,0,0,0,0,0,0,NULL,&atx[60],&atx[210],0,&atx[211]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[62],NULL,0,NULL} ,
+ {0, "seq-table" ,128,5,0,0,0,0,0,0,NULL,&atx[212],NULL,0,NULL} ,
+ {437, "Seq-table" ,1,0,0,0,0,0,1,0,NULL,NULL,NULL,0,&atx[76]} };
static AsnModule ampx[1] = {
- { "NCBI-Sequence" , "asnseq.h16",&atx[0],NULL,NULL,0,0} };
+ { "NCBI-Sequence" , "asnseq.h19",&atx[0],NULL,NULL,0,0} };
static AsnValxNodePtr avn = avnx;
static AsnTypePtr at = atx;
@@ -419,9 +425,9 @@ static AsnModulePtr amp = ampx;
#define BIOSEQ_id &at[66]
#define BIOSEQ_id_E &at[67]
#define BIOSEQ_descr &at[68]
-#define BIOSEQ_inst &at[115]
-#define BIOSEQ_annot &at[185]
-#define BIOSEQ_annot_E &at[186]
+#define BIOSEQ_inst &at[116]
+#define BIOSEQ_annot &at[186]
+#define BIOSEQ_annot_E &at[187]
#define GIBB_MOL &at[73]
@@ -432,6 +438,7 @@ static AsnModulePtr amp = ampx;
#define MOLINFO_tech &at[112]
#define MOLINFO_techexp &at[113]
#define MOLINFO_completeness &at[114]
+#define MOLINFO_gbmoltype &at[115]
#define NUMBERING &at[12]
#define NUMBERING_cont &at[13]
@@ -452,36 +459,37 @@ static AsnModulePtr amp = ampx;
#define PUBDESC_comment &at[46]
#define PUBDESC_reftype &at[47]
-#define SEQ_ANNOT &at[187]
-#define SEQ_ANNOT_id &at[188]
-#define SEQ_ANNOT_id_E &at[189]
-#define SEQ_ANNOT_db &at[195]
-#define SEQ_ANNOT_name &at[196]
-#define SEQ_ANNOT_desc &at[197]
-#define SEQ_ANNOT_data &at[198]
-#define SEQ_ANNOT_data_ftable &at[199]
-#define SEQ_ANNOT_data_ftable_E &at[200]
-#define SEQ_ANNOT_data_align &at[201]
-#define SEQ_ANNOT_data_align_E &at[202]
-#define SEQ_ANNOT_data_graph &at[203]
-#define SEQ_ANNOT_data_graph_E &at[204]
-#define SEQ_ANNOT_data_ids &at[206]
-#define SEQ_ANNOT_data_ids_E &at[207]
-#define SEQ_ANNOT_data_locs &at[208]
-#define SEQ_ANNOT_data_locs_E &at[209]
-
-#define SEQ_DATA &at[125]
-#define SEQ_DATA_iupacna &at[126]
-#define SEQ_DATA_iupacaa &at[128]
-#define SEQ_DATA_ncbi2na &at[130]
-#define SEQ_DATA_ncbi4na &at[133]
-#define SEQ_DATA_ncbi8na &at[135]
-#define SEQ_DATA_ncbipna &at[137]
-#define SEQ_DATA_ncbi8aa &at[139]
-#define SEQ_DATA_ncbieaa &at[141]
-#define SEQ_DATA_ncbipaa &at[143]
-#define SEQ_DATA_ncbistdaa &at[145]
-#define SEQ_DATA_gap &at[147]
+#define SEQ_ANNOT &at[188]
+#define SEQ_ANNOT_id &at[189]
+#define SEQ_ANNOT_id_E &at[190]
+#define SEQ_ANNOT_db &at[196]
+#define SEQ_ANNOT_name &at[197]
+#define SEQ_ANNOT_desc &at[198]
+#define SEQ_ANNOT_data &at[199]
+#define SEQ_ANNOT_data_ftable &at[200]
+#define SEQ_ANNOT_data_ftable_E &at[201]
+#define SEQ_ANNOT_data_align &at[202]
+#define SEQ_ANNOT_data_align_E &at[203]
+#define SEQ_ANNOT_data_graph &at[204]
+#define SEQ_ANNOT_data_graph_E &at[205]
+#define SEQ_ANNOT_data_ids &at[207]
+#define SEQ_ANNOT_data_ids_E &at[208]
+#define SEQ_ANNOT_data_locs &at[209]
+#define SEQ_ANNOT_data_locs_E &at[210]
+#define SEQ_ANNOT_data_seq_table &at[211]
+
+#define SEQ_DATA &at[126]
+#define SEQ_DATA_iupacna &at[127]
+#define SEQ_DATA_iupacaa &at[129]
+#define SEQ_DATA_ncbi2na &at[131]
+#define SEQ_DATA_ncbi4na &at[134]
+#define SEQ_DATA_ncbi8na &at[136]
+#define SEQ_DATA_ncbipna &at[138]
+#define SEQ_DATA_ncbi8aa &at[140]
+#define SEQ_DATA_ncbieaa &at[142]
+#define SEQ_DATA_ncbipaa &at[144]
+#define SEQ_DATA_ncbistdaa &at[146]
+#define SEQ_DATA_gap &at[148]
#define SEQDESC &at[71]
#define SEQDESC_mol_type &at[72]
@@ -513,39 +521,39 @@ static AsnModulePtr amp = ampx;
#define SEQ_DESCR &at[69]
#define SEQ_DESCR_E &at[70]
-#define SEQ_EXT &at[152]
-#define SEQ_EXT_seg &at[153]
-#define SEQ_EXT_ref &at[156]
-#define SEQ_EXT_map &at[158]
-#define SEQ_EXT_delta &at[162]
-
-#define SEQ_HIST &at[173]
-#define SEQ_HIST_assembly &at[174]
-#define SEQ_HIST_assembly_E &at[175]
-#define SEQ_HIST_replaces &at[176]
-#define SEQ_HIST_replaced_by &at[181]
-#define SEQ_HIST_deleted &at[182]
-#define SEQ_HIST_deleted_bool &at[183]
-#define SEQ_HIST_deleted_date &at[184]
-
-#define SEQ_INST &at[116]
-#define SEQ_INST_repr &at[117]
-#define SEQ_INST_mol &at[118]
-#define SEQ_INST_length &at[119]
-#define SEQ_INST_fuzz &at[120]
-#define SEQ_INST_topology &at[122]
-#define SEQ_INST_strand &at[123]
-#define SEQ_INST_seq_data &at[124]
-#define SEQ_INST_ext &at[151]
-#define SEQ_INST_hist &at[172]
-
-#define SEQ_LITERAL &at[168]
-#define SEQ_LITERAL_length &at[169]
-#define SEQ_LITERAL_fuzz &at[170]
-#define SEQ_LITERAL_seq_data &at[171]
-
-#define DELTA_EXT &at[163]
-#define DELTA_EXT_E &at[164]
+#define SEQ_EXT &at[153]
+#define SEQ_EXT_seg &at[154]
+#define SEQ_EXT_ref &at[157]
+#define SEQ_EXT_map &at[159]
+#define SEQ_EXT_delta &at[163]
+
+#define SEQ_HIST &at[174]
+#define SEQ_HIST_assembly &at[175]
+#define SEQ_HIST_assembly_E &at[176]
+#define SEQ_HIST_replaces &at[177]
+#define SEQ_HIST_replaced_by &at[182]
+#define SEQ_HIST_deleted &at[183]
+#define SEQ_HIST_deleted_bool &at[184]
+#define SEQ_HIST_deleted_date &at[185]
+
+#define SEQ_INST &at[117]
+#define SEQ_INST_repr &at[118]
+#define SEQ_INST_mol &at[119]
+#define SEQ_INST_length &at[120]
+#define SEQ_INST_fuzz &at[121]
+#define SEQ_INST_topology &at[123]
+#define SEQ_INST_strand &at[124]
+#define SEQ_INST_seq_data &at[125]
+#define SEQ_INST_ext &at[152]
+#define SEQ_INST_hist &at[173]
+
+#define SEQ_LITERAL &at[169]
+#define SEQ_LITERAL_length &at[170]
+#define SEQ_LITERAL_fuzz &at[171]
+#define SEQ_LITERAL_seq_data &at[172]
+
+#define DELTA_EXT &at[164]
+#define DELTA_EXT_E &at[165]
#define GIBB_MOD &at[76]
@@ -570,51 +578,51 @@ static AsnModulePtr amp = ampx;
#define NUM_REAL_b &at[37]
#define NUM_REAL_units &at[38]
-#define SEG_EXT &at[154]
-#define SEG_EXT_E &at[155]
+#define SEG_EXT &at[155]
+#define SEG_EXT_E &at[156]
-#define REF_EXT &at[157]
+#define REF_EXT &at[158]
-#define MAP_EXT &at[159]
-#define MAP_EXT_E &at[160]
+#define MAP_EXT &at[160]
+#define MAP_EXT_E &at[161]
-#define DELTA_SEQ &at[165]
-#define DELTA_SEQ_loc &at[166]
-#define DELTA_SEQ_literal &at[167]
+#define DELTA_SEQ &at[166]
+#define DELTA_SEQ_loc &at[167]
+#define DELTA_SEQ_literal &at[168]
-#define SEQ_HIST_REC &at[177]
-#define SEQ_HIST_REC_date &at[178]
-#define SEQ_HIST_REC_ids &at[179]
-#define SEQ_HIST_REC_ids_E &at[180]
+#define SEQ_HIST_REC &at[178]
+#define SEQ_HIST_REC_date &at[179]
+#define SEQ_HIST_REC_ids &at[180]
+#define SEQ_HIST_REC_ids_E &at[181]
-#define IUPACNA &at[127]
+#define IUPACNA &at[128]
-#define IUPACAA &at[129]
+#define IUPACAA &at[130]
-#define NCBI2NA &at[131]
+#define NCBI2NA &at[132]
-#define NCBI4NA &at[134]
+#define NCBI4NA &at[135]
-#define NCBI8NA &at[136]
+#define NCBI8NA &at[137]
-#define NCBIPNA &at[138]
+#define NCBIPNA &at[139]
-#define NCBI8AA &at[140]
+#define NCBI8AA &at[141]
-#define NCBIEAA &at[142]
+#define NCBIEAA &at[143]
-#define NCBIPAA &at[144]
+#define NCBIPAA &at[145]
-#define NCBISTDAA &at[146]
+#define NCBISTDAA &at[147]
-#define SEQ_GAP &at[148]
-#define SEQ_GAP_type &at[149]
-#define SEQ_GAP_linkage &at[150]
+#define SEQ_GAP &at[149]
+#define SEQ_GAP_type &at[150]
+#define SEQ_GAP_linkage &at[151]
-#define ANNOT_ID &at[190]
-#define ANNOT_ID_local &at[191]
-#define ANNOT_ID_ncbi &at[193]
-#define ANNOT_ID_general &at[194]
+#define ANNOT_ID &at[191]
+#define ANNOT_ID_local &at[192]
+#define ANNOT_ID_ncbi &at[194]
+#define ANNOT_ID_general &at[195]
#define ALIGN_DEF &at[56]
#define ALIGN_DEF_align_type &at[57]
diff --git a/asnstat/asntable.h b/asnstat/asntable.h
new file mode 100644
index 00000000..92e0b51a
--- /dev/null
+++ b/asnstat/asntable.h
@@ -0,0 +1,195 @@
+/***********************************************************************
+*
+**
+* Automatic header module from ASNTOOL
+*
+************************************************************************/
+
+#ifndef _ASNTOOL_
+#include <asn.h>
+#endif
+
+static char * asnfilename = "asntable.h15";
+static AsnValxNode avnx[32] = {
+ {20,"location" ,0,0.0,&avnx[1] } ,
+ {20,"location-id" ,1,0.0,&avnx[2] } ,
+ {20,"location-gi" ,2,0.0,&avnx[3] } ,
+ {20,"location-from" ,3,0.0,&avnx[4] } ,
+ {20,"location-to" ,4,0.0,&avnx[5] } ,
+ {20,"location-strand" ,5,0.0,&avnx[6] } ,
+ {20,"location-fuzz-from-lim" ,6,0.0,&avnx[7] } ,
+ {20,"location-fuzz-to-lim" ,7,0.0,&avnx[8] } ,
+ {20,"product" ,10,0.0,&avnx[9] } ,
+ {20,"product-id" ,11,0.0,&avnx[10] } ,
+ {20,"product-gi" ,12,0.0,&avnx[11] } ,
+ {20,"product-from" ,13,0.0,&avnx[12] } ,
+ {20,"product-to" ,14,0.0,&avnx[13] } ,
+ {20,"product-strand" ,15,0.0,&avnx[14] } ,
+ {20,"product-fuzz-from-lim" ,16,0.0,&avnx[15] } ,
+ {20,"product-fuzz-to-lim" ,17,0.0,&avnx[16] } ,
+ {20,"id-local" ,20,0.0,&avnx[17] } ,
+ {20,"xref-id-local" ,21,0.0,&avnx[18] } ,
+ {20,"partial" ,22,0.0,&avnx[19] } ,
+ {20,"comment" ,23,0.0,&avnx[20] } ,
+ {20,"title" ,24,0.0,&avnx[21] } ,
+ {20,"ext" ,25,0.0,&avnx[22] } ,
+ {20,"qual" ,26,0.0,&avnx[23] } ,
+ {20,"dbxref" ,27,0.0,&avnx[24] } ,
+ {20,"data-imp-key" ,30,0.0,&avnx[25] } ,
+ {20,"data-region" ,31,0.0,&avnx[26] } ,
+ {20,"data-cdregion-frame" ,32,0.0,&avnx[27] } ,
+ {20,"ext-type" ,40,0.0,&avnx[28] } ,
+ {20,"qual-qual" ,41,0.0,&avnx[29] } ,
+ {20,"qual-val" ,42,0.0,&avnx[30] } ,
+ {20,"dbxref-db" ,43,0.0,&avnx[31] } ,
+ {20,"dbxref-tag" ,44,0.0,NULL } };
+
+static AsnType atx[68] = {
+ {401, "SeqTable-column-info" ,1,0,0,0,0,1,0,0,NULL,&atx[6],&atx[1],0,&atx[7]} ,
+ {0, "title" ,128,0,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[3]} ,
+ {323, "VisibleString" ,0,26,0,0,0,0,0,0,NULL,NULL,NULL,0,NULL} ,
+ {0, "field-id" ,128,1,0,1,0,0,0,0,NULL,&atx[4],&avnx[0],0,&atx[5]} ,
+ {302, "INTEGER" ,0,2,0,0,0,0,0,0,NULL,NULL,NULL,0,NULL} ,
+ {0, "field-name" ,128,2,0,1,0,0,0,0,NULL,&atx[2],NULL,0,NULL} ,
+ {311, "SEQUENCE" ,0,16,0,0,0,0,0,0,NULL,NULL,NULL,0,NULL} ,
+ {402, "SeqTable-column" ,1,0,0,0,0,1,0,0,NULL,&atx[6],&atx[8],0,&atx[62]} ,
+ {0, "header" ,128,0,0,0,0,0,0,0,NULL,&atx[0],NULL,0,&atx[9]} ,
+ {0, "data" ,128,1,0,1,0,0,0,0,NULL,&atx[10],NULL,0,&atx[45]} ,
+ {409, "SeqTable-multi-data" ,1,0,0,0,0,0,0,0,NULL,&atx[44],&atx[11],0,&atx[51]} ,
+ {0, "int" ,128,0,0,0,0,0,0,0,NULL,&atx[13],&atx[12],0,&atx[14]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[4],NULL,0,NULL} ,
+ {312, "SEQUENCE OF" ,0,16,0,0,0,0,0,0,NULL,NULL,NULL,0,NULL} ,
+ {0, "real" ,128,1,0,0,0,0,0,0,NULL,&atx[13],&atx[15],0,&atx[17]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[16],NULL,0,NULL} ,
+ {309, "REAL" ,0,9,0,0,0,0,0,0,NULL,NULL,NULL,0,NULL} ,
+ {0, "string" ,128,2,0,0,0,0,0,0,NULL,&atx[13],&atx[18],0,&atx[19]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[2],NULL,0,NULL} ,
+ {0, "bytes" ,128,3,0,0,0,0,0,0,NULL,&atx[13],&atx[20],0,&atx[22]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[21],NULL,0,NULL} ,
+ {304, "OCTET STRING" ,0,4,0,0,0,0,0,0,NULL,NULL,NULL,0,NULL} ,
+ {0, "common-string" ,128,4,0,0,0,0,0,0,NULL,&atx[23],NULL,0,&atx[28]} ,
+ {407, "CommonString-table" ,1,0,0,0,0,0,0,0,NULL,&atx[6],&atx[24],0,&atx[29]} ,
+ {0, "strings" ,128,0,0,0,0,0,0,0,NULL,&atx[13],&atx[25],0,&atx[26]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[2],NULL,0,NULL} ,
+ {0, "indexes" ,128,1,0,0,0,0,0,0,NULL,&atx[13],&atx[27],0,NULL} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[4],NULL,0,NULL} ,
+ {0, "common-bytes" ,128,5,0,0,0,0,0,0,NULL,&atx[29],NULL,0,&atx[34]} ,
+ {408, "CommonBytes-table" ,1,0,0,0,0,0,0,0,NULL,&atx[6],&atx[30],0,&atx[10]} ,
+ {0, "bytes" ,128,0,0,0,0,0,0,0,NULL,&atx[13],&atx[31],0,&atx[32]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[21],NULL,0,NULL} ,
+ {0, "indexes" ,128,1,0,0,0,0,0,0,NULL,&atx[13],&atx[33],0,NULL} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[4],NULL,0,NULL} ,
+ {0, "bit" ,128,6,0,0,0,0,0,0,NULL,&atx[21],NULL,0,&atx[35]} ,
+ {0, "loc" ,128,7,0,0,0,0,0,0,NULL,&atx[13],&atx[36],0,&atx[38]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[37],NULL,0,NULL} ,
+ {405, "Seq-loc" ,1,0,0,0,0,0,1,0,NULL,NULL,NULL,0,&atx[43]} ,
+ {0, "id" ,128,8,0,0,0,0,0,0,NULL,&atx[13],&atx[39],0,&atx[41]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[40],NULL,0,NULL} ,
+ {404, "Seq-id" ,1,0,0,0,0,0,1,0,NULL,NULL,NULL,0,&atx[37]} ,
+ {0, "interval" ,128,9,0,0,0,0,0,0,NULL,&atx[13],&atx[42],0,NULL} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[43],NULL,0,NULL} ,
+ {406, "Seq-interval" ,1,0,0,0,0,0,1,0,NULL,NULL,NULL,0,&atx[23]} ,
+ {315, "CHOICE" ,0,-1,0,0,0,0,0,0,NULL,NULL,NULL,0,NULL} ,
+ {0, "sparse" ,128,2,0,1,0,0,0,0,NULL,&atx[46],NULL,0,&atx[50]} ,
+ {411, "SeqTable-sparse-index" ,1,0,0,0,0,0,0,0,NULL,&atx[44],&atx[47],0,NULL} ,
+ {0, "indexes" ,128,0,0,0,0,0,0,0,NULL,&atx[13],&atx[48],0,&atx[49]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[4],NULL,0,NULL} ,
+ {0, "bit-set" ,128,1,0,0,0,0,0,0,NULL,&atx[21],NULL,0,NULL} ,
+ {0, "default" ,128,3,0,1,0,0,0,0,NULL,&atx[51],NULL,0,&atx[61]} ,
+ {410, "SeqTable-single-data" ,1,0,0,0,0,0,0,0,NULL,&atx[44],&atx[52],0,&atx[46]} ,
+ {0, "int" ,128,0,0,0,0,0,0,0,NULL,&atx[4],NULL,0,&atx[53]} ,
+ {0, "real" ,128,1,0,0,0,0,0,0,NULL,&atx[16],NULL,0,&atx[54]} ,
+ {0, "string" ,128,2,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[55]} ,
+ {0, "bytes" ,128,3,0,0,0,0,0,0,NULL,&atx[21],NULL,0,&atx[56]} ,
+ {0, "bit" ,128,4,0,0,0,0,0,0,NULL,&atx[57],NULL,0,&atx[58]} ,
+ {301, "BOOLEAN" ,0,1,0,0,0,0,0,0,NULL,NULL,NULL,0,NULL} ,
+ {0, "loc" ,128,5,0,0,0,0,0,0,NULL,&atx[37],NULL,0,&atx[59]} ,
+ {0, "id" ,128,6,0,0,0,0,0,0,NULL,&atx[40],NULL,0,&atx[60]} ,
+ {0, "interval" ,128,7,0,0,0,0,0,0,NULL,&atx[43],NULL,0,NULL} ,
+ {0, "sparse-other" ,128,4,0,1,0,0,0,0,NULL,&atx[51],NULL,0,NULL} ,
+ {403, "Seq-table" ,1,0,0,0,0,1,0,0,NULL,&atx[6],&atx[63],0,&atx[40]} ,
+ {0, "feat-type" ,128,0,0,0,0,0,0,0,NULL,&atx[4],NULL,0,&atx[64]} ,
+ {0, "feat-subtype" ,128,1,0,1,0,0,0,0,NULL,&atx[4],NULL,0,&atx[65]} ,
+ {0, "num-rows" ,128,2,0,0,0,0,0,0,NULL,&atx[4],NULL,0,&atx[66]} ,
+ {0, "columns" ,128,3,0,0,0,0,0,0,NULL,&atx[13],&atx[67],0,NULL} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[7],NULL,0,NULL} };
+
+static AsnModule ampx[1] = {
+ { "NCBI-SeqTable" , "asntable.h15",&atx[0],NULL,NULL,0,0} };
+
+static AsnValxNodePtr avn = avnx;
+static AsnTypePtr at = atx;
+static AsnModulePtr amp = ampx;
+
+
+
+/**************************************************
+*
+* Defines for Module NCBI-SeqTable
+*
+**************************************************/
+
+#define SEQTABLE_COLUMN_INFO &at[0]
+#define SEQTABLE_COLUMN_INFO_title &at[1]
+#define SEQTABLE_COLUMN_INFO_field_id &at[3]
+#define SEQTABLE_COLUMN_INFO_field_name &at[5]
+
+#define SEQTABLE_COLUMN &at[7]
+#define SEQTABLE_COLUMN_header &at[8]
+#define SEQTABLE_COLUMN_data &at[9]
+#define SEQTABLE_COLUMN_sparse &at[45]
+#define SEQTABLE_COLUMN_default &at[50]
+#define SEQTABLE_COLUMN_sparse_other &at[61]
+
+#define SEQ_TABLE &at[62]
+#define SEQ_TABLE_feat_type &at[63]
+#define SEQ_TABLE_feat_subtype &at[64]
+#define SEQ_TABLE_num_rows &at[65]
+#define SEQ_TABLE_columns &at[66]
+#define SEQ_TABLE_columns_E &at[67]
+
+#define COMMONSTRING_TABLE &at[23]
+#define COMMONSTRING_TABLE_strings &at[24]
+#define COMMONSTRING_TABLE_strings_E &at[25]
+#define COMMONSTRING_TABLE_indexes &at[26]
+#define COMMONSTRING_TABLE_indexes_E &at[27]
+
+#define COMMONBYTES_TABLE &at[29]
+#define COMMONBYTES_TABLE_bytes &at[30]
+#define COMMONBYTES_TABLE_bytes_E &at[31]
+#define COMMONBYTES_TABLE_indexes &at[32]
+#define COMMONBYTES_TABLE_indexes_E &at[33]
+
+#define SEQTABLE_MULTI_DATA &at[10]
+#define SEQTABLE_MULTI_DATA_int &at[11]
+#define SEQTABLE_MULTI_DATA_int_E &at[12]
+#define SEQTABLE_MULTI_DATA_real &at[14]
+#define SEQTABLE_MULTI_DATA_real_E &at[15]
+#define SEQTABLE_MULTI_DATA_string &at[17]
+#define SEQTABLE_MULTI_DATA_string_E &at[18]
+#define SEQTABLE_MULTI_DATA_bytes &at[19]
+#define SEQTABLE_MULTI_DATA_bytes_E &at[20]
+#define MULTI_DATA_common_string &at[22]
+#define MULTI_DATA_common_bytes &at[28]
+#define SEQTABLE_MULTI_DATA_bit &at[34]
+#define SEQTABLE_MULTI_DATA_loc &at[35]
+#define SEQTABLE_MULTI_DATA_loc_E &at[36]
+#define SEQTABLE_MULTI_DATA_id &at[38]
+#define SEQTABLE_MULTI_DATA_id_E &at[39]
+#define SEQTABLE_MULTI_DATA_interval &at[41]
+#define SEQTABLE_MULTI_DATA_interval_E &at[42]
+
+#define SEQTABLE_SINGLE_DATA &at[51]
+#define SEQTABLE_SINGLE_DATA_int &at[52]
+#define SEQTABLE_SINGLE_DATA_real &at[53]
+#define SEQTABLE_SINGLE_DATA_string &at[54]
+#define SEQTABLE_SINGLE_DATA_bytes &at[55]
+#define SEQTABLE_SINGLE_DATA_bit &at[56]
+#define SEQTABLE_SINGLE_DATA_loc &at[58]
+#define SEQTABLE_SINGLE_DATA_id &at[59]
+#define SEQTABLE_SINGLE_DATA_interval &at[60]
+
+#define SEQTABLE_SPARSE_INDEX &at[46]
+#define SEQTABLE_SPARSE_INDEX_indexes &at[47]
+#define SEQTABLE_SPARSE_INDEX_indexes_E &at[48]
+#define SEQTABLE_SPARSE_INDEX_bit_set &at[49]
diff --git a/biostruc/cdd/cdd.asn b/biostruc/cdd/cdd.asn
index 761ecadb..f2bef2b7 100644
--- a/biostruc/cdd/cdd.asn
+++ b/biostruc/cdd/cdd.asn
@@ -1,4 +1,4 @@
---$Revision: 1.25 $
+--$Revision: 1.26 $
--**********************************************************************
--
-- Definitions for CDD's
@@ -169,8 +169,9 @@ Cdd-descr ::= CHOICE {
readonly-status INTEGER { unassigned(0), -- to record read-only status
readonly (1), -- when CD is checked out from
readwrite (2), -- the tracking database, for
- other (255) }, -- use within curation software
- book-ref Cdd-book-ref
+ other (255) }, -- use within curation software
+ book-ref Cdd-book-ref, -- links to Entrez/books
+ attribution Pub -- add citations and/or author names
}
Cdd-descr-set ::= SET OF Cdd-descr
@@ -276,8 +277,9 @@ Align-annot ::= SEQUENCE {
-- "Heme binding site" or "catalytic
-- triad" etc., something that should
-- be used for labels in visualization
- evidence SEQUENCE OF Feature-evidence OPTIONAL -- evidence we can
- -- compute with
+ evidence SEQUENCE OF Feature-evidence OPTIONAL, -- evidence we can
+ -- compute with
+ type INTEGER OPTIONAL -- for typing annotated features
}
Align-annot-set ::= SEQUENCE OF Align-annot
@@ -363,7 +365,14 @@ Algorithm-type ::= SEQUENCE {
gapExtend INTEGER OPTIONAL,
gapScaleFactor INTEGER OPTIONAL,
nTerminalExt INTEGER OPTIONAL,
- cTerminalExt INTEGER OPTIONAL
+ cTerminalExt INTEGER OPTIONAL,
+ tree-scope INTEGER { allDescendants (0),
+ immediateChildrenOnly(1),
+ selfOnly (2),
+ other (255) } OPTIONAL,
+ coloring-scope INTEGER { allDescendants (0),
+ immediateChildrenOnly (1),
+ other (255) } OPTIONAL
}
Node-annotation ::= SEQUENCE {
diff --git a/biostruc/cdd/cdd.h b/biostruc/cdd/cdd.h
index 0640300e..9e50ad64 100644
--- a/biostruc/cdd/cdd.h
+++ b/biostruc/cdd/cdd.h
@@ -10,7 +10,7 @@
#endif
static char * asnfilename = "cdd.h24";
-static AsnValxNode avnx[87] = {
+static AsnValxNode avnx[94] = {
{20,"unassigned" ,0,0.0,&avnx[1] } ,
{20,"finished-ok" ,1,0.0,&avnx[2] } ,
{20,"pending-release" ,2,0.0,&avnx[3] } ,
@@ -79,27 +79,34 @@ static AsnValxNode avnx[87] = {
{20,"pam70" ,5,0.0,&avnx[66] } ,
{20,"pam250" ,6,0.0,&avnx[67] } ,
{20,"other" ,255,0.0,NULL } ,
+ {20,"allDescendants" ,0,0.0,&avnx[69] } ,
+ {20,"immediateChildrenOnly" ,1,0.0,&avnx[70] } ,
+ {20,"selfOnly" ,2,0.0,&avnx[71] } ,
+ {20,"other" ,255,0.0,NULL } ,
+ {20,"allDescendants" ,0,0.0,&avnx[73] } ,
+ {20,"immediateChildrenOnly" ,1,0.0,&avnx[74] } ,
+ {20,"other" ,255,0.0,NULL } ,
{2,NULL,0,0.0,NULL } ,
{2,NULL,0,0.0,NULL } ,
{2,NULL,1,0.0,NULL } ,
- {20,"unassigned" ,0,0.0,&avnx[72] } ,
- {20,"cd-info" ,1,0.0,&avnx[73] } ,
- {20,"align-annot" ,2,0.0,&avnx[74] } ,
- {20,"seq-list" ,3,0.0,&avnx[75] } ,
- {20,"seq-tree" ,4,0.0,&avnx[76] } ,
- {20,"merge-preview" ,5,0.0,&avnx[77] } ,
- {20,"cross-hits" ,6,0.0,&avnx[78] } ,
- {20,"notes" ,7,0.0,&avnx[79] } ,
- {20,"tax-tree" ,8,0.0,&avnx[80] } ,
- {20,"dart" ,9,0.0,&avnx[81] } ,
- {20,"dart-selected-rows" ,10,0.0,&avnx[82] } ,
+ {20,"unassigned" ,0,0.0,&avnx[79] } ,
+ {20,"cd-info" ,1,0.0,&avnx[80] } ,
+ {20,"align-annot" ,2,0.0,&avnx[81] } ,
+ {20,"seq-list" ,3,0.0,&avnx[82] } ,
+ {20,"seq-tree" ,4,0.0,&avnx[83] } ,
+ {20,"merge-preview" ,5,0.0,&avnx[84] } ,
+ {20,"cross-hits" ,6,0.0,&avnx[85] } ,
+ {20,"notes" ,7,0.0,&avnx[86] } ,
+ {20,"tax-tree" ,8,0.0,&avnx[87] } ,
+ {20,"dart" ,9,0.0,&avnx[88] } ,
+ {20,"dart-selected-rows" ,10,0.0,&avnx[89] } ,
{20,"other" ,255,0.0,NULL } ,
- {20,"unassigned" ,0,0.0,&avnx[84] } ,
- {20,"user-recorded" ,1,0.0,&avnx[85] } ,
- {20,"server-generated" ,2,0.0,&avnx[86] } ,
+ {20,"unassigned" ,0,0.0,&avnx[91] } ,
+ {20,"user-recorded" ,1,0.0,&avnx[92] } ,
+ {20,"server-generated" ,2,0.0,&avnx[93] } ,
{20,"other" ,255,0.0,NULL } };
-static AsnType atx[222] = {
+static AsnType atx[226] = {
{401, "Cdd-id" ,1,0,0,0,0,1,0,0,NULL,&atx[11],&atx[1],0,&atx[12]} ,
{0, "uid" ,128,0,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[3]} ,
{302, "INTEGER" ,0,2,0,0,0,0,0,0,NULL,NULL,NULL,0,NULL} ,
@@ -115,22 +122,22 @@ static AsnType atx[222] = {
{402, "Cdd-id-set" ,1,0,0,0,0,1,0,0,NULL,&atx[14],&atx[13],0,&atx[15]} ,
{0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[0],NULL,0,NULL} ,
{312, "SEQUENCE OF" ,0,16,0,0,0,0,0,0,NULL,NULL,NULL,0,NULL} ,
- {403, "Cdd" ,1,0,0,0,0,1,0,0,NULL,&atx[10],&atx[16],0,&atx[169]} ,
+ {403, "Cdd" ,1,0,0,0,0,1,0,0,NULL,&atx[10],&atx[16],0,&atx[173]} ,
{0, "name" ,128,0,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[17]} ,
{0, "id" ,128,1,0,0,0,0,0,0,NULL,&atx[12],NULL,0,&atx[18]} ,
- {0, "description" ,128,2,0,1,0,0,0,0,NULL,&atx[19],NULL,0,&atx[56]} ,
- {432, "Cdd-descr-set" ,1,0,0,0,0,0,0,0,NULL,&atx[55],&atx[20],0,&atx[68]} ,
+ {0, "description" ,128,2,0,1,0,0,0,0,NULL,&atx[19],NULL,0,&atx[57]} ,
+ {432, "Cdd-descr-set" ,1,0,0,0,0,0,0,0,NULL,&atx[56],&atx[20],0,&atx[69]} ,
{0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[21],NULL,0,NULL} ,
{431, "Cdd-descr" ,1,0,0,0,0,0,0,0,NULL,&atx[11],&atx[22],0,&atx[19]} ,
{0, "othername" ,128,0,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[23]} ,
{0, "category" ,128,1,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[24]} ,
{0, "comment" ,128,2,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[25]} ,
{0, "reference" ,128,3,0,0,0,0,0,0,NULL,&atx[26],NULL,0,&atx[27]} ,
- {410, "Pub" ,1,0,0,0,0,0,1,0,NULL,NULL,NULL,0,&atx[60]} ,
+ {410, "Pub" ,1,0,0,0,0,0,1,0,NULL,NULL,NULL,0,&atx[61]} ,
{0, "create-date" ,128,4,0,0,0,0,0,0,NULL,&atx[28],NULL,0,&atx[29]} ,
{409, "Date" ,1,0,0,0,0,0,1,0,NULL,NULL,NULL,0,&atx[26]} ,
{0, "tax-source" ,128,5,0,0,0,0,0,0,NULL,&atx[30],NULL,0,&atx[31]} ,
- {415, "Org-ref" ,1,0,0,0,0,0,1,0,NULL,NULL,NULL,0,&atx[108]} ,
+ {415, "Org-ref" ,1,0,0,0,0,0,1,0,NULL,NULL,NULL,0,&atx[109]} ,
{0, "source" ,128,6,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[32]} ,
{0, "status" ,128,7,0,0,0,0,0,0,NULL,&atx[2],&avnx[0],0,&atx[33]} ,
{0, "update-date" ,128,8,0,0,0,0,0,0,NULL,&atx[28],NULL,0,&atx[34]} ,
@@ -141,12 +148,12 @@ static AsnType atx[222] = {
{429, "Cdd-repeat" ,1,0,0,0,0,0,0,0,NULL,&atx[10],&atx[39],0,&atx[47]} ,
{0, "count" ,128,0,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[40]} ,
{0, "location" ,128,1,0,1,0,0,0,0,NULL,&atx[41],NULL,0,&atx[42]} ,
- {418, "Seq-loc" ,1,0,0,0,0,0,1,0,NULL,NULL,NULL,0,&atx[124]} ,
+ {418, "Seq-loc" ,1,0,0,0,0,0,1,0,NULL,NULL,NULL,0,&atx[125]} ,
{0, "avglen" ,128,2,0,1,0,0,0,0,NULL,&atx[2],NULL,0,NULL} ,
{0, "old-root" ,128,12,0,0,0,0,0,0,NULL,&atx[12],NULL,0,&atx[44]} ,
{0, "curation-status" ,128,13,0,0,0,0,0,0,NULL,&atx[2],&avnx[10],0,&atx[45]} ,
{0, "readonly-status" ,128,14,0,0,0,0,0,0,NULL,&atx[2],&avnx[20],0,&atx[46]} ,
- {0, "book-ref" ,128,15,0,0,0,0,0,0,NULL,&atx[47],NULL,0,NULL} ,
+ {0, "book-ref" ,128,15,0,0,0,0,0,0,NULL,&atx[47],NULL,0,&atx[55]} ,
{430, "Cdd-book-ref" ,1,0,0,0,0,0,0,0,NULL,&atx[10],&atx[48],0,&atx[21]} ,
{0, "bookname" ,128,0,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[49]} ,
{0, "textelement" ,128,1,0,0,0,0,0,0,NULL,&atx[50],&avnx[24],0,&atx[51]} ,
@@ -155,172 +162,176 @@ static AsnType atx[222] = {
{0, "subelementid" ,128,3,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[53]} ,
{0, "celementid" ,128,4,0,1,0,0,0,0,NULL,&atx[6],NULL,0,&atx[54]} ,
{0, "csubelementid" ,128,5,0,1,0,0,0,0,NULL,&atx[6],NULL,0,NULL} ,
+ {0, "attribution" ,128,16,0,0,0,0,0,0,NULL,&atx[26],NULL,0,NULL} ,
{314, "SET OF" ,0,17,0,0,0,0,0,0,NULL,NULL,NULL,0,NULL} ,
- {0, "seqannot" ,128,3,0,1,0,0,0,0,NULL,&atx[14],&atx[57],0,&atx[59]} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[58],NULL,0,NULL} ,
- {413, "Seq-annot" ,1,0,0,0,0,0,1,0,NULL,NULL,NULL,0,&atx[62]} ,
- {0, "features" ,128,4,0,1,0,0,0,0,NULL,&atx[60],NULL,0,&atx[61]} ,
- {411, "Biostruc-annot-set" ,1,0,0,0,0,0,1,0,NULL,NULL,NULL,0,&atx[66]} ,
- {0, "sequences" ,128,5,0,1,0,0,0,0,NULL,&atx[62],NULL,0,&atx[63]} ,
+ {0, "seqannot" ,128,3,0,1,0,0,0,0,NULL,&atx[14],&atx[58],0,&atx[60]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[59],NULL,0,NULL} ,
+ {413, "Seq-annot" ,1,0,0,0,0,0,1,0,NULL,NULL,NULL,0,&atx[63]} ,
+ {0, "features" ,128,4,0,1,0,0,0,0,NULL,&atx[61],NULL,0,&atx[62]} ,
+ {411, "Biostruc-annot-set" ,1,0,0,0,0,0,1,0,NULL,NULL,NULL,0,&atx[67]} ,
+ {0, "sequences" ,128,5,0,1,0,0,0,0,NULL,&atx[63],NULL,0,&atx[64]} ,
{414, "Seq-entry" ,1,0,0,0,0,0,1,0,NULL,NULL,NULL,0,&atx[30]} ,
- {0, "profile-range" ,128,6,0,1,0,0,0,0,NULL,&atx[64],NULL,0,&atx[65]} ,
+ {0, "profile-range" ,128,6,0,1,0,0,0,0,NULL,&atx[65],NULL,0,&atx[66]} ,
{417, "Seq-interval" ,1,0,0,0,0,0,1,0,NULL,NULL,NULL,0,&atx[41]} ,
- {0, "trunc-master" ,128,7,0,1,0,0,0,0,NULL,&atx[66],NULL,0,&atx[67]} ,
- {412, "Bioseq" ,1,0,0,0,0,0,1,0,NULL,NULL,NULL,0,&atx[58]} ,
- {0, "posfreq" ,128,8,0,1,0,0,0,0,NULL,&atx[68],NULL,0,&atx[76]} ,
- {433, "Matrix" ,1,0,0,0,0,0,0,0,NULL,&atx[10],&atx[69],0,&atx[78]} ,
- {0, "ncolumns" ,128,0,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[70]} ,
- {0, "nrows" ,128,1,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[71]} ,
- {0, "row-labels" ,128,2,0,1,0,0,0,0,NULL,&atx[14],&atx[72],0,&atx[73]} ,
+ {0, "trunc-master" ,128,7,0,1,0,0,0,0,NULL,&atx[67],NULL,0,&atx[68]} ,
+ {412, "Bioseq" ,1,0,0,0,0,0,1,0,NULL,NULL,NULL,0,&atx[59]} ,
+ {0, "posfreq" ,128,8,0,1,0,0,0,0,NULL,&atx[69],NULL,0,&atx[77]} ,
+ {433, "Matrix" ,1,0,0,0,0,0,0,0,NULL,&atx[10],&atx[70],0,&atx[79]} ,
+ {0, "ncolumns" ,128,0,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[71]} ,
+ {0, "nrows" ,128,1,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[72]} ,
+ {0, "row-labels" ,128,2,0,1,0,0,0,0,NULL,&atx[14],&atx[73],0,&atx[74]} ,
{0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[6],NULL,0,NULL} ,
- {0, "scale-factor" ,128,3,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[74]} ,
- {0, "columns" ,128,4,0,0,0,0,0,0,NULL,&atx[14],&atx[75],0,NULL} ,
+ {0, "scale-factor" ,128,3,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[75]} ,
+ {0, "columns" ,128,4,0,0,0,0,0,0,NULL,&atx[14],&atx[76],0,NULL} ,
{0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[2],NULL,0,NULL} ,
- {0, "scoremat" ,128,9,0,1,0,0,0,0,NULL,&atx[68],NULL,0,&atx[77]} ,
- {0, "distance" ,128,10,0,1,0,0,0,0,NULL,&atx[78],NULL,0,&atx[84]} ,
- {434, "Triangle" ,1,0,0,0,0,0,0,0,NULL,&atx[10],&atx[79],0,&atx[93]} ,
- {0, "nelements" ,128,0,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[80]} ,
- {0, "scores" ,128,1,0,1,0,0,0,0,NULL,&atx[81],NULL,0,&atx[82]} ,
- {420, "Score-set" ,1,0,0,0,0,0,1,0,NULL,NULL,NULL,0,&atx[127]} ,
- {0, "div-ranks" ,128,2,0,1,0,0,0,0,NULL,&atx[14],&atx[83],0,NULL} ,
+ {0, "scoremat" ,128,9,0,1,0,0,0,0,NULL,&atx[69],NULL,0,&atx[78]} ,
+ {0, "distance" ,128,10,0,1,0,0,0,0,NULL,&atx[79],NULL,0,&atx[85]} ,
+ {434, "Triangle" ,1,0,0,0,0,0,0,0,NULL,&atx[10],&atx[80],0,&atx[94]} ,
+ {0, "nelements" ,128,0,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[81]} ,
+ {0, "scores" ,128,1,0,1,0,0,0,0,NULL,&atx[82],NULL,0,&atx[83]} ,
+ {420, "Score-set" ,1,0,0,0,0,0,1,0,NULL,NULL,NULL,0,&atx[129]} ,
+ {0, "div-ranks" ,128,2,0,1,0,0,0,0,NULL,&atx[14],&atx[84],0,NULL} ,
{0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[2],NULL,0,NULL} ,
- {0, "parent" ,128,11,0,1,0,0,0,0,NULL,&atx[0],NULL,0,&atx[85]} ,
- {0, "children" ,128,12,0,1,0,0,0,0,NULL,&atx[12],NULL,0,&atx[86]} ,
- {0, "siblings" ,128,13,0,1,0,0,0,0,NULL,&atx[12],NULL,0,&atx[87]} ,
- {0, "neighbors" ,128,14,0,1,0,0,0,0,NULL,&atx[12],NULL,0,&atx[88]} ,
- {0, "pending" ,128,15,0,1,0,0,0,0,NULL,&atx[14],&atx[89],0,&atx[101]} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[90],NULL,0,NULL} ,
- {436, "Update-align" ,1,0,0,0,0,0,0,0,NULL,&atx[10],&atx[91],0,&atx[103]} ,
- {0, "description" ,128,0,0,1,0,0,0,0,NULL,&atx[14],&atx[92],0,&atx[99]} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[93],NULL,0,NULL} ,
- {435, "Update-comment" ,1,0,0,0,0,0,0,0,NULL,&atx[11],&atx[94],0,&atx[90]} ,
- {0, "comment" ,128,0,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[95]} ,
- {0, "addthis" ,128,1,0,0,0,0,0,0,NULL,&atx[41],NULL,0,&atx[96]} ,
- {0, "replaces" ,128,2,0,0,0,0,0,0,NULL,&atx[41],NULL,0,&atx[97]} ,
- {0, "reject-loc" ,128,3,0,0,0,0,0,0,NULL,&atx[41],NULL,0,&atx[98]} ,
+ {0, "parent" ,128,11,0,1,0,0,0,0,NULL,&atx[0],NULL,0,&atx[86]} ,
+ {0, "children" ,128,12,0,1,0,0,0,0,NULL,&atx[12],NULL,0,&atx[87]} ,
+ {0, "siblings" ,128,13,0,1,0,0,0,0,NULL,&atx[12],NULL,0,&atx[88]} ,
+ {0, "neighbors" ,128,14,0,1,0,0,0,0,NULL,&atx[12],NULL,0,&atx[89]} ,
+ {0, "pending" ,128,15,0,1,0,0,0,0,NULL,&atx[14],&atx[90],0,&atx[102]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[91],NULL,0,NULL} ,
+ {436, "Update-align" ,1,0,0,0,0,0,0,0,NULL,&atx[10],&atx[92],0,&atx[104]} ,
+ {0, "description" ,128,0,0,1,0,0,0,0,NULL,&atx[14],&atx[93],0,&atx[100]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[94],NULL,0,NULL} ,
+ {435, "Update-comment" ,1,0,0,0,0,0,0,0,NULL,&atx[11],&atx[95],0,&atx[91]} ,
+ {0, "comment" ,128,0,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[96]} ,
+ {0, "addthis" ,128,1,0,0,0,0,0,0,NULL,&atx[41],NULL,0,&atx[97]} ,
+ {0, "replaces" ,128,2,0,0,0,0,0,0,NULL,&atx[41],NULL,0,&atx[98]} ,
+ {0, "reject-loc" ,128,3,0,0,0,0,0,0,NULL,&atx[41],NULL,0,&atx[99]} ,
{0, "reference" ,128,4,0,0,0,0,0,0,NULL,&atx[26],NULL,0,NULL} ,
- {0, "seqannot" ,128,1,0,1,0,0,0,0,NULL,&atx[58],NULL,0,&atx[100]} ,
+ {0, "seqannot" ,128,1,0,1,0,0,0,0,NULL,&atx[59],NULL,0,&atx[101]} ,
{0, "type" ,128,2,0,0,0,0,0,0,NULL,&atx[2],&avnx[34],0,NULL} ,
- {0, "rejects" ,128,16,0,1,0,0,0,0,NULL,&atx[14],&atx[102],0,&atx[109]} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[103],NULL,0,NULL} ,
- {437, "Reject-id" ,1,0,0,0,0,0,0,0,NULL,&atx[10],&atx[104],0,&atx[119]} ,
- {0, "description" ,128,0,0,1,0,0,0,0,NULL,&atx[14],&atx[105],0,&atx[106]} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[93],NULL,0,NULL} ,
- {0, "ids" ,128,1,0,0,0,0,0,0,NULL,&atx[55],&atx[107],0,NULL} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[108],NULL,0,NULL} ,
- {416, "Seq-id" ,1,0,0,0,0,0,1,0,NULL,NULL,NULL,0,&atx[64]} ,
- {0, "master3d" ,128,17,0,1,0,0,0,0,NULL,&atx[55],&atx[110],0,&atx[111]} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[108],NULL,0,NULL} ,
- {0, "alignannot" ,128,18,0,1,0,0,0,0,NULL,&atx[112],NULL,0,&atx[126]} ,
- {440, "Align-annot-set" ,1,0,0,0,0,0,0,0,NULL,&atx[14],&atx[113],0,&atx[132]} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[114],NULL,0,NULL} ,
- {439, "Align-annot" ,1,0,0,0,0,0,0,0,NULL,&atx[10],&atx[115],0,&atx[112]} ,
- {0, "location" ,128,0,0,0,0,0,0,0,NULL,&atx[41],NULL,0,&atx[116]} ,
- {0, "description" ,128,1,0,1,0,0,0,0,NULL,&atx[6],NULL,0,&atx[117]} ,
- {0, "evidence" ,128,2,0,1,0,0,0,0,NULL,&atx[14],&atx[118],0,NULL} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[119],NULL,0,NULL} ,
- {438, "Feature-evidence" ,1,0,0,0,0,0,0,0,NULL,&atx[11],&atx[120],0,&atx[114]} ,
- {0, "comment" ,128,0,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[121]} ,
- {0, "reference" ,128,1,0,0,0,0,0,0,NULL,&atx[26],NULL,0,&atx[122]} ,
- {0, "bsannot" ,128,2,0,0,0,0,0,0,NULL,&atx[60],NULL,0,&atx[123]} ,
- {0, "seqfeat" ,128,3,0,0,0,0,0,0,NULL,&atx[124],NULL,0,&atx[125]} ,
- {419, "Seq-feat" ,1,0,0,0,0,0,1,0,NULL,NULL,NULL,0,&atx[81]} ,
+ {0, "rejects" ,128,16,0,1,0,0,0,0,NULL,&atx[14],&atx[103],0,&atx[110]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[104],NULL,0,NULL} ,
+ {437, "Reject-id" ,1,0,0,0,0,0,0,0,NULL,&atx[10],&atx[105],0,&atx[120]} ,
+ {0, "description" ,128,0,0,1,0,0,0,0,NULL,&atx[14],&atx[106],0,&atx[107]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[94],NULL,0,NULL} ,
+ {0, "ids" ,128,1,0,0,0,0,0,0,NULL,&atx[56],&atx[108],0,NULL} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[109],NULL,0,NULL} ,
+ {416, "Seq-id" ,1,0,0,0,0,0,1,0,NULL,NULL,NULL,0,&atx[65]} ,
+ {0, "master3d" ,128,17,0,1,0,0,0,0,NULL,&atx[56],&atx[111],0,&atx[112]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[109],NULL,0,NULL} ,
+ {0, "alignannot" ,128,18,0,1,0,0,0,0,NULL,&atx[113],NULL,0,&atx[128]} ,
+ {440, "Align-annot-set" ,1,0,0,0,0,0,0,0,NULL,&atx[14],&atx[114],0,&atx[134]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[115],NULL,0,NULL} ,
+ {439, "Align-annot" ,1,0,0,0,0,0,0,0,NULL,&atx[10],&atx[116],0,&atx[113]} ,
+ {0, "location" ,128,0,0,0,0,0,0,0,NULL,&atx[41],NULL,0,&atx[117]} ,
+ {0, "description" ,128,1,0,1,0,0,0,0,NULL,&atx[6],NULL,0,&atx[118]} ,
+ {0, "evidence" ,128,2,0,1,0,0,0,0,NULL,&atx[14],&atx[119],0,&atx[127]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[120],NULL,0,NULL} ,
+ {438, "Feature-evidence" ,1,0,0,0,0,0,0,0,NULL,&atx[11],&atx[121],0,&atx[115]} ,
+ {0, "comment" ,128,0,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[122]} ,
+ {0, "reference" ,128,1,0,0,0,0,0,0,NULL,&atx[26],NULL,0,&atx[123]} ,
+ {0, "bsannot" ,128,2,0,0,0,0,0,0,NULL,&atx[61],NULL,0,&atx[124]} ,
+ {0, "seqfeat" ,128,3,0,0,0,0,0,0,NULL,&atx[125],NULL,0,&atx[126]} ,
+ {419, "Seq-feat" ,1,0,0,0,0,0,1,0,NULL,NULL,NULL,0,&atx[82]} ,
{0, "book-ref" ,128,4,0,0,0,0,0,0,NULL,&atx[47],NULL,0,NULL} ,
- {0, "style-dictionary" ,128,19,0,1,0,0,0,0,NULL,&atx[127],NULL,0,&atx[128]} ,
- {421, "Cn3d-style-dictionary" ,1,0,0,0,0,0,1,0,NULL,NULL,NULL,0,&atx[129]} ,
- {0, "user-annotations" ,128,20,0,1,0,0,0,0,NULL,&atx[129],NULL,0,&atx[130]} ,
- {422, "Cn3d-user-annotations" ,1,0,0,0,0,0,1,0,NULL,NULL,NULL,0,&atx[137]} ,
- {0, "ancestors" ,128,21,0,1,0,0,0,0,NULL,&atx[14],&atx[131],0,&atx[136]} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[132],NULL,0,NULL} ,
- {441, "Domain-parent" ,1,0,0,0,0,0,0,0,NULL,&atx[10],&atx[133],0,&atx[139]} ,
- {0, "parent-type" ,128,0,0,0,0,0,0,0,NULL,&atx[2],&avnx[40],0,&atx[134]} ,
- {0, "parentid" ,128,1,0,0,0,0,0,0,NULL,&atx[0],NULL,0,&atx[135]} ,
- {0, "seqannot" ,128,2,0,1,0,0,0,0,NULL,&atx[58],NULL,0,NULL} ,
- {0, "scoreparams" ,128,22,0,1,0,0,0,0,NULL,&atx[137],NULL,0,&atx[138]} ,
- {423, "PssmWithParameters" ,1,0,0,0,0,0,1,0,NULL,NULL,NULL,0,&atx[185]} ,
- {0, "seqtree" ,128,23,0,1,0,0,0,0,NULL,&atx[139],NULL,0,NULL} ,
- {442, "Sequence-tree" ,1,0,0,0,0,0,0,0,NULL,&atx[10],&atx[140],0,&atx[142]} ,
- {0, "cdAccession" ,128,0,0,1,0,0,0,0,NULL,&atx[6],NULL,0,&atx[141]} ,
- {0, "algorithm" ,128,1,0,0,0,0,0,0,NULL,&atx[142],NULL,0,&atx[151]} ,
- {443, "Algorithm-type" ,1,0,0,0,0,0,0,0,NULL,&atx[10],&atx[143],0,&atx[154]} ,
- {0, "scoring-Scheme" ,128,0,0,0,0,0,0,0,NULL,&atx[2],&avnx[45],0,&atx[144]} ,
- {0, "clustering-Method" ,128,1,0,0,0,0,0,0,NULL,&atx[2],&avnx[55],0,&atx[145]} ,
- {0, "score-Matrix" ,128,2,0,1,0,0,0,0,NULL,&atx[2],&avnx[60],0,&atx[146]} ,
- {0, "gapOpen" ,128,3,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[147]} ,
- {0, "gapExtend" ,128,4,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[148]} ,
- {0, "gapScaleFactor" ,128,5,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[149]} ,
- {0, "nTerminalExt" ,128,6,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[150]} ,
- {0, "cTerminalExt" ,128,7,0,1,0,0,0,0,NULL,&atx[2],NULL,0,NULL} ,
- {0, "isAnnotated" ,128,2,0,0,1,0,0,0,&avnx[68],&atx[152],NULL,0,&atx[153]} ,
+ {0, "type" ,128,3,0,1,0,0,0,0,NULL,&atx[2],NULL,0,NULL} ,
+ {0, "style-dictionary" ,128,19,0,1,0,0,0,0,NULL,&atx[129],NULL,0,&atx[130]} ,
+ {421, "Cn3d-style-dictionary" ,1,0,0,0,0,0,1,0,NULL,NULL,NULL,0,&atx[131]} ,
+ {0, "user-annotations" ,128,20,0,1,0,0,0,0,NULL,&atx[131],NULL,0,&atx[132]} ,
+ {422, "Cn3d-user-annotations" ,1,0,0,0,0,0,1,0,NULL,NULL,NULL,0,&atx[139]} ,
+ {0, "ancestors" ,128,21,0,1,0,0,0,0,NULL,&atx[14],&atx[133],0,&atx[138]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[134],NULL,0,NULL} ,
+ {441, "Domain-parent" ,1,0,0,0,0,0,0,0,NULL,&atx[10],&atx[135],0,&atx[141]} ,
+ {0, "parent-type" ,128,0,0,0,0,0,0,0,NULL,&atx[2],&avnx[40],0,&atx[136]} ,
+ {0, "parentid" ,128,1,0,0,0,0,0,0,NULL,&atx[0],NULL,0,&atx[137]} ,
+ {0, "seqannot" ,128,2,0,1,0,0,0,0,NULL,&atx[59],NULL,0,NULL} ,
+ {0, "scoreparams" ,128,22,0,1,0,0,0,0,NULL,&atx[139],NULL,0,&atx[140]} ,
+ {423, "PssmWithParameters" ,1,0,0,0,0,0,1,0,NULL,NULL,NULL,0,&atx[189]} ,
+ {0, "seqtree" ,128,23,0,1,0,0,0,0,NULL,&atx[141],NULL,0,NULL} ,
+ {442, "Sequence-tree" ,1,0,0,0,0,0,0,0,NULL,&atx[10],&atx[142],0,&atx[144]} ,
+ {0, "cdAccession" ,128,0,0,1,0,0,0,0,NULL,&atx[6],NULL,0,&atx[143]} ,
+ {0, "algorithm" ,128,1,0,0,0,0,0,0,NULL,&atx[144],NULL,0,&atx[155]} ,
+ {443, "Algorithm-type" ,1,0,0,0,0,0,0,0,NULL,&atx[10],&atx[145],0,&atx[158]} ,
+ {0, "scoring-Scheme" ,128,0,0,0,0,0,0,0,NULL,&atx[2],&avnx[45],0,&atx[146]} ,
+ {0, "clustering-Method" ,128,1,0,0,0,0,0,0,NULL,&atx[2],&avnx[55],0,&atx[147]} ,
+ {0, "score-Matrix" ,128,2,0,1,0,0,0,0,NULL,&atx[2],&avnx[60],0,&atx[148]} ,
+ {0, "gapOpen" ,128,3,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[149]} ,
+ {0, "gapExtend" ,128,4,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[150]} ,
+ {0, "gapScaleFactor" ,128,5,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[151]} ,
+ {0, "nTerminalExt" ,128,6,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[152]} ,
+ {0, "cTerminalExt" ,128,7,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[153]} ,
+ {0, "tree-scope" ,128,8,0,1,0,0,0,0,NULL,&atx[2],&avnx[68],0,&atx[154]} ,
+ {0, "coloring-scope" ,128,9,0,1,0,0,0,0,NULL,&atx[2],&avnx[72],0,NULL} ,
+ {0, "isAnnotated" ,128,2,0,0,1,0,0,0,&avnx[75],&atx[156],NULL,0,&atx[157]} ,
{301, "BOOLEAN" ,0,1,0,0,0,0,0,0,NULL,NULL,NULL,0,NULL} ,
- {0, "root" ,128,3,0,0,0,0,0,0,NULL,&atx[154],NULL,0,NULL} ,
- {444, "SeqTree-node" ,1,0,0,0,0,0,0,0,NULL,&atx[10],&atx[155],0,&atx[166]} ,
- {0, "isAnnotated" ,128,0,0,0,1,0,0,0,&avnx[69],&atx[152],NULL,0,&atx[156]} ,
- {0, "name" ,128,1,0,1,0,0,0,0,NULL,&atx[6],NULL,0,&atx[157]} ,
- {0, "distance" ,128,2,0,1,0,0,0,0,NULL,&atx[158],NULL,0,&atx[159]} ,
+ {0, "root" ,128,3,0,0,0,0,0,0,NULL,&atx[158],NULL,0,NULL} ,
+ {444, "SeqTree-node" ,1,0,0,0,0,0,0,0,NULL,&atx[10],&atx[159],0,&atx[170]} ,
+ {0, "isAnnotated" ,128,0,0,0,1,0,0,0,&avnx[76],&atx[156],NULL,0,&atx[160]} ,
+ {0, "name" ,128,1,0,1,0,0,0,0,NULL,&atx[6],NULL,0,&atx[161]} ,
+ {0, "distance" ,128,2,0,1,0,0,0,0,NULL,&atx[162],NULL,0,&atx[163]} ,
{309, "REAL" ,0,9,0,0,0,0,0,0,NULL,NULL,NULL,0,NULL} ,
- {0, "children" ,128,3,0,0,0,0,0,0,NULL,&atx[11],&atx[160],0,&atx[165]} ,
- {0, "children" ,128,0,0,0,0,0,0,0,NULL,&atx[14],&atx[161],0,&atx[162]} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[154],NULL,0,NULL} ,
- {0, "footprint" ,128,1,0,0,0,0,0,0,NULL,&atx[10],&atx[163],0,NULL} ,
- {0, "seqRange" ,128,0,0,0,0,0,0,0,NULL,&atx[64],NULL,0,&atx[164]} ,
+ {0, "children" ,128,3,0,0,0,0,0,0,NULL,&atx[11],&atx[164],0,&atx[169]} ,
+ {0, "children" ,128,0,0,0,0,0,0,0,NULL,&atx[14],&atx[165],0,&atx[166]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[158],NULL,0,NULL} ,
+ {0, "footprint" ,128,1,0,0,0,0,0,0,NULL,&atx[10],&atx[167],0,NULL} ,
+ {0, "seqRange" ,128,0,0,0,0,0,0,0,NULL,&atx[65],NULL,0,&atx[168]} ,
{0, "rowId" ,128,1,0,1,0,0,0,0,NULL,&atx[2],NULL,0,NULL} ,
- {0, "annotation" ,128,4,0,1,0,0,0,0,NULL,&atx[166],NULL,0,NULL} ,
- {445, "Node-annotation" ,1,0,0,0,0,0,0,0,NULL,&atx[10],&atx[167],0,&atx[208]} ,
- {0, "presentInChildCD" ,128,0,0,1,0,0,0,0,NULL,&atx[6],NULL,0,&atx[168]} ,
+ {0, "annotation" ,128,4,0,1,0,0,0,0,NULL,&atx[170],NULL,0,NULL} ,
+ {445, "Node-annotation" ,1,0,0,0,0,0,0,0,NULL,&atx[10],&atx[171],0,&atx[212]} ,
+ {0, "presentInChildCD" ,128,0,0,1,0,0,0,0,NULL,&atx[6],NULL,0,&atx[172]} ,
{0, "note" ,128,1,0,1,0,0,0,0,NULL,&atx[6],NULL,0,NULL} ,
- {404, "Cdd-set" ,1,0,0,0,0,1,0,0,NULL,&atx[55],&atx[170],0,&atx[171]} ,
+ {404, "Cdd-set" ,1,0,0,0,0,1,0,0,NULL,&atx[56],&atx[174],0,&atx[175]} ,
{0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[15],NULL,0,NULL} ,
- {405, "Cdd-tree" ,1,0,0,0,0,1,0,0,NULL,&atx[10],&atx[172],0,&atx[179]} ,
- {0, "name" ,128,0,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[173]} ,
- {0, "id" ,128,1,0,0,0,0,0,0,NULL,&atx[12],NULL,0,&atx[174]} ,
- {0, "description" ,128,2,0,1,0,0,0,0,NULL,&atx[19],NULL,0,&atx[175]} ,
- {0, "parent" ,128,3,0,1,0,0,0,0,NULL,&atx[0],NULL,0,&atx[176]} ,
- {0, "children" ,128,4,0,1,0,0,0,0,NULL,&atx[12],NULL,0,&atx[177]} ,
- {0, "siblings" ,128,5,0,1,0,0,0,0,NULL,&atx[12],NULL,0,&atx[178]} ,
+ {405, "Cdd-tree" ,1,0,0,0,0,1,0,0,NULL,&atx[10],&atx[176],0,&atx[183]} ,
+ {0, "name" ,128,0,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[177]} ,
+ {0, "id" ,128,1,0,0,0,0,0,0,NULL,&atx[12],NULL,0,&atx[178]} ,
+ {0, "description" ,128,2,0,1,0,0,0,0,NULL,&atx[19],NULL,0,&atx[179]} ,
+ {0, "parent" ,128,3,0,1,0,0,0,0,NULL,&atx[0],NULL,0,&atx[180]} ,
+ {0, "children" ,128,4,0,1,0,0,0,0,NULL,&atx[12],NULL,0,&atx[181]} ,
+ {0, "siblings" ,128,5,0,1,0,0,0,0,NULL,&atx[12],NULL,0,&atx[182]} ,
{0, "neighbors" ,128,6,0,1,0,0,0,0,NULL,&atx[12],NULL,0,NULL} ,
- {406, "Cdd-tree-set" ,1,0,0,0,0,1,0,0,NULL,&atx[14],&atx[180],0,&atx[181]} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[171],NULL,0,NULL} ,
- {407, "Cdd-pref-nodes" ,1,0,0,0,0,1,0,0,NULL,&atx[10],&atx[182],0,&atx[198]} ,
- {0, "preferred-nodes" ,128,0,0,0,0,0,0,0,NULL,&atx[183],NULL,0,&atx[190]} ,
- {425, "Cdd-org-ref-set" ,1,0,0,0,0,0,0,0,NULL,&atx[55],&atx[184],0,&atx[195]} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[185],NULL,0,NULL} ,
- {424, "Cdd-org-ref" ,1,0,0,0,0,0,0,0,NULL,&atx[10],&atx[186],0,&atx[183]} ,
- {0, "reference" ,128,0,0,0,0,0,0,0,NULL,&atx[30],NULL,0,&atx[187]} ,
- {0, "active" ,128,1,0,0,1,0,0,0,&avnx[70],&atx[152],NULL,0,&atx[188]} ,
- {0, "parent-tax-id" ,128,2,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[189]} ,
+ {406, "Cdd-tree-set" ,1,0,0,0,0,1,0,0,NULL,&atx[14],&atx[184],0,&atx[185]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[175],NULL,0,NULL} ,
+ {407, "Cdd-pref-nodes" ,1,0,0,0,0,1,0,0,NULL,&atx[10],&atx[186],0,&atx[202]} ,
+ {0, "preferred-nodes" ,128,0,0,0,0,0,0,0,NULL,&atx[187],NULL,0,&atx[194]} ,
+ {425, "Cdd-org-ref-set" ,1,0,0,0,0,0,0,0,NULL,&atx[56],&atx[188],0,&atx[199]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[189],NULL,0,NULL} ,
+ {424, "Cdd-org-ref" ,1,0,0,0,0,0,0,0,NULL,&atx[10],&atx[190],0,&atx[187]} ,
+ {0, "reference" ,128,0,0,0,0,0,0,0,NULL,&atx[30],NULL,0,&atx[191]} ,
+ {0, "active" ,128,1,0,0,1,0,0,0,&avnx[77],&atx[156],NULL,0,&atx[192]} ,
+ {0, "parent-tax-id" ,128,2,0,1,0,0,0,0,NULL,&atx[2],NULL,0,&atx[193]} ,
{0, "rank" ,128,3,0,1,0,0,0,0,NULL,&atx[6],NULL,0,NULL} ,
- {0, "model-organisms" ,128,1,0,1,0,0,0,0,NULL,&atx[183],NULL,0,&atx[191]} ,
- {0, "optional-nodes" ,128,2,0,1,0,0,0,0,NULL,&atx[183],NULL,0,&atx[192]} ,
- {0, "description" ,128,3,0,1,0,0,0,0,NULL,&atx[193],NULL,0,NULL} ,
- {427, "Cdd-pref-node-descr-set" ,1,0,0,0,0,0,0,0,NULL,&atx[55],&atx[194],0,&atx[4]} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[195],NULL,0,NULL} ,
- {426, "Cdd-pref-node-descr" ,1,0,0,0,0,0,0,0,NULL,&atx[11],&atx[196],0,&atx[193]} ,
- {0, "create-date" ,128,0,0,0,0,0,0,0,NULL,&atx[28],NULL,0,&atx[197]} ,
+ {0, "model-organisms" ,128,1,0,1,0,0,0,0,NULL,&atx[187],NULL,0,&atx[195]} ,
+ {0, "optional-nodes" ,128,2,0,1,0,0,0,0,NULL,&atx[187],NULL,0,&atx[196]} ,
+ {0, "description" ,128,3,0,1,0,0,0,0,NULL,&atx[197],NULL,0,NULL} ,
+ {427, "Cdd-pref-node-descr-set" ,1,0,0,0,0,0,0,0,NULL,&atx[56],&atx[198],0,&atx[4]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[199],NULL,0,NULL} ,
+ {426, "Cdd-pref-node-descr" ,1,0,0,0,0,0,0,0,NULL,&atx[11],&atx[200],0,&atx[197]} ,
+ {0, "create-date" ,128,0,0,0,0,0,0,0,NULL,&atx[28],NULL,0,&atx[201]} ,
{0, "description" ,128,1,0,0,0,0,0,0,NULL,&atx[6],NULL,0,NULL} ,
- {408, "Cdd-Project" ,1,0,0,0,0,1,0,0,NULL,&atx[10],&atx[199],0,&atx[28]} ,
- {0, "cds" ,128,0,0,0,0,0,0,0,NULL,&atx[14],&atx[200],0,&atx[201]} ,
+ {408, "Cdd-Project" ,1,0,0,0,0,1,0,0,NULL,&atx[10],&atx[203],0,&atx[28]} ,
+ {0, "cds" ,128,0,0,0,0,0,0,0,NULL,&atx[14],&atx[204],0,&atx[205]} ,
{0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[15],NULL,0,NULL} ,
- {0, "cdcolor" ,128,1,0,0,0,0,0,0,NULL,&atx[14],&atx[202],0,&atx[203]} ,
+ {0, "cdcolor" ,128,1,0,0,0,0,0,0,NULL,&atx[14],&atx[206],0,&atx[207]} ,
{0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[2],NULL,0,NULL} ,
- {0, "viewers" ,128,2,0,0,0,0,0,0,NULL,&atx[14],&atx[204],0,&atx[215]} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[205],NULL,0,NULL} ,
- {447, "Cdd-Viewer" ,1,0,0,0,0,0,0,0,NULL,&atx[10],&atx[206],0,&atx[218]} ,
- {0, "ctrl" ,128,0,0,0,0,0,0,0,NULL,&atx[2],&avnx[71],0,&atx[207]} ,
- {0, "rect" ,128,1,0,1,0,0,0,0,NULL,&atx[208],NULL,0,&atx[213]} ,
- {446, "Cdd-Viewer-Rect" ,1,0,0,0,0,0,0,0,NULL,&atx[10],&atx[209],0,&atx[205]} ,
- {0, "top" ,128,0,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[210]} ,
- {0, "left" ,128,1,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[211]} ,
- {0, "width" ,128,2,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[212]} ,
+ {0, "viewers" ,128,2,0,0,0,0,0,0,NULL,&atx[14],&atx[208],0,&atx[219]} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[209],NULL,0,NULL} ,
+ {447, "Cdd-Viewer" ,1,0,0,0,0,0,0,0,NULL,&atx[10],&atx[210],0,&atx[222]} ,
+ {0, "ctrl" ,128,0,0,0,0,0,0,0,NULL,&atx[2],&avnx[78],0,&atx[211]} ,
+ {0, "rect" ,128,1,0,1,0,0,0,0,NULL,&atx[212],NULL,0,&atx[217]} ,
+ {446, "Cdd-Viewer-Rect" ,1,0,0,0,0,0,0,0,NULL,&atx[10],&atx[213],0,&atx[209]} ,
+ {0, "top" ,128,0,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[214]} ,
+ {0, "left" ,128,1,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[215]} ,
+ {0, "width" ,128,2,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[216]} ,
{0, "height" ,128,3,0,0,0,0,0,0,NULL,&atx[2],NULL,0,NULL} ,
- {0, "accessions" ,128,2,0,0,0,0,0,0,NULL,&atx[14],&atx[214],0,NULL} ,
+ {0, "accessions" ,128,2,0,0,0,0,0,0,NULL,&atx[14],&atx[218],0,NULL} ,
{0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[6],NULL,0,NULL} ,
- {0, "log" ,128,3,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[216]} ,
- {0, "scripts" ,128,4,0,1,0,0,0,0,NULL,&atx[14],&atx[217],0,NULL} ,
- {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[218],NULL,0,NULL} ,
- {448, "Cdd-Script" ,1,0,0,0,0,0,0,0,NULL,&atx[10],&atx[219],0,NULL} ,
- {0, "type" ,128,0,0,1,0,0,0,0,NULL,&atx[2],&avnx[83],0,&atx[220]} ,
- {0, "name" ,128,1,0,1,0,0,0,0,NULL,&atx[6],NULL,0,&atx[221]} ,
+ {0, "log" ,128,3,0,0,0,0,0,0,NULL,&atx[6],NULL,0,&atx[220]} ,
+ {0, "scripts" ,128,4,0,1,0,0,0,0,NULL,&atx[14],&atx[221],0,NULL} ,
+ {0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[222],NULL,0,NULL} ,
+ {448, "Cdd-Script" ,1,0,0,0,0,0,0,0,NULL,&atx[10],&atx[223],0,NULL} ,
+ {0, "type" ,128,0,0,1,0,0,0,0,NULL,&atx[2],&avnx[90],0,&atx[224]} ,
+ {0, "name" ,128,1,0,1,0,0,0,0,NULL,&atx[6],NULL,0,&atx[225]} ,
{0, "commands" ,128,2,0,0,0,0,0,0,NULL,&atx[6],NULL,0,NULL} };
static AsnModule ampx[1] = {
@@ -349,80 +360,80 @@ static AsnModulePtr amp = ampx;
#define CDD_name &at[16]
#define CDD_id &at[17]
#define CDD_description &at[18]
-#define CDD_seqannot &at[56]
-#define CDD_seqannot_E &at[57]
-#define CDD_features &at[59]
-#define CDD_sequences &at[61]
-#define CDD_profile_range &at[63]
-#define CDD_trunc_master &at[65]
-#define CDD_posfreq &at[67]
-#define CDD_scoremat &at[76]
-#define CDD_distance &at[77]
-#define CDD_parent &at[84]
-#define CDD_children &at[85]
-#define CDD_siblings &at[86]
-#define CDD_neighbors &at[87]
-#define CDD_pending &at[88]
-#define CDD_pending_E &at[89]
-#define CDD_rejects &at[101]
-#define CDD_rejects_E &at[102]
-#define CDD_master3d &at[109]
-#define CDD_master3d_E &at[110]
-#define CDD_alignannot &at[111]
-#define CDD_style_dictionary &at[126]
-#define CDD_user_annotations &at[128]
-#define CDD_ancestors &at[130]
-#define CDD_ancestors_E &at[131]
-#define CDD_scoreparams &at[136]
-#define CDD_seqtree &at[138]
-
-#define CDD_SET &at[169]
-#define CDD_SET_E &at[170]
-
-#define CDD_TREE &at[171]
-#define CDD_TREE_name &at[172]
-#define CDD_TREE_id &at[173]
-#define CDD_TREE_description &at[174]
-#define CDD_TREE_parent &at[175]
-#define CDD_TREE_children &at[176]
-#define CDD_TREE_siblings &at[177]
-#define CDD_TREE_neighbors &at[178]
-
-#define CDD_TREE_SET &at[179]
-#define CDD_TREE_SET_E &at[180]
-
-#define CDD_PREF_NODES &at[181]
-#define CDD_PREF_NODES_preferred_nodes &at[182]
-#define CDD_PREF_NODES_model_organisms &at[190]
-#define CDD_PREF_NODES_optional_nodes &at[191]
-#define CDD_PREF_NODES_description &at[192]
-
-#define CDD_PROJECT &at[198]
-#define CDD_PROJECT_cds &at[199]
-#define CDD_PROJECT_cds_E &at[200]
-#define CDD_PROJECT_cdcolor &at[201]
-#define CDD_PROJECT_cdcolor_E &at[202]
-#define CDD_PROJECT_viewers &at[203]
-#define CDD_PROJECT_viewers_E &at[204]
-#define CDD_PROJECT_log &at[215]
-#define CDD_PROJECT_scripts &at[216]
-#define CDD_PROJECT_scripts_E &at[217]
-
-#define CDD_ORG_REF &at[185]
-#define CDD_ORG_REF_reference &at[186]
-#define CDD_ORG_REF_active &at[187]
-#define CDD_ORG_REF_parent_tax_id &at[188]
-#define CDD_ORG_REF_rank &at[189]
-
-#define CDD_ORG_REF_SET &at[183]
-#define CDD_ORG_REF_SET_E &at[184]
-
-#define CDD_PREF_NODE_DESCR &at[195]
-#define CDD_PREF_NODE_DESCR_create_date &at[196]
-#define CDD_PREF_NODE_DESCR_description &at[197]
-
-#define CDD_PREF_NODE_DESCR_SET &at[193]
-#define CDD_PREF_NODE_DESCR_SET_E &at[194]
+#define CDD_seqannot &at[57]
+#define CDD_seqannot_E &at[58]
+#define CDD_features &at[60]
+#define CDD_sequences &at[62]
+#define CDD_profile_range &at[64]
+#define CDD_trunc_master &at[66]
+#define CDD_posfreq &at[68]
+#define CDD_scoremat &at[77]
+#define CDD_distance &at[78]
+#define CDD_parent &at[85]
+#define CDD_children &at[86]
+#define CDD_siblings &at[87]
+#define CDD_neighbors &at[88]
+#define CDD_pending &at[89]
+#define CDD_pending_E &at[90]
+#define CDD_rejects &at[102]
+#define CDD_rejects_E &at[103]
+#define CDD_master3d &at[110]
+#define CDD_master3d_E &at[111]
+#define CDD_alignannot &at[112]
+#define CDD_style_dictionary &at[128]
+#define CDD_user_annotations &at[130]
+#define CDD_ancestors &at[132]
+#define CDD_ancestors_E &at[133]
+#define CDD_scoreparams &at[138]
+#define CDD_seqtree &at[140]
+
+#define CDD_SET &at[173]
+#define CDD_SET_E &at[174]
+
+#define CDD_TREE &at[175]
+#define CDD_TREE_name &at[176]
+#define CDD_TREE_id &at[177]
+#define CDD_TREE_description &at[178]
+#define CDD_TREE_parent &at[179]
+#define CDD_TREE_children &at[180]
+#define CDD_TREE_siblings &at[181]
+#define CDD_TREE_neighbors &at[182]
+
+#define CDD_TREE_SET &at[183]
+#define CDD_TREE_SET_E &at[184]
+
+#define CDD_PREF_NODES &at[185]
+#define CDD_PREF_NODES_preferred_nodes &at[186]
+#define CDD_PREF_NODES_model_organisms &at[194]
+#define CDD_PREF_NODES_optional_nodes &at[195]
+#define CDD_PREF_NODES_description &at[196]
+
+#define CDD_PROJECT &at[202]
+#define CDD_PROJECT_cds &at[203]
+#define CDD_PROJECT_cds_E &at[204]
+#define CDD_PROJECT_cdcolor &at[205]
+#define CDD_PROJECT_cdcolor_E &at[206]
+#define CDD_PROJECT_viewers &at[207]
+#define CDD_PROJECT_viewers_E &at[208]
+#define CDD_PROJECT_log &at[219]
+#define CDD_PROJECT_scripts &at[220]
+#define CDD_PROJECT_scripts_E &at[221]
+
+#define CDD_ORG_REF &at[189]
+#define CDD_ORG_REF_reference &at[190]
+#define CDD_ORG_REF_active &at[191]
+#define CDD_ORG_REF_parent_tax_id &at[192]
+#define CDD_ORG_REF_rank &at[193]
+
+#define CDD_ORG_REF_SET &at[187]
+#define CDD_ORG_REF_SET_E &at[188]
+
+#define CDD_PREF_NODE_DESCR &at[199]
+#define CDD_PREF_NODE_DESCR_create_date &at[200]
+#define CDD_PREF_NODE_DESCR_description &at[201]
+
+#define CDD_PREF_NODE_DESCR_SET &at[197]
+#define CDD_PREF_NODE_DESCR_SET_E &at[198]
#define GLOBAL_ID &at[4]
#define GLOBAL_ID_accession &at[5]
@@ -461,110 +472,114 @@ static AsnModulePtr amp = ampx;
#define CDD_DESCR_curation_status &at[44]
#define CDD_DESCR_readonly_status &at[45]
#define CDD_DESCR_book_ref &at[46]
+#define CDD_DESCR_attribution &at[55]
#define CDD_DESCR_SET &at[19]
#define CDD_DESCR_SET_E &at[20]
-#define MATRIX &at[68]
-#define MATRIX_ncolumns &at[69]
-#define MATRIX_nrows &at[70]
-#define MATRIX_row_labels &at[71]
-#define MATRIX_row_labels_E &at[72]
-#define MATRIX_scale_factor &at[73]
-#define MATRIX_columns &at[74]
-#define MATRIX_columns_E &at[75]
-
-#define TRIANGLE &at[78]
-#define TRIANGLE_nelements &at[79]
-#define TRIANGLE_scores &at[80]
-#define TRIANGLE_div_ranks &at[82]
-#define TRIANGLE_div_ranks_E &at[83]
-
-#define UPDATE_COMMENT &at[93]
-#define UPDATE_COMMENT_comment &at[94]
-#define UPDATE_COMMENT_addthis &at[95]
-#define UPDATE_COMMENT_replaces &at[96]
-#define UPDATE_COMMENT_reject_loc &at[97]
-#define UPDATE_COMMENT_reference &at[98]
-
-#define UPDATE_ALIGN &at[90]
-#define UPDATE_ALIGN_description &at[91]
-#define UPDATE_ALIGN_description_E &at[92]
-#define UPDATE_ALIGN_seqannot &at[99]
-#define UPDATE_ALIGN_type &at[100]
-
-#define REJECT_ID &at[103]
-#define REJECT_ID_description &at[104]
-#define REJECT_ID_description_E &at[105]
-#define REJECT_ID_ids &at[106]
-#define REJECT_ID_ids_E &at[107]
-
-#define FEATURE_EVIDENCE &at[119]
-#define FEATURE_EVIDENCE_comment &at[120]
-#define FEATURE_EVIDENCE_reference &at[121]
-#define FEATURE_EVIDENCE_bsannot &at[122]
-#define FEATURE_EVIDENCE_seqfeat &at[123]
-#define FEATURE_EVIDENCE_book_ref &at[125]
-
-#define ALIGN_ANNOT &at[114]
-#define ALIGN_ANNOT_location &at[115]
-#define ALIGN_ANNOT_description &at[116]
-#define ALIGN_ANNOT_evidence &at[117]
-#define ALIGN_ANNOT_evidence_E &at[118]
-
-#define ALIGN_ANNOT_SET &at[112]
-#define ALIGN_ANNOT_SET_E &at[113]
-
-#define DOMAIN_PARENT &at[132]
-#define DOMAIN_PARENT_parent_type &at[133]
-#define DOMAIN_PARENT_parentid &at[134]
-#define DOMAIN_PARENT_seqannot &at[135]
-
-#define SEQUENCE_TREE &at[139]
-#define SEQUENCE_TREE_cdAccession &at[140]
-#define SEQUENCE_TREE_algorithm &at[141]
-#define SEQUENCE_TREE_isAnnotated &at[151]
-#define SEQUENCE_TREE_root &at[153]
-
-#define ALGORITHM_TYPE &at[142]
-#define ALGORITHM_TYPE_scoring_Scheme &at[143]
-#define ALGORITHM_TYPE_clustering_Method &at[144]
-#define ALGORITHM_TYPE_score_Matrix &at[145]
-#define ALGORITHM_TYPE_gapOpen &at[146]
-#define ALGORITHM_TYPE_gapExtend &at[147]
-#define ALGORITHM_TYPE_gapScaleFactor &at[148]
-#define ALGORITHM_TYPE_nTerminalExt &at[149]
-#define ALGORITHM_TYPE_cTerminalExt &at[150]
-
-#define SEQTREE_NODE &at[154]
-#define SEQTREE_NODE_isAnnotated &at[155]
-#define SEQTREE_NODE_name &at[156]
-#define SEQTREE_NODE_distance &at[157]
-#define SEQTREE_NODE_children &at[159]
-#define SEQTREE_NODE_children_children &at[160]
-#define SEQTREE_NODE_children_children_E &at[161]
-#define SEQTREE_NODE_children_footprint &at[162]
-#define SEQTREE_NODE_children_footprint_seqRange &at[163]
-#define SEQTREE_NODE_children_footprint_rowId &at[164]
-#define SEQTREE_NODE_annotation &at[165]
-
-#define NODE_ANNOTATION &at[166]
-#define NODE_ANNOTATION_presentInChildCD &at[167]
-#define NODE_ANNOTATION_note &at[168]
-
-#define CDD_VIEWER_RECT &at[208]
-#define CDD_VIEWER_RECT_top &at[209]
-#define CDD_VIEWER_RECT_left &at[210]
-#define CDD_VIEWER_RECT_width &at[211]
-#define CDD_VIEWER_RECT_height &at[212]
-
-#define CDD_VIEWER &at[205]
-#define CDD_VIEWER_ctrl &at[206]
-#define CDD_VIEWER_rect &at[207]
-#define CDD_VIEWER_accessions &at[213]
-#define CDD_VIEWER_accessions_E &at[214]
-
-#define CDD_SCRIPT &at[218]
-#define CDD_SCRIPT_type &at[219]
-#define CDD_SCRIPT_name &at[220]
-#define CDD_SCRIPT_commands &at[221]
+#define MATRIX &at[69]
+#define MATRIX_ncolumns &at[70]
+#define MATRIX_nrows &at[71]
+#define MATRIX_row_labels &at[72]
+#define MATRIX_row_labels_E &at[73]
+#define MATRIX_scale_factor &at[74]
+#define MATRIX_columns &at[75]
+#define MATRIX_columns_E &at[76]
+
+#define TRIANGLE &at[79]
+#define TRIANGLE_nelements &at[80]
+#define TRIANGLE_scores &at[81]
+#define TRIANGLE_div_ranks &at[83]
+#define TRIANGLE_div_ranks_E &at[84]
+
+#define UPDATE_COMMENT &at[94]
+#define UPDATE_COMMENT_comment &at[95]
+#define UPDATE_COMMENT_addthis &at[96]
+#define UPDATE_COMMENT_replaces &at[97]
+#define UPDATE_COMMENT_reject_loc &at[98]
+#define UPDATE_COMMENT_reference &at[99]
+
+#define UPDATE_ALIGN &at[91]
+#define UPDATE_ALIGN_description &at[92]
+#define UPDATE_ALIGN_description_E &at[93]
+#define UPDATE_ALIGN_seqannot &at[100]
+#define UPDATE_ALIGN_type &at[101]
+
+#define REJECT_ID &at[104]
+#define REJECT_ID_description &at[105]
+#define REJECT_ID_description_E &at[106]
+#define REJECT_ID_ids &at[107]
+#define REJECT_ID_ids_E &at[108]
+
+#define FEATURE_EVIDENCE &at[120]
+#define FEATURE_EVIDENCE_comment &at[121]
+#define FEATURE_EVIDENCE_reference &at[122]
+#define FEATURE_EVIDENCE_bsannot &at[123]
+#define FEATURE_EVIDENCE_seqfeat &at[124]
+#define FEATURE_EVIDENCE_book_ref &at[126]
+
+#define ALIGN_ANNOT &at[115]
+#define ALIGN_ANNOT_location &at[116]
+#define ALIGN_ANNOT_description &at[117]
+#define ALIGN_ANNOT_evidence &at[118]
+#define ALIGN_ANNOT_evidence_E &at[119]
+#define ALIGN_ANNOT_type &at[127]
+
+#define ALIGN_ANNOT_SET &at[113]
+#define ALIGN_ANNOT_SET_E &at[114]
+
+#define DOMAIN_PARENT &at[134]
+#define DOMAIN_PARENT_parent_type &at[135]
+#define DOMAIN_PARENT_parentid &at[136]
+#define DOMAIN_PARENT_seqannot &at[137]
+
+#define SEQUENCE_TREE &at[141]
+#define SEQUENCE_TREE_cdAccession &at[142]
+#define SEQUENCE_TREE_algorithm &at[143]
+#define SEQUENCE_TREE_isAnnotated &at[155]
+#define SEQUENCE_TREE_root &at[157]
+
+#define ALGORITHM_TYPE &at[144]
+#define ALGORITHM_TYPE_scoring_Scheme &at[145]
+#define ALGORITHM_TYPE_clustering_Method &at[146]
+#define ALGORITHM_TYPE_score_Matrix &at[147]
+#define ALGORITHM_TYPE_gapOpen &at[148]
+#define ALGORITHM_TYPE_gapExtend &at[149]
+#define ALGORITHM_TYPE_gapScaleFactor &at[150]
+#define ALGORITHM_TYPE_nTerminalExt &at[151]
+#define ALGORITHM_TYPE_cTerminalExt &at[152]
+#define ALGORITHM_TYPE_tree_scope &at[153]
+#define ALGORITHM_TYPE_coloring_scope &at[154]
+
+#define SEQTREE_NODE &at[158]
+#define SEQTREE_NODE_isAnnotated &at[159]
+#define SEQTREE_NODE_name &at[160]
+#define SEQTREE_NODE_distance &at[161]
+#define SEQTREE_NODE_children &at[163]
+#define SEQTREE_NODE_children_children &at[164]
+#define SEQTREE_NODE_children_children_E &at[165]
+#define SEQTREE_NODE_children_footprint &at[166]
+#define SEQTREE_NODE_children_footprint_seqRange &at[167]
+#define SEQTREE_NODE_children_footprint_rowId &at[168]
+#define SEQTREE_NODE_annotation &at[169]
+
+#define NODE_ANNOTATION &at[170]
+#define NODE_ANNOTATION_presentInChildCD &at[171]
+#define NODE_ANNOTATION_note &at[172]
+
+#define CDD_VIEWER_RECT &at[212]
+#define CDD_VIEWER_RECT_top &at[213]
+#define CDD_VIEWER_RECT_left &at[214]
+#define CDD_VIEWER_RECT_width &at[215]
+#define CDD_VIEWER_RECT_height &at[216]
+
+#define CDD_VIEWER &at[209]
+#define CDD_VIEWER_ctrl &at[210]
+#define CDD_VIEWER_rect &at[211]
+#define CDD_VIEWER_accessions &at[217]
+#define CDD_VIEWER_accessions_E &at[218]
+
+#define CDD_SCRIPT &at[222]
+#define CDD_SCRIPT_type &at[223]
+#define CDD_SCRIPT_name &at[224]
+#define CDD_SCRIPT_commands &at[225]
diff --git a/biostruc/cdd/objcdd.c b/biostruc/cdd/objcdd.c
index 6ff74c35..9ecce10a 100644
--- a/biostruc/cdd/objcdd.c
+++ b/biostruc/cdd/objcdd.c
@@ -36,7 +36,7 @@ objcddAsnLoad(void)
/**************************************************
* Generated object loaders for Module NCBI-Cdd
-* Generated using ASNCODE Revision: 6.16 at Feb 8, 2006 1:12 PM
+* Generated using ASNCODE Revision: 6.16 at Aug 27, 2007 9:39 AM
*
**************************************************/
@@ -242,6 +242,7 @@ NLM_EXTERN
CddIdSetPtr LIBCALL
CddIdSetAsnRead(AsnIoPtr aip, AsnTypePtr orig)
{
+ DataVal av;
AsnTypePtr atp;
Boolean isError = FALSE;
AsnReadFunc func;
@@ -297,6 +298,7 @@ erret:
NLM_EXTERN Boolean LIBCALL
CddIdSetAsnWrite(CddIdSetPtr ptr, AsnIoPtr aip, AsnTypePtr orig)
{
+ DataVal av;
AsnTypePtr atp;
Boolean retval = FALSE;
@@ -788,6 +790,7 @@ NLM_EXTERN
CddSetPtr LIBCALL
CddSetAsnRead(AsnIoPtr aip, AsnTypePtr orig)
{
+ DataVal av;
AsnTypePtr atp;
Boolean isError = FALSE;
AsnReadFunc func;
@@ -843,6 +846,7 @@ erret:
NLM_EXTERN Boolean LIBCALL
CddSetAsnWrite(CddSetPtr ptr, AsnIoPtr aip, AsnTypePtr orig)
{
+ DataVal av;
AsnTypePtr atp;
Boolean retval = FALSE;
@@ -1133,6 +1137,7 @@ NLM_EXTERN
CddTreeSetPtr LIBCALL
CddTreeSetAsnRead(AsnIoPtr aip, AsnTypePtr orig)
{
+ DataVal av;
AsnTypePtr atp;
Boolean isError = FALSE;
AsnReadFunc func;
@@ -1188,6 +1193,7 @@ erret:
NLM_EXTERN Boolean LIBCALL
CddTreeSetAsnWrite(CddTreeSetPtr ptr, AsnIoPtr aip, AsnTypePtr orig)
{
+ DataVal av;
AsnTypePtr atp;
Boolean retval = FALSE;
@@ -1356,6 +1362,7 @@ erret:
NLM_EXTERN Boolean LIBCALL
CddPrefNodesAsnWrite(CddPrefNodesPtr ptr, AsnIoPtr aip, AsnTypePtr orig)
{
+ DataVal av;
AsnTypePtr atp;
Boolean retval = FALSE;
@@ -1817,6 +1824,7 @@ NLM_EXTERN
CddOrgRefSetPtr LIBCALL
CddOrgRefSetAsnRead(AsnIoPtr aip, AsnTypePtr orig)
{
+ DataVal av;
AsnTypePtr atp;
Boolean isError = FALSE;
AsnReadFunc func;
@@ -1872,6 +1880,7 @@ erret:
NLM_EXTERN Boolean LIBCALL
CddOrgRefSetAsnWrite(CddOrgRefSetPtr ptr, AsnIoPtr aip, AsnTypePtr orig)
{
+ DataVal av;
AsnTypePtr atp;
Boolean retval = FALSE;
@@ -2106,6 +2115,7 @@ NLM_EXTERN
CddPrefNodeDescrSetPtr LIBCALL
CddPrefNodeDescrSetAsnRead(AsnIoPtr aip, AsnTypePtr orig)
{
+ DataVal av;
AsnTypePtr atp;
Boolean isError = FALSE;
AsnReadFunc func;
@@ -2161,6 +2171,7 @@ erret:
NLM_EXTERN Boolean LIBCALL
CddPrefNodeDescrSetAsnWrite(CddPrefNodeDescrSetPtr ptr, AsnIoPtr aip, AsnTypePtr orig)
{
+ DataVal av;
AsnTypePtr atp;
Boolean retval = FALSE;
@@ -2818,6 +2829,9 @@ CddDescrFree(ValNodePtr anp)
case CddDescr_book_ref:
CddBookRefFree(anp -> data.ptrvalue);
break;
+ case CddDescr_attribution:
+ PubFree(anp -> data.ptrvalue);
+ break;
}
return MemFree(anp);
}
@@ -2963,6 +2977,10 @@ CddDescrAsnRead(AsnIoPtr aip, AsnTypePtr orig)
choice = CddDescr_book_ref;
func = (AsnReadFunc) CddBookRefAsnRead;
}
+ else if (atp == CDD_DESCR_attribution) {
+ choice = CddDescr_attribution;
+ func = (AsnReadFunc) PubAsnRead;
+ }
anp->choice = choice;
if (func != NULL)
{
@@ -3086,6 +3104,10 @@ CddDescrAsnWrite(CddDescrPtr anp, AsnIoPtr aip, AsnTypePtr orig)
writetype = CDD_DESCR_book_ref;
func = (AsnWriteFunc) CddBookRefAsnWrite;
break;
+ case CddDescr_attribution:
+ writetype = CDD_DESCR_attribution;
+ func = (AsnWriteFunc) PubAsnWrite;
+ break;
}
if (writetype != NULL) {
retval = (* func)(pnt, aip, writetype); /* write it out */
@@ -3128,6 +3150,7 @@ NLM_EXTERN
CddDescrSetPtr LIBCALL
CddDescrSetAsnRead(AsnIoPtr aip, AsnTypePtr orig)
{
+ DataVal av;
AsnTypePtr atp;
Boolean isError = FALSE;
AsnReadFunc func;
@@ -3183,6 +3206,7 @@ erret:
NLM_EXTERN Boolean LIBCALL
CddDescrSetAsnWrite(CddDescrSetPtr ptr, AsnIoPtr aip, AsnTypePtr orig)
{
+ DataVal av;
AsnTypePtr atp;
Boolean retval = FALSE;
@@ -4081,6 +4105,7 @@ erret:
NLM_EXTERN Boolean LIBCALL
RejectIdAsnWrite(RejectIdPtr ptr, AsnIoPtr aip, AsnTypePtr orig)
{
+ DataVal av;
AsnTypePtr atp;
Boolean retval = FALSE;
@@ -4433,6 +4458,13 @@ AlignAnnotAsnRead(AsnIoPtr aip, AsnTypePtr orig)
}
atp = AsnReadId(aip,amp, atp);
}
+ if (atp == ALIGN_ANNOT_type) {
+ if ( AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ ptr -> type = av.intvalue;
+ atp = AsnReadId(aip,amp, atp);
+ }
if (AsnReadVal(aip, atp, &av) <= 0) {
goto erret;
@@ -4494,6 +4526,8 @@ AlignAnnotAsnWrite(AlignAnnotPtr ptr, AsnIoPtr aip, AsnTypePtr orig)
retval = AsnWrite(aip, ALIGN_ANNOT_description, &av);
}
AsnGenericChoiceSeqOfAsnWrite(ptr -> evidence, (AsnWriteFunc) FeatureEvidenceAsnWrite, aip, ALIGN_ANNOT_evidence, ALIGN_ANNOT_evidence_E);
+ av.intvalue = ptr -> type;
+ retval = AsnWrite(aip, ALIGN_ANNOT_type, &av);
if (! AsnCloseStruct(aip, atp, (Pointer)ptr)) {
goto erret;
}
@@ -4533,6 +4567,7 @@ NLM_EXTERN
AlignAnnotSetPtr LIBCALL
AlignAnnotSetAsnRead(AsnIoPtr aip, AsnTypePtr orig)
{
+ DataVal av;
AsnTypePtr atp;
Boolean isError = FALSE;
AsnReadFunc func;
@@ -4588,6 +4623,7 @@ erret:
NLM_EXTERN Boolean LIBCALL
AlignAnnotSetAsnWrite(AlignAnnotSetPtr ptr, AsnIoPtr aip, AsnTypePtr orig)
{
+ DataVal av;
AsnTypePtr atp;
Boolean retval = FALSE;
@@ -5123,6 +5159,20 @@ AlgorithmTypeAsnRead(AsnIoPtr aip, AsnTypePtr orig)
ptr -> cTerminalExt = av.intvalue;
atp = AsnReadId(aip,amp, atp);
}
+ if (atp == ALGORITHM_TYPE_tree_scope) {
+ if ( AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ ptr -> tree_scope = av.intvalue;
+ atp = AsnReadId(aip,amp, atp);
+ }
+ if (atp == ALGORITHM_TYPE_coloring_scope) {
+ if ( AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ ptr -> coloring_scope = av.intvalue;
+ atp = AsnReadId(aip,amp, atp);
+ }
if (AsnReadVal(aip, atp, &av) <= 0) {
goto erret;
@@ -5190,6 +5240,10 @@ AlgorithmTypeAsnWrite(AlgorithmTypePtr ptr, AsnIoPtr aip, AsnTypePtr orig)
retval = AsnWrite(aip, ALGORITHM_TYPE_nTerminalExt, &av);
av.intvalue = ptr -> cTerminalExt;
retval = AsnWrite(aip, ALGORITHM_TYPE_cTerminalExt, &av);
+ av.intvalue = ptr -> tree_scope;
+ retval = AsnWrite(aip, ALGORITHM_TYPE_tree_scope, &av);
+ av.intvalue = ptr -> coloring_scope;
+ retval = AsnWrite(aip, ALGORITHM_TYPE_coloring_scope, &av);
if (! AsnCloseStruct(aip, atp, (Pointer)ptr)) {
goto erret;
}
diff --git a/biostruc/cdd/objcdd.h b/biostruc/cdd/objcdd.h
index 3eaf9067..f604e296 100644
--- a/biostruc/cdd/objcdd.h
+++ b/biostruc/cdd/objcdd.h
@@ -20,7 +20,7 @@ extern "C" { /* } */
/**************************************************
*
* Generated objects for Module NCBI-Cdd
-* Generated using ASNCODE Revision: 6.16 at Feb 8, 2006 1:12 PM
+* Generated using ASNCODE Revision: 6.16 at Aug 27, 2007 9:39 AM
*
**************************************************/
@@ -364,6 +364,7 @@ typedef ValNode CddDescr;
#define CddDescr_curation_status 14
#define CddDescr_readonly_status 15
#define CddDescr_book_ref 16
+#define CddDescr_attribution 17
NLM_EXTERN CddDescrPtr LIBCALL CddDescrFree PROTO ((CddDescrPtr ));
@@ -507,6 +508,7 @@ typedef struct struct_Align_annot {
ValNodePtr location;
CharPtr description;
ValNodePtr evidence;
+ Int4 type;
} AlignAnnot, PNTR AlignAnnotPtr;
@@ -591,6 +593,8 @@ typedef struct struct_Algorithm_type {
Int4 gapScaleFactor;
Int4 nTerminalExt;
Int4 cTerminalExt;
+ Int4 tree_scope;
+ Int4 coloring_scope;
} AlgorithmType, PNTR AlgorithmTypePtr;
diff --git a/build.me b/build.me
index 18f10cd5..47fb2af1 100755
--- a/build.me
+++ b/build.me
@@ -1,13 +1,13 @@
#!/bin/sh
#
-# $Id: build.me,v 1.9 2004/04/08 17:53:25 lavr Exp $
+# $Id: build.me,v 1.10 2008/01/25 19:57:15 ucko Exp $
#
# W A R N I N G ! ! !
# That script is intended for internal use in NCBI only
#
#
-#check that we're running withing NCBI
+#check that we're running within NCBI
MYDOMAIN=`grep '^domain' /etc/resolv.conf |awk '{print $2}'`
test -z "$MYDOMAIN" && MYDOMAIN="`hostname --fqdn 2>/dev/null`"
test -z "$MYDOMAIN" && MYDOMAIN="`domainname`"
@@ -16,7 +16,7 @@ if [ `echo "$MYDOMAIN" | grep -c 'nlm[.]nih[.]gov$'` != 1 ] ; then
exit 1
fi
-SCRIPTDIR=/am/ncbiapdata/scripts
+SCRIPTDIR=/am/ncbiapdata/scripts/build
CWD=`pwd`
UPDIR=`dirname $CWD`
MYDIR=`basename $CWD`
diff --git a/build.me64 b/build.me64
index f4bb17ed..d62dfc65 100755
--- a/build.me64
+++ b/build.me64
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $Id: build.me64,v 6.2 2002/03/01 18:04:07 beloslyu Exp $
+# $Id: build.me64,v 6.3 2008/01/25 19:59:38 ucko Exp $
#
# W A R N I N G ! ! !
# That script is intended for internal use in NCBI only
@@ -10,19 +10,23 @@ NCBI=/netopt/ncbi_tools/ncbi64
PATH=/usr/bin:/bin:/sbin:/usr/sbin:/usr/ccs/bin:$NCBI/bin:$PATH
export PATH NCBI
-#check that we're running withing NCBI
+#check that we're running within NCBI
MYDOMAIN=`grep '^domain' /etc/resolv.conf |awk '{print $2}'`
-if [ "$MYDOMAIN" != "nlm.nih.gov" ] ; then
- echo That script is intended for internal use in NCBI only
- exit 1
+test -z "$MYDOMAIN" && MYDOMAIN="`hostname --fqdn 2>/dev/null`"
+test -z "$MYDOMAIN" && MYDOMAIN="`domainname`"
+if [ `echo "$MYDOMAIN" | grep -c 'nlm[.]nih[.]gov$'` != 1 ] ; then
+ echo That script is intended for internal use in NCBI only
+ exit 1
fi
+SCRIPTDIR=/am/ncbiapdata/scripts/build
+
echo "Building ASNs"
( cd asn; rm -f asn.all asnpub.all ; chmod +x *.unx; sh all.unx; sh allpub.unx)
if [ ! -d "asnstat" ] ; then
mkdir asnstat; ( cd asnstat; sh ../asn/makestat.unx )
- test -f /am/ncbiapdata/scripts/rebuild_asn && /am/ncbiapdata/scripts/rebuild_asn .
+ test -f $SCRIPTDIR/rebuild_asn && $SCRIPTDIR/rebuild_asn .
fi
rm -f data/*.val
@@ -50,7 +54,7 @@ fi
echo "building the NCBI C toolkit on Solaris/Sparc in 64-bit mode"
cd build
-dmake -j 3 -f /am/ncbiapdata/scripts/make.master LCL_TARGET=sol TARGET_INCLUDE=include \
+dmake -j 3 -f $SCRIPTDIR/make.master LCL_TARGET=sol TARGET_INCLUDE=include \
DBUGEXTRA=-KPIC DBUGEXTRA2=-g COPYBIN=bin CLLIB=cllib all
exit 0
diff --git a/checkout.date b/checkout.date
index 33c5c5f2..7bb946e7 100644
--- a/checkout.date
+++ b/checkout.date
@@ -1 +1 @@
-Sun Aug 26 12:02:00 EDT 2007
+Sun Mar 2 10:12:54 EST 2008
diff --git a/connect/ncbi_config.h b/connect/ncbi_config.h
index c1032790..6ae394ab 100644
--- a/connect/ncbi_config.h
+++ b/connect/ncbi_config.h
@@ -1,7 +1,7 @@
#ifndef CONNECT___NCBI_CONFIG__H
#define CONNECT___NCBI_CONFIG__H
-/* $Id: ncbi_config.h,v 6.13 2006/03/07 17:23:22 lavr Exp $
+/* $Id: ncbi_config.h,v 6.14 2007/10/12 14:18:31 ucko Exp $
* ===========================================================================
*
* PUBLIC DOMAIN NOTICE
@@ -59,13 +59,13 @@
# define HAVE_GETHOSTBYNAME_R 6
# define HAVE_GETHOSTBYADDR_R 8
# endif
-# if !defined(HAVE_GETPWUID_R)
-# define HAVE_GETPWUID_R 5
+# if !defined(NCBI_HAVE_GETPWUID_R)
+# define NCBI_HAVE_GETPWUID_R 5
# endif
# elif defined(OS_UNIX_IRIX)
# define NCBI_OS_IRIX 1
-# if !defined(HAVE_GETPWUID_R)
-# define HAVE_GETPWUID_R 5
+# if !defined(NCBI_HAVE_GETPWUID_R)
+# define NCBI_HAVE_GETPWUID_R 5
# endif
# elif defined(OS_UNIX_SOL)
# define NCBI_OS_SOLARIS 1
diff --git a/connect/ncbi_connection.c b/connect/ncbi_connection.c
index 3fced047..f133a6ad 100644
--- a/connect/ncbi_connection.c
+++ b/connect/ncbi_connection.c
@@ -1,4 +1,4 @@
-/* $Id: ncbi_connection.c,v 6.48 2006/02/23 17:43:01 lavr Exp $
+/* $Id: ncbi_connection.c,v 6.49 2007/10/17 15:25:43 kazimird Exp $
* ===========================================================================
*
* PUBLIC DOMAIN NOTICE
@@ -42,35 +42,39 @@
* INTERNAL
***********************************************************************/
+#define NCBI_USE_ERRCODE_X Connect_Connection
+
/* Standard logging message
*/
-#define CONN_LOG_EX(level, descr, status) \
- CORE_LOGF(level, \
+#define CONN_LOG_EX(subcode, level, descr, status) \
+ CORE_LOGF_X(subcode, level, \
("%s (connector \"%s\", error \"%s\")", descr, \
conn->meta.get_type \
? conn->meta.get_type(conn->meta.c_get_type) \
: "Unknown", IO_StatusStr(status)))
-#define CONN_LOG(level, descr) CONN_LOG_EX(level, descr, status)
+#define CONN_LOG(subcode, level, descr) \
+ CONN_LOG_EX(subcode, level, descr, status)
+
#ifdef _DEBUG
-# define CONN_TRACE(descr) CONN_LOG(eLOG_Trace, descr)
+# define CONN_TRACE(descr) CONN_LOG(0, eLOG_Trace, descr)
#else
# define CONN_TRACE(descr) ((void) 0)
#endif /*_DEBUG*/
/* Standard macros to verify that the passed connection handle is not NULL
*/
-#define CONN_NOT_NULL_EX(func_name, status) \
+#define CONN_NOT_NULL_EX(subcode, func_name, status) \
if ( !conn ) { \
- CORE_LOG(eLOG_Error, "CONN_" #func_name \
+ CORE_LOG_X(subcode, eLOG_Error, "CONN_" #func_name \
"(conn, ...) -- passed NULL connection handle"); \
assert(conn); \
return status; \
}
-#define CONN_NOT_NULL(func_name) \
- CONN_NOT_NULL_EX(func_name, eIO_InvalidArg)
+#define CONN_NOT_NULL(subcode, func_name) \
+ CONN_NOT_NULL_EX(subcode, func_name, eIO_InvalidArg)
/* Connection state
@@ -82,10 +86,11 @@ typedef enum ECONN_StateTag {
} ECONN_State;
-/* Connection internal data
+/* Connection internal data: meta *must* come first
*/
typedef struct SConnectionTag {
SMetaConnector meta; /* VTable of operations and list */
+
BUF buf; /* storage for the Peek'd data */
#ifdef IMPLEMENTED__CONN_WaitAsync
SConnectorAsyncHandler async_data; /* info of curr. async event handler */
@@ -143,13 +148,13 @@ extern EIO_Status CONN_ReInit
CONNECTOR x_conn = 0;
EIO_Status status;
- CONN_NOT_NULL(ReInit);
+ CONN_NOT_NULL(1, ReInit);
/* check arg */
if (!connector && !conn->meta.list) {
assert(conn->state == eCONN_Unusable);
status = eIO_Unknown;
- CONN_LOG(eLOG_Error,
+ CONN_LOG(2, eLOG_Error,
"[CONN_ReInit] Cannot re-init empty connection with NULL");
return status;
}
@@ -177,7 +182,7 @@ extern EIO_Status CONN_ReInit
? conn->meta.default_timeout
: conn->c_timeout);
if (status != eIO_Success) {
- CONN_LOG(connector ? eLOG_Error : eLOG_Warning,
+ CONN_LOG(3, connector ? eLOG_Error : eLOG_Warning,
"[CONN_ReInit] Cannot close current connection");
if (connector)
return status;
@@ -192,7 +197,7 @@ extern EIO_Status CONN_ReInit
if (!x_conn->next && x_conn == conn->meta.list)
break;
status = eIO_Unknown;
- CONN_LOG(eLOG_Error,
+ CONN_LOG(4, eLOG_Error,
"[CONN_ReInit] Partial re-init not allowed");
return status;
}
@@ -235,7 +240,7 @@ static EIO_Status s_Open
: eIO_NotSupported;
if (status != eIO_Success) {
- CONN_LOG(eLOG_Error, "[CONN_Open] Cannot open connection");
+ CONN_LOG(5, eLOG_Error, "[CONN_Open] Cannot open connection");
return status;
}
@@ -247,7 +252,7 @@ static EIO_Status s_Open
extern const char* CONN_GetType(CONN conn)
{
- CONN_NOT_NULL_EX(GetType, 0);
+ CONN_NOT_NULL_EX(6, GetType, 0);
return conn->state == eCONN_Unusable || !conn->meta.list ||
!conn->meta.get_type ? 0 : conn->meta.get_type(conn->meta.c_get_type);
@@ -256,7 +261,7 @@ extern const char* CONN_GetType(CONN conn)
extern char* CONN_Description(CONN conn)
{
- CONN_NOT_NULL_EX(Description, 0);
+ CONN_NOT_NULL_EX(7, Description, 0);
return conn->state == eCONN_Unusable || !conn->meta.list ||
!conn->meta.descr ? 0 : conn->meta.descr(conn->meta.c_descr);
@@ -270,7 +275,7 @@ extern EIO_Status CONN_SetTimeout
{
EIO_Status status = eIO_Success;
- CONN_NOT_NULL(SetTimeout);
+ CONN_NOT_NULL(8, SetTimeout);
switch (event) {
case eIO_Open:
@@ -314,7 +319,7 @@ extern EIO_Status CONN_SetTimeout
break;
default:
status = eIO_InvalidArg;
- CONN_LOG(eLOG_Error,
+ CONN_LOG(9, eLOG_Error,
"[CONN_SetTimeout] Unknown event to set timeout for");
assert(0);
break;
@@ -328,13 +333,13 @@ extern const STimeout* CONN_GetTimeout
(CONN conn,
EIO_Event event)
{
- CONN_NOT_NULL_EX(GetTimeout, 0);
+ CONN_NOT_NULL_EX(10, GetTimeout, 0);
switch (event) {
case eIO_Open:
return conn->o_timeout;
case eIO_ReadWrite:
- CONN_LOG_EX(eLOG_Warning,
+ CONN_LOG_EX(11, eLOG_Warning,
"[CONN_GetTimeout] ReadWrite timeout requested",
eIO_InvalidArg);
/*FALLTHRU*/
@@ -345,7 +350,7 @@ extern const STimeout* CONN_GetTimeout
case eIO_Close:
return conn->c_timeout;
default:
- CONN_LOG_EX(eLOG_Error,
+ CONN_LOG_EX(12, eLOG_Error,
"[CONN_GetTimeout] Unknown event to get timeout for",
eIO_InvalidArg);
assert(0);
@@ -362,7 +367,7 @@ extern EIO_Status CONN_Wait
{
EIO_Status status;
- CONN_NOT_NULL(Wait);
+ CONN_NOT_NULL(13, Wait);
if (conn->state == eCONN_Unusable ||
(event != eIO_Read && event != eIO_Write) ||
@@ -385,9 +390,9 @@ extern EIO_Status CONN_Wait
if (status != eIO_Success) {
if (status != eIO_Timeout)
- CONN_LOG(eLOG_Error, "[CONN_Wait] Error waiting on I/O");
+ CONN_LOG(14, eLOG_Error, "[CONN_Wait] Error waiting on I/O");
else if (!timeout || timeout->sec || timeout->usec)
- CONN_LOG(eLOG_Warning, "[CONN_Wait] I/O timed out");
+ CONN_LOG(15, eLOG_Warning, "[CONN_Wait] I/O timed out");
}
return status;
@@ -407,7 +412,7 @@ static EIO_Status s_CONN_Write
/* check if the write method is specified at all */
if ( !conn->meta.write ) {
status = eIO_NotSupported;
- CONN_LOG(eLOG_Error, "[CONN_Write] Unable to write data");
+ CONN_LOG(16, eLOG_Error, "[CONN_Write] Unable to write data");
return status;
}
@@ -421,7 +426,7 @@ static EIO_Status s_CONN_Write
CONN_TRACE("[CONN_Write] Write error");
status = eIO_Success;
} else if ( size )
- CONN_LOG(eLOG_Error, "[CONN_Write] Cannot write data");
+ CONN_LOG(17, eLOG_Error, "[CONN_Write] Cannot write data");
}
return status;
}
@@ -464,7 +469,7 @@ extern EIO_Status CONN_Write
*n_written = 0;
if (size && !buf)
return eIO_InvalidArg;
- CONN_NOT_NULL(Write);
+ CONN_NOT_NULL(18, Write);
if (conn->state == eCONN_Unusable)
return eIO_InvalidArg;
@@ -491,7 +496,7 @@ extern EIO_Status CONN_PushBack
const void* buf,
size_t size)
{
- CONN_NOT_NULL(PushBack);
+ CONN_NOT_NULL(19, PushBack);
if (conn->state != eCONN_Open)
return eIO_InvalidArg;
@@ -505,7 +510,7 @@ extern EIO_Status CONN_Flush
{
EIO_Status status;
- CONN_NOT_NULL(Flush);
+ CONN_NOT_NULL(20, Flush);
if (conn->state == eCONN_Unusable)
return eIO_InvalidArg;
@@ -522,7 +527,7 @@ extern EIO_Status CONN_Flush
conn->w_timeout == kDefaultTimeout ?
conn->meta.default_timeout : conn->w_timeout);
if (status != eIO_Success)
- CONN_LOG(eLOG_Warning, "[CONN_Flush] Cannot flush data");
+ CONN_LOG(21, eLOG_Warning, "[CONN_Flush] Cannot flush data");
return status;
}
@@ -543,7 +548,7 @@ static EIO_Status s_CONN_Read
/* check if the read method is specified at all */
if ( !conn->meta.read ) {
status = eIO_NotSupported;
- CONN_LOG(eLOG_Error, "[CONN_Read] Unable to read data");
+ CONN_LOG(22, eLOG_Error, "[CONN_Read] Unable to read data");
return status;
}
@@ -573,7 +578,7 @@ static EIO_Status s_CONN_Read
CONN_TRACE("[CONN_Read] Read error");
status = eIO_Success;
} else if (size && status != eIO_Closed) {
- CONN_LOG(status == eIO_Timeout ? eLOG_Warning : eLOG_Error,
+ CONN_LOG(23, status == eIO_Timeout ? eLOG_Warning : eLOG_Error,
"[CONN_Read] Cannot read data");
}
}
@@ -627,7 +632,7 @@ extern EIO_Status CONN_Read
if (size && !buf)
return eIO_InvalidArg;
- CONN_NOT_NULL(Read);
+ CONN_NOT_NULL(24, Read);
if (conn->state == eCONN_Unusable)
return eIO_InvalidArg;
@@ -676,7 +681,7 @@ extern EIO_Status CONN_ReadLine
if (size && !line)
return eIO_InvalidArg;
- CONN_NOT_NULL(ReadLine);
+ CONN_NOT_NULL(25, ReadLine);
/* perform open, if not opened yet */
if (conn->state != eCONN_Open)
@@ -728,7 +733,7 @@ extern EIO_Status CONN_ReadLine
extern EIO_Status CONN_Status(CONN conn, EIO_Event dir)
{
- CONN_NOT_NULL(Status);
+ CONN_NOT_NULL(26, Status);
if (conn->state == eCONN_Unusable || !conn->meta.list)
return eIO_Unknown;
@@ -751,7 +756,7 @@ extern EIO_Status CONN_Close(CONN conn)
FConnCallback func = 0;
void* data = 0;
- CONN_NOT_NULL(Close);
+ CONN_NOT_NULL(27, Close);
if (conn->state != eCONN_Unusable) {
func = conn->cbs[eCONN_OnClose].func;
@@ -782,7 +787,7 @@ extern EIO_Status CONN_SetCallback
if (i >= CONN_N_CALLBACKS)
return eIO_InvalidArg;
- CONN_NOT_NULL(SetCallback);
+ CONN_NOT_NULL(28, SetCallback);
if ( old_cb )
*old_cb = conn->cbs[i];
@@ -819,7 +824,7 @@ extern EIO_Status CONN_WaitAsync
CONNECTOR x_connector = conn->connector;
SConnectorAsyncHandler* x_data = &conn->async_data;
- CONN_NOT_NULL(WaitAsync);
+ CONN_NOT_NULL(29, WaitAsync);
/* perform connect, if not connected yet */
if (!conn->connected && (status = s_Connect(conn)) != eIO_Success)
@@ -831,7 +836,7 @@ extern EIO_Status CONN_WaitAsync
x_connector->vtable.wait_async(x_connector->handle, 0, 0) :
eIO_NotSupported;
if (status != eIO_Success) {
- CONN_LOG(eLOG_Error, "[CONN_WaitAsync] Cannot reset the handler");
+ CONN_LOG(30, eLOG_Error, "[CONN_WaitAsync] Cannot reset the handler");
return status;
}
if ( x_data->cleanup )
@@ -852,178 +857,8 @@ extern EIO_Status CONN_WaitAsync
status = x_connector->vtable.wait_async(x_connector->handle,
s_ConnectorAsyncHandler, x_data);
if (status != eIO_Success) {
- CONN_LOG(eLOG_Error, "[CONN_WaitAsync] Cannot set new handler");
+ CONN_LOG(31, eLOG_Error, "[CONN_WaitAsync] Cannot set new handler");
}
return status;
}
#endif /* IMPLEMENTED__CONN_WaitAsync */
-
-
-/*
- * --------------------------------------------------------------------------
- * $Log: ncbi_connection.c,v $
- * Revision 6.48 2006/02/23 17:43:01 lavr
- * CONN_Read(): No CLOSED trace on EOF
- *
- * Revision 6.47 2006/02/14 15:49:42 lavr
- * Introduce and use CORE_TRACE macros (NOP in Release mode)
- *
- * Revision 6.46 2006/01/18 03:38:17 lavr
- * Prevent copying STimeout structs into themselves [where can occur]
- *
- * Revision 6.45 2005/05/18 18:15:21 lavr
- * Formatting spot
- *
- * Revision 6.44 2004/11/15 19:33:42 lavr
- * Speed-up CONN_ReadLine()
- *
- * Revision 6.43 2004/11/15 17:39:26 lavr
- * Fix CONN_ReadLine() to always perform connector's read method
- *
- * Revision 6.42 2004/05/26 16:00:06 lavr
- * Minor status fixes in CONN_SetTimeout() and CONN_ReadLine()
- *
- * Revision 6.41 2004/05/24 20:19:19 lavr
- * Fix eIO_InvalidArg conditions (size and no buffer)
- *
- * Revision 6.40 2004/05/24 19:54:59 lavr
- * +CONN_ReadLine()
- *
- * Revision 6.39 2004/03/23 02:27:37 lavr
- * Code formatting
- *
- * Revision 6.38 2004/02/23 15:23:39 lavr
- * New (last) parameter "how" added in CONN_Write() API call
- *
- * Revision 6.37 2003/08/25 14:40:53 lavr
- * Employ new k..Timeout constants
- *
- * Revision 6.36 2003/05/31 05:18:26 lavr
- * Optimize on calling flush; do not require to have flush method
- *
- * Revision 6.35 2003/05/21 17:53:06 lavr
- * Better check for {0,0} timeout in CONN_Read()
- *
- * Revision 6.34 2003/05/20 21:21:45 lavr
- * CONN_Write(): log with different log levels on write errors
- *
- * Revision 6.33 2003/05/19 16:43:40 lavr
- * Bugfix in CONN_SetTimeout(); better close callback sequence
- *
- * Revision 6.32 2003/05/14 03:51:16 lavr
- * +CONN_Description()
- *
- * Revision 6.31 2003/05/12 18:33:21 lavr
- * Names of timeout variables uniformed
- *
- * Revision 6.30 2003/01/28 15:16:37 lavr
- * Fix "NULL" message not to contain double quotes in call names
- *
- * Revision 6.29 2003/01/17 19:44:46 lavr
- * Reduce dependencies
- *
- * Revision 6.28 2003/01/15 19:51:17 lavr
- * +CONN_PushBack()
- *
- * Revision 6.27 2002/09/19 19:43:46 lavr
- * Add more assert()'s and do not rely on CONN_Flush() to open in CONN_Read()
- *
- * Revision 6.26 2002/09/06 15:43:20 lavr
- * Bug fixes of late assignments in Read and Write; Flush changed to open
- * connection if not yet open; more error logging
- *
- * Revision 6.25 2002/08/07 16:32:32 lavr
- * Changed EIO_ReadMethod enums accordingly; log moved to end
- *
- * Revision 6.24 2002/04/26 16:30:26 lavr
- * Checks for kDefaultTimeout and use of default_timeout of meta-connector
- *
- * Revision 6.23 2002/04/24 21:18:04 lavr
- * Beautifying: move open check in front of buffer check in CONN_Wait()
- *
- * Revision 6.22 2002/04/22 19:30:01 lavr
- * Do not put trace message on polling wait (tmo={0,0})
- * More effective CONN_Read w/o repeatitive checkings for eIO_ReadPersist
- *
- * Revision 6.21 2002/03/22 22:17:01 lavr
- * Better check when formally timed out but technically polled in CONN_Wait()
- *
- * Revision 6.20 2002/02/05 22:04:12 lavr
- * Included header files rearranged
- *
- * Revision 6.19 2002/01/30 20:10:56 lavr
- * Remove *n_read = 0 assignment in s_CONN_Read; replace it with assert()
- *
- * Revision 6.18 2001/08/20 20:13:15 vakatov
- * CONN_ReInit() -- Check connection handle for NULL (it was missed in R6.17)
- *
- * Revision 6.17 2001/08/20 20:00:43 vakatov
- * CONN_SetTimeout() to return "EIO_Status".
- * CONN_***() -- Check connection handle for NULL.
- *
- * Revision 6.16 2001/07/10 15:08:35 lavr
- * Edit for style
- *
- * Revision 6.15 2001/06/29 21:06:46 lavr
- * BUGFIX: CONN_LOG now checks for non-NULL get_type virtual function
- *
- * Revision 6.14 2001/06/28 22:00:48 lavr
- * Added function: CONN_SetCallback
- * Added callback: eCONN_OnClose
- *
- * Revision 6.13 2001/06/07 17:54:36 lavr
- * Modified exit branch in s_CONN_Read()
- *
- * Revision 6.12 2001/05/30 19:42:44 vakatov
- * s_CONN_Read() -- do not issue warning if requested zero bytes
- * (by A.Lavrentiev)
- *
- * Revision 6.11 2001/04/24 21:29:04 lavr
- * kDefaultTimeout is used everywhere when timeout is not set explicitly
- *
- * Revision 6.10 2001/02/26 22:52:44 kans
- * Initialize x_read in s_CONN_Read
- *
- * Revision 6.9 2001/02/26 16:32:01 kans
- * Including string.h instead of cstring
- *
- * Revision 6.8 2001/02/25 21:41:50 kans
- * Include <cstring> on Mac to get memset
- *
- * Revision 6.7 2001/02/09 17:34:18 lavr
- * CONN_GetType added; severities of some messages changed
- *
- * Revision 6.6 2001/01/25 16:55:48 lavr
- * CONN_ReInit bugs fixed
- *
- * Revision 6.5 2001/01/23 23:10:53 lavr
- * Typo corrected in description of connection structure
- *
- * Revision 6.4 2001/01/12 23:51:38 lavr
- * Message logging modified for use LOG facility only
- *
- * Revision 6.3 2001/01/03 22:29:59 lavr
- * CONN_Status implemented
- *
- * Revision 6.2 2000/12/29 17:52:59 lavr
- * Adapted to use new connector structure; modified to have
- * an internal tri-state {Unusable | Open | Closed }.
- *
- * Revision 6.1 2000/03/24 22:53:34 vakatov
- * Initial revision
- *
- * Revision 6.4 1999/11/01 16:14:23 vakatov
- * s_CONN_Read() -- milder error levels when hitting EOF
- *
- * Revision 6.3 1999/04/05 15:32:53 vakatov
- * CONN_Wait(): be more mild and discrete about the posted error severity
- *
- * Revision 6.1 1999/04/01 21:48:09 vakatov
- * Fixed for the change in spec: "n_written/n_read" args in
- * CONN_Write/Read to be non-NULL and "*n_written / *n_read" := 0
- *
- * Revision 6.0 1999/03/25 23:04:57 vakatov
- * Initial revision
- *
- * ==========================================================================
- */
diff --git a/connect/ncbi_connector.c b/connect/ncbi_connector.c
index 9a4f2f62..5b2eda52 100644
--- a/connect/ncbi_connector.c
+++ b/connect/ncbi_connector.c
@@ -1,4 +1,4 @@
-/* $Id: ncbi_connector.c,v 6.7 2002/08/13 19:29:49 lavr Exp $
+/* $Id: ncbi_connector.c,v 6.9 2007/10/17 15:25:43 kazimird Exp $
* ===========================================================================
*
* PUBLIC DOMAIN NOTICE
@@ -35,10 +35,12 @@
#include <connect/ncbi_connector.h>
+#define NCBI_USE_ERRCODE_X Connect_MetaConn
+
/* Standard logging message
*/
-#define METACONN_LOG(level, descr) \
- CORE_LOGF(level, \
+#define METACONN_LOG(subcode, level, descr) \
+ CORE_LOGF_X(subcode, level, \
("%s (connector \"%s\", error \"%s\")", \
descr, (*meta->get_type)(meta->c_get_type), \
IO_StatusStr(status)))
@@ -51,12 +53,13 @@ extern EIO_Status METACONN_Remove
if (connector) {
CONNECTOR x_conn;
- for (x_conn = meta->list; x_conn; x_conn = x_conn->next)
+ for (x_conn = meta->list; x_conn; x_conn = x_conn->next) {
if (x_conn == connector)
break;
+ }
if (!x_conn) {
EIO_Status status = eIO_Unknown;
- METACONN_LOG(eLOG_Error,
+ METACONN_LOG(1, eLOG_Error,
"[METACONN_Remove] Connector is not in connection");
return status;
}
@@ -84,9 +87,9 @@ extern EIO_Status METACONN_Add
{
assert(connector && meta);
- if (connector->next || !connector->setup) {
+ if (connector->next || !connector->setup) {
EIO_Status status = eIO_Unknown;
- METACONN_LOG(eLOG_Error,
+ METACONN_LOG(2, eLOG_Error,
"[METACONN_Add] Input connector is in use/uninitable");
return status;
}
@@ -98,32 +101,3 @@ extern EIO_Status METACONN_Add
return eIO_Success;
}
-
-
-/*
- * --------------------------------------------------------------------------
- * $Log: ncbi_connector.c,v $
- * Revision 6.7 2002/08/13 19:29:49 lavr
- * Log moved to end
- *
- * Revision 6.6 2002/04/26 16:31:06 lavr
- * Minor style changes in call-by-pointer functions
- *
- * Revision 6.5 2002/03/22 22:17:29 lavr
- * No <stdlib.h> needed in here, removed
- *
- * Revision 6.4 2001/03/02 20:07:56 lavr
- * Typo fixed
- *
- * Revision 6.3 2001/01/25 16:57:08 lavr
- * METACONN_Remove revoked call to free() with connector:
- * connector's DESTROY method is now (back) responsible to call free().
- *
- * Revision 6.2 2001/01/12 23:51:38 lavr
- * Message logging modified for use LOG facility only
- *
- * Revision 6.1 2000/12/29 17:49:29 lavr
- * Initial revision
- *
- * ==========================================================================
- */
diff --git a/connect/ncbi_connector.h b/connect/ncbi_connector.h
index 372f1e6c..7f1a3444 100644
--- a/connect/ncbi_connector.h
+++ b/connect/ncbi_connector.h
@@ -1,7 +1,7 @@
#ifndef CONNECT___NCBI_CONNECTOR__H
#define CONNECT___NCBI_CONNECTOR__H
-/* $Id: ncbi_connector.h,v 6.16 2003/08/25 14:47:59 lavr Exp $
+/* $Id: ncbi_connector.h,v 6.17 2007/09/04 20:25:30 kazimird Exp $
* ===========================================================================
*
* PUBLIC DOMAIN NOTICE
@@ -247,11 +247,11 @@ typedef void (*FDestroy)
/* Connector specification.
*/
typedef struct SConnectorTag {
- void* handle; /* data handle of the connector */
- CONNECTOR next; /* linked list */
SMetaConnector* meta; /* back link to CONNECTION */
FSetupVTable setup; /* used in CONNECTION init */
FDestroy destroy; /* destroys handle, can be NULL */
+ void* handle; /* data handle of the connector */
+ CONNECTOR next; /* linked list */
} SConnector;
@@ -285,63 +285,4 @@ typedef EIO_Status (*FConnectorWaitAsync)
/* @} */
-
-/*
- * --------------------------------------------------------------------------
- * $Log: ncbi_connector.h,v $
- * Revision 6.16 2003/08/25 14:47:59 lavr
- * Get rid of old ...TIMEOUT constants [now replaced with k...Timeout]
- *
- * Revision 6.15 2003/05/21 17:52:37 lavr
- * Pre- and post-conditions clarified for read and write virtual methods
- *
- * Revision 6.14 2003/05/14 03:47:53 lavr
- * +(*FConnectorDescr)()
- *
- * Revision 6.13 2003/04/09 17:58:45 siyan
- * Added doxygen support
- *
- * Revision 6.12 2003/01/08 01:59:32 lavr
- * DLL-ize CONNECT library for MSVC (add NCBI_XCONNECT_EXPORT)
- *
- * Revision 6.11 2002/09/19 18:00:11 lavr
- * Header file guard macro changed
- *
- * Revision 6.10 2002/09/06 15:40:54 lavr
- * More comments and notes to the API; log moved to end
- *
- * Revision 6.9 2002/04/26 16:29:32 lavr
- * Add default_timeout member to meta-connector
- *
- * Revision 6.8 2002/03/22 22:18:48 lavr
- * Cosmetic update
- *
- * Revision 6.7 2001/04/24 21:20:01 lavr
- * Introduced CONN_DEFAULT_TIMEOUT and CONN_INFINITE_TIMEOUT
- *
- * Revision 6.6 2001/03/02 20:07:18 lavr
- * Typos fixed
- *
- * Revision 6.5 2001/01/11 16:39:33 lavr
- * FDestroy function is now clearly documented not to destroy
- * the connector itself, only its handle (private internal data).
- *
- * Revision 6.4 2001/01/03 22:29:22 lavr
- * Changed IOStatus -> Status
- *
- * Revision 6.3 2000/12/29 17:45:07 lavr
- * Heavily modified to have a stack of connectors
- * VTable format changed; all virtual function now accept CONNECTOR as a
- * first argument (not void* as in previous versions)
- *
- * Revision 6.2 2000/04/07 19:59:49 vakatov
- * Moved forward-declaration of CONNECTOR from "ncbi_connection.h"
- * to "ncbi_connector.h"
- *
- * Revision 6.1 2000/03/24 22:52:48 vakatov
- * Initial revision
- *
- * ==========================================================================
- */
-
#endif /* CONNECT___NCBI_CONNECTOR__H */
diff --git a/connect/ncbi_connutil.c b/connect/ncbi_connutil.c
index fe605626..3bb94ac5 100644
--- a/connect/ncbi_connutil.c
+++ b/connect/ncbi_connutil.c
@@ -1,4 +1,4 @@
-/* $Id: ncbi_connutil.c,v 6.115 2007/04/05 12:26:02 kazimird Exp $
+/* $Id: ncbi_connutil.c,v 6.119 2008/02/13 20:25:42 kazimird Exp $
* ===========================================================================
*
* PUBLIC DOMAIN NOTICE
@@ -26,7 +26,7 @@
* Author: Denis Vakatov, Anton Lavrentiev
*
* File Description:
- * Auxiliary API, mostly CONN-, URL-/BASE64-, and MIME-related
+ * Auxiliary API, mostly CONN-, URL-, and MIME-related
* (see in "ncbi_connutil.h" for more details).
*
*/
@@ -38,6 +38,8 @@
#include <errno.h>
#include <stdlib.h>
+#define NCBI_USE_ERRCODE_X Connect_Util
+
extern const char* ConnNetInfo_GetValue(const char* service, const char* param,
char* value, size_t value_size,
@@ -68,7 +70,7 @@ extern const char* ConnNetInfo_GetValue(const char* service, const char* param,
s += sizeof(DEF_CONN_REG_SECTION) - 1;
*s++ = '_';
memcpy(s, param, plen);
- if ((val = getenv(strupr(buf))) != 0)
+ if ((val = getenv(buf)) != 0 || (val = getenv(strupr(buf))) != 0)
return strncpy0(value, val, value_size - 1);
/* Next, search for 'CONN_param' in '[service]' registry section */
@@ -268,8 +270,8 @@ extern int/*bool*/ ConnNetInfo_AdjustForHttpProxy(SConnNetInfo* info)
return 0/*false*/;
if (strlen(info->host) + 16 + strlen(info->path) >= sizeof(info->path)) {
- CORE_LOG(eLOG_Error,
- "[ConnNetInfo_AdjustForHttpProxy] Adjusted path too long");
+ CORE_LOG_X(1, eLOG_Error,
+ "[ConnNetInfo_AdjustForHttpProxy] Adjusted path too long");
assert(0);
return 0/*false*/;
}
@@ -715,15 +717,20 @@ static int/*bool*/ s_IsSufficientAddress(const char* addr)
}
-static const char* s_ClientAddress(const char* client_host, int/*bool*/ local)
+static const char* s_ClientAddress(const char* client_host,
+ int/*bool*/ local_host)
{
+ const char* c = client_host;
unsigned int ip;
- char addr[64];
+ char addr[80];
char* s;
assert(client_host);
+ strncpy0(addr, client_host, sizeof(addr) - 1);
+ if (UTIL_NcbiLocalHostName(addr) && (s = strdup(addr)) != 0)
+ client_host = s;
if (s_IsSufficientAddress(client_host) ||
- !(ip = *client_host && !local
+ !(ip = *client_host && !local_host
? SOCK_gethostbyname(client_host)
: SOCK_GetLocalHostAddress(eDefault)) ||
SOCK_ntoa(ip, addr, sizeof(addr)) != 0 ||
@@ -731,6 +738,8 @@ static const char* s_ClientAddress(const char* client_host, int/*bool*/ local)
return client_host;
}
sprintf(s, "%s(%s)", client_host, addr);
+ if (c != client_host)
+ free((void*) client_host);
return s;
}
@@ -740,7 +749,7 @@ extern int/*bool*/ ConnNetInfo_SetupStandardArgs(SConnNetInfo* info)
static const char service[] = "service";
static const char address[] = "address";
static const char platform[] = "platform";
- int/*bool*/ local;
+ int/*bool*/ local_host;
const char* arch;
const char* addr;
@@ -755,12 +764,12 @@ extern int/*bool*/ ConnNetInfo_SetupStandardArgs(SConnNetInfo* info)
ConnNetInfo_DeleteArg(info, platform);
else
ConnNetInfo_PreOverrideArg(info, platform, arch);
- local = !info->client_host[0];
- if (local &&
+ local_host = !info->client_host[0];
+ if (local_host &&
!SOCK_gethostbyaddr(0, info->client_host, sizeof(info->client_host))) {
SOCK_gethostname(info->client_host, sizeof(info->client_host));
}
- if (!(addr = s_ClientAddress(info->client_host, local)) || !*addr)
+ if (!(addr = s_ClientAddress(info->client_host, local_host)) || !*addr)
ConnNetInfo_DeleteArg(info, address);
else
ConnNetInfo_PreOverrideArg(info, address, addr);
@@ -823,7 +832,8 @@ extern void ConnNetInfo_Log(const SConnNetInfo* info, LOG lg)
return;
if (!info) {
- LOG_Write(lg, eLOG_Trace, 0, 0, 0, "ConnNetInfo_Log: NULL info");
+ LOG_Write(lg, NCBI_C_ERRCODE_X, 10, eLOG_Trace, 0, 0, 0,
+ "ConnNetInfo_Log: NULL info");
return;
}
@@ -833,7 +843,8 @@ extern void ConnNetInfo_Log(const SConnNetInfo* info, LOG lg)
? strlen(info->http_user_header) : 0) +
(info->http_referer
? strlen(info->http_referer) : 0)))) {
- LOG_WRITE(lg, eLOG_Error, "ConnNetInfo_Log: Cannot alloc temp buffer");
+ LOG_WRITE(lg, NCBI_C_ERRCODE_X, 11, eLOG_Error,
+ "ConnNetInfo_Log: Cannot alloc temp buffer");
return;
}
@@ -881,7 +892,7 @@ extern void ConnNetInfo_Log(const SConnNetInfo* info, LOG lg)
s_SaveBool (s, "proxy_adjusted", info->http_proxy_adjusted);
strcat(s, "#################### [END] SConnNetInfo\n");
- LOG_Write(lg, eLOG_Trace, 0, 0, 0, s);
+ LOG_Write(lg, NCBI_C_ERRCODE_X, 12, eLOG_Trace, 0, 0, 0, s);
free(s);
}
@@ -935,7 +946,7 @@ extern SOCK URL_Connect
/* check the args */
if (!host || !*host || !port ||
(user_hdr && *user_hdr && user_hdr[user_hdr_len - 1] != '\n')) {
- CORE_LOG(eLOG_Error, "[URL_Connect] Bad arguments");
+ CORE_LOG_X(2, eLOG_Error, "[URL_Connect] Bad arguments");
assert(0);
return 0/*error*/;
}
@@ -944,8 +955,8 @@ extern SOCK URL_Connect
if (req_method == eReqMethod_Any) {
req_method = content_length ? eReqMethod_Post : eReqMethod_Get;
} else if (req_method == eReqMethod_Get && content_length) {
- CORE_LOG(eLOG_Warning,
- "[URL_Connect] Content length ignored with method GET");
+ CORE_LOG_X(3, eLOG_Warning,
+ "[URL_Connect] Content length ignored with method GET");
content_length = 0;
}
switch (req_method) {
@@ -956,8 +967,9 @@ extern SOCK URL_Connect
x_req_r = "GET ";
break;
default:
- CORE_LOGF(eLOG_Error, ("[URL_Connect] Unrecognized request method"
- " (%d)", (int) req_method));
+ CORE_LOGF_X(4, eLOG_Error,
+ ("[URL_Connect] Unrecognized request method (%d)",
+ (int) req_method));
assert(0);
return 0/*error*/;
}
@@ -1007,9 +1019,10 @@ extern SOCK URL_Connect
!BUF_Write(&buf, buffer, strlen(buffer)))) ||
!BUF_Write(&buf, "\r\n", 2)) {
- CORE_LOGF(eLOG_Error, ("[URL_Connect] Error composing HTTP header for"
- " %s:%hu%s%s", host, port, errno ? ": " : "",
- errno ? strerror(errno) : ""));
+ CORE_LOGF_X(5, eLOG_Error,
+ ("[URL_Connect] Error composing HTTP header for"
+ " %s:%hu%s%s", host, port, errno ? ": " : "",
+ errno ? strerror(errno) : ""));
BUF_Destroy(buf);
if (x_args && x_args != args)
free((void*) x_args);
@@ -1020,9 +1033,10 @@ extern SOCK URL_Connect
if (!(header = (char*) malloc(headersize = BUF_Size(buf))) ||
BUF_Read(buf, header, headersize) != headersize) {
- CORE_LOGF(eLOG_Error, ("[URL_Connect] Error storing HTTP header for"
- " %s:%hu: %s", host, port,
- errno ? strerror(errno) : "Unknown error"));
+ CORE_LOGF_X(6, eLOG_Error,
+ ("[URL_Connect] Error storing HTTP header for"
+ " %s:%hu: %s", host, port,
+ errno ? strerror(errno) : "Unknown error"));
if (header)
free(header);
BUF_Destroy(buf);
@@ -1034,15 +1048,15 @@ extern SOCK URL_Connect
st = SOCK_CreateEx(host, port, c_timeout, &sock, header, headersize, log);
free(header);
if (st != eIO_Success) {
- CORE_LOGF(eLOG_Error,
- ("[URL_Connect] Socket connect to %s:%hu failed: %s",
- host, port, IO_StatusStr(st)));
+ CORE_LOGF_X(7, eLOG_Error,
+ ("[URL_Connect] Socket connect to %s:%hu failed: %s",
+ host, port, IO_StatusStr(st)));
return 0/*error*/;
}
/* setup I/O timeout for the connection */
if (SOCK_SetTimeout(sock, eIO_ReadWrite, rw_timeout) != eIO_Success) {
- CORE_LOG(eLOG_Error, "[URL_Connect] Cannot set connection timeout");
+ CORE_LOG_X(8, eLOG_Error, "[URL_Connect] Cannot set connection timeout");
SOCK_Close(sock);
return 0/*error*/;
}
@@ -1258,7 +1272,7 @@ extern EIO_Status BUF_StripToPattern
/****************************************************************************
- * URL- and BASE64- Encoding/Decoding
+ * URL- Encoding/Decoding
*/
@@ -1418,178 +1432,6 @@ extern void URL_Encode
}
-extern void BASE64_Encode
-(const void* src_buf,
- size_t src_size,
- size_t* src_read,
- void* dst_buf,
- size_t dst_size,
- size_t* dst_written,
- size_t* line_len)
-{
- static const char syms[] =
- "ABCDEFGHIJKLMNOPQRSTUVWXYZ" /*26*/
- "abcdefghijklmnopqrstuvwxyz" /*52*/
- "0123456789+/"; /*64*/
- const size_t max_len = line_len ? *line_len : 76;
- const size_t max_src =
- ((dst_size - (max_len ? dst_size/(max_len + 1) : 0)) >> 2) * 3;
- unsigned char* src = (unsigned char*) src_buf;
- unsigned char* dst = (unsigned char*) dst_buf;
- size_t len = 0, i = 0, j = 0;
- unsigned char temp = 0, c;
- unsigned char shift = 2;
- if (!max_src || !src_size) {
- *src_read = 0;
- *dst_written = 0;
- if (dst_size > 0) {
- *dst = '\0';
- }
- return;
- }
- if (src_size > max_src) {
- src_size = max_src;
- }
- c = src[0];
- for (;;) {
- unsigned char bits = (c >> shift) & 0x3F;
- if (max_len && len >= max_len) {
- dst[j++] = '\n';
- len = 0;
- }
- assert((size_t)(temp | bits) < sizeof(syms) - 1);
- dst[j++] = syms[temp | bits];
- len++;
- if (i >= src_size) {
- break;
- }
- shift += 2;
- shift &= 7;
- temp = (c << (8 - shift)) & 0x3F;
- if (shift) {
- c = ++i < src_size ? src[i] : 0;
- } else if (i + 1 == src_size) {
- i++;
- }
- }
- assert(j <= dst_size);
- *src_read = i;
- for (i = 0; i < (3 - src_size % 3) % 3; i++) {
- if (max_len && len >= max_len) {
- dst[j++] = '\n';
- len = 0;
- }
- dst[j++] = '=';
- len++;
- }
- assert(j <= dst_size);
- *dst_written = j;
- if (j < dst_size) {
- dst[j] = '\0';
- }
-}
-
-
-extern int/*bool*/ BASE64_Decode
-(const void* src_buf,
- size_t src_size,
- size_t* src_read,
- void* dst_buf,
- size_t dst_size,
- size_t* dst_written)
-{
- unsigned char* src = (unsigned char*) src_buf;
- unsigned char* dst = (unsigned char*) dst_buf;
- size_t i = 0, j = 0, k = 0, l;
- unsigned int temp = 0;
- if (src_size < 4 || dst_size < 3) {
- *src_read = 0;
- *dst_written = 0;
- return 0/*false*/;
- }
- for (;;) {
- int/*bool*/ ok = i < src_size ? 1/*true*/ : 0/*false*/;
- unsigned char c = ok ? src[i++] : '=';
- if (c == '=') {
- c = 64; /*end*/
- } else if (c >= 'A' && c <= 'Z') {
- c -= 'A';
- } else if (c >= 'a' && c <= 'z') {
- c -= 'a' - 26;
- } else if (c >= '0' && c <= '9') {
- c -= '0' - 52;
- } else if (c == '+') {
- c = 62;
- } else if (c == '/') {
- c = 63;
- } else {
- continue;
- }
- temp <<= 6;
- temp |= c & 0x3F;
- if (!(++k & 3) || c == 64) {
- if (c == 64) {
- if (k < 2) {
- if (ok) {
- /* pushback leading '=' */
- --i;
- }
- break;
- }
- switch (k) {
- case 2:
- temp >>= 4;
- break;
- case 3:
- temp >>= 10;
- break;
- case 4:
- temp >>= 8;
- break;
- default:
- assert(0);
- break;
- }
- l = 4 - k;
- while (l > 0) {
- /* eat up '='-padding */
- if (i >= src_size)
- break;
- if (src[i] == '=')
- l--;
- else if (src[i] != '\r' && src[i] != '\n')
- break;
- i++;
- }
- } else {
- k = 0;
- }
- switch (k) {
- case 0:
- dst[j++] = (temp & 0xFF0000) >> 16;
- /*FALLTHRU*/;
- case 4:
- dst[j++] = (temp & 0xFF00) >> 8;
- /*FALLTHRU*/
- case 3:
- dst[j++] = (temp & 0xFF);
- break;
- default:
- break;
- }
- if (j + 3 >= dst_size || c == 64) {
- break;
- }
- temp = 0;
- }
- }
- *src_read = i;
- *dst_written = j;
- return i && j ? 1/*true*/ : 0/*false*/;
-}
-
-
-
/****************************************************************************
* NCBI-specific MIME content type and sub-types
*/
diff --git a/connect/ncbi_connutil.h b/connect/ncbi_connutil.h
index 9e6fa7e2..fbaa23b2 100644
--- a/connect/ncbi_connutil.h
+++ b/connect/ncbi_connutil.h
@@ -1,7 +1,7 @@
#ifndef CONNECT___NCBI_CONNUTIL__H
#define CONNECT___NCBI_CONNUTIL__H
-/* $Id: ncbi_connutil.h,v 6.61 2007/01/24 04:23:08 lavr Exp $
+/* $Id: ncbi_connutil.h,v 6.62 2007/12/05 19:26:19 kazimird Exp $
* ===========================================================================
*
* PUBLIC DOMAIN NOTICE
@@ -62,10 +62,6 @@
* URL_Decode()
* URL_DecodeEx()
*
- * 4.Perform BASE64 (RFC 1521) encoding/decoding of data:
- * BASE64_Encode()
- * BASE64_Decode()
- *
* 5.Compose or parse NCBI-specific Content-Type's:
* EMIME_Type
* EMIME_SubType
@@ -548,49 +544,6 @@ extern NCBI_XCONNECT_EXPORT int/*bool*/ URL_DecodeEx
-/* BASE64-encode up to "src_size" symbols(bytes) from buffer "src_buf".
- * Write the encoded data to buffer "dst_buf", but no more than "dst_size"
- * bytes.
- * Assign "*src_read" to the # of bytes successfully encoded from "src_buf".
- * Assign "*dst_written" to the # of bytes written to buffer "dst_buf".
- * Resulting lines will not exceed "*line_len" (or the standard default
- * if "line_len" is NULL) bytes; *line_len == 0 disables line breaks.
- * To estimate required destination buffer size, you can take into account
- * that BASE64 coding converts every 3 bytes of source into 4 bytes on
- * destination, not including the line breaks ('\n').
- */
-extern NCBI_XCONNECT_EXPORT void BASE64_Encode
-(const void* src_buf, /* [in] non-NULL */
- size_t src_size, /* [in] */
- size_t* src_read, /* [out] non-NULL */
- void* dst_buf, /* [in/out] non-NULL */
- size_t dst_size, /* [in] */
- size_t* dst_written,/* [out] non-NULL */
- size_t* line_len /* [in] may be NULL */
- );
-
-
-/* BASE64-decode up to "src_size" symbols(bytes) from buffer "src_buf".
- * Write the decoded data to buffer "dst_buf", but no more than "dst_size"
- * bytes.
- * Assign "*src_read" to the # of bytes successfully decoded from "src_buf".
- * Assign "*dst_written" to the # of bytes written to buffer "dst_buf".
- * Return FALSE (0) only if cannot decode anything.
- * Destination buffer size, as a worst case, equal to the source size
- * will accomodate the entire input. As a rule, each 4 bytes of source
- * (line breaks skipped) are converted into 3 bytes on output.
- */
-extern NCBI_XCONNECT_EXPORT int/*bool*/ BASE64_Decode
-(const void* src_buf, /* [in] non-NULL */
- size_t src_size, /* [in] */
- size_t* src_read, /* [out] non-NULL */
- void* dst_buf, /* [in/out] non-NULL */
- size_t dst_size, /* [in] */
- size_t* dst_written /* [out] non-NULL */
- );
-
-
-
/****************************************************************************
* NCBI-specific MIME content type and sub-types
* (the API to compose and parse them)
@@ -731,209 +684,4 @@ size_t HostPortToString
/* @} */
-
-/*
- * --------------------------------------------------------------------------
- * $Log: ncbi_connutil.h,v $
- * Revision 6.61 2007/01/24 04:23:08 lavr
- * Synchronized with the C++ Toolkit.
- *
- * Revision 6.60 2006/10/26 18:54:12 jcherry
- * Added export specifier
- *
- * Revision 6.59 2006/08/14 19:08:41 lavr
- * HTTP_REFERER documented as may have added automatically
- *
- * Revision 6.58 2006/06/15 02:43:59 lavr
- * GetUsername, GetVMPageSize, CRC32 moved from here to ncbi_util.h
- *
- * Revision 6.57 2006/06/07 20:03:46 lavr
- * +SConnNetInfo::http_referer
- *
- * Revision 6.56 2006/04/21 14:41:19 lavr
- * REG_CONN_SERVICE_NAME added
- *
- * Revision 6.55 2006/04/21 01:33:22 lavr
- * SConnNetInfo::lb_disable reinstated along with LB_DISABLE reg/env key
- *
- * Revision 6.53 2006/04/20 13:57:51 lavr
- * Registry keys for new switching scheme for service mappers;
- * Registry keys for LOCAL service mappers
- *
- * Revision 6.52 2006/04/19 02:26:05 lavr
- * Document ConnNetInfo_{Pre|Post}OverrideArg in more details
- *
- * Revision 6.51 2006/02/23 15:46:16 lavr
- * Clean ChangeLog
- *
- * Revision 6.50 2006/02/23 15:22:43 lavr
- * +CONNUTIL_GetVMPageSize()
- *
- * Revision 6.49 2006/01/27 19:17:41 lavr
- * Fix NCBI_DEPRECATED placement to satify MSVC compiler
- *
- * Revision 6.48 2006/01/27 17:08:35 lavr
- * Spell CONNUTIL_GetUsername() this way
- *
- * Revision 6.47 2006/01/27 16:57:53 lavr
- * Obsoleted StringHostToPort() and HostPortToString()
- * Added new CONNUTIL_GetUsername()
- *
- * Revision 6.46 2006/01/11 20:19:56 lavr
- * -UTIL_ClientAddress()
- * +ConnNetInfo_DeleteAllArgs()
- * +ConnNetInfo_SetupStandardArgs()
- *
- * Revision 6.45 2006/01/11 16:24:03 lavr
- * +UTIL_ClientAddress()
- *
- * Revision 6.44 2005/11/29 21:32:07 lavr
- * Reserve SConnNetInfo::scheme, user, and pass for future use
- *
- * Revision 6.43 2005/11/29 19:51:51 lavr
- * +CRC32 (pure C interface; not a ZIP version)
- *
- * Revision 6.42 2005/04/20 15:47:24 lavr
- * DEF_CONN_REQ_METHOD changed to ANY
- *
- * Revision 6.41 2005/03/21 17:04:10 lavr
- * BASE64_{En|De}code buffer size estimation hints added
- *
- * Revision 6.40 2005/03/19 02:13:55 lavr
- * +BASE64_{En|De}code
- *
- * Revision 6.39 2005/02/28 17:23:20 lavr
- * Fix HTTP_USER_HEADER env.var. name ("HTTP" was missing)
- *
- * Revision 6.38 2005/02/24 19:51:24 lavr
- * Document CONN_HTTP_USER_HEADER environment
- *
- * Revision 6.37 2005/02/24 19:00:33 lavr
- * +CONN_HTTP_USER_HEADER
- *
- * Revision 6.36 2004/09/16 16:19:16 lavr
- * Mention [in opening comment summary] that EMIME_Type is defined here
- *
- * Revision 6.35 2004/01/14 18:51:41 lavr
- * +eMIME_XmlSoap
- *
- * Revision 6.34 2004/01/07 19:24:40 lavr
- * Added MIME subtype eMIME_Xml
- *
- * Revision 6.33 2003/09/23 21:00:33 lavr
- * Reorder included header files
- *
- * Revision 6.32 2003/08/25 14:48:50 lavr
- * ConnNetInfo_SetUserHeader(): to return completion status
- *
- * Revision 6.31 2003/05/29 17:56:53 lavr
- * More (clarified) comments for URL_Connect()
- *
- * Revision 6.30 2003/05/20 21:24:01 lavr
- * Limit SConnNetInfo::max_try by reasonable "short" value
- *
- * Revision 6.29 2003/04/09 17:58:47 siyan
- * Added doxygen support
- *
- * Revision 6.28 2003/01/17 19:44:20 lavr
- * Reduce dependencies
- *
- * Revision 6.27 2003/01/08 01:59:32 lavr
- * DLL-ize CONNECT library for MSVC (add NCBI_XCONNECT_EXPORT)
- *
- * Revision 6.26 2002/11/19 19:19:24 lavr
- * +ConnNetInfo_ExtendUserHeader()
- *
- * Revision 6.25 2002/11/12 05:49:47 lavr
- * Expand host names to hold 256 chars (instead of 64)
- *
- * Revision 6.24 2002/10/21 18:30:27 lavr
- * +ConnNetInfo_AppendArg()
- * +ConnNetInfo_PrependArg()
- * +ConnNetInfo_DeleteArg()
- * +ConnNetInfo_PreOverrideArg()
- * +ConnNetInfo_PostOverrideArg()
- *
- * Revision 6.23 2002/10/11 19:41:40 lavr
- * +ConnNetInfo_AppendUserHeader()
- * +ConnNetInfo_OverrideUserHeader()
- * +ConnNetInfo_DeleteUserHeader()
- *
- * Revision 6.22 2002/09/19 18:00:21 lavr
- * Header file guard macro changed; log moved to the end
- *
- * Revision 6.21 2002/05/06 19:07:25 lavr
- * -#include <stdlib>; -ConnNetInfo_Print(); +ConnNetInfo_Log()
- *
- * Revision 6.20 2002/02/20 19:12:03 lavr
- * Swapped eENCOD_Url and eENCOD_None; eENCOD_Unknown introduced
- *
- * Revision 6.19 2001/12/30 19:39:36 lavr
- * +ConnNetInfo_ParseURL()
- *
- * Revision 6.18 2001/09/28 20:45:26 lavr
- * SConnNetInfo::max_try equal to 0 is now treated the same way as equal to 1
- *
- * Revision 6.17 2001/09/19 15:58:37 lavr
- * Cut trailing blanks in blank lines
- *
- * Revision 6.16 2001/09/10 21:14:47 lavr
- * Added functions: StringToHostPort()
- * HostPortToString()
- *
- * Revision 6.15 2001/06/01 16:01:58 vakatov
- * MIME_ParseContentTypeEx() -- extended description
- *
- * Revision 6.14 2001/05/29 21:15:42 vakatov
- * + eMIME_Plain
- *
- * Revision 6.13 2001/04/24 21:21:38 lavr
- * Special text value "infinite" accepted as infinite timeout from environment
- *
- * Revision 6.12 2001/03/07 23:00:15 lavr
- * Default value for SConnNetInfo::stateless set to empty (FALSE)
- *
- * Revision 6.11 2001/03/02 20:07:07 lavr
- * Typos fixed
- *
- * Revision 6.10 2001/02/26 16:56:41 vakatov
- * Comment SConnNetInfo.
- *
- * Revision 6.9 2001/01/23 23:06:15 lavr
- * SConnNetInfo.debug_printout converted from boolean to enum
- * BUF_StripToPattern() introduced
- *
- * Revision 6.8 2001/01/11 23:05:13 lavr
- * ConnNetInfo_Create() fully documented
- *
- * Revision 6.7 2001/01/08 23:46:10 lavr
- * REQUEST_METHOD -> REQ_METHOD to be consistent with SConnNetInfo
- *
- * Revision 6.6 2001/01/08 22:47:13 lavr
- * ReqMethod constants changed (to conform to coding standard)
- * ClientMode removed; replaced by 2 booleans: stateless and firewall
- * in SConnInfo structure
- *
- * Revision 6.5 2000/12/29 17:47:46 lavr
- * NCBID stuff removed; ClientMode enum added;
- * ConnNetInfo_SetUserHeader added; http_user_header is now
- * included in ConnInfo structure. ConnNetInfo_Destroy parameter
- * changed to be a pointer (was a double pointer).
- *
- * Revision 6.4 2000/11/07 23:23:15 vakatov
- * In-sync with the C Toolkit "connutil.c:R6.15", "connutil.h:R6.13"
- * (with "eMIME_Dispatch" added).
- *
- * Revision 6.3 2000/10/05 22:39:21 lavr
- * SConnNetInfo modified to contain 'client_mode' instead of just 'firewall'
- *
- * Revision 6.2 2000/09/26 22:01:30 lavr
- * Registry entries changed, HTTP request method added
- *
- * Revision 6.1 2000/03/24 22:52:48 vakatov
- * Initial revision
- *
- * ==========================================================================
- */
-
#endif /* CONNECT___NCBI_CONNUTIL__H */
diff --git a/connect/ncbi_core.c b/connect/ncbi_core.c
index 95d2a4aa..223a573d 100644
--- a/connect/ncbi_core.c
+++ b/connect/ncbi_core.c
@@ -1,4 +1,4 @@
-/* $Id: ncbi_core.c,v 6.17 2006/07/13 21:01:04 lavr Exp $
+/* $Id: ncbi_core.c,v 6.18 2007/10/17 15:25:43 kazimird Exp $
* ===========================================================================
*
* PUBLIC DOMAIN NOTICE
@@ -264,7 +264,9 @@ extern void LOG_WriteInternal
int line,
const char* message,
const void* raw_data,
- size_t raw_size)
+ size_t raw_size,
+ int err_code,
+ int err_subcode)
{
if ( lg ) {
LOG_LOCK_READ;
@@ -274,13 +276,15 @@ extern void LOG_WriteInternal
if ( lg->handler ) {
SLOG_Handler call_data;
- call_data.level = level;
- call_data.module = module;
- call_data.file = file;
- call_data.line = line;
- call_data.message = message;
- call_data.raw_data = raw_data;
- call_data.raw_size = raw_size;
+ call_data.level = level;
+ call_data.err_code = err_code;
+ call_data.err_subcode = err_subcode;
+ call_data.module = module;
+ call_data.file = file;
+ call_data.line = line;
+ call_data.message = message;
+ call_data.raw_data = raw_data;
+ call_data.raw_size = raw_size;
lg->handler(lg->user_data, &call_data);
}
@@ -457,63 +461,3 @@ extern void REG_Set
REG_UNLOCK;
}
}
-
-
-/*
- * ---------------------------------------------------------------------------
- * $Log: ncbi_core.c,v $
- * Revision 6.17 2006/07/13 21:01:04 lavr
- * Formatting and changing constants to have "k" prefix
- *
- * Revision 6.16 2006/04/20 13:58:46 lavr
- * Wrap registry retrievals
- *
- * Revision 6.15 2005/04/20 18:13:39 lavr
- * +"ncbi_assert.h"
- *
- * Revision 6.14 2003/08/28 18:47:51 ucko
- * Revert previous hack (now handled another way)
- *
- * Revision 6.13 2003/08/27 12:32:30 ucko
- * Yet another attempt to work around the WorkShop lossage with k*Timeout.
- *
- * Revision 6.12 2003/05/05 20:17:17 lavr
- * LOG_WriteInternal() to require data ptr only if data size is not zero
- *
- * Revision 6.11 2003/02/20 17:52:12 lavr
- * Status verbal names changed not to have caps in the middle
- *
- * Revision 6.10 2002/10/28 15:42:48 lavr
- * Use "ncbi_ansi_ext.h" privately and use strncpy0()
- *
- * Revision 6.9 2002/08/13 19:30:13 lavr
- * Verbal representation of eIO_Interrupt; log moved to end
- *
- * Revision 6.8 2001/08/09 16:24:29 lavr
- * Remove last (unneeded) parameter from LOG_Reset()
- *
- * Revision 6.7 2001/04/25 20:52:29 vakatov
- * LOG_WriteInternal() -- abort on "eLOG_Fatal" even if no logging is set
- *
- * Revision 6.6 2001/01/11 16:42:32 lavr
- * Registry Get/Set methods got the 'user_data' argument, forgotten earlier
- *
- * Revision 6.5 2000/10/18 20:29:43 vakatov
- * REG_Get:: pass in the default value (rather than '\0')
- *
- * Revision 6.4 2000/06/23 19:34:43 vakatov
- * Added means to log binary data
- *
- * Revision 6.3 2000/05/30 23:21:36 vakatov
- * LOG_WriteInternal(): exit/abort on "eLOG_Fatal"
- *
- * Revision 6.2 2000/03/24 23:12:07 vakatov
- * Starting the development quasi-branch to implement CONN API.
- * All development is performed in the NCBI C++ tree only, while
- * the NCBI C tree still contains "frozen" (see the last revision) code.
- *
- * Revision 6.1 2000/02/23 22:36:16 vakatov
- * Initial revision
- *
- * ===========================================================================
- */
diff --git a/connect/ncbi_core.h b/connect/ncbi_core.h
index 73d9b547..6a15e108 100644
--- a/connect/ncbi_core.h
+++ b/connect/ncbi_core.h
@@ -1,7 +1,7 @@
#ifndef CONNECT___NCBI_CORE__H
#define CONNECT___NCBI_CORE__H
-/* $Id: ncbi_core.h,v 6.31 2007/06/25 15:25:32 kazimird Exp $
+/* $Id: ncbi_core.h,v 6.33 2007/10/17 15:25:43 kazimird Exp $
* ===========================================================================
*
* PUBLIC DOMAIN NOTICE
@@ -313,6 +313,10 @@ extern NCBI_XCONNECT_EXPORT const char* LOG_LevelStr(ELOG_Level level);
* Raw data to log (usually NULL)
* @param raw_size
* Size of the raw data (usually zero)
+ * @param err_code
+ * Error code of the message
+ * @param err_subcode
+ * Error subcode of the message
* @sa
* FLOG_Handler, LOG_Create, LOG_WriteInternal
*/
@@ -324,6 +328,8 @@ typedef struct {
int line;
const void* raw_data;
size_t raw_size;
+ int err_code;
+ int err_subcode;
} SLOG_Handler;
@@ -441,6 +447,10 @@ extern NCBI_XCONNECT_EXPORT LOG LOG_Delete(LOG lg);
* Raw data to log (can be NULL)
* @param raw_size
* Size of the raw data (can be zero)
+ * @param err_code
+ * Error code of the message
+ * @param err_subcode
+ * Error subcode of the message
* @sa
* LOG_Create, ELOG_Level, FLOG_Handler, LOG_WRITE, LOG_DATA
*/
@@ -452,8 +462,10 @@ extern NCBI_XCONNECT_EXPORT void LOG_WriteInternal
int line,
const char* message,
const void* raw_data,
- size_t raw_size
- );
+ size_t raw_size,
+ int err_code,
+ int err_subcode
+);
diff --git a/connect/ncbi_core_c.c b/connect/ncbi_core_c.c
index a2de314c..912c8bb0 100644
--- a/connect/ncbi_core_c.c
+++ b/connect/ncbi_core_c.c
@@ -1,4 +1,4 @@
-/* $Id: ncbi_core_c.c,v 6.18 2007/06/25 15:33:04 lavr Exp $
+/* $Id: ncbi_core_c.c,v 6.19 2007/10/18 15:29:26 ivanovp Exp $
* ===========================================================================
*
* PUBLIC DOMAIN NOTICE
@@ -150,7 +150,7 @@ static void s_LOG_Handler(void* user_data/*unused*/, SLOG_Handler* call_data)
if (!(msg = LOG_ComposeMessage(call_data, fLOG_None)))
return/*failed*/;
- Nlm_ErrPostStr(sev, 0, 0, msg);
+ Nlm_ErrPostStr(sev, call_data->err_code, call_data->err_subcode, msg);
if (call_data->level == eLOG_Trace)
Nlm_ErrClear();
@@ -240,6 +240,9 @@ extern void CONNECT_Init(const char* conf_file)
/*
* ---------------------------------------------------------------------------
* $Log: ncbi_core_c.c,v $
+ * Revision 6.19 2007/10/18 15:29:26 ivanovp
+ * Connect and ctools libraries are changed to use new error and log posting system with error codes and subcodes. JIRA: CXX-3
+ *
* Revision 6.18 2007/06/25 15:33:04 lavr
* +eMT_TryLock[Read]
*
diff --git a/connect/ncbi_dispd.c b/connect/ncbi_dispd.c
index 121dbec1..c8bb2ea0 100644
--- a/connect/ncbi_dispd.c
+++ b/connect/ncbi_dispd.c
@@ -1,4 +1,4 @@
-/* $Id: ncbi_dispd.c,v 6.84 2007/05/01 20:55:29 kazimird Exp $
+/* $Id: ncbi_dispd.c,v 6.87 2008/02/14 17:25:50 kazimird Exp $
* ===========================================================================
*
* PUBLIC DOMAIN NOTICE
@@ -43,6 +43,8 @@
#include <stdio.h>
#include <stdlib.h>
+#define NCBI_USE_ERRCODE_X Connect_Dispd
+
/* Lower bound of up-to-date/out-of-date ratio */
#define DISPD_STALE_RATIO_OK 0.8
/* Default rate increase 20% if svc runs locally */
@@ -148,7 +150,7 @@ static int/*bool*/ s_Resolve(SERV_ITER iter)
assert(!!net_info->stateless == !!iter->stateless);
/* Obtain additional header information */
if ((!(s = SERV_Print(iter, 0))
- || ConnNetInfo_OverrideUserHeader(net_info, s))
+ || ConnNetInfo_OverrideUserHeader(net_info, s))
&&
ConnNetInfo_OverrideUserHeader(net_info,
iter->ok_down && iter->ok_suppressed
@@ -173,9 +175,9 @@ static int/*bool*/ s_Resolve(SERV_ITER iter)
ConnNetInfo_DeleteUserHeader(net_info, s);
free(s);
}
- if (!conn || CONN_Create(conn, &c) != eIO_Success) {
- CORE_LOGF(eLOG_Error, ("[DISPATCHER] Unable to create aux. %s",
- conn ? "connection" : "connector"));
+ if (!conn || CONN_Create(conn, &c) != eIO_Success) {
+ CORE_LOGF_X(1, eLOG_Error, ("[DISPATCHER] Unable to create aux. %s",
+ conn ? "connection" : "connector"));
assert(0);
return 0/*failed*/;
}
@@ -246,8 +248,9 @@ static int/*bool*/ s_Update(SERV_ITER iter, const char* text, int code)
text += sizeof(HTTP_DISP_FAILURES) - 1;
while (*text && isspace((unsigned char)(*text)))
text++;
- CORE_LOGF(eLOG_Warning, ("[DISPATCHER %s] %s",
- failure ? "FAILURE" : "MESSAGE", text));
+ CORE_LOGF_X(2, eLOG_Warning,
+ ("[DISPATCHER %s] %s",
+ failure ? "FAILURE" : "MESSAGE", text));
}
#endif /*_DEBUG && !NDEBUG*/
if (failure)
diff --git a/connect/ncbi_ftp_connector.c b/connect/ncbi_ftp_connector.c
index d912c430..b35f51c5 100644
--- a/connect/ncbi_ftp_connector.c
+++ b/connect/ncbi_ftp_connector.c
@@ -1,4 +1,4 @@
-/* $Id: ncbi_ftp_connector.c,v 1.20 2007/01/23 22:31:29 kazimird Exp $
+/* $Id: ncbi_ftp_connector.c,v 1.21 2007/10/17 15:25:43 kazimird Exp $
* ===========================================================================
*
* PUBLIC DOMAIN NOTICE
@@ -46,6 +46,9 @@
#include <stdlib.h>
+#define NCBI_USE_ERRCODE_X Connect_FTP
+
+
/***********************************************************************
* INTERNAL -- Auxiliary types and static functions
***********************************************************************/
@@ -307,7 +310,7 @@ static EIO_Status s_FTPAbort(SFTPConnector* xxx,
status = SOCK_Close(xxx->data);
else {
if (status == eIO_Timeout) {
- CORE_LOG(eLOG_Warning,
+ CORE_LOG_X(1, eLOG_Warning,
"[FTP] Timed out on data connection abort");
}
SOCK_Abort(xxx->data);
@@ -740,71 +743,3 @@ extern CONNECTOR FTP_CreateDownloadConnector(const char* host,
return ccc;
}
-
-
-/*
- * --------------------------------------------------------------------------
- * $Log: ncbi_ftp_connector.c,v $
- * Revision 1.20 2007/01/23 22:31:29 kazimird
- * Synchronized with the C++ Toolkit.
- *
- * Revision 1.19 2006/12/07 16:21:02 lavr
- * Use minus sign in default password to try to turn off human-readable msgs
- *
- * Revision 1.18 2006/10/23 21:19:07 lavr
- * Empty while() extended with a dummy continue (to avoid misplaced ; warning)
- *
- * Revision 1.17 2006/01/27 17:01:19 lavr
- * Replace obsolete call names with current ones
- *
- * Revision 1.16 2006/01/11 20:21:32 lavr
- * Uniform creation/fill-up of connector structures
- *
- * Revision 1.15 2005/12/14 21:31:04 lavr
- * Two explicit (char*) casts added
- *
- * Revision 1.14 2005/06/08 20:42:05 lavr
- * Use safer memmove() instead of strcpy() in PASV parsing
- *
- * Revision 1.13 2005/06/02 17:52:31 lavr
- * s_VT_Write(): Unused variable "s" removed
- *
- * Revision 1.12 2005/05/20 13:02:13 lavr
- * s_VT_Write() not to cut '\r' -- instead, do this in s_FTPExecute()
- *
- * Revision 1.11 2005/05/20 12:11:00 lavr
- * ABOR sequence reimplemented to work even with buggy FTPDs
- *
- * Revision 1.10 2005/05/18 20:56:45 lavr
- * Use assert() to test flags for validity in constructor
- *
- * Revision 1.9 2005/05/18 18:16:41 lavr
- * Add EFCDC_Flags and TFCDC_Flags to better control underlying SOCK logs
- * Fix s_VT_Write() not to use strchr() -- memchr() must be used there!
- *
- * Revision 1.8 2005/05/11 20:00:25 lavr
- * Empty NLST result list bug fixed
- *
- * Revision 1.7 2005/04/20 18:15:59 lavr
- * +<assert.h>
- *
- * Revision 1.6 2005/01/27 18:59:52 lavr
- * Explicit cast of malloc()ed memory
- *
- * Revision 1.5 2005/01/05 17:40:13 lavr
- * FEAT extensions and fixes for protocol compliance
- *
- * Revision 1.4 2004/12/27 15:31:27 lavr
- * Implement telnet SYNCH and FTP ABORT according to the standard
- *
- * Revision 1.3 2004/12/08 21:03:26 lavr
- * Fixes for default ctor parameters
- *
- * Revision 1.2 2004/12/07 14:21:55 lavr
- * Init wbuf in ctor
- *
- * Revision 1.1 2004/12/06 17:48:38 lavr
- * Initial revision
- *
- * ==========================================================================
- */
diff --git a/connect/ncbi_heapmgr.c b/connect/ncbi_heapmgr.c
index 05d975ea..2596c463 100644
--- a/connect/ncbi_heapmgr.c
+++ b/connect/ncbi_heapmgr.c
@@ -1,4 +1,4 @@
-/* $Id: ncbi_heapmgr.c,v 6.39 2007/04/20 01:55:30 kazimird Exp $
+/* $Id: ncbi_heapmgr.c,v 6.43 2008/02/21 15:26:12 kazimird Exp $
* ===========================================================================
*
* PUBLIC DOMAIN NOTICE
@@ -116,6 +116,8 @@
#include <stdlib.h>
#include <string.h>
+#define NCBI_USE_ERRCODE_X Connect_HeapMgr
+
#if defined(NCBI_OS_MSWIN) && defined(_WIN64)
/* Disable ptr->long conversion warning (even on explicit cast!) */
# pragma warning (disable : 4311)
@@ -189,9 +191,10 @@ HEAP HEAP_Create(void* base, TNCBI_Size size,
if (!base != !size)
return 0;
if (size && size < _HEAP_ALIGNMENT) {
- CORE_LOGF(eLOG_Error,
- ("Heap Create: Storage too small: provided %u, required %u+",
- size, _HEAP_ALIGNMENT));
+ CORE_LOGF_X(1, eLOG_Error,
+ ("Heap Create: Storage too small: "
+ "provided %u, required %u+",
+ size, _HEAP_ALIGNMENT));
return 0;
}
if (!(heap = (HEAP) malloc(sizeof(*heap))))
@@ -210,8 +213,9 @@ HEAP HEAP_Create(void* base, TNCBI_Size size,
SHEAP_HeapBlock* b = heap->base;
/* Reformat the pre-allocated heap */
if (_HEAP_ALIGN(base, sizeof(SHEAP_Block)) != (unsigned long) base) {
- CORE_LOGF(eLOG_Warning,
- ("Heap Create: Unaligned base (0x%08lX)", (long) base));
+ CORE_LOGF_X(2, eLOG_Warning,
+ ("Heap Create: Unaligned base (0x%08lX)",
+ (long) base));
}
b->head.flag = HEAP_FREE | HEAP_LAST;
b->head.size = size;
@@ -230,16 +234,17 @@ HEAP HEAP_AttachFast(const void* base, TNCBI_Size size, int serial)
if (!base != !size || !(heap = (HEAP) calloc(1, sizeof(*heap))))
return 0;
if (_HEAP_ALIGN(base, sizeof(SHEAP_Block)) != (unsigned long) base) {
- CORE_LOGF(eLOG_Warning,
- ("Heap Attach: Unaligned base (0x%08lX)", (long) base));
+ CORE_LOGF_X(3, eLOG_Warning,
+ ("Heap Attach: Unaligned base (0x%08lX)", (long) base));
}
heap->base = (SHEAP_HeapBlock*) base;
heap->size = HEAP_ALIGN(size) >> _HEAP_ALIGNSHIFT;
heap->serial = serial;
if (size != heap->size << _HEAP_ALIGNSHIFT) {
- CORE_LOGF(eLOG_Warning,
- ("Heap Attach: Heap size alignment (%u->%u) can result in"
- " garbage in data", size, heap->size << _HEAP_ALIGNSHIFT));
+ CORE_LOGF_X(4, eLOG_Warning,
+ ("Heap Attach: Heap size alignment (%u->%u) "
+ "can result in garbage in data",
+ size, heap->size << _HEAP_ALIGNSHIFT));
}
return heap;
}
@@ -253,10 +258,10 @@ HEAP HEAP_Attach(const void* base, int serial)
const SHEAP_HeapBlock* b = (const SHEAP_HeapBlock*) base;
for (;;) {
if (!HEAP_ISUSED(b) && !HEAP_ISFREE(b)) {
- CORE_LOGF(eLOG_Error,
- ("Heap Attach: Heap corrupt @%u (0x%08X, %u)",
- HEAP_INDEX(b, (SHEAP_HeapBlock*) base),
- b->head.flag, b->head.size));
+ CORE_LOGF_X(5, eLOG_Error,
+ ("Heap Attach: Heap corrupt @%u (0x%08X, %u)",
+ HEAP_INDEX(b, (SHEAP_HeapBlock*) base),
+ b->head.flag, b->head.size));
return 0;
}
size += b->head.size;
@@ -404,14 +409,14 @@ static SHEAP_Block* s_HEAP_Alloc(HEAP heap, TNCBI_Size size, int/*bool*/ fast)
char _id[32];
if (!heap) {
- CORE_LOG(eLOG_Warning, "Heap Alloc: NULL heap");
+ CORE_LOG_X(6, eLOG_Warning, "Heap Alloc: NULL heap");
return 0;
}
assert(!heap->base == !heap->size);
if (!heap->chunk) {
- CORE_LOGF(eLOG_Error,
- ("Heap Alloc%s: Heap read-only", s_HEAP_Id(_id, heap)));
+ CORE_LOGF_X(7, eLOG_Error,
+ ("Heap Alloc%s: Heap read-only", s_HEAP_Id(_id, heap)));
return 0;
}
if (size < 1)
@@ -425,11 +430,12 @@ static SHEAP_Block* s_HEAP_Alloc(HEAP heap, TNCBI_Size size, int/*bool*/ fast)
b = f;
do {
if (!HEAP_ISFREE(b)) {
- CORE_LOGF(eLOG_Error,
- ("Heap Alloc%s: Heap%s corrupt @%u/%u (0x%08X, %u)",
- s_HEAP_Id(_id, heap), b == f ? " header" : "",
- HEAP_INDEX(b, heap->base), heap->size,
- b->head.flag, b->head.size));
+ CORE_LOGF_X(8, eLOG_Error,
+ ("Heap Alloc%s: Heap%s corrupt "
+ "@%u/%u (0x%08X, %u)",
+ s_HEAP_Id(_id, heap), b == f ? " header" : "",
+ HEAP_INDEX(b, heap->base), heap->size,
+ b->head.flag, b->head.size));
return 0;
}
if (b->head.size >= size)
@@ -445,17 +451,20 @@ static SHEAP_Block* s_HEAP_Alloc(HEAP heap, TNCBI_Size size, int/*bool*/ fast)
else if (!heap->resize)
return 0;
else {
- TNCBI_Size hsize = ((size + (heap->size << _HEAP_ALIGNSHIFT)
- + heap->chunk - 1) / heap->chunk) * heap->chunk;
+ TNCBI_Size dsize = heap->size << _HEAP_ALIGNSHIFT;
+ TNCBI_Size hsize = ((dsize + size + heap->chunk - 1)
+ / heap->chunk) * heap->chunk;
SHEAP_HeapBlock* base = (SHEAP_HeapBlock*)
heap->resize(heap->base, (size_t) hsize, heap->arg);
if (_HEAP_ALIGN(base, sizeof(SHEAP_Block)) != (unsigned long) base) {
- CORE_LOGF(eLOG_Warning,
- ("Heap Alloc%s: Unaligned base (0x%08lX)",
- s_HEAP_Id(_id, heap), (long) base));
+ CORE_LOGF_X(9, eLOG_Warning,
+ ("Heap Alloc%s: Unaligned base (0x%08lX)",
+ s_HEAP_Id(_id, heap), (long) base));
}
if (!base)
return 0;
+ dsize = hsize - dsize;
+ memset(base + heap->size, 0, (size_t) dsize); /* security */
b = base + heap->last;
if (!heap->base) {
@@ -472,7 +481,7 @@ static SHEAP_Block* s_HEAP_Alloc(HEAP heap, TNCBI_Size size, int/*bool*/ fast)
/* New block is at the very top on the heap */
b = base + heap->size;
b->head.flag = HEAP_FREE | HEAP_LAST;
- b->head.size = hsize - (heap->size << _HEAP_ALIGNSHIFT);
+ b->head.size = dsize;
heap->last = heap->size;
if (heap->free < heap->size) {
assert(HEAP_ISFREE(base + heap->free));
@@ -484,11 +493,11 @@ static SHEAP_Block* s_HEAP_Alloc(HEAP heap, TNCBI_Size size, int/*bool*/ fast)
b->prevfree = heap->size;
b->nextfree = heap->size;
}
- heap->free = heap->size;
+ heap->free = heap->size;
} else {
/* Extend last free block */
assert(HEAP_ISFREE(b));
- b->head.size += hsize - (heap->size << _HEAP_ALIGNSHIFT);
+ b->head.size += dsize;
}
}
heap->base = base;
@@ -586,14 +595,14 @@ void HEAP_Free(HEAP heap, SHEAP_Block* ptr)
char _id[32];
if (!heap) {
- CORE_LOG(eLOG_Warning, "Heap Free: NULL heap");
+ CORE_LOG_X(10, eLOG_Warning, "Heap Free: NULL heap");
return;
}
assert(!heap->base == !heap->size);
if (!heap->chunk) {
- CORE_LOGF(eLOG_Error,
- ("Heap Free%s: Heap read-only", s_HEAP_Id(_id, heap)));
+ CORE_LOGF_X(11, eLOG_Error,
+ ("Heap Free%s: Heap read-only", s_HEAP_Id(_id, heap)));
return;
}
if (!ptr)
@@ -606,14 +615,14 @@ void HEAP_Free(HEAP heap, SHEAP_Block* ptr)
if (HEAP_ISUSED(b)) {
s_HEAP_Free(heap, p, b);
} else if (HEAP_ISFREE(b)) {
- CORE_LOGF(eLOG_Warning,
- ("Heap Free%s: Freeing free block @%u",
- s_HEAP_Id(_id, heap), HEAP_INDEX(b, heap->base)));
+ CORE_LOGF_X(12, eLOG_Warning,
+ ("Heap Free%s: Freeing free block @%u",
+ s_HEAP_Id(_id, heap), HEAP_INDEX(b, heap->base)));
} else {
- CORE_LOGF(eLOG_Error,
- ("Heap Free%s: Heap corrupt @%u/%u (0x%08X, %u)",
- s_HEAP_Id(_id, heap), HEAP_INDEX(b, heap->base),
- heap->size, b->head.flag, b->head.size));
+ CORE_LOGF_X(13, eLOG_Error,
+ ("Heap Free%s: Heap corrupt @%u/%u (0x%08X, %u)",
+ s_HEAP_Id(_id, heap), HEAP_INDEX(b, heap->base),
+ heap->size, b->head.flag, b->head.size));
}
return;
}
@@ -621,8 +630,8 @@ void HEAP_Free(HEAP heap, SHEAP_Block* ptr)
b = HEAP_NEXT(b);
}
- CORE_LOGF(eLOG_Error,
- ("Heap Free%s: Block not found", s_HEAP_Id(_id, heap)));
+ CORE_LOGF_X(14, eLOG_Error,
+ ("Heap Free%s: Block not found", s_HEAP_Id(_id, heap)));
}
@@ -632,14 +641,14 @@ void HEAP_FreeFast(HEAP heap, SHEAP_Block* ptr, const SHEAP_Block* prev)
char _id[32];
if (!heap) {
- CORE_LOG(eLOG_Warning, "Heap Free: NULL heap");
+ CORE_LOG_X(15, eLOG_Warning, "Heap Free: NULL heap");
return;
}
assert(!heap->base == !heap->size);
if (!heap->chunk) {
- CORE_LOGF(eLOG_Error,
- ("Heap Free%s: Heap read-only", s_HEAP_Id(_id, heap)));
+ CORE_LOGF_X(16, eLOG_Error,
+ ("Heap Free%s: Heap read-only", s_HEAP_Id(_id, heap)));
return;
}
if (!ptr)
@@ -649,19 +658,19 @@ void HEAP_FreeFast(HEAP heap, SHEAP_Block* ptr, const SHEAP_Block* prev)
b = (SHEAP_HeapBlock*) ptr;
if (!s_HEAP_fast) {
if (b < heap->base || b >= heap->base + heap->size) {
- CORE_LOGF(eLOG_Error,
- ("Heap Free%s: Alien block", s_HEAP_Id(_id, heap)));
+ CORE_LOGF_X(17, eLOG_Error,
+ ("Heap Free%s: Alien block", s_HEAP_Id(_id, heap)));
return;
} else if ((!p && b != heap->base) ||
( p && (p < heap->base || HEAP_NEXT(p) != b))) {
- CORE_LOGF(eLOG_Warning,
- ("Heap Free%s: Invalid hint", s_HEAP_Id(_id, heap)));
+ CORE_LOGF_X(18, eLOG_Warning,
+ ("Heap Free%s: Invalid hint", s_HEAP_Id(_id, heap)));
HEAP_Free(heap, ptr);
return;
} else if (HEAP_ISFREE(b)) {
- CORE_LOGF(eLOG_Warning,
- ("Heap Free%s: Freeing free block @%u",
- s_HEAP_Id(_id, heap), HEAP_INDEX(b, heap->base)));
+ CORE_LOGF_X(19, eLOG_Warning,
+ ("Heap Free%s: Freeing free block @%u",
+ s_HEAP_Id(_id, heap), HEAP_INDEX(b, heap->base)));
return;
}
}
@@ -685,9 +694,9 @@ static SHEAP_Block* s_HEAP_Walk(const HEAP heap, const SHEAP_Block* ptr)
if (s_HEAP_newalk) {
if (HEAP_ISUSED(b) && heap->chunk/*RW heap*/ &&
heap->base + heap->free == b) {
- CORE_LOGF(eLOG_Warning,
- ("Heap Walk%s: Used block @ free ptr %u",
- s_HEAP_Id(_id, heap), heap->free));
+ CORE_LOGF_X(20, eLOG_Warning,
+ ("Heap Walk%s: Used block @ free ptr %u",
+ s_HEAP_Id(_id, heap), heap->free));
} else if (HEAP_ISFREE(b) &&
(b->prevfree >= heap->size ||
b->nextfree >= heap->size ||
@@ -696,26 +705,28 @@ static SHEAP_Block* s_HEAP_Walk(const HEAP heap, const SHEAP_Block* ptr)
(b->prevfree != b->nextfree
&& (heap->base + b->prevfree == b ||
heap->base + b->nextfree == b)))) {
- CORE_LOGF(eLOG_Warning,
- ("Heap Walk%s: Free list corrupt @%u/%u"
- " (%u, <-%u, %u->)", s_HEAP_Id(_id,heap),
- HEAP_INDEX(b, heap->base), heap->size,
- b->head.size, b->prevfree, b->nextfree));
+ CORE_LOGF_X(21, eLOG_Warning,
+ ("Heap Walk%s: Free list corrupt @%u/%u"
+ " (%u, <-%u, %u->)", s_HEAP_Id(_id,heap),
+ HEAP_INDEX(b, heap->base), heap->size,
+ b->head.size, b->prevfree, b->nextfree));
}
}
/* Block 'b' seems okay for walking onto, but... */
if (!p)
return &b->head;
if (HEAP_ISLAST(p)) {
- CORE_LOGF(eLOG_Error,
- ("Heap Walk%s: Misplaced last block @%u",
- s_HEAP_Id(_id,heap), HEAP_INDEX(p,heap->base)));
+ CORE_LOGF_X(22, eLOG_Error,
+ ("Heap Walk%s: Misplaced last block @%u",
+ s_HEAP_Id(_id,heap),
+ HEAP_INDEX(p,heap->base)));
} else if (s_HEAP_newalk && heap->chunk/*RW heap*/ &&
HEAP_ISLAST(b) && heap->base + heap->last != b) {
- CORE_LOGF(eLOG_Error,
- ("Heap Walk%s: Last block @%u not @ last ptr %u",
- s_HEAP_Id(_id, heap), HEAP_INDEX(b, heap->base),
- heap->last));
+ CORE_LOGF_X(23, eLOG_Error,
+ ("Heap Walk%s: Last block @%u "
+ "not @ last ptr %u",
+ s_HEAP_Id(_id, heap),
+ HEAP_INDEX(b, heap->base), heap->last));
} else if (HEAP_ISFREE(p) && HEAP_ISFREE(b)) {
const SHEAP_HeapBlock* c = heap->base;
while (c < p) {
@@ -725,28 +736,31 @@ static SHEAP_Block* s_HEAP_Walk(const HEAP heap, const SHEAP_Block* ptr)
}
if (c < p)
return &b->head;
- CORE_LOGF(eLOG_Error,
- ("Heap Walk%s: Adjacent free blocks @%u and @%u",
- s_HEAP_Id(_id, heap), HEAP_INDEX(p, heap->base),
- HEAP_INDEX(b, heap->base)));
+ CORE_LOGF_X(24, eLOG_Error,
+ ("Heap Walk%s: Adjacent free blocks "
+ "@%u and @%u",
+ s_HEAP_Id(_id, heap),
+ HEAP_INDEX(p, heap->base),
+ HEAP_INDEX(b, heap->base)));
} else
return &b->head;
} else {
- CORE_LOGF(eLOG_Error,
- ("Heap Walk%s: Heap corrupt @%u/%u (0x%08X, %u)",
- s_HEAP_Id(_id, heap), HEAP_INDEX(b, heap->base),
- heap->size, b->head.flag, b->head.size));
+ CORE_LOGF_X(25, eLOG_Error,
+ ("Heap Walk%s: Heap corrupt @%u/%u (0x%08X, %u)",
+ s_HEAP_Id(_id, heap), HEAP_INDEX(b, heap->base),
+ heap->size, b->head.flag, b->head.size));
}
} else if (b > heap->base + heap->size) {
- CORE_LOGF(eLOG_Error,
- ("Heap Walk%s: Heap corrupt", s_HEAP_Id(_id, heap)));
+ CORE_LOGF_X(26, eLOG_Error,
+ ("Heap Walk%s: Heap corrupt", s_HEAP_Id(_id, heap)));
} else if (b && !HEAP_ISLAST(p)) {
- CORE_LOGF(eLOG_Error,
- ("Heap Walk%s: Last block lost", s_HEAP_Id(_id, heap)));
+ CORE_LOGF_X(27, eLOG_Error,
+ ("Heap Walk%s: Last block lost",
+ s_HEAP_Id(_id, heap)));
}
} else {
- CORE_LOGF(eLOG_Error,
- ("Heap Walk%s: Alien pointer", s_HEAP_Id(_id, heap)));
+ CORE_LOGF_X(28, eLOG_Error,
+ ("Heap Walk%s: Alien pointer", s_HEAP_Id(_id, heap)));
}
return 0;
}
@@ -755,7 +769,7 @@ static SHEAP_Block* s_HEAP_Walk(const HEAP heap, const SHEAP_Block* ptr)
SHEAP_Block* HEAP_Walk(const HEAP heap, const SHEAP_Block* ptr)
{
if (!heap) {
- CORE_LOG(eLOG_Warning, "Heap Walk: NULL heap");
+ CORE_LOG_X(29, eLOG_Warning, "Heap Walk: NULL heap");
return 0;
}
assert(!heap->base == !heap->size);
@@ -782,8 +796,8 @@ HEAP HEAP_Trim(HEAP heap)
assert(!heap->base == !heap->size);
if (!heap->chunk) {
- CORE_LOGF(eLOG_Error,
- ("Heap Trim%s: Heap read-only", s_HEAP_Id(_id, heap)));
+ CORE_LOGF_X(30, eLOG_Error,
+ ("Heap Trim%s: Heap read-only", s_HEAP_Id(_id, heap)));
return 0;
}
@@ -811,9 +825,9 @@ HEAP HEAP_Trim(HEAP heap)
else if (!base)
return 0;
if (_HEAP_ALIGN(base, sizeof(SHEAP_Block)) != (unsigned long) base) {
- CORE_LOGF(eLOG_Warning,
- ("Heap Trim%s: Unaligned base (0x%08lX)",
- s_HEAP_Id(_id, heap), (long) base));
+ CORE_LOGF_X(31, eLOG_Warning,
+ ("Heap Trim%s: Unaligned base (0x%08lX)",
+ s_HEAP_Id(_id, heap), (long) base));
}
prev = HEAP_INDEX(f, heap->base);
heap->base = base;
@@ -830,8 +844,8 @@ HEAP HEAP_Trim(HEAP heap)
assert(hsize == heap->size << _HEAP_ALIGNSHIFT);
assert(hsize % heap->chunk == 0);
} else if (hsize != heap->size << _HEAP_ALIGNSHIFT) {
- CORE_LOGF(eLOG_Error,
- ("Heap Trim%s: Heap not trimmable", s_HEAP_Id(_id, heap)));
+ CORE_LOGF_X(32, eLOG_Error,
+ ("Heap Trim%s: Heap not trimmable", s_HEAP_Id(_id, heap)));
}
assert(!heap->base == !heap->size);
@@ -894,12 +908,15 @@ void HEAP_Detach(HEAP heap)
void HEAP_Destroy(HEAP heap)
{
+ char _id[32];
+
if (!heap)
return;
assert(!heap->base == !heap->size);
- if (!heap->chunk && !heap->refc)
- CORE_LOG(eLOG_Error, "Heap Destroy: Heap read-only");
- else if (heap->resize/*NB: NULL for heap copies*/)
+ if (!heap->chunk && !heap->refc) {
+ CORE_LOGF_X(33, eLOG_Error,
+ ("Heap Destroy%s: Heap read-only", s_HEAP_Id(_id, heap)));
+ } else if (heap->resize/*NB: NULL for heap copies*/)
verify(heap->resize(heap->base, 0, heap->arg) == 0);
HEAP_Detach(heap);
}
diff --git a/connect/ncbi_http_connector.c b/connect/ncbi_http_connector.c
index 90787f33..269d0132 100644
--- a/connect/ncbi_http_connector.c
+++ b/connect/ncbi_http_connector.c
@@ -1,4 +1,4 @@
-/* $Id: ncbi_http_connector.c,v 6.84 2007/06/15 20:25:29 kazimird Exp $
+/* $Id: ncbi_http_connector.c,v 6.89 2007/10/22 13:55:30 kazimird Exp $
* ===========================================================================
*
* PUBLIC DOMAIN NOTICE
@@ -42,6 +42,9 @@
#include <stdlib.h>
+#define NCBI_USE_ERRCODE_X Connect_HTTP
+
+
/***********************************************************************
* INTERNAL -- Auxiliary types and static functions
***********************************************************************/
@@ -54,11 +57,17 @@ typedef enum {
eCC_Unlimited
} ECanConnect;
-
typedef unsigned EBCanConnect;
typedef unsigned TBHCC_Flags;
+typedef enum {
+ eRM_Regular = 0,
+ eRM_DropUnread = 1,
+ eRM_WaitCalled = 2
+} EReadMode;
+
+
/* All internal data necessary to perform the (re)connect and I/O
*
* The following states are defined:
@@ -108,18 +117,19 @@ static FHTTP_NcbiMessageHook s_MessageHook = 0;
/* Try to fix connection parameters (called for an unconnected connector) */
static int/*bool*/ s_Adjust(SHttpConnector* uuu,
char** redirect,
- int/*bool*/ drop_unread)
+ EReadMode read_mode)
{
- assert(!uuu->sock && uuu->can_connect != eCC_None);
+ assert(!uuu->sock && uuu->can_connect != eCC_None);
/* we're here because something is going wrong */
if (++uuu->failure_count >= uuu->net_info->max_try) {
if (*redirect) {
free(*redirect);
*redirect = 0;
}
- if (!drop_unread && uuu->failure_count > 1) {
- CORE_LOGF(eLOG_Error, ("[HTTP] Too many failed attempts (%d),"
- " giving up", uuu->failure_count));
+ if (read_mode != eRM_DropUnread && uuu->failure_count > 1) {
+ CORE_LOGF_X(1, eLOG_Error,
+ ("[HTTP] Too many failed attempts (%d),"
+ " giving up", uuu->failure_count));
}
uuu->can_connect = eCC_None;
return 0/*failure*/;
@@ -134,8 +144,8 @@ static int/*bool*/ s_Adjust(SHttpConnector* uuu,
} else
status = 0/*failed*/;
if (!status) {
- CORE_LOGF(eLOG_Error,
- ("[HTTP] Unable to redirect to \"%s\"", *redirect));
+ CORE_LOGF_X(2, eLOG_Error,
+ ("[HTTP] Unable to redirect to \"%s\"", *redirect));
}
free(*redirect);
*redirect = 0;
@@ -143,13 +153,14 @@ static int/*bool*/ s_Adjust(SHttpConnector* uuu,
uuu->can_connect = eCC_None;
return 0/*failure*/;
}
- } else if (!uuu->adjust_net_info ||
- uuu->adjust_net_info(uuu->net_info,
- uuu->adjust_data,
- uuu->failure_count) == 0) {
- if (!drop_unread && uuu->failure_count > 1) {
- CORE_LOGF(eLOG_Error, ("[HTTP] Retry attempts (%d) exhausted,"
- " giving up", uuu->failure_count));
+ } else if (!uuu->adjust_net_info
+ || uuu->adjust_net_info(uuu->net_info,
+ uuu->adjust_data,
+ uuu->failure_count) == 0) {
+ if (read_mode != eRM_DropUnread && uuu->failure_count > 1) {
+ CORE_LOGF_X(3, eLOG_Error,
+ ("[HTTP] Retry attempts (%d) exhausted,"
+ " giving up", uuu->failure_count));
}
uuu->can_connect = eCC_None;
return 0/*failure*/;
@@ -166,7 +177,7 @@ static void s_DropConnection(SHttpConnector* uuu, const STimeout* timeout)
size_t http_size = BUF_Size(uuu->http);
assert(uuu->sock);
if (http_size && BUF_Read(uuu->http, 0, http_size) != http_size) {
- CORE_LOG(eLOG_Error, "[HTTP] Cannot discard HTTP header buffer");
+ CORE_LOG_X(4, eLOG_Error, "[HTTP] Cannot discard HTTP header buffer");
assert(0);
}
SOCK_SetTimeout(uuu->sock, eIO_Close, timeout);
@@ -180,11 +191,12 @@ static void s_DropConnection(SHttpConnector* uuu, const STimeout* timeout)
* is non-zero. If unsuccessful, try to adjust uuu->net_info by s_Adjust(),
* and then re-try the connection attempt.
*/
-static EIO_Status s_Connect(SHttpConnector* uuu, int/*bool*/ drop_unread)
+static EIO_Status s_Connect(SHttpConnector* uuu,
+ EReadMode read_mode)
{
assert(!uuu->sock);
if (uuu->can_connect == eCC_None) {
- CORE_LOG(eLOG_Error, "[HTTP] Connector is no longer usable");
+ CORE_LOG_X(5, eLOG_Error, "[HTTP] Connector is no longer usable");
return eIO_Closed;
}
@@ -233,7 +245,7 @@ static EIO_Status s_Connect(SHttpConnector* uuu, int/*bool*/ drop_unread)
}
/* connection failed, no socket was created */
- if (!s_Adjust(uuu, &null, drop_unread))
+ if (!s_Adjust(uuu, &null, read_mode))
break;
}
@@ -246,7 +258,8 @@ static EIO_Status s_Connect(SHttpConnector* uuu, int/*bool*/ drop_unread)
* after the HTTP header. If connection/write unsuccessful, retry to reconnect
* and send the data again until permitted by s_Adjust().
*/
-static EIO_Status s_ConnectAndSend(SHttpConnector* uuu,int/*bool*/ drop_unread)
+static EIO_Status s_ConnectAndSend(SHttpConnector* uuu,
+ EReadMode read_mode)
{
EIO_Status status;
@@ -254,7 +267,7 @@ static EIO_Status s_ConnectAndSend(SHttpConnector* uuu,int/*bool*/ drop_unread)
char* null = 0;
if (!uuu->sock) {
- if ((status = s_Connect(uuu, drop_unread)) != eIO_Success)
+ if ((status = s_Connect(uuu, read_mode)) != eIO_Success)
break;
assert(uuu->sock);
uuu->read_header = 1/*true*/;
@@ -302,15 +315,15 @@ static EIO_Status s_ConnectAndSend(SHttpConnector* uuu,int/*bool*/ drop_unread)
break;
}
- CORE_LOGF(eLOG_Error,
- ("[HTTP] Error writing body at offset %lu (%s)",
- (unsigned long) (BUF_Size(uuu->w_buf) - uuu->w_len),
- IO_StatusStr(status)));
+ CORE_LOGF_X(6, eLOG_Error,
+ ("[HTTP] Error writing body at offset %lu (%s)",
+ (unsigned long) (BUF_Size(uuu->w_buf) - uuu->w_len),
+ IO_StatusStr(status)));
/* write failed; close and try to use another server */
SOCK_Abort(uuu->sock);
s_DropConnection(uuu, 0/*no wait*/);
- if (!s_Adjust(uuu, &null, drop_unread)) {
+ if (!s_Adjust(uuu, &null, read_mode)) {
uuu->can_connect = eCC_None;
status = eIO_Closed;
break;
@@ -322,7 +335,9 @@ static EIO_Status s_ConnectAndSend(SHttpConnector* uuu,int/*bool*/ drop_unread)
/* Parse HTTP header */
-static EIO_Status s_ReadHeader(SHttpConnector* uuu, char** redirect)
+static EIO_Status s_ReadHeader(SHttpConnector* uuu,
+ char** redirect,
+ EReadMode read_mode)
{
EIO_Status status = eIO_Success;
int/*bool*/ moved = 0/*false*/;
@@ -339,8 +354,9 @@ static EIO_Status s_ReadHeader(SHttpConnector* uuu, char** redirect)
/* do we have full header yet? */
size = BUF_Size(uuu->http);
if (!(header = (char*) malloc(size + 1))) {
- CORE_LOGF(eLOG_Error, ("[HTTP] Cannot allocate header, %lu bytes",
- (unsigned long) size));
+ CORE_LOGF_X(7, eLOG_Error,
+ ("[HTTP] Cannot allocate header, %lu bytes",
+ (unsigned long) size));
return eIO_Unknown;
}
verify(BUF_Peek(uuu->http, header, size) == size);
@@ -358,25 +374,23 @@ static EIO_Status s_ReadHeader(SHttpConnector* uuu, char** redirect)
level = eLOG_Error;
else if (tmo->sec | tmo->usec)
level = eLOG_Warning;
- else
-#if defined(NCBI_CXX_TOOLKIT) || defined(_DEBUG)
+ else if (read_mode != eRM_WaitCalled)
level = eLOG_Trace;
-#else
+ else
return status;
-#endif
} else
level = eLOG_Error;
- CORE_LOGF(level, ("[HTTP] Error reading header (%s)",
- IO_StatusStr(status)));
+ CORE_LOGF_X(8, level, ("[HTTP] Error reading header (%s)",
+ IO_StatusStr(status)));
return status;
}
}
- assert(header && status == eIO_Success);
+ assert(header && status == eIO_Success);
/* the entire header has been read */
uuu->read_header = 0/*false*/;
if (BUF_Read(uuu->http, 0, size) != size) {
- CORE_LOG(eLOG_Error, "[HTTP] Cannot discard HTTP header buffer");
+ CORE_LOG_X(9, eLOG_Error, "[HTTP] Cannot discard HTTP header buffer");
status = eIO_Unknown;
assert(0);
}
@@ -384,16 +398,16 @@ static EIO_Status s_ReadHeader(SHttpConnector* uuu, char** redirect)
/* HTTP status must come on the first line of the reply */
if (sscanf(header, " HTTP/%*d.%*d %d ", &http_status) != 1)
http_status = -1;
- if (http_status < 200 || 299 < http_status) {
+ if (http_status < 200 || 299 < http_status) {
server_error = http_status;
- if (http_status == 301 || http_status == 302)
+ if (http_status == 301 || http_status == 302)
moved = 1;
- else if (http_status < 0 || http_status == 403 || http_status == 404)
+ else if (http_status < 0 || http_status == 403 || http_status == 404)
uuu->net_info->max_try = 0;
}
- if ((server_error || !uuu->error_header) &&
- uuu->net_info->debug_printout == eDebugPrintout_Some) {
+ if ((server_error || !uuu->error_header)
+ && uuu->net_info->debug_printout == eDebugPrintout_Some) {
/* HTTP header gets printed as part of data logging when
uuu->net_info->debug_printout == eDebugPrintout_Data. */
const char* header_header;
@@ -407,7 +421,7 @@ static EIO_Status s_ReadHeader(SHttpConnector* uuu, char** redirect)
header_header = "HTTP header (unrecoverable error)";
else
header_header = "HTTP header (server error, can retry)";
- CORE_DATA(header, size, header_header);
+ CORE_DATA_X(19, header, size, header_header);
}
{{
@@ -434,8 +448,9 @@ static EIO_Status s_ReadHeader(SHttpConnector* uuu, char** redirect)
}
} else {
s_MessageIssued = -1;
- CORE_LOGF(eLOG_Warning, ("[NCBI-MESSAGE] %.*s",
- (int)(s - message), message));
+ CORE_LOGF_X(10, eLOG_Warning,
+ ("[NCBI-MESSAGE] %.*s",
+ (int)(s - message), message));
}
}
break;
@@ -445,7 +460,7 @@ static EIO_Status s_ReadHeader(SHttpConnector* uuu, char** redirect)
if (uuu->flags & fHCC_KeepHeader) {
if (!BUF_Write(&uuu->r_buf, header, size)) {
- CORE_LOG(eLOG_Error, "[HTTP] Cannot keep HTTP header");
+ CORE_LOG_X(11, eLOG_Error, "[HTTP] Cannot keep HTTP header");
status = eIO_Unknown;
}
free(header);
@@ -453,7 +468,7 @@ static EIO_Status s_ReadHeader(SHttpConnector* uuu, char** redirect)
}
if (uuu->parse_http_hdr
- && !(*uuu->parse_http_hdr)(header, uuu->adjust_data, server_error)) {
+ && !(*uuu->parse_http_hdr)(header, uuu->adjust_data, server_error)) {
server_error = 1/*fake, but still boolean true*/;
}
@@ -522,21 +537,22 @@ static EIO_Status s_ReadHeader(SHttpConnector* uuu, char** redirect)
/* read until EOF */
SOCK_StripToPattern(uuu->sock, 0, 0, &buf, 0);
if (!(size = BUF_Size(buf))) {
- CORE_LOG(eLOG_Trace,
- "[HTTP] No HTTP body received with this error");
+ CORE_LOG_X(12, eLOG_Trace,
+ "[HTTP] No HTTP body received with this error");
} else if ((body = (char*) malloc(size)) != 0) {
size_t n = BUF_Read(buf, body, size);
if (n != size) {
- CORE_LOGF(eLOG_Error, ("[HTTP] Cannot read server error "
- "body from buffer (%lu out of %lu)",
- (unsigned long) n,
- (unsigned long) size));
+ CORE_LOGF_X(13, eLOG_Error,
+ ("[HTTP] Cannot read server error "
+ "body from buffer (%lu out of %lu)",
+ (unsigned long) n, (unsigned long) size));
}
- CORE_DATA(body, n, "Server error body");
+ CORE_DATA_X(20, body, n, "Server error body");
free(body);
} else {
- CORE_LOGF(eLOG_Error, ("[HTTP] Cannot allocate server error "
- "body, %lu bytes", (unsigned long) size));
+ CORE_LOGF_X(14, eLOG_Error,
+ ("[HTTP] Cannot allocate server error "
+ "body, %lu bytes", (unsigned long) size));
}
BUF_Destroy(buf);
}
@@ -554,13 +570,13 @@ static EIO_Status s_ReadHeader(SHttpConnector* uuu, char** redirect)
*/
static EIO_Status s_PreRead(SHttpConnector* uuu,
const STimeout* timeout,
- int/*bool*/ drop_unread)
+ EReadMode read_mode)
{
char* redirect = 0;
EIO_Status status;
for (;;) {
- status = s_ConnectAndSend(uuu, drop_unread);
+ status = s_ConnectAndSend(uuu, read_mode);
if (!uuu->sock) {
assert(status != eIO_Success);
break;
@@ -577,24 +593,25 @@ static EIO_Status s_PreRead(SHttpConnector* uuu,
if (!uuu->read_header)
break;
- if ((status = s_ReadHeader(uuu, &redirect)) == eIO_Success) {
+ if ((status = s_ReadHeader(uuu, &redirect, read_mode)) == eIO_Success){
size_t w_size = BUF_Size(uuu->w_buf);
assert(!uuu->read_header);
/* pending output data no longer needed */
if (BUF_Read(uuu->w_buf, 0, w_size) != w_size) {
- CORE_LOG(eLOG_Error, "[HTTP] Cannot discard output buffer");
+ CORE_LOG_X(15, eLOG_Error,
+ "[HTTP] Cannot discard output buffer");
assert(0);
}
break;
}
/* if polling then bail out with eIO_Timeout */
- if(status == eIO_Timeout && timeout && !timeout->sec && !timeout->usec)
+ if(status == eIO_Timeout && timeout && !(timeout->sec | timeout->usec))
break;
/* HTTP header read error; disconnect and try to use another server */
SOCK_Abort(uuu->sock);
s_DropConnection(uuu, 0/*no wait*/);
- if (!s_Adjust(uuu, &redirect, drop_unread)) {
+ if (!s_Adjust(uuu, &redirect, read_mode)) {
uuu->can_connect = eCC_None;
break;
}
@@ -639,7 +656,7 @@ static EIO_Status s_Read(SHttpConnector* uuu, void* buf,
status = eIO_Unknown;
if (status != eIO_Success)
- CORE_LOG(eLOG_Error, "[HTTP] Cannot URL-decode data");
+ CORE_LOG_X(16, eLOG_Error, "[HTTP] Cannot URL-decode data");
}
free(peek_buf);
} else {
@@ -663,18 +680,18 @@ static EIO_Status s_Read(SHttpConnector* uuu, void* buf,
/* Reset/readout input data and close socket */
static EIO_Status s_Disconnect(SHttpConnector* uuu,
- int/*bool*/ drop_unread,
- const STimeout* timeout)
+ const STimeout* timeout,
+ EReadMode read_mode)
{
EIO_Status status = eIO_Success;
- if (drop_unread) {
+ if (read_mode == eRM_DropUnread) {
size_t r_size = BUF_Size(uuu->r_buf);
if (r_size && BUF_Read(uuu->r_buf, 0, r_size) != r_size) {
- CORE_LOG(eLOG_Error, "[HTTP] Cannot drop input buffer");
+ CORE_LOG_X(17, eLOG_Error, "[HTTP] Cannot drop input buffer");
assert(0);
}
- } else if ((status = s_PreRead(uuu, timeout, 0/*nodrop*/)) == eIO_Success){
+ } else if ((status = s_PreRead(uuu, timeout, read_mode)) == eIO_Success) {
do {
char buf[4096];
size_t x_read;
@@ -700,8 +717,8 @@ static EIO_Status s_Disconnect(SHttpConnector* uuu,
* This function is only called to either re-open or close the connector.
*/
static void s_FlushAndDisconnect(SHttpConnector* uuu,
- const STimeout* timeout,
- int/*bool*/ close)
+ int/*bool*/ close,
+ const STimeout* timeout)
{
size_t w_size;
@@ -716,18 +733,18 @@ static void s_FlushAndDisconnect(SHttpConnector* uuu,
uuu->w_timeout = timeout;
}
- if (close && uuu->can_connect != eCC_None && !uuu->sock &&
- ((uuu->flags & fHCC_SureFlush) || BUF_Size(uuu->w_buf))) {
+ if (close && uuu->can_connect != eCC_None && !uuu->sock
+ && ((uuu->flags & fHCC_SureFlush) || BUF_Size(uuu->w_buf))) {
/* "WRITE" mode and data (or just flag) pending */
- s_PreRead(uuu, timeout, 1/*drop_unread*/);
+ s_PreRead(uuu, timeout, eRM_DropUnread);
}
- s_Disconnect(uuu, 1/*drop_unread*/, timeout);
+ s_Disconnect(uuu, timeout, eRM_DropUnread);
assert(!uuu->sock);
/* clear pending output data, if any */
w_size = BUF_Size(uuu->w_buf);
if (w_size && BUF_Read(uuu->w_buf, 0, w_size) != w_size) {
- CORE_LOG(eLOG_Error, "[HTTP] Cannot drop output buffer");
+ CORE_LOG_X(18, eLOG_Error, "[HTTP] Cannot drop output buffer");
assert(0);
}
}
@@ -814,7 +831,7 @@ static EIO_Status s_VT_Open
/* NOTE: the real connect will be performed on the first "READ", or
* "CLOSE", or on "WAIT" on read -- see in "s_ConnectAndSend()";
* we just close underlying socket and prepare to open it later */
- s_FlushAndDisconnect(uuu, timeout, 0/*open*/);
+ s_FlushAndDisconnect(uuu, 0/*open*/, timeout);
/* reset the auto-reconnect feature */
uuu->can_connect = uuu->flags & fHCC_AutoReconnect
@@ -836,17 +853,17 @@ static EIO_Status s_VT_Wait
case eIO_Read:
if (uuu->can_connect == eCC_None)
return eIO_Closed;
- if (!uuu->sock || uuu->read_header) {
- EIO_Status status = s_PreRead(uuu, timeout, 0/*no drop unread*/);
- if (status != eIO_Success || BUF_Size(uuu->r_buf))
+ if (!uuu->sock || uuu->read_header) {
+ EIO_Status status = s_PreRead(uuu, timeout, eRM_WaitCalled);
+ if (status != eIO_Success || BUF_Size(uuu->r_buf))
return status;
assert(uuu->sock);
}
return SOCK_Wait(uuu->sock, eIO_Read, timeout);
case eIO_Write:
/* Return 'Closed' if no more writes are allowed (and now - reading) */
- return uuu->can_connect == eCC_None ||
- (uuu->sock && uuu->can_connect == eCC_Once)
+ return uuu->can_connect == eCC_None
+ || (uuu->sock && uuu->can_connect == eCC_Once)
? eIO_Closed : eIO_Success;
default:
assert(0);
@@ -867,9 +884,9 @@ static EIO_Status s_VT_Write
/* if trying to "WRITE" after "READ" then close the socket,
* and so switch to "WRITE" mode */
if (uuu->sock) {
- EIO_Status status = s_Disconnect(uuu,
- uuu->flags & fHCC_DropUnread,
- timeout);
+ EIO_Status status = s_Disconnect(uuu, timeout,
+ uuu->flags & fHCC_DropUnread
+ ? eRM_DropUnread : eRM_Regular);
if (status != eIO_Success)
return status;
}
@@ -942,7 +959,7 @@ static EIO_Status s_VT_Read
const STimeout* timeout)
{
SHttpConnector* uuu = (SHttpConnector*) connector->handle;
- EIO_Status status = s_PreRead(uuu, timeout, 0/*no drop unread*/);
+ EIO_Status status = s_PreRead(uuu, timeout, eRM_Regular);
size_t x_read = BUF_Read(uuu->r_buf, buf, size);
*n_read = x_read;
@@ -973,7 +990,7 @@ static EIO_Status s_VT_Close
const STimeout* timeout)
{
s_FlushAndDisconnect((SHttpConnector*) connector->handle,
- timeout, 1/*close*/);
+ 1/*close*/, timeout);
return eIO_Success;
}
diff --git a/connect/ncbi_lb.c b/connect/ncbi_lb.c
index 983f3a10..f287e375 100644
--- a/connect/ncbi_lb.c
+++ b/connect/ncbi_lb.c
@@ -1,4 +1,4 @@
-/* $Id: ncbi_lb.c,v 1.9 2007/06/07 11:25:52 kazimird Exp $
+/* $Id: ncbi_lb.c,v 1.12 2008/02/14 16:25:55 kazimird Exp $
* ===========================================================================
*
* PUBLIC DOMAIN NOTICE
@@ -35,6 +35,9 @@
#include <stdlib.h>
+#define NCBI_USE_ERRCODE_X Connect_LB
+
+
size_t LB_Select(SERV_ITER iter, void* data,
FGetCandidate get_candidate, double bonus)
{
@@ -82,8 +85,9 @@ size_t LB_Select(SERV_ITER iter, void* data,
const char* name = SERV_NameOfInfo(info);
SOCK_HostPortToString(info->host, info->port, addr, sizeof(addr));
CORE_LOGF(eLOG_Note,
- ("%d: %s %s\tR=%lf\tS=%lf\tT=%lf\tA=%lf\tP=%lf", (int) n,
- name, addr, info->rate, status, total, access, point));
+ ("%d: %s %s\tR=%lf\tS=%lf\tT=%lf\tA=%lf\tP=%lf",
+ (int) n, name, addr, info->rate, status, total,
+ access, point));
}}
#endif /*NCBI_LB_DEBUG*/
}
@@ -99,8 +103,10 @@ size_t LB_Select(SERV_ITER iter, void* data,
p = SERV_Preference(iter->pref, access/total, n);
#ifdef NCBI_LB_DEBUG
CORE_LOGF(eLOG_Note,
- ("(P=%lf,\tA=%lf,\tT=%lf,\tA/T=%lf,\tN=%d) -> P=%lf",
- iter->pref, access, total, access/total,(int)n, p));
+ ("(P=%lf,\tA=%lf,\tT=%lf,\tA/T=%lf,\tN=%d) "
+ "-> P=%lf",
+ iter->pref, access, total, access/total,
+ (int) n, p));
#endif /*NCBI_LB_DEBUG*/
status = total * p;
p = total * (1.0 - p) / (total - access);
@@ -121,9 +127,10 @@ size_t LB_Select(SERV_ITER iter, void* data,
status = cand->status;
SOCK_HostPortToString(info->host, info->port,
addr, sizeof(addr));
- CORE_LOGF(eLOG_Note, ("%d: %s %s\tS=%lf\t%.2lf%%",
- (int) i, SERV_NameOfInfo(info), addr,
- p, p / total * 100.0));
+ CORE_LOGF(eLOG_Note,
+ ("%d: %s %s\tS=%lf\t%.2lf%%",
+ (int) i, SERV_NameOfInfo(info), addr,
+ p, p / total * 100.0));
}
#endif /*NCBI_LB_DEBUG*/
}
diff --git a/connect/ncbi_local.c b/connect/ncbi_local.c
index cbd4df70..9b55e8f5 100644
--- a/connect/ncbi_local.c
+++ b/connect/ncbi_local.c
@@ -1,4 +1,4 @@
-/* $Id: ncbi_local.c,v 1.13 2007/04/20 01:55:30 kazimird Exp $
+/* $Id: ncbi_local.c,v 1.14 2008/02/13 20:25:42 kazimird Exp $
* ===========================================================================
*
* PUBLIC DOMAIN NOTICE
@@ -108,7 +108,7 @@ static int/*bool*/ s_LoadSingleService(const char* name, SERV_ITER iter)
info = 0;
}
sprintf(buf, "%s_" REG_CONN_LOCAL_SERVER "_%d", name, n);
- if (!(c = getenv(strupr(buf)))) {
+ if (!(c = getenv(buf)) && !(c = getenv(strupr(buf)))) {
char* b = buf + strlen(name);
size_t len;
*b++ = '\0';
diff --git a/connect/ncbi_priv.h b/connect/ncbi_priv.h
index b57d5507..110fc322 100644
--- a/connect/ncbi_priv.h
+++ b/connect/ncbi_priv.h
@@ -1,7 +1,7 @@
#ifndef CONNECT___NCBI_PRIV__H
#define CONNECT___NCBI_PRIV__H
-/* $Id: ncbi_priv.h,v 6.20 2007/06/25 14:25:36 kazimird Exp $
+/* $Id: ncbi_priv.h,v 6.26 2008/02/28 19:55:44 kazimird Exp $
* ===========================================================================
*
* PUBLIC DOMAIN NOTICE
@@ -92,21 +92,42 @@ extern NCBI_XCONNECT_EXPORT const char* g_CORE_Sprintf(const char* fmt, ...)
#endif
;
-#define CORE_LOG(level, message) do { \
- if (g_CORE_Log || (level) == eLOG_Fatal) { \
- CORE_LOCK_READ; \
- LOG_WRITE(g_CORE_Log, level, message); \
- CORE_UNLOCK; \
- } \
-} while (0)
+#define DO_CORE_LOG_X(macro, level, params) do { \
+ if (g_CORE_Log || (level) == eLOG_Fatal) { \
+ CORE_LOCK_READ; \
+ macro params; /* parentheses already in params */ \
+ CORE_UNLOCK; \
+ } \
+ } while (0)
-#define CORE_LOGF(level, fmt_args) do { \
- if (g_CORE_Log || (level) == eLOG_Fatal) { \
- CORE_LOCK_READ; \
- LOG_WRITE(g_CORE_Log, level, g_CORE_Sprintf fmt_args); \
- CORE_UNLOCK; \
- } \
-} while (0)
+
+#define DO_CORE_LOG_WRITE(code, subcode, level, message) \
+ DO_CORE_LOG_X( LOG_WRITE, level, \
+ (g_CORE_Log, code, subcode, level, message) )
+
+#define DO_CORE_LOG_DATA(code, subcode, level, data, size, message) \
+ DO_CORE_LOG_X( LOG_DATA, level, \
+ (g_CORE_Log, code, subcode, level, data, size, message) )
+
+#define DO_CORE_LOG_ERRNO(code, subcode, level, x_errno, x_descr, message) \
+ DO_CORE_LOG_X( LOG_WRITE_ERRNO_EX, level, \
+ (g_CORE_Log, code, subcode, level, message, \
+ x_errno, x_descr) )
+
+
+#define CORE_LOG_X(subcode, level, message) \
+ DO_CORE_LOG_WRITE(NCBI_C_ERRCODE_X, subcode, level, message)
+
+#define CORE_LOGF_X(subcode, level, fmt_args) \
+ DO_CORE_LOG_WRITE(NCBI_C_ERRCODE_X, subcode, level, \
+ g_CORE_Sprintf fmt_args)
+
+#define CORE_LOG(level, message) \
+ DO_CORE_LOG_WRITE(0, 0, level, message)
+
+#define CORE_LOGF(level, fmt_args) \
+ DO_CORE_LOG_WRITE(0, 0, level, \
+ g_CORE_Sprintf fmt_args)
#ifdef _DEBUG
# define CORE_TRACE(message) CORE_LOG(eLOG_Trace, message)
@@ -118,56 +139,88 @@ extern NCBI_XCONNECT_EXPORT const char* g_CORE_Sprintf(const char* fmt, ...)
# define CORE_DEBUG_ARG(arg) /*arg*/
#endif /*_DEBUG*/
-#define CORE_DATA(data, size, message) do { \
- if ( g_CORE_Log ) { \
- CORE_LOCK_READ; \
- LOG_DATA(g_CORE_Log, data, size, message); \
- CORE_UNLOCK; \
- } \
-} while (0)
+#define CORE_DATA_X(subcode, data, size, message) \
+ DO_CORE_LOG_DATA(NCBI_C_ERRCODE_X, subcode, eLOG_Trace, data, size, \
+ message)
-#define CORE_DATAF(data, size, fmt_args) do { \
- if ( g_CORE_Log ) { \
- CORE_LOCK_READ; \
- LOG_DATA(g_CORE_Log, data, size, g_CORE_Sprintf fmt_args); \
- CORE_UNLOCK; \
- } \
-} while (0)
+#define CORE_DATAF_X(subcode, data, size, fmt_args) \
+ DO_CORE_LOG_DATA(NCBI_C_ERRCODE_X, subcode, eLOG_Trace, data, size, \
+ g_CORE_Sprintf fmt_args)
-#define CORE_LOG_ERRNO(level, x_errno, message) do { \
- if (g_CORE_Log || (level) == eLOG_Fatal) { \
- CORE_LOCK_READ; \
- LOG_WRITE_ERRNO_EX(g_CORE_Log, level, message, x_errno, 0); \
- CORE_UNLOCK; \
- } \
-} while (0)
+#define CORE_DATA_EXX(subcode, level, data, size, message) \
+ DO_CORE_LOG_DATA(NCBI_C_ERRCODE_X, subcode, level, data, size, message)
+
+#define CORE_DATAF_EXX(subcode, level, data, size, fmt_args) \
+ DO_CORE_LOG_DATA(NCBI_C_ERRCODE_X, subcode, level, data, size, \
+ g_CORE_Sprintf fmt_args)
-#define CORE_LOGF_ERRNO(level, x_errno, fmt_args) do { \
- if (g_CORE_Log || (level) == eLOG_Fatal) { \
- CORE_LOCK_READ; \
- LOG_WRITE_ERRNO_EX(g_CORE_Log, level, g_CORE_Sprintf fmt_args, \
- x_errno, 0); \
- CORE_UNLOCK; \
- } \
-} while (0)
+#define CORE_DATA(data, size, message) \
+ DO_CORE_LOG_DATA(0, 0, eLOG_Trace, data, size, message)
+
+#define CORE_DATAF(data, size, fmt_args) \
+ DO_CORE_LOG_DATA(0, 0, eLOG_Trace, data, size, \
+ g_CORE_Sprintf fmt_args)
-#define CORE_LOG_ERRNO_EX(level, x_errno, x_descr, message) do { \
- if (g_CORE_Log || (level) == eLOG_Fatal) { \
- CORE_LOCK_READ; \
- LOG_WRITE_ERRNO_EX(g_CORE_Log, level, message, x_errno, x_descr); \
- CORE_UNLOCK; \
- } \
-} while (0)
+#define CORE_DATA_EX(level, data, size, message) \
+ DO_CORE_LOG_DATA(0, 0, level, data, size, message)
-#define CORE_LOGF_ERRNO_EX(level, x_errno, x_descr, fmt_args) do { \
- if (g_CORE_Log || (level) == eLOG_Fatal) { \
- CORE_LOCK_READ; \
- LOG_WRITE_ERRNO_EX(g_CORE_Log, level, g_CORE_Sprintf fmt_args, \
- x_errno, x_descr); \
- CORE_UNLOCK; \
- } \
-} while (0)
+#define CORE_DATAF_EX(level, data, size, fmt_args) \
+ DO_CORE_LOG_DATA(0, 0, level, data, size, \
+ g_CORE_Sprintf fmt_args)
+
+#define CORE_LOG_ERRNO_X(subcode, level, x_errno, message) \
+ DO_CORE_LOG_ERRNO(NCBI_C_ERRCODE_X, subcode, level, x_errno, 0, message)
+
+#define CORE_LOGF_ERRNO_X(subcode, level, x_errno, fmt_args) \
+ DO_CORE_LOG_ERRNO(NCBI_C_ERRCODE_X, subcode, level, x_errno, 0, \
+ g_CORE_Sprintf fmt_args)
+
+#define CORE_LOG_ERRNO_EXX(subcode, level, x_errno, x_descr, message) \
+ DO_CORE_LOG_ERRNO(NCBI_C_ERRCODE_X, subcode, level, \
+ x_errno, x_descr, message)
+
+#define CORE_LOGF_ERRNO_EXX(subcode, level, x_errno, x_descr, fmt_args) \
+ DO_CORE_LOG_ERRNO(NCBI_C_ERRCODE_X, subcode, level, x_errno, x_descr, \
+ g_CORE_Sprintf fmt_args)
+
+#define CORE_LOG_ERRNO(level, x_errno, message) \
+ DO_CORE_LOG_ERRNO(0, 0, level, x_errno, 0, message)
+
+#define CORE_LOGF_ERRNO(level, x_errno, fmt_args) \
+ DO_CORE_LOG_ERRNO(0, 0, level, x_errno, 0, \
+ g_CORE_Sprintf fmt_args)
+#define CORE_LOG_ERRNO_EX(level, x_errno, x_descr, message) \
+ DO_CORE_LOG_ERRNO(0, 0, level, x_errno, x_descr, message)
+
+#define CORE_LOGF_ERRNO_EX(level, x_errno, x_descr, fmt_args) \
+ DO_CORE_LOG_ERRNO(0, 0, level, x_errno, x_descr, \
+ g_CORE_Sprintf fmt_args)
+
+
+/******************************************************************************
+ * Error codes used throughout C-code
+ */
+
+/* Here are only error codes used in C sources. For error codes used in
+ * C++ sources (in C++ Toolkit) see include/connect/error_codes.hpp.
+ */
+NCBI_C_DEFINE_ERRCODE_X(Connect_Connection, 301, 31);
+NCBI_C_DEFINE_ERRCODE_X(Connect_MetaConn, 302, 2);
+NCBI_C_DEFINE_ERRCODE_X(Connect_Util, 303, 12);
+NCBI_C_DEFINE_ERRCODE_X(Connect_Dispd, 304, 2);
+NCBI_C_DEFINE_ERRCODE_X(Connect_FTP, 305, 1);
+NCBI_C_DEFINE_ERRCODE_X(Connect_HeapMgr, 306, 33);
+NCBI_C_DEFINE_ERRCODE_X(Connect_HTTP, 307, 20);
+NCBI_C_DEFINE_ERRCODE_X(Connect_LB, 308, 0);
+NCBI_C_DEFINE_ERRCODE_X(Connect_Sendmail, 309, 31);
+NCBI_C_DEFINE_ERRCODE_X(Connect_Service, 310, 4);
+NCBI_C_DEFINE_ERRCODE_X(Connect_Socket, 311, 110);
+NCBI_C_DEFINE_ERRCODE_X(Connect_Crypt, 312, 6);
+NCBI_C_DEFINE_ERRCODE_X(Connect_LocalNet, 313, 11);
+NCBI_C_DEFINE_ERRCODE_X(Connect_Mghbn, 319, 16);
+NCBI_C_DEFINE_ERRCODE_X(Connect_LBSM, 320, 22);
+NCBI_C_DEFINE_ERRCODE_X(Connect_LBSMD, 321, 8);
/******************************************************************************
diff --git a/connect/ncbi_sendmail.c b/connect/ncbi_sendmail.c
index 4ad28370..4952fb9c 100644
--- a/connect/ncbi_sendmail.c
+++ b/connect/ncbi_sendmail.c
@@ -1,4 +1,4 @@
-/* $Id: ncbi_sendmail.c,v 6.32 2007/07/18 19:55:28 kazimird Exp $
+/* $Id: ncbi_sendmail.c,v 6.35 2008/02/14 17:25:50 kazimird Exp $
* ===========================================================================
*
* PUBLIC DOMAIN NOTICE
@@ -38,6 +38,9 @@
#include <ctype.h>
#include <errno.h>
#include <stdlib.h>
+
+#define NCBI_USE_ERRCODE_X Connect_Sendmail
+
#ifdef NCBI_CXX_TOOLKIT
#define NCBI_SENDMAIL_TOOLKIT "C++"
#else
@@ -240,20 +243,21 @@ extern const char* CORE_SendMail(const char* to,
* the Sun compiler much happier, and less wordy :-)
*/
-#define SENDMAIL_RETURN(reason) \
+#define SENDMAIL_RETURN(subcode, reason) \
do { \
if (sock) \
SOCK_Close(sock); \
- CORE_LOGF(eLOG_Error, ("[SendMail] %s", reason)); \
+ CORE_LOGF_X(subcode, eLOG_Error, ("[SendMail] %s", reason)); \
if (reason/*always true, though, to trick "smart" compiler*/) \
return reason; \
} while (0)
-#define SENDMAIL_RETURN2(reason, explanation) \
+#define SENDMAIL_RETURN2(subcode, reason, explanation) \
do { \
if (sock) \
SOCK_Close(sock); \
- CORE_LOGF(eLOG_Error, ("[SendMail] %s: %s", reason, explanation)); \
+ CORE_LOGF_X( subcode, eLOG_Error, \
+ ("[SendMail] %s: %s", reason, explanation) ); \
if (reason/*always true, though, to trick "smart" compiler*/) \
return reason; \
} while (0)
@@ -288,20 +292,21 @@ static const char* s_SendRcpt(SOCK sock, const char* to,
}
}
if (k >= buf_size)
- SENDMAIL_RETURN("Recepient address is too long");
+ SENDMAIL_RETURN(3, "Recepient address is too long");
buf[k] = '\0'/*just in case*/;
if (quote) {
- CORE_LOGF(eLOG_Warning, ("[SendMail] Unbalanced delimiters in "
- "recepient %s for %s: \"%c\" expected",
- buf, what, quote));
+ CORE_LOGF_X(1, eLOG_Warning,
+ ("[SendMail] Unbalanced delimiters in "
+ "recepient %s for %s: \"%c\" expected",
+ buf, what, quote));
}
if (!s_SockWrite(sock, "RCPT TO: <", 0) ||
!s_SockWrite(sock, buf, k) ||
!s_SockWrite(sock, ">" MX_CRLF, 1 + 2)) {
- SENDMAIL_RETURN(write_error);
+ SENDMAIL_RETURN(4, write_error);
}
if (!s_SockReadResponse(sock, 250, 251, buf, buf_size))
- SENDMAIL_RETURN2(proto_error, buf);
+ SENDMAIL_RETURN2(5, proto_error, buf);
if (!c)
break;
}
@@ -351,45 +356,45 @@ const char* CORE_SendMailEx(const char* to,
info = uinfo ? uinfo : SendMailInfo_Init(&ainfo);
if (info->magic_number != MX_MAGIC_NUMBER)
- SENDMAIL_RETURN("Invalid magic number");
+ SENDMAIL_RETURN(6, "Invalid magic number");
if ((!to || !*to) &&
(!info->cc || !*info->cc) &&
(!info->bcc || !*info->bcc)) {
- SENDMAIL_RETURN("At least one message recipient must be specified");
+ SENDMAIL_RETURN(7, "At least one message recipient must be specified");
}
/* Open connection to sendmail */
if (SOCK_Create(info->mx_host, info->mx_port, &info->mx_timeout, &sock)
!= eIO_Success) {
- SENDMAIL_RETURN("Cannot connect to sendmail");
+ SENDMAIL_RETURN(8, "Cannot connect to sendmail");
}
SOCK_SetTimeout(sock, eIO_ReadWrite, &info->mx_timeout);
/* Follow the protocol conversation, RFC821 */
if (!SENDMAIL_READ_RESPONSE(220, 0, buffer))
- SENDMAIL_RETURN2("Protocol error in connection init", buffer);
+ SENDMAIL_RETURN2(9, "Protocol error in connection init", buffer);
if ((!(info->mx_options & fSendMail_StripNonFQDNHost) ||
!SOCK_gethostbyaddr(0, buffer, sizeof(buffer))) &&
SOCK_gethostname(buffer, sizeof(buffer)) != 0) {
- SENDMAIL_RETURN("Unable to get local host name");
+ SENDMAIL_RETURN(10, "Unable to get local host name");
}
if (!s_SockWrite(sock, "HELO ", 0) ||
!s_SockWrite(sock, buffer, 0) ||
!s_SockWrite(sock, MX_CRLF, 2)) {
- SENDMAIL_RETURN("Write error in HELO command");
+ SENDMAIL_RETURN(11, "Write error in HELO command");
}
if (!SENDMAIL_READ_RESPONSE(250, 0, buffer))
- SENDMAIL_RETURN2("Protocol error in HELO command", buffer);
+ SENDMAIL_RETURN2(12, "Protocol error in HELO command", buffer);
if (!s_SockWrite(sock, "MAIL FROM: <", 0) ||
!s_SockWrite(sock, info->from, s_FromSize(info)) ||
!s_SockWrite(sock, ">" MX_CRLF, 1 + 2)) {
- SENDMAIL_RETURN("Write error in MAIL command");
+ SENDMAIL_RETURN(13, "Write error in MAIL command");
}
if (!SENDMAIL_READ_RESPONSE(250, 0, buffer))
- SENDMAIL_RETURN2("Protocol error in MAIL command", buffer);
+ SENDMAIL_RETURN2(14, "Protocol error in MAIL command", buffer);
if (to && *to) {
const char* error = SENDMAIL_SENDRCPT("To", to, buffer);
@@ -410,9 +415,9 @@ const char* CORE_SendMailEx(const char* to,
}
if (!s_SockWrite(sock, "DATA" MX_CRLF, 0))
- SENDMAIL_RETURN("Write error in DATA command");
+ SENDMAIL_RETURN(15, "Write error in DATA command");
if (!SENDMAIL_READ_RESPONSE(354, 0, buffer))
- SENDMAIL_RETURN2("Protocol error in DATA command", buffer);
+ SENDMAIL_RETURN2(16, "Protocol error in DATA command", buffer);
if (!(info->mx_options & fSendMail_NoMxHeader)) {
/* Follow RFC822 to compose message headers. Note that
@@ -421,27 +426,28 @@ const char* CORE_SendMailEx(const char* to,
if (!s_SockWrite(sock, "Subject: ", 0) ||
(subject && !s_SockWrite(sock, subject, 0)) ||
!s_SockWrite(sock, MX_CRLF, 2))
- SENDMAIL_RETURN("Write error in sending subject");
+ SENDMAIL_RETURN(17, "Write error in sending subject");
if (to && *to) {
if (!s_SockWrite(sock, "To: ", 0) ||
!s_SockWrite(sock, to, 0) ||
!s_SockWrite(sock, MX_CRLF, 2))
- SENDMAIL_RETURN("Write error in sending To");
+ SENDMAIL_RETURN(18, "Write error in sending To");
}
if (info->cc && *info->cc) {
if (!s_SockWrite(sock, "Cc: ", 0) ||
!s_SockWrite(sock, info->cc, 0) ||
!s_SockWrite(sock, MX_CRLF, 2))
- SENDMAIL_RETURN("Write error in sending Cc");
+ SENDMAIL_RETURN(19, "Write error in sending Cc");
}
} else if (subject && *subject)
- CORE_LOG(eLOG_Warning,"[SendMail] Subject ignored in as-is messages");
+ CORE_LOG_X(2, eLOG_Warning,
+ "[SendMail] Subject ignored in as-is messages");
if (!s_SockWrite(sock, "X-Mailer: CORE_SendMail (NCBI "
NCBI_SENDMAIL_TOOLKIT " Toolkit)" MX_CRLF, 0)) {
- SENDMAIL_RETURN("Write error in sending mailer information");
+ SENDMAIL_RETURN(20, "Write error in sending mailer information");
}
assert(sizeof(buffer) > sizeof(MX_CRLF) && sizeof(MX_CRLF) >= 3);
@@ -468,12 +474,12 @@ const char* CORE_SendMailEx(const char* to,
}
buffer[k] = '\0'/*just in case*/;
if (!s_SockWrite(sock, buffer, k))
- SENDMAIL_RETURN("Write error while sending custom header");
+ SENDMAIL_RETURN(21, "Write error while sending custom header");
}
if (n < m)
- SENDMAIL_RETURN("Header write error");
+ SENDMAIL_RETURN(22, "Header write error");
if (!newline && !s_SockWrite(sock, MX_CRLF, 2))
- SENDMAIL_RETURN("Write error while finalizing custom header");
+ SENDMAIL_RETURN(23, "Write error while finalizing custom header");
}
if (body) {
@@ -481,7 +487,7 @@ const char* CORE_SendMailEx(const char* to,
int/*bool*/ newline = 0/*false*/;
if (!(info->mx_options & fSendMail_NoMxHeader) && m) {
if (!s_SockWrite(sock, MX_CRLF, 2))
- SENDMAIL_RETURN("Write error in message body delimiter");
+ SENDMAIL_RETURN(24, "Write error in message body delimiter");
}
while (n < m) {
size_t k = 0;
@@ -507,24 +513,24 @@ const char* CORE_SendMailEx(const char* to,
}
buffer[k] = '\0'/*just in case*/;
if (!s_SockWrite(sock, buffer, k))
- SENDMAIL_RETURN("Write error while sending message body");
+ SENDMAIL_RETURN(25, "Write error while sending message body");
}
if (n < m)
- SENDMAIL_RETURN("Body write error");
+ SENDMAIL_RETURN(26, "Body write error");
if ((!newline && m && !s_SockWrite(sock, MX_CRLF, 2))
|| !s_SockWrite(sock, "." MX_CRLF, 1 + 2)) {
- SENDMAIL_RETURN("Write error while finalizing message body");
+ SENDMAIL_RETURN(27, "Write error while finalizing message body");
}
} else if (!s_SockWrite(sock, "." MX_CRLF, 1 + 2))
- SENDMAIL_RETURN("Write error while finalizing message");
+ SENDMAIL_RETURN(28, "Write error while finalizing message");
if (!SENDMAIL_READ_RESPONSE(250, 0, buffer))
- SENDMAIL_RETURN2("Protocol error in sending message", buffer);
+ SENDMAIL_RETURN2(29, "Protocol error in sending message", buffer);
if (!s_SockWrite(sock, "QUIT" MX_CRLF, 0))
- SENDMAIL_RETURN("Write error in QUIT command");
+ SENDMAIL_RETURN(30, "Write error in QUIT command");
if (!SENDMAIL_READ_RESPONSE(221, 0, buffer))
- SENDMAIL_RETURN2("Protocol error in QUIT command", buffer);
+ SENDMAIL_RETURN2(31, "Protocol error in QUIT command", buffer);
SOCK_Close(sock);
return 0;
diff --git a/connect/ncbi_server_info.c b/connect/ncbi_server_info.c
index 21d6399d..34eef8d5 100644
--- a/connect/ncbi_server_info.c
+++ b/connect/ncbi_server_info.c
@@ -1,4 +1,4 @@
-/* $Id: ncbi_server_info.c,v 6.65 2007/05/10 14:25:28 kazimird Exp $
+/* $Id: ncbi_server_info.c,v 6.66 2007/08/28 18:55:29 kazimird Exp $
* ===========================================================================
*
* PUBLIC DOMAIN NOTICE
@@ -198,6 +198,9 @@ SSERV_Info* SERV_ReadInfoEx(const char* info_str, const char* name)
return 0;
while (*str && isspace((unsigned char)(*str)))
str++;
+ } else {
+ host = 0;
+ port = 0;
}
/* read server-specific info according to the detected type */
info = s_GetAttrByType(type)->vtable.Read(&str, name ? strlen(name)+1 : 0);
diff --git a/connect/ncbi_service.c b/connect/ncbi_service.c
index c3f9e6af..cc5d5fe4 100644
--- a/connect/ncbi_service.c
+++ b/connect/ncbi_service.c
@@ -1,4 +1,4 @@
-/* $Id: ncbi_service.c,v 6.91 2007/04/20 01:55:30 kazimird Exp $
+/* $Id: ncbi_service.c,v 6.94 2007/10/17 15:25:43 kazimird Exp $
* ===========================================================================
*
* PUBLIC DOMAIN NOTICE
@@ -39,6 +39,8 @@
#include <stdlib.h>
#include <time.h>
+#define NCBI_USE_ERRCODE_X Connect_Service
+
#define CONN_SERVICE_NAME DEF_CONN_REG_SECTION "_" REG_CONN_SERVICE_NAME
@@ -244,7 +246,7 @@ static SERV_ITER s_Open(const char* service,
!(do_dispd= !s_IsMapperConfigured(service, REG_CONN_DISPD_DISABLE)) ||
!(op = SERV_DISPD_Open(iter, net_info, info, host_info)))) {
if (!do_lbsmd && !do_dispd) {
- CORE_LOGF(eLOG_Warning,
+ CORE_LOGF_X(1, eLOG_Warning,
("[SERV] No service mappers available for `%s'",
service));
}
@@ -571,11 +573,11 @@ static void s_SetDefaultReferer(SERV_ITER iter, SConnNetInfo* net_info)
const char* args = net_info->args;
char port[8];
- if (net_info->port && net_info->port != DEF_CONN_PORT)
+ if (net_info->port && net_info->port != DEF_CONN_PORT)
sprintf(port, ":%hu", net_info->port);
else
*port = '\0';
- if (!(referer = (char*) malloc(9 + strlen(host) + strlen(port)
+ if (!(referer = (char*) malloc(7 + 1 + 1 + strlen(host) + strlen(port)
+ strlen(path) + strlen(args)))) {
return;
}
@@ -584,6 +586,7 @@ static void s_SetDefaultReferer(SERV_ITER iter, SConnNetInfo* net_info)
strcat(strcat(referer, "?"), args);
} else if ((str = strdup(iter->op->name)) != 0) {
const char* host = net_info->client_host;
+ const char* args = net_info->args;
const char* name = iter->name;
if (!*net_info->client_host &&
@@ -592,12 +595,18 @@ static void s_SetDefaultReferer(SERV_ITER iter, SConnNetInfo* net_info)
SOCK_gethostname(net_info->client_host,
sizeof(net_info->client_host));
}
- if (!(referer = (char*) malloc(3 + 1 + 9 + 1 + 2*strlen(strlwr(str)) +
- strlen(host) + strlen(name)))) {
+ if (!(referer = (char*) malloc(3 + 1 + 1 + 1 + 2*strlen(strlwr(str)) +
+ strlen(host) + (args[0]
+ ? strlen(args)
+ : 8 + strlen(name))))) {
return;
}
- strcat(strcat(strcat(strcpy(referer, str), "://"), host), "/");
- strcat(strcat(strcat(referer, str), "?service="), name);
+ strcat(strcat(strcat(strcat(strcpy
+ (referer, str), "://"), host), "/"), str);
+ if (args[0])
+ strcat(strcat(referer, "?"), args);
+ else
+ strcat(strcat(referer, "?service="), name);
free(str);
}
assert(!net_info->http_referer);
diff --git a/connect/ncbi_service.h b/connect/ncbi_service.h
index 185c96bd..0c66c4af 100644
--- a/connect/ncbi_service.h
+++ b/connect/ncbi_service.h
@@ -1,7 +1,7 @@
#ifndef CONNECT___NCBI_SERVICE__H
#define CONNECT___NCBI_SERVICE__H
-/* $Id: ncbi_service.h,v 6.52 2007/05/09 13:55:29 kazimird Exp $
+/* $Id: ncbi_service.h,v 6.53 2008/02/04 15:56:18 kazimird Exp $
* ===========================================================================
*
* PUBLIC DOMAIN NOTICE
@@ -37,9 +37,9 @@
#include <connect/ncbi_host_info.h>
-/* Revision 6.230 */
+/* Revision 6.240 */
#define SERV_CLIENT_REVISION_MAJOR 6
-#define SERV_CLIENT_REVISION_MINOR 230
+#define SERV_CLIENT_REVISION_MINOR 240
/** @addtogroup ServiceSupport
diff --git a/connect/ncbi_service_connector.c b/connect/ncbi_service_connector.c
index e2588371..6aab851b 100644
--- a/connect/ncbi_service_connector.c
+++ b/connect/ncbi_service_connector.c
@@ -1,4 +1,4 @@
-/* $Id: ncbi_service_connector.c,v 6.73 2006/06/07 20:06:48 lavr Exp $
+/* $Id: ncbi_service_connector.c,v 6.77 2008/02/02 01:55:55 kazimird Exp $
* ===========================================================================
*
* PUBLIC DOMAIN NOTICE
@@ -41,6 +41,9 @@
#include <stdlib.h>
+#define NCBI_USE_ERRCODE_X Connect_Service
+
+
typedef struct SServiceConnectorTag {
const char* name; /* Verbal connector type */
TSERV_Type types; /* Server types, record keeping only */
@@ -141,15 +144,15 @@ static int/*bool*/ s_ParseHeader(const char* header,
if (uuu->host)
break/*failed - duplicate connection info*/;
header += sizeof(HTTP_CONNECTION_INFO) - 1;
- while (*header && isspace((unsigned char)(*header)))
+ while (*header && isspace((unsigned char)(*header)))
header++;
if (strncasecmp(header, kStateless, sizeof(kStateless) - 1) == 0) {
/* Special keyword for switching into stateless mode */
uuu->host = (unsigned int)(-1);
#if defined(_DEBUG) && !defined(NDEBUG)
if (uuu->net_info->debug_printout) {
- CORE_LOG(eLOG_Note,
- "[SERVICE] Fallback to stateless requested");
+ CORE_LOG_X(2, eLOG_Note,
+ "[SERVICE] Fallback to stateless requested");
}
#endif
} else {
@@ -159,7 +162,7 @@ static int/*bool*/ s_ParseHeader(const char* header,
}
o1 = i1; o2 = i2; o3 = i3; o4 = i4;
sprintf(ipaddr, "%u.%u.%u.%u", o1, o2, o3, o4);
- if (!(uuu->host = SOCK_gethostbyname(ipaddr)) || !uuu->port)
+ if (!(uuu->host = SOCK_gethostbyname(ipaddr)) || !uuu->port)
break/*failed - bad host:port in connection info*/;
uuu->ticket = SOCK_HostToNetLong(ticket);
}
@@ -167,7 +170,7 @@ static int/*bool*/ s_ParseHeader(const char* header,
if ((header = strchr(header, '\n')) != 0)
header++;
}
- if (!header || !*header)
+ if (!header || !*header)
return 1/*success*/;
uuu->host = 0;
@@ -175,15 +178,15 @@ static int/*bool*/ s_ParseHeader(const char* header,
}
-static int/*bool*/ s_ContentTypeDefined(const SConnNetInfo* net_info,
- EMIME_Type mime_t,
- EMIME_SubType mime_s,
- EMIME_Encoding mime_e)
+static int/*bool*/ s_IsContentTypeDefined(const SConnNetInfo* net_info,
+ EMIME_Type mime_t,
+ EMIME_SubType mime_s,
+ EMIME_Encoding mime_e)
{
const char* s;
assert(net_info);
- for (s = net_info->http_user_header; s; s = strchr(s, '\n')) {
+ for (s = net_info->http_user_header; s; s = strchr(s, '\n')) {
if (s != net_info->http_user_header)
s++;
if (!*s)
@@ -197,13 +200,13 @@ static int/*bool*/ s_ContentTypeDefined(const SConnNetInfo* net_info,
if (net_info->debug_printout &&
mime_t != SERV_MIME_TYPE_UNDEFINED &&
mime_t != eMIME_T_Unknown &&
- MIME_ParseContentTypeEx(s, &m_t, &m_s, &m_e) &&
- (mime_t != m_t
- || (mime_s != SERV_MIME_SUBTYPE_UNDEFINED &&
- mime_s != eMIME_Unknown &&
- m_s != eMIME_Unknown && mime_s != m_s)
- || (mime_e != eENCOD_None &&
- m_e != eENCOD_None && mime_e != m_e))) {
+ (!MIME_ParseContentTypeEx(s, &m_t, &m_s, &m_e)
+ || mime_t != m_t
+ || (mime_s != SERV_MIME_SUBTYPE_UNDEFINED &&
+ mime_s != eMIME_Unknown &&
+ m_s != eMIME_Unknown && mime_s != m_s)
+ || (mime_e != eENCOD_None &&
+ m_e != eENCOD_None && mime_e != m_e))) {
const char* c;
size_t len;
char* t;
@@ -213,7 +216,7 @@ static int/*bool*/ s_ContentTypeDefined(const SConnNetInfo* net_info,
}
if (!(c = strchr(s, '\n')))
c = s + strlen(s);
- if (c > s && c[-1] == '\r')
+ if (c > s && c[-1] == '\r')
c--;
len = (size_t)(c - s);
if ((t = (char*) malloc(len + 1)) != 0) {
@@ -224,14 +227,16 @@ static int/*bool*/ s_ContentTypeDefined(const SConnNetInfo* net_info,
c_t, sizeof(c_t))) {
*c_t = '\0';
}
- CORE_LOGF(eLOG_Warning,
- ("[SERVICE] Content-Type mismatch for \"%s\" "
- "%s%s%s%s%s", net_info->service,
- t && *t ? "specified=" : "",
- t && *t ? t : "",
- t && *t && *c_t ? ", " : "",
- *c_t ? "configured=" : "",
- *c_t ? c_t : ""));
+ CORE_LOGF_X(3, eLOG_Warning,
+ ("[SERVICE] Content-Type mismatch for \"%s\" "
+ "%s%s%s%s%s%s%s", net_info->service,
+ t && *t ? "specified=<" : "",
+ t && *t ? t : "",
+ t && *t ? ">" : "",
+ t && *t && *c_t ? ", " : "",
+ *c_t ? "configured=<" : "",
+ *c_t ? c_t : "",
+ *c_t ? ">" : ""));
if (t)
free(t);
}
@@ -243,19 +248,18 @@ static int/*bool*/ s_ContentTypeDefined(const SConnNetInfo* net_info,
}
-static char* s_AdjustNetParams(SConnNetInfo* net_info,
- EReqMethod req_method,
- const char* cgi_path,
- const char* cgi_args,
- const char* args,
- const char* static_header,
- EMIME_Type mime_t,
- EMIME_SubType mime_s,
- EMIME_Encoding mime_e,
- char* dynamic_header/*will be freed*/)
+static const char* s_AdjustNetParams(SConnNetInfo* net_info,
+ EReqMethod req_method,
+ const char* cgi_path,
+ const char* cgi_args,
+ const char* args,
+ const char* static_header,
+ EMIME_Type mime_t,
+ EMIME_SubType mime_s,
+ EMIME_Encoding mime_e,
+ char* dynamic_header/*freed!*/)
{
- char c_t[MAX_CONTENT_TYPE_LEN], *retval;
- size_t sh_len, dh_len, ct_len;
+ const char *retval = 0;
net_info->req_method = req_method;
@@ -265,30 +269,36 @@ static char* s_AdjustNetParams(SConnNetInfo* net_info,
if (args)
strncpy0(net_info->args, args, sizeof(net_info->args) - 1);
ConnNetInfo_DeleteAllArgs(net_info, cgi_args);
- if (!ConnNetInfo_PrependArg(net_info, cgi_args, 0)) {
- if (dynamic_header)
- free(dynamic_header);
- return 0/*failed*/;
- }
- sh_len = static_header ? strlen(static_header) : 0;
- dh_len = dynamic_header ? strlen(dynamic_header) : 0;
- if (s_ContentTypeDefined(net_info, mime_t, mime_s, mime_e) ||
- mime_t == SERV_MIME_TYPE_UNDEFINED ||
- mime_s == SERV_MIME_SUBTYPE_UNDEFINED ||
- !MIME_ComposeContentTypeEx(mime_t, mime_s, mime_e, c_t, sizeof(c_t))) {
- c_t[0] = '\0';
- ct_len = 0;
- } else
- ct_len = strlen(c_t);
- if ((retval = (char*) malloc(sh_len + dh_len +ct_len + 1/*EOL*/)) != 0) {
- strcpy(retval, static_header ? static_header : "");
- strcpy(retval + sh_len, dynamic_header ? dynamic_header : "");
- strcpy(retval + sh_len + dh_len, c_t);
+ if (ConnNetInfo_PrependArg(net_info, cgi_args, 0)) {
+ size_t sh_len = static_header ? strlen(static_header) : 0;
+ size_t dh_len = dynamic_header ? strlen(dynamic_header) : 0;
+ char c_t[MAX_CONTENT_TYPE_LEN];
+ size_t ct_len, len;
+
+ if (s_IsContentTypeDefined(net_info, mime_t, mime_s, mime_e) ||
+ mime_t == SERV_MIME_TYPE_UNDEFINED ||
+ mime_s == SERV_MIME_SUBTYPE_UNDEFINED ||
+ !MIME_ComposeContentTypeEx(mime_t, mime_s, mime_e,
+ c_t, sizeof(c_t))) {
+ c_t[0] = '\0';
+ ct_len = 0;
+ } else
+ ct_len = strlen(c_t);
+ if ((len = sh_len + dh_len + ct_len) != 0) {
+ char* temp = (char*) malloc(len + 1/*EOL*/);
+ if (temp) {
+ strcpy(temp, static_header ? static_header : "");
+ strcpy(temp + sh_len, dynamic_header ? dynamic_header : "");
+ strcpy(temp + sh_len + dh_len, c_t);
+ retval = temp;
+ }
+ } else
+ retval = "";
}
+
if (dynamic_header)
free(dynamic_header);
-
return retval;
}
@@ -326,7 +336,7 @@ static int/*bool*/ s_AdjustNetInfo(SConnNetInfo* net_info,
const SSERV_Info* info;
assert(n != 0); /* paranoid assertion :-) */
- if (uuu->net_info->firewall && !uuu->net_info->stateless)
+ if (uuu->net_info->firewall && !uuu->net_info->stateless)
return 0; /*cannot adjust firewall stateful client*/
for (;;) {
@@ -394,11 +404,11 @@ static int/*bool*/ s_AdjustNetInfo(SConnNetInfo* net_info,
ConnNetInfo_DeleteUserHeader(net_info, uuu->user_header);
free((void*) uuu->user_header);
}
- uuu->user_header = user_header;
+ uuu->user_header = *user_header ? user_header : 0;
if (!ConnNetInfo_OverrideUserHeader(net_info, user_header))
return 0/*false - not adjusted*/;
- if (info->type == fSERV_Ncbid || (info->type & fSERV_Http)) {
+ if (info->type == fSERV_Ncbid || (info->type & fSERV_Http)) {
SOCK_ntoa(info->host, net_info->host, sizeof(net_info->host));
net_info->port = info->port;
} else {
@@ -420,10 +430,10 @@ static CONNECTOR s_Open(SServiceConnector* uuu,
int/*bool*/ second_try)
{
const char* user_header; /* either "" or non-empty dynamic string */
- char* iter_header;
+ char* iter_header = SERV_Print(uuu->iter, net_info);
EReqMethod req_method;
- if (info && info->type != fSERV_Firewall) {
+ if (info && info->type != fSERV_Firewall) {
/* Not a firewall/relay connection here */
assert(!second_try);
/* We know the connection point, let's try to use it! */
@@ -488,8 +498,8 @@ static CONNECTOR s_Open(SServiceConnector* uuu,
EMIME_Type mime_t;
EMIME_SubType mime_s;
EMIME_Encoding mime_e;
- if (net_info->stateless ||
- (info && (info->u.firewall.type & fSERV_Http))) {
+ if (net_info->stateless ||
+ (info && (info->u.firewall.type & fSERV_Http))) {
if (info) {
req_method = info->u.firewall.type == fSERV_HttpGet
? eReqMethod_Get : (info->u.firewall.type == fSERV_HttpPost
@@ -516,10 +526,13 @@ static CONNECTOR s_Open(SServiceConnector* uuu,
0, 0, 0, user_header,
mime_t, mime_s, mime_e, 0);
}
- if (!user_header)
+ if (!user_header) {
+ if (iter_header)
+ free(iter_header);
return 0;
+ }
- if ((iter_header = SERV_Print(uuu->iter, net_info)) != 0) {
+ if (iter_header) {
size_t uh_len;
if ((uh_len = strlen(user_header)) > 0) {
char* ih;
@@ -554,9 +567,9 @@ static CONNECTOR s_Open(SServiceConnector* uuu,
"\r\n");
}
- if (!net_info->stateless && (!info ||
- info->type == fSERV_Firewall ||
- info->type == fSERV_Ncbid)) {
+ if (!net_info->stateless && (!info ||
+ info->type == fSERV_Firewall ||
+ info->type == fSERV_Ncbid)) {
/* HTTP connector is auxiliary only */
CONNECTOR conn;
CONN c;
@@ -580,20 +593,20 @@ static CONNECTOR s_Open(SServiceConnector* uuu,
/* This also triggers parse header callback */
CONN_Close(c);
} else {
- CORE_LOGF(eLOG_Error, ("[SERVICE] Unable to create aux. %s",
- conn ? "connection" : "connector"));
+ CORE_LOGF_X(4, eLOG_Error, ("[SERVICE] Unable to create aux. %s",
+ conn ? "connection" : "connector"));
assert(0);
}
if (!uuu->host)
return 0/*failed, no connection info returned*/;
if (uuu->host == (unsigned int)(-1)) {
/* Firewall mode only in stateful mode, fallback requested */
- assert((!info || info->type == fSERV_Firewall) && !second_try);
+ assert((!info || info->type == fSERV_Firewall) && !second_try);
/* Try to use stateless mode instead */
net_info->stateless = 1/*true*/;
return s_Open(uuu, timeout, info, net_info, 1/*second try*/);
}
- if (net_info->firewall && *net_info->proxy_host)
+ if (net_info->firewall && *net_info->proxy_host)
strcpy(net_info->host, net_info->proxy_host);
else
SOCK_ntoa(uuu->host, net_info->host, sizeof(net_info->host));
@@ -670,7 +683,7 @@ static EIO_Status s_VT_Open(CONNECTOR connector, const STimeout* timeout)
CONNECTOR conn;
assert(!uuu->meta.list && !uuu->name);
- if (!uuu->iter && !s_OpenDispatcher(uuu)) {
+ if (!uuu->iter && !s_OpenDispatcher(uuu)) {
uuu->status = status;
return status;
}
@@ -720,7 +733,7 @@ static EIO_Status s_VT_Open(CONNECTOR connector, const STimeout* timeout)
static const char prefix[] = "SERVICE/";
char* name = (char*) malloc(sizeof(prefix) + strlen(type));
if (name) {
- strcpy(&name[0], prefix);
+ memcpy(&name[0], prefix, sizeof(prefix)-1);
strcpy(&name[sizeof(prefix)-1], type);
uuu->name = name;
}
@@ -757,9 +770,9 @@ static void s_Setup(SMetaConnector *meta, CONNECTOR connector)
{
SServiceConnector* uuu = (SServiceConnector*) connector->handle;
/* initialize virtual table */
- CONN_SET_METHOD(meta, get_type, s_VT_GetType, connector);
- CONN_SET_METHOD(meta, open, s_VT_Open, connector);
- CONN_SET_METHOD(meta, close, s_VT_Close, connector);
+ CONN_SET_METHOD(meta, get_type, s_VT_GetType, connector);
+ CONN_SET_METHOD(meta, open, s_VT_Open, connector);
+ CONN_SET_METHOD(meta, close, s_VT_Close, connector);
CONN_SET_DEFAULT_TIMEOUT(meta, uuu->net_info->timeout);
/* all the rest is reset to NULL */
s_Reset(meta);
@@ -798,7 +811,7 @@ extern CONNECTOR SERVICE_CreateConnectorEx
CONNECTOR ccc;
SServiceConnector* xxx;
- if (!service || !*service)
+ if (!service || !*service)
return 0;
ccc = (SConnector*) malloc(sizeof(SConnector));
@@ -843,240 +856,3 @@ extern CONNECTOR SERVICE_CreateConnectorEx
/* done */
return ccc;
}
-
-
-/*
- * --------------------------------------------------------------------------
- * $Log: ncbi_service_connector.c,v $
- * Revision 6.73 2006/06/07 20:06:48 lavr
- * Adjust use of net_infos passed to SERV_Print()
- *
- * Revision 6.72 2006/04/23 18:27:54 lavr
- * BUGFIX: typo in SServiceConnector allocation caused memory corruption
- *
- * Revision 6.71 2006/04/20 14:00:59 lavr
- * Keep original service name and use it for service mappers
- *
- * Revision 6.70 2006/01/27 17:10:24 lavr
- * Replace obsolete call names with current ones
- *
- * Revision 6.69 2006/01/17 20:28:21 lavr
- * Do not override user-provided Content-Type
- *
- * Revision 6.68 2006/01/12 18:12:46 lavr
- * Fix erroneous use of non-translated service name
- * Stricter checks on uniqueness of returned Connection-Info:
- *
- * Revision 6.67 2006/01/11 20:28:47 lavr
- * Take advantage of ConnNetInfo_SetupStandardArgs(); other changes to
- * allow to pass user-supplied parameters to services (where feasible)
- *
- * Revision 6.66 2006/01/11 16:28:28 lavr
- * Simplify code (mostly, by factoring out)
- *
- * Revision 6.65 2005/12/23 18:12:32 lavr
- * fSERV_StatelessOnly -> fSERV_Stateless
- *
- * Revision 6.64 2005/10/26 14:44:59 lavr
- * Insure service name appears in URLs for HTTP services
- *
- * Revision 6.63 2005/08/12 19:21:52 lavr
- * Take fHCC_Flushable from connector's extra params in case of HTTP
- *
- * Revision 6.62 2005/07/11 18:15:30 lavr
- * SERV_PrintEx() -> SERV_Print()
- *
- * Revision 6.61 2004/07/01 16:28:44 lavr
- * Generate "Referer:" for resolved HTTP service hits
- *
- * Revision 6.60 2003/08/25 14:41:53 lavr
- * Employ new k..Timeout constants -- log modification only
- *
- * Revision 6.59 2003/05/31 05:16:45 lavr
- * Add ARGSUSED where args are meant to be unused
- *
- * Revision 6.58 2003/05/29 20:13:48 lavr
- * -#include <connect/ncbi_connection.h>
- *
- * Revision 6.57 2003/05/22 20:31:28 lavr
- * Callbacks in the constructor had to be set after successful init only
- *
- * Revision 6.56 2003/05/14 15:43:45 lavr
- * Modify format of host address in dispatcher's CGI query
- *
- * Revision 6.55 2003/05/14 13:55:06 lavr
- * BUGFIX: Buffer overrun in s_GetArgs()
- *
- * Revision 6.54 2003/05/14 04:19:48 lavr
- * BUGFIX: Actually add IP address in "address=" CGI argument
- *
- * Revision 6.53 2003/05/14 03:55:28 lavr
- * Arguments to include host address (for statistics purposes on backends)
- *
- * Revision 6.52 2002/12/19 17:34:58 lavr
- * Do not initiate STATEFUL_CAPABLE challenge with HTTP servers in relay mode
- *
- * Revision 6.51 2002/12/10 22:11:50 lavr
- * Stamp HTTP packets with "User-Agent:" header tag and DISP_PROTOCOL_VERSION
- *
- * Revision 6.50 2002/11/19 19:23:25 lavr
- * Set MIME type whenever possible; introduce status of last op
- *
- * Revision 6.49 2002/11/12 05:52:00 lavr
- * Use client_host from conn.info as value for "address="
- *
- * Revision 6.48 2002/11/01 20:16:05 lavr
- * Expand hostname buffers to hold up to 256 chars
- *
- * Revision 6.47 2002/10/29 22:19:37 lavr
- * Fix proper use of non-transparent proxy if one is specified
- *
- * Revision 6.46 2002/10/28 15:44:00 lavr
- * Use "ncbi_ansi_ext.h" privately and use strncpy0()
- *
- * Revision 6.45 2002/10/22 15:11:24 lavr
- * Zero connector's handle to crash if revisited
- *
- * Revision 6.44 2002/10/21 18:32:28 lavr
- * Append service arguments "address" and "platform" in dispatcher requests
- *
- * Revision 6.43 2002/10/11 19:56:42 lavr
- * Add "myargs" into connector structure (for later use in requests to
- * show address and platform of the dispatcher's requestors)
- *
- * Revision 6.42 2002/09/06 17:45:33 lavr
- * Include <connect/ncbi_priv.h> unconditionally (reported by J.Kans)
- *
- * Revision 6.41 2002/09/06 15:44:02 lavr
- * Use fHCC_SureFlush and CONN_Flush() instead of dummy read
- *
- * Revision 6.40 2002/08/07 16:33:33 lavr
- * Changed EIO_ReadMethod enums accordingly; log moved to end
- *
- * Revision 6.39 2002/06/10 19:51:43 lavr
- * Wrong assertion removed from FIREWALL open case
- *
- * Revision 6.38 2002/05/07 15:31:47 lavr
- * +#include <stdio.h>: noticed by J.Kans
- *
- * Revision 6.37 2002/05/06 19:17:33 lavr
- * Take advantage of SERV_ServiceName()
- *
- * Revision 6.36 2002/04/26 16:28:51 lavr
- * SSERVICE_Params: reset added for use in open/close pairs
- * No checks for kDefaultTimeout: now real timeouts always go from CONN
- *
- * Revision 6.35 2002/03/30 03:34:32 lavr
- * BUGFIX: Memory leak from SERV_ITER in usused connector
- *
- * Revision 6.34 2002/03/22 22:18:28 lavr
- * Remove uuu->conn (contained in uuu->meta.list); honor timeout on open
- *
- * Revision 6.33 2002/03/22 19:52:18 lavr
- * Do not include <stdio.h>: included from ncbi_util.h or ncbi_priv.h
- *
- * Revision 6.32 2002/03/19 22:14:53 lavr
- * Proper indentation of nested preprocessor directives
- *
- * Revision 6.31 2002/03/11 22:00:22 lavr
- * Support encoding in MIME content type for server data
- *
- * Revision 6.30 2001/12/04 15:56:47 lavr
- * Use strdup() instead of explicit strcpy(malloc(...), ...)
- *
- * Revision 6.29 2001/10/26 21:17:59 lavr
- * 'service=name' now always precedes other params in connects to DISPD/NCBID
- *
- * Revision 6.28 2001/09/28 20:51:31 lavr
- * Comments revised; parameter (and SHttpConnector's) names adjusted
- * Retry logic moved entirely into s_Adjust()
- *
- * Revision 6.27 2001/09/24 20:29:36 lavr
- * +SSERVICE_Extra* parameter in constructor; store and use of this parameter
- *
- * Revision 6.26 2001/09/10 21:21:20 lavr
- * Support for temporary switching into firewall mode as per dispatcher request
- *
- * Revision 6.25 2001/07/26 15:12:17 lavr
- * while(1) -> for(;;)
- *
- * Revision 6.24 2001/06/05 14:11:29 lavr
- * SERV_MIME_UNDEFINED split into 2 (typed) constants:
- * SERV_MIME_TYPE_UNDEFINED and SERV_MIME_SUBTYPE_UNDEFINED
- *
- * Revision 6.23 2001/06/04 17:02:17 lavr
- * Insert MIME type/subtype in Content-Type for servers,
- * which have this feature configured
- *
- * Revision 6.22 2001/05/30 18:46:38 lavr
- * Always call dispatcher in header-parsing callback (to see err.msg. if any)
- *
- * Revision 6.21 2001/05/23 21:53:19 lavr
- * Do not close dispatcher in Open; leave it as it is
- *
- * Revision 6.20 2001/05/17 15:03:07 lavr
- * Typos corrected
- *
- * Revision 6.19 2001/05/11 15:32:05 lavr
- * Minor patch in code of 'fallback to STATELESS'
- *
- * Revision 6.18 2001/05/08 20:27:05 lavr
- * Patches in re-try code
- *
- * Revision 6.17 2001/05/03 16:37:09 lavr
- * Flow control fixed in s_Open for firewall connection
- *
- * Revision 6.16 2001/04/26 20:20:57 lavr
- * Default tags are explicitly used to differ from a Web browser
- *
- * Revision 6.15 2001/04/25 15:49:54 lavr
- * Memory leaks in Open (when unsuccessful) fixed
- *
- * Revision 6.14 2001/04/24 21:36:50 lavr
- * More structured code to re-try abrupted connection/mapping attempts
- *
- * Revision 6.13 2001/03/07 23:01:07 lavr
- * fSERV_Any used instead of 0 in SERVICE_CreateConnector
- *
- * Revision 6.12 2001/03/06 23:55:37 lavr
- * SOCK_gethostaddr -> SOCK_gethostbyname
- *
- * Revision 6.11 2001/03/02 20:10:07 lavr
- * Typo fixed
- *
- * Revision 6.10 2001/03/01 00:32:15 lavr
- * FIX: Empty update does not generate parse error
- *
- * Revision 6.9 2001/02/09 17:35:45 lavr
- * Modified: fSERV_StatelessOnly overrides info->stateless
- * Bug fixed: free(type) -> free(name)
- *
- * Revision 6.8 2001/01/25 17:04:43 lavr
- * Reversed:: DESTROY method calls free() to delete connector structure
- *
- * Revision 6.7 2001/01/23 23:09:19 lavr
- * Flags added to 'Ex' constructor
- *
- * Revision 6.6 2001/01/11 16:38:18 lavr
- * free(connector) removed from s_Destroy function
- * (now always called from outside, in METACONN_Remove)
- *
- * Revision 6.5 2001/01/08 22:39:40 lavr
- * Further development of service-mapping protocol: stateless/stateful
- * is now separated from firewall/direct mode (see also in few more files)
- *
- * Revision 6.4 2001/01/03 22:35:53 lavr
- * Next working revision (bugfixes and protocol changes)
- *
- * Revision 6.3 2000/12/29 18:05:12 lavr
- * First working revision.
- *
- * Revision 6.2 2000/10/20 17:34:39 lavr
- * Partially working service connector (service mapping works)
- * Checkin for backup purposes
- *
- * Revision 6.1 2000/10/07 22:14:07 lavr
- * Initial revision, placeholder mostly
- *
- * ==========================================================================
- */
diff --git a/connect/ncbi_socket.c b/connect/ncbi_socket.c
index 3eb2cc54..411e619c 100644
--- a/connect/ncbi_socket.c
+++ b/connect/ncbi_socket.c
@@ -1,4 +1,4 @@
-/* $Id: ncbi_socket.c,v 6.210 2007/08/21 16:55:29 kazimird Exp $
+/* $Id: ncbi_socket.c,v 6.224 2008/02/18 14:55:42 kazimird Exp $
* ===========================================================================
*
* PUBLIC DOMAIN NOTICE
@@ -40,6 +40,8 @@
#include <connect/ncbi_buffer.h>
#include <connect/ncbi_socket_unix.h>
+#define NCBI_USE_ERRCODE_X Connect_Socket
+
/* OS must be specified in the command-line ("-D....") or in the conf. header
*/
#if !defined(NCBI_OS_UNIX) && !defined(NCBI_OS_MSWIN) && !defined(NCBI_OS_MAC)
@@ -57,7 +59,6 @@
/* #define HAVE_GETADDRINFO 1 */
/* #define HAVE_GETNAMEINFO 1 */
-
/* Uncomment this (or specify "-DHAVE_GETHOSTBY***_R=") only if:
* 0) you are compiling this outside of the NCBI C or C++ Toolkits
* (USE_NCBICONF is not #define'd), and
@@ -74,7 +75,6 @@
/* #define HAVE_GETHOSTBYNAME_R 6 */
/* #define HAVE_GETHOSTBYADDR_R 8 */
-
/* Uncomment this (or specify "-DHAVE_SIN_LEN") only if:
* 0) you are compiling this outside of the NCBI C or C++ Toolkits
* (USE_NCBICONF is not #define'd), and
@@ -83,7 +83,6 @@
/* #define HAVE_SIN_LEN 1 */
-
/* Platform-specific system headers
*/
@@ -100,6 +99,9 @@
# include <netinet/in.h>
# ifndef NCBI_COMPILER_METROWERKS
# include <netinet/tcp.h>
+# if defined(NCBI_OS_LINUX) && !defined(IP_MTU)
+# define IP_MTU 14
+# endif
# endif
# if !defined(NCBI_OS_BEOS) && !defined(NCBI_COMPILER_MW_MSL)
# include <arpa/inet.h>
@@ -148,7 +150,6 @@
#include <stdlib.h>
-
/******************************************************************************
* TYPEDEFS & MACROS
*/
@@ -642,9 +643,8 @@ static const char* s_StrError(int error)
};
size_t i, n = sizeof(errmap) / sizeof(errmap[0]) - 1/*dummy entry*/;
- /* always called on error so get error number here if not having already */
- if ( !error )
- error = errno;
+ if (!error)
+ return "";
for (i = 0; i < n; i++) {
if (errmap[i].errnum == error)
return errmap[i].errtxt;
@@ -744,11 +744,12 @@ static void s_DoLog
}
CORE_TRACEF(("%s%s%s", s_ID(sock, _id), head, tail));
break;
+
case eIO_Read:
case eIO_Write:
if (sock->stype == eSOCK_Datagram) {
const struct sockaddr_in* sin = (const struct sockaddr_in*) sa;
- assert(sa && sa->sa_family == AF_INET);
+ assert(sa && sa->sa_family == AF_INET);
SOCK_HostPortToString(sin->sin_addr.s_addr,
ntohs(sin->sin_port),
tail, sizeof(tail));
@@ -772,8 +773,9 @@ static void s_DoLog
sock->stype == eSOCK_Datagram
? (event == eIO_Read ? " from " : " to ")
: "", tail);
- CORE_DATA(data, size, head);
+ CORE_DATA_X(109, data, size, head);
break;
+
case eIO_Close:
{{
int n = sprintf(head, "%lu byte%s",
@@ -803,9 +805,11 @@ static void s_DoLog
sock->stype == eSOCK_ServerSideKeep
? "Leaving" : "Closing", head,tail));
break;
+
default:
- CORE_LOGF(eLOG_Error, ("%s[SOCK::s_DoLog] Invalid event %u",
- s_ID(sock, _id), (unsigned int) event));
+ CORE_LOGF_X(1, eLOG_Error,
+ ("%s[SOCK::s_DoLog] Invalid event %u",
+ s_ID(sock, _id), (unsigned int) event));
assert(0);
break;
}
@@ -861,59 +865,60 @@ extern void SOCK_AllowSigPipeAPI(void)
static void s_ShowDataLayout(void)
{
- CORE_LOGF(eLOG_Note, ("SOCK data layout:\n"
- " Sizeof(SOCK_struct) = %u, offsets follow\n"
- "\tsock: %u\n"
- "\tid: %u\n"
- "\thost: %u\n"
- "\tport: %u\n"
- "\tbitfield: 16 bits\n"
- "\tr_timeout: %u\n"
- "\tr_tv: %u\n"
- "\tr_to: %u\n"
- "\tw_timeout: %u\n"
- "\tw_tv: %u\n"
- "\tw_to: %u\n"
- "\tc_timeout: %u\n"
- "\tc_tv: %u\n"
- "\tc_to: %u\n"
- "\tr_buf: %u\n"
- "\tw_buf: %u\n"
- "\tw_len: %u\n"
- "\tn_read: %u\n"
- "\tn_written: %u\n"
- "\tn_in: %u\n"
- "\tn_out: %u\n"
- "\tmyport: %u"
+ CORE_LOGF_X(2, eLOG_Note,
+ ("SOCK data layout:\n"
+ " Sizeof(SOCK_struct) = %u, offsets follow\n"
+ "\tsock: %u\n"
+ "\tid: %u\n"
+ "\thost: %u\n"
+ "\tport: %u\n"
+ "\tbitfield: 16 bits\n"
+ "\tr_timeout: %u\n"
+ "\tr_tv: %u\n"
+ "\tr_to: %u\n"
+ "\tw_timeout: %u\n"
+ "\tw_tv: %u\n"
+ "\tw_to: %u\n"
+ "\tc_timeout: %u\n"
+ "\tc_tv: %u\n"
+ "\tc_to: %u\n"
+ "\tr_buf: %u\n"
+ "\tw_buf: %u\n"
+ "\tw_len: %u\n"
+ "\tn_read: %u\n"
+ "\tn_written: %u\n"
+ "\tn_in: %u\n"
+ "\tn_out: %u\n"
+ "\tmyport: %u"
# ifdef NCBI_OS_UNIX
- "\n\tpath: %u"
+ "\n\tpath: %u"
# endif /*NCBI_OS_UNIX*/
- , (unsigned int) sizeof(SOCK_struct),
- (unsigned int) offsetof(SOCK_struct, sock),
- (unsigned int) offsetof(SOCK_struct, id),
- (unsigned int) offsetof(SOCK_struct, host),
- (unsigned int) offsetof(SOCK_struct, port),
- (unsigned int) offsetof(SOCK_struct, r_timeout),
- (unsigned int) offsetof(SOCK_struct, r_tv),
- (unsigned int) offsetof(SOCK_struct, r_to),
- (unsigned int) offsetof(SOCK_struct, w_timeout),
- (unsigned int) offsetof(SOCK_struct, w_tv),
- (unsigned int) offsetof(SOCK_struct, w_to),
- (unsigned int) offsetof(SOCK_struct, c_timeout),
- (unsigned int) offsetof(SOCK_struct, c_tv),
- (unsigned int) offsetof(SOCK_struct, c_to),
- (unsigned int) offsetof(SOCK_struct, r_buf),
- (unsigned int) offsetof(SOCK_struct, w_buf),
- (unsigned int) offsetof(SOCK_struct, w_len),
- (unsigned int) offsetof(SOCK_struct, n_read),
- (unsigned int) offsetof(SOCK_struct, n_written),
- (unsigned int) offsetof(SOCK_struct, n_in),
- (unsigned int) offsetof(SOCK_struct, n_out),
- (unsigned int) offsetof(SOCK_struct, myport)
+ , (unsigned int) sizeof(SOCK_struct),
+ (unsigned int) offsetof(SOCK_struct, sock),
+ (unsigned int) offsetof(SOCK_struct, id),
+ (unsigned int) offsetof(SOCK_struct, host),
+ (unsigned int) offsetof(SOCK_struct, port),
+ (unsigned int) offsetof(SOCK_struct, r_timeout),
+ (unsigned int) offsetof(SOCK_struct, r_tv),
+ (unsigned int) offsetof(SOCK_struct, r_to),
+ (unsigned int) offsetof(SOCK_struct, w_timeout),
+ (unsigned int) offsetof(SOCK_struct, w_tv),
+ (unsigned int) offsetof(SOCK_struct, w_to),
+ (unsigned int) offsetof(SOCK_struct, c_timeout),
+ (unsigned int) offsetof(SOCK_struct, c_tv),
+ (unsigned int) offsetof(SOCK_struct, c_to),
+ (unsigned int) offsetof(SOCK_struct, r_buf),
+ (unsigned int) offsetof(SOCK_struct, w_buf),
+ (unsigned int) offsetof(SOCK_struct, w_len),
+ (unsigned int) offsetof(SOCK_struct, n_read),
+ (unsigned int) offsetof(SOCK_struct, n_written),
+ (unsigned int) offsetof(SOCK_struct, n_in),
+ (unsigned int) offsetof(SOCK_struct, n_out),
+ (unsigned int) offsetof(SOCK_struct, myport)
# ifdef NCBI_OS_UNIX
- , (unsigned int) offsetof(SOCK_struct, path)
+ , (unsigned int) offsetof(SOCK_struct, path)
# endif /*NCBI_OS_UNIX*/
- ));
+ ));
}
#endif /*SOCK_HAVE_SHOWDATALAYOUT*/
@@ -935,10 +940,11 @@ extern EIO_Status SOCK_InitializeAPI(void)
{{
WSADATA wsadata;
int x_errno = WSAStartup(MAKEWORD(1,1), &wsadata);
- if (x_errno != 0) {
+ if (x_errno) {
CORE_UNLOCK;
- CORE_LOG_ERRNO_EX(eLOG_Error, x_errno, SOCK_STRERROR(x_errno),
- "[SOCK::InitializeAPI] Failed WSAStartup()");
+ CORE_LOG_ERRNO_EXX(3, eLOG_Error,
+ x_errno, SOCK_STRERROR(x_errno),
+ "[SOCK::InitializeAPI] Failed WSAStartup()");
return eIO_Unknown;
}
}}
@@ -983,8 +989,9 @@ extern EIO_Status SOCK_ShutdownAPI(void)
int x_errno = WSACleanup() ? SOCK_ERRNO : 0;
CORE_UNLOCK;
if ( x_errno ) {
- CORE_LOG_ERRNO_EX(eLOG_Warning, x_errno, SOCK_STRERROR(x_errno),
- "[SOCK::ShutdownAPI] Failed WSACleanup()");
+ CORE_LOG_ERRNO_EXX(4, eLOG_Warning,
+ x_errno, SOCK_STRERROR(x_errno),
+ "[SOCK::ShutdownAPI] Failed WSACleanup()");
return eIO_Unknown;
}
}}
@@ -1152,6 +1159,7 @@ static EIO_Status s_Select(size_t n,
for (;;) { /* (optionally) auto-resume if interrupted by a signal */
struct timeval xx_tv;
+ int x_errno;
n_fds = 0;
FD_ZERO(&r_fds);
@@ -1289,12 +1297,12 @@ static EIO_Status s_Select(size_t n,
break;
/* n_fds < 0 */
- if (SOCK_ERRNO != SOCK_EINTR) {
- int x_errno = SOCK_ERRNO;
+ if ((x_errno = SOCK_ERRNO) != SOCK_EINTR) {
char _id[32];
- CORE_LOGF_ERRNO_EX(eLOG_Trace, x_errno, SOCK_STRERROR(x_errno),
- ("%s[SOCK::s_Select] Failed select()",
- n == 1 ? s_ID(polls[0].sock, _id) : ""));
+ CORE_LOGF_ERRNO_EXX(5, eLOG_Trace,
+ x_errno, SOCK_STRERROR(x_errno),
+ ("%s[SOCK::s_Select] Failed select()",
+ n == 1 ? s_ID(polls[0].sock, _id) : ""));
return eIO_Unknown;
}
@@ -1367,7 +1375,7 @@ static EIO_Status s_IsConnected(SOCK sock,
status = eIO_Unknown;
}
#endif /*NCBI_OS_UNIX || NCBI_OS_MSWIN*/
-#if defined(_DEBUG) && !defined(NDEBUG)
+#if defined(_DEBUG) && !defined(NDEBUG)
if (status == eIO_Success) {
# ifdef NCBI_OS_UNIX
if (!sock->path[0])
@@ -1401,10 +1409,26 @@ static EIO_Status s_IsConnected(SOCK sock,
!s_SetReuseAddress(sock->sock, 1/*true*/)) {
int x_errno = SOCK_ERRNO;
char _id[32];
- CORE_LOGF_ERRNO_EX(eLOG_Note, x_errno, SOCK_STRERROR(x_errno),
- ("%s[SOCK::s_IsConnected] Failed "
- "setsockopt(REUSEADDR)", s_ID(sock, _id)));
+ CORE_LOGF_ERRNO_EXX(6, eLOG_Note,
+ x_errno, SOCK_STRERROR(x_errno),
+ ("%s[SOCK::s_IsConnected] Failed "
+ "setsockopt(REUSEADDR)", s_ID(sock, _id)));
}
+#if defined(_DEBUG) && !defined(NDEBUG)
+ else {
+ int mtu;
+ char _id[32];
+# ifdef IP_MTU
+ size_t mtulen = sizeof(mtu);
+ if (getsockopt(sock->sock, SOL_IP, IP_MTU, &mtu, &mtulen) != 0)
+# endif
+ mtu = -1;
+ if (sock->log == eOn || (sock->log == eDefault && s_Log == eOn)) {
+ CORE_TRACEF(("%sConnection established, MTU = %d",
+ s_ID(sock, _id), mtu));
+ }
+ }
+#endif /*_DEBUG && !NDEBUG*/
return status;
}
@@ -1490,9 +1514,10 @@ static int s_Recv(SOCK sock,
x_errno != SOCK_EINTR) {
/* catch unknown ERROR */
sock->r_status = eIO_Unknown;
- CORE_LOGF_ERRNO_EX(eLOG_Trace, x_errno, SOCK_STRERROR(x_errno),
- ("%s[SOCK::s_Recv] "
- " Failed recv()", s_ID(sock, xx_buffer)));
+ CORE_LOGF_ERRNO_EXX(7, eLOG_Trace,
+ x_errno, SOCK_STRERROR(x_errno),
+ ("%s[SOCK::s_Recv] Failed recv()",
+ s_ID(sock, xx_buffer)));
}
return n_read ? (int) n_read : -1;
}
@@ -1516,9 +1541,9 @@ static int s_Recv(SOCK sock,
if ((size_t) x_read > n_todo)
x_read = n_todo;
if (error) {
- CORE_LOGF_ERRNO(eLOG_Error, errno,
- ("%s[SOCK::s_Recv] Cannot store data in "
- "peek buffer", s_ID(sock, xx_buffer)));
+ CORE_LOGF_ERRNO_X(8, eLOG_Error, errno,
+ ("%s[SOCK::s_Recv] Cannot store data in "
+ "peek buffer", s_ID(sock, xx_buffer)));
sock->eof = 1/*failure*/;
sock->r_status = eIO_Closed;
if ( peek )
@@ -1640,8 +1665,9 @@ static EIO_Status s_WipeRBuf(SOCK sock)
if (size && BUF_Read(sock->r_buf, 0, size) != size) {
char _id[32];
- CORE_LOGF(eLOG_Error, ("%s[SOCK::s_WipeRBuf] "
- " Cannot drop aux. data buf", s_ID(sock, _id)));
+ CORE_LOGF_X(9, eLOG_Error,
+ ("%s[SOCK::s_WipeRBuf] Cannot drop aux. data buf",
+ s_ID(sock, _id)));
assert(0);
status = eIO_Unknown;
} else
@@ -1659,8 +1685,9 @@ static EIO_Status s_WipeWBuf(SOCK sock)
assert(sock->stype == eSOCK_Datagram);
if (size && BUF_Read(sock->w_buf, 0, size) != size) {
char _id[32];
- CORE_LOGF(eLOG_Error, ("%s[SOCK::s_WipeWBuf] "
- " Cannot drop aux. data buf", s_ID(sock, _id)));
+ CORE_LOGF_X(10, eLOG_Error,
+ ("%s[SOCK::s_WipeWBuf] Cannot drop aux. data buf",
+ s_ID(sock, _id)));
assert(0);
status = eIO_Unknown;
} else
@@ -1766,9 +1793,10 @@ static EIO_Status s_Send(SOCK sock,
if (x_errno != SOCK_EPIPE && x_errno != SOCK_ENOTCONN &&
x_errno != SOCK_ECONNRESET && x_errno != SOCK_ECONNABORTED &&
x_errno != SOCK_ENETRESET && x_errno != SOCK_ETIMEDOUT) {
- CORE_LOGF_ERRNO_EX(eLOG_Trace, x_errno, SOCK_STRERROR(x_errno),
- ("%s[SOCK::s_Send] "
- " Failed send()", s_ID(sock, _id)));
+ CORE_LOGF_ERRNO_EXX(11, eLOG_Trace,
+ x_errno, SOCK_STRERROR(x_errno),
+ ("%s[SOCK::s_Send] Failed send()",
+ s_ID(sock, _id)));
break;
}
sock->w_status = eIO_Closed;
@@ -1834,11 +1862,11 @@ static EIO_Status s_WritePending(SOCK sock,
{
const struct timeval* x_tv;
EIO_Status status;
- int x_errno;
size_t off;
assert(sock->stype != eSOCK_Datagram && sock->sock != SOCK_INVALID);
if ( sock->pending ) {
+ int x_errno;
status = s_IsConnected(sock, tv, &x_errno, writeable);
if (status != eIO_Success) {
if (status != eIO_Timeout) {
@@ -1855,9 +1883,10 @@ static EIO_Status s_WritePending(SOCK sock,
#endif /*NCBI_OS_UNIX*/
SOCK_HostPortToString(sock->host, ntohs(sock->port),
addr, sizeof(addr));
- CORE_LOGF_ERRNO_EX(eLOG_Error, x_errno, SOCK_STRERROR(x_errno),
- ("%s[SOCK::s_WritePending] Failed pending "
- "connect() to %s", s_ID(sock, _id), addr));
+ CORE_LOGF_ERRNO_EXX(12, eLOG_Error,
+ x_errno, SOCK_STRERROR(x_errno),
+ ("%s[SOCK::s_WritePending] Failed pending"
+ " connect() to %s",s_ID(sock, _id),addr));
sock->w_status = status;
}
return status;
@@ -2050,11 +2079,11 @@ static EIO_Status s_Shutdown(SOCK sock,
if (sock->w_status == eIO_Closed)
return eIO_Success; /* has been shut down already */
if ((status = s_WritePending(sock, tv, 0, 0)) != eIO_Success) {
- CORE_LOGF(!tv || (tv->tv_sec | tv->tv_usec)
- ? eLOG_Warning : eLOG_Trace,
- ("%s[SOCK::s_Shutdown] Shutting down for "
- "write with some output pending (%s)",
- s_ID(sock, _id), IO_StatusStr(status)));
+ CORE_LOGF_X(13, !tv || (tv->tv_sec | tv->tv_usec)
+ ? eLOG_Warning : eLOG_Trace,
+ ("%s[SOCK::s_Shutdown] Shutting down for "
+ "write with some output pending (%s)",
+ s_ID(sock, _id), IO_StatusStr(status)));
}
x_how = SOCK_SHUTDOWN_WR;
sock->w_status = eIO_Closed;
@@ -2070,11 +2099,11 @@ static EIO_Status s_Shutdown(SOCK sock,
return eIO_Success;
if (sock->w_status != eIO_Closed
&& (status = s_WritePending(sock, tv, 0, 0)) != eIO_Success) {
- CORE_LOGF(!tv || (tv->tv_sec | tv->tv_usec)
- ? eLOG_Warning : eLOG_Trace,
- ("%s[SOCK::s_Shutdown] Shutting down for "
- "R/W with some output pending (%s)",
- s_ID(sock, _id), IO_StatusStr(status)));
+ CORE_LOGF_X(14, !tv || (tv->tv_sec | tv->tv_usec)
+ ? eLOG_Warning : eLOG_Trace,
+ ("%s[SOCK::s_Shutdown] Shutting down for "
+ "R/W with some output pending (%s)",
+ s_ID(sock, _id), IO_StatusStr(status)));
}
x_how = SOCK_SHUTDOWN_RDWR;
sock->eof = 0/*false*/;
@@ -2091,26 +2120,33 @@ static EIO_Status s_Shutdown(SOCK sock,
return eIO_Success;
#endif /*NCBI_OS_MSWIN*/
default:
- CORE_LOGF(eLOG_Error, ("%s[SOCK::s_Shutdown] Invalid direction %u",
- s_ID(sock, _id), (unsigned int) how));
+ CORE_LOGF_X(15, eLOG_Error,
+ ("%s[SOCK::s_Shutdown] Invalid direction %u",
+ s_ID(sock, _id), (unsigned int) how));
return eIO_InvalidArg;
}
if (s_Initialized && SOCK_SHUTDOWN(sock->sock, x_how) != 0) {
int x_errno = SOCK_ERRNO;
+#ifdef NCBI_OS_MSWIN
+ if (x_errno == WSANOTINITIALISED)
+ s_Initialized = 0/*false*/;
+ else
+#endif /*NCBI_OS_MSWIN*/
if (
-#if defined(NCBI_OS_LINUX)/*bug in the Linux kernel to report*/ || \
- defined(NCBI_OS_IRIX) || \
- defined(NCBI_OS_OSF1)
+#if defined(NCBI_OS_LINUX)/*bug in the Linux kernel to report*/ || \
+ defined(NCBI_OS_IRIX) || \
+ defined(NCBI_OS_OSF1)
x_errno != SOCK_ENOTCONN
#else
x_errno != SOCK_ENOTCONN || sock->pending
#endif /*UNIX flavors*/
)
- CORE_LOGF_ERRNO_EX(eLOG_Warning, x_errno, SOCK_STRERROR(x_errno),
- ("%s[SOCK::s_Shutdown] Failed shutdown(%s)",
- s_ID(sock, _id), how == eIO_Read ? "READ" :
- how == eIO_Write ? "WRITE" : "READ/WRITE"));
+ CORE_LOGF_ERRNO_EXX(16, eLOG_Warning,
+ x_errno, SOCK_STRERROR(x_errno),
+ ("%s[SOCK::s_Shutdown] Failed shutdown(%s)",
+ s_ID(sock, _id), how == eIO_Read ? "READ" :
+ how == eIO_Write ? "WRITE" : "READ/WRITE"));
}
return eIO_Success;
}
@@ -2153,21 +2189,23 @@ static EIO_Status s_Close(SOCK sock, int/*bool*/ abort)
&& setsockopt(sock->sock, SOL_SOCKET, SO_LINGER,
(char*) &lgr, sizeof(lgr)) != 0) {
int x_errno = SOCK_ERRNO;
- CORE_LOGF_ERRNO_EX(eLOG_Trace, x_errno, SOCK_STRERROR(x_errno),
- ("%s[SOCK::s_%s] Failed setsockopt"
- "(SO_LINGER)", s_ID(sock, _id),
- abort ? "Abort" : "Close"));
+ CORE_LOGF_ERRNO_EXX(17, eLOG_Trace,
+ x_errno, SOCK_STRERROR(x_errno),
+ ("%s[SOCK::s_%s] Failed setsockopt"
+ "(SO_LINGER)", s_ID(sock, _id),
+ abort ? "Abort" : "Close"));
}
# ifdef TCP_LINGER2
if (abort || (tv && !(tv->tv_sec | tv->tv_usec))) {
int no = -1;
if (setsockopt(sock->sock, IPPROTO_TCP, TCP_LINGER2,
(char*) &no, sizeof(no)) != 0 && !abort) {
- int x_err = SOCK_ERRNO;
- CORE_LOGF_ERRNO_EX(eLOG_Trace, x_err, SOCK_STRERROR(x_err),
- ("%s[SOCK::s_%s] Failed setsockopt"
- "(TCP_LINGER2)", s_ID(sock, _id),
- abort ? "Abort" : "Close"));
+ int x_errno = SOCK_ERRNO;
+ CORE_LOGF_ERRNO_EXX(18, eLOG_Trace,
+ x_errno, SOCK_STRERROR(x_errno),
+ ("%s[SOCK::s_%s] Failed setsockopt"
+ "(TCP_LINGER2)", s_ID(sock, _id),
+ abort ? "Abort" : "Close"));
}
}
# endif /*TCP_LINGER2*/
@@ -2180,16 +2218,20 @@ static EIO_Status s_Close(SOCK sock, int/*bool*/ abort)
} else
sock->r_status = sock->w_status = eIO_Closed;
/* set the socket back to blocking mode */
- if (!s_SetNonblock(sock->sock, 0/*false*/) && !abort) {
- CORE_LOGF(eLOG_Trace, ("%s[SOCK::s_Close] Cannot set socket "
- "back to blocking mode", s_ID(sock, _id)));
+ if (s_Initialized && !s_SetNonblock(sock->sock, 0/*false*/) && !abort){
+ int x_errno = SOCK_ERRNO;
+ CORE_LOGF_ERRNO_EXX(19, eLOG_Trace,
+ x_errno, SOCK_STRERROR(x_errno),
+ ("%s[SOCK::s_Close] Cannot set socket "
+ "back to blocking mode", s_ID(sock, _id)));
}
} else {
status = s_WritePending(sock, sock->c_timeout, 0, 0);
if (status != eIO_Success) {
- CORE_LOGF(eLOG_Warning, ("%s[SOCK::s_Close] Leaving with some "
- "output data pending (%s)",
- s_ID(sock, _id), IO_StatusStr(status)));
+ CORE_LOGF_X(20, eLOG_Warning,
+ ("%s[SOCK::s_Close] Leaving with some "
+ "output data pending (%s)",
+ s_ID(sock, _id), IO_StatusStr(status)));
}
}
sock->w_len = 0;
@@ -2213,12 +2255,18 @@ static EIO_Status s_Close(SOCK sock, int/*bool*/ abort)
if (!s_Initialized)
break;
x_errno = SOCK_ERRNO;
+#ifdef NCBI_OS_MSWIN
+ if (x_errno == WSANOTINITIALISED) {
+ s_Initialized = 0/*false*/;
+ break;
+ }
+#endif /*NCBI_OS_MSWIN*/
if (abort || x_errno != SOCK_EINTR) {
- CORE_LOGF_ERRNO_EX(abort > 1 ? eLOG_Error : eLOG_Warning,
- x_errno, SOCK_STRERROR(x_errno),
- ("%s[SOCK::s_%s] Failed close()",
- s_ID(sock, _id),
- abort ? "Abort" : "Close"));
+ CORE_LOGF_ERRNO_EXX(21, abort > 1 ? eLOG_Error : eLOG_Warning,
+ x_errno, SOCK_STRERROR(x_errno),
+ ("%s[SOCK::s_%s] Failed close()",
+ s_ID(sock, _id),
+ abort ? "Abort" : "Close"));
if (abort++ > 1 || x_errno != SOCK_EINTR) {
status = eIO_Unknown;
break;
@@ -2229,6 +2277,7 @@ static EIO_Status s_Close(SOCK sock, int/*bool*/ abort)
/* return */
sock->sock = SOCK_INVALID;
+ sock->myport = 0;
return status;
}
@@ -2280,9 +2329,10 @@ static EIO_Status s_Connect(SOCK sock,
/* get address of the remote host (assume the same host if NULL) */
x_host = host && *host ? SOCK_gethostbyname(host) : sock->host;
if ( !x_host ) {
- CORE_LOGF(eLOG_Error, ("%s[SOCK::s_Connect] Failed "
- "SOCK_gethostbyname(\"%.64s\")",
- s_ID(sock, _id), host));
+ CORE_LOGF_X(22, eLOG_Error,
+ ("%s[SOCK::s_Connect] Failed"
+ " SOCK_gethostbyname(\"%.64s\")",
+ s_ID(sock, _id), host));
return eIO_Unknown;
}
addr.sin.sin_addr.s_addr = x_host;
@@ -2294,16 +2344,17 @@ static EIO_Status s_Connect(SOCK sock,
#endif /*HAVE_SIN_LEN*/
sock->host = x_host;
sock->port = x_port;
- c = SOCK_HostPortToString(x_host, ntohs(x_port), s, sizeof(s))
- ? s : "???";
+ SOCK_HostPortToString(x_host, ntohs(x_port), s, sizeof(s));
+ c = s;
}
/* check the new socket */
if ((x_sock = socket(addr.sa.sa_family, SOCK_STREAM, 0)) == SOCK_INVALID) {
int x_errno = SOCK_ERRNO;
- CORE_LOGF_ERRNO_EX(eLOG_Error, x_errno, SOCK_STRERROR(x_errno),
- ("%s[SOCK::s_Connect] Cannot create socket",
- s_ID(sock, _id)));
+ CORE_LOGF_ERRNO_EXX(23, eLOG_Error,
+ x_errno, SOCK_STRERROR(x_errno),
+ ("%s[SOCK::s_Connect] Cannot create socket",
+ s_ID(sock, _id)));
return eIO_Unknown;
}
sock->sock = x_sock;
@@ -2314,8 +2365,11 @@ static EIO_Status s_Connect(SOCK sock,
/* set the socket I/O to non-blocking mode */
if ( !s_SetNonblock(x_sock, 1/*true*/) ) {
- CORE_LOGF(eLOG_Error, ("%s[SOCK::s_Connect] Cannot set socket to "
- "non-blocking mode", s_ID(sock, _id)));
+ int x_errno = SOCK_ERRNO;
+ CORE_LOGF_ERRNO_EXX(24, eLOG_Error,
+ x_errno, SOCK_STRERROR(x_errno),
+ ("%s[SOCK::s_Connect] Cannot set socket to"
+ " non-blocking mode", s_ID(sock, _id)));
s_Close(sock, 1/*abort*/);
return eIO_Unknown;
}
@@ -2339,9 +2393,10 @@ static EIO_Status s_Connect(SOCK sock,
(n == 0 || x_errno != SOCK_EALREADY) &&
x_errno != SOCK_EWOULDBLOCK) {
if (x_errno != SOCK_EINTR) {
- CORE_LOGF_ERRNO_EX(eLOG_Error, x_errno, SOCK_STRERROR(x_errno),
- ("%s[SOCK::s_Connect] Failed connect() "
- "to %s", s_ID(sock, _id), c));
+ CORE_LOGF_ERRNO_EXX(25, eLOG_Error,
+ x_errno, SOCK_STRERROR(x_errno),
+ ("%s[SOCK::s_Connect] Failed connect() "
+ "to %s", s_ID(sock, _id), c));
}
s_Close(sock, 1/*abort*/);
/* unrecoverable error */
@@ -2354,10 +2409,11 @@ static EIO_Status s_Connect(SOCK sock,
status = s_IsConnected(sock, s_to2tv(timeout, &tv), &x_errno, 0);
if (status != eIO_Success) {
- CORE_LOGF_ERRNO_EX(eLOG_Error, x_errno, SOCK_STRERROR(x_errno),
- ("%s[SOCK::s_Connect] Failed pending "
- "connect() to %s (%s)",
- s_ID(sock, _id), c, IO_StatusStr(status)));
+ CORE_LOGF_ERRNO_EXX(26, eLOG_Error,
+ x_errno, SOCK_STRERROR(x_errno),
+ ("%s[SOCK::s_Connect] Failed pending "
+ "connect() to %s (%s)", s_ID(sock, _id),
+ c, IO_StatusStr(status)));
s_Close(sock, 1/*abort*/);
return status;
}
@@ -2406,9 +2462,9 @@ static EIO_Status s_Create(const char* host,
if (!BUF_SetChunkSize(&x_sock->w_buf, datalen) ||
!BUF_Write(&x_sock->w_buf, data, datalen)) {
char _id[32];
- CORE_LOGF_ERRNO(eLOG_Error, errno,
- ("%s[SOCK::CreateEx] "
- " Cannot store initial data", s_ID(x_sock, _id)));
+ CORE_LOGF_ERRNO_X(27, eLOG_Error, errno,
+ ("%s[SOCK::CreateEx] Cannot store initial data",
+ s_ID(x_sock, _id)));
SOCK_Close(x_sock);
return eIO_Unknown;
}
@@ -2469,27 +2525,24 @@ extern EIO_Status TRIGGER_Create(TRIGGER* trigger, ESwitch log)
int fd[2];
if (pipe(fd) < 0) {
- int x_errno = errno;
- CORE_LOGF_ERRNO_EX(eLOG_Error, x_errno, SOCK_STRERROR(x_errno),
- ("TRIGGER#%u[?]: [TRIGGER::Create] "
- " Cannot create pipe", x_id));
+ CORE_LOGF_ERRNO_X(28, eLOG_Error, errno,
+ ("TRIGGER#%u[?]: [TRIGGER::Create] "
+ " Cannot create pipe", x_id));
return eIO_Closed;
}
if (!s_SetNonblock(fd[0], 1/*true*/) ||
- !s_SetNonblock(fd[0], 1/*true*/)) {
- int x_errno = errno;
- CORE_LOGF_ERRNO_EX(eLOG_Warning, x_errno, SOCK_STRERROR(x_errno),
- ("TRIGGER#%u[?]: [TRIGGER::Create] "
- " Failed to set non-blocking mode", x_id));
+ !s_SetNonblock(fd[1], 1/*true*/)) {
+ CORE_LOGF_ERRNO_X(29, eLOG_Warning, errno,
+ ("TRIGGER#%u[?]: [TRIGGER::Create] "
+ " Failed to set non-blocking mode", x_id));
}
if (!s_SetCloexec(fd[0], 1/*true*/) ||
!s_SetCloexec(fd[1], 1/*true*/)) {
- int x_errno = errno;
- CORE_LOGF_ERRNO_EX(eLOG_Warning, x_errno, SOCK_STRERROR(x_errno),
- ("TRIGGER#%u[?]: [TRIGGER::Create] "
- " Failed to set close-on-exec", x_id));
+ CORE_LOGF_ERRNO_X(30, eLOG_Warning, errno,
+ ("TRIGGER#%u[?]: [TRIGGER::Create] "
+ " Failed to set close-on-exec", x_id));
}
if (!(*trigger = (TRIGGER) calloc(1, sizeof(*trigger)))) {
@@ -2513,8 +2566,8 @@ extern EIO_Status TRIGGER_Create(TRIGGER* trigger, ESwitch log)
# else
- CORE_LOGF(eLOG_Error, ("TRIGGER#%u[?]: [TRIGGER::Create] "
- " Not yet supported on this platform", x_id));
+ CORE_LOGF_X(31, eLOG_Error, ("TRIGGER#%u[?]: [TRIGGER::Create] "
+ " Not yet supported on this platform", x_id));
return eIO_NotSupported;
# endif /*NCBI_OS_UNIX*/
@@ -2572,8 +2625,8 @@ extern EIO_Status TRIGGER_Set(TRIGGER trigger)
# else
- CORE_LOG(eLOG_Error,
- "[TRIGGER::Set] Not yet supported on this platform");
+ CORE_LOG_X(32, eLOG_Error,
+ "[TRIGGER::Set] Not yet supported on this platform");
return eIO_NotSupported;
# endif /*NCBI_OS_UNIX*/
@@ -2615,8 +2668,8 @@ extern EIO_Status TRIGGER_IsSet(TRIGGER trigger)
# else
- CORE_LOG(eLOG_Error,
- "[TRIGGER::IsSet] Not yet supported on this platform");
+ CORE_LOG_X(33, eLOG_Error,
+ "[TRIGGER::IsSet] Not yet supported on this platform");
return eIO_NotSupported;
# endif /*NCBI_OS_UNIX*/
@@ -2680,9 +2733,10 @@ static EIO_Status s_CreateListening(const char* path,
/* create new(listening) socket */
if ((x_lsock = socket(addr.sa.sa_family, SOCK_STREAM, 0)) == SOCK_INVALID){
int x_errno = SOCK_ERRNO;
- CORE_LOGF_ERRNO_EX(eLOG_Error, x_errno, SOCK_STRERROR(x_errno),
- ("LSOCK#%u[?]: [LSOCK::Create] "
- " Cannot create socket", x_id));
+ CORE_LOGF_ERRNO_EXX(34, eLOG_Error,
+ x_errno, SOCK_STRERROR(x_errno),
+ ("LSOCK#%u[?]: [LSOCK::Create] "
+ " Cannot create socket", x_id));
return eIO_Unknown;
}
@@ -2696,10 +2750,11 @@ static EIO_Status s_CreateListening(const char* path,
*/
if ( !s_SetReuseAddress(x_lsock, 1/*true*/) ) {
int x_errno = SOCK_ERRNO;
- CORE_LOGF_ERRNO_EX(eLOG_Error, x_errno, SOCK_STRERROR(x_errno),
- ("LSOCK#%u[%u]: [LSOCK::Create] "
- " Failed setsockopt(REUSEADDR)",
- x_id, (unsigned int) x_lsock));
+ CORE_LOGF_ERRNO_EXX(35, eLOG_Error,
+ x_errno, SOCK_STRERROR(x_errno),
+ ("LSOCK#%u[%u]: [LSOCK::Create] "
+ " Failed setsockopt(REUSEADDR)",
+ x_id, (unsigned int) x_lsock));
SOCK_CLOSE(x_lsock);
return eIO_Unknown;
}
@@ -2725,16 +2780,17 @@ static EIO_Status s_CreateListening(const char* path,
#ifdef HAVE_SIN_LEN
addr.sin.sin_len = addrlen;
#endif /*HAVE_SIN_LEN*/
- c = SOCK_HostPortToString(htonl(ip), port, s, sizeof(s))
- ? s : "?:?";
+ SOCK_HostPortToString(htonl(ip), port, s, sizeof(s));
+ c = s;
}
if (bind(x_lsock, &addr.sa, addrlen) != 0) {
int x_errno = SOCK_ERRNO;
- CORE_LOGF_ERRNO_EX(x_errno == SOCK_EADDRINUSE ? eLOG_Trace : eLOG_Error,
- x_errno, SOCK_STRERROR(x_errno),
- ("LSOCK#%u[%u]: [LSOCK::Create] "
- " Failed bind(%s)", x_id,
- (unsigned int) x_lsock, c));
+ CORE_LOGF_ERRNO_EXX(36, x_errno == SOCK_EADDRINUSE
+ ? eLOG_Trace : eLOG_Error,
+ x_errno, SOCK_STRERROR(x_errno),
+ ("LSOCK#%u[%u]: [LSOCK::Create] "
+ " Failed bind(%s)", x_id,
+ (unsigned int) x_lsock, c));
SOCK_CLOSE(x_lsock);
return x_errno == SOCK_EADDRINUSE ? eIO_Closed : eIO_Unknown;
}
@@ -2742,23 +2798,38 @@ static EIO_Status s_CreateListening(const char* path,
/* listen */
if (listen(x_lsock, backlog) != 0) {
int x_errno = SOCK_ERRNO;
- CORE_LOGF_ERRNO_EX(eLOG_Error, x_errno, SOCK_STRERROR(x_errno),
- ("LSOCK#%u[%u]: [LSOCK::Create] Failed "
- "listen(%hu) at %s", x_id, (unsigned int) x_lsock,
- backlog, s));
+ CORE_LOGF_ERRNO_EXX(37, eLOG_Error,
+ x_errno, SOCK_STRERROR(x_errno),
+ ("LSOCK#%u[%u]: [LSOCK::Create] Failed "
+ "listen(%hu) at %s", x_id, (unsigned int) x_lsock,
+ backlog, c));
SOCK_CLOSE(x_lsock);
return eIO_Unknown;
}
/* set to non-blocking mode */
if ( !s_SetNonblock(x_lsock, 1/*true*/) ) {
- CORE_LOGF(eLOG_Error, ("LSOCK#%u[%u]: [LSOCK::Create] "
- " Cannot set socket to non-blocking mode",
- x_id, (unsigned int) x_lsock));
+ int x_errno = SOCK_ERRNO;
+ CORE_LOGF_ERRNO_EXX(38, eLOG_Error,
+ x_errno, SOCK_STRERROR(x_errno),
+ ("LSOCK#%u[%u]: [LSOCK::Create] "
+ " Cannot set socket to non-blocking mode",
+ x_id, (unsigned int) x_lsock));
SOCK_CLOSE(x_lsock);
return eIO_Unknown;
}
+#ifdef NCBI_OS_UNIX
+ if ((flags & fLSCE_CloseOnExec) && !s_SetCloexec(x_lsock, 1/*true*/)) {
+ int x_errno = SOCK_ERRNO;
+ CORE_LOGF_ERRNO_EXX(110, eLOG_Warning,
+ x_errno, SOCK_STRERROR(x_errno),
+ ("LSOCK#%u[%u]: [LSOCK::Create] "
+ " Cannot set socket close-on-exec mode",
+ x_id, (unsigned int) x_lsock));
+ }
+#endif /*NCBI_OS_UNIX*/
+
/* allocate memory for the internal socket structure */
if (!(*lsock = (LSOCK)calloc(1, sizeof(**lsock) + (path?strlen(path):0)))){
return eIO_Unknown;
@@ -2827,8 +2898,9 @@ extern EIO_Status LSOCK_Accept(LSOCK lsock,
struct SOCK_tag temp;
if (lsock->sock == SOCK_INVALID) {
- CORE_LOGF(eLOG_Error, ("LSOCK#%u[?]: [LSOCK::Accept] "
- " Invalid socket", lsock->id));
+ CORE_LOGF_X(39, eLOG_Error,
+ ("LSOCK#%u[?]: [LSOCK::Accept] Invalid socket",
+ lsock->id));
assert(0);
return eIO_Unknown;
}
@@ -2865,18 +2937,22 @@ extern EIO_Status LSOCK_Accept(LSOCK lsock,
}
if ((x_sock = accept(lsock->sock, &addr.sa, &addrlen)) == SOCK_INVALID) {
int x_errno = SOCK_ERRNO;
- CORE_LOGF_ERRNO_EX(eLOG_Error, x_errno, SOCK_STRERROR(x_errno),
- ("LSOCK#%u[%u]: [LSOCK::Accept] "
- " Failed accept()", lsock->id,
- (unsigned int) lsock->sock));
+ CORE_LOGF_ERRNO_EXX(40, eLOG_Error,
+ x_errno, SOCK_STRERROR(x_errno),
+ ("LSOCK#%u[%u]: [LSOCK::Accept] "
+ " Failed accept()", lsock->id,
+ (unsigned int) lsock->sock));
return eIO_Unknown;
}
lsock->n_accept++;
/* man accept(2) notes that non-blocking state may not be inherited */
if ( !s_SetNonblock(x_sock, 1/*true*/) ) {
- CORE_LOGF(eLOG_Error, ("SOCK#%u[%u]: [LSOCK::Accept] Cannot"
- " set accepted socket to non-blocking mode",
- x_id, (unsigned int) x_sock));
+ int x_errno = SOCK_ERRNO;
+ CORE_LOGF_ERRNO_EXX(41, eLOG_Error,
+ x_errno, SOCK_STRERROR(x_errno),
+ ("SOCK#%u[%u]: [LSOCK::Accept] Cannot"
+ " set accepted socket to non-blocking mode",
+ x_id, (unsigned int) x_sock));
memset(&temp, 0, sizeof(temp));
temp.stype = eSOCK_ServerSideKeep;
temp.type = eSocket;
@@ -2891,10 +2967,11 @@ extern EIO_Status LSOCK_Accept(LSOCK lsock,
#endif /*NCBI_OS_UNIX*/
!s_SetReuseAddress(x_sock, 1/*true*/)) {
int x_errno = SOCK_ERRNO;
- CORE_LOGF_ERRNO_EX(eLOG_Warning, x_errno, SOCK_STRERROR(x_errno),
- ("SOCK#%u[%u]: [LSOCK::Accept] "
- " Failed setsockopt(REUSEADDR)",
- x_id, (unsigned int) x_sock));
+ CORE_LOGF_ERRNO_EXX(42, eLOG_Warning,
+ x_errno, SOCK_STRERROR(x_errno),
+ ("SOCK#%u[%u]: [LSOCK::Accept] "
+ " Failed setsockopt(REUSEADDR)",
+ x_id, (unsigned int) x_sock));
}
/* create new SOCK structure */
@@ -2949,32 +3026,38 @@ extern EIO_Status LSOCK_Accept(LSOCK lsock,
extern EIO_Status LSOCK_Close(LSOCK lsock)
{
EIO_Status status;
- const char* c;
char s[80];
if (lsock->sock == SOCK_INVALID) {
- CORE_LOGF(eLOG_Error, ("LSOCK#%u[?]: [LSOCK::Close] "
- " Invalid socket", lsock->id));
+ CORE_LOGF_X(43, eLOG_Error,
+ ("LSOCK#%u[?]: [LSOCK::Close] Invalid socket",
+ lsock->id));
assert(0);
return eIO_Unknown;
}
/* set the socket back to blocking mode */
if (s_Initialized && !s_SetNonblock(lsock->sock, 0/*false*/)) {
- CORE_LOGF(eLOG_Trace, ("LSOCK#%u[%u]: [LSOCK::Close] "
- " Cannot set socket back to blocking mode",
- lsock->id, (unsigned int) lsock->sock));
+ int x_errno = SOCK_ERRNO;
+ CORE_LOGF_ERRNO_EXX(44, eLOG_Trace,
+ x_errno, SOCK_STRERROR(x_errno),
+ ("LSOCK#%u[%u]: [LSOCK::Close] "
+ " Cannot set socket back to blocking mode",
+ lsock->id, (unsigned int) lsock->sock));
}
-#ifdef NCBI_OS_UNIX
- if ( lsock->path[0] )
- c = lsock->path;
- else
-#endif /*NCBI_OS_UNIX*/
- c = SOCK_HostPortToString(0, lsock->port, s, sizeof(s)) ? s : ":?";
-
/* statistics & logging */
if (lsock->log == eOn || (lsock->log == eDefault && s_Log == eOn)) {
+ const char* c;
+#ifdef NCBI_OS_UNIX
+ if ( lsock->path[0] )
+ c = lsock->path;
+ else
+#endif /*NCBI_OS_UNIX*/
+ {
+ SOCK_HostPortToString(0, lsock->port, s, sizeof(s));
+ c = s;
+ }
CORE_TRACEF(("LSOCK#%u[%u]: Closing at %s "
"(%u accept%s total)", lsock->id,
(unsigned int) lsock->sock, c,
@@ -2990,9 +3073,11 @@ extern EIO_Status LSOCK_Close(LSOCK lsock)
/* error */
if (SOCK_ERRNO != SOCK_EINTR) {
int x_errno = SOCK_ERRNO;
- CORE_LOGF_ERRNO_EX(eLOG_Error, x_errno, SOCK_STRERROR(x_errno),
- ("LSOCK#%u[%u]: [LSOCK::Close] Failed close()",
- lsock->id, (unsigned int) lsock->sock));
+ CORE_LOGF_ERRNO_EXX(45, eLOG_Error,
+ x_errno, SOCK_STRERROR(x_errno),
+ ("LSOCK#%u[%u]: [LSOCK::Close] "
+ " Failed close()", lsock->id,
+ (unsigned int) lsock->sock));
status = eIO_Unknown;
break;
}
@@ -3015,10 +3100,11 @@ extern EIO_Status LSOCK_GetOSHandle(LSOCK lsock,
size_t handle_size)
{
if (!handle || handle_size != sizeof(lsock->sock)) {
- CORE_LOGF(eLOG_Error, ("LSOCK#%u[%u]: [LSOCK::GetOSHandle] "
- " Invalid handle %s%lu", lsock->id,
- (unsigned int) lsock->sock, handle? "size ": "",
- handle ? (unsigned long) handle_size : 0));
+ CORE_LOGF_X(46, eLOG_Error,
+ ("LSOCK#%u[%u]: [LSOCK::GetOSHandle] "
+ " Invalid handle %s%lu", lsock->id,
+ (unsigned int) lsock->sock, handle? "size ": "",
+ handle ? (unsigned long) handle_size : 0));
assert(0);
return eIO_InvalidArg;
}
@@ -3111,10 +3197,11 @@ extern EIO_Status SOCK_CreateOnTopEx(const void* handle,
assert(!datalen || data);
if (!handle || handle_size != sizeof(xx_sock)) {
- CORE_LOGF(eLOG_Error, ("SOCK#%u[?]: [SOCK::CreateOnTopEx] "
- " Invalid handle %s%lu", x_id,
- handle ? "size " : "",
- handle ? (unsigned long) handle_size : 0));
+ CORE_LOGF_X(47, eLOG_Error,
+ ("SOCK#%u[?]: [SOCK::CreateOnTopEx] "
+ " Invalid handle %s%lu", x_id,
+ handle ? "size " : "",
+ handle ? (unsigned long) handle_size : 0));
assert(0);
return eIO_InvalidArg;
}
@@ -3162,9 +3249,10 @@ extern EIO_Status SOCK_CreateOnTopEx(const void* handle,
return eIO_Closed;
assert(peer.sa.sa_family == AF_UNIX);
if (!peer.un.sun_path[0]) {
- CORE_LOGF(eLOG_Error, ("SOCK#%u[%u]: [SOCK::CreateOnTopEx] "
- " Unbound UNIX socket",
- x_id, (unsigned int) xx_sock));
+ CORE_LOGF_X(48, eLOG_Error,
+ ("SOCK#%u[%u]: [SOCK::CreateOnTopEx] "
+ " Unbound UNIX socket",
+ x_id, (unsigned int) xx_sock));
assert(0);
return eIO_InvalidArg;
}
@@ -3177,9 +3265,9 @@ extern EIO_Status SOCK_CreateOnTopEx(const void* handle,
/* store initial data */
if (datalen && (!BUF_SetChunkSize(&w_buf, datalen) ||
!BUF_Write(&w_buf, data, datalen))) {
- CORE_LOGF_ERRNO(eLOG_Error, errno,
- ("SOCK#%u[%u]: [SOCK::CreateOnTopEx] Cannot store "
- "initial data", x_id, (unsigned int) xx_sock));
+ CORE_LOGF_ERRNO_X(49, eLOG_Error, errno,
+ ("SOCK#%u[%u]: [SOCK::CreateOnTopEx] Cannot store "
+ "initial data", x_id, (unsigned int) xx_sock));
BUF_Destroy(w_buf);
return eIO_Unknown;
}
@@ -3219,9 +3307,12 @@ extern EIO_Status SOCK_CreateOnTopEx(const void* handle,
/* set to non-blocking mode */
if ( !s_SetNonblock(xx_sock, 1/*true*/) ) {
+ int x_errno = SOCK_ERRNO;
char _id[32];
- CORE_LOGF(eLOG_Error, ("%s[SOCK::CreateOnTopEx] Cannot set socket "
- "to non-blocking mode", s_ID(x_sock, _id)));
+ CORE_LOGF_ERRNO_EXX(50, eLOG_Error,
+ x_errno, SOCK_STRERROR(x_errno),
+ ("%s[SOCK::CreateOnTopEx] Cannot set socket "
+ "to non-blocking mode", s_ID(x_sock, _id)));
x_sock->sock = SOCK_INVALID;
SOCK_Close(x_sock);
return eIO_Unknown;
@@ -3250,9 +3341,10 @@ static EIO_Status s_Reconnect(SOCK sock,
if (sock->stype & eSOCK_ServerSide) {
char _id[32];
if (!host || !*host || !port) {
- CORE_LOGF(eLOG_Error, ("%s[SOCK::Reconnect] Attempt to reconnect "
- "server-side socket as the client one to "
- "its peer address", s_ID(sock, _id)));
+ CORE_LOGF_X(51, eLOG_Error,
+ ("%s[SOCK::Reconnect] Attempt to reconnect "
+ "server-side socket as the client one to "
+ "its peer address", s_ID(sock, _id)));
return eIO_InvalidArg;
}
sock->stype = eSOCK_ClientSide;
@@ -3274,8 +3366,8 @@ extern EIO_Status SOCK_Reconnect(SOCK sock,
char _id[32];
if (sock->sock == eSOCK_Datagram) {
- CORE_LOGF(eLOG_Error, ("%s[SOCK::Reconnect] "
- " Datagram socket", s_ID(sock, _id)));
+ CORE_LOGF_X(52, eLOG_Error,
+ ("%s[SOCK::Reconnect] Datagram socket", s_ID(sock, _id)));
assert(0);
return eIO_InvalidArg;
}
@@ -3284,9 +3376,10 @@ extern EIO_Status SOCK_Reconnect(SOCK sock,
#ifdef NCBI_OS_UNIX
if (sock->path[0] && (host || port)) {
- CORE_LOGF(eLOG_Error, ("%s[SOCK::Reconnect] "
- " Cannot reconnect UNIX socket \"%s\" as INET",
- s_ID(sock, _id), sock->path));
+ CORE_LOGF_X(53, eLOG_Error,
+ ("%s[SOCK::Reconnect] "
+ " Cannot reconnect UNIX socket \"%s\" as INET",
+ s_ID(sock, _id), sock->path));
assert(0);
return eIO_InvalidArg;
}
@@ -3301,13 +3394,13 @@ extern EIO_Status SOCK_Shutdown(SOCK sock,
char _id[32];
if (sock->sock == SOCK_INVALID) {
- CORE_LOGF(eLOG_Error, ("%s[SOCK::Shutdown] "
- " Invalid socket", s_ID(sock, _id)));
+ CORE_LOGF_X(54, eLOG_Error,
+ ("%s[SOCK::Shutdown] Invalid socket", s_ID(sock, _id)));
return eIO_Closed;
}
if (sock->stype == eSOCK_Datagram) {
- CORE_LOGF(eLOG_Error, ("%s[SOCK::Shutdown] "
- " Datagram socket", s_ID(sock, _id)));
+ CORE_LOGF_X(55, eLOG_Error,
+ ("%s[SOCK::Shutdown] Datagram socket", s_ID(sock, _id)));
assert(0);
return eIO_InvalidArg;
}
@@ -3322,8 +3415,10 @@ extern EIO_Status SOCK_CloseEx(SOCK sock, int/*bool*/ destroy)
if (!s_Initialized) {
sock->sock = SOCK_INVALID;
status = eIO_Success;
+ } else if (sock->sock == SOCK_INVALID) {
+ status = eIO_Closed;
} else
- status = sock->sock == SOCK_INVALID ? eIO_Success : s_Close(sock, 0);
+ status = s_Close(sock, 0/*orderly*/);
if (destroy) {
BUF_Destroy(sock->r_buf);
@@ -3347,22 +3442,35 @@ extern EIO_Status SOCK_Wait(SOCK sock,
char _id[32];
if (sock->sock == SOCK_INVALID) {
- CORE_LOGF(eLOG_Error, ("%s[SOCK::Wait] "
- " Invalid socket", s_ID(sock, _id)));
+ CORE_LOGF_X(56, eLOG_Error,
+ ("%s[SOCK::Wait] Invalid socket", s_ID(sock, _id)));
return eIO_Closed;
}
/* check against already shutdown socket there */
switch ( event ) {
+ case eIO_Open:
+ if (sock->stype == eSOCK_Datagram)
+ return eIO_Success/*always connected*/;
+ if (sock->pending) {
+ struct timeval tv;
+ int x_errno/*unused*/;
+ return s_IsConnected(sock, s_to2tv(timeout, &tv), &x_errno, 0);
+ }
+ if (sock->r_status == eIO_Success && sock->w_status == eIO_Success)
+ return eIO_Success;
+ if (sock->r_status == eIO_Closed && sock->w_status == eIO_Closed)
+ return eIO_Closed;
+ return eIO_Unknown;
case eIO_Read:
if (BUF_Size(sock->r_buf) != 0)
return eIO_Success;
if (sock->stype == eSOCK_Datagram)
return eIO_Closed;
if (sock->r_status == eIO_Closed) {
- CORE_LOGF(eLOG_Warning, ("%s[SOCK::Wait(R)] Socket has already "
- "been %s", s_ID(sock, _id),
- sock->eof ? "closed" : "shut down"));
+ CORE_LOGF_X(57, eLOG_Warning,
+ ("%s[SOCK::Wait(R)] Socket has already been %s",
+ s_ID(sock, _id), sock->eof ? "closed" : "shut down"));
return eIO_Closed;
}
if ( sock->eof )
@@ -3372,8 +3480,9 @@ extern EIO_Status SOCK_Wait(SOCK sock,
if (sock->stype == eSOCK_Datagram)
return eIO_Success;
if (sock->w_status == eIO_Closed) {
- CORE_LOGF(eLOG_Warning, ("%s[SOCK::Wait(W)] Socket has already "
- "been shut down", s_ID(sock, _id)));
+ CORE_LOGF_X(58, eLOG_Warning,
+ ("%s[SOCK::Wait(W)] Socket has already "
+ "been shut down", s_ID(sock, _id)));
return eIO_Closed;
}
break;
@@ -3383,31 +3492,34 @@ extern EIO_Status SOCK_Wait(SOCK sock,
if ((sock->r_status == eIO_Closed || sock->eof) &&
(sock->w_status == eIO_Closed)) {
if (sock->r_status == eIO_Closed) {
- CORE_LOGF(eLOG_Warning, ("%s[SOCK::Wait(RW)] Socket has "
- "already been shut down",
- s_ID(sock, _id)));
+ CORE_LOGF_X(59, eLOG_Warning,
+ ("%s[SOCK::Wait(RW)] Socket has "
+ "already been shut down", s_ID(sock, _id)));
}
return eIO_Closed;
}
if (sock->r_status == eIO_Closed || sock->eof) {
if (sock->r_status == eIO_Closed) {
- CORE_LOGF(eLOG_Note, ("%s[SOCK::Wait(RW)] Socket has already "
- "been %s", s_ID(sock, _id), sock->eof
- ? "closed" : "shut down for reading"));
+ CORE_LOGF_X(60, eLOG_Note,
+ ("%s[SOCK::Wait(RW)] Socket has already "
+ "been %s", s_ID(sock, _id), sock->eof
+ ? "closed" : "shut down for reading"));
}
event = eIO_Write;
break;
}
if (sock->w_status == eIO_Closed) {
- CORE_LOGF(eLOG_Note,("%s[SOCK::Wait(RW)] Socket has already been "
- "shut down for writing", s_ID(sock, _id)));
+ CORE_LOGF_X(61, eLOG_Note,
+ ("%s[SOCK::Wait(RW)] Socket has already been "
+ "shut down for writing", s_ID(sock, _id)));
event = eIO_Read;
break;
}
break;
default:
- CORE_LOGF(eLOG_Error, ("%s[SOCK::Wait] Invalid event %u",
- s_ID(sock, _id), (unsigned int) event));
+ CORE_LOGF_X(62, eLOG_Error,
+ ("%s[SOCK::Wait] Invalid event %u",
+ s_ID(sock, _id), (unsigned int) event));
return eIO_InvalidArg;
}
@@ -3556,8 +3668,9 @@ extern EIO_Status SOCK_SetTimeout(SOCK sock,
sock->c_timeout = s_to2tv(timeout, &sock->c_tv);
break;
default:
- CORE_LOGF(eLOG_Error, ("%s[SOCK::SetTimeout] Invalid event %u",
- s_ID(sock, _id), (unsigned int) event));
+ CORE_LOGF_X(63, eLOG_Error,
+ ("%s[SOCK::SetTimeout] Invalid event %u",
+ s_ID(sock, _id), (unsigned int) event));
assert(0);
return eIO_InvalidArg;
}
@@ -3593,8 +3706,9 @@ extern const STimeout* SOCK_GetTimeout(SOCK sock,
case eIO_Close:
return s_tv2to(sock->c_timeout, &sock->c_to);
default:
- CORE_LOGF(eLOG_Error, ("%s[SOCK::GetTimeout] Invalid event %u",
- s_ID(sock, _id), (unsigned int) event));
+ CORE_LOGF_X(64, eLOG_Error,
+ ("%s[SOCK::GetTimeout] Invalid event %u",
+ s_ID(sock, _id), (unsigned int) event));
assert(0);
}
return 0;
@@ -3633,16 +3747,17 @@ extern EIO_Status SOCK_Read(SOCK sock,
break;
default:
- CORE_LOGF(eLOG_Error, ("%s[SOCK::Read] Invalid read method %u",
- s_ID(sock, _id), (unsigned int) how));
+ CORE_LOGF_X(65, eLOG_Error,
+ ("%s[SOCK::Read] Invalid read method %u",
+ s_ID(sock, _id), (unsigned int) how));
assert(0);
x_read = 0;
status = eIO_InvalidArg;
break;
}
} else {
- CORE_LOGF(eLOG_Error, ("%s[SOCK::Read] "
- " Invalid socket", s_ID(sock, _id)));
+ CORE_LOGF_X(66, eLOG_Error,
+ ("%s[SOCK::Read] Invalid socket", s_ID(sock, _id)));
x_read = 0;
status = eIO_Closed;
}
@@ -3731,8 +3846,8 @@ extern EIO_Status SOCK_PushBack(SOCK sock,
{
if (sock->sock == SOCK_INVALID) {
char _id[32];
- CORE_LOGF(eLOG_Error, ("%s[SOCK::PushBack] "
- " Invalid socket", s_ID(sock, _id)));
+ CORE_LOGF_X(67, eLOG_Error,
+ ("%s[SOCK::PushBack] Invalid socket", s_ID(sock, _id)));
return eIO_Closed;
}
@@ -3754,9 +3869,10 @@ extern EIO_Status SOCK_Write(SOCK sock,
switch ( how ) {
case eIO_WriteOutOfBand:
if (sock->stype == eSOCK_Datagram) {
- CORE_LOGF(eLOG_Error, ("%s[SOCK::Write] "
- " OOB not supported for datagrams",
- s_ID(sock, _id)));
+ CORE_LOGF_X(68, eLOG_Error,
+ ("%s[SOCK::Write] "
+ " OOB not supported for datagrams",
+ s_ID(sock, _id)));
status = eIO_NotSupported;
x_written = 0;
break;
@@ -3780,16 +3896,17 @@ extern EIO_Status SOCK_Write(SOCK sock,
break;
default:
- CORE_LOGF(eLOG_Error, ("%s[SOCK::Write] Invalid write method %u",
- s_ID(sock, _id), (unsigned int) how));
+ CORE_LOGF_X(69, eLOG_Error,
+ ("%s[SOCK::Write] Invalid write method %u",
+ s_ID(sock, _id), (unsigned int) how));
assert(0);
x_written = 0;
status = eIO_InvalidArg;
break;
}
} else {
- CORE_LOGF(eLOG_Error, ("%s[SOCK::Write] "
- " Invalid socket", s_ID(sock, _id)));
+ CORE_LOGF_X(70, eLOG_Error,
+ ("%s[SOCK::Write] Invalid socket", s_ID(sock, _id)));
x_written = 0;
status = eIO_Closed;
}
@@ -3805,13 +3922,13 @@ extern EIO_Status SOCK_Abort(SOCK sock)
char _id[32];
if (sock->sock == SOCK_INVALID) {
- CORE_LOGF(eLOG_Warning, ("%s[SOCK::Abort] "
- " Invalid socket", s_ID(sock, _id)));
+ CORE_LOGF_X(71, eLOG_Warning,
+ ("%s[SOCK::Abort] Invalid socket", s_ID(sock, _id)));
return eIO_Closed;
}
if (sock->stype == eSOCK_Datagram) {
- CORE_LOGF(eLOG_Error, ("%s[SOCK::Abort] "
- " Datagram socket", s_ID(sock, _id)));
+ CORE_LOGF_X(72, eLOG_Error,
+ ("%s[SOCK::Abort] Datagram socket", s_ID(sock, _id)));
assert(0);
return eIO_InvalidArg;
}
@@ -3826,14 +3943,44 @@ extern EIO_Status SOCK_Abort(SOCK sock)
extern EIO_Status SOCK_Status(SOCK sock,
EIO_Event direction)
{
- if (direction != eIO_Read && direction != eIO_Write) {
+ switch (direction) {
+ case eIO_Open:
+ case eIO_Read:
+ case eIO_Write:
+ if (sock->sock == SOCK_INVALID)
+ return eIO_Closed;
+ if (sock->pending)
+ return eIO_Timeout;
if (direction == eIO_Open)
- return sock->sock == SOCK_INVALID ? eIO_Closed : eIO_Success;
+ return eIO_Success;
+ break;
+ default:
return eIO_InvalidArg;
}
+ return s_Status(sock, direction);
+}
+
- return (sock->sock == SOCK_INVALID ? eIO_Closed :
- sock->pending ? eIO_Timeout : s_Status(sock, direction));
+extern unsigned short SOCK_GetLocalPort(SOCK sock,
+ ENH_ByteOrder byte_order)
+{
+ if (sock->sock == SOCK_INVALID)
+ return 0;
+
+ if (!sock->myport) {
+ struct sockaddr_in addr;
+ SOCK_socklen_t addrlen = sizeof(addr);
+ memset(&addr, 0, addrlen);
+# ifdef HAVE_SIN_LEN
+ addr.sin_len = addrlen;
+# endif /*HAVE_SIN_LEN*/
+ if (getsockname(sock->sock,
+ (struct sockaddr*) &addr, &addrlen) == 0) {
+ assert(addr.sin_family == AF_INET);
+ sock->myport = ntohs(addr.sin_port);
+ }
+ }
+ return byte_order != eNH_HostByteOrder? htons(sock->myport) : sock->myport;
}
@@ -3875,9 +4022,10 @@ extern EIO_Status SOCK_GetOSHandle(SOCK sock,
{
if (!handle || handle_size != sizeof(sock->sock)) {
char _id[32];
- CORE_LOGF(eLOG_Error,("%s[SOCK::GetOSHandle] Invalid handle %s%lu",
- s_ID(sock, _id), handle ? "size " : "",
- handle ? (unsigned long) handle_size : 0));
+ CORE_LOGF_X(73, eLOG_Error,
+ ("%s[SOCK::GetOSHandle] Invalid handle %s%lu",
+ s_ID(sock, _id), handle ? "size " : "",
+ handle ? (unsigned long) handle_size : 0));
assert(0);
return eIO_InvalidArg;
}
@@ -3939,10 +4087,11 @@ extern void SOCK_SetReuseAddress(SOCK sock, int/*bool*/ on_off)
if (sock->sock != SOCK_INVALID && !s_SetReuseAddress(sock->sock, on_off)) {
int x_errno = SOCK_ERRNO;
char _id[32];
- CORE_LOGF_ERRNO_EX(eLOG_Warning, x_errno, SOCK_STRERROR(x_errno),
- ("%s[SOCK::SetReuseAddress] "
- " Failed setsockopt(%sREUSEADDR)",
- s_ID(sock, _id), on_off ? "" : "NO"));
+ CORE_LOGF_ERRNO_EXX(74, eLOG_Warning,
+ x_errno, SOCK_STRERROR(x_errno),
+ ("%s[SOCK::SetReuseAddress] "
+ " Failed setsockopt(%sREUSEADDR)",
+ s_ID(sock, _id), on_off ? "" : "NO"));
}
}
@@ -3956,10 +4105,11 @@ extern void SOCK_DisableOSSendDelay(SOCK sock, int/*bool*/ on_off)
(void*)&n, sizeof(n)) != 0) {
int x_errno = SOCK_ERRNO;
char _id[32];
- CORE_LOGF_ERRNO_EX(eLOG_Warning, x_errno, SOCK_STRERROR(x_errno),
- ("%s[SOCK::DisableOSSendDelay] "
- " Failed setsockopt(%sTCP_NODELAY)",
- s_ID(sock, _id), on_off ? "" : "!"));
+ CORE_LOGF_ERRNO_EXX(75, eLOG_Warning,
+ x_errno, SOCK_STRERROR(x_errno),
+ ("%s[SOCK::DisableOSSendDelay] "
+ " Failed setsockopt(%sTCP_NODELAY)",
+ s_ID(sock, _id), on_off ? "" : "!"));
}
}
#endif /*TCP_NODELAY*/
@@ -3984,16 +4134,20 @@ extern EIO_Status DSOCK_CreateEx(SOCK* sock, ESwitch log)
/* create new datagram socket */
if ((x_sock = socket(AF_INET, SOCK_DGRAM, 0)) == SOCK_INVALID) {
int x_errno = SOCK_ERRNO;
- CORE_LOGF_ERRNO_EX(eLOG_Error, x_errno, SOCK_STRERROR(x_errno),
- ("SOCK#%u[?]: [DSOCK::Create] "
- " Cannot create socket", x_id));
+ CORE_LOGF_ERRNO_EXX(76, eLOG_Error,
+ x_errno, SOCK_STRERROR(x_errno),
+ ("SOCK#%u[?]: [DSOCK::Create] "
+ " Cannot create socket", x_id));
return eIO_Unknown;
}
/* set to non-blocking mode */
if ( !s_SetNonblock(x_sock, 1/*true*/) ) {
- CORE_LOGF(eLOG_Error, ("SOCK#%u[%u]: [DSOCK::Create] Cannot set "
- "socket to non-blocking mode", x_id, x_sock));
+ int x_errno = SOCK_ERRNO;
+ CORE_LOGF_ERRNO_EXX(77, eLOG_Error,
+ x_errno, SOCK_STRERROR(x_errno),
+ ("SOCK#%u[%u]: [DSOCK::Create] Cannot set "
+ "socket to non-blocking mode", x_id, x_sock));
SOCK_CLOSE(x_sock);
return eIO_Unknown;
}
@@ -4033,14 +4187,15 @@ extern EIO_Status DSOCK_Bind(SOCK sock, unsigned short port)
char _id[32];
if (sock->stype != eSOCK_Datagram) {
- CORE_LOGF(eLOG_Error, ("%s[DSOCK::Bind] "
- " Not a datagram socket", s_ID(sock, _id)));
+ CORE_LOGF_X(78, eLOG_Error,
+ ("%s[DSOCK::Bind] "
+ " Not a datagram socket", s_ID(sock, _id)));
assert(0);
return eIO_InvalidArg;
}
if (sock->sock == SOCK_INVALID) {
- CORE_LOGF(eLOG_Error, ("%s[DSOCK::Bind] "
- " Invalid socket", s_ID(sock, _id)));
+ CORE_LOGF_X(79, eLOG_Error,
+ ("%s[DSOCK::Bind] Invalid socket", s_ID(sock, _id)));
return eIO_Closed;
}
@@ -4054,7 +4209,8 @@ extern EIO_Status DSOCK_Bind(SOCK sock, unsigned short port)
#endif /*HAVE_SIN_LEN*/
if (bind(sock->sock, (struct sockaddr*) &addr, sizeof(addr)) != 0) {
int x_errno = SOCK_ERRNO;
- CORE_LOGF_ERRNO_EX(eLOG_Error, x_errno, SOCK_STRERROR(x_errno),
+ CORE_LOGF_ERRNO_EXX(80, eLOG_Error,
+ x_errno, SOCK_STRERROR(x_errno),
("%s[DSOCK::Bind] Failed bind()", s_ID(sock,_id)));
return x_errno == SOCK_EADDRINUSE ? eIO_Closed : eIO_Unknown;
}
@@ -4073,14 +4229,15 @@ extern EIO_Status DSOCK_Connect(SOCK sock,
char _id[32];
if (sock->stype != eSOCK_Datagram) {
- CORE_LOGF(eLOG_Error, ("%s[DSOCK::Connect] "
- " Not a datagram socket", s_ID(sock, _id)));
+ CORE_LOGF_X(81, eLOG_Error,
+ ("%s[DSOCK::Connect] "
+ " Not a datagram socket", s_ID(sock, _id)));
assert(0);
return eIO_InvalidArg;
}
if (sock->sock == SOCK_INVALID) {
- CORE_LOGF(eLOG_Error, ("%s[DSOCK::Connect] "
- " Invalid socket", s_ID(sock, _id)));
+ CORE_LOGF_X(82, eLOG_Error,
+ ("%s[DSOCK::Connect] Invalid socket", s_ID(sock, _id)));
return eIO_Closed;
}
@@ -4094,15 +4251,17 @@ extern EIO_Status DSOCK_Connect(SOCK sock,
sock->port = htons(port);
if (host && *host) {
if ((sock->host = SOCK_gethostbyname(host)) == 0) {
- CORE_LOGF(eLOG_Error, ("%s[DSOCK::Connect] Failed "
- "SOCK_gethostbyname(\"%.64s\")",
- s_ID(sock, _id), host));
+ CORE_LOGF_X(83, eLOG_Error,
+ ("%s[DSOCK::Connect] Failed "
+ "SOCK_gethostbyname(\"%.64s\")",
+ s_ID(sock, _id), host));
return eIO_Unknown;
}
}
- if (!sock->host || !sock->port) {
- CORE_LOGF(eLOG_Error, ("%s[DSOCK::Connect] "
- " Address incomplete", s_ID(sock, _id)));
+ if (!sock->host || !sock->port) {
+ CORE_LOGF_X(84, eLOG_Error,
+ ("%s[DSOCK::Connect] "
+ " Address incomplete", s_ID(sock, _id)));
return eIO_InvalidArg;
}
@@ -4118,9 +4277,10 @@ extern EIO_Status DSOCK_Connect(SOCK sock,
char addr[80];
int x_errno = SOCK_ERRNO;
SOCK_HostPortToString(sock->host, ntohs(sock->port),addr,sizeof(addr));
- CORE_LOGF_ERRNO_EX(eLOG_Error, x_errno, SOCK_STRERROR(x_errno),
- ("%s[DSOCK::Connect] Failed connect() to %s",
- s_ID(sock, _id), addr));
+ CORE_LOGF_ERRNO_EXX(85, eLOG_Error,
+ x_errno, SOCK_STRERROR(x_errno),
+ ("%s[DSOCK::Connect] Failed connect() to %s",
+ s_ID(sock, _id), addr));
return eIO_Unknown;
}
@@ -4146,14 +4306,15 @@ extern EIO_Status DSOCK_SendMsg(SOCK sock,
struct sockaddr_in addr;
if (sock->stype != eSOCK_Datagram) {
- CORE_LOGF(eLOG_Error, ("%s[DSOCK::SendMsg] "
- " Not a datagram socket", s_ID(sock, w)));
+ CORE_LOGF_X(86, eLOG_Error,
+ ("%s[DSOCK::SendMsg] "
+ " Not a datagram socket", s_ID(sock, w)));
assert(0);
return eIO_InvalidArg;
}
if (sock->sock == SOCK_INVALID) {
- CORE_LOGF(eLOG_Error, ("%s[DSOCK::SendMsg] "
- " Invalid socket", s_ID(sock, w)));
+ CORE_LOGF_X(87, eLOG_Error,
+ ("%s[DSOCK::SendMsg] Invalid socket", s_ID(sock, w)));
return eIO_Closed;
}
@@ -4166,17 +4327,19 @@ extern EIO_Status DSOCK_SendMsg(SOCK sock,
x_port = port ? htons(port) : sock->port;
if (host && *host) {
if ( !(x_host = SOCK_gethostbyname(host)) ) {
- CORE_LOGF(eLOG_Error, ("%s[DSOCK::SendMsg] Failed "
- "SOCK_gethostbyname(\"%.64s\")",
- s_ID(sock, w), host));
+ CORE_LOGF_X(88, eLOG_Error,
+ ("%s[DSOCK::SendMsg] Failed "
+ "SOCK_gethostbyname(\"%.64s\")",
+ s_ID(sock, w), host));
return eIO_Unknown;
}
} else
x_host = sock->host;
if (!x_host || !x_port) {
- CORE_LOGF(eLOG_Error, ("%s[DSOCK::SendMsg] "
- " Address incomplete", s_ID(sock, w)));
+ CORE_LOGF_X(89, eLOG_Error,
+ ("%s[DSOCK::SendMsg] "
+ " Address incomplete", s_ID(sock, w)));
return eIO_Unknown;
}
@@ -4211,8 +4374,9 @@ extern EIO_Status DSOCK_SendMsg(SOCK sock,
sock->n_out++;
if ((size_t) x_written != x_msgsize) {
sock->w_status = status = eIO_Closed;
- CORE_LOGF(eLOG_Error, ("%s[DSOCK::SendMsg] "
- " Partial datagram sent",s_ID(sock,w)));
+ CORE_LOGF_X(90, eLOG_Error,
+ ("%s[DSOCK::SendMsg] "
+ " Partial datagram sent",s_ID(sock,w)));
break;
}
sock->w_status = status = eIO_Success;
@@ -4242,9 +4406,10 @@ extern EIO_Status DSOCK_SendMsg(SOCK sock,
}
if (x_errno != SOCK_EINTR) {
- CORE_LOGF_ERRNO_EX(eLOG_Trace, x_errno, SOCK_STRERROR(x_errno),
- ("%s[DSOCK::SendMsg] "
- " Failed sendto()", s_ID(sock, w)));
+ CORE_LOGF_ERRNO_EXX(91, eLOG_Trace,
+ x_errno, SOCK_STRERROR(x_errno),
+ ("%s[DSOCK::SendMsg] "
+ " Failed sendto()", s_ID(sock, w)));
break;
}
@@ -4277,14 +4442,15 @@ extern EIO_Status DSOCK_RecvMsg(SOCK sock,
void* x_msg;
if (sock->stype != eSOCK_Datagram) {
- CORE_LOGF(eLOG_Error, ("%s[DSOCK::RecvMsg] "
- " Not a datagram socket", s_ID(sock, w)));
+ CORE_LOGF_X(92, eLOG_Error,
+ ("%s[DSOCK::RecvMsg] "
+ " Not a datagram socket", s_ID(sock, w)));
assert(0);
return eIO_InvalidArg;
}
if (sock->sock == SOCK_INVALID) {
- CORE_LOGF(eLOG_Error, ("%s[DSOCK::RecvMsg] "
- " Invalid socket", s_ID(sock, w)));
+ CORE_LOGF_X(93, eLOG_Error,
+ ("%s[DSOCK::RecvMsg] Invalid socket", s_ID(sock, w)));
return eIO_Closed;
}
@@ -4350,9 +4516,10 @@ extern EIO_Status DSOCK_RecvMsg(SOCK sock,
x_errno != SOCK_EAGAIN &&
x_errno != SOCK_EINTR) {
/* catch unknown ERROR */
- CORE_LOGF_ERRNO_EX(eLOG_Trace, x_errno, SOCK_STRERROR(x_errno),
- ("%s[DSOCK::RecvMsg] "
- " Failed recvfrom()", s_ID(sock, w)));
+ CORE_LOGF_ERRNO_EXX(94, eLOG_Trace,
+ x_errno, SOCK_STRERROR(x_errno),
+ ("%s[DSOCK::RecvMsg] "
+ " Failed recvfrom()", s_ID(sock, w)));
break;
}
@@ -4395,14 +4562,15 @@ extern EIO_Status DSOCK_WaitMsg(SOCK sock, const STimeout* timeout)
struct timeval tv;
if (sock->stype != eSOCK_Datagram) {
- CORE_LOGF(eLOG_Error, ("%s[DSOCK::WaitMsg] "
- " Not a datagram socket", s_ID(sock, _id)));
+ CORE_LOGF_X(95, eLOG_Error,
+ ("%s[DSOCK::WaitMsg] "
+ " Not a datagram socket", s_ID(sock, _id)));
assert(0);
return eIO_InvalidArg;
}
if (sock->sock == SOCK_INVALID) {
- CORE_LOGF(eLOG_Error, ("%s[DSOCK::WaitMsg] "
- " Invalid socket", s_ID(sock, _id)));
+ CORE_LOGF_X(96, eLOG_Error,
+ ("%s[DSOCK::WaitMsg] Invalid socket", s_ID(sock, _id)));
return eIO_Closed;
}
@@ -4424,14 +4592,15 @@ extern EIO_Status DSOCK_WipeMsg(SOCK sock, EIO_Event direction)
EIO_Status status;
if (sock->stype != eSOCK_Datagram) {
- CORE_LOGF(eLOG_Error, ("%s[DSOCK::WipeMsg] "
- " Not a datagram socket", s_ID(sock, _id)));
+ CORE_LOGF_X(97, eLOG_Error,
+ ("%s[DSOCK::WipeMsg] "
+ " Not a datagram socket", s_ID(sock, _id)));
assert(0);
return eIO_InvalidArg;
}
if (sock->sock == SOCK_INVALID) {
- CORE_LOGF(eLOG_Error, ("%s[DSOCK::WipeMsg] "
- " Invalid socket", s_ID(sock, _id)));
+ CORE_LOGF_X(98, eLOG_Error,
+ ("%s[DSOCK::WipeMsg] Invalid socket", s_ID(sock, _id)));
return eIO_Closed;
}
@@ -4443,8 +4612,9 @@ extern EIO_Status DSOCK_WipeMsg(SOCK sock, EIO_Event direction)
sock->w_status = status = s_WipeWBuf(sock);
break;
default:
- CORE_LOGF(eLOG_Error, ("%s[DSOCK::WipeMsg] Invalid direction %u",
- s_ID(sock, _id), (unsigned int) direction));
+ CORE_LOGF_X(99, eLOG_Error,
+ ("%s[DSOCK::WipeMsg] Invalid direction %u",
+ s_ID(sock, _id), (unsigned int) direction));
assert(0);
status = eIO_InvalidArg;
break;
@@ -4459,14 +4629,16 @@ extern EIO_Status DSOCK_SetBroadcast(SOCK sock, int/*bool*/ broadcast)
char _id[32];
if (sock->stype != eSOCK_Datagram) {
- CORE_LOGF(eLOG_Error, ("%s[DSOCK::SetBroadcast] "
- " Not a datagram socket", s_ID(sock, _id)));
+ CORE_LOGF_X(100, eLOG_Error,
+ ("%s[DSOCK::SetBroadcast] "
+ " Not a datagram socket", s_ID(sock, _id)));
assert(0);
return eIO_InvalidArg;
}
if (sock->sock == SOCK_INVALID) {
- CORE_LOGF(eLOG_Error, ("%s[DSOCK::SetBroadcast] "
- " Invalid socket", s_ID(sock, _id)));
+ CORE_LOGF_X(101, eLOG_Error,
+ ("%s[DSOCK::SetBroadcast] Invalid socket",
+ s_ID(sock, _id)));
return eIO_Closed;
}
@@ -4481,10 +4653,11 @@ extern EIO_Status DSOCK_SetBroadcast(SOCK sock, int/*bool*/ broadcast)
if (setsockopt(sock->sock, SOL_SOCKET, SO_BROADCAST,
(const char*) &bcast, sizeof(bcast)) != 0) {
int x_errno = SOCK_ERRNO;
- CORE_LOGF_ERRNO_EX(eLOG_Error, x_errno, SOCK_STRERROR(x_errno),
- ("%s[DSOCK::SetBroadcast] "
- " Failed setsockopt(%sBROADCAST)",
- s_ID(sock, _id), bcast ? "" : "NO"));
+ CORE_LOGF_ERRNO_EXX(102, eLOG_Error,
+ x_errno, SOCK_STRERROR(x_errno),
+ ("%s[DSOCK::SetBroadcast] "
+ " Failed setsockopt(%sBROADCAST)",
+ s_ID(sock, _id), bcast ? "" : "NO"));
return eIO_Unknown;
}
}}
@@ -4535,11 +4708,13 @@ extern int SOCK_gethostname(char* name,
name[0] = name[namelen - 1] = '\0';
if (gethostname(name, (int) namelen) != 0) {
int x_errno = SOCK_ERRNO;
- CORE_LOG_ERRNO_EX(eLOG_Error, x_errno, SOCK_STRERROR(x_errno),
- "[SOCK_gethostname] Failed gethostname()");
+ CORE_LOG_ERRNO_EXX(103, eLOG_Error,
+ x_errno, SOCK_STRERROR(x_errno),
+ "[SOCK_gethostname] Failed gethostname()");
error = 1;
} else if ( name[namelen - 1] ) {
- CORE_LOG(eLOG_Error, "[SOCK_gethostname] Buffer too small");
+ CORE_LOG_X(104, eLOG_Error,
+ "[SOCK_gethostname] Buffer too small");
error = 1;
}
@@ -4557,54 +4732,54 @@ extern int SOCK_ntoa(unsigned int host,
{
const unsigned char* b = (const unsigned char*) &host;
char str[16/*sizeof("255.255.255.255")*/];
+ int len;
- assert(buf && buflen > 0);
- verify(sprintf(str, "%u.%u.%u.%u", b[0], b[1], b[2], b[3]) > 0);
- assert(strlen(str) < sizeof(str));
+ assert(buf && buflen > 0);
+ verify((len = sprintf(str, "%u.%u.%u.%u", b[0], b[1], b[2], b[3])) > 0);
+ assert((size_t) len < sizeof(str));
- if (strlen(str) >= buflen) {
- buf[0] = '\0';
- return -1/*failed*/;
+ if ((size_t) len < buflen) {
+ memcpy(buf, str, len + 1);
+ return 0/*success*/;
}
- strcpy(buf, str);
- return 0/*success*/;
+ buf[0] = '\0';
+ return -1/*failed*/;
}
extern int/*bool*/ SOCK_isip(const char* host)
{
- return SOCK_isipEx(host, strlen(host));
+ return SOCK_isipEx(host, 0/*nofullquad*/);
}
-extern int/*bool*/ SOCK_isipEx(const char* host, size_t len)
+extern int/*bool*/ SOCK_isipEx(const char* host, int/*bool*/ fullquad)
{
- const char* dot = 0;
+ const char* c = host;
+ unsigned long val;
int dots = 0;
- size_t i;
-
- if (len > 15)
- return 0/*longer than the longest 255.255.255.255*/;
- for (i = 0; i < len; i++) {
- if (host[i] == '.') {
- size_t n;
- char* e;
- long v;
- if (i == 0 || ++dots > 3)
- return 0/*false*/;
- n = (size_t)(&host[i] - (dot ? dot : host - 1));
- if (n <= 1 || n > 4)
- return 0/*false*/;
- errno = 0;
- v = strtol(dot ? dot + 1 : host, &e, 0);
- if (errno || e != &host[i] || v < 0 || v > 255)
- return 0/*false*/;
- dot = &host[i];
- } else if (!isdigit((unsigned char) host[i]))
+
+ for (;;) {
+ char* e;
+ if (!isdigit((unsigned char)(*c)))
+ return 0/*false*/;
+ errno = 0;
+ val = strtoul(c, &e, fullquad ? 10 : 0);
+ if (c == e || errno)
+ return 0/*false*/;
+ c = e;
+ if (*c != '.')
+ break;
+ if (++dots > 3)
+ return 0/*false*/;
+ if (val > 255)
return 0/*false*/;
+ c++;
}
- return !(dots < 3);
+
+ return !*c &&
+ (!fullquad || dots == 3) && val <= (0xFFFFFFFFUL >> (dots << 3));
}
@@ -4663,9 +4838,10 @@ extern unsigned int SOCK_gethostbyname(const char* hostname)
x_errno = SOCK_ERRNO;
else
x_errno += EAI_BASE;
- CORE_LOGF_ERRNO_EX(eLOG_Warning,x_errno,SOCK_STRERROR(x_errno),
- ("[SOCK_gethostbyname] Failed "
- "getaddrinfo(\"%.64s\")", hostname));
+ CORE_LOGF_ERRNO_EXX(105, eLOG_Warning,
+ x_errno, SOCK_STRERROR(x_errno),
+ ("[SOCK_gethostbyname] Failed "
+ "getaddrinfo(\"%.64s\")", hostname));
}
host = 0;
}
@@ -4720,9 +4896,11 @@ extern unsigned int SOCK_gethostbyname(const char* hostname)
if (x_errno == NETDB_INTERNAL + DNS_BASE)
x_errno = SOCK_ERRNO;
# endif /*NETDB_INTERNAL*/
- CORE_LOGF_ERRNO_EX(eLOG_Warning, x_errno, SOCK_STRERROR(x_errno),
- ("[SOCK_gethostbyname] Failed "
- "gethostbyname%s(\"%.64s\")",suffix,hostname));
+ CORE_LOGF_ERRNO_EXX(106, eLOG_Warning,
+ x_errno, SOCK_STRERROR(x_errno),
+ ("[SOCK_gethostbyname] Failed "
+ "gethostbyname%s(\"%.64s\")",
+ suffix, hostname));
}
#endif /*HAVE_GETADDR_INFO*/
@@ -4756,22 +4934,29 @@ extern char* SOCK_gethostbyaddr(unsigned int host,
addr.sin_len = sizeof(addr);
# endif /*HAVE_SIN_LEN*/
if ((x_errno = getnameinfo((struct sockaddr*) &addr, sizeof(addr),
- name, namelen, 0, 0, 0)) != 0) {
+ name, namelen, 0, 0, 0)) != 0 || !*name) {
if (SOCK_ntoa(host, name, namelen) != 0) {
+ if (!x_errno) {
+#ifdef ENOSPC
+ x_errno = ENOSPC;
+#else
+ x_errno = ERANGE;
+#endif /*ENOSPC*/
+ }
name[0] = '\0';
name = 0;
}
if (!name && s_Log == eOn) {
char addr[16];
- if (SOCK_ntoa(host, addr, sizeof(addr)) != 0)
- strcpy(addr, "<unknown>");
+ SOCK_ntoa(host, addr, sizeof(addr));
if (x_errno == EAI_SYSTEM)
x_errno = SOCK_ERRNO;
else
x_errno += EAI_BASE;
- CORE_LOGF_ERRNO_EX(eLOG_Warning,x_errno,SOCK_STRERROR(x_errno),
- ("[SOCK_gethostbyaddr] Failed "
- "getnameinfo(%s)", addr));
+ CORE_LOGF_ERRNO_EXX(107, eLOG_Warning,
+ x_errno, SOCK_STRERROR(x_errno),
+ ("[SOCK_gethostbyaddr] Failed "
+ "getnameinfo(%s)", addr));
}
}
return name;
@@ -4810,7 +4995,11 @@ extern char* SOCK_gethostbyaddr(unsigned int host,
if (!he || strlen(he->h_name) >= namelen) {
if (he || SOCK_ntoa(host, name, namelen) != 0) {
+#ifdef ENOSPC
+ x_errno = ENOSPC;
+#else
x_errno = ERANGE;
+#endif /*ENOSPC*/
name[0] = '\0';
name = 0;
}
@@ -4828,11 +5017,11 @@ extern char* SOCK_gethostbyaddr(unsigned int host,
if (x_errno == NETDB_INTERNAL + DNS_BASE)
x_errno = SOCK_ERRNO;
# endif /*NETDB_INTERNAL*/
- if (SOCK_ntoa(host, addr, sizeof(addr)) != 0)
- strcpy(addr, "<unknown>");
- CORE_LOGF_ERRNO_EX(eLOG_Warning, x_errno, SOCK_STRERROR(x_errno),
- ("[SOCK_gethostbyaddr] Failed "
- "gethostbyaddr%s(%s)", suffix, addr));
+ SOCK_ntoa(host, addr, sizeof(addr));
+ CORE_LOGF_ERRNO_EXX(108, eLOG_Warning,
+ x_errno, SOCK_STRERROR(x_errno),
+ ("[SOCK_gethostbyaddr] Failed "
+ "gethostbyaddr%s(%s)", suffix, addr));
}
return name;
@@ -4905,24 +5094,24 @@ extern size_t SOCK_HostPortToString(unsigned int host,
char* buf,
size_t buflen)
{
- char x_buf[16/*sizeof("255.255.255.255")*/ + 8/*:port*/];
+ char x_buf[16/*sizeof("255.255.255.255")*/ + 6/*:port#*/];
size_t n;
- if (!buf || !buflen)
+ if (!buf || !buflen)
return 0;
if (!host)
- *x_buf = 0;
+ *x_buf = '\0';
else if (SOCK_ntoa(host, x_buf, sizeof(x_buf)) != 0) {
- *buf = 0;
+ *buf = '\0';
return 0;
}
n = strlen(x_buf);
- if (port || !host)
+ if (port || !host)
n += sprintf(x_buf + n, ":%hu", port);
assert(n < sizeof(x_buf));
if (n >= buflen)
- n = buflen - 1;
+ n = buflen - 1;
memcpy(buf, x_buf, n);
- buf[n] = 0;
+ buf[n] = '\0';
return n;
}
diff --git a/connect/ncbi_socket.h b/connect/ncbi_socket.h
index e93b7c05..998ac966 100644
--- a/connect/ncbi_socket.h
+++ b/connect/ncbi_socket.h
@@ -1,7 +1,7 @@
#ifndef CONNECT___NCBI_SOCKET__H
#define CONNECT___NCBI_SOCKET__H
-/* $Id: ncbi_socket.h,v 6.65 2007/04/09 15:25:44 kazimird Exp $
+/* $Id: ncbi_socket.h,v 6.68 2007/11/05 15:25:52 kazimird Exp $
* ===========================================================================
*
* PUBLIC DOMAIN NOTICE
@@ -38,8 +38,6 @@
*********************************
* Generic:
*
- * SOCK, LSOCK
- *
* SOCK_AllowSigPipeAPI
*
* SOCK_InitializeAPI
@@ -77,6 +75,7 @@
* SOCK_Status
* SOCK_Write
* SOCK_Abort
+ * SOCK_GetLocalPort
* SOCK_GetPeerAddress
* SOCK_GetPeerAddressString
*
@@ -1084,6 +1083,21 @@ extern NCBI_XCONNECT_EXPORT EIO_Status SOCK_Abort
);
+/** Get local port of the socket.
+ * @param sock
+ * [in] socket handle
+ * @param byte_order
+ * [in] port byte order
+ * @return
+ * If "network_byte_order" is true(non-zero) then return the port in the
+ * network byte order; otherwise return it in the local host byte order.
+ */
+extern NCBI_XCONNECT_EXPORT unsigned short SOCK_GetLocalPort
+(SOCK sock,
+ ENH_ByteOrder byte_order
+ );
+
+
/** Get host and port of the socket's peer.
* @param sock
* [in] socket handle
@@ -1442,25 +1456,28 @@ extern NCBI_XCONNECT_EXPORT int SOCK_ntoa
);
-/** Equivalent to SOCK_isipEx(host, strlen(host)).
- * @sa SOCK_isipEx
+/**
+ * @param host
+ * [in] '\0'-terminated string to check against being a plain IP address
+ * @param fullquad
+ * [in] non-zero to only accept "host" if it is a full-quad IP notation
+ * @return
+ * Non-zero (true) if given string is an IP address, zero (false) otherwise.
*/
-extern NCBI_XCONNECT_EXPORT int/*bool*/ SOCK_isip
-(const char* host
+extern NCBI_XCONNECT_EXPORT int/*bool*/ SOCK_isipEx
+(const char* host,
+ int/*bool*/ fullquad
);
-/**
+/** Equivalent of SOCK_isip(host, 0)
* @param host
- * [in] host name to check against being a plain IP address
- * @param len
- * [in] length of "host" to check for
+ * [in] '\0'-terminated string to check against being a plain IP address
* @return
* Non-zero (true) if given string is an IP address, zero (false) otherwise.
*/
-extern NCBI_XCONNECT_EXPORT int/*bool*/ SOCK_isipEx
-(const char* host,
- size_t len
+extern NCBI_XCONNECT_EXPORT int/*bool*/ SOCK_isip
+(const char* host
);
diff --git a/connect/ncbi_util.c b/connect/ncbi_util.c
index 02a74379..245545c8 100644
--- a/connect/ncbi_util.c
+++ b/connect/ncbi_util.c
@@ -1,4 +1,4 @@
-/* $Id: ncbi_util.c,v 6.42 2007/07/31 16:25:29 kazimird Exp $
+/* $Id: ncbi_util.c,v 6.49 2008/02/29 00:25:42 kazimird Exp $
* ===========================================================================
*
* PUBLIC DOMAIN NOTICE
@@ -47,7 +47,7 @@
# ifndef NCBI_OS_SOLARIS
# include <limits.h>
# endif
-# if defined(HAVE_GETPWUID) || defined(HAVE_GETPWUID_R)
+# if defined(HAVE_GETPWUID) || defined(NCBI_HAVE_GETPWUID_R)
# include <pwd.h>
# endif
# include <unistd.h>
@@ -58,6 +58,8 @@
# include <windows.h>
#endif
+#define NCBI_USE_ERRCODE_X Connect_Util
+
#define NCBI_USE_PRECOMPILED_CRC32_TABLES 1
@@ -139,7 +141,8 @@ extern int/*bool*/ CORE_SetLOGFILE_NAME_Ex
{
FILE* fp = fopen(filename, "a");
if ( !fp ) {
- CORE_LOGF_ERRNO(eLOG_Error, errno, ("Cannot open \"%s\"", filename));
+ CORE_LOGF_ERRNO_X(9, eLOG_Error, errno,
+ ("Cannot open \"%s\"", filename));
return 0/*false*/;
}
@@ -172,9 +175,9 @@ inline
#endif /*__GNUC__*/
static int/*bool*/ s_IsQuoted(unsigned char c)
{
- return (c == '\t' || c == '\v' || c == '\b' ||
- c == '\r' || c == '\f' || c == '\a' ||
- c == '\n' || c == '\\' || c == '\'' ||
+ return (c == '\t' || c == '\v' || c == '\b' ||
+ c == '\r' || c == '\f' || c == '\a' ||
+ c == '\n' || c == '\\' || c == '\'' ||
c == '"' ? 1/*true*/ : 0/*false*/);
}
@@ -356,8 +359,12 @@ extern char* LOG_ComposeMessage
if (!isprint(*d)) {
int/*bool*/ reduce;
unsigned char v;
- reduce = (i == 1 || s_IsQuoted(d[1]) ||
- !isprint(d[1]) || d[1] < '0' || d[1] > '7');
+ if (format_flags & fLOG_FullOctal)
+ reduce = 0/*false*/;
+ else {
+ reduce = (i == 1 || s_IsQuoted(d[1]) ||
+ !isprint(d[1]) || d[1] < '0' || d[1] > '7');
+ }
*s++ = '\\';
v = *d >> 6;
if (v || !reduce) {
@@ -468,7 +475,7 @@ static int/*bool*/ s_SafeCopy(const char* src, char** beg, const char* end)
}
-extern char* MessagePlusErrno
+extern const char* MessagePlusErrno
(const char* message,
int x_errno,
const char* descr,
@@ -478,9 +485,14 @@ extern char* MessagePlusErrno
char* beg;
char* end;
+ /* Check for an empty result */
+ if (!x_errno && (!descr || !*descr))
+ return !message || !*message ? "" : message;
+
/* Check and init */
if (!buf || !buf_size)
return 0;
+
buf[0] = '\0';
if (buf_size < 2)
return buf; /* empty */
@@ -494,10 +506,6 @@ extern char* MessagePlusErrno
}
}
- /* Check for an empty result, calculate string lengths */
- if ((!message || !*message) && !x_errno && (!descr || !*descr))
- return buf; /* empty */
-
/* Compose: <message> {errno=<x_errno>,<descr>} */
beg = buf;
end = buf + buf_size - 1;
@@ -625,7 +633,7 @@ extern const char* CORE_GetUsername(char* buf, size_t bufsize)
char loginbuf[LOGIN_NAME_MAX + 1];
# endif
struct passwd* pw;
-# if !defined(NCBI_OS_SOLARIS) && defined(HAVE_GETPWUID_R)
+# if !defined(NCBI_OS_SOLARIS) && defined(NCBI_HAVE_GETPWUID_R)
struct passwd pwd;
char pwdbuf[256];
# endif
@@ -677,7 +685,7 @@ extern const char* CORE_GetUsername(char* buf, size_t bufsize)
# endif
# if defined(NCBI_OS_SOLARIS) || \
- (!defined(HAVE_GETPWUID_R) && defined(HAVE_GETPWUID))
+ (!defined(NCBI_HAVE_GETPWUID_R) && defined(HAVE_GETPWUID))
/* NB: getpwuid() is MT-safe on Solaris, so use it here, if available */
# ifndef NCBI_OS_SOLARIS
CORE_LOCK_WRITE;
@@ -689,23 +697,23 @@ extern const char* CORE_GetUsername(char* buf, size_t bufsize)
# endif
if (pw && pw->pw_name)
return buf;
-# elif defined(HAVE_GETPWUID_R)
-# if HAVE_GETPWUID_R == 4
+# elif defined(NCBI_HAVE_GETPWUID_R)
+# if NCBI_HAVE_GETPWUID_R == 4
/* obsolete but still existent */
pw = getpwuid_r(getuid(), &pwd, pwdbuf, sizeof(pwdbuf));
-# elif HAVE_GETPWUID_R == 5
+# elif NCBI_HAVE_GETPWUID_R == 5
/* POSIX-conforming */
if (getpwuid_r(getuid(), &pwd, pwdbuf, sizeof(pwdbuf), &pw) != 0)
pw = 0;
# else
-# error "Unknown value of HAVE_GETPWUID_R, 4 or 5 expected."
+# error "Unknown value of NCBI_HAVE_GETPWUID_R, 4 or 5 expected."
# endif
if (pw && pw->pw_name) {
assert(pw == &pwd);
strncpy0(buf, pw->pw_name, bufsize - 1);
return buf;
}
-# endif /*HAVE_GETPWUID_R*/
+# endif /*NCBI_HAVE_GETPWUID_R*/
#endif /*!NCBI_OS_UNIX*/
@@ -935,3 +943,31 @@ extern int/*bool*/ UTIL_MatchesMask(const char* name, const char* mask)
{
return UTIL_MatchesMaskEx(name, mask, 1/*ignore case*/);
}
+
+
+extern char* UTIL_NcbiLocalHostName(char* hostname)
+{
+ static const struct {
+ const char* text;
+ size_t len;
+ } kEndings[] = {
+ { ".ncbi.nlm.nih.gov", 17},
+ { ".ncbi.nih.gov", 13}
+ };
+ size_t len = hostname ? strlen(hostname) : 0;
+
+ if (len) {
+ size_t i;
+ for (i = 0; i < sizeof(kEndings) / sizeof(kEndings[0]); i++) {
+ assert(strlen(kEndings[i].text) == kEndings[i].len);
+ if (len > kEndings[i].len) {
+ size_t prefix = len - kEndings[i].len;
+ if (strcasecmp(hostname + prefix, kEndings[i].text) == 0) {
+ hostname[prefix] = '\0';
+ return hostname;
+ }
+ }
+ }
+ }
+ return 0;
+}
diff --git a/connect/ncbi_util.h b/connect/ncbi_util.h
index 11c4228f..a87c88ef 100644
--- a/connect/ncbi_util.h
+++ b/connect/ncbi_util.h
@@ -1,7 +1,7 @@
#ifndef CONNECT___NCBI_UTIL__H
#define CONNECT___NCBI_UTIL__H
-/* $Id: ncbi_util.h,v 6.28 2007/07/31 16:25:29 kazimird Exp $
+/* $Id: ncbi_util.h,v 6.33 2008/02/29 00:25:42 kazimird Exp $
* ===========================================================================
*
* PUBLIC DOMAIN NOTICE
@@ -54,6 +54,7 @@
*
* 4. Miscellaneous:
* UTIL_MatchesMask[Ex]()
+ * UTIL_NcbiLocalHostName()
*
*/
@@ -105,28 +106,31 @@ extern NCBI_XCONNECT_EXPORT MT_LOCK CORE_GetLOCK(void);
* @sa
* LOG_WriteInternal
*/
-#define LOG_Write(lg,level,module,file,line,message) \
- (void) (((lg) || (level) == eLOG_Fatal) ? \
- (LOG_WriteInternal(lg,level,module,file,line,message,0,0), 0) : 1)
-#define LOG_Data(lg,level,module,file,line,data,size,message) \
- (void) (((lg) || (level) == eLOG_Fatal) ? \
- (LOG_WriteInternal(lg,level,module,file,line,message,data,size), 0) : 1)
+#define LOG_Write(lg,code,subcode,level,module,file,line,message) \
+ (void) (((lg) || (level) == eLOG_Fatal) ? \
+ (LOG_WriteInternal(lg,level,module,file,line,message,0,0, \
+ code,subcode), 0) : 1)
+#define LOG_Data(lg,code,subcode,level,module,file,line,data,size,message) \
+ (void) (((lg) || (level) == eLOG_Fatal) ? \
+ (LOG_WriteInternal(lg,level,module,file,line,message,data,size, \
+ code,subcode), 0) : 1)
/** Auxiliary plain macros to write message (maybe, with raw data) to the log.
* @sa
* LOG_Write, LOG_Data
*/
-#define LOG_WRITE(lg, level, message) \
- LOG_Write(lg, level, THIS_MODULE, THIS_FILE, __LINE__, message)
+#define LOG_WRITE(lg, code, subcode, level, message) \
+ LOG_Write(lg, code, subcode, level, \
+ THIS_MODULE, THIS_FILE, __LINE__, message)
#ifdef LOG_DATA
/* AIX's <pthread.h> defines LOG_DATA to be an integer constant;
we must explicitly drop such definitions to avoid trouble */
# undef LOG_DATA
#endif
-#define LOG_DATA(lg, data, size, message) \
- LOG_Data(lg, eLOG_Trace, THIS_MODULE, THIS_FILE, __LINE__, \
+#define LOG_DATA(lg, code, subcode, level, data, size, message) \
+ LOG_Data(lg, code, subcode, level, THIS_MODULE, THIS_FILE, __LINE__, \
data, size, message)
@@ -229,11 +233,12 @@ typedef enum {
fLOG_Module = 0x2,
fLOG_FileLine = 0x4, /**< always here for eLOG_Trace level */
fLOG_DateTime = 0x8,
+ fLOG_FullOctal = 0x2000, /**< do not do reduction in octal data bytes*/
fLOG_OmitNoteLevel = 0x4000, /**< do not add NOTE if eLOG_Note is level */
fLOG_None = 0x8000 /**< nothing but spec'd parts, msg and data */
} ELOG_Format;
typedef unsigned int TLOG_FormatFlags; /**< binary OR of "ELOG_FormatFlags" */
-#define fLOG_Short (fLOG_Level)
+#define fLOG_Short fLOG_Level
#define fLOG_Full (fLOG_Level | fLOG_Module | fLOG_FileLine)
extern NCBI_XCONNECT_EXPORT TLOG_FormatFlags CORE_SetLOGFormatFlags
@@ -295,7 +300,7 @@ extern NCBI_XCONNECT_EXPORT void LOG_ToFILE
/** Add current "errno" (and maybe its description) to the message:
- * <message> {errno=<errno>,<descr>}
+ * <message>[ {errno=[<errno>][,][<descr>]}]
* @param message
* [in] message text (can be NULL)
* @param x_errno
@@ -305,13 +310,13 @@ extern NCBI_XCONNECT_EXPORT void LOG_ToFILE
* @param buf
* [out] buffer to put the composed message to
* @param buf_size
- * [in] maximal buffer size
+ * [in] buffer size available for use
* @return
- * Return "buf"
+ * Return "buf" if composition occurred, else "message" (if non-empty) or ""
* @sa
* LOG_ComposeMessage
*/
-extern NCBI_XCONNECT_EXPORT char* MessagePlusErrno
+extern NCBI_XCONNECT_EXPORT const char* MessagePlusErrno
(const char* message,
int x_errno,
const char* descr,
@@ -325,11 +330,14 @@ extern NCBI_XCONNECT_EXPORT char* MessagePlusErrno
* @sa
* LOG_WRITE_ERRNO
*/
-#define LOG_WRITE_ERRNO_EX(lg, level, message, x_errno, x_descr) do { \
+#define LOG_WRITE_ERRNO_EX(lg, code, subcode, level, message, \
+ x_errno, x_descr) \
+do { \
if ((lg) || (level) == eLOG_Fatal) { \
char _buf[1024]; \
- LOG_WRITE(lg, level, MessagePlusErrno(message, x_errno, x_descr, \
- _buf, sizeof(_buf))); \
+ LOG_WRITE(lg, code, subcode, level, \
+ MessagePlusErrno(message, x_errno, x_descr, \
+ _buf, sizeof(_buf))); \
} \
} while (0)
@@ -338,8 +346,41 @@ extern NCBI_XCONNECT_EXPORT char* MessagePlusErrno
* @sa
* LOG_WRITE_ERRNO_EX
*/
-#define LOG_WRITE_ERRNO(lg, level, message) \
- LOG_WRITE_ERRNO_EX(lg, level, message, errno, 0)
+#define LOG_WRITE_ERRNO(lg, code, subcode, level, message) \
+ LOG_WRITE_ERRNO_EX(lg, code, subcode, level, message, errno, 0)
+
+
+/* Several defines brought here from ncbidiag.hpp. Names of macros slightly
+ * changed (added _C) because some sources include this header and
+ * ncbidiag.hpp simultaneously
+ */
+
+/** Defines global error code name with given value (err_code)
+ */
+#define NCBI_C_DEFINE_ERRCODE_X(name, err_code, max_err_subcode) \
+ enum enum##name { \
+ eErrCodeX_##name = err_code \
+ /* automatic subcode checking is not implemented in C code */ \
+ }
+
+/** Makes one identifier from 2 parts
+ */
+#define NCBI_C_CONCAT_IDENTIFIER(prefix, postfix) prefix##postfix
+
+/** Returns value of error code by its name defined by NCBI_DEFINE_ERRCODE_X
+ *
+ * @sa NCBI_C_DEFINE_ERRCODE_X
+ */
+#define NCBI_C_ERRCODE_X_NAME(name) \
+ NCBI_C_CONCAT_IDENTIFIER(eErrCodeX_, name)
+
+/** Returns currently set default error code. Default error code is set by
+ * definition of NCBI_USE_ERRCODE_X with name of error code as its value.
+ *
+ * @sa NCBI_DEFINE_ERRCODE_X
+ */
+#define NCBI_C_ERRCODE_X NCBI_C_ERRCODE_X_NAME(NCBI_USE_ERRCODE_X)
+
@@ -452,13 +493,23 @@ extern NCBI_XCONNECT_EXPORT int/*bool*/ UTIL_MatchesMaskEx
* TODO!
* @param mask
* TODO!
-*/
+ */
extern NCBI_XCONNECT_EXPORT int/*bool*/ UTIL_MatchesMask
(const char* name,
const char* mask
);
+/** Cut off well-known NCBI domain suffix out of the passed "hostname".
+ * @param hostname
+ * Hostname to shorten (if possible)
+ * @return 0 if the hostname wasn't modified, otherwise return "hostname".
+ */
+extern char* UTIL_NcbiLocalHostName
+(char* hostname
+ );
+
+
#ifdef __cplusplus
} /* extern "C" */
#endif
diff --git a/connect/test/test_ncbi_connutil_misc.c b/connect/test/test_ncbi_connutil_misc.c
index 0269fe32..e0a1c4a4 100644
--- a/connect/test/test_ncbi_connutil_misc.c
+++ b/connect/test/test_ncbi_connutil_misc.c
@@ -1,4 +1,4 @@
-/* $Id: test_ncbi_connutil_misc.c,v 6.25 2006/06/15 03:02:52 lavr Exp $
+/* $Id: test_ncbi_connutil_misc.c,v 6.26 2007/12/05 19:26:19 kazimird Exp $
* ===========================================================================
*
* PUBLIC DOMAIN NOTICE
@@ -147,60 +147,6 @@ static void TEST_URL_Encoding(void)
/***********************************************************************
- * TEST: BASE64_Encode(), BAS64_Decode()
- */
-
-static void TEST_BASE64_Encoding(void)
-{
- const char test_string[] = "Quick brown fox jumps over the lazy dog";
- char buf1[1024], buf2[1024], buf3[1024];
- size_t read, written, len = 16, i, j;
-
- BASE64_Encode(test_string, strlen(test_string) + 1, &read,
- buf1, sizeof(buf1), &written, &len);
- assert(read == strlen(test_string) + 1);
- assert(written < sizeof(buf1));
- assert(buf1[written] == '\0');
-
- assert(BASE64_Decode(buf1, written, &read,
- buf2, sizeof(buf2), &written));
- assert(strlen(buf1) == read);
- assert(written == strlen(test_string) + 1);
- assert(buf2[written - 1] == '\0');
- assert(strcmp(buf2, test_string) == 0);
-
- for (i = 0; i < 100; i++) {
- len = rand() % 250;
- memset(buf1, '\0', sizeof(buf1));
- memset(buf2, '\0', sizeof(buf2));
- memset(buf3, '\0', sizeof(buf3));
- for (j = 0; j < len; j++) {
- buf1[j] = rand() & 0xFF;
- }
-
- j = rand() % 100;
- BASE64_Encode(buf1, len, &read, buf2, sizeof(buf2), &written, &j);
- if (len != read)
- fprintf(stderr, "len = %d, read = %d\n", (int)len, (int)read);
- assert(len == read);
- assert (written < sizeof(buf2));
- assert(buf2[written] == '\0');
-
- if (rand() & 1) {
- buf2[written] = '=';
- }
- j = written;
- BASE64_Decode(buf2, j, &read, buf3, sizeof(buf3), &written);
- if (j != read)
- fprintf(stderr, "j = %d, read = %d\n", (int)j, (int)read);
- assert(j == read);
- assert(len == written);
- assert(memcmp(buf1, buf3, len) == 0);
- }
-}
-
-
-/***********************************************************************
* TEST: Miscellaneous
*/
@@ -382,92 +328,9 @@ int main(void)
CORE_SetLOGFILE(stderr, 0/*false*/);
TEST_URL_Encoding();
- TEST_BASE64_Encoding();
TEST_MIME();
TEST_ConnNetInfo();
CORE_SetLOG(0);
return 0;
}
-
-
-/*
- * ---------------------------------------------------------------------------
- * $Log: test_ncbi_connutil_misc.c,v $
- * Revision 6.25 2006/06/15 03:02:52 lavr
- * GetUsername test moved from here to test_ncbi_core.c
- *
- * Revision 6.24 2006/04/19 02:22:57 lavr
- * Modify test for Pre/Post overrides of SConnNetInfo::args
- *
- * Revision 6.23 2006/04/19 01:39:16 lavr
- * ConnNetInfo_*Arg tests added
- *
- * Revision 6.22 2006/01/31 17:12:07 lavr
- * CONNUTIL_GetUsername() test added
- *
- * Revision 6.21 2005/08/18 19:00:48 lavr
- * More thorough BASE64_{En|De}code() tests
- *
- * Revision 6.20 2005/07/11 18:24:28 lavr
- * Spell ADDEND
- *
- * Revision 6.19 2005/05/02 16:12:16 lavr
- * Use global random seed
- *
- * Revision 6.18 2005/04/20 18:23:26 lavr
- * +<stdlib.h>
- *
- * Revision 6.17 2005/03/21 17:04:51 lavr
- * BASE64_{En|De}code tests extended
- *
- * Revision 6.16 2005/03/19 02:17:08 lavr
- * Fix change log entry
- *
- * Revision 6.15 2005/03/19 02:14:10 lavr
- * +Test for BASE64_{En|De}code
- *
- * Revision 6.14 2004/04/01 14:14:02 lavr
- * Spell "occurred", "occurrence", and "occurring"
- *
- * Revision 6.13 2004/01/14 18:53:09 lavr
- * Use "application/xml+soap" in the test case
- *
- * Revision 6.12 2004/01/07 19:24:03 lavr
- * Added test for MIME content-type "application/xml"
- *
- * Revision 6.11 2002/12/13 21:20:55 lavr
- * Move log to end
- *
- * Revision 6.10 2002/11/22 15:09:40 lavr
- * Replace all occurrences of "ray" with "yar"
- *
- * Revision 6.9 2002/10/11 19:57:17 lavr
- * Add tests for ConnNetInfo_*UserHeader() routines
- *
- * Revision 6.8 2002/03/22 19:46:51 lavr
- * Test_assert.h made last among the include files
- *
- * Revision 6.7 2002/02/20 19:12:39 lavr
- * Swapped eENCOD_Url and eENCOD_None; eENCOD_Unknown introduced; test cleaned
- *
- * Revision 6.6 2002/02/05 21:45:55 lavr
- * Included header files rearranged
- *
- * Revision 6.5 2002/01/16 21:23:15 vakatov
- * Utilize header "test_assert.h" to switch on ASSERTs in the Release mode too
- *
- * Revision 6.4 2000/11/07 23:24:43 vakatov
- * [MIME] In-sync with the C Toolkit "connutil.c:R6.15"
- *
- * Revision 6.3 2000/04/12 15:22:07 vakatov
- * Always #undef NDEBUG
- *
- * Revision 6.2 2000/03/29 17:21:48 vakatov
- * + CORE_SetLOG(0) at the program end.
- *
- * Revision 6.1 2000/03/24 22:53:38 vakatov
- * Initial revision
- *
- * ===========================================================================
- */
diff --git a/connect/test/test_ncbi_core.c b/connect/test/test_ncbi_core.c
index 36bdd195..3e58f85c 100644
--- a/connect/test/test_ncbi_core.c
+++ b/connect/test/test_ncbi_core.c
@@ -1,4 +1,4 @@
-/* $Id: test_ncbi_core.c,v 6.13 2007/06/25 16:55:29 kazimird Exp $
+/* $Id: test_ncbi_core.c,v 6.15 2008/02/28 20:25:52 kazimird Exp $
* ===========================================================================
*
* PUBLIC DOMAIN NOTICE
@@ -258,10 +258,10 @@ static void TEST_CORE_Log(void)
verify(LOG_Delete(x_log) == x_log);
assert(TEST_CORE_LogUserData == 1);
- LOG_WRITE(0, eLOG_Trace, 0);
- LOG_Write(0, eLOG_Trace, 0, 0, 0, 0);
- LOG_WRITE(x_log, eLOG_Trace, 0);
- LOG_Write(x_log, eLOG_Trace, 0, 0, 0, 0);
+ LOG_WRITE(0, 0, 0, eLOG_Trace, 0);
+ LOG_Write(0, 0, 0, eLOG_Trace, 0, 0, 0, 0);
+ LOG_WRITE(x_log, 0, 0, eLOG_Trace, 0);
+ LOG_Write(x_log, 0, 0, eLOG_Trace, 0, 0, 0, 0);
verify(LOG_Delete(x_log) == x_log);
assert(TEST_CORE_LogUserData == 1);
@@ -273,16 +273,16 @@ static void TEST_CORE_Log(void)
TEST_CORE_LogUserData = 2;
/* do the test logging */
- LOG_WRITE(x_log, eLOG_Trace, 0);
- LOG_Write(x_log, eLOG_Trace, 0, 0, 0, 0);
- LOG_WRITE(x_log, eLOG_Warning, "");
+ LOG_WRITE(x_log, 0, 0, eLOG_Trace, 0);
+ LOG_Write(x_log, 0, 0, eLOG_Trace, 0, 0, 0, 0);
+ LOG_WRITE(x_log, 0, 0, eLOG_Warning, "");
/* LOG_WRITE(x_log, eLOG_Fatal, "Something fatal"); */
#undef THIS_MODULE
#define THIS_MODULE "FooModuleName"
- LOG_WRITE(x_log, eLOG_Error, "With changed module name");
+ LOG_WRITE(x_log, 0, 0, eLOG_Error, "With changed module name");
#undef THIS_FILE
#define THIS_FILE "BarFileName"
- LOG_WRITE(x_log, eLOG_Critical, "With changed module and file name");
+ LOG_WRITE(x_log, 0, 0, eLOG_Critical, "With changed module and file name");
#undef THIS_FILE
#define THIS_FILE __FILE__
#undef THIS_MODULE
@@ -316,16 +316,16 @@ static void TEST_UTIL_Log(void)
LOG_ToFILE(x_log, stdout, 0/*false*/);
/* simple logging */
- LOG_WRITE(x_log, eLOG_Trace, 0);
- LOG_Write(x_log, eLOG_Trace, 0, 0, 0, 0);
- LOG_WRITE(x_log, eLOG_Warning, "");
+ LOG_WRITE(x_log, 0, 0, eLOG_Trace, 0);
+ LOG_Write(x_log, 0, 0, eLOG_Trace, 0, 0, 0, 0);
+ LOG_WRITE(x_log, 0, 0, eLOG_Warning, "");
/* LOG_WRITE(x_log, eLOG_Fatal, "Something fatal"); */
#undef THIS_MODULE
#define THIS_MODULE "FooModuleName"
- LOG_WRITE(x_log, eLOG_Error, "With changed module name");
+ LOG_WRITE(x_log, 0, 0, eLOG_Error, "With changed module name");
#undef THIS_FILE
#define THIS_FILE "BarFileName"
- LOG_WRITE(x_log, eLOG_Critical, "With changed module and file name");
+ LOG_WRITE(x_log, 0, 0, eLOG_Critical, "With changed module and file name");
#undef THIS_FILE
#define THIS_FILE __FILE__
#undef THIS_MODULE
@@ -338,20 +338,20 @@ static void TEST_UTIL_Log(void)
for (i = 0; i < sizeof(data); i++) {
data[i] = (unsigned char) (i % 256);
}
- LOG_DATA(x_log, data, sizeof(data), "Data logging test");
+ LOG_DATA(x_log, 0, 0, eLOG_Note, data, sizeof(data), "Data logging test");
}}
/* logging with errno */
errno = 0;
- LOG_WRITE_ERRNO(x_log, eLOG_Warning, 0);
- LOG_WRITE_ERRNO(x_log, eLOG_Error, "");
- LOG_WRITE_ERRNO(x_log, eLOG_Critical, "OKAY");
+ LOG_WRITE_ERRNO(x_log, 0, 0, eLOG_Warning, 0);
+ LOG_WRITE_ERRNO(x_log, 0, 0, eLOG_Error, "");
+ LOG_WRITE_ERRNO(x_log, 0, 0, eLOG_Critical, "OKAY");
#undef THIS_FILE
#define THIS_FILE 0
- (void)strtod("1e-999999", 0); LOG_WRITE_ERRNO(x_log, eLOG_Warning, 0);
- (void)strtod("1e-999999", 0); LOG_WRITE_ERRNO(x_log, eLOG_Error, "");
- (void)strtod("1e-999999", 0); LOG_WRITE_ERRNO(x_log, eLOG_Critical, "FAIL");
+ (void)strtod("1e-999999", 0); LOG_WRITE_ERRNO(x_log, 0, 0, eLOG_Warning, 0);
+ (void)strtod("1e-999999", 0); LOG_WRITE_ERRNO(x_log, 0, 0, eLOG_Error, "");
+ (void)strtod("1e-999999", 0); LOG_WRITE_ERRNO(x_log, 0, 0, eLOG_Critical, "FAIL");
/* delete */
verify(LOG_Delete(x_log) == 0);
diff --git a/connect/test/test_ncbi_http_get.c b/connect/test/test_ncbi_http_get.c
index 7876f201..d5df86be 100644
--- a/connect/test/test_ncbi_http_get.c
+++ b/connect/test/test_ncbi_http_get.c
@@ -1,4 +1,4 @@
-/* $Id: test_ncbi_http_get.c,v 6.14 2005/04/20 15:51:19 lavr Exp $
+/* $Id: test_ncbi_http_get.c,v 6.15 2007/09/26 14:55:37 kazimird Exp $
* ===========================================================================
*
* PUBLIC DOMAIN NOTICE
@@ -115,7 +115,7 @@ int main(int argc, char* argv[])
fclose(fp);
t = time(0);
- for (;;) {
+ do {
status = CONN_Wait(conn, eIO_Read, net_info->timeout);
if (status != eIO_Success) {
if (status == eIO_Closed)
@@ -124,21 +124,20 @@ int main(int argc, char* argv[])
CORE_LOG(eLOG_Fatal, "Timed out");
#ifdef NCBI_OS_UNIX
usleep(500);
-#endif
+#endif /*NCBI_OS_UNIX*/
continue;
}
- status = CONN_Read(conn, blk, sizeof(blk), &n, eIO_ReadPlain);
- if (status != eIO_Success && status != eIO_Closed)
+ status = CONN_ReadLine(conn, blk, sizeof(blk), &n);
+ if (status != eIO_Success && status != eIO_Closed)
CORE_LOGF(eLOG_Fatal, ("Read error: %s", IO_StatusStr(status)));
- if (n) {
+ if (n == sizeof(blk))
+ CORE_LOGF(eLOG_Warning, ("Line too long, continuing..."));
+ if (n)
fwrite(blk, 1, n, stdout);
- fflush(stdout);
- } else if (status == eIO_Closed) {
- break;
- } else
- CORE_LOG(eLOG_Fatal, "Empty read");
- }
+ fputc('\n', stdout);
+ fflush(stdout);
+ } while (status == eIO_Success);
ConnNetInfo_Destroy(net_info);
CORE_LOG(eLOG_Note, "Closing connection");
@@ -148,52 +147,3 @@ int main(int argc, char* argv[])
CORE_SetLOG(0);
return 0;
}
-
-
-/*
- * --------------------------------------------------------------------------
- * $Log: test_ncbi_http_get.c,v $
- * Revision 6.14 2005/04/20 15:51:19 lavr
- * Allow addtl file argument to attach as a body ('-' for stdin)
- *
- * Revision 6.13 2005/04/19 16:37:52 lavr
- * Allow HTTP method to be overridden from the environment
- *
- * Revision 6.12 2003/09/30 20:59:39 lavr
- * Fix typo in previous log message
- *
- * Revision 6.11 2003/09/30 20:57:15 lavr
- * Allow to set zero timeout via environment
- *
- * Revision 6.10 2003/05/20 23:52:01 lavr
- * Explicit cast "time_t"->"unsigned" to avoid GCC warning
- *
- * Revision 6.9 2003/05/19 16:58:37 lavr
- * Modified to use {0,0} timeouts in CONN_Wait() and use app timeout handling
- *
- * Revision 6.8 2003/05/14 03:58:43 lavr
- * Match changes in respective APIs of the tests
- *
- * Revision 6.7 2002/10/28 15:47:06 lavr
- * Use "ncbi_ansi_ext.h" privately
- *
- * Revision 6.6 2002/08/14 14:42:46 lavr
- * Use fwrite() instead of printf() when printing out the data fetched
- *
- * Revision 6.5 2002/08/07 16:38:08 lavr
- * EIO_ReadMethod enums changed accordingly; log moved to end
- *
- * Revision 6.4 2002/03/22 19:47:23 lavr
- * Test_assert.h made last among the include files
- *
- * Revision 6.3 2002/02/05 21:45:55 lavr
- * Included header files rearranged
- *
- * Revision 6.2 2002/01/16 21:23:15 vakatov
- * Utilize header "test_assert.h" to switch on ASSERTs in the Release mode too
- *
- * Revision 6.1 2001/12/30 19:42:06 lavr
- * Initial revision
- *
- * ==========================================================================
- */
diff --git a/connect/test/test_ncbi_socket.c b/connect/test/test_ncbi_socket.c
index fbb0dc28..197a1cfe 100644
--- a/connect/test/test_ncbi_socket.c
+++ b/connect/test/test_ncbi_socket.c
@@ -1,4 +1,4 @@
-/* $Id: test_ncbi_socket.c,v 6.25 2007/07/06 16:55:28 kazimird Exp $
+/* $Id: test_ncbi_socket.c,v 6.26 2007/10/19 11:25:50 kazimird Exp $
* ===========================================================================
*
* PUBLIC DOMAIN NOTICE
@@ -736,7 +736,7 @@ static const char* s_ntoa(unsigned int host)
}
-static int/*bool*/ TEST_gethostbyname(const char* name)
+static unsigned int TEST_gethostbyname(const char* name)
{
char buf[256];
unsigned int host;
@@ -745,23 +745,21 @@ static int/*bool*/ TEST_gethostbyname(const char* name)
host = SOCK_gethostbyname(name);
fprintf(log_fp, "SOCK_gethostbyname(\"%s\"): 0x%08X [%s]\n",
- name, (unsigned int) host, s_ntoa(host));
- if ( !host ) {
- return 0/*false*/;
- }
-
- name = SOCK_gethostbyaddr(host, buf, sizeof(buf));
- if ( name ) {
- assert(name == buf);
- assert(0 < strlen(buf) && strlen(buf) < sizeof(buf));
- fprintf(log_fp, "SOCK_gethostbyaddr(0x%08X [%s]): \"%s\"\n",
- (unsigned int) host, s_ntoa(host), name);
- } else {
- fprintf(log_fp, "SOCK_gethostbyaddr(0x%08X [%s]): <not found>\n",
- (unsigned int) host, s_ntoa(host));
+ name, (unsigned int) SOCK_NetToHostLong(host), s_ntoa(host));
+ if ( host ) {
+ name = SOCK_gethostbyaddr(host, buf, sizeof(buf));
+ if ( name ) {
+ assert(name == buf);
+ assert(0 < strlen(buf) && strlen(buf) < sizeof(buf));
+ fprintf(log_fp, "SOCK_gethostbyaddr(0x%08X [%s]): \"%s\"\n",
+ (unsigned int) SOCK_NetToHostLong(host), s_ntoa(host),
+ name);
+ } else {
+ fprintf(log_fp, "SOCK_gethostbyaddr(0x%08X [%s]): <not found>\n",
+ (unsigned int) SOCK_NetToHostLong(host), s_ntoa(host));
+ }
}
-
- return 1/*true*/;
+ return host;
}
@@ -770,23 +768,23 @@ static int/*bool*/ TEST_gethostbyaddr(unsigned int host)
const char* name;
char buf[1024];
- fprintf(log_fp, "- - - - - - -\n");
+ fprintf(log_fp, "------------\n");
name = SOCK_gethostbyaddr(host, buf, sizeof(buf));
if ( name ) {
assert(name == buf);
assert(0 < strlen(buf) && strlen(buf) < sizeof(buf));
fprintf(log_fp, "SOCK_gethostbyaddr(0x%08X [%s]): \"%s\"\n",
- (unsigned int) host, s_ntoa(host), name);
+ (unsigned int) SOCK_NetToHostLong(host), s_ntoa(host), name);
} else {
fprintf(log_fp, "SOCK_gethostbyaddr(0x%08X [%s]): <not found>\n",
- (unsigned int) host, s_ntoa(host));
+ (unsigned int) SOCK_NetToHostLong(host), s_ntoa(host));
return 0/*false*/;
}
host = SOCK_gethostbyname(name);
fprintf(log_fp, "SOCK_gethostbyname(\"%s\"): 0x%08X [%s]\n",
- name, (unsigned int) host, s_ntoa(host));
+ name, (unsigned int) SOCK_NetToHostLong(host), s_ntoa(host));
return 1/*true*/;
}
@@ -805,8 +803,6 @@ static void TEST_gethostby(void)
assert( !TEST_gethostbyname("a1....b1") );
assert( !TEST_gethostbyname("boo.foo.bar.doo") );
- fprintf(log_fp, "\n++++++++++++++++++++++\n");
-
(void) TEST_gethostbyname("localhost");
(void) TEST_gethostbyname("ncbi.nlm.nih.gov");
@@ -823,6 +819,72 @@ static void TEST_gethostby(void)
}
+static int/*bool*/ TEST_isip(const char* ip)
+{
+ int retval = SOCK_isip(ip);
+
+ fprintf(log_fp, "------------\n");
+
+ fprintf(log_fp, "SOCK_isip(\"%s\"): %s\n", ip, retval ? "True" : "False");
+
+ return retval;
+}
+
+
+
+/* Try SOCK_isip()
+ */
+static void TEST_SOCK_isip(void)
+{
+ fprintf(log_fp, "\n===============================\n");
+
+ assert(TEST_isip("0") && TEST_isip("0.0.0.0"));
+ assert(TEST_gethostbyname("0") == 0);
+ assert(TEST_isip("1"));
+ assert(TEST_gethostbyname("1") == SOCK_HostToNetLong(1));
+ assert(TEST_isip("0x7F000002"));
+ assert(TEST_gethostbyname("0x7F000002") ==
+ TEST_gethostbyname("127.0.0.2"));
+
+ assert(TEST_isip("127.234"));
+ assert(TEST_gethostbyname("127.234") ==
+ TEST_gethostbyname("127.0.0.234"));
+ assert(TEST_isip("127.16777215"));
+ assert(TEST_gethostbyname("127.16777215") ==
+ TEST_gethostbyname("127.255.255.255"));
+
+ assert(TEST_isip("127.234.0x345"));
+ assert(TEST_gethostbyname("127.234.3.69") ==
+ TEST_gethostbyname("127.234.3.69"));
+ assert(TEST_isip("127.234.0xFFFF"));
+ assert(TEST_gethostbyname("127.234.0xFFFF") ==
+ TEST_gethostbyname("127.234.255.255"));
+
+ assert(TEST_isip("127.012344321"));
+ assert(TEST_gethostbyname("127.012344321") ==
+ TEST_gethostbyname("127.41.200.209"));
+ assert(TEST_isip("127.077777777"));
+ assert(TEST_gethostbyname("127.077777777") ==
+ TEST_gethostbyname("127.255.255.255"));
+
+ assert(TEST_isip("0.0321.0xAB.123"));
+ assert(TEST_isip("255.255.255.255"));
+
+ assert(!TEST_isip("a"));
+ assert(!TEST_isip("-1"));
+ assert(!TEST_isip("1.2.3a"));
+ assert(!TEST_isip("1.0xDEATH"));
+ assert(!TEST_isip("1.2.3.256"));
+ assert(!TEST_isip("1.2.0200000"));
+ assert(!TEST_isip("1.1.1.1."));
+ assert(!TEST_isip("1.1.-1.1"));
+ assert(!TEST_isip("1.0x100.1.1"));
+ assert(!TEST_isip("1.0100000000"));
+ assert(!TEST_isip("0x100000000"));
+
+ fprintf(log_fp, "\n===============================\n");
+}
+
/* Main function
* Parse command-line options, initialize and cleanup API internals;
@@ -920,6 +982,8 @@ extern int main(int argc, char** argv)
TEST_gethostby();
+ TEST_SOCK_isip();
+
TEST__client(server_host, (unsigned short)server_port, timeout);
assert(SOCK_ShutdownAPI() == eIO_Success);
CORE_SetLOG(0);
diff --git a/corelib/ncbierr.c b/corelib/ncbierr.c
index 302b56b4..0cd5f295 100644
--- a/corelib/ncbierr.c
+++ b/corelib/ncbierr.c
@@ -23,9 +23,9 @@
*
* ===========================================================================
*
-* $Id: ncbierr.c,v 6.24 2006/11/09 17:46:58 kans Exp $
+* $Id: ncbierr.c,v 6.25 2008/01/18 17:09:13 lavr Exp $
*
-* $Revision: 6.24 $
+* $Revision: 6.25 $
*
* Authors: Schuler, Sirotkin (UserErr stuff)
*
@@ -71,6 +71,9 @@
* 03-06-95 Schuler Fixed problem with ErrMsgRoot_fopen
*
* $Log: ncbierr.c,v $
+* Revision 6.25 2008/01/18 17:09:13 lavr
+* Use SEV_MIN (instead of explicit SEV_INFO) in level setting routines
+*
* Revision 6.24 2006/11/09 17:46:58 kans
* added cast to quiet CodeWarrior complaint
*
@@ -1542,7 +1545,7 @@ NLM_EXTERN ErrSev LIBCALL ErrSetLogLevel (ErrSev level)
{
AppErrInfoPtr info = GetAppErrInfo();
ErrSev prev = (ErrSev) info->opts.log_level;
- info->opts.log_level = (short) MAX(SEV_INFO,MIN(level,SEV_MAX));
+ info->opts.log_level = (short) MAX(SEV_MIN,MIN(level,SEV_MAX));
return prev;
}
@@ -1561,7 +1564,7 @@ NLM_EXTERN ErrSev LIBCALL ErrSetMessageLevel (ErrSev level)
{
AppErrInfoPtr info = GetAppErrInfo();
ErrSev prev = (ErrSev) info->opts.msg_level;
- info->opts.msg_level = (short) MAX(SEV_INFO,MIN(level,SEV_MAX));
+ info->opts.msg_level = (short) MAX(SEV_MIN,MIN(level,SEV_MAX));
return prev;
}
@@ -1580,7 +1583,7 @@ NLM_EXTERN ErrSev LIBCALL ErrSetFatalLevel (ErrSev level)
{
AppErrInfoPtr info = GetAppErrInfo();
ErrSev prev = (ErrSev) info->opts.die_level;
- info->opts.die_level = (short) MAX(SEV_INFO,MIN(level,SEV_MAX));
+ info->opts.die_level = (short) MAX(SEV_MIN,MIN(level,SEV_MAX));
return prev;
}
diff --git a/ctools/asn_connection.c b/ctools/asn_connection.c
index 9676e31c..9579123d 100644
--- a/ctools/asn_connection.c
+++ b/ctools/asn_connection.c
@@ -1,4 +1,4 @@
-/* $Id: asn_connection.c,v 1.8 2004/11/23 16:15:29 lavr Exp $
+/* $Id: asn_connection.c,v 1.9 2007/10/17 15:25:44 kazimird Exp $
* ===========================================================================
*
* PUBLIC DOMAIN NOTICE
@@ -32,6 +32,10 @@
#include <ctools/asn_connection.h>
#include "../connect/ncbi_priv.h"
+#include "error_codes.h"
+
+
+#define NCBI_USE_ERRCODE_X Ctools_ASN
#ifdef __cplusplus
@@ -70,7 +74,7 @@ static void s_CloseAsnConn(CONN conn, ECONN_Callback type, void* data)
struct SAsnConn_Cbdata* cbdata = (struct SAsnConn_Cbdata*) data;
assert(type == eCONN_OnClose && cbdata && cbdata->ptr);
- CONN_SetCallback(conn, type, &cbdata->cb, 0);
+ CONN_SetCallback(conn, type, &cbdata->cb, 0);
AsnIoFree(cbdata->ptr, 0/*not a file - don't close*/);
if ( cbdata->cb.func )
(*cbdata->cb.func)(conn, type, cbdata->cb.data);
@@ -91,8 +95,8 @@ static void s_SetAsnConn_CloseCb(CONN conn, AsnIoPtr ptr)
cb.data = cbdata;
CONN_SetCallback(conn, eCONN_OnClose, &cb, &cbdata->cb);
} else
- CORE_LOG(eLOG_Error,
- "Cannot create cleanup callback for ASN conn-based stream");
+ CORE_LOG_X(1, eLOG_Error,
+ "Cannot create cleanup callback for ASN conn-based stream");
}
@@ -165,35 +169,3 @@ CONN CreateAsnConn_Service(const char* service,
return CreateAsnConn_ServiceEx(service, input_fmt, input,
output_fmt, output, fSERV_Any, 0, 0);
}
-
-
-/*
- * --------------------------------------------------------------------------
- * $Log: asn_connection.c,v $
- * Revision 1.8 2004/11/23 16:15:29 lavr
- * -<connect/ncbi_service_connector.h> now included from <ctools/asn_connectionh>
- *
- * Revision 1.7 2004/03/23 02:29:19 lavr
- * Remove redundant inits in I/O callbacks
- *
- * Revision 1.6 2004/02/23 15:23:50 lavr
- * New (last) parameter "how" added in CONN_Write() API call
- *
- * Revision 1.5 2003/11/13 16:01:31 lavr
- * Included headers revised
- *
- * Revision 1.4 2002/08/07 16:38:18 lavr
- * EIO_ReadMethod enums changed accordingly; log moved to end
- *
- * Revision 1.3 2001/09/24 20:32:44 lavr
- * +SSERVICE_Extra* parameter in CreateAsnConn_ServiceEx()
- *
- * Revision 1.2 2001/06/29 14:04:17 lavr
- * Close callback removes itself when called; fixes not to add callbacks
- * in CreateAsnConn_ServiceEx, because they are already there!
- *
- * Revision 1.1 2001/06/28 21:58:23 lavr
- * Initial revision
- *
- * ==========================================================================
- */
diff --git a/ctools/error_codes.h b/ctools/error_codes.h
new file mode 100644
index 00000000..79ad1ed8
--- /dev/null
+++ b/ctools/error_codes.h
@@ -0,0 +1,45 @@
+#ifndef CTOOLS___ERROR_CODES__H
+#define CTOOLS___ERROR_CODES__H
+
+/* $Id: error_codes.h,v 1.1 2007/10/17 17:49:03 lavr Exp $
+ * ===========================================================================
+ *
+ * PUBLIC DOMAIN NOTICE
+ * National Center for Biotechnology Information
+ *
+ * This software/database is a "United States Government Work" under the
+ * terms of the United States Copyright Act. It was written as part of
+ * the author's official duties as a United States Government employee and
+ * thus cannot be copyrighted. This software/database is freely available
+ * to the public for use. The National Library of Medicine and the U.S.
+ * Government have not placed any restriction on its use or reproduction.
+ *
+ * Although all reasonable efforts have been taken to ensure the accuracy
+ * and reliability of the software and data, the NLM and the U.S.
+ * Government do not and cannot warrant the performance or results that
+ * may be obtained by using this software or data. The NLM and the U.S.
+ * Government disclaim all warranties, express or implied, including
+ * warranties of performance, merchantability or fitness for any particular
+ * purpose.
+ *
+ * Please cite the author in any work or product based on this material.
+ *
+ * ===========================================================================
+ *
+ * Authors: Pavel Ivanov
+ *
+ */
+
+/// @file error_codes.hpp
+/// Definition of all error codes used in C code of ctools library
+/// (xctools.lib).
+///
+
+
+#include "../connect/ncbi_priv.h"
+
+
+NCBI_C_DEFINE_ERRCODE_X(Ctools_ASN, 901, 1);
+
+
+#endif /* CTOOLS___ERROR_CODES__H */
diff --git a/data/country_lat_lon.txt b/data/country_lat_lon.txt
index 2814ddc6..96ea9631 100644
--- a/data/country_lat_lon.txt
+++ b/data/country_lat_lon.txt
@@ -68,7 +68,8 @@ Cayman Islands CJ -81.5 19.2 -81.1 19.4 -80.2 19.6 -79.7 19.8
Central African Republic CT 14.4 2.2 27.5 11.0
Chad CD 13.4 7.4 24.0 23.5
Chile CI -75.8 -56.0 -66.4 -17.5
-China CH 73.5 20.2 134.8 53.6
+China CH 73.5 20.2 134.8 53.6 108.6 18.1 111.1 20.2
+China: Hainan XX 108.6 18.1 111.1 20.2
Christmas Island KT 105.5 -10.6 105.7 -10.4
Clipperton Island IP -109.3 10.2 -109.2 10.3
Cocos Islands CK 96.8 -12.2 96.9 -11.8
@@ -238,7 +239,6 @@ Sao Tome and Principe TP 6.4 0.0 1.7 7.5
Saudi Arabia SA 34.4 15.6 55.7 32.2
Senegal SG -17.6 12.3 -11.4 16.7
Serbia RB 18.8 41.8 23.1 46.2
-Serbia and Montenegro YI
Seychelles SE 50.7 -9.6 51.1 -9.2 52.7 -7.2 52.8 -7.0 53.0 -6.3 53.7 -5.1 55.2 -5.9 56.0 -3.7 56.2 -7.2 56.3 -7.1
Sierra Leone SL -13.4 6.9 -10.3 10.0
Singapore SN 103.6 1.1 104.1 1.5
@@ -341,6 +341,5 @@ Wallis and Futuna WF -178.3 -14.4 -178.0 -14.2 -176.3 -13.4 -176.1 -13.2
West Bank WE 34.8 31.3 35.6 32.6
Western Sahara WI -17.2 20.7 -8.7 27.7
Yemen YM 41.8 11.7 54.5 19.0
-Yugoslavia XX 13.3 40.8 23.0 46.9
Zambia ZA 21.9 -18.1 33.7 -8.2
Zimbabwe ZI 25.2 -22.5 33.1 -15.6
diff --git a/data/featdef.prt b/data/featdef.prt
index 0d869e73..3af3f9fc 100644
--- a/data/featdef.prt
+++ b/data/featdef.prt
@@ -121,7 +121,7 @@ FeatDefGroupSet ::= {
menulabel "Small Nuclear RNA" ,
featdef-key 9 ,
seqfeat-key 5 ,
- entrygroup 3 ,
+ entrygroup 0 ,
displaygroup 3 ,
molgroup na
} ,
@@ -130,7 +130,7 @@ FeatDefGroupSet ::= {
menulabel "Small Cytoplasmic RNA" ,
featdef-key 10 ,
seqfeat-key 5 ,
- entrygroup 3 ,
+ entrygroup 0 ,
displaygroup 3 ,
molgroup na
} ,
@@ -850,7 +850,7 @@ FeatDefGroupSet ::= {
menulabel "Small Nucleolar RNA" ,
featdef-key 90 ,
seqfeat-key 5 ,
- entrygroup 3 ,
+ entrygroup 0 ,
displaygroup 3 ,
molgroup na
} ,
@@ -881,6 +881,24 @@ FeatDefGroupSet ::= {
displaygroup 5 ,
molgroup na
} ,
+ { -- ncRNA
+ typelabel "ncRNA" ,
+ menulabel "Non-coding RNA" ,
+ featdef-key 94 ,
+ seqfeat-key 5 ,
+ entrygroup 3 ,
+ displaygroup 3 ,
+ molgroup na
+ } ,
+ { -- tmRNA
+ typelabel "tmRNA" ,
+ menulabel "Transfer-messenger RNA" ,
+ featdef-key 95 ,
+ seqfeat-key 5 ,
+ entrygroup 3 ,
+ displaygroup 3 ,
+ molgroup na
+ } ,
}
}
diff --git a/data/featdef.val b/data/featdef.val
index 9c57282d..18127853 100644
--- a/data/featdef.val
+++ b/data/featdef.val
Binary files differ
diff --git a/data/lineages.txt b/data/lineages.txt
index 172f1475..0e86f362 100644
--- a/data/lineages.txt
+++ b/data/lineages.txt
@@ -1,58 +1,32 @@
-14
+15
139 Bacteria; Spirochaetes; Spirochaetales; Spirochaetaceae; Borrelia; Borrelia burgdorferi group
-197 Bacteria; Proteobacteria; Epsilonproteobacteria; Campylobacterales; Campylobacteraceae; Campylobacter
210 Bacteria; Proteobacteria; Epsilonproteobacteria; Campylobacterales; Helicobacteraceae; Helicobacter
235 Bacteria; Proteobacteria; Alphaproteobacteria; Rhizobiales; Brucellaceae; Brucella
-274 Bacteria; Deinococcus-Thermus; Deinococci; Thermales; Thermaceae; Thermus
287 Bacteria; Proteobacteria; Gammaproteobacteria; Pseudomonadales; Pseudomonadaceae; Pseudomonas
-294 Bacteria; Proteobacteria; Gammaproteobacteria; Pseudomonadales; Pseudomonadaceae; Pseudomonas
-303 Bacteria; Proteobacteria; Gammaproteobacteria; Pseudomonadales; Pseudomonadaceae; Pseudomonas
-305 Bacteria; Proteobacteria; Betaproteobacteria; Burkholderiales; Burkholderiaceae; Ralstonia
-358 Bacteria; Proteobacteria; Alphaproteobacteria; Rhizobiales; Rhizobiaceae; Rhizobium/Agrobacterium group; Agrobacterium
375 Bacteria; Proteobacteria; Alphaproteobacteria; Rhizobiales; Bradyrhizobiaceae; Bradyrhizobium
-394 Bacteria; Proteobacteria; Alphaproteobacteria; Rhizobiales; Rhizobiaceae; Rhizobium/Agrobacterium group; Rhizobium
-446 Bacteria; Proteobacteria; Gammaproteobacteria; Legionellales; Legionellaceae; Legionella
485 Bacteria; Proteobacteria; Betaproteobacteria; Neisseriales; Neisseriaceae; Neisseria
487 Bacteria; Proteobacteria; Betaproteobacteria; Neisseriales; Neisseriaceae; Neisseria
-550 Bacteria; Proteobacteria; Gammaproteobacteria; Enterobacteriales; Enterobacteriaceae; Enterobacter; Enterobacter cloacae complex
562 Bacteria; Proteobacteria; Gammaproteobacteria; Enterobacteriales; Enterobacteriaceae; Escherichia
-573 Bacteria; Proteobacteria; Gammaproteobacteria; Enterobacteriales; Enterobacteriaceae; Klebsiella
-602 Bacteria; Proteobacteria; Gammaproteobacteria; Enterobacteriales; Enterobacteriaceae; Salmonella
-621 Bacteria; Proteobacteria; Gammaproteobacteria; Enterobacteriales; Enterobacteriaceae; Shigella
-622 Bacteria; Proteobacteria; Gammaproteobacteria; Enterobacteriales; Enterobacteriaceae; Shigella
-623 Bacteria; Proteobacteria; Gammaproteobacteria; Enterobacteriales; Enterobacteriaceae; Shigella
-666 Bacteria; Proteobacteria; Gammaproteobacteria; Vibrionales; Vibrionaceae; Vibrio
727 Bacteria; Proteobacteria; Gammaproteobacteria; Pasteurellales; Pasteurellaceae; Haemophilus
-777 Bacteria; Proteobacteria; Gammaproteobacteria; Legionellales; Coxiellaceae; Coxiella
813 Bacteria; Chlamydiae; Chlamydiales; Chlamydiaceae; Chlamydia
1280 Bacteria; Firmicutes; Bacillales; Staphylococcus
1282 Bacteria; Firmicutes; Bacillales; Staphylococcus
-1307 Bacteria; Firmicutes; Lactobacillales; Streptococcaceae; Streptococcus
1311 Bacteria; Firmicutes; Lactobacillales; Streptococcaceae; Streptococcus
1313 Bacteria; Firmicutes; Lactobacillales; Streptococcaceae; Streptococcus
1314 Bacteria; Firmicutes; Lactobacillales; Streptococcaceae; Streptococcus
-1351 Bacteria; Firmicutes; Lactobacillales; Enterococcaceae; Enterococcus
-1352 Bacteria; Firmicutes; Lactobacillales; Enterococcaceae; Enterococcus
1396 Bacteria; Firmicutes; Bacillales; Bacillaceae; Bacillus; Bacillus cereus group
1402 Bacteria; Firmicutes; Bacillales; Bacillaceae; Bacillus
1423 Bacteria; Firmicutes; Bacillales; Bacillaceae; Bacillus
-1428 Bacteria; Firmicutes; Bacillales; Bacillaceae; Bacillus; Bacillus cereus group
-1496 Bacteria; Firmicutes; Clostridia; Clostridiales; Clostridiaceae; Clostridium
-1502 Bacteria; Firmicutes; Clostridia; Clostridiales; Clostridiaceae; Clostridium
-1598 Bacteria; Firmicutes; Lactobacillales; Lactobacillaceae; Lactobacillus
1639 Bacteria; Firmicutes; Bacillales; Listeriaceae; Listeria
-1642 Bacteria; Firmicutes; Bacillales; Listeriaceae; Listeria
1718 Bacteria; Actinobacteria; Actinobacteridae; Actinomycetales; Corynebacterineae; Corynebacteriaceae; Corynebacterium
1773 Bacteria; Actinobacteria; Actinobacteridae; Actinomycetales; Corynebacterineae; Mycobacteriaceae; Mycobacterium; Mycobacterium tuberculosis complex
-2247 Archaea; Euryarchaeota; Halobacteria; Halobacteriales; Halobacteriaceae; Halorubrum
-2371 Bacteria; Proteobacteria; Gammaproteobacteria; Xanthomonadales; Xanthomonadaceae; Xylella
2711 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids II; Sapindales; Rutaceae; Citrus
2762 Eukaryota; Glaucocystophyceae; Cyanophoraceae; Cyanophora
2769 Eukaryota; Rhodophyta; Florideophyceae; Gigartinales; Gigartinaceae; Chondrus
2788 Eukaryota; Rhodophyta; Bangiophyceae; Bangiales; Bangiaceae; Porphyra
-2832 Eukaryota; Haptophyceae; Pavlovales; Pavlova
+2832 Eukaryota; Haptophyceae; Pavlovales; Pavlovaceae; Pavlova
2850 Eukaryota; stramenopiles; Bacillariophyta; Bacillariophyceae; Bacillariophycidae; Naviculales; Phaeodactylaceae; Phaeodactylum
-2903 Eukaryota; Haptophyceae; Isochrysidales; Emiliania
+2903 Eukaryota; Haptophyceae; Isochrysidales; Noelaerhabdaceae; Emiliania
2926 Eukaryota; Alveolata; Dinophyceae; Gonyaulacales; Gonyaulacaceae; Alexandrium
2961 Eukaryota; Alveolata; Dinophyceae; Gymnodiniales; Gymnodiniaceae; Amphidinium
3037 Eukaryota; Euglenozoa; Euglenida; Euglenales; Euglena
@@ -61,7 +35,6 @@
3055 Eukaryota; Viridiplantae; Chlorophyta; Chlorophyceae; Chlamydomonadales; Chlamydomonadaceae; Chlamydomonas
3088 Eukaryota; Viridiplantae; Chlorophyta; Chlorophyceae; Sphaeropleales; Scenedesmaceae; Scenedesmus
3111 Eukaryota; Viridiplantae; Chlorophyta; Trebouxiophyceae; Chlorellales; Chlorellaceae; Prototheca
-3190 Eukaryota; Viridiplantae; Chlorophyta; Prasinophyceae; Chlorodendrales; Chlorodendraceae; Scherffelia
3197 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Marchantiophyta; Superclass II; Marchantiopsida; Marchantiidae; Marchantiales; Marchantiaceae; Marchantia
3218 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Bryophyta; Moss Superclass V; Bryopsida; Funariidae; Funariales; Funariaceae; Physcomitrella
3225 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Bryophyta; Moss Superclass V; Bryopsida; Dicranidae; Dicranales; Ditrichaceae; Ceratodon
@@ -69,42 +42,38 @@
3329 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Coniferopsida; Coniferales; Pinaceae; Picea
3330 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Coniferopsida; Coniferales; Pinaceae; Picea
3332 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Coniferopsida; Coniferales; Pinaceae; Picea
-3347 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Coniferopsida; Coniferales; Pinaceae; Pinus; Pinus
3352 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Coniferopsida; Coniferales; Pinaceae; Pinus; Pinus
+3357 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Coniferopsida; Coniferales; Pinaceae; Pseudotsuga
3369 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Coniferopsida; Coniferales; Cupressaceae; Cryptomeria
3377 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Gnetophyta; Gnetopsida; Welwitschiales; Welwitschiaceae; Welwitschia
3382 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Gnetophyta; Gnetopsida; Gnetales; Gnetaceae; Gnetum
3415 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; magnoliids; Magnoliales; Magnoliaceae; Liriodendron
3435 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; magnoliids; Laurales; Lauraceae; Persea
3467 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; Ranunculales; Papaveraceae; Eschscholzioideae; Eschscholzia
+3483 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids I; Rosales; Cannabaceae; Cannabis
3486 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids I; Rosales; Cannabaceae; Humulus
3505 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids I; Fagales; Betulaceae; Betula
-3522 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids I; Fagales; Casuarinaceae; Casuarina
3544 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; Caryophyllales; Aizoaceae; Mesembryanthemum
-3605 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; Vitales; Vitaceae; Vitis
3635 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids II; Malvales; Malvaceae; Malvoideae; Gossypium
3641 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids II; Malvales; Malvaceae; Byttnerioideae; Theobroma
3649 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids II; Brassicales; Caricaceae; Carica
3656 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids I; Cucurbitales; Cucurbitaceae; Cucumis
3659 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids I; Cucurbitales; Cucurbitaceae; Cucumis
-3690 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids I; Malpighiales; Salicaceae; Saliceae; Populus
3691 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids I; Malpighiales; Salicaceae; Saliceae; Populus
3693 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids I; Malpighiales; Salicaceae; Saliceae; Populus
3694 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids I; Malpighiales; Salicaceae; Saliceae; Populus
-3695 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids I; Malpighiales; Salicaceae; Saliceae; Populus
3696 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids I; Malpighiales; Salicaceae; Saliceae; Populus
3702 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids II; Brassicales; Brassicaceae; Arabidopsis
3708 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids II; Brassicales; Brassicaceae; Brassica
3711 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids II; Brassicales; Brassicaceae; Brassica
3712 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids II; Brassicales; Brassicaceae; Brassica
-3747 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids I; Rosales; Rosaceae; Rosoideae; Fragaria
-3750 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids I; Rosales; Rosaceae; Maloideae; Malus
+3714 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids II; Brassicales; Brassicaceae; Brassica
+3726 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids II; Brassicales; Brassicaceae; Raphanus
3755 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids I; Rosales; Rosaceae; Amygdaloideae; Prunus
3760 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids I; Rosales; Rosaceae; Amygdaloideae; Prunus
-3802 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; Saxifragales; Grossulariaceae; Ribes
3818 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids I; Fabales; Fabaceae; Papilionoideae; Aeschynomeneae; Arachis
-3821 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids I; Fabales; Fabaceae; Papilionoideae; Phaseoleae; Cajanus
3827 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids I; Fabales; Fabaceae; Papilionoideae; Cicereae; Cicer
+3832 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids I; Fabales; Fabaceae; Papilionoideae; Indigofereae; Cyamopsis
3847 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids I; Fabales; Fabaceae; Papilionoideae; Phaseoleae; Glycine
3848 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids I; Fabales; Fabaceae; Papilionoideae; Phaseoleae; Glycine
3870 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids I; Fabales; Fabaceae; Papilionoideae; Genisteae; Lupinus
@@ -113,34 +82,35 @@
3885 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids I; Fabales; Fabaceae; Papilionoideae; Phaseoleae; Phaseolus
3886 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids I; Fabales; Fabaceae; Papilionoideae; Phaseoleae; Phaseolus
3888 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids I; Fabales; Fabaceae; Papilionoideae; Vicieae; Pisum
+3899 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids I; Fabales; Fabaceae; Papilionoideae; Trifolieae; Trifolium
+3917 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids I; Fabales; Fabaceae; Papilionoideae; Phaseoleae; Vigna
3933 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; Myrtales; Myrtaceae; Eucalyptus
3981 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids I; Malpighiales; Euphorbiaceae; Crotonoideae; Micrandreae; Hevea
3983 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids I; Malpighiales; Euphorbiaceae; Crotonoideae; Manihoteae; Manihot
3988 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids I; Malpighiales; Euphorbiaceae; Acalyphoideae; Acalypheae; Ricinus
3993 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids I; Malpighiales; Euphorbiaceae; Euphorbioideae; Euphorbieae; Euphorbia
4006 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids I; Malpighiales; Linaceae; Linum
-4045 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; asterids; campanulids; Apiales; Apiaceae; Apioideae; apioid superclade; Apium clade; Apium
4054 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; asterids; campanulids; Apiales; Araliaceae; Panax
4058 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; asterids; lamiids; Gentianales; Apocynaceae; Rauvolfioideae; Vinceae; Catharanthus
-4072 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; asterids; lamiids; Solanales; Solanaceae; Capsicum
-4081 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; asterids; lamiids; Solanales; Solanaceae; Solanum; Lycopersicon
-4096 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; asterids; lamiids; Solanales; Solanaceae; Nicotiana
-4097 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; asterids; lamiids; Solanales; Solanaceae; Nicotiana
-4100 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; asterids; lamiids; Solanales; Solanaceae; Nicotiana
-4102 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; asterids; lamiids; Solanales; Solanaceae; Petunia
-4108 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; asterids; lamiids; Solanales; Solanaceae; Solanum
-4113 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; asterids; lamiids; Solanales; Solanaceae; Solanum
+4072 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; asterids; lamiids; Solanales; Solanaceae; Solanoideae; Capsiceae; Capsicum
+4081 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; asterids; lamiids; Solanales; Solanaceae; Solanoideae; Solaneae; Solanum; Lycopersicon
+4096 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; asterids; lamiids; Solanales; Solanaceae; Nicotianoideae; Nicotianeae; Nicotiana
+4097 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; asterids; lamiids; Solanales; Solanaceae; Nicotianoideae; Nicotianeae; Nicotiana
+4100 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; asterids; lamiids; Solanales; Solanaceae; Nicotianoideae; Nicotianeae; Nicotiana
+4108 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; asterids; lamiids; Solanales; Solanaceae; Solanoideae; Solaneae; Solanum
+4113 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; asterids; lamiids; Solanales; Solanaceae; Solanoideae; Solaneae; Solanum
4120 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; asterids; lamiids; Solanales; Convolvulaceae; Ipomoeeae; Ipomoea
4151 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; asterids; lamiids; Lamiales; Plantaginaceae; Antirrhineae; Antirrhinum
4155 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; asterids; lamiids; Lamiales; Phrymaceae; Mimulus
4182 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; asterids; lamiids; Lamiales; Pedaliaceae; Sesamum
+4222 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; asterids; campanulids; Asterales; Asteraceae; Carduoideae; Cardueae; Carthamus
4232 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; asterids; campanulids; Asterales; Asteraceae; Asteroideae; Heliantheae; Helianthus
+4233 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; asterids; campanulids; Asterales; Asteraceae; Asteroideae; Heliantheae; Helianthus
4234 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; asterids; campanulids; Asterales; Asteraceae; Asteroideae; Heliantheae; Helianthus
4236 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; asterids; campanulids; Asterales; Asteraceae; Cichorioideae; Cichorieae; Lactuca
4432 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; Proteales; Nelumbonaceae; Nelumbo
4442 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; asterids; Ericales; Theaceae; Camellia
4498 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; Liliopsida; Poales; Poaceae; BEP clade; Pooideae; Aveneae; Avena
-4511 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; Liliopsida; Poales; Poaceae; PACCAD clade; Chloridoideae; Eragrostideae; Eleusine
4513 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; Liliopsida; Poales; Poaceae; BEP clade; Pooideae; Triticeae; Hordeum
4521 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; Liliopsida; Poales; Poaceae; BEP clade; Pooideae; Poeae; Lolium
4529 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; Liliopsida; Poales; Poaceae; BEP clade; Ehrhartoideae; Oryzeae; Oryza
@@ -155,10 +125,9 @@
4547 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; Liliopsida; Poales; Poaceae; PACCAD clade; Panicoideae; Andropogoneae; Saccharum; Saccharum officinarum complex
4550 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; Liliopsida; Poales; Poaceae; BEP clade; Pooideae; Triticeae; Secale
4558 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; Liliopsida; Poales; Poaceae; PACCAD clade; Panicoideae; Andropogoneae; Sorghum
-4560 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; Liliopsida; Poales; Poaceae; PACCAD clade; Panicoideae; Andropogoneae; Sorghum
4565 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; Liliopsida; Poales; Poaceae; BEP clade; Pooideae; Triticeae; Triticum
+4567 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; Liliopsida; Poales; Poaceae; BEP clade; Pooideae; Triticeae; Triticum
4568 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; Liliopsida; Poales; Poaceae; BEP clade; Pooideae; Triticeae; Triticum
-4571 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; Liliopsida; Poales; Poaceae; BEP clade; Pooideae; Triticeae; Triticum
4573 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; Liliopsida; Poales; Poaceae; BEP clade; Pooideae; Triticeae; Aegilops
4577 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; Liliopsida; Poales; Poaceae; PACCAD clade; Panicoideae; Andropogoneae; Zea
4606 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; Liliopsida; Poales; Poaceae; BEP clade; Pooideae; Poeae; Festuca
@@ -166,62 +135,55 @@
4641 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; Liliopsida; Zingiberales; Musaceae; Musa
4679 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; Liliopsida; Asparagales; Alliaceae; Allium
4686 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; Liliopsida; Asparagales; Asparagaceae; Asparagus
-4690 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; Liliopsida; Liliales; Liliaceae; Lilium
-4754 Eukaryota; Fungi; Ascomycota; Pneumocystidomycetes; Pneumocystidaceae; Pneumocystis
+4754 Eukaryota; Fungi; Dikarya; Ascomycota; Taphrinomycotina; Pneumocystidomycetes; Pneumocystidaceae; Pneumocystis
4787 Eukaryota; stramenopiles; Oomycetes; Peronosporales; Phytophthora
4792 Eukaryota; stramenopiles; Oomycetes; Peronosporales; Phytophthora
-4808 Eukaryota; Fungi; Chytridiomycota; Blastocladiales; Blastocladiaceae; Blastocladiella
-4853 Eukaryota; Fungi; Zygomycota; Zygomycetes; Mucorales; Cunninghamellaceae; Cunninghamella
+4808 Eukaryota; Fungi; Blastocladiomycota; Blastocladiomycetes; Blastocladiales; Blastocladiaceae; Blastocladiella
+4853 Eukaryota; Fungi; Fungi incertae sedis; Basal fungal lineages; Mucoromycotina; Mucorales; Cunninghamellaceae; Cunninghamella
4876 Eukaryota; Fungi; Glomeromycota; Glomeromycetes; Glomerales; Glomeraceae; Glomus
4881 Eukaryota; Ichthyosporea; Ichthyophonida; Amoebidiaceae; Amoebidium
-4896 Eukaryota; Fungi; Ascomycota; Schizosaccharomycetes; Schizosaccharomycetales; Schizosaccharomycetaceae; Schizosaccharomyces
-4905 Eukaryota; Fungi; Ascomycota; Saccharomycotina; Saccharomycetes; Saccharomycetales; Saccharomycetaceae; Pichia
-4911 Eukaryota; Fungi; Ascomycota; Saccharomycotina; Saccharomycetes; Saccharomycetales; Saccharomycetaceae; Kluyveromyces
-4916 Eukaryota; Fungi; Ascomycota; Saccharomycotina; Saccharomycetes; Saccharomycetales; Saccharomycetaceae; Kluyveromyces
-4920 Eukaryota; Fungi; Ascomycota; Saccharomycotina; Saccharomycetes; Saccharomycetales; Saccharomycetaceae; Pichia
-4931 Eukaryota; Fungi; Ascomycota; Saccharomycotina; Saccharomycetes; Saccharomycetales; Saccharomycetaceae; Saccharomyces
-4932 Eukaryota; Fungi; Ascomycota; Saccharomycotina; Saccharomycetes; Saccharomycetales; Saccharomycetaceae; Saccharomyces
-4934 Eukaryota; Fungi; Ascomycota; Saccharomycotina; Saccharomycetes; Saccharomycetales; Saccharomycetaceae; Lachancea
-4952 Eukaryota; Fungi; Ascomycota; Saccharomycotina; Saccharomycetes; Saccharomycetales; Dipodascaceae; Yarrowia
-4956 Eukaryota; Fungi; Ascomycota; Saccharomycotina; Saccharomycetes; Saccharomycetales; Saccharomycetaceae; Zygosaccharomyces
-5011 Eukaryota; Fungi; Ascomycota; Taphrinomycetes; Taphrinales; Taphrinaceae; Taphrina
-5022 Eukaryota; Fungi; Ascomycota; Pezizomycotina; Dothideomycetes; Pleosporales; Leptosphaeriaceae; Leptosphaeria; Leptosphaeria maculans complex
-5037 Eukaryota; Fungi; Ascomycota; Pezizomycotina; Eurotiomycetes; Onygenales; Ajellomycetaceae; Ajellomyces
-5059 Eukaryota; Fungi; Ascomycota; Pezizomycotina; Eurotiomycetes; Eurotiales; Trichocomaceae; mitosporic Trichocomaceae; Aspergillus
-5061 Eukaryota; Fungi; Ascomycota; Pezizomycotina; Eurotiomycetes; Eurotiales; Trichocomaceae; mitosporic Trichocomaceae; Aspergillus
-5062 Eukaryota; Fungi; Ascomycota; Pezizomycotina; Eurotiomycetes; Eurotiales; Trichocomaceae; mitosporic Trichocomaceae; Aspergillus
-5085 Eukaryota; Fungi; Ascomycota; Pezizomycotina; Eurotiomycetes; Eurotiales; Trichocomaceae; mitosporic Trichocomaceae; Aspergillus
-5101 Eukaryota; Fungi; Ascomycota; Ascomycota incertae sedis; Amorphothecaceae; Amorphotheca
-5116 Eukaryota; Fungi; Ascomycota; Pezizomycotina; Sordariomycetes; Sordariomycetidae; Diaporthales; Cryphonectriaceae; Cryphonectria-Endothia complex; Cryphonectria
-5141 Eukaryota; Fungi; Ascomycota; Pezizomycotina; Sordariomycetes; Sordariomycetidae; Sordariales; Sordariaceae; Neurospora
-5180 Eukaryota; Fungi; Ascomycota; Pezizomycotina; Leotiomycetes; Helotiales; Sclerotiniaceae; Sclerotinia
-5270 Eukaryota; Fungi; Basidiomycota; Ustilaginomycetes; Ustilaginomycetidae; Ustilaginales; Ustilaginaceae; Ustilago
-5272 Eukaryota; Fungi; Basidiomycota; Urediniomycetes; Microbotryomycetidae; Microbotryales; Microbotryaceae; Microbotryum
-5278 Eukaryota; Fungi; Basidiomycota; Urediniomycetes; Microbotryomycetidae; Leucosporidiales; Leucosporidium
-5306 Eukaryota; Fungi; Basidiomycota; Hymenomycetes; Homobasidiomycetes; Aphyllophorales; Corticiaceae; Phanerochaete
-5322 Eukaryota; Fungi; Basidiomycota; Hymenomycetes; Homobasidiomycetes; Agaricales; Pleurotaceae; Pleurotus
-5325 Eukaryota; Fungi; Basidiomycota; Hymenomycetes; Homobasidiomycetes; Aphyllophorales; Trametes
-5334 Eukaryota; Fungi; Basidiomycota; Hymenomycetes; Homobasidiomycetes; Agaricales; Schizophyllaceae; Schizophyllum
-5346 Eukaryota; Fungi; Basidiomycota; Hymenomycetes; Homobasidiomycetes; Agaricales; Psathyrellaceae; Coprinopsis
-5353 Eukaryota; Fungi; Basidiomycota; Hymenomycetes; Homobasidiomycetes; Agaricales; Tricholomataceae; Lentinula
-5418 Eukaryota; Fungi; Basidiomycota; Hymenomycetes; Heterobasidiomycetes; Tremellomycetidae; Tremellales; mitosporic Tremellales; Cryptococcus
-5466 Eukaryota; Fungi; Ascomycota; Pezizomycotina; Sordariomycetes; Sordariomycetes incertae sedis; Phyllachorales; Phyllachoraceae; mitosporic Phyllachoraceae; Colletotrichum
-5476 Eukaryota; Fungi; Ascomycota; Saccharomycotina; Saccharomycetes; Saccharomycetales; mitosporic Saccharomycetales; Candida
-5478 Eukaryota; Fungi; Ascomycota; Saccharomycotina; Saccharomycetes; Saccharomycetales; mitosporic Saccharomycetales; Candida
-5480 Eukaryota; Fungi; Ascomycota; Saccharomycotina; Saccharomycetes; Saccharomycetales; mitosporic Saccharomycetales; Candida
-5482 Eukaryota; Fungi; Ascomycota; Saccharomycotina; Saccharomycetes; Saccharomycetales; mitosporic Saccharomycetales; Candida
-5507 Eukaryota; Fungi; Ascomycota; Pezizomycotina; Sordariomycetes; Hypocreomycetidae; Hypocreales; mitosporic Hypocreales; Fusarium; Fusarium oxysporum complex
-5514 Eukaryota; Fungi; Ascomycota; Pezizomycotina; Sordariomycetes; Hypocreomycetidae; Hypocreales; mitosporic Hypocreales; Fusarium
-5518 Eukaryota; Fungi; Ascomycota; Pezizomycotina; Sordariomycetes; Hypocreomycetidae; Hypocreales; Nectriaceae; Gibberella
-5530 Eukaryota; Fungi; Ascomycota; Pezizomycotina; Sordariomycetes; Hypocreomycetidae; Hypocreales; Clavicipitaceae; mitosporic Clavicipitaceae; Metarhizium
-5541 Eukaryota; Fungi; Ascomycota; mitosporic Ascomycota; Thermomyces
-5544 Eukaryota; Fungi; Ascomycota; Pezizomycotina; Sordariomycetes; Hypocreomycetidae; Hypocreales; Hypocreaceae; Hypocrea
-5551 Eukaryota; Fungi; Ascomycota; Pezizomycotina; Eurotiomycetes; Onygenales; Arthrodermataceae; mitosporic Arthrodermataceae; Trichophyton
-5580 Eukaryota; Fungi; Ascomycota; Pezizomycotina; Dothideomycetes et Chaetothyriomycetes incertae sedis; Dothioraceae; mitosporic Dothioraceae; Aureobasidium
-5599 Eukaryota; Fungi; Ascomycota; Pezizomycotina; Dothideomycetes; Pleosporales; Pleosporaceae; mitosporic Pleosporaceae; Alternaria; Alternaria alternata group
-5606 Eukaryota; Fungi; Ascomycota; mitosporic Ascomycota; Saitoella
+4896 Eukaryota; Fungi; Dikarya; Ascomycota; Taphrinomycotina; Schizosaccharomycetes; Schizosaccharomycetales; Schizosaccharomycetaceae; Schizosaccharomyces
+4905 Eukaryota; Fungi; Dikarya; Ascomycota; Saccharomycotina; Saccharomycetes; Saccharomycetales; Saccharomycetaceae; Pichia
+4911 Eukaryota; Fungi; Dikarya; Ascomycota; Saccharomycotina; Saccharomycetes; Saccharomycetales; Saccharomycetaceae; Kluyveromyces
+4916 Eukaryota; Fungi; Dikarya; Ascomycota; Saccharomycotina; Saccharomycetes; Saccharomycetales; Saccharomycetaceae; Kluyveromyces
+4920 Eukaryota; Fungi; Dikarya; Ascomycota; Saccharomycotina; Saccharomycetes; Saccharomycetales; Saccharomycetaceae; Pichia
+4932 Eukaryota; Fungi; Dikarya; Ascomycota; Saccharomycotina; Saccharomycetes; Saccharomycetales; Saccharomycetaceae; Saccharomyces
+4934 Eukaryota; Fungi; Dikarya; Ascomycota; Saccharomycotina; Saccharomycetes; Saccharomycetales; Saccharomycetaceae; Lachancea
+4952 Eukaryota; Fungi; Dikarya; Ascomycota; Saccharomycotina; Saccharomycetes; Saccharomycetales; Dipodascaceae; Yarrowia
+4956 Eukaryota; Fungi; Dikarya; Ascomycota; Saccharomycotina; Saccharomycetes; Saccharomycetales; Saccharomycetaceae; Zygosaccharomyces
+5007 Eukaryota; Fungi; Dikarya; Ascomycota; Saccharomycotina; Saccharomycetes; Saccharomycetales; Saccharomycetaceae; Dekkera
+5011 Eukaryota; Fungi; Dikarya; Ascomycota; Taphrinomycotina; Taphrinomycetes; Taphrinales; Taphrinaceae; Taphrina
+5037 Eukaryota; Fungi; Dikarya; Ascomycota; Pezizomycotina; Eurotiomycetes; Eurotiomycetidae; Onygenales; Ajellomycetaceae; Ajellomyces
+5059 Eukaryota; Fungi; Dikarya; Ascomycota; Pezizomycotina; Eurotiomycetes; Eurotiomycetidae; Eurotiales; Trichocomaceae; mitosporic Trichocomaceae; Aspergillus
+5061 Eukaryota; Fungi; Dikarya; Ascomycota; Pezizomycotina; Eurotiomycetes; Eurotiomycetidae; Eurotiales; Trichocomaceae; mitosporic Trichocomaceae; Aspergillus
+5062 Eukaryota; Fungi; Dikarya; Ascomycota; Pezizomycotina; Eurotiomycetes; Eurotiomycetidae; Eurotiales; Trichocomaceae; mitosporic Trichocomaceae; Aspergillus
+5101 Eukaryota; Fungi; Dikarya; Ascomycota; Ascomycota incertae sedis; Amorphothecaceae; Amorphotheca
+5116 Eukaryota; Fungi; Dikarya; Ascomycota; Pezizomycotina; Sordariomycetes; Sordariomycetidae; Diaporthales; Cryphonectriaceae; Cryphonectria-Endothia complex; Cryphonectria
+5141 Eukaryota; Fungi; Dikarya; Ascomycota; Pezizomycotina; Sordariomycetes; Sordariomycetidae; Sordariales; Sordariaceae; Neurospora
+5180 Eukaryota; Fungi; Dikarya; Ascomycota; Pezizomycotina; Leotiomycetes; Helotiales; Sclerotiniaceae; Sclerotinia
+5264 Eukaryota; Fungi; Dikarya; Basidiomycota; Pucciniomycotina; Pucciniomycetes; Pucciniales; Pucciniaceae; Uromyces
+5270 Eukaryota; Fungi; Dikarya; Basidiomycota; Ustilaginomycotina; Ustilaginomycetes; Ustilaginales; Ustilaginaceae; Ustilago
+5272 Eukaryota; Fungi; Dikarya; Basidiomycota; Pucciniomycotina; Microbotryomycetes; Microbotryales; Microbotryaceae; Microbotryum
+5278 Eukaryota; Fungi; Dikarya; Basidiomycota; Pucciniomycotina; Microbotryomycetes; Leucosporidiales; Leucosporidium
+5306 Eukaryota; Fungi; Dikarya; Basidiomycota; Agaricomycotina; Agaricomycetes; Corticiales; Corticiaceae; Phanerochaete
+5325 Eukaryota; Fungi; Dikarya; Basidiomycota; Agaricomycotina; Agaricomycetes; Polyporales; Trametes
+5346 Eukaryota; Fungi; Dikarya; Basidiomycota; Agaricomycotina; Agaricomycetes; Agaricomycetidae; Agaricales; Psathyrellaceae; Coprinopsis
+5353 Eukaryota; Fungi; Dikarya; Basidiomycota; Agaricomycotina; Agaricomycetes; Agaricomycetidae; Agaricales; Tricholomataceae; Lentinula
+5418 Eukaryota; Fungi; Dikarya; Basidiomycota; Agaricomycotina; Tremellomycetes; Tremellales; mitosporic Tremellales; Cryptococcus
+5476 Eukaryota; Fungi; Dikarya; Ascomycota; Saccharomycotina; Saccharomycetes; Saccharomycetales; mitosporic Saccharomycetales; Candida
+5478 Eukaryota; Fungi; Dikarya; Ascomycota; Saccharomycotina; Saccharomycetes; Saccharomycetales; mitosporic Saccharomycetales; Candida
+5480 Eukaryota; Fungi; Dikarya; Ascomycota; Saccharomycotina; Saccharomycetes; Saccharomycetales; mitosporic Saccharomycetales; Candida
+5482 Eukaryota; Fungi; Dikarya; Ascomycota; Saccharomycotina; Saccharomycetes; Saccharomycetales; mitosporic Saccharomycetales; Candida
+5508 Eukaryota; Fungi; Dikarya; Ascomycota; Pezizomycotina; Sordariomycetes; Hypocreomycetidae; Hypocreales; mitosporic Hypocreales; Fusarium; Fusarium oxysporum species complex
+5514 Eukaryota; Fungi; Dikarya; Ascomycota; Pezizomycotina; Sordariomycetes; Hypocreomycetidae; Hypocreales; mitosporic Hypocreales; Fusarium
+5518 Eukaryota; Fungi; Dikarya; Ascomycota; Pezizomycotina; Sordariomycetes; Hypocreomycetidae; Hypocreales; Nectriaceae; Gibberella
+5530 Eukaryota; Fungi; Dikarya; Ascomycota; Pezizomycotina; Sordariomycetes; Hypocreomycetidae; Hypocreales; Clavicipitaceae; mitosporic Clavicipitaceae; Metarhizium
+5541 Eukaryota; Fungi; Dikarya; Ascomycota; mitosporic Ascomycota; Thermomyces
+5544 Eukaryota; Fungi; Dikarya; Ascomycota; Pezizomycotina; Sordariomycetes; Hypocreomycetidae; Hypocreales; Hypocreaceae; Hypocrea
+5551 Eukaryota; Fungi; Dikarya; Ascomycota; Pezizomycotina; Eurotiomycetes; Eurotiomycetidae; Onygenales; Arthrodermataceae; mitosporic Arthrodermataceae; Trichophyton
+5580 Eukaryota; Fungi; Dikarya; Ascomycota; Pezizomycotina; Dothideomycetes et Chaetothyriomycetes incertae sedis; Dothioraceae; mitosporic Dothioraceae; Aureobasidium
+5606 Eukaryota; Fungi; Dikarya; Ascomycota; Taphrinomycotina; Taphrinomycotina incertae sedis; Saitoella
5660 Eukaryota; Euglenozoa; Kinetoplastida; Trypanosomatidae; Leishmania; Leishmania braziliensis species complex
-5661 Eukaryota; Euglenozoa; Kinetoplastida; Trypanosomatidae; Leishmania
5664 Eukaryota; Euglenozoa; Kinetoplastida; Trypanosomatidae; Leishmania
5691 Eukaryota; Euglenozoa; Kinetoplastida; Trypanosomatidae; Trypanosoma
5693 Eukaryota; Euglenozoa; Kinetoplastida; Trypanosomatidae; Trypanosoma; Schizotrypanum
@@ -232,32 +194,34 @@
5759 Eukaryota; Entamoebidae; Entamoeba
5778 Eukaryota; Lobosea; Euamoebida; Hartmannellidae; Hartmannella
5791 Eukaryota; Mycetozoa; Myxogastria; Myxogastromycetidae; Physariida; Physarum
-5802 Eukaryota; Alveolata; Apicomplexa; Coccidia; Eimeriida; Eimeriidae; Eimeria
-5807 Eukaryota; Alveolata; Apicomplexa; Coccidia; Eimeriida; Cryptosporidiidae; Cryptosporidium
-5811 Eukaryota; Alveolata; Apicomplexa; Coccidia; Eimeriida; Sarcocystidae; Toxoplasma
-5821 Eukaryota; Alveolata; Apicomplexa; Haemosporida; Plasmodium
-5825 Eukaryota; Alveolata; Apicomplexa; Haemosporida; Plasmodium
-5833 Eukaryota; Alveolata; Apicomplexa; Haemosporida; Plasmodium
-5855 Eukaryota; Alveolata; Apicomplexa; Haemosporida; Plasmodium
-5861 Eukaryota; Alveolata; Apicomplexa; Haemosporida; Plasmodium
-5874 Eukaryota; Alveolata; Apicomplexa; Piroplasmida; Theileriidae; Theileria
-5875 Eukaryota; Alveolata; Apicomplexa; Piroplasmida; Theileriidae; Theileria
-5888 Eukaryota; Alveolata; Ciliophora; Oligohymenophorea; Peniculida; Parameciidae; Paramecium
-5911 Eukaryota; Alveolata; Ciliophora; Oligohymenophorea; Hymenostomatida; Tetrahymenina; Tetrahymenidae; Tetrahymena
+5802 Eukaryota; Alveolata; Apicomplexa; Coccidia; Eucoccidiorida; Eimeriorina; Eimeriidae; Eimeria
+5807 Eukaryota; Alveolata; Apicomplexa; Coccidia; Eucoccidiorida; Eimeriorina; Cryptosporidiidae; Cryptosporidium
+5811 Eukaryota; Alveolata; Apicomplexa; Coccidia; Eucoccidiorida; Eimeriorina; Sarcocystidae; Toxoplasma
+5821 Eukaryota; Alveolata; Apicomplexa; Aconoidasida; Haemosporida; Plasmodium; Plasmodium (Vinckeia)
+5823 Eukaryota; Alveolata; Apicomplexa; Aconoidasida; Haemosporida; Plasmodium; Plasmodium (Vinckeia)
+5825 Eukaryota; Alveolata; Apicomplexa; Aconoidasida; Haemosporida; Plasmodium; Plasmodium (Vinckeia)
+5833 Eukaryota; Alveolata; Apicomplexa; Aconoidasida; Haemosporida; Plasmodium; Plasmodium (Laverania)
+5855 Eukaryota; Alveolata; Apicomplexa; Aconoidasida; Haemosporida; Plasmodium; Plasmodium (Plasmodium)
+5861 Eukaryota; Alveolata; Apicomplexa; Aconoidasida; Haemosporida; Plasmodium; Plasmodium (Vinckeia)
+5865 Eukaryota; Alveolata; Apicomplexa; Aconoidasida; Piroplasmida; Babesiidae; Babesia
+5874 Eukaryota; Alveolata; Apicomplexa; Aconoidasida; Piroplasmida; Theileriidae; Theileria
+5875 Eukaryota; Alveolata; Apicomplexa; Aconoidasida; Piroplasmida; Theileriidae; Theileria
+5888 Eukaryota; Alveolata; Ciliophora; Intramacronucleata; Oligohymenophorea; Peniculida; Parameciidae; Paramecium
+5911 Eukaryota; Alveolata; Ciliophora; Intramacronucleata; Oligohymenophorea; Hymenostomatida; Tetrahymenina; Tetrahymenidae; Tetrahymena
+5932 Eukaryota; Alveolata; Ciliophora; Intramacronucleata; Oligohymenophorea; Hymenostomatida; Ophryoglenina; Ichthyophthirius
6085 Eukaryota; Metazoa; Cnidaria; Hydrozoa; Hydroida; Anthomedusae; Hydridae; Hydra
6087 Eukaryota; Metazoa; Cnidaria; Hydrozoa; Hydroida; Anthomedusae; Hydridae; Hydra
-6088 Eukaryota; Metazoa; Cnidaria; Hydrozoa; Hydroida; Anthomedusae; Hydridae; Hydra
6096 Eukaryota; Metazoa; Cnidaria; Hydrozoa; Hydroida; Anthomedusae; Hydractiniidae; Podocoryne
6131 Eukaryota; Metazoa; Cnidaria; Anthozoa; Hexacorallia; Scleractinia; Astrocoeniina; Acroporidae; Acropora
6161 Eukaryota; Metazoa; Platyhelminthes; Turbellaria; Seriata; Tricladida; Paludicola; Dugesiidae; Dugesia
6182 Eukaryota; Metazoa; Platyhelminthes; Trematoda; Digenea; Strigeidida; Schistosomatoidea; Schistosomatidae; Schistosoma
6183 Eukaryota; Metazoa; Platyhelminthes; Trematoda; Digenea; Strigeidida; Schistosomatoidea; Schistosomatidae; Schistosoma
+6198 Eukaryota; Metazoa; Platyhelminthes; Trematoda; Digenea; Opisthorchiida; Opisthorchiata; Opisthorchioidea; Opisthorchiidae; Opisthorchis
+6204 Eukaryota; Metazoa; Platyhelminthes; Cestoda; Eucestoda; Cyclophyllidea; Taeniidae; Taenia
6210 Eukaryota; Metazoa; Platyhelminthes; Cestoda; Eucestoda; Cyclophyllidea; Taeniidae; Echinococcus
-6211 Eukaryota; Metazoa; Platyhelminthes; Cestoda; Eucestoda; Cyclophyllidea; Taeniidae; Echinococcus
6238 Eukaryota; Metazoa; Nematoda; Chromadorea; Rhabditida; Rhabditoidea; Rhabditidae; Peloderinae; Caenorhabditis
6239 Eukaryota; Metazoa; Nematoda; Chromadorea; Rhabditida; Rhabditoidea; Rhabditidae; Peloderinae; Caenorhabditis
6248 Eukaryota; Metazoa; Nematoda; Chromadorea; Rhabditida; Panagrolaimoidea; Strongyloididae; Strongyloides
-6252 Eukaryota; Metazoa; Nematoda; Chromadorea; Ascaridida; Ascaridoidea; Ascarididae; Ascaris
6253 Eukaryota; Metazoa; Nematoda; Chromadorea; Ascaridida; Ascaridoidea; Ascarididae; Ascaris
6265 Eukaryota; Metazoa; Nematoda; Chromadorea; Ascaridida; Ascaridoidea; Toxocaridae; Toxocara
6279 Eukaryota; Metazoa; Nematoda; Chromadorea; Spirurida; Filarioidea; Onchocercidae; Brugia
@@ -269,48 +233,45 @@
6304 Eukaryota; Metazoa; Nematoda; Chromadorea; Tylenchida; Tylenchina; Tylenchoidea; Meloidogynidae; Meloidogyninae; Meloidogyne
6305 Eukaryota; Metazoa; Nematoda; Chromadorea; Tylenchida; Tylenchina; Tylenchoidea; Meloidogynidae; Meloidogyninae; Meloidogyne
6306 Eukaryota; Metazoa; Nematoda; Chromadorea; Tylenchida; Tylenchina; Tylenchoidea; Meloidogynidae; Meloidogyninae; Meloidogyne
-6313 Eukaryota; Metazoa; Nematoda; Chromadorea; Rhabditida; Strongylida; Metastrongyloidea; Angiostrongylidae; Angiostrongylus
6317 Eukaryota; Metazoa; Nematoda; Chromadorea; Rhabditida; Strongylida; Trichostrongyloidea; Haemonchidae; Ostertagiinae; Ostertagia
6325 Eukaryota; Metazoa; Nematoda; Chromadorea; Tylenchida; Aphelenchoidoidea; Aphelenchoididae; Bursaphelenchus
6326 Eukaryota; Metazoa; Nematoda; Chromadorea; Tylenchida; Aphelenchoidoidea; Aphelenchoididae; Bursaphelenchus
6334 Eukaryota; Metazoa; Nematoda; Enoplea; Trichocephalida; Trichinellidae; Trichinella
-6359 Eukaryota; Metazoa; Annelida; Polychaeta; Palpata; Aciculata; Phyllodocida; Nereididae; Platynereis
+6396 Eukaryota; Metazoa; Annelida; Clitellata; Oligochaeta; Haplotaxida; Lumbricina; Lumbricidae; Eisenia
6500 Eukaryota; Metazoa; Mollusca; Gastropoda; Orthogastropoda; Apogastropoda; Heterobranchia; Euthyneura; Opisthobranchia; Anaspidea; Aplysioidea; Aplysiidae; Aplysia
-6523 Eukaryota; Metazoa; Mollusca; Gastropoda; Pulmonata; Basommatophora; Lymnaeoidea; Lymnaeidae; Lymnaea
6526 Eukaryota; Metazoa; Mollusca; Gastropoda; Pulmonata; Basommatophora; Lymnaeoidea; Planorbidae; Biomphalaria
-6550 Eukaryota; Metazoa; Mollusca; Bivalvia; Pteriomorphia; Mytiloida; Mytiloidea; Mytilidae; Mytilinae; Mytilus
+6549 Eukaryota; Metazoa; Mollusca; Bivalvia; Pteriomorphia; Mytiloida; Mytiloidea; Mytilidae; Mytilinae; Mytilus
6565 Eukaryota; Metazoa; Mollusca; Bivalvia; Pteriomorphia; Ostreoida; Ostreoidea; Ostreidae; Crassostrea
-6579 Eukaryota; Metazoa; Mollusca; Bivalvia; Pteriomorphia; Pectinoida; Pectinoidea; Pectinidae; Pecten
6613 Eukaryota; Metazoa; Mollusca; Cephalopoda; Coleoidea; Neocoleoidea; Decapodiformes; Sepioidea; Sepiolidae; Euprymna
-6669 Eukaryota; Metazoa; Arthropoda; Crustacea; Branchiopoda; Diplostraca; Cladocera; Anomopoda; Daphniidae; Daphnia
6687 Eukaryota; Metazoa; Arthropoda; Crustacea; Malacostraca; Eumalacostraca; Eucarida; Decapoda; Dendrobranchiata; Penaeoidea; Penaeidae; Penaeus
6689 Eukaryota; Metazoa; Arthropoda; Crustacea; Malacostraca; Eumalacostraca; Eucarida; Decapoda; Dendrobranchiata; Penaeoidea; Penaeidae; Litopenaeus
6706 Eukaryota; Metazoa; Arthropoda; Crustacea; Malacostraca; Eumalacostraca; Eucarida; Decapoda; Pleocyemata; Astacidea; Nephropoidea; Nephropidae; Homarus
6759 Eukaryota; Metazoa; Arthropoda; Crustacea; Malacostraca; Eumalacostraca; Eucarida; Decapoda; Pleocyemata; Brachyura; Eubrachyura; Portunoidea; Portunidae; Carcinus
6763 Eukaryota; Metazoa; Arthropoda; Crustacea; Malacostraca; Eumalacostraca; Eucarida; Decapoda; Pleocyemata; Brachyura; Eubrachyura; Portunoidea; Portunidae; Callinectes
6772 Eukaryota; Metazoa; Arthropoda; Crustacea; Malacostraca; Eumalacostraca; Eucarida; Decapoda; Pleocyemata; Brachyura; Eubrachyura; Ocypodoidea; Ocypodidae; Ocypodinae; Uca complex; Celuca
-6941 Eukaryota; Metazoa; Arthropoda; Chelicerata; Arachnida; Acari; Parasitiformes; Ixodida; Ixodoidea; Ixodidae; Boophilus
-6943 Eukaryota; Metazoa; Arthropoda; Chelicerata; Arachnida; Acari; Parasitiformes; Ixodida; Ixodoidea; Ixodidae; Amblyomma
-6945 Eukaryota; Metazoa; Arthropoda; Chelicerata; Arachnida; Acari; Parasitiformes; Ixodida; Ixodoidea; Ixodidae; Ixodes
-6954 Eukaryota; Metazoa; Arthropoda; Chelicerata; Arachnida; Acari; Acariformes; Sarcoptiformes; Astigmata; Psoroptidia; Analgoidea; Pyroglyphidae; Dermatophagoides
-6984 Eukaryota; Metazoa; Arthropoda; Hexapoda; Insecta; Pterygota; Neoptera; Orthopteroidea; Dictyoptera; Blattaria; Blaberoidea; Blaberidae; Diplopterinae; Diploptera
+6837 Eukaryota; Metazoa; Arthropoda; Crustacea; Maxillopoda; Copepoda; Calanoida; Calanidae; Calanus
+6941 Eukaryota; Metazoa; Arthropoda; Chelicerata; Arachnida; Acari; Parasitiformes; Ixodida; Ixodoidea; Ixodidae; Rhipicephalinae; Rhipicephalus; Boophilus
+6943 Eukaryota; Metazoa; Arthropoda; Chelicerata; Arachnida; Acari; Parasitiformes; Ixodida; Ixodoidea; Ixodidae; Amblyomminae; Amblyomma
+6945 Eukaryota; Metazoa; Arthropoda; Chelicerata; Arachnida; Acari; Parasitiformes; Ixodida; Ixodoidea; Ixodidae; Ixodinae; Ixodes
+6999 Eukaryota; Metazoa; Arthropoda; Hexapoda; Insecta; Pterygota; Neoptera; Orthopteroidea; Orthoptera; Ensifera; Grylloidea; Gryllidae; Gryllinae; Gryllus
7004 Eukaryota; Metazoa; Arthropoda; Hexapoda; Insecta; Pterygota; Neoptera; Orthopteroidea; Orthoptera; Caelifera; Acridomorpha; Acridoidea; Acrididae; Oedipodinae; Locusta
7029 Eukaryota; Metazoa; Arthropoda; Hexapoda; Insecta; Pterygota; Neoptera; Paraneoptera; Hemiptera; Sternorrhyncha; Aphidiformes; Aphidoidea; Aphididae; Macrosiphini; Acyrthosiphon
7038 Eukaryota; Metazoa; Arthropoda; Hexapoda; Insecta; Pterygota; Neoptera; Paraneoptera; Hemiptera; Sternorrhyncha; Aleyrodiformes; Aleyrodoidea; Aleyrodidae; Aleyrodinae; Bemisia
7070 Eukaryota; Metazoa; Arthropoda; Hexapoda; Insecta; Pterygota; Neoptera; Endopterygota; Coleoptera; Polyphaga; Cucujiformia; Tenebrionidae; Tribolium
-7091 Eukaryota; Metazoa; Arthropoda; Hexapoda; Insecta; Pterygota; Neoptera; Endopterygota; Lepidoptera; Glossata; Ditrysia; Bombycoidea; Bombycidae; Bombyx
+7091 Eukaryota; Metazoa; Arthropoda; Hexapoda; Insecta; Pterygota; Neoptera; Endopterygota; Lepidoptera; Glossata; Ditrysia; Bombycoidea; Bombycidae; Bombycinae; Bombyx
7108 Eukaryota; Metazoa; Arthropoda; Hexapoda; Insecta; Pterygota; Neoptera; Endopterygota; Lepidoptera; Glossata; Ditrysia; Noctuoidea; Noctuidae; Amphipyrinae; Spodoptera
7130 Eukaryota; Metazoa; Arthropoda; Hexapoda; Insecta; Pterygota; Neoptera; Endopterygota; Lepidoptera; Glossata; Ditrysia; Sphingoidea; Sphingidae; Sphinginae; Manduca
7153 Eukaryota; Metazoa; Arthropoda; Hexapoda; Insecta; Pterygota; Neoptera; Endopterygota; Diptera; Nematocera; Chironomoidea; Chironomidae; Chironominae; Chironomus
7159 Eukaryota; Metazoa; Arthropoda; Hexapoda; Insecta; Pterygota; Neoptera; Endopterygota; Diptera; Nematocera; Culicoidea; Culicidae; Culicinae; Culicini; Aedes; Stegomyia
7165 Eukaryota; Metazoa; Arthropoda; Hexapoda; Insecta; Pterygota; Neoptera; Endopterygota; Diptera; Nematocera; Culicoidea; Culicidae; Anophelinae; Anopheles
+7167 Eukaryota; Metazoa; Arthropoda; Hexapoda; Insecta; Pterygota; Neoptera; Endopterygota; Diptera; Nematocera; Culicoidea; Culicidae; Anophelinae; Anopheles
+7176 Eukaryota; Metazoa; Arthropoda; Hexapoda; Insecta; Pterygota; Neoptera; Endopterygota; Diptera; Nematocera; Culicoidea; Culicidae; Culicinae; Culicini; Culex; Culex
7186 Eukaryota; Metazoa; Arthropoda; Hexapoda; Insecta; Pterygota; Neoptera; Endopterygota; Diptera; Nematocera; Sciaroidea; Sciaridae; Rhynchosciara
7200 Eukaryota; Metazoa; Arthropoda; Hexapoda; Insecta; Pterygota; Neoptera; Endopterygota; Diptera; Nematocera; Psychodoidea; Psychodidae; Lutzomyia; Lutzomyia
7217 Eukaryota; Metazoa; Arthropoda; Hexapoda; Insecta; Pterygota; Neoptera; Endopterygota; Diptera; Brachycera; Muscomorpha; Ephydroidea; Drosophilidae; Drosophila
7220 Eukaryota; Metazoa; Arthropoda; Hexapoda; Insecta; Pterygota; Neoptera; Endopterygota; Diptera; Brachycera; Muscomorpha; Ephydroidea; Drosophilidae; Drosophila
7222 Eukaryota; Metazoa; Arthropoda; Hexapoda; Insecta; Pterygota; Neoptera; Endopterygota; Diptera; Brachycera; Muscomorpha; Ephydroidea; Drosophilidae; Drosophila
7227 Eukaryota; Metazoa; Arthropoda; Hexapoda; Insecta; Pterygota; Neoptera; Endopterygota; Diptera; Brachycera; Muscomorpha; Ephydroidea; Drosophilidae; Drosophila
-7229 Eukaryota; Metazoa; Arthropoda; Hexapoda; Insecta; Pterygota; Neoptera; Endopterygota; Diptera; Brachycera; Muscomorpha; Ephydroidea; Drosophilidae; Drosophila
7230 Eukaryota; Metazoa; Arthropoda; Hexapoda; Insecta; Pterygota; Neoptera; Endopterygota; Diptera; Brachycera; Muscomorpha; Ephydroidea; Drosophilidae; Drosophila
7234 Eukaryota; Metazoa; Arthropoda; Hexapoda; Insecta; Pterygota; Neoptera; Endopterygota; Diptera; Brachycera; Muscomorpha; Ephydroidea; Drosophilidae; Drosophila
7237 Eukaryota; Metazoa; Arthropoda; Hexapoda; Insecta; Pterygota; Neoptera; Endopterygota; Diptera; Brachycera; Muscomorpha; Ephydroidea; Drosophilidae; Drosophila
@@ -320,10 +281,11 @@
7245 Eukaryota; Metazoa; Arthropoda; Hexapoda; Insecta; Pterygota; Neoptera; Endopterygota; Diptera; Brachycera; Muscomorpha; Ephydroidea; Drosophilidae; Drosophila
7260 Eukaryota; Metazoa; Arthropoda; Hexapoda; Insecta; Pterygota; Neoptera; Endopterygota; Diptera; Brachycera; Muscomorpha; Ephydroidea; Drosophilidae; Drosophila
7425 Eukaryota; Metazoa; Arthropoda; Hexapoda; Insecta; Pterygota; Neoptera; Endopterygota; Hymenoptera; Apocrita; Chalcidoidea; Pteromalidae; Pteromalinae; Nasonia
+7426 Eukaryota; Metazoa; Arthropoda; Hexapoda; Insecta; Pterygota; Neoptera; Endopterygota; Hymenoptera; Apocrita; Chalcidoidea; Pteromalidae; Pteromalinae; Nasonia
7460 Eukaryota; Metazoa; Arthropoda; Hexapoda; Insecta; Pterygota; Neoptera; Endopterygota; Hymenoptera; Apocrita; Aculeata; Apoidea; Apidae; Apis
-7515 Eukaryota; Metazoa; Arthropoda; Hexapoda; Insecta; Pterygota; Neoptera; Endopterygota; Siphonaptera; Pulicidae; Pulicinae; Ctenocephalides
+7515 Eukaryota; Metazoa; Arthropoda; Hexapoda; Insecta; Pterygota; Neoptera; Endopterygota; Siphonaptera; Pulicidae; Archaeopsyllinae; Ctenocephalides
7539 Eukaryota; Metazoa; Arthropoda; Hexapoda; Insecta; Pterygota; Neoptera; Endopterygota; Coleoptera; Polyphaga; Cucujiformia; Chrysomeloidea; Chrysomelidae; Chrysomelinae; Doryphorini; Leptinotarsa
-7594 Eukaryota; Metazoa; Echinodermata; Eleutherozoa; Asterozoa; Asteroidea; Valvatacea; Valvatida; Asterinidae; Asterina
+7594 Eukaryota; Metazoa; Echinodermata; Eleutherozoa; Asterozoa; Asteroidea; Valvatacea; Valvatida; Asterinidae; Patiria
7650 Eukaryota; Metazoa; Echinodermata; Eleutherozoa; Echinozoa; Echinoidea; Euechinoidea; Echinacea; Echinoida; Strongylocentrotidae; Hemicentrotus
7656 Eukaryota; Metazoa; Echinodermata; Eleutherozoa; Echinozoa; Echinoidea; Euechinoidea; Echinacea; Echinoida; Echinidae; Paracentrotus
7668 Eukaryota; Metazoa; Echinodermata; Eleutherozoa; Echinozoa; Echinoidea; Euechinoidea; Echinacea; Echinoida; Strongylocentrotidae; Strongylocentrotus
@@ -334,42 +296,39 @@
7764 Eukaryota; Metazoa; Chordata; Craniata; Hyperotreti; Myxiniformes; Myxinidae; Eptatretinae; Eptatretus
7782 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Chondrichthyes; Elasmobranchii; Squalea; Hypnosqualea; Pristiorajea; Batoidea; Rajiformes; Rajidae; Leucoraja
7797 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Chondrichthyes; Elasmobranchii; Squalea; Hypnosqualea; Squaliformes; Squaloidei; Squalidae; Squalus
-7801 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Chondrichthyes; Elasmobranchii; Galeomorphii; Galeoidea; Orectolobiformes; Ginglymostomatidae; Ginglymostoma
7868 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Chondrichthyes; Holocephali; Chimaeriformes; Callorhinchidae; Callorhinchus
7904 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Actinopterygii; Chondrostei; Acipenseriformes; Acipenseridae; Acipenser
7955 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Actinopterygii; Neopterygii; Teleostei; Ostariophysi; Cypriniformes; Cyprinidae; Danio
-7957 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Actinopterygii; Neopterygii; Teleostei; Ostariophysi; Cypriniformes; Cyprinidae; Carassius
7962 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Actinopterygii; Neopterygii; Teleostei; Ostariophysi; Cypriniformes; Cyprinidae; Cyprinus
7998 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Actinopterygii; Neopterygii; Teleostei; Ostariophysi; Siluriformes; Ictaluridae; Ictalurus
+8010 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Actinopterygii; Neopterygii; Teleostei; Euteleostei; Esociformes; Esocidae; Esox
8014 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Actinopterygii; Neopterygii; Teleostei; Euteleostei; Protacanthopterygii; Salmoniformes; Osmeridae; Osmerus
8022 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Actinopterygii; Neopterygii; Teleostei; Euteleostei; Protacanthopterygii; Salmoniformes; Salmonidae; Oncorhynchus
8023 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Actinopterygii; Neopterygii; Teleostei; Euteleostei; Protacanthopterygii; Salmoniformes; Salmonidae; Oncorhynchus
8030 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Actinopterygii; Neopterygii; Teleostei; Euteleostei; Protacanthopterygii; Salmoniformes; Salmonidae; Salmo
-8032 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Actinopterygii; Neopterygii; Teleostei; Euteleostei; Protacanthopterygii; Salmoniformes; Salmonidae; Salmo
+8038 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Actinopterygii; Neopterygii; Teleostei; Euteleostei; Protacanthopterygii; Salmoniformes; Salmonidae; Salvelinus
8049 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Actinopterygii; Neopterygii; Teleostei; Euteleostei; Neoteleostei; Acanthomorpha; Paracanthopterygii; Gadiformes; Gadidae; Gadus
8078 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Actinopterygii; Neopterygii; Teleostei; Euteleostei; Neoteleostei; Acanthomorpha; Acanthopterygii; Percomorpha; Atherinomorpha; Cyprinodontiformes; Fundulidae; Fundulus
-8083 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Actinopterygii; Neopterygii; Teleostei; Euteleostei; Neoteleostei; Acanthomorpha; Acanthopterygii; Percomorpha; Atherinomorpha; Cyprinodontiformes; Poeciliidae; Xiphophorus
+8081 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Actinopterygii; Neopterygii; Teleostei; Euteleostei; Neoteleostei; Acanthomorpha; Acanthopterygii; Percomorpha; Atherinomorpha; Cyprinodontiformes; Poeciliidae; Poecilia
8090 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Actinopterygii; Neopterygii; Teleostei; Euteleostei; Neoteleostei; Acanthomorpha; Acanthopterygii; Percomorpha; Atherinomorpha; Beloniformes; Adrianichthyidae; Oryziinae; Oryzias
8128 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Actinopterygii; Neopterygii; Teleostei; Euteleostei; Neoteleostei; Acanthomorpha; Acanthopterygii; Percomorpha; Perciformes; Labroidei; Cichlidae; African cichlids; Pseudocrenilabrinae; Tilapiini; Oreochromis
8153 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Actinopterygii; Neopterygii; Teleostei; Euteleostei; Neoteleostei; Acanthomorpha; Acanthopterygii; Percomorpha; Perciformes; Labroidei; Cichlidae; African cichlids; Pseudocrenilabrinae; Haplochromini; Astatotilapia
-8168 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Actinopterygii; Neopterygii; Teleostei; Euteleostei; Neoteleostei; Acanthomorpha; Acanthopterygii; Percomorpha; Perciformes; Percoidei; Percidae; Perca
8175 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Actinopterygii; Neopterygii; Teleostei; Euteleostei; Neoteleostei; Acanthomorpha; Acanthopterygii; Percomorpha; Perciformes; Percoidei; Sparidae; Sparus
8222 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Actinopterygii; Neopterygii; Teleostei; Euteleostei; Neoteleostei; Acanthomorpha; Acanthopterygii; Percomorpha; Perciformes; Gobioidei; Gobiidae; Gillichthys
8237 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Actinopterygii; Neopterygii; Teleostei; Euteleostei; Neoteleostei; Acanthomorpha; Acanthopterygii; Percomorpha; Perciformes; Scombroidei; Scombridae; Thunnus
-8245 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Actinopterygii; Neopterygii; Teleostei; Euteleostei; Neoteleostei; Acanthomorpha; Acanthopterygii; Percomorpha; Perciformes; Scombroidei; Xiphiidae; Xiphias
8255 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Actinopterygii; Neopterygii; Teleostei; Euteleostei; Neoteleostei; Acanthomorpha; Acanthopterygii; Percomorpha; Pleuronectiformes; Pleuronectoidei; Paralichthyidae; Paralichthys
8260 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Actinopterygii; Neopterygii; Teleostei; Euteleostei; Neoteleostei; Acanthomorpha; Acanthopterygii; Percomorpha; Pleuronectiformes; Pleuronectoidei; Pleuronectidae; Platichthys
-8265 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Actinopterygii; Neopterygii; Teleostei; Euteleostei; Neoteleostei; Acanthomorpha; Acanthopterygii; Percomorpha; Pleuronectiformes; Pleuronectoidei; Pleuronectidae; Pseudopleuronectes
8267 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Actinopterygii; Neopterygii; Teleostei; Euteleostei; Neoteleostei; Acanthomorpha; Acanthopterygii; Percomorpha; Pleuronectiformes; Pleuronectoidei; Pleuronectidae; Hippoglossus
8296 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Amphibia; Batrachia; Caudata; Salamandroidea; Ambystomatidae; Ambystoma
8355 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Amphibia; Batrachia; Anura; Mesobatrachia; Pipoidea; Pipidae; Xenopodinae; Xenopus; Xenopus
8364 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Amphibia; Batrachia; Anura; Mesobatrachia; Pipoidea; Pipidae; Xenopodinae; Xenopus; Silurana
-8724 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Lepidosauria; Squamata; Scleroglossa; Serpentes; Colubroidea; Viperidae; Crotalinae; Bothrops
-8752 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Lepidosauria; Squamata; Scleroglossa; Serpentes; Colubroidea; Viperidae; Crotalinae; Lachesis
-8839 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Archosauria; Aves; Neognathae; Anseriformes; Anatidae; Anas
-9031 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Archosauria; Aves; Neognathae; Galliformes; Phasianidae; Phasianinae; Gallus
-9103 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Archosauria; Aves; Neognathae; Galliformes; Phasianidae; Meleagris
+8479 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Testudines; Cryptodira; Testudinoidea; Emydidae; Chrysemys
+8496 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Archosauria; Crocodylidae; Alligatorinae; Alligator
+8839 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Archosauria; Dinosauria; Saurischia; Theropoda; Coelurosauria; Aves; Neognathae; Anseriformes; Anatidae; Anas
+9031 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Archosauria; Dinosauria; Saurischia; Theropoda; Coelurosauria; Aves; Neognathae; Galliformes; Phasianidae; Phasianinae; Gallus
+9103 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Archosauria; Dinosauria; Saurischia; Theropoda; Coelurosauria; Aves; Neognathae; Galliformes; Phasianidae; Meleagridinae; Meleagris
9258 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Mammalia; Monotremata; Ornithorhynchidae; Ornithorhynchus
+9315 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Mammalia; Metatheria; Diprotodontia; Macropodidae; Macropus
9337 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Mammalia; Metatheria; Diprotodontia; Phalangeridae; Trichosurus
9361 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Mammalia; Eutheria; Xenarthra; Dasypodidae; Dasypus
9365 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Mammalia; Eutheria; Laurasiatheria; Insectivora; Erinaceidae; Erinaceinae; Erinaceus
@@ -379,7 +338,6 @@
9541 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Mammalia; Eutheria; Euarchontoglires; Primates; Haplorrhini; Catarrhini; Cercopithecidae; Cercopithecinae; Macaca
9544 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Mammalia; Eutheria; Euarchontoglires; Primates; Haplorrhini; Catarrhini; Cercopithecidae; Cercopithecinae; Macaca
9545 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Mammalia; Eutheria; Euarchontoglires; Primates; Haplorrhini; Catarrhini; Cercopithecidae; Cercopithecinae; Macaca
-9555 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Mammalia; Eutheria; Euarchontoglires; Primates; Haplorrhini; Catarrhini; Cercopithecidae; Cercopithecinae; Papio
9593 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Mammalia; Eutheria; Euarchontoglires; Primates; Haplorrhini; Catarrhini; Hominidae; Gorilla
9597 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Mammalia; Eutheria; Euarchontoglires; Primates; Haplorrhini; Catarrhini; Hominidae; Pan
9598 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Mammalia; Eutheria; Euarchontoglires; Primates; Haplorrhini; Catarrhini; Hominidae; Pan
@@ -388,7 +346,6 @@
9612 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Mammalia; Eutheria; Laurasiatheria; Carnivora; Caniformia; Canidae; Canis
9614 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Mammalia; Eutheria; Laurasiatheria; Carnivora; Caniformia; Canidae; Canis
9615 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Mammalia; Eutheria; Laurasiatheria; Carnivora; Caniformia; Canidae; Canis
-9667 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Mammalia; Eutheria; Laurasiatheria; Carnivora; Caniformia; Mustelidae; Mustelinae; Mustela
9685 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Mammalia; Eutheria; Laurasiatheria; Carnivora; Feliformia; Felidae; Felinae; Felis
9739 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Mammalia; Eutheria; Laurasiatheria; Cetartiodactyla; Cetacea; Odontoceti; Delphinidae; Tursiops
9785 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Mammalia; Eutheria; Afrotheria; Proboscidea; Elephantidae; Loxodonta
@@ -398,383 +355,353 @@
9915 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Mammalia; Eutheria; Laurasiatheria; Cetartiodactyla; Ruminantia; Pecora; Bovidae; Bovinae; Bos
9925 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Mammalia; Eutheria; Laurasiatheria; Cetartiodactyla; Ruminantia; Pecora; Bovidae; Caprinae; Capra
9940 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Mammalia; Eutheria; Laurasiatheria; Cetartiodactyla; Ruminantia; Pecora; Bovidae; Caprinae; Ovis
+9978 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Mammalia; Eutheria; Euarchontoglires; Glires; Lagomorpha; Ochotonidae; Ochotona
9986 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Mammalia; Eutheria; Euarchontoglires; Glires; Lagomorpha; Leporidae; Oryctolagus
10029 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Mammalia; Eutheria; Euarchontoglires; Glires; Rodentia; Sciurognathi; Muroidea; Cricetidae; Cricetinae; Cricetulus
10036 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Mammalia; Eutheria; Euarchontoglires; Glires; Rodentia; Sciurognathi; Muroidea; Cricetidae; Cricetinae; Mesocricetus
-10041 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Mammalia; Eutheria; Euarchontoglires; Glires; Rodentia; Sciurognathi; Muroidea; Cricetidae; Neotominae; Peromyscus
10090 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Mammalia; Eutheria; Euarchontoglires; Glires; Rodentia; Sciurognathi; Muroidea; Muridae; Murinae; Mus
+10092 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Mammalia; Eutheria; Euarchontoglires; Glires; Rodentia; Sciurognathi; Muroidea; Muridae; Murinae; Mus
10116 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Mammalia; Eutheria; Euarchontoglires; Glires; Rodentia; Sciurognathi; Muroidea; Muridae; Murinae; Rattus
10141 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Mammalia; Eutheria; Euarchontoglires; Glires; Rodentia; Hystricognathi; Caviidae; Cavia
-10298 Viruses; dsDNA viruses, no RNA stage; Herpesviridae; Alphaherpesvirinae; Simplexvirus
+10195 Eukaryota; Metazoa; Rotifera; Monogononta; Ploimida; Brachionidae; Brachionus
+10224 Eukaryota; Metazoa; Hemichordata; Enteropneusta; Harrimaniidae; Saccoglossus
10359 Viruses; dsDNA viruses, no RNA stage; Herpesviridae; Betaherpesvirinae; Cytomegalovirus
10407 Viruses; Retro-transcribing viruses; Hepadnaviridae; Orthohepadnavirus
-10566 Viruses; dsDNA viruses, no RNA stage; Papillomaviridae; unclassified Papillomaviridae
-10632 Viruses; dsDNA viruses, no RNA stage; Polyomaviridae; Polyomavirus
-10995 Viruses; dsRNA viruses; Birnaviridae; Avibirnavirus
-11082 Viruses; ssRNA positive-strand viruses, no DNA stage; Flaviviridae; Flavivirus; Japanese encephalitis virus group
-11099 Viruses; ssRNA positive-strand viruses, no DNA stage; Flaviviridae; Pestivirus
11103 Viruses; ssRNA positive-strand viruses, no DNA stage; Flaviviridae; Hepacivirus
-11120 Viruses; ssRNA positive-strand viruses, no DNA stage; Nidovirales; Coronaviridae; Coronavirus; Group 3 species
11176 Viruses; ssRNA negative-strand viruses; Mononegavirales; Paramyxoviridae; Paramyxovirinae; Avulavirus
11234 Viruses; ssRNA negative-strand viruses; Mononegavirales; Paramyxoviridae; Paramyxovirinae; Morbillivirus
-11250 Viruses; ssRNA negative-strand viruses; Mononegavirales; Paramyxoviridae; Pneumovirinae; Pneumovirus
11292 Viruses; ssRNA negative-strand viruses; Mononegavirales; Rhabdoviridae; Lyssavirus
-11665 Viruses; Retro-transcribing viruses; Retroviridae; Orthoretrovirinae; Lentivirus; Equine lentivirus group
-11673 Viruses; Retro-transcribing viruses; Retroviridae; Orthoretrovirinae; Lentivirus; Feline lentivirus group
11676 Viruses; Retro-transcribing viruses; Retroviridae; Orthoretrovirinae; Lentivirus; Primate lentivirus group
11709 Viruses; Retro-transcribing viruses; Retroviridae; Orthoretrovirinae; Lentivirus; Primate lentivirus group
11723 Viruses; Retro-transcribing viruses; Retroviridae; Orthoretrovirinae; Lentivirus; Primate lentivirus group
-11786 Viruses; Retro-transcribing viruses; Retroviridae; Orthoretrovirinae; Gammaretrovirus
-11966 Viruses; Retro-transcribing viruses; Retroviridae
-12092 Viruses; ssRNA positive-strand viruses, no DNA stage; Picornaviridae; Hepatovirus
-12162 Viruses; ssRNA positive-strand viruses, no DNA stage; Closteroviridae; Closterovirus
-12461 Viruses; ssRNA positive-strand viruses, no DNA stage; Hepeviridae; Hepevirus
-12721 Viruses; Retro-transcribing viruses; Retroviridae; Orthoretrovirinae; Lentivirus; Primate lentivirus group
+11908 Viruses; Retro-transcribing viruses; Retroviridae; Orthoretrovirinae; Deltaretrovirus
+12092 Viruses; ssRNA positive-strand viruses, no DNA stage; Picornavirales; Picornaviridae; Hepatovirus
12968 Eukaryota; stramenopiles; Blastocystis
13040 Eukaryota; Metazoa; Arthropoda; Hexapoda; Insecta; Pterygota; Neoptera; Endopterygota; Coleoptera; Polyphaga; Cucujiformia; Curculionidae; Entiminae; Entimini; Diaprepes
13164 Eukaryota; Metazoa; Arthropoda; Hexapoda; Insecta; Pterygota; Neoptera; Paraneoptera; Hemiptera; Sternorrhyncha; Aphidiformes; Aphidoidea; Aphididae; Macrosiphini; Myzus
-13230 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids I; Fabales; Fabaceae; Mimosoideae; Mimoseae; Prosopis
+13249 Eukaryota; Metazoa; Arthropoda; Hexapoda; Insecta; Pterygota; Neoptera; Paraneoptera; Hemiptera; Euhemiptera; Heteroptera; Panheteroptera; Cimicomorpha; Reduviidae; Triatominae; Rhodnius
13258 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; magnoliids; Piperales; Aristolochiaceae; Saruma
13333 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; basal Magnoliophyta; Amborellales; Amborellaceae; Amborella
13415 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Coniferopsida; Coniferales; Cupressaceae; Chamaecyparis
13427 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; asterids; campanulids; Asterales; Asteraceae; Cichorioideae; Cichorieae; Cichorium
13443 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; asterids; lamiids; Gentianales; Rubiaceae; Ixoroideae; Coffeeae; Coffea
13489 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Actinopterygii; Neopterygii; Teleostei; Euteleostei; Neoteleostei; Acanthomorpha; Acanthopterygii; Percomorpha; Perciformes; Percoidei; Moronidae; Dicentrarchus
-13563 Eukaryota; Fungi; Basidiomycota; Hymenomycetes; Homobasidiomycetes; Agaricales; Schizophyllaceae; Heterobasidion; Heterobasidion annosum species complex
13616 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Mammalia; Metatheria; Didelphimorphia; Didelphidae; Monodelphis
13642 Eukaryota; Mycetozoa; Dictyosteliida; Polysphondylium
-13684 Eukaryota; Fungi; Ascomycota; Pezizomycotina; Dothideomycetes; Pleosporales; Phaeosphaeriaceae; Phaeosphaeria
+13686 Eukaryota; Metazoa; Arthropoda; Hexapoda; Insecta; Pterygota; Neoptera; Endopterygota; Hymenoptera; Apocrita; Aculeata; Vespoidea; Formicidae; Myrmicinae; Solenopsis
13818 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Moniliformopses; Filicophyta; Filicopsida; Filicales; Pteridaceae; Adiantum
15368 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; Liliopsida; Poales; Poaceae; BEP clade; Pooideae; Brachypodieae; Brachypodium
-27288 Eukaryota; Fungi; Ascomycota; Saccharomycotina; Saccharomycetes; Saccharomycetales; Saccharomycetaceae; Saccharomyces
-27291 Eukaryota; Fungi; Ascomycota; Saccharomycotina; Saccharomycetes; Saccharomycetales; Saccharomycetaceae; Saccharomyces
-27293 Eukaryota; Fungi; Ascomycota; Saccharomycotina; Saccharomycetes; Saccharomycetales; Saccharomycetaceae; Saccharomyces
-27294 Eukaryota; Fungi; Ascomycota; Saccharomycotina; Saccharomycetes; Saccharomycetales; Saccharomycetaceae; Saccharomyces
-27337 Eukaryota; Fungi; Ascomycota; Pezizomycotina; Sordariomycetes; Sordariomycetes incertae sedis; Phyllachorales; mitosporic Phyllachorales; Verticillium
+27288 Eukaryota; Fungi; Dikarya; Ascomycota; Saccharomycotina; Saccharomycetes; Saccharomycetales; Saccharomycetaceae; Saccharomyces
+27292 Eukaryota; Fungi; Dikarya; Ascomycota; Saccharomycotina; Saccharomycetes; Saccharomycetales; Saccharomycetaceae; Saccharomyces
+27293 Eukaryota; Fungi; Dikarya; Ascomycota; Saccharomycotina; Saccharomycetes; Saccharomycetales; Saccharomycetaceae; Saccharomyces
+27294 Eukaryota; Fungi; Dikarya; Ascomycota; Saccharomycotina; Saccharomycetes; Saccharomycetales; Saccharomycetaceae; Kazachstania
+27337 Eukaryota; Fungi; Dikarya; Ascomycota; Pezizomycotina; Sordariomycetes; Sordariomycetes incertae sedis; Phyllachorales; mitosporic Phyllachorales; Verticillium
27405 Eukaryota; Metazoa; Arthropoda; Crustacea; Malacostraca; Eumalacostraca; Eucarida; Decapoda; Dendrobranchiata; Penaeoidea; Penaeidae; Marsupenaeus
-27828 Eukaryota; Metazoa; Nematoda; Chromadorea; Rhabditida; Strongylida; Trichostrongyloidea; Cooperiidae; Cooperia
+27606 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Mammalia; Eutheria; Laurasiatheria; Cetartiodactyla; Cetacea; Mysticeti; Balaenidae; Eubalaena
27835 Eukaryota; Metazoa; Nematoda; Chromadorea; Rhabditida; Strongylida; Trichostrongyloidea; Heligmonellidae; Nippostrongylinae; Nippostrongylus
-27923 Eukaryota; Metazoa; Ctenophora; Cyclocoela; Lobata; Bolinopsidae; Mnemiopsis
28344 Viruses; ssRNA positive-strand viruses, no DNA stage; Nidovirales; Arteriviridae; Arterivirus
-28526 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; asterids; lamiids; Solanales; Solanaceae; Solanum; Lycopersicon
+28377 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Lepidosauria; Squamata; Iguania; Iguanidae; Polychrotinae; Anolis
+28526 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; asterids; lamiids; Solanales; Solanaceae; Solanoideae; Solaneae; Solanum; Lycopersicon
28532 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids II; Brassicales; Cleomaceae; Cleome
-28583 Eukaryota; Fungi; Chytridiomycota; Blastocladiales; Blastocladiaceae; Allomyces
-28610 Eukaryota; Metazoa; Arthropoda; Hexapoda; Insecta; Pterygota; Neoptera; Endopterygota; Diptera; Brachycera; Muscomorpha; Tephritoidea; Tephritidae; Rhagoletis
-28901 Bacteria; Proteobacteria; Gammaproteobacteria; Enterobacteriales; Enterobacteriaceae; Salmonella
+28583 Eukaryota; Fungi; Blastocladiomycota; Blastocladiomycetes; Blastocladiales; Blastocladiaceae; Allomyces
28909 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; Liliopsida; Poales; Poaceae; PACCAD clade; Chloridoideae; Cynodonteae; Cynodon
-28985 Eukaryota; Fungi; Ascomycota; Saccharomycotina; Saccharomycetes; Saccharomycetales; Saccharomycetaceae; Kluyveromyces
-29001 Eukaryota; Fungi; Ascomycota; Pezizomycotina; Dothideomycetes; Pleosporales; Pleosporaceae; mitosporic Pleosporaceae; Alternaria
-29058 Eukaryota; Metazoa; Arthropoda; Hexapoda; Insecta; Pterygota; Neoptera; Endopterygota; Lepidoptera; Glossata; Ditrysia; Noctuoidea; Noctuidae; Heliothinae; Helicoverpa
+28985 Eukaryota; Fungi; Dikarya; Ascomycota; Saccharomycotina; Saccharomycetes; Saccharomycetales; Saccharomycetaceae; Kluyveromyces
+29001 Eukaryota; Fungi; Dikarya; Ascomycota; Pezizomycotina; Dothideomycetes; Pleosporomycetidae; Pleosporales; Pleosporaceae; mitosporic Pleosporaceae; Alternaria
+29031 Eukaryota; Metazoa; Arthropoda; Hexapoda; Insecta; Pterygota; Neoptera; Endopterygota; Diptera; Nematocera; Psychodoidea; Psychodidae; Phlebotomus; Phlebotomus
29158 Eukaryota; Metazoa; Mollusca; Bivalvia; Pteriomorphia; Mytiloida; Mytiloidea; Mytilidae; Mytilinae; Mytilus
29159 Eukaryota; Metazoa; Mollusca; Bivalvia; Pteriomorphia; Ostreoida; Ostreoidea; Ostreidae; Crassostrea
29170 Eukaryota; Metazoa; Nematoda; Chromadorea; Rhabditida; Strongylida; Ancylostomatoidea; Ancylostomatidae; Ancylostomatinae; Ancylostoma
-29176 Eukaryota; Alveolata; Apicomplexa; Coccidia; Eimeriida; Sarcocystidae; Neospora
+29172 Eukaryota; Metazoa; Nematoda; Chromadorea; Rhabditida; Strongylida; Trichostrongyloidea; Dictyocaulidae; Dictyocaulinae; Dictyocaulus
+29176 Eukaryota; Alveolata; Apicomplexa; Coccidia; Eucoccidiorida; Eimeriorina; Sarcocystidae; Neospora
29488 Bacteria; Proteobacteria; Gammaproteobacteria; Enterobacteriales; Enterobacteriaceae; Photorhabdus
29546 Bacteria; Proteobacteria; Deltaproteobacteria; Desulfovibrionales; Desulfovibrionaceae; Lawsonia
+29655 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; Liliopsida; Zosteraceae; Zostera
29729 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids II; Malvales; Malvaceae; Malvoideae; Gossypium
29730 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids II; Malvales; Malvaceae; Malvoideae; Gossypium
29760 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; Vitales; Vitaceae; Vitis
-29875 Eukaryota; Fungi; Ascomycota; Pezizomycotina; Sordariomycetes; Hypocreomycetidae; Hypocreales; Hypocreaceae; Hypocrea
-29883 Eukaryota; Fungi; Basidiomycota; Hymenomycetes; Homobasidiomycetes; Agaricales; Tricholomataceae; Laccaria
+29875 Eukaryota; Fungi; Dikarya; Ascomycota; Pezizomycotina; Sordariomycetes; Hypocreomycetidae; Hypocreales; Hypocreaceae; Hypocrea
+29883 Eukaryota; Fungi; Dikarya; Basidiomycota; Agaricomycotina; Agaricomycetes; Agaricomycetidae; Agaricales; Tricholomataceae; Laccaria
30286 Eukaryota; Metazoa; Chordata; Urochordata; Ascidiacea; Stolidobranchia; Molgulidae; Molgula
-30522 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Mammalia; Eutheria; Laurasiatheria; Cetartiodactyla; Ruminantia; Pecora; Bovidae; Bovinae; Bos
+30538 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Mammalia; Eutheria; Laurasiatheria; Cetartiodactyla; Tylopoda; Camelidae; Lama
30608 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Mammalia; Eutheria; Euarchontoglires; Primates; Strepsirrhini; Lemuriformes; Cheirogaleidae; Microcebus
30611 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Mammalia; Eutheria; Euarchontoglires; Primates; Strepsirrhini; Lorisiformes; Galagidae; Otolemur
31033 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Actinopterygii; Neopterygii; Teleostei; Euteleostei; Neoteleostei; Acanthomorpha; Acanthopterygii; Percomorpha; Tetraodontiformes; Tetradontoidea; Tetraodontidae; Takifugu
+31192 Eukaryota; Metazoa; Echinodermata; Eleutherozoa; Echinozoa; Holothuroidea; Aspidochirotacea; Aspidochirotida; Holothuriidae; Holothuria
31199 Eukaryota; Metazoa; Mollusca; Bivalvia; Pteriomorphia; Pectinoida; Pectinoidea; Pectinidae; Argopecten
31234 Eukaryota; Metazoa; Nematoda; Chromadorea; Rhabditida; Rhabditoidea; Rhabditidae; Peloderinae; Caenorhabditis
31243 Eukaryota; Metazoa; Nematoda; Chromadorea; Tylenchida; Tylenchina; Tylenchoidea; Heteroderidae; Heteroderinae; Globodera
-32593 Eukaryota; Alveolata; Apicomplexa; Coccidia; Eimeriida; Sarcocystidae; Sarcocystis
-33069 Bacteria; Proteobacteria; Gammaproteobacteria; Pseudomonadales; Pseudomonadaceae; Pseudomonas
+31271 Eukaryota; Alveolata; Apicomplexa; Aconoidasida; Haemosporida; Plasmodium; Plasmodium (Vinckeia)
+31286 Eukaryota; Euglenozoa; Kinetoplastida; Trypanosomatidae; Trypanosoma
+31646 Viruses; ssRNA positive-strand viruses, no DNA stage; Flaviviridae; Hepacivirus
+31647 Viruses; ssRNA positive-strand viruses, no DNA stage; Flaviviridae; Hepacivirus
+32593 Eukaryota; Alveolata; Apicomplexa; Coccidia; Eucoccidiorida; Eimeriorina; Sarcocystidae; Sarcocystis
33085 Eukaryota; Entamoebidae; Entamoeba
-33129 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids I; Fabales; Fabaceae; Papilionoideae; Phaseoleae; Phaseolus
-33169 Eukaryota; Fungi; Ascomycota; Saccharomycotina; Saccharomycetes; Saccharomycetales; Saccharomycetaceae; Eremothecium
-33178 Eukaryota; Fungi; Ascomycota; Pezizomycotina; Eurotiomycetes; Eurotiales; Trichocomaceae; mitosporic Trichocomaceae; Aspergillus
33431 Eukaryota; Metazoa; Arthropoda; Hexapoda; Insecta; Pterygota; Neoptera; Endopterygota; Lepidoptera; Glossata; Ditrysia; Papilionoidea; Nymphalidae; Heliconiinae; Heliconiini; Heliconius
-33616 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Archosauria; Aves; Neognathae; Ciconiiformes; Cathartidae; Gymnogyps
34146 Eukaryota; Viridiplantae; Streptophyta; Zygnemophyceae; Desmidiales; Closteriaceae; Closterium
34176 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; Liliopsida; Poales; Poaceae; BEP clade; Pooideae; Poeae; Lolium
34245 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; asterids; campanulids; Asterales; Asteraceae; Asteroideae; Heliantheae; Zinnia
-34256 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; asterids; lamiids; Lamiales; Lamiaceae; Nepetoideae; Nepeteae; Mentha
34274 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids II; Malvales; Malvaceae; Malvoideae; Gossypium
34305 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids I; Fabales; Fabaceae; Papilionoideae; Loteae; Lotus
34316 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; Myrtales; Myrtaceae; Eucalyptus
-34317 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; Myrtales; Myrtaceae; Eucalyptus
34342 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Cycadophyta; Cycadales; Zamiaceae; Zamia
-34358 Eukaryota; Fungi; Ascomycota; Saccharomycotina; Saccharomycetes; Saccharomycetales; Saccharomycetaceae; Kazachstania
-34488 Eukaryota; Fungi; Zygomycota; Zygomycetes; Entomophthorales; Ancylistaceae; Conidiobolus
+34358 Eukaryota; Fungi; Dikarya; Ascomycota; Saccharomycotina; Saccharomycetes; Saccharomycetales; Saccharomycetaceae; Kazachstania
34506 Eukaryota; Metazoa; Nematoda; Chromadorea; Rhabditida; Panagrolaimoidea; Strongyloididae; Strongyloides
34602 Eukaryota; Metazoa; Arthropoda; Chelicerata; Arachnida; Acari; Parasitiformes; Ixodida; Ixodoidea; Argasidae; Argasinae; Argas
-34607 Eukaryota; Metazoa; Arthropoda; Chelicerata; Arachnida; Acari; Parasitiformes; Ixodida; Ixodoidea; Ixodidae; Amblyomma
-34610 Eukaryota; Metazoa; Arthropoda; Chelicerata; Arachnida; Acari; Parasitiformes; Ixodida; Ixodoidea; Ixodidae; Amblyomma
-34631 Eukaryota; Metazoa; Arthropoda; Chelicerata; Arachnida; Acari; Parasitiformes; Ixodida; Ixodoidea; Ixodidae; Rhipicephalus
+34610 Eukaryota; Metazoa; Arthropoda; Chelicerata; Arachnida; Acari; Parasitiformes; Ixodida; Ixodoidea; Ixodidae; Amblyomminae; Amblyomma
+34631 Eukaryota; Metazoa; Arthropoda; Chelicerata; Arachnida; Acari; Parasitiformes; Ixodida; Ixodoidea; Ixodidae; Rhipicephalinae; Rhipicephalus; Rhipicephalus
34739 Eukaryota; Metazoa; Arthropoda; Hexapoda; Insecta; Pterygota; Neoptera; Endopterygota; Lepidoptera; Glossata; Ditrysia; Bombycoidea; Saturniidae; Saturniinae; Saturniini; Antheraea
34740 Eukaryota; Metazoa; Arthropoda; Hexapoda; Insecta; Pterygota; Neoptera; Endopterygota; Lepidoptera; Glossata; Ditrysia; Papilionoidea; Nymphalidae; Heliconiinae; Heliconiini; Heliconius
-34816 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Actinopterygii; Neopterygii; Teleostei; Euteleostei; Neoteleostei; Acanthomorpha; Acanthopterygii; Percomorpha; Perciformes; Percoidei; Moronidae; Morone
-35520 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; Liliopsida; Poales; Poaceae; PACCAD clade; Panicoideae; Paniceae; Pennisetum
35525 Eukaryota; Metazoa; Arthropoda; Crustacea; Branchiopoda; Diplostraca; Cladocera; Anomopoda; Daphniidae; Daphnia
-35570 Eukaryota; Metazoa; Arthropoda; Hexapoda; Insecta; Pterygota; Neoptera; Endopterygota; Diptera; Brachycera; Muscomorpha; Muscoidea; Muscidae; Stomoxys
35630 Eukaryota; Metazoa; Cnidaria; Hydrozoa; Hydroida; Anthomedusae; Hydractiniidae; Hydractinia
35632 Eukaryota; Metazoa; Annelida; Clitellata; Oligochaeta; Haplotaxida; Lumbricina; Lumbricidae; Lumbricus
35845 Eukaryota; Viridiplantae; Chlorophyta; Ulvophyceae; Dasycladales; Polyphysaceae; Acetabularia
35872 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; Liliopsida; Poales; Poaceae; PACCAD clade; Panicoideae; Paniceae; Cenchrus
35883 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; asterids; lamiids; Solanales; Convolvulaceae; Ipomoeeae; Ipomoea
-35884 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; asterids; lamiids; Solanales; Convolvulaceae; Ipomoeeae; Ipomoea
35938 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids I; Fabales; Fabaceae; Papilionoideae; Robinieae; Robinia
36090 Eukaryota; Metazoa; Nematoda; Chromadorea; Tylenchida; Tylenchina; Tylenchoidea; Heteroderidae; Heteroderinae; Globodera
-36094 Eukaryota; Metazoa; Mollusca; Gastropoda; Orthogastropoda; Vetigastropoda; Haliotoidea; Haliotidae; Haliotis
+36148 Eukaryota; Metazoa; Arthropoda; Hexapoda; Insecta; Pterygota; Neoptera; Paraneoptera; Hemiptera; Euhemiptera; Membracoidea; Cicadellidae; Cicadellinae; Graphocephala
36307 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Lepidosauria; Squamata; Scleroglossa; Serpentes; Colubroidea; Viperidae; Crotalinae; Deinagkistrodon
+36329 Eukaryota; Alveolata; Apicomplexa; Aconoidasida; Haemosporida; Plasmodium; Plasmodium (Laverania)
36596 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids I; Rosales; Rosaceae; Amygdaloideae; Prunus
-37099 Eukaryota; Haptophyceae; Isochrysidales; Isochrysis
-37296 Viruses; dsDNA viruses, no RNA stage; Herpesviridae; Gammaherpesvirinae; Rhadinovirus
+36774 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids II; Brassicales; Brassicaceae; Brassica
+37011 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Mammalia; Eutheria; Euarchontoglires; Primates; Haplorrhini; Catarrhini; Hominidae; Pan
+37012 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Mammalia; Eutheria; Euarchontoglires; Primates; Haplorrhini; Catarrhini; Hominidae; Pan
+37099 Eukaryota; Haptophyceae; Isochrysidales; Isochrysidaceae; Isochrysis
37347 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Mammalia; Eutheria; Euarchontoglires; Scandentia; Tupaiidae; Tupaia
-37656 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids II; Sapindales; Rutaceae; Citrus
+37546 Eukaryota; Metazoa; Arthropoda; Hexapoda; Insecta; Pterygota; Neoptera; Endopterygota; Diptera; Brachycera; Muscomorpha; Hippoboscoidea; Glossinidae; Glossina
37682 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; Liliopsida; Poales; Poaceae; BEP clade; Pooideae; Triticeae; Aegilops
37690 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids II; Sapindales; Rutaceae; Poncirus
-37727 Eukaryota; Fungi; Ascomycota; Pezizomycotina; Eurotiomycetes; Eurotiales; Trichocomaceae; mitosporic Trichocomaceae; Penicillium
+37727 Eukaryota; Fungi; Dikarya; Ascomycota; Pezizomycotina; Eurotiomycetes; Eurotiomycetidae; Eurotiales; Trichocomaceae; mitosporic Trichocomaceae; Penicillium
37862 Eukaryota; Metazoa; Nematoda; Chromadorea; Rhabditida; Rhabditoidea; Heterorhabditidae; Heterorhabditis
-38032 Eukaryota; Fungi; Ascomycota; Pezizomycotina; Sordariomycetes; Sordariomycetidae; Ophiostomatales; Ophiostomataceae; Ophiostoma
-38033 Eukaryota; Fungi; Ascomycota; Pezizomycotina; Sordariomycetes; Sordariomycetidae; Sordariales; Chaetomiaceae; Chaetomium
-38249 Eukaryota; Euglenozoa; Kinetoplastida; Trypanosomatidae; Trypanosoma
+38032 Eukaryota; Fungi; Dikarya; Ascomycota; Pezizomycotina; Sordariomycetes; Sordariomycetidae; Ophiostomatales; Ophiostomataceae; Ophiostoma
38271 Eukaryota; Glaucocystophyceae; Glaucocystales; Glaucocystaceae; Glaucocystis
38588 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Bryophyta; Moss Superclass V; Bryopsida; Dicranidae; Pottiales; Pottiaceae; Tortula
-38705 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; Liliopsida; Poales; Poaceae; BEP clade; Bambusoideae; Bambuseae; Phyllostachys
38727 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; Liliopsida; Poales; Poaceae; PACCAD clade; Panicoideae; Paniceae; Panicum
-38865 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids I; Fagales; Fagaceae; Quercus
38937 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Lepidosauria; Squamata; Iguania; Iguanidae; Polychrotinae; Anolis
-38942 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids I; Fagales; Fagaceae; Quercus
39350 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; asterids; lamiids; Lamiales; Lamiaceae; Nepetoideae; Ocimeae; Ocimum
+39946 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; Liliopsida; Poales; Poaceae; BEP clade; Ehrhartoideae; Oryzeae; Oryza
+39947 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; Liliopsida; Poales; Poaceae; BEP clade; Ehrhartoideae; Oryzeae; Oryza
39984 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids I; Malpighiales; Rhizophoraceae; Bruguiera
-40366 Eukaryota; Metazoa; Arthropoda; Hexapoda; Insecta; Pterygota; Neoptera; Endopterygota; Diptera; Brachycera; Muscomorpha; Ephydroidea; Drosophilidae; Drosophila
-40559 Eukaryota; Fungi; Ascomycota; Pezizomycotina; Leotiomycetes; Helotiales; Sclerotiniaceae; Botryotinia
-40697 Eukaryota; Metazoa; Arthropoda; Chelicerata; Arachnida; Acari; Acariformes; Sarcoptiformes; Astigmata; Glycyphagoidea; Echimyopodidae; Blomia
+40410 Eukaryota; Fungi; Dikarya; Basidiomycota; Agaricomycotina; Tremellomycetes; Tremellales; Tremellaceae; Filobasidiella
+40559 Eukaryota; Fungi; Dikarya; Ascomycota; Pezizomycotina; Leotiomycetes; Helotiales; Sclerotiniaceae; Botryotinia
41882 Eukaryota; Viridiplantae; Streptophyta; Mesostigmatophyceae; Mesostigmatales; Mesostigmataceae; Mesostigma
42156 Eukaryota; Metazoa; Nematoda; Chromadorea; Spirurida; Filarioidea; Onchocercidae; Litomosoides
-42251 Eukaryota; Fungi; Ascomycota; Pezizomycotina; Pezizomycetes; Pezizales; Tuberaceae; Tuber
+42251 Eukaryota; Fungi; Dikarya; Ascomycota; Pezizomycotina; Pezizomycetes; Pezizales; Tuberaceae; Tuber
42254 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Mammalia; Eutheria; Laurasiatheria; Insectivora; Soricidae; Soricinae; Sorex
-42329 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Cycadophyta; Cycadales; Zamiaceae; Zamia
-42890 Eukaryota; Alveolata; Apicomplexa; Coccidia; Eimeriida; Sarcocystidae; Sarcocystis
+42890 Eukaryota; Alveolata; Apicomplexa; Coccidia; Eucoccidiorida; Eimeriorina; Sarcocystidae; Sarcocystis
+43116 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Amphibia; Batrachia; Caudata; Salamandroidea; Ambystomatidae; Ambystoma
43166 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids II; Sapindales; Rutaceae; Citrus
43179 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Mammalia; Eutheria; Euarchontoglires; Glires; Rodentia; Sciurognathi; Sciuridae; Xerinae; Marmotini; Spermophilus
43195 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; asterids; campanulids; Asterales; Asteraceae; Cichorioideae; Cichorieae; Lactuca
-43425 Eukaryota; Fungi; Glomeromycota; Glomeromycetes; Glomerales; Glomeraceae; Glomus
-43925 Eukaryota; stramenopiles; Eustigmatophyceae; Nannochloropsis
-43928 Archaea; Euryarchaeota; Halobacteria; Halobacteriales; Halobacteriaceae; Halobaculum
+44271 Eukaryota; Euglenozoa; Kinetoplastida; Trypanosomatidae; Leishmania
44689 Eukaryota; Mycetozoa; Dictyosteliida; Dictyostelium
-44745 Eukaryota; Viridiplantae; Chlorophyta; Chlorophyceae; Chlamydomonadales; Haematococcaceae; Haematococcus
45264 Eukaryota; Metazoa; Cnidaria; Anthozoa; Hexacorallia; Scleractinia; Astrocoeniina; Acroporidae; Acropora
45351 Eukaryota; Metazoa; Cnidaria; Anthozoa; Hexacorallia; Actiniaria; Edwardsiidae; Nematostella
45464 Eukaryota; Metazoa; Nematoda; Chromadorea; Rhabditida; Strongylida; Trichostrongyloidea; Haemonchidae; Ostertagiinae; Teladorsagia
-45687 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids I; Fabales; Fabaceae; Papilionoideae; Phaseoleae; Glycine
-45929 Eukaryota; Metazoa; Nematoda; Chromadorea; Tylenchida; Tylenchina; Tylenchoidea; Pratylenchidae; Pratylenchinae; Pratylenchus
45931 Eukaryota; Metazoa; Nematoda; Chromadorea; Tylenchida; Tylenchina; Tylenchoidea; Pratylenchidae; Pratylenchinae; Pratylenchus
46003 Eukaryota; Metazoa; Nematoda; Enoplea; Dorylaimida; Dorylaimina; Longidoroidea; Longidoridae; Xiphinema
-46012 Eukaryota; Metazoa; Nematoda; Chromadorea; Tylenchida; Tylenchina; Tylenchoidea; Pratylenchidae; Radopholinae; Radopholus
-46208 Eukaryota; Metazoa; Arthropoda; Hexapoda; Insecta; Pterygota; Neoptera; Endopterygota; Diptera; Nematocera; Culicoidea; Culicidae; Toxorhynchitinae; Toxorhynchites
-46433 Eukaryota; Granuloreticulosea; Athalamea; Reticulomyxidae; Reticulomyxa
+46681 Eukaryota; Entamoebidae; Entamoeba
47315 Eukaryota; Metazoa; Arthropoda; Hexapoda; Insecta; Pterygota; Neoptera; Endopterygota; Diptera; Brachycera; Muscomorpha; Ephydroidea; Drosophilidae; Drosophila
-47615 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids II; Malvales; Malvaceae; Malvoideae; Gossypioides
47626 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids II; Malvales; Malvaceae; Malvoideae; Gossypium
-47664 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids I; Malpighiales; Salicaceae; Saliceae; Populus
48483 Eukaryota; Jakobidae; Reclinomonas
-48498 Eukaryota; Metazoa; Cnidaria; Anthozoa; Hexacorallia; Scleractinia; Faviina; Faviidae; Montastraea
+48668 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Actinopterygii; Neopterygii; Teleostei; Ostariophysi; Cypriniformes; Cyprinidae; Rutilus
49390 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; asterids; lamiids; Gentianales; Rubiaceae; Ixoroideae; Coffeeae; Coffea
49495 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Moniliformopses; Filicophyta; Filicopsida; Filicales; Pteridaceae; Ceratopteris
50187 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Coniferopsida; Coniferales; Cupressaceae; Taiwania
50225 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; asterids; campanulids; Asterales; Asteraceae; Cichorioideae; Cichorieae; Taraxacum
+50390 Eukaryota; Metazoa; Arthropoda; Hexapoda; Insecta; Pterygota; Neoptera; Endopterygota; Coleoptera; Polyphaga; Cucujiformia; Chrysomeloidea; Chrysomelidae; Galerucinae; Diabroticina; Diabroticites; Diabrotica
+50591 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Actinopterygii; Neopterygii; Teleostei; Euteleostei; Neoteleostei; Acanthomorpha; Acanthopterygii; Percomorpha; Perciformes; Percoidei; Sparidae; Lithognathus
51029 Eukaryota; Metazoa; Nematoda; Chromadorea; Tylenchida; Tylenchina; Tylenchoidea; Heteroderidae; Heteroderinae; Heterodera
51031 Eukaryota; Metazoa; Nematoda; Chromadorea; Rhabditida; Strongylida; Ancylostomatoidea; Ancylostomatidae; Bunostominae; Necator
-51074 Eukaryota; Metazoa; Arthropoda; Hexapoda; Insecta; Pterygota; Neoptera; Orthopteroidea; Orthoptera; Ensifera; Gryllidae; Gryllinae; Gryllus
51240 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids I; Fagales; Juglandaceae; Juglans
51329 Eukaryota; Viridiplantae; Chlorophyta; Chlorophyceae; Chlamydomonadales; Chlamydomonadaceae; Polytomella
-51453 Eukaryota; Fungi; Ascomycota; Pezizomycotina; Sordariomycetes; Hypocreomycetidae; Hypocreales; Hypocreaceae; Hypocrea
+51351 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids II; Brassicales; Brassicaceae; Brassica
+51453 Eukaryota; Fungi; Dikarya; Ascomycota; Pezizomycotina; Sordariomycetes; Hypocreomycetidae; Hypocreales; Hypocreaceae; Hypocrea
51511 Eukaryota; Metazoa; Chordata; Urochordata; Ascidiacea; Enterogona; Phlebobranchia; Cionidae; Ciona
-51655 Eukaryota; Metazoa; Arthropoda; Hexapoda; Insecta; Pterygota; Neoptera; Endopterygota; Lepidoptera; Glossata; Ditrysia; Yponomeutoidea; Plutellidae; Plutella
-51657 Eukaryota; Fungi; Ascomycota; Saccharomycotina; Saccharomycetes; Saccharomycetales; Saccharomycetaceae; Nakaseomyces
+51657 Eukaryota; Fungi; Dikarya; Ascomycota; Saccharomycotina; Saccharomycetes; Saccharomycetales; Saccharomycetaceae; Nakaseomyces
51695 Eukaryota; Viridiplantae; Chlorophyta; Chlorophyceae; Chlamydomonadales; Chlamydomonadaceae; Chlamydomonas
-51953 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; Liliopsida; Arecaceae; Arecoideae; Cocoeae; Elaeidinae; Elaeis
-52283 Eukaryota; Metazoa; Arthropoda; Chelicerata; Arachnida; Acari; Acariformes; Sarcoptiformes; Astigmata; Psoroptidia; Sarcoptoidea; Sarcoptidae; Sarcoptes
+51953 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; Liliopsida; Arecaceae; Arecoideae; Cocoseae; Elaeidinae; Elaeis
52545 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; Liliopsida; Poales; Poaceae; BEP clade; Ehrhartoideae; Oryzeae; Oryza
-52714 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; Liliopsida; Poales; Poaceae; BEP clade; Pooideae; Triticeae; Leymus
+52641 Eukaryota; Metazoa; Arthropoda; Crustacea; Malacostraca; Eumalacostraca; Peracarida; Amphipoda; Gammaridea; Gammaroidea; Gammaridae; Gammarus
+52824 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids II; Brassicales; Brassicaceae; Brassica
53326 Eukaryota; Metazoa; Nematoda; Chromadorea; Rhabditida; Strongylida; Ancylostomatoidea; Ancylostomatidae; Ancylostomatinae; Ancylostoma
-53468 Eukaryota; Metazoa; Platyhelminthes; Cestoda; Eucestoda; Cyclophyllidea; Mesocestoididae; Mesocestoides
54126 Eukaryota; Metazoa; Nematoda; Chromadorea; Diplogasterida; Neodiplogasteridae; Pristionchus
54290 Viruses; ssRNA positive-strand viruses, no DNA stage; Flaviviridae; GBV-C/HGV group
-54734 Eukaryota; Fungi; Ascomycota; Pezizomycotina; Dothideomycetes et Chaetothyriomycetes incertae sedis; Mycosphaerellaceae; Mycosphaerella
+54734 Eukaryota; Fungi; Dikarya; Ascomycota; Pezizomycotina; Dothideomycetes; Dothideomycetidae; Capnodiales; Mycosphaerellaceae; Mycosphaerella
55188 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids II; Sapindales; Rutaceae; Citrus
+55529 Eukaryota; Cryptophyta; Cryptomonadaceae; Guillardia
55670 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; asterids; campanulids; Asterales; Asteraceae; Asteroideae; Eupatorieae; Stevia
-55960 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; Liliopsida; Asparagales; Agavaceae; Yucca
+57267 Eukaryota; Alveolata; Apicomplexa; Aconoidasida; Haemosporida; Plasmodium; Plasmodium (Laverania)
+57486 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Mammalia; Eutheria; Euarchontoglires; Glires; Rodentia; Sciurognathi; Muroidea; Muridae; Murinae; Mus
57577 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids I; Fabales; Fabaceae; Papilionoideae; Trifolieae; Trifolium
57918 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids I; Rosales; Rosaceae; Rosoideae; Fragaria
58031 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Cycadophyta; Cycadales; Cycadaceae; Cycas
+58641 Eukaryota; Fungi; Dikarya; Ascomycota; Saccharomycotina; Saccharomycetes; Saccharomycetales; Saccharomycetaceae; Debaryomyces
58824 Eukaryota; Metazoa; Arthropoda; Hexapoda; Insecta; Pterygota; Neoptera; Endopterygota; Lepidoptera; Glossata; Ditrysia; Pyraloidea; Pyralidae; Phycitinae; Plodia
59463 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Mammalia; Eutheria; Laurasiatheria; Chiroptera; Microchiroptera; Vespertilionidae; Myotis
-59479 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Mammalia; Eutheria; Laurasiatheria; Chiroptera; Microchiroptera; Rhinolophidae; Rhinolophinae; Rhinolophus
-59689 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids II; Brassicales; Brassicaceae; Arabidopsis
-59729 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Archosauria; Aves; Neognathae; Passeriformes; Passeroidea; Estrildidae; Estrildinae; Taeniopygia
+59691 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids II; Brassicales; Brassicaceae; Arabidopsis
+59729 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Archosauria; Dinosauria; Saurischia; Theropoda; Coelurosauria; Aves; Neognathae; Passeriformes; Passeroidea; Estrildidae; Estrildinae; Taeniopygia
59747 Eukaryota; Metazoa; Nematoda; Chromadorea; Tylenchida; Tylenchina; Tylenchoidea; Meloidogynidae; Meloidogyninae; Meloidogyne
59777 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Lycopodiophyta; Isoetopsida; Selaginellales; Selaginellaceae; Selaginella
59861 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Actinopterygii; Neopterygii; Teleostei; Euteleostei; Protacanthopterygii; Salmoniformes; Salmonidae; Coregonus
+61369 Eukaryota; Fungi; Dikarya; Ascomycota; Pezizomycotina; Sordariomycetes; Hypocreomycetidae; Hypocreales; mitosporic Hypocreales; Fusarium; Fusarium oxysporum species complex
+61970 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Actinopterygii; Chondrostei; Acipenseriformes; Acipenseridae; Acipenser
62324 Eukaryota; Metazoa; Arthropoda; Hexapoda; Insecta; Pterygota; Neoptera; Endopterygota; Diptera; Nematocera; Culicoidea; Culicidae; Anophelinae; Anopheles
-62890 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; asterids; lamiids; Solanales; Solanaceae; Solanum; Lycopersicon
-63409 Eukaryota; Viridiplantae; Chlorophyta; Ulvophyceae; Ulvales; Ulvaceae; Ulva
+62688 Eukaryota; Fungi; Dikarya; Ascomycota; Pezizomycotina; Leotiomycetes; Erysiphales; Erysiphaceae; Blumeria
+62890 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; asterids; lamiids; Solanales; Solanaceae; Solanoideae; Solaneae; Solanum; Lycopersicon
63629 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; Liliopsida; Poales; Poaceae; BEP clade; Ehrhartoideae; Oryzeae; Oryza
63632 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; Liliopsida; Poales; Poaceae; BEP clade; Pooideae; Aveneae; Agrostis
64093 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; asterids; lamiids; Lamiales; Orobanchaceae; Rhinantheae; Triphysaria
-64468 Eukaryota; Metazoa; Arthropoda; Crustacea; Malacostraca; Eumalacostraca; Eucarida; Decapoda; Dendrobranchiata; Penaeoidea; Penaeidae; Litopenaeus
-64495 Eukaryota; Fungi; Zygomycota; Zygomycetes; Mucorales; Mucoraceae; Rhizopus
-64602 Archaea; Euryarchaeota; Halobacteria; Halobacteriales; Halobacteriaceae; Natrialba
-64884 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids II; Sapindales; Rutaceae; Citrus
-65344 Eukaryota; Metazoa; Arthropoda; Hexapoda; Insecta; Pterygota; Neoptera; Paraneoptera; Hemiptera; Euhemiptera; Heteroptera; Panheteroptera; Cimicomorpha; Reduviidae; Triatominae; Triatoma
-66189 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Testudines; Cryptodira; Testudinoidea; Testudinidae; Geochelone
+64495 Eukaryota; Fungi; Fungi incertae sedis; Basal fungal lineages; Mucoromycotina; Mucorales; Mucoraceae; Rhizopus
+65032 Eukaryota; Metazoa; Arthropoda; Hexapoda; Insecta; Pterygota; Neoptera; Endopterygota; Lepidoptera; Glossata; Ditrysia; Tortricoidea; Tortricidae; Tortricinae; Epiphyas
66468 Eukaryota; Alveolata; Dinophyceae; Peridiniales; Heterocapsaceae; Heterocapsa
66913 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Actinopterygii; Neopterygii; Teleostei; Ostariophysi; Siluriformes; Ictaluridae; Ictalurus
67593 Eukaryota; stramenopiles; Oomycetes; Peronosporales; Phytophthora
68887 Viruses; ssDNA viruses; Anellovirus
69266 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; asterids; Ericales; Ericaceae; Vaccinioideae; Vaccinieae; Vaccinium
69293 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Actinopterygii; Neopterygii; Teleostei; Euteleostei; Neoteleostei; Acanthomorpha; Acanthopterygii; Percomorpha; Gasterosteiformes; Gasterosteidae; Gasterosteus
-69721 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; Liliopsida; Araceae; Aroideae; Zantedeschieae; Zantedeschia
+69721 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; Liliopsida; Araceae; Philodendroideae; Zantedeschieae; Zantedeschia
+69919 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; asterids; lamiids; Lamiales; Phrymaceae; Mimulus
+70285 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Actinopterygii; Neopterygii; Teleostei; Euteleostei; Protacanthopterygii; Salmoniformes; Salmonidae; Thymallus
70415 Eukaryota; Metazoa; Nematoda; Enoplea; Trichocephalida; Trichuridae; Trichuris
-70448 Eukaryota; Viridiplantae; Chlorophyta; Prasinophyceae; Mamiellales; Mamiellaceae; Ostreococcus
71139 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; Myrtales; Myrtaceae; Eucalyptus
-71150 Eukaryota; Fungi; Basidiomycota; Hymenomycetes; Homobasidiomycetes; Boletales; Paxilineae; Paxillaceae; Paxillus
+71150 Eukaryota; Fungi; Dikarya; Basidiomycota; Agaricomycotina; Agaricomycetes; Agaricomycetidae; Boletales; Paxilineae; Paxillaceae; Paxillus
+71272 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; Myrtales; Myrtaceae; Eucalyptus
71647 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Coniferopsida; Coniferales; Pinaceae; Pinus; Pinus
72019 Eukaryota; Ichthyosporea; Ichthyophonida; Sphaeroforma
72036 Eukaryota; Metazoa; Arthropoda; Crustacea; Maxillopoda; Copepoda; Siphonostomatoida; Caligidae; Lepeophtheirus
+72095 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Actinopterygii; Neopterygii; Teleostei; Euteleostei; Neoteleostei; Acanthomorpha; Acanthopterygii; Percomorpha; Scorpaeniformes; Scorpaenoidei; Sebastidae; Sebastinae; Sebastes
72658 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids II; Brassicales; Brassicaceae; Boechera
72664 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids II; Brassicales; Brassicaceae; Thellungiella
+73239 Eukaryota; Alveolata; Apicomplexa; Aconoidasida; Haemosporida; Plasmodium; Plasmodium (Vinckeia)
73275 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; asterids; campanulids; Asterales; Asteraceae; Asteroideae; Heliantheae; Helianthus
+73280 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; asterids; campanulids; Asterales; Asteraceae; Asteroideae; Heliantheae; Helianthus
73304 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; asterids; campanulids; Asterales; Asteraceae; Asteroideae; Heliantheae; Helianthus
-74495 Eukaryota; Fungi; Ascomycota; Pezizomycotina; Orbiliomycetes; Orbiliales; Orbiliaceae; mitosporic Orbiliaceae; Monacrosporium
-74648 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids I; Rosales; Rosaceae; Rosoideae; Rosa
-74649 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids I; Rosales; Rosaceae; Rosoideae; Rosa
+74495 Eukaryota; Fungi; Dikarya; Ascomycota; Pezizomycotina; Orbiliomycetes; Orbiliales; Orbiliaceae; mitosporic Orbiliaceae; Monacrosporium
74940 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Actinopterygii; Neopterygii; Teleostei; Euteleostei; Protacanthopterygii; Salmoniformes; Salmonidae; Oncorhynchus
75329 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Actinopterygii; Neopterygii; Teleostei; Ostariophysi; Cypriniformes; Cobitidae; Cobitinae; Misgurnus
75702 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids I; Malpighiales; Salicaceae; Saliceae; Populus
75943 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; asterids; campanulids; Asterales; Asteraceae; Cichorioideae; Cichorieae; Lactuca
75947 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; asterids; campanulids; Asterales; Asteraceae; Cichorioideae; Cichorieae; Lactuca
75948 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; asterids; campanulids; Asterales; Asteraceae; Cichorioideae; Cichorieae; Lactuca
-76149 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; Caryophyllales; Plumbaginaceae; Plumbago
76159 Eukaryota; Rhodophyta; Bangiophyceae; Bangiales; Bangiaceae; Porphyra
76772 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Mammalia; Eutheria; Euarchontoglires; Glires; Rodentia; Sciurognathi; Sciuridae; Xerinae; Marmotini; Spermophilus
-76867 Eukaryota; Fungi; Basidiomycota; Hymenomycetes; Homobasidiomycetes; Agaricales; Cortinariaceae; Hebeloma
-77038 Bacteria; Proteobacteria; Alphaproteobacteria; Rickettsiales; Rickettsiaceae; Wolbachieae; Wolbachia
+76867 Eukaryota; Fungi; Dikarya; Basidiomycota; Agaricomycotina; Agaricomycetes; Agaricomycetidae; Agaricales; Cortinariaceae; Hebeloma
+76912 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; Liliopsida; Poales; Poaceae; PACCAD clade; Panicoideae; Andropogoneae; Zea
+77009 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; Liliopsida; Poales; Poaceae; BEP clade; Pooideae; Triticeae; Hordeum
77108 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; basal Magnoliophyta; Nymphaeales; Nymphaeaceae; Nuphar
+77133 Bacteria; environmental samples
77306 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Actinopterygii; Neopterygii; Teleostei; Euteleostei; Neoteleostei; Acanthomorpha; Acanthopterygii; Percomorpha; Perciformes; Labroidei; Cichlidae; African cichlids; Pseudocrenilabrinae; Haplochromini; Paralabidochromis
+77504 Eukaryota; Metazoa; Arthropoda; Hexapoda; Insecta; Pterygota; Neoptera; Endopterygota; Hymenoptera; Apocrita; Ichneumonoidea; Braconidae; Aphidiinae; Lysiphlebus
77588 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; Liliopsida; Poales; Poaceae; BEP clade; Ehrhartoideae; Oryzeae; Oryza
-78579 Eukaryota; Fungi; Ascomycota; Pezizomycotina; Sordariomycetes; Sordariomycetidae; Sordariales; Chaetomiaceae; Corynascus
+78579 Eukaryota; Fungi; Dikarya; Ascomycota; Pezizomycotina; Sordariomycetes; Sordariomycetidae; Sordariales; Chaetomiaceae; Corynascus
78828 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; Liliopsida; Asparagales; Orchidaceae; Epidendroideae; higher Epidendroideae; Vandeae; Aeridinae; Phalaenopsis
79327 Eukaryota; Metazoa; Platyhelminthes; Turbellaria; Seriata; Tricladida; Paludicola; Dugesiidae; Schmidtea
79738 Eukaryota; Metazoa; Platyhelminthes; Turbellaria; Seriata; Tricladida; Paludicola; Dugesiidae; Dugesia
-79858 Eukaryota; Fungi; Ascomycota; Pezizomycotina; Eurotiomycetes; Onygenales; mitosporic Onygenales; Geomyces
+79858 Eukaryota; Fungi; Dikarya; Ascomycota; Pezizomycotina; Eurotiomycetes; Eurotiomycetidae; Onygenales; mitosporic Onygenales; Geomyces
79880 Bacteria; Firmicutes; Bacillales; Bacillaceae; Bacillus
79923 Eukaryota; Metazoa; Platyhelminthes; Trematoda; Digenea; Opisthorchiida; Opisthorchiata; Opisthorchioidea; Opisthorchiidae; Clonorchis
+80265 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; Liliopsida; Arecaceae; Arecoideae; Cocoseae; Elaeidinae; Elaeis
80365 Eukaryota; stramenopiles; Phaeophyceae; Laminariales; Laminariaceae; Laminaria
-80765 Eukaryota; Metazoa; Arthropoda; Hexapoda; Insecta; Pterygota; Neoptera; Paraneoptera; Hemiptera; Sternorrhyncha; Aphidiformes; Aphidoidea; Aphididae; Aphidini; Aphis
-80863 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids I; Malpighiales; Salicaceae; Saliceae; Populus
+80765 Eukaryota; Metazoa; Arthropoda; Hexapoda; Insecta; Pterygota; Neoptera; Paraneoptera; Hemiptera; Sternorrhyncha; Aphidiformes; Aphidoidea; Aphididae; Aphidini; Aphis; Aphis
81526 Eukaryota; Choanoflagellida; Codonosigidae; Monosiga
-82927 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; asterids; lamiids; Lamiales; Acanthaceae; Acanthaceae incertae sedis; Avicennia
+82528 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; Liliopsida; Asparagales; Iridaceae; Crocus
83308 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; Liliopsida; Poales; Poaceae; BEP clade; Ehrhartoideae; Oryzeae; Oryza
-83558 Bacteria; Chlamydiae; Chlamydiales; Chlamydiaceae; Chlamydophila
-83675 Eukaryota; Alveolata; Apicomplexa; Coccidia; Eimeriida; Sarcocystidae; Neospora
-84072 Eukaryota; Metazoa; Platyhelminthes; Turbellaria; Acoelomorpha; Acoela; Sagittiferidae; Symsagittifera
85571 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids II; Sapindales; Rutaceae; Citrus
85681 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids II; Sapindales; Rutaceae; Citrus
86005 Bacteria; Firmicutes; Bacillales; Alicyclobacillaceae; Pasteuria
86509 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; Liliopsida; Asparagales; Orchidaceae; Epidendroideae; higher Epidendroideae; Vandeae; Aeridinae; Phalaenopsis
-87530 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; asterids; Ericales; Myrsinaceae; Cyclamen
-88036 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Lycopodiophyta; Isoetopsida; Selaginellales; Selaginellaceae; Selaginella
-89411 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids II; Brassicales; Brassicaceae; Descurainia
89462 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Mammalia; Eutheria; Laurasiatheria; Cetartiodactyla; Ruminantia; Pecora; Bovidae; Bovinae; Bubalus
90988 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Actinopterygii; Neopterygii; Teleostei; Ostariophysi; Cypriniformes; Cyprinidae; Pimephales
91374 Eukaryota; Euglenozoa; Diplonemida; Diplonema
-93883 Eukaryota; Metazoa; Arthropoda; Hexapoda; Insecta; Pterygota; Neoptera; Endopterygota; Lepidoptera; Glossata; Ditrysia; Tineoidea; Tineidae; Tineinae; Tineola
-94232 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Actinopterygii; Neopterygii; Teleostei; Euteleostei; Neoteleostei; Acanthomorpha; Acanthopterygii; Percomorpha; Perciformes; Percoidei; Serranidae; Epinephelinae; Epinephelus
-94289 Eukaryota; Alveolata; Ciliophora; Spirotrichea; Stichotrichia; Stichotrichida; Oxytrichidae; Sterkiella
+94289 Eukaryota; Alveolata; Ciliophora; Intramacronucleata; Spirotrichea; Stichotrichia; Stichotrichida; Oxytrichidae; Sterkiella
94328 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; Liliopsida; Zingiberales; Zingiberaceae; Zingiber
-96480 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids II; Malvales; Malvaceae; Malvoideae; Malva
-96939 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; Vitales; Vitaceae; Vitis
97005 Eukaryota; Metazoa; Nematoda; Chromadorea; Tylenchida; Tylenchina; Tylenchoidea; Heteroderidae; Heteroderinae; Heterodera
-97485 Eukaryota; Haptophyceae; Prymnesiales; Prymnesium
+97485 Eukaryota; Haptophyceae; Prymnesiales; Prymnesiaceae; Prymnesium
98038 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids II; Brassicales; Brassicaceae; Thellungiella
-99586 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Lepidosauria; Squamata; Scleroglossa; Serpentes; Colubroidea; Viperidae; Viperinae; Echis
99883 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Actinopterygii; Neopterygii; Teleostei; Euteleostei; Neoteleostei; Acanthomorpha; Acanthopterygii; Percomorpha; Tetraodontiformes; Tetradontoidea; Tetraodontidae; Tetraodon
-101203 Eukaryota; stramenopiles; Oomycetes; Saprolegniales; Saprolegniaceae; Saprolegnia
-102803 Eukaryota; Metazoa; Arthropoda; Hexapoda; Insecta; Pterygota; Neoptera; Endopterygota; Coleoptera; Polyphaga; Cucujiformia; Curculionidae; Scolytinae; Ips
-103999 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; asterids; campanulids; Asterales; Campanulaceae; Codonopsis
-104355 Eukaryota; Fungi; Basidiomycota; Hymenomycetes; Homobasidiomycetes; Aphyllophorales; Polyporaceae; Gloeophyllum
-105581 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids II; Sapindales; Rutaceae; Citrus x Poncirus
-106566 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids I; Rosales; Rosaceae; Maloideae; Malus
+100272 Eukaryota; environmental samples
+100933 Eukaryota; Cercozoa; Cercomonadida; Cercomonadidae; Cercomonas
+101020 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids I; Rosales; Rosaceae; Rosoideae; Fragaria
+103874 Eukaryota; Diplomonadida; Hexamitidae; Hexamitinae; Spironucleus
+104355 Eukaryota; Fungi; Dikarya; Basidiomycota; Agaricomycotina; Agaricomycetes; Gloeophyllales; Gloeophyllaceae; Gloeophyllum
+105145 Eukaryota; Metazoa; Arthropoda; Chelicerata; Arachnida; Acari; Acariformes; Sarcoptiformes; Astigmata; Glycyphagoidea; Glycyphagidae; Glycyphagus
107243 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids II; Brassicales; Brassicaceae; Thlaspi
108210 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids I; Fabales; Fabaceae; Papilionoideae; Aeschynomeneae; Arachis
108607 Eukaryota; Pelobiontida; Mastigamoebidae; Mastigamoeba
-109760 Eukaryota; Fungi; Chytridiomycota; Spizellomycetales; Spizellomycetaceae; Spizellomyces
-110365 Eukaryota; Alveolata; Apicomplexa; Gregarinia; Eugregarinida; Gregarinidae; Gregarina
-110368 Eukaryota; Metazoa; Arthropoda; Hexapoda; Insecta; Pterygota; Neoptera; Endopterygota; Lepidoptera; Glossata; Ditrysia; Papilionoidea; Nymphalidae; Satyrinae; Elymniini; Mycalesina; Bicyclus
+109027 Eukaryota; Metazoa; Arthropoda; Hexapoda; Insecta; Pterygota; Neoptera; Orthopteroidea; Orthoptera; Ensifera; Grylloidea; Gryllidae; Trigonidiinae; Laupala
+109760 Eukaryota; Fungi; Chytridiomycota; Chytridiomycetes; Spizellomycetales; Spizellomycetaceae; Spizellomyces
+109997 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids II; Brassicales; Brassicaceae; Raphanus
+110368 Eukaryota; Metazoa; Arthropoda; Hexapoda; Insecta; Pterygota; Neoptera; Endopterygota; Lepidoptera; Glossata; Ditrysia; Papilionoidea; Nymphalidae; Satyrinae; Satyrini; Mycalesina; Bicyclus
110450 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; Liliopsida; Poales; Poaceae; BEP clade; Ehrhartoideae; Oryzeae; Oryza
-110520 Eukaryota; Metazoa; Arthropoda; Crustacea; Maxillopoda; Cirripedia; Thoracica; Sessilia; Balanidae; Balanus
-110835 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; Liliopsida; Poales; Poaceae; PACCAD clade; Chloridoideae; Eragrostideae; Eragrostis
+110771 Eukaryota; Entamoebidae; Entamoeba
+110835 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; Liliopsida; Poales; Poaceae; PACCAD clade; Chloridoideae; Cynodonteae; Eragrostis
+112091 Eukaryota; stramenopiles; Oomycetes; Saprolegniales; Saprolegniaceae; Aphanomyces
+112509 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; Liliopsida; Poales; Poaceae; BEP clade; Pooideae; Triticeae; Hordeum
113636 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids I; Malpighiales; Salicaceae; Saliceae; Populus
-114525 Eukaryota; Fungi; Ascomycota; Saccharomycotina; Saccharomycetes; Saccharomycetales; Saccharomycetaceae; Saccharomyces
-114526 Eukaryota; Fungi; Ascomycota; Saccharomycotina; Saccharomycetes; Saccharomycetales; Saccharomycetaceae; Saccharomyces
+114280 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; asterids; campanulids; Asterales; Asteraceae; Cichorioideae; Cichorieae; Cichorium
115339 Eukaryota; Metazoa; Arthropoda; Chelicerata; Arachnida; Araneae; Mygalomorphae; Theraphosidae; Acanthoscurria
-117187 Eukaryota; Fungi; Ascomycota; Pezizomycotina; Sordariomycetes; Hypocreomycetidae; Hypocreales; Nectriaceae; Gibberella
-120305 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Lepidosauria; Squamata; Scleroglossa; Serpentes; Colubroidea; Colubridae; Xenodontinae; Philodryas
-121225 Eukaryota; Metazoa; Arthropoda; Hexapoda; Insecta; Pterygota; Neoptera; Paraneoptera; Phthiraptera; Anoplura; Pediculidae; Pediculus
-121540 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; asterids; campanulids; Asterales; Asteraceae; Asteroideae; Senecioneae; Senecio
-121541 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; asterids; campanulids; Asterales; Asteraceae; Asteroideae; Senecioneae; Senecio
-121759 Eukaryota; Fungi; Ascomycota; Pezizomycotina; Eurotiomycetes; Onygenales; mitosporic Onygenales; Paracoccidioides
+115547 Archaea; environmental samples
+117187 Eukaryota; Fungi; Dikarya; Ascomycota; Pezizomycotina; Sordariomycetes; Hypocreomycetidae; Hypocreales; Nectriaceae; Gibberella
+121224 Eukaryota; Metazoa; Arthropoda; Hexapoda; Insecta; Pterygota; Neoptera; Paraneoptera; Phthiraptera; Anoplura; Pediculidae; Pediculus
+121226 Eukaryota; Metazoa; Arthropoda; Hexapoda; Insecta; Pterygota; Neoptera; Paraneoptera; Phthiraptera; Anoplura; Pediculidae; Pediculus
+121759 Eukaryota; Fungi; Dikarya; Ascomycota; Pezizomycotina; Eurotiomycetes; Eurotiomycetidae; Onygenales; mitosporic Onygenales; Paracoccidioides
121845 Eukaryota; Metazoa; Arthropoda; Hexapoda; Insecta; Pterygota; Neoptera; Paraneoptera; Hemiptera; Sternorrhyncha; Psylliformes; Psylloidea; Psyllidae; Diaphorina
-123226 Eukaryota; Metazoa; Arthropoda; Chelicerata; Arachnida; Scorpiones; Buthida; Buthoidea; Buthidae; Mesobuthus
-124917 Eukaryota; Metazoa; Arthropoda; Hexapoda; Insecta; Pterygota; Neoptera; Endopterygota; Diptera; Nematocera; Culicoidea; Culicidae; Culicinae; Culicini; Armigeres; Armigeres
-126914 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; Caryophyllales; Amaranthaceae; Suaeda
128735 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids I; Rosales; Rosaceae; Rosoideae; Rosa
128810 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; Liliopsida; Poales; Poaceae; PACCAD clade; Panicoideae; Andropogoneae; Saccharum; Saccharum officinarum complex
130453 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids I; Fabales; Fabaceae; Papilionoideae; Aeschynomeneae; Arachis
131310 Eukaryota; Metazoa; Nematoda; Chromadorea; Rhabditida; Panagrolaimoidea; Strongyloididae; Parastrongyloides
132711 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; Liliopsida; Poales; Poaceae; PACCAD clade; Panicoideae; Andropogoneae; Sorghum
+135651 Eukaryota; Metazoa; Nematoda; Chromadorea; Rhabditida; Rhabditoidea; Rhabditidae; Peloderinae; Caenorhabditis
136089 Eukaryota; Malawimonadidae; Malawimonas
136217 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; Liliopsida; Zingiberales; Zingiberaceae; Curcuma
-138072 Bacteria; Proteobacteria; Gammaproteobacteria; Enterobacteriales; Enterobacteriaceae; aphid secondary symbionts
+137071 Eukaryota; Alveolata; Apicomplexa; Aconoidasida; Haemosporida; Plasmodium; Plasmodium (Laverania)
139456 Eukaryota; Metazoa; Arthropoda; Crustacea; Malacostraca; Eumalacostraca; Eucarida; Decapoda; Dendrobranchiata; Penaeoidea; Penaeidae; Fenneropenaeus
-140311 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids I; Rosales; Rosaceae; Amygdaloideae; Prunus
142860 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids I; Malpighiales; Euphorbiaceae; Euphorbioideae; Euphorbieae; Euphorbia
143017 Eukaryota; Jakobidae; Jakoba
-145475 Eukaryota; Viridiplantae; Chlorophyta; Trebouxiophyceae; Helicosporidium
+143606 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Actinopterygii; Neopterygii; Teleostei; Ostariophysi; Cypriniformes; Cyprinidae; Gobiocypris
+145481 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Bryophyta; Moss Superclass V; Bryopsida; Funariidae; Funariales; Funariaceae; Physcomitrella
146911 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Lepidosauria; Squamata; Scleroglossa; Gekkota; Gekkonidae; Gekkoninae; Gekko
-148305 Eukaryota; Fungi; Ascomycota; Pezizomycotina; Sordariomycetes; Sordariomycetes incertae sedis; Magnaporthaceae; Magnaporthe
-153471 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids I; Malpighiales; Salicaceae; Saliceae; Populus
-155694 Eukaryota; Metazoa; Arthropoda; Crustacea; Malacostraca; Eumalacostraca; Peracarida; Isopoda; Cirolanidae; Eurydice
-155874 Eukaryota; Fungi; Ascomycota; Pezizomycotina; Sordariomycetes; Sordariomycetidae; Sordariales; Chaetomiaceae; Chaetomium
+148305 Eukaryota; Fungi; Dikarya; Ascomycota; Pezizomycotina; Sordariomycetes; Sordariomycetes incertae sedis; Magnaporthaceae; Magnaporthe
+155874 Eukaryota; Fungi; Dikarya; Ascomycota; Pezizomycotina; Sordariomycetes; Sordariomycetidae; Sordariales; Chaetomiaceae; Chaetomium
+155900 unclassified sequences; environmental samples
156230 Eukaryota; Alveolata; Dinophyceae; Gymnodiniales; Gymnodiniaceae; Karenia
+158441 Eukaryota; Metazoa; Arthropoda; Hexapoda; Collembola; Arthropleona; Entomobryoidea; Isotomidae; Proisotominae; Folsomia
160621 Eukaryota; Alveolata; Dinophyceae; Gonyaulacales; Lingulodinium
161934 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; Caryophyllales; Amaranthaceae; Beta
162145 Viruses; ssRNA negative-strand viruses; Mononegavirales; Paramyxoviridae; Pneumovirinae; Metapneumovirus
-162425 Eukaryota; Fungi; Ascomycota; Pezizomycotina; Eurotiomycetes; Eurotiales; Trichocomaceae; Emericella
-164110 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; asterids; lamiids; Solanales; Solanaceae; Nicotiana
+162425 Eukaryota; Fungi; Dikarya; Ascomycota; Pezizomycotina; Eurotiomycetes; Eurotiomycetidae; Eurotiales; Trichocomaceae; Emericella
164328 Eukaryota; stramenopiles; Oomycetes; Peronosporales; Phytophthora
-168635 Eukaryota; Metazoa; Chordata; Urochordata; Ascidiacea; Enterogona; Aplousobranchia; Didemnidae; Diplosoma
-168636 Eukaryota; Metazoa; Annelida; Clitellata; Oligochaeta; Haplotaxida; Lumbricina; Lumbricidae; Eisenia
-169388 Eukaryota; Fungi; Ascomycota; Pezizomycotina; Sordariomycetes; Hypocreomycetidae; Hypocreales; Nectriaceae; Nectria
-170000 Eukaryota; Fungi; Basidiomycota; Urediniomycetes; Urediniomycetidae; Uredinales; Phakopsoraceae; Phakopsora
+169388 Eukaryota; Fungi; Dikarya; Ascomycota; Pezizomycotina; Sordariomycetes; Hypocreomycetidae; Hypocreales; mitosporic Hypocreales; Fusarium; Fusarium solani species complex
+170000 Eukaryota; Fungi; Dikarya; Basidiomycota; Pucciniomycotina; Pucciniomycetes; Pucciniales; Phakopsoraceae; Phakopsora
171252 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids II; Sapindales; Rutaceae; Citrus
-172665 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Lepidosauria; Squamata; Iguania; Iguanidae; Polychrotinae; Anolis
-176275 Eukaryota; Fungi; Ascomycota; Pezizomycotina; Sordariomycetes; Hypocreomycetidae; Hypocreales; Clavicipitaceae; Cordyceps
-178872 Eukaryota; Fungi; Basidiomycota; Hymenomycetes; Homobasidiomycetes; Boletales; Sclerodermatineae; Pisolithaceae; Pisolithus
-179119 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; Caryophyllales; Amaranthaceae; Salicornia
+172969 Eukaryota; Rhodophyta; Florideophyceae; Gracilariales; Gracilariaceae; Gracilaria
+175245 Eukaryota; Fungi; environmental samples
+176275 Eukaryota; Fungi; Dikarya; Ascomycota; Pezizomycotina; Sordariomycetes; Hypocreomycetidae; Hypocreales; Cordycipitaceae; Cordyceps
+177089 Eukaryota; Metazoa; Arthropoda; Hexapoda; Insecta; Pterygota; Neoptera; Paraneoptera; Hemiptera; Sternorrhyncha; Aphidiformes; Coccoidea; Pseudococcidae; Maconellicoccus
179676 Eukaryota; Metazoa; Arthropoda; Hexapoda; Insecta; Pterygota; Neoptera; Endopterygota; Diptera; Nematocera; Chironomoidea; Ceratopogonidae; Ceratopogoninae; Culicoides; Monoculicoides
+180454 Eukaryota; Metazoa; Arthropoda; Hexapoda; Insecta; Pterygota; Neoptera; Endopterygota; Diptera; Nematocera; Culicoidea; Culicidae; Anophelinae; Anopheles
181200 Eukaryota; Mycetozoa; Hyperamoeba
-183855 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; Myrtales; Myrtaceae; Eucalyptus
+184922 Eukaryota; Diplomonadida; Hexamitidae; Giardiinae; Giardia
+185431 Eukaryota; Euglenozoa; Kinetoplastida; Trypanosomatidae; Trypanosoma
186039 Eukaryota; stramenopiles; Bacillariophyta; Bacillariophyceae; Bacillariophycidae; Bacillariales; Bacillariaceae; Fragilariopsis
-188904 Eukaryota; Alveolata; Dinophyceae; Gymnodiniales; Gymnodiniaceae; Karlodinium
+186617 Viruses; environmental samples
+187813 Eukaryota; stramenopiles; Oomycetes; Peronosporales; Phytophthora
189293 Eukaryota; Metazoa; Nematoda; Chromadorea; Tylenchida; Tylenchina; Tylenchoidea; Meloidogynidae; Meloidogyninae; Meloidogyne
189785 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; Caryophyllales; Tamaricaceae; Tamarix
+189793 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; Caryophyllales; Tamaricaceae; Tamarix
192875 Eukaryota; Ichthyosporea; Capsaspora
194530 Eukaryota; Heterolobosea; Schizopyrenida; Vahlkampfiidae; Sawyeria
197043 Eukaryota; Metazoa; Arthropoda; Hexapoda; Insecta; Pterygota; Neoptera; Paraneoptera; Hemiptera; Euhemiptera; Membracoidea; Cicadellidae; Cicadellinae; Homalodisca
-199306 Eukaryota; Fungi; Ascomycota; Pezizomycotina; Eurotiomycetes; Onygenales; mitosporic Onygenales; Coccidioides
+198431 unclassified sequences; environmental samples
+199306 Eukaryota; Fungi; Dikarya; Ascomycota; Pezizomycotina; Eurotiomycetes; Eurotiomycetidae; Onygenales; mitosporic Onygenales; Coccidioides
+202578 Eukaryota; Metazoa; Mollusca; Bivalvia; Pteriomorphia; Pectinoida; Pectinoidea; Pectinidae; Chlamys
204232 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; Liliopsida; Poales; Poaceae; BEP clade; Pooideae; Aveneae; Agrostis
-208273 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; Liliopsida; Poales; Poaceae; PACCAD clade; Chloridoideae; Eragrostideae; Eragrostis
+208348 Eukaryota; Fungi; Dikarya; Basidiomycota; Pucciniomycotina; Pucciniomycetes; Pucciniales; Pucciniaceae; Puccinia
+214684 Eukaryota; Fungi; Dikarya; Basidiomycota; Agaricomycotina; Tremellomycetes; Tremellales; Tremellaceae; Filobasidiella
+215693 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; asterids; campanulids; Asterales; Asteraceae; Carduoideae; Cardueae; Centaurea
+217475 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids I; Fabales; Fabaceae; Papilionoideae; Aeschynomeneae; Arachis
+217619 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids I; Cucurbitales; Cucurbitaceae; Cucumis
219666 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; asterids; lamiids; Gentianales; Rubiaceae; Rubioideae; Spermacoceae; Hedyotis
219667 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; asterids; lamiids; Gentianales; Rubiaceae; Rubioideae; Spermacoceae; Hedyotis
219738 Eukaryota; Metazoa; Nematoda; Enoplea; Trichocephalida; Trichuridae; Trichuris
@@ -782,58 +709,123 @@
221722 Eukaryota; Malawimonadidae; Malawimonas
221724 Eukaryota; Jakobidae; Seculamonas
222440 Eukaryota; Oxymonadida; Streblomastigidae; Streblomastix
+223430 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; Ranunculales; Ranunculaceae; Aquilegia
+223625 Eukaryota; Metazoa; Arthropoda; Chelicerata; Arachnida; Acari; Acariformes; Sarcoptiformes; Astigmata; Acaroidea; Suidasiidae; Suidasia
223852 Eukaryota; Metazoa; Arthropoda; Hexapoda; Insecta; Pterygota; Neoptera; Paraneoptera; Hemiptera; Sternorrhyncha; Aphidiformes; Aphidoidea; Aphididae; Aphidini; Toxoptera
-226208 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; asterids; lamiids; Lamiales; Lamiaceae; Nepetoideae; Nepeteae; Salvia
-226899 Eukaryota; Fungi; Ascomycota; Pezizomycotina; Sordariomycetes; Sordariomycetidae; Ophiostomatales; Ophiostomataceae; Ophiostoma
+226126 Eukaryota; Fungi; Dikarya; Ascomycota; Saccharomycotina; Saccharomycetes; Saccharomycetales; Saccharomycetaceae; Saccharomyces
+226208 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; asterids; lamiids; Lamiales; Lamiaceae; Nepetoideae; Mentheae; Salvia
+226891 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; asterids; campanulids; Asterales; Asteraceae; Mutisioideae; Mutisieae; Gerbera
+226899 Eukaryota; Fungi; Dikarya; Ascomycota; Pezizomycotina; Sordariomycetes; Sordariomycetidae; Ophiostomatales; Ophiostomataceae; Grosmannia
227086 Eukaryota; Cercozoa; Chlorarachniophyceae; Bigelowiella
-230603 Eukaryota; Fungi; Ascomycota; Saccharomycotina; Saccharomycetes; Saccharomycetales; Saccharomycetaceae; Saccharomyces
+227321 Eukaryota; Fungi; Dikarya; Ascomycota; Pezizomycotina; Eurotiomycetes; Eurotiomycetidae; Eurotiales; Trichocomaceae; Emericella
+229533 Eukaryota; Fungi; Dikarya; Ascomycota; Pezizomycotina; Sordariomycetes; Hypocreomycetidae; Hypocreales; Nectriaceae; Gibberella
+230603 Eukaryota; Fungi; Dikarya; Ascomycota; Saccharomycotina; Saccharomycetes; Saccharomycetales; Saccharomycetaceae; Saccharomyces
+230844 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Mammalia; Eutheria; Euarchontoglires; Glires; Rodentia; Sciurognathi; Muroidea; Cricetidae; Neotominae; Peromyscus
+232082 Eukaryota; Fungi; Dikarya; Ascomycota; Pezizomycotina; Sordariomycetes; Hypocreomycetidae; Hypocreales; mitosporic Hypocreales; Fusarium; Fusarium solani species complex
232323 Eukaryota; Metazoa; Tardigrada; Eutardigrada; Apochela; Hypsibiidae; Hypsibius
-237895 Eukaryota; Alveolata; Apicomplexa; Coccidia; Eimeriida; Cryptosporidiidae; Cryptosporidium
+237561 Eukaryota; Fungi; Dikarya; Ascomycota; Saccharomycotina; Saccharomycetes; Saccharomycetales; mitosporic Saccharomycetales; Candida
+237631 Eukaryota; Fungi; Dikarya; Basidiomycota; Ustilaginomycotina; Ustilaginomycetes; Ustilaginales; Ustilaginaceae; Ustilago
240906 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; Liliopsida; Poales; Poaceae; BEP clade; Pooideae; Poeae; Puccinellia
241073 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; Vitales; Vitaceae; Vitis
-245552 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; Liliopsida; Liliales; Alstroemeriaceae; Alstroemeria
+242507 Eukaryota; Fungi; Dikarya; Ascomycota; Pezizomycotina; Sordariomycetes; Sordariomycetes incertae sedis; Magnaporthaceae; Magnaporthe
+246410 Eukaryota; Fungi; Dikarya; Ascomycota; Pezizomycotina; Eurotiomycetes; Eurotiomycetidae; Onygenales; mitosporic Onygenales; Coccidioides
246827 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; Vitales; Vitaceae; Vitis
-255244 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids I; Malpighiales; Salicaceae; Saliceae; Populus
-256318 unclassified sequences; environmental samples
-257784 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; asterids; Ericales; Ericaceae; Ericoideae; Rhodoreae; Rhododendron
-257976 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Actinopterygii; Neopterygii; Teleostei; Euteleostei; Neoteleostei; Acanthomorpha; Acanthopterygii; Percomorpha; Perciformes; Labroidei; Cichlidae; African cichlids; Pseudocrenilabrinae; Haplochromini; Ptyochromis
-261158 Eukaryota; Metazoa; Arthropoda; Hexapoda; Insecta; Pterygota; Neoptera; Endopterygota; Coleoptera; Polyphaga; Elateriformia; Buprestoidea; Buprestidae; Julodinae; Julodis
-262489 Bacteria; Proteobacteria; Deltaproteobacteria
+256318 unclassified sequences; metagenomes
+261423 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; Liliopsida; Asparagales; Ruscaceae; Polygonatum
263995 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; Liliopsida; Acoraceae; Acorus
266772 Eukaryota; Metazoa; Arthropoda; Hexapoda; Insecta; Pterygota; Neoptera; Paraneoptera; Hemiptera; Euhemiptera; Membracoidea; Cicadellidae; Tettigellinae; Oncometopia
-271171 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids I; Fabales; Fabaceae; Papilionoideae; Phaseoleae; Macrotyloma
272140 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; Liliopsida; Asparagales; Amaryllidaceae; Lycoris
+272627 Bacteria; Proteobacteria; Alphaproteobacteria; Rhodospirillales; Rhodospirillaceae; Magnetospirillum
278021 Eukaryota; Fungi; Microsporidia; Antonospora
-279009 Eukaryota; Fungi; Basidiomycota; Hymenomycetes; Homobasidiomycetes; Aphyllophorales; Antrodia
-279580 Eukaryota; Alveolata; Ciliophora; Oligohymenophorea; Scuticociliatia; Philasterida; Philasteridae; Miamiensis
-279730 Eukaryota; Metazoa; Annelida; Clitellata; Hirudinida; Hirudinea; Rhynchobdellida; Glossiphoniidae; Haementeria
-285720 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; asterids; campanulids; Asterales; Asteraceae; Asteroideae; Senecioneae; Senecio
-286530 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; asterids; lamiids; Solanales; Solanaceae; Solanum; Lycopersicon
+278161 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Coniferopsida; Coniferales; Pinaceae; Pseudotsuga
+279009 Eukaryota; Fungi; Dikarya; Basidiomycota; Agaricomycotina; Agaricomycetes; Polyporales; Antrodia
+280699 Eukaryota; Rhodophyta; Bangiophyceae; Cyanidiales; Cyanidiaceae; Cyanidioschyzon
+282301 Eukaryota; Metazoa; Platyhelminthes; Turbellaria; Macrostomorpha; Macrostomida; Macrostomidae; Macrostomum
+283643 Eukaryota; Fungi; Dikarya; Basidiomycota; Agaricomycotina; Tremellomycetes; Tremellales; Tremellaceae; Filobasidiella
+284590 Eukaryota; Fungi; Dikarya; Ascomycota; Saccharomycotina; Saccharomycetes; Saccharomycetales; Saccharomycetaceae; Kluyveromyces
+284591 Eukaryota; Fungi; Dikarya; Ascomycota; Saccharomycotina; Saccharomycetes; Saccharomycetales; Dipodascaceae; Yarrowia
+284592 Eukaryota; Fungi; Dikarya; Ascomycota; Saccharomycotina; Saccharomycetes; Saccharomycetales; Saccharomycetaceae; Debaryomyces
+284593 Eukaryota; Fungi; Dikarya; Ascomycota; Saccharomycotina; Saccharomycetes; Saccharomycetales; mitosporic Saccharomycetales; Candida
+284811 Eukaryota; Fungi; Dikarya; Ascomycota; Saccharomycotina; Saccharomycetes; Saccharomycetales; Saccharomycetaceae; Eremothecium
+284812 Eukaryota; Fungi; Dikarya; Ascomycota; Taphrinomycotina; Schizosaccharomycetes; Schizosaccharomycetales; Schizosaccharomycetaceae; Schizosaccharomyces
288796 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Amphibia; Batrachia; Caudata; Salamandroidea; Ambystomatidae; Ambystoma
-292446 Eukaryota; Metazoa; Arthropoda; Hexapoda; Insecta; Pterygota; Neoptera; Endopterygota; Coleoptera; Polyphaga; Elateriformia; Scirtoidea; Eucinetidae; Eucinetus
-292453 Eukaryota; Metazoa; Arthropoda; Hexapoda; Insecta; Pterygota; Neoptera; Endopterygota; Coleoptera; Polyphaga; Staphyliniformia; Georissidae; Georissus
-292455 Eukaryota; Metazoa; Arthropoda; Hexapoda; Insecta; Pterygota; Neoptera; Endopterygota; Coleoptera; Polyphaga; Staphyliniformia; Histeridae; Histerinae; Hister
-292456 Eukaryota; Metazoa; Arthropoda; Hexapoda; Insecta; Pterygota; Neoptera; Endopterygota; Coleoptera; Polyphaga; Scarabaeiformia; Scarabaeidae; Scarabaeinae; Scarabaeus
-292458 Eukaryota; Metazoa; Arthropoda; Hexapoda; Insecta; Pterygota; Neoptera; Endopterygota; Coleoptera; Polyphaga; Elateriformia; Elateroidea; Elateridae; Elaterinae; Agriotes
293754 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; Caryophyllales; Plumbaginaceae; Limonium
-293756 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids I; Malpighiales; Salicaceae; Saliceae; Populus
-304329 Eukaryota; Metazoa; Arthropoda; Hexapoda; Insecta; Pterygota; Neoptera; Endopterygota; Lepidoptera; Glossata; Ditrysia; Bombycoidea; Saturniidae; Hemileucinae; Lonomia
-307502 Bacteria; Proteobacteria; Alphaproteobacteria; Rickettsiales; Rickettsiaceae; Wolbachieae; Wolbachia
-307630 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids II; Sapindales; Rutaceae; Citrus
-307631 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids II; Sapindales; Rutaceae; Citrus
-309804 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids II; Sapindales; Rutaceae; Citrus x Poncirus
-322160 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids II; Sapindales; Rutaceae; Citrus
+294381 Eukaryota; Entamoebidae; Entamoeba
+294707 Eukaryota; Metazoa; Mollusca; Cephalopoda; Coleoidea; Neocoleoidea; Decapodiformes; Sepioidea; Idiosepiidae; Idiosepius
+294746 Eukaryota; Fungi; Dikarya; Ascomycota; Saccharomycotina; Saccharomycetes; Saccharomycetales; Saccharomycetaceae; Pichia
+296543 Eukaryota; stramenopiles; Bacillariophyta; Coscinodiscophyceae; Thalassiosirophycidae; Thalassiosirales; Thalassiosiraceae; Thalassiosira
+306901 Eukaryota; Fungi; Dikarya; Ascomycota; Pezizomycotina; Sordariomycetes; Sordariomycetidae; Sordariales; Chaetomiaceae; Chaetomium
+312017 Eukaryota; Alveolata; Ciliophora; Intramacronucleata; Oligohymenophorea; Hymenostomatida; Tetrahymenina; Tetrahymenidae; Tetrahymena
+313595 Bacteria; Bacteroidetes; Flavobacteria; Flavobacteriales; Flavobacteriaceae; Psychroflexus
+321614 Eukaryota; Fungi; Dikarya; Ascomycota; Pezizomycotina; Dothideomycetes; Pleosporomycetidae; Pleosporales; Phaeosphaeriaceae; Phaeosphaeria
+322104 Eukaryota; Fungi; Dikarya; Ascomycota; Saccharomycotina; Saccharomycetes; Saccharomycetales; Saccharomycetaceae; Pichia
+325569 Eukaryota; Fungi; Dikarya; Ascomycota; Pezizomycotina; Leotiomycetes; Helotiales; Sclerotiniaceae; Sclerotinia
+328428 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids II; Brassicales; Brassicaceae; Raphanus
+330879 Eukaryota; Fungi; Dikarya; Ascomycota; Pezizomycotina; Eurotiomycetes; Eurotiomycetidae; Eurotiales; Trichocomaceae; mitosporic Trichocomaceae; Aspergillus
+331117 Eukaryota; Fungi; Dikarya; Ascomycota; Pezizomycotina; Eurotiomycetes; Eurotiomycetidae; Eurotiales; Trichocomaceae; Neosartorya
+332648 Eukaryota; Fungi; Dikarya; Ascomycota; Pezizomycotina; Leotiomycetes; Helotiales; Sclerotiniaceae; Botryotinia
+332952 Eukaryota; Fungi; Dikarya; Ascomycota; Pezizomycotina; Eurotiomycetes; Eurotiomycetidae; Eurotiales; Trichocomaceae; mitosporic Trichocomaceae; Aspergillus
+333668 Eukaryota; Alveolata; Apicomplexa; Aconoidasida; Piroplasmida; Theileriidae; Theileria
333970 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; asterids; campanulids; Asterales; Asteraceae; Cichorioideae; Cichorieae; Taraxacum
-338618 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; Ranunculales; Ranunculaceae; Aquilegia
-339852 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids I; Rosales; Rosaceae; Maloideae; Malus
+339724 Eukaryota; Fungi; Dikarya; Ascomycota; Pezizomycotina; Eurotiomycetes; Eurotiomycetidae; Onygenales; Ajellomycetaceae; Ajellomyces
+341663 Eukaryota; Fungi; Dikarya; Ascomycota; Pezizomycotina; Eurotiomycetes; Eurotiomycetidae; Eurotiales; Trichocomaceae; mitosporic Trichocomaceae; Aspergillus
+342587 Eukaryota; Alveolata; Dinophyceae; Gymnodiniales; Gymnodiniaceae; Karlodinium
342808 Eukaryota; Trimastix
-352374 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids I; Malpighiales; Salicaceae; Saliceae; Populus
-358432 Eukaryota; Metazoa; Arthropoda; Hexapoda; Insecta; Pterygota; Neoptera; Endopterygota; Coleoptera; Polyphaga; Scarabaeiformia; Trogidae; Trox
-373101 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Coniferopsida; Coniferales; Pinaceae; Picea
-378006 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids II; Brassicales; Brassicaceae; Arabidopsis
+344612 Eukaryota; Fungi; Dikarya; Ascomycota; Pezizomycotina; Eurotiomycetes; Eurotiomycetidae; Eurotiales; Trichocomaceae; mitosporic Trichocomaceae; Aspergillus
+347515 Eukaryota; Euglenozoa; Kinetoplastida; Trypanosomatidae; Leishmania
+347529 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; asterids; campanulids; Asterales; Asteraceae; Carduoideae; Cardueae; Centaurea
+352472 Eukaryota; Mycetozoa; Dictyosteliida; Dictyostelium
+352914 Eukaryota; Alveolata; Apicomplexa; Aconoidasida; Haemosporida; Plasmodium; Plasmodium (Vinckeia)
+353151 Eukaryota; Alveolata; Apicomplexa; Coccidia; Eucoccidiorida; Eimeriorina; Cryptosporidiidae; Cryptosporidium
+353152 Eukaryota; Alveolata; Apicomplexa; Coccidia; Eucoccidiorida; Eimeriorina; Cryptosporidiidae; Cryptosporidium
+353153 Eukaryota; Euglenozoa; Kinetoplastida; Trypanosomatidae; Trypanosoma; Schizotrypanum
+353154 Eukaryota; Alveolata; Apicomplexa; Aconoidasida; Piroplasmida; Theileriidae; Theileria
+367110 Eukaryota; Fungi; Dikarya; Ascomycota; Pezizomycotina; Sordariomycetes; Sordariomycetidae; Sordariales; Sordariaceae; Neurospora
+370354 Eukaryota; Entamoebidae; Entamoeba
+370355 Eukaryota; Entamoebidae; Entamoeba
+377281 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids II; Brassicales; Limnanthaceae; Limnanthes
+379508 Eukaryota; Fungi; Dikarya; Ascomycota; Saccharomycotina; Saccharomycetes; Saccharomycetales; Saccharomycetaceae; Lodderomyces
+381124 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; Liliopsida; Poales; Poaceae; PACCAD clade; Panicoideae; Andropogoneae; Zea
+383379 Eukaryota; Alveolata; Apicomplexa; Coccidia; Eucoccidiorida; Eimeriorina; Sarcocystidae; Toxoplasma
386100 Eukaryota; Metazoa; Porifera; Demospongiae; Homoscleromorpha; Homosclerophorida; Plakinidae; Oscarella
392300 Eukaryota; Jakobidae; Histiona
-392814 Eukaryota; Viridiplantae; Chlorophyta; Prasinophyceae; Mamiellales; Mamiellaceae; Micromonas
-400101 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Actinopterygii; Neopterygii; Teleostei; Euteleostei; Neoteleostei; Acanthomorpha; Acanthopterygii; Percomorpha; Perciformes; Labroidei; Cichlidae; African cichlids; Pseudocrenilabrinae; Haplochromini; Lipochromis
+392613 Eukaryota; Fungi; Dikarya; Ascomycota; Pezizomycotina; Eurotiomycetes; Eurotiomycetidae; Onygenales; Ascosphaeraceae; Ascosphaera
+393116 Bacteria; Firmicutes; Bacillales; Listeriaceae; Listeria
+393119 Bacteria; Firmicutes; Bacillales; Listeriaceae; Listeria
+394104 Bacteria; Proteobacteria; Gammaproteobacteria; sulfur-oxidizing symbionts; Endoriftia
+396776 Eukaryota; Fungi; Dikarya; Ascomycota; Pezizomycotina; Eurotiomycetes; Eurotiomycetidae; Onygenales; mitosporic Onygenales; Coccidioides
400408 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; asterids; campanulids; Asterales; Asteraceae; Asteroideae; Heliantheae; Helianthus
-404567 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; Liliopsida; Poales; Poaceae; PACCAD clade; Panicoideae; Paniceae; Pennisetum
+403677 Eukaryota; stramenopiles; Oomycetes; Peronosporales; Phytophthora
+408172 unclassified sequences; metagenomes; ecological metagenomes
+410661 unclassified sequences; metagenomes; organismal metagenomes
+412133 Eukaryota; Parabasalidea; Trichomonada; Trichomonadida; Trichomonadidae; Trichomonadinae; Trichomonas
+412675 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids I; Cucurbitales; Cucurbitaceae; Cucumis
+418459 Eukaryota; Fungi; Dikarya; Basidiomycota; Pucciniomycotina; Pucciniomycetes; Pucciniales; Pucciniaceae; Puccinia
+419109 Bacteria; Proteobacteria; Gammaproteobacteria; Vibrionales; Vibrionaceae; Vibrio
+423536 Eukaryota; Alveolata; Perkinsea; Perkinsida; Perkinsidae; Perkinsus
+425011 Eukaryota; Fungi; Dikarya; Ascomycota; Pezizomycotina; Eurotiomycetes; Eurotiomycetidae; Eurotiales; Trichocomaceae; mitosporic Trichocomaceae; Aspergillus
+431241 Eukaryota; Fungi; Dikarya; Ascomycota; Pezizomycotina; Sordariomycetes; Hypocreomycetidae; Hypocreales; Hypocreaceae; Hypocrea
+431595 Eukaryota; stramenopiles; Oomycetes; Pythiales; Pythiaceae; Pythium
+434306 Eukaryota; Entamoebidae; Entamoeba
+435258 Eukaryota; Euglenozoa; Kinetoplastida; Trypanosomatidae; Leishmania
+436017 Eukaryota; Viridiplantae; Chlorophyta; Prasinophyceae; Mamiellales; Mamiellaceae; Ostreococcus
+436907 Eukaryota; Fungi; Dikarya; Ascomycota; Saccharomycotina; Saccharomycetes; Saccharomycetales; Saccharomycetaceae; Vanderwaltozyma
+441154 Bacteria; Proteobacteria; Betaproteobacteria; Burkholderiales; Burkholderiaceae; Burkholderia; pseudomallei group
+441155 Bacteria; Proteobacteria; Betaproteobacteria; Burkholderiales; Burkholderiaceae; Burkholderia; pseudomallei group
+441156 Bacteria; Proteobacteria; Betaproteobacteria; Burkholderiales; Burkholderiaceae; Burkholderia; pseudomallei group
+441157 Bacteria; Proteobacteria; Betaproteobacteria; Burkholderiales; Burkholderiaceae; Burkholderia; pseudomallei group
+441158 Bacteria; Proteobacteria; Betaproteobacteria; Burkholderiales; Burkholderiaceae; Burkholderia; pseudomallei group
+441159 Bacteria; Proteobacteria; Betaproteobacteria; Burkholderiales; Burkholderiaceae; Burkholderia; pseudomallei group
+441160 Bacteria; Proteobacteria; Betaproteobacteria; Burkholderiales; Burkholderiaceae; Burkholderia; pseudomallei group
+441161 Bacteria; Proteobacteria; Betaproteobacteria; Burkholderiales; Burkholderiaceae; Burkholderia; pseudomallei group
+443226 Eukaryota; Fungi; Dikarya; Ascomycota; Pezizomycotina; Eurotiomycetes; Eurotiomycetidae; Onygenales; mitosporic Onygenales; Coccidioides
+444079 unclassified sequences; metagenomes; organismal metagenomes
+447454 Bacteria; candidate division TM7
+447634 other sequences; artificial sequences; vectors
+447635 other sequences; artificial sequences; vectors
+452646 Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Mammalia; Eutheria; Laurasiatheria; Carnivora; Caniformia; Mustelidae; Mustelinae; Neovison
+454286 Eukaryota; Fungi; Dikarya; Ascomycota; Pezizomycotina; Eurotiomycetes; Eurotiomycetidae; Onygenales; mitosporic Onygenales; Coccidioides
+457179 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids II; Brassicales; Brassicaceae; Raphanus
+463046 Eukaryota; Heterolobosea; Schizopyrenida; Gruberellidae; Stachyamoeba
+463157 Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids II; Brassicales; Brassicaceae; Raphanus
+473542 Eukaryota; Metazoa; Nematoda; Chromadorea; Rhabditida; Rhabditoidea; Rhabditidae; Peloderinae; Caenorhabditis
diff --git a/data/sequin.hlp b/data/sequin.hlp
index e69cde04..5400f541 100644
--- a/data/sequin.hlp
+++ b/data/sequin.hlp
@@ -82,6 +82,11 @@ pop-up menus and spreadsheets.
#You may also use tables to import annotation of source information.
The formatting of these tables will be discussed below.
+#When entering information, you must use ASCII characters. Non-ASCII
+characters, such as those with an accent or umlaut, can not be displayed
+properly. If you enter a non-ASCII character, you will be prompted to select
+an alternative in a pop-up box.
+
*Overview of Sequin
#If you are using Sequin for the first time, you will be prompted to
@@ -205,7 +210,8 @@ it to the database. If you select "Release Date", fields will appear in
which you can indicate the date on which the sequences should be
released to the public. The submission will then be held back until
formal publication of the sequence or GenBank Accession number, or
-until the release date, whichever comes first.
+until the release date, whichever comes first. The maximum hold
+time is five years.
**Tentative Title for Manuscript
@@ -1404,12 +1410,13 @@ the database selected for entry.
#If Sequin detects problems with the format of your record, you will see a
screen listing the validation errors as well as suggestions for how to fix the
discrepancies. Single clicking on an error message scrolls the record viewer
-to the feature that is causing the error. Double clicking on the error message
-launches a new form on which you can enter information to correct the problem.
-If you are annotating a set of multiple sequences, shift-click to scroll to the
-target sequence and feature. You can also dismiss the suggestion and proceed
-on your own. When you think you have corrected all the problems, click on
-"Revalidate".
+to the feature that is causing the error. Double clicking on the error
+message launches the relevant feature editor on which you can correct the
+problem. If you are annotating a set of multiple sequences, shift-click to
+scroll to the target sequence and feature. When you think you have corrected
+all the problems, click on "Revalidate". You can submit files with errors,
+but it is strongly recommended that you correct as many errors as possible
+prior to submission.
#Message: Select Verbose, Normal, Terse, or Table. Verbose gives a more
detailed explanation of the problem.
@@ -2318,7 +2325,7 @@ protein_bind).
#Feature sequence is different from that presented in the entry and
cannot be described by any other Difference key (conflict, unsure,
-old_sequence, mutation, variation, allele, or modified_base).
+ mutation, variation, allele, or modified_base).
*misc_feature
@@ -2335,8 +2342,8 @@ source key (/proviral).
*misc_RNA
#Any transcript or RNA product that cannot be defined by other RNA keys
-(prim_transcript, precursor_RNA, mRNA, 5'clip, 3'clip, 5'UTR, 3'UTR,
-exon, intron, polyA_site, rRNA, tRNA, scRNA, snoRNA, and snRNA).
+(prim_transcript, precursor_RNA, mRNA, 5'UTR, 3'UTR,
+exon, transit_peptide, polyA_site, rRNA, tRNA, and ncRNA).
*misc_signal
@@ -2361,14 +2368,16 @@ qualifier value).
#messenger RNA; includes 5' untranslated region (5' UTR), coding sequences
(CDS, exon) and 3' untranslated region (3' UTR).
-*N_region
+*ncRNA
-#Extra nucleotides inserted between rearranged immunoglobulin segments.
+#non-coding RNA; a non-protein-coding transcript other than ribosomal RNA and
+transfer RNA, including antisense RNA, guide RNA, scRNA, siRNA, miRNA, piRNA,
+snoRNA, and snRNA. The specific type of ncRNA must be specified in the
+/ncRNA_class qualifier.
-*old_sequence
+*N_region
-#The presented sequence revises a previous version of the sequence at
-this location.
+#Extra nucleotides inserted between rearranged immunoglobulin segments.
*operon
@@ -2430,10 +2439,6 @@ rpt_type and mobile_element have controlled vocabularies. These
qualifiers have check boxes or pull-down menus to ensure that the
correct format is used.
-*repeat_unit
-
-#Single repeat element.
-
*rep_origin
#Origin of replication; starting site for duplication of nucleic acid to
@@ -2457,27 +2462,12 @@ unit; many have a base composition or other property different from the
genome average that allows them to be separated from the bulk (main
band) genomic DNA.
-*scRNA
-
-#Small cytoplasmic RNA; any one of several small cytoplasmic RNA
-molecules present in the cytoplasm and (sometimes) nucleus of a
-eukaryote.
-
*sig_peptide
#Signal peptide coding sequence; coding sequence for an N-terminal
domain of a secreted protein; this domain is involved in attaching
nascent polypeptide to the membrane; leader sequence.
-*snRNA
-
-#Small nuclear RNA involved in pre-mRNA splicing and processing.
-
-*snoRNA
-
-#Small nucleolar RNA molecules generally involved in rRNA modification
-and processing.
-
*source
#Identifies the biological source of the specified span of the sequence.
@@ -2511,6 +2501,11 @@ correct initiation; consensus=TATA(A or T)A(A or T).
to a promoter region that causes RNA polymerase to terminate
transcription; may also be site of binding of repressor protein.
+*tmRNA
+
+#Transfer messenger RNA; acts as a tRNA first, then an mRNA that encodes a
+peptide tag.
+
*transit_peptide
#Transit peptide coding sequence; coding sequence for an N-terminal
@@ -2546,21 +2541,11 @@ region (V_region) and the last few amino acids of the leader peptide.
RFLPs, polymorphisms, etc.) that differ from the presented sequence at
this location (and possibly others).
-*3'clip
-
-#3'-most region of a precursor transcript that is clipped off during
-processing.
-
*3'UTR
#Region near or at the 3' end of a mature transcript (usually following
the stop codon) that is not translated into a protein; trailer.
-*5'clip
-
-#5'-most region of a precursor transcript that is clipped off during
-processing.
-
*5'UTR
#Region near or at the 5' end of a mature transcript (usually preceding
@@ -2596,11 +2581,10 @@ Biological Source Features, like other features, provide organism
information about a specific interval on a given sequence.
#In most cases, you will want to use a Biological Source Descriptor, because
-all the sequences in the entry will derive from the same source.
-However, if you have sequenced a transgenic molecule, for example, one
-that is part plant and part bacterial, you would use Biological Source
-Features to annotate which sequence was derived from plant and which from
-bacteria.
+all the sequences in the entry will derive from the same source. However, if
+you have sequenced a transgenic molecule, for example, one that is part plant
+and part bacterial, you would use Biological Source Features to annotate which
+sequence was derived from plant and which from bacteria.
#To add a Biological Source Descriptor, select Biological Source under
the Descriptor section of the Annotate menu. To add a Biological
@@ -2734,7 +2718,8 @@ transmission.
#-Environmental-sample: Identifies sequence derived by direct molecular
isolation from an unidentified organism. You cannot include extra text when
-using this modifier; the text box will change to TRUE upon selection of this modifier from the pull-down list
+using this modifier; the text box will change to TRUE upon selection of this
+modifier from the pull-down list
#-Frequency: Frequency of occurrence of a feature.
@@ -2770,14 +2755,12 @@ information in the mandatory format.
#-Map: Map location of the gene.
#-Metagenomic: Identifies sequence from a culture-independent genomic
-#analysis of an environmental sample submitted as part of a whole genome
-#shotgun project. You may not include extra text when using this modifier,
-#instead the text box will change to TRUE upon selection.
+analysis of an environmental sample submitted as part of a whole genome
+shotgun project. You may not include extra text when using this modifier,
+instead the text box will change to TRUE upon selection.
#-Plasmid-name: Name of plasmid from which the sequence was obtained.
-#-Plastid-name: Name of plastid from which the sequence was obtained.
-
#-Pop-variant: Name of the population variant from which the sequence was
obtained.
@@ -2816,7 +2799,7 @@ additional organism information as text in the field at the bottom of
the page. You may add multiple modifiers to describe the source organism.
#Clicking on the X button to the right of the text box will remove the text
-#and clear the modifier from the pull-down in that line.
+and clear the modifier from the pull-down in that line.
#The following is a description of the available modifiers:
@@ -2828,6 +2811,14 @@ of the formal name. An example is HIV-1.
#-Authority: The author or authors of the organism name from which sequence
was obtained.
+#-Bio-material: An identifier of the stored biological material from which
+the sequence was obtained. This qualifier should be used to cite collections
+that are not appropriate in specimen-voucher or culture-collection. Examples
+include stock centers and seed banks. Mandatory format is "institution
+code:collection code:material_id". However, only material_id is required.
+Selecting this modifier in the pull-down list will generate separate boxes for
+entering the information in the correct format.
+
#-Biotype: See biovar.
#-Biovar: Variety of a species (usually a fungus, bacteria, or virus)
@@ -2844,6 +2835,16 @@ characterized by its biochemical properties.
#-Cultivar: Cultivated variety of plant from which sequence was obtained.
+#-Culture-collection: Identifier and institution code of the microbial or
+viral culture or stored cell-line from which the sequence was obtained. This
+qualifier should be used to cite the collection where the author has deposited
+the culture or from which the culture was obtained. Personal library
+collections should be annotated in strain and not in culture-collection.
+Mandatory format is "institution code:collection code:culture_id". However,
+collection code is not required. Selecting this modifier in the pull-down
+list will generate separate boxes for entering the information in the correct
+format.
+
#-Ecotype: The named ecotype (population adapted to a local habitat) from
which sequence was obtained (customarily applied to populations of
Arabidopsis thaliana).
@@ -2860,7 +2861,7 @@ was obtained (usually restricted to certain parasitic fungi).
#-Isolate: Identification or description of the specific individual
from which this sequence was obtained. An example is Patient X14.
-#-Old name: Do not select this item.
+#-Metagenome-source: Used only for genome projects. Do not select this item.
#-Pathovar: Variety of a species (usually a fungus, bacteria or virus)
characterized by the biological target of the pathogen. Examples
@@ -2880,9 +2881,13 @@ exists in a symbiotic, parasititc, or other special relationship with
some second organism, use this modifier to identify the name of the
host species.
-#-Specimen-voucher: An identifier of the individual or collection of the
-source organism and the place where it is currently stored, usually an
-institution.
+#-Specimen-voucher: Identifier of the physical specimen from which the
+sequence was obtained. The qualifier is intended for use where the sample is
+still available in a curated museum, herbarium, frozen tissue collection, or
+personal collection. Mandatory format is "institution code:collection
+code:specimen_id". However, only specimen_id is required. Selecting this
+modifier in the pull-down list will generate separate boxes for entering the
+information in the correct format.
#-Strain: Strain of organism from which sequence was obtained.
@@ -3099,7 +3104,7 @@ because it does not have the appropriate annotations.
#Close this entry.
-*Export
+*Export GenBank
#Exports the currently displayed format to a file. Do not use export
ASN1 for submission of sequences to the database.
@@ -3691,8 +3696,14 @@ Nucleotide Definition Line (Title)
</A>
, above.
+#Sort Unique Count by Group opens a new window which displays your record(s)
+the number of times an individual line appears in the flatfile(s). This is
+particularly useful when checking that all records in a large set contain the
+required source or feature information.
+
>Options Menu
+#This menu is only available when using Sequin in its network-aware mode.
*Font
#Use this item to change the display font. From the pop-up menus,
@@ -4084,7 +4095,7 @@ be entered as the location relative to the alignment coordinates.
<P CLASS=medium1><B>Questions or Comments?</B>
<BR>Write to the <A HREF="mailto:info@ncbi.nlm.nih.gov">NCBI Service
Desk</A></P>
-<P CLASS=medium1>Revised July 20, 2007
+<P CLASS=medium1>Revised October 31, 2007
</CENTER>
diff --git a/data/taxlist.txt b/data/taxlist.txt
index 7ff408d6..f3a47eec 100644
--- a/data/taxlist.txt
+++ b/data/taxlist.txt
@@ -1,7 +1,8 @@
-14
+15
Acanthamoeba castellanii 1 4 INV 5755
Acanthoscurria gomesiana 1 5 INV 115339
Acetabularia acetabulum 6 1 PLN 35845
+Acipenser sinensis Chinese sturgeon 1 2 VRT 61970
Acipenser transmontanus white sturgeon 1 2 VRT 7904
Acorus americanus 1 1 PLN 263995
Acropora millepora 1 4 INV 45264
@@ -11,24 +12,21 @@ Adiantum capillus-veneris 1 1 PLN 13818
Aedes aegypti yellow fever mosquito 1 5 INV 7159
Aegilops speltoides 1 1 PLN 4573
Aegilops tauschii 1 1 PLN 37682
-Agriotes lineatus 1 5 INV 292458
-Agrobacterium tumefaciens 11 0 BCT 358
Agrostis capillaris 1 1 PLN 204232
Agrostis stolonifera 1 1 PLN 63632
-Aids-associated retrovirus 1 0 VRL 11966
Ajellomyces capsulatus 1 4 PLN 5037
+Ajellomyces capsulatus NAm1 1 4 PLN 339724
Alexandrium tamarense 1 4 PLN 2926
+Alligator mississippiensis American alligator 1 2 VRT 8496
Allium cepa onion 1 1 PLN 4679
Allomyces macrogynus 1 4 PLN 28583
-Alstroemeria peruviana 1 1 PLN 245552
-Alternaria alternata 1 4 PLN 5599
Alternaria brassicicola 1 4 PLN 29001
Amblyomma americanum lone star tick 1 5 INV 6943
-Amblyomma cajennense 1 5 INV 34607
Amblyomma variegatum 1 5 INV 34610
Amborella trichopoda 1 1 PLN 13333
Ambystoma mexicanum axolotl 1 2 VRT 8296
Ambystoma ordinarium Puerto Hondo stream salamander 1 2 VRT 288796
+Ambystoma tigrinum tigrinum Eastern tiger salamander 1 2 VRT 43116
Amoebidium parasiticum 1 4 INV 4881
Amorphotheca resinae creosote fungus 1 4 PLN 5101
Amphidinium carterae 1 4 PLN 2961
@@ -36,48 +34,50 @@ Ananas comosus pineapple 1 1 PLN 4615
Anas platyrhynchos 1 2 VRT 8839
Ancylostoma caninum dog hookworm 1 5 INV 29170
Ancylostoma ceylanicum 1 5 INV 53326
-Angiostrongylus cantonensis 1 5 INV 6313
+Anolis carolinensis green anole 1 2 VRT 28377
Anolis sagrei brown anole 1 2 VRT 38937
-Anolis smaragdinus 1 2 VRT 172665
-Anopheles funestus 1 5 INV 62324
+Anopheles albimanus 1 5 INV 7167
+Anopheles funestus African malaria mosquito 1 5 INV 62324
Anopheles gambiae African malaria mosquito 1 5 INV 7165
+Anopheles gambiae str. PEST 1 5 INV 180454
Antheraea mylitta 1 5 INV 34739
Antirrhinum majus snapdragon 1 1 PLN 4151
Antonospora locustae 1 1 INV 278021
Antrodia cinnamomea 1 4 PLN 279009
+Aphanomyces cochlioides 1 1 PLN 112091
Aphis gossypii cotton aphid 1 5 INV 80765
Apis mellifera honey bee 1 5 INV 7460
-Apium graveolens 1 1 PLN 4045
Aplysia californica California sea hare 1 5 INV 6500
-Aquilegia formosa x Aquilegia pubescens 1 1 PLN 338618
-Arabidopsis arenosa x Arabidopsis thaliana 1 1 PLN 378006
-Arabidopsis lyrata 1 1 PLN 59689
+Aquilegia formosa 1 1 PLN 223430
+Arabidopsis lyrata subsp. petraea 1 1 PLN 59691
Arabidopsis thaliana thale cress 1 1 PLN 3702
Arachis batizocoi 1 1 PLN 108210
Arachis duranensis 1 1 PLN 130453
Arachis hypogaea peanut 1 1 PLN 3818
+Arachis stenosperma 1 1 PLN 217475
Argas monolakensis 1 5 INV 34602
Argopecten irradians 1 5 INV 31199
-Armigeres subalbatus 1 5 INV 124917
-Ascaris lumbricoides common roundworm 1 5 INV 6252
Ascaris suum pig roundworm 1 5 INV 6253
+Ascosphaera apis USDA-ARSEF 7405 1 4 PLN 392613
+Ashbya gossypii ATCC 10895 1 3 PLN 284811
Asparagus officinalis garden asparagus 1 1 PLN 4686
+Aspergillus clavatus NRRL 1 1 4 PLN 344612
Aspergillus flavus 1 4 PLN 5059
-Aspergillus fumigatus 1 4 PLN 5085
+Aspergillus flavus NRRL3357 1 4 PLN 332952
+Aspergillus fumigatus Af293 1 4 PLN 330879
+Aspergillus nidulans FGSC A4 1 4 PLN 227321
Aspergillus niger 1 4 PLN 5061
+Aspergillus niger CBS 513.88 1 4 PLN 425011
Aspergillus oryzae 1 4 PLN 5062
-Aspergillus terreus 1 4 PLN 33178
+Aspergillus terreus NIH2624 1 4 PLN 341663
Astatotilapia burtoni 1 2 VRT 8153
-Asterina pectinifera 1 9 INV 7594
Aureobasidium pullulans 1 4 PLN 5580
Avena sativa oat 1 1 PLN 4498
-Avicennia marina 1 1 PLN 82927
+Babesia bovis 1 4 INV 5865
Bacillus cereus 11 0 BCT 1396
Bacillus clausii 11 0 BCT 79880
Bacillus licheniformis 11 0 BCT 1402
Bacillus subtilis 11 0 BCT 1423
-Bacillus thuringiensis 11 0 BCT 1428
-Balanus glandula 1 5 INV 110520
Bemisia tabaci 1 5 INV 7038
Beta vulgaris 1 1 PLN 161934
Betula pendula European white birch 1 1 PLN 3505
@@ -86,147 +86,161 @@ Bigelowiella natans 1 1 INV 227086
Biomphalaria glabrata 1 5 INV 6526
Blastocladiella emersonii 1 4 PLN 4808
Blastocystis hominis 1 1 PLN 12968
-Blomia tropicalis 1 5 INV 40697
+Blumeria graminis f. sp. hordei 1 4 PLN 62688
Boechera stricta 1 1 PLN 72658
Bombyx mori domestic silkworm 1 5 INV 7091
-Boophilus microplus southern cattle tick 1 5 INV 6941
Borrelia burgdorferi Lyme disease spirochete 11 0 BCT 139
Bos indicus 1 2 MAM 9915
-Bos indicus x Bos taurus hybrid cattle 1 2 MAM 30522
Bos taurus cattle 1 2 MAM 9913
-Bothrops jararaca jararaca 1 2 VRT 8724
Botryotinia fuckeliana 1 4 PLN 40559
-Bovine viral diarrhea virus 1 1 0 VRL 11099
+Botryotinia fuckeliana B05.10 1 4 PLN 332648
+Brachionus plicatilis 1 5 INV 10195
Brachypodium distachyon 1 1 PLN 15368
Bradyrhizobium japonicum 11 0 BCT 375
Branchiostoma floridae Florida lancelet 1 5 INV 7739
+Brassica carinata 1 1 PLN 52824
Brassica napus rape 1 1 PLN 3708
Brassica oleracea 1 1 PLN 3712
+Brassica oleracea var. alboglabra Chinese kale 1 1 PLN 3714
+Brassica oleracea var. italica asparagus broccoli 1 1 PLN 36774
Brassica rapa 1 1 PLN 3711
+Brassica rapa subsp. pekinensis 1 1 PLN 51351
Brucella abortus 11 0 BCT 235
Brugia malayi 1 5 INV 6279
Bruguiera gymnorhiza 1 1 PLN 39984
Bubalus bubalis water buffalo 1 2 MAM 89462
+Burkholderia pseudomallei 112 11 0 BCT 441154
+Burkholderia pseudomallei 14 11 0 BCT 441160
+Burkholderia pseudomallei 381 11 0 BCT 441157
+Burkholderia pseudomallei 7894 11 0 BCT 441156
+Burkholderia pseudomallei 9 11 0 BCT 441158
+Burkholderia pseudomallei 91 11 0 BCT 441159
+Burkholderia pseudomallei B7210 11 0 BCT 441155
+Burkholderia pseudomallei DM98 11 0 BCT 441161
Bursaphelenchus mucronatus 1 5 INV 6325
Bursaphelenchus xylophilus 1 5 INV 6326
+Caenorhabditis brenneri 1 5 INV 135651
Caenorhabditis briggsae 1 5 INV 6238
+Caenorhabditis briggsae AF16 1 5 INV 473542
Caenorhabditis elegans 1 5 INV 6239
Caenorhabditis remanei 1 5 INV 31234
-Cajanus cajan pigeon pea 1 1 PLN 3821
+Calanus finmarchicus 1 5 INV 6837
Callinectes sapidus blue crab 1 5 INV 6763
Callithrix jacchus white-tufted-ear marmoset 1 2 PRI 9483
Callorhinchus milii elephantfish 1 2 VRT 7868
Camellia sinensis 1 1 PLN 4442
-Campylobacter jejuni 11 0 BCT 197
Candida albicans 12 4 PLN 5476
+Candida albicans SC5314 12 4 PLN 237561
Candida glabrata 1 3 PLN 5478
+Candida glabrata CBS 138 1 3 PLN 284593
Candida parapsilosis 12 4 PLN 5480
Candida tropicalis 12 3 PLN 5482
-Candidatus Hamiltonella defensa 11 0 BCT 138072
-Canis familiaris dog 1 2 MAM 9615
+candidate division TM7 single-cell isolate TM7a 11 0 BCT 447454
Canis latrans coyote 1 2 MAM 9614
Canis lupus gray wolf 1 2 MAM 9612
+Canis lupus familiaris dog 1 2 MAM 9615
+Cannabis sativa hemp 1 1 PLN 3483
Capra hircus goat 1 2 MAM 9925
Capsaspora owczarzaki 1 1 INV 192875
Capsicum annuum 1 1 PLN 4072
-Carassius auratus goldfish 1 2 VRT 7957
Carcinus maenas green crab 1 5 INV 6759
Carica papaya papaya 1 1 PLN 3649
-Casuarina glauca swamp oak 1 1 PLN 3522
+Carthamus tinctorius safflower 1 1 PLN 4222
Catharanthus roseus Madagascar periwinkle 1 1 PLN 4058
Cavia porcellus domestic guinea pig 1 2 ROD 10141
Celuca pugilator Atlantic sand fiddler crab 1 5 INV 6772
Cenchrus ciliaris 1 1 PLN 35872
+Centaurea maculosa 1 1 PLN 215693
+Centaurea solstitialis 1 1 PLN 347529
Ceratodon purpureus 1 1 PLN 3225
Ceratopteris richardii 1 1 PLN 49495
+Cercomonas longicauda 1 1 INV 100933
Chaetomium cupreum 1 4 PLN 155874
-Chaetomium globosum 1 4 PLN 38033
+Chaetomium globosum CBS 148.51 1 4 PLN 306901
Chamaecyparis obtusa 1 1 PLN 13415
Chironomus tentans 1 5 INV 7153
Chlamydia trachomatis 11 0 BCT 813
Chlamydomonas incerta 1 1 PLN 51695
Chlamydomonas reinhardtii 1 1 PLN 3055
-Chlamydophila pneumoniae 11 0 BCT 83558
+Chlamys farreri 1 5 INV 202578
Chlorocebus aethiops African green monkey 1 2 PRI 9534
Chondrus crispus carragheen 1 4 PLN 2769
+Chrysemys picta 1 2 VRT 8479
Cicer arietinum chickpea 1 1 PLN 3827
+Cichorium endivia 1 1 PLN 114280
Cichorium intybus chicory 1 1 PLN 13427
Ciona intestinalis 1 13 INV 7719
Ciona savignyi 1 13 INV 51511
Citrus aurantium 1 1 PLN 43166
Citrus clementina 1 1 PLN 85681
-Citrus clementina x Citrus tangerina 1 1 PLN 307631
-Citrus jambhiri rough lemon 1 1 PLN 64884
-Citrus macrophylla 1 1 PLN 307630
Citrus reshni 1 1 PLN 171252
Citrus reticulata 1 1 PLN 85571
-Citrus reticulata x Citrus temple 1 1 PLN 322160
Citrus sinensis 1 1 PLN 2711
-Citrus sinensis x Poncirus trifoliata 1 1 PLN 105581
-Citrus tristeza virus 1 0 VRL 12162
Citrus unshiu 1 1 PLN 55188
-Citrus x paradisi 1 1 PLN 37656
-Citrus x paradisi x Poncirus trifoliata 1 1 PLN 309804
Cleome hassleriana 1 1 PLN 28532
Clonorchis sinensis 1 9 INV 79923
Closterium peracerosum-strigosum-littorale complex 1 1 PLN 34146
-Clostridium difficile 11 0 BCT 1496
-Clostridium perfringens 11 0 BCT 1502
+Coccidioides immitis H538.4 1 4 PLN 396776
+Coccidioides immitis RMSCC 3703 1 4 PLN 454286
+Coccidioides immitis RS 1 4 PLN 246410
Coccidioides posadasii 1 4 PLN 199306
-Codonopsis lanceolata 1 1 PLN 103999
+Coccidioides posadasii str. Silveira 1 4 PLN 443226
Coffea arabica coffee 1 1 PLN 13443
Coffea canephora 1 1 PLN 49390
-Colletotrichum trifolii 1 4 PLN 5466
-Conidiobolus coronatus 1 4 PLN 34488
-Cooperia oncophora 1 5 INV 27828
Coprinopsis cinerea 1 4 PLN 5346
Cordyceps bassiana 1 4 PLN 176275
-Coregonus clupeaformis 1 2 VRT 59861
+Coregonus clupeaformis lake whitefish 1 2 VRT 59861
Corynascus heterothallicus 1 4 PLN 78579
Corynebacterium glutamicum 11 0 BCT 1718
-Coxiella burnetii 11 0 BCT 777
Crassostrea gigas Pacific oyster 1 5 INV 29159
Crassostrea virginica eastern oyster 1 5 INV 6565
Cricetulus griseus Chinese hamster 1 2 ROD 10029
+Crocus sativus 1 1 PLN 82528
Cryphonectria parasitica 1 4 PLN 5116
Cryptococcus laurentii 1 4 PLN 5418
+Cryptococcus neoformans var. neoformans 1 4 PLN 40410
+Cryptococcus neoformans var. neoformans B-3501A 1 4 PLN 283643
+Cryptococcus neoformans var. neoformans JEC21 1 4 PLN 214684
Cryptomeria japonica Japanese cedar 1 1 PLN 3369
-Cryptosporidium hominis 1 4 INV 237895
+Cryptosporidium hominis TU502 1 4 INV 353151
Cryptosporidium parvum 1 4 INV 5807
+Cryptosporidium parvum Iowa II 1 4 INV 353152
Ctenocephalides felis cat flea 1 5 INV 7515
Cucumis melo muskmelon 1 1 PLN 3656
+Cucumis melo subsp. agrestis 1 1 PLN 217619
+Cucumis melo subsp. melo 1 1 PLN 412675
Cucumis sativus cucumber 1 1 PLN 3659
+Culex pipiens quinquefasciatus southern house mosquito 1 5 INV 7176
Culicoides sonorensis 1 5 INV 179676
Cunninghamella elegans 1 4 PLN 4853
Curcuma longa 1 1 PLN 136217
+Cyamopsis tetragonoloba guar 1 1 PLN 3832
+Cyanidioschyzon merolae strain 10D 1 1 PLN 280699
Cyanophora paradoxa 1 1 PLN 2762
Cycas rumphii 1 1 PLN 58031
-Cyclamen persicum 1 1 PLN 87530
Cynodon dactylon Bermuda grass 1 1 PLN 28909
Cyprinus carpio common carp 1 2 VRT 7962
Danio rerio zebrafish 1 2 VRT 7955
Daphnia magna 1 5 INV 35525
-Daphnia pulex 1 5 INV 6669
Dasypus novemcinctus nine-banded armadillo 1 2 MAM 9361
+Debaryomyces hansenii CBS767 1 3 PLN 284592
+Debaryomyces hansenii var. hansenii 1 3 PLN 58641
Deinagkistrodon acutus 1 2 VRT 36307
-delta proteobacterium MLMS-1 11 0 BCT 262489
-Dermatophagoides farinae American house dust mite 1 5 INV 6954
-Descurainia sophia 1 1 PLN 89411
-Diaphorina citri 1 5 INV 121845
+Dekkera bruxellensis 1 4 PLN 5007
+Diabrotica virgifera virgifera western corn rootworm 1 5 INV 50390
+Diaphorina citri Asian citrus psyllid 1 5 INV 121845
Diaprepes abbreviatus Diaprepes root weevil 1 5 INV 13040
Dicentrarchus labrax European sea bass 1 2 VRT 13489
+Dictyocaulus viviparus bovine lungworm 1 5 INV 29172
Dictyostelium discoideum 1 1 INV 44689
+Dictyostelium discoideum AX4 1 1 INV 352472
Diplonema papillatum 1 4 INV 91374
-Diploptera punctata Pacific beetle cockroach 1 5 INV 6984
-Diplosoma listerianum 1 13 INV 168635
Dirofilaria immitis dog heartworm nematode 1 5 INV 6287
-Drosophila americana 1 5 INV 40366
Drosophila ananassae 1 5 INV 7217
Drosophila auraria 1 5 INV 47315
Drosophila erecta 1 5 INV 7220
Drosophila grimshawi 1 5 INV 7222
Drosophila melanogaster fruit fly 1 5 INV 7227
-Drosophila miranda 1 5 INV 7229
Drosophila mojavensis 1 5 INV 7230
Drosophila persimilis 1 5 INV 7234
Drosophila pseudoobscura 1 5 INV 7237
@@ -239,140 +253,137 @@ Dugesia japonica 1 9 INV 6161
Dugesia ryukyuensis 1 9 INV 79738
Dunaliella salina 1 1 PLN 3046
Echinococcus granulosus 1 9 INV 6210
-Echinococcus multilocularis 1 9 INV 6211
Echinops telfairi small Madagascar hedgehog 1 2 MAM 9371
-Echis ocellatus 1 2 VRT 99586
Eimeria tenella 1 4 INV 5802
-Eisenia andrei 1 5 INV 168636
+Eisenia fetida common brandling worm 1 5 INV 6396
Elaeis guineensis African oil palm 1 1 PLN 51953
-Eleusine coracana finger millet 1 1 PLN 4511
+Elaeis oleifera 1 1 PLN 80265
Emericella nidulans 1 4 PLN 162425
Emiliania huxleyi 1 4 PLN 2903
+Endoriftia persephone 'Hot96_1+Hot96_2' 11 0 BCT 394104
+Entamoeba dispar 1 1 INV 46681
+Entamoeba dispar SAW760 1 1 INV 370354
Entamoeba histolytica 1 1 INV 5759
+Entamoeba histolytica HM-1:IMSS 1 1 INV 294381
Entamoeba invadens 1 1 INV 33085
-Enterobacter cloacae 11 0 BCT 550
-Enterococcus faecalis 11 0 BCT 1351
-Enterococcus faecium 11 0 BCT 1352
-environmental sequence 1 2 ENV 256318
-Epinephelus coioides orange-spotted grouper 1 2 VRT 94232
+Entamoeba invadens IP1 1 1 INV 370355
+Entamoeba moshkovskii FIC 1 1 INV 434306
+Entamoeba terrapinae 1 1 INV 110771
+Epiphyas postvittana 1 5 INV 65032
Eptatretus burgeri inshore hagfish 1 2 VRT 7764
-Equine infectious anemia virus 1 0 VRL 11665
Equus caballus horse 1 2 MAM 9796
-Eragrostis pilosa 1 1 PLN 208273
Eragrostis tef 1 1 PLN 110835
-Eremothecium gossypii 1 3 PLN 33169
Erinaceus europaeus western European hedgehog 1 2 MAM 9365
Escherichia coli 11 0 BCT 562
Eschscholzia californica California poppy 1 1 PLN 3467
+Esox lucius northern pike 1 2 VRT 8010
+Eubalaena glacialis North Atlantic right whale 1 2 MAM 27606
Eucalyptus camaldulensis Murray red gum 1 1 PLN 34316
-Eucalyptus globulus 1 1 PLN 34317
+Eucalyptus globulus subsp. bicostata 1 1 PLN 71272
Eucalyptus grandis 1 1 PLN 71139
Eucalyptus gunnii cider tree 1 1 PLN 3933
-Eucalyptus tereticornis 1 1 PLN 183855
-Eucinetus sp. APV-2005 1 5 INV 292446
Euglena gracilis 1 4 PLN 3039
Euglena longa 1 4 PLN 3037
Euphorbia esula leafy spurge 1 1 PLN 3993
Euphorbia tirucalli 1 1 PLN 142860
Euprymna scolopes 1 5 INV 6613
-Eurydice pulchra 1 5 INV 155694
-Feline immunodeficiency virus 1 0 VRL 11673
-Felis catus cat 1 2 MAM 9685
+Felis catus domestic cat 1 2 MAM 9685
Fenneropenaeus chinensis 1 5 INV 139456
Festuca arundinacea 1 1 PLN 4606
+Folsomia candida 1 5 INV 158441
+fossil metagenome 11 2 ENV 444079
Fragaria vesca 1 1 PLN 57918
-Fragaria x ananassa 1 1 PLN 3747
+Fragaria vesca subsp. vesca 1 1 PLN 101020
Fragilariopsis cylindrus 1 1 PLN 186039
Fundulus heteroclitus killifish 1 2 VRT 8078
-Fusarium oxysporum 1 4 PLN 5507
+Fusarium oxysporum f. sp. cucumerinum 1 4 PLN 5508
+Fusarium oxysporum f. sp. melonis 1 4 PLN 61369
Fusarium solani 1 4 PLN 169388
Fusarium sporotrichioides 1 4 PLN 5514
+Fusarium virguliforme 1 4 PLN 232082
Gadus morhua Atlantic cod 1 2 VRT 8049
Gallus gallus chicken 1 2 VRT 9031
-Gasterosteus aculeatus three spined stickleback 1 2 VRT 69293
+Gammarus pulex 1 5 INV 52641
+Gasterosteus aculeatus three-spined stickleback 1 2 VRT 69293
GB virus C 1 0 VRL 54290
Gekko japonicus 1 2 VRT 146911
-Geochelone nigra 1 2 VRT 66189
+Gene trapping vector VICTR75 11 0 SYN 447634
+Gene trapping vector VICTR76 11 0 SYN 447635
Geomyces pannorum 1 4 PLN 79858
-Georissus sp. APV-2005 1 5 INV 292453
+Gerbera hybrid cv. 'Terra Regina' 1 1 PLN 226891
Giardia intestinalis 1 0 INV 5741
+Giardia lamblia ATCC 50803 1 0 INV 184922
Gibberella moniliformis 1 4 PLN 117187
Gibberella zeae 1 4 PLN 5518
+Gibberella zeae PH-1 1 4 PLN 229533
Gillichthys mirabilis long-jawed mudsucker 1 2 VRT 8222
-Ginglymostoma cirratum nurse shark 1 2 VRT 7801
Ginkgo biloba maidenhair tree 1 1 PLN 3311
Glaucocystis nostochinearum 1 1 PLN 38271
Globodera pallida 1 5 INV 36090
Globodera rostochiensis 1 5 INV 31243
Gloeophyllum trabeum 1 4 PLN 104355
Glomus intraradices 1 4 PLN 4876
-Glomus versiforme 1 4 PLN 43425
-Glycine clandestina 1 1 PLN 45687
+Glossina morsitans morsitans 1 5 INV 37546
Glycine max soybean 1 1 PLN 3847
Glycine soja 1 1 PLN 3848
+Glycyphagus domesticus 1 5 INV 105145
Gnetum gnemon 1 1 PLN 3382
+Gobiocypris rarus 1 2 VRT 143606
Gorilla gorilla gorilla 1 2 PRI 9593
-Gossypioides kirkii 1 1 PLN 47615
Gossypium arboreum 1 1 PLN 29729
Gossypium exiguum 1 1 PLN 47626
Gossypium herbaceum 1 1 PLN 34274
Gossypium hirsutum upland cotton 1 1 PLN 3635
Gossypium raimondii 1 1 PLN 29730
-Gregarina niphandrodes 1 4 INV 110365
-Gryllus pennsylvanicus 1 5 INV 51074
-Gymnogyps californianus California condor 1 2 VRT 33616
-Haematococcus pluvialis 1 1 PLN 44745
-Haementeria depressa 1 5 INV 279730
+Gracilaria changii 1 4 PLN 172969
+Graphocephala atropunctata 1 5 INV 36148
+Grosmannia clavigera 1 4 PLN 226899
+Gryllus bimaculatus two-spotted cricket 1 5 INV 6999
+Guillardia theta 1 1 PLN 55529
Haemonchus contortus 1 5 INV 6289
Haemophilus influenzae 11 0 BCT 727
-Haliotis discus 1 5 INV 36094
-Halobaculum gomorrense 11 0 BCT 43928
Halocynthia roretzi 1 13 INV 7729
-Halorubrum lacusprofundi 11 0 BCT 2247
Hartmannella vermiformis 1 1 INV 5778
Hebeloma cylindrosporum 1 4 PLN 76867
Hedyotis centranthoides 1 1 PLN 219666
Hedyotis terminalis 1 1 PLN 219667
Helianthus annuus common sunflower 1 1 PLN 4232
Helianthus argophyllus 1 1 PLN 73275
+Helianthus ciliaris 1 1 PLN 73280
Helianthus exilis 1 1 PLN 400408
Helianthus paradoxus 1 1 PLN 73304
Helianthus petiolaris 1 1 PLN 4234
+Helianthus tuberosus 1 1 PLN 4233
Helicobacter pylori 11 0 BCT 210
Heliconius erato crimson-patched longwing 1 5 INV 33431
Heliconius melpomene 1 5 INV 34740
-Helicosporidium sp. ex Simulium jonesii 1 1 PLN 145475
-Helicoverpa armigera cotton bollworm 1 5 INV 29058
Hemicentrotus pulcherrimus 1 9 INV 7650
Hepatitis A virus 1 0 VRL 12092
Hepatitis B virus 1 0 VRL 10407
Hepatitis C virus 1 0 VRL 11103
-Hepatitis E virus 1 0 VRL 12461
-Heterobasidion annosum 1 4 PLN 13563
+Hepatitis C virus subtype 1a 1 0 VRL 31646
+Hepatitis C virus subtype 1b 1 0 VRL 31647
Heterocapsa triquetra 1 4 PLN 66468
Heterodera glycines 1 5 INV 51029
Heterodera schachtii 1 5 INV 97005
Heterorhabditis bacteriophora 1 5 INV 37862
Hevea brasiliensis 1 1 PLN 3981
Hippoglossus hippoglossus Atlantic halibut 1 2 VRT 8267
-Hister sp. APV-2005 1 5 INV 292455
Histiona aroides 1 1 INV 392300
+Holothuria glaberrima 1 9 INV 31192
Homalodisca coagulata glassy-winged sharpshooter 1 5 INV 197043
Homarus americanus American lobster 1 5 INV 6706
Homo sapiens human 1 2 PRI 9606
Hordeum vulgare 1 1 PLN 4513
-Human herpesvirus 1 Herpes simplex virus type 1 1 0 VRL 10298
+Hordeum vulgare subsp. spontaneum 1 1 PLN 77009
+Hordeum vulgare subsp. vulgare domesticated barley 1 1 PLN 112509
Human herpesvirus 5 Human cytomegalovirus 1 0 VRL 10359
-Human herpesvirus 8 Kaposi's sarcoma-associated herpesvirus - Human herpesvirus 8 1 0 VRL 37296
-Human immunodeficiency virus 1 0 VRL 12721
Human immunodeficiency virus 1 1 0 VRL 11676
Human immunodeficiency virus 2 1 0 VRL 11709
Human metapneumovirus 1 0 VRL 162145
-Human papillomavirus 1 0 VRL 10566
-Human respiratory syncytial virus 1 0 VRL 11250
+Human T-lymphotropic virus 1 1 0 VRL 11908
Humulus lupulus European hop 1 1 PLN 3486
Hydra magnipapillata 1 4 INV 6085
-Hydra oligactis 1 4 INV 6088
Hydra vulgaris 1 4 INV 6087
Hydractinia echinata 1 4 INV 35630
Hyperamoeba dachnaya 1 1 INV 181200
@@ -380,90 +391,83 @@ Hypocrea jecorina 1 4 PLN 51453
Hypocrea lixii 1 4 PLN 5544
Hypocrea virens 1 4 PLN 29875
Hypsibius dujardini 1 5 INV 232323
-Ictalurus furcatus 1 2 VRT 66913
+Ichthyophthirius multifiliis 6 4 INV 5932
+Ictalurus furcatus blue catfish 1 2 VRT 66913
Ictalurus punctatus channel catfish 1 2 VRT 7998
-Infectious bronchitis virus 1 0 VRL 11120
-Infectious bursal disease virus Gumboro virus 1 0 VRL 10995
+Idiosepius paradoxus 1 5 INV 294707
Ipomoea batatas sweet potato 1 1 PLN 4120
Ipomoea nil Japanese morning glory 1 1 PLN 35883
-Ipomoea trifida 1 1 PLN 35884
-Ips pini North American pine engraver 1 5 INV 102803
Isochrysis galbana 1 1 PLN 37099
Ixodes scapularis black-legged tick 1 5 INV 6945
Jakoba bahamiensis 1 1 INV 221721
Jakoba libera 1 1 INV 143017
-JC polyomavirus 1 0 VRL 10632
Juglans regia English walnut 1 1 PLN 51240
-Julodis onopordi 1 5 INV 261158
Karenia brevis 1 4 PLN 156230
-Karlodinium micrum 1 4 PLN 188904
+Karlodinium micrum 1 4 PLN 342587
Kazachstania exigua 1 3 PLN 34358
-Klebsiella pneumoniae 11 0 BCT 573
+Kazachstania unispora 1 3 PLN 27294
Kluyveromyces lactis 1 4 PLN 28985
+Kluyveromyces lactis NRRL Y-1140 1 4 PLN 284590
Kluyveromyces marxianus 1 3 PLN 4911
Kluyveromyces thermotolerans 1 3 PLN 4916
Laccaria bicolor 1 4 PLN 29883
Lachancea kluyveri 1 3 PLN 4934
-Lachesis muta bushmaster 1 2 VRT 8752
-Lactobacillus reuteri 11 0 BCT 1598
Lactuca perennis 1 1 PLN 43195
Lactuca saligna 1 1 PLN 75948
Lactuca sativa 1 1 PLN 4236
Lactuca serriola 1 1 PLN 75943
Lactuca virosa 1 1 PLN 75947
+Lama pacos alpaca 1 2 MAM 30538
Laminaria digitata 1 1 PLN 80365
+Laupala kohalensis 1 5 INV 109027
Lawsonia intracellularis 11 0 BCT 29546
-Legionella pneumophila 11 0 BCT 446
Leishmania braziliensis 1 4 INV 5660
-Leishmania donovani 1 4 INV 5661
+Leishmania donovani chagasi 1 4 INV 44271
+Leishmania infantum JPCM5 1 4 INV 435258
Leishmania major 1 4 INV 5664
+Leishmania major strain Friedlin 1 4 INV 347515
Lentinula edodes shiitake mushroom 1 4 PLN 5353
Lepeophtheirus salmonis salmon louse 1 5 INV 72036
Leptinotarsa decemlineata Colorado potato beetle 1 5 INV 7539
-Leptosphaeria maculans blackleg of rapeseed fungus 1 4 PLN 5022
Leucoraja erinacea little skate 1 2 VRT 7782
Leucosporidium scottii 1 4 PLN 5278
-Leymus chinensis 1 1 PLN 52714
-Lilium longiflorum trumpet lily 1 1 PLN 4690
+Limnanthes alba subsp. versicolor 1 1 PLN 377281
Limonium bicolor 1 1 PLN 293754
Lingulodinium polyedrum 1 4 PLN 160621
Linum usitatissimum flax 1 1 PLN 4006
-Lipochromis sp. 'matumbi hunter' 1 2 VRT 400101
Liriodendron tulipifera 1 1 PLN 3415
-Listeria innocua 11 0 BCT 1642
Listeria monocytogenes 11 0 BCT 1639
+Listeria monocytogenes FSL F2-515 11 0 BCT 393116
+Listeria monocytogenes FSL J1-208 11 0 BCT 393119
+Lithognathus mormyrus 1 2 VRT 50591
Litomosoides sigmodontis 1 5 INV 42156
-Litopenaeus setiferus white shrimp 1 5 INV 64468
Litopenaeus vannamei Pacific white shrimp 1 5 INV 6689
Locusta migratoria migratory locust 1 5 INV 7004
+Lodderomyces elongisporus NRRL YB-4239 1 3 PLN 379508
Lolium multiflorum Italian ryegrass 1 1 PLN 4521
Lolium temulentum 1 1 PLN 34176
-Lonomia obliqua 1 5 INV 304329
Lotus japonicus 1 1 PLN 34305
Loxodonta africana African savanna elephant 1 2 MAM 9785
Lumbricus rubellus humus earthworm 1 5 INV 35632
Lupinus albus white lupine 1 1 PLN 3870
Lutzomyia longipalpis 1 5 INV 7200
-Lycopersicon esculentum 1 1 PLN 4081
-Lycopersicon esculentum x Lycopersicon pimpinellifolium 1 1 PLN 286530
-Lycopersicon hirsutum 1 1 PLN 62890
-Lycopersicon pennellii 1 1 PLN 28526
Lycoris longituba 1 1 PLN 272140
-Lymnaea stagnalis great pond snail 1 5 INV 6523
+Lysiphlebus testaceipes 1 5 INV 77504
Macaca fascicularis crab-eating macaque 1 2 PRI 9541
Macaca mulatta rhesus monkey 1 2 PRI 9544
Macaca nemestrina pig-tailed macaque 1 2 PRI 9545
-Macrotyloma uniflorum 1 1 PLN 271171
+Maconellicoccus hirsutus hibiscus mealybug 1 5 INV 177089
+Macropus eugenii tammar wallaby 1 2 MAM 9315
+Macrostomum lignano 1 9 INV 282301
Magnaporthe grisea 1 4 PLN 148305
+Magnaporthe grisea 70-15 1 4 PLN 242507
+Magnetospirillum magnetotacticum MS-1 11 0 BCT 272627
Malawimonas californiana 1 1 INV 221722
Malawimonas jakobiformis 1 1 INV 136089
-Malus sieboldii 1 1 PLN 106566
-Malus x domestica 1 1 PLN 3750
-Malus x domestica x Malus sieversii 1 1 PLN 339852
-Malva pusilla 1 1 PLN 96480
Manduca sexta tobacco hornworm 1 5 INV 7130
Manihot esculenta cassava 1 1 PLN 3983
Marchantia polymorpha liverwort 1 1 PLN 3197
+marine metagenome 11 2 ENV 408172
Marsupenaeus japonicus 1 5 INV 27405
Mastigamoeba balamuthi 1 1 INV 108607
Measles virus 1 0 VRL 11234
@@ -476,63 +480,59 @@ Meloidogyne hapla 1 5 INV 6305
Meloidogyne incognita southern root-knot nematode 1 5 INV 6306
Meloidogyne javanica root-knot nematode 1 5 INV 6303
Meloidogyne paranaensis 1 5 INV 189293
-Mentha x piperita peppermint 1 1 PLN 34256
Mesembryanthemum crystallinum common iceplant 1 1 PLN 3544
-Mesobuthus gibbosus Mediterranean checkered scorpion 1 5 INV 123226
-Mesocestoides corti 1 9 INV 53468
Mesocricetus auratus golden hamster 1 2 ROD 10036
Mesostigma viride 1 1 PLN 41882
+metagenome sequence 11 2 ENV 256318
Metarhizium anisopliae 1 4 PLN 5530
-Miamiensis avidus 6 4 INV 279580
Microbotryum violaceum 1 4 PLN 5272
Microcebus murinus gray mouse lemur 1 2 PRI 30608
-Micromonas sp. CCMP490 1 1 PLN 392814
Mimulus guttatus spotted monkey flower 1 1 PLN 4155
-Misgurnus anguillicaudatus 1 2 VRT 75329
-Mnemiopsis leidyi 1 4 INV 27923
+Mimulus lewisii 1 1 PLN 69919
+Misgurnus anguillicaudatus oriental weatherfish 1 2 VRT 75329
Molgula tectiformis 1 13 INV 30286
Monacrosporium haptotylum 1 4 PLN 74495
Monodelphis domestica gray short-tailed opossum 1 2 MAM 13616
Monosiga ovata 1 1 INV 81526
-Montastraea faveolata 1 4 INV 48498
-Morone saxatilis striped sea-bass 1 2 VRT 34816
-Murine leukemia virus 1 0 VRL 11786
+mouse gut metagenome 11 2 ENV 410661
Mus musculus house mouse 1 2 ROD 10090
-Musa acuminata 1 1 PLN 4641
-Mustela vison American mink 1 2 MAM 9667
+Mus musculus domesticus western European house mouse 1 2 ROD 10092
+Mus musculus molossinus Japanese wild mouse 1 2 ROD 57486
+Musa acuminata dessert banana 1 1 PLN 4641
Mycobacterium tuberculosis 11 0 BCT 1773
Mycosphaerella graminicola 1 4 PLN 54734
Myotis lucifugus little brown bat 1 2 MAM 59463
-Mytilus edulis 1 5 INV 6550
+Mytilus californianus California mussel 1 5 INV 6549
Mytilus galloprovincialis Mediterranean mussel 1 5 INV 29158
Myzus persicae green peach aphid 1 5 INV 13164
Nakaseomyces delphensis 1 3 PLN 51657
-Nannochloropsis oculata 1 1 PLN 43925
-Nasonia vitripennis 1 5 INV 7425
-Natrialba asiatica 11 0 BCT 64602
+Nasonia giraulti 1 5 INV 7426
+Nasonia vitripennis jewel wasp 1 5 INV 7425
Necator americanus 1 5 INV 51031
Neisseria gonorrhoeae 11 0 BCT 485
Neisseria meningitidis 11 0 BCT 487
Nelumbo nucifera 1 1 PLN 4432
-Nematostella vectensis 1 4 INV 45351
+Nematostella vectensis starlet sea anemone 1 4 INV 45351
+Neosartorya fischeri NRRL 181 1 4 PLN 331117
Neospora caninum 1 4 INV 29176
-Neospora hughesi 1 4 INV 83675
+Neovison vison 1 2 MAM 452646
Neurospora crassa 1 4 PLN 5141
+Neurospora crassa OR74A 1 4 PLN 367110
Newcastle disease virus 1 0 VRL 11176
Nicotiana benthamiana 1 1 PLN 4100
-Nicotiana langsdorffii x Nicotiana sanderae 1 1 PLN 164110
Nicotiana sylvestris wood tobacco 1 1 PLN 4096
Nicotiana tabacum common tobacco 1 1 PLN 4097
Nippostrongylus brasiliensis 1 5 INV 27835
Nuphar advena 1 1 PLN 77108
+Ochotona princeps American pika 1 2 MAM 9978
Ocimum basilicum sweet basil 1 1 PLN 39350
Onchocerca volvulus 1 5 INV 6282
Oncometopia nigricans 1 5 INV 266772
Oncorhynchus mykiss rainbow trout 1 2 VRT 8022
Oncorhynchus nerka sockeye salmon 1 2 VRT 8023
Oncorhynchus tshawytscha Chinook salmon 1 2 VRT 74940
-Ophiostoma clavigerum 1 4 PLN 226899
Ophiostoma piliferum 1 4 PLN 38032
+Opisthorchis viverrini 1 9 INV 6198
Oreochromis niloticus Nile tilapia 1 2 VRT 8128
Ornithorhynchus anatinus platypus 1 2 MAM 9258
Oryctolagus cuniculus rabbit 1 2 MAM 9986
@@ -548,19 +548,22 @@ Oryza officinalis 1 1 PLN 4535
Oryza punctata 1 1 PLN 4537
Oryza ridleyi 1 1 PLN 83308
Oryza rufipogon 1 1 PLN 4529
-Oryza sativa 1 1 PLN 4530
+Oryza sativa rice 1 1 PLN 4530
+Oryza sativa Indica Group 1 1 PLN 39946
+Oryza sativa Japonica Group 1 1 PLN 39947
Oryzias latipes Japanese medaka 1 2 VRT 8090
Oscarella carmela 1 4 INV 386100
Osmerus mordax rainbow smelt 1 2 VRT 8014
Ostertagia ostertagi 1 5 INV 6317
-Ostreococcus tauri 1 1 PLN 70448
+Ostreococcus lucimarinus CCE9901 1 1 PLN 436017
Otolemur garnettii small-eared galago 1 2 PRI 30611
Ovis aries sheep 1 2 MAM 9940
Pan paniscus pygmy chimpanzee 1 2 PRI 9597
Pan troglodytes chimpanzee 1 2 PRI 9598
+Pan troglodytes troglodytes 1 2 PRI 37011
+Pan troglodytes verus 1 2 PRI 37012
Panax ginseng 1 1 PLN 4054
Panicum virgatum switchgrass 1 1 PLN 38727
-Papio anubis olive baboon 1 2 PRI 9555
Paracentrotus lividus common urchin 1 9 INV 7656
Paracoccidioides brasiliensis 1 4 PLN 121759
Paralabidochromis chilotes 1 2 VRT 77306
@@ -568,272 +571,261 @@ Paralichthys olivaceus bastard halibut 1 2 VRT 8255
Paramecium tetraurelia 6 4 INV 5888
Parastrongyloides trichosuri 1 5 INV 131310
Pasteuria penetrans 11 0 BCT 86005
+Patiria pectinifera 1 9 INV 7594
Pavlova lutheri 1 1 PLN 2832
Paxillus involutus 1 4 PLN 71150
-Pecten maximus 1 5 INV 6579
-Pediculus humanus human lice 1 5 INV 121225
+Pediculus humanus capitis human head louse 1 5 INV 121226
+Pediculus humanus corporis human body louse 1 5 INV 121224
Penaeus monodon black tiger shrimp 1 5 INV 6687
Penicillium marneffei 1 4 PLN 37727
-Pennisetum ciliare buffelgrass 1 1 PLN 35520
Pennisetum glaucum 1 1 PLN 4543
-Pennisetum glaucum x Pennisetum squamulatum 1 1 PLN 404567
-Perca fluviatilis perch 1 2 VRT 8168
-Peromyscus leucopus white-footed mouse 1 2 ROD 10041
+Perkinsus marinus ATCC 50983 1 4 INV 423536
+Peromyscus maniculatus bairdii prairie deer mouse 1 2 ROD 230844
Persea americana avocado 1 1 PLN 3435
Petromyzon marinus sea lamprey 1 2 VRT 7757
-Petunia x hybrida 1 1 PLN 4102
Phaeodactylum tricornutum 1 1 PLN 2850
-Phaeosphaeria nodorum 1 4 PLN 13684
+Phaeosphaeria nodorum SN15 1 4 PLN 321614
Phakopsora pachyrhizi 1 4 PLN 170000
Phalaenopsis equestris 1 1 PLN 78828
Phalaenopsis violacea 1 1 PLN 86509
Phanerochaete chrysosporium 1 4 PLN 5306
-Phaseolus acutifolius tepary bean 1 1 PLN 33129
Phaseolus coccineus 1 1 PLN 3886
Phaseolus vulgaris 1 1 PLN 3885
-Philodryas olfersii 1 2 VRT 120305
+Phlebotomus papatasi 1 5 INV 29031
Photorhabdus luminescens 11 0 BCT 29488
-Phyllostachys pubescens 1 1 PLN 38705
Physarum polycephalum slime mold 1 1 INV 5791
Physcomitrella patens 1 1 PLN 3218
+Physcomitrella patens subsp. patens 1 1 PLN 145481
+Phytophthora brassicae 1 1 PLN 187813
Phytophthora infestans potato late blight agent 1 1 PLN 4787
+Phytophthora infestans T30-4 1 1 PLN 403677
Phytophthora parasitica 1 1 PLN 4792
Phytophthora ramorum Sudden oak death agent 1 1 PLN 164328
Phytophthora sojae 1 1 PLN 67593
Picea abies Norway spruce 1 1 PLN 3329
-Picea engelmannii x Picea glauca 1 1 PLN 373101
Picea glauca white spruce 1 1 PLN 3330
Picea sitchensis Sitka spruce 1 1 PLN 3332
Pichia angusta 1 3 PLN 4905
Pichia farinosa 1 3 PLN 4920
+Pichia guilliermondii ATCC 6260 1 3 PLN 294746
+Pichia stipitis CBS 6054 12 3 PLN 322104
Pimephales promelas 1 2 VRT 90988
Pinus pinaster 1 1 PLN 71647
-Pinus radiata Monterey pine 1 1 PLN 3347
Pinus taeda loblolly pine 1 1 PLN 3352
-Pisolithus microcarpus 1 4 PLN 178872
Pisum sativum pea 1 1 PLN 3888
Plasmodium berghei 1 4 INV 5821
+Plasmodium berghei strain ANKA 1 4 INV 5823
Plasmodium chabaudi 1 4 INV 5825
+Plasmodium chabaudi chabaudi 1 4 INV 31271
Plasmodium falciparum malaria parasite P. falciparum 1 4 INV 5833
+Plasmodium falciparum 3D7 1 4 INV 36329
+Plasmodium falciparum Dd2 1 4 INV 57267
+Plasmodium falciparum HB3 1 4 INV 137071
Plasmodium vivax malaria parasite P. vivax 1 4 INV 5855
Plasmodium yoelii 1 4 INV 5861
+Plasmodium yoelii yoelii 1 4 INV 73239
+Plasmodium yoelii yoelii str. 17XNL 1 4 INV 352914
Platichthys flesus European flounder 1 2 VRT 8260
-Platynereis dumerilii Dumeril's clam worm 1 5 INV 6359
-Pleurotus ostreatus oyster mushroom 1 4 PLN 5322
Plodia interpunctella Indianmeal moth 1 5 INV 58824
-Plumbago zeylanica 1 1 PLN 76149
-Plutella xylostella diamondback moth 1 5 INV 51655
Pneumocystis carinii 1 4 PLN 4754
Podocoryne carnea 1 4 INV 6096
-Polysphondylium pallidum 1 4 INV 13642
+Poecilia reticulata guppy 1 2 VRT 8081
+Polygonatum sibiricum 1 1 PLN 261423
+Polysphondylium pallidum 1 1 INV 13642
Polytomella parva 1 1 PLN 51329
Poncirus trifoliata 1 1 PLN 37690
Pongo pygmaeus orangutan 1 2 PRI 9600
-Populus alba x Populus tremula 1 1 PLN 80863
-Populus alba x Populus tremula var. glandulosa 1 1 PLN 153471
Populus deltoides 1 1 PLN 3696
Populus euphratica 1 1 PLN 75702
-Populus fremontii x Populus angustifolia 1 1 PLN 352374
Populus nigra 1 1 PLN 3691
-Populus tomentiglandulosa 1 1 PLN 255244
Populus tremula 1 1 PLN 113636
-Populus tremula x Populus tremuloides 1 1 PLN 47664
Populus tremuloides quaking aspen 1 1 PLN 3693
Populus trichocarpa 1 1 PLN 3694
-Populus trichocarpa x Populus deltoides 1 1 PLN 3695
-Populus trichocarpa x Populus nigra 1 1 PLN 293756
-Populus x canadensis 1 1 PLN 3690
Porcine respiratory and reproductive syndrome virus 1 0 VRL 28344
Porphyra haitanensis 1 4 PLN 76159
Porphyra yezoensis 1 4 PLN 2788
-Pratylenchus penetrans 1 5 INV 45929
Pratylenchus vulnus 1 5 INV 45931
Pristionchus pacificus 1 5 INV 54126
-Prosopis juliflora 1 1 PLN 13230
Prototheca wickerhamii 1 1 PLN 3111
Prunus armeniaca apricot 1 1 PLN 36596
-Prunus cerasus 1 1 PLN 140311
Prunus dulcis almond 1 1 PLN 3755
Prunus persica peach 1 1 PLN 3760
Prymnesium parvum 1 1 PLN 97485
Pseudomonas aeruginosa 11 0 BCT 287
-Pseudomonas fluorescens 11 0 BCT 294
-Pseudomonas putida 11 0 BCT 303
-Pseudomonas viridiflava 11 0 BCT 33069
-Pseudopleuronectes americanus winter flounder 1 2 VRT 8265
-Ptyochromis sp. 'redtail sheller' 1 2 VRT 257976
+Pseudotsuga menziesii Douglas-fir 1 1 PLN 3357
+Pseudotsuga menziesii var. menziesii 1 1 PLN 278161
+Psychroflexus torquis ATCC 700755 11 0 BCT 313595
Puccinellia tenuiflora 1 1 PLN 240906
-Quercus petraea sessile oak 1 1 PLN 38865
-Quercus robur 1 1 PLN 38942
+Puccinia graminis f. sp. tritici CRL 75-36-700-3 1 4 PLN 418459
+Puccinia triticina 1 4 PLN 208348
+Pythium ultimum DAOM BR144 1 1 PLN 431595
Rabies virus 1 0 VRL 11292
-Radopholus similis 1 5 INV 46012
-Ralstonia solanacearum 11 0 BCT 305
+Raphanus raphanistrum subsp. landra 1 1 PLN 328428
+Raphanus raphanistrum subsp. maritimus 1 1 PLN 457179
+Raphanus raphanistrum subsp. raphanistrum 1 1 PLN 109997
+Raphanus sativus radish 1 1 PLN 3726
+Raphanus sativus var. oleiformis 1 1 PLN 463157
Rattus norvegicus Norway rat 1 2 ROD 10116
Reclinomonas americana 1 1 INV 48483
-Reticulomyxa filosa 1 1 INV 46433
-Rhagoletis pomonella apple maggot 1 5 INV 28610
-Rhinolophus ferrumequinum greater horseshoe bat 1 2 MAM 59479
Rhipicephalus appendiculatus 1 5 INV 34631
-Rhizobium sp. NGR234 11 0 BCT 394
+Rhipicephalus microplus southern cattle tick 1 5 INV 6941
Rhizopus oryzae 1 1 PLN 64495
-Rhododendron catawbiense 1 1 PLN 257784
+Rhodnius prolixus 1 5 INV 13249
Rhynchosciara americana 1 5 INV 7186
-Ribes americanum 1 1 PLN 3802
Ricinus communis castor bean 1 1 PLN 3988
Robinia pseudoacacia 1 1 PLN 35938
-Rosa chinensis 1 1 PLN 74649
Rosa hybrid cultivar 1 1 PLN 128735
-Rosa wichurana 1 1 PLN 74648
-Saccharomyces bayanus 1 3 PLN 4931
-Saccharomyces cariocanus 1 3 PLN 114526
+Rutilus rutilus roach minnow 1 2 VRT 48668
Saccharomyces castellii 1 3 PLN 27288
Saccharomyces cerevisiae baker's yeast 1 3 PLN 4932
-Saccharomyces mikatae 1 3 PLN 114525
-Saccharomyces paradoxus 1 3 PLN 27291
+Saccharomyces mikatae IFO 1815 1 3 PLN 226126
+Saccharomyces pastorianus 1 3 PLN 27292
Saccharomyces servazzii 1 3 PLN 27293
-Saccharomyces unisporus 1 3 PLN 27294
Saccharomyces uvarum 1 3 PLN 230603
Saccharum hybrid cultivar 1 1 PLN 128810
Saccharum officinarum 1 1 PLN 4547
+Saccoglossus kowalevskii 1 9 INV 10224
Saitoella complicata 1 4 PLN 5606
-Salicornia brachiata 1 1 PLN 179119
Salmo salar Atlantic salmon 1 2 VRT 8030
-Salmo trutta brown trout 1 2 VRT 8032
-Salmonella enterica 11 0 BCT 28901
-Salmonella typhimurium 11 0 BCT 602
+Salvelinus fontinalis brook trout 1 2 VRT 8038
Salvia miltiorrhiza 1 1 PLN 226208
-Saprolegnia parasitica 1 1 PLN 101203
Sarcocystis falcatula 1 4 INV 32593
Sarcocystis neurona 1 4 INV 42890
-Sarcoptes scabiei 1 5 INV 52283
Saruma henryi 1 1 PLN 13258
Sawyeria marylandensis 1 1 INV 194530
-Scarabaeus laticollis 1 5 INV 292456
Scenedesmus obliquus 1 22 PLN 3088
-Scherffelia dubia 1 1 PLN 3190
Schistosoma japonicum 1 9 INV 6182
Schistosoma mansoni 1 9 INV 6183
-Schizophyllum commune 1 4 PLN 5334
Schizosaccharomyces pombe fission yeast 1 4 PLN 4896
+Schizosaccharomyces pombe 972h- 1 4 PLN 284812
Schmidtea mediterranea 1 9 INV 79327
Sclerotinia sclerotiorum 1 4 PLN 5180
+Sclerotinia sclerotiorum 1980 1 4 PLN 325569
+Sebastes rastrelliger grass rockfish 1 2 VRT 72095
Secale cereale rye 1 1 PLN 4550
Seculamonas ecuadoriensis 1 1 INV 221724
Selaginella lepidophylla 1 1 PLN 59777
-Selaginella moellendorffii 1 1 PLN 88036
-Senecio aethnensis 1 1 PLN 121540
-Senecio cambrensis 1 1 PLN 285720
-Senecio chrysanthemifolius 1 1 PLN 121541
Sesamum indicum sesame 1 1 PLN 4182
-Shigella boydii 11 0 BCT 621
-Shigella dysenteriae 11 0 BCT 622
-Shigella flexneri 11 0 BCT 623
Simian immunodeficiency virus 1 0 VRL 11723
Solanum chacoense Chaco potato 1 1 PLN 4108
+Solanum habrochaites 1 1 PLN 62890
+Solanum lycopersicum 1 1 PLN 4081
+Solanum pennellii 1 1 PLN 28526
Solanum tuberosum potato 1 1 PLN 4113
+Solenopsis invicta red fire ant 1 5 INV 13686
Sorex araneus European shrew 1 2 MAM 42254
Sorghum bicolor sorghum 1 1 PLN 4558
-Sorghum halepense 1 1 PLN 4560
Sorghum propinquum 1 1 PLN 132711
Sparus aurata gilthead seabream 1 2 VRT 8175
Spermophilus lateralis golden-mantled ground squirrel 1 2 ROD 76772
Spermophilus tridecemlineatus thirteen-lined ground squirrel 1 2 ROD 43179
Sphaeroforma arctica 1 1 INV 72019
+Spironucleus barkhanus 6 0 INV 103874
Spizellomyces punctatus 1 16 PLN 109760
Spodoptera frugiperda fall armyworm 1 5 INV 7108
Squalus acanthias spiny dogfish 1 2 VRT 7797
+Stachyamoeba lipophora 1 1 INV 463046
Staphylococcus aureus 11 0 BCT 1280
Staphylococcus epidermidis 11 0 BCT 1282
Sterkiella histriomuscorum 6 4 INV 94289
Stevia rebaudiana 1 1 PLN 55670
-Stomoxys calcitrans stable fly 1 5 INV 35570
Streblomastix strix 6 1 INV 222440
Streptococcus agalactiae 11 0 BCT 1311
Streptococcus pneumoniae 11 0 BCT 1313
Streptococcus pyogenes 11 0 BCT 1314
-Streptococcus suis 11 0 BCT 1307
Strongylocentrotus purpuratus 1 9 INV 7668
Strongyloides ratti 1 5 INV 34506
Strongyloides stercoralis 1 5 INV 6248
-Suaeda salsa 1 1 PLN 126914
+Suidasia medanensis 1 5 INV 223625
Sus scrofa pig 1 2 MAM 9823
-Symsagittifera roscoffensis 1 5 INV 84072
+Taenia solium pork tapeworm 1 9 INV 6204
Taeniopygia guttata 1 2 VRT 59729
Taiwania cryptomerioides 1 1 PLN 50187
-Takifugu rubripes 1 2 VRT 31033
+Takifugu rubripes torafugu 1 2 VRT 31033
Tamarix androssowii 1 1 PLN 189785
+Tamarix hispida 1 1 PLN 189793
Taphrina deformans peach leaf curl fungus 1 4 PLN 5011
Taraxacum kok-saghyz 1 1 PLN 333970
Taraxacum officinale 1 1 PLN 50225
Teladorsagia circumcincta 1 5 INV 45464
Tetrahymena thermophila 6 4 INV 5911
+Tetrahymena thermophila SB210 6 4 INV 312017
Tetraodon nigroviridis 1 2 VRT 99883
+Thalassiosira pseudonana CCMP1335 1 4 PLN 296543
Theileria annulata 1 4 INV 5874
+Theileria annulata strain Ankara 1 4 INV 353154
Theileria parva 1 4 INV 5875
+Theileria parva strain Muguga 1 4 INV 333668
Thellungiella halophila 1 1 PLN 98038
Thellungiella salsuginea 1 1 PLN 72664
Theobroma cacao cacao 1 1 PLN 3641
Thermomyces lanuginosus 1 4 PLN 5541
-Thermus thermophilus 11 0 BCT 274
Thlaspi caerulescens 1 1 PLN 107243
Thunnus thynnus bluefin tuna 1 2 VRT 8237
-Tineola bisselliella 1 5 INV 93883
+Thymallus arcticus Arctic grayling 1 2 VRT 70285
Torque teno virus 1 0 VRL 68887
Tortula ruralis 1 1 PLN 38588
Toxocara canis 1 5 INV 6265
Toxoplasma gondii 1 4 INV 5811
+Toxoplasma gondii RH 1 4 INV 383379
Toxoptera citricida brown citrus aphid 1 5 INV 223852
-Toxorhynchites amboinensis 1 5 INV 46208
Trametes versicolor 1 4 PLN 5325
-Triatoma brasiliensis 1 5 INV 65344
Tribolium castaneum red flour beetle 1 5 INV 7070
Trichinella spiralis 1 5 INV 6334
+Trichoderma reesei QM6a 1 4 PLN 431241
Trichomonas vaginalis 1 0 INV 5722
+Trichomonas vaginalis G3 1 0 INV 412133
Trichophyton rubrum 1 4 PLN 5551
Trichosurus vulpecula silver-gray brushtail possum 1 2 MAM 9337
Trichuris muris 1 5 INV 70415
Trichuris vulpis 1 5 INV 219738
Trifolium pratense 1 1 PLN 57577
+Trifolium repens white clover 1 1 PLN 3899
Trimastix pyriformis 1 1 INV 342808
Triphysaria versicolor 1 1 PLN 64093
Triticum aestivum bread wheat 1 1 PLN 4565
Triticum monococcum 1 1 PLN 4568
-Triticum turgidum 1 1 PLN 4571
+Triticum turgidum subsp. durum durum wheat 1 1 PLN 4567
Tritrichomonas foetus 1 0 INV 5724
-Trox sp. JH-2005 1 5 INV 358432
Trypanosoma brucei 1 4 INV 5691
-Trypanosoma carassii 1 4 INV 38249
+Trypanosoma brucei rhodesiense 1 4 INV 31286
+Trypanosoma brucei TREU927 1 4 INV 185431
Trypanosoma cruzi 1 4 INV 5693
+Trypanosoma cruzi strain CL Brener 1 4 INV 353153
Tuber borchii whitish truffle 1 4 PLN 42251
Tupaia belangeri northern tree shrew 1 2 MAM 37347
Tursiops truncatus bottlenosed dolphin 1 2 MAM 9739
-Ulva linza 1 1 PLN 63409
+uncultured archaeon 11 0 ENV 115547
+uncultured bacterium 11 0 ENV 77133
+uncultured eukaryote 1 1 ENV 100272
+uncultured fungus 1 4 ENV 175245
+uncultured marine virus 1 0 ENV 186617
+uncultured organism 11 2 ENV 155900
+uncultured prokaryote 11 0 ENV 198431
+Uromyces appendiculatus 1 4 PLN 5264
Ustilago maydis 1 4 PLN 5270
+Ustilago maydis 521 1 4 PLN 237631
Vaccinium corymbosum 1 1 PLN 69266
+Vanderwaltozyma polyspora DSM 70294 1 3 PLN 436907
Verticillium dahliae 1 4 PLN 27337
-Vibrio cholerae 11 0 BCT 666
-Vitis aestivalis 1 1 PLN 3605
+Vibrio parahaemolyticus AQ3810 11 0 BCT 419109
+Vigna unguiculata cowpea 1 1 PLN 3917
Vitis hybrid cultivar 1 1 PLN 241073
-Vitis riparia 1 1 PLN 96939
Vitis shuttleworthii 1 1 PLN 246827
Vitis vinifera 1 1 PLN 29760
Welwitschia mirabilis 1 1 PLN 3377
-West Nile virus 1 0 VRL 11082
-Wolbachia endosymbiont of Drosophila ananassae 11 0 BCT 307502
-Wolbachia endosymbiont of Drosophila simulans 11 0 BCT 77038
Wuchereria bancrofti 1 5 INV 6293
Xenopus laevis African clawed frog 1 2 VRT 8355
Xenopus tropicalis western clawed frog 1 2 VRT 8364
-Xiphias gladius swordfish 1 2 VRT 8245
Xiphinema index 1 5 INV 46003
-Xiphophorus maculatus southern platyfish 1 2 VRT 8083
-Xylella fastidiosa 11 0 BCT 2371
Yarrowia lipolytica 1 3 PLN 4952
-Yucca filamentosa 1 1 PLN 55960
+Yarrowia lipolytica CLIB122 1 3 PLN 284591
Zamia fischeri 1 1 PLN 34342
-Zamia furfuracea 1 1 PLN 42329
Zantedeschia aethiopica 1 1 PLN 69721
Zea mays 1 1 PLN 4577
+Zea mays subsp. mays maize 1 1 PLN 381124
+Zea mays subsp. parviglumis 1 1 PLN 76912
Zingiber officinale 1 1 PLN 94328
Zinnia elegans 1 1 PLN 34245
+Zostera marina 1 1 PLN 29655
Zygosaccharomyces rouxii 1 3 PLN 4956
diff --git a/demo/.BLAST_VERSION b/demo/.BLAST_VERSION
index c36c6482..8c57128f 100644
--- a/demo/.BLAST_VERSION
+++ b/demo/.BLAST_VERSION
@@ -1 +1 @@
-2.2.17
+2.2.18
diff --git a/demo/asn2all.c b/demo/asn2all.c
index e00e1c7d..9af408e9 100644
--- a/demo/asn2all.c
+++ b/demo/asn2all.c
@@ -29,7 +29,7 @@
*
* Version Creation Date: 7/26/04
*
-* $Revision: 1.36 $
+* $Revision: 1.37 $
*
* File Description:
*
@@ -53,7 +53,7 @@
#include <pmfapi.h>
#include <lsqfetch.h>
-#define ASN2ALL_APP_VER "2.3"
+#define ASN2ALL_APP_VER "2.4"
CharPtr ASN2ALL_APPLICATION = ASN2ALL_APP_VER;
diff --git a/demo/asn2gb.c b/demo/asn2gb.c
index 03e52ec4..ffb209b8 100644
--- a/demo/asn2gb.c
+++ b/demo/asn2gb.c
@@ -29,7 +29,7 @@
*
* Version Creation Date: 10/21/98
*
-* $Revision: 6.102 $
+* $Revision: 6.103 $
*
* File Description: New GenBank flatfile generator application
*
@@ -50,7 +50,7 @@
#include <explore.h>
#include <asn2gnbp.h>
-#define ASN2GB_APP_VER "4.3"
+#define ASN2GB_APP_VER "4.4"
CharPtr ASN2GB_APPLICATION = ASN2GB_APP_VER;
diff --git a/demo/asnbarval.c b/demo/asnbarval.c
index 2218bf9a..7e925556 100644
--- a/demo/asnbarval.c
+++ b/demo/asnbarval.c
@@ -29,7 +29,7 @@
*
* Version Creation Date: 1/23/07
*
-* $Revision: 1.2 $
+* $Revision: 1.3 $
*
* File Description:
*
@@ -492,21 +492,6 @@ static ValNodePtr DoLockFarComponents (
return rsult;
}
-static ValNodePtr FreeFilenameList (ValNodePtr filename_list)
-{
- ValNodePtr vnp_next;
- if (filename_list == NULL) return NULL;
- vnp_next = filename_list->next;
- filename_list->next = NULL;
- if (filename_list->choice == 2) {
- filename_list = ValNodeFreeData (filename_list);
- } else {
- filename_list = ValNodeFree (filename_list);
- }
- vnp_next = FreeFilenameList (vnp_next);
- return NULL;
-}
-
static void ProcessSeqEntryList (BRFlagPtr drfp, CharPtr filename)
{
ValNodePtr pass_fail_list, vnp;
diff --git a/demo/asndisc.c b/demo/asndisc.c
index 467e44aa..a5da7aef 100644
--- a/demo/asndisc.c
+++ b/demo/asndisc.c
@@ -29,7 +29,7 @@
*
* Version Creation Date: 1/23/07
*
-* $Revision: 1.11 $
+* $Revision: 1.20 $
*
* File Description:
*
@@ -80,10 +80,10 @@ typedef struct drflags {
CharPtr output_dir;
FILE *outfp;
Int4 numrecords;
+ DiscReportOutputConfigData ocd;
DiscrepancyConfigData dcd;
ValNodePtr sep_list;
ValNodePtr bsplist;
- ValNodePtr filename_list;
} DRFlagData, PNTR DRFlagPtr;
#ifdef INTERNAL_NCBI_ASNDISC
@@ -493,31 +493,15 @@ static ValNodePtr DoLockFarComponents (
return rsult;
}
-static ValNodePtr FreeFilenameList (ValNodePtr filename_list)
-{
- ValNodePtr vnp_next;
- if (filename_list == NULL) return NULL;
- vnp_next = filename_list->next;
- filename_list->next = NULL;
- if (filename_list->choice == 2) {
- filename_list = ValNodeFreeData (filename_list);
- } else {
- filename_list = ValNodeFree (filename_list);
- }
- vnp_next = FreeFilenameList (vnp_next);
- return NULL;
-}
-
static void ProcessSeqEntryList (DRFlagPtr drfp, CharPtr filename)
{
- ValNodePtr discrepancy_list, vnp, subcat;
+ ValNodePtr discrepancy_list, vnp;
ObjMgrPtr omp;
SeqEntryPtr sep;
FILE *ofp = NULL;
Boolean need_ofp_close = FALSE;
Char path [PATH_MAX];
CharPtr ptr;
- ClickableItemPtr cip;
if (drfp == NULL || drfp->sep_list == NULL) return;
@@ -568,17 +552,7 @@ static void ProcessSeqEntryList (DRFlagPtr drfp, CharPtr filename)
}
discrepancy_list = CollectDiscrepancies (&(drfp->dcd), drfp->sep_list, taxlookup);
- for (vnp = discrepancy_list; vnp != NULL; vnp = vnp->next) {
- cip = (ClickableItemPtr) vnp->data.ptrvalue;
- if (cip != NULL) {
- WriteDiscrepancyEx (ofp, vnp->data.ptrvalue, drfp->dcd.use_feature_table_format, drfp->filename_list, "DiscRep");
- if (cip->item_list == NULL && cip->subcategories != NULL) {
- for (subcat = cip->subcategories; subcat != NULL; subcat = subcat->next) {
- WriteDiscrepancyEx (ofp, subcat->data.ptrvalue, drfp->dcd.use_feature_table_format, drfp->filename_list, "DiscRep");
- }
- }
- }
- }
+ WriteAsnDiscReport (discrepancy_list, ofp, &(drfp->ocd), TRUE);
discrepancy_list = FreeClickableList (discrepancy_list);
for (vnp = drfp->sep_list; vnp != NULL; vnp = vnp->next) {
sep = vnp->data.ptrvalue;
@@ -592,7 +566,7 @@ static void ProcessSeqEntryList (DRFlagPtr drfp, CharPtr filename)
SeqEntrySetScope (NULL);
drfp->sep_list = ValNodeFree (drfp->sep_list);
- drfp->filename_list = FreeFilenameList (drfp->filename_list);
+ drfp->ocd.filename_list = FreeFilenameList (drfp->ocd.filename_list);
drfp->bsplist = UnlockFarComponents (drfp->bsplist);
@@ -707,8 +681,8 @@ static void ProcessSingleRecord (
if (sep != NULL) {
ValNodeAddPointer (&(drfp->sep_list), 0, sep);
- ValNodeAddInt (&(drfp->filename_list), FILENAME_LIST_ENTITY_ID_ITEM, (Int4) entityID);
- ValNodeAddPointer (&(drfp->filename_list), FILENAME_LIST_FILENAME_ITEM, StringSave (filename));
+ ValNodeAddInt (&(drfp->ocd.filename_list), FILENAME_LIST_ENTITY_ID_ITEM, (Int4) entityID);
+ ValNodeAddPointer (&(drfp->ocd.filename_list), FILENAME_LIST_FILENAME_ITEM, StringSave (filename));
if (drfp->lock) {
bsplist_next = DoLockFarComponents (sep, drfp);
@@ -942,16 +916,18 @@ typedef enum {
e_argEnableTests,
d_argDisableTests,
s_argOutputSuffix,
- q_argOutputDir,
+ r_argOutputDir,
Z_argRemoteCDS,
a_argType,
b_argBinary,
c_argCompressed,
- r_argRemote,
+ R_argRemote,
k_argLocalFetch,
I_argAsnIdx,
l_argLockFar,
T_argThreads,
+ X_argExpandCategories,
+ S_argSummaryReport,
C_argMaxCount
} DRFlagNum;
@@ -985,7 +961,7 @@ Args myargs [] = {
{"Output File Suffix", ".dr", NULL, NULL,
TRUE, 's', ARG_STRING, 0.0, 0, NULL},
{"Output Directory", NULL, NULL, NULL,
- TRUE, 'q', ARG_STRING, 0.0, 0, NULL},
+ TRUE, 'r', ARG_STRING, 0.0, 0, NULL},
{"Remote CDS Product Fetch", "F", NULL, NULL,
TRUE, 'Z', ARG_BOOLEAN, 0.0, 0, NULL},
{"ASN.1 Type (a Any, e Seq-entry, b Bioseq, s Bioseq-set, m Seq-submit, t Batch Bioseq-set, u Batch Seq-submit)", "a", NULL, NULL,
@@ -995,7 +971,7 @@ Args myargs [] = {
{"Batch File is Compressed", "F", NULL, NULL,
TRUE, 'c', ARG_BOOLEAN, 0.0, 0, NULL},
{"Remote Fetching from ID", "F", NULL, NULL,
- TRUE, 'r', ARG_BOOLEAN, 0.0, 0, NULL},
+ TRUE, 'R', ARG_BOOLEAN, 0.0, 0, NULL},
{"Local Fetching", "F", NULL, NULL,
TRUE, 'k', ARG_BOOLEAN, 0.0, 0, NULL},
{"Path to Indexed Binary ASN.1 Data", NULL, NULL, NULL,
@@ -1004,49 +980,20 @@ Args myargs [] = {
TRUE, 'l', ARG_BOOLEAN, 0.0, 0, NULL},
{"Use Threads", "F", NULL, NULL,
TRUE, 'T', ARG_BOOLEAN, 0.0, 0, NULL},
+ {"Expand Report Categories (comma-delimited list of test names or ALL)\n\tALL\n\tMISSING_GENES\n\tEXTRA_GENES\n\tMISSING_LOCUS_TAGS\n\tDUPLICATE_LOCUS_TAGS\n\tBAD_LOCUS_TAG_FORMAT\n"
+ "\tINCONSISTENT_LOCUS_TAG_PREFIX\n\tNON_GENE_LOCUS_TAG\n\tMISSING_PROTEIN_ID\n\tINCONSISTENT_PROTEIN_ID\n"
+ "\tFEATURE_LOCATION_CONFLICT\n\tGENE_PRODUCT_CONFLICT\n\tDUPLICATE_GENE_LOCUS\n\tEC_NUMBER_NOTE\n\tPSEUDO_MISMATCH\n"
+ "\tJOINED_FEATURES\n\tOVERLAPPING_GENES\n\tOVERLAPPING_CDS\n\tSHORT_CONTIG\n\tINCONSISTENT_BIOSOURCE\n\tSUSPECT_PRODUCT_NAMES\n"
+ "\tINCONSISTENT_SOURCE_DEFLINE\n\tPARTIAL_CDS_COMPLETE_SEQUENCE\n\tEC_NUMBER_ON_UNKNOWN_PROTEIN\n\tTAX_LOOKUP_MISSING\n"
+ "\tTAX_LOOKUP_MISMATCH\n\tSHORT_SEQUENCES\n\tSUSPECT_PHRASES\n", "", NULL, NULL,
+ TRUE, 'X', ARG_STRING, 0.0, 0, NULL},
+ {"Summary Report", "F", NULL, NULL,
+ TRUE, 'S', ARG_BOOLEAN, 0.0, 0, NULL},
{"Max Count", "0", NULL, NULL,
TRUE, 'C', ARG_INT, 0.0, 0, NULL},
};
-static CharPtr SetTestsFromString (CharPtr list, Boolean enable, DiscrepancyConfigPtr dcp)
-{
- CharPtr ptr, tmp, name_start, err_msg;
- DiscrepancyType test_type;
- CharPtr err_fmt = "%s is an unrecognized test name";
-
- if (dcp == NULL) return StringSave ("Unable to configure");
-
- if (!StringDoesHaveText (list)) {
- return StringSave ("No tests specified!");
- }
-
- tmp = StringSave (list);
- name_start = tmp;
- while (name_start != NULL && StringDoesHaveText (name_start)) {
- ptr = StringChr (name_start, ',');
- if (ptr != NULL) {
- *ptr = 0;
- }
- TrimSpacesAroundString (name_start);
- test_type = GetDiscrepancyTypeFromSettingName (name_start);
- if (test_type == MAX_DISC_TYPE) {
- err_msg = (CharPtr) MemNew (StringLen (err_fmt) + StringLen (name_start));
- sprintf (err_msg, err_fmt, name_start);
- tmp = MemFree (tmp);
- return err_msg;
- }
- dcp->conf_list[test_type] = enable;
- if (ptr == NULL) {
- name_start = NULL;
- } else {
- name_start = ptr + 1;
- }
- }
- tmp = MemFree (tmp);
- return NULL;
-}
-
static CharPtr GetTestNameList (CharPtr intro)
{
Int4 i, len;
@@ -1115,7 +1062,7 @@ Int2 Main (void)
/* set up help descriptions for enable and disable */
myargs[e_argEnableTests].prompt = GetTestNameList("Enable Tests (comma-delimited list of test names)\n");
myargs[d_argDisableTests].prompt = GetTestNameList("Disable Tests (comma-delimited list of test names)\n");
-
+ myargs[X_argExpandCategories].prompt = GetTestNameList("Expand Report Categories (comma-delimited list of test names or ALL)\n");
/* process command line arguments */
sprintf (app, "asndisc %s", ASNDISC_APPLICATION);
@@ -1131,7 +1078,7 @@ Int2 Main (void)
dfd.output_suffix = (CharPtr) myargs [s_argOutputSuffix].strvalue;
infile = (CharPtr) myargs [i_argInputFile].strvalue;
outfile = (CharPtr) myargs [o_argOutputFile].strvalue;
- output_dir = (CharPtr) myargs [q_argOutputDir].strvalue;
+ output_dir = (CharPtr) myargs [r_argOutputDir].strvalue;
if (StringDoesHaveText (outfile) && StringDoesHaveText (output_dir)) {
Message (MSG_FATAL, "-o and -q are incompatible: specify the output file name with the full path.");
return 1;
@@ -1144,7 +1091,7 @@ Int2 Main (void)
}
dorecurse = (Boolean) myargs [u_argRecurse].intvalue;
- remote = (Boolean ) myargs [r_argRemote].intvalue;
+ remote = (Boolean ) myargs [R_argRemote].intvalue;
local = (Boolean) myargs [k_argLocalFetch].intvalue;
asnidx = (CharPtr) myargs [I_argAsnIdx].strvalue;
@@ -1152,6 +1099,8 @@ Int2 Main (void)
lock = (Boolean) myargs [l_argLockFar].intvalue;
usethreads = (Boolean) myargs [T_argThreads].intvalue;
dfd.farFetchCDSproducts = (Boolean) myargs [Z_argRemoteCDS].intvalue;
+ ExpandDiscrepancyReportTestsFromString ((CharPtr) myargs [X_argExpandCategories].strvalue, TRUE, &dfd.ocd);
+ dfd.ocd.summary_report = (Boolean) myargs [S_argSummaryReport].intvalue;
/* set up Discrepancy Report Configuration */
enabled_list = (CharPtr) myargs [e_argEnableTests].strvalue;
@@ -1167,13 +1116,13 @@ Int2 Main (void)
DisableTRNATests (&(dfd.dcd));
/* now disable tests from string */
- err_msg = SetTestsFromString (disabled_list, FALSE, &(dfd.dcd));
+ err_msg = SetDiscrepancyReportTestsFromString (disabled_list, FALSE, &(dfd.dcd));
} else if (StringDoesHaveText (enabled_list)) {
for (k = 0; k < MAX_DISC_TYPE; k++) {
dfd.dcd.conf_list[k] = FALSE;
}
/* now enable tests from string */
- err_msg = SetTestsFromString (enabled_list, TRUE, &(dfd.dcd));
+ err_msg = SetDiscrepancyReportTestsFromString (enabled_list, TRUE, &(dfd.dcd));
} else {
/* enable all tests by default */
for (k = 0; k < MAX_DISC_TYPE; k++) {
@@ -1189,6 +1138,7 @@ Int2 Main (void)
if ((Boolean) myargs[f_argUseFT].intvalue) {
dfd.dcd.use_feature_table_format = TRUE;
+ dfd.ocd.use_feature_table_format = TRUE;
}
dfd.maxcount = (Int4) myargs [C_argMaxCount].intvalue;
diff --git a/demo/asnmacro.c b/demo/asnmacro.c
new file mode 100755
index 00000000..7e980c28
--- /dev/null
+++ b/demo/asnmacro.c
@@ -0,0 +1,708 @@
+/* asnmacro.c
+* ===========================================================================
+*
+* PUBLIC DOMAIN NOTICE
+* National Center for Biotechnology Information (NCBI)
+*
+* This software/database is a "United States Government Work" under the
+* terms of the United States Copyright Act. It was written as part of
+* the author's official duties as a United States Government employee and
+* thus cannot be copyrighted. This software/database is freely available
+* to the public for use. The National Library of Medicine and the U.S.
+* Government do not place any restriction on its use or reproduction.
+* We would, however, appreciate having the NCBI and the author cited in
+* any work or product based on this material
+*
+* Although all reasonable efforts have been taken to ensure the accuracy
+* and reliability of the software and data, the NLM and the U.S.
+* Government do not and cannot warrant the performance or results that
+* may be obtained by using this software or data. The NLM and the U.S.
+* Government disclaim all warranties, express or implied, including
+* warranties of performance, merchantability or fitness for any particular
+* purpose.
+*
+* ===========================================================================
+*
+* File Name: asnmacro.c
+*
+* Author: Colleen Bollin
+*
+* Version Creation Date: 4/12/07
+*
+* $Revision: 1.3 $
+*
+* File Description:
+*
+* Modifications:
+* --------------------------------------------------------------------------
+* Date Name Description of modification
+* ------- ---------- -----------------------------------------------------
+*
+*
+* ==========================================================================
+*/
+
+#include <ncbi.h>
+#include <objall.h>
+#include <objsset.h>
+#include <objsub.h>
+#include <objfdef.h>
+#include <sequtil.h>
+#include <gather.h>
+#include <sqnutils.h>
+#include <explore.h>
+#include <actutils.h>
+#include <algo/blast/api/twoseq_api.h>
+#define NLM_GENERATED_CODE_PROTO
+#include <asnmacro.h>
+#include <objmacro.h>
+#include <macroapi.h>
+
+#define ASNMACRO_APP_VER "1.0"
+
+CharPtr ASNMACRO_APPLICATION = ASNMACRO_APP_VER;
+
+/* for alignments */
+static SeqAlignPtr LIBCALLBACK GetSeqAlign (BioseqPtr bsp1, BioseqPtr bsp2)
+{
+ BLAST_SummaryOptions *options = NULL;
+ SeqAlignPtr salp = NULL;
+
+ if (bsp1 == NULL || bsp2 == NULL) return NULL;
+
+ BLAST_SummaryOptionsInit(&options);
+ if (bsp1->length > 10000 || bsp2->length > 10000)
+ {
+ options->filter_string = StringSave ("m L");
+ options->word_size = 20;
+ options->cutoff_evalue = act_get_eval (60);
+ options->hint = eNone;
+ }
+ else
+ {
+ options->filter_string = StringSave ("m F");
+ }
+ if (ISA_na (bsp1->mol))
+ {
+ options->program = eBlastn;
+ }
+ else
+ {
+ options->program = eBlastp;
+ }
+
+ BLAST_TwoSequencesSearch(options, bsp1, bsp2, &salp);
+ BLAST_SummaryOptionsFree(options);
+ return salp;
+}
+
+static SeqAlignPtr LIBCALLBACK GetSeqAlignPiece (SeqLocPtr slp1, SeqLocPtr slp2)
+{
+ BLAST_SummaryOptions *options = NULL;
+ SBlastSeqalignArray * seqalign_arr=NULL;
+ SeqAlignPtr salp = NULL;
+ BioseqPtr bsp;
+
+ if (slp1 == NULL || slp2 == NULL) return NULL;
+
+
+ bsp = BioseqFindFromSeqLoc (slp1);
+ if (bsp == NULL)
+ {
+ return NULL;
+ }
+
+ BLAST_SummaryOptionsInit(&options);
+
+ if (ISA_na (bsp->mol))
+ {
+ options->program = eBlastn;
+ }
+ else
+ {
+ options->program = eBlastp;
+ }
+
+ options->gapped_calculation = TRUE;
+ options->cutoff_evalue = 10;
+ options->gap_x_dropoff = 100;
+ options->gap_open = 4;
+ options->gap_extend = 1;
+ options->nucleotide_mismatch = -1;
+ options->word_size = 7;
+
+ BLAST_TwoSeqLocSets(options, slp1, slp2, NULL, &seqalign_arr, NULL, NULL, NULL);
+
+ if (seqalign_arr != NULL)
+ {
+ salp = seqalign_arr->array[0];
+ seqalign_arr->array[0] = NULL;
+ seqalign_arr = SBlastSeqalignArrayFree(seqalign_arr);
+ }
+
+ BLAST_SummaryOptionsFree(options);
+ return salp;
+}
+
+static SeqAlignPtr GlobalAlign2Seq (BioseqPtr bsp1, BioseqPtr bsp2, BoolPtr revcomp)
+{
+ return Sqn_GlobalAlign2SeqEx (bsp1, bsp2, revcomp, GetSeqAlign, GetSeqAlignPiece);
+}
+
+
+
+typedef struct outputstream {
+ CharPtr results_dir;
+ CharPtr base;
+ CharPtr suffix;
+ CharPtr outfile;
+ CharPtr outsuffix;
+ AsnIoPtr aip;
+ Boolean is_binary;
+} OutputStreamData, PNTR OutputStreamPtr;
+
+typedef struct inputstream {
+ CharPtr directory;
+ CharPtr base;
+ CharPtr suffix;
+ Boolean is_binary;
+ Boolean is_seqentry;
+} InputStreamData, PNTR InputStreamPtr;
+
+typedef struct asnstream {
+ AsnModulePtr amp;
+ AsnTypePtr atp_se;
+ AsnTypePtr atp_bss;
+ AsnTypePtr atp_bss_se;
+} AsnStreamData, PNTR AsnStreamPtr;
+
+static FILE* OpenOneFile (
+ CharPtr directory,
+ CharPtr base,
+ CharPtr suffix
+)
+
+{
+ Char file [FILENAME_MAX], path [PATH_MAX];
+
+ if (base == NULL) {
+ base = "";
+ }
+ if (suffix == NULL) {
+ suffix = "";
+ }
+
+ StringNCpy_0 (path, directory, sizeof (path));
+ sprintf (file, "%s%s", base, suffix);
+ FileBuildPath (path, NULL, file);
+
+ return FileOpen (path, "r");
+}
+
+static AsnIoPtr AsnIoFromInputStream (
+ InputStreamPtr isp
+)
+
+{
+ AsnIoPtr aip;
+ Char file [FILENAME_MAX], path [PATH_MAX];
+ CharPtr read_flag;
+
+ if (isp == NULL) return NULL;
+
+ if (isp->is_binary) {
+ read_flag = "rb";
+ } else {
+ read_flag = "r";
+ }
+
+ if (isp->base == NULL) {
+ aip = AsnIoOpen ("stdin", read_flag);
+ } else {
+ StringNCpy_0 (path, isp->directory, sizeof (path));
+ sprintf (file, "%s%s", isp->base, isp->suffix);
+ FileBuildPath (path, NULL, file);
+ aip = AsnIoOpen (path, read_flag);
+ }
+ return aip;
+}
+
+
+static AsnIoPtr AsnIoFromOutputStream (OutputStreamPtr osp)
+{
+ AsnIoPtr aip;
+ Char file [FILENAME_MAX], path [PATH_MAX];
+ CharPtr write_flag;
+
+ if (osp == NULL) return NULL;
+ if (osp->aip == NULL) {
+ write_flag = osp->is_binary ? "wb" : "w";
+ if (StringDoesHaveText (osp->outfile)) {
+ StringNCpy_0 (path, osp->outfile, sizeof (path));
+ } else {
+ if (osp->base == NULL) {
+ aip = AsnIoOpen ("stdout", write_flag);
+ } else {
+ if (osp->outsuffix == NULL) {
+ osp->outsuffix = "";
+ }
+ StringNCpy_0 (path, osp->results_dir, sizeof (path));
+ sprintf (file, "%s%s%s", osp->base, osp->suffix, osp->outsuffix);
+ FileBuildPath (path, NULL, file);
+ aip = AsnIoOpen (path, write_flag);
+ if (aip == NULL) {
+ Message (MSG_POSTERR, "Unable to write to %s.", path);
+ }
+ }
+ }
+ } else {
+ aip = osp->aip;
+ }
+ return aip;
+}
+
+static void WriteOneFile (
+ OutputStreamPtr osp,
+ SeqEntryPtr sep
+)
+
+{
+ AsnIoPtr aip;
+
+ aip = AsnIoFromOutputStream (osp);
+ if (aip != NULL) {
+ SeqEntryAsnWrite (sep, aip, NULL);
+ AsnIoFlush (aip);
+ }
+ if (aip != osp->aip) {
+ AsnIoClose (aip);
+ }
+}
+
+
+static Uint2 ProcessOneAsn (
+ FILE* fp,
+ CharPtr path,
+ ValNodePtr macro
+)
+
+{
+ Pointer dataptr;
+ Uint2 datatype, entityID = 0;
+ SeqEntryPtr sep;
+ Int4 num_fields = 0, num_features = 0;
+
+ if (fp == NULL) return 0;
+
+ dataptr = ReadAsnFastaOrFlatFile (fp, &datatype, &entityID, TRUE, FALSE, TRUE, FALSE);
+ if (dataptr == NULL) {
+ Message (MSG_POSTERR, "Unable to read data from %s.", path);
+ return 0;
+ }
+
+ SeqMgrIndexFeatures (entityID, NULL);
+ sep = GetTopSeqEntryForEntityID (entityID);
+ ApplyMacroToSeqEntry (sep, macro, &num_fields, &num_features);
+ Message (MSG_POST, "For file %s, macro script affected %d fields and created %d features", path, num_fields, num_features);
+
+ return entityID;
+}
+
+/* return -1 if failure, 0 if success */
+static Int4 ProcessOneRecord (
+ CharPtr directory,
+ OutputStreamPtr osp,
+ ValNodePtr macro
+)
+
+{
+ Uint2 entityID;
+ FILE *fp;
+ SeqEntryPtr sep;
+
+ if (osp == NULL) return -1;
+ fp = OpenOneFile (directory, osp->base, osp->suffix);
+ if (fp == NULL) return -1;
+
+ entityID = ProcessOneAsn (fp, osp->base == NULL ? "input stream" : osp->base, macro);
+
+ FileClose (fp);
+
+ if (entityID == 0) return -1;
+
+ /* finish processing */
+
+ sep = GetTopSeqEntryForEntityID (entityID);
+ if (sep != NULL) {
+ WriteOneFile (osp, sep);
+ }
+
+ ObjMgrFreeByEntityID (entityID);
+ return 0;
+}
+
+static Int4 ProcessStream (InputStreamPtr isp, OutputStreamPtr osp, AsnStreamPtr asp, ValNodePtr macro)
+{
+ AsnTypePtr atp, atp_srch;
+ AsnIoPtr asn_in, asn_out;
+ Int4 rval = 0;
+ SeqEntryPtr sep;
+ Uint2 entityID;
+ DataVal av;
+ Int4 num_fields = 0, num_features = 0;
+ Int4 tmp_fields, tmp_features;
+
+ if (isp == NULL || osp == NULL || asp == NULL) return 1;
+
+ asn_in = AsnIoFromInputStream (isp);
+ asn_out = AsnIoFromOutputStream (osp);
+
+ if (isp->is_seqentry) {
+ atp = asp->atp_se;
+ atp_srch = asp->atp_se;
+ }
+ else {
+ atp = asp->atp_bss;
+ atp_srch = asp->atp_bss_se;
+ }
+
+ while ((atp = AsnReadId(asn_in, asp->amp, atp)) != NULL && rval == 0) {
+ if (atp != atp_srch) {
+ AsnReadVal(asn_in, atp, &av);
+ AsnWrite(asn_out, atp, &av);
+ AsnKillValue(atp, &av);
+ continue;
+ }
+ if ((sep = SeqEntryAsnRead(asn_in, atp)) == NULL) {
+ Message (MSG_POSTERR, "SeqEntryAsnRead failure");
+ rval = 1;
+ }
+ if (rval == 0) {
+ entityID = ObjMgrRegister (OBJ_SEQENTRY, sep);
+ tmp_fields = 0;
+ tmp_features = 0;
+ ApplyMacroToSeqEntry (sep, macro, &tmp_fields, &tmp_features);
+ num_fields += tmp_fields;
+ num_features += tmp_features;
+ DeleteMarkedObjects (entityID, 0, NULL);
+ RenormalizeNucProtSets (sep, TRUE);
+ if (! SeqEntryAsnWrite(sep, asn_out, atp)) {
+ Message (MSG_POSTERR, "SeqEntryAsnWrite failure");
+ rval = 1;
+ }
+ AsnIoFlush(asn_out);
+ ObjMgrFreeByEntityID (entityID);
+ }
+ } /* Endwhile, AsnReadId */
+
+ AsnIoClose(asn_in);
+ if (asn_out != osp->aip) {
+ AsnIoClose(asn_out);
+ }
+ Message (MSG_POST, "Macro script affected %d fields and created %d features", num_fields, num_features);
+ return rval;
+}
+
+/* return -1 on failure, 0 on success */
+static Int4 FileRecurse (
+ CharPtr directory,
+ InputStreamPtr isp,
+ OutputStreamPtr osp,
+ AsnStreamPtr asp,
+ ValNodePtr macro
+)
+
+{
+ Char path [PATH_MAX];
+ CharPtr ptr;
+ CharPtr str;
+ ValNodePtr head, vnp;
+ CharPtr orig_dir, orig_base;
+ Int4 rval = 0;
+
+ /* get list of all files in source directory */
+
+ head = DirCatalog (directory);
+
+ for (vnp = head; vnp != NULL; vnp = vnp->next) {
+ if (vnp->choice == 0) {
+ str = (CharPtr) vnp->data.ptrvalue;
+ if (StringDoesHaveText (str)) {
+
+ /* does filename have desired substring? */
+
+ ptr = StringStr (str, osp->suffix);
+
+ if (ptr != NULL) {
+
+ /* make sure detected suffix is really at end of filename */
+
+ if (StringCmp (ptr, osp->suffix) == 0) {
+ *ptr = '\0';
+
+ /* process file that has desired suffix (usually .fsa) */
+ osp->base = str;
+ orig_dir = isp->directory;
+ isp->directory = directory;
+ orig_base = isp->base;
+ isp->base = str;
+ if (isp->is_binary) {
+ rval |= ProcessStream (isp, osp, asp, macro);
+ } else {
+ rval |= ProcessOneRecord (directory, osp, macro);
+ }
+ isp->directory = orig_dir;
+ isp->base = orig_base;
+ osp->base = NULL;
+ }
+ }
+ }
+ } else if (vnp->choice == 1) {
+
+ /* recurse into subdirectory */
+
+ StringNCpy_0 (path, directory, sizeof (path));
+ str = (CharPtr) vnp->data.ptrvalue;
+ FileBuildPath (path, str, NULL);
+ rval |= FileRecurse (path, isp, osp, asp, macro);
+ }
+ }
+
+ /* clean up file list */
+
+ ValNodeFreeData (head);
+ return rval;
+}
+
+static Boolean SetUpAsnStreamData (AsnStreamPtr asp)
+
+{
+ if (asp == NULL) return FALSE;
+
+ if (! SeqSetAsnLoad()) {
+ Message (MSG_POSTERR, "Unable to load SeqSet parse tree");
+ return FALSE;
+ }
+ asp->amp = AsnAllModPtr();
+ if (asp->amp == NULL) {
+ Message (MSG_POSTERR, "Unable to obtain ASN.1 module pointer");
+ return FALSE;
+ }
+
+ /* Get pointers to ASN.1 types that must be dealt with in asn_in */
+
+ if ( (asp->atp_bss = AsnFind("Bioseq-set")) == NULL) {
+ Message (MSG_POSTERR, "could not find type Bioseq-set");
+ return FALSE;
+ }
+ if ( (asp->atp_bss_se = AsnFind("Bioseq-set.seq-set.E")) == NULL) {
+ Message (MSG_POSTERR, "AsnFind failure: Bioseq-set.seq-set.E");
+ return FALSE;
+ }
+ if ( (asp->atp_se = AsnFind("Seq-entry")) == NULL) {
+ Message (MSG_POSTERR, "AsnFind failure: Seq-entry");
+ return FALSE;
+ }
+ return TRUE;
+}
+
+
+static ValNodePtr ReadMacroFile (CharPtr macro_file)
+{
+
+ AsnIoPtr aip;
+ ValNodePtr action_list;
+
+ aip = AsnIoOpen (macro_file, "r");
+ if (aip == NULL) {
+ Message (MSG_POSTERR, "Unable to open %s", macro_file);
+ return NULL;
+ }
+ action_list = MacroActionListAsnRead (aip, NULL);
+ if (action_list == NULL) {
+ Message (MSG_POSTERR, "Unable to read action list from %s.", macro_file);
+ }
+ AsnIoClose (aip);
+ return action_list;
+}
+
+
+/* Args structure contains command-line arguments */
+
+#define p_argInputPath 0
+#define r_argOutputPath 1
+#define i_argInputFile 2
+#define o_argOutputFile 3
+#define x_argSuffix 4
+#define s_argOutSuffix 5
+#define b_argInputBinary 6
+#define e_argInputSeqEntry 7
+#define d_argOutputBinary 8
+#define m_argMacroFile 9
+
+Args myargs [] = {
+ {"Path to Files", NULL, NULL, NULL,
+ TRUE, 'p', ARG_STRING, 0.0, 0, NULL},
+ {"Path for Results", NULL, NULL, NULL,
+ TRUE, 'r', ARG_STRING, 0.0, 0, NULL},
+ {"Single Input File", NULL, NULL, NULL,
+ TRUE, 'i', ARG_FILE_IN, 0.0, 0, NULL},
+ {"Single Output File", NULL, NULL, NULL,
+ TRUE, 'o', ARG_FILE_OUT, 0.0, 0, NULL},
+ {"Suffix", ".sqn", NULL, NULL,
+ TRUE, 'x', ARG_STRING, 0.0, 0, NULL},
+ {"Suffix for stripped files", "", NULL, NULL,
+ TRUE, 's', ARG_STRING, 0.0, 0, NULL},
+ {"Input is binary", "F", NULL, NULL,
+ TRUE, 'b', ARG_BOOLEAN, 0.0, 0, NULL},
+ {"Input is Seq-entry", "F", NULL, NULL,
+ TRUE, 'e', ARG_BOOLEAN, 0.0, 0, NULL},
+ {"Output is binary", "F", NULL, NULL,
+ TRUE, 'b', ARG_BOOLEAN, 0.0, 0, NULL},
+ {"Macro file", "NULL", NULL, NULL,
+ TRUE, 'm', ARG_FILE_IN, 0.0, 0, NULL}
+};
+
+Int2 Main(void)
+{
+ Char app [64];
+ CharPtr directory;
+ CharPtr ptr;
+ Char sfx [32];
+ OutputStreamData osd;
+ InputStreamData isd;
+ AsnStreamData asd;
+ Int4 rval = 0;
+ CharPtr macro_file;
+ ValNodePtr action_list;
+
+ /* standard setup */
+
+ ErrSetFatalLevel (SEV_MAX);
+ ErrClearOptFlags (EO_SHOW_USERSTR);
+ UseLocalAsnloadDataAndErrMsg ();
+ ErrPathReset ();
+
+ /* finish resolving internal connections in ASN.1 parse tables */
+
+ if (! AllObjLoad ()) {
+ Message (MSG_FATAL, "AllObjLoad failed");
+ return 1;
+ }
+ if (! SubmitAsnLoad ()) {
+ Message (MSG_FATAL, "SubmitAsnLoad failed");
+ return 1;
+ }
+ if (! FeatDefSetLoad ()) {
+ Message (MSG_FATAL, "FeatDefSetLoad failed");
+ return 1;
+ }
+ if (! SeqCodeSetLoad ()) {
+ Message (MSG_FATAL, "SeqCodeSetLoad failed");
+ return 1;
+ }
+ if (! GeneticCodeTableLoad ()) {
+ Message (MSG_FATAL, "GeneticCodeTableLoad failed");
+ return 1;
+ }
+
+ SetUpAsnStreamData (&asd);
+
+ /* initialize OuputStreamData */
+ MemSet (&osd, 0, sizeof (osd));
+
+ /* initialize InputStreamData */
+ MemSet (&isd, 0, sizeof (isd));
+
+ /* process command line arguments */
+
+ sprintf (app, "asnmacro %s", ASNMACRO_APPLICATION);
+ if (! GetArgs (app, sizeof (myargs) / sizeof (Args), myargs)) {
+ return 0;
+ }
+
+ macro_file = (CharPtr) myargs [m_argMacroFile].strvalue;
+ action_list = ReadMacroFile (macro_file);
+
+ directory = (CharPtr) myargs [p_argInputPath].strvalue;
+ osd.results_dir = (CharPtr) myargs [r_argOutputPath].strvalue;
+ if (StringHasNoText (osd.results_dir)) {
+ osd.results_dir = NULL;
+ }
+ osd.suffix = (CharPtr) myargs [x_argSuffix].strvalue;
+ osd.outsuffix = (CharPtr) myargs [s_argOutSuffix].strvalue;
+ osd.base = (CharPtr) myargs [i_argInputFile].strvalue;
+ osd.outfile = (CharPtr) myargs [o_argOutputFile].strvalue;
+ if (StringHasNoText (osd.outfile)) {
+ osd.outfile = NULL;
+ }
+ osd.is_binary = (Boolean) myargs [d_argOutputBinary].intvalue;
+
+ if (osd.base == "stdin") {
+ osd.base = NULL;
+ }
+
+ /* if we don't have an output directory or an output file, and the user hasn't provided an
+ * output suffix, add a default.
+ */
+ if (osd.results_dir == NULL && osd.outfile == NULL && StringHasNoText (osd.outsuffix)) {
+ osd.outsuffix = ".processed";
+ }
+
+ isd.is_binary = (Boolean) myargs [b_argInputBinary].intvalue;
+ isd.is_seqentry = (Boolean) myargs [e_argInputSeqEntry].intvalue;
+ isd.directory = directory;
+ isd.base = osd.base;
+ isd.suffix = osd.suffix;
+
+ if (StringDoesHaveText (osd.outfile)) {
+ osd.aip = AsnIoOpen (osd.outfile, "w");
+ if (osd.aip == NULL) {
+ Message (MSG_FATAL, "Unable to open output file");
+ return 1;
+ }
+ } else {
+ if (StringHasNoText (osd.results_dir)) {
+ osd.results_dir = directory;
+ }
+ /* if we're putting the results in a separate directory, strip the directory name from the output base */
+ if (!StringHasNoText (osd.results_dir) && !StringHasNoText (osd.base)) {
+#ifdef OS_MSWIN
+ ptr = StringRChr (osd.base, '\\');
+#else
+ ptr = StringRChr (osd.base, '/');
+#endif
+ if (ptr != NULL) {
+ osd.base = ptr + 1;
+ }
+ }
+ }
+
+
+ if (StringHasNoText(directory) && StringHasNoText(osd.base)) {
+ rval = ProcessStream (&isd, &osd, &asd, action_list);
+ } else if (StringDoesHaveText (osd.base)) {
+ ptr = StringRChr (osd.base, '.');
+ sfx[0] = '\0';
+ if (ptr != NULL) {
+ StringNCpy_0 (sfx, ptr, sizeof (sfx));
+ *ptr = '\0';
+ }
+ osd.suffix = sfx;
+ isd.suffix = sfx;
+ if (isd.is_binary) {
+ rval = ProcessStream (&isd, &osd, &asd, action_list);
+ } else {
+ rval = ProcessOneRecord (directory, &osd, action_list);
+ }
+ } else {
+
+ rval = FileRecurse (directory, &isd, &osd, &asd, action_list);
+ }
+
+ if (osd.aip != NULL) {
+ AsnIoFlush (osd.aip);
+ AsnIoClose (osd.aip);
+ }
+ return rval;
+}
diff --git a/demo/asnval.c b/demo/asnval.c
index 41251a62..4a676193 100644
--- a/demo/asnval.c
+++ b/demo/asnval.c
@@ -29,7 +29,7 @@
*
* Version Creation Date: 11/3/04
*
-* $Revision: 1.55 $
+* $Revision: 1.56 $
*
* File Description:
*
@@ -60,7 +60,7 @@
#include <accpubseq.h>
#endif
-#define ASNVAL_APP_VER "4.7"
+#define ASNVAL_APP_VER "4.8"
CharPtr ASNVAL_APPLICATION = ASNVAL_APP_VER;
diff --git a/demo/blast_driver.c b/demo/blast_driver.c
index 01950658..59ee9e63 100644
--- a/demo/blast_driver.c
+++ b/demo/blast_driver.c
@@ -1,4 +1,4 @@
-/* $Id: blast_driver.c,v 1.128 2007/05/04 15:37:10 papadopo Exp $
+/* $Id: blast_driver.c,v 1.129 2007/10/23 16:03:23 madden Exp $
* ===========================================================================
*
* PUBLIC DOMAIN NOTICE
@@ -32,10 +32,10 @@ Author: Ilya Dondoshansky
Contents: Main function for running BLAST
******************************************************************************
- * $Revision: 1.128 $
+ * $Revision: 1.129 $
* */
-static char const rcsid[] = "$Id: blast_driver.c,v 1.128 2007/05/04 15:37:10 papadopo Exp $";
+static char const rcsid[] = "$Id: blast_driver.c,v 1.129 2007/10/23 16:03:23 madden Exp $";
#include <ncbi.h>
#include <sqnutils.h>
@@ -315,11 +315,6 @@ s_FillOptions(SBlastOptions* options)
word_options->window_size = 40;
}
- if (lookup_options->mb_template_length > 0) {
- if (word_options->window_size > 0)
- word_options->ungapped_extension = FALSE;
- }
-
BLAST_FillExtensionOptions(ext_options, program_number, greedy_extension,
myargs[ARG_XDROP].intvalue, myargs[ARG_XDROP_FINAL].intvalue);
diff --git a/demo/blastall.c b/demo/blastall.c
index 17b1bd6e..18f6dd4d 100644
--- a/demo/blastall.c
+++ b/demo/blastall.c
@@ -1,6 +1,6 @@
-static char const rcsid[] = "$Id: blastall.c,v 6.198 2007/05/07 13:29:11 kans Exp $";
+static char const rcsid[] = "$Id: blastall.c,v 6.201 2008/01/02 14:02:06 madden Exp $";
-/* $Id: blastall.c,v 6.198 2007/05/07 13:29:11 kans Exp $
+/* $Id: blastall.c,v 6.201 2008/01/02 14:02:06 madden Exp $
**************************************************************************
* *
* COPYRIGHT NOTICE *
@@ -28,6 +28,15 @@ static char const rcsid[] = "$Id: blastall.c,v 6.198 2007/05/07 13:29:11 kans Ex
**************************************************************************
*
* $Log: blastall.c,v $
+ * Revision 6.201 2008/01/02 14:02:06 madden
+ * Make composition-based score adjustments the default for blastp and tblastn
+ *
+ * Revision 6.200 2007/11/13 20:31:51 madden
+ * Enable ARG_BESTHITS arg (culling)
+ *
+ * Revision 6.199 2007/10/10 13:16:46 madden
+ * Fix composition-based command-lines for blastall_old (from Alejandro Schaffer)
+ *
* Revision 6.198 2007/05/07 13:29:11 kans
* added casts for Seq-data.gap (SeqDataPtr, SeqGapPtr, ByteStorePtr)
*
@@ -1024,7 +1033,7 @@ static Args myargs[] = {
"0", NULL, NULL, FALSE, 'W', ARG_INT, 0.0, 0, NULL}, /* ARG_WORDSIZE */
{ "Effective length of the database (use zero for the real size)",
"0", NULL, NULL, FALSE, 'z', ARG_FLOAT, 0.0, 0, NULL}, /* ARG_DBSIZE */
- { "Number of best hits from a region to keep (off by default, if used a value of 100 is recommended)",
+ { "Number of best hits from a region to keep. Off by default.\nIf used a value of 100 is recommended. Very high values of -v or -b is also suggested",
"0", NULL, NULL, FALSE, 'K', ARG_INT, 0.0, 0, NULL}, /* ARG_BESTHITS */
{ "0 for multiple hit, 1 for single hit (does not apply to blastn)",
"0", NULL, NULL, FALSE, 'P', ARG_INT, 0.0, 0, NULL}, /* ARG_MULTIPLEHITS */
@@ -1085,14 +1094,14 @@ static Args myargs[] = {
"F", NULL, NULL, TRUE, 'V', ARG_BOOLEAN, 0.0, 0, NULL}, /* ARG_FORCE_OLD */
#endif /* BLASTALL_TOOLS_ONLY */
#endif
- { "Use composition-based statistics for blastp or tblastn:\n" /* ARG_COMP_BASED_STATS */
+ { "Use composition-based score adjustments for blastp or tblastn:\n" /* ARG_COMP_BASED_STATS */
" As first character:\n"
" D or d: default (equivalent to T)\n"
" 0 or F or f: no composition-based statistics\n"
- " 1 or T or t: Composition-based statistics as in "
- "NAR 29:2994-3005, 2001\n"
- " 2: Composition-based score adjustment as in "
+ " 2 or T or t: Composition-based score adjustments as in "
"Bioinformatics 21:902-911,\n"
+ " 1: Composition-based statistics as in "
+ "NAR 29:2994-3005, 2001\n"
" 2005, conditioned on sequence properties\n"
" 3: Composition-based score adjustment as in "
"Bioinformatics 21:902-911,\n"
@@ -1250,7 +1259,7 @@ s_FillOptions(SBlastOptions* options)
MAX(myargs[ARG_DESCRIPTIONS].intvalue,
myargs[ARG_ALIGNMENTS].intvalue),
is_gapped,
- 0, /* culling limit */
+ myargs[ARG_BESTHITS].intvalue, /* culling limit */
0); /* min diag separation */
hit_options->longest_intron = MIN(myargs[ARG_INTRON].intvalue, MAX_INTRON_LENGTH);
@@ -1274,13 +1283,11 @@ s_FillOptions(SBlastOptions* options)
case '0': case 'F': case 'f':
ext_options->compositionBasedStats = eNoCompositionBasedStats;
break;
- case 'D': case 'd':
- case '1': case 'T': case 't':
+ case '1':
ext_options->compositionBasedStats = eCompositionBasedStats;
break;
- case '2':
- ErrPostEx(SEV_WARNING, 1, 0, "the -C 2 argument "
- "is currently experimental\n");
+ case 'D': case 'd':
+ case '2': case 'T': case 't':
ext_options->compositionBasedStats = eCompositionMatrixAdjust;
break;
case '3':
@@ -1976,10 +1983,10 @@ Int2 Main_old (void)
} else {
/* Set options specific to gapped tblastn and blastp */
switch (myargs[ARG_COMP_BASED_STATS].strvalue[0]) {
- case 'D': case 'd':
case '0': case 'F': case 'f':
options->tweak_parameters = eNoCompositionBasedStats;
break;
+ case 'D': case 'd':
case '1': case 'T': case 't':
options->tweak_parameters = eCompositionBasedStats;
break;
diff --git a/demo/blastclust.c b/demo/blastclust.c
index fa195867..159c0958 100644
--- a/demo/blastclust.c
+++ b/demo/blastclust.c
@@ -1,6 +1,6 @@
-static char const rcsid[] = "$Id: blastclust.c,v 6.48 2005/08/19 20:12:32 dondosha Exp $";
+static char const rcsid[] = "$Id: blastclust.c,v 6.49 2007/12/21 14:00:47 madden Exp $";
-/* $RCSfile: blastclust.c,v $ $Revision: 6.48 $ $Date: 2005/08/19 20:12:32 $
+/* $RCSfile: blastclust.c,v $ $Revision: 6.49 $ $Date: 2007/12/21 14:00:47 $
* ===========================================================================
*
* PUBLIC DOMAIN NOTICE
@@ -33,6 +33,9 @@ static char const rcsid[] = "$Id: blastclust.c,v 6.48 2005/08/19 20:12:32 dondos
*
* ---------------------------------------------------------------------------
* $Log: blastclust.c,v $
+* Revision 6.49 2007/12/21 14:00:47 madden
+* Exit if query cannot be processed, JIRA SB-32
+*
* Revision 6.48 2005/08/19 20:12:32 dondosha
* Added extensive doxygen-style comments
*
@@ -1316,6 +1319,8 @@ Int2 Main (void)
do_the_blast_run(search);
} else if (search) {
BlastErrorPrint(search->error_return);
+ ErrPostEx(SEV_ERROR, 1, 0, "Failed to process query number %ld", (long) index);
+ return 1;
}
search = BlastSearchBlkDestruct(search);
query_bsp = BioseqFree(query_bsp);
diff --git a/demo/blastpgp.c b/demo/blastpgp.c
index d2bfc9b7..31ac2210 100644
--- a/demo/blastpgp.c
+++ b/demo/blastpgp.c
@@ -1,6 +1,6 @@
-static char const rcsid[] = "$Id: blastpgp.c,v 6.137 2007/03/14 17:55:27 madden Exp $";
+static char const rcsid[] = "$Id: blastpgp.c,v 6.139 2008/01/02 20:16:11 madden Exp $";
-/* $Id: blastpgp.c,v 6.137 2007/03/14 17:55:27 madden Exp $ */
+/* $Id: blastpgp.c,v 6.139 2008/01/02 20:16:11 madden Exp $ */
/**************************************************************************
* *
* COPYRIGHT NOTICE *
@@ -26,8 +26,14 @@ static char const rcsid[] = "$Id: blastpgp.c,v 6.137 2007/03/14 17:55:27 madden
* appreciated. *
* *
**************************************************************************
- * $Revision: 6.137 $
+ * $Revision: 6.139 $
* $Log: blastpgp.c,v $
+ * Revision 6.139 2008/01/02 20:16:11 madden
+ * XML output respects -v and -b option, JIRA SB-30
+ *
+ * Revision 6.138 2008/01/02 14:02:06 madden
+ * Make composition-based score adjustments the default for blastp and tblastn
+ *
* Revision 6.137 2007/03/14 17:55:27 madden
* - #include string.h to get a prototype for strcasecmp In
* - In tick_callback, suppress unused parameter warnings in tick_callback
@@ -712,17 +718,17 @@ static Args myargs[] = {
NULL, NULL, NULL, TRUE, 'l', ARG_STRING, 0.0, 0, NULL},
{"Use lower case filtering of FASTA sequence", /* ARG_LCASE */
"F", NULL,NULL,TRUE,'U',ARG_BOOLEAN, 0.0,0,NULL},
- { "Use composition based statistics\n" /* ARG_COMP_BASED_STATS */
+ { "Use composition based score adjustment\n" /* ARG_COMP_BASED_STATS */
"As first character:\n"
"0 or F or f: no composition-based statistics\n"
- "1 or T or t: Composition-based statistics as in NAR 29:2994--3005, 2001\n"
- "2: Composition-based score adjustment as in Bioinformatics 21:902-911, 2005, conditioned on sequence properties in round 1\n"
+ "2 or T or t: Composition-based score adjustment as in Bioinformatics 21:902-911, 2005, conditioned on sequence properties in round 1\n"
+ "1: Composition-based statistics as in NAR 29:2994--3005, 2001\n"
"3: Composition-based score adjustment as in Bioinformatics 21:902-911, "
"2005, unconditionally in round 1\n"
"As second character, if first character is equivalent to 1, 2, or 3:\n"
"U or u: unified p-value combining alignment p-value and "
"compositional p-value in round 1 only\n",
- "1", NULL, NULL, FALSE, 't', ARG_STRING, 0.0, 0, NULL},
+ "2", NULL, NULL, FALSE, 't', ARG_STRING, 0.0, 0, NULL},
{ "ASN.1 Scoremat input of checkpoint data:\n"
"0: no scoremat input\n"
"1: Restart is from ASCII scoremat checkpoint file,\n"
@@ -1126,14 +1132,12 @@ PGPBlastOptionsPtr PGPReadBlastOptions(void)
break;
case 'T':
case 't':
- case '1':
- options->tweak_parameters = eCompositionBasedStats;
- break;
case '2':
- ErrPostEx(SEV_WARNING, 1, 0, "the -t 2 argument "
- "is currently experimental\n");
options->tweak_parameters = eCompositionMatrixAdjust;
break;
+ case '1':
+ options->tweak_parameters = eCompositionBasedStats;
+ break;
case '3':
ErrPostEx(SEV_WARNING, 1, 0, "the -t 3 argument "
"is currently experimental\n");
@@ -1919,11 +1923,14 @@ Int2 Main (void)
!bop->options->gapped_calculation, thisPassNum,
"No hits found", search->mask);
} else {
- iterp = BXMLBuildOneIteration(head, other_returns,
+ BlastPruneSapStructPtr prune =
+ BlastPruneHitsFromSeqAlign(head, bop->number_of_alignments, NULL);
+ iterp = BXMLBuildOneIteration(prune->sap, other_returns,
bop->options->is_ooframe,
!bop->options->gapped_calculation, thisPassNum,
(search->posConverged ? "CONVERGED" : NULL),
search->mask);
+ prune = BlastPruneSapStructDestruct(prune);
}
IterationAsnWrite(iterp, psixp->aip, psixp->atp);
diff --git a/demo/cleanasn.c b/demo/cleanasn.c
index 0916a557..297ad432 100644
--- a/demo/cleanasn.c
+++ b/demo/cleanasn.c
@@ -29,7 +29,7 @@
*
* Version Creation Date: 10/19/99
*
-* $Revision: 6.10 $
+* $Revision: 6.15 $
*
* File Description:
*
@@ -50,6 +50,7 @@
#include <sequtil.h>
#include <sqnutils.h>
#include <explore.h>
+#include <tofasta.h>
#include <toasn3.h>
#include <pmfapi.h>
#include <tax3api.h>
@@ -57,7 +58,7 @@
#include <accpubseq.h>
#endif
-#define CLEANASN_APP_VER "1.4"
+#define CLEANASN_APP_VER "1.6"
CharPtr CLEANASN_APPLICATION = CLEANASN_APP_VER;
@@ -71,7 +72,9 @@ typedef struct cleanflags {
CharPtr clean;
CharPtr link;
CharPtr feat;
+ CharPtr mods;
Boolean taxon;
+ Boolean pub;
AsnModulePtr amp;
AsnTypePtr atp_bss;
AsnTypePtr atp_bsss;
@@ -204,7 +207,156 @@ static void RemoveUnnecGeneXref (
}
}
-static void DoCleeanup (
+static void AddSpTaxnameToList (SeqDescrPtr sdp, Pointer userdata)
+{
+ BioSourcePtr biop;
+
+ if (sdp == NULL || sdp->choice != Seq_descr_source || userdata == NULL) return;
+
+ biop = (BioSourcePtr) sdp->data.ptrvalue;
+ if (biop == NULL || biop->org == NULL || !IsSpName (biop->org->taxname)) return;
+
+ ValNodeAddPointer ((ValNodePtr PNTR) userdata, 0, biop->org->taxname);
+}
+
+
+static Boolean ShouldExcludeSp (SeqEntryPtr sep)
+{
+ ValNodePtr name_list = NULL, vnp1, vnp2;
+ Boolean all_diff = TRUE;
+
+ if (sep == NULL) return TRUE;
+ VisitDescriptorsInSep (sep, &name_list, AddSpTaxnameToList);
+
+ name_list = ValNodeSort (name_list, SortVnpByString);
+
+ if (name_list != NULL && name_list->next != NULL) {
+ for (vnp1 = name_list; vnp1 != NULL && vnp1->next != NULL && all_diff; vnp1 = vnp1->next) {
+ for (vnp2 = vnp1->next; vnp2 != NULL && all_diff; vnp2 = vnp2->next) {
+ if (StringCmp (vnp1->data.ptrvalue, vnp2->data.ptrvalue) == 0) {
+ all_diff = FALSE;
+ }
+ }
+ }
+ }
+
+ name_list = ValNodeFree (name_list);
+
+ return all_diff;
+}
+
+static void DoAutoDef (
+ SeqEntryPtr sep,
+ Uint2 entityID
+)
+
+{
+ ValNodePtr defline_clauses = NULL;
+ DeflineFeatureRequestList feature_requests;
+ Int4 index;
+ ValNodePtr modifier_indices = NULL;
+ ModifierItemLocalPtr modList;
+ OrganismDescriptionModifiers odmp;
+ SeqEntryPtr oldscope;
+
+ if (sep == NULL) return;
+ if (entityID < 1) return;
+
+ modList = MemNew (NumDefLineModifiers () * sizeof (ModifierItemLocalData));
+ if (modList == NULL) return;
+
+ InitFeatureRequests (&feature_requests);
+
+ SetRequiredModifiers (modList);
+ CountModifiers (modList, sep);
+
+ odmp.use_labels = TRUE;
+ odmp.max_mods = -99;
+ odmp.keep_paren = TRUE;
+ odmp.exclude_sp = ShouldExcludeSp (sep);
+ odmp.exclude_cf = FALSE;
+ odmp.exclude_aff = FALSE;
+ odmp.exclude_nr = FALSE;
+ odmp.include_country_extra = FALSE;
+ odmp.clone_isolate_HIV_rule_num = clone_isolate_HIV_rule_want_both;
+ odmp.use_modifiers = FALSE;
+ odmp.allow_semicolon_in_modifier = FALSE;
+
+
+ RemoveNucProtSetTitles (sep);
+ oldscope = SeqEntrySetScope (sep);
+
+ BuildDefLineFeatClauseList (sep, entityID, &feature_requests,
+ DEFAULT_ORGANELLE_CLAUSE, FALSE, FALSE,
+ &defline_clauses);
+ if (AreFeatureClausesUnique (defline_clauses)) {
+ modifier_indices = GetModifierIndicesFromModList (modList);
+ } else {
+ modifier_indices = FindBestModifiers (sep, modList);
+ }
+
+ BuildDefinitionLinesFromFeatureClauseLists (defline_clauses, modList,
+ modifier_indices, &odmp);
+ DefLineFeatClauseListFree (defline_clauses);
+ if (modList != NULL) {
+ for (index = 0; index < NumDefLineModifiers (); index++) {
+ ValNodeFree (modList [index].values_seen);
+ }
+ MemFree (modList);
+ }
+ modifier_indices = ValNodeFree (modifier_indices);
+
+ ClearProteinTitlesInNucProts (entityID, NULL);
+ InstantiateProteinTitles (entityID, NULL);
+
+ SeqEntrySetScope (oldscope);
+}
+
+static void LookupPubdesc (
+ PubdescPtr pdp,
+ Pointer userdata
+)
+
+{
+ CitArtPtr cap;
+ MedlineEntryPtr mep;
+ PubmedEntryPtr pep;
+ Int4 pmid = 0;
+ ValNodePtr vnp;
+
+ if (pdp == NULL) return;
+
+ for (vnp = pdp->pub; vnp != NULL; vnp = vnp->next) {
+ switch (vnp->choice) {
+ case PUB_Muid :
+ /* ignore obsolete muids */
+ break;
+ case PUB_PMid :
+ pmid = vnp->data.intvalue;
+ break;
+ default :
+ /* return on real pub */
+ return;
+ break;
+ }
+ }
+
+ if (pmid == 0) return;
+
+ pep = GetPubMedForUid (pmid);
+ if (pep == NULL) return;
+ mep = (MedlineEntryPtr) pep->medent;
+ if (mep != NULL && mep->cit != NULL) {
+ cap = AsnIoMemCopy ((Pointer) mep->cit,
+ (AsnReadFunc) CitArtAsnRead,
+ (AsnWriteFunc) CitArtAsnWrite);
+ ValNodeAddPointer (&(pdp->pub), PUB_Article, (Pointer) cap);
+ }
+
+ PubmedEntryFree (pep);
+}
+
+static void DoCleanup (
SeqEntryPtr sep,
Uint2 entityID,
CleanFlagPtr cfp
@@ -214,41 +366,50 @@ static void DoCleeanup (
if (sep == NULL || cfp == NULL) return;
if (StringChr (cfp->clean, 'b') != NULL) {
- BasicSeqEntryCleanup (sep);
+ BasicSeqEntryCleanup (sep);
}
if (StringChr (cfp->clean, 's') != NULL) {
- SeriousSeqEntryCleanup (sep, NULL, NULL);
+ SeriousSeqEntryCleanup (sep, NULL, NULL);
}
if (cfp->taxon) {
- Taxon3ReplaceOrgInSeqEntry (sep, FALSE);
+ Taxon3ReplaceOrgInSeqEntry (sep, FALSE);
+ }
+
+ if (cfp->pub) {
+ VisitPubdescsInSep (sep, NULL, LookupPubdesc);
}
if (StringChr (cfp->link, 'o') != NULL) {
- SeqMgrIndexFeatures (entityID, 0);
- LinkCDSmRNAbyOverlap (sep);
+ SeqMgrIndexFeatures (entityID, 0);
+ LinkCDSmRNAbyOverlap (sep);
}
if (StringChr (cfp->link, 'p') != NULL) {
- SeqMgrIndexFeatures (entityID, 0);
- LinkCDSmRNAbyProduct (sep);
+ SeqMgrIndexFeatures (entityID, 0);
+ LinkCDSmRNAbyProduct (sep);
}
if (StringChr (cfp->link, 'r') != NULL) {
- SeqMgrIndexFeatures (entityID, 0);
- ReassignFeatureIDs (sep);
+ SeqMgrIndexFeatures (entityID, 0);
+ ReassignFeatureIDs (sep);
}
if (StringChr (cfp->link, 'c') != NULL) {
- ClearFeatureIDs (sep);
+ ClearFeatureIDs (sep);
}
if (StringChr (cfp->feat, 'u') != NULL) {
- VisitFeaturesInSep (sep, NULL, RemoveFeatUser);
+ VisitFeaturesInSep (sep, NULL, RemoveFeatUser);
}
if (StringChr (cfp->feat, 'd') != NULL) {
- VisitFeaturesInSep (sep, NULL, RemoveFeatDbxref);
+ VisitFeaturesInSep (sep, NULL, RemoveFeatDbxref);
}
if (StringChr (cfp->feat, 'r') != NULL) {
- SeqMgrIndexFeatures (entityID, 0);
- VisitFeaturesInSep (sep, NULL, RemoveUnnecGeneXref);
+ SeqMgrIndexFeatures (entityID, 0);
+ VisitFeaturesInSep (sep, NULL, RemoveUnnecGeneXref);
+ }
+
+ if (StringChr (cfp->mods, 'd') != NULL) {
+ SeqMgrIndexFeatures (entityID, 0);
+ DoAutoDef (sep, entityID);
}
}
@@ -373,7 +534,7 @@ static void CleanupSingleRecord (
sep = GetTopSeqEntryForEntityID (entityID);
if (sep != NULL && StringDoesHaveText (path)) {
- DoCleeanup (sep, entityID, cfp);
+ DoCleanup (sep, entityID, cfp);
aop = AsnIoOpen (path, "w");
if (aop != NULL) {
@@ -407,7 +568,6 @@ static void CleanupMultipleRecord (
DataVal av;
BioseqPtr bsp;
Char buf [41];
- Char cmmd [256];
Uint2 entityID;
FILE *fp;
SeqEntryPtr fsep;
@@ -419,6 +579,7 @@ static void CleanupMultipleRecord (
SeqEntryPtr sep;
time_t starttime, stoptime, worsttime;
#ifdef OS_UNIX
+ Char cmmd [256];
CharPtr gzcatprog;
int ret;
Boolean usedPopen = FALSE;
@@ -541,7 +702,7 @@ static void CleanupMultipleRecord (
}
starttime = GetSecs ();
- DoCleeanup (sep, entityID, cfp);
+ DoCleanup (sep, entityID, cfp);
stoptime = GetSecs ();
if (stoptime - starttime > worsttime) {
@@ -615,12 +776,14 @@ static void CleanupOneRecord (
#define a_argType 6
#define b_argBinary 7
#define c_argCompressed 8
-#define l_argLogFile 9
+#define L_argLogFile 9
#define R_argRemote 10
#define K_argClean 11
#define N_argLink 12
#define F_argFeat 13
-#define T_argTaxonLookup 14
+#define M_argMods 14
+#define T_argTaxonLookup 15
+#define P_argPubLookup 16
Args myargs [] = {
{"Path to Files", NULL, NULL, NULL,
@@ -647,8 +810,8 @@ Args myargs [] = {
TRUE, 'b', ARG_BOOLEAN, 0.0, 0, NULL},
{"Bioseq-set is Compressed", "F", NULL, NULL,
TRUE, 'c', ARG_BOOLEAN, 0.0, 0, NULL},
- {"Log fFile", NULL, NULL, NULL,
- TRUE, 'l', ARG_FILE_OUT, 0.0, 0, NULL},
+ {"Log File", NULL, NULL, NULL,
+ TRUE, 'L', ARG_FILE_OUT, 0.0, 0, NULL},
{"Remote Fetching from ID", "F", NULL, NULL,
TRUE, 'R', ARG_BOOLEAN, 0.0, 0, NULL},
{"Cleanup\n"
@@ -666,8 +829,13 @@ Args myargs [] = {
" d Remove db_xref\n"
" r Remove Redundant Gene xref", NULL, NULL, NULL,
TRUE, 'F', ARG_STRING, 0.0, 0, NULL},
+ {"Miscellaneous\n"
+ " d Automatic Definition Line", NULL, NULL, NULL,
+ TRUE, 'M', ARG_STRING, 0.0, 0, NULL},
{"Taxonomy Lookup", "F", NULL, NULL,
TRUE, 'T', ARG_BOOLEAN, 0.0, 0, NULL},
+ {"Publication Lookup", "F", NULL, NULL,
+ TRUE, 'P', ARG_BOOLEAN, 0.0, 0, NULL},
};
Int2 Main (void)
@@ -772,7 +940,9 @@ Int2 Main (void)
cfd.clean = myargs [K_argClean].strvalue;
cfd.link = myargs [N_argLink].strvalue;
cfd.feat = myargs [F_argFeat].strvalue;
+ cfd.mods = myargs [M_argMods].strvalue;
cfd.taxon = (Boolean) myargs [T_argTaxonLookup].intvalue;
+ cfd.pub = (Boolean) myargs [P_argPubLookup].intvalue;
cfd.amp = AsnAllModPtr ();
cfd.atp_bss = AsnFind ("Bioseq-set");
@@ -781,7 +951,7 @@ Int2 Main (void)
cfd.atp_bsc = AsnFind ("Bioseq-set.class");
cfd.bssp_atp = AsnLinkType (NULL, cfd.atp_bss);
- logfile = (CharPtr) myargs [l_argLogFile].strvalue;
+ logfile = (CharPtr) myargs [L_argLogFile].strvalue;
if (StringDoesHaveText (logfile)) {
cfd.logfp = FileOpen (logfile, "w");
}
@@ -797,6 +967,10 @@ Int2 Main (void)
#endif
}
+ if (remote || cfd.pub) {
+ PubMedFetchEnable ();
+ }
+
starttime = GetSecs ();
if (StringDoesHaveText (directory)) {
@@ -819,6 +993,10 @@ Int2 Main (void)
FileClose (cfd.logfp);
}
+ if (remote || cfd.pub) {
+ PubMedFetchDisable ();
+ }
+
if (remote) {
#ifdef INTERNAL_NCBI_CLEANASN
PUBSEQBioseqFetchDisable ();
diff --git a/demo/copymat.c b/demo/copymat.c
index 71ad592b..cc09a1f7 100644
--- a/demo/copymat.c
+++ b/demo/copymat.c
@@ -1,4 +1,4 @@
-static char const rcsid[] = "$Id: copymat.c,v 6.47 2006/11/24 19:06:15 kans Exp $";
+static char const rcsid[] = "$Id: copymat.c,v 6.48 2008/02/01 14:04:25 madden Exp $";
/*
* ===========================================================================
@@ -36,6 +36,9 @@ Contents: main routines for copymatrices program to convert
score matrices output by makematrices into a single byte-encoded file.
$Log: copymat.c,v $
+Revision 6.48 2008/02/01 14:04:25 madden
+LookupTableWrapInit prototype change
+
Revision 6.47 2006/11/24 19:06:15 kans
added include of blast_filter.h
@@ -637,7 +640,7 @@ Boolean RPSCreateLookupFile(ScoreRow *combinedMatrix, Int4 numProfiles,
BlastSeqLocNew(&lookup_segment, 0, all_length);
/* Need query for psi-blast?? where to put the PSSM? */
- LookupTableWrapInit(NULL, lookup_options, lookup_segment, sbp, &lookup_wrap_ptr, NULL, NULL);
+ LookupTableWrapInit(NULL, lookup_options, NULL, lookup_segment, sbp, &lookup_wrap_ptr, NULL, NULL);
RPSPsiMatrixDetach(sbp);
sbp = BlastScoreBlkFree(sbp);
diff --git a/demo/cspeedtest.c b/demo/cspeedtest.c
new file mode 100644
index 00000000..6157d0c3
--- /dev/null
+++ b/demo/cspeedtest.c
@@ -0,0 +1,1099 @@
+/* cspeedtest.c
+* ===========================================================================
+*
+* PUBLIC DOMAIN NOTICE
+* National Center for Biotechnology Information (NCBI)
+*
+* This software/database is a "United States Government Work" under the
+* terms of the United States Copyright Act. It was written as part of
+* the author's official duties as a United States Government employee and
+* thus cannot be copyrighted. This software/database is freely available
+* to the public for use. The National Library of Medicine and the U.S.
+* Government do not place any restriction on its use or reproduction.
+* We would, however, appreciate having the NCBI and the author cited in
+* any work or product based on this material
+*
+* Although all reasonable efforts have been taken to ensure the accuracy
+* and reliability of the software and data, the NLM and the U.S.
+* Government do not and cannot warrant the performance or results that
+* may be obtained by using this software or data. The NLM and the U.S.
+* Government disclaim all warranties, express or implied, including
+* warranties of performance, merchantability or fitness for any particular
+* purpose.
+*
+* ===========================================================================
+*
+* File Name: cspeedtest.c
+*
+* Author: Jonathan Kans
+*
+* Version Creation Date: 12/17/07
+*
+* $Revision: 1.10 $
+*
+* File Description:
+*
+* Modifications:
+* --------------------------------------------------------------------------
+* Date Name Description of modification
+* ------- ---------- -----------------------------------------------------
+*
+*
+* ==========================================================================
+*/
+
+#include <ncbi.h>
+#include <objall.h>
+#include <objsset.h>
+#include <objfdef.h>
+#include <objsub.h>
+#include <sequtil.h>
+#include <sqnutils.h>
+#include <explore.h>
+#include <toasn3.h>
+#include <pmfapi.h>
+#include <tofasta.h>
+#include <asn2gnbk.h>
+#include <valid.h>
+
+#define CSPEEDTEST_APP_VER "1.3"
+
+CharPtr CSPEEDTEST_APPLICATION = CSPEEDTEST_APP_VER;
+
+typedef struct cspeedflags {
+ Boolean batch;
+ Boolean binary;
+ Boolean compressed;
+ Boolean lock;
+ Int2 type;
+ Int4 maxcount;
+ CharPtr io;
+ CharPtr clean;
+ CharPtr index;
+ CharPtr seq;
+ CharPtr feat;
+ CharPtr desc;
+ CharPtr verify;
+ AsnModulePtr amp;
+ AsnTypePtr atp_bss;
+ AsnTypePtr atp_bsss;
+ AsnTypePtr atp_se;
+ AsnTypePtr atp_bsc;
+ AsnTypePtr bssp_atp;
+ BioseqSet bss;
+ FILE *ofp;
+ FILE *logfp;
+} CSpeedFlagData, PNTR CSpeedFlagPtr;
+
+static void DoVisitFeaturesTest (
+ SeqFeatPtr sfp,
+ Pointer userdata
+)
+
+{
+ /* empty visit callback */
+}
+
+static void DoGeneOverlapPrintTest (
+ SeqFeatPtr sfp,
+ Pointer userdata
+)
+
+{
+ CSpeedFlagPtr cfp;
+ SeqMgrFeatContext gcontext;
+ SeqFeatPtr gene;
+ CharPtr str1, str2;
+
+ if (sfp == NULL) return;
+ cfp = (CSpeedFlagPtr) userdata;
+ if (cfp == NULL || cfp->ofp == NULL) return;
+
+ if (sfp->data.choice == SEQFEAT_GENE) return;
+ gene = SeqMgrGetOverlappingGene (sfp->location, &gcontext);
+ if (gene == NULL) return;
+
+ str1 = SeqLocPrint (sfp->location);
+ str2 = SeqLocPrint (gene->location);
+ if (str1 != NULL && str2 != NULL) {
+ fprintf (cfp->ofp, "[%s] -> [%s]\n", str1, str2);
+ } else {
+ fprintf (cfp->ofp, "? -> ?\n");
+ }
+ MemFree (str1);
+ MemFree (str2);
+}
+
+static void DoGeneOverlapSpeedTest (
+ SeqFeatPtr sfp,
+ Pointer userdata
+)
+
+{
+ CSpeedFlagPtr cfp;
+ SeqMgrFeatContext gcontext;
+ SeqFeatPtr gene;
+
+ if (sfp == NULL) return;
+ cfp = (CSpeedFlagPtr) userdata;
+ if (cfp == NULL || cfp->ofp == NULL) return;
+
+ if (sfp->data.choice == SEQFEAT_GENE) return;
+ gene = SeqMgrGetOverlappingGene (sfp->location, &gcontext);
+ if (gene == NULL) return;
+}
+
+static void LIBCALLBACK EmptyStreamProc (
+ CharPtr sequence,
+ Pointer userdata
+)
+
+{
+ /* empty stream callback */
+}
+
+static void DoFastaSeq (
+ BioseqPtr bsp,
+ Pointer userdata
+)
+
+{
+ CSpeedFlagPtr cfp;
+
+ if (bsp == NULL) return;
+ cfp = (CSpeedFlagPtr) userdata;
+ if (cfp == NULL) return;
+
+ if (cfp->ofp != NULL) {
+ BioseqFastaStream (bsp, cfp->ofp, STREAM_EXPAND_GAPS, 70, 0, 0, TRUE);
+ } else {
+ SeqPortStream (bsp, STREAM_EXPAND_GAPS, NULL, EmptyStreamProc);
+ }
+}
+
+static void DoFastaRaw (
+ BioseqPtr bsp,
+ Pointer userdata
+)
+
+{
+ CSpeedFlagPtr cfp;
+
+ if (bsp == NULL) return;
+ cfp = (CSpeedFlagPtr) userdata;
+ if (cfp == NULL) return;
+
+ if (cfp->ofp != NULL) {
+ fprintf (cfp->ofp, ">\n");
+ BioseqFastaStream (bsp, cfp->ofp, STREAM_EXPAND_GAPS, 70, 0, 0, FALSE);
+ } else {
+ SeqPortStream (bsp, STREAM_EXPAND_GAPS, NULL, EmptyStreamProc);
+ }
+}
+
+static void DoFastaDefline (
+ BioseqPtr bsp,
+ Pointer userdata
+)
+
+{
+ Char buf [4096];
+ CSpeedFlagPtr cfp;
+ Char id [128];
+
+ if (bsp == NULL) return;
+ cfp = (CSpeedFlagPtr) userdata;
+ if (cfp == NULL) return;
+
+ id [0] = '\0';
+ SeqIdWrite (bsp->id, id, PRINTID_FASTA_LONG, sizeof (id) - 1);
+ buf [0] = '\0';
+ CreateDefLine (NULL, bsp, buf, sizeof (buf) - 1, 0, NULL, NULL);
+
+ if (cfp->ofp != NULL) {
+ fprintf (cfp->ofp, ">%s %s\n", id, buf);
+ }
+}
+
+static void DoFastaFeat (
+ SeqFeatPtr sfp,
+ Pointer userdata
+)
+
+{
+ CSpeedFlagPtr cfp;
+ CharPtr str;
+
+ if (sfp == NULL) return;
+ cfp = (CSpeedFlagPtr) userdata;
+ if (cfp == NULL) return;
+
+ if (cfp->ofp != NULL) {
+ str = SeqLocPrint (sfp->location);
+ if (str != NULL) {
+ fprintf (cfp->ofp, "> [%s]\n", str);
+ MemFree (str);
+ }
+ SeqLocFastaStream (sfp->location, cfp->ofp, STREAM_EXPAND_GAPS, 70, 0, 0);
+ } else {
+ SeqPortStreamLoc (sfp->location, STREAM_EXPAND_GAPS, NULL, EmptyStreamProc);
+ }
+}
+
+static void DoFastaTrans (
+ SeqFeatPtr sfp,
+ Pointer userdata
+)
+
+{
+ ByteStorePtr bs;
+ CSpeedFlagPtr cfp;
+ CharPtr seq, str;
+
+ if (sfp == NULL) return;
+ cfp = (CSpeedFlagPtr) userdata;
+ if (cfp == NULL) return;
+
+ if (sfp->data.choice != SEQFEAT_CDREGION) return;
+ bs = ProteinFromCdRegion (sfp, FALSE);
+ if (bs == NULL) return;
+
+ seq = (CharPtr) BSMerge (bs, NULL);
+ BSFree (bs);
+ if (seq == NULL) return;
+
+ if (cfp->ofp != NULL) {
+ str = SeqLocPrint (sfp->location);
+ if (str != NULL) {
+ fprintf (cfp->ofp, "> (%s)\n", str);
+ MemFree (str);
+ }
+ fprintf (cfp->ofp, "%s\n", seq);
+ }
+
+ MemFree (seq);
+}
+
+static CharPtr compatSeverityLabel [] = {
+ "NONE", "NOTE: valid", "WARNING: valid", "ERROR: valid", "REJECT: valid", "FATAL: valid", "MAX", NULL
+};
+
+static void LIBCALLBACK ValidCallback (
+ ErrSev severity,
+ int errcode,
+ int subcode,
+ Uint2 entityID,
+ Uint2 itemtype,
+ Uint4 itemID,
+ CharPtr accession,
+ CharPtr message,
+ CharPtr objtype,
+ CharPtr label,
+ CharPtr context,
+ CharPtr location,
+ CharPtr product,
+ Pointer userdata
+)
+
+{
+ CharPtr catname, errname;
+ FILE *fp;
+
+ fp = (FILE *) userdata;
+ if (fp == NULL) return;
+
+ if (severity < SEV_NONE || severity > SEV_MAX) {
+ severity = SEV_MAX;
+ }
+
+ catname = GetValidCategoryName (errcode);
+ errname = GetValidErrorName (errcode, subcode);
+
+ if (catname == NULL) {
+ catname = "?";
+ }
+ if (errname == NULL) {
+ errname = "?";
+ }
+
+ if (accession == NULL) {
+ accession = "";
+ }
+ if (message == NULL) {
+ message = "";
+ }
+ if (objtype == NULL) {
+ objtype = "";
+ }
+ if (label == NULL) {
+ label = "";
+ }
+
+ fprintf (fp, "%s [%s.%s] %s %s: %s",
+ compatSeverityLabel [severity],
+ catname, errname, message, objtype, label);
+ if (location != NULL) {
+ fprintf (fp, " %s", location);
+ }
+ if (context != NULL) {
+ fprintf (fp, " %s", context);
+ }
+ if (product != NULL) {
+ fprintf (fp, " -> %s", product);
+ }
+ fprintf (fp, "\n");
+}
+
+static void DoProcess (
+ SeqEntryPtr sep,
+ Uint2 entityID,
+ CSpeedFlagPtr cfp
+)
+
+{
+ ErrSev oldErrSev;
+ ValidStructPtr vsp;
+
+ if (sep == NULL || cfp == NULL) return;
+
+ if (StringChr (cfp->clean, 'b') != NULL) {
+ BasicSeqEntryCleanup (sep);
+ }
+ if (StringChr (cfp->clean, 's') != NULL) {
+ SeriousSeqEntryCleanup (sep, NULL, NULL);
+ }
+
+ if (StringChr (cfp->index, 'f') != NULL) {
+ SeqMgrIndexFeatures (entityID, 0);
+ }
+
+ if (StringChr (cfp->seq, 's') != NULL) {
+ VisitBioseqsInSep (sep, (Pointer) cfp, DoFastaSeq);
+ }
+ if (StringChr (cfp->seq, 'r') != NULL) {
+ VisitBioseqsInSep (sep, (Pointer) cfp, DoFastaRaw);
+ }
+ if (StringChr (cfp->seq, 'd') != NULL) {
+ VisitBioseqsInSep (sep, (Pointer) cfp, DoFastaDefline);
+ }
+ if (StringChr (cfp->seq, 'f') != NULL) {
+ VisitFeaturesInSep (sep, (Pointer) cfp, DoFastaFeat);
+ }
+ if (StringChr (cfp->seq, 't') != NULL) {
+ VisitFeaturesInSep (sep, (Pointer) cfp, DoFastaTrans);
+ }
+
+ if (StringChr (cfp->feat, 'v') != NULL) {
+ VisitFeaturesInSep (sep, NULL, DoVisitFeaturesTest);
+ }
+ if (StringChr (cfp->feat, 'g') != NULL) {
+ if (SeqMgrFeaturesAreIndexed (entityID) == 0) {
+ SeqMgrIndexFeatures (entityID, 0);
+ }
+ VisitFeaturesInSep (sep, (Pointer) cfp, DoGeneOverlapPrintTest);
+ }
+ if (StringChr (cfp->feat, 'h') != NULL) {
+ if (SeqMgrFeaturesAreIndexed (entityID) == 0) {
+ SeqMgrIndexFeatures (entityID, 0);
+ }
+ VisitFeaturesInSep (sep, (Pointer) cfp, DoGeneOverlapSpeedTest);
+ }
+ if (StringChr (cfp->feat, 'x') != NULL) {
+ }
+ if (StringChr (cfp->feat, 'o') != NULL) {
+ }
+ if (StringChr (cfp->feat, 'd') != NULL) {
+ }
+ if (StringChr (cfp->feat, 't') != NULL) {
+ SeqEntryToGnbk (sep, NULL, FTABLE_FMT, SEQUIN_MODE, NORMAL_STYLE,
+ 0, 0, SHOW_PROT_FTABLE, NULL, cfp->ofp);
+ }
+
+ if (StringChr (cfp->desc, 'b') != NULL) {
+ }
+ if (StringChr (cfp->desc, 't') != NULL) {
+ }
+
+ if (StringChr (cfp->verify, 'v') != NULL) {
+ if (SeqMgrFeaturesAreIndexed (entityID) == 0) {
+ SeqMgrIndexFeatures (entityID, 0);
+ }
+ vsp = ValidStructNew ();
+ if (vsp != NULL) {
+ vsp->useSeqMgrIndexes = TRUE;
+ vsp->suppressContext = TRUE;
+ vsp->seqSubmitParent = TRUE;
+ vsp->testLatLonSubregion = TRUE;
+ oldErrSev = ErrSetMessageLevel (SEV_NONE);
+ vsp->errfunc = ValidCallback;
+ vsp->userdata = (Pointer) cfp->ofp;
+ /* vsp->convertGiToAccn = FALSE; */
+ ValidateSeqEntry (sep, vsp);
+ ValidStructFree (vsp);
+ ErrSetMessageLevel (oldErrSev);
+ }
+ }
+ if (StringChr (cfp->verify, 'b') != NULL) {
+ if (SeqMgrFeaturesAreIndexed (entityID) == 0) {
+ SeqMgrIndexFeatures (entityID, 0);
+ }
+ SeqEntryToGnbk (sep, NULL, GENBANK_FMT, SEQUIN_MODE, NORMAL_STYLE,
+ 0, 0, 0, NULL, cfp->ofp);
+ }
+
+ if (cfp->ofp != NULL) {
+ fflush (cfp->ofp);
+ }
+}
+
+static void ProcessSingleRecord (
+ CharPtr filename,
+ CSpeedFlagPtr cfp
+)
+
+{
+ AsnIoPtr aip;
+ BioseqPtr bsp;
+ ValNodePtr bsplist = NULL;
+ BioseqSetPtr bssp;
+ Pointer dataptr = NULL;
+ Uint2 datatype, entityID = 0;
+ FileCache fc;
+ FILE *fp;
+ Int1 iotype;
+ Char line [512];
+ Int4 maxio = 1;
+ SeqEntryPtr sep;
+ time_t starttime, stoptime, worsttime;
+ CharPtr str;
+ Int4 x;
+
+ if (cfp == NULL) return;
+
+ if (StringHasNoText (filename)) return;
+
+ if (StringChr (cfp->io, 'r') != NULL) {
+ maxio = cfp->maxcount;
+ }
+
+ starttime = GetSecs ();
+
+ for (x = 0; x < maxio; x++) {
+ if (entityID != 0) {
+ ObjMgrFreeByEntityID (entityID);
+ entityID = 0;
+ dataptr = NULL;
+ }
+
+ if (cfp->type == 1) {
+
+ fp = FileOpen (filename, "r");
+ if (fp == NULL) {
+ Message (MSG_POSTERR, "Failed to open '%s'", filename);
+ return;
+ }
+
+ dataptr = ReadAsnFastaOrFlatFile (fp, &datatype, NULL, FALSE, FALSE, FALSE, FALSE);
+
+ FileClose (fp);
+
+ entityID = ObjMgrRegister (datatype, dataptr);
+
+ } else if (cfp->type >= 2 && cfp->type <= 5) {
+
+ aip = AsnIoOpen (filename, cfp->binary? "rb" : "r");
+ if (aip == NULL) {
+ Message (MSG_POSTERR, "AsnIoOpen failed for input file '%s'", filename);
+ return;
+ }
+
+ switch (cfp->type) {
+ case 2 :
+ dataptr = (Pointer) SeqEntryAsnRead (aip, NULL);
+ datatype = OBJ_SEQENTRY;
+ break;
+ case 3 :
+ dataptr = (Pointer) BioseqAsnRead (aip, NULL);
+ datatype = OBJ_BIOSEQ;
+ break;
+ case 4 :
+ dataptr = (Pointer) BioseqSetAsnRead (aip, NULL);
+ datatype = OBJ_BIOSEQSET;
+ break;
+ case 5 :
+ dataptr = (Pointer) SeqSubmitAsnRead (aip, NULL);
+ datatype = OBJ_SEQSUB;
+ break;
+ default :
+ break;
+ }
+
+ AsnIoClose (aip);
+
+ entityID = ObjMgrRegister (datatype, dataptr);
+
+ } else if (cfp->type == 6) {
+
+ fp = FileOpen (filename, "r");
+ if (fp == NULL) {
+ Message (MSG_POSTERR, "Failed to open '%s'", filename);
+ return;
+ }
+
+ dataptr = ReadAsnFastaOrFlatFile (fp, &datatype, NULL, FALSE, FALSE, FALSE, FALSE);
+
+ FileClose (fp);
+
+ entityID = ObjMgrRegister (datatype, dataptr);
+
+ } else if (cfp->type == 7) {
+
+ fp = FileOpen (filename, "r");
+ if (fp == NULL) {
+ Message (MSG_POSTERR, "Failed to open '%s'", filename);
+ return;
+ }
+
+ FileCacheSetup (&fc, fp);
+
+ str = FileCacheReadLine (&fc, line, sizeof (line), NULL);
+ while (str != NULL) {
+ str = FileCacheReadLine (&fc, line, sizeof (line), NULL);
+ }
+
+ FileClose (fp);
+
+ return;
+
+ } else {
+ Message (MSG_POSTERR, "Input format type '%d' unrecognized", (int) cfp->type);
+ return;
+ }
+ }
+
+ if (entityID < 1 || dataptr == NULL) {
+ Message (MSG_POSTERR, "Data read failed for input file '%s'", filename);
+ return;
+ }
+
+ if (datatype == OBJ_SEQSUB || datatype == OBJ_SEQENTRY ||
+ datatype == OBJ_BIOSEQ || datatype == OBJ_BIOSEQSET) {
+
+ stoptime = GetSecs ();
+ worsttime = stoptime - starttime;
+ if (cfp->logfp != NULL) {
+ fprintf (cfp->logfp, "ASN reading time %ld seconds\n", (long) worsttime);
+ fflush (cfp->logfp);
+ }
+
+ sep = GetTopSeqEntryForEntityID (entityID);
+
+ if (sep == NULL) {
+ sep = SeqEntryNew ();
+ if (sep != NULL) {
+ if (datatype == OBJ_BIOSEQ) {
+ bsp = (BioseqPtr) dataptr;
+ sep->choice = 1;
+ sep->data.ptrvalue = bsp;
+ SeqMgrSeqEntry (SM_BIOSEQ, (Pointer) bsp, sep);
+ } else if (datatype == OBJ_BIOSEQSET) {
+ bssp = (BioseqSetPtr) dataptr;
+ sep->choice = 2;
+ sep->data.ptrvalue = bssp;
+ SeqMgrSeqEntry (SM_BIOSEQSET, (Pointer) bssp, sep);
+ } else {
+ sep = SeqEntryFree (sep);
+ }
+ }
+ sep = GetTopSeqEntryForEntityID (entityID);
+ }
+
+ if (sep != NULL) {
+
+ if (cfp->lock) {
+ starttime = GetSecs ();
+
+ bsplist = LockFarComponents (sep);
+
+ stoptime = GetSecs ();
+ worsttime = stoptime - starttime;
+ if (cfp->logfp != NULL) {
+ fprintf (cfp->logfp, "Far component locking time %ld seconds\n", (long) worsttime);
+ fflush (cfp->logfp);
+ }
+ }
+
+ if (StringChr (cfp->io, 'w') != NULL) {
+ starttime = GetSecs ();
+
+ iotype = ASNIO_TEXT_OUT;
+ if (StringChr (cfp->io, 'b') != NULL) {
+ iotype = ASNIO_BIN_OUT;
+ }
+
+ for (x = 0; x < cfp->maxcount; x++) {
+ aip = AsnIoNew (iotype, cfp->ofp, NULL, NULL, NULL);
+ if (aip != NULL) {
+ SeqEntryAsnWrite (sep, aip, NULL);
+ AsnIoFree (aip, FALSE);
+ }
+ }
+
+ stoptime = GetSecs ();
+ worsttime = stoptime - starttime;
+ if (cfp->logfp != NULL) {
+ fprintf (cfp->logfp, "ASN writing time %ld seconds\n", (long) worsttime);
+ fflush (cfp->logfp);
+ }
+ }
+
+ starttime = GetSecs ();
+
+ for (x = 0; x < cfp->maxcount; x++) {
+ DoProcess (sep, entityID, cfp);
+ }
+
+ stoptime = GetSecs ();
+ worsttime = stoptime - starttime;
+ if (cfp->logfp != NULL) {
+ fprintf (cfp->logfp, "Internal processing time %ld seconds\n", (long) worsttime);
+ fflush (cfp->logfp);
+ }
+
+ ObjMgrFreeByEntityID (entityID);
+
+ bsplist = UnlockFarComponents (bsplist);
+ }
+
+ } else {
+
+ Message (MSG_POSTERR, "Datatype %d not recognized", (int) datatype);
+ }
+}
+
+static void ProcessMultipleRecord (
+ CharPtr filename,
+ CSpeedFlagPtr cfp
+)
+
+{
+ AsnIoPtr aip;
+ AsnTypePtr atp;
+ BioseqPtr bsp;
+ Char buf [41];
+ Uint2 entityID;
+ FILE *fp;
+ SeqEntryPtr fsep;
+ Char longest [41];
+ Int4 numrecords, x;
+ SeqEntryPtr sep;
+ time_t starttime, stoptime, worsttime;
+#ifdef OS_UNIX
+ Char cmmd [256];
+ CharPtr gzcatprog;
+ int ret;
+ Boolean usedPopen = FALSE;
+#endif
+
+ if (cfp == NULL) return;
+
+ if (StringHasNoText (filename)) return;
+
+#ifndef OS_UNIX
+ if (cfp->compressed) {
+ Message (MSG_POSTERR, "Can only decompress on-the-fly on UNIX machines");
+ return;
+ }
+#endif
+
+#ifdef OS_UNIX
+ if (cfp->compressed) {
+ gzcatprog = getenv ("NCBI_UNCOMPRESS_BINARY");
+ if (gzcatprog != NULL) {
+ sprintf (cmmd, "%s %s", gzcatprog, filename);
+ } else {
+ ret = system ("gzcat -h >/dev/null 2>&1");
+ if (ret == 0) {
+ sprintf (cmmd, "gzcat %s", filename);
+ } else if (ret == -1) {
+ Message (MSG_POSTERR, "Unable to fork or exec gzcat in ScanBioseqSetRelease");
+ return;
+ } else {
+ ret = system ("zcat -h >/dev/null 2>&1");
+ if (ret == 0) {
+ sprintf (cmmd, "zcat %s", filename);
+ } else if (ret == -1) {
+ Message (MSG_POSTERR, "Unable to fork or exec zcat in ScanBioseqSetRelease");
+ return;
+ } else {
+ Message (MSG_POSTERR, "Unable to find zcat or gzcat in ScanBioseqSetRelease - please edit your PATH environment variable");
+ return;
+ }
+ }
+ }
+ fp = popen (cmmd, /* cfp->binary? "rb" : */ "r");
+ usedPopen = TRUE;
+ } else {
+ fp = FileOpen (filename, cfp->binary? "rb" : "r");
+ }
+#else
+ fp = FileOpen (filename, cfp->binary? "rb" : "r");
+#endif
+ if (fp == NULL) {
+ Message (MSG_POSTERR, "FileOpen failed for input file '%s'", filename);
+ return;
+ }
+
+ aip = AsnIoNew (cfp->binary? ASNIO_BIN_IN : ASNIO_TEXT_IN, fp, NULL, NULL, NULL);
+ if (aip == NULL) {
+ Message (MSG_ERROR, "AsnIoNew failed for input file '%s'", filename);
+ return;
+ }
+
+ if (cfp->logfp != NULL) {
+ fprintf (cfp->logfp, "%s\n\n", filename);
+ fflush (cfp->logfp);
+ }
+
+ longest [0] = '\0';
+ worsttime = 0;
+ numrecords = 0;
+
+ atp = cfp->atp_bss;
+
+ while ((atp = AsnReadId (aip, cfp->amp, atp)) != NULL) {
+ if (atp == cfp->atp_se) {
+
+ sep = SeqEntryAsnRead (aip, atp);
+ if (sep != NULL) {
+
+ entityID = ObjMgrGetEntityIDForChoice (sep);
+
+ fsep = FindNthBioseq (sep, 1);
+ if (fsep != NULL && fsep->choice == 1) {
+ bsp = (BioseqPtr) fsep->data.ptrvalue;
+ if (bsp != NULL) {
+ SeqIdWrite (bsp->id, buf, PRINTID_FASTA_LONG, sizeof (buf));
+ if (cfp->logfp != NULL) {
+ fprintf (cfp->logfp, "%s\n", buf);
+ fflush (cfp->logfp);
+ }
+ }
+ }
+
+ starttime = GetSecs ();
+ for (x = 0; x < cfp->maxcount; x++) {
+ DoProcess (sep, entityID, cfp);
+ }
+ stoptime = GetSecs ();
+
+ if (stoptime - starttime > worsttime) {
+ worsttime = stoptime - starttime;
+ StringCpy (longest, buf);
+ }
+ numrecords++;
+
+ ObjMgrFreeByEntityID (entityID);
+ }
+
+ } else {
+
+ AsnReadVal (aip, atp, NULL);
+ }
+ }
+
+ AsnIoFree (aip, FALSE);
+
+#ifdef OS_UNIX
+ if (usedPopen) {
+ pclose (fp);
+ } else {
+ FileClose (fp);
+ }
+#else
+ FileClose (fp);
+#endif
+ if (cfp->logfp != NULL && (! StringHasNoText (longest))) {
+ fprintf (cfp->logfp, "Longest processing time %ld seconds on %s\n",
+ (long) worsttime, longest);
+ fprintf (cfp->logfp, "Total number of records %ld\n", (long) numrecords);
+ fflush (cfp->logfp);
+ }
+}
+
+static void ProcessOneRecord (
+ CharPtr filename,
+ Pointer userdata
+)
+
+{
+ CSpeedFlagPtr cfp;
+
+ if (StringHasNoText (filename)) return;
+ cfp = (CSpeedFlagPtr) userdata;
+ if (cfp == NULL) return;
+
+ if (cfp->batch) {
+ ProcessMultipleRecord (filename, cfp);
+ } else {
+ ProcessSingleRecord (filename, cfp);
+ }
+}
+
+/* Args structure contains command-line arguments */
+
+#define p_argInputPath 0
+#define i_argInputFile 1
+#define o_argOutputFile 2
+#define f_argFilter 3
+#define x_argSuffix 4
+#define a_argType 5
+#define b_argBinary 6
+#define c_argCompressed 7
+#define l_argLockFar 8
+#define L_argLogFile 9
+#define R_argRemote 10
+#define X_argMaxCount 11
+#define O_argInOut 12
+#define K_argClean 13
+#define I_argIndex 14
+#define S_argSeq 15
+#define F_argFeat 16
+#define D_argDesc 17
+#define V_argVerify 18
+
+Args myargs [] = {
+ {"Path to Files", NULL, NULL, NULL,
+ TRUE, 'p', ARG_STRING, 0.0, 0, NULL},
+ {"Single Input File", "stdin", NULL, NULL,
+ TRUE, 'i', ARG_FILE_IN, 0.0, 0, NULL},
+ {"Output File", "stdout", NULL, NULL,
+ TRUE, 'o', ARG_FILE_OUT, 0.0, 0, NULL},
+ {"Substring Filter", NULL, NULL, NULL,
+ TRUE, 'f', ARG_STRING, 0.0, 0, NULL},
+ {"File Selection Suffix", ".ent", NULL, NULL,
+ TRUE, 'x', ARG_STRING, 0.0, 0, NULL},
+ {"ASN.1 Type\n"
+ " a Any\n"
+ " e Seq-entry\n"
+ " b Bioseq\n"
+ " s Bioseq-set\n"
+ " m Seq-submit\n"
+ " t Batch Processing\n"
+ " f FASTA\n"
+ " l Read by Lines", "a", NULL, NULL,
+ TRUE, 'a', ARG_STRING, 0.0, 0, NULL},
+ {"Bioseq-set is Binary", "F", NULL, NULL,
+ TRUE, 'b', ARG_BOOLEAN, 0.0, 0, NULL},
+ {"Bioseq-set is Compressed", "F", NULL, NULL,
+ TRUE, 'c', ARG_BOOLEAN, 0.0, 0, NULL},
+ {"Lock Components in Advance", "F", NULL, NULL,
+ TRUE, 'l', ARG_BOOLEAN, 0.0, 0, NULL},
+ {"Log File", NULL, NULL, NULL,
+ TRUE, 'L', ARG_FILE_OUT, 0.0, 0, NULL},
+ {"Remote Fetching from ID", "F", NULL, NULL,
+ TRUE, 'R', ARG_BOOLEAN, 0.0, 0, NULL},
+ {"Max Repeat Count", "1", NULL, NULL,
+ TRUE, 'X', ARG_INT, 0.0, 0, NULL},
+ {"Input Output\n"
+ " r Read ASN.1\n"
+ " w Write Text ASN.1\n"
+ " wb Write Binary ASN.1", NULL, NULL, NULL,
+ TRUE, 'O', ARG_STRING, 0.0, 0, NULL},
+ {"Cleanup\n"
+ " b BasicSeqEntryCleanup\n"
+ " s SeriousSeqEntryCleanup", NULL, NULL, NULL,
+ TRUE, 'K', ARG_STRING, 0.0, 0, NULL},
+ {"Index\n"
+ " f Feature Indexing", NULL, NULL, NULL,
+ TRUE, 'I', ARG_STRING, 0.0, 0, NULL},
+ {"Sequence\n"
+ " s FASTA of Sequence\n"
+ " r Raw FASTA no Defline\n"
+ " d Just FASTA Defline\n"
+ " f FASTA by Feature\n"
+ " t FASTA of Translation", NULL, NULL, NULL,
+ TRUE, 'S', ARG_STRING, 0.0, 0, NULL},
+ {"Feature\n"
+ " v Visit Features\n"
+ " g Gene Overlap Print\n"
+ " h Gene Overlap Speed\n"
+ " x Gene by Xref\n"
+ " o Operon by Overlap\n"
+ " d Feature by ID\n"
+ " t Feature Table", NULL, NULL, NULL,
+ TRUE, 'F', ARG_STRING, 0.0, 0, NULL},
+ {"Descriptor\n"
+ " b BioSource\n"
+ " t Title", NULL, NULL, NULL,
+ TRUE, 'D', ARG_STRING, 0.0, 0, NULL},
+ {"Verification\n"
+ " v Validate with Normal Stringency\n"
+ " b Generate GenBank Flatfile\n", NULL, NULL, NULL,
+ TRUE, 'V', ARG_STRING, 0.0, 0, NULL},
+};
+
+Int2 Main (void)
+
+{
+ Char app [64], type;
+ CSpeedFlagData cfd;
+ CharPtr directory, filter, infile, logfile, outfile, str, suffix;
+ Boolean remote;
+ time_t runtime, starttime, stoptime;
+
+ /* standard setup */
+
+ ErrSetFatalLevel (SEV_MAX);
+ ErrClearOptFlags (EO_SHOW_USERSTR);
+ UseLocalAsnloadDataAndErrMsg ();
+ ErrPathReset ();
+
+ /* finish resolving internal connections in ASN.1 parse tables */
+
+ if (! AllObjLoad ()) {
+ Message (MSG_FATAL, "AllObjLoad failed");
+ return 1;
+ }
+ if (! SubmitAsnLoad ()) {
+ Message (MSG_FATAL, "SubmitAsnLoad failed");
+ return 1;
+ }
+ if (! FeatDefSetLoad ()) {
+ Message (MSG_FATAL, "FeatDefSetLoad failed");
+ return 1;
+ }
+ if (! SeqCodeSetLoad ()) {
+ Message (MSG_FATAL, "SeqCodeSetLoad failed");
+ return 1;
+ }
+ if (! GeneticCodeTableLoad ()) {
+ Message (MSG_FATAL, "GeneticCodeTableLoad failed");
+ return 1;
+ }
+
+ /* process command line arguments */
+
+ sprintf (app, "cspeedtest %s", CSPEEDTEST_APPLICATION);
+ if (! GetArgs (app, sizeof (myargs) / sizeof (Args), myargs)) {
+ return 0;
+ }
+
+ MemSet ((Pointer) &cfd, 0, sizeof (CSpeedFlagData));
+
+ directory = (CharPtr) myargs [p_argInputPath].strvalue;
+ infile = (CharPtr) myargs [i_argInputFile].strvalue;
+ outfile = (CharPtr) myargs [o_argOutputFile].strvalue;
+ filter = (CharPtr) myargs [f_argFilter].strvalue;
+ suffix = (CharPtr) myargs [x_argSuffix].strvalue;
+
+ cfd.batch = FALSE;
+ cfd.binary = (Boolean) myargs [b_argBinary].intvalue;
+ cfd.compressed = (Boolean) myargs [c_argCompressed].intvalue;
+ cfd.lock = (Boolean) myargs [l_argLockFar].intvalue;
+ cfd.type = 1;
+
+ str = myargs [a_argType].strvalue;
+ TrimSpacesAroundString (str);
+ if (StringDoesHaveText (str)) {
+ type = str [0];
+ } else {
+ type = 'a';
+ }
+
+ type = TO_LOWER (type);
+ switch (type) {
+ case 'a' :
+ cfd.type = 1;
+ break;
+ case 'e' :
+ cfd.type = 2;
+ break;
+ case 'b' :
+ cfd.type = 3;
+ break;
+ case 's' :
+ cfd.type = 4;
+ break;
+ case 'm' :
+ cfd.type = 5;
+ break;
+ case 't' :
+ cfd.type = 1;
+ cfd.batch = TRUE;
+ break;
+ case 'f' :
+ cfd.type = 6;
+ break;
+ case 'l' :
+ cfd.type = 7;
+ break;
+ default :
+ cfd.type = 1;
+ break;
+ }
+
+ remote = (Boolean) myargs [R_argRemote].intvalue;
+
+ cfd.maxcount = myargs [X_argMaxCount].intvalue;
+ if (cfd.maxcount < 1) {
+ cfd.maxcount = 1;
+ }
+
+ cfd.io = myargs [O_argInOut].strvalue;
+ cfd.clean = myargs [K_argClean].strvalue;
+ cfd.index = myargs [I_argIndex].strvalue;
+ cfd.seq = myargs [S_argSeq].strvalue;
+ cfd.feat = myargs [F_argFeat].strvalue;
+ cfd.desc = myargs [D_argDesc].strvalue;
+ cfd.verify = myargs [V_argVerify].strvalue;
+
+ cfd.amp = AsnAllModPtr ();
+ cfd.atp_bss = AsnFind ("Bioseq-set");
+ cfd.atp_bsss = AsnFind ("Bioseq-set.seq-set");
+ cfd.atp_se = AsnFind ("Bioseq-set.seq-set.E");
+ cfd.atp_bsc = AsnFind ("Bioseq-set.class");
+ cfd.bssp_atp = AsnLinkType (NULL, cfd.atp_bss);
+
+ logfile = (CharPtr) myargs [L_argLogFile].strvalue;
+ if (StringDoesHaveText (logfile)) {
+ cfd.logfp = FileOpen (logfile, "w");
+ }
+
+ if (remote) {
+ PubSeqFetchEnable ();
+ }
+
+ if (StringDoesHaveText (outfile)) {
+ cfd.ofp = FileOpen (outfile, "w");
+ }
+
+ starttime = GetSecs ();
+
+ if (StringDoesHaveText (directory)) {
+
+ DirExplore (directory, NULL, suffix, FALSE, ProcessOneRecord, (Pointer) &cfd);
+
+ } else if (StringDoesHaveText (infile)) {
+
+ ProcessOneRecord (infile, (Pointer) &cfd);
+ }
+
+ if (cfd.ofp != NULL) {
+ FileClose (cfd.ofp);
+ }
+
+ stoptime = GetSecs ();
+ runtime = stoptime - starttime;
+ if (cfd.logfp != NULL) {
+ fprintf (cfd.logfp, "Finished in %ld seconds\n", (long) runtime);
+ FileClose (cfd.logfp);
+ }
+
+ if (remote) {
+ PubSeqFetchDisable ();
+ }
+
+ return 0;
+}
+
diff --git a/demo/megablast.c b/demo/megablast.c
index 1682d8a6..c012083d 100644
--- a/demo/megablast.c
+++ b/demo/megablast.c
@@ -1,5 +1,5 @@
-static char const rcsid[] = "$Id: megablast.c,v 6.199 2007/03/20 14:56:58 camacho Exp $";
-/* $Id: megablast.c,v 6.199 2007/03/20 14:56:58 camacho Exp $
+static char const rcsid[] = "$Id: megablast.c,v 6.201 2007/10/23 16:03:23 madden Exp $";
+/* $Id: megablast.c,v 6.201 2007/10/23 16:03:23 madden Exp $
**************************************************************************
* *
* COPYRIGHT NOTICE *
@@ -26,6 +26,12 @@ static char const rcsid[] = "$Id: megablast.c,v 6.199 2007/03/20 14:56:58 camach
* *
**************************************************************************
* $Log: megablast.c,v $
+ * Revision 6.201 2007/10/23 16:03:23 madden
+ * No longer set ungapped_extension as an initial word option
+ *
+ * Revision 6.200 2007/10/03 17:12:36 papadopo
+ * do not ignore the value of -H when configuring the current blast engine
+ *
* Revision 6.199 2007/03/20 14:56:58 camacho
* Call GeneticCodeSingletonInit/GeneticCodeSingletonFini
*
@@ -1948,14 +1954,6 @@ BLAST_FillOptions(SBlastOptions* options, Blast_SummaryReturn* sum_returns)
lambda*myargs[ARG_XDROP].intvalue/NCBIMATH_LN2,
lambda*myargs[ARG_XDROP_FINAL].intvalue/NCBIMATH_LN2);
- /* For discontiguous megablast we skip ungapped extensions
- when using the 2-hit wordfinder */
- if (lookup_options->mb_template_length > 0)
- {
- if (word_options->window_size > 0)
- word_options->ungapped_extension = FALSE;
- }
-
BLAST_FillHitSavingOptions(hit_options,
myargs[ARG_EVALUE].floatvalue,
MAX(myargs[ARG_DESCRIPTIONS].intvalue,
@@ -1963,6 +1961,7 @@ BLAST_FillOptions(SBlastOptions* options, Blast_SummaryReturn* sum_returns)
score_options->gapped_calculation,
0, /* turn off culling */
diag_separation);
+ hit_options->hsp_num_max = myargs[ARG_MAXHSP].intvalue;
if (myargs[ARG_MINSCORE].intvalue)
hit_options->cutoff_score = myargs[ARG_MINSCORE].intvalue;
diff --git a/demo/nps2gps.c b/demo/nps2gps.c
index 0468f47f..d926a85b 100644
--- a/demo/nps2gps.c
+++ b/demo/nps2gps.c
@@ -29,7 +29,7 @@
*
* Version Creation Date: 5/12/05
*
-* $Revision: 1.11 $
+* $Revision: 1.13 $
*
* File Description:
*
@@ -50,7 +50,7 @@
#include <toasn3.h>
#include <pmfapi.h>
-#define NPS2GPSAPP_VER "1.9"
+#define NPS2GPSAPP_VER "2.1"
CharPtr NPS2GPSAPPLICATION = NPS2GPSAPP_VER;
@@ -60,6 +60,7 @@ typedef struct n2gdata {
Boolean failure;
Boolean lock;
Boolean byFeatID;
+ Boolean useProtID;
} N2GData, PNTR N2GPtr;
typedef struct npsseqs {
@@ -381,10 +382,30 @@ static SeqIdPtr MakeIdFromLocusTag (
return NULL;
}
+static SeqIdPtr MakeIdFromProtein (
+ BioseqPtr pbsp
+)
+
+{
+ Char buf [64], tmp [64];
+ SeqIdPtr sip;
+
+ if (pbsp == NULL) return NULL;
+ sip = SeqIdFindBestAccession (pbsp->id);
+ if (sip == NULL) return NULL;
+ SeqIdWrite (sip, buf, PRINTID_TEXTID_ACC_VER, sizeof (buf) - 1);
+ if (StringHasNoText (buf)) return NULL;
+ StringCpy (tmp, "gnl|MTRACK|");
+ StringCat (tmp, buf);
+ StringCat (tmp, "_mrna");
+ return MakeSeqID (tmp);
+}
+
static void InstantiateMrnaIntoProt (
SeqFeatPtr cds,
SeqFeatPtr mrna,
- Int2Ptr ctrp
+ Int2Ptr ctrp,
+ N2GPtr ngp
)
{
@@ -397,11 +418,11 @@ static void InstantiateMrnaIntoProt (
CharPtr rnaseq;
ValNodePtr vnp;
- if (cds == NULL || mrna == NULL) return;
+ if (cds == NULL || mrna == NULL || ngp == NULL) return;
if (cds->product == NULL || mrna->product != NULL) return;
pbsp = BioseqFindFromSeqLoc (cds->product);
- if (pbsp == NULL) return;
+ if (pbsp == NULL) return;
psep = SeqMgrGetSeqEntryForData (pbsp);
if (psep == NULL) return;
@@ -423,8 +444,13 @@ static void InstantiateMrnaIntoProt (
mbsp->length = BSLen (bs);
BioseqPack (mbsp);
- /* now adds _# suffix to general Seq-id if ambiguous */
+ /* now adds _# suffix to general Seq-id if ambiguous - but messed up Drosophila record, so only use feature ID */
+ /*
mbsp->id = MakeIdFromLocusTag (mrna);
+ */
+ if (ngp->useProtID) {
+ mbsp->id = MakeIdFromProtein (pbsp);
+ }
if (mbsp->id == NULL) {
mbsp->id = MakeNewProteinSeqIdEx (mrna->location, NULL, NULL, ctrp);
}
@@ -544,7 +570,7 @@ static void LoopThroughCDSs (
count = SeqMgrGetAllOverlappingFeatures (sfp->location, FEATDEF_mRNA, NULL, 0,
CHECK_INTERVALS, (Pointer) &ld, FindSingleMrnaProc);
if (ld.count == 1 && ld.mrna != NULL) {
- InstantiateMrnaIntoProt (sfp, ld.mrna, ctrp);
+ InstantiateMrnaIntoProt (sfp, ld.mrna, ctrp, ngp);
sfp->idx.scratch = (Pointer) MemNew (sizeof (Int4));
ld.mrna->idx.scratch = (Pointer) MemNew (sizeof (Int4));
goOn = TRUE;
@@ -736,7 +762,7 @@ static void NPStoGPS (
while (sfp != NULL) {
mrna = GetmRNAByFeatureID (sfp);
if (mrna != NULL) {
- InstantiateMrnaIntoProt (sfp, mrna, &ctr);
+ InstantiateMrnaIntoProt (sfp, mrna, &ctr, ngp);
}
sfp = SeqMgrGetNextFeature (bsp, sfp, SEQFEAT_CDREGION, 0, &fcontext);
}
@@ -959,6 +985,7 @@ static void ProcessOneRecord (
#define R_argRemote 6
#define L_argLockFar 7
#define F_argUseFeatID 8
+#define P_argUseProtID 9
Args myargs [] = {
@@ -980,6 +1007,8 @@ Args myargs [] = {
TRUE, 'L', ARG_BOOLEAN, 0.0, 0, NULL},
{"Map by Feature ID", "F", NULL, NULL,
TRUE, 'F', ARG_BOOLEAN, 0.0, 0, NULL},
+ {"mRNA ID from Protein", "F", NULL, NULL,
+ TRUE, 'P', ARG_BOOLEAN, 0.0, 0, NULL},
};
Int2 Main (void)
@@ -1032,6 +1061,7 @@ Int2 Main (void)
ngd.failure = FALSE;
ngd.lock = (Boolean) myargs [L_argLockFar].intvalue;
ngd.byFeatID = (Boolean) myargs [F_argUseFeatID].intvalue;
+ ngd.useProtID = (Boolean) myargs [P_argUseProtID].intvalue;
directory = (CharPtr) myargs [p_argInputPath].strvalue;
results = (CharPtr) myargs [r_argOutputPath].strvalue;
diff --git a/demo/raw2delt.c b/demo/raw2delt.c
new file mode 100644
index 00000000..cdb74ec5
--- /dev/null
+++ b/demo/raw2delt.c
@@ -0,0 +1,657 @@
+/* raw2delt.c
+* ===========================================================================
+*
+* PUBLIC DOMAIN NOTICE
+* National Center for Biotechnology Information (NCBI)
+*
+* This software/database is a "United States Government Work" under the
+* terms of the United States Copyright Act. It was written as part of
+* the author's official duties as a United States Government employee and
+* thus cannot be copyrighted. This software/database is freely available
+* to the public for use. The National Library of Medicine and the U.S.
+* Government do not place any restriction on its use or reproduction.
+* We would, however, appreciate having the NCBI and the author cited in
+* any work or product based on this material
+*
+* Although all reasonable efforts have been taken to ensure the accuracy
+* and reliability of the software and data, the NLM and the U.S.
+* Government do not and cannot warrant the performance or results that
+* may be obtained by using this software or data. The NLM and the U.S.
+* Government disclaim all warranties, express or implied, including
+* warranties of performance, merchantability or fitness for any particular
+* purpose.
+*
+* ===========================================================================
+*
+* File Name: raw2delt.c
+*
+* Author: Colleen Bollin
+*
+* Version Creation Date: 4/12/07
+*
+* $Revision: 1.2 $
+*
+* File Description:
+*
+* Modifications:
+* --------------------------------------------------------------------------
+* Date Name Description of modification
+* ------- ---------- -----------------------------------------------------
+*
+*
+* ==========================================================================
+*/
+
+#include <ncbi.h>
+#include <objall.h>
+#include <objsset.h>
+#include <objsub.h>
+#include <objfdef.h>
+#include <sequtil.h>
+#include <gather.h>
+#include <sqnutils.h>
+#include <explore.h>
+#include <seqport.h>
+
+#define RAW2DELT_APP_VER "1.0"
+
+CharPtr RAW2DELT_APPLICATION = RAW2DELT_APP_VER;
+
+typedef struct outputstream {
+ CharPtr results_dir;
+ CharPtr base;
+ CharPtr suffix;
+ CharPtr outfile;
+ CharPtr outsuffix;
+ AsnIoPtr aip;
+ Boolean is_binary;
+} OutputStreamData, PNTR OutputStreamPtr;
+
+typedef struct inputstream {
+ CharPtr directory;
+ CharPtr base;
+ CharPtr suffix;
+ Boolean is_binary;
+ Boolean is_seqentry;
+} InputStreamData, PNTR InputStreamPtr;
+
+typedef struct asnstream {
+ AsnModulePtr amp;
+ AsnTypePtr atp_se;
+ AsnTypePtr atp_bss;
+ AsnTypePtr atp_bss_se;
+} AsnStreamData, PNTR AsnStreamPtr;
+
+static FILE* OpenOneFile (
+ CharPtr directory,
+ CharPtr base,
+ CharPtr suffix
+)
+
+{
+ Char file [FILENAME_MAX], path [PATH_MAX];
+
+ if (base == NULL) {
+ base = "";
+ }
+ if (suffix == NULL) {
+ suffix = "";
+ }
+
+ StringNCpy_0 (path, directory, sizeof (path));
+ sprintf (file, "%s%s", base, suffix);
+ FileBuildPath (path, NULL, file);
+
+ return FileOpen (path, "r");
+}
+
+static AsnIoPtr AsnIoFromInputStream (
+ InputStreamPtr isp
+)
+
+{
+ AsnIoPtr aip;
+ Char file [FILENAME_MAX], path [PATH_MAX];
+ CharPtr read_flag;
+
+ if (isp == NULL) return NULL;
+
+ if (isp->is_binary) {
+ read_flag = "rb";
+ } else {
+ read_flag = "r";
+ }
+
+ if (isp->base == NULL) {
+ aip = AsnIoOpen ("stdin", read_flag);
+ } else {
+ StringNCpy_0 (path, isp->directory, sizeof (path));
+ sprintf (file, "%s%s", isp->base, isp->suffix);
+ FileBuildPath (path, NULL, file);
+ aip = AsnIoOpen (path, read_flag);
+ }
+ return aip;
+}
+
+
+static AsnIoPtr AsnIoFromOutputStream (OutputStreamPtr osp)
+{
+ AsnIoPtr aip;
+ Char file [FILENAME_MAX], path [PATH_MAX];
+ CharPtr write_flag;
+
+ if (osp == NULL) return NULL;
+ if (osp->aip == NULL) {
+ write_flag = osp->is_binary ? "wb" : "w";
+ if (StringDoesHaveText (osp->outfile)) {
+ StringNCpy_0 (path, osp->outfile, sizeof (path));
+ } else {
+ if (osp->base == NULL) {
+ aip = AsnIoOpen ("stdout", write_flag);
+ } else {
+ if (osp->outsuffix == NULL) {
+ osp->outsuffix = "";
+ }
+ StringNCpy_0 (path, osp->results_dir, sizeof (path));
+ sprintf (file, "%s%s%s", osp->base, osp->suffix, osp->outsuffix);
+ FileBuildPath (path, NULL, file);
+ aip = AsnIoOpen (path, write_flag);
+ if (aip == NULL) {
+ Message (MSG_POSTERR, "Unable to write to %s.", path);
+ }
+ }
+ }
+ } else {
+ aip = osp->aip;
+ }
+ return aip;
+}
+
+static void WriteOneFile (
+ OutputStreamPtr osp,
+ SeqEntryPtr sep
+)
+
+{
+ AsnIoPtr aip;
+
+ aip = AsnIoFromOutputStream (osp);
+ if (aip != NULL) {
+ SeqEntryAsnWrite (sep, aip, NULL);
+ AsnIoFlush (aip);
+ }
+ if (aip != osp->aip) {
+ AsnIoClose (aip);
+ }
+}
+
+
+static void CollectBioseqsForConversion (BioseqPtr bsp, Pointer userdata)
+{
+ ValNodePtr PNTR list;
+
+ if (bsp == NULL || bsp->repr != Seq_repr_raw || ISA_aa (bsp->mol)) return;
+ if (userdata == NULL)
+ {
+ return;
+ }
+ list = (ValNodePtr PNTR) userdata;
+
+ ValNodeAddPointer (list, 0, bsp);
+}
+
+
+static void ProcessSeqEntry (SeqEntryPtr sep, Int4Ptr gap_sizes)
+{
+ ValNodePtr bsp_list = NULL, vnp;
+ BioseqPtr bsp;
+
+ if (sep == NULL || gap_sizes == NULL) return;
+
+ VisitBioseqsInSep (sep, &bsp_list, CollectBioseqsForConversion);
+
+ for (vnp = bsp_list; vnp != NULL; vnp = vnp->next) {
+ bsp = (BioseqPtr) vnp->data.ptrvalue;
+ ConvertNsToGaps (bsp, gap_sizes);
+ }
+ bsp_list = ValNodeFree (bsp_list);
+}
+
+static Uint2 ProcessOneAsn (
+ FILE* fp,
+ CharPtr path,
+ Int4Ptr gap_sizes
+)
+
+{
+ Pointer dataptr;
+ Uint2 datatype, entityID = 0;
+ SeqEntryPtr sep;
+
+ if (fp == NULL || gap_sizes == NULL) return 0;
+
+ dataptr = ReadAsnFastaOrFlatFile (fp, &datatype, &entityID, TRUE, FALSE, TRUE, FALSE);
+ if (dataptr == NULL) {
+ Message (MSG_POSTERR, "Unable to read data from %s.", path);
+ return 0;
+ }
+
+ sep = GetTopSeqEntryForEntityID (entityID);
+ ProcessSeqEntry (sep, gap_sizes);
+
+ return entityID;
+}
+
+/* return -1 if failure, 0 if success */
+static Int4 ProcessOneRecord (
+ CharPtr directory,
+ OutputStreamPtr osp,
+ Int4Ptr gap_sizes
+)
+
+{
+ Uint2 entityID;
+ FILE *fp;
+ SeqEntryPtr sep;
+
+ if (osp == NULL || gap_sizes == NULL) return -1;
+ fp = OpenOneFile (directory, osp->base, osp->suffix);
+ if (fp == NULL) return -1;
+
+ entityID = ProcessOneAsn (fp, osp->base == NULL ? "input stream" : osp->base, gap_sizes);
+
+ FileClose (fp);
+
+ if (entityID == 0) return -1;
+
+ /* finish processing */
+
+ sep = GetTopSeqEntryForEntityID (entityID);
+ if (sep != NULL) {
+ WriteOneFile (osp, sep);
+ }
+
+ ObjMgrFreeByEntityID (entityID);
+ return 0;
+}
+
+static Int4 ProcessStream (InputStreamPtr isp, OutputStreamPtr osp, AsnStreamPtr asp, Int4Ptr gap_sizes)
+{
+ AsnTypePtr atp, atp_srch;
+ AsnIoPtr asn_in, asn_out;
+ Int4 rval = 0;
+ SeqEntryPtr sep;
+ Uint2 entityID;
+ DataVal av;
+
+ if (isp == NULL || osp == NULL || asp == NULL || gap_sizes == NULL) return 1;
+
+ asn_in = AsnIoFromInputStream (isp);
+ asn_out = AsnIoFromOutputStream (osp);
+
+ if (isp->is_seqentry) {
+ atp = asp->atp_se;
+ atp_srch = asp->atp_se;
+ }
+ else {
+ atp = asp->atp_bss;
+ atp_srch = asp->atp_bss_se;
+ }
+
+ while ((atp = AsnReadId(asn_in, asp->amp, atp)) != NULL && rval == 0) {
+ if (atp != atp_srch) {
+ AsnReadVal(asn_in, atp, &av);
+ AsnWrite(asn_out, atp, &av);
+ AsnKillValue(atp, &av);
+ continue;
+ }
+ if ((sep = SeqEntryAsnRead(asn_in, atp)) == NULL) {
+ Message (MSG_POSTERR, "SeqEntryAsnRead failure");
+ rval = 1;
+ } else {
+ entityID = ObjMgrRegister (OBJ_SEQENTRY, sep);
+ ProcessSeqEntry (sep, gap_sizes);
+
+ if (! SeqEntryAsnWrite(sep, asn_out, atp)) {
+ Message (MSG_POSTERR, "SeqEntryAsnWrite failure");
+ rval = 1;
+ }
+ AsnIoFlush(asn_out);
+ ObjMgrFreeByEntityID (entityID);
+ }
+ } /* Endwhile, AsnReadId */
+
+ AsnIoClose(asn_in);
+ if (asn_out != osp->aip) {
+ AsnIoClose(asn_out);
+ }
+
+ return rval;
+}
+
+/* return -1 on failure, 0 on success */
+static Int4 FileRecurse (
+ CharPtr directory,
+ InputStreamPtr isp,
+ OutputStreamPtr osp,
+ AsnStreamPtr asp,
+ Int4Ptr gap_sizes
+)
+
+{
+ Char path [PATH_MAX];
+ CharPtr ptr;
+ CharPtr str;
+ ValNodePtr head, vnp;
+ CharPtr orig_dir, orig_base;
+ Int4 rval = 0;
+
+ /* get list of all files in source directory */
+
+ head = DirCatalog (directory);
+
+ for (vnp = head; vnp != NULL; vnp = vnp->next) {
+ if (vnp->choice == 0) {
+ str = (CharPtr) vnp->data.ptrvalue;
+ if (StringDoesHaveText (str)) {
+
+ /* does filename have desired substring? */
+
+ ptr = StringStr (str, osp->suffix);
+
+ if (ptr != NULL) {
+
+ /* make sure detected suffix is really at end of filename */
+
+ if (StringCmp (ptr, osp->suffix) == 0) {
+ *ptr = '\0';
+
+ /* process file that has desired suffix (usually .fsa) */
+ osp->base = str;
+ orig_dir = isp->directory;
+ isp->directory = directory;
+ orig_base = isp->base;
+ isp->base = str;
+ if (isp->is_binary) {
+ rval |= ProcessStream (isp, osp, asp, gap_sizes);
+ } else {
+ rval |= ProcessOneRecord (directory, osp, gap_sizes);
+ }
+ isp->directory = orig_dir;
+ isp->base = orig_base;
+ osp->base = NULL;
+ }
+ }
+ }
+ } else if (vnp->choice == 1) {
+
+ /* recurse into subdirectory */
+
+ StringNCpy_0 (path, directory, sizeof (path));
+ str = (CharPtr) vnp->data.ptrvalue;
+ FileBuildPath (path, str, NULL);
+ rval |= FileRecurse (path, isp, osp, asp, gap_sizes);
+ }
+ }
+
+ /* clean up file list */
+
+ ValNodeFreeData (head);
+ return rval;
+}
+
+static Boolean SetUpAsnStreamData (AsnStreamPtr asp)
+
+{
+ if (asp == NULL) return FALSE;
+
+ if (! SeqSetAsnLoad()) {
+ Message (MSG_POSTERR, "Unable to load SeqSet parse tree");
+ return FALSE;
+ }
+ asp->amp = AsnAllModPtr();
+ if (asp->amp == NULL) {
+ Message (MSG_POSTERR, "Unable to obtain ASN.1 module pointer");
+ return FALSE;
+ }
+
+ /* Get pointers to ASN.1 types that must be dealt with in asn_in */
+
+ if ( (asp->atp_bss = AsnFind("Bioseq-set")) == NULL) {
+ Message (MSG_POSTERR, "could not find type Bioseq-set");
+ return FALSE;
+ }
+ if ( (asp->atp_bss_se = AsnFind("Bioseq-set.seq-set.E")) == NULL) {
+ Message (MSG_POSTERR, "AsnFind failure: Bioseq-set.seq-set.E");
+ return FALSE;
+ }
+ if ( (asp->atp_se = AsnFind("Seq-entry")) == NULL) {
+ Message (MSG_POSTERR, "AsnFind failure: Seq-entry");
+ return FALSE;
+ }
+ return TRUE;
+}
+
+/* Args structure contains command-line arguments */
+
+#define p_argInputPath 0
+#define r_argOutputPath 1
+#define i_argInputFile 2
+#define o_argOutputFile 3
+#define x_argSuffix 4
+#define s_argOutSuffix 5
+#define b_argInputBinary 6
+#define e_argInputSeqEntry 7
+#define d_argOutputBinary 8
+#define u_argEqUnknownGap 9
+#define U_argGTEqUnknownGap 10
+#define k_argEqUnknownGap 11
+#define K_argGtEqUnknownGap 12
+
+
+Args myargs [] = {
+ {"Path to Files", NULL, NULL, NULL,
+ TRUE, 'p', ARG_STRING, 0.0, 0, NULL},
+ {"Path for Results", NULL, NULL, NULL,
+ TRUE, 'r', ARG_STRING, 0.0, 0, NULL},
+ {"Single Input File", NULL, NULL, NULL,
+ TRUE, 'i', ARG_FILE_IN, 0.0, 0, NULL},
+ {"Single Output File", NULL, NULL, NULL,
+ TRUE, 'o', ARG_FILE_OUT, 0.0, 0, NULL},
+ {"Suffix", ".sqn", NULL, NULL,
+ TRUE, 'x', ARG_STRING, 0.0, 0, NULL},
+ {"Suffix for converted files", "", NULL, NULL,
+ TRUE, 's', ARG_STRING, 0.0, 0, NULL},
+ {"Input is binary", "F", NULL, NULL,
+ TRUE, 'b', ARG_BOOLEAN, 0.0, 0, NULL},
+ {"Input is Seq-entry", "F", NULL, NULL,
+ TRUE, 'e', ARG_BOOLEAN, 0.0, 0, NULL},
+ {"Output is binary", "F", NULL, NULL,
+ TRUE, 'b', ARG_BOOLEAN, 0.0, 0, NULL},
+ {"Exact size to convert to unknown length gap", "-1", NULL, NULL,
+ TRUE, 'u', ARG_INT, 0.0, 0, NULL},
+ {"Size greater than/equal to to convert to unknown length gap", "-1", NULL, NULL,
+ TRUE, 'U', ARG_INT, 0.0, 0, NULL},
+ {"Exact size to convert to known length gap", "-1", NULL, NULL,
+ TRUE, 'k', ARG_INT, 0.0, 0, NULL},
+ {"Size greater than/equal to to convert to known length gap", "-1", NULL, NULL,
+ TRUE, 'K', ARG_INT, 0.0, 0, NULL},
+};
+
+Int2 Main(void)
+{
+ Char app [64];
+ CharPtr directory;
+ CharPtr ptr;
+ Char sfx [32];
+ OutputStreamData osd;
+ InputStreamData isd;
+ AsnStreamData asd;
+ Int4 gap_sizes[2];
+ Int4 rval = 0;
+ Int4 u_eq = 0, u_gteq = -1, k_eq = 0, k_gteq = -1;
+
+ /* standard setup */
+
+ ErrSetFatalLevel (SEV_MAX);
+ ErrClearOptFlags (EO_SHOW_USERSTR);
+ UseLocalAsnloadDataAndErrMsg ();
+ ErrPathReset ();
+
+ /* finish resolving internal connections in ASN.1 parse tables */
+
+ if (! AllObjLoad ()) {
+ Message (MSG_FATAL, "AllObjLoad failed");
+ return 1;
+ }
+ if (! SubmitAsnLoad ()) {
+ Message (MSG_FATAL, "SubmitAsnLoad failed");
+ return 1;
+ }
+ if (! FeatDefSetLoad ()) {
+ Message (MSG_FATAL, "FeatDefSetLoad failed");
+ return 1;
+ }
+ if (! SeqCodeSetLoad ()) {
+ Message (MSG_FATAL, "SeqCodeSetLoad failed");
+ return 1;
+ }
+ if (! GeneticCodeTableLoad ()) {
+ Message (MSG_FATAL, "GeneticCodeTableLoad failed");
+ return 1;
+ }
+
+ SetUpAsnStreamData (&asd);
+
+ /* initialize OuputStreamData */
+ MemSet (&osd, 0, sizeof (osd));
+
+ /* initialize InputStreamData */
+ MemSet (&isd, 0, sizeof (isd));
+
+ /* initialize gap_sizes */
+ gap_sizes[0] = 0;
+ gap_sizes[1] = 0;
+
+ /* process command line arguments */
+
+ sprintf (app, "raw2delt %s", RAW2DELT_APPLICATION);
+ if (! GetArgs (app, sizeof (myargs) / sizeof (Args), myargs)) {
+ return 0;
+ }
+
+ u_eq = (Int4) myargs [u_argEqUnknownGap].intvalue;
+ u_gteq = (Int4) myargs [U_argGTEqUnknownGap].intvalue;
+ k_eq = (Int4) myargs [k_argEqUnknownGap].intvalue;
+ k_gteq = (Int4) myargs [K_argGtEqUnknownGap].intvalue;
+
+ if (u_eq < 1 && u_gteq < 1 && k_eq < 1 && k_gteq < 1) {
+ Message (MSG_FATAL, "Must specify values for at least one of -u, -U, -k, -K");
+ return 1;
+ } else if (u_eq > -1 && u_gteq > -1) {
+ Message (MSG_FATAL, "May only specify value for -u or -U, not both");
+ return 1;
+ } else if (k_eq > -1 && k_gteq > -1) {
+ Message (MSG_FATAL, "May only specify value for -k or -K, not both");
+ return 1;
+ }
+
+ if (u_eq > 0) {
+ gap_sizes[0] = u_eq;
+ } else if (u_gteq > 0) {
+ gap_sizes[0] = 0 - u_gteq;
+ }
+
+ if (k_eq > 0) {
+ gap_sizes[1] = k_eq;
+ } else if (k_gteq > 0) {
+ gap_sizes[1] = 0 - k_gteq;
+ }
+
+ if (gap_sizes[0] == gap_sizes[1]) {
+ Message (MSG_FATAL, "Cannot specify the same size for known and unknown length gaps");
+ return 1;
+ }
+
+ directory = (CharPtr) myargs [p_argInputPath].strvalue;
+ osd.results_dir = (CharPtr) myargs [r_argOutputPath].strvalue;
+ if (StringHasNoText (osd.results_dir)) {
+ osd.results_dir = NULL;
+ }
+ osd.suffix = (CharPtr) myargs [x_argSuffix].strvalue;
+ osd.outsuffix = (CharPtr) myargs [s_argOutSuffix].strvalue;
+ osd.base = (CharPtr) myargs [i_argInputFile].strvalue;
+ osd.outfile = (CharPtr) myargs [o_argOutputFile].strvalue;
+ if (StringHasNoText (osd.outfile)) {
+ osd.outfile = NULL;
+ }
+ osd.is_binary = (Boolean) myargs [d_argOutputBinary].intvalue;
+
+ if (osd.base == "stdin") {
+ osd.base = NULL;
+ }
+
+ /* if we don't have an output directory or an output file, and the user hasn't provided an
+ * output suffix, add a default.
+ */
+ if (osd.results_dir == NULL && osd.outfile == NULL && StringHasNoText (osd.outsuffix)) {
+ osd.outsuffix = ".delta";
+ }
+
+ isd.is_binary = (Boolean) myargs [b_argInputBinary].intvalue;
+ isd.is_seqentry = (Boolean) myargs [e_argInputSeqEntry].intvalue;
+ isd.directory = directory;
+ isd.base = osd.base;
+ isd.suffix = osd.suffix;
+
+ if (StringDoesHaveText (osd.outfile)) {
+ osd.aip = AsnIoOpen (osd.outfile, "w");
+ if (osd.aip == NULL) {
+ Message (MSG_FATAL, "Unable to open output file");
+ return 1;
+ }
+ } else {
+ if (StringHasNoText (osd.results_dir)) {
+ osd.results_dir = directory;
+ }
+ /* if we're putting the results in a separate directory, strip the directory name from the output base */
+ if (!StringHasNoText (osd.results_dir) && !StringHasNoText (osd.base)) {
+#ifdef OS_MSWIN
+ ptr = StringRChr (osd.base, '\\');
+#else
+ ptr = StringRChr (osd.base, '/');
+#endif;
+ if (ptr != NULL) {
+ osd.base = ptr + 1;
+ }
+ }
+ }
+
+
+ if (StringHasNoText(directory) && StringHasNoText(osd.base)) {
+ rval = ProcessStream (&isd, &osd, &asd, gap_sizes);
+ } else if (StringDoesHaveText (osd.base)) {
+ ptr = StringRChr (osd.base, '.');
+ sfx[0] = '\0';
+ if (ptr != NULL) {
+ StringNCpy_0 (sfx, ptr, sizeof (sfx));
+ *ptr = '\0';
+ }
+ osd.suffix = sfx;
+ isd.suffix = sfx;
+ if (isd.is_binary) {
+ rval = ProcessStream (&isd, &osd, &asd, gap_sizes);
+ } else {
+ rval = ProcessOneRecord (directory, &osd, gap_sizes);
+ }
+ } else {
+
+ rval = FileRecurse (directory, &isd, &osd, &asd, gap_sizes);
+ }
+
+ if (osd.aip != NULL) {
+ AsnIoFlush (osd.aip);
+ AsnIoClose (osd.aip);
+ }
+ return rval;
+}
diff --git a/demo/seedtop.c b/demo/seedtop.c
index a6650d6e..556c857f 100644
--- a/demo/seedtop.c
+++ b/demo/seedtop.c
@@ -1,6 +1,6 @@
-static char const rcsid[] = "$Id: seedtop.c,v 6.18 2006/08/04 20:40:15 papadopo Exp $";
+static char const rcsid[] = "$Id: seedtop.c,v 6.19 2008/01/09 19:17:49 merezhuk Exp $";
-/* $Id: seedtop.c,v 6.18 2006/08/04 20:40:15 papadopo Exp $ */
+/* $Id: seedtop.c,v 6.19 2008/01/09 19:17:49 merezhuk Exp $ */
/**************************************************************************
* *
* COPYRIGHT NOTICE *
@@ -35,9 +35,12 @@ Maintainer: Alejandro Schaffer
Contents: main routine for pseed3, stand-alone counterpart to PHI-BLAST.
-$Revision: 6.18 $
+$Revision: 6.19 $
$Log: seedtop.c,v $
+Revision 6.19 2008/01/09 19:17:49 merezhuk
+-K option, extra hitArraySz parameter to get_a_pat call; print error if array size is not enough
+
Revision 6.18 2006/08/04 20:40:15 papadopo
allow filtering of query sequences
@@ -103,7 +106,7 @@ extern "C" {
#endif
-#define NUMARG 20
+#define NUMARG 21
static Args myargs [NUMARG] = {
{ "Database",
@@ -145,7 +148,10 @@ static Args myargs [NUMARG] = {
{ "Filter query sequence with SEG",
"F", NULL, NULL, FALSE, 'F', ARG_BOOLEAN, 0.0, 0, NULL},
{ "Force searching for patterns even if they are too likely",
- "F", NULL, NULL, FALSE, 'f', ARG_BOOLEAN, 0.0, 0, NULL}
+ "F", NULL, NULL, FALSE, 'f', ARG_BOOLEAN, 0.0, 0, NULL},
+ { "internal hit buffer size multiplier (default: 2 /query_length/ )",
+ "2", NULL, NULL, FALSE, 'K', ARG_INT, 0.0, 0, NULL},
+
};
@@ -200,6 +206,7 @@ Int2 Main(void)
BLAST_OptionsBlkPtr options; /*used as placeholder for fillCandLambda*/
ValNodePtr error_returns=NULL; /*store error messages*/
ValNodePtr info_vnp = NULL; /* store information messages */
+ Int4 hitArraySz = 0;
seedSearch = (seedSearchItems *) ckalloc(sizeof(seedSearchItems));
seedResults = (seedResultItems *) ckalloc(sizeof(seedResultItems));
@@ -343,9 +350,9 @@ Int2 Main(void)
num_seq = readdb_get_num_entries(rdpt);
dbLength = (Nlm_FloatHi) readdb_get_dblen(rdpt);
}
-
- occurArray = (Int4 *) ckalloc(sizeof(Int4)*queryLength*2);
- hitArray = (Int4 *) MemNew(sizeof(Int4)*queryLength*2);
+ hitArraySz = (Int4)(queryLength* myargs[20].intvalue);
+ occurArray = (Int4 *) ckalloc(sizeof(Int4)*hitArraySz);
+ hitArray = (Int4 *) MemNew(sizeof(Int4)*hitArraySz);
/* perform the search one pattern at a time */
while (pattern = get_a_pat(patfp, &pname, occurArray, hitArray,
@@ -353,7 +360,7 @@ Int2 Main(void)
program_flag, unfilter_query, query,
queryLength, is_dna,
patternSearch, seedSearch, TRUE,
- &error_returns, &info_vnp)) {
+ &error_returns, &info_vnp,hitArraySz)) {
PGPOutTextMessages(info_vnp, outfp);
info_vnp = ValNodeFreeData(info_vnp);
@@ -443,18 +450,25 @@ Int2 Main(void)
}
}
}
+ if( error_returns ) BlastErrorPrint(error_returns);
BLAST_ScoreBlkDestruct(sbp);
GapAlignBlkDelete(gap_align);
BLASTOptionDelete(options);
rdpt = readdb_destruct(rdpt);
+ /* */
MemFree(occurArray);
+
MemFree(hitArray);
+
MemFree(query);
MemFree(unfilter_query);
+
MemFree(seedSearch);
- MemFree(seedResults);
+
+ MemFree(seedResults);
MemFree(patternSearch);
+
FileClose(patfp);
FileClose(infp);
FreeArgs(NUMARG, myargs);
diff --git a/demo/tbl2asn.c b/demo/tbl2asn.c
index b2362ba9..2aae8664 100644
--- a/demo/tbl2asn.c
+++ b/demo/tbl2asn.c
@@ -29,7 +29,7 @@
*
* Version Creation Date: 5/5/00
*
-* $Revision: 6.199 $
+* $Revision: 6.223 $
*
* File Description:
*
@@ -68,50 +68,67 @@
#include <accpubseq.h>
#endif
-#define TBL2ASN_APP_VER "9.0"
+#define TBL2ASN_APP_VER "10.3"
CharPtr TBL2ASN_APPLICATION = TBL2ASN_APP_VER;
typedef struct tblargs {
- Boolean fastaset;
- Int2 whichclass;
- Boolean deltaset;
- Boolean alignset;
- Boolean gapped;
- Boolean phrapace;
- Boolean genprodset;
- Boolean linkbyoverlap;
- Boolean linkbyproduct;
- Boolean implicitgaps;
- Boolean forcelocalid;
- Boolean gpstonps;
- Boolean gnltonote;
- Boolean removeunnecxref;
- Boolean dotaxlookup;
- CharPtr accn;
- CharPtr center;
- CharPtr organism;
- CharPtr srcquals;
- CharPtr comment;
- CharPtr commentFile;
- CharPtr tableFile;
- Boolean findorf;
- Boolean runonorf;
- Boolean altstart;
- Boolean conflict;
- Boolean validate;
- Boolean flatfile;
- Boolean seqidfromfile;
- Boolean smartfeats;
- Boolean smarttitle;
- Boolean logtoterminal;
- CharPtr aln_beginning_gap;
- CharPtr aln_end_gap;
- CharPtr aln_middle_gap;
- CharPtr aln_missing;
- CharPtr aln_match;
- Boolean aln_is_protein;
- Boolean save_bioseq_set;
+ Boolean raw2delt;
+ Int2 r2dmin;
+ Boolean r2dunk100;
+ Boolean fastaset;
+ Int2 whichclass;
+ Boolean deltaset;
+ Boolean alignset;
+ Boolean gapped;
+ Boolean phrapace;
+ Boolean genprodset;
+ Boolean linkbyoverlap;
+ Boolean linkbyproduct;
+ Boolean implicitgaps;
+ Boolean forcelocalid;
+ Boolean gpstonps;
+ Boolean gnltonote;
+ Boolean removeunnecxref;
+ Boolean dotaxlookup;
+ Boolean dopublookup;
+ CharPtr accn;
+ CharPtr center;
+ CharPtr organism;
+ CharPtr srcquals;
+ CharPtr comment;
+ CharPtr commentFile;
+ CharPtr tableFile;
+ Boolean findorf;
+ Boolean runonorf;
+ Boolean altstart;
+ Boolean conflict;
+ Boolean validate;
+ Boolean relaxed;
+ Boolean discrepancy;
+ Boolean flatfile;
+ Boolean seqidfromfile;
+ Boolean smartfeats;
+ Boolean smarttitle;
+ Boolean logtoterminal;
+ CharPtr aln_beginning_gap;
+ CharPtr aln_end_gap;
+ CharPtr aln_middle_gap;
+ CharPtr aln_missing;
+ CharPtr aln_match;
+ Boolean aln_is_protein;
+ Boolean save_bioseq_set;
+ ValNodePtr locus_tag_list;
+ ValNodePtr missing_locus_tag;
+ ValNodePtr cds_product_list;
+ ValNodePtr missing_cds_product;
+ ValNodePtr mrna_product_list;
+ ValNodePtr missing_mrna_product;
+ ValNodePtr adjacent_locus_tag_disc_list;
+ ValNodePtr missing_gnl_list;
+ ValNodePtr gnl_list;
+ ValNodePtr discrepancy_list;
+ DiscReportOutputConfigData disc_rep_config;
} TblArgs, PNTR TblArgsPtr;
static FILE* OpenOneFile (
@@ -184,15 +201,87 @@ static void WriteOneFile (
AsnIoClose (aip);
}
+static CharPtr compatSeverityLabel [] = {
+ "NONE", "NOTE: valid", "WARNING: valid", "ERROR: valid", "REJECT: valid", "FATAL: valid", "MAX", NULL
+};
+
+static void LIBCALLBACK ValidCallback (
+ ErrSev severity,
+ int errcode,
+ int subcode,
+ Uint2 entityID,
+ Uint2 itemtype,
+ Uint4 itemID,
+ CharPtr accession,
+ CharPtr message,
+ CharPtr objtype,
+ CharPtr label,
+ CharPtr context,
+ CharPtr location,
+ CharPtr product,
+ Pointer userdata
+)
+
+{
+ CharPtr catname, errname;
+ FILE *fp;
+
+ fp = (FILE *) userdata;
+ if (fp == NULL) return;
+
+ if (severity < SEV_NONE || severity > SEV_MAX) {
+ severity = SEV_MAX;
+ }
+
+ catname = GetValidCategoryName (errcode);
+ errname = GetValidErrorName (errcode, subcode);
+
+ if (catname == NULL) {
+ catname = "?";
+ }
+ if (errname == NULL) {
+ errname = "?";
+ }
+
+ if (accession == NULL) {
+ accession = "";
+ }
+ if (message == NULL) {
+ message = "";
+ }
+ if (objtype == NULL) {
+ objtype = "";
+ }
+ if (label == NULL) {
+ label = "";
+ }
+
+ fprintf (fp, "%s [%s.%s] %s %s: %s",
+ compatSeverityLabel [severity],
+ catname, errname, message, objtype, label);
+ if (location != NULL) {
+ fprintf (fp, " %s", location);
+ }
+ if (context != NULL) {
+ fprintf (fp, " %s", context);
+ }
+ if (product != NULL) {
+ fprintf (fp, " -> %s", product);
+ }
+ fprintf (fp, "\n");
+}
+
static void ValidateOneFile (
CharPtr results,
CharPtr base,
CharPtr suffix,
- SeqEntryPtr sep
+ SeqEntryPtr sep,
+ Boolean relaxed
)
{
Char file [FILENAME_MAX], path [PATH_MAX];
+ FILE *ofp;
ErrSev oldErrSev;
ValidStructPtr vsp;
@@ -200,22 +289,24 @@ static void ValidateOneFile (
sprintf (file, "%s%s", base, suffix);
FileBuildPath (path, NULL, file);
- ErrSetOptFlags (EO_LOGTO_USRFILE);
- ErrSetLogfile (path, ELOG_APPEND | ELOG_NOCREATE);
-
vsp = ValidStructNew ();
if (vsp != NULL) {
vsp->useSeqMgrIndexes = TRUE;
vsp->suppressContext = TRUE;
vsp->seqSubmitParent = TRUE;
+ if (! relaxed) {
+ vsp->testLatLonSubregion = TRUE;
+ }
oldErrSev = ErrSetMessageLevel (SEV_NONE);
+ ofp = FileOpen (path, "w");
+ vsp->errfunc = ValidCallback;
+ vsp->userdata = (Pointer) ofp;
+ /* vsp->convertGiToAccn = FALSE; */
ValidateSeqEntry (sep, vsp);
ValidStructFree (vsp);
+ FileClose (ofp);
ErrSetMessageLevel (oldErrSev);
}
-
- ErrSetLogfile (NULL, ELOG_APPEND | ELOG_NOCREATE);
- ErrClearOptFlags (EO_LOGTO_USRFILE);
}
static void FlatfileOneFile (
@@ -873,6 +964,7 @@ static Int2 GetGenCodeForBsp (
typedef struct gcmdata {
SeqFeatPtr gene;
SeqFeatPtr feat;
+ CharPtr label;
} GmcData, PNTR GmcDataPtr;
static int LIBCALLBACK SortByGenePtr (
@@ -907,15 +999,20 @@ static void EnhanceOneCDS (
GBQualPtr gbq;
Char id [64];
SeqIdPtr ids, sip;
+ size_t len;
+ CharPtr name, nwstr, ptr, str;
ObjectIdPtr oip;
ProtRefPtr prp;
- CharPtr ptr, str;
Char tmp [256];
+ ValNodePtr vnp;
SeqFeatXrefPtr xref;
if (sfp == NULL || sfp->data.choice != SEQFEAT_CDREGION) return;
+ name = NULL;
+ vnp = NULL;
prp = NULL;
+
for (xref = sfp->xref; xref != NULL; xref = xref->next) {
if (xref->data.choice == SEQFEAT_PROT) {
prp = (ProtRefPtr) xref->data.value.ptrvalue;
@@ -943,10 +1040,44 @@ static void EnhanceOneCDS (
if (StringDoesHaveText (str)) {
if (prp != NULL && prp->name != NULL) {
+ vnp = prp->name;
+ name = (CharPtr) vnp->data.ptrvalue;
+ }
+ if (StringDoesHaveText (name) && vnp != NULL) {
if (alt_splice) {
- AddQualifierToFeature (sfp, "product", str);
+ ptr = StringChr (str, '-');
+ if (ptr != NULL && StringLen (ptr) == 3) {
+ ptr++;
+ ptr++;
+ sprintf (tmp, "%s, isoform %s", str, ptr);
+ len = StringLen (name) + StringLen (", ") + StringLen (tmp);
+ nwstr = (CharPtr) MemNew (sizeof (Char) * (len + 2));
+ if (nwstr != NULL) {
+ StringCpy (nwstr, name);
+ /*
+ StringCat (nwstr, ", ");
+ */
+ StringCat (nwstr, " ");
+ StringCat (nwstr, tmp);
+ vnp->data.ptrvalue = (Pointer) nwstr;
+ MemFree (name);
+ }
+ } else {
+ AddQualifierToFeature (sfp, "product", str);
+ }
} else {
- AddQualifierToFeature (sfp, "product", str);
+ len = StringLen (name) + StringLen (", ") + StringLen (str);
+ nwstr = (CharPtr) MemNew (sizeof (Char) * (len + 2));
+ if (nwstr != NULL) {
+ StringCpy (nwstr, name);
+ /*
+ StringCat (nwstr, ", ");
+ */
+ StringCat (nwstr, " ");
+ StringCat (nwstr, str);
+ vnp->data.ptrvalue = (Pointer) nwstr;
+ MemFree (name);
+ }
}
} else {
if (alt_splice) {
@@ -956,9 +1087,6 @@ static void EnhanceOneCDS (
ptr++;
sprintf (tmp, "%s, isoform %s", str, ptr);
AddQualifierToFeature (sfp, "product", tmp);
- /*
- AddQualifierToFeature (sfp, "product", str);
- */
} else {
AddQualifierToFeature (sfp, "product", str);
}
@@ -982,7 +1110,8 @@ static void EnhanceOneMrna (
GBQualPtr gbq;
Char id [64];
SeqIdPtr ids, sip;
- CharPtr name, ptr, str;
+ size_t len;
+ CharPtr name, nwstr, ptr, str;
ObjectIdPtr oip;
RnaRefPtr rrp;
Char tmp [256];
@@ -990,6 +1119,7 @@ static void EnhanceOneMrna (
if (sfp == NULL || sfp->data.choice != SEQFEAT_RNA) return;
name = NULL;
+
rrp = (RnaRefPtr) sfp->data.value.ptrvalue;
if (rrp != NULL && rrp->type == 2 && rrp->ext.choice == 1) {
name = rrp->ext.value.ptrvalue;
@@ -1015,11 +1145,41 @@ static void EnhanceOneMrna (
}
if (StringDoesHaveText (str)) {
- if (StringDoesHaveText (name)) {
+ if (StringDoesHaveText (name) && StringCmp (str, name) != 0) {
if (alt_splice) {
- AddQualifierToFeature (sfp, "note", str);
+ ptr = StringChr (str, '-');
+ if (ptr != NULL && StringLen (ptr) == 3) {
+ ptr++;
+ ptr++;
+ sprintf (tmp, "%s, transcript variant %s", str, ptr);
+ len = StringLen (name) + StringLen (", ") + StringLen (tmp);
+ nwstr = (CharPtr) MemNew (sizeof (Char) * (len + 2));
+ if (nwstr != NULL) {
+ StringCpy (nwstr, name);
+ /*
+ StringCat (nwstr, ", ");
+ */
+ StringCat (nwstr, " ");
+ StringCat (nwstr, tmp);
+ rrp->ext.value.ptrvalue = (Pointer) nwstr;
+ MemFree (name);
+ }
+ } else {
+ AddQualifierToFeature (sfp, "product", str);
+ }
} else {
- AddQualifierToFeature (sfp, "note", str);
+ len = StringLen (name) + StringLen (", ") + StringLen (str);
+ nwstr = (CharPtr) MemNew (sizeof (Char) * (len + 2));
+ if (nwstr != NULL) {
+ StringCpy (nwstr, name);
+ /*
+ StringCat (nwstr, ", ");
+ */
+ StringCat (nwstr, " ");
+ StringCat (nwstr, str);
+ rrp->ext.value.ptrvalue = (Pointer) nwstr;
+ MemFree (name);
+ }
}
} else {
if (alt_splice) {
@@ -1029,9 +1189,6 @@ static void EnhanceOneMrna (
ptr++;
sprintf (tmp, "%s, transcript variant %s", str, ptr);
AddQualifierToFeature (sfp, "product", tmp);
- /*
- AddQualifierToFeature (sfp, "note", str);
- */
} else {
AddQualifierToFeature (sfp, "product", str);
}
@@ -1200,6 +1357,7 @@ static BioseqPtr AttachSeqAnnotEntity (
}
PromoteXrefsExEx (sfp, bsp, entityID, TRUE, FALSE, tbl->genprodset, tbl->forcelocalid);
+ sep = GetTopSeqEntryForEntityID (entityID);
}
} else {
buf [0] = '\0';
@@ -1217,6 +1375,7 @@ static BioseqPtr AttachSeqAnnotEntity (
}
Message (MSG_POSTERR, "Feature table identifiers %s do not match record", buf);
}
+ sep = GetTopSeqEntryForEntityID (entityID);
return bsp;
}
@@ -1391,15 +1550,17 @@ static void ProcessOneNuc (
{
Boolean addNewBiop = TRUE;
+ Boolean addNewMip = TRUE;
BioSourcePtr biop = NULL;
SeqFeatPtr cds;
GBBlockPtr gbp;
Int2 genCode;
size_t len;
- MolInfoPtr mip;
+ MolInfoPtr mip = NULL;
Boolean mito;
OrgNamePtr onp;
OrgRefPtr orp;
+ SeqDescrPtr sdp;
SeqHistPtr shp;
SqnTagPtr stp = NULL;
CharPtr str;
@@ -1463,44 +1624,52 @@ static void ProcessOneNuc (
AddMissingSourceInfo (biop);
}
- if (BioseqGetSeqDescr (bsp, Seq_descr_molinfo, NULL) == NULL) {
+ sdp = BioseqGetSeqDescr (bsp, Seq_descr_molinfo, NULL);
+ if (sdp != NULL && sdp->choice == Seq_descr_molinfo) {
+ mip = (MolInfoPtr) sdp->data.ptrvalue;
+ addNewMip = FALSE;
+ } else {
mip = MolInfoNew ();
- if (mip != NULL) {
- if (stp != NULL) {
- mip = ParseTitleIntoMolInfo (stp, mip);
- }
- if (mip->biomol == 0 && template_molinfo != NULL)
- {
- mip->biomol = template_molinfo->biomol;
- }
- if (mip->biomol == 0) {
- mip->biomol = MOLECULE_TYPE_GENOMIC;
- }
+ }
+ if (mip != NULL) {
+ if (stp != NULL) {
+ mip = ParseTitleIntoMolInfo (stp, mip);
+ }
+ if (mip->biomol == 0 && template_molinfo != NULL)
+ {
+ mip->biomol = template_molinfo->biomol;
+ }
+ if (mip->biomol == 0) {
+ mip->biomol = MOLECULE_TYPE_GENOMIC;
+ }
+ if (addNewMip) {
SeqDescrAddPointer (&(bsp->descr), Seq_descr_molinfo, (Pointer) mip);
- switch (mip->biomol) {
- case MOLECULE_TYPE_PRE_MRNA :
- case MOLECULE_TYPE_MRNA :
- case MOLECULE_TYPE_RRNA :
- case MOLECULE_TYPE_TRNA :
- case MOLECULE_TYPE_SNRNA :
- case MOLECULE_TYPE_SCRNA :
- case MOLECULE_TYPE_CRNA :
- case MOLECULE_TYPE_SNORNA :
- case MOLECULE_TYPE_TRANSCRIBED_RNA :
- if (bsp->mol == Seq_mol_dna) {
- str = SqnTagFind (stp, "molecule");
- if (str == NULL) {
- str = SqnTagFind (stp, "mol");
- }
- if (str != NULL) {
- if (StringICmp (str, "dna") == 0) break;
- }
- bsp->mol = Seq_mol_rna;
+ }
+ switch (mip->biomol) {
+ case MOLECULE_TYPE_PRE_MRNA :
+ case MOLECULE_TYPE_MRNA :
+ case MOLECULE_TYPE_RRNA :
+ case MOLECULE_TYPE_TRNA :
+ case MOLECULE_TYPE_SNRNA :
+ case MOLECULE_TYPE_SCRNA :
+ case MOLECULE_TYPE_CRNA :
+ case MOLECULE_TYPE_SNORNA :
+ case MOLECULE_TYPE_TRANSCRIBED_RNA :
+ case MOLECULE_TYPE_NCRNA :
+ case MOLECULE_TYPE_TMRNA :
+ if (bsp->mol == Seq_mol_dna) {
+ str = SqnTagFind (stp, "molecule");
+ if (str == NULL) {
+ str = SqnTagFind (stp, "mol");
}
- break;
- default :
- break;
- }
+ if (str != NULL) {
+ if (StringICmp (str, "dna") == 0) break;
+ }
+ bsp->mol = Seq_mol_rna;
+ }
+ break;
+ default :
+ break;
}
}
@@ -1598,12 +1767,15 @@ static void ProcessOneAnnot (
BioseqPtr bsp;
Int2 genCode;
SeqFeatPtr sfp;
+ SeqEntryPtr sep;
if (sap == NULL || tbl == NULL) return;
bsp = AttachSeqAnnotEntity (entityID, sap, tbl);
if (bsp == NULL) return;
+ sep = GetTopSeqEntryForEntityID (entityID);
+
/* correct all idx parent pointers */
AssignIDsInEntity (entityID, 0, NULL);
@@ -1621,6 +1793,7 @@ static void ProcessOneAnnot (
PromoteXrefsExEx (sfp, bsp, entityID, TRUE, FALSE, tbl->genprodset, tbl->forcelocalid);
}
}
+ sep = GetTopSeqEntryForEntityID (entityID);
}
static void UpdateException (
@@ -2039,6 +2212,96 @@ static Uint2 ProcessOneAsn (
return entityID;
}
+static Uint2 ProcessRaw2Delt (
+ FILE* fp,
+ BioSourcePtr src,
+ TblArgsPtr tbl,
+ CharPtr localname,
+ SeqEntryPtr gsep,
+ MolInfoPtr template_molinfo
+)
+
+{
+ BioseqPtr bsp = NULL;
+ BioseqSetPtr bssp;
+ Pointer dataptr;
+ Uint2 datatype, entityID;
+ Int4 gap_sizes [2];
+ ObjMgrDataPtr omdptop;
+ ObjMgrData omdata;
+ Uint2 parenttype;
+ Pointer parentptr;
+ SeqEntryPtr sep;
+ SeqIdPtr sip;
+
+ if (fp == NULL) return 0;
+
+ if (gsep != NULL) {
+ bssp = (BioseqSetPtr) gsep->data.ptrvalue;
+ if (bssp == NULL) return 0;
+
+ SaveSeqEntryObjMgrData (gsep, &omdptop, &omdata);
+ GetSeqEntryParent (gsep, &parentptr, &parenttype);
+
+ dataptr = ReadAsnFastaOrFlatFile (fp, &datatype, NULL, TRUE, FALSE, TRUE, FALSE);
+ if (datatype == OBJ_BIOSEQ) {
+ bssp->seq_set = SeqMgrGetSeqEntryForData (dataptr);
+ SeqMgrSeqEntry (SM_BIOSEQ, (Pointer) dataptr, gsep);
+ } else if (datatype == OBJ_BIOSEQSET) {
+ bssp->seq_set = SeqMgrGetSeqEntryForData (dataptr);
+ SeqMgrSeqEntry (SM_BIOSEQSET, (Pointer) dataptr, gsep);
+ } else if (datatype == OBJ_SEQENTRY) {
+ sep = (SeqEntryPtr) dataptr;
+ bssp->seq_set = sep;
+ if (IS_Bioseq (sep)) {
+ SeqMgrSeqEntry (SM_BIOSEQ, (Pointer) sep->data.ptrvalue, gsep);
+ } else if (IS_Bioseq_set (sep)) {
+ SeqMgrSeqEntry (SM_BIOSEQSET, (Pointer) sep->data.ptrvalue, gsep);
+ } else return 0;
+ } else return 0;
+
+ SeqMgrLinkSeqEntry (gsep, parenttype, parentptr);
+ RestoreSeqEntryObjMgrData (gsep, omdptop, &omdata);
+
+ entityID = ObjMgrRegister (OBJ_BIOSEQSET, (Pointer) bssp);
+ } else {
+ dataptr = ReadAsnFastaOrFlatFile (fp, &datatype, &entityID, TRUE, FALSE, TRUE, FALSE);
+ }
+ if (dataptr == NULL) return 0;
+
+ sep = GetTopSeqEntryForEntityID (entityID);
+ bsp = FindNucBioseq (sep);
+ if (bsp == NULL) {
+ ObjMgrFreeByEntityID (entityID);
+ return 0;
+ }
+
+ if (StringDoesHaveText (localname)) {
+ sip = MakeSeqID (localname);
+ if (sip != NULL) {
+ bsp->id = SeqIdSetFree (bsp->id);
+ bsp->id = sip;
+ SeqMgrReplaceInBioseqIndex (bsp);
+ VisitFeaturesOnBsp (bsp, (Pointer) bsp->id, CorrectFeatureSeqIds);
+ }
+ }
+
+ if (bsp->repr == Seq_repr_raw) {
+ if (tbl->r2dunk100) {
+ gap_sizes [0] = 100;
+ } else {
+ gap_sizes [0] = 0;
+ }
+ gap_sizes [1] = -(tbl->r2dmin);
+
+ ConvertNsToGaps (bsp, gap_sizes);
+ }
+
+ ProcessOneNuc (entityID, bsp, src, tbl, template_molinfo);
+
+ return entityID;
+}
+
static Uint2 ProcessGappedSet (
FILE* fp,
BioSourcePtr src,
@@ -3789,8 +4052,41 @@ static void RemoveUnnecGeneXref (
}
}
+static CharPtr RnaTypeLabel (
+ SeqFeatPtr rna
+)
+
+{
+ if (rna == NULL) return "RNA";
+ switch (rna->idx.subtype) {
+ case FEATDEF_preRNA :
+ return "preRNA";
+ case FEATDEF_mRNA :
+ return "mRNA";
+ case FEATDEF_tRNA :
+ return "tRNA";
+ case FEATDEF_rRNA :
+ return "rRNA";
+ case FEATDEF_snRNA :
+ return "snRNA";
+ case FEATDEF_scRNA :
+ return "scRNA";
+ case FEATDEF_otherRNA :
+ return "otherRNA";
+ case FEATDEF_snoRNA :
+ return "snoRNA";
+ case FEATDEF_ncRNA :
+ return "ncRNA";
+ case FEATDEF_tmRNA :
+ return "tmRNA";
+ default :
+ break;
+ }
+ return "RNA";
+}
+
static void AddMrnaTitles (
- SeqLocPtr slp,
+ SeqFeatPtr rna,
CharPtr organism
)
@@ -3803,9 +4099,10 @@ static void AddMrnaTitles (
size_t len;
SeqFeatPtr sfp;
CharPtr str;
+ CharPtr typ = NULL;
- if (slp == NULL) return;
- bsp = BioseqFindFromSeqLoc (slp);
+ if (rna == NULL || rna->product == NULL) return;
+ bsp = BioseqFindFromSeqLoc (rna->product);
if (bsp == NULL) return;
if (! ISA_na (bsp->mol)) return;
if (BioseqGetTitle (bsp) != NULL) return;
@@ -3823,8 +4120,9 @@ static void AddMrnaTitles (
cdslabel = NULL;
}
}
+ typ = RnaTypeLabel (rna);
len = StringLen (organism) + StringLen (genelabel) + StringLen (cdslabel) +
- StringLen (" mRNA, complete cds.") + 10;
+ StringLen (" mRNA, complete cds.") + StringLen (typ) + 10;
str = (CharPtr) MemNew (len * sizeof (Char));
if (str == NULL) return;
str [0] = '\0';
@@ -3842,20 +4140,25 @@ static void AddMrnaTitles (
StringCat (str, ")");
}
if (cdslabel != NULL && genelabel != NULL) {
+ StringCat (str, " ");
+ StringCat (str, typ);
if (ccontext.partialL || ccontext.partialR) {
- StringCat (str, " mRNA, partial cds.");
+ StringCat (str, ", partial cds.");
} else {
- StringCat (str, " mRNA, complete cds.");
+ StringCat (str, ", complete cds.");
}
} else if (genelabel != NULL) {
- StringCat (str, " mRNA.");
+ StringCat (str, " ");
+ StringCat (str, typ);
+ StringCat (str, ".");
}
SeqDescrAddPointer (&(bsp->descr), Seq_descr_title, (Pointer) str);
}
static void MakeOneMrnaTitle (
- SeqFeatPtr mrna,
+ SeqFeatPtr rna,
SeqFeatPtr gene,
+ CharPtr label,
CharPtr organism,
Boolean alt_splice
)
@@ -3864,36 +4167,35 @@ static void MakeOneMrnaTitle (
BioseqPtr bsp;
SeqMgrFeatContext ccontext;
SeqFeatPtr cds;
- CharPtr cdslabel = NULL;
GeneRefPtr grp;
Char id [64];
+ CharPtr lbl = NULL;
size_t len;
+ CharPtr ptr;
CharPtr str;
+ CharPtr typ = NULL;
- if (mrna == NULL || mrna->product == NULL) return;
+ if (rna == NULL || rna->product == NULL) return;
- grp = SeqMgrGetGeneXref (mrna);
+ grp = SeqMgrGetGeneXref (rna);
if (SeqMgrGeneIsSuppressed (grp)) return;
if (grp == NULL && gene != NULL) {
grp = (GeneRefPtr) gene->data.value.ptrvalue;
}
if (grp == NULL) return;
- bsp = BioseqFindFromSeqLoc (mrna->product);
+ bsp = BioseqFindFromSeqLoc (rna->product);
if (bsp == NULL) return;
SeqIdWrite (bsp->id, id, PRINTID_TEXTID_ACC_VER, sizeof (id) - 1);
+ typ = RnaTypeLabel (rna);
+ lbl = StringSaveNoNull (label);
+
cds = SeqMgrGetNextFeature (bsp, NULL, SEQFEAT_CDREGION, 0, &ccontext);
- if (cds != NULL) {
- cdslabel = ccontext.label;
- if (StringHasNoText (cdslabel)) {
- cdslabel = NULL;
- }
- }
len = StringLen (organism) + StringLen (grp->locus_tag) + StringLen (grp->locus) +
- StringLen (id) + StringLen (" transcript variant") + StringLen (cdslabel) +
- StringLen (" mRNA, complete cds.") + 20;
+ StringLen (id) + StringLen (" transcript variant") + StringLen (lbl) +
+ StringLen (" mRNA, complete cds.") + StringLen (typ) + 20;
str = (CharPtr) MemNew (len * sizeof (Char));
if (str == NULL) return;
str [0] = '\0';
@@ -3901,33 +4203,44 @@ static void MakeOneMrnaTitle (
if (StringDoesHaveText (organism)) {
StringCat (str, organism);
}
- if (cdslabel != NULL) {
+ if (lbl != NULL) {
StringCat (str, " ");
- StringCat (str, cdslabel);
+ ptr = StringStr (lbl, ", transcript variant ");
+ if (ptr != NULL) {
+ *ptr = '\0';
+ ptr += 2;
+ StringCat (str, lbl);
+ if (StringDoesHaveText (grp->locus)) {
+ StringCat (str, " (");
+ StringCat (str, grp->locus);
+ StringCat (str, ")");
+ }
+ StringCat (str, " ");
+ StringCat (str, ptr);
+ } else {
+ StringCat (str, lbl);
+ if (StringDoesHaveText (grp->locus)) {
+ StringCat (str, " (");
+ StringCat (str, grp->locus);
+ StringCat (str, ")");
+ }
+ }
}
- if (StringDoesHaveText (grp->locus_tag)) {
+ if (cds != NULL) {
StringCat (str, " ");
- StringCat (str, grp->locus_tag);
- }
- if (StringDoesHaveText (grp->locus)) {
- StringCat (str, " (");
- StringCat (str, grp->locus);
- StringCat (str, ")");
- }
- if (alt_splice && StringDoesHaveText (id)) {
- StringCat (str, " transcript variant ");
- StringCat (str, id);
- }
- if (cdslabel != NULL) {
+ StringCat (str, typ);
if (ccontext.partialL || ccontext.partialR) {
- StringCat (str, " mRNA, partial cds.");
+ StringCat (str, ", partial cds.");
} else {
- StringCat (str, " mRNA, complete cds.");
+ StringCat (str, ", complete cds.");
}
} else {
- StringCat (str, " mRNA.");
+ StringCat (str, " ");
+ StringCat (str, typ);
+ StringCat (str, ".");
}
SeqDescrAddPointer (&(bsp->descr), Seq_descr_title, (Pointer) str);
+ MemFree (lbl);
}
static void MakeSmartMrnaTitles (
@@ -3937,10 +4250,10 @@ static void MakeSmartMrnaTitles (
{
SeqMgrFeatContext context;
- GmcDataPtr gdp, head;
- GeneRefPtr grp;
- Int2 i, j, k, numgene, nummrna;
- SeqFeatPtr sfp;
+ GmcDataPtr gdp, head;
+ GeneRefPtr grp;
+ Int2 i, j, k, numgene, nummrna;
+ SeqFeatPtr sfp;
if (bsp == NULL) return;
@@ -3949,11 +4262,11 @@ static void MakeSmartMrnaTitles (
sfp = SeqMgrGetNextFeature (bsp, NULL, 0, 0, &context);
while (sfp != NULL) {
- switch (sfp->idx.subtype) {
- case FEATDEF_GENE :
+ switch (sfp->data.choice) {
+ case SEQFEAT_GENE :
numgene++;
break;
- case FEATDEF_mRNA :
+ case SEQFEAT_RNA :
nummrna++;
break;
default :
@@ -3968,17 +4281,18 @@ static void MakeSmartMrnaTitles (
head = (GmcDataPtr) MemNew (sizeof (GmcData) * (size_t) (nummrna + 1));
if (head != NULL) {
gdp = head;
- sfp = SeqMgrGetNextFeature (bsp, NULL, 0, FEATDEF_mRNA, &context);
+ sfp = SeqMgrGetNextFeature (bsp, NULL, SEQFEAT_RNA, 0, &context);
while (sfp != NULL) {
- if (sfp->idx.subtype == FEATDEF_mRNA) {
+ if (sfp->product != NULL) {
gdp->feat = sfp;
+ gdp->label = context.label;
grp = SeqMgrGetGeneXref (sfp);
if (grp == NULL || (! SeqMgrGeneIsSuppressed (grp))) {
gdp->gene = SeqMgrGetOverlappingGene (sfp->location, NULL);
}
gdp++;
}
- sfp = SeqMgrGetNextFeature (bsp, sfp, 0, FEATDEF_mRNA, &context);
+ sfp = SeqMgrGetNextFeature (bsp, sfp, SEQFEAT_RNA, 0, &context);
}
HeapSort (head, (size_t) nummrna, sizeof (GmcData), SortByGenePtr);
for (i = 0; i < nummrna; i += j) {
@@ -3986,11 +4300,11 @@ static void MakeSmartMrnaTitles (
for (j = 1; i + j < nummrna && sfp == head [i + j].gene; j++) continue;
if (j == 1) {
/* no alt splicing */
- MakeOneMrnaTitle (head [i].feat, head [i].gene, organism, FALSE);
+ MakeOneMrnaTitle (head [i].feat, head [i].gene, head [i].label, organism, FALSE);
} else {
/* is alt splicing */
for (k = 0; k < j; k++) {
- MakeOneMrnaTitle (head [i + k].feat, head [i].gene, organism, TRUE);
+ MakeOneMrnaTitle (head [i + k].feat, head [i + k].gene, head [i + k].label, organism, TRUE);
}
}
}
@@ -4605,6 +4919,245 @@ static void ConvertStructuredComment (
sdp->data.ptrvalue = uop;
}
+static void CleanUpLatLonAndCountry (
+ BioSourcePtr biop,
+ Pointer userdata
+)
+
+{
+ CharPtr fix_lat_lon;
+ Boolean format_ok = FALSE;
+ CharPtr lat_lon = NULL;
+ Boolean lat_in_range = FALSE;
+ Boolean lon_in_range = FALSE;
+ CharPtr PNTR list;
+ CharPtr new_country;
+ SubSourcePtr ssp;
+
+ if (biop == NULL) return;
+ list = (CharPtr PNTR) userdata;
+ if (list == NULL) return;
+
+ for (ssp = biop->subtype; ssp != NULL; ssp = ssp->next) {
+ if (ssp->subtype == SUBSRC_country && StringDoesHaveText (ssp->name)) {
+ new_country = GetCountryFix (ssp->name, list);
+ if (new_country != NULL) {
+ ssp->name = MemFree (ssp->name);
+ ssp->name = new_country;
+ }
+ } else if (ssp->subtype == SUBSRC_lat_lon && StringDoesHaveText (ssp->name)) {
+ lat_lon = ssp->name;
+ IsCorrectLatLonFormat (lat_lon, &format_ok, &lat_in_range, &lon_in_range);
+ if (! format_ok) {
+ fix_lat_lon = FixLatLonFormat (lat_lon);
+ if (fix_lat_lon != NULL) {
+ ssp->name = MemFree (ssp->name);
+ ssp->name = fix_lat_lon;
+ }
+ }
+ }
+ }
+}
+
+static void LookupPubdesc (
+ PubdescPtr pdp,
+ Pointer userdata
+)
+
+{
+ CitArtPtr cap;
+ MedlineEntryPtr mep;
+ PubmedEntryPtr pep;
+ Int4 pmid = 0;
+ ValNodePtr vnp;
+
+ if (pdp == NULL) return;
+
+ for (vnp = pdp->pub; vnp != NULL; vnp = vnp->next) {
+ switch (vnp->choice) {
+ case PUB_Muid :
+ /* ignore obsolete muids */
+ break;
+ case PUB_PMid :
+ pmid = vnp->data.intvalue;
+ break;
+ default :
+ /* return on real pub */
+ return;
+ break;
+ }
+ }
+
+ if (pmid == 0) return;
+
+ pep = GetPubMedForUid (pmid);
+ if (pep == NULL) return;
+ mep = (MedlineEntryPtr) pep->medent;
+ if (mep != NULL && mep->cit != NULL) {
+ cap = AsnIoMemCopy ((Pointer) mep->cit,
+ (AsnReadFunc) CitArtAsnRead,
+ (AsnWriteFunc) CitArtAsnWrite);
+ ValNodeAddPointer (&(pdp->pub), PUB_Article, (Pointer) cap);
+ }
+
+ PubmedEntryFree (pep);
+}
+
+
+typedef struct globaldiscrepancylists {
+ ValNodePtr locus_tag_list;
+ ValNodePtr missing_locus_tag;
+} GlobalDiscrepancyListsData, PNTR GlobalDiscrepancyListPtr;
+
+static void CollectGlobalDiscrepancyData (
+ SeqFeatPtr sfp,
+ Pointer userdata
+)
+
+{
+ GeneRefPtr grp;
+ GlobalDiscrepancyListPtr tbl;
+
+ if (sfp == NULL || sfp->idx.subtype != FEATDEF_GENE) return;
+ tbl = (GlobalDiscrepancyListPtr) userdata;
+ if (tbl == NULL) return;
+
+ grp = (GeneRefPtr) sfp->data.value.ptrvalue;
+ if (grp != NULL) {
+ if (grp->pseudo) return;
+ if (StringDoesHaveText (grp->locus_tag)) {
+ ValNodeAddPointer (&(tbl->locus_tag_list), 0,
+ GlobalDiscrepancyNew (grp->locus_tag, OBJ_SEQFEAT, sfp));
+ } else {
+ ValNodeAddPointer (&(tbl->missing_locus_tag), 0,
+ GlobalDiscrepancyNew (NULL, OBJ_SEQFEAT, sfp));
+ }
+ }
+}
+
+
+static void SaveStringsForDiscrepancyItemList (ValNodePtr list, Boolean use_feature_fmt);
+
+static void SaveStringsForDiscrepancyItems (ClickableItemPtr cip, Boolean use_feature_fmt)
+{
+ ValNodePtr vnp, list_copy;
+ CharPtr str;
+
+ if (cip == NULL) return;
+ if (use_feature_fmt) {
+ list_copy = ReplaceDiscrepancyItemWithFeatureTableStrings (cip->item_list);
+ cip->item_list = ValNodeFree (cip->item_list);
+ cip->item_list = list_copy;
+ } else {
+ for (vnp = cip->item_list; vnp != NULL; vnp = vnp->next) {
+ str = GetDiscrepancyItemText (vnp);
+ vnp->choice = 0;
+ vnp->data.ptrvalue = str;
+ }
+ }
+ SaveStringsForDiscrepancyItemList (cip->subcategories, use_feature_fmt);
+}
+
+
+static void SaveStringsForDiscrepancyItemList (ValNodePtr list, Boolean use_feature_fmt)
+{
+ while (list != NULL) {
+ SaveStringsForDiscrepancyItems (list->data.ptrvalue, use_feature_fmt);
+ list = list->next;
+ }
+}
+
+
+#ifdef INTERNAL_NCBI_ASNDISC
+const PerformDiscrepancyTest taxlookup = CheckTaxNamesAgainstTaxDatabase;
+#else
+const PerformDiscrepancyTest taxlookup = NULL;
+#endif
+
+
+static void DiscrepancyReportOneRecord (TblArgsPtr tbl, SeqEntryPtr sep)
+{
+ ClickableItemPtr adjacent_cip = NULL;
+ ValNode sep_list;
+ ValNodePtr local_discrepancy_list = NULL;
+ Uint2 entityID;
+ DiscrepancyConfigData dcd;
+ GlobalDiscrepancyListsData lists;
+ GenProdSetDiscrepancyListsData gps_lists;
+ ProtIdListsData prot_lists;
+ Int4 k;
+
+ if (tbl == NULL || sep == NULL) return;
+
+ entityID = SeqMgrGetEntityIDForSeqEntry (sep);
+ if (SeqMgrFeaturesAreIndexed (entityID) == 0) {
+ SeqMgrIndexFeatures (entityID, NULL);
+ }
+
+ MemSet (&lists, 0, sizeof (GlobalDiscrepancyListsData));
+ VisitGenProdSetFeatures (sep, &lists, CollectGlobalDiscrepancyData);
+ MemSet (&gps_lists, 0, sizeof (GenProdSetDiscrepancyListsData));
+ CheckGenProdSetsInSeqEntry (sep, &gps_lists);
+ MemSet (&prot_lists, 0, sizeof (ProtIdListsData));
+ VisitBioseqsInSep (sep, &prot_lists, FindProteinIDCallback);
+
+ if (lists.locus_tag_list != NULL) {
+ /* collect adjacent genes */
+ lists.locus_tag_list = ValNodeSort (lists.locus_tag_list, SortVnpByGlobalDiscrepancyString);
+ adjacent_cip = FindAdjacentDuplicateLocusTagGenes (lists.locus_tag_list);
+ if (adjacent_cip != NULL) {
+ SaveStringsForDiscrepancyItems (adjacent_cip, tbl->disc_rep_config.use_feature_table_format);
+ ValNodeAddPointer (&(tbl->adjacent_locus_tag_disc_list), 0, adjacent_cip);
+ }
+ }
+
+ /* convert lists to strings and add to global lists */
+ ConvertGlobalDiscrepancyListToText (lists.locus_tag_list, tbl->disc_rep_config.use_feature_table_format);
+ ValNodeLink (&(tbl->locus_tag_list), lists.locus_tag_list);
+ ConvertGlobalDiscrepancyListToText (lists.missing_locus_tag, tbl->disc_rep_config.use_feature_table_format);
+ ValNodeLink (&(tbl->missing_locus_tag), lists.missing_locus_tag);
+ ConvertGlobalDiscrepancyListToText (gps_lists.cds_product_list, tbl->disc_rep_config.use_feature_table_format);
+ ValNodeLink (&(tbl->cds_product_list), gps_lists.cds_product_list);
+ ConvertGlobalDiscrepancyListToText (gps_lists.missing_protein_id, tbl->disc_rep_config.use_feature_table_format);
+ ValNodeLink (&(tbl->missing_cds_product), gps_lists.missing_protein_id);
+ ConvertGlobalDiscrepancyListToText (gps_lists.mrna_product_list, tbl->disc_rep_config.use_feature_table_format);
+ ValNodeLink (&(tbl->mrna_product_list), gps_lists.mrna_product_list);
+ ConvertGlobalDiscrepancyListToText (gps_lists.missing_mrna_product, tbl->disc_rep_config.use_feature_table_format);
+ ValNodeLink (&(tbl->missing_mrna_product), gps_lists.missing_mrna_product);
+ ConvertGlobalDiscrepancyListToText (prot_lists.gnl_list, tbl->disc_rep_config.use_feature_table_format);
+ ValNodeLink (&tbl->gnl_list, prot_lists.gnl_list);
+ ConvertGlobalDiscrepancyListToText (prot_lists.missing_gnl_list, tbl->disc_rep_config.use_feature_table_format);
+ ValNodeLink (&tbl->missing_gnl_list, prot_lists.missing_gnl_list);
+
+ /* setup discrepancy report config */
+ MemSet (&dcd, 0, sizeof (DiscrepancyConfigData));
+ /* enable all tests except tRNA */
+ for (k = 0; k < MAX_DISC_TYPE; k++) {
+ dcd.conf_list[k] = TRUE;
+ }
+ DisableTRNATests (&(dcd));
+ /* disable tests that are global */
+ dcd.conf_list[DISC_GENE_MISSING_LOCUS_TAG] = FALSE;
+ dcd.conf_list[DISC_GENE_DUPLICATE_LOCUS_TAG] = FALSE;
+ dcd.conf_list[DISC_GENE_LOCUS_TAG_BAD_FORMAT] = FALSE;
+ dcd.conf_list[DISC_GENE_LOCUS_TAG_INCONSISTENT_PREFIX] = FALSE;
+ dcd.conf_list[DISC_MISSING_GENPRODSET_PROTEIN] = FALSE;
+ dcd.conf_list[DISC_DUP_GENPRODSET_PROTEIN] = FALSE;
+ dcd.conf_list[DISC_MISSING_GENPRODSET_TRANSCRIPT_ID] = FALSE;
+ dcd.conf_list[DISC_DUP_GENPRODSET_TRANSCRIPT_ID] = FALSE;
+ dcd.conf_list[DISC_MISSING_PROTEIN_ID] = FALSE;
+ dcd.conf_list[DISC_INCONSISTENT_PROTEIN_ID_PREFIX] = FALSE;
+
+ sep_list.data.ptrvalue = sep;
+ sep_list.next = NULL;
+ local_discrepancy_list = CollectDiscrepancies (&dcd, &sep_list, taxlookup);
+
+ SaveStringsForDiscrepancyItemList (local_discrepancy_list, tbl->disc_rep_config.use_feature_table_format);
+ ValNodeLink (&(tbl->discrepancy_list), local_discrepancy_list);
+
+}
+
+
static void ProcessOneRecord (
SubmitBlockPtr sbp,
PubdescPtr pdp,
@@ -4641,6 +5194,7 @@ static void ProcessOneRecord (
Boolean has_create_date;
SeqGraphPtr lastsgp;
Int4 linenum = 0;
+ CharPtr PNTR list;
CharPtr localname = NULL;
MolInfoPtr mip;
ErrSev msev;
@@ -4712,6 +5266,8 @@ static void ProcessOneRecord (
entityID = ProcessGappedSet (fp, src, tbl, gsep, template_molinfo);
} else if (tbl->phrapace) {
entityID = ProcessPhrapAce (fp, src, tbl, localname, gsep, template_molinfo, directory, base);
+ } else if (tbl->raw2delt) {
+ entityID = ProcessRaw2Delt (fp, src, tbl, localname, gsep, template_molinfo);
} else {
entityID = ProcessOneAsn (fp, src, tbl, localname, gsep, template_molinfo);
}
@@ -4719,6 +5275,26 @@ static void ProcessOneRecord (
if (entityID == 0) return;
+ if (tbl->dotaxlookup) {
+ sep = GetTopSeqEntryForEntityID (entityID);
+ if (sep != NULL) {
+
+ /* optionally do network taxonomy lookup - prior to instantiating mRNA and protein titles */
+
+ Taxon3ReplaceOrgInSeqEntry (sep, FALSE);
+ }
+ }
+
+ if (tbl->dopublookup) {
+ sep = GetTopSeqEntryForEntityID (entityID);
+ if (sep != NULL) {
+
+ /* optionally do network publication lookup of just PMID references */
+
+ VisitPubdescsInSep (sep, NULL, LookupPubdesc);
+ }
+ }
+
organism = NULL;
if (tbl->genprodset) {
descr = ExtractBioSourceAndPubs (bssp->seq_set);
@@ -4749,6 +5325,8 @@ static void ProcessOneRecord (
/* indexing needed to find segmented bsp if location is on part */
+ sep = GetTopSeqEntryForEntityID (entityID);
+
SeqMgrIndexFeatures (entityID, NULL);
while ((! failure) && (dataptr = ReadFeatureTableFile (fp, &datatype, NULL, &linenum, &failure)) != NULL) {
@@ -4762,6 +5340,8 @@ static void ProcessOneRecord (
}
}
FileClose (fp);
+ sep = GetTopSeqEntryForEntityID (entityID);
+
if (failure) {
if (StringHasNoText (tblfile)) {
@@ -5053,6 +5633,11 @@ static void ProcessOneRecord (
VisitFeaturesInSep (sep, NULL, RemoveUnnecGeneXref);
}
+ if (! tbl->relaxed) {
+ list = GetValidCountryList ();
+ VisitBioSourcesInSep (sep, (Pointer) list, CleanUpLatLonAndCountry);
+ }
+
/* need to reindex so hypothetical protein titles pick up locus_tag */
SeqMgrIndexFeatures (entityID, NULL);
InstantiateProteinTitles (entityID, NULL);
@@ -5065,10 +5650,10 @@ static void ProcessOneRecord (
if (tbl->smarttitle) {
MakeSmartMrnaTitles (bsp, organism);
} else {
- sfp = SeqMgrGetNextFeature (bsp, NULL, 0, FEATDEF_mRNA, &context);
+ sfp = SeqMgrGetNextFeature (bsp, NULL, SEQFEAT_RNA, 0, &context);
while (sfp != NULL) {
- AddMrnaTitles (sfp->product, organism);
- sfp = SeqMgrGetNextFeature (bsp, sfp, 0, FEATDEF_mRNA, &context);
+ AddMrnaTitles (sfp, organism);
+ sfp = SeqMgrGetNextFeature (bsp, sfp, SEQFEAT_RNA, 0, &context);
}
}
}
@@ -5078,7 +5663,8 @@ static void ProcessOneRecord (
}
if (StringDoesHaveText (tbl->accn)) {
- VisitBioseqsInSep (sep, tbl->accn, MakeAccessionID);
+ bsp = FindNucBioseq (sep);
+ MakeAccessionID (bsp, tbl->accn);
}
VisitDescriptorsInSep (sep, NULL, ConvertStructuredComment);
@@ -5097,13 +5683,6 @@ static void ProcessOneRecord (
LinkCDSmRNAbyProduct (sep);
}
- /* optionally do network taxonomy lookup */
-
- if (tbl->dotaxlookup) {
- sep = GetTopSeqEntryForEntityID (entityID);
- Taxon3ReplaceOrgInSeqEntry (sep, FALSE);
- }
-
if (StringHasNoText (results)) {
results = directory;
}
@@ -5133,6 +5712,10 @@ static void ProcessOneRecord (
Message (MSG_OK, "Illegal GO term format detected in note - contact database for instructions");
}
+ if (tbl->discrepancy) {
+ DiscrepancyReportOneRecord (tbl, sep);
+ }
+
if (tbl->validate || tbl->flatfile) {
if (pdp != NULL) {
@@ -5152,7 +5735,7 @@ static void ProcessOneRecord (
}
if (tbl->validate) {
Message (MSG_POST, "Validating %s\n", base);
- ValidateOneFile (results, base, ".val", sep);
+ ValidateOneFile (results, base, ".val", sep, tbl->relaxed);
}
}
}
@@ -5160,6 +5743,128 @@ static void ProcessOneRecord (
ObjMgrFreeByEntityID (entityID);
}
+
+static void DoDiscrepancySummary (
+ TblArgsPtr tbl,
+ FILE *fp
+)
+
+{
+ ValNodePtr local_list = NULL;
+ ClickableItemPtr cip;
+
+ if (tbl == NULL) return;
+
+ tbl->locus_tag_list = ValNodeSort (tbl->locus_tag_list, SortVnpByGlobalDiscrepancyString);
+ tbl->missing_locus_tag = ValNodeSort (tbl->missing_locus_tag, SortVnpByGlobalDiscrepancyString);
+ tbl->cds_product_list = ValNodeSort (tbl->cds_product_list, SortVnpByGlobalDiscrepancyString);
+ tbl->missing_cds_product = ValNodeSort (tbl->missing_cds_product, SortVnpByGlobalDiscrepancyString);
+ tbl->mrna_product_list = ValNodeSort (tbl->mrna_product_list, SortVnpByGlobalDiscrepancyString);
+ tbl->missing_mrna_product = ValNodeSort (tbl->missing_mrna_product, SortVnpByGlobalDiscrepancyString);
+
+ if (tbl->locus_tag_list != NULL) {
+ if (tbl->missing_locus_tag != NULL) {
+ cip = ReportMissingFields (tbl->missing_locus_tag, discReportMissingLocusTags, DISC_GENE_MISSING_LOCUS_TAG);
+ if (cip != NULL) {
+ ValNodeAddPointer (&local_list, 0, cip);
+ }
+ }
+ CollateDiscrepancyReports (&(tbl->adjacent_locus_tag_disc_list));
+ cip = ReportNonUniqueGlobalDiscrepancy (tbl->locus_tag_list,
+ discReportDuplicateLocusTagFmt,
+ discReportOneDuplicateLocusTagFmt,
+ DISC_GENE_DUPLICATE_LOCUS_TAG,
+ TRUE);
+ if (cip != NULL) {
+ ValNodeAddPointer (&local_list, 0, cip);
+ if (tbl->adjacent_locus_tag_disc_list != NULL) {
+ ValNodeLink (&(cip->subcategories), tbl->adjacent_locus_tag_disc_list);
+ }
+ } else if (tbl->adjacent_locus_tag_disc_list != NULL) {
+ ValNodeLink (&local_list, tbl->adjacent_locus_tag_disc_list);
+ }
+ tbl->adjacent_locus_tag_disc_list = NULL;
+
+ /* inconsistent locus tags */
+ ValNodeLink (&local_list,
+ ReportInconsistentGlobalDiscrepancyPrefixes (tbl->locus_tag_list,
+ discReportInconsistentLocusTagPrefixFmt,
+ DISC_GENE_LOCUS_TAG_INCONSISTENT_PREFIX));
+ /* bad formats */
+ cip = ReportBadLocusTagFormat (tbl->locus_tag_list);
+ if (cip != NULL) {
+ ValNodeAddPointer (&local_list, 0, cip);
+ }
+ }
+
+ if (tbl->cds_product_list != NULL) {
+ /* report duplicates */
+ cip = ReportNonUniqueGlobalDiscrepancy (tbl->cds_product_list,
+ discReportDuplicateProteinIDFmt,
+ discReportOneDuplicateProteinIDFmt,
+ DISC_DUP_GENPRODSET_PROTEIN,
+ TRUE);
+ if (cip != NULL) {
+ ValNodeAddPointer (&local_list, 0, cip);
+ }
+
+ /* report inconsistent IDs */
+ ValNodeLink (&local_list,
+ ReportInconsistentGlobalDiscrepancyPrefixes (tbl->cds_product_list,
+ discReportInconsistentProteinIDPrefixFmt,
+ DISC_INCONSISTENT_PROTEIN_ID_PREFIX));
+ }
+
+ if (tbl->mrna_product_list != NULL) {
+ if (tbl->missing_locus_tag != NULL) {
+ cip = ReportMissingFields (tbl->mrna_product_list, discReportMissingTranscriptIDFmt, DISC_MISSING_GENPRODSET_TRANSCRIPT_ID);
+ if (cip != NULL) {
+ ValNodeAddPointer (&local_list, 0, cip);
+ }
+ }
+
+ cip = ReportNonUniqueGlobalDiscrepancy (tbl->mrna_product_list,
+ discReportDuplicateTranscriptIdFmt,
+ discReportOneDuplicateTranscriptIdFmt,
+ DISC_DUP_GENPRODSET_TRANSCRIPT_ID,
+ TRUE);
+ if (cip != NULL) {
+ ValNodeAddPointer (&local_list, 0, cip);
+ }
+ }
+
+ /* missing gnl protein IDs */
+ cip = ReportMissingFields (tbl->missing_gnl_list, discReportBadProteinIdFmt, DISC_MISSING_PROTEIN_ID);
+ if (cip != NULL) {
+ ValNodeAddPointer (&local_list, 0, cip);
+ }
+ tbl->gnl_list = ValNodeSort (tbl->gnl_list, SortVnpByGlobalDiscrepancyString);
+ ValNodeLink (&local_list,
+ ReportInconsistentGlobalDiscrepancyStrings (tbl->gnl_list,
+ discReportInconsistentProteinIDPrefixFmt,
+ DISC_INCONSISTENT_PROTEIN_ID_PREFIX));
+
+
+ tbl->locus_tag_list = FreeGlobalDiscrepancyList (tbl->locus_tag_list);
+ tbl->missing_locus_tag = FreeGlobalDiscrepancyList (tbl->missing_locus_tag);
+ tbl->cds_product_list = FreeGlobalDiscrepancyList (tbl->cds_product_list);
+ tbl->missing_cds_product = FreeGlobalDiscrepancyList (tbl->missing_cds_product);
+ tbl->mrna_product_list = FreeGlobalDiscrepancyList (tbl->mrna_product_list);
+ tbl->missing_mrna_product = FreeGlobalDiscrepancyList (tbl->missing_mrna_product);
+ tbl->missing_gnl_list = FreeGlobalDiscrepancyList (tbl->missing_gnl_list);
+ tbl->gnl_list = FreeGlobalDiscrepancyList (tbl->gnl_list);
+
+
+ /* group discrepany reports from separate files */
+ CollateDiscrepancyReports (&(tbl->discrepancy_list));
+
+
+ WriteAsnDiscReport (local_list, fp, &(tbl->disc_rep_config), TRUE);
+ local_list = FreeClickableList (local_list);
+
+ WriteAsnDiscReport (tbl->discrepancy_list, fp, &(tbl->disc_rep_config), TRUE);
+}
+
static CharPtr overwriteMsg = "Your template with a .sqn suffix will be overwritten. Do you wish to continue?";
static Boolean TemplateOverwriteRisk (
@@ -5535,6 +6240,41 @@ static CharPtr ReadCommentFile (
return tmp;
}
+static CharPtr ParseCommaField (
+ CharPtr PNTR strP
+)
+
+{
+ CharPtr ptr;
+ CharPtr str;
+
+ if (strP == NULL) return NULL;
+
+ str = *strP;
+ if (StringHasNoText (str)) {
+ *strP = NULL;
+ return NULL;
+ }
+
+ ptr = StringChr (str, ',');
+ if (ptr == NULL) {
+ *strP = NULL;
+ return str;
+ }
+
+ *ptr = '\0';
+ ptr++;
+ if (StringHasNoText (ptr)) {
+ ptr = NULL;
+ }
+ *strP = ptr;
+
+ if (StringHasNoText (str)) {
+ str = NULL;
+ }
+ return str;
+}
+
/* Args structure contains command-line arguments */
#define p_argInputPath 0
@@ -5543,46 +6283,43 @@ static CharPtr ReadCommentFile (
#define o_argOutputFile 3
#define x_argSuffix 4
#define t_argTemplate 5
-#define s_argFastaSet 6
-#define w_argWhichClass 7
-#define d_argDeltaSet 8
-#define l_argAlignment 9
-#define z_argGapped 10
-#define e_argPhrapAce 11
-#define g_argGenProdSet 12
-#define F_argFeatIdLinks 13
-#define H_argImplicitGaps 14
-#define a_argAccession 15
-#define C_argCenter 16
-#define n_argOrgName 17
-#define j_argSrcQuals 18
-#define y_argComment 19
-#define Y_argCommentFile 20
-#define D_argDescrsFile 21
-#define f_argTableFile 22
-#define c_argFindOrf 23
-#define m_argAltStart 24
-#define k_argConflict 25
-#define v_argValidate 26
-#define b_argGenBank 27
-#define q_argFileID 28
-#define u_argUndoGPS 29
-#define h_argGnlToNote 30
-#define B_argBegGap 31
-#define E_argEndGap 32
-#define G_argMidGap 33
-#define X_argMissing 34
-#define M_argMatch 35
-#define P_argIsProt 36
-#define R_argRemote 37
-#define S_argSmartFeats 38
-#define Q_argSmartTitle 39
-#define U_argUnnecXref 40
-#define L_argLocalID 41
-#define T_argTaxLookup 42
-#define W_argLogProgress 43
-#define O_argRunonOrf 44
-#define K_argBioseqSet 45
+#define a_argType 6
+#define s_argFastaSet 7
+#define w_argWhichClass 8
+#define d_argDeltaSet 9
+#define l_argAlignment 10
+#define z_argGapped 11
+#define e_argPhrapAce 12
+#define g_argGenProdSet 13
+#define F_argFeatIdLinks 14
+#define H_argImplicitGaps 15
+#define A_argAccession 16
+#define C_argCenter 17
+#define n_argOrgName 18
+#define j_argSrcQuals 19
+#define y_argComment 20
+#define Y_argCommentFile 21
+#define D_argDescrsFile 22
+#define f_argTableFile 23
+#define k_argCdsFlags 24
+#define c_argFindOrf 25
+#define V_argVerify 26
+#define v_argValidate 27
+#define b_argGenBank 28
+#define q_argFileID 29
+#define u_argUndoGPS 30
+#define h_argGnlToNote 31
+#define G_argGapFields 32
+#define R_argRemote 33
+#define S_argSmartFeats 34
+#define Q_argSmartTitle 35
+#define U_argUnnecXref 36
+#define L_argLocalID 37
+#define T_argTaxLookup 38
+#define P_argPubLookup 39
+#define W_argLogProgress 40
+#define K_argBioseqSet 41
+#define Z_argDiscRepFile 42
Args myargs [] = {
{"Path to Files", NULL, NULL, NULL,
@@ -5597,26 +6334,36 @@ Args myargs [] = {
TRUE, 'x', ARG_STRING, 0.0, 0, NULL},
{"Template File", NULL, NULL, NULL,
TRUE, 't', ARG_FILE_IN, 0.0, 0, NULL},
+ {"File Type\n"
+ " a Any\n"
+ " r20u Runs of 20+ Ns are gaps, 100 Ns are unknown length\n"
+ " r20k Runs of 20+ Ns are gaps, 100 Ns are known length\n"
+ " s FASTA Set (s Batch, s1 Pop, s2 Phy, s3 Mut, s4 Eco)\n"
+ " d FASTA Delta, di FASTA Delta with Implicit Gaps\n"
+ " l FASTA+Gap Alignment\n"
+ " z FASTA with Gap Lines\n"
+ " e PHRAP/ACE\n", "a", NULL, NULL,
+ TRUE, 'a', ARG_STRING, 0.0, 0, NULL},
{"Read FASTAs as Set", "F", NULL, NULL,
TRUE, 's', ARG_BOOLEAN, 0.0, 0, NULL},
- {"Fasta Set Class (1 Pop, 2 Phy, 3 Mut, 4 Eco)", "0", "0", "4",
+ {"Fasta Set Class (1 Pop, 2 Phy, 3 Mut, 4 Eco) (obsolete: use -a s1-4)", "0", "0", "4",
FALSE, 'w', ARG_INT, 0.0, 0, NULL},
- {"Read FASTAs as Delta", "F", NULL, NULL,
+ {"Read FASTAs as Delta (obsolete: use -a d)", "F", NULL, NULL,
TRUE, 'd', ARG_BOOLEAN, 0.0, 0, NULL},
- {"Read FASTA+Gap Alignment", "F", NULL, NULL,
+ {"Read FASTA+Gap Alignment (obsolete: use -a l)", "F", NULL, NULL,
TRUE, 'l', ARG_BOOLEAN, 0.0, 0, NULL},
- {"Read FASTAs with Gap Lines", "F", NULL, NULL,
+ {"Read FASTAs with Gap Lines (obsolete: use -a z)", "F", NULL, NULL,
TRUE, 'z', ARG_BOOLEAN, 0.0, 0, NULL},
- {"Read PHRAP/ACE Format", "F", NULL, NULL,
+ {"Read PHRAP/ACE Format (obsolete: use -a e)", "F", NULL, NULL,
TRUE, 'e', ARG_BOOLEAN, 0.0, 0, NULL},
{"Genomic Product Set", "F", NULL, NULL,
TRUE, 'g', ARG_BOOLEAN, 0.0, 0, NULL},
{"Feature ID Links (o by Overlap, p by Product)", NULL, NULL, NULL,
TRUE, 'F', ARG_STRING, 0.0, 0, NULL},
- {"Implicit Gaps", "F", NULL, NULL,
+ {"Implicit Gaps (obsolete: use -a di)", "F", NULL, NULL,
TRUE, 'H', ARG_BOOLEAN, 0.0, 0, NULL},
{"Accession", NULL, NULL, NULL,
- TRUE, 'a', ARG_STRING, 0.0, 0, NULL},
+ TRUE, 'A', ARG_STRING, 0.0, 0, NULL},
{"Genome Center Tag", NULL, NULL, NULL,
TRUE, 'C', ARG_STRING, 0.0, 0, NULL},
{"Organism Name", NULL, NULL, NULL,
@@ -5631,15 +6378,22 @@ Args myargs [] = {
TRUE, 'D', ARG_FILE_IN, 0.0, 0, NULL},
{"Single Table File", NULL, NULL, NULL,
TRUE, 'f', ARG_FILE_IN, 0.0, 0, NULL},
- {"Annotate Longest ORF", "F", NULL, NULL,
+ {"CDS Flags (combine any of the following letters)\n"
+ " c Annotate Longest ORF\n"
+ " r Allow Runon ORFs\n"
+ " m Allow Alternative Starts\n"
+ " k Set Conflict on Mismatch\n", NULL, NULL, NULL,
+ TRUE, 'k', ARG_STRING, 0.0, 0, NULL},
+ {"Annotate Longest ORF (obsolete: use -k c)", "F", NULL, NULL,
TRUE, 'c', ARG_BOOLEAN, 0.0, 0, NULL},
- {"Allow Alternative Starts", "F", NULL, NULL,
- TRUE, 'm', ARG_BOOLEAN, 0.0, 0, NULL},
- {"Set Conflict on Mismatch", "F", NULL, NULL,
- TRUE, 'k', ARG_BOOLEAN, 0.0, 0, NULL},
- {"Validate", "F", NULL, NULL,
+ {"Verification (combine any of the following letters)\n"
+ " v Validate with Normal Stringency\n"
+ " r Validate without Country Check\n"
+ " b Generate GenBank Flatfile\n", NULL, NULL, NULL,
+ TRUE, 'V', ARG_STRING, 0.0, 0, NULL},
+ {"Validate (obsolete: use -V v)", "F", NULL, NULL,
TRUE, 'v', ARG_BOOLEAN, 0.0, 0, NULL},
- {"Generate GenBank File", "F", NULL, NULL,
+ {"Generate GenBank File (obsolete: use -V b)", "F", NULL, NULL,
TRUE, 'b', ARG_BOOLEAN, 0.0, 0, NULL},
{"Seq ID from File Name", "F", NULL, NULL,
TRUE, 'q', ARG_BOOLEAN, 0.0, 0, NULL},
@@ -5647,19 +6401,12 @@ Args myargs [] = {
TRUE, 'u', ARG_BOOLEAN, 0.0, 0, NULL},
{"General ID to Note", "F", NULL, NULL,
TRUE, 'h', ARG_BOOLEAN, 0.0, 0, NULL},
- {"Alignment Beginning Gap Characters", NULL, NULL, NULL,
- TRUE, 'B', ARG_STRING, 0.0, 0, NULL},
- {"Alignment End Gap Characters", NULL, NULL, NULL,
- TRUE, 'E', ARG_STRING, 0.0, 0, NULL},
- {"Alignment Middle Gap Characters", NULL, NULL, NULL,
+ {"Alignment Gap Flags (comma separated fields, e.g., p,-,-,-,?,. )\n"
+ " n Nucleotide or p Protein,\n"
+ " Begin, Middle, End Gap Characters,\n"
+ " Missing Characters, Match Characters\n", NULL, NULL, NULL,
TRUE, 'G', ARG_STRING, 0.0, 0, NULL},
- {"Alignment Missing Characters", NULL, NULL, NULL,
- TRUE, 'X', ARG_STRING, 0.0, 0, NULL},
- {"Alignment Match Characters", NULL, NULL, NULL,
- TRUE, 'M', ARG_STRING, 0.0, 0, NULL},
- {"Alignment Is Proteins", "F", NULL, NULL,
- TRUE, 'P', ARG_BOOLEAN, 0.0, 0, NULL},
- {"Remote Fetching from ID", "F", NULL, NULL,
+ {"Remote Sequence Record Fetching from ID", "F", NULL, NULL,
TRUE, 'R', ARG_BOOLEAN, 0.0, 0, NULL},
{"Smart Feature Annotation", "F", NULL, NULL,
TRUE, 'S', ARG_BOOLEAN, 0.0, 0, NULL},
@@ -5671,12 +6418,14 @@ Args myargs [] = {
TRUE, 'L', ARG_BOOLEAN, 0.0, 0, NULL},
{"Remote Taxonomy Lookup", "F", NULL, NULL,
TRUE, 'T', ARG_BOOLEAN, 0.0, 0, NULL},
+ {"Remote Publication Lookup", "F", NULL, NULL,
+ TRUE, 'P', ARG_BOOLEAN, 0.0, 0, NULL},
{"Log Progress", "F", NULL, NULL,
TRUE, 'W', ARG_BOOLEAN, 0.0, 0, NULL},
- {"Allow Runon ORFs", "F", NULL, NULL,
- TRUE, 'O', ARG_BOOLEAN, 0.0, 0, NULL},
{"Save Bioseq-set", "F", NULL, NULL,
TRUE, 'K', ARG_BOOLEAN, 0.0, 0, NULL},
+ {"Discrepancy Report Output File", NULL, NULL, NULL,
+ TRUE, 'Z', ARG_FILE_OUT, 0.0, 0, NULL},
};
Int2 Main (void)
@@ -5692,6 +6441,7 @@ Int2 Main (void)
CharPtr descrs;
CharPtr directory;
FILE *fp;
+ Char gapstring [128];
TextFsaPtr gotags;
CharPtr os;
CharPtr outfile;
@@ -5711,11 +6461,14 @@ Int2 Main (void)
Char str [64];
CharPtr suffix;
TblArgs tbl;
+ CharPtr tmp;
CharPtr tmplate;
+ CharPtr disc_rep_file = NULL;
/* standard setup */
ErrSetFatalLevel (SEV_MAX);
+ ErrSetMessageLevel (SEV_MAX);
ErrClearOptFlags (EO_SHOW_USERSTR);
UseLocalAsnloadDataAndErrMsg ();
ErrPathReset ();
@@ -5772,12 +6525,75 @@ Int2 Main (void)
MemSet ((Pointer) &tbl, 0, sizeof (TblArgs));
- tbl.fastaset = (Boolean) myargs [s_argFastaSet].intvalue;
+ /* process obsolete format arguments first, warn if used */
+
tbl.whichclass = (Boolean) myargs [w_argWhichClass].intvalue;
+ if (tbl.whichclass) {
+ Message (MSG_POST, "-w is obsolete, use -a s1-4 instead");
+ }
tbl.deltaset = (Boolean) myargs [d_argDeltaSet].intvalue;
+ if (tbl.deltaset) {
+ Message (MSG_POST, "-d is obsolete, use -a d instead");
+ }
tbl.alignset = (Boolean) myargs [l_argAlignment].intvalue;
+ if (tbl.alignset) {
+ Message (MSG_POST, "-l is obsolete, use -a l instead");
+ }
tbl.gapped = (Boolean) myargs [z_argGapped].intvalue;
+ if (tbl.gapped) {
+ Message (MSG_POST, "-z is obsolete, use -a z instead");
+ }
tbl.phrapace = (Boolean) myargs [e_argPhrapAce].intvalue;
+ if (tbl.phrapace) {
+ Message (MSG_POST, "-e is obsolete, use -a e instead");
+ }
+ tbl.implicitgaps = (Boolean) myargs [H_argImplicitGaps].intvalue;
+ if (tbl.implicitgaps) {
+ Message (MSG_POST, "-H is obsolete, use -a di instead");
+ }
+
+ /* -s is heavily used and will remain as an alternative to -a s */
+
+ tbl.fastaset = (Boolean) myargs [s_argFastaSet].intvalue;
+
+ /* process new -a type argument */
+
+ ptr = myargs [a_argType].strvalue;
+ if (StringICmp (ptr, "r20u") == 0) {
+ tbl.raw2delt = TRUE;
+ tbl.r2dmin = 20;
+ tbl.r2dunk100 = TRUE;
+ } else if (StringICmp (ptr, "r20k") == 0) {
+ tbl.raw2delt = TRUE;
+ tbl.r2dmin = 20;
+ tbl.r2dunk100 = FALSE;
+ } else if (StringICmp (ptr, "s") == 0) {
+ tbl.fastaset = TRUE;
+ } else if (StringICmp (ptr, "w1") == 0 || StringICmp (ptr, "s1") == 0) {
+ tbl.fastaset = TRUE;
+ tbl.whichclass = 1;
+ } else if (StringICmp (ptr, "w2") == 0 || StringICmp (ptr, "s2") == 0) {
+ tbl.fastaset = TRUE;
+ tbl.whichclass = 2;
+ } else if (StringICmp (ptr, "w3") == 0 || StringICmp (ptr, "s3") == 0) {
+ tbl.fastaset = TRUE;
+ tbl.whichclass = 3;
+ } else if (StringICmp (ptr, "w4") == 0 || StringICmp (ptr, "s4") == 0) {
+ tbl.fastaset = TRUE;
+ tbl.whichclass = 4;
+ } else if (StringICmp (ptr, "d") == 0) {
+ tbl.deltaset = TRUE;
+ } else if (StringICmp (ptr, "di") == 0) {
+ tbl.deltaset = TRUE;
+ tbl.implicitgaps = TRUE;
+ } else if (StringICmp (ptr, "l") == 0) {
+ tbl.alignset = TRUE;
+ } else if (StringICmp (ptr, "z") == 0) {
+ tbl.gapped = TRUE;
+ } else if (StringICmp (ptr, "e") == 0) {
+ tbl.phrapace = TRUE;
+ }
+
tbl.genprodset = (Boolean) myargs [g_argGenProdSet].intvalue;
ptr = myargs [F_argFeatIdLinks].strvalue;
if (StringICmp (ptr, "o") == 0) {
@@ -5785,42 +6601,106 @@ Int2 Main (void)
} else if (StringICmp (ptr, "p") == 0) {
tbl.linkbyproduct = TRUE;
}
- tbl.implicitgaps = (Boolean) myargs [H_argImplicitGaps].intvalue;
tbl.forcelocalid = (Boolean) myargs [L_argLocalID].intvalue;
tbl.gpstonps = (Boolean) myargs [u_argUndoGPS].intvalue;
tbl.gnltonote = (Boolean) myargs [h_argGnlToNote].intvalue;
- tbl.accn = (CharPtr) myargs [a_argAccession].strvalue;
+ tbl.accn = (CharPtr) myargs [A_argAccession].strvalue;
tbl.center = (CharPtr) myargs [C_argCenter].strvalue;
tbl.organism = (CharPtr) myargs [n_argOrgName].strvalue;
tbl.srcquals = (CharPtr) myargs [j_argSrcQuals].strvalue;
tbl.comment = (CharPtr) myargs [y_argComment].strvalue;
tbl.commentFile = ReadCommentFile ((CharPtr) myargs [Y_argCommentFile].strvalue);
+
+ /* process obsolete findorf argument first, warn if used */
+
tbl.findorf = (Boolean) myargs [c_argFindOrf].intvalue;
- tbl.runonorf = (Boolean) myargs [O_argRunonOrf].intvalue;
+ if (tbl.findorf) {
+ Message (MSG_POST, "-c is obsolete, use -k c instead");
+ }
+
+ ptr = myargs [k_argCdsFlags].strvalue;
+ if (StringChr (ptr, 'c') != NULL) {
+ tbl.findorf = TRUE;
+ }
+ if (StringChr (ptr, 'r') != NULL) {
+ tbl.runonorf = TRUE;
+ tbl.findorf = TRUE;
+ }
+ if (StringChr (ptr, 'm') != NULL) {
+ tbl.altstart = TRUE;
+ }
+ if (StringChr (ptr, 'k') != NULL) {
+ tbl.conflict = TRUE;
+ }
+ /*
if (!tbl.findorf && tbl.runonorf) {
- Message (MSG_FATAL, "-O cannot be used without -c");
+ Message (MSG_FATAL, "-k r cannot be used without -k c");
return 1;
}
- tbl.altstart = (Boolean) myargs [m_argAltStart].intvalue;
- tbl.conflict = (Boolean) myargs [k_argConflict].intvalue;
+ */
+
+ /* process obsolete validate/flatfile arguments first, warn if used */
+
tbl.validate = (Boolean) myargs [v_argValidate].intvalue;
+ if (tbl.validate) {
+ Message (MSG_POST, "-v is obsolete, use -V v instead");
+ }
tbl.flatfile = (Boolean) myargs [b_argGenBank].intvalue;
+ if (tbl.flatfile) {
+ Message (MSG_POST, "-b is obsolete, use -V b instead");
+ }
+
+ ptr = myargs [V_argVerify].strvalue;
+ if (StringChr (ptr, 'v') != NULL) {
+ tbl.validate = TRUE;
+ }
+ if (StringChr (ptr, 'r') != NULL) {
+ tbl.validate = TRUE;
+ tbl.relaxed = TRUE;
+ }
+ if (StringChr (ptr, 'b') != NULL) {
+ tbl.flatfile = TRUE;
+ }
+
+
+
tbl.seqidfromfile = (Boolean) myargs [q_argFileID].intvalue;
tbl.smartfeats = (Boolean) myargs [S_argSmartFeats].intvalue;
tbl.smarttitle = (Boolean) myargs [Q_argSmartTitle].intvalue;
tbl.removeunnecxref = (Boolean) myargs [U_argUnnecXref].intvalue;
tbl.dotaxlookup = (Boolean) myargs [T_argTaxLookup].intvalue;
+ tbl.dopublookup = (Boolean) myargs [P_argPubLookup].intvalue;
tbl.logtoterminal = (Boolean) myargs [W_argLogProgress].intvalue;
- /* arguments for alignment reading */
- tbl.aln_beginning_gap = (CharPtr) myargs [B_argBegGap].strvalue;
- tbl.aln_end_gap = (CharPtr) myargs [E_argEndGap].strvalue;
- tbl.aln_middle_gap = (CharPtr) myargs [G_argMidGap].strvalue;
- tbl.aln_missing = (CharPtr) myargs [X_argMissing].strvalue;
- tbl.aln_match = (CharPtr) myargs [M_argMatch].strvalue;
- tbl.aln_is_protein = (Boolean) myargs [P_argIsProt].intvalue;
tbl.save_bioseq_set = (Boolean) myargs [K_argBioseqSet].intvalue;
+ disc_rep_file = (CharPtr) myargs [Z_argDiscRepFile].strvalue;
+ if (!StringHasNoText (disc_rep_file)) {
+ tbl.discrepancy = TRUE;
+ }
+
+
+ /* arguments for alignment reading, e.g., "p,-,-,-,?,." */
+
+ gapstring [0] = '\0';
+ ptr = (CharPtr) myargs [G_argGapFields].strvalue;
+ StringNCpy_0 (gapstring, ptr, sizeof (gapstring));
+
+ ptr = gapstring;
+ tmp = ParseCommaField (&ptr);
+ if (tmp != NULL) {
+ if (StringChr (tmp, 'p') != NULL) {
+ tbl.aln_is_protein = TRUE;
+ } else if (StringChr (tmp, 'n') == NULL) {
+ Message (MSG_FATAL, "-G must start with p for Protein or n for Nucleotide");
+ return 1;
+ }
+ }
+ tbl.aln_beginning_gap = ParseCommaField (&ptr);
+ tbl.aln_middle_gap = ParseCommaField (&ptr);
+ tbl.aln_end_gap = ParseCommaField (&ptr);
+ tbl.aln_missing = ParseCommaField (&ptr);
+ tbl.aln_match = ParseCommaField (&ptr);
if (StringHasNoText (tbl.accn)) {
tbl.accn = NULL;
@@ -5851,7 +6731,7 @@ Int2 Main (void)
|| StringDoesHaveText (tbl.aln_missing)
|| StringDoesHaveText (tbl.aln_match)
|| tbl.aln_is_protein)) {
- Message (MSG_FATAL, "Alignment options (-B, -E, -G, -X, -M, -P) can only be used with -l");
+ Message (MSG_FATAL, "-G can only be used with -a l");
return 1;
}
@@ -5964,7 +6844,7 @@ Int2 Main (void)
TextFsaAdd (gotags, "go_function");
TextFsaAdd (gotags, "go_process");
- /* register fetch function */
+ /* register fetch functions */
if (remote) {
#ifdef INTERNAL_NCBI_TBL2ASN
@@ -5977,6 +6857,10 @@ Int2 Main (void)
#endif
}
+ if (remote || tbl.dopublookup) {
+ PubMedFetchEnable ();
+ }
+
/* process one or more records */
if (StringDoesHaveText (outfile) && StringHasNoText (base)) {
@@ -6010,6 +6894,16 @@ Int2 Main (void)
AsnIoClose (aip);
}
+ if (tbl.discrepancy) {
+ tbl.disc_rep_config.summary_report = FALSE;
+ tbl.disc_rep_config.expand_report_categories[DISC_SUPERFLUOUS_GENE] = TRUE;
+ tbl.disc_rep_config.expand_report_categories[DISC_RNA_CDS_OVERLAP] = TRUE;
+ tbl.disc_rep_config.expand_report_categories[DISC_SUSPECT_PRODUCT_NAME] = TRUE;
+ fp = FileOpen (disc_rep_file, "w");
+ DoDiscrepancySummary (&tbl, fp);
+ FileClose (fp);
+ }
+
if (sbp != NULL) {
SubmitBlockFree (sbp);
}
@@ -6025,7 +6919,11 @@ Int2 Main (void)
TextFsaFree (gotags);
- /* close fetch function */
+ /* close fetch functions */
+
+ if (remote || tbl.dopublookup) {
+ PubMedFetchDisable ();
+ }
if (remote) {
#ifdef INTERNAL_NCBI_TBL2ASN
diff --git a/desktop/biosrc.c b/desktop/biosrc.c
index 8ecc6d81..a2dd561b 100644
--- a/desktop/biosrc.c
+++ b/desktop/biosrc.c
@@ -29,7 +29,7 @@
*
* Version Creation Date: 1/22/95
*
-* $Revision: 6.85 $
+* $Revision: 6.87 $
*
* File Description:
*
@@ -72,6 +72,8 @@ static ENUM_ALIST(biosource_genome_alist)
{"Proplastid", 18},
{"Endogenous-virus", 19},
{"Hydrogenosome", 20},
+ {"Chromosome", 21},
+ {"Chromatophore", 22},
END_ENUM_ALIST
extern EnumFieldAssoc biosource_genome_simple_alist [];
@@ -98,6 +100,8 @@ ENUM_ALIST(biosource_genome_simple_alist)
{"Proplastid", 18},
{"Endogenous-virus", 19},
{"Hydrogenosome", 20},
+ {"Chromosome", 21},
+ {"Chromatophore", 22},
END_ENUM_ALIST
extern EnumFieldAssoc biosource_origin_alist [];
@@ -900,55 +904,6 @@ static CharPtr AllButFirstLinePrtProc (DoC d, Int2 item, Pointer ptr)
}
}
-static CharPtr MergeValNodeStrings (ValNodePtr list)
-
-{
- size_t len;
- CharPtr ptr;
- CharPtr str;
- CharPtr tmp;
- ValNodePtr vnp;
-
-
- ptr = NULL;
- if (list != NULL) {
- vnp = list;
- len = 0;
- while (vnp != NULL) {
- if (vnp->data.ptrvalue != NULL) {
- len += StringLen ((CharPtr) vnp->data.ptrvalue) + 1;
- }
- vnp = vnp->next;
- }
- if (len > 0) {
- ptr = MemNew (sizeof (Char) * (len + 2));
- if (ptr != NULL) {
- vnp = list;
- tmp = NULL;
- while (vnp != NULL) {
- if (vnp->data.ptrvalue != NULL) {
- if (tmp == NULL) {
- tmp = ptr;
- } else {
- tmp = StringMove (tmp, "; ");
- }
- str = StringSave ((CharPtr) vnp->data.ptrvalue);
- TrimSpacesAroundString (str);
- len = StringLen (str);
- if (len > 0 && str [len - 1] == ';') {
- str [len - 1] = '\0';
- }
- tmp = StringMove (tmp, str);
- MemFree (str);
- }
- vnp = vnp->next;
- }
- }
- }
- }
- return ptr;
-}
-
static Char useGenomicText [] = "\
(Use 'Genomic' for a sequence encoded by a nuclear gene.)\n";
diff --git a/desktop/bspview.c b/desktop/bspview.c
index 6e7e96dc..670bca13 100644
--- a/desktop/bspview.c
+++ b/desktop/bspview.c
@@ -29,7 +29,7 @@
*
* Version Creation Date: 4/30/95
*
-* $Revision: 6.141 $
+* $Revision: 6.142 $
*
* File Description:
*
@@ -84,7 +84,7 @@
extern ForM smartBioseqViewForm;
ForM smartBioseqViewForm = NULL;
-#define MAX_VIEWABLE_TARGET_SEQUENCES 60000
+#define MAX_VIEWABLE_TARGET_SEQUENCES 32768
static void LookForGenomeTag (SeqEntryPtr sep, Pointer mydata, Int4 index, Int2 indent)
diff --git a/desktop/cdrgn.c b/desktop/cdrgn.c
index 83057a92..888e9ff9 100644
--- a/desktop/cdrgn.c
+++ b/desktop/cdrgn.c
@@ -29,7 +29,7 @@
*
* Version Creation Date: 1/22/95
*
-* $Revision: 6.99 $
+* $Revision: 6.114 $
*
* File Description:
*
@@ -136,7 +136,6 @@ typedef struct rnaform {
GrouP pages [NUM_PAGES];
DialoG foldertabs;
Int2 currentPage;
- TexT prodSeqIdTxt;
Boolean empty_feat;
} RnaForm, PNTR RnaFormPtr;
@@ -154,6 +153,19 @@ typedef struct rnapage {
DialoG anticodon;
GrouP trnaPages [3];
RnaFormPtr rfp;
+
+ /* for ncRNA page */
+ GrouP ncrnaGrp;
+ DialoG ncrnaClass;
+ TexT ncrnaProduct;
+
+ /* for tmRNA page */
+ GrouP tmrnaGrp;
+ TexT tmrnaProduct;
+ DialoG tmrnaTagPeptide;
+
+ /* for switching between types */
+ Int4 prev_rna_type;
} RnaPage, PNTR RnaPagePtr;
@@ -1313,7 +1325,10 @@ static Pointer ProductToSeqLocPtr (DialoG d)
return NULL;
}
}
- if (ppp != NULL && ppp->bsptr != NULL) {
+
+ if (ppp == NULL) return NULL;
+
+ if (ppp->bsptr != NULL) {
if (ppp->nucProducts) {
if (! Visible (d)) return NULL; /* not an mRNA, do not make product */
}
@@ -1366,18 +1381,6 @@ static Pointer ProductToSeqLocPtr (DialoG d)
}
}
}
- } else if (rfp != NULL && rfp->prodSeqIdTxt != NULL) {
- GetTitle (rfp->prodSeqIdTxt, id, sizeof (id) - 1);
- if ((! StringHasNoText (id)) && StringChr (id, '|') != NULL) {
- sip = MakeSeqID (id);
- if (sip != NULL) {
- slp = ValNodeNew (NULL);
- if (slp != NULL) {
- slp->choice = 3;
- slp->data.ptrvalue = SeqIdStripLocus (sip);
- }
- }
- }
}
}
return (Pointer) slp;
@@ -1512,6 +1515,171 @@ static DialoG CreateProteinOrMRNAProductDialog (GrouP h, CharPtr title,
return (DialoG) p;
}
+
+typedef struct rnatranscriptiddlg {
+ DIALOG_MESSAGE_BLOCK
+ DialoG product;
+ Boolean usePopupForProduct;
+ GrouP far_id_grp;
+ TexT far_id;
+ Nlm_ChangeNotifyProc change_notify;
+ Pointer change_userdata;
+} RnaTranscriptIDDlgData, PNTR RnaTranscriptIdDlgPtr;
+
+static void ChangeTranscriptIDSequenceSelection (Pointer userdata)
+{
+ RnaTranscriptIdDlgPtr dlg;
+ ValNodePtr vnp;
+
+ dlg = (RnaTranscriptIdDlgPtr) userdata;
+ if (dlg == NULL) return;
+
+ if (dlg->far_id_grp != NULL)
+ {
+ vnp = DialogToPointer (dlg->product);
+ if (vnp == NULL || vnp->data.ptrvalue == NULL)
+ {
+ Enable (dlg->far_id_grp);
+ }
+ else
+ {
+ Disable (dlg->far_id_grp);
+ }
+ vnp = ValNodeFree (vnp);
+ }
+
+ if (dlg->change_notify != NULL)
+ {
+ (dlg->change_notify) (dlg->change_userdata);
+ }
+}
+
+static void ChangeTranscriptIDText (TexT t)
+{
+ RnaTranscriptIdDlgPtr dlg;
+
+ dlg = (RnaTranscriptIdDlgPtr) GetObjectExtra (t);
+ if (dlg == NULL) return;
+
+ if (dlg->change_notify != NULL)
+ {
+ (dlg->change_notify) (dlg->change_userdata);
+ }
+}
+
+
+static void LocToTranscriptIDDialog (DialoG d, Pointer data)
+{
+ RnaTranscriptIdDlgPtr dlg;
+ SeqLocPtr slp;
+ BioseqPtr bsp;
+ ValNode vn;
+ SeqIdPtr sip;
+ Char str [128];
+
+ dlg = (RnaTranscriptIdDlgPtr) GetObjectExtra (d);
+ if (dlg == NULL) return;
+ slp = (SeqLocPtr) data;
+
+ if (slp == NULL)
+ {
+ PointerToDialog (dlg->product, NULL);
+ SafeSetTitle (dlg->far_id, "");
+ }
+ else
+ {
+ sip = SeqLocId (slp);
+ bsp = BioseqFind (sip);
+ if (bsp == NULL)
+ {
+ PointerToDialog (dlg->product, NULL);
+ SeqIdWrite (sip, str, PRINTID_FASTA_LONG, sizeof (str));
+ SafeSetTitle (dlg->far_id, str);
+ }
+ else
+ {
+ vn.choice = 0;
+ vn.data.ptrvalue = sip;
+ vn.next = NULL;
+ PointerToDialog (dlg->product, &vn);
+ SafeSetTitle (dlg->far_id, "");
+ }
+ }
+}
+
+
+static Pointer TranscriptIDDialogToLoc (DialoG d)
+{
+ RnaTranscriptIdDlgPtr dlg;
+ SeqLocPtr slp = NULL;
+ ValNodePtr vnp;
+ SeqIdPtr sip = NULL;
+ CharPtr str;
+
+ dlg = (RnaTranscriptIdDlgPtr) GetObjectExtra (d);
+ if (dlg == NULL) return NULL;
+
+ vnp = DialogToPointer (dlg->product);
+ if (vnp == NULL || vnp->data.ptrvalue == NULL)
+ {
+ if (!TextHasNoText (dlg->far_id))
+ {
+ str = SaveStringFromText (dlg->far_id);
+ sip = MakeSeqID (str);
+ str = MemFree (str);
+ }
+ }
+ else
+ {
+ sip = SeqIdDup (vnp->data.ptrvalue);
+ }
+ vnp = ValNodeFree (vnp);
+
+ if (sip != NULL)
+ {
+ slp = ValNodeNew (NULL);
+ slp->choice = SEQLOC_WHOLE;
+ slp->data.ptrvalue = SeqIdStripLocus (sip);
+ }
+
+ return slp;
+}
+
+
+static DialoG CreateRNATranscriptIDDialog (GrouP h, Uint2 entityID, Boolean allow_far_id, Nlm_ChangeNotifyProc change_notify, Pointer change_userdata)
+{
+ GrouP p;
+ RnaTranscriptIdDlgPtr dlg;
+ ValNodePtr bsp_list = NULL;
+
+ p = HiddenGroup (h, 3, 0, NULL);
+ SetGroupSpacing (p, 10, 10);
+
+ dlg = (RnaTranscriptIdDlgPtr) MemNew (sizeof (RnaTranscriptIDDlgData));
+ if (dlg == NULL) return NULL;
+
+ SetObjectExtra (p, dlg, StdCleanupExtraProc);
+ dlg->dialog = (DialoG) p;
+ dlg->todialog = LocToTranscriptIDDialog;
+ dlg->fromdialog = TranscriptIDDialogToLoc;
+
+ dlg->change_notify = change_notify;
+ dlg->change_userdata = change_userdata;
+
+ StaticPrompt (p, "Transcript Sequence ID", 0, popupMenuHeight, programFont, 'l');
+ dlg->product = SequenceSelectionDialogEx (p, ChangeTranscriptIDSequenceSelection, dlg, FALSE, TRUE, TRUE, FALSE, entityID, SHORT_SELECTION_LIST);
+ if (allow_far_id)
+ {
+ dlg->far_id_grp = HiddenGroup (p, 2, 0, NULL);
+ StaticPrompt (dlg->far_id_grp, "Far ID", 0, dialogTextHeight, programFont, 'l');
+ dlg->far_id = DialogText (dlg->far_id_grp, "", 5, ChangeTranscriptIDText);
+ SetObjectExtra (dlg->far_id, dlg, NULL);
+ }
+
+ return (DialoG) p;
+}
+
+
extern SeqLocPtr PredictCodingRegion (BioseqPtr nuc, BioseqPtr prot, Int2 genCode)
{
@@ -3090,7 +3258,7 @@ static Boolean FixCdRegionFormProteinFeatures (CdRgnFormPtr cfp, BioseqPtr newpr
sip = SeqLocId (slp);
target = BioseqFind (sip);
if (target != NULL) {
- if (!SeqEdFixProteinFeatures (target, newprot, FALSE))
+ if (!SeqEdFixProteinFeatures (target, newprot, FALSE, Sequin_GlobalAlign2Seq))
{
if (ANS_CANCEL == Message (MSG_OKC, "Unable to construct alignment between old and new proteins.\nYou will need to adjust the protein features manually if you continue."))
{
@@ -5777,16 +5945,15 @@ static ENUM_ALIST(rna_type_alist)
{"mRNA", 2},
{"tRNA", 3},
{"rRNA", 4},
- {"snRNA", 5},
- {"scRNA", 6},
- {"snoRNA", 7},
+ {"ncRNA", 8},
+ {"tmRNA", 9},
{"misc_RNA", 255},
END_ENUM_ALIST
static Uint1 check_rna_type (Uint1 type)
{
- if (type > 7 && type != 255) return 0;
+ if (type > 9 && type != 255) return 0;
return type;
}
@@ -5882,7 +6049,76 @@ static DialoG CreateMrnaUserObjectDialog (GrouP h, CharPtr label, SeqEntryPtr se
return (DialoG) p;
}
-/* trna aa conversion modified from Tatiana Tatusov's code */
+
+static Uint1 RnaFeatDefFromRnaRef (RnaRefPtr rrp)
+{
+ if (rrp == NULL) {
+ return FEATDEF_otherRNA;
+ }
+
+ switch (rrp->type)
+ {
+ case 1:
+ return FEATDEF_preRNA;
+ break;
+ case 2:
+ return FEATDEF_mRNA;
+ break;
+ case 3:
+ return FEATDEF_tRNA;
+ break;
+ case 4:
+ return FEATDEF_rRNA;
+ break;
+ case 5:
+ return FEATDEF_snRNA;
+ break;
+ case 6:
+ return FEATDEF_scRNA;
+ break;
+ case 7:
+ return FEATDEF_snoRNA;
+ break;
+ case 255:
+ if (rrp->ext.choice != 1 || StringHasNoText (rrp->ext.value.ptrvalue)) {
+ return FEATDEF_otherRNA;
+ } else if (StringCmp (rrp->ext.value.ptrvalue, "ncRNA") == 0
+ || IsStringInNcRNAClassList(rrp->ext.value.ptrvalue)) {
+ return FEATDEF_ncRNA;
+ } else if (StringCmp (rrp->ext.value.ptrvalue, "tmRNA") == 0) {
+ return FEATDEF_tmRNA;
+ } else {
+ return FEATDEF_otherRNA;
+ }
+ default:
+ return FEATDEF_otherRNA;
+ break;
+ }
+}
+
+
+static Uint1 RnaSubtypeFromRnaRef (RnaRefPtr rrp)
+{
+ if (rrp == NULL) {
+ return 0;
+ }
+
+ if (rrp->type == 255) {
+ if (rrp->ext.choice == 1 && StringCmp (rrp->ext.value.ptrvalue, "tmRNA") == 0) {
+ return 9;
+ } else if (StringCmp (rrp->ext.value.ptrvalue, "ncRNA") == 0
+ || IsStringInNcRNAClassList (rrp->ext.value.ptrvalue)) {
+ return 8;
+ } else {
+ return 255;
+ }
+ } else if (rrp->type == 5 || rrp->type == 6 || rrp->type == 7) {
+ return 8;
+ } else {
+ return rrp->type;
+ }
+}
+
static void RnaRefPtrToRnaPage (DialoG d, Pointer data)
@@ -5905,8 +6141,9 @@ static void RnaRefPtrToRnaPage (DialoG d, Pointer data)
rrp = (RnaRefPtr) data;
if (rrp != NULL) {
+
SetEnumPopup (rpp->type, rna_type_alist,
- (UIEnum) check_rna_type (rrp->type));
+ RnaSubtypeFromRnaRef(rrp));
SafeSetStatus (rpp->pseudo, rrp->pseudo);
switch (rrp->type) {
case 0 :
@@ -5914,12 +6151,16 @@ static void RnaRefPtrToRnaPage (DialoG d, Pointer data)
SafeHide (rpp->nameGrp);
SafeHide (rpp->rrnaPrompt);
SafeHide (rpp->ornaPrompt);
+ SafeHide (rpp->ncrnaGrp);
+ SafeHide (rpp->tmrnaGrp);
break;
case 3 :
SafeSetTitle (rpp->name, "");
SafeHide (rpp->nameGrp);
SafeHide (rpp->rrnaPrompt);
SafeHide (rpp->ornaPrompt);
+ SafeHide (rpp->ncrnaGrp);
+ SafeHide (rpp->tmrnaGrp);
SafeSetValue (rpp->AAitem, 1);
if (rrp->ext.choice == 2) {
trna = rrp->ext.value.ptrvalue;
@@ -6024,17 +6265,63 @@ static void RnaRefPtrToRnaPage (DialoG d, Pointer data)
SafeHide (rpp->ornaPrompt);
SafeShow (rpp->rrnaPrompt);
SafeShow (rpp->nameGrp);
+ SafeHide (rpp->ncrnaGrp);
+ SafeHide (rpp->tmrnaGrp);
break;
+ case 5:
+ case 6:
+ case 7:
+ case 8:
case 255 :
SafeHide (rpp->trnaGrp);
- if (rrp->ext.choice == 1 && rrp->ext.value.ptrvalue != NULL) {
- SafeSetTitle (rpp->name, (CharPtr) rrp->ext.value.ptrvalue);
- } else {
- SafeSetTitle (rpp->name, "");
- }
+ SafeHide (rpp->nameGrp);
SafeHide (rpp->rrnaPrompt);
- SafeShow (rpp->ornaPrompt);
- SafeShow (rpp->nameGrp);
+ SafeHide (rpp->ornaPrompt);
+ if (rrp->type == 5) {
+ PointerToDialog (rpp->ncrnaClass, "snRNA");
+ SafeHide (rpp->tmrnaGrp);
+ SafeShow (rpp->ncrnaGrp);
+ } else if (rrp->type == 6) {
+ PointerToDialog (rpp->ncrnaClass, "scRNA");
+ SafeHide (rpp->tmrnaGrp);
+ SafeShow (rpp->ncrnaGrp);
+ } else if (rrp->type == 7) {
+ PointerToDialog (rpp->ncrnaClass, "snoRNA");
+ SafeHide (rpp->tmrnaGrp);
+ SafeShow (rpp->ncrnaGrp);
+ } else if (rrp->type == 255) {
+ if (rrp->ext.choice == 1) {
+ if (StringCmp (rrp->ext.value.ptrvalue, "ncRNA") == 0) {
+ SafeHide (rpp->tmrnaGrp);
+ SafeShow (rpp->ncrnaGrp);
+ /* get class from qual */
+ } else if (IsStringInNcRNAClassList (rrp->ext.value.ptrvalue)) {
+ SafeHide (rpp->tmrnaGrp);
+ SafeShow (rpp->ncrnaGrp);
+ /* get class from rrp */
+ PointerToDialog (rpp->ncrnaClass, rrp->ext.value.ptrvalue);
+ } else if (StringCmp (rrp->ext.value.ptrvalue, "tmRNA") == 0) {
+ SafeHide (rpp->ncrnaGrp);
+ SafeShow (rpp->tmrnaGrp);
+ } else {
+ if (StringCmp (rrp->ext.value.ptrvalue, "misc_RNA") != 0) {
+ SafeSetTitle (rpp->name, (CharPtr) rrp->ext.value.ptrvalue);
+ }
+ SafeHide (rpp->ornaPrompt);
+ SafeShow (rpp->rrnaPrompt);
+ SafeShow (rpp->nameGrp);
+ SafeHide (rpp->ncrnaGrp);
+ SafeHide (rpp->tmrnaGrp);
+ }
+ } else {
+ SafeSetTitle (rpp->name, "");
+ SafeHide (rpp->ornaPrompt);
+ SafeShow (rpp->rrnaPrompt);
+ SafeShow (rpp->nameGrp);
+ SafeHide (rpp->ncrnaGrp);
+ SafeHide (rpp->tmrnaGrp);
+ }
+ }
break;
default :
SafeHide (rpp->trnaGrp);
@@ -6046,6 +6333,8 @@ static void RnaRefPtrToRnaPage (DialoG d, Pointer data)
SafeHide (rpp->rrnaPrompt);
SafeHide (rpp->ornaPrompt);
SafeShow (rpp->nameGrp);
+ SafeHide (rpp->ncrnaGrp);
+ SafeHide (rpp->tmrnaGrp);
break;
}
} else {
@@ -6057,6 +6346,8 @@ static void RnaRefPtrToRnaPage (DialoG d, Pointer data)
SafeHide (rpp->ornaPrompt);
SafeSetValue (rpp->AAitem, 0);
SafeHide (rpp->trnaGrp);
+ SafeHide (rpp->ncrnaGrp);
+ SafeHide (rpp->tmrnaGrp);
}
}
@@ -6086,10 +6377,14 @@ static Pointer RnaPageToRnaRefPtr (DialoG d)
rrp = RnaRefNew ();
if (rrp != NULL) {
if (GetEnumPopup (rpp->type, rna_type_alist, &val)) {
- rrp->type = (Uint1) val;
+ if (val == 8 || val == 9) {
+ rrp->type = 255;
+ } else {
+ rrp->type = (Uint1) val;
+ }
}
rrp->pseudo = GetStatus (rpp->pseudo);
- switch (rrp->type) {
+ switch (val) {
case 3 :
rrp->ext.choice = 2;
trna = (tRNAPtr) MemNew (sizeof (tRNA));
@@ -6158,6 +6453,18 @@ static Pointer RnaPageToRnaRefPtr (DialoG d)
trna->anticodon = DialogToPointer (rpp->anticodon);
}
break;
+ case 5:
+ case 6:
+ case 7:
+ case 8: /* ncRNA */
+ rrp->ext.choice = 1;
+ rrp->ext.value.ptrvalue = StringSave ("ncRNA");
+ break;
+ case 9: /* tmRNA */
+ rrp->ext.choice = 1;
+ rrp->ext.value.ptrvalue = StringSave ("tmRNA");
+ break;
+ case 255:
default :
if (! TextHasNoText (rpp->name)) {
rrp->ext.choice = 1;
@@ -6170,6 +6477,369 @@ static Pointer RnaPageToRnaRefPtr (DialoG d)
return (Pointer) rrp;
}
+
+static GBQualPtr FindOrAddQual (SeqFeatPtr sfp, CharPtr qual_name)
+{
+ GBQualPtr gbq;
+
+ if (sfp == NULL) return NULL;
+ gbq = sfp->qual;
+ while (gbq != NULL && StringCmp (gbq->qual, qual_name) != 0) {
+ gbq = gbq->next;
+ }
+ if (gbq == NULL) {
+ gbq = GBQualNew ();
+ gbq->qual = StringSave (qual_name);
+ gbq->next = sfp->qual;
+ sfp->qual = gbq;
+ }
+ return gbq;
+}
+
+
+static void RemoveQualByName (SeqFeatPtr sfp, CharPtr qual_name)
+{
+ GBQualPtr gbq, gbq_next, gbq_prev = NULL;
+
+ if (sfp == NULL || StringHasNoText (qual_name))
+ {
+ return;
+ }
+ gbq = sfp->qual;
+ while (gbq != NULL)
+ {
+ gbq_next = gbq->next;
+ if (StringCmp (gbq->qual, qual_name) == 0)
+ {
+ if (gbq_prev == NULL)
+ {
+ sfp->qual = gbq->next;
+ }
+ else
+ {
+ gbq_prev->next = gbq->next;
+ }
+ gbq->next = NULL;
+ gbq = GBQualFree (gbq);
+ }
+ else
+ {
+ gbq_prev = gbq;
+ }
+ gbq = gbq_next;
+ }
+}
+
+static void SetRNAMiscNameForType (SeqFeatPtr sfp, UIEnum val)
+{
+ RnaRefPtr rrp;
+
+ if (sfp == NULL || sfp->data.choice != SEQFEAT_RNA) return;
+ rrp = (RnaRefPtr) sfp->data.value.ptrvalue;
+
+ if (rrp == NULL) {
+ rrp = RnaRefNew ();
+ sfp->data.value.ptrvalue = rrp;
+ }
+
+ if (val == 8) {
+ rrp->ext.value.ptrvalue = MemFree (rrp->ext.value.ptrvalue);
+ rrp->ext.value.ptrvalue = StringSave ("ncRNA");
+ rrp->ext.choice = 1;
+ } else if (val == 9) {
+ rrp->ext.value.ptrvalue = MemFree (rrp->ext.value.ptrvalue);
+ rrp->ext.value.ptrvalue = StringSave ("tmRNA");
+ rrp->ext.choice = 1;
+ } else if (val == 255) {
+ rrp->ext.value.ptrvalue = MemFree (rrp->ext.value.ptrvalue);
+ rrp->ext.value.ptrvalue = StringSave ("misc_RNA");
+ rrp->ext.choice = 1;
+ }
+
+}
+
+
+extern void ConvertProductQualToRnaRefName (SeqFeatPtr sfp)
+{
+ RnaRefPtr rrp;
+ GBQualPtr gbq, gbq_prev = NULL;
+
+ if (sfp == NULL || sfp->data.choice != SEQFEAT_RNA || sfp->data.value.ptrvalue == NULL) return;
+ rrp = (RnaRefPtr) sfp->data.value.ptrvalue;
+
+ gbq = sfp->qual;
+ while (gbq != NULL && StringCmp (gbq->qual, "product") != 0) {
+ gbq_prev = gbq;
+ gbq = gbq->next;
+ }
+ if (gbq != NULL) {
+ rrp->ext.value.ptrvalue = MemFree (rrp->ext.value.ptrvalue);
+ rrp->ext.choice = 1;
+ rrp->ext.value.ptrvalue = gbq->val;
+ gbq->val = NULL;
+ if (gbq_prev == NULL) {
+ sfp->qual = gbq->next;
+ } else {
+ gbq_prev->next = gbq->next;
+ }
+ gbq->next = NULL;
+ gbq = GBQualFree (gbq);
+ }
+}
+
+
+static void ConvertRnaRefNameToProductQual (SeqFeatPtr sfp)
+{
+ RnaRefPtr rrp;
+ GBQualPtr gbq, gbq_prev = NULL;
+
+ if (sfp == NULL || sfp->data.choice != SEQFEAT_RNA || sfp->data.value.ptrvalue == NULL) return;
+ rrp = (RnaRefPtr) sfp->data.value.ptrvalue;
+ if (rrp->ext.choice != 1) return;
+
+ gbq = GBQualNew ();
+ gbq->next = sfp->qual;
+ sfp->qual = gbq;
+ gbq->qual = StringSave ("product");
+ gbq->val = StringSave (rrp->ext.value.ptrvalue);
+}
+
+
+static void AddRnaSpecificQualsForType (SeqFeatPtr sfp, RnaPagePtr rpp, UIEnum val)
+{
+ CharPtr str;
+ GBQualPtr gbq;
+ RnaRefPtr rrp;
+
+ if (rpp == NULL || sfp == NULL || sfp->data.choice != SEQFEAT_RNA) return;
+ rrp = (RnaRefPtr) sfp->data.value.ptrvalue;
+
+ if (val == 8) {
+ str = DialogToPointer (rpp->ncrnaClass);
+ if (StringHasNoText (str)) {
+ str = MemFree (str);
+ RemoveQualByName (sfp, "ncRNA_class");
+ } else {
+ gbq = FindOrAddQual (sfp, "ncRNA_class");
+ gbq->val = MemFree (gbq->val);
+ gbq->val = str;
+ }
+ if (TextHasNoText (rpp->ncrnaProduct)) {
+ RemoveQualByName (sfp, "product");
+ } else {
+ gbq = FindOrAddQual (sfp, "product");
+ gbq->val = MemFree (gbq->val);
+ gbq->val = SaveStringFromText (rpp->ncrnaProduct);
+ }
+ } else if (val == 9) {
+ str = DialogToPointer (rpp->tmrnaTagPeptide);
+ if (StringHasNoText (str)) {
+ str = MemFree (str);
+ RemoveQualByName (sfp, "tag_peptide");
+ } else {
+ gbq = FindOrAddQual (sfp, "tag_peptide");
+ gbq->val = MemFree (gbq->val);
+ gbq->val = str;
+ }
+ if (TextHasNoText (rpp->tmrnaProduct)) {
+ RemoveQualByName (sfp, "product");
+ } else {
+ gbq = FindOrAddQual (sfp, "product");
+ gbq->val = MemFree (gbq->val);
+ gbq->val = SaveStringFromText (rpp->tmrnaProduct);
+ }
+ } else if (val == 255) {
+ if (TextHasNoText (rpp->name)) {
+ RemoveQualByName (sfp, "product");
+ } else {
+ str = SaveStringFromText (rpp->name);
+ if (StringCmp (str, "misc_RNA") == 0) {
+ str = MemFree (str);
+ } else {
+ gbq = FindOrAddQual (sfp, "product");
+ gbq->val = MemFree (gbq->val);
+ gbq->val = str;
+ }
+ }
+ }
+}
+
+
+extern void AddRnaSpecificQuals (SeqFeatPtr sfp, DialoG d)
+{
+ RnaPagePtr rpp;
+ UIEnum val;
+
+ rpp = (RnaPagePtr) GetObjectExtra (d);
+ if (rpp == NULL || sfp == NULL) return;
+
+ if (GetEnumPopup (rpp->type, rna_type_alist, &val)) {
+ AddRnaSpecificQualsForType (sfp, rpp, val);
+ SetRNAMiscNameForType (sfp, val);
+ if (val != 8) {
+ RemoveQualByName (sfp, "ncRNA_class");
+ }
+ if (val != 8 && val != 9 && val != 255) {
+ ConvertProductQualToRnaRefName (sfp);
+ }
+ }
+}
+
+
+extern void SetRnaSpecificQuals (SeqFeatPtr sfp, DialoG d)
+{
+ RnaPagePtr rpp;
+ RnaRefPtr rrp;
+ GBQualPtr gbq;
+
+ rpp = (RnaPagePtr) GetObjectExtra (d);
+ if (rpp == NULL || sfp == NULL || sfp->data.choice != SEQFEAT_RNA || sfp->data.value.ptrvalue == NULL) return;
+
+ rrp = (RnaRefPtr) sfp->data.value.ptrvalue;
+ if ((rrp->type == 5 || rrp->type == 6 || rrp->type == 7)
+ && rrp->ext.choice == 1
+ && StringCmp (rrp->ext.value.ptrvalue, "ncRNA") != 0) {
+ SetTitle (rpp->ncrnaProduct, rrp->ext.value.ptrvalue);
+ }
+ else if (rrp->type != 255 || rrp->ext.choice != 1) return;
+
+ if (StringCmp (rrp->ext.value.ptrvalue, "ncRNA") == 0) {
+ gbq = sfp->qual;
+ while (gbq != NULL) {
+ if (StringCmp (gbq->qual, "ncRNA_class") == 0) {
+ PointerToDialog (rpp->ncrnaClass, gbq->val);
+ } else if (StringCmp (gbq->qual, "product") == 0) {
+ SetTitle (rpp->ncrnaProduct, gbq->val);
+ }
+ gbq = gbq->next;
+ }
+ } else if (StringCmp (rrp->ext.value.ptrvalue, "tmRNA") == 0) {
+ gbq = sfp->qual;
+ while (gbq != NULL) {
+ if (StringCmp (gbq->qual, "tag_peptide") == 0) {
+ PointerToDialog (rpp->tmrnaTagPeptide, gbq->val);
+ } else if (StringCmp (gbq->qual, "product") == 0) {
+ SetTitle (rpp->tmrnaProduct, gbq->val);
+ }
+ gbq = gbq->next;
+ }
+ } else if (IsStringInNcRNAClassList (rrp->ext.value.ptrvalue)) {
+ gbq = sfp->qual;
+ while (gbq != NULL) {
+ if (StringCmp (gbq->qual, "product") == 0) {
+ SetTitle (rpp->ncrnaProduct, gbq->val);
+ }
+ gbq = gbq->next;
+ }
+ } else if (StringCmp (rrp->ext.value.ptrvalue, "misc_RNA") == 0) {
+ gbq = sfp->qual;
+ while (gbq != NULL) {
+ if (StringCmp (gbq->qual, "product") == 0) {
+ SetTitle (rpp->name, gbq->val);
+ }
+ gbq = gbq->next;
+ }
+ }
+}
+
+
+extern void ConvertToOldRNAFormat (SeqFeatPtr sfp)
+{
+ RnaRefPtr rrp;
+ GBQualPtr gbq, gbq_prod = NULL, gbq_class = NULL, gbq_prev = NULL, gbq_next;
+ Boolean do_convert = TRUE;
+
+ if (sfp == NULL || sfp->data.choice != SEQFEAT_RNA)
+ {
+ return;
+ }
+
+ rrp = (RnaRefPtr) sfp->data.value.ptrvalue;
+ if (rrp == NULL || rrp->type != 255 || rrp->ext.choice != 1
+ || StringCmp (rrp->ext.value.ptrvalue, "ncRNA") != 0)
+ {
+ return;
+ }
+ for (gbq = sfp->qual; gbq != NULL && (gbq_prod == NULL || gbq_class == NULL); gbq = gbq->next)
+ {
+ if (StringCmp (gbq->qual, "ncRNA_class") == 0)
+ {
+ gbq_class = gbq;
+ }
+ else if (StringCmp (gbq->qual, "product") == 0)
+ {
+ gbq_prod = gbq;
+ }
+ }
+
+ if (gbq_class == NULL)
+ {
+ do_convert = FALSE;
+ }
+ else if (StringCmp (gbq_class->val, "snRNA") == 0)
+ {
+ rrp->type = 5;
+ }
+ else if (StringCmp (gbq_class->val, "scRNA") == 0)
+ {
+ rrp->type = 6;
+ }
+ else if (StringCmp (gbq_class->val, "snoRNA") == 0)
+ {
+ rrp->type = 7;
+ }
+ else if (IsStringInNcRNAClassList (gbq_class->val))
+ {
+ do_convert = FALSE;
+ rrp->ext.value.ptrvalue = MemFree (rrp->ext.value.ptrvalue);
+ rrp->ext.value.ptrvalue = StringSave (gbq_class->val);
+ RemoveQualByName (sfp, "ncRNA_class");
+ }
+ else
+ {
+ do_convert = FALSE;
+ }
+ if (do_convert)
+ {
+ if (gbq_prod == NULL)
+ {
+ rrp->ext.choice = 0;
+ rrp->ext.value.ptrvalue = MemFree (rrp->ext.value.ptrvalue);
+ }
+ else
+ {
+ rrp->ext.value.ptrvalue = MemFree (rrp->ext.value.ptrvalue);
+ rrp->ext.value.ptrvalue = gbq_prod->val;
+ gbq_prod->val = NULL;
+ }
+ gbq = sfp->qual;
+ while (gbq != NULL)
+ {
+ gbq_next = gbq->next;
+ if (StringCmp (gbq->qual, "ncRNA_class") == 0
+ || StringCmp (gbq->qual, "product") == 0)
+ {
+ if (gbq_prev == NULL)
+ {
+ sfp->qual = gbq->next;
+ }
+ else
+ {
+ gbq_prev->next = gbq->next;
+ }
+ gbq->next = NULL;
+ gbq = GBQualFree (gbq);
+ }
+ else
+ {
+ gbq_prev = gbq;
+ }
+ gbq = gbq_next;
+ }
+ }
+}
+
+
static void SetRnaImportExportItems (RnaFormPtr rfp)
{
@@ -6214,91 +6884,126 @@ static void SetRnaImportExportItems (RnaFormPtr rfp)
}
}
-static void ChangeRnaProc (PopuP p)
+static void SetRnaType (RnaPagePtr rpp, Uint2 subtype)
{
RnaFormPtr rfp;
- RnaPagePtr rpp;
- UIEnum val;
+ RnaRefPtr rrp = NULL;
- rpp = (RnaPagePtr) GetObjectExtra (p);
- if (rpp != NULL) {
+ if (rpp != NULL && rpp->rfp != NULL) {
rfp = rpp->rfp;
- if (GetEnumPopup (rpp->type, rna_type_alist, &val)) {
- switch (val) {
- case 0 :
- SafeHide (rpp->nameGrp);
- SafeHide (rpp->rrnaPrompt);
- SafeHide (rpp->ornaPrompt);
- SafeHide (rpp->trnaGrp);
- SafeHide (rfp->product);
- SafeHide (rfp->usrobjext);
- break;
- case 2 :
- SafeHide (rpp->trnaGrp);
- SafeHide (rpp->rrnaPrompt);
- SafeHide (rpp->ornaPrompt);
- SafeShow (rpp->nameGrp);
- SafeShow (rfp->product);
- SafeShow (rfp->usrobjext);
- break;
- case 3 :
- SafeHide (rpp->nameGrp);
- SafeHide (rpp->rrnaPrompt);
- SafeHide (rpp->ornaPrompt);
- SafeShow (rpp->trnaGrp);
- SafeShow (rfp->product);
- SafeHide (rfp->usrobjext);
- break;
- case 4 :
- SafeHide (rpp->trnaGrp);
- SafeHide (rpp->ornaPrompt);
- SafeShow (rpp->rrnaPrompt);
- SafeShow (rpp->nameGrp);
- SafeShow (rfp->product);
- SafeHide (rfp->usrobjext);
- break;
- case 5 :
- SafeHide (rpp->trnaGrp);
- SafeHide (rpp->rrnaPrompt);
- SafeHide (rpp->ornaPrompt);
- SafeShow (rpp->nameGrp);
- SafeShow (rfp->product);
- SafeHide (rfp->usrobjext);
- break;
- case 6 :
- SafeHide (rpp->trnaGrp);
- SafeHide (rpp->rrnaPrompt);
- SafeHide (rpp->ornaPrompt);
- SafeShow (rpp->nameGrp);
- SafeShow (rfp->product);
- SafeHide (rfp->usrobjext);
- break;
- case 7 :
- SafeHide (rpp->trnaGrp);
- SafeHide (rpp->rrnaPrompt);
- SafeHide (rpp->ornaPrompt);
- SafeShow (rpp->nameGrp);
- SafeShow (rfp->product);
- SafeHide (rfp->usrobjext);
- break;
- case 255 :
- SafeHide (rpp->trnaGrp);
- SafeHide (rpp->rrnaPrompt);
- SafeShow (rpp->ornaPrompt);
- SafeShow (rpp->nameGrp);
- SafeShow (rfp->product);
- SafeHide (rfp->usrobjext);
- break;
- default :
- SafeHide (rpp->trnaGrp);
- SafeHide (rpp->rrnaPrompt);
- SafeHide (rpp->ornaPrompt);
- SafeShow (rpp->nameGrp);
- SafeHide (rfp->product);
- SafeHide (rfp->usrobjext);
- break;
- }
+ switch (subtype) {
+ case 0 :
+ SafeHide (rpp->nameGrp);
+ SafeHide (rpp->rrnaPrompt);
+ SafeHide (rpp->ornaPrompt);
+ SafeHide (rpp->trnaGrp);
+ SafeHide (rfp->product);
+ SafeHide (rfp->usrobjext);
+ SafeHide (rpp->ncrnaGrp);
+ SafeHide (rpp->tmrnaGrp);
+ break;
+ case FEATDEF_mRNA:
+ SafeHide (rpp->trnaGrp);
+ SafeHide (rpp->rrnaPrompt);
+ SafeHide (rpp->ornaPrompt);
+ SafeShow (rpp->nameGrp);
+ SafeShow (rfp->product);
+ SafeShow (rfp->usrobjext);
+ SafeHide (rpp->ncrnaGrp);
+ SafeHide (rpp->tmrnaGrp);
+ break;
+ case FEATDEF_preRNA :
+ SafeHide (rpp->trnaGrp);
+ SafeHide (rpp->rrnaPrompt);
+ SafeHide (rpp->ornaPrompt);
+ SafeShow (rpp->nameGrp);
+ SafeShow (rfp->product);
+ SafeShow (rfp->usrobjext);
+ SafeHide (rpp->ncrnaGrp);
+ SafeHide (rpp->tmrnaGrp);
+ break;
+ case FEATDEF_tRNA :
+ SafeHide (rpp->nameGrp);
+ SafeHide (rpp->rrnaPrompt);
+ SafeHide (rpp->ornaPrompt);
+ SafeShow (rpp->trnaGrp);
+ SafeShow (rfp->product);
+ SafeHide (rfp->usrobjext);
+ SafeHide (rpp->ncrnaGrp);
+ SafeHide (rpp->tmrnaGrp);
+ break;
+ case FEATDEF_rRNA :
+ SafeHide (rpp->trnaGrp);
+ SafeHide (rpp->ornaPrompt);
+ SafeShow (rpp->rrnaPrompt);
+ SafeShow (rpp->nameGrp);
+ SafeShow (rfp->product);
+ SafeHide (rfp->usrobjext);
+ SafeHide (rpp->ncrnaGrp);
+ SafeHide (rpp->tmrnaGrp);
+ break;
+ case FEATDEF_snRNA :
+ case FEATDEF_scRNA :
+ case FEATDEF_snoRNA :
+ SafeHide (rpp->trnaGrp);
+ SafeHide (rpp->rrnaPrompt);
+ SafeHide (rpp->ornaPrompt);
+ SafeHide (rpp->nameGrp);
+ SafeShow (rfp->product);
+ SafeHide (rfp->usrobjext);
+ SafeShow (rpp->ncrnaGrp);
+ SafeHide (rpp->tmrnaGrp);
+ if (subtype == FEATDEF_snRNA) {
+ PointerToDialog (rpp->ncrnaClass, "snRNA");
+
+ } else if (subtype == FEATDEF_scRNA) {
+ PointerToDialog (rpp->ncrnaClass, "scRNA");
+ } else if (subtype == FEATDEF_snoRNA) {
+ PointerToDialog (rpp->ncrnaClass, "snoRNA");
+ } else if (subtype == FEATDEF_snoRNA) {
+ PointerToDialog (rpp->ncrnaClass, "miscRNA");
+ }
+ break;
+
+ case FEATDEF_ncRNA :
+ SafeHide (rpp->trnaGrp);
+ SafeHide (rpp->rrnaPrompt);
+ SafeHide (rpp->ornaPrompt);
+ SafeHide (rpp->nameGrp);
+ SafeShow (rfp->product);
+ SafeHide (rfp->usrobjext);
+ SafeShow (rpp->ncrnaGrp);
+ SafeHide (rpp->tmrnaGrp);
+ break;
+ case FEATDEF_tmRNA :
+ SafeHide (rpp->trnaGrp);
+ SafeHide (rpp->rrnaPrompt);
+ SafeHide (rpp->ornaPrompt);
+ SafeHide (rpp->nameGrp);
+ SafeShow (rfp->product);
+ SafeHide (rfp->usrobjext);
+ SafeHide (rpp->ncrnaGrp);
+ SafeShow (rpp->tmrnaGrp);
+ break;
+ case FEATDEF_otherRNA :
+ SafeHide (rpp->trnaGrp);
+ SafeHide (rpp->rrnaPrompt);
+ SafeShow (rpp->ornaPrompt);
+ SafeShow (rpp->nameGrp);
+ SafeShow (rfp->product);
+ SafeHide (rfp->usrobjext);
+ break;
+ default :
+ SafeHide (rpp->trnaGrp);
+ SafeHide (rpp->rrnaPrompt);
+ SafeHide (rpp->ornaPrompt);
+ SafeShow (rpp->nameGrp);
+ SafeHide (rfp->product);
+ SafeHide (rfp->usrobjext);
+ SafeHide (rpp->ncrnaGrp);
+ SafeHide (rpp->tmrnaGrp);
+ break;
}
SetRnaImportExportItems (rpp->rfp);
Update ();
@@ -6356,6 +7061,173 @@ static CharPtr trnaTabs [] = {
"Amino Acid", "Codons", "Anticodon", NULL
};
+
+static Uint1 RnaTypeFromFeatdef (Uint2 featdef)
+{
+ switch (featdef)
+ {
+ case FEATDEF_preRNA:
+ return 1;
+ break;
+ case FEATDEF_mRNA:
+ return 2;
+ break;
+ case FEATDEF_tRNA:
+ return 3;
+ break;
+ case FEATDEF_rRNA:
+ return 4;
+ break;
+ case FEATDEF_snRNA:
+ return 8;
+ break;
+ case FEATDEF_scRNA:
+ return 8;
+ break;
+ case FEATDEF_snoRNA:
+ return 8;
+ break;
+ case FEATDEF_ncRNA:
+ return 8;
+ break;
+ case FEATDEF_tmRNA:
+ return 9;
+ break;
+ case FEATDEF_otherRNA:
+ default:
+ return 255;
+ break;
+ }
+}
+
+
+static void ChangeRNAType (PopuP p)
+
+{
+ Char ch;
+ Int2 expev;
+ Int2 geneval;
+ HelpMessageFunc helpfunc;
+ RnaFormPtr rfp;
+ RnaFormPtr newrfp;
+ RnaRefPtr rrp;
+ RnaPagePtr rpp;
+ ObjMgrPtr omp;
+ ObjMgrTypePtr omtp;
+ CharPtr ptr;
+ SeqEntryPtr sep;
+ SeqFeatPtr sfp;
+ Char title [128];
+ WindoW w;
+ UIEnum val;
+ GBQualPtr gbq;
+
+ rfp = (RnaFormPtr) GetObjectExtra (p);
+ if (rfp == NULL) return;
+ rpp = (RnaPagePtr) GetObjectExtra (rfp->data);
+ if (rpp == NULL) return;
+ sfp = SeqFeatNew ();
+ if (sfp != NULL) {
+ if (GetEnumPopup (rpp->type, rna_type_alist, &val)) {
+
+ sfp->data.choice = SEQFEAT_RNA;
+ sfp->data.value.ptrvalue = DialogToPointer (rfp->data);
+ sfp->comment = SaveStringFromText (rfp->comment);
+ ptr = sfp->comment;
+ if (ptr != NULL) {
+ ch = *ptr;
+ while (ch != '\0') {
+ if (ch < ' ' || ch > '~') {
+ *ptr = '~';
+ }
+ ptr++;
+ ch = *ptr;
+ }
+ }
+ expev = GetValue (rfp->evidence);
+ if (expev > 0 && expev <= 3) {
+ sfp->exp_ev = expev - 1;
+ } else {
+ sfp->exp_ev = 0;
+ }
+ sfp->partial = GetStatus (rfp->partial);
+ sfp->excpt = GetStatus (rfp->exception);
+ sfp->title = NULL;
+ sfp->product = DialogToPointer (rfp->product);
+ sfp->location = DialogToPointer (rfp->location);
+ sfp->cit = DialogToPointer (rfp->featcits);
+ sfp->dbxref = DialogToPointer (rfp->dbxrefs);
+ sfp->qual = DialogToPointer (rfp->gbquals);
+ CleanupEvidenceGBQuals (&(sfp->qual));
+ VisStringDialogToGbquals (sfp, rfp->experiment, "experiment");
+ InferenceDialogToGBQuals (rfp->inference, sfp, TRUE);
+ AddRnaSpecificQualsForType (sfp, rpp, rpp->prev_rna_type < 0 ? val : rpp->prev_rna_type);
+ if (rpp->prev_rna_type == 8 && val != 8) {
+ RemoveQualByName (sfp, "ncRNA_class");
+ }
+ if (rpp->prev_rna_type == 8 || rpp->prev_rna_type == 9 || rpp->prev_rna_type == 255) {
+ if (val != 8 && val != 9 && val != 255) {
+ ConvertProductQualToRnaRefName (sfp);
+ }
+ } else if (val == 8 || val == 9 || val == 255) {
+ if (rpp->name != NULL && !TextHasNoText (rpp->name)) {
+ gbq = FindOrAddQual (sfp, "product");
+ gbq->val = SaveStringFromText (rpp->name);
+ }
+ }
+
+ SetRNAMiscNameForType (sfp, val);
+ rpp->prev_rna_type = val;
+
+ geneval = GetValue (rfp->gene);
+ sep = GetTopSeqEntryForEntityID (rfp->input_entityID);
+ StringCpy (title, "RNA");
+ if (sfp != NULL && sfp->data.value.ptrvalue != NULL) {
+ rrp = (RnaRefPtr) sfp->data.value.ptrvalue;
+ /* set title based on type of RNA feature */
+ }
+ /* need to set subtype to correctly calculate which quals should be suppressed */
+ sfp->idx.subtype = RnaFeatDefFromRnaRef ((RnaRefPtr)sfp->data.value.ptrvalue);
+ w = (WindoW) CreateRnaForm (-50, -33, title, sfp, sep, RnaFeatDefFromRnaRef (rrp),
+ StdFeatFormActnProc);
+ newrfp = (RnaFormPtr) GetObjectExtra (w);
+ if (newrfp != NULL) {
+ newrfp->input_entityID = rfp->input_entityID;
+ newrfp->input_itemID = rfp->input_itemID;
+ newrfp->input_itemtype = rfp->input_itemtype;
+ newrfp->this_itemtype = rfp->this_itemtype;
+ newrfp->this_subtype = rfp->this_subtype;
+ if (sfp != NULL) {
+ omp = ObjMgrGet ();
+ if (omp != NULL) {
+ omtp = ObjMgrTypeFind (omp, OBJ_SEQFEAT, NULL, NULL);
+ if (omtp != NULL && omtp->subtypefunc != NULL) {
+ newrfp->this_subtype = (*(omtp->subtypefunc)) (sfp);
+ }
+ }
+ }
+ SendMessageToForm (newrfp->form, VIB_MSG_INIT);
+ SetValue (newrfp->gene, geneval);
+ if (sfp != NULL) {
+ PointerToForm (newrfp->form, (Pointer) sfp);
+ }
+ }
+ Remove (rfp->form);
+ Show (w);
+ Select (w);
+ helpfunc = (HelpMessageFunc) GetAppProperty ("HelpMessageProc");
+ if (helpfunc != NULL) {
+ helpfunc ("Features", title);
+ }
+ }
+ SeqFeatFree (sfp);
+ Update ();
+ }
+}
+
+
+
+
static DialoG CreateRnaDialog (GrouP h, CharPtr title,
Uint2 subtype, SeqEntryPtr sep,
SeqFeatPtr sfp, RnaFormPtr rfp)
@@ -6375,6 +7247,8 @@ static DialoG CreateRnaDialog (GrouP h, CharPtr title,
PrompT t;
DialoG tbs;
GrouP x;
+ Uint1 rna_type;
+ Uint2 entityID;
p = HiddenGroup (h, 1, 0, NULL);
SetGroupSpacing (p, 10, 10);
@@ -6388,6 +7262,8 @@ static DialoG CreateRnaDialog (GrouP h, CharPtr title,
rpp->fromdialog = RnaPageToRnaRefPtr;
rpp->testdialog = NULL;
+ rpp->prev_rna_type = -1;
+
if (title != NULL && title [0] != '\0') {
s = NormalGroup (p, 0, -2, title, systemFont, NULL);
} else {
@@ -6400,11 +7276,14 @@ static DialoG CreateRnaDialog (GrouP h, CharPtr title,
f = HiddenGroup (m, -2, 0, NULL);
StaticPrompt (f, "Type", 0, popupMenuHeight, programFont, 'l');
- rpp->type = PopupList (f, TRUE, ChangeRnaProc);
- SetObjectExtra (rpp->type, rpp, NULL);
+ rpp->type = PopupList (f, TRUE, ChangeRNAType);
+ SetObjectExtra (rpp->type, rfp, NULL);
InitEnumPopup (rpp->type, rna_type_alist, NULL);
SetEnumPopup (rpp->type, rna_type_alist, (UIEnum) 0);
+ StaticPrompt (m, "Changing RNA type will recreate the window.",
+ 0, 0, programFont, 'c');
+
showpseudo = FALSE;
if (sfp != NULL && sfp->data.choice == SEQFEAT_RNA) {
rrp = (RnaRefPtr) sfp->data.value.ptrvalue;
@@ -6429,15 +7308,6 @@ static DialoG CreateRnaDialog (GrouP h, CharPtr title,
x = HiddenGroup (rpp->nameGrp, 0, 0, NULL);
rpp->rrnaPrompt = StaticPrompt (x, "E.g., 16S ribosomal RNA", 0, 0, programFont, 'c');
rpp->ornaPrompt = StaticPrompt (x, "E.g., internal transcribed spacer 1", 0, 0, programFont, 'c');
- if ((sfp != NULL && (sfp->product != NULL || sfp->ext != NULL)) || indexerVersion) {
- rfp->product = CreateProteinOrMRNAProductDialog (rpp->nameGrp, NULL, "cDNA Product ", TRUE, sep, NULL, rfp, (BaseFormPtr) rfp);
- rfp->usrobjext = CreateMrnaUserObjectDialog (rpp->nameGrp, "Protein Product", sep, (BaseFormPtr) rfp);
- }
- if ((sfp != NULL && sfp->product != NULL) || indexerVersion) {
- x = HiddenGroup (rpp->nameGrp, 2, 0, NULL);
- StaticPrompt (x, "SeqID", 0, dialogTextHeight, programFont, 'l');
- rfp->prodSeqIdTxt = DialogText (x, "", 6, NULL);
- }
AlignObjects (ALIGN_CENTER, (HANDLE) q, (HANDLE) rpp->rrnaPrompt, (HANDLE) rpp->ornaPrompt, NULL);
Hide (rpp->nameGrp);
@@ -6468,81 +7338,38 @@ static DialoG CreateRnaDialog (GrouP h, CharPtr title,
(HANDLE) rpp->trnaPages [2], NULL);
AlignObjects (ALIGN_CENTER, (HANDLE) f, (HANDLE) rpp->nameGrp,
(HANDLE) rpp->trnaGrp, (HANDLE) rpp->pseudo,NULL);
+ Hide (rpp->ncrnaGrp);
+
+ rpp->ncrnaGrp = HiddenGroup (g, 2, 0, NULL);
+ SetGroupSpacing (rpp->ncrnaGrp, 10, 10);
+ StaticPrompt (rpp->ncrnaGrp, "Class", 0, popupMenuHeight, programFont, 'l');
+ rpp->ncrnaClass = CreatencRNAClassDialog (rpp->ncrnaGrp, FALSE, NULL, NULL);
+ StaticPrompt (rpp->ncrnaGrp, "Product", 0, dialogTextHeight, programFont, 'l');
+ rpp->ncrnaProduct = DialogText (rpp->ncrnaGrp, "", 10, NULL);
+ Hide (rpp->ncrnaGrp);
+
+ rpp->tmrnaGrp = HiddenGroup (g, 2, 0, NULL);
+ SetGroupSpacing (rpp->tmrnaGrp, 10, 10);
+ StaticPrompt (rpp->tmrnaGrp, "Tag Peptide", 0, dialogTextHeight, programFont, 'l');
+ rpp->tmrnaTagPeptide = CreateRptUnitRangeDialog (rpp->tmrnaGrp, NULL, NULL, NULL, NULL);
+ StaticPrompt (rpp->tmrnaGrp, "Product", 0, dialogTextHeight, programFont, 'l');
+ rpp->tmrnaProduct = DialogText (rpp->tmrnaGrp, "", 10, NULL);
+ Hide (rpp->tmrnaGrp);
+
+ if (sfp != NULL && sfp->data.choice == SEQFEAT_RNA && sfp->data.value.ptrvalue != NULL) {
+ rna_type = RnaSubtypeFromRnaRef ((RnaRefPtr)sfp->data.value.ptrvalue);
+ } else {
+ rna_type = RnaTypeFromFeatdef (subtype);
+ }
+ SetEnumPopup (rpp->type, rna_type_alist, (UIEnum) rna_type);
+ rpp->prev_rna_type = rna_type;
- switch (subtype) {
- case 0 :
- SafeHide (rpp->nameGrp);
- SafeHide (rpp->rrnaPrompt);
- SafeHide (rpp->ornaPrompt);
- SafeHide (rpp->trnaGrp);
- SafeHide (rfp->product);
- SafeHide (rfp->usrobjext);
- break;
- case FEATDEF_mRNA :
- SafeHide (rpp->trnaGrp);
- SafeHide (rpp->rrnaPrompt);
- SafeHide (rpp->ornaPrompt);
- SafeShow (rpp->nameGrp);
- SafeShow (rfp->product);
- SafeShow (rfp->usrobjext);
- break;
- case FEATDEF_tRNA :
- SafeHide (rpp->nameGrp);
- SafeHide (rpp->rrnaPrompt);
- SafeHide (rpp->ornaPrompt);
- SafeShow (rpp->trnaGrp);
- SafeShow (rfp->product);
- SafeHide (rfp->usrobjext);
- break;
- case FEATDEF_rRNA :
- SafeHide (rpp->trnaGrp);
- SafeHide (rpp->ornaPrompt);
- SafeShow (rpp->rrnaPrompt);
- SafeShow (rpp->nameGrp);
- SafeShow (rfp->product);
- SafeHide (rfp->usrobjext);
- break;
- case FEATDEF_snRNA :
- SafeHide (rpp->trnaGrp);
- SafeHide (rpp->ornaPrompt);
- SafeHide (rpp->rrnaPrompt);
- SafeShow (rpp->nameGrp);
- SafeShow (rfp->product);
- SafeHide (rfp->usrobjext);
- break;
- case FEATDEF_scRNA :
- SafeHide (rpp->trnaGrp);
- SafeHide (rpp->ornaPrompt);
- SafeHide (rpp->rrnaPrompt);
- SafeShow (rpp->nameGrp);
- SafeShow (rfp->product);
- SafeHide (rfp->usrobjext);
- break;
- case FEATDEF_snoRNA :
- SafeHide (rpp->trnaGrp);
- SafeHide (rpp->ornaPrompt);
- SafeHide (rpp->rrnaPrompt);
- SafeShow (rpp->nameGrp);
- SafeShow (rfp->product);
- SafeHide (rfp->usrobjext);
- break;
- case FEATDEF_otherRNA :
- SafeHide (rpp->trnaGrp);
- SafeHide (rpp->rrnaPrompt);
- SafeShow (rpp->ornaPrompt);
- SafeShow (rpp->nameGrp);
- SafeShow (rfp->product);
- SafeHide (rfp->usrobjext);
- break;
- default :
- SafeHide (rpp->trnaGrp);
- SafeHide (rpp->ornaPrompt);
- SafeHide (rpp->rrnaPrompt);
- SafeShow (rpp->nameGrp);
- SafeHide (rfp->product);
- SafeHide (rfp->usrobjext);
- break;
+ if ((sfp != NULL && sfp->product != NULL) || indexerVersion) {
+ entityID = SeqMgrGetEntityIDForSeqEntry(sep);
+ rfp->product = CreateRNATranscriptIDDialog (m, entityID, TRUE, NULL, NULL);
}
+
+ SetRnaType (rpp, subtype);
}
return (DialoG) p;
@@ -6741,13 +7568,10 @@ static void RnaFormActivate (WindoW w)
static void RnaRefPtrToForm (ForM f, Pointer data)
{
- BioseqPtr bsp;
- Char id [41];
SeqEntryPtr oldsep;
RnaFormPtr rfp;
SeqEntryPtr sep;
SeqFeatPtr sfp;
- SeqIdPtr sip;
Int4 val;
rfp = (RnaFormPtr) GetObjectExtra (f);
@@ -6772,16 +7596,6 @@ static void RnaRefPtrToForm (ForM f, Pointer data)
}
SeqFeatPtrToCommon ((FeatureFormPtr) rfp, sfp);
PointerToDialog (rfp->product, sfp->product);
- if (sfp->product != NULL) {
- sip = SeqLocId (sfp->product);
- if (sip != NULL) {
- bsp = BioseqFind (sip);
- if (bsp == NULL) {
- SeqIdWrite (sip, id, PRINTID_FASTA_LONG, sizeof (id));
- SafeSetTitle (rfp->prodSeqIdTxt, id);
- }
- }
- }
}
SeqEntrySetScope (oldsep);
}
@@ -6875,6 +7689,7 @@ extern ForM CreateRnaForm (Int2 left, Int2 top, CharPtr title,
s = HiddenGroup (h, -1, 0, NULL);
SetGroupSpacing (s, 3, 10);
rfp->data = CreateRnaDialog (s, NULL, subtype, sep, sfp, rfp);
+ SetRnaSpecificQuals (sfp, rfp->data);
rfp->pages [RNA_PAGE] = s;
Hide (rfp->pages [RNA_PAGE]);
rnaFormTabs [0] = NULL;
@@ -6987,7 +7802,7 @@ extern Int2 LIBCALLBACK RnaGenFunc (Pointer data)
if (sfp != NULL && sfp->data.value.ptrvalue != NULL) {
rrp = (RnaRefPtr) sfp->data.value.ptrvalue;
StringNCpy_0 (title,
- GetEnumName ((UIEnum) rrp->type, rna_type_alist),
+ GetEnumName (RnaSubtypeFromRnaRef(rrp), rna_type_alist),
sizeof (title));
if (StringHasNoText (title)) {
StringCpy (title, "Unknown RNA");
@@ -7043,27 +7858,16 @@ extern Int2 LIBCALLBACK RnaGenFunc (Pointer data)
rpp = (RnaPagePtr) GetObjectExtra (rfp->data);
if (rpp != NULL) {
SetNewFeatureDefaultInterval ((FeatureFormPtr) rfp);
- if (subtype >= FEATDEF_preRNA && subtype <= FEATDEF_scRNA) {
- SetEnumPopup (rpp->type, rna_type_alist,
- (UIEnum) check_rna_type (subtype - FEATDEF_preRNA + 1));
- if (subtype == FEATDEF_tRNA)
- {
- /* attempt to provide default location for anticodons */
- SeqLocPtr tmp_loc = NULL;
-
- tmp_loc = DialogToPointer (rpp->rfp->location);
- PointerToDialog (rpp->anticodon, tmp_loc);
- SetSequenceAndStrandForIntervalPage (rpp->anticodon);
- SeqLocFree (tmp_loc);
- }
- } else if (subtype == FEATDEF_snoRNA) {
- SetEnumPopup (rpp->type, rna_type_alist,
- (UIEnum) check_rna_type (7));
- } else if (subtype == FEATDEF_otherRNA) {
- SetEnumPopup (rpp->type, rna_type_alist,
- (UIEnum) check_rna_type (255));
- } else {
- SetEnumPopup (rpp->type, rna_type_alist, (UIEnum) 0);
+ SetEnumPopup (rpp->type, rna_type_alist, RnaTypeFromFeatdef (subtype));
+ if (subtype == FEATDEF_tRNA)
+ {
+ /* attempt to provide default location for anticodons */
+ SeqLocPtr tmp_loc = NULL;
+
+ tmp_loc = DialogToPointer (rpp->rfp->location);
+ PointerToDialog (rpp->anticodon, tmp_loc);
+ SetSequenceAndStrandForIntervalPage (rpp->anticodon);
+ SeqLocFree (tmp_loc);
}
}
}
@@ -7077,3 +7881,645 @@ extern Int2 LIBCALLBACK RnaGenFunc (Pointer data)
return OM_MSG_RET_DONE;
}
+
+typedef struct ncrnaclassdlg {
+ DIALOG_MESSAGE_BLOCK
+ PopuP ncrnaclass;
+ TexT otherclass;
+ Nlm_ChangeNotifyProc change_notify;
+ Pointer change_userdata;
+ Boolean is_constraint;
+
+} NcrnaClassDlgData, PNTR NcrnaClassDlgPtr;
+
+static void ChangeNcrnaClass (PopuP p)
+{
+ NcrnaClassDlgPtr dlg;
+
+ dlg = (NcrnaClassDlgPtr) GetObjectExtra (p);
+ if (dlg == NULL) return;
+
+ if (GetValue (dlg->ncrnaclass) == NcrnaOTHER) {
+ Show (dlg->otherclass);
+ } else {
+ Hide (dlg->otherclass);
+ }
+
+ if (dlg->change_notify != NULL) {
+ (dlg->change_notify) (dlg->change_userdata);
+ }
+}
+
+
+static void ChangeNcrnaOtherClass (TexT t)
+{
+ NcrnaClassDlgPtr dlg;
+
+ dlg = (NcrnaClassDlgPtr) GetObjectExtra (t);
+ if (dlg == NULL) return;
+ if (dlg->change_notify != NULL) {
+ (dlg->change_notify) (dlg->change_userdata);
+ }
+}
+
+
+static void PointerToNcrnaClassDialog (DialoG d, Pointer data)
+{
+ NcrnaClassDlgPtr dlg;
+ CharPtr PNTR cpp;
+ Int4 pos = NcrnaOTHER;
+
+ dlg = (NcrnaClassDlgPtr) GetObjectExtra (d);
+ if (dlg == NULL) return;
+
+ if (data == NULL) {
+ if (dlg->is_constraint) {
+ pos = NcrnaOTHER + 1;
+ }
+ } else {
+ if (data != NULL) {
+ for (cpp = ncrnaClassList, pos = 1;
+ *cpp != NULL && pos < NcrnaOTHER;
+ cpp++, pos++) {
+ if (StringCmp (*cpp, (CharPtr) data) == 0) {
+ break;
+ }
+ }
+ }
+ }
+
+ SetValue (dlg->ncrnaclass, pos);
+ if (pos == NcrnaOTHER) {
+ SetTitle (dlg->otherclass, (CharPtr) data);
+ Show (dlg->otherclass);
+ } else {
+ Hide (dlg->otherclass);
+ }
+}
+
+
+static Pointer NcrnaClassDialogToPointer (DialoG d)
+{
+ NcrnaClassDlgPtr dlg;
+ Int4 pos;
+
+ dlg = (NcrnaClassDlgPtr) GetObjectExtra (d);
+ if (dlg == NULL) return NULL;
+ pos = GetValue (dlg->ncrnaclass);
+ if (pos > 0 && pos < NcrnaOTHER) {
+ return StringSave (ncrnaClassList[pos - 1]);
+ } else if (pos == NcrnaOTHER && !TextHasNoText (dlg->otherclass)) {
+ return SaveStringFromText (dlg->otherclass);
+ } else {
+ return NULL;
+ }
+}
+
+
+static ValNodePtr TestNcrnaClassDialog (DialoG d)
+{
+ ValNodePtr err_list = NULL;
+
+ NcrnaClassDlgPtr dlg;
+ Int4 pos;
+
+ dlg = (NcrnaClassDlgPtr) GetObjectExtra (d);
+ if (dlg == NULL) return NULL;
+ pos = GetValue (dlg->ncrnaclass);
+
+ if (pos < 1 && !dlg->is_constraint) {
+ ValNodeAddPointer (&err_list, 0, "No ncRNA class");
+ } else if (pos == NcrnaOTHER) {
+ if (TextHasNoText (dlg->otherclass)) {
+ ValNodeAddPointer (&err_list, 0, "No ncRNA class");
+ }
+ } else if (!dlg->is_constraint && pos > NcrnaOTHER) {
+ ValNodeAddPointer (&err_list, 0, "No ncRNA class");
+ }
+ return err_list;
+}
+
+
+extern DialoG CreatencRNAClassDialog (GrouP h, Boolean is_constraint, Nlm_ChangeNotifyProc change_notify, Pointer change_userdata)
+{
+ NcrnaClassDlgPtr dlg;
+ GrouP p;
+ CharPtr PNTR cpp;
+
+ p = HiddenGroup (h, 2, 0, NULL);
+ dlg = (NcrnaClassDlgPtr) MemNew (sizeof (NcrnaClassDlgData));
+ SetObjectExtra (p, dlg, StdCleanupExtraProc);
+
+ dlg->dialog = (DialoG) p;
+ dlg->todialog = PointerToNcrnaClassDialog;
+ dlg->fromdialog = NcrnaClassDialogToPointer;
+ dlg->testdialog = TestNcrnaClassDialog;
+ dlg->change_notify = change_notify;
+ dlg->change_userdata = change_userdata;
+ dlg->is_constraint = is_constraint;
+
+ dlg->ncrnaclass = PopupList (p, TRUE, ChangeNcrnaClass);
+ SetObjectExtra (dlg->ncrnaclass, dlg, NULL);
+ for (cpp = ncrnaClassList; *cpp != NULL; cpp++) {
+ PopupItem (dlg->ncrnaclass, *cpp);
+ }
+ if (is_constraint) {
+ PopupItem (dlg->ncrnaclass, "Any");
+ SetValue (dlg->ncrnaclass, NcrnaOTHER + 1);
+ } else {
+ SetValue (dlg->ncrnaclass, NcrnaOTHER);
+ }
+ dlg->otherclass = DialogText (p, "", 10, ChangeNcrnaOtherClass);
+ SetObjectExtra (dlg->otherclass, dlg, NULL);
+
+ return (DialoG) p;
+}
+
+
+extern RnaTypePtr RnaTypeFree (RnaTypePtr rtp)
+{
+ if (rtp != NULL)
+ {
+ rtp->ncrna_class = MemFree (rtp->ncrna_class);
+ rtp = MemFree (rtp);
+ }
+ return rtp;
+}
+
+
+extern Boolean MatchesRnaType (SeqFeatPtr sfp, RnaTypePtr rtp)
+{
+ RnaRefPtr rrp;
+ GBQualPtr gbq;
+ Uint1 featdef;
+ Boolean matches = TRUE;
+
+ if (sfp == NULL || sfp->data.choice != SEQFEAT_RNA) return FALSE;
+ if (rtp == NULL || rtp->rna_featdef == FEATDEF_ANY) return TRUE;
+
+ rrp = (RnaRefPtr) sfp->data.value.ptrvalue;
+ if (rrp == NULL) return FALSE;
+
+ featdef = RnaFeatDefFromRnaRef (rrp);
+ if (featdef != rtp->rna_featdef) return FALSE;
+
+ if (featdef == FEATDEF_ncRNA)
+ {
+ if (rtp->ncrna_class == NULL) {
+ matches = TRUE;
+ } else {
+ gbq = sfp->qual;
+ while (gbq != NULL && StringCmp (gbq->qual, "ncRNA_class") != 0)
+ {
+ gbq = gbq->next;
+ }
+ if (gbq == NULL)
+ {
+ if (rrp->ext.choice == 1 && StringCmp (rrp->ext.value.ptrvalue, rtp->ncrna_class) == 0)
+ {
+ matches = TRUE;
+ }
+ else if (StringDoesHaveText (rtp->ncrna_class))
+ {
+ matches = FALSE;
+ }
+ }
+ else if (StringCmp (gbq->val, rtp->ncrna_class) != 0)
+ {
+ matches = FALSE;
+ }
+ }
+ }
+ return matches;
+}
+
+
+static void ClearRNAProduct (RnaRefPtr rrp)
+{
+ tRNAPtr trna;
+
+ if (rrp == NULL || rrp->ext.choice == 0)
+ {
+ return;
+ }
+ if (rrp->ext.choice == 2)
+ {
+ trna = (tRNAPtr)(rrp->ext.value.ptrvalue);
+ if (trna != NULL) {
+ trna->anticodon = SeqLocFree(trna->anticodon);
+ }
+ }
+
+ rrp->ext.value.ptrvalue = MemFree (rrp->ext.value.ptrvalue);
+ rrp->ext.choice = 0;
+}
+
+
+static void MoveRnaProductToQual (SeqFeatPtr sfp)
+{
+ RnaRefPtr rrp;
+ CharPtr product = NULL;
+ GBQualPtr gbq;
+
+ if (sfp == NULL || sfp->data.choice != SEQFEAT_RNA || sfp->data.value.ptrvalue == NULL)
+ {
+ return;
+ }
+
+ rrp = (RnaRefPtr) sfp->data.value.ptrvalue;
+ if (rrp->ext.choice == 1)
+ {
+ product = rrp->ext.value.ptrvalue;
+ rrp->ext.value.ptrvalue = NULL;
+ }
+ ClearRNAProduct (rrp);
+ rrp->ext.choice = 1;
+ rrp->ext.value.ptrvalue = StringSave ("ncRNA");
+ if (product != NULL)
+ {
+ gbq = FindOrAddQual (sfp, "product");
+ gbq->val = product;
+ }
+}
+
+
+extern void ApplyRnaTypeToSeqFeat (SeqFeatPtr sfp, RnaTypePtr rtp)
+{
+ RnaRefPtr rrp;
+ GBQualPtr gbq;
+
+ if (sfp == NULL || sfp->data.choice != SEQFEAT_RNA)
+ {
+ return;
+ }
+
+ rrp = (RnaRefPtr) sfp->data.value.ptrvalue;
+ if (rrp == NULL)
+ {
+ rrp = RnaRefNew();
+ sfp->data.value.ptrvalue = rrp;
+ }
+
+ if (rtp == NULL || rtp->rna_featdef == FEATDEF_ANY)
+ {
+ return;
+ }
+
+ switch (rtp->rna_featdef)
+ {
+ case FEATDEF_preRNA:
+ rrp->type = 1;
+ break;
+ case FEATDEF_mRNA:
+ rrp->type = 2;
+ break;
+ case FEATDEF_tRNA:
+ rrp->type = 3;
+ break;
+ case FEATDEF_rRNA:
+ rrp->type = 4;
+ break;
+ case FEATDEF_scRNA:
+ rrp->type = 255;
+ MoveRnaProductToQual (sfp);
+ gbq = FindOrAddQual (sfp, "ncRNA_class");
+ gbq->val = MemFree (gbq->val);
+ gbq->val = StringSave ("scRNA");
+ break;
+ case FEATDEF_snRNA:
+ rrp->type = 255;
+ MoveRnaProductToQual (sfp);
+ gbq = FindOrAddQual (sfp, "ncRNA_class");
+ gbq->val = MemFree (gbq->val);
+ gbq->val = StringSave ("snRNA");
+ break;
+ case FEATDEF_snoRNA:
+ rrp->type = 255;
+ MoveRnaProductToQual (sfp);
+ gbq = FindOrAddQual (sfp, "ncRNA_class");
+ gbq->val = MemFree (gbq->val);
+ gbq->val = StringSave ("snoRNA");
+ break;
+ case FEATDEF_ncRNA:
+ rrp->type = 255;
+ MoveRnaProductToQual (sfp);
+ gbq = FindOrAddQual (sfp, "ncRNA_class");
+ gbq->val = MemFree (gbq->val);
+ gbq->val = StringSave (rtp->ncrna_class);
+ break;
+ case FEATDEF_tmRNA:
+ rrp->type = 255;
+ MoveRnaProductToQual (sfp);
+ rrp->ext.value.ptrvalue = MemFree (rrp->ext.value.ptrvalue);
+ rrp->ext.value.ptrvalue = StringSave ("tmRNA");
+ rrp->ext.choice = 1;
+ break;
+ case FEATDEF_otherRNA:
+ rrp->type = 255;
+ if (rrp->ext.choice == 1 && IsStringInNcRNAClassList (rrp->ext.value.ptrvalue))
+ {
+ gbq = FindOrAddQual (sfp, "ncRNA_class");
+ gbq->val = MemFree (gbq->val);
+ gbq->val = rrp->ext.value.ptrvalue;
+ rrp->ext.value.ptrvalue = StringSave ("ncRNA");
+ }
+ break;
+ }
+
+}
+
+
+extern void AddToComment (SeqFeatPtr sfp, CharPtr comment)
+{
+ CharPtr tmp;
+
+ if (sfp == NULL || StringHasNoText (comment)) return;
+
+ if (StringHasNoText (sfp->comment))
+ {
+ sfp->comment = MemFree (sfp->comment);
+ sfp->comment = StringSave (comment);
+ }
+ else
+ {
+ tmp = (CharPtr) MemNew (sizeof (Char) * (StringLen (sfp->comment) + StringLen (comment) + 3));
+ sprintf (tmp, "%s; %s", sfp->comment, comment);
+ sfp->comment = MemFree (sfp->comment);
+ sfp->comment = tmp;
+ }
+}
+
+
+extern void ApplyProductToRNA (SeqFeatPtr sfp, CharPtr product)
+{
+ RnaRefPtr rrp;
+ GBQualPtr gbq;
+ Uint1 aa;
+ Int4 j;
+ Boolean justTrnaText = FALSE;
+ Char codon [16];
+ tRNAPtr trp;
+
+ if (sfp == NULL || sfp->data.choice != SEQFEAT_RNA
+ || sfp->data.value.ptrvalue == NULL)
+ {
+ return;
+ }
+
+ rrp = (RnaRefPtr) sfp->data.value.ptrvalue;
+ if (rrp->type == 3)
+ {
+ ClearRNAProduct (rrp);
+
+ aa = ParseTRnaString (product, &justTrnaText, (Uint1Ptr) codon, TRUE);
+ if (aa != 0)
+ {
+ trp = (tRNAPtr) MemNew (sizeof (tRNA));
+ if (trp != NULL)
+ {
+ trp->aatype = 2;
+ for (j = 0; j < 6; j++)
+ {
+ trp->codon [j] = 255;
+ }
+ if (justTrnaText)
+ {
+ for (j = 0; j < 6; j++)
+ {
+ trp->codon [j] = codon [j];
+ }
+ }
+ trp->aa = aa;
+ rrp->ext.choice = 2;
+ rrp->ext.value.ptrvalue = (Pointer) trp;
+ }
+ }
+ if (aa == 0 || !justTrnaText)
+ {
+ AddToComment (sfp, product);
+ }
+ }
+ else if (rrp->type == 255
+ && rrp->ext.choice == 1
+ && (StringCmp (rrp->ext.value.ptrvalue, "ncRNA") == 0
+ || StringCmp (rrp->ext.value.ptrvalue, "tmRNA") == 0
+ || StringCmp (rrp->ext.value.ptrvalue, "misc_RNA") == 0))
+ {
+ gbq = FindOrAddQual (sfp, "product");
+ gbq->val = MemFree (gbq->val);
+ gbq->val = StringSave (product);
+ }
+ else
+ {
+ ClearRNAProduct (rrp);
+ rrp->ext.choice = 1;
+ rrp->ext.value.ptrvalue = StringSave (product);
+ }
+}
+
+
+
+typedef struct rnatypedlg {
+ DIALOG_MESSAGE_BLOCK
+ PopuP rna_type;
+ DialoG ncrna_class;
+ Nlm_ChangeNotifyProc change_notify;
+ Pointer change_userdata;
+ Boolean is_constraint;
+
+} RnaTypeDlgData, PNTR RnaTypeDlgPtr;
+
+
+static void ChangeRnaTypeDlg (PopuP p)
+{
+ RnaTypeDlgPtr dlg;
+ UIEnum val;
+
+ dlg = (RnaTypeDlgPtr) GetObjectExtra (p);
+ if (dlg != NULL)
+ {
+ if (GetEnumPopup (dlg->rna_type, rna_type_alist, &val) && val == 8)
+ {
+ Enable (dlg->ncrna_class);
+ }
+ else
+ {
+ Disable (dlg->ncrna_class);
+ }
+ if (dlg->change_notify != NULL)
+ {
+ (dlg->change_notify) (dlg->change_userdata);
+ }
+ }
+}
+
+
+static void PointerToRnaTypeDialog (DialoG d, Pointer data)
+{
+ RnaTypeDlgPtr dlg;
+ RnaTypePtr rtp = NULL;
+
+ dlg = (RnaTypeDlgPtr) GetObjectExtra (d);
+ if (dlg == NULL) return;
+
+ rtp = (RnaTypePtr) data;
+ if (rtp == NULL || rtp->rna_featdef == FEATDEF_ANY)
+ {
+ SetEnumPopup (dlg->rna_type, rna_type_alist, (UIEnum) 0);
+ PointerToDialog (dlg->ncrna_class, NULL);
+ }
+ else
+ {
+ switch (rtp->rna_featdef)
+ {
+ case FEATDEF_preRNA:
+ SetEnumPopup (dlg->rna_type, rna_type_alist, (UIEnum) 1);
+ PointerToDialog (dlg->ncrna_class, NULL);
+ break;
+ case FEATDEF_mRNA:
+ SetEnumPopup (dlg->rna_type, rna_type_alist, (UIEnum) 2);
+ PointerToDialog (dlg->ncrna_class, NULL);
+ break;
+ case FEATDEF_tRNA:
+ SetEnumPopup (dlg->rna_type, rna_type_alist, (UIEnum) 3);
+ PointerToDialog (dlg->ncrna_class, NULL);
+ break;
+ case FEATDEF_rRNA:
+ SetEnumPopup (dlg->rna_type, rna_type_alist, (UIEnum) 4);
+ PointerToDialog (dlg->ncrna_class, NULL);
+ break;
+ case FEATDEF_scRNA:
+ SetEnumPopup (dlg->rna_type, rna_type_alist, (UIEnum) 8);
+ PointerToDialog (dlg->ncrna_class, "scRNA");
+ break;
+ case FEATDEF_snRNA:
+ SetEnumPopup (dlg->rna_type, rna_type_alist, (UIEnum) 8);
+ PointerToDialog (dlg->ncrna_class, "snRNA");
+ break;
+ case FEATDEF_snoRNA:
+ SetEnumPopup (dlg->rna_type, rna_type_alist, (UIEnum) 8);
+ PointerToDialog (dlg->ncrna_class, "snoRNA");
+ break;
+ case FEATDEF_ncRNA:
+ SetEnumPopup (dlg->rna_type, rna_type_alist, (UIEnum) 8);
+ PointerToDialog (dlg->ncrna_class, rtp->ncrna_class);
+ break;
+ case FEATDEF_tmRNA:
+ SetEnumPopup (dlg->rna_type, rna_type_alist, (UIEnum) 9);
+ PointerToDialog (dlg->ncrna_class, NULL);
+ break;
+ case FEATDEF_otherRNA:
+ SetEnumPopup (dlg->rna_type, rna_type_alist, (UIEnum) 255);
+ PointerToDialog (dlg->ncrna_class, NULL);
+ break;
+ default:
+ SetEnumPopup (dlg->rna_type, rna_type_alist, (UIEnum) 0);
+ PointerToDialog (dlg->ncrna_class, NULL);
+ break;
+ }
+ }
+ ChangeRnaTypeDlg (dlg->rna_type);
+}
+
+
+static Pointer RnaTypeDialogToPointer (DialoG d)
+{
+ RnaTypeDlgPtr dlg;
+ RnaTypePtr rtp = NULL;
+ UIEnum val;
+
+ dlg = (RnaTypeDlgPtr) GetObjectExtra (d);
+ if (dlg == NULL) return NULL;
+
+ if (GetEnumPopup (dlg->rna_type, rna_type_alist, &val))
+ {
+ rtp = (RnaTypePtr) MemNew (sizeof (RnaTypeData));
+ rtp->rna_featdef = FEATDEF_ANY;
+ rtp->ncrna_class = NULL;
+ switch (val)
+ {
+ case 0:
+ rtp->rna_featdef = FEATDEF_ANY;
+ break;
+ case 1:
+ rtp->rna_featdef = FEATDEF_preRNA;
+ break;
+ case 2:
+ rtp->rna_featdef = FEATDEF_mRNA;
+ break;
+ case 3:
+ rtp->rna_featdef = FEATDEF_tRNA;
+ break;
+ case 4:
+ rtp->rna_featdef = FEATDEF_rRNA;
+ break;
+ case 8:
+ rtp->rna_featdef = FEATDEF_ncRNA;
+ rtp->ncrna_class = DialogToPointer (dlg->ncrna_class);
+ break;
+ case 9:
+ rtp->rna_featdef = FEATDEF_tmRNA;
+ break;
+ case 255:
+ rtp->rna_featdef = FEATDEF_otherRNA;
+ break;
+ }
+ }
+ return rtp;
+}
+
+
+static ValNodePtr TestRnaTypeDialog (DialoG d)
+{
+ RnaTypeDlgPtr dlg;
+ ValNodePtr err_list = NULL;
+ UIEnum val;
+
+ dlg = (RnaTypeDlgPtr) GetObjectExtra (d);
+ if (dlg == NULL) return NULL;
+ if (GetEnumPopup (dlg->rna_type, rna_type_alist, &val)) {
+ if (val == 8) {
+ err_list = TestDialog (dlg->ncrna_class);
+ }
+ } else {
+ ValNodeAddPointer (&err_list, 0, "RNA type");
+ }
+ return err_list;
+}
+
+extern DialoG RnaTypeDialog (GrouP h, Boolean is_constraint, Nlm_ChangeNotifyProc change_notify, Pointer change_userdata)
+{
+ RnaTypeDlgPtr dlg;
+ GrouP p;
+ CharPtr title;
+
+ if (is_constraint) {
+ title = "RNA Type of Feature to be Edited";
+ } else {
+ title = "RNA Type";
+ }
+
+ p = NormalGroup (h, -1, 0, title, programFont, NULL);
+ dlg = (RnaTypeDlgPtr) MemNew (sizeof (RnaTypeDlgData));
+ SetObjectExtra (p, dlg, StdCleanupExtraProc);
+
+ dlg->dialog = (DialoG) p;
+ dlg->todialog = PointerToRnaTypeDialog;
+ dlg->fromdialog = RnaTypeDialogToPointer;
+ dlg->testdialog = TestRnaTypeDialog;
+ dlg->change_notify = change_notify;
+ dlg->change_userdata = change_userdata;
+ dlg->is_constraint = is_constraint;
+
+ dlg->rna_type = PopupList (p, TRUE, ChangeRnaTypeDlg);
+ SetObjectExtra (dlg->rna_type, dlg, NULL);
+ InitEnumPopup (dlg->rna_type, rna_type_alist, NULL);
+ SetEnumPopup (dlg->rna_type, rna_type_alist, (UIEnum) 0);
+
+ dlg->ncrna_class = CreatencRNAClassDialog (p, is_constraint, change_notify, change_userdata);
+
+ AlignObjects (ALIGN_CENTER, (HANDLE) dlg->rna_type, (HANDLE) dlg->ncrna_class, NULL);
+
+ return (DialoG) p;
+}
+
diff --git a/desktop/cdrgn.h b/desktop/cdrgn.h
index 8797ed93..3b19dfef 100644
--- a/desktop/cdrgn.h
+++ b/desktop/cdrgn.h
@@ -29,13 +29,37 @@
*
* Version Creation Date: 1/22/95
*
-* $Revision: 6.6 $
+* $Revision: 6.13 $
*
* File Description:
*
* Modifications:
* --------------------------------------------------------------------------
* $Log: cdrgn.h,v $
+* Revision 6.13 2008/01/17 21:18:09 bollin
+* Fixes for RNA dialog for ncRNA product/class handling
+*
+* Revision 6.12 2007/12/21 17:30:27 bollin
+* Changes to dialog for selecting ncRNA class and RNA type - allow ncRNA class
+* Any if selecting RNA type in a constraint context, test dialog to generate
+* error if "other" is the class but no text is specified.
+*
+* Revision 6.11 2007/11/26 21:16:29 bollin
+* Moved CreatencRNAClassDialog proto into cdrgn.h
+*
+* Revision 6.10 2007/09/21 18:05:23 bollin
+* code in place for conversion of old-style misc_RNA, snRNA, scRNA, and snoRNA
+* features to new ncRNA features, commented out until changeover.
+*
+* Revision 6.9 2007/09/10 20:08:51 bollin
+* Correction to MatchesRnaType
+*
+* Revision 6.8 2007/09/10 18:47:11 kans
+* prototype for SetRnaSpecificQuals, cast for codon argument to ParseTRnaString
+*
+* Revision 6.7 2007/09/10 18:33:15 bollin
+* Changes for new ncRNA and tmRNA class editor.
+*
* Revision 6.6 2007/07/25 13:53:12 bollin
* Removed local copy of TruncateLocation from sequin3.c, made TruncateLocation
* function in desktop/cdrgn.c extern and added prototype to cdrgn.h
@@ -94,8 +118,26 @@ extern ForM CreateRnaForm (Int2 left, Int2 top, CharPtr title,
Uint2 subtype, FormActnFunc actproc);
extern Int2 LIBCALLBACK RnaGenFunc (Pointer data);
+extern void AddRnaSpecificQuals (SeqFeatPtr sfp, DialoG d);
+extern void ConvertProductQualToRnaRefName (SeqFeatPtr sfp);
+extern void SetRnaSpecificQuals (SeqFeatPtr sfp, DialoG d);
+extern void ConvertToOldRNAFormat (SeqFeatPtr sfp);
+
extern SeqLocPtr TruncateLocation (SeqLocPtr head, Int4 len);
+/* for searching for RNA values of a certain type */
+typedef struct rnatype {
+ Int4 rna_featdef; /* use FEATDEF_ANY for match any RNA */
+ CharPtr ncrna_class; /* value to look for in ncrna_class qual */
+} RnaTypeData, PNTR RnaTypePtr;
+
+extern RnaTypePtr RnaTypeFree (RnaTypePtr rtp);
+extern Boolean MatchesRnaType (SeqFeatPtr sfp, RnaTypePtr rtp);
+extern void ApplyRnaTypeToSeqFeat (SeqFeatPtr sfp, RnaTypePtr rtp);
+extern void ApplyProductToRNA (SeqFeatPtr sfp, CharPtr product);
+extern void AddToComment (SeqFeatPtr sfp, CharPtr comment);
+extern DialoG RnaTypeDialog (GrouP h, Boolean is_constraint, Nlm_ChangeNotifyProc change_notify, Pointer change_userdata);
+extern DialoG CreatencRNAClassDialog (GrouP h, Boolean is_constraint, Nlm_ChangeNotifyProc change_notify, Pointer change_userdata);
#ifdef __cplusplus
}
diff --git a/desktop/dlgutil1.c b/desktop/dlgutil1.c
index cacc2286..ecd9ab58 100644
--- a/desktop/dlgutil1.c
+++ b/desktop/dlgutil1.c
@@ -29,7 +29,7 @@
*
* Version Creation Date: 1/22/95
*
-* $Revision: 6.126 $
+* $Revision: 6.136 $
*
* File Description:
*
@@ -55,6 +55,8 @@
#include <alignmgr2.h>
#include <toasn3.h>
#include <vibforms.h>
+#include <cdrgn.h>
+#include <findrepl.h>
#define NUMBER_OF_SUFFIXES 8
@@ -236,6 +238,8 @@ extern Boolean DescFormReplaceWithoutUpdateProc (ForM f)
sdp->data.ptrvalue = DialogToPointer (dfp->data);
break;
}
+ FixSpecialCharactersForObject (OBJ_SEQDESC, sdp, "You may not include special characters in the text.\nIf you do not choose replacement characters, these special characters will be replaced with '#'.", TRUE, NULL);
+
ompc.output_data = (Pointer) sdp;
if (ompc.input_entityID == 0) {
if (! ObjMgrRegister (OBJ_SEQDESC, (Pointer) sdp)) {
@@ -1278,7 +1282,6 @@ extern void SeqFeatPtrToCommon (FeatureFormPtr ffp, SeqFeatPtr sfp)
}
}
-extern void CleanupEvidenceGBQuals (GBQualPtr PNTR prevgbq);
extern void CleanupEvidenceGBQuals (GBQualPtr PNTR prevgbq)
{
@@ -1609,7 +1612,6 @@ extern Boolean FeatFormReplaceWithoutUpdateProc (ForM f)
Char badInfMssg [32];
Char badInfQual [256];
BioseqPtr bsp;
- Char ch;
Char desc [128];
Int2 expev;
SeqMgrFeatContext fcontext;
@@ -1629,7 +1631,6 @@ extern Boolean FeatFormReplaceWithoutUpdateProc (ForM f)
Boolean noRight;
SeqEntryPtr oldscope;
OMProcControl ompc;
- CharPtr ptr;
ReplaceData rd;
Boolean rsult;
SeqAnnotPtr sap;
@@ -1677,17 +1678,7 @@ extern Boolean FeatFormReplaceWithoutUpdateProc (ForM f)
break;
}
sfp->comment = SaveStringFromText (ffp->comment);
- ptr = sfp->comment;
- if (ptr != NULL) {
- ch = *ptr;
- while (ch != '\0') {
- if (ch < ' ' || ch > '~') {
- *ptr = '~';
- }
- ptr++;
- ch = *ptr;
- }
- }
+ NewlinesToTildes (sfp->comment);
expev = GetValue (ffp->evidence);
if (expev > 0 && expev <= 3) {
sfp->exp_ev = expev - 1;
@@ -1845,11 +1836,18 @@ extern Boolean FeatFormReplaceWithoutUpdateProc (ForM f)
}
}
}
+
ompc.output_data = (Pointer) sfp;
if (ompc.input_entityID == 0) {
sfp->qual = DialogToPointer (ffp->gbquals);
VisStringDialogToGbquals (sfp, ffp->experiment, "experiment");
InferenceDialogToGBQuals (ffp->inference, sfp, TRUE);
+ if (sfp->data.choice == SEQFEAT_RNA) {
+ AddRnaSpecificQuals (sfp, ffp->data);
+ /* NOTE - we will remove this line when we convert to the new data format */
+/* ConvertToOldRNAFormat (sfp); */
+ }
+
sfp->ext = DialogToPointer (ffp->usrobjext);
if (ffp->goTermUserObj != NULL) {
sfp->ext = CombineGOTermUserObjects (sfp->ext, ffp->goTermUserObj);
@@ -1864,6 +1862,7 @@ extern Boolean FeatFormReplaceWithoutUpdateProc (ForM f)
TextToFeatXref (ffp->fidxref, sfp);
}
AddProtRefXref (sfp, ffp->protXrefName, ffp->protXrefDesc);
+ FixSpecialCharactersForObject (OBJ_SEQFEAT, sfp, "You may not include special characters in the text.\nIf you do not choose replacement characters, these special characters will be replaced with '#'.", TRUE, NULL);
if (! ObjMgrRegister (OBJ_SEQFEAT, (Pointer) sfp)) {
Message (MSG_ERROR, "ObjMgrRegister failed");
}
@@ -1874,6 +1873,12 @@ extern Boolean FeatFormReplaceWithoutUpdateProc (ForM f)
sfp->qual = DialogToPointer (ffp->gbquals);
VisStringDialogToGbquals (sfp, ffp->experiment, "experiment");
InferenceDialogToGBQuals (ffp->inference, sfp, TRUE);
+ if (sfp->data.choice == SEQFEAT_RNA) {
+ AddRnaSpecificQuals (sfp, ffp->data);
+ /* NOTE - we will remove this line when we convert to the new data format */
+/* ConvertToOldRNAFormat (sfp); */
+ }
+
sfp->ext = DialogToPointer (ffp->usrobjext);
if (ffp->goTermUserObj != NULL) {
sfp->ext = CombineGOTermUserObjects (sfp->ext, ffp->goTermUserObj);
@@ -1888,6 +1893,7 @@ extern Boolean FeatFormReplaceWithoutUpdateProc (ForM f)
TextToFeatXref (ffp->fidxref, sfp);
}
AddProtRefXref (sfp, ffp->protXrefName, ffp->protXrefDesc);
+ FixSpecialCharactersForObject (OBJ_SEQFEAT, sfp, "You may not include special characters in the text.\nIf you do not choose replacement characters, these special characters will be replaced with '#'.", TRUE, NULL);
ompc.output_itemtype = OBJ_SEQFEAT;
if (ompc.input_itemtype == OBJ_BIOSEQ) {
bsp = GetBioseqGivenIDs (ompc.input_entityID, ompc.input_itemID, ompc.input_itemtype);
@@ -1925,6 +1931,11 @@ extern Boolean FeatFormReplaceWithoutUpdateProc (ForM f)
rd.sfp = sfp;
GatherItem (ompc.input_entityID, ompc.input_itemID, ompc.input_itemtype,
(Pointer) &rd, ReplaceFeatureExtras);
+ if (sfp->data.choice == SEQFEAT_RNA) {
+ AddRnaSpecificQuals (sfp, ffp->data);
+ /* NOTE - we will remove this line when we convert to the new data format */
+/* ConvertToOldRNAFormat (sfp); */
+ }
if (HasExceptionGBQual (sfp)) {
sfp->excpt = TRUE;
}
@@ -1939,6 +1950,7 @@ extern Boolean FeatFormReplaceWithoutUpdateProc (ForM f)
{
AddProtRefXref (sfp, ffp->protXrefName, ffp->protXrefDesc);
}
+ FixSpecialCharactersForObject (OBJ_SEQFEAT, sfp, "You may not include special characters in the text.\nIf you do not choose replacement characters, these special characters will be replaced with '#'.", TRUE, NULL);
if (! ReplaceDataForProc (&ompc, FALSE)) {
Message (MSG_ERROR, "ReplaceDataForProc failed");
}
@@ -1972,6 +1984,7 @@ extern Boolean FeatFormReplaceWithoutUpdateProc (ForM f)
sfp = CreateNewFeature (sep, NULL, SEQFEAT_GENE, NULL);
if (sfp != NULL) {
sfp->data.value.ptrvalue = (Pointer) grp;
+ FixSpecialCharactersForObject (OBJ_SEQFEAT, sfp, "You may not include special characters in the text.\nIf you do not choose replacement characters, these special characters will be replaced with '#'.", TRUE, NULL);
sfp->location = SeqLocFree (sfp->location);
sfp->location = DialogToPointer (ffp->location);
bsp = GetBioseqGivenSeqLoc (sfp->location, ffp->input_entityID);
@@ -2722,12 +2735,231 @@ static void AuthorDialogMessage (DialoG d, Int2 mssg)
}
}
+
+static Boolean IsAuthList (CharPtr path)
+{
+ FILE *fp;
+ Char buffer[10];
+ Int4 len;
+ Boolean rval = FALSE;
+
+ fp = FileOpen (path, "r");
+ if (fp == NULL) return FALSE;
+
+ len = fread (buffer, 1, 9, fp);
+ buffer[9] = 0;
+ if (StringCmp (buffer, "Auth-list") == 0)
+ {
+ rval = TRUE;
+ }
+ FileClose (fp);
+ return rval;
+}
+
+
+static NameStdPtr ReadNameFromString (CharPtr str, CharPtr PNTR next_name, BoolPtr found_special)
+{
+ CharPtr cp_end, cp_space;
+ NameStdPtr n;
+
+ if (StringHasNoText (str))
+ {
+ if (next_name != NULL)
+ {
+ *next_name = NULL;
+ }
+ return NULL;
+ }
+
+ /* skip over any leading spaces */
+ str += StringSpn (str, " \t");
+
+ /* skip over "and" if found */
+ if (StringNCmp (str, "and ", 4) == 0)
+ {
+ str += 4;
+ }
+ if (StringHasNoText (str)) return NULL;
+
+ cp_end = StringChr (str, ',');
+ if (cp_end != NULL)
+ {
+ *cp_end = 0;
+ if (next_name != NULL)
+ {
+ if (StringHasNoText (cp_end + 1))
+ {
+ *next_name = NULL;
+ }
+ else
+ {
+ *next_name = cp_end + 1;
+ }
+ }
+ }
+ else if (next_name != NULL)
+ {
+ *next_name = NULL;
+ }
+
+ n = NameStdNew ();
+ /* look for elements in name */
+ cp_space = StringRChr (str, ' ');
+ if (cp_space == NULL)
+ {
+ n->names[0] = StringSave (str);
+ }
+ else
+ {
+ n->names[0] = StringSave (cp_space + 1);
+ while (isspace (*cp_space))
+ {
+ cp_space--;
+ }
+ *(cp_space + 1) = 0;
+ cp_space = StringChr (str, ' ');
+ if (cp_space == NULL)
+ {
+ n->names[1] = StringSave (str);
+ n->names[4] = (CharPtr) MemNew (sizeof (Char) * 3);
+ sprintf (n->names[4], "%c.", *(n->names[1]));
+ }
+ else
+ {
+ *(cp_space) = 0;
+ n->names[1] = StringSave (str);
+
+ cp_space++;
+ while (isspace (*cp_space))
+ {
+ cp_space++;
+ }
+
+ n->names[4] = (CharPtr) MemNew (sizeof (Char) * (4 + StringLen (cp_space)));
+ sprintf (n->names[4], "%c.%s.", *(n->names[1]), cp_space);
+ }
+ SpecialCharReplace (&(n->names[1]), NULL, found_special, NULL);
+ SpecialCharReplace (&(n->names[4]), NULL, found_special, NULL);
+ }
+ SpecialCharReplace (&(n->names[0]), NULL, found_special, NULL);
+
+ return n;
+}
+
+
+static Boolean EndsWithComma (CharPtr str)
+{
+ CharPtr cp;
+
+ if (StringHasNoText (str)) return FALSE;
+ cp = str + StringLen (str) - 1;
+ while (isspace (*cp) && cp > str)
+ {
+ cp--;
+ }
+ if (*cp == ',')
+ {
+ return TRUE;
+ }
+ else
+ {
+ return FALSE;
+ }
+}
+
+
+static CharPtr ExtendToComma (CharPtr line, ReadBufferPtr rbp)
+{
+ CharPtr next_line = NULL, tmp;
+ Boolean end_of_file = FALSE;
+
+ while (!EndsWithComma (line) && !end_of_file)
+ {
+ next_line = AbstractReadFunction (rbp);
+ if (next_line == NULL)
+ {
+ end_of_file = TRUE;
+ }
+ else if (StringHasNoText (next_line))
+ {
+ next_line = MemFree (next_line);
+ }
+ else if (StringHasNoText (line))
+ {
+ line = MemFree (line);
+ line = next_line;
+ }
+ else
+ {
+ tmp = (CharPtr) MemNew (sizeof (Char) * (StringLen (line) + StringLen (next_line) + 2));
+ sprintf (tmp, "%s %s", line, next_line);
+ next_line = MemFree (next_line);
+ line = MemFree (line);
+ line = tmp;
+ }
+ }
+ return line;
+}
+
+
+static AuthListPtr ReadAuthorListFromTextFile (CharPtr path)
+{
+ ReadBufferData rbd;
+ CharPtr line;
+ AuthListPtr alp;
+ AuthorPtr ap;
+ CharPtr cp, next_cp;
+ NameStdPtr n;
+ ValNodePtr names = NULL;
+ Boolean found_special = FALSE;
+
+ rbd.fp = FileOpen (path, "r");
+ if (rbd.fp == NULL) return FALSE;
+ rbd.current_data = NULL;
+
+ line = ExtendToComma (NULL, &rbd);
+ while (line != NULL)
+ {
+ cp = line;
+ next_cp = NULL;
+ while (cp != NULL)
+ {
+ n = ReadNameFromString (cp, &next_cp, &found_special);
+ if (n != NULL)
+ {
+ ap = AuthorNew ();
+ ap->name = PersonIdNew ();
+ ap->name->choice = 2;
+ ap->name->data = n;
+ ValNodeAddPointer (&names, 0, ap);
+ }
+ cp = next_cp;
+ }
+ line = MemFree (line);
+ line = ExtendToComma (NULL, &rbd);
+ }
+ if (names != NULL)
+ {
+ alp = AuthListNew ();
+ alp->choice = 1;
+ alp->names = names;
+ }
+ if (found_special)
+ {
+ Message (MSG_OK, "Special characters in names were converted");
+ }
+
+ FileClose (rbd.fp);
+ return alp;
+}
+
+
static Boolean ReadAuthorDialog (DialoG d, CharPtr filename)
{
AuthorDialogPtr adp;
AsnIoPtr aip;
- AuthListPtr alp;
+ AuthListPtr alp = NULL;
Char path [PATH_MAX];
path [0] = '\0';
@@ -2735,16 +2967,20 @@ static Boolean ReadAuthorDialog (DialoG d, CharPtr filename)
adp = (AuthorDialogPtr) GetObjectExtra (d);
if (adp != NULL) {
if (path [0] != '\0' || GetInputFileName (path, sizeof (path), "", "TEXT")) {
- aip = AsnIoOpen (path, "r");
- if (aip != NULL) {
- alp = AuthListAsnRead (aip, NULL);
- AsnIoClose (aip);
- if (alp != NULL) {
- PointerToDialog (adp->dialog, (Pointer) alp);
- alp = AuthListFree (alp);
- Update ();
- return TRUE;
+ if (IsAuthList (path)) {
+ aip = AsnIoOpen (path, "r");
+ if (aip != NULL) {
+ alp = AuthListAsnRead (aip, NULL);
+ AsnIoClose (aip);
}
+ } else {
+ alp = ReadAuthorListFromTextFile (path);
+ }
+ if (alp != NULL) {
+ PointerToDialog (adp->dialog, (Pointer) alp);
+ alp = AuthListFree (alp);
+ Update ();
+ return TRUE;
}
}
}
@@ -7019,6 +7255,7 @@ static void StringToLatLonDlg (DialoG d, Pointer data)
tmp = (CharPtr) MemNew (sizeof (Char) * len);
StringNCpy (tmp, str, len - 1);
tmp [len - 1] = 0;
+ TrimSpacesAroundString (tmp);
SetTitle (dlg->deg_ns, tmp);
tmp = MemFree (tmp);
SetValue (dlg->dir_ns, *ns == 'N' ? 1 : 2);
@@ -7027,6 +7264,7 @@ static void StringToLatLonDlg (DialoG d, Pointer data)
tmp = (CharPtr) MemNew (sizeof (Char) * len);
StringNCpy (tmp, ns + 1, len - 1);
tmp [len - 1] = 0;
+ TrimSpacesAroundString (tmp);
SetTitle (dlg->deg_ew, tmp);
tmp = MemFree (tmp);
SetValue (dlg->dir_ew, *ew == 'E' ? 1 : 2);
@@ -8501,6 +8739,176 @@ extern void CreateStandardEditMenu (WindoW w)
i = CommandItem (m, "Copy", StdCopyTextProc);
i = CommandItem (m, "Paste", StdPasteTextProc);
i = CommandItem (m, "Clear", StdDeleteTextProc);
+}
+
+
+static ValNodePtr sqnTempFiles = NULL;
+
+extern void RememberSqnTempFile (CharPtr file)
+
+{
+ ValNodePtr vnp;
+
+ if (StringHasNoText (file)) return;
+
+ vnp = ValNodeCopyStr (NULL, 0, file);
+ if (vnp == NULL) return;
+
+ vnp->next = sqnTempFiles;
+ sqnTempFiles = vnp;
+}
+
+extern void FreeSqnTempFiles (void)
+
+{
+ CharPtr file;
+ ValNodePtr list;
+ ValNodePtr vnp;
+
+ if (sqnTempFiles == NULL) return;
+
+ list = sqnTempFiles;
+ sqnTempFiles = NULL;
+
+ for (vnp = list; vnp != NULL; vnp = vnp->next) {
+ file = (CharPtr) vnp->data.ptrvalue;
+ if (StringHasNoText (file)) continue;
+ FileRemove (file);
+ }
+
+ ValNodeFreeData (list);
+}
+
+
+/* This gets a list of the open views */
+NLM_EXTERN ValNodePtr GetBaseFormList ()
+
+{
+ Uint4 j;
+ Uint4 num;
+ ObjMgrPtr omp;
+ ObjMgrDataPtr omdp;
+ ObjMgrDataPtr PNTR omdpp;
+ OMUserDataPtr omudp;
+ BaseFormPtr bfp;
+ ValNodePtr base_form_list = NULL;
+
+ omp = ObjMgrGet ();
+ if (omp == NULL) return NULL;
+ num = omp->currobj;
+ for (j = 0, omdpp = omp->datalist; j < num && omdpp != NULL; j++, omdpp++) {
+ omdp = *omdpp;
+ if (omdp->parentptr == NULL) {
+ for (omudp = omdp->userdata; omudp != NULL; omudp = omudp->next) {
+ if (omudp->proctype == OMPROC_VIEW) {
+ bfp = (BaseFormPtr) omudp->userdata.ptrvalue;
+ ValNodeAddPointer (&base_form_list, 0, bfp);
+ }
+ }
+ }
+ }
+ return base_form_list;
+}
+
+
+/* This gets a list of the top SeqEntry for each open view */
+NLM_EXTERN ValNodePtr GetViewedSeqEntryList (void)
+{
+ ValNodePtr sep_list = NULL, base_form_list, vnp;
+ BaseFormPtr bfp;
+ SeqEntryPtr sep;
+
+ base_form_list = GetBaseFormList();
+ for (vnp = base_form_list; vnp != NULL; vnp = vnp->next) {
+ bfp = (BaseFormPtr) vnp->data.ptrvalue;
+ if (bfp != NULL && bfp->input_entityID != 0) {
+ sep = GetTopSeqEntryForEntityID (bfp->input_entityID);
+ ValNodeAddPointer (&sep_list, 0, sep);
+ }
+ }
+ base_form_list = ValNodeFree (base_form_list);
+ return sep_list;
+}
+
+
+NLM_EXTERN SeqEntryPtr RestoreFromFile (CharPtr path)
+{
+ BioseqPtr bsp;
+ BioseqSetPtr bssp;
+ Pointer dataptr;
+ Uint2 datatype;
+ Uint2 entityID;
+ SeqEntryPtr rsult;
+ SeqEntryPtr sep;
+
+ rsult = NULL;
+ if (path != NULL && path [0] != '\0') {
+ dataptr = ObjMgrGenericAsnTextFileRead (path, &datatype, &entityID);
+ if (dataptr != NULL && entityID > 0) {
+ if (datatype == OBJ_SEQSUB || datatype == OBJ_SEQENTRY ||
+ datatype == OBJ_BIOSEQ || datatype == OBJ_BIOSEQSET) {
+ WatchCursor ();
+ sep = GetTopSeqEntryForEntityID (entityID);
+ if (sep == NULL) {
+ sep = SeqEntryNew ();
+ if (sep != NULL) {
+ if (datatype == OBJ_BIOSEQ) {
+ bsp = (BioseqPtr) dataptr;
+ sep->choice = 1;
+ sep->data.ptrvalue = bsp;
+ SeqMgrSeqEntry (SM_BIOSEQ, (Pointer) bsp, sep);
+ } else if (datatype == OBJ_BIOSEQSET) {
+ bssp = (BioseqSetPtr) dataptr;
+ sep->choice = 2;
+ sep->data.ptrvalue = bssp;
+ SeqMgrSeqEntry (SM_BIOSEQSET, (Pointer) bssp, sep);
+ } else {
+ sep = SeqEntryFree (sep);
+ }
+ }
+ sep = GetTopSeqEntryForEntityID (entityID);
+ }
+ if (sep != NULL) {
+ rsult = SeqEntryNew ();
+ if (rsult != NULL) {
+ rsult->choice = sep->choice;
+ rsult->data.ptrvalue = sep->data.ptrvalue;
+ sep->data.ptrvalue = NULL;
+ if (datatype == OBJ_SEQSUB) {
+ SeqSubmitFree ((SeqSubmitPtr) dataptr);
+ } else {
+ SeqEntryFree (sep);
+ }
+ /*Message (MSG_OK, "Call new object manager free function");*/
+ }
+ }
+ ArrowCursor ();
+ }
+ /*
+ ObjMgrDelete (entityID);
+ */
+ }
+ }
+ return rsult;
+}
+
+
+NLM_EXTERN Uint2 RestoreEntityIDFromFile (CharPtr path, Uint2 entityID)
+{
+ SeqEntryPtr scope, oldsep, currsep;
+ Uint2 newid = 0;
+
+ scope = SeqEntrySetScope (NULL);
+ oldsep = RestoreFromFile (path);
+ currsep = GetTopSeqEntryForEntityID (entityID);
+ if (oldsep == NULL || currsep == NULL) {
+ SeqEntrySetScope (scope);
+ } else {
+ ReplaceSeqEntryWithSeqEntry (currsep, oldsep, TRUE);
+ SeqEntrySetScope (NULL);
+ newid = ObjMgrGetEntityIDForChoice (currsep);
+ }
+ return newid;
}
diff --git a/desktop/dlgutil2.c b/desktop/dlgutil2.c
index 22827785..b3d604bd 100644
--- a/desktop/dlgutil2.c
+++ b/desktop/dlgutil2.c
@@ -29,7 +29,7 @@
*
* Version Creation Date: 1/22/95
*
-* $Revision: 6.164 $
+* $Revision: 6.186 $
*
* File Description:
*
@@ -54,6 +54,7 @@
#include <objseq.h>
#include <toasn3.h>
#include <explore.h>
+#include <findrepl.h>
#ifdef WIN_MOTIF
#include <netscape.h>
#endif
@@ -100,6 +101,56 @@ extern CharPtr SaveStringFromTextAndStripNewlines (TexT t)
}
}
+
+extern CharPtr StripNewlines (CharPtr str)
+
+{
+ Char ch;
+ size_t len;
+ CharPtr ptr;
+
+ if (str == NULL) return str;
+ len = StringLen (str);
+ if (len > 0) {
+ ptr = str;
+ ch = *ptr;
+ while (ch != '\0') {
+ if (ch < ' ') {
+ *ptr = ' ';
+ }
+ ptr++;
+ ch = *ptr;
+ }
+ TrimSpacesAroundString (str);
+ if (StringHasNoText (str)) {
+ str = MemFree (str);
+ }
+ } else {
+ str = MemFree (str);
+ }
+ return str;
+}
+
+
+extern void NewlinesToTildes (CharPtr str)
+
+{
+ Uchar ch;
+ CharPtr ptr;
+
+ if (StringHasNoText (str)) return;
+ ptr = str;
+ ch = *ptr;
+ while (ch != '\0') {
+ if (ch < ' ') {
+ *ptr = '~';
+ }
+ ptr++;
+ ch = *ptr;
+ }
+}
+
+
static void DatePtrToDatePage (DialoG d, Pointer data)
{
@@ -1000,6 +1051,37 @@ typedef struct fieldpage {
ButtoN PNTR boxes;
} FieldPage, PNTR FieldPagePtr;
+
+static Boolean ShouldSuppressGBQual(Uint1 subtype, CharPtr qual_name)
+{
+ if (StringHasNoText (qual_name)) {
+ return FALSE;
+ }
+
+ /* always suppress experiment and inference quals */
+ if (StringCmp (qual_name, "experiment") == 0 || StringCmp (qual_name, "inference") == 0) {
+ return TRUE;
+ }
+
+ if (subtype == FEATDEF_ncRNA) {
+ if (StringCmp (qual_name, "product") == 0
+ || StringCmp (qual_name, "ncRNA_class") == 0) {
+ return TRUE;
+ }
+ } else if (subtype == FEATDEF_tmRNA) {
+ if (StringCmp (qual_name, "product") == 0
+ || StringCmp (qual_name, "tag_peptide") == 0) {
+ return TRUE;
+ }
+ } else if (subtype == FEATDEF_otherRNA) {
+ if (StringCmp (qual_name, "product") == 0) {
+ return TRUE;
+ }
+ }
+ return FALSE;
+}
+
+
static Boolean ShouldBeAGBQual (Uint1 subtype, Int2 qual, Boolean allowProductGBQual)
{
@@ -1020,6 +1102,8 @@ static Boolean ShouldBeAGBQual (Uint1 subtype, Int2 qual, Boolean allowProductGB
qual == GBQUAL_rpt_unit ||
qual == GBQUAL_transposon ||
qual == GBQUAL_experiment ||
+ qual == GBQUAL_trans_splicing ||
+ qual == GBQUAL_ribosomal_slippage ||
qual == GBQUAL_inference) {
return FALSE;
}
@@ -1030,6 +1114,11 @@ static Boolean ShouldBeAGBQual (Uint1 subtype, Int2 qual, Boolean allowProductGB
return FALSE;
}
}
+
+ if (qual > -1 && ShouldSuppressGBQual (subtype, ParFlat_GBQual_names [qual].name)) {
+ return FALSE;
+ }
+
return TRUE;
}
@@ -1517,6 +1606,35 @@ static DialoG CreateInferenceDialog (GrouP h, Uint2 rows, Int2 spacing, Int2 wid
static DialoG NewCreateInferenceDialog (GrouP prnt);
extern void Nlm_LaunchGeneFeatEd (ButtoN b);
+
+static CharPtr GetNameForFeature (SeqFeatPtr sfp)
+{
+ FeatDefPtr curr;
+ Uint1 key;
+ CharPtr label = NULL;
+ CharPtr featname = NULL;
+ CharPtr ptr;
+ Char ch;
+
+ if (sfp != NULL) {
+ curr = FeatDefFindNext (NULL, &key, &label, sfp->idx.subtype, TRUE);
+ if (curr != NULL) {
+ featname = StringSave (label);
+ ptr = featname;
+ ch = *ptr;
+ while (ch != '\0') {
+ if (IS_UPPER (ch)) {
+ *ptr = TO_LOWER (ch);
+ }
+ ptr++;
+ ch = *ptr;
+ }
+ }
+ }
+ return featname;
+}
+
+
extern GrouP CreateCommonFeatureGroupEx (GrouP h, FeatureFormPtr ffp,
SeqFeatPtr sfp, Boolean hasGeneControl,
Boolean hasCitationTab, Boolean hasGeneSuppress)
@@ -1544,14 +1662,15 @@ extern GrouP CreateCommonFeatureGroupEx (GrouP h, FeatureFormPtr ffp,
GrouP v;
GrouP x;
GrouP y;
+ CharPtr featname;
c = NULL;
if (ffp != NULL) {
hasQuals = FALSE;
cdsQuals = FALSE;
if (ffp->gbquals == NULL && sfp != NULL && sfp->qual != NULL) {
- for (gbq = sfp->qual; gbq != NULL; gbq = gbq->next) {
- if (StringCmp (gbq->qual, "experiment") != 0 && StringCmp (gbq->qual, "inference") != 0) {
+ for (gbq = sfp->qual; gbq != NULL && !hasQuals; gbq = gbq->next) {
+ if (!ShouldSuppressGBQual(sfp->idx.subtype, gbq->qual)) {
hasQuals = TRUE;
}
}
@@ -1812,7 +1931,9 @@ extern GrouP CreateCommonFeatureGroupEx (GrouP h, FeatureFormPtr ffp,
x = NULL;
if (hasQuals && ffp->gbquals == NULL) {
x = HiddenGroup (c, -1, 0, NULL);
- ffp->gbquals = CreateImportFields (x, NULL, sfp, FALSE);
+ featname = GetNameForFeature (sfp);
+ ffp->gbquals = NewCreateImportFields (x, featname, sfp, FALSE);
+ featname = MemFree (featname);
}
ffp->commonSubGrp [page] = c;
Hide (ffp->commonSubGrp [page]);
@@ -4950,14 +5071,16 @@ static ValNodePtr TestSequenceSelectionDialog (DialoG d)
}
-extern DialoG SequenceSelectionDialog
+extern DialoG SequenceSelectionDialogEx
(GrouP h,
Nlm_ChangeNotifyProc change_notify,
Pointer change_userdata,
Boolean allow_multi,
+ Boolean allow_none,
Boolean show_nucs,
Boolean show_prots,
- Uint2 entityID)
+ Uint2 entityID,
+ Int4 list_height)
{
SequenceSelectionPtr dlg;
@@ -4994,23 +5117,47 @@ extern DialoG SequenceSelectionDialog
dlg->dialogmessage = SequenceSelectionDialogMessage;
dlg->testdialog = TestSequenceSelectionDialog;
- dlg->sequence_choice_list = NULL;
+ if (allow_none) {
+ dlg->sequence_choice_list = ValNodeNew (NULL);
+ dlg->sequence_choice_list->choice = 0;
+ dlg->sequence_choice_list->data.ptrvalue = NULL;
+ } else {
+ dlg->sequence_choice_list = NULL;
+ }
GetSequenceChoiceList (sep, &dlg->sequence_choice_list, show_nucs, show_prots);
for (vnp = dlg->sequence_choice_list; vnp != NULL; vnp = vnp->next) {
sip = SeqIdFindWorst ((SeqIdPtr) vnp->data.ptrvalue);
- SeqIdWrite (sip, tmp, PRINTID_REPORT, sizeof (tmp));
+ if (sip == NULL) {
+ sprintf (tmp, " ");
+ } else {
+ SeqIdWrite (sip, tmp, PRINTID_REPORT, sizeof (tmp));
+ }
ValNodeAddPointer (&choice_name_list, 0, StringSave (tmp));
}
dlg->sequence_list_dlg = SelectionDialog (p, change_notify, change_userdata,
allow_multi, "sequence",
- choice_name_list, TALL_SELECTION_LIST);
+ choice_name_list, list_height);
ValNodeFreeData (choice_name_list);
return (DialoG) p;
}
+
+extern DialoG SequenceSelectionDialog
+(GrouP h,
+ Nlm_ChangeNotifyProc change_notify,
+ Pointer change_userdata,
+ Boolean allow_multi,
+ Boolean show_nucs,
+ Boolean show_prots,
+ Uint2 entityID)
+{
+ return SequenceSelectionDialogEx (h, change_notify, change_userdata, allow_multi, FALSE, show_nucs, show_prots, entityID, TALL_SELECTION_LIST);
+}
+
+
extern DialoG SubSourceTypeDialog
(GrouP h,
Int2 list_height,
@@ -5304,6 +5451,320 @@ static DialoG CreateInferenceDialog (GrouP h, Uint2 rows, Int2 spacing, Int2 wid
/* inference dialog controls, utility functions */
+Uint2 accessionlist_types [] = {
+ TAGLIST_POPUP, TAGLIST_TEXT
+};
+
+Uint2 accessionlist_widths [] = {
+ 0, 10
+};
+
+ENUM_ALIST(accn_type_alist)
+ { " ", 0 },
+ { "GenBank", 1 },
+ { "EMBL", 2 },
+ { "DDBJ", 3 },
+ { "INSD", 4 },
+ { "RefSeq", 5 },
+ { "UniProt", 6 },
+ { "Other", 7 },
+END_ENUM_ALIST
+
+static EnumFieldAssocPtr accessionlist_popups [] = {
+ accn_type_alist, NULL
+};
+
+static CharPtr accnTypePrefix [] = {
+ "",
+ "GenBank",
+ "EMBL",
+ "DDBJ",
+ "INSD",
+ "RefSeq",
+ "UniProt",
+ "?",
+ NULL
+};
+
+const Int4 numAccnTypePrefixes = sizeof (accnTypePrefix) / sizeof (CharPtr);
+
+static Int4 GetAccnTypeNum (CharPtr str)
+{
+ Int4 i;
+
+ if (StringHasNoText (str)) return 0;
+
+ for (i = 1; i < numAccnTypePrefixes; i++)
+ {
+ if (StringCmp (accnTypePrefix[i], str) == 0)
+ {
+ return i;
+ }
+ }
+ return 0;
+}
+
+
+static CharPtr ValForOneAccession (CharPtr str)
+{
+ CharPtr cp, val_buf = NULL;
+ CharPtr val_fmt = "%d\t%s";
+ Int4 db;
+
+ if (!StringHasNoText (str))
+ {
+ cp = StringChr (str, '|');
+ if (cp == NULL)
+ {
+ if ((db = GetAccnTypeNum(str)) > 0)
+ {
+ val_buf = MemNew (sizeof (Char) * StringLen (val_fmt));
+ sprintf (val_buf, val_fmt, db, " ");
+ }
+ else
+ {
+ val_buf = MemNew (sizeof (Char) * (StringLen (val_fmt) + StringLen (str)));
+ sprintf (val_buf, val_fmt, 0, str);
+ }
+ }
+ else
+ {
+ *cp = 0;
+ db = GetAccnTypeNum (str);
+ val_buf = MemNew (sizeof (Char) * (StringLen (val_fmt) + StringLen (cp + 1)));
+ sprintf (val_buf, val_fmt, db, cp + 1);
+ *cp = '|';
+ }
+ }
+ return val_buf;
+}
+
+static void AccessionListDataToDialog (DialoG d, Pointer data)
+{
+ TagListPtr tlp;
+ CharPtr str, cp, val_buf;
+ ValNodePtr new_list = NULL, vnp;
+ Int4 j;
+ Int2 scroll_pos;
+
+ tlp = (TagListPtr) GetObjectExtra (d);
+
+ if (tlp == NULL) return;
+ str = (CharPtr) data;
+
+ cp = StringChr (str, ',');
+ while (cp != NULL)
+ {
+ *cp = 0;
+ val_buf = ValForOneAccession (str);
+ if (val_buf != NULL)
+ {
+ ValNodeAddPointer (&new_list, 0, val_buf);
+ }
+ *cp = ',';
+ str = cp + 1;
+ cp = StringChr (str, ',');
+ }
+ val_buf = ValForOneAccession (str);
+ if (val_buf != NULL)
+ {
+ ValNodeAddPointer (&new_list, 0, val_buf);
+ }
+
+ scroll_pos = 0;
+ if (tlp->bar != NULL)
+ {
+ scroll_pos = GetBarValue (tlp->bar);
+ }
+ else if (tlp->left_bar != NULL)
+ {
+ scroll_pos = GetBarValue (tlp->left_bar);
+ }
+
+ SendMessageToDialog (tlp->dialog, VIB_MSG_RESET);
+ tlp->vnp = new_list;
+ for (j = 0, vnp = tlp->vnp; vnp != NULL; j++, vnp = vnp->next) {
+ }
+ tlp->max = MAX ((Int2) 0, (Int2) (j - tlp->rows + 1));
+ CorrectBarMax (tlp->bar, tlp->max);
+ CorrectBarPage (tlp->bar, (Int2) (tlp->rows-1), (Int2) (tlp->rows-1));
+
+ /* retain scroll position */
+ if (scroll_pos > tlp->max) {
+ scroll_pos = tlp->max;
+ }
+
+ if (tlp->bar != NULL)
+ {
+ CorrectBarValue (tlp->bar, scroll_pos);
+ }
+ if (tlp->left_bar != NULL)
+ {
+ CorrectBarValue (tlp->left_bar, scroll_pos);
+ }
+
+ SendMessageToDialog (tlp->dialog, VIB_MSG_REDRAW);
+ Update ();
+
+}
+
+
+static Pointer AccessionListDialogToData (DialoG d)
+{
+ TagListPtr tlp;
+ ValNodePtr vnp;
+ Int4 result_len = 0, db;
+ CharPtr str, acc_str, result_str = NULL;
+ Boolean first_item = TRUE;
+
+ tlp = (TagListPtr) GetObjectExtra (d);
+
+ if (tlp == NULL) return NULL;
+
+ for (vnp = tlp->vnp;
+ vnp != NULL;
+ vnp = vnp->next)
+ {
+ acc_str = ExtractTagListColumn ((CharPtr) vnp->data.ptrvalue, 1);
+ str = ExtractTagListColumn ((CharPtr) vnp->data.ptrvalue, 0);
+ if (!StringHasNoText (acc_str) || !StringHasNoText (str))
+ {
+ result_len += StringLen (acc_str);
+ result_len += 1; /* comma */
+ db = atoi (str);
+ if (db >= 0 && db < numAccnTypePrefixes)
+ {
+ result_len += MAX (StringLen (accnTypePrefix[db]), 1);
+ }
+ else
+ {
+ result_len ++; /* will represent with ? */
+ }
+ result_len ++; /* for db/accession separator */
+ }
+ acc_str = MemFree (acc_str);
+ str = MemFree (str);
+ }
+
+ if (result_len > 0)
+ {
+ result_str = (CharPtr) MemNew (sizeof (Char) * (result_len + 1));
+ for (vnp = tlp->vnp;
+ vnp != NULL;
+ vnp = vnp->next)
+ {
+ acc_str = ExtractTagListColumn ((CharPtr) vnp->data.ptrvalue, 1);
+ str = ExtractTagListColumn ((CharPtr) vnp->data.ptrvalue, 0);
+ db = (str == NULL ? 0 : atoi (str));
+ str = MemFree (str);
+ if (!StringHasNoText (acc_str) || db > 0)
+ {
+ if (first_item)
+ {
+ first_item = FALSE;
+ }
+ else
+ {
+ StringCat (result_str, ",");
+ }
+
+ if (db > 0 && db < numAccnTypePrefixes)
+ {
+ StringCat (result_str, accnTypePrefix[db]);
+ }
+ else
+ {
+ StringCat (result_str, "?");
+ }
+ StringCat (result_str, "|");
+ if (!StringHasNoText (result_str)) {
+ StringCat (result_str, acc_str);
+ }
+ }
+ acc_str = MemFree (acc_str);
+ }
+ result_str[result_len] = 0;
+ }
+
+ return result_str;
+}
+
+
+static void RemoveEmptyAccessionStrings (CharPtr acc_list)
+{
+ CharPtr cp_prev_end = NULL, cp_src, cp_dst;
+
+ if (acc_list == NULL) return;
+
+ cp_src = acc_list;
+ cp_dst = acc_list;
+ cp_prev_end = acc_list;
+ while (*cp_src != 0)
+ {
+ if (*cp_src == '|' && (*(cp_src + 1) == ',' || *(cp_src + 1) == 0))
+ {
+ cp_dst = cp_prev_end;
+ cp_prev_end = cp_dst;
+ cp_src++;
+ }
+ else
+ {
+ *cp_dst = *cp_src;
+ if (*cp_src == ',')
+ {
+ cp_prev_end = cp_dst;
+ }
+ cp_dst++;
+ cp_src++;
+ }
+ }
+ *cp_dst = 0;
+}
+
+
+static CharPtr insdmessage =
+"GenBank, EMBL, and DDBJ records are part of the International Nucleotide " \
+"Sequence Database collaboration.\nThe database prefix for the /inference " \
+"qualifier in these cases is INSD by collaboration policy.";
+
+
+static Boolean ReplaceDatabaseStrings (CharPtr PNTR str)
+{
+ Boolean changed_db = FALSE;
+
+ if (str == NULL || *str == NULL) return FALSE;
+
+ if (StringSearch (*str, "GenBank|") != NULL)
+ {
+ changed_db = TRUE;
+ FindReplaceString (str, "GenBank|", "INSD|", TRUE, FALSE);
+ }
+ if (StringSearch (*str, "EMBL|") != NULL)
+ {
+ changed_db = TRUE;
+ FindReplaceString (str, "EMBL|", "INSD|", TRUE, FALSE);
+ }
+ if (StringSearch (*str, "DDBJ|") != NULL)
+ {
+ changed_db = TRUE;
+ FindReplaceString (str, "DDBJ|", "INSD|", TRUE, FALSE);
+ }
+
+ if (changed_db)
+ {
+ if (GetAppProperty ("InternalNcbiSequin") == NULL) {
+ Message (MSG_OK, "%s", insdmessage);
+ }
+ }
+
+ return changed_db;
+}
+
+
+static void ChangeInferAccessionList (Pointer data);
+static TaglistCallback AccessionListCallbacks[] =
+{ ChangeInferAccessionList, ChangeInferAccessionList };
+
typedef struct inferevid {
CharPtr prefix; /* from inferencePrefix */
Boolean species; /* optional (same species) */
@@ -5315,6 +5776,7 @@ typedef struct inferevid {
CharPtr version; /* program version */
CharPtr basis1; /* profile or motif */
CharPtr basis2; /* evidence_basis texts */
+ CharPtr accession_list; /* accession list for alignment */
} InferEvid, PNTR InferEvidPtr;
typedef struct inferdialog {
@@ -5333,6 +5795,12 @@ typedef struct inferdialog {
TexT version;
TexT basis1;
TexT basis2;
+ PrompT inf_free_program_prompt;
+ PrompT inf_free_version_prompt;
+ PrompT accession_list_program_prompt;
+ PrompT accession_list_version_prompt;
+ PrompT accession_list_prompt;
+ DialoG accession_list;
GrouP inf_accn_group;
GrouP other_db_group;
@@ -5372,6 +5840,7 @@ static InferEvidPtr InferEvidFree (
MemFree (iep->version);
MemFree (iep->basis1);
MemFree (iep->basis2);
+ MemFree (iep->accession_list);
return MemFree (iep);
}
@@ -5430,6 +5899,7 @@ static CharPtr inferencePrefix [] = {
"nucleotide motif",
"protein motif",
"ab initio prediction",
+ "alignment",
NULL
};
@@ -5446,29 +5916,7 @@ ENUM_ALIST(inference_alist)
{ "nucleotide motif", 9 },
{ "protein motif", 10 },
{ "ab initio prediction", 11 },
-END_ENUM_ALIST
-
-static CharPtr accnTypePrefix [] = {
- "",
- "GenBank",
- "EMBL",
- "DDBJ",
- "INSD",
- "RefSeq",
- "UniProt",
- "?",
- NULL
-};
-
-ENUM_ALIST(accn_type_alist)
- { " ", 0 },
- { "GenBank", 1 },
- { "EMBL", 2 },
- { "DDBJ", 3 },
- { "INSD", 4 },
- { "RefSeq", 5 },
- { "UniProt", 6 },
- { "Other", 7 },
+ { "alignment", 12 },
END_ENUM_ALIST
static CharPtr programPrefix [] = {
@@ -5505,7 +5953,7 @@ static CharPtr PrintInferTable (
len = StringLen (iep->prefix) + StringLen (iep->database) + StringLen (iep->db_other) + StringLen (iep->accession) +
StringLen (iep->program) + StringLen (iep->pr_other) + StringLen (iep->version) + StringLen (iep->basis1) +
- StringLen (iep->basis2) + 50;
+ StringLen (iep->basis2) + StringLen (iep->accession_list) + 50;
buf = MemNew (len);
if (buf == NULL) return NULL;
@@ -5552,6 +6000,11 @@ static CharPtr PrintInferTable (
if (StringDoesHaveText (iep->basis2)) {
StringCat (buf, ":");
StringCat (buf, iep->basis2);
+ if (StringCmp (iep->prefix, "alignment") == 0 &&
+ StringDoesHaveText (iep->accession_list)) {
+ StringCat (buf, ":");
+ StringCat (buf, iep->accession_list);
+ }
}
} else {
StringCat (buf, " ");
@@ -5588,6 +6041,12 @@ static void ShowInferenceGroup (
SafeHide (idp->species);
SafeHide (idp->inf_prog_group);
SafeShow (idp->inf_free_group);
+ SafeHide (idp->accession_list);
+ SafeShow (idp->inf_free_program_prompt);
+ SafeShow (idp->inf_free_version_prompt);
+ SafeHide (idp->accession_list_program_prompt);
+ SafeHide (idp->accession_list_version_prompt);
+ SafeHide (idp->accession_list_prompt);
} else if (val == 11) {
SafeHide (idp->inf_accn_group);
SafeHide (idp->species);
@@ -5600,6 +6059,17 @@ static void ShowInferenceGroup (
SafeHide (idp->other_pr_group);
}
MemFree (str);
+ } else if (val == 12) {
+ SafeHide (idp->inf_accn_group);
+ SafeHide (idp->species);
+ SafeHide (idp->inf_prog_group);
+ SafeShow (idp->inf_free_group);
+ SafeShow (idp->accession_list);
+ SafeHide (idp->inf_free_program_prompt);
+ SafeHide (idp->inf_free_version_prompt);
+ SafeShow (idp->accession_list_program_prompt);
+ SafeShow (idp->accession_list_version_prompt);
+ SafeShow (idp->accession_list_prompt);
} else {
SafeHide (idp->inf_accn_group);
SafeHide (idp->species);
@@ -5665,6 +6135,9 @@ static void ChangeInferTableSelect (
SafeSetTitle (idp->basis1, iep->basis1);
SafeSetTitle (idp->basis2, iep->basis2);
+ ReplaceDatabaseStrings (&(iep->accession_list));
+ PointerToDialog (idp->accession_list, iep->accession_list);
+
ShowInferenceGroup (idp);
}
@@ -5741,11 +6214,6 @@ static void ChangeSameSpecies (
CheckExtendInferTable (idp);
}
-static CharPtr insdmessage =
-"GenBank, EMBL, and DDBJ records are part of the International Nucleotide " \
-"Sequence Database collaboration.\nThe database prefix for the /inference " \
-"qualifier in these cases is INSD by collaboration policy.";
-
static void ChangeInferDatabase (
PopuP p
)
@@ -5960,6 +6428,34 @@ static void ChangeInferBasis2 (
CheckExtendInferTable (idp);
}
+
+static void ChangeInferAccessionList (Pointer data)
+{
+ InferDialogPtr idp;
+ InferEvidPtr iep;
+
+ idp = (InferDialogPtr) data;
+ if (idp == NULL) return;
+ iep = GetInferEvid (idp, idp->currItem);
+ if (iep == NULL) return;
+
+ iep->accession_list = MemFree (iep->accession_list);
+ iep->accession_list = DialogToPointer (idp->accession_list);
+
+ if (ReplaceDatabaseStrings (&(iep->accession_list)))
+ {
+ PointerToDialog (idp->accession_list, iep->accession_list);
+ }
+
+ ShowInferenceGroup (idp);
+
+ UpdateDocument (idp->inferdoc, idp->currItem, idp->currItem);
+ Update ();
+
+ CheckExtendInferTable (idp);
+}
+
+
static Boolean StringInList (CharPtr str, CharPtr PNTR list)
{
@@ -5986,7 +6482,7 @@ extern void GBQualsToInferenceDialog (DialoG d, SeqFeatPtr sfp)
size_t len;
CharPtr rest;
CharPtr str;
- CharPtr tmp;
+ CharPtr tmp, tmp2;
idp = (InferDialogPtr) GetObjectExtra (d);
if (idp == NULL) return;
@@ -6111,8 +6607,19 @@ extern void GBQualsToInferenceDialog (DialoG d, SeqFeatPtr sfp)
} else {
iep->basis1 = MemFree (iep->basis1);
iep->basis1 = StringSaveNoNull (str);
+ tmp2 = NULL;
+ if (StringCmp (iep->prefix, "alignment") == 0)
+ {
+ tmp2 = StringChr (tmp, ':');
+ if (tmp2 != NULL) {
+ *tmp2 = 0;
+ tmp2++;
+ }
+ }
iep->basis2 = MemFree (iep->basis2);
iep->basis2 = StringSaveNoNull (tmp);
+ iep->accession_list = MemFree (iep->accession_list);
+ iep->accession_list = StringSaveNoNull (tmp2);
}
} else {
@@ -6163,7 +6670,7 @@ extern void GBQualsToInferenceDialog (DialoG d, SeqFeatPtr sfp)
extern void InferenceDialogToGBQuals (DialoG d, SeqFeatPtr sfp, Boolean convertBadToNote)
{
- CharPtr first = NULL, second = NULL;
+ CharPtr first = NULL, second = NULL, accession_list = NULL;
GBQualPtr gbq, lastgbq;
InferDialogPtr idp;
InferEvidPtr iep;
@@ -6194,7 +6701,7 @@ extern void InferenceDialogToGBQuals (DialoG d, SeqFeatPtr sfp, Boolean convertB
gbq->qual = StringSave ("inference");
if (WhereInEnumPopup (inference_alist, iep->prefix, &val)) {
- if (val > 0 && val <= 11) {
+ if (val > 0 && val <= 12) {
prefix = inferencePrefix [(int) val];
}
}
@@ -6225,11 +6732,16 @@ extern void InferenceDialogToGBQuals (DialoG d, SeqFeatPtr sfp, Boolean convertB
if (StringDoesHaveText (iep->basis1)) {
first = iep->basis1;
second = iep->basis2;
+ if (StringCmp (iep->prefix, "alignment") == 0) {
+ accession_list = iep->accession_list;
+ RemoveEmptyAccessionStrings (accession_list);
+ ReplaceDatabaseStrings (&accession_list);
+ }
}
}
- len = StringLen (prefix) + StringLen (speciesies) + StringLen (first) + StringLen (second);
- str = MemNew (len + 5);
+ len = StringLen (prefix) + StringLen (speciesies) + StringLen (first) + StringLen (second) + StringLen (accession_list);
+ str = MemNew (len + 6);
if (str != NULL) {
StringCpy (str, prefix);
StringCat (str, speciesies);
@@ -6237,6 +6749,10 @@ extern void InferenceDialogToGBQuals (DialoG d, SeqFeatPtr sfp, Boolean convertB
StringCat (str, first);
StringCat (str, ":");
StringCat (str, second);
+ if (StringCmp (prefix, "alignment") == 0 && accession_list != NULL) {
+ StringCat (str, ":");
+ StringCat (str, accession_list);
+ }
gbq->val = StringSave (str);
MemFree (str);
} else {
@@ -6276,6 +6792,7 @@ extern void InferenceDialogToGBQuals (DialoG d, SeqFeatPtr sfp, Boolean convertB
lastgbq->next = gbq;
}
lastgbq = gbq;
+ accession_list = NULL;
}
}
@@ -6302,7 +6819,7 @@ static DialoG NewCreateInferenceDialog (
)
{
- GrouP cts, tbl, g0, g1, g2, g3, g4, g5, p;
+ GrouP cts, tbl, g0, g1, g2, g3, g4, g5, p, prompt_grp;
FonT fnt;
Int2 i, hgt, wid;
InferDialogPtr idp;
@@ -6414,14 +6931,26 @@ static DialoG NewCreateInferenceDialog (
g5 = HiddenGroup (g2, 2, 0, NULL);
SetGroupSpacing (g5, 5, 5);
- StaticPrompt (g5, "Program or Database", 0, dialogTextHeight, programFont, 'l');
+ prompt_grp = HiddenGroup (g5, 0, 0, NULL);
+ idp->inf_free_program_prompt = StaticPrompt (prompt_grp, "Program or Database", 0, dialogTextHeight, programFont, 'l');
+ idp->accession_list_program_prompt = StaticPrompt (prompt_grp, "Program", 0, dialogTextHeight, programFont, 'l');
idp->basis1 = DialogText (g5, "", 10, ChangeInferBasis1);
SetObjectExtra (idp->basis1, idp, NULL);
- StaticPrompt (g5, "Version or Accession", 0, dialogTextHeight, programFont, 'l');
+ prompt_grp = HiddenGroup (g5, 0, 0, NULL);
+ idp->inf_free_version_prompt = StaticPrompt (prompt_grp, "Version or Accession", 0, dialogTextHeight, programFont, 'l');
+ idp->accession_list_version_prompt = StaticPrompt (prompt_grp, "Version", 0, dialogTextHeight, programFont, 'l');
+
idp->basis2 = DialogText (g5, "", 10, ChangeInferBasis2);
SetObjectExtra (idp->basis2, idp, NULL);
+ idp->accession_list_prompt = StaticPrompt (g5, "Accessions", 0, dialogTextHeight, programFont, 'l');
+ idp->accession_list = CreateTagListDialogEx3 (g5, 3, 2, 2,
+ accessionlist_types, accessionlist_widths,
+ accessionlist_popups, TRUE, FALSE, AccessionListDataToDialog, AccessionListDialogToData,
+ AccessionListCallbacks, idp,
+ FALSE, FALSE);
+
idp->inf_free_group = g5;
Hide (idp->inf_free_group);
@@ -6727,6 +7256,17 @@ extern EditApplyPtr EditApplyFree (EditApplyPtr eap)
return eap;
}
+
+extern EditApplyPtr EditApplyNew (void)
+{
+ EditApplyPtr eap;
+
+ eap = (EditApplyPtr) MemNew (sizeof (EditApplyData));
+ eap->find_location = EditApplyFindLocation_anywhere;
+ return eap;
+}
+
+
typedef struct EditApplydlg
{
DIALOG_MESSAGE_BLOCK
@@ -6905,7 +7445,7 @@ static Pointer DialogToEditApply (DialoG d)
}
if (dlg->location_choice != NULL) {
- data->find_location = GetValue (dlg->location_choice);
+ data->find_location = (EditApplyFindLocation) GetValue (dlg->location_choice);
} else {
data->find_location = EditApplyFindLocation_anywhere;
}
@@ -6968,7 +7508,7 @@ static ValNodePtr TestEditApply (DialoG d)
{
if (TextHasNoText (dlg->apply_txt))
{
- ValNodeAddPointer (&total_err_list, 0, "apply text");
+ ValNodeAddPointer (&total_err_list, 0, StringSave ("apply text"));
}
}
else
@@ -6982,7 +7522,7 @@ static ValNodePtr TestEditApply (DialoG d)
{
if (TextHasNoText (dlg->find_txt))
{
- ValNodeAddPointer (&total_err_list, 0, "find text");
+ ValNodeAddPointer (&total_err_list, 0, StringSave ("find text"));
}
}
else
@@ -7010,30 +7550,6 @@ static void EditApplyDialogCopy (ButtoN b)
str = MemFree (str);
}
-static ValNodePtr ValNodeDupStringList (ValNodePtr vnp)
-{
- ValNodePtr cpy = NULL, last = NULL, tmp;
-
- while (vnp != NULL)
- {
- tmp = ValNodeNew (NULL);
- tmp->choice = vnp->choice;
- tmp->data.ptrvalue = StringSave (vnp->data.ptrvalue);
- if (last == NULL)
- {
- cpy = tmp;
- }
- else
- {
- last->next = tmp;
- }
- last = tmp;
- vnp = vnp->next;
- }
- return cpy;
-}
-
-
extern DialoG EditApplyDialog
(GrouP h,
Int4 action_choice,
@@ -7710,7 +8226,11 @@ typedef struct clickablelist
{
DIALOG_MESSAGE_BLOCK
DoC doc;
- DoC clickable_item_list;
+ DoC clickable_item_list;
+ PrompT title1;
+ PrompT title2;
+ PrompT help1;
+ PrompT help2;
TexT find_txt;
ClickableCallback item_single_click_callback;
@@ -7809,7 +8329,7 @@ static ClickableItemPtr GetSubItem (ValNodePtr item_list, Int2Ptr pitem)
static Int4 CountLevels (ValNodePtr item_list)
{
- Int4 num_levels = 1, num, num_sublevels = 0;
+ Int4 num, num_sublevels = 0;
ValNodePtr vnp;
ClickableItemPtr cip;
@@ -7953,22 +8473,34 @@ static void PopulateClickableList (ClickableListPtr dlg, ValNodePtr list_list)
}
-static Int2 PanelOffsetFromCharOffset (ClickableListPtr dlg, Int2 item, Int2 char_offset)
+
+NLM_EXTERN Int2 PanelOffsetFromCharOffsetEx (DoC doc, FonT font, Int2 item, Int2 col, Int2 char_offset)
{
Int2 numRows, numCols, lineHeight;
Int2 left_start, width, inset, char_width;
- if (dlg == NULL) return 0;
- GetItemParams4 (dlg->doc, item, NULL, &numRows, &numCols, &lineHeight, NULL);
- GetColParams (dlg->doc, item, numCols, &left_start, &width, &inset, NULL);
+ if (doc == NULL) return 0;
+ GetItemParams4 (doc, item, NULL, &numRows, &numCols, &lineHeight, NULL);
+ GetColParams (doc, item, col, &left_start, &width, &inset, NULL);
/* need to set font so that Nlm_CharWidth works properly */
- SelectFont (dlg->col_fmt_array_array[0][0].font);
+ SelectFont (font);
char_width = Nlm_CharWidth ('A');
return left_start + inset + char_offset * char_width;
}
-static Int2 GetTextSelectCharOffset (PoinT pt, ClickableListPtr dlg, Int2 item, Int2 row, Int2 col)
+
+static Int2 PanelOffsetFromCharOffset (ClickableListPtr dlg, Int2 item, Int2 char_offset)
+{
+ Int2 numCols;
+ if (dlg == NULL) return 0;
+ GetItemParams4 (dlg->doc, item, NULL, NULL, &numCols, NULL, NULL);
+
+ return PanelOffsetFromCharOffsetEx (dlg->doc, dlg->col_fmt_array_array[0][0].font, item, numCols, char_offset);
+}
+
+
+NLM_EXTERN Int2 GetTextSelectCharOffsetEx (PoinT pt, DoC doc, FonT font, Int2 item, Int2 row, Int2 col)
{
Int2 pixPos, pixInset;
Int2 one_char_width;
@@ -7976,18 +8508,18 @@ static Int2 GetTextSelectCharOffset (PoinT pt, ClickableListPtr dlg, Int2 item,
Int4 len;
Int2 char_offset;
- if (dlg == NULL) return 0;
+ if (doc == NULL) return 0;
- GetColParams (dlg->doc, item, col, &pixPos,
+ GetColParams (doc, item, col, &pixPos,
NULL, &pixInset, NULL);
- SelectFont (dlg->col_fmt_array_array[0][0].font);
+ SelectFont (font);
one_char_width = Nlm_CharWidth ('A');
if (one_char_width == 0) return 0;
char_offset = (pt.x - pixPos - pixInset) / one_char_width;
if (char_offset > 0) {
- txt = GetDocText (dlg->doc, item, row, col);
+ txt = GetDocText (doc, item, row, col);
len = StringLen (txt);
if (char_offset >= len) {
char_offset = - 1;
@@ -7998,6 +8530,14 @@ static Int2 GetTextSelectCharOffset (PoinT pt, ClickableListPtr dlg, Int2 item,
}
+static Int2 GetTextSelectCharOffset (PoinT pt, ClickableListPtr dlg, Int2 item, Int2 row, Int2 col)
+{
+ if (dlg == NULL) return 0;
+
+ return GetTextSelectCharOffsetEx (pt, dlg->doc, dlg->col_fmt_array_array[0][0].font, item, row, col);
+}
+
+
static void ClickList (DoC d, PoinT pt)
{
@@ -8635,19 +9175,21 @@ CreateClickableListDialogEx
(GrouP h,
CharPtr label1,
CharPtr label2,
+ CharPtr help1,
+ CharPtr help2,
ClickableCallback item_single_click_callback,
ClickableCallback item_double_click_callback,
Pointer item_click_callback_data,
GetClickableItemText get_item_text,
Int4 left_width,
Int4 right_width,
- Boolean horizontal)
+ Boolean horizontal,
+ Boolean show_find)
{
- GrouP p, pnl_grp, find_grp;
+ GrouP p, pnl_grp, find_grp = NULL;
ClickableListPtr dlg;
RecT r;
ButtoN b;
- PrompT p1, p2;
dlg = (ClickableListPtr) MemNew (sizeof (ClickableListData));
if (dlg == NULL)
@@ -8673,18 +9215,30 @@ CreateClickableListDialogEx
if (horizontal) {
pnl_grp = HiddenGroup (p, 2, 0, NULL);
- StaticPrompt (pnl_grp, label1, 0, popupMenuHeight, programFont, 'c');
- StaticPrompt (pnl_grp, label2, 0, popupMenuHeight, programFont, 'c');
-
+ if (label1 || label2) {
+ dlg->title1 = StaticPrompt (pnl_grp, label1, left_width, popupMenuHeight, programFont, 'c');
+ dlg->title2 = StaticPrompt (pnl_grp, label2, right_width, popupMenuHeight, programFont, 'c');
+ }
dlg->doc = DocumentPanel (pnl_grp, left_width, stdLineHeight * 20);
dlg->clickable_item_list = DocumentPanel (pnl_grp, right_width, stdLineHeight * 20);
+ if (help1 || help2) {
+ dlg->help1 = StaticPrompt (pnl_grp, help1, left_width, popupMenuHeight, programFont, 'c');
+ dlg->help2 = StaticPrompt (pnl_grp, help2, right_width, popupMenuHeight, programFont, 'c');
+ }
} else {
pnl_grp = HiddenGroup (p, -1, 0, NULL);
- p1 = StaticPrompt (pnl_grp, label1, 0, popupMenuHeight, programFont, 'c');
+ dlg->title1 = StaticPrompt (pnl_grp, label1, left_width, popupMenuHeight, programFont, 'c');
dlg->doc = DocumentPanel (pnl_grp, left_width, stdLineHeight * 20);
- p2 = StaticPrompt (pnl_grp, label2, 0, popupMenuHeight, programFont, 'c');
+ if (help1 || help2) {
+ dlg->help1 = StaticPrompt (pnl_grp, help1, left_width, popupMenuHeight, programFont, 'c');
+ }
+ dlg->title2 = StaticPrompt (pnl_grp, label2, right_width, popupMenuHeight, programFont, 'c');
dlg->clickable_item_list = DocumentPanel (pnl_grp, right_width, stdLineHeight * 20);
- AlignObjects (ALIGN_CENTER, (HANDLE) p1, (HANDLE) dlg->doc, (HANDLE) p2, (HANDLE) dlg->clickable_item_list, NULL);
+ if (help1 || help2) {
+ dlg->help2 = StaticPrompt (pnl_grp, help2, right_width, popupMenuHeight, programFont, 'c');
+ }
+ AlignObjects (ALIGN_CENTER, (HANDLE) dlg->title1, (HANDLE) dlg->doc, (HANDLE) dlg->title2, (HANDLE) dlg->clickable_item_list,
+ (HANDLE) (dlg->help1 == NULL ? dlg->help2 : dlg->help1), (HANDLE) (dlg->help1 == NULL ? NULL : dlg->help2), NULL);
}
SetObjectExtra (dlg->doc, dlg, NULL);
@@ -8704,19 +9258,37 @@ CreateClickableListDialogEx
InsetRect (&r, 4, 4);
clickableColFmt[1].pixWidth = r.right - r.left - clickableColFmt[0].pixWidth;
- find_grp = HiddenGroup (p, 4, 0, NULL);
- SetGroupSpacing (find_grp, 10, 10);
- StaticPrompt (find_grp, "Find Text", 0, popupMenuHeight, programFont, 'l');
- dlg->find_txt = DialogText (find_grp, "", 20, NULL);
- b = PushButton (find_grp, "<<", FindPreviousClickableText);
- SetObjectExtra (b, dlg, NULL);
- b = PushButton (find_grp, ">>", FindClickableText);
- SetObjectExtra (b, dlg, NULL);
+ if (show_find) {
+ find_grp = HiddenGroup (p, 4, 0, NULL);
+ SetGroupSpacing (find_grp, 10, 10);
+ StaticPrompt (find_grp, "Find Text", 0, popupMenuHeight, programFont, 'l');
+ dlg->find_txt = DialogText (find_grp, "", 20, NULL);
+ b = PushButton (find_grp, "<<", FindPreviousClickableText);
+ SetObjectExtra (b, dlg, NULL);
+ b = PushButton (find_grp, ">>", FindClickableText);
+ SetObjectExtra (b, dlg, NULL);
+ }
AlignObjects (ALIGN_CENTER, (HANDLE) pnl_grp, (HANDLE) find_grp, NULL);
return (DialoG) p;
}
+extern void SetClickableListDialogTitles (DialoG d, CharPtr title1, CharPtr title2, CharPtr help1, CharPtr help2)
+{
+ ClickableListPtr dlg;
+
+ dlg = (ClickableListPtr) GetObjectExtra (d);
+ if (dlg == NULL)
+ {
+ return;
+ }
+ SafeSetTitle (dlg->title1, title1);
+ SafeSetTitle (dlg->title2, title2);
+ SafeSetTitle (dlg->help1, help1);
+ SafeSetTitle (dlg->help2, help2);
+}
+
+
extern DialoG
CreateClickableListDialog
(GrouP h,
@@ -8727,14 +9299,14 @@ CreateClickableListDialog
Pointer item_click_callback_data,
GetClickableItemText get_item_text)
{
- return CreateClickableListDialogEx (h, label1, label2,
+ return CreateClickableListDialogEx (h, label1, label2, NULL, NULL,
item_single_click_callback,
item_double_click_callback,
item_click_callback_data,
get_item_text,
stdCharWidth * 30,
stdCharWidth * 30 + 5,
- TRUE);
+ TRUE, TRUE);
}
@@ -8915,6 +9487,202 @@ static CharPtr GetClickableTextFromItemList (ValNodePtr item_list, CharPtr separ
return txt;
}
+
+static CharPtr
+GetFragmentFromDocRow
+(DoC doc,
+ Int2 item,
+ Int2 col,
+ Int2 row,
+ Int2 char_start, Int2 char_stop)
+{
+ CharPtr txt = NULL, cp_txt;
+ Int4 len;
+
+ txt = GetDocText (doc, item, row, col);
+
+ if (char_start == 0 && char_stop < 0) {
+ /* take all of row */
+ return txt;
+ } else {
+ len = StringLen (txt);
+ if (char_stop >= len) {
+ /* selection was drawn beyond length of text */
+ char_stop = len - 1;
+ } else if (char_stop < 0) {
+ /* take all of row */
+ char_stop = len - 1;
+ }
+ if (char_start >= len) {
+ /* do nothing - selection is not within text */
+ txt = MemFree (txt);
+ } else {
+ cp_txt = (CharPtr) MemNew (sizeof (Char) * (2 + char_stop - char_start));
+ StringNCpy (cp_txt, txt + char_start, 1 + char_stop - char_start);
+ cp_txt[1 + char_stop - char_start] = 0;
+ txt = MemFree (txt);
+ txt = cp_txt;
+ }
+ }
+ return txt;
+}
+
+
+static CharPtr
+GetFragmentsFromDocCol
+(DoC doc,
+ Int2 item,
+ Int2 col,
+ Int2 row_start, Int2 row_stop,
+ Int2 char_start, Int2 char_stop)
+{
+ Int2 row;
+ CharPtr txt;
+ ValNodePtr fragments = NULL;
+
+ if (row_start == row_stop) {
+ txt = GetFragmentFromDocRow (doc, item, col, row_start, char_start, char_stop);
+ if (StringHasNoText (txt)) {
+ txt = MemFree (txt);
+ } else {
+ ValNodeAddPointer (&fragments, 0, txt);
+ }
+ } else {
+ txt = GetFragmentFromDocRow (doc, item, col, row_start, char_start, -1);
+ if (StringHasNoText (txt)) {
+ txt = MemFree (txt);
+ } else {
+ ValNodeAddPointer (&fragments, 0, txt);
+ }
+ row = row_start + 1;
+ while (row < row_stop) {
+ txt = GetFragmentFromDocRow (doc, item, col, row, 0, -1);
+ if (StringHasNoText (txt)) {
+ txt = MemFree (txt);
+ } else {
+ ValNodeAddPointer (&fragments, 0, txt);
+ }
+ row++;
+ }
+ txt = GetFragmentFromDocRow (doc, item, col, row_stop, 0, char_stop);
+ if (StringHasNoText (txt)) {
+ txt = MemFree (txt);
+ } else {
+ ValNodeAddPointer (&fragments, 0, txt);
+ }
+ }
+ txt = GetClickableTextFromItemList (fragments, " ");
+ fragments = ValNodeFreeData (fragments);
+ return txt;
+}
+
+
+static Boolean CollectFromThisColumn (Int2 col, Int2Ptr only_these_columns, Int2 num_col)
+{
+ Int2 i;
+ Boolean rval = FALSE;
+
+ if (only_these_columns == NULL) {
+ rval = TRUE;
+ } else {
+ for (i = 0; i < num_col; i++) {
+ if (only_these_columns[i] == col) {
+ rval = TRUE;
+ }
+ }
+ }
+ return rval;
+}
+
+
+static CharPtr
+GetFragmentsFromDocItem
+(DoC doc,
+ Int2 item,
+ Int2 col_start, Int2 col_stop,
+ Int2 row_start, Int2 row_stop,
+ Int2 char_start, Int2 char_stop,
+ Int2Ptr only_these_columns, Int2 num_col)
+{
+ Int2 col;
+ CharPtr txt;
+ Int2 num_rows, num_cols;
+ ValNodePtr fragments = NULL;
+
+ GetItemParams4 (doc, item, NULL, &num_rows, &num_cols, NULL, NULL);
+ if (col_stop < 0) {
+ col_stop = num_cols;
+ }
+ if (row_stop < 0) {
+ row_stop = num_rows;
+ }
+
+ if (col_start == col_stop) {
+ if (CollectFromThisColumn (col_start, only_these_columns, num_col)) {
+ txt = GetFragmentsFromDocCol (doc, item, col_start, row_start, row_stop, char_start, char_stop);
+ ValNodeAddPointer (&fragments, 0, txt);
+ }
+ } else {
+ if (CollectFromThisColumn (col_start, only_these_columns, num_col)) {
+ txt = GetFragmentsFromDocCol (doc, item, col_start, row_start, num_rows, char_start, -1);
+ ValNodeAddPointer (&fragments, 0, txt);
+ }
+ col = col_start + 1;
+ while (col < col_stop) {
+ if (CollectFromThisColumn (col, only_these_columns, num_col)) {
+ txt = GetFragmentsFromDocCol (doc, item, col, 1, num_rows, 0, -1);
+ ValNodeAddPointer (&fragments, 0, txt);
+ }
+ col++;
+ }
+ if (CollectFromThisColumn (col_stop, only_these_columns, num_col)) {
+ txt = GetFragmentsFromDocCol (doc, item, col_stop, 1, row_stop, 0, char_stop);
+ ValNodeAddPointer (&fragments, 0, txt);
+ }
+ }
+ txt = GetClickableTextFromItemList (fragments, "\t");
+ fragments = ValNodeFreeData (fragments);
+
+ return txt;
+}
+
+
+NLM_EXTERN CharPtr GetSelectedDocText (DoC doc, Int2 item_start, Int2 row_start, Int2 col_start, Int2 char_start,
+ Int2 item_stop, Int2 row_stop, Int2 col_stop, Int2 char_stop,
+ Int2Ptr only_these_columns, Int2 num_col)
+{
+ Int2 item;
+ CharPtr txt;
+ ValNodePtr fragment_list = NULL;
+
+ if (doc == NULL || item_start < 1)
+ {
+ return NULL;
+ }
+
+ if (char_start < 0) char_start = 0;
+
+ if (item_start == item_stop) {
+ txt = GetFragmentsFromDocItem (doc, item_start, col_start, col_stop, row_start, row_stop, char_start, char_stop, only_these_columns, num_col);
+ ValNodeAddPointer (&fragment_list, 0, txt);
+ } else {
+ txt = GetFragmentsFromDocItem (doc, item_start, col_start, -1, row_start, -1, char_start, -1, only_these_columns, num_col);
+ ValNodeAddPointer (&fragment_list, 0, txt);
+ item = item_start + 1;
+ while (item < item_stop) {
+ txt = GetFragmentsFromDocItem (doc, item, 1, -1, 1, -1, 0, -1, only_these_columns, num_col);
+ ValNodeAddPointer (&fragment_list, 0, txt);
+ item++;
+ }
+ txt = GetFragmentsFromDocItem (doc, item, 1, col_stop, 1, row_stop, 0, char_stop, only_these_columns, num_col);
+ ValNodeAddPointer (&fragment_list, 0, txt);
+ }
+
+ txt = GetClickableTextFromItemList (fragment_list, "\r\n");
+ fragment_list = ValNodeFreeData (fragment_list);
+ return txt;
+}
+
extern CharPtr GetSelectedClickableListText (DialoG d)
{
ClickableListPtr dlg;
@@ -9146,12 +9914,6 @@ static Int4 GetYearFromToken (CharPtr token, Int4 token_len)
return year;
}
-static CharPtr months [12] =
-{
- "January", "February", "March", "April", "May", "June",
- "July", "August", "September", "October", "November", "December"
-};
-
static CharPtr month_abbrevs [12] =
{
"Jan", "Feb", "Mar", "Apr", "May", "Jun",
@@ -9395,7 +10157,6 @@ extern CharPtr ReformatDateStringEx (CharPtr orig_date, Boolean month_first, Boo
CharPtr month = NULL;
CharPtr token_list[3];
Int4 token_lens[3];
- CharPtr delimiters = " \t,-/";
CharPtr numbers = "0123456789";
CharPtr letters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
Int4 num_tokens = 0;
@@ -9880,7 +10641,7 @@ typedef struct rptunitrangedlg {
TexT range_stop;
} RptUnitRangeDlgData, PNTR RptUnitRangeDlgPtr;
-Boolean ParseRptUnitRangeOkEx (CharPtr txt, Int4Ptr pstart, Int4Ptr pstop)
+static Boolean ParseRptUnitRangeOkEx (CharPtr txt, Int4Ptr pstart, Int4Ptr pstop)
{
CharPtr cp;
Int4 start = -1, stop = -1;
@@ -10003,7 +10764,7 @@ extern DialoG CreateRptUnitRangeDialog (GrouP h, SeqEntryPtr sep, CharPtr name,
return (DialoG) p;
}
-Boolean ParseRptUnitRangeOk (CharPtr txt)
+static Boolean ParseRptUnitRangeOk (CharPtr txt)
{
return ParseRptUnitRangeOkEx (txt, NULL, NULL);
}
@@ -10147,7 +10908,7 @@ static Pointer MobileElementDialogToString (DialoG d)
}
-extern DialoG CreateMobileElementDialog (GrouP h, SeqEntryPtr sep, CharPtr name,
+static DialoG CreateMobileElementDialog (GrouP h, SeqEntryPtr sep, CharPtr name,
TaglistCallback tlp_callback,
Pointer callback_data)
{
@@ -10230,7 +10991,7 @@ static Pointer TrueFalseDialogToPointer (DialoG d)
}
}
-extern DialoG TrueFalseDialog (GrouP h, SeqEntryPtr sep, CharPtr name,
+static DialoG TrueFalseDialog (GrouP h, SeqEntryPtr sep, CharPtr name,
TaglistCallback tlp_callback,
Pointer callback_data)
{
@@ -10254,7 +11015,7 @@ extern DialoG TrueFalseDialog (GrouP h, SeqEntryPtr sep, CharPtr name,
return (DialoG) p;
}
-Boolean ParseTrueFalseOk (CharPtr txt)
+static Boolean ParseTrueFalseOk (CharPtr txt)
{
if (StringHasNoText (txt) || StringICmp (txt, "TRUE") == 0 || StringICmp (txt, "FALSE") == 0) {
return TRUE;
@@ -10830,7 +11591,7 @@ static void GBQualEditDialogCopyText (ButtoN b)
}
}
-extern DialoG CreateSingleGBQualEditDialog (GrouP h, SeqEntryPtr sep, CharPtr name,
+static DialoG CreateSingleGBQualEditDialog (GrouP h, SeqEntryPtr sep, CharPtr name,
Boolean force_string,
TaglistCallback tlp_callback,
Pointer callback_data)
@@ -11143,7 +11904,12 @@ static Pointer NewDialogToImportFields (DialoG d)
return (Pointer) gbq_list;
}
-static void AddMandatoryAndOptionalQuals (CharPtr name, NewFieldPagePtr fpf, GBQualPtr gbq, Boolean use_rarely_used)
+static void
+AddMandatoryAndOptionalQuals
+(CharPtr name,
+ NewFieldPagePtr fpf,
+ GBQualPtr gbq,
+ Boolean use_rarely_used)
{
Int2 index, i, qual;
SematicFeatPtr sefp;
@@ -11234,8 +12000,10 @@ extern DialoG NewCreateImportFields (GrouP h, CharPtr name, SeqFeatPtr sfp, Bool
/* add remaining qualifiers last */
gbq_it = gbq;
- while (gbq_it != NULL) {
- AddTemporaryGBQual (&(fpf->new_gbq), gbq_it->qual, gbq, FALSE);
+ while (gbq_it != NULL) {
+ if (!ShouldSuppressGBQual(fpf->subtype, gbq_it->qual)) {
+ AddTemporaryGBQual (&(fpf->new_gbq), gbq_it->qual, gbq, FALSE);
+ }
gbq_it = gbq_it->next;
}
@@ -11281,3 +12049,258 @@ extern DialoG NewCreateImportFields (GrouP h, CharPtr name, SeqFeatPtr sfp, Bool
}
+typedef struct specialcharacterdialog
+{
+ TexT PNTR text_list;
+ ButtoN accept_btn;
+ Int4 num_chars;
+ ValNodePtr find_list;
+} SpecialCharacterDialogData, PNTR SpecialCharacterDialogPtr;
+
+
+static void EnableSpecialCharacterAccept (TexT t)
+{
+ SpecialCharacterDialogPtr sd;
+ Int4 pos;
+ CharPtr str;
+ Boolean has_bad = FALSE;
+
+ sd = (SpecialCharacterDialogPtr) GetObjectExtra (t);
+ if (sd == NULL) return;
+
+ for (pos = 0; pos < sd->num_chars && !has_bad; pos++)
+ {
+ str = SaveStringFromText (sd->text_list[pos]);
+ SpecialCharFind (&str, NULL, &has_bad, NULL);
+ str = MemFree (str);
+ }
+ if (has_bad)
+ {
+ Disable (sd->accept_btn);
+ }
+ else
+ {
+ Enable (sd->accept_btn);
+ }
+}
+
+
+static void SetWindowsSpecialCharacterDefaults (ButtoN b)
+{
+ SpecialCharacterDialogPtr sd;
+ Int4 pos;
+ CharPtr str;
+ ValNodePtr vnp;
+
+ sd = (SpecialCharacterDialogPtr) GetObjectExtra (b);
+ if (sd == NULL) return;
+
+ for (vnp = sd->find_list, pos = 0; vnp != NULL; vnp = vnp->next, pos++)
+ {
+ str = GetSpecialWinCharacterReplacement ((unsigned char) vnp->choice);
+ SetTitle (sd->text_list[pos], str);
+ }
+}
+
+
+static void SetMacSpecialCharacterDefaults (ButtoN b)
+{
+ SpecialCharacterDialogPtr sd;
+ Int4 pos;
+ CharPtr str;
+ ValNodePtr vnp;
+
+ sd = (SpecialCharacterDialogPtr) GetObjectExtra (b);
+ if (sd == NULL) return;
+
+ for (vnp = sd->find_list, pos = 0; vnp != NULL; vnp = vnp->next, pos++)
+ {
+ str = GetSpecialMacCharacterReplacement ((unsigned char) vnp->choice);
+ SetTitle (sd->text_list[pos], str);
+ }
+
+}
+
+
+extern Boolean FixSpecialCharactersForStringsInList (ValNodePtr find_list, CharPtr exp_text, Boolean force_fix)
+{
+ ValNodePtr vnp, context_list, vnp_c;
+ Int4 pos;
+ CharPtr repl;
+ WindoW w;
+ GrouP h, c, g, p1, g2;
+ PrompT p2;
+ LisT contexts;
+ ButtoN b;
+ SpecialCharacterDialogData sd;
+ ModalAcceptCancelData acd;
+ Char label[2];
+ Int4 num_contexts;
+ Boolean rval = FALSE;
+
+ if (find_list == NULL) {
+ return TRUE;
+ }
+
+ ArrowCursor();
+ Update();
+
+ sd.find_list = find_list;
+ sd.num_chars = ValNodeLen (find_list);
+
+ acd.accepted = FALSE;
+ acd.cancelled = FALSE;
+
+ w = ModalWindow(-20, -13, -10, -10, NULL);
+ h = HiddenGroup (w, -1, 0, NULL);
+ SetGroupSpacing (h, 10, 10);
+
+ p1 = MultiLinePrompt (h, exp_text, 27 * stdCharWidth, programFont);
+ p2 = StaticPrompt (h, "Choose replacement characters.", 0, 0, programFont, 'l');
+
+ g = HiddenGroup (h, 3, 0, NULL);
+ StaticPrompt (g, "Character", 0, 0, programFont, 'l');
+ StaticPrompt (g, "Replacement", 0, 0, programFont, 'l');
+ StaticPrompt (g, "Contexts", 0, 0, programFont, 'l');
+
+ sd.text_list = MemNew (sizeof (TexT) * sd.num_chars);
+ label[1] = 0;
+ for (vnp = find_list, pos = 0; vnp != NULL; vnp = vnp->next, pos++)
+ {
+ label[0] = vnp->choice;
+ StaticPrompt (g, label, 0, 0, programFont, 'l');
+ repl = GetSpecialCharacterReplacement (vnp->choice);
+ sd.text_list[pos] = DialogText (g, repl, 5, EnableSpecialCharacterAccept);
+ SetObjectExtra (sd.text_list[pos], &sd, NULL);
+ context_list = vnp->data.ptrvalue;
+ num_contexts = ValNodeLen (context_list);
+ if (num_contexts == 0)
+ {
+ StaticPrompt (g, "", 0, 0, programFont, 'l');
+ }
+ else if (num_contexts == 1)
+ {
+ StaticPrompt (g, *((CharPtr PNTR)context_list->data.ptrvalue), 0, 0, programFont, 'l');
+ }
+ else
+ {
+ contexts = SingleList (g, 16, MIN (num_contexts, 5), NULL);
+ for (vnp_c = context_list; vnp_c != NULL; vnp_c = vnp_c->next)
+ {
+ ListItem (contexts, *((CharPtr PNTR)vnp_c->data.ptrvalue));
+ }
+ SetValue (contexts, 1);
+ }
+ }
+
+ g2 = HiddenGroup (h, 2, 0, NULL);
+ SetGroupSpacing (g2, 10, 10);
+ b = PushButton (g2, "Suggest Windows Replacements", SetWindowsSpecialCharacterDefaults);
+ SetObjectExtra (b, &sd, NULL);
+ b = PushButton (g2, "Suggest Mac Replacements", SetMacSpecialCharacterDefaults);
+ SetObjectExtra (b, &sd, NULL);
+
+ c = HiddenGroup (h, 3, 0, NULL);
+ SetGroupSpacing (c, 10, 10);
+ sd.accept_btn = PushButton (c, "Replace Characters", ModalAcceptButton);
+ SetObjectExtra (sd.accept_btn, &acd, NULL);
+ b = PushButton (c, "Cancel", ModalCancelButton);
+ SetObjectExtra (b, &acd, NULL);
+ AlignObjects (ALIGN_CENTER, (HANDLE) p1, (HANDLE) p2, (HANDLE) g, (HANDLE) g2, (HANDLE) c, NULL);
+
+ Show(w);
+ Select (w);
+ while (!acd.accepted && ! acd.cancelled)
+ {
+ ProcessExternalEvent ();
+ Update ();
+ }
+ ProcessAnEvent ();
+ if (acd.accepted)
+ {
+ for (vnp = find_list, pos = 0; vnp != NULL; vnp = vnp->next, pos++)
+ {
+ repl = JustSaveStringFromText (sd.text_list[pos]);
+ label[0] = vnp->choice;
+ for (vnp_c = vnp->data.ptrvalue; vnp_c != NULL; vnp_c = vnp_c->next)
+ {
+ FindReplaceString (vnp_c->data.ptrvalue, label, repl, TRUE, FALSE);
+ }
+ repl = MemFree (repl);
+ }
+
+ rval = TRUE;
+ }
+ else if (force_fix)
+ {
+ for (vnp = find_list; vnp != NULL; vnp = vnp->next)
+ {
+ label[0] = vnp->choice;
+ for (vnp_c = vnp->data.ptrvalue; vnp_c != NULL; vnp_c = vnp_c->next)
+ {
+ FindReplaceString (vnp_c->data.ptrvalue, label, "#", TRUE, FALSE);
+ }
+ }
+ rval = TRUE;
+ }
+
+ Remove (w);
+ return rval;
+
+}
+
+
+NLM_EXTERN Boolean FixSpecialCharacters (Uint2 entityID)
+{
+ ValNodePtr find_list = NULL;
+ Boolean rval;
+
+ StringActionInEntity (entityID, FALSE, UPDATE_NEVER, NULL, NULL, NULL, TRUE,
+ SpecialCharFindWithContext, NULL, &find_list);
+
+ rval = FixSpecialCharactersForStringsInList (find_list,
+ "The ASN.1 contains special characters.\nIf you save it without stripping them,\nyou will be unable to load the file in Sequin.",
+ FALSE);
+
+ find_list = FreeContextList (find_list);
+ if (rval)
+ {
+ ObjMgrSetDirtyFlag (entityID, TRUE);
+ ObjMgrSendMsg (OM_MSG_UPDATE, entityID, 0, 0);
+ }
+ return rval;
+}
+
+
+NLM_EXTERN Boolean FixSpecialCharactersForObject (Uint2 datatype, Pointer objdata, CharPtr msg, Boolean force_fix, BoolPtr changed)
+{
+ ValNodePtr find_list = NULL;
+ Boolean rval;
+
+ StringActionForObject (datatype, objdata, 0, FALSE, UPDATE_NEVER,
+ SpecialCharFindWithContext, NULL, &find_list);
+
+ rval = FixSpecialCharactersForStringsInList (find_list,
+ msg == NULL ?
+ "The ASN.1 contains special characters.\nIf you save it without stripping them,\nyou will be unable to load the file in Sequin."
+ : msg,
+ force_fix);
+
+ if (changed != NULL)
+ {
+ if (find_list == NULL)
+ {
+ *changed = FALSE;
+ }
+ else
+ {
+ *changed = rval;
+ }
+ }
+
+ find_list = FreeContextList (find_list);
+ return rval;
+}
+
+
+
diff --git a/desktop/dlogutil.h b/desktop/dlogutil.h
index 3e8523ef..f7a5cc96 100644
--- a/desktop/dlogutil.h
+++ b/desktop/dlogutil.h
@@ -29,7 +29,7 @@
*
* Version Creation Date: 1/22/95
*
-* $Revision: 6.76 $
+* $Revision: 6.91 $
*
* File Description:
*
@@ -46,6 +46,7 @@
#define _DLOGUTIL_
#include <vibrant.h>
+#include <document.h>
#include <sqnutils.h>
#include <prtutil.h>
#include <asn.h>
@@ -327,6 +328,8 @@ typedef void (*HelpMessageFunc) (CharPtr, CharPtr);
*****************************************************************************/
extern CharPtr SaveStringFromTextAndStripNewlines (TexT t);
+extern CharPtr StripNewlines (CharPtr str);
+extern void NewlinesToTildes (CharPtr str);
/* GetRidOfEmptyFeatsDescStrings takes either an entityID or a SeqEntryPtr */
@@ -468,6 +471,17 @@ extern DialoG SequenceSelectionDialog
Boolean show_prots,
Uint2 entityID);
+extern DialoG SequenceSelectionDialogEx
+(GrouP h,
+ Nlm_ChangeNotifyProc change_notify,
+ Pointer change_userdata,
+ Boolean allow_multi,
+ Boolean allow_none,
+ Boolean show_nucs,
+ Boolean show_prots,
+ Uint2 entityID,
+ Int4 list_height);
+
extern DialoG SubSourceTypeDialog
(GrouP h,
Int2 list_height,
@@ -504,13 +518,18 @@ CreateClickableListDialogEx
(GrouP h,
CharPtr label1,
CharPtr label2,
+ CharPtr help1,
+ CharPtr help2,
ClickableCallback item_single_click_callback,
ClickableCallback item_double_click_callback,
Pointer item_click_callback_data,
GetClickableItemText get_item_text,
Int4 left_width,
Int4 right_width,
- Boolean horizontal);
+ Boolean horizontal,
+ Boolean show_find);
+
+extern void SetClickableListDialogTitles (DialoG d, CharPtr title1, CharPtr title2, CharPtr help1, CharPtr help2);
extern void ScrollToNextClickableTextDescription (CharPtr txt, DialoG d);
extern void ScrollToPreviousClickableTextDescription (CharPtr txt, DialoG d);
@@ -575,6 +594,7 @@ typedef struct editapply
} EditApplyData, PNTR EditApplyPtr;
extern EditApplyPtr EditApplyFree (EditApplyPtr eap);
+extern EditApplyPtr EditApplyNew (void);
typedef enum {
eEditApplyChoice_Apply = 0,
@@ -683,9 +703,34 @@ extern DialoG CollectionDateDialog (GrouP h, SeqEntryPtr sep, CharPtr name,
TaglistCallback tlp_callback,
Pointer callback_data);
+extern DialoG CreateRptUnitRangeDialog (GrouP h, SeqEntryPtr sep, CharPtr name,
+ TaglistCallback tlp_callback,
+ Pointer callback_data);
extern void CreateStandardEditMenu (WindoW w);
+extern void CleanupEvidenceGBQuals (GBQualPtr PNTR prevgbq);
+extern void VisStringDialogToGbquals (SeqFeatPtr sfp, DialoG d, CharPtr qual);
+
+extern void RememberSqnTempFile (CharPtr file);
+extern void FreeSqnTempFiles (void);
+
+/* For fixing special characters */
+NLM_EXTERN Boolean FixSpecialCharacters (Uint2 entityID);
+extern Boolean FixSpecialCharactersForStringsInList (ValNodePtr find_list, CharPtr exp_text, Boolean force_fix);
+NLM_EXTERN Boolean FixSpecialCharactersForObject (Uint2 datatype, Pointer objdata, CharPtr msg, Boolean force_fix, BoolPtr changed);
+
+/* for functions that act on all open records */
+NLM_EXTERN ValNodePtr GetBaseFormList ();
+NLM_EXTERN ValNodePtr GetViewedSeqEntryList (void);
+NLM_EXTERN SeqEntryPtr RestoreFromFile (CharPtr path);
+NLM_EXTERN Uint2 RestoreEntityIDFromFile (CharPtr path, Uint2 entityID);
+
+NLM_EXTERN Int2 PanelOffsetFromCharOffsetEx (DoC doc, FonT font, Int2 item, Int2 col, Int2 char_offset);
+NLM_EXTERN Int2 GetTextSelectCharOffsetEx (PoinT pt, DoC doc, FonT font, Int2 item, Int2 row, Int2 col);
+NLM_EXTERN CharPtr GetSelectedDocText (DoC doc, Int2 item_start, Int2 row_start, Int2 col_start, Int2 char_start,
+ Int2 item_stop, Int2 row_stop, Int2 col_stop, Int2 char_stop,
+ Int2Ptr only_these_columns, Int2 num_col);
#ifdef __cplusplus
}
diff --git a/desktop/gbfview.c b/desktop/gbfview.c
index b83d3740..88968e10 100644
--- a/desktop/gbfview.c
+++ b/desktop/gbfview.c
@@ -29,7 +29,7 @@
*
* Version Creation Date: 2/5/97
*
-* $Revision: 6.94 $
+* $Revision: 6.98 $
*
* File Description:
*
@@ -48,6 +48,7 @@
#include <asn2gnbi.h>
#include <tofasta.h>
#include <explore.h>
+#include <subutil.h>
static ParData ffParFmt = {FALSE, FALSE, FALSE, FALSE, TRUE, 0, 0};
static ColData ffColFmt = {0, 0, 80, 0, NULL, 'l', FALSE, FALSE, FALSE, FALSE, TRUE};
@@ -548,24 +549,73 @@ static Uint2 MatchItemInFlatFile (Uint2 entityID, Uint4 itemID, CharPtr str,
return ms.editItemID;
}
+static CharPtr google_earth_1 =
+ "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" \
+ "<kml xmlns=\"http://earth.google.com/kml/2.2\">\n" \
+ "<Document>\n" \
+ " <name>KmlFile</name>\n" \
+ " <StyleMap id=\"default_copy0+nicon=http://maps.google.com/mapfiles/kml/pal3/icon60.png+hicon=http://maps.google.com/mapfiles/kml/pal3/icon52.png\">\n" \
+ " <Pair>\n" \
+ " <key>normal</key>\n" \
+ " <styleUrl>#default_copy0+icon=http://maps.google.com/mapfiles/kml/pal3/icon60.png</styleUrl>\n" \
+ " </Pair>\n" \
+ " <Pair>\n" \
+ " <key>highlight</key>\n" \
+ " <styleUrl>#default_copy0+icon=http://maps.google.com/mapfiles/kml/pal3/icon52.png</styleUrl>\n" \
+ " </Pair>\n" \
+ " </StyleMap>\n" \
+ " <Style id=\"default_copy0+icon=http://maps.google.com/mapfiles/kml/pal3/icon60.png\">\n" \
+ " <IconStyle>\n" \
+ " <Icon>\n" \
+ " <href>http://maps.google.com/mapfiles/kml/pal3/icon60.png</href>\n" \
+ " </Icon>\n" \
+ " </IconStyle>\n" \
+ " </Style>\n" \
+ " <Placemark>\n";
+
+static CharPtr google_earth_2 =
+ " <styleUrl>#default_copy0+nicon=http://maps.google.com/mapfiles/kml/pal3/icon60.png+hicon=http://maps.google.com/mapfiles/kml/pal3/icon52.png</styleUrl>\n" \
+ " <Point>\n";
+
+static CharPtr google_earth_3 =
+ " </Point>\n" \
+ " </Placemark>\n" \
+ "</Document>\n" \
+ "</kml>\n";
+
static void ReleaseIcon (DoC d, PoinT pt)
{
- BioseqViewPtr bvp;
- Char ch;
- CharPtr dst;
- Uint4 editItemID;
- Uint2 entityID;
- Int2 handled;
- Int2 item;
- Uint4 itemID;
- Uint2 itemtype;
- Int2 row;
- SeqEntryPtr sep;
- Boolean slashgene;
- Boolean slashproduct;
- CharPtr src;
- CharPtr str;
+ BioSourcePtr biop;
+ BioseqViewPtr bvp;
+ Char ch;
+ SeqMgrDescContext context;
+ CharPtr dst;
+ Uint4 editItemID;
+ Uint2 entityID;
+ Boolean format_ok = FALSE;
+ FILE *fp;
+ Int2 handled;
+ Int2 item;
+ Uint4 itemID;
+ Uint2 itemtype;
+ FloatHi lat = 0.0;
+ FloatHi lon = 0.0;
+ CharPtr lat_lon = NULL;
+ Boolean lat_in_range = FALSE;
+ Boolean lon_in_range = FALSE;
+ Char path [PATH_MAX];
+ Int2 row;
+ SeqDescPtr sdp;
+ SeqEntryPtr sep;
+ Boolean slashgene;
+ Boolean slashproduct;
+ CharPtr src;
+ SubSourcePtr ssp;
+ CharPtr str;
+#ifdef OS_UNIX
+ Char cmmd [256];
+#endif
bvp = (BioseqViewPtr) GetObjectExtra (d);
if (bvp == NULL) return;
@@ -573,6 +623,56 @@ static void ReleaseIcon (DoC d, PoinT pt)
if (row != 0 && item != 0 && item == bvp->itemClicked) {
if (GetIDsFromDoc (d, item, &entityID, &itemID, &itemtype)) {
if (bvp->wasDoubleClick) {
+
+ if (bvp->wasShiftKey) {
+ if (itemtype == OBJ_SEQDESC) {
+ sdp = SeqMgrGetDesiredDescriptor (entityID, NULL, itemID, 0, NULL, &context);
+ if (sdp != NULL && sdp->choice == Seq_descr_source) {
+ biop = (BioSourcePtr) sdp->data.ptrvalue;
+ if (biop != NULL) {
+ for (ssp = biop->subtype; ssp != NULL; ssp = ssp->next) {
+ if (ssp->subtype != SUBSRC_lat_lon) continue;
+ lat_lon = ssp->name;
+ if (StringHasNoText (lat_lon)) continue;
+ IsCorrectLatLonFormat (lat_lon, &format_ok, &lat_in_range, &lon_in_range);
+ if (! format_ok) continue;
+ if (! lat_in_range) continue;
+ if (! lon_in_range) continue;
+ if (! ParseLatLon (lat_lon, &lat, &lon)) continue;
+ TmpNam (path);
+ /* write to original temp file, so next temp file name will not collide */
+ fp = FileOpen (path, "w");
+ if (fp != NULL) {
+ fprintf (fp, "\n");
+ FileClose (fp);
+ RememberSqnTempFile (path);
+ }
+ /* now append .kml extension so proper application is launched */
+ StringCat (path, ".kml");
+ fp = FileOpen (path, "w");
+ if (fp != NULL) {
+ fprintf (fp, "%s", google_earth_1);
+ fprintf (fp, " <name>%s</name>\n", lat_lon);
+ fprintf (fp, "%s", google_earth_2);
+ fprintf (fp, " <coordinates>%lf,%lf</coordinates>\n", (double) lon, (double) lat);
+ fprintf (fp, "%s", google_earth_3);
+ FileClose (fp);
+ RememberSqnTempFile (path);
+#ifdef OS_UNIX
+ sprintf (cmmd, "open %s", path);
+ system (cmmd);
+#endif
+#ifdef WIN_MSWIN
+ Nlm_MSWin_OpenDocument (path);
+#endif
+ }
+ return;
+ }
+ }
+ }
+ }
+ }
+
sep = GetTopSeqEntryForEntityID (entityID);
if (bvp->launchSubviewers) {
WatchCursor ();
diff --git a/desktop/import.c b/desktop/import.c
index 2f404826..c87077d7 100644
--- a/desktop/import.c
+++ b/desktop/import.c
@@ -29,7 +29,7 @@
*
* Version Creation Date: 6/18/95
*
-* $Revision: 6.63 $
+* $Revision: 6.68 $
*
* File Description:
*
@@ -240,8 +240,6 @@ static void CleanupImportPage (GraphiC g, VoidPtr data)
MemFree (data);
}
-extern void CleanupEvidenceGBQuals (GBQualPtr PNTR prevgbq);
-extern void VisStringDialogToGbquals (SeqFeatPtr sfp, DialoG d, CharPtr qual);
static void ChangeKey (Handle obj)
@@ -2013,21 +2011,23 @@ typedef struct molinfoform {
} MolInfoForm, PNTR MolInfoFormPtr;
static ENUM_ALIST(molinfo_biomol_alist)
- {" ", 0},
- {"Genomic DNA or RNA", 1},
- {"Precursor RNA", 2},
- {"mRNA [cDNA]", 3},
- {"Ribosomal RNA", 4},
- {"Transfer RNA", 5},
- {"Small nuclear RNA", 6},
- {"Small cytoplasmic RNA", 7},
- {"Peptide", 8},
- {"Other-Genetic", 9},
- {"Genomic-mRNA", 10},
- {"cRNA", 11},
- {"Small nucleolar RNA", 12},
- {"Transcribed RNA", 13},
- {"Other", 255},
+ {" ", 0},
+ {"Genomic DNA or RNA", 1},
+ {"Precursor RNA", 2},
+ {"mRNA [cDNA]", 3},
+ {"Ribosomal RNA", 4},
+ {"Transfer RNA", 5},
+ {"Small nuclear RNA", 6},
+ {"Small cytoplasmic RNA", 7},
+ {"Peptide", 8},
+ {"Other-Genetic", 9},
+ {"Genomic-mRNA", 10},
+ {"cRNA", 11},
+ {"Small nucleolar RNA", 12},
+ {"Transcribed RNA", 13},
+ {"Non-coding RNA", 14},
+ {"Transfer-messenger RNA", 15},
+ {"Other", 255},
END_ENUM_ALIST
extern CharPtr GetMoleculeTypeName (Uint1 mol_val)
@@ -2043,38 +2043,42 @@ extern CharPtr GetMoleculeTypeName (Uint1 mol_val)
static ENUM_ALIST(molinfo_biomol_nuc_alist)
- {" ", 0},
- {"Genomic DNA or RNA", 1},
- {"Precursor RNA", 2},
- {"mRNA [cDNA]", 3},
- {"Ribosomal RNA", 4},
- {"Transfer RNA", 5},
- {"Small nuclear RNA", 6},
- {"Small cytoplasmic RNA", 7},
- {"Other-Genetic", 9},
- {"Genomic-mRNA", 10},
- {"cRNA", 11},
- {"Small nucleolar RNA", 12},
- {"Transcribed RNA", 13},
- {"Other", 255},
+ {" ", 0},
+ {"Genomic DNA or RNA", 1},
+ {"Precursor RNA", 2},
+ {"mRNA [cDNA]", 3},
+ {"Ribosomal RNA", 4},
+ {"Transfer RNA", 5},
+ {"Small nuclear RNA", 6},
+ {"Small cytoplasmic RNA", 7},
+ {"Other-Genetic", 9},
+ {"Genomic-mRNA", 10},
+ {"cRNA", 11},
+ {"Small nucleolar RNA", 12},
+ {"Transcribed RNA", 13},
+ {"Non-coding RNA", 14},
+ {"Transfer-messenger RNA", 15},
+ {"Other", 255},
END_ENUM_ALIST
static ENUM_ALIST(molinfo_biomol_nucX_alist)
- {" ", 0},
- {"Genomic DNA", 253},
- {"Genomic RNA", 254},
- {"Precursor RNA", 2},
- {"mRNA [cDNA]", 3},
- {"Ribosomal RNA", 4},
- {"Transfer RNA", 5},
- {"Small nuclear RNA", 6},
- {"Small cytoplasmic RNA", 7},
- {"Other-Genetic", 9},
- {"Genomic-mRNA", 10},
- {"cRNA", 11},
- {"Small nucleolar RNA", 12},
- {"Transcribed RNA", 13},
- {"Other", 255},
+ {" ", 0},
+ {"Genomic DNA", 253},
+ {"Genomic RNA", 254},
+ {"Precursor RNA", 2},
+ {"mRNA [cDNA]", 3},
+ {"Ribosomal RNA", 4},
+ {"Transfer RNA", 5},
+ {"Small nuclear RNA", 6},
+ {"Small cytoplasmic RNA", 7},
+ {"Other-Genetic", 9},
+ {"Genomic-mRNA", 10},
+ {"cRNA", 11},
+ {"Small nucleolar RNA", 12},
+ {"Transcribed RNA", 13},
+ {"Non-coding RNA", 14},
+ {"Transfer-messenger RNA", 15},
+ {"Other", 255},
END_ENUM_ALIST
static ENUM_ALIST(molinfo_biomol_prot_alist)
@@ -2107,6 +2111,7 @@ static ENUM_ALIST(molinfo_tech_alist)
{"WGS", 20},
{"Barcode", 21},
{"Composite-WGS-HTGS", 22},
+ {"TSA", 23},
{"Other:", 255},
END_ENUM_ALIST
@@ -2128,6 +2133,7 @@ static ENUM_ALIST(molinfo_tech_nuc_alist)
{"WGS", 20},
{"Barcode", 21},
{"Composite-WGS-HTGS", 22},
+ {"TSA", 23},
{"Other:", 255},
END_ENUM_ALIST
@@ -2181,14 +2187,14 @@ END_ENUM_ALIST
static Uint1 check_biomol (Uint1 biomol)
{
- if (biomol > 13 && biomol < 253) return 0;
+ if (biomol > MOLECULE_TYPE_TMRNA && biomol < 253) return 0;
return biomol;
}
static Uint1 check_technique (Uint1 tech)
{
- if (tech > MI_TECH_composite_wgs_htgs && tech != MI_TECH_other) return 0;
+ if (tech > MI_TECH_tsa && tech != MI_TECH_other) return 0;
return tech;
}
@@ -3496,11 +3502,19 @@ static Pointer VisStrPageToCharPtr (DialoG d)
{
CharPtr title;
VisStrPagePtr vpp;
+ ValNodePtr find_list = NULL;
title = NULL;
vpp = (VisStrPagePtr) GetObjectExtra (d);
if (vpp != NULL) {
- title = SaveStringFromTextAndStripNewlines (vpp->title);
+ title = SaveStringFromText (vpp->title);
+ title = StripNewlines (title);
+ SpecialCharFindWithContext (&title, &find_list, NULL, NULL);
+ FixSpecialCharactersForStringsInList (find_list, "Special characters are not permitted.", TRUE);
+ if (find_list != NULL) {
+ PointerToDialog (d, title);
+ find_list = FreeContextList (find_list);
+ }
}
return (Pointer) title;
}
diff --git a/desktop/macrodlg.c b/desktop/macrodlg.c
new file mode 100755
index 00000000..96106532
--- /dev/null
+++ b/desktop/macrodlg.c
@@ -0,0 +1,10335 @@
+/* macrodlg.c
+* ===========================================================================
+*
+* PUBLIC DOMAIN NOTICE
+* National Center for Biotechnology Information (NCBI)
+*
+* This software/database is a "United States Government Work" under the
+* terms of the United States Copyright Act. It was written as part of
+* the author's official duties as a United States Government employee and
+* thus cannot be copyrighted. This software/database is freely available
+* to the public for use. The National Library of Medicine and the U.S.
+* Government do not place any restriction on its use or reproduction.
+* We would, however, appreciate having the NCBI and the author cited in
+* any work or product based on this material
+*
+* Although all reasonable efforts have been taken to ensure the accuracy
+* and reliability of the software and data, the NLM and the U.S.
+* Government do not and cannot warrant the performance or results that
+* may be obtained by using this software or data. The NLM and the U.S.
+* Government disclaim all warranties, express or implied, including
+* warranties of performance, merchantability or fitness for any particular
+* purpose.
+*
+* ===========================================================================
+*
+* File Name: macrodlg.c
+*
+* Author: Colleen Bollin
+*
+* Version Creation Date: 11/23/2007
+*
+* $Revision: 1.61 $
+*
+* File Description:
+*
+* Modifications:
+* --------------------------------------------------------------------------
+* Date Name Description of modification
+* ------- ---------- -----------------------------------------------------
+*
+*
+* ==========================================================================
+*/
+
+#include <objseq.h>
+#include <objfdef.h>
+#include <sqnutils.h>
+#include <vibforms.h>
+#include <document.h>
+#include <dlogutil.h>
+#include <cdrgn.h>
+#include <seqpanel.h>
+#define NLM_GENERATED_CODE_PROTO
+#include <objmacro.h>
+#include <macroapi.h>
+#include <macrodlg.h>
+
+/* macro editor dialog */
+typedef struct macroeditorform {
+ FORM_MESSAGE_BLOCK
+ DoC macro_summary;
+ ButtoN run_btn;
+
+ ValNodePtr macro_list;
+ CharPtr last_filename;
+ Boolean unsaved;
+ Boolean indexer_version;
+ FonT summary_font;
+} MacroEditorFormData, PNTR MacroEditorFormPtr;
+
+static void CleanupMacroEditorForm (GraphiC g, VoidPtr data)
+
+{
+ MacroEditorFormPtr f;
+
+ f = (MacroEditorFormPtr) data;
+ if (f != NULL) {
+ f->macro_list = MacroActionListFree (f->macro_list);
+ f->last_filename = MemFree (f->last_filename);
+ }
+ StdCleanupFormProc (g, data);
+}
+
+
+static void SetupMacroEditorFont (MacroEditorFormPtr f)
+
+{
+ if (f == NULL) return;
+
+#ifdef WIN_MAC
+ f->summary_font = ParseFont ("Times,12");
+#endif
+#ifdef WIN_MSWIN
+ f->summary_font = ParseFont ("Times New Roman,12");
+#endif
+#ifdef WIN_MOTIF
+ f->summary_font = ParseFont ("Times,12");
+#endif
+}
+
+
+static void SetMacroEditorFileItems (MacroEditorFormPtr mefp);
+
+static Boolean SaveMacroFile (ForM f, CharPtr filename)
+
+{
+ MacroEditorFormPtr mefp;
+ Boolean rval = FALSE;
+ Char path [PATH_MAX];
+ AsnIoPtr aip;
+
+ mefp = (MacroEditorFormPtr) GetObjectExtra (f);
+ if (mefp != NULL) {
+ path [0] = '\0';
+ StringNCpy_0 (path, filename, sizeof (path));
+ if (path [0] != '\0' || GetOutputFileName (path, sizeof (path), NULL)) {
+ aip = AsnIoOpen (path, "w");
+ if (aip == NULL) {
+ Message (MSG_ERROR, "Unable to open %s", path);
+ } else {
+ MacroActionListAsnWrite (mefp->macro_list, aip, NULL);
+ AsnIoClose (aip);
+ mefp->last_filename = MemFree (mefp->last_filename);
+ mefp->last_filename = StringSave (path);
+ mefp->unsaved = FALSE;
+ rval = TRUE;
+ }
+ }
+ }
+ return rval;
+}
+
+
+static CharPtr SummarizeMacroAction (ValNodePtr vnp);
+
+static void SummarizeMacro (DoC doc, ValNodePtr macro_list, FonT font)
+{
+ ValNodePtr vnp;
+ CharPtr str;
+ CharPtr tmp;
+ RecT r;
+ ParData ParFmt = {FALSE, FALSE, FALSE, FALSE, FALSE, 0, 0};
+ ColData ColFmt[] =
+ {
+ {12, 0, 1, 0, NULL, 'l', TRUE, FALSE, FALSE, FALSE, FALSE},
+ {12, 0, 1, 0, NULL, 'l', TRUE, FALSE, FALSE, FALSE, FALSE},
+ {12, 0, 1, 0, NULL, 'l', TRUE, FALSE, FALSE, FALSE, FALSE},
+ {12, 0, 1, 0, NULL, 'l', TRUE, FALSE, FALSE, FALSE, FALSE},
+ {0, 0, 80, 0, NULL, 'l', TRUE, FALSE, FALSE, FALSE, TRUE}
+ };
+
+
+ Reset (doc);
+
+ ObjectRect (doc, &r);
+ InsetRect (&r, 4, 4);
+
+ ColFmt[4].pixWidth = r.right - r.left - 48;
+
+ if (font == NULL) font = programFont;
+
+ if (macro_list == NULL) {
+ AppendText (doc, "(Click here to start a new macro script)", NULL, NULL, font);
+ } else {
+ AppendText (doc, "(Click here to insert an action at the beginning of the script)", NULL, NULL, font);
+ for (vnp = macro_list; vnp != NULL; vnp = vnp->next) {
+ str = SummarizeMacroAction (vnp);
+ tmp = (CharPtr) MemNew (sizeof (Char) * (StringLen (str) + 6));
+ sprintf (tmp, "\t\t\t\t%s\n", str);
+ str = MemFree (str);
+ AppendText (doc, tmp, &ParFmt, ColFmt, font);
+ tmp = MemFree (tmp);
+ }
+ AppendText (doc, "(Click here to insert an action at the end of the script)", NULL, NULL, font);
+ }
+ UpdateDocument (doc, 0, 0);
+}
+
+
+static Boolean OpenMacroFile (ForM f, CharPtr filename)
+
+{
+ MacroEditorFormPtr mefp;
+ Boolean rval = FALSE;
+ CharPtr extension;
+ Char path [PATH_MAX];
+ AsnIoPtr aip;
+ ValNodePtr action_list;
+
+ mefp = (MacroEditorFormPtr) GetObjectExtra (f);
+ if (mefp != NULL) {
+ if (mefp->unsaved) {
+ if (Message (MSG_YN, "Do you want to save changes to the current file?") == ANS_YES) {
+ if (!SaveMacroFile(f, mefp->last_filename)) {
+ return FALSE;
+ }
+ }
+ }
+ path [0] = '\0';
+ StringNCpy_0 (path, filename, sizeof (path));
+ extension = NULL;
+ if (path [0] != '\0' || GetInputFileName (path, sizeof (path), extension, "TEXT")) {
+ aip = AsnIoOpen (path, "r");
+ if (aip == NULL) {
+ Message (MSG_ERROR, "Unable to open %s", path);
+ } else {
+ action_list = MacroActionListAsnRead (aip, NULL);
+ if (action_list == NULL) {
+ Message (MSG_ERROR, "Unable to read action list from %s.", path);
+ } else {
+ mefp->macro_list = MacroActionListFree (mefp->macro_list);
+ mefp->macro_list = action_list;
+ mefp->last_filename = MemFree (mefp->last_filename);
+ mefp->last_filename = StringSave (path);
+ mefp->unsaved = FALSE;
+ rval = TRUE;
+ SetMacroEditorFileItems (mefp);
+ SummarizeMacro (mefp->macro_summary, mefp->macro_list, mefp->summary_font);
+ Enable (mefp->run_btn);
+ }
+ AsnIoClose (aip);
+ }
+ }
+ }
+ return rval;
+}
+
+
+static Boolean ImportMacroFile (ForM f, CharPtr filename)
+
+{
+ MacroEditorFormPtr mefp;
+ Boolean rval = FALSE;
+ CharPtr extension;
+ Char path [PATH_MAX];
+ AsnIoPtr aip;
+ ValNodePtr action_list;
+
+ mefp = (MacroEditorFormPtr) GetObjectExtra (f);
+ if (mefp == NULL) return FALSE;
+ path [0] = '\0';
+ StringNCpy_0 (path, filename, sizeof (path));
+ extension = NULL;
+ if (path [0] != '\0' || GetInputFileName (path, sizeof (path), extension, "TEXT")) {
+ aip = AsnIoOpen (path, "r");
+ if (aip == NULL) {
+ Message (MSG_ERROR, "Unable to open %s", path);
+ } else {
+ action_list = MacroActionListAsnRead (aip, NULL);
+ if (action_list == NULL) {
+ Message (MSG_ERROR, "Unable to read action list from %s.", path);
+ } else {
+ ValNodeLink (&(mefp->macro_list), action_list);
+ mefp->unsaved = FALSE;
+ rval = TRUE;
+ SetMacroEditorFileItems (mefp);
+ SummarizeMacro (mefp->macro_summary, mefp->macro_list, mefp->summary_font);
+ Enable (mefp->run_btn);
+ }
+ AsnIoClose (aip);
+ }
+ }
+ return rval;
+}
+
+
+static void SetMacroEditorFileItems (MacroEditorFormPtr mefp)
+
+{
+ IteM i;
+
+ if (mefp != NULL) {
+ i = FindFormMenuItem ((BaseFormPtr) mefp, VIB_MSG_OPEN);
+ SafeSetTitle (i, "Load Macro File");
+ SafeEnable (i);
+
+ i = FindFormMenuItem ((BaseFormPtr) mefp, VIB_MSG_IMPORT);
+ SafeSetTitle (i, "Add Macros from File to Script");
+ SafeEnable (i);
+
+ i = FindFormMenuItem ((BaseFormPtr) mefp, VIB_MSG_SAVE);
+ SafeSetTitle (i, "Save Macro File");
+ if (mefp->macro_list == NULL) {
+ SafeDisable (i);
+ } else {
+ SafeEnable (i);
+ }
+ i = FindFormMenuItem ((BaseFormPtr) mefp, VIB_MSG_SAVE_AS);
+ SafeSetTitle (i, "Save Macro File As");
+ if (mefp->macro_list == NULL) {
+ SafeDisable (i);
+ } else {
+ SafeEnable (i);
+ }
+ }
+}
+
+
+static void MacroEditorFormMessage (ForM f, Int2 mssg)
+
+{
+ MacroEditorFormPtr mefp;
+ ValNodePtr vnp, string_list = NULL;
+ Int4 len = 1;
+ CharPtr str;
+
+ mefp = (MacroEditorFormPtr) GetObjectExtra (f);
+ if (mefp != NULL) {
+ switch (mssg) {
+ case VIB_MSG_OPEN :
+ OpenMacroFile (f, NULL);
+ break;
+ case VIB_MSG_IMPORT :
+ ImportMacroFile (f, NULL);
+ break;
+ case VIB_MSG_SAVE :
+ SaveMacroFile (f, mefp->last_filename);
+ break;
+ case VIB_MSG_SAVE_AS :
+ SaveMacroFile (f, NULL);
+ break;
+ case VIB_MSG_CUT :
+ StdCutTextProc (NULL);
+ break;
+ case VIB_MSG_COPY :
+ /* get length of entire macro list */
+ for (vnp = mefp->macro_list; vnp != NULL; vnp = vnp->next) {
+ str = SummarizeMacroAction (vnp);
+ len += StringLen (str) + 2;
+ ValNodeAddPointer (&string_list, 0, str);
+ }
+ str = (CharPtr) MemNew (sizeof (Char) * len);
+ str[0] = 0;
+ for (vnp = string_list; vnp != NULL; vnp = vnp->next) {
+ StringCat (str, vnp->data.ptrvalue);
+ StringCat (str, "\r\n");
+ }
+ string_list = ValNodeFreeData (string_list);
+ StringToClipboard (str);
+ str = MemFree (str);
+ break;
+ case VIB_MSG_PASTE :
+ StdPasteTextProc (NULL);
+ break;
+ case VIB_MSG_DELETE :
+ break;
+ case VIB_MSG_CLOSE:
+ case VIB_MSG_QUIT:
+ if (mefp->unsaved) {
+ if (Message (MSG_YN, "Do you want to save changes to the current file?") == ANS_YES) {
+ if (SaveMacroFile(f, mefp->last_filename)) {
+ Remove (mefp->form);
+ }
+ }
+ }
+ Remove (mefp->form);
+ break;
+ default :
+ break;
+ }
+ }
+}
+
+
+static void RunMacro (ButtoN b)
+{
+ MacroEditorFormPtr f;
+ SeqEntryPtr sep;
+ ValNodePtr sep_list, vnp;
+ Uint2 entityID;
+ Int4 num_fields = 0, num_features = 0;
+ Int4 tmp_fields, tmp_features;
+
+ f = (MacroEditorFormPtr) GetObjectExtra (b);
+ if (f == NULL) return;
+
+ if (f->macro_list == NULL) {
+ Message (MSG_ERROR, "No macro loaded!");
+ } else {
+ sep_list = GetViewedSeqEntryList ();
+ if (sep_list == NULL) {
+ Message (MSG_ERROR, "No records open!");
+ } else if (sep_list->next != NULL
+ && ANS_CANCEL == Message (MSG_OKC, "You have more than one record open - run macro for all open records?")) {
+ /* do nothing */
+ } else {
+ WatchCursor();
+ Update();
+ for (vnp = sep_list; vnp != NULL; vnp = vnp->next) {
+ sep = vnp->data.ptrvalue;
+ entityID = ObjMgrGetEntityIDForChoice(sep);
+ tmp_fields = 0;
+ tmp_features = 0;
+ ApplyMacroToSeqEntry (sep, f->macro_list, &tmp_fields, &tmp_features);
+ num_fields += tmp_fields;
+ num_features += tmp_features;
+ ObjMgrSetDirtyFlag (entityID, TRUE);
+ ObjMgrSendMsg (OM_MSG_UPDATE, entityID, 0, 0);
+ }
+ sep_list = ValNodeFree (sep_list);
+ ArrowCursor ();
+ Update ();
+ Message (MSG_OK, "Macro script affected %d fields and created %d features", num_fields, num_features);
+ }
+ }
+}
+
+static Boolean EditMacroAction (ValNodePtr action, Boolean indexer_version);
+
+static Boolean EditMacroItem (MacroEditorFormPtr f, Int2 item)
+{
+ Boolean rval = FALSE;
+ ValNodePtr vnp;
+
+ if (f == NULL) return FALSE;
+
+ for (vnp = f->macro_list; vnp != NULL && item > 1; vnp = vnp->next, item--) {}
+ if (vnp != NULL) {
+ rval = EditMacroAction (vnp, f->indexer_version);
+ }
+ return rval;
+}
+
+static AECRActionPtr BuildDefaultAECRAction (Uint1 action_type, Uint1 qual_type)
+{
+ AECRActionPtr action = AECRActionNew();
+ ApplyActionPtr apply;
+ EditActionPtr edit;
+ ConvertActionPtr convert;
+ CopyActionPtr copy;
+ SwapActionPtr swap;
+ AECRParseActionPtr parse;
+ RemoveActionPtr remove;
+
+ switch (action_type) {
+ case ActionChoice_apply:
+ apply = ApplyActionNew();
+ apply->field = ValNodeNew (NULL);
+ apply->field->choice = qual_type;
+ action->action = ValNodeNew (NULL);
+ action->action->choice = action_type;
+ action->action->data.ptrvalue = apply;
+ break;
+ case ActionChoice_edit:
+ edit = EditActionNew ();
+ edit->field = ValNodeNew (NULL);
+ edit->field->choice = qual_type;
+ action->action = ValNodeNew (NULL);
+ action->action->choice = action_type;
+ action->action->data.ptrvalue = edit;
+ break;
+ case ActionChoice_convert:
+ convert = ConvertActionNew();
+ convert->fields = ValNodeNew (NULL);
+ convert->fields->choice = qual_type;
+ action->action = ValNodeNew (NULL);
+ action->action->choice = action_type;
+ action->action->data.ptrvalue = convert;
+ break;
+ case ActionChoice_copy:
+ copy = CopyActionNew();
+ copy->fields = ValNodeNew (NULL);
+ copy->fields->choice = qual_type;
+ action->action = ValNodeNew (NULL);
+ action->action->choice = action_type;
+ action->action->data.ptrvalue = copy;
+ break;
+ case ActionChoice_swap:
+ swap = SwapActionNew();
+ swap->fields = ValNodeNew (NULL);
+ swap->fields->choice = qual_type;
+ action->action = ValNodeNew (NULL);
+ action->action->choice = action_type;
+ action->action->data.ptrvalue = swap;
+ break;
+ case ActionChoice_remove:
+ remove = RemoveActionNew();
+ remove->field = ValNodeNew (NULL);
+ remove->field->choice = qual_type;
+ action->action = ValNodeNew (NULL);
+ action->action->choice = action_type;
+ action->action->data.ptrvalue = remove;
+ break;
+ case ActionChoice_parse:
+ parse = AECRParseActionNew();
+ parse->fields = ValNodeNew (NULL);
+ parse->fields->choice = qual_type;
+ action->action = ValNodeNew (NULL);
+ action->action->choice = action_type;
+ action->action->data.ptrvalue = parse;
+ break;
+ }
+
+ return action;
+}
+
+
+static ApplyFeatureActionPtr BuildDefaultApplyFeatureAction (Uint2 feat_type)
+{
+ ApplyFeatureActionPtr action;
+ FeatQualLegalValPtr qual;
+
+ action = ApplyFeatureActionNew ();
+ action->type = feat_type;
+ action->location = ValNodeNew (NULL);
+ action->location->choice = LocationChoice_whole_sequence;
+ action->seq_list = ValNodeNew (NULL);
+ action->seq_list->choice = SequenceListChoice_all;
+ qual = FeatQualLegalValNew ();
+ qual->qual = Feat_qual_legal_codon_start;
+ qual->val = StringSave ("best");
+ action->fields = ValNodeNew (NULL);
+ action->fields->choice = FeatQualLegalValChoice_qual;
+ action->fields->data.ptrvalue = qual;
+ return action;
+}
+
+
+static EditFeatureLocationActionPtr BuildDefaultEditFeatureLocationAction (Uint2 feat_type)
+{
+ EditFeatureLocationActionPtr a;
+ EditLocationStrandPtr strand;
+
+ a = EditFeatureLocationActionNew ();
+ a->type = feat_type;
+ a->action = ValNodeNew (NULL);
+ a->action->choice = LocationEditType_strand;
+ strand = EditLocationStrandNew ();
+ strand->strand_to = Feature_location_strand_to_reverse;
+ a->action->data.ptrvalue = strand;
+ return a;
+}
+
+static ParseActionPtr BuildDefaultParseAction (void)
+{
+ ParseActionPtr parse;
+
+ parse = ParseActionNew();
+ return parse;
+}
+
+
+static RemoveFeatureActionPtr BuildDefaultRemoveFeatureAction (void)
+{
+ RemoveFeatureActionPtr remove;
+
+ remove = RemoveFeatureActionNew ();
+ return remove;
+}
+
+
+static ValNodePtr BuildDefaultNewMacroAction (void)
+{
+ ValNodePtr vnp;
+ ApplyFeatureActionPtr apply_feat;
+
+ apply_feat = BuildDefaultApplyFeatureAction (Feature_type_cds);
+
+ vnp = ValNodeNew (NULL);
+ vnp->choice = MacroActionChoice_add_feature;
+ vnp->data.ptrvalue = apply_feat;
+ return vnp;
+}
+
+
+static void UpdateMacroSummary (MacroEditorFormPtr f, Int4 scroll_pos)
+{
+ Int4 scroll_max;
+ BaR sb_vert;
+
+ if (f == NULL) return;
+
+ f->unsaved = TRUE;
+ SetMacroEditorFileItems (f);
+ SummarizeMacro (f->macro_summary, f->macro_list, f->summary_font);
+ if (f->macro_list == NULL) {
+ Disable (f->run_btn);
+ } else {
+ Enable (f->run_btn);
+ }
+ if (scroll_pos > 0) {
+ sb_vert = GetSlateVScrollBar ((SlatE) f->macro_summary);
+ scroll_max = GetBarMax (sb_vert);
+ if (scroll_pos > scroll_max) {
+ scroll_pos = scroll_max;
+ }
+ CorrectBarValue (sb_vert, scroll_pos);
+ }
+}
+
+
+static void AddMacroActions (MacroEditorFormPtr f, Int2 item);
+
+static void ClickMacroDoc (DoC d, PoinT pt)
+{
+ Int2 item, row, col;
+ RecT rct;
+ MacroEditorFormPtr f;
+ ValNodePtr vnp, vnp_prev = NULL, two_prev = NULL, vnp_next;
+ Boolean changed_macro = FALSE;
+ BaR sb_vert = NULL;
+ Int2 scroll_pos = 0;
+
+ f = (MacroEditorFormPtr) GetObjectExtra (d);
+ if (f == NULL) return;
+
+ MapDocPoint (d, pt, &item, &row, &col, &rct);
+ if (item == 0 && row == 0 && f->macro_list == NULL) {
+ AddMacroActions (f, 0);
+ } else if (item > 0 && row > 0) {
+ if (item == 1) {
+ /* add to beginning of list */
+ AddMacroActions (f, 0);
+ } else if (item == ValNodeLen (f->macro_list) + 2) {
+ /* add to end of list */
+ AddMacroActions (f, item);
+ } else {
+ /* correct for explanatory line */
+ item--;
+ sb_vert = GetSlateVScrollBar ((SlatE) f->macro_summary);
+ scroll_pos = GetBarValue (sb_vert);
+ switch (col) {
+ case 1:
+ /* delete this item */
+ for (vnp = f->macro_list; vnp != NULL && item > 1; vnp = vnp->next, item--) {
+ vnp_prev = vnp;
+ }
+ if (vnp != NULL) {
+ if (vnp_prev == NULL) {
+ f->macro_list = vnp->next;
+ } else {
+ vnp_prev->next = vnp->next;
+ }
+ vnp->next = NULL;
+ vnp = MacroActionListFree (vnp);
+ changed_macro = TRUE;
+ }
+ break;
+ case 2:
+ /* move this item up */
+ for (vnp = f->macro_list; vnp != NULL && item > 1; vnp = vnp->next, item--) {
+ two_prev = vnp_prev;
+ vnp_prev = vnp;
+ }
+ if (vnp != NULL && vnp_prev != NULL) {
+ vnp_prev->next = vnp->next;
+ vnp->next = vnp_prev;
+ if (two_prev == NULL) {
+ f->macro_list = vnp;
+ } else {
+ two_prev->next = vnp;
+ }
+ /* decrease the scroll position, so cursor will still be over the same item */
+ scroll_pos--;
+ changed_macro = TRUE;
+ }
+ break;
+ case 3:
+ /* move this item down */
+ for (vnp = f->macro_list; vnp != NULL && item > 1; vnp = vnp->next, item--) {
+ vnp_prev = vnp;
+ }
+ if (vnp != NULL && vnp->next != NULL) {
+ vnp_next = vnp->next;
+ vnp->next = vnp_next->next;
+ vnp_next->next = vnp;
+ if (vnp_prev == NULL) {
+ f->macro_list = vnp_next;
+ } else {
+ vnp_prev->next = vnp_next;
+ }
+ /* increase the scroll position, so cursor will still be over the same item */
+ scroll_pos++;
+ changed_macro = TRUE;
+ }
+ break;
+ case 4:
+ /* insert item */
+ if (pt.y >= rct.top && pt.y <= rct.top + 4) {
+ /* insert macro before this one */
+ AddMacroActions (f, item - 1);
+ } else if (pt.y >= rct.bottom - 4 && pt.y <= rct.bottom) {
+ /* insert macro after this one */
+ AddMacroActions (f, item);
+ }
+ break;
+ case 5:
+ /* edit this item */
+ changed_macro = EditMacroItem (f, item);
+ break;
+ }
+ }
+ }
+ if (changed_macro) {
+ UpdateMacroSummary (f, scroll_pos);
+ }
+}
+
+
+static void DrawMacroDocControls (DoC d, RectPtr r, Int2 item, Int2 firstLine)
+
+{
+ MacroEditorFormPtr dlg;
+ RecT rct;
+ Int4 width;
+ PoinT pt1, pt2;
+
+ dlg = (MacroEditorFormPtr) GetObjectExtra (d);
+ if (dlg == NULL) return;
+ /* don't draw controls for explanatory text */
+ if (item == 1 || item >= ValNodeLen (dlg->macro_list) + 2) return;
+
+ if (dlg != NULL && r != NULL && item > 0 && firstLine == 0) {
+ rct = *r;
+
+ width = 10;
+ /* draw X for deletion */
+ pt1.x = rct.left + 1;
+ pt1.y = rct.top + 1;
+ pt2.x = pt1.x + width;
+ pt2.y = pt1.y + width;
+ DrawLine (pt1, pt2);
+ pt1.x = rct.left + 1;
+ pt1.y = rct.top + 1 + width;
+ pt2.x = pt1.x + width;
+ pt2.y = rct.top + 1;
+ DrawLine (pt1, pt2);
+
+ /* draw up arrow for moving step up */
+ if (item > 2) {
+ pt1.x = rct.left + width + 3;
+ pt1.y = rct.top + 3;
+ pt2.x = pt1.x + 5;
+ pt2.y = rct.top + 1;
+ DrawLine (pt1, pt2);
+ pt1.x = pt2.x + 5;
+ DrawLine (pt1, pt2);
+ pt1.x = pt2.x;
+ pt1.y = pt2.y + width;
+ DrawLine (pt1, pt2);
+ }
+ /* draw up arrow for moving step up */
+ if (item < ValNodeLen (dlg->macro_list) + 1) {
+ pt1.x = rct.left + 2 * width + 5;
+ pt1.y = rct.top + width - 2;
+ pt2.x = pt1.x + 5;
+ pt2.y = rct.top + width + 1;
+ DrawLine (pt1, pt2);
+ pt1.x = pt2.x + 5;
+ DrawLine (pt1, pt2);
+ pt1.x = pt2.x;
+ pt1.y = rct.top + 1;
+ DrawLine (pt1, pt2);
+ }
+
+ /* draw insertion controls */
+ pt1.x = rct.left + 3 * width + 7;
+ pt1.y = rct.top + 4;
+ pt2.x = pt1.x + width;
+ pt2.y = rct.top;
+ if (item > 2) {
+ DrawLine (pt1, pt2);
+ }
+ pt1.y = rct.bottom - 4;
+ pt2.y = rct.bottom;
+ if (item < ValNodeLen (dlg->macro_list) + 1) {
+ DrawLine (pt1, pt2);
+ }
+ }
+}
+
+
+NLM_EXTERN void LaunchMacroEditor (IteM i)
+{
+ BaseFormPtr bfp;
+ WindoW w;
+ MacroEditorFormPtr f;
+ GrouP h, c;
+ MenU m;
+
+#ifdef WIN_MAC
+ bfp = currentFormDataPtr;
+#else
+ bfp = GetObjectExtra (i);
+#endif
+ if (bfp == NULL) return;
+
+ f = (MacroEditorFormPtr) MemNew (sizeof (MacroEditorFormData));
+ if (f == NULL) return;
+
+ w = FixedWindow (-50, -33, -10, -10, "Macro Editor", StdCloseWindowProc);
+ SetObjectExtra (w, f, CleanupMacroEditorForm);
+ f->form = (ForM) w;
+ f->input_entityID = bfp->input_entityID;
+
+ f->formmessage = MacroEditorFormMessage;
+
+ f->macro_list = NULL;
+ f->last_filename = NULL;
+ f->unsaved = FALSE;
+ f->indexer_version = TRUE;
+
+ m = PulldownMenu (w, "File");
+ FormCommandItem (m, "Open", (BaseFormPtr)f, VIB_MSG_OPEN);
+ FormCommandItem (m, "Import", (BaseFormPtr)f, VIB_MSG_IMPORT);
+ FormCommandItem (m, "Save", (BaseFormPtr)f, VIB_MSG_SAVE);
+ FormCommandItem (m, "Save As", (BaseFormPtr)f, VIB_MSG_SAVE_AS);
+ SeparatorItem (m);
+ FormCommandItem (m, "Quit", (BaseFormPtr)f, VIB_MSG_QUIT);
+ m = PulldownMenu (w, "Edit");
+ FormCommandItem (m, "Copy All to Clipboard", (BaseFormPtr) f, VIB_MSG_COPY);
+
+ SetupMacroEditorFont (f);
+ SetMacroEditorFileItems (f);
+
+ h = HiddenGroup (w, -1, 0, NULL);
+ SetGroupSpacing (h, 10, 10);
+
+ f->macro_summary = DocumentPanel (h, stdCharWidth * 50, stdLineHeight * 12);
+ SetObjectExtra (f->macro_summary, f, NULL);
+ SetDocProcs (f->macro_summary, ClickMacroDoc, NULL, NULL, NULL);
+ SetDocShade (f->macro_summary, DrawMacroDocControls, NULL, NULL, NULL);
+
+ c = HiddenGroup (h, 3, 0, NULL);
+ f->run_btn = PushButton (c, "Run", RunMacro);
+ SetObjectExtra (f->run_btn, f, NULL);
+ Disable (f->run_btn);
+
+ AlignObjects (ALIGN_CENTER, (HANDLE) f->macro_summary, (HANDLE) c, NULL);
+ SummarizeMacro (f->macro_summary, f->macro_list, f->summary_font);
+ Show (w);
+}
+
+
+static void ClearDialogBtn (ButtoN b)
+{
+ DialoG d;
+
+ d = (DialoG) GetObjectExtra (b);
+
+ PointerToDialog (d, NULL);
+}
+
+
+typedef struct textportiondialog
+{
+ DIALOG_MESSAGE_BLOCK
+
+ GrouP start_choice;
+ TexT start_text;
+ GrouP end_choice;
+ TexT end_text;
+ ButtoN rem_before;
+ ButtoN also_rem_before;
+ ButtoN rem_after;
+ ButtoN also_rem_after;
+ ButtoN insensitive;
+ ButtoN whole_word;
+
+ Boolean inside;
+
+ Nlm_ChangeNotifyProc change_notify;
+ Pointer change_userdata;
+} TextPortionDialogData, PNTR TextPortionDialogPtr;
+
+
+static void OutsideEnableDisable (TextPortionDialogPtr tp)
+{
+ if (tp == NULL || tp->inside)
+ {
+ return;
+ }
+ if (GetStatus (tp->rem_before))
+ {
+ Enable (tp->start_text);
+ Enable (tp->also_rem_before);
+ }
+ else
+ {
+ Disable (tp->start_text);
+ Disable (tp->also_rem_before);
+ }
+ if (GetStatus (tp->rem_after))
+ {
+ Enable (tp->end_text);
+ Enable (tp->also_rem_after);
+ }
+ else
+ {
+ Disable (tp->end_text);
+ Disable (tp->also_rem_after);
+ }
+}
+
+static void ResetTextPortionDialog (TextPortionDialogPtr tp)
+{
+ if (tp == NULL)
+ {
+ return;
+ }
+ if (tp->inside)
+ {
+ SetValue (tp->start_choice, 1);
+ SetValue (tp->end_choice, 1);
+ }
+ else
+ {
+ SetStatus (tp->rem_before, FALSE);
+ SetStatus (tp->also_rem_before, FALSE);
+ SetStatus (tp->rem_after, FALSE);
+ SetStatus (tp->also_rem_after, FALSE);
+ }
+ SetTitle (tp->start_text, "");
+ SetTitle (tp->end_text, "");
+ SetStatus (tp->insensitive, FALSE);
+ SetStatus (tp->whole_word, FALSE);
+ OutsideEnableDisable (tp);
+}
+
+static void TextPortionToDialog (DialoG d, Pointer data)
+{
+ TextPortionDialogPtr tdlg;
+ TextPortionPtr tdata;
+
+ tdlg = (TextPortionDialogPtr) GetObjectExtra (d);
+ if (tdlg == NULL) {
+ return;
+ }
+ tdata = (TextPortionPtr) data;
+ ResetTextPortionDialog (tdlg);
+ if (tdata != NULL) {
+ if (tdlg->inside) {
+ if (tdata->include_left) {
+ SetValue (tdlg->start_choice, 2);
+ } else {
+ SetValue (tdlg->start_choice, 1);
+ }
+ if (tdata->include_right) {
+ SetValue (tdlg->end_choice, 2);
+ } else {
+ SetValue (tdlg->end_choice, 1);
+ }
+ } else {
+ SetStatus (tdlg->rem_before, StringHasNoText (tdata->left_text));
+ SetStatus (tdlg->rem_after, StringHasNoText (tdata->right_text));
+ SetStatus (tdlg->also_rem_before, tdata->include_left);
+ SetStatus (tdlg->also_rem_after, tdata->include_right);
+ }
+ if (tdata->left_text != NULL) {
+ SetTitle (tdlg->start_text, tdata->left_text);
+ }
+ if (tdata->right_text != NULL)
+ {
+ SetTitle (tdlg->end_text, tdata->right_text);
+ }
+ SetStatus (tdlg->insensitive, !tdata->case_sensitive);
+ SetStatus (tdlg->whole_word, tdata->whole_word);
+ }
+ OutsideEnableDisable (tdlg);
+}
+
+static Pointer DialogToTextPortion (DialoG d)
+{
+ TextPortionDialogPtr tdlg;
+ TextPortionPtr tdata;
+
+ tdlg = (TextPortionDialogPtr) GetObjectExtra (d);
+ if (tdlg == NULL) {
+ return NULL;
+ }
+
+ tdata = TextPortionNew();
+ if (tdata != NULL) {
+ if (tdlg->inside) {
+ if (GetValue (tdlg->start_choice) == 1) {
+ tdata->include_left = FALSE;
+ } else {
+ tdata->include_left = TRUE;
+ }
+ tdata->left_text = JustSaveStringFromText (tdlg->start_text);
+
+ if (GetValue (tdlg->end_choice) == 1) {
+ tdata->include_right = FALSE;
+ } else {
+ tdata->include_right = TRUE;
+ }
+ tdata->right_text = JustSaveStringFromText (tdlg->end_text);
+ } else {
+ if (GetStatus (tdlg->rem_before)) {
+ tdata->left_text = JustSaveStringFromText (tdlg->start_text);
+ } else {
+ tdata->left_text = NULL;
+ }
+ if (GetStatus (tdlg->rem_after)) {
+ tdata->right_text = JustSaveStringFromText (tdlg->end_text);
+ } else {
+ tdata->right_text = NULL;
+ }
+
+ tdata->include_left = GetStatus (tdlg->also_rem_before);
+ tdata->include_right = GetStatus (tdlg->also_rem_after);
+ }
+
+ tdata->case_sensitive = !GetStatus (tdlg->insensitive);
+ tdata->whole_word = GetStatus (tdlg->whole_word);
+ tdata->inside = tdlg->inside;
+ }
+ return tdata;
+}
+
+static void TextPortionMessage (DialoG d, Int2 mssg)
+
+{
+ TextPortionDialogPtr tp;
+
+ tp = (TextPortionDialogPtr) GetObjectExtra (d);
+ if (tp != NULL) {
+ switch (mssg) {
+ case VIB_MSG_INIT :
+ ResetTextPortionDialog (tp);
+ break;
+ case VIB_MSG_ENTER :
+ Select (tp->start_text);
+ break;
+ default :
+ break;
+ }
+ }
+}
+
+static void ChangeTextPortionGroup (GrouP g)
+{
+ TextPortionDialogPtr tp;
+
+ tp = (TextPortionDialogPtr) GetObjectExtra (g);
+ if (tp == NULL) return;
+
+ if (tp->change_notify != NULL)
+ {
+ (tp->change_notify) (tp->change_userdata);
+ }
+}
+
+static void ChangeTextPortionText (TexT t)
+{
+ TextPortionDialogPtr tp;
+
+ tp = (TextPortionDialogPtr) GetObjectExtra (t);
+ if (tp == NULL) return;
+
+ if (tp->change_notify != NULL)
+ {
+ (tp->change_notify) (tp->change_userdata);
+ }
+}
+
+
+static void ChangeTextPortionBtn (ButtoN b)
+{
+ TextPortionDialogPtr tp;
+
+ tp = (TextPortionDialogPtr) GetObjectExtra (b);
+ if (tp == NULL) return;
+ OutsideEnableDisable (tp);
+
+ if (tp->change_notify != NULL)
+ {
+ (tp->change_notify) (tp->change_userdata);
+ }
+}
+
+
+static ValNodePtr TestTextPortionDialog (DialoG d)
+{
+ TextPortionDialogPtr tp;
+ ValNodePtr err_list = NULL;
+
+ tp = (TextPortionDialogPtr) GetObjectExtra (d);
+ if (tp == NULL) return NULL;
+
+ /* don't actually need to fill anything in. Could want to copy the entire field. */
+
+ return err_list;
+}
+
+
+static DialoG TextPortionDialog (GrouP h, Boolean inside, Nlm_ChangeNotifyProc change_notify, Pointer change_userdata)
+{
+ TextPortionDialogPtr tp;
+ GrouP p, g1, g2;
+
+ tp = (TextPortionDialogPtr) MemNew (sizeof (TextPortionDialogData));
+ if (tp == NULL)
+ {
+ return NULL;
+ }
+
+ p = HiddenGroup (h, -1, 0, NULL);
+ SetObjectExtra (p, tp, StdCleanupExtraProc);
+
+ tp->dialog = (DialoG) p;
+ tp->todialog = TextPortionToDialog;
+ tp->fromdialog = DialogToTextPortion;
+ tp->dialogmessage = TextPortionMessage;
+ tp->testdialog = TestTextPortionDialog;
+
+ tp->change_notify = change_notify;
+ tp->change_userdata = change_userdata;
+ tp->inside = inside;
+
+ g1 = HiddenGroup (p, 3, 0, NULL);
+ SetGroupSpacing (g1, 10, 10);
+
+ if (inside)
+ {
+ StaticPrompt (g1, "Between", 0, popupMenuHeight, programFont, 'r');
+ tp->start_choice = HiddenGroup (g1, 2, 0, ChangeTextPortionGroup);
+ RadioButton (tp->start_choice, "just after");
+ RadioButton (tp->start_choice, "starting at");
+ SetValue (tp->start_choice, 1);
+ SetObjectExtra (tp->start_choice, tp, NULL);
+
+ tp->start_text = DialogText (g1, "", 10, ChangeTextPortionText);
+ SetObjectExtra (tp->start_text, tp, NULL);
+
+ StaticPrompt (g1, "And", 0, popupMenuHeight, programFont, 'r');
+ tp->end_choice = HiddenGroup (g1, 2, 0, ChangeTextPortionGroup);
+ RadioButton (tp->end_choice, "up to");
+ RadioButton (tp->end_choice, "including");
+ SetValue (tp->end_choice, 1);
+ SetObjectExtra (tp->start_choice, tp, NULL);
+
+ tp->end_text = DialogText (g1, "", 10, ChangeTextPortionText);
+ SetObjectExtra (tp->start_text, tp, NULL);
+ }
+ else
+ {
+ tp->rem_before = CheckBox (g1, "Before", ChangeTextPortionBtn);
+ SetObjectExtra (tp->rem_before, tp, NULL);
+ tp->start_text = DialogText (g1, "", 10, ChangeTextPortionText);
+ SetObjectExtra (tp->start_text, tp, NULL);
+ tp->also_rem_before = CheckBox (g1, "Also Remove Entered Text", ChangeTextPortionBtn);
+
+ tp->rem_after = CheckBox (g1, "After", ChangeTextPortionBtn);
+ SetObjectExtra (tp->rem_after, tp, NULL);
+ tp->end_text = DialogText (g1, "", 10, ChangeTextPortionText);
+ SetObjectExtra (tp->end_text, tp, NULL);
+ tp->also_rem_after = CheckBox (g1, "Also Remove Entered Text", ChangeTextPortionBtn);
+ }
+
+ g2 = HiddenGroup (p, 2, 0, NULL);
+ tp->insensitive = CheckBox (g2, "Case insensitive", ChangeTextPortionBtn);
+ SetObjectExtra (tp->insensitive, tp, NULL);
+ tp->whole_word = CheckBox (g2, "Whole word", ChangeTextPortionBtn);
+ SetObjectExtra (tp->whole_word, tp, NULL);
+
+ AlignObjects (ALIGN_CENTER, (HANDLE) g1, (HANDLE) g2, NULL);
+
+ ResetTextPortionDialog (tp);
+ return (DialoG) p;
+}
+
+
+typedef struct fieldeditdlg {
+ DIALOG_MESSAGE_BLOCK
+ TexT find_txt;
+ TexT repl_txt;
+ GrouP location;
+ Nlm_ChangeNotifyProc change_notify;
+ Pointer change_userdata;
+} FieldEditDlgData, PNTR FieldEditDlgPtr;
+
+
+static void ChangeFieldEditText (TexT t)
+{
+ FieldEditDlgPtr dlg;
+
+ dlg = (FieldEditDlgPtr) GetObjectExtra (t);
+ if (dlg != NULL && dlg->change_notify != NULL) {
+ dlg->change_notify (dlg->change_userdata);
+ }
+}
+
+
+static void ChangeFieldEditGroup (GrouP g)
+{
+ FieldEditDlgPtr dlg;
+
+ dlg = (FieldEditDlgPtr) GetObjectExtra (g);
+ if (dlg != NULL && dlg->change_notify != NULL) {
+ dlg->change_notify (dlg->change_userdata);
+ }
+}
+
+
+static void FieldEditToDialog (DialoG d, Pointer data)
+{
+ FieldEditDlgPtr dlg;
+ FieldEditPtr edit;
+
+ dlg = (FieldEditDlgPtr) GetObjectExtra (d);
+
+ if (dlg == NULL) return;
+
+ edit = (FieldEditPtr) data;
+ if (edit == NULL) {
+ SetTitle (dlg->find_txt, "");
+ SetTitle (dlg->repl_txt, "");
+ SetValue (dlg->location, 1);
+ } else {
+ SetTitle (dlg->find_txt, edit->find_txt);
+ SetTitle (dlg->repl_txt, edit->repl_txt);
+ switch (edit->location) {
+ case Field_edit_location_anywhere:
+ SetValue (dlg->location, 1);
+ break;
+ case Field_edit_location_beginning:
+ SetValue (dlg->location, 2);
+ break;
+ case Field_edit_location_end:
+ SetValue (dlg->location, 3);
+ break;
+ default:
+ SetValue (dlg->location, 1);
+ break;
+ }
+ }
+ if (dlg->change_notify != NULL) {
+ dlg->change_notify (dlg->change_userdata);
+ }
+}
+
+
+static Pointer DialogToFieldEdit (DialoG d)
+{
+ FieldEditDlgPtr dlg;
+ FieldEditPtr edit;
+
+ dlg = (FieldEditDlgPtr) GetObjectExtra (d);
+
+ if (dlg == NULL) return NULL;
+
+ if (TextHasNoText (dlg->find_txt)) {
+ return NULL;
+ }
+ edit = FieldEditNew ();
+ edit->find_txt = JustSaveStringFromText (dlg->find_txt);
+ edit->repl_txt = JustSaveStringFromText (dlg->repl_txt);
+ switch (GetValue (dlg->location)) {
+ case 1:
+ edit->location = Field_edit_location_anywhere;
+ break;
+ case 2:
+ edit->location = Field_edit_location_beginning;
+ break;
+ case 3:
+ edit->location = Field_edit_location_end;
+ break;
+ default:
+ edit->location = Field_edit_location_anywhere;
+ break;
+ }
+ return edit;
+}
+
+
+static void FieldEditDlgCopy (ButtoN b)
+{
+ FieldEditDlgPtr dlg;
+ CharPtr str = NULL;
+
+ dlg = (FieldEditDlgPtr) GetObjectExtra (b);
+ if (dlg == NULL)
+ {
+ return;
+ }
+ str = JustSaveStringFromText (dlg->find_txt);
+ SetTitle (dlg->repl_txt, str);
+ str = MemFree (str);
+}
+
+static ValNodePtr TestFieldEditDialog (DialoG d)
+{
+ FieldEditDlgPtr dlg;
+ ValNodePtr err_list = NULL;
+
+ dlg = (FieldEditDlgPtr) GetObjectExtra (d);
+ if (dlg == NULL) {
+ return NULL;
+ }
+
+ if (TextHasNoText (dlg->find_txt)) {
+ ValNodeAddPointer (&err_list, 0, "no find text");
+ }
+ return err_list;
+}
+
+
+static DialoG FieldEditDialog (GrouP h, Nlm_ChangeNotifyProc change_notify, Pointer change_userdata)
+{
+ FieldEditDlgPtr dlg;
+ GrouP p, g;
+ ButtoN b;
+
+ p = HiddenGroup (h, -1, 0, NULL);
+ dlg = (FieldEditDlgPtr) MemNew (sizeof (FieldEditDlgData));
+ SetObjectExtra (p, dlg, StdCleanupExtraProc);
+ dlg->dialog = (DialoG) p;
+ dlg->fromdialog = DialogToFieldEdit;
+ dlg->todialog = FieldEditToDialog;
+ dlg->testdialog = TestFieldEditDialog;
+ dlg->change_notify = change_notify;
+ dlg->change_userdata = change_userdata;
+
+ g = HiddenGroup (p, 3, 0, NULL);
+ StaticPrompt (g, "Find", 0, dialogTextHeight, systemFont, 'r');
+ dlg->find_txt = DialogText (g, "", 18, ChangeFieldEditText);
+ SetObjectExtra (dlg->find_txt, dlg, NULL);
+ b = PushButton (g, "Copy", FieldEditDlgCopy);
+ SetObjectExtra (b, dlg, NULL);
+ Hide (b);
+ StaticPrompt (g, "Replace", 0, dialogTextHeight, systemFont, 'r');
+ dlg->repl_txt = DialogText (g, "", 18, ChangeFieldEditText);
+ SetObjectExtra (dlg->repl_txt, dlg, NULL);
+ b = PushButton (g, "Copy", FieldEditDlgCopy);
+ SetObjectExtra (b, dlg, NULL);
+
+ dlg->location = HiddenGroup (p, 3, 0, ChangeFieldEditGroup);
+ SetObjectExtra (dlg->location, dlg, NULL);
+ RadioButton (dlg->location, "Anywhere in field");
+ RadioButton (dlg->location, "At the beginning of the field");
+ RadioButton (dlg->location, "At the end of the field");
+ SetValue (dlg->location, 1);
+
+ AlignObjects (ALIGN_CENTER, (HANDLE) g, (HANDLE) dlg->location, NULL);
+
+ return (DialoG) p;
+}
+
+
+typedef struct existingtextdlg {
+ DIALOG_MESSAGE_BLOCK
+ GrouP action_grp;
+ ButtoN append_btn;
+ ButtoN prefix_btn;
+ GrouP delim_grp;
+ Nlm_ChangeNotifyProc change_notify;
+ Pointer change_userdata;
+} ExistingTextDlgData, PNTR ExistingTextDlgPtr;
+
+static void ChangeExistingTextActionChoice (GrouP g)
+{
+ ExistingTextDlgPtr dlg;
+ Int4 action_choice;
+
+ dlg = (ExistingTextDlgPtr) GetObjectExtra (g);
+ if (dlg == NULL) return;
+
+ action_choice = GetValue (dlg->action_grp);
+ if (action_choice == 2 || action_choice == 3) {
+ Enable (dlg->delim_grp);
+ } else {
+ Disable (dlg->delim_grp);
+ }
+ if (dlg->change_notify != NULL) {
+ (dlg->change_notify) (dlg->change_userdata);
+ }
+}
+
+
+static void ExistingTextToDialog (DialoG d, Pointer data)
+{
+ ExistingTextDlgPtr dlg;
+ Uint2 existing_text;
+
+ dlg = (ExistingTextDlgPtr) GetObjectExtra (d);
+ if (dlg == NULL) return;
+ if (data == NULL) {
+ SetValue (dlg->action_grp, 1);
+ SetValue (dlg->delim_grp, 1);
+ } else {
+ existing_text = (Uint2) data;
+ switch (existing_text) {
+ case ExistingTextOption_append_semi :
+ SetValue (dlg->action_grp, 2);
+ SetValue (dlg->delim_grp, 1);
+ break;
+ case ExistingTextOption_append_space :
+ SetValue (dlg->action_grp, 2);
+ SetValue (dlg->delim_grp, 2);
+ break;
+ case ExistingTextOption_append_colon :
+ SetValue (dlg->action_grp, 2);
+ SetValue (dlg->delim_grp, 3);
+ break;
+ case ExistingTextOption_append_none :
+ SetValue (dlg->action_grp, 2);
+ SetValue (dlg->delim_grp, 4);
+ break;
+ case ExistingTextOption_prefix_semi :
+ SetValue (dlg->action_grp, 3);
+ SetValue (dlg->delim_grp, 1);
+ break;
+ case ExistingTextOption_prefix_space :
+ SetValue (dlg->action_grp, 3);
+ SetValue (dlg->delim_grp, 2);
+ break;
+ case ExistingTextOption_prefix_colon :
+ SetValue (dlg->action_grp, 3);
+ SetValue (dlg->delim_grp, 3);
+ break;
+ case ExistingTextOption_prefix_none :
+ SetValue (dlg->action_grp, 3);
+ SetValue (dlg->delim_grp, 4);
+ break;
+ case ExistingTextOption_leave_old :
+ SetValue (dlg->action_grp, 4);
+ break;
+ case ExistingTextOption_replace_old :
+ default:
+ SetValue (dlg->action_grp, 1);
+ break;
+ }
+ }
+ ChangeExistingTextActionChoice (dlg->action_grp);
+}
+
+static void ChangeExistingTextDelimChoice (GrouP g)
+{
+ ExistingTextDlgPtr dlg;
+
+ dlg = (ExistingTextDlgPtr) GetObjectExtra (g);
+ if (dlg == NULL) return;
+ if (dlg->change_notify != NULL) {
+ (dlg->change_notify) (dlg->change_userdata);
+ }
+}
+
+
+static Pointer DialogToExistingText (DialoG d)
+{
+ ExistingTextDlgPtr dlg;
+ Int4 action_choice, separator_choice;
+ Uint2 existing_text = ExistingTextOption_replace_old;
+
+ dlg = (ExistingTextDlgPtr) GetObjectExtra (d);
+ if (dlg == NULL) return NULL;
+ action_choice = GetValue (dlg->action_grp);
+ separator_choice = GetValue (dlg->delim_grp);
+ switch (action_choice) {
+ case 1:
+ existing_text = ExistingTextOption_replace_old;
+ break;
+ case 2:
+ switch (separator_choice) {
+ case 1:
+ existing_text = ExistingTextOption_append_semi;
+ break;
+ case 2:
+ existing_text = ExistingTextOption_append_space;
+ break;
+ case 3:
+ existing_text = ExistingTextOption_append_colon;
+ break;
+ case 4:
+ existing_text = ExistingTextOption_append_none;
+ break;
+ }
+ break;
+ case 3:
+ switch (separator_choice) {
+ case 1:
+ existing_text = ExistingTextOption_prefix_semi;
+ break;
+ case 2:
+ existing_text = ExistingTextOption_prefix_space;
+ break;
+ case 3:
+ existing_text = ExistingTextOption_prefix_colon;
+ break;
+ case 4:
+ existing_text = ExistingTextOption_prefix_none;
+ break;
+ }
+ break;
+ case 4:
+ existing_text = ExistingTextOption_leave_old;
+ break;
+ }
+ return (Pointer) existing_text;
+}
+
+
+static ValNodePtr TestExistingTextDialog (DialoG d)
+{
+ ExistingTextDlgPtr dlg;
+ ValNodePtr err_list = NULL;
+ Int2 val;
+
+ dlg = (ExistingTextDlgPtr) GetObjectExtra (d);
+ if (dlg == NULL) return NULL;
+
+ val = GetValue (dlg->action_grp);
+ if ((val == 2 && !Enabled (dlg->append_btn)) || (val == 3 && !Enabled (dlg->prefix_btn))) {
+ ValNodeAddPointer (&err_list, 0, "invalid existing text option for nontext value");
+ }
+ return err_list;
+}
+
+
+static void EnableNonTextOptions (DialoG d)
+{
+ ExistingTextDlgPtr dlg;
+
+ dlg = (ExistingTextDlgPtr) GetObjectExtra (d);
+ if (dlg == NULL) return;
+
+ Enable (dlg->append_btn);
+ Enable (dlg->prefix_btn);
+}
+
+
+static void DisableNonTextOptions (DialoG d)
+{
+ ExistingTextDlgPtr dlg;
+
+ dlg = (ExistingTextDlgPtr) GetObjectExtra (d);
+ if (dlg == NULL) return;
+
+ Disable (dlg->append_btn);
+ Disable (dlg->prefix_btn);
+}
+
+
+static DialoG ExistingTextDialog (GrouP h, Nlm_ChangeNotifyProc change_notify, Pointer change_userdata)
+{
+ ExistingTextDlgPtr dlg;
+ GrouP p;
+ PrompT ppt;
+
+ dlg = (ExistingTextDlgPtr) MemNew (sizeof (ExistingTextDlgData));
+ p = HiddenGroup (h, -1, 0, NULL);
+ SetGroupSpacing (p, 10, 10);
+ SetObjectExtra (p, dlg, StdCleanupExtraProc);
+
+ dlg->dialog = (DialoG) p;
+ dlg->fromdialog = DialogToExistingText;
+ dlg->todialog = ExistingTextToDialog;
+ dlg->testdialog = TestExistingTextDialog;
+ dlg->change_notify = change_notify;
+ dlg->change_userdata = change_userdata;
+
+ dlg->action_grp = HiddenGroup (p, 4, 0, ChangeExistingTextActionChoice);
+ SetGroupSpacing (dlg->action_grp, 10, 10);
+ SetObjectExtra (dlg->action_grp, dlg, NULL);
+ RadioButton (dlg->action_grp, "Overwrite existing text");
+ dlg->append_btn = RadioButton (dlg->action_grp, "Append");
+ dlg->prefix_btn = RadioButton (dlg->action_grp, "Prefix");
+ RadioButton (dlg->action_grp, "Ignore new text");
+ SetValue (dlg->action_grp, 1);
+
+ ppt = StaticPrompt (p, "Separate new text and old text with",
+ 0, dialogTextHeight, programFont, 'c');
+
+ dlg->delim_grp = HiddenGroup (p, 4, 0, ChangeExistingTextDelimChoice);
+ SetObjectExtra (dlg->delim_grp, dlg, NULL);
+ SetGroupSpacing (dlg->delim_grp, 10, 10);
+ RadioButton (dlg->delim_grp, "Semicolon");
+ RadioButton (dlg->delim_grp, "Space");
+ RadioButton (dlg->delim_grp, "Colon");
+ RadioButton (dlg->delim_grp, "Do not separate");
+ SetValue (dlg->delim_grp, 1);
+ Disable (dlg->delim_grp);
+ return (DialoG) p;
+}
+
+
+typedef struct stringconstraintdialog
+{
+ DIALOG_MESSAGE_BLOCK
+ PopuP match_choice;
+ TexT match_text;
+ ButtoN insensitive;
+ ButtoN whole_word;
+ Nlm_ChangeNotifyProc change_notify;
+ Pointer change_userdata;
+} StringConstraintDialogData, PNTR StringConstraintDialogPtr;
+
+static void ResetStringConstraintDialog (StringConstraintDialogPtr scdp)
+{
+ if (scdp == NULL) return;
+
+ SetValue (scdp->match_choice, 1);
+ SetTitle (scdp->match_text, "");
+ SetStatus (scdp->insensitive, FALSE);
+ SetStatus (scdp->whole_word, FALSE);
+}
+
+
+static Int4 GetPopupPosForStringConstraint (StringConstraintPtr scp)
+{
+ Int4 rval = 1;
+
+ if (scp == NULL) return 1;
+
+ switch (scp->match_location)
+ {
+ case String_location_contains:
+ if (scp->not_present)
+ {
+ rval = 2;
+ } else {
+ rval = 1;
+ }
+ break;
+ case String_location_equals:
+ if (scp->not_present) {
+ rval = 4;
+ } else {
+ rval = 3;
+ }
+ break;
+ case String_location_starts:
+ if (scp->not_present) {
+ rval = 9;
+ } else {
+ rval = 5;
+ }
+ break;
+ case String_location_ends:
+ if (scp->not_present) {
+ rval = 10;
+ } else {
+ rval = 6;
+ }
+ break;
+ case String_location_inlist:
+ if (scp->not_present) {
+ rval = 8;
+ } else {
+ rval = 7;
+ }
+ break;
+ }
+ return rval;
+}
+
+
+static void StringConstraintToDialog (DialoG d, Pointer data)
+
+{
+ StringConstraintDialogPtr scdp;
+ StringConstraintPtr scp;
+
+ scdp = (StringConstraintDialogPtr) GetObjectExtra (d);
+ scp = (StringConstraintPtr) data;
+ if (scdp == NULL)
+ {
+ return;
+ }
+
+ if (scp == NULL)
+ {
+ ResetStringConstraintDialog (scdp);
+ }
+ else
+ {
+ SetValue (scdp->match_choice, GetPopupPosForStringConstraint (scp));
+
+ if (StringHasNoText (scp->match_text))
+ {
+ SetTitle (scdp->match_text, " ");
+ }
+ else
+ {
+ SetTitle (scdp->match_text, scp->match_text);
+ }
+
+ SetStatus (scdp->insensitive, !scp->case_sensitive);
+ SetStatus (scdp->whole_word, scp->whole_word);
+ }
+ if (scdp->change_notify != NULL) {
+ (scdp->change_notify) (scdp->change_userdata);
+ }
+}
+
+static Pointer DialogToStringConstraint (DialoG d)
+
+{
+ StringConstraintDialogPtr scdp;
+ StringConstraintPtr scp;
+ Int4 match_choice;
+
+ scdp = (StringConstraintDialogPtr) GetObjectExtra (d);
+ if (scdp == NULL)
+ {
+ return NULL;
+ }
+ scp = StringConstraintNew();
+ if (scp != NULL)
+ {
+ scp->match_text = SaveStringFromText (scdp->match_text);
+ scp->case_sensitive = !GetStatus (scdp->insensitive);
+ scp->whole_word = GetStatus (scdp->whole_word);
+ match_choice = GetValue (scdp->match_choice);
+ switch (match_choice)
+ {
+ case 1:
+ scp->match_location = String_location_contains;
+ scp->not_present = FALSE;
+ break;
+ case 2:
+ scp->match_location = String_location_contains;
+ scp->not_present = TRUE;
+ break;
+ case 3:
+ scp->match_location = String_location_equals;
+ scp->not_present = FALSE;
+ break;
+ case 4:
+ scp->match_location = String_location_equals;
+ scp->not_present = TRUE;
+ break;
+ case 5:
+ scp->match_location = String_location_starts;
+ scp->not_present = FALSE;
+ break;
+ case 6:
+ scp->match_location = String_location_ends;
+ scp->not_present = FALSE;
+ break;
+ case 7:
+ scp->match_location = String_location_inlist;
+ scp->not_present = FALSE;
+ break;
+ case 8:
+ scp->match_location = String_location_inlist;
+ scp->not_present = TRUE;
+ break;
+ case 9:
+ scp->match_location = String_location_starts;
+ scp->not_present = TRUE;
+ break;
+ case 10:
+ scp->match_location = String_location_ends;
+ scp->not_present = TRUE;
+ break;
+ default:
+ scp->match_location = String_location_contains;
+ scp->not_present = FALSE;
+ break;
+ }
+ }
+ return scp;
+}
+
+static void StringConstraintMessage (DialoG d, Int2 mssg)
+
+{
+ StringConstraintDialogPtr scdp;
+
+ scdp = (StringConstraintDialogPtr) GetObjectExtra (d);
+ if (scdp != NULL) {
+ switch (mssg) {
+ case VIB_MSG_INIT :
+ ResetStringConstraintDialog (scdp);
+ break;
+ case VIB_MSG_ENTER :
+ Select (scdp->match_text);
+ break;
+ default :
+ break;
+ }
+ }
+}
+
+
+static void ChangeStringConstraintDialogText (TexT t)
+{
+ StringConstraintDialogPtr dlg;
+
+ dlg = (StringConstraintDialogPtr) GetObjectExtra (t);
+ if (dlg != NULL && dlg->change_notify != NULL) {
+ (dlg->change_notify) (dlg->change_userdata);
+ }
+}
+
+
+static ValNodePtr TestStringConstraintDialog (DialoG d)
+
+{
+ ValNodePtr err_list = NULL;
+ StringConstraintDialogPtr dlg;
+
+ dlg = (StringConstraintDialogPtr) GetObjectExtra (d);
+ if (dlg != NULL) {
+ if (TextHasNoText (dlg->match_text)) {
+ ValNodeAddPointer (&err_list, 0, "empty string constraint");
+ }
+ }
+ return err_list;
+}
+
+NLM_EXTERN DialoG StringConstraintDialog (GrouP h, CharPtr label, Boolean clear_btn, Nlm_ChangeNotifyProc change_notify, Pointer change_userdata)
+
+{
+ StringConstraintDialogPtr scdp;
+ GrouP p, g, k;
+ ButtoN b = NULL;
+
+ scdp = (StringConstraintDialogPtr) MemNew (sizeof (StringConstraintDialogData));
+ if (scdp == NULL)
+ {
+ return NULL;
+ }
+
+ p = HiddenGroup (h, -1, 0, NULL);
+ SetObjectExtra (p, scdp, StdCleanupExtraProc);
+
+ scdp->dialog = (DialoG) p;
+ scdp->todialog = StringConstraintToDialog;
+ scdp->fromdialog = DialogToStringConstraint;
+ scdp->dialogmessage = StringConstraintMessage;
+ scdp->testdialog = TestStringConstraintDialog;
+ scdp->change_notify = change_notify;
+ scdp->change_userdata = change_userdata;
+
+ g = HiddenGroup (p, 3, 0, NULL);
+ SetGroupSpacing (g, 10, 10);
+
+ if (!StringHasNoText (label))
+ {
+ StaticPrompt (g, label, 0, dialogTextHeight, systemFont, 'l');
+ }
+
+ scdp->match_choice = PopupList (g, TRUE, NULL);
+ PopupItem (scdp->match_choice, "Contains");
+ PopupItem (scdp->match_choice, "Does not contain");
+ PopupItem (scdp->match_choice, "Equals");
+ PopupItem (scdp->match_choice, "Does not equal");
+ PopupItem (scdp->match_choice, "Starts with");
+ PopupItem (scdp->match_choice, "Ends with");
+ PopupItem (scdp->match_choice, "Is one of");
+ PopupItem (scdp->match_choice, "Is not one of");
+ PopupItem (scdp->match_choice, "Does not start with");
+ PopupItem (scdp->match_choice, "Does not end with");
+ SetValue (scdp->match_choice, 1);
+ scdp->match_text = DialogText (g, "", 15, ChangeStringConstraintDialogText);
+ SetObjectExtra (scdp->match_text, scdp, NULL);
+
+ k = HiddenGroup (p, 3, 0, NULL);
+ SetGroupSpacing (k, 10, 10);
+ scdp->insensitive = CheckBox (k, "Case Insensitive", NULL);
+ scdp->whole_word = CheckBox (k, "Whole Word", NULL);
+
+ if (clear_btn)
+ {
+ b = PushButton (p, "Clear Constraint", ClearDialogBtn);
+ SetObjectExtra (b, p, NULL);
+ }
+
+ AlignObjects (ALIGN_CENTER, (HANDLE) g, (HANDLE) k, (HANDLE) b, NULL);
+
+ return (DialoG) p;
+}
+
+typedef struct locationconstraintdialog
+{
+ DIALOG_MESSAGE_BLOCK
+ PopuP strand;
+ PopuP sequence_type;
+
+ Nlm_ChangeNotifyProc change_notify;
+ Pointer change_userdata;
+} LocationConstraintDialogData, PNTR LocationConstraintDialogPtr;
+
+
+static void ChangeLocationConstraintDialogPopup (PopuP p)
+{
+ LocationConstraintDialogPtr dlg;
+
+ dlg = (LocationConstraintDialogPtr) GetObjectExtra (p);
+ if (dlg != NULL && dlg->change_notify != NULL) {
+ (dlg->change_notify) (dlg->change_userdata);
+ }
+}
+
+
+static void LocationConstraintToDialog (DialoG d, Pointer data)
+{
+ LocationConstraintDialogPtr dlg;
+ LocationConstraintPtr l;
+
+ dlg = (LocationConstraintDialogPtr) GetObjectExtra (d);
+ if (dlg == NULL) return;
+
+ l = (LocationConstraintPtr) data;
+ if (l == NULL) {
+ SetValue (dlg->strand, 1);
+ SetValue (dlg->sequence_type, 1);
+ } else {
+ switch (l->strand) {
+ case Strand_constraint_any:
+ SetValue (dlg->strand, 1);
+ break;
+ case Strand_constraint_plus:
+ SetValue (dlg->strand, 2);
+ break;
+ case Strand_constraint_minus:
+ SetValue (dlg->strand, 3);
+ break;
+ default:
+ SetValue (dlg->strand, 1);
+ break;
+ }
+ switch (l->seq_type) {
+ case Seqtype_constraint_any:
+ SetValue (dlg->sequence_type, 1);
+ break;
+ case Seqtype_constraint_nuc:
+ SetValue (dlg->sequence_type, 2);
+ break;
+ case Seqtype_constraint_prot:
+ SetValue (dlg->sequence_type, 3);
+ break;
+ default:
+ SetValue (dlg->sequence_type, 1);
+ break;
+ }
+ }
+ ChangeLocationConstraintDialogPopup (dlg->strand);
+}
+
+
+static Pointer DialogToLocationConstraint (DialoG d)
+{
+ LocationConstraintDialogPtr dlg;
+ LocationConstraintPtr l;
+
+ dlg = (LocationConstraintDialogPtr) GetObjectExtra (d);
+ if (dlg == NULL) return NULL;
+ l = LocationConstraintNew();
+ if (l != NULL) {
+ switch (GetValue (dlg->strand)) {
+ case 1:
+ l->strand = Strand_constraint_any;
+ break;
+ case 2:
+ l->strand = Strand_constraint_plus;
+ break;
+ case 3:
+ l->strand = Strand_constraint_minus;
+ break;
+ default:
+ l->strand = Strand_constraint_any;
+ break;
+ }
+ switch (GetValue (dlg->sequence_type)) {
+ case 1:
+ l->seq_type = Seqtype_constraint_any;
+ break;
+ case 2:
+ l->seq_type = Seqtype_constraint_nuc;
+ break;
+ case 3:
+ l->seq_type = Seqtype_constraint_prot;
+ break;
+ default:
+ l->seq_type = Seqtype_constraint_any;
+ break;
+ }
+ }
+ return l;
+}
+
+
+static ValNodePtr TestLocationConstraintDialog (DialoG d)
+{
+ LocationConstraintDialogPtr dlg;
+ ValNodePtr err_list = NULL;
+
+ dlg = (LocationConstraintDialogPtr) GetObjectExtra (d);
+ if (dlg != NULL) {
+ if (GetValue (dlg->sequence_type) == 1 && GetValue (dlg->strand) == 1) {
+ ValNodeAddPointer (&err_list, 0, "empty location constraint");
+ }
+ }
+ return err_list;
+}
+
+
+extern DialoG LocationConstraintDialog (GrouP h, Nlm_ChangeNotifyProc change_notify, Pointer change_userdata)
+
+{
+ LocationConstraintDialogPtr dlg;
+ GrouP p;
+ ButtoN b = NULL;
+
+ dlg = (LocationConstraintDialogPtr) MemNew (sizeof (LocationConstraintDialogData));
+ if (dlg == NULL)
+ {
+ return NULL;
+ }
+
+ p = HiddenGroup (h, 4, 0, NULL);
+ SetObjectExtra (p, dlg, StdCleanupExtraProc);
+
+ dlg->dialog = (DialoG) p;
+ dlg->todialog = LocationConstraintToDialog;
+ dlg->fromdialog = DialogToLocationConstraint;
+ dlg->testdialog = TestLocationConstraintDialog;
+ dlg->change_notify = change_notify;
+ dlg->change_userdata = change_userdata;
+
+ StaticPrompt (p, "on", 0, dialogTextHeight, systemFont, 'l');
+ dlg->strand = PopupList (p, TRUE, ChangeLocationConstraintDialogPopup);
+ SetObjectExtra (dlg->strand, dlg, NULL);
+ PopupItem (dlg->strand, "Any strand");
+ PopupItem (dlg->strand, "Plus strand");
+ PopupItem (dlg->strand, "Minus strand");
+ SetValue (dlg->strand, 1);
+
+ StaticPrompt (p, "on", 0, dialogTextHeight, systemFont, 'l');
+ dlg->sequence_type = PopupList (p, TRUE, ChangeLocationConstraintDialogPopup);
+ SetObjectExtra (dlg->sequence_type, dlg, NULL);
+ PopupItem (dlg->sequence_type, "nucleotide and protein sequences");
+ PopupItem (dlg->sequence_type, "nucleotide sequences only");
+ PopupItem (dlg->sequence_type, "protein sequences only");
+ SetValue (dlg->sequence_type, 1);
+
+
+ return (DialoG) p;
+}
+
+
+typedef struct sourcequalchoicedialog
+{
+ DIALOG_MESSAGE_BLOCK
+ DialoG dlg;
+ DialoG loc_dlg;
+ DialoG orig_dlg;
+ GrouP choice_type;
+ Nlm_ChangeNotifyProc change_notify;
+ Pointer change_userdata;
+} SourceQualChoiceDialogData, PNTR SourceQualChoiceDialogPtr;
+
+
+static void ChangeSourceQualChoice (GrouP g)
+{
+ SourceQualChoiceDialogPtr dlg;
+ Int4 val;
+
+ dlg = (SourceQualChoiceDialogPtr) GetObjectExtra (g);
+ if (dlg == NULL || dlg->choice_type == NULL) return;
+
+ val = GetValue (dlg->choice_type);
+ switch (val) {
+ case 1:
+ Show (dlg->dlg);
+ Hide (dlg->loc_dlg);
+ Hide (dlg->orig_dlg);
+ break;
+ case 2:
+ Hide (dlg->dlg);
+ Show (dlg->loc_dlg);
+ Hide (dlg->orig_dlg);
+ break;
+ case 3:
+ Hide (dlg->dlg);
+ Hide (dlg->loc_dlg);
+ Show (dlg->orig_dlg);
+ break;
+ default:
+ Hide (dlg->dlg);
+ Hide (dlg->loc_dlg);
+ Hide (dlg->orig_dlg);
+ break;
+ }
+ if (dlg->change_notify != NULL) {
+ (dlg->change_notify) (dlg->change_userdata);
+ }
+}
+
+
+static void SourceQualChoiceToDialog (DialoG d, Pointer data)
+{
+ SourceQualChoiceDialogPtr dlg;
+ ValNodePtr vnp;
+ ValNode vn;
+
+ dlg = (SourceQualChoiceDialogPtr) GetObjectExtra (d);
+ if (dlg == NULL) return;
+ vnp = (ValNodePtr) data;
+
+ if (vnp == NULL) {
+ SafeSetValue (dlg->choice_type, 1);
+ PointerToDialog (dlg->dlg, NULL);
+ } else if (vnp->choice == SourceQualChoice_textqual) {
+ SafeSetValue (dlg->choice_type, 1);
+ vn.choice = 0;
+ vn.next = NULL;
+ vn.data.ptrvalue = GetSourceQualName (vnp->data.intvalue);
+ PointerToDialog (dlg->dlg, &vn);
+ } else if (vnp->choice == SourceQualChoice_location) {
+ SafeSetValue (dlg->choice_type, 2);
+ vn.choice = vnp->data.intvalue;
+ vn.next = NULL;
+ vn.data.ptrvalue = NULL;
+ PointerToDialog (dlg->loc_dlg, &vn);
+ } else if (vnp->choice == SourceQualChoice_origin) {
+ SafeSetValue (dlg->choice_type, 3);
+ vn.choice = vnp->data.intvalue;
+ vn.next = NULL;
+ vn.data.ptrvalue = NULL;
+ PointerToDialog (dlg->orig_dlg, &vn);
+ }
+
+ ChangeSourceQualChoice (dlg->choice_type);
+}
+
+
+static Pointer DialogToSourceQualChoice (DialoG d)
+{
+ SourceQualChoiceDialogPtr dlg;
+ ValNodePtr vnp, sqc = NULL;
+ Int4 choice_type = SourceQualChoice_textqual;
+
+ dlg = (SourceQualChoiceDialogPtr) GetObjectExtra (d);
+ if (dlg == NULL) return NULL;
+
+ if (dlg->choice_type == NULL) {
+ choice_type = SourceQualChoice_textqual;
+ } else {
+ switch (GetValue (dlg->choice_type)) {
+ case 1:
+ choice_type = SourceQualChoice_textqual;
+ break;
+ case 2:
+ choice_type = SourceQualChoice_location;
+ break;
+ case 3:
+ choice_type = SourceQualChoice_origin;
+ break;
+ }
+ }
+ switch (choice_type) {
+ case SourceQualChoice_textqual:
+ vnp = DialogToPointer (dlg->dlg);
+ if (vnp != NULL) {
+ sqc = ValNodeNew (NULL);
+ sqc->choice = SourceQualChoice_textqual;
+ sqc->data.intvalue = GetSourceQualTypeByName (vnp->data.ptrvalue);
+ }
+ break;
+ case SourceQualChoice_location:
+ vnp = DialogToPointer (dlg->loc_dlg);
+ sqc = ValNodeNew (NULL);
+ sqc->choice = SourceQualChoice_location;
+ if (vnp == NULL) {
+ sqc->data.intvalue = 0;
+ } else {
+ sqc->data.intvalue = vnp->choice;
+ }
+ vnp = ValNodeFree (vnp);
+ break;
+ case SourceQualChoice_origin:
+ vnp = DialogToPointer (dlg->orig_dlg);
+ sqc = ValNodeNew (NULL);
+ sqc->choice = SourceQualChoice_origin;
+ if (vnp == NULL) {
+ sqc->data.intvalue = 0;
+ } else {
+ sqc->data.intvalue = vnp->choice;
+ }
+ vnp = ValNodeFree (vnp);
+ break;
+ }
+ return sqc;
+}
+
+
+static ValNodePtr TestSourceQualChoiceDialog (DialoG d)
+{
+ SourceQualChoiceDialogPtr dlg;
+ ValNodePtr err_list = NULL;
+ Int4 val;
+
+ dlg = (SourceQualChoiceDialogPtr) GetObjectExtra (d);
+ if (dlg == NULL) return NULL;
+
+ if (dlg->choice_type == NULL) {
+ err_list = TestDialog (dlg->dlg);
+ } else {
+ val = GetValue (dlg->choice_type);
+ switch (val) {
+ case 1:
+ err_list = TestDialog (dlg->dlg);
+ break;
+ case 2:
+ err_list = TestDialog (dlg->loc_dlg);
+ break;
+ case 3:
+ err_list = TestDialog (dlg->orig_dlg);
+ break;
+ default:
+ ValNodeAddPointer (&err_list, 0, "no source qual choice");
+ break;
+ }
+ }
+ return err_list;
+}
+
+
+static DialoG SourceQualChoiceDialog (GrouP h, Boolean text_only, Boolean for_remove, Nlm_ChangeNotifyProc change_notify, Pointer change_userdata)
+{
+ SourceQualChoiceDialogPtr dlg;
+ GrouP p, g;
+ ValNodePtr qual_list, loc_list, orig_list;
+ ButtoN b1, b2, b3;
+ ValNode vn;
+
+ dlg = (SourceQualChoiceDialogPtr) MemNew (sizeof (SourceQualChoiceDialogData));
+ if (dlg == NULL)
+ {
+ return NULL;
+ }
+
+ p = HiddenGroup (h, 2, 0, NULL);
+ SetObjectExtra (p, dlg, StdCleanupExtraProc);
+
+ dlg->dialog = (DialoG) p;
+ dlg->todialog = SourceQualChoiceToDialog;
+ dlg->fromdialog = DialogToSourceQualChoice;
+ dlg->testdialog = TestSourceQualChoiceDialog;
+ dlg->change_notify = change_notify;
+ dlg->change_userdata = change_userdata;
+
+ if (!text_only) {
+ dlg->choice_type = HiddenGroup (p, 0, 3, ChangeSourceQualChoice);
+ SetObjectExtra (dlg->choice_type, dlg, NULL);
+ b1 = RadioButton (dlg->choice_type, "Text Qualifier");
+ b2 = RadioButton (dlg->choice_type, "Location");
+ b3 = RadioButton (dlg->choice_type, "Origin");
+ }
+ g = HiddenGroup (p, 0, 0, NULL);
+ qual_list = GetSourceQualList ();
+ dlg->dlg = ValNodeSelectionDialog (g, qual_list, SHORT_SELECTION_LIST,
+ ValNodeStringName,
+ ValNodeSimpleDataFree,
+ ValNodeStringCopy,
+ ValNodeStringMatch,
+ "source qual",
+ change_notify, change_userdata, FALSE);
+ if (!text_only) {
+ loc_list = GetLocationList (for_remove);
+ dlg->loc_dlg = ValNodeSelectionDialog (g, loc_list, SHORT_SELECTION_LIST, ValNodeStringName,
+ ValNodeSimpleDataFree, ValNodeStringCopy,
+ ValNodeChoiceMatch, "location",
+ change_notify, change_userdata, FALSE);
+ if (for_remove) {
+ vn.choice = Source_location_unknown;
+ vn.data.ptrvalue = NULL;
+ vn.next = NULL;
+ PointerToDialog (dlg->loc_dlg, &vn);
+ }
+ orig_list = GetOriginList (for_remove);
+ dlg->orig_dlg = ValNodeSelectionDialog (g, orig_list, SHORT_SELECTION_LIST, ValNodeStringName,
+ ValNodeSimpleDataFree, ValNodeStringCopy,
+ ValNodeChoiceMatch, "origin",
+ change_notify, change_userdata, FALSE);
+ if (for_remove) {
+ vn.choice = Source_origin_unknown;
+ vn.data.ptrvalue = NULL;
+ vn.next = NULL;
+ PointerToDialog (dlg->orig_dlg, &vn);
+ }
+ }
+ AlignObjects (ALIGN_CENTER, (HANDLE) dlg->dlg, (HANDLE) dlg->loc_dlg, (HANDLE) dlg->orig_dlg, NULL);
+
+ ChangeSourceQualChoice (dlg->choice_type);
+
+ return (DialoG) p;
+}
+
+
+typedef struct sourceconstraintdialog
+{
+ DIALOG_MESSAGE_BLOCK
+ GrouP constraint_type;
+
+ DialoG qual_present;
+ GrouP sc_group;
+ DialoG qual_string;
+ DialoG string_constraint;
+ GrouP match_group;
+ DialoG qualmatch1;
+ DialoG qualmatch2;
+
+ Nlm_ChangeNotifyProc change_notify;
+ Pointer change_userdata;
+} SourceConstraintDialogData, PNTR SourceConstraintDialogPtr;
+
+
+static void ChangeSourceConstraintType (GrouP p)
+{
+ SourceConstraintDialogPtr dlg;
+ Int4 constraint_type;
+
+ dlg = (SourceConstraintDialogPtr) GetObjectExtra (p);
+ if (dlg == NULL)
+ {
+ return;
+ }
+ Hide (dlg->qual_present);
+ Hide (dlg->sc_group);
+ Hide (dlg->match_group);
+ constraint_type = GetValue (dlg->constraint_type);
+ switch (constraint_type) {
+ case 1:
+ Show (dlg->qual_present);
+ break;
+ case 2:
+ Show (dlg->sc_group);
+ break;
+ case 3:
+ Show (dlg->match_group);
+ break;
+ }
+ if (dlg->change_notify != NULL) {
+ (dlg->change_notify)(dlg->change_userdata);
+ }
+}
+
+
+static void SourceConstraintToDialog (DialoG d, Pointer data)
+{
+ SourceConstraintDialogPtr dlg;
+ SourceConstraintPtr s;
+
+ dlg = (SourceConstraintDialogPtr) GetObjectExtra (d);
+ if (dlg == NULL) return;
+
+ s = (SourceConstraintPtr) data;
+ SetValue (dlg->constraint_type, 1);
+ PointerToDialog (dlg->qual_present, NULL);
+ PointerToDialog (dlg->qual_string, NULL);
+ PointerToDialog (dlg->string_constraint, NULL);
+ PointerToDialog (dlg->qualmatch1, NULL);
+ PointerToDialog (dlg->qualmatch2, NULL);
+ if (s != NULL) {
+ if (s->field1 != NULL && s->field2 != NULL) {
+ SetValue (dlg->constraint_type, 3);
+ PointerToDialog (dlg->qualmatch1, s->field1);
+ PointerToDialog (dlg->qualmatch2, s->field2);
+ } else if ((s->field1 != NULL || s->field2 != NULL) && s->constraint != NULL) {
+ SetValue (dlg->constraint_type, 2);
+ if (s->field1 != NULL) {
+ PointerToDialog (dlg->qual_string, s->field1);
+ } else if (s->field2 != NULL) {
+ PointerToDialog (dlg->qual_string, s->field2);
+ }
+ PointerToDialog (dlg->string_constraint, s->constraint);
+ } else if (s->field1 != NULL || s->field2 != NULL) {
+ SetValue (dlg->constraint_type, 1);
+ if (s->field1 != NULL) {
+ PointerToDialog (dlg->qual_present, s->field1);
+ } else if (s->field2 != NULL) {
+ PointerToDialog (dlg->qual_present, s->field2);
+ }
+ }
+ }
+ ChangeSourceConstraintType (dlg->constraint_type);
+}
+
+
+static Pointer DialogToSourceConstraint (DialoG d)
+{
+ SourceConstraintDialogPtr dlg;
+ SourceConstraintPtr s = NULL;
+ Int2 constraint_type;
+
+ dlg = (SourceConstraintDialogPtr) GetObjectExtra (d);
+ if (dlg == NULL) return NULL;
+
+ constraint_type = GetValue (dlg->constraint_type);
+ switch (constraint_type) {
+ case 1:
+ s = SourceConstraintNew();
+ s->field1 = DialogToPointer (dlg->qual_present);
+ break;
+ case 2:
+ s = SourceConstraintNew();
+ s->field1 = DialogToPointer (dlg->qual_string);
+ s->constraint = DialogToPointer (dlg->string_constraint);
+ break;
+ case 3:
+ s = SourceConstraintNew();
+ s->field1 = DialogToPointer (dlg->qualmatch1);
+ s->field2 = DialogToPointer (dlg->qualmatch2);
+ break;
+ }
+ return s;
+}
+
+
+static ValNodePtr TestSourceConstraintDialog (DialoG d)
+{
+ SourceConstraintPtr constraint;
+ ValNodePtr err_list = NULL;
+
+ constraint = DialogToPointer (d);
+ if (IsSourceConstraintEmpty (constraint)) {
+ ValNodeAddPointer (&err_list, 0, "empty source constraint");
+ }
+ constraint = SourceConstraintFree (constraint);
+ return err_list;
+}
+
+
+static DialoG SourceConstraintDialog (GrouP h, Nlm_ChangeNotifyProc change_notify, Pointer change_userdata)
+
+{
+ SourceConstraintDialogPtr dlg;
+ GrouP p, g;
+ ButtoN b = NULL;
+ ButtoN b1, b2, b3;
+
+ dlg = (SourceConstraintDialogPtr) MemNew (sizeof (SourceConstraintDialogData));
+ if (dlg == NULL)
+ {
+ return NULL;
+ }
+
+ p = HiddenGroup (h, -1, 0, NULL);
+ SetObjectExtra (p, dlg, StdCleanupExtraProc);
+
+ dlg->dialog = (DialoG) p;
+ dlg->todialog = SourceConstraintToDialog;
+ dlg->fromdialog = DialogToSourceConstraint;
+ dlg->testdialog = TestSourceConstraintDialog;
+ dlg->change_notify = change_notify;
+ dlg->change_userdata = change_userdata;
+
+ dlg->constraint_type = HiddenGroup (p, 3, 0, ChangeSourceConstraintType);
+ SetObjectExtra (dlg->constraint_type, dlg, NULL);
+ b1 = RadioButton (dlg->constraint_type, "When qualifier present");
+ b2 = RadioButton (dlg->constraint_type, "String constraint");
+ b3 = RadioButton (dlg->constraint_type, "When qualifiers match");
+
+ g = HiddenGroup (p, 0, 0, NULL);
+
+ dlg->qual_present = SourceQualChoiceDialog (g, TRUE, FALSE, change_notify, change_userdata);
+
+ dlg->sc_group = HiddenGroup (g, 2, 0, NULL);
+ dlg->qual_string = SourceQualChoiceDialog (dlg->sc_group, TRUE, FALSE, change_notify, change_userdata);
+ dlg->string_constraint = StringConstraintDialog (dlg->sc_group, NULL, FALSE, change_notify, change_userdata);
+
+ dlg->match_group = HiddenGroup (g, 3, 0, NULL);
+ dlg->qualmatch1 = SourceQualChoiceDialog (dlg->match_group, TRUE, FALSE, change_notify, change_userdata);
+ StaticPrompt (dlg->match_group, "Equals", 0, dialogTextHeight, systemFont, 'l');
+ dlg->qualmatch2 = SourceQualChoiceDialog (dlg->match_group, TRUE, FALSE, change_notify, change_userdata);
+
+ AlignObjects (ALIGN_CENTER, (HANDLE) dlg->qual_present, (HANDLE) dlg->sc_group, (HANDLE) dlg->match_group, NULL);
+
+ AlignObjects (ALIGN_CENTER, (HANDLE) dlg->constraint_type, (HANDLE) g, NULL);
+
+ SetValue (dlg->constraint_type, 1);
+ ChangeSourceConstraintType (dlg->constraint_type);
+ return (DialoG) p;
+}
+
+
+static DialoG CDSGeneProtFieldDialog (GrouP h, Nlm_ChangeNotifyProc change_notify, Pointer change_userdata);
+
+
+typedef struct cdsgeneprotpseudoconstraintdlg {
+ DIALOG_MESSAGE_BLOCK
+ DialoG feat;
+ GrouP pseudo;
+} CDSGeneProtPseudoConstraintDlgData, PNTR CDSGeneProtPseudoConstraintDlgPtr;
+
+
+static void CDSGeneProtPseudoConstraintToDialog (DialoG d, Pointer data)
+{
+ CDSGeneProtPseudoConstraintDlgPtr dlg;
+ CDSGeneProtPseudoConstraintPtr pseudo;
+ ValNode vn;
+
+ dlg = (CDSGeneProtPseudoConstraintDlgPtr) GetObjectExtra (d);
+ if (dlg == NULL) {
+ return;
+ }
+
+ pseudo = (CDSGeneProtPseudoConstraintPtr) data;
+
+ if (pseudo == NULL) {
+ PointerToDialog (dlg->feat, NULL);
+ SetValue (dlg->pseudo, 1);
+ } else {
+ vn.choice = pseudo->feature;
+ vn.data.ptrvalue = NULL;
+ vn.next = NULL;
+ PointerToDialog (dlg->feat, &vn);
+ if (pseudo->is_pseudo) {
+ SetValue (dlg->pseudo, 1);
+ } else {
+ SetValue (dlg->pseudo, 2);
+ }
+ }
+}
+
+
+static Pointer DialogToCDSGeneProtPseudoConstraint (DialoG d)
+{
+ CDSGeneProtPseudoConstraintDlgPtr dlg;
+ CDSGeneProtPseudoConstraintPtr constraint;
+ Uint2 feat_type;
+ ValNodePtr vnp;
+ Int2 val;
+
+ dlg = (CDSGeneProtPseudoConstraintDlgPtr) GetObjectExtra (d);
+ if (dlg == NULL) {
+ return NULL;
+ }
+
+ val = GetValue (dlg->pseudo);
+ if (val < 1 || val > 2) {
+ return NULL;
+ }
+ vnp = (ValNodePtr) DialogToPointer (dlg->feat);
+ if (vnp == NULL) return NULL;
+ feat_type = vnp->choice;
+ vnp = ValNodeFree (vnp);
+
+ constraint = CDSGeneProtPseudoConstraintNew ();
+ constraint->feature = feat_type;
+ constraint->is_pseudo = val == 1 ? TRUE : FALSE;
+
+ return (Pointer) constraint;
+}
+
+
+static ValNodePtr TestCDSGeneProtPseudoConstraintDialog (DialoG d)
+{
+ CDSGeneProtPseudoConstraintDlgPtr dlg;
+ ValNodePtr err_list = NULL;
+ Int4 val;
+
+ dlg = (CDSGeneProtPseudoConstraintDlgPtr) GetObjectExtra (d);
+ if (dlg != NULL) {
+ val = GetValue (dlg->pseudo);
+ if (val < 1 || val > 2) {
+ ValNodeAddPointer (&err_list, 0, "pseudo");
+ }
+ ValNodeLink (&err_list, TestDialog (dlg->feat));
+ }
+ return err_list;
+}
+
+static DialoG CDSGeneProtPseudoConstraintDialog (GrouP h, Nlm_ChangeNotifyProc change_notify, Pointer change_userdata)
+{
+ CDSGeneProtPseudoConstraintDlgPtr dlg;
+ ValNodePtr feat_list = NULL;
+ GrouP p;
+
+ p = HiddenGroup (h, -1, 0, NULL);
+ dlg = (CDSGeneProtPseudoConstraintDlgPtr) MemNew (sizeof (CDSGeneProtPseudoConstraintDlgData));
+ SetObjectExtra (p, dlg, StdCleanupExtraProc);
+ dlg->dialog = (DialoG) p;
+ dlg->todialog = CDSGeneProtPseudoConstraintToDialog;
+ dlg->fromdialog = DialogToCDSGeneProtPseudoConstraint;
+ dlg->testdialog = TestCDSGeneProtPseudoConstraintDialog;
+
+ AddAllCDSGeneProtFeaturesToChoiceList (&feat_list);
+ dlg->feat = ValNodeSelectionDialog (p, feat_list, TALL_SELECTION_LIST, ValNodeStringName,
+ ValNodeSimpleDataFree, ValNodeStringCopy,
+ ValNodeChoiceMatch, "feature type",
+ change_notify, change_userdata, FALSE);
+
+ dlg->pseudo = HiddenGroup (p, 2, 0, NULL);
+ RadioButton (dlg->pseudo, "Is pseudo");
+ RadioButton (dlg->pseudo, "Is not pseudo");
+ SetValue (dlg->pseudo, 1);
+ return (DialoG) p;
+}
+
+
+typedef struct cdsgeneprotqualconstraintdialog
+{
+ DIALOG_MESSAGE_BLOCK
+ GrouP constraint_type;
+
+ DialoG qual_present;
+ GrouP sc_group;
+ DialoG qual_string;
+ DialoG string_constraint;
+ GrouP match_group;
+ DialoG qualmatch1;
+ DialoG qualmatch2;
+
+ Nlm_ChangeNotifyProc change_notify;
+ Pointer change_userdata;
+} CDSGeneProtQualConstraintDialogData, PNTR CDSGeneProtQualConstraintDialogPtr;
+
+
+static void ChangeCDSGeneProtQualConstraintType (GrouP p)
+{
+ CDSGeneProtQualConstraintDialogPtr dlg;
+ Int4 constraint_type;
+
+ dlg = (CDSGeneProtQualConstraintDialogPtr) GetObjectExtra (p);
+ if (dlg == NULL)
+ {
+ return;
+ }
+ Hide (dlg->qual_present);
+ Hide (dlg->sc_group);
+ Hide (dlg->match_group);
+ constraint_type = GetValue (dlg->constraint_type);
+ switch (constraint_type) {
+ case 1:
+ Show (dlg->qual_present);
+ break;
+ case 2:
+ Show (dlg->sc_group);
+ break;
+ case 3:
+ Show (dlg->match_group);
+ break;
+ }
+ if (dlg->change_notify != NULL) {
+ (dlg->change_notify) (dlg->change_userdata);
+ }
+}
+
+
+static void CDSGeneProtQualConstraintToDialog (DialoG d, Pointer data)
+{
+ CDSGeneProtQualConstraintDialogPtr dlg;
+ CDSGeneProtQualConstraintPtr s;
+
+ dlg = (CDSGeneProtQualConstraintDialogPtr) GetObjectExtra (d);
+ if (dlg == NULL) return;
+
+ s = (CDSGeneProtQualConstraintPtr) data;
+ SetValue (dlg->constraint_type, 1);
+ PointerToDialog (dlg->qual_present, NULL);
+ PointerToDialog (dlg->qual_string, NULL);
+ PointerToDialog (dlg->string_constraint, NULL);
+ PointerToDialog (dlg->qualmatch1, NULL);
+ PointerToDialog (dlg->qualmatch2, NULL);
+ if (s != NULL) {
+ if (s->field1 != NULL && s->field2 != NULL) {
+ SetValue (dlg->constraint_type, 3);
+ PointerToDialog (dlg->qualmatch1, s->field1);
+ PointerToDialog (dlg->qualmatch2, s->field2);
+ } else if ((s->field1 != NULL || s->field2 != NULL) && s->constraint != NULL) {
+ SetValue (dlg->constraint_type, 2);
+ if (s->field1 != NULL) {
+ PointerToDialog (dlg->qual_string, s->field1);
+ } else if (s->field2 != NULL) {
+ PointerToDialog (dlg->qual_string, s->field2);
+ }
+ PointerToDialog (dlg->string_constraint, s->constraint);
+ } else if (s->field1 != NULL || s->field2 != NULL) {
+ SetValue (dlg->constraint_type, 1);
+ if (s->field1 != NULL) {
+ PointerToDialog (dlg->qual_present, s->field1);
+ } else if (s->field2 != NULL) {
+ PointerToDialog (dlg->qual_present, s->field2);
+ }
+ }
+ }
+ ChangeCDSGeneProtQualConstraintType (dlg->constraint_type);
+}
+
+
+static Pointer DialogToCDSGeneProtQualConstraint (DialoG d)
+{
+ CDSGeneProtQualConstraintDialogPtr dlg;
+ CDSGeneProtQualConstraintPtr s = NULL;
+ Int2 constraint_type;
+
+ dlg = (CDSGeneProtQualConstraintDialogPtr) GetObjectExtra (d);
+ if (dlg == NULL) return NULL;
+
+ constraint_type = GetValue (dlg->constraint_type);
+ switch (constraint_type) {
+ case 1:
+ s = CDSGeneProtQualConstraintNew();
+ s->field1 = DialogToPointer (dlg->qual_present);
+ break;
+ case 2:
+ s = CDSGeneProtQualConstraintNew();
+ s->field1 = DialogToPointer (dlg->qual_string);
+ s->constraint = DialogToPointer (dlg->string_constraint);
+ break;
+ case 3:
+ s = CDSGeneProtQualConstraintNew();
+ s->field1 = DialogToPointer (dlg->qualmatch1);
+ s->field2 = DialogToPointer (dlg->qualmatch2);
+ break;
+ }
+ return s;
+}
+
+
+static ValNodePtr TestCDSGeneProtQualConstraintDialog (DialoG d)
+{
+ CDSGeneProtQualConstraintPtr constraint;
+ ValNodePtr err_list = NULL;
+
+ constraint = DialogToPointer (d);
+ if (IsCDSGeneProtQualConstraintEmpty (constraint)) {
+ ValNodeAddPointer (&err_list, 0, "empty CDS-gene-prot qual constraint");
+ }
+ constraint = CDSGeneProtQualConstraintFree (constraint);
+ return err_list;
+}
+
+
+static DialoG CDSGeneProtQualConstraintDialog (GrouP h, Nlm_ChangeNotifyProc change_notify, Pointer change_userdata)
+
+{
+ CDSGeneProtQualConstraintDialogPtr dlg;
+ GrouP p, g;
+ ButtoN b = NULL;
+ ButtoN b1, b2, b3;
+
+ dlg = (CDSGeneProtQualConstraintDialogPtr) MemNew (sizeof (CDSGeneProtQualConstraintDialogData));
+ if (dlg == NULL)
+ {
+ return NULL;
+ }
+
+ p = HiddenGroup (h, -1, 0, NULL);
+ SetObjectExtra (p, dlg, StdCleanupExtraProc);
+
+ dlg->dialog = (DialoG) p;
+ dlg->todialog = CDSGeneProtQualConstraintToDialog;
+ dlg->fromdialog = DialogToCDSGeneProtQualConstraint;
+ dlg->testdialog = TestCDSGeneProtQualConstraintDialog;
+
+ dlg->change_notify = change_notify;
+ dlg->change_userdata = change_userdata;
+
+ dlg->constraint_type = HiddenGroup (p, 3, 0, ChangeCDSGeneProtQualConstraintType);
+ SetObjectExtra (dlg->constraint_type, dlg, NULL);
+ b1 = RadioButton (dlg->constraint_type, "When qualifier present");
+ b2 = RadioButton (dlg->constraint_type, "String constraint");
+ b3 = RadioButton (dlg->constraint_type, "When qualifiers match");
+
+ g = HiddenGroup (p, 0, 0, NULL);
+
+ dlg->qual_present = CDSGeneProtFieldDialog (g, change_notify, change_userdata);
+
+ dlg->sc_group = HiddenGroup (g, 2, 0, NULL);
+ dlg->qual_string = CDSGeneProtFieldDialog (dlg->sc_group, change_notify, change_userdata);
+ dlg->string_constraint = StringConstraintDialog (dlg->sc_group, NULL, FALSE, change_notify, change_userdata);
+
+ dlg->match_group = HiddenGroup (g, 3, 0, NULL);
+ dlg->qualmatch1 = CDSGeneProtFieldDialog (dlg->match_group, change_notify, change_userdata);
+ StaticPrompt (dlg->match_group, "Equals", 0, dialogTextHeight, systemFont, 'l');
+ dlg->qualmatch2 = CDSGeneProtFieldDialog (dlg->match_group, change_notify, change_userdata);
+
+ AlignObjects (ALIGN_CENTER, (HANDLE) dlg->qual_present, (HANDLE) dlg->sc_group, (HANDLE) dlg->match_group, NULL);
+
+ AlignObjects (ALIGN_CENTER, (HANDLE) dlg->constraint_type, (HANDLE) g, NULL);
+ SetValue (dlg->constraint_type, 1);
+ ChangeCDSGeneProtQualConstraintType (dlg->constraint_type);
+ return (DialoG) p;
+}
+
+
+typedef struct sequencequaldlg {
+ DIALOG_MESSAGE_BLOCK
+ PopuP field_type;
+ DialoG molecule_dlg;
+ DialoG technique_dlg;
+ DialoG completedness_dlg;
+ DialoG mol_class_dlg;
+ DialoG topology_dlg;
+ DialoG strand_dlg;
+
+ Nlm_ChangeNotifyProc change_notify;
+ Pointer change_userdata;
+} SequenceQualDlgData, PNTR SequenceQualDlgPtr;
+
+
+static void ChangeSequenceQualType (PopuP p)
+{
+ SequenceQualDlgPtr dlg;
+ Int2 val;
+
+ dlg = (SequenceQualDlgPtr) GetObjectExtra (p);
+ if (dlg == NULL) return;
+
+ Hide (dlg->molecule_dlg);
+ Hide (dlg->technique_dlg);
+ Hide (dlg->completedness_dlg);
+ Hide (dlg->mol_class_dlg);
+ Hide (dlg->topology_dlg);
+ Hide (dlg->strand_dlg);
+
+ val = GetValue (dlg->field_type);
+ switch (val) {
+ case 1:
+ Show (dlg->molecule_dlg);
+ break;
+ case 2:
+ Show (dlg->technique_dlg);
+ break;
+ case 3:
+ Show (dlg->completedness_dlg);
+ break;
+ case 4:
+ Show (dlg->mol_class_dlg);
+ break;
+ case 5:
+ Show (dlg->topology_dlg);
+ break;
+ case 6:
+ Show (dlg->strand_dlg);
+ break;
+ }
+ if (dlg->change_notify != NULL) {
+ (dlg->change_notify) (dlg->change_userdata);
+ }
+}
+
+
+static void SequenceQualToDialog (DialoG d, Pointer data)
+{
+ SequenceQualDlgPtr dlg;
+ ValNodePtr field;
+ ValNode vn;
+
+ dlg = (SequenceQualDlgPtr) GetObjectExtra (d);
+ if (dlg == NULL) return;
+
+ field = (ValNodePtr) data;
+
+ if (field == NULL) {
+ SetValue (dlg->field_type, 1);
+ PointerToDialog (dlg->molecule_dlg, NULL);
+ } else {
+ vn.next = NULL;
+ vn.data.ptrvalue = NULL;
+
+ switch (field->choice) {
+ case MolinfoField_molecule:
+ SetValue (dlg->field_type, 1);
+ vn.choice = field->data.intvalue;
+ PointerToDialog (dlg->molecule_dlg, &vn);
+ break;
+ case MolinfoField_technique:
+ SetValue (dlg->field_type, 2);
+ vn.choice = field->data.intvalue;
+ PointerToDialog (dlg->technique_dlg, &vn);
+ break;
+ case MolinfoField_completedness:
+ SetValue (dlg->field_type, 3);
+ vn.choice = field->data.intvalue;
+ PointerToDialog (dlg->completedness_dlg, &vn);
+ break;
+ case MolinfoField_mol_class:
+ SetValue (dlg->field_type, 4);
+ vn.choice = field->data.intvalue;
+ PointerToDialog (dlg->mol_class_dlg, &vn);
+ break;
+ case MolinfoField_topology:
+ SetValue (dlg->field_type, 5);
+ vn.choice = field->data.intvalue;
+ PointerToDialog (dlg->topology_dlg, &vn);
+ break;
+ case MolinfoField_strand:
+ SetValue (dlg->field_type, 6);
+ vn.choice = field->data.intvalue;
+ PointerToDialog (dlg->strand_dlg, &vn);
+ break;
+ default:
+ SetValue (dlg->field_type, 1);
+ PointerToDialog (dlg->molecule_dlg, NULL);
+ break;
+ }
+ }
+ ChangeSequenceQualType (dlg->field_type);
+}
+
+
+static Pointer DialogToSequenceQual (DialoG d)
+{
+ SequenceQualDlgPtr dlg;
+ ValNodePtr field = NULL, vnp;
+ Int2 val;
+
+ dlg = (SequenceQualDlgPtr) GetObjectExtra (d);
+ if (dlg == NULL) return NULL;
+
+ val = GetValue (dlg->field_type);
+ switch (val) {
+ case 1:
+ vnp = DialogToPointer (dlg->molecule_dlg);
+ if (vnp != NULL) {
+ field = ValNodeNew (NULL);
+ field->choice = MolinfoField_molecule;
+ field->data.intvalue = vnp->choice;
+ vnp = ValNodeFree (vnp);
+ }
+ break;
+ case 2:
+ vnp = DialogToPointer (dlg->technique_dlg);
+ if (vnp != NULL) {
+ field = ValNodeNew (NULL);
+ field->choice = MolinfoField_technique;
+ field->data.intvalue = vnp->choice;
+ vnp = ValNodeFree (vnp);
+ }
+ break;
+ case 3:
+ vnp = DialogToPointer (dlg->completedness_dlg);
+ if (vnp != NULL) {
+ field = ValNodeNew (NULL);
+ field->choice = MolinfoField_completedness;
+ field->data.intvalue = vnp->choice;
+ vnp = ValNodeFree (vnp);
+ }
+ break;
+ case 4:
+ vnp = DialogToPointer (dlg->mol_class_dlg);
+ if (vnp != NULL) {
+ field = ValNodeNew (NULL);
+ field->choice = MolinfoField_mol_class;
+ field->data.intvalue = vnp->choice;
+ vnp = ValNodeFree (vnp);
+ }
+ break;
+ case 5:
+ vnp = DialogToPointer (dlg->topology_dlg);
+ if (vnp != NULL) {
+ field = ValNodeNew (NULL);
+ field->choice = MolinfoField_topology;
+ field->data.intvalue = vnp->choice;
+ vnp = ValNodeFree (vnp);
+ }
+ break;
+ case 6:
+ vnp = DialogToPointer (dlg->strand_dlg);
+ if (vnp != NULL) {
+ field = ValNodeNew (NULL);
+ field->choice = MolinfoField_strand;
+ field->data.intvalue = vnp->choice;
+ vnp = ValNodeFree (vnp);
+ }
+ break;
+ }
+
+ return field;
+
+}
+
+
+static ValNodePtr TestSequenceQualDialog (DialoG d)
+{
+ SequenceQualDlgPtr dlg;
+ Int2 val;
+ ValNodePtr err_list = NULL;
+
+ dlg = (SequenceQualDlgPtr) GetObjectExtra (d);
+ if (dlg == NULL) return NULL;
+
+ val = GetValue (dlg->field_type);
+ if (val < 1 || val > 6) {
+ }
+ switch (val) {
+ case 1:
+ err_list = TestDialog (dlg->molecule_dlg);
+ break;
+ case 2:
+ err_list = TestDialog (dlg->technique_dlg);
+ break;
+ case 3:
+ err_list = TestDialog (dlg->completedness_dlg);
+ break;
+ case 4:
+ err_list = TestDialog (dlg->mol_class_dlg);
+ break;
+ case 5:
+ err_list = TestDialog (dlg->topology_dlg);
+ break;
+ case 6:
+ err_list = TestDialog (dlg->strand_dlg);
+ break;
+ default:
+ ValNodeAddPointer (&err_list, 0, StringSave ("field type"));
+ break;
+ }
+
+ return err_list;
+}
+
+
+static DialoG SequenceQualDialog (GrouP h, Nlm_ChangeNotifyProc change_notify, Pointer change_userdata)
+
+{
+ SequenceQualDlgPtr dlg;
+ GrouP p, g;
+ ValNodePtr val_list;
+
+ dlg = (SequenceQualDlgPtr) MemNew (sizeof (SequenceQualDlgData));
+ if (dlg == NULL)
+ {
+ return NULL;
+ }
+
+ p = HiddenGroup (h, -1, 0, NULL);
+ SetObjectExtra (p, dlg, StdCleanupExtraProc);
+
+ dlg->dialog = (DialoG) p;
+ dlg->todialog = SequenceQualToDialog;
+ dlg->fromdialog = DialogToSequenceQual;
+ dlg->testdialog = TestSequenceQualDialog;
+
+ dlg->change_notify = change_notify;
+ dlg->change_userdata = change_userdata;
+
+ dlg->field_type = PopupList (p, TRUE, ChangeSequenceQualType);
+ SetObjectExtra (dlg->field_type, dlg, NULL);
+ PopupItem (dlg->field_type, "molecule");
+ PopupItem (dlg->field_type, "technique");
+ PopupItem (dlg->field_type, "completedness");
+ PopupItem (dlg->field_type, "class");
+ PopupItem (dlg->field_type, "topology");
+ PopupItem (dlg->field_type, "strand");
+ SetValue (dlg->field_type, 1);
+
+ g = HiddenGroup (p, 0, 0, NULL);
+
+ val_list = GetMoleculeTypeList ();
+ dlg->molecule_dlg = ValNodeSelectionDialog (g, val_list, SHORT_SELECTION_LIST, ValNodeStringName,
+ ValNodeSimpleDataFree, ValNodeStringCopy,
+ ValNodeChoiceMatch, "location",
+ change_notify, change_userdata, FALSE);
+ val_list = GetTechniqueTypeList ();
+ dlg->technique_dlg = ValNodeSelectionDialog (g, val_list, SHORT_SELECTION_LIST, ValNodeStringName,
+ ValNodeSimpleDataFree, ValNodeStringCopy,
+ ValNodeChoiceMatch, "location",
+ change_notify, change_userdata, FALSE);
+ val_list = GetCompletednessTypeList ();
+ dlg->completedness_dlg = ValNodeSelectionDialog (g, val_list, SHORT_SELECTION_LIST, ValNodeStringName,
+ ValNodeSimpleDataFree, ValNodeStringCopy,
+ ValNodeChoiceMatch, "location",
+ change_notify, change_userdata, FALSE);
+ val_list = GetMoleculeClassTypeList ();
+ dlg->mol_class_dlg = ValNodeSelectionDialog (g, val_list, SHORT_SELECTION_LIST, ValNodeStringName,
+ ValNodeSimpleDataFree, ValNodeStringCopy,
+ ValNodeChoiceMatch, "location",
+ change_notify, change_userdata, FALSE);
+ val_list = GetTopologyTypeList ();
+ dlg->topology_dlg = ValNodeSelectionDialog (g, val_list, SHORT_SELECTION_LIST, ValNodeStringName,
+ ValNodeSimpleDataFree, ValNodeStringCopy,
+ ValNodeChoiceMatch, "location",
+ change_notify, change_userdata, FALSE);
+ val_list = GetStrandTypeList ();
+ dlg->strand_dlg = ValNodeSelectionDialog (g, val_list, SHORT_SELECTION_LIST, ValNodeStringName,
+ ValNodeSimpleDataFree, ValNodeStringCopy,
+ ValNodeChoiceMatch, "location",
+ change_notify, change_userdata, FALSE);
+
+ AlignObjects (ALIGN_MIDDLE, (HANDLE) dlg->molecule_dlg,
+ (HANDLE) dlg->technique_dlg,
+ (HANDLE) dlg->completedness_dlg,
+ (HANDLE) dlg->mol_class_dlg,
+ (HANDLE) dlg->topology_dlg,
+ (HANDLE) dlg->strand_dlg,
+ NULL);
+
+ AlignObjects (ALIGN_CENTER, (HANDLE) dlg->field_type, (HANDLE) g, NULL);
+ ChangeSequenceQualType (dlg->field_type);
+ return (DialoG) p;
+}
+
+
+typedef struct sequencequalpairdlg {
+ DIALOG_MESSAGE_BLOCK
+ PopuP field_type;
+ GrouP molecule_grp;
+ DialoG molecule_from_dlg;
+ DialoG molecule_to_dlg;
+ GrouP technique_grp;
+ DialoG technique_from_dlg;
+ DialoG technique_to_dlg;
+ GrouP completedness_grp;
+ DialoG completedness_from_dlg;
+ DialoG completedness_to_dlg;
+ GrouP mol_class_grp;
+ DialoG mol_class_from_dlg;
+ DialoG mol_class_to_dlg;
+ GrouP topology_grp;
+ DialoG topology_from_dlg;
+ DialoG topology_to_dlg;
+ GrouP strand_grp;
+ DialoG strand_from_dlg;
+ DialoG strand_to_dlg;
+
+ Nlm_ChangeNotifyProc change_notify;
+ Pointer change_userdata;
+} SequenceQualPairDlgData, PNTR SequenceQualPairDlgPtr;
+
+
+static void ChangeSequenceQualPairType (PopuP p)
+{
+ SequenceQualPairDlgPtr dlg;
+ Int2 val;
+
+ dlg = (SequenceQualPairDlgPtr) GetObjectExtra (p);
+ if (dlg == NULL) return;
+
+ Hide (dlg->molecule_grp);
+ Hide (dlg->technique_grp);
+ Hide (dlg->completedness_grp);
+ Hide (dlg->mol_class_grp);
+ Hide (dlg->topology_grp);
+ Hide (dlg->strand_grp);
+
+ val = GetValue (dlg->field_type);
+ switch (val) {
+ case 1:
+ Show (dlg->molecule_grp);
+ break;
+ case 2:
+ Show (dlg->technique_grp);
+ break;
+ case 3:
+ Show (dlg->completedness_grp);
+ break;
+ case 4:
+ Show (dlg->mol_class_grp);
+ break;
+ case 5:
+ Show (dlg->topology_grp);
+ break;
+ case 6:
+ Show (dlg->strand_grp);
+ break;
+ }
+ if (dlg->change_notify != NULL) {
+ (dlg->change_notify) (dlg->change_userdata);
+ }
+}
+
+
+static void SequenceQualPairToDialog (DialoG d, Pointer data)
+{
+ SequenceQualPairDlgPtr dlg;
+ ValNodePtr m_fields;
+ ValNode vn;
+
+ dlg = (SequenceQualPairDlgPtr) GetObjectExtra (d);
+ if (dlg == NULL) return;
+
+ m_fields = (ValNodePtr) data;
+ if (m_fields == NULL) {
+ SetValue (dlg->field_type, 1);
+ PointerToDialog (dlg->molecule_from_dlg, NULL);
+ PointerToDialog (dlg->molecule_to_dlg, NULL);
+ } else {
+ vn.data.ptrvalue = NULL;
+ vn.next = NULL;
+ switch (m_fields->choice) {
+ case MolinfoFieldPair_molecule:
+ SetValue (dlg->field_type, 1);
+ if (m_fields->data.ptrvalue == NULL) {
+ PointerToDialog (dlg->molecule_from_dlg, NULL);
+ PointerToDialog (dlg->molecule_to_dlg, NULL);
+ } else {
+ vn.choice = ((MolinfoMoleculePairPtr) m_fields->data.ptrvalue)->from;
+ PointerToDialog (dlg->molecule_from_dlg, &vn);
+ vn.choice = ((MolinfoMoleculePairPtr) m_fields->data.ptrvalue)->to;
+ PointerToDialog (dlg->molecule_to_dlg, &vn);
+ }
+ break;
+ case MolinfoFieldPair_technique:
+ SetValue (dlg->field_type, 2);
+ if (m_fields->data.ptrvalue == NULL) {
+ PointerToDialog (dlg->technique_from_dlg, NULL);
+ PointerToDialog (dlg->technique_to_dlg, NULL);
+ } else {
+ vn.choice = ((MolinfoTechniquePairPtr) m_fields->data.ptrvalue)->from;
+ PointerToDialog (dlg->technique_from_dlg, &vn);
+ vn.choice = ((MolinfoTechniquePairPtr) m_fields->data.ptrvalue)->to;
+ PointerToDialog (dlg->technique_to_dlg, &vn);
+ }
+ break;
+ case MolinfoFieldPair_completedness:
+ SetValue (dlg->field_type, 3);
+ if (m_fields->data.ptrvalue == NULL) {
+ PointerToDialog (dlg->completedness_from_dlg, NULL);
+ PointerToDialog (dlg->completedness_to_dlg, NULL);
+ } else {
+ vn.choice = ((MolinfoCompletednessPairPtr) m_fields->data.ptrvalue)->from;
+ PointerToDialog (dlg->completedness_from_dlg, &vn);
+ vn.choice = ((MolinfoCompletednessPairPtr) m_fields->data.ptrvalue)->to;
+ PointerToDialog (dlg->completedness_to_dlg, &vn);
+ }
+ break;
+ case MolinfoFieldPair_mol_class:
+ SetValue (dlg->field_type, 4);
+ if (m_fields->data.ptrvalue == NULL) {
+ PointerToDialog (dlg->mol_class_from_dlg, NULL);
+ PointerToDialog (dlg->mol_class_to_dlg, NULL);
+ } else {
+ vn.choice = ((MolinfoMolClassPairPtr) m_fields->data.ptrvalue)->from;
+ PointerToDialog (dlg->mol_class_from_dlg, &vn);
+ vn.choice = ((MolinfoMolClassPairPtr) m_fields->data.ptrvalue)->to;
+ PointerToDialog (dlg->mol_class_to_dlg, &vn);
+ }
+ break;
+ case MolinfoFieldPair_topology:
+ SetValue (dlg->field_type, 5);
+ if (m_fields->data.ptrvalue == NULL) {
+ PointerToDialog (dlg->topology_from_dlg, NULL);
+ PointerToDialog (dlg->topology_to_dlg, NULL);
+ } else {
+ vn.choice = ((MolinfoTopologyPairPtr) m_fields->data.ptrvalue)->from;
+ PointerToDialog (dlg->topology_from_dlg, &vn);
+ vn.choice = ((MolinfoTopologyPairPtr) m_fields->data.ptrvalue)->to;
+ PointerToDialog (dlg->topology_to_dlg, &vn);
+ }
+ break;
+ case MolinfoFieldPair_strand:
+ SetValue (dlg->field_type, 6);
+ if (m_fields->data.ptrvalue == NULL) {
+ PointerToDialog (dlg->strand_from_dlg, NULL);
+ PointerToDialog (dlg->strand_to_dlg, NULL);
+ } else {
+ vn.choice = ((MolinfoStrandPairPtr) m_fields->data.ptrvalue)->from;
+ PointerToDialog (dlg->strand_from_dlg, &vn);
+ vn.choice = ((MolinfoStrandPairPtr) m_fields->data.ptrvalue)->to;
+ PointerToDialog (dlg->strand_to_dlg, &vn);
+ }
+ break;
+ default:
+ SetValue (dlg->field_type, 1);
+ PointerToDialog (dlg->molecule_from_dlg, NULL);
+ PointerToDialog (dlg->molecule_to_dlg, NULL);
+ break;
+ }
+ }
+}
+
+
+static Pointer DialogToSequenceQualPair (DialoG d)
+{
+ SequenceQualPairDlgPtr dlg;
+ Int2 val;
+ ValNodePtr field = NULL, vnp_from, vnp_to;
+ MolinfoMoleculePairPtr mol;
+ MolinfoTechniquePairPtr tech;
+ MolinfoCompletednessPairPtr comp;
+ MolinfoMolClassPairPtr mol_class;
+ MolinfoTopologyPairPtr topology;
+ MolinfoStrandPairPtr strand;
+
+ dlg = (SequenceQualPairDlgPtr) GetObjectExtra (d);
+ if (dlg == NULL) return NULL;
+
+ val = GetValue (dlg->field_type);
+ switch (val) {
+ case 1:
+ vnp_from = DialogToPointer (dlg->molecule_from_dlg);
+ vnp_to = DialogToPointer (dlg->molecule_to_dlg);
+ if (vnp_from != NULL && vnp_to != NULL) {
+ field = ValNodeNew (NULL);
+ field->choice = MolinfoFieldPair_molecule;
+ mol = MolinfoMoleculePairNew ();
+ mol->from = vnp_from->choice;
+ mol->to = vnp_to->choice;
+ field->data.ptrvalue = mol;
+ }
+ vnp_from = ValNodeFree (vnp_from);
+ vnp_to = ValNodeFree (vnp_to);
+ break;
+ case 2:
+ vnp_from = DialogToPointer (dlg->technique_from_dlg);
+ vnp_to = DialogToPointer (dlg->technique_to_dlg);
+ if (vnp_from != NULL && vnp_to != NULL) {
+ field = ValNodeNew (NULL);
+ field->choice = MolinfoFieldPair_technique;
+ tech = MolinfoTechniquePairNew ();
+ tech->from = vnp_from->choice;
+ tech->to = vnp_to->choice;
+ field->data.ptrvalue = tech;
+ }
+ vnp_from = ValNodeFree (vnp_from);
+ vnp_to = ValNodeFree (vnp_to);
+ break;
+ case 3:
+ vnp_from = DialogToPointer (dlg->completedness_from_dlg);
+ vnp_to = DialogToPointer (dlg->completedness_to_dlg);
+ if (vnp_from != NULL && vnp_to != NULL) {
+ field = ValNodeNew (NULL);
+ field->choice = MolinfoFieldPair_completedness;
+ comp = MolinfoCompletednessPairNew ();
+ comp->from = vnp_from->choice;
+ comp->to = vnp_to->choice;
+ field->data.ptrvalue = comp;
+ }
+ vnp_from = ValNodeFree (vnp_from);
+ vnp_to = ValNodeFree (vnp_to);
+ break;
+ case 4:
+ vnp_from = DialogToPointer (dlg->mol_class_from_dlg);
+ vnp_to = DialogToPointer (dlg->mol_class_to_dlg);
+ if (vnp_from != NULL && vnp_to != NULL) {
+ field = ValNodeNew (NULL);
+ field->choice = MolinfoFieldPair_technique;
+ mol_class = MolinfoMolClassPairNew ();
+ mol_class->from = vnp_from->choice;
+ mol_class->to = vnp_to->choice;
+ field->data.ptrvalue = mol_class;
+ }
+ vnp_from = ValNodeFree (vnp_from);
+ vnp_to = ValNodeFree (vnp_to);
+ break;
+ case 5:
+ vnp_from = DialogToPointer (dlg->topology_from_dlg);
+ vnp_to = DialogToPointer (dlg->topology_to_dlg);
+ if (vnp_from != NULL && vnp_to != NULL) {
+ field = ValNodeNew (NULL);
+ field->choice = MolinfoFieldPair_topology;
+ topology = MolinfoTopologyPairNew ();
+ topology->from = vnp_from->choice;
+ topology->to = vnp_to->choice;
+ field->data.ptrvalue = topology;
+ }
+ vnp_from = ValNodeFree (vnp_from);
+ vnp_to = ValNodeFree (vnp_to);
+ break;
+ case 6:
+ vnp_from = DialogToPointer (dlg->strand_from_dlg);
+ vnp_to = DialogToPointer (dlg->strand_to_dlg);
+ if (vnp_from != NULL && vnp_to != NULL) {
+ field = ValNodeNew (NULL);
+ field->choice = MolinfoFieldPair_strand;
+ strand = MolinfoStrandPairNew ();
+ strand->from = vnp_from->choice;
+ strand->to = vnp_to->choice;
+ field->data.ptrvalue = strand;
+ }
+ vnp_from = ValNodeFree (vnp_from);
+ vnp_to = ValNodeFree (vnp_to);
+ break;
+ }
+ return field;
+}
+
+
+static ValNodePtr TestSequenceQualPairDialog (DialoG d)
+{
+ ValNodePtr err_list = NULL, field;
+
+ field = DialogToPointer (d);
+ if (field == NULL) {
+ ValNodeAddPointer (&err_list, 0, "field");
+ } else {
+ field = MolinfoFieldPairFree (field);
+ }
+
+ return err_list;
+}
+
+
+static DialoG SequenceQualPairDialog (GrouP h, Nlm_ChangeNotifyProc change_notify, Pointer change_userdata)
+
+{
+ SequenceQualPairDlgPtr dlg;
+ GrouP p, g;
+ ValNodePtr val_list;
+
+ dlg = (SequenceQualPairDlgPtr) MemNew (sizeof (SequenceQualPairDlgData));
+ if (dlg == NULL)
+ {
+ return NULL;
+ }
+
+ p = HiddenGroup (h, -1, 0, NULL);
+ SetObjectExtra (p, dlg, StdCleanupExtraProc);
+
+ dlg->dialog = (DialoG) p;
+ dlg->todialog = SequenceQualPairToDialog;
+ dlg->fromdialog = DialogToSequenceQualPair;
+ dlg->testdialog = TestSequenceQualPairDialog;
+
+ dlg->change_notify = change_notify;
+ dlg->change_userdata = change_userdata;
+
+ dlg->field_type = PopupList (p, TRUE, ChangeSequenceQualPairType);
+ SetObjectExtra (dlg->field_type, dlg, NULL);
+ PopupItem (dlg->field_type, "molecule");
+ PopupItem (dlg->field_type, "technique");
+ PopupItem (dlg->field_type, "completedness");
+ PopupItem (dlg->field_type, "class");
+ PopupItem (dlg->field_type, "topology");
+ PopupItem (dlg->field_type, "strand");
+ SetValue (dlg->field_type, 1);
+
+ g = HiddenGroup (p, 0, 0, NULL);
+
+ dlg->molecule_grp = HiddenGroup (g, 2, 0, NULL);
+ val_list = GetMoleculeTypeList ();
+ dlg->molecule_from_dlg = ValNodeSelectionDialog (dlg->molecule_grp, val_list, SHORT_SELECTION_LIST, ValNodeStringName,
+ ValNodeSimpleDataFree, ValNodeStringCopy,
+ ValNodeChoiceMatch, "location",
+ change_notify, change_userdata, FALSE);
+ val_list = GetMoleculeTypeList ();
+ dlg->molecule_to_dlg = ValNodeSelectionDialog (dlg->molecule_grp, val_list, SHORT_SELECTION_LIST, ValNodeStringName,
+ ValNodeSimpleDataFree, ValNodeStringCopy,
+ ValNodeChoiceMatch, "location",
+ change_notify, change_userdata, FALSE);
+
+ dlg->technique_grp = HiddenGroup (g, 2, 0, NULL);
+ val_list = GetTechniqueTypeList ();
+ dlg->technique_from_dlg = ValNodeSelectionDialog (dlg->technique_grp, val_list, SHORT_SELECTION_LIST, ValNodeStringName,
+ ValNodeSimpleDataFree, ValNodeStringCopy,
+ ValNodeChoiceMatch, "location",
+ change_notify, change_userdata, FALSE);
+ val_list = GetTechniqueTypeList ();
+ dlg->technique_to_dlg = ValNodeSelectionDialog (dlg->technique_grp, val_list, SHORT_SELECTION_LIST, ValNodeStringName,
+ ValNodeSimpleDataFree, ValNodeStringCopy,
+ ValNodeChoiceMatch, "location",
+ change_notify, change_userdata, FALSE);
+
+ dlg->completedness_grp = HiddenGroup (g, 2, 0, NULL);
+ val_list = GetCompletednessTypeList ();
+ dlg->completedness_from_dlg = ValNodeSelectionDialog (dlg->completedness_grp, val_list, SHORT_SELECTION_LIST, ValNodeStringName,
+ ValNodeSimpleDataFree, ValNodeStringCopy,
+ ValNodeChoiceMatch, "location",
+ change_notify, change_userdata, FALSE);
+ val_list = GetCompletednessTypeList ();
+ dlg->completedness_to_dlg = ValNodeSelectionDialog (dlg->completedness_grp, val_list, SHORT_SELECTION_LIST, ValNodeStringName,
+ ValNodeSimpleDataFree, ValNodeStringCopy,
+ ValNodeChoiceMatch, "location",
+ change_notify, change_userdata, FALSE);
+
+ dlg->mol_class_grp = HiddenGroup (g, 2, 0, NULL);
+ val_list = GetMoleculeClassTypeList ();
+ dlg->mol_class_from_dlg = ValNodeSelectionDialog (dlg->mol_class_grp, val_list, SHORT_SELECTION_LIST, ValNodeStringName,
+ ValNodeSimpleDataFree, ValNodeStringCopy,
+ ValNodeChoiceMatch, "location",
+ change_notify, change_userdata, FALSE);
+ val_list = GetMoleculeClassTypeList ();
+ dlg->mol_class_to_dlg = ValNodeSelectionDialog (dlg->mol_class_grp, val_list, SHORT_SELECTION_LIST, ValNodeStringName,
+ ValNodeSimpleDataFree, ValNodeStringCopy,
+ ValNodeChoiceMatch, "location",
+ change_notify, change_userdata, FALSE);
+
+ dlg->topology_grp = HiddenGroup (g, 2, 0, NULL);
+ val_list = GetTopologyTypeList ();
+ dlg->topology_from_dlg = ValNodeSelectionDialog (dlg->topology_grp, val_list, SHORT_SELECTION_LIST, ValNodeStringName,
+ ValNodeSimpleDataFree, ValNodeStringCopy,
+ ValNodeChoiceMatch, "location",
+ change_notify, change_userdata, FALSE);
+ val_list = GetTopologyTypeList ();
+ dlg->topology_to_dlg = ValNodeSelectionDialog (dlg->topology_grp, val_list, SHORT_SELECTION_LIST, ValNodeStringName,
+ ValNodeSimpleDataFree, ValNodeStringCopy,
+ ValNodeChoiceMatch, "location",
+ change_notify, change_userdata, FALSE);
+
+ dlg->strand_grp = HiddenGroup (g, 2, 0, NULL);
+
+ val_list = GetStrandTypeList ();
+ dlg->strand_from_dlg = ValNodeSelectionDialog (dlg->strand_grp, val_list, SHORT_SELECTION_LIST, ValNodeStringName,
+ ValNodeSimpleDataFree, ValNodeStringCopy,
+ ValNodeChoiceMatch, "location",
+ change_notify, change_userdata, FALSE);
+ val_list = GetStrandTypeList ();
+ dlg->strand_to_dlg = ValNodeSelectionDialog (dlg->strand_grp, val_list, SHORT_SELECTION_LIST, ValNodeStringName,
+ ValNodeSimpleDataFree, ValNodeStringCopy,
+ ValNodeChoiceMatch, "location",
+ change_notify, change_userdata, FALSE);
+
+ AlignObjects (ALIGN_MIDDLE, (HANDLE) dlg->molecule_grp,
+ (HANDLE) dlg->technique_grp,
+ (HANDLE) dlg->completedness_grp,
+ (HANDLE) dlg->mol_class_grp,
+ (HANDLE) dlg->topology_grp,
+ (HANDLE) dlg->strand_grp,
+ NULL);
+
+ AlignObjects (ALIGN_CENTER, (HANDLE) dlg->field_type, (HANDLE) g, NULL);
+ ChangeSequenceQualPairType (dlg->field_type);
+ return (DialoG) p;
+}
+
+
+typedef struct sequenceconstraintdlg {
+ DIALOG_MESSAGE_BLOCK
+ GrouP seqtype;
+ GrouP rna_subtype_grp;
+ DialoG rna_subtype;
+ ButtoN feat_present;
+ DialoG feature_type;
+ DialoG id;
+
+ Nlm_ChangeNotifyProc change_notify;
+ Pointer change_userdata;
+} SequenceConstraintDlgData, PNTR SequenceConstraintDlgPtr;
+
+
+static void ChangeSequenceConstraintButton (ButtoN b)
+{
+ SequenceConstraintDlgPtr dlg;
+
+ dlg = (SequenceConstraintDlgPtr) GetObjectExtra (b);
+ if (dlg == NULL) return;
+
+ if (GetStatus (dlg->feat_present)) {
+ Enable (dlg->feature_type);
+ } else {
+ Disable (dlg->feature_type);
+ }
+ if (dlg->change_notify != NULL) {
+ (dlg->change_notify) (dlg->change_userdata);
+ }
+}
+
+
+static void ChangeSequenceConstraintGroup (GrouP g)
+{
+ SequenceConstraintDlgPtr dlg;
+
+ dlg = (SequenceConstraintDlgPtr) GetObjectExtra (g);
+ if (dlg == NULL) return;
+
+ if (GetValue (dlg->seqtype) == 4) {
+ Show (dlg->rna_subtype_grp);
+ } else {
+ Hide (dlg->rna_subtype_grp);
+ }
+
+ if (dlg->change_notify != NULL) {
+ (dlg->change_notify) (dlg->change_userdata);
+ }
+}
+
+
+static void SequenceConstraintToDialog (DialoG d, Pointer data)
+{
+ SequenceConstraintDlgPtr dlg;
+ SequenceConstraintPtr constraint;
+ ValNode vn;
+
+ dlg = (SequenceConstraintDlgPtr) GetObjectExtra (d);
+ if (dlg == NULL) return;
+
+ constraint = (SequenceConstraintPtr) data;
+ if (constraint == NULL) {
+ SetValue (dlg->seqtype, 1);
+ PointerToDialog (dlg->rna_subtype, NULL);
+ Hide (dlg->rna_subtype_grp);
+ SetStatus (dlg->feat_present, FALSE);
+ PointerToDialog (dlg->feature_type, NULL);
+ PointerToDialog (dlg->id, NULL);
+ } else {
+ if (constraint->seqtype == NULL) {
+ SetValue (dlg->seqtype, 1);
+ PointerToDialog (dlg->rna_subtype, NULL);
+ Hide (dlg->rna_subtype_grp);
+ } else {
+ switch (constraint->seqtype->choice) {
+ case SequenceConstraintMolTypeConstraint_any :
+ SetValue (dlg->seqtype, 1);
+ PointerToDialog (dlg->rna_subtype, NULL);
+ Hide (dlg->rna_subtype_grp);
+ break;
+ case SequenceConstraintMolTypeConstraint_nucleotide :
+ SetValue (dlg->seqtype, 2);
+ PointerToDialog (dlg->rna_subtype, NULL);
+ Hide (dlg->rna_subtype_grp);
+ break;
+ case SequenceConstraintMolTypeConstraint_dna :
+ SetValue (dlg->seqtype, 3);
+ PointerToDialog (dlg->rna_subtype, NULL);
+ Hide (dlg->rna_subtype_grp);
+ break;
+ case SequenceConstraintMolTypeConstraint_rna :
+ SetValue (dlg->seqtype, 4);
+ vn.choice = constraint->seqtype->data.intvalue;
+ vn.data.ptrvalue = NULL;
+ vn.next = NULL;
+ PointerToDialog (dlg->rna_subtype, &vn);
+ Show (dlg->rna_subtype_grp);
+ break;
+ case SequenceConstraintMolTypeConstraint_protein :
+ SetValue (dlg->seqtype, 5);
+ PointerToDialog (dlg->rna_subtype, NULL);
+ Hide (dlg->rna_subtype_grp);
+ break;
+ }
+ }
+
+ if (constraint->feature == Feature_type_any) {
+ SetStatus (dlg->feat_present, FALSE);
+ PointerToDialog (dlg->feature_type, NULL);
+ } else {
+ SetStatus (dlg->feat_present, TRUE);
+ vn.choice = constraint->feature;
+ vn.data.ptrvalue = NULL;
+ vn.next = NULL;
+ PointerToDialog (dlg->feature_type, &vn);
+ }
+
+ PointerToDialog (dlg->id, constraint->id);
+ }
+ ChangeSequenceConstraintButton (dlg->feat_present);
+}
+
+
+static Pointer SequenceConstraintFromDialog (DialoG d)
+{
+ SequenceConstraintDlgPtr dlg;
+ SequenceConstraintPtr constraint;
+ ValNodePtr vnp;
+ Int4 val;
+
+ dlg = (SequenceConstraintDlgPtr) GetObjectExtra (d);
+ if (dlg == NULL) return NULL;
+ constraint = SequenceConstraintNew();
+
+ val = GetValue (dlg->seqtype);
+ switch (val) {
+ case 1:
+ /* don't bother to fill in, it's optional */
+ break;
+ case 2:
+ constraint->seqtype = ValNodeNew (NULL);
+ constraint->seqtype->choice = SequenceConstraintMolTypeConstraint_nucleotide;
+ break;
+ case 3:
+ constraint->seqtype = ValNodeNew (NULL);
+ constraint->seqtype->choice = SequenceConstraintMolTypeConstraint_dna;
+ break;
+ case 4:
+ constraint->seqtype = ValNodeNew (NULL);
+ constraint->seqtype->choice = SequenceConstraintMolTypeConstraint_rna;
+ vnp = DialogToPointer (dlg->rna_subtype);
+ if (vnp == NULL) {
+ constraint->seqtype->data.intvalue = Sequence_constraint_rnamol_any;
+ } else {
+ constraint->seqtype->data.intvalue = vnp->choice;
+ }
+ break;
+ case 5:
+ constraint->seqtype = ValNodeNew (NULL);
+ constraint->seqtype->choice = SequenceConstraintMolTypeConstraint_protein;
+ break;
+ }
+
+ if (GetStatus (dlg->feat_present)) {
+ vnp = DialogToPointer (dlg->feature_type);
+ if (vnp == NULL) {
+ constraint->feature = Feature_type_any;
+ } else {
+ constraint->feature = vnp->choice;
+ }
+ vnp = ValNodeFree (vnp);
+ } else {
+ constraint->feature = Feature_type_any;
+ }
+
+ constraint->id = DialogToPointer (dlg->id);
+ if (IsStringConstraintEmpty (constraint->id)) {
+ constraint->id = StringConstraintFree (constraint->id);
+ }
+ return constraint;
+}
+
+
+NLM_EXTERN DialoG FeatureTypeDialog (GrouP h, Nlm_ChangeNotifyProc change_notify, Pointer change_userdata)
+{
+ ValNodePtr feature_list = NULL;
+
+ AddAllFeaturesToChoiceList (&feature_list);
+ return ValNodeSelectionDialog (h, feature_list, TALL_SELECTION_LIST, ValNodeStringName,
+ ValNodeSimpleDataFree, ValNodeStringCopy,
+ ValNodeChoiceMatch, "feature type",
+ change_notify, change_userdata, FALSE);
+}
+
+
+static ValNodePtr TestSequenceConstraintDialog (DialoG d)
+{
+ SequenceConstraintDlgPtr dlg;
+ ValNodePtr err_list = NULL;
+ SequenceConstraintPtr constraint;
+
+ dlg = (SequenceConstraintDlgPtr) GetObjectExtra (d);
+ if (dlg != NULL) {
+ constraint = DialogToPointer (d);
+ if (IsSequenceConstraintEmpty (constraint)) {
+ ValNodeAddPointer (&err_list, 0, "empty constraint");
+ }
+ constraint = SequenceConstraintFree (constraint);
+ }
+ return err_list;
+}
+
+
+static DialoG SequenceConstraintDialog (GrouP h, Nlm_ChangeNotifyProc change_notify, Pointer change_userdata)
+{
+ SequenceConstraintDlgPtr dlg;
+ GrouP p, g;
+ ValNodePtr rna_subtypes = NULL;
+
+ dlg = (SequenceConstraintDlgPtr) MemNew (sizeof (SequenceConstraintDlgData));
+ p = HiddenGroup (h, -1, 0, NULL);
+ SetGroupSpacing (p, 10, 10);
+ SetObjectExtra (p, dlg, StdCleanupExtraProc);
+ dlg->dialog = (DialoG) p;
+ dlg->todialog = SequenceConstraintToDialog;
+ dlg->fromdialog = SequenceConstraintFromDialog;
+ dlg->testdialog = TestSequenceConstraintDialog;
+ dlg->change_notify = change_notify;
+ dlg->change_userdata = change_userdata;
+
+ dlg->seqtype = HiddenGroup (p, 5, 0, ChangeSequenceConstraintGroup);
+ SetObjectExtra (dlg->seqtype, dlg, NULL);
+ RadioButton (dlg->seqtype, "Any sequence");
+ RadioButton (dlg->seqtype, "Nucleotides");
+ RadioButton (dlg->seqtype, "DNA");
+ RadioButton (dlg->seqtype, "RNA");
+ RadioButton (dlg->seqtype, "Proteins");
+ SetValue (dlg->seqtype, 1);
+ dlg->rna_subtype_grp = HiddenGroup (p, 2, 0, NULL);
+ StaticPrompt (dlg->rna_subtype_grp, "RNA Type", 0, dialogTextHeight, programFont, 'r');
+ AddAllRNASubtypesToChoiceList (&rna_subtypes);
+ dlg->rna_subtype = ValNodeSelectionDialog (dlg->rna_subtype_grp, rna_subtypes, TALL_SELECTION_LIST, ValNodeStringName,
+ ValNodeSimpleDataFree, ValNodeStringCopy,
+ ValNodeChoiceMatch, "rna subtype",
+ change_notify, change_userdata, FALSE);
+
+ Hide (dlg->rna_subtype_grp);
+
+ g = HiddenGroup (p, 2, 0, NULL);
+ dlg->feat_present = CheckBox (g, "Where feature present", ChangeSequenceConstraintButton);
+ SetObjectExtra (dlg->feat_present, dlg, NULL);
+ dlg->feature_type = FeatureTypeDialog (g, change_notify, change_userdata);
+
+ dlg->id = StringConstraintDialog (p, "Where sequence ID", FALSE, change_notify, change_userdata);
+
+ AlignObjects (ALIGN_CENTER, (HANDLE) dlg->seqtype, (HANDLE) dlg->rna_subtype_grp, (HANDLE) dlg->id, (HANDLE) g, NULL);
+ return (DialoG) p;
+}
+
+
+/* Notes:
+ * There can be more than one constraint, and the user will need to be able to view, edit, add, and delete them.
+ * Should have a DOC that lists the constraints, user can click on buttons to edit or delete, another button to add.
+ * Need to have an Edit window to edit individual constraints.
+ * Let user toggle between types of constraints only when creating a new one?
+ */
+typedef struct editconstraint {
+ PopuP constraint_type;
+
+ DialoG string_dlg;
+ DialoG location_dlg;
+ DialoG src_dlg;
+ DialoG cds_gene_prot_qual_dlg;
+ DialoG cds_gene_prot_pseudo_dlg;
+ DialoG sequence_dlg;
+
+ ButtoN accept_btn;
+} EditConstraintData, PNTR EditConstraintPtr;
+
+
+static void EnableEditConstraintAccept (Pointer data)
+{
+ EditConstraintPtr ecp;
+ Int2 val;
+ ValNodePtr err_list = NULL;
+ Boolean ok_to_accept = TRUE;
+
+ ecp = (EditConstraintPtr) data;
+ if (ecp != NULL && ecp->accept_btn != NULL) {
+ val = GetValue (ecp->constraint_type);
+ switch (val) {
+ case 1:
+ err_list = TestDialog (ecp->string_dlg);
+ break;
+ case 2:
+ err_list = TestDialog (ecp->location_dlg);
+ break;
+ case 3:
+ err_list = TestDialog (ecp->src_dlg);
+ break;
+ case 4:
+ err_list = TestDialog (ecp->cds_gene_prot_qual_dlg);
+ break;
+ case 5:
+ err_list = TestDialog (ecp->cds_gene_prot_pseudo_dlg);
+ break;
+ case 6:
+ err_list = TestDialog (ecp->sequence_dlg);
+ break;
+ default:
+ ok_to_accept = FALSE;
+ }
+ if (err_list != NULL) {
+ ok_to_accept = FALSE;
+ err_list = ValNodeFree (err_list);
+ }
+ if (ok_to_accept) {
+ Enable (ecp->accept_btn);
+ } else {
+ Disable (ecp->accept_btn);
+ }
+ }
+}
+
+
+static void ChangeEditConstraintType (PopuP p)
+{
+ EditConstraintPtr ecp;
+ Int2 val;
+
+ ecp = (EditConstraintPtr) GetObjectExtra (p);
+ if (ecp == NULL) return;
+
+ Hide (ecp->string_dlg);
+ Hide (ecp->location_dlg);
+ Hide (ecp->src_dlg);
+ Hide (ecp->cds_gene_prot_qual_dlg);
+ Hide (ecp->cds_gene_prot_pseudo_dlg);
+ Hide (ecp->sequence_dlg);
+
+ val = GetValue (ecp->constraint_type);
+ switch (val) {
+ case 1:
+ Show (ecp->string_dlg);
+ break;
+ case 2:
+ Show (ecp->location_dlg);
+ break;
+ case 3:
+ Show (ecp->src_dlg);
+ break;
+ case 4:
+ Show (ecp->cds_gene_prot_qual_dlg);
+ break;
+ case 5:
+ Show (ecp->cds_gene_prot_pseudo_dlg);
+ break;
+ case 6:
+ Show (ecp->sequence_dlg);
+ break;
+ }
+ EnableEditConstraintAccept (ecp);
+}
+
+
+static void FreeConstraintData (ValNodePtr constraint)
+{
+ if (constraint == NULL) return;
+
+ switch (constraint->choice) {
+ case ConstraintChoice_string:
+ constraint->data.ptrvalue = StringConstraintFree (constraint->data.ptrvalue);
+ break;
+ case ConstraintChoice_location:
+ constraint->data.ptrvalue = LocationConstraintFree (constraint->data.ptrvalue);
+ break;
+ case ConstraintChoice_source:
+ constraint->data.ptrvalue = SourceConstraintFree (constraint->data.ptrvalue);
+ break;
+ case ConstraintChoice_cdsgeneprot_qual:
+ constraint->data.ptrvalue = CDSGeneProtQualConstraintFree (constraint->data.ptrvalue);
+ break;
+ case ConstraintChoice_cdsgeneprot_pseudo:
+ constraint->data.ptrvalue = CDSGeneProtPseudoConstraintFree (constraint->data.ptrvalue);
+ break;
+ case ConstraintChoice_sequence:
+ constraint->data.ptrvalue = SequenceConstraintFree (constraint->data.ptrvalue);
+ break;
+ }
+}
+
+
+static Boolean EditConstraint (ValNodePtr constraint)
+{
+ ModalAcceptCancelData acd;
+ EditConstraintData ecd;
+ Boolean rval = FALSE;
+ WindoW w;
+ ButtoN b;
+ GrouP h, g, c;
+ Int2 val;
+
+ if (constraint == NULL) return FALSE;
+
+ w = MovableModalWindow(-20, -13, -10, -10, "Constraint", NULL);
+ h = HiddenGroup (w, -1, 0, NULL);
+ SetGroupSpacing (h, 10, 10);
+
+ ecd.constraint_type = PopupList (h, TRUE, ChangeEditConstraintType);
+ SetObjectExtra (ecd.constraint_type, &ecd, NULL);
+ PopupItem (ecd.constraint_type, "String");
+ PopupItem (ecd.constraint_type, "Location");
+ PopupItem (ecd.constraint_type, "Source");
+ PopupItem (ecd.constraint_type, "CDS-Gene-Prot Qualifier");
+ PopupItem (ecd.constraint_type, "CDS-Gene-Prot Pseudo Feature");
+ PopupItem (ecd.constraint_type, "Sequence");
+
+ g = HiddenGroup (h, 0, 0, NULL);
+ ecd.accept_btn = NULL;
+ ecd.string_dlg = StringConstraintDialog (g, "", TRUE, EnableEditConstraintAccept, &ecd);
+ ecd.location_dlg = LocationConstraintDialog (g, EnableEditConstraintAccept, &ecd);
+ ecd.src_dlg = SourceConstraintDialog (g, EnableEditConstraintAccept, &ecd);
+ ecd.cds_gene_prot_qual_dlg = CDSGeneProtQualConstraintDialog (g, EnableEditConstraintAccept, &ecd);
+ ecd.cds_gene_prot_pseudo_dlg = CDSGeneProtPseudoConstraintDialog (g, EnableEditConstraintAccept, &ecd);
+ ecd.sequence_dlg = SequenceConstraintDialog (g, EnableEditConstraintAccept, &ecd);
+ AlignObjects (ALIGN_CENTER, (HANDLE) ecd.string_dlg,
+ (HANDLE) ecd.location_dlg,
+ (HANDLE) ecd.src_dlg,
+ (HANDLE) ecd.cds_gene_prot_qual_dlg,
+ (HANDLE) ecd.cds_gene_prot_pseudo_dlg,
+ (HANDLE) ecd.sequence_dlg,
+ NULL);
+
+ c = HiddenGroup (h, 2, 0, NULL);
+ SetGroupSpacing (c, 10, 10);
+ ecd.accept_btn = PushButton (c, "Accept", ModalAcceptButton);
+ SetObjectExtra (ecd.accept_btn, &acd, NULL);
+ b = PushButton (c, "Cancel", ModalCancelButton);
+ SetObjectExtra (b, &acd, NULL);
+ AlignObjects (ALIGN_CENTER, (HANDLE) ecd.constraint_type,
+ (HANDLE) g,
+ (HANDLE) c,
+ NULL);
+
+ switch (constraint->choice) {
+ case ConstraintChoice_string:
+ SetValue (ecd.constraint_type, 1);
+ PointerToDialog (ecd.string_dlg, constraint->data.ptrvalue);
+ break;
+ case ConstraintChoice_location:
+ SetValue (ecd.constraint_type, 2);
+ PointerToDialog (ecd.location_dlg, constraint->data.ptrvalue);
+ break;
+ case ConstraintChoice_source:
+ SetValue (ecd.constraint_type, 3);
+ PointerToDialog (ecd.src_dlg, constraint->data.ptrvalue);
+ break;
+ case ConstraintChoice_cdsgeneprot_qual:
+ SetValue (ecd.constraint_type, 4);
+ PointerToDialog (ecd.cds_gene_prot_qual_dlg, constraint->data.ptrvalue);
+ break;
+ case ConstraintChoice_cdsgeneprot_pseudo:
+ SetValue (ecd.constraint_type, 5);
+ PointerToDialog (ecd.cds_gene_prot_pseudo_dlg, constraint->data.ptrvalue);
+ break;
+ case ConstraintChoice_sequence:
+ SetValue (ecd.constraint_type, 6);
+ PointerToDialog (ecd.sequence_dlg, constraint->data.ptrvalue);
+ break;
+ default:
+ SetValue (ecd.constraint_type, 1);
+ break;
+ }
+
+
+ ChangeEditConstraintType (ecd.constraint_type);
+ Show (w);
+ Select (w);
+ acd.accepted = FALSE;
+ acd.cancelled = FALSE;
+ while (!acd.accepted && ! acd.cancelled)
+ {
+ ProcessExternalEvent ();
+ Update ();
+ }
+ ProcessAnEvent ();
+ if (!acd.cancelled)
+ {
+ val = GetValue (ecd.constraint_type);
+ switch (val) {
+ case 1:
+ FreeConstraintData (constraint);
+ constraint->choice = ConstraintChoice_string;
+ constraint->data.ptrvalue = DialogToPointer (ecd.string_dlg);
+ rval = TRUE;
+ break;
+ case 2:
+ FreeConstraintData (constraint);
+ constraint->choice = ConstraintChoice_location;
+ constraint->data.ptrvalue = DialogToPointer (ecd.location_dlg);
+ rval = TRUE;
+ break;
+ case 3:
+ FreeConstraintData (constraint);
+ constraint->choice = ConstraintChoice_source;
+ constraint->data.ptrvalue = DialogToPointer (ecd.src_dlg);
+ rval = TRUE;
+ break;
+ case 4:
+ FreeConstraintData (constraint);
+ constraint->choice = ConstraintChoice_cdsgeneprot_qual;
+ constraint->data.ptrvalue = DialogToPointer (ecd.cds_gene_prot_qual_dlg);
+ rval = TRUE;
+ break;
+ case 5:
+ FreeConstraintData (constraint);
+ constraint->choice = ConstraintChoice_cdsgeneprot_pseudo;
+ constraint->data.ptrvalue = DialogToPointer (ecd.cds_gene_prot_pseudo_dlg);
+ rval = TRUE;
+ break;
+ case 6:
+ FreeConstraintData (constraint);
+ constraint->choice = ConstraintChoice_sequence;
+ constraint->data.ptrvalue = DialogToPointer (ecd.sequence_dlg);
+ rval = TRUE;
+ break;
+ }
+ }
+ Remove (w);
+ return rval;
+}
+
+
+static CharPtr SummarizeConstraint (ValNodePtr constraint);
+
+typedef struct constraintsetdlg {
+ DIALOG_MESSAGE_BLOCK
+ DoC constraint_doc;
+ ValNodePtr constraint_list;
+ Nlm_ChangeNotifyProc change_notify;
+ Pointer change_userdata;
+} ConstraintSetDlgData, PNTR ConstraintSetDlgPtr;
+
+static void PopulateConstraintDoc (DoC d, ValNodePtr constraint_list)
+{
+ ValNodePtr vnp;
+ CharPtr phrase, tmp;
+ RecT r;
+ ParData ParFmt = {FALSE, FALSE, FALSE, FALSE, FALSE, 0, 0};
+ ColData ColFmt[] =
+ {
+ {12, 0, 1, 0, NULL, 'l', TRUE, FALSE, FALSE, FALSE, FALSE},
+ {0, 0, 80, 0, NULL, 'l', TRUE, FALSE, FALSE, FALSE, TRUE}
+ };
+
+ if (d == NULL) return;
+
+ Reset (d);
+
+ ObjectRect (d, &r);
+ InsetRect (&r, 4, 4);
+
+ ColFmt[1].pixWidth = r.right - r.left - 12;
+
+ Reset (d);
+
+ for (vnp = constraint_list; vnp != NULL; vnp = vnp->next) {
+ phrase = SummarizeConstraint (vnp);
+ tmp = (CharPtr) MemNew (sizeof (Char) * (StringLen (phrase) + 3));
+ sprintf (tmp, "\t%s\n", phrase);
+ phrase = MemFree (phrase);
+ AppendText (d, tmp, &ParFmt, ColFmt, programFont);
+ tmp = MemFree (tmp);
+ }
+ AppendText (d, "(Click here to add new constraint)", NULL, NULL, programFont);
+ UpdateDocument (d, 0, 0);
+}
+
+static void DrawConstraintDocControls (DoC d, RectPtr r, Int2 item, Int2 firstLine)
+
+{
+ RecT rct;
+ Int4 width;
+ PoinT pt1, pt2;
+ ConstraintSetDlgPtr dlg;
+
+ dlg = (ConstraintSetDlgPtr) GetObjectExtra (d);
+ if (dlg != NULL && r != NULL && item > 0 && firstLine == 0 && item <= ValNodeLen (dlg->constraint_list)) {
+ rct = *r;
+
+ /* draw X for deletion */
+ width = 10;
+ pt1.x = rct.left + 1;
+ pt1.y = rct.top + 1;
+ pt2.x = pt1.x + width;
+ pt2.y = pt1.y + width;
+ DrawLine (pt1, pt2);
+ pt1.x = rct.left + 1;
+ pt1.y = rct.top + 1 + width;
+ pt2.x = pt1.x + width;
+ pt2.y = rct.top + 1;
+ DrawLine (pt1, pt2);
+ }
+}
+
+
+static void ClickConstraintDoc (DoC d, PoinT pt)
+{
+ Int2 item, row, col;
+ RecT rct;
+ BaR sb_vert;
+ Int4 scroll_pos = 0, scroll_max;
+ ConstraintSetDlgPtr f;
+ ValNodePtr vnp, vnp_prev = NULL;
+ Boolean changed = FALSE;
+
+ f = (ConstraintSetDlgPtr) GetObjectExtra (d);
+ if (f == NULL) return;
+
+ MapDocPoint (d, pt, &item, &row, &col, &rct);
+ if (item == 0 && row == 0 && f->constraint_list == NULL) {
+ /* create new constraint */
+ vnp = ValNodeNew (NULL);
+ vnp->choice = ConstraintChoice_string;
+ if (EditConstraint (vnp)) {
+ f->constraint_list = vnp;
+ changed = TRUE;
+ }
+ } else if (item > 0 && row > 0) {
+ if (item == ValNodeLen (f->constraint_list) + 1) {
+ /* create new constraint */
+ vnp = ValNodeNew (NULL);
+ vnp->choice = ConstraintChoice_string;
+ if (EditConstraint (vnp)) {
+ ValNodeLink (&(f->constraint_list), vnp);
+ changed = TRUE;
+ } else {
+ vnp = ConstraintChoiceFree (vnp);
+ }
+ } else {
+ for (vnp = f->constraint_list; vnp != NULL && item > 1; vnp = vnp->next, item--) {
+ vnp_prev = vnp;
+ }
+ if (vnp != NULL) {
+ sb_vert = GetSlateVScrollBar ((SlatE) f->constraint_doc);
+ scroll_pos = GetBarValue (sb_vert);
+ switch (col) {
+ case 1:
+ /* delete this item */
+ if (vnp_prev == NULL) {
+ f->constraint_list = vnp->next;
+ } else {
+ vnp_prev->next = vnp->next;
+ }
+ vnp->next = NULL;
+ vnp = ConstraintChoiceFree (vnp);
+ changed = TRUE;
+ break;
+ case 2:
+ /* edit */
+ changed = EditConstraint (vnp);
+ break;
+ }
+ }
+ }
+ }
+ if (changed) {
+ PopulateConstraintDoc (f->constraint_doc, f->constraint_list);
+ if (scroll_pos > 0) {
+ sb_vert = GetSlateVScrollBar ((SlatE) f->constraint_doc);
+ scroll_max = GetBarMax (sb_vert);
+ if (scroll_pos > scroll_max) {
+ scroll_pos = scroll_max;
+ }
+ CorrectBarValue (sb_vert, scroll_pos);
+ }
+ }
+}
+
+static void ConstraintSetToDialog (DialoG d, Pointer data)
+{
+ ConstraintSetDlgPtr dlg;
+
+ dlg = (ConstraintSetDlgPtr) GetObjectExtra (d);
+ if (dlg == NULL) return;
+
+ dlg->constraint_list = ConstraintChoiceSetFree (dlg->constraint_list);
+ if (data != NULL) {
+ dlg->constraint_list = AsnIoMemCopy ((ConstraintChoiceSetPtr) data,
+ (AsnReadFunc) ConstraintChoiceSetAsnRead,
+ (AsnWriteFunc) ConstraintChoiceSetAsnWrite);
+ }
+ PopulateConstraintDoc (dlg->constraint_doc, dlg->constraint_list);
+ if (dlg->change_notify != NULL) {
+ (dlg->change_notify) (dlg->change_userdata);
+ }
+}
+
+
+static Pointer ConstraintSetFromDialog (DialoG d)
+{
+ ConstraintSetDlgPtr dlg;
+ ValNodePtr constraint_list = NULL;
+
+ dlg = (ConstraintSetDlgPtr) GetObjectExtra (d);
+ if (dlg == NULL) return NULL;
+
+ if (dlg->constraint_list != NULL) {
+ constraint_list = AsnIoMemCopy ((ConstraintChoiceSetPtr) dlg->constraint_list,
+ (AsnReadFunc) ConstraintChoiceSetAsnRead,
+ (AsnWriteFunc) ConstraintChoiceSetAsnWrite);
+ }
+ return (Pointer) constraint_list;
+}
+
+static void CleanupConstraintSetDialog (GraphiC g, VoidPtr data)
+
+{
+ ConstraintSetDlgPtr dlg;
+
+ dlg = (ConstraintSetDlgPtr) data;
+ if (dlg != NULL) {
+ dlg->constraint_list = ConstraintChoiceSetFree (dlg->constraint_list);
+ }
+ StdCleanupExtraProc (g, data);
+}
+
+
+static DialoG ConstraintSetDialog (GrouP h, Nlm_ChangeNotifyProc change_notify, Pointer change_userdata)
+{
+ ConstraintSetDlgPtr dlg;
+ GrouP p;
+ PrompT ppt;
+
+ p = HiddenGroup (h, -1, 0, NULL);
+ dlg = (ConstraintSetDlgPtr) MemNew (sizeof (ConstraintSetDlgData));
+ SetObjectExtra (p, dlg, CleanupConstraintSetDialog);
+
+ dlg->dialog = (DialoG) p;
+ dlg->todialog = ConstraintSetToDialog;
+ dlg->fromdialog = ConstraintSetFromDialog;
+ dlg->change_notify = change_notify;
+ dlg->change_userdata = change_userdata;
+
+ dlg->constraint_list = NULL;
+ ppt = StaticPrompt (p, "Constraints", 0, dialogTextHeight, programFont, 'c');
+ dlg->constraint_doc = DocumentPanel (p, stdCharWidth * 30, stdLineHeight * 5);
+ SetObjectExtra (dlg->constraint_doc, dlg, NULL);
+ SetDocProcs (dlg->constraint_doc, ClickConstraintDoc, NULL, NULL, NULL);
+ SetDocShade (dlg->constraint_doc, DrawConstraintDocControls, NULL, NULL, NULL);
+ PopulateConstraintDoc (dlg->constraint_doc, dlg->constraint_list);
+
+ AlignObjects (ALIGN_CENTER, (HANDLE) ppt, (HANDLE) dlg->constraint_doc, NULL);
+ return (DialoG) p;
+}
+
+
+static DialoG LegalFeatQualChoiceDialog (GrouP h, Nlm_ChangeNotifyProc change_notify, Pointer change_userdata)
+{
+ ValNodePtr field_list = NULL;
+
+ AddAllFeatureFieldsToChoiceList (&field_list);
+ return ValNodeSelectionDialog (h, field_list, TALL_SELECTION_LIST, ValNodeStringName,
+ ValNodeSimpleDataFree, ValNodeStringCopy,
+ ValNodeChoiceMatch, "field type",
+ change_notify, change_userdata, FALSE);
+}
+
+
+typedef struct featqualchoicedlg {
+ DIALOG_MESSAGE_BLOCK
+ DialoG legal_qual;
+ DialoG illegal_qual;
+ Boolean is_legal;
+} FeatQualChoiceDlgData, PNTR FeatQualChoiceDlgPtr;
+
+
+static void FeatQualChoiceToDialog (DialoG d, Pointer data)
+{
+ FeatQualChoiceDlgPtr dlg;
+ ValNodePtr vnp;
+ ValNode vn;
+
+ dlg = (FeatQualChoiceDlgPtr) GetObjectExtra (d);
+ if (dlg == NULL) return;
+
+ vnp = (ValNodePtr) data;
+ if (vnp == NULL) {
+ dlg->is_legal = TRUE;
+ PointerToDialog (dlg->legal_qual, NULL);
+ Show (dlg->legal_qual);
+ Hide (dlg->illegal_qual);
+ } else if (vnp->choice == FeatQualChoice_legal_qual) {
+ dlg->is_legal = TRUE;
+ vn.choice = vnp->data.intvalue;
+ vn.data.ptrvalue = NULL;
+ vn.next = NULL;
+ PointerToDialog (dlg->legal_qual, &vn);
+ Show (dlg->legal_qual);
+ Hide (dlg->illegal_qual);
+ } else if (vnp->choice == FeatQualChoice_illegal_qual) {
+ dlg->is_legal = FALSE;
+ PointerToDialog (dlg->illegal_qual, vnp->data.ptrvalue);
+ Hide (dlg->legal_qual);
+ Show (dlg->illegal_qual);
+ } else {
+ dlg->is_legal = TRUE;
+ PointerToDialog (dlg->legal_qual, NULL);
+ Show (dlg->legal_qual);
+ Hide (dlg->illegal_qual);
+ }
+}
+
+
+static Pointer DialogToFeatQualChoice (DialoG d)
+{
+ FeatQualChoiceDlgPtr dlg;
+ ValNodePtr vnp = NULL, vnp2;
+ StringConstraintPtr scp;
+
+ dlg = (FeatQualChoiceDlgPtr) GetObjectExtra (d);
+ if (dlg == NULL) return NULL;
+
+ if (dlg->is_legal) {
+ vnp2 = (ValNodePtr) DialogToPointer (dlg->legal_qual);
+ if (vnp2 != NULL) {
+ vnp = ValNodeNew (NULL);
+ vnp->choice = FeatQualChoice_legal_qual;
+ vnp->data.intvalue = vnp2->choice;
+ vnp2 = ValNodeFree (vnp2);
+ }
+ } else {
+ scp = (StringConstraintPtr) DialogToPointer (dlg->illegal_qual);
+ if (scp != NULL) {
+ vnp = ValNodeNew (NULL);
+ vnp->choice = FeatQualChoice_illegal_qual;
+ vnp->data.ptrvalue = scp;
+ }
+ }
+ return vnp;
+}
+
+
+static ValNodePtr TestFeatQualChoiceDialog (DialoG d)
+{
+ FeatQualChoiceDlgPtr dlg;
+ ValNodePtr err_list = NULL;
+ StringConstraintPtr scp;
+
+ dlg = (FeatQualChoiceDlgPtr) GetObjectExtra (d);
+ if (dlg == NULL) return NULL;
+
+ if (dlg->is_legal) {
+ err_list = TestDialog (dlg->legal_qual);
+ } else {
+ scp = DialogToPointer (dlg->illegal_qual);
+ if (scp == NULL || StringHasNoText (scp->match_text)) {
+ ValNodeAddPointer (&err_list, 0, "match text");
+ }
+ }
+ return err_list;
+}
+
+static DialoG FeatQualChoiceDialog (GrouP h, Nlm_ChangeNotifyProc change_notify, Pointer change_userdata)
+{
+ FeatQualChoiceDlgPtr dlg;
+ GrouP p;
+
+ dlg = (FeatQualChoiceDlgPtr) MemNew (sizeof (FeatQualChoiceDlgData));
+ if (dlg == NULL)
+ {
+ return NULL;
+ }
+
+ p = HiddenGroup (h, 0, 0, NULL);
+ SetObjectExtra (p, dlg, StdCleanupExtraProc);
+
+ dlg->dialog = (DialoG) p;
+ dlg->todialog = FeatQualChoiceToDialog;
+ dlg->fromdialog = DialogToFeatQualChoice;
+ dlg->testdialog = TestFeatQualChoiceDialog;
+ dlg->is_legal = TRUE;
+
+ dlg->legal_qual = LegalFeatQualChoiceDialog (p, change_notify, change_userdata);
+ dlg->illegal_qual = StringConstraintDialog (p, NULL, FALSE, change_notify, change_userdata);
+ Hide (dlg->illegal_qual);
+ AlignObjects (ALIGN_CENTER, (HANDLE) dlg->legal_qual, (HANDLE) dlg->illegal_qual, NULL);
+
+ return (DialoG) p;
+}
+
+
+typedef struct cdsgeneprotfielddlg {
+ DIALOG_MESSAGE_BLOCK
+ DialoG dlg;
+} CDSGeneProtFieldDlgData, PNTR CDSGeneProtFieldDlgPtr;
+
+
+static void CDSGeneProtFieldToDialog (DialoG d, Pointer data)
+{
+ CDSGeneProtFieldDlgPtr dlg;
+ ValNodePtr vnp;
+ ValNode vn;
+
+ dlg = (CDSGeneProtFieldDlgPtr) GetObjectExtra (d);
+ if (dlg != NULL) {
+ vnp = (ValNodePtr) data;
+ if (vnp == NULL) {
+ PointerToDialog (dlg->dlg, NULL);
+ } else {
+ vn.choice = vnp->data.intvalue;
+ vn.data.ptrvalue = NULL;
+ vn.next = NULL;
+ PointerToDialog (dlg->dlg, &vn);
+ }
+ }
+}
+
+static Pointer DialogToCDSGeneProtField (DialoG d)
+{
+ CDSGeneProtFieldDlgPtr dlg;
+ ValNodePtr vnp, field = NULL;
+
+ dlg = (CDSGeneProtFieldDlgPtr) GetObjectExtra (d);
+ if (dlg != NULL) {
+ vnp = (ValNodePtr) DialogToPointer (dlg->dlg);
+ if (vnp != NULL) {
+ field = ValNodeNew (NULL);
+ field->choice = FieldType_cds_gene_prot;
+ field->data.intvalue = vnp->choice;
+ }
+ }
+ return field;
+}
+
+
+static ValNodePtr TestCDSGeneProtFieldDialog (DialoG d)
+{
+ CDSGeneProtFieldDlgPtr dlg;
+ ValNodePtr err_list = NULL;
+
+ dlg = (CDSGeneProtFieldDlgPtr) GetObjectExtra (d);
+ if (dlg != NULL) {
+ err_list = TestDialog (dlg->dlg);
+ }
+ return err_list;
+}
+
+
+static DialoG CDSGeneProtFieldDialog (GrouP h, Nlm_ChangeNotifyProc change_notify, Pointer change_userdata)
+{
+ CDSGeneProtFieldDlgPtr dlg;
+ GrouP p;
+ ValNodePtr field_list = NULL;
+
+ dlg = (CDSGeneProtFieldDlgPtr) MemNew (sizeof (CDSGeneProtFieldDlgData));
+ if (dlg == NULL)
+ {
+ return NULL;
+ }
+
+ p = HiddenGroup (h, 0, 0, NULL);
+ SetObjectExtra (p, dlg, StdCleanupExtraProc);
+
+ dlg->dialog = (DialoG) p;
+ dlg->todialog = CDSGeneProtFieldToDialog;
+ dlg->fromdialog = DialogToCDSGeneProtField;
+ dlg->testdialog = TestCDSGeneProtFieldDialog;
+
+ AddAllCDSGeneProtFieldsToChoiceList (&field_list);
+ dlg->dlg = ValNodeSelectionDialog (p, field_list, TALL_SELECTION_LIST, ValNodeStringName,
+ ValNodeSimpleDataFree, ValNodeStringCopy,
+ ValNodeChoiceMatch, "field type",
+ change_notify, change_userdata, FALSE);
+
+ return (DialoG) p;
+}
+
+
+typedef struct fieldtypedlg {
+ DIALOG_MESSAGE_BLOCK
+ Uint1 field_type;
+ DialoG src_qual;
+ GrouP feature_field_grp;
+ DialoG feature_type;
+ DialoG feature_field;
+ DialoG cdsgeneprot;
+ DialoG sequence_qual;
+} FieldTypeDlgData, PNTR FieldTypeDlgPtr;
+
+
+static void FieldTypeToDialog (DialoG d, Pointer data)
+{
+ FieldTypeDlgPtr dlg;
+ FeatureFieldPtr ffp;
+ ValNodePtr vnp;
+ ValNode vn;
+
+ dlg = (FieldTypeDlgPtr) GetObjectExtra (d);
+ if (dlg == NULL) return;
+
+ SafeHide (dlg->src_qual);
+ SafeHide (dlg->feature_field_grp);
+ SafeHide (dlg->cdsgeneprot);
+ SafeHide (dlg->sequence_qual);
+ vnp = (ValNodePtr) data;
+ if (vnp != NULL) {
+ switch (vnp->choice) {
+ case FieldType_source_qual:
+ SafeShow (dlg->src_qual);
+ PointerToDialog (dlg->src_qual, vnp->data.ptrvalue);
+ dlg->field_type = FieldType_source_qual;
+ break;
+ case FieldType_feature_field:
+ SafeShow (dlg->feature_field_grp);
+ ffp = (FeatureFieldPtr) vnp->data.ptrvalue;
+ if (ffp == NULL) {
+ PointerToDialog (dlg->feature_type, NULL);
+ PointerToDialog (dlg->feature_field, NULL);
+ } else {
+ vn.choice = ffp->type;
+ vn.data.ptrvalue = NULL;
+ vn.next = NULL;
+ PointerToDialog (dlg->feature_type, &vn);
+ PointerToDialog (dlg->feature_field, ffp->field);
+ }
+ dlg->field_type = FieldType_feature_field;
+ break;
+ case FieldType_cds_gene_prot:
+ SafeShow (dlg->cdsgeneprot);
+ PointerToDialog (dlg->cdsgeneprot, vnp);
+ dlg->field_type = FieldType_cds_gene_prot;
+ break;
+ case FieldType_molinfo_field:
+ SafeShow (dlg->sequence_qual);
+ PointerToDialog (dlg->sequence_qual, vnp->data.ptrvalue);
+ dlg->field_type = FieldType_molinfo_field;
+ break;
+ }
+ }
+}
+
+
+static Pointer DialogToFieldType (DialoG d)
+{
+ FieldTypeDlgPtr dlg;
+ FeatureFieldPtr ffp;
+ ValNodePtr vnp = NULL, vnp2;
+
+ dlg = (FieldTypeDlgPtr) GetObjectExtra (d);
+ if (dlg == NULL) return NULL;
+
+ switch (dlg->field_type) {
+ case FieldType_source_qual:
+ vnp = ValNodeNew(NULL);
+ vnp->choice = FieldType_source_qual;
+ vnp->data.ptrvalue = DialogToPointer (dlg->src_qual);
+ break;
+ case FieldType_feature_field:
+ vnp2 = DialogToPointer (dlg->feature_type);
+ if (vnp2 != NULL) {
+ ffp = FeatureFieldNew();
+ ffp->type = vnp2->choice;
+ ffp->field = DialogToPointer (dlg->feature_field);
+ vnp = ValNodeNew (NULL);
+ vnp->choice = FieldType_feature_field;
+ vnp->data.ptrvalue = ffp;
+ }
+ break;
+ case FieldType_cds_gene_prot:
+ vnp = DialogToPointer (dlg->cdsgeneprot);
+ break;
+ case FieldType_molinfo_field:
+ vnp = ValNodeNew (NULL);
+ vnp->choice = FieldType_molinfo_field;
+ vnp->data.ptrvalue = DialogToPointer (dlg->sequence_qual);
+ break;
+ }
+ return vnp;
+}
+
+
+static ValNodePtr TestFieldTypeDialog (DialoG d)
+{
+ FieldTypeDlgPtr dlg;
+ ValNodePtr err_list = NULL;
+
+ dlg = (FieldTypeDlgPtr) GetObjectExtra (d);
+ if (dlg == NULL) return NULL;
+
+ switch (dlg->field_type) {
+ case FieldType_source_qual:
+ ValNodeLink (&err_list, TestDialog (dlg->src_qual));
+ break;
+ case FieldType_feature_field:
+ ValNodeLink (&err_list, TestDialog (dlg->feature_type));
+ ValNodeLink (&err_list, TestDialog (dlg->feature_field));
+ break;
+ case FieldType_cds_gene_prot:
+ ValNodeLink (&err_list, TestDialog (dlg->cdsgeneprot));
+ break;
+ case FieldType_molinfo_field:
+ ValNodeLink (&err_list, TestDialog (dlg->sequence_qual));
+ break;
+ default :
+ ValNodeAddPointer (&err_list, 0, "No field type chosen");
+ break;
+ }
+ return err_list;
+}
+
+
+static DialoG FieldTypeDialog (GrouP h, Boolean text_only, Boolean for_remove, Nlm_ChangeNotifyProc change_notify, Pointer change_userdata)
+{
+ FieldTypeDlgPtr dlg;
+ GrouP p;
+
+ dlg = (FieldTypeDlgPtr) MemNew (sizeof (FieldTypeDlgData));
+ if (dlg == NULL)
+ {
+ return NULL;
+ }
+
+ p = HiddenGroup (h, 0, 0, NULL);
+ SetObjectExtra (p, dlg, StdCleanupExtraProc);
+
+ dlg->dialog = (DialoG) p;
+ dlg->todialog = FieldTypeToDialog;
+ dlg->fromdialog = DialogToFieldType;
+ dlg->testdialog = TestFieldTypeDialog;
+
+ dlg->src_qual = SourceQualChoiceDialog (p, text_only, for_remove, change_notify, change_userdata);
+ dlg->feature_field_grp = HiddenGroup (p, 2, 0, NULL);
+ dlg->feature_type = FeatureTypeDialog (dlg->feature_field_grp, change_notify, change_userdata);
+ dlg->feature_field = FeatQualChoiceDialog (dlg->feature_field_grp, change_notify, change_userdata);
+ dlg->cdsgeneprot = CDSGeneProtFieldDialog (p, change_notify, change_userdata);
+ dlg->sequence_qual = SequenceQualDialog (p, change_notify, change_userdata);
+
+ SafeHide (dlg->src_qual);
+ SafeHide (dlg->feature_field_grp);
+ SafeHide (dlg->cdsgeneprot);
+ SafeHide (dlg->sequence_qual);
+
+ AlignObjects (ALIGN_CENTER, (HANDLE) dlg->src_qual,
+ (HANDLE) dlg->feature_field_grp,
+ (HANDLE) dlg->cdsgeneprot,
+ (HANDLE) dlg->sequence_qual,
+ NULL);
+
+ return (DialoG) p;
+}
+
+
+typedef struct fieldpairtypedlg {
+ DIALOG_MESSAGE_BLOCK
+ Uint1 field_type;
+ GrouP src_qual_grp;
+ DialoG src_qual_from;
+ DialoG src_qual_to;
+ GrouP feature_field_grp;
+ DialoG feature_type;
+ DialoG feature_field_from;
+ DialoG feature_field_to;
+ GrouP cdsgeneprot_grp;
+ DialoG cdsgeneprot_from;
+ DialoG cdsgeneprot_to;
+ DialoG molinfo_dlg;
+} FieldPairTypeDlgData, PNTR FieldPairTypeDlgPtr;
+
+
+static void FieldPairTypeToDialog (DialoG d, Pointer data)
+{
+ FieldPairTypeDlgPtr dlg;
+ ValNodePtr vnp;
+ ValNode vn;
+ FieldTypePtr from_field, to_field;
+ FeatureFieldPairPtr ffp;
+ CDSGeneProtFieldPairPtr cgp;
+
+ dlg = (FieldPairTypeDlgPtr) GetObjectExtra (d);
+ if (dlg == NULL) return;
+
+ SafeHide (dlg->src_qual_grp);
+ SafeHide (dlg->feature_field_grp);
+ SafeHide (dlg->cdsgeneprot_grp);
+ SafeHide (dlg->molinfo_dlg);
+ vnp = (ValNodePtr) data;
+ if (vnp == NULL) {
+ dlg->field_type = 0;
+ } else {
+ switch (vnp->choice) {
+ case FieldPairType_source_qual:
+ SafeShow (dlg->src_qual_grp);
+ from_field = GetFromFieldFromFieldPair (vnp);
+ if (from_field == NULL) {
+ PointerToDialog (dlg->src_qual_from, NULL);
+ } else {
+ PointerToDialog (dlg->src_qual_from, from_field->data.ptrvalue);
+ }
+ from_field = FieldTypeFree (from_field);
+ to_field = GetToFieldFromFieldPair (vnp);
+ if (to_field == NULL) {
+ PointerToDialog (dlg->src_qual_to, NULL);
+ } else {
+ PointerToDialog (dlg->src_qual_to, to_field->data.ptrvalue);
+ }
+ to_field = FieldTypeFree (to_field);
+ dlg->field_type = FieldType_source_qual;
+ break;
+ case FieldPairType_feature_field:
+ SafeShow (dlg->feature_field_grp);
+ ffp = (FeatureFieldPairPtr) vnp->data.ptrvalue;
+ if (ffp == NULL) {
+ PointerToDialog (dlg->feature_type, NULL);
+ PointerToDialog (dlg->feature_field_from, NULL);
+ PointerToDialog (dlg->feature_field_to, NULL);
+ } else {
+ vn.choice = ffp->type;
+ vn.data.ptrvalue = NULL;
+ vn.next = NULL;
+ PointerToDialog (dlg->feature_type, &vn);
+ PointerToDialog (dlg->feature_field_from, ffp->field_from);
+ PointerToDialog (dlg->feature_field_to, ffp->field_to);
+ }
+ dlg->field_type = FieldType_feature_field;
+ break;
+ case FieldPairType_cds_gene_prot:
+ SafeShow (dlg->cdsgeneprot_grp);
+ cgp = (CDSGeneProtFieldPairPtr) vnp->data.ptrvalue;
+ if (cgp == NULL) {
+ PointerToDialog (dlg->cdsgeneprot_from, NULL);
+ PointerToDialog (dlg->cdsgeneprot_to, NULL);
+ } else {
+ from_field = GetFromFieldFromFieldPair (vnp);
+ PointerToDialog (dlg->cdsgeneprot_from, from_field);
+ from_field = FieldTypeFree (from_field);
+ to_field = GetToFieldFromFieldPair (vnp);
+ PointerToDialog (dlg->cdsgeneprot_to, to_field);
+ to_field = FieldTypeFree (to_field);
+ }
+ dlg->field_type = FieldType_cds_gene_prot;
+ break;
+ case FieldPairType_molinfo_field:
+ SafeShow (dlg->molinfo_dlg);
+ PointerToDialog (dlg->molinfo_dlg, vnp->data.ptrvalue);
+ dlg->field_type = FieldPairType_molinfo_field;
+ break;
+ }
+ }
+}
+
+
+static Pointer DialogToFieldPairType (DialoG d)
+{
+ FieldPairTypeDlgPtr dlg;
+ ValNodePtr vnp = NULL, vnp1, vnp2;
+ SourceQualPairPtr sqp;
+ FeatureFieldPairPtr ffp;
+ CDSGeneProtFieldPairPtr cgp;
+
+ dlg = (FieldPairTypeDlgPtr) GetObjectExtra (d);
+ if (dlg == NULL) return NULL;
+
+ switch (dlg->field_type) {
+ case FieldPairType_source_qual:
+ vnp1 = DialogToPointer (dlg->src_qual_from);
+ vnp2 = DialogToPointer (dlg->src_qual_to);
+ if (vnp1 != NULL && vnp2 != NULL && vnp1->choice == SourceQualChoice_textqual && vnp2->choice == SourceQualChoice_textqual) {
+ sqp = SourceQualPairNew ();
+ sqp->field_from = vnp1->data.intvalue;
+ sqp->field_to = vnp2->data.intvalue;
+ vnp = ValNodeNew (NULL);
+ vnp->choice = FieldPairType_source_qual;
+ vnp->data.ptrvalue = sqp;
+ }
+ vnp1 = SourceQualChoiceFree (vnp1);
+ vnp2 = SourceQualChoiceFree (vnp2);
+ break;
+ case FieldPairType_feature_field:
+ vnp2 = (ValNodePtr) DialogToPointer (dlg->feature_type);
+ if (vnp2 != NULL) {
+ ffp = FeatureFieldPairNew ();
+ ffp->type = vnp2->choice;
+ vnp2 = ValNodeFree (vnp2);
+ ffp->field_from = DialogToPointer (dlg->feature_field_from);
+ ffp->field_to = DialogToPointer (dlg->feature_field_to);
+ vnp = ValNodeNew (NULL);
+ vnp->choice = FieldPairType_feature_field;
+ vnp->data.ptrvalue = ffp;
+ }
+ break;
+ case FieldPairType_cds_gene_prot:
+ vnp1 = DialogToPointer (dlg->cdsgeneprot_from);
+ vnp2 = DialogToPointer (dlg->cdsgeneprot_to);
+ if (vnp1 != NULL && vnp2 != NULL) {
+ cgp = CDSGeneProtFieldPairNew ();
+ cgp->field_from = vnp1->data.intvalue;
+ cgp->field_to = vnp2->data.intvalue;
+ vnp = ValNodeNew (NULL);
+ vnp->choice = FieldPairType_cds_gene_prot;
+ vnp->data.ptrvalue = cgp;
+ }
+ vnp1 = ValNodeFree (vnp1);
+ vnp2 = ValNodeFree (vnp2);
+ break;
+ case FieldPairType_molinfo_field:
+ vnp1 = DialogToPointer (dlg->molinfo_dlg);
+ if (vnp1 != NULL) {
+ vnp = ValNodeNew (NULL);
+ vnp->choice = FieldPairType_molinfo_field;
+ vnp->data.ptrvalue = vnp1;
+ }
+ break;
+ }
+
+ return vnp;
+}
+
+
+static ValNodePtr TestFieldPairTypeDialog (DialoG d)
+{
+ FieldPairTypeDlgPtr dlg;
+ ValNodePtr err_list = NULL;
+
+ dlg = (FieldPairTypeDlgPtr) GetObjectExtra (d);
+ if (dlg == NULL) {
+ return NULL;
+ }
+
+ switch (dlg->field_type) {
+ case FieldPairType_source_qual:
+ err_list = TestDialog (dlg->src_qual_from);
+ ValNodeLink (&err_list, TestDialog (dlg->src_qual_to));
+ break;
+ case FieldPairType_feature_field:
+ err_list = TestDialog (dlg->feature_type);
+ ValNodeLink (&err_list, TestDialog (dlg->feature_field_from));
+ ValNodeLink (&err_list, TestDialog (dlg->feature_field_to));
+ break;
+ case FieldPairType_cds_gene_prot:
+ ValNodeLink (&err_list, TestDialog (dlg->cdsgeneprot_from));
+ ValNodeLink (&err_list, TestDialog (dlg->cdsgeneprot_to));
+ break;
+ case FieldPairType_molinfo_field:
+ ValNodeLink (&err_list, TestDialog (dlg->molinfo_dlg));
+ break;
+ default:
+ ValNodeAddPointer (&err_list, 0, "No field type");
+ break;
+ }
+ return err_list;
+}
+
+
+static DialoG FieldPairTypeDialog (GrouP h, Boolean for_convert, Nlm_ChangeNotifyProc change_notify, Pointer change_userdata)
+{
+ FieldPairTypeDlgPtr dlg;
+ GrouP p;
+
+ dlg = (FieldPairTypeDlgPtr) MemNew (sizeof (FieldPairTypeDlgData));
+ if (dlg == NULL)
+ {
+ return NULL;
+ }
+
+ p = HiddenGroup (h, 0, 0, NULL);
+ SetObjectExtra (p, dlg, StdCleanupExtraProc);
+
+ dlg->dialog = (DialoG) p;
+ dlg->todialog = FieldPairTypeToDialog;
+ dlg->fromdialog = DialogToFieldPairType;
+ dlg->testdialog = TestFieldPairTypeDialog;
+
+ dlg->src_qual_grp = HiddenGroup (p, 2, 0, NULL);
+ dlg->src_qual_from = SourceQualChoiceDialog (dlg->src_qual_grp, TRUE, FALSE, change_notify, change_userdata);
+ dlg->src_qual_to = SourceQualChoiceDialog (dlg->src_qual_grp, TRUE, FALSE, change_notify, change_userdata);
+
+ dlg->feature_field_grp = HiddenGroup (p, 3, 0, NULL);
+ dlg->feature_type = FeatureTypeDialog (dlg->feature_field_grp, change_notify, change_userdata);
+ dlg->feature_field_from = FeatQualChoiceDialog (dlg->feature_field_grp, change_notify, change_userdata);
+ dlg->feature_field_to = FeatQualChoiceDialog (dlg->feature_field_grp, change_notify, change_userdata);
+
+ dlg->cdsgeneprot_grp = HiddenGroup (p, 2, 0, NULL);
+ dlg->cdsgeneprot_from = CDSGeneProtFieldDialog (dlg->cdsgeneprot_grp, change_notify, change_userdata);
+ dlg->cdsgeneprot_to = CDSGeneProtFieldDialog (dlg->cdsgeneprot_grp, change_notify, change_userdata);
+
+ if (for_convert) {
+ dlg->molinfo_dlg = SequenceQualPairDialog (p, change_notify, change_userdata);
+ }
+
+ SafeHide (dlg->src_qual_grp);
+ SafeHide (dlg->feature_field_grp);
+ SafeHide (dlg->cdsgeneprot_grp);
+ SafeHide (dlg->molinfo_dlg);
+
+ AlignObjects (ALIGN_CENTER, (HANDLE) dlg->src_qual_grp,
+ (HANDLE) dlg->feature_field_grp,
+ (HANDLE) dlg->cdsgeneprot_grp,
+ (HANDLE) dlg->molinfo_dlg,
+ NULL);
+
+ return (DialoG) p;
+}
+
+
+typedef struct editaecractiondlg {
+ DIALOG_MESSAGE_BLOCK
+ PopuP qual_type;
+ DialoG field_dlg;
+ TexT value_txt;
+ DialoG edit;
+ DialoG text_portion;
+ ButtoN remove_from_parsed;
+ DialoG existing_text;
+ DialoG constraint_dlg;
+ ButtoN accept_btn;
+
+ Uint1 action_type;
+
+ Nlm_ChangeNotifyProc change_notify;
+ Pointer change_userdata;
+ Nlm_ChangeNotifyProc redraw_notify;
+ Pointer redraw_userdata;
+} EditAECRActionDlgData, PNTR EditAECRActionDlgPtr;
+
+
+static void ChangeAECRQualPopup (PopuP p)
+{
+ EditAECRActionDlgPtr d;
+
+ d = (EditAECRActionDlgPtr) GetObjectExtra (p);
+ if (d != NULL && d->redraw_notify != NULL) {
+ d->redraw_notify(d->redraw_userdata);
+ }
+}
+
+
+static Uint1 ActionTypeChoiceFromPopupValue (Int4 i)
+{
+ Uint1 action_type_choice = ActionChoice_apply;
+
+ switch (i) {
+ case 2:
+ action_type_choice = ActionChoice_apply;
+ break;
+ case 3:
+ action_type_choice = ActionChoice_edit;
+ break;
+ case 4:
+ action_type_choice = ActionChoice_convert;
+ break;
+ case 5:
+ action_type_choice = ActionChoice_copy;
+ break;
+ case 6:
+ action_type_choice = ActionChoice_swap;
+ break;
+ case 8:
+ action_type_choice = ActionChoice_remove;
+ break;
+ case 7:
+ action_type_choice = ActionChoice_parse;
+ break;
+ }
+ return action_type_choice;
+}
+
+
+static Uint1 FieldTypeChoiceFromPopupValue (Int4 i)
+{
+ Uint1 field_type_choice = FieldType_source_qual;
+ switch (i) {
+ case 1:
+ field_type_choice = FieldType_source_qual;
+ break;
+ case 2:
+ field_type_choice = FieldType_feature_field;
+ break;
+ case 3:
+ field_type_choice = FieldType_cds_gene_prot;
+ break;
+ case 4:
+ field_type_choice = FieldType_molinfo_field;
+ break;
+ }
+ return field_type_choice;
+}
+
+
+static Uint1 FieldTypeChoiceFromEditAECRActionDialog (DialoG d)
+{
+ EditAECRActionDlgPtr dlg;
+
+ dlg = (EditAECRActionDlgPtr) GetObjectExtra (d);
+ if (dlg == NULL) {
+ return FieldType_source_qual;
+ } else {
+ return FieldTypeChoiceFromPopupValue (GetValue (dlg->qual_type));
+ }
+}
+
+
+static Boolean IsFieldTypeNonText (ValNodePtr field_type)
+{
+ ValNodePtr vnp;
+ FeatureFieldPtr ffp;
+ Boolean rval = FALSE;
+
+ if (field_type == NULL) {
+ return FALSE;
+ }
+ switch (field_type->choice) {
+ case FieldType_source_qual :
+ vnp = (ValNodePtr) field_type->data.ptrvalue;
+ if (vnp != NULL) {
+ if (vnp->choice == SourceQualChoice_location || vnp->choice == SourceQualChoice_origin) {
+ rval = TRUE;
+ } else if (vnp->choice == SourceQualChoice_textqual) {
+ if (IsNonTextSourceQual (vnp->data.intvalue)) {
+ rval = TRUE;
+ }
+ }
+ }
+ break;
+ case FieldType_feature_field :
+ ffp = (FeatureFieldPtr) field_type->data.ptrvalue;
+ if (ffp != NULL && ffp->field != NULL && ffp->field->choice == FeatQualChoice_legal_qual
+ && ffp->field->data.intvalue == Feat_qual_legal_pseudo) {
+ rval = TRUE;
+ }
+ break;
+ case FieldType_molinfo_field :
+ rval = TRUE;
+ break;
+ }
+ return rval;
+}
+
+
+static void ChangeDialogForApplyFieldChoice (EditAECRActionDlgPtr dlg)
+{
+ ValNodePtr field;
+
+ if (dlg == NULL) return;
+ field = DialogToPointer (dlg->field_dlg);
+ if (IsFieldTypeNonText (field)) {
+ DisableNonTextOptions (dlg->existing_text);
+ Hide (dlg->value_txt);
+ } else {
+ EnableNonTextOptions (dlg->existing_text);
+ Show (dlg->value_txt);
+ }
+ field = FieldTypeFree (field);
+}
+
+
+static void ChangeApplyFieldType (Pointer data)
+{
+ EditAECRActionDlgPtr dlg;
+
+ dlg = (EditAECRActionDlgPtr) data;
+ if (dlg == NULL) return;
+ ChangeDialogForApplyFieldChoice (dlg);
+ if (dlg->change_notify != NULL) {
+ (dlg->change_notify) (dlg->change_userdata);
+ }
+}
+
+
+static ValNodePtr TestAECRActionDialog (DialoG d)
+{
+ EditAECRActionDlgPtr dlg;
+ Int2 field_type;
+ ValNodePtr err_list = NULL;
+ ValNodePtr field;
+ Boolean field_is_nontext = FALSE;
+
+ dlg = (EditAECRActionDlgPtr) GetObjectExtra (d);
+ if (dlg == NULL) return NULL;
+
+ field_type = GetValue (dlg->qual_type);
+ if (field_type < 1 || field_type > 4) {
+ ValNodeAddPointer (&err_list, 0, "field type");
+ }
+
+ ValNodeLink (&err_list, TestDialog (dlg->field_dlg));
+ ValNodeLink (&err_list, TestDialog (dlg->existing_text));
+
+ field = DialogToPointer (dlg->field_dlg);
+ field_is_nontext = IsFieldTypeNonText (field);
+ field = FieldTypeFree (field);
+
+ switch (dlg->action_type) {
+ case ActionChoice_apply:
+ if (TextHasNoText (dlg->value_txt) && !field_is_nontext) {
+ ValNodeAddPointer (&err_list, 0, "no apply text");
+ }
+ break;
+ case ActionChoice_edit:
+ if (field_is_nontext) {
+ ValNodeAddPointer (&err_list, 0, "invalid action for field type");
+ }
+ ValNodeLink (&err_list, TestDialog (dlg->edit));
+ break;
+ case ActionChoice_convert:
+ if (field_is_nontext && field_type != 4) {
+ ValNodeAddPointer (&err_list, 0, "invalid action for field type");
+ }
+ ValNodeLink (&err_list, TestDialog (dlg->edit));
+ break;
+ case ActionChoice_copy:
+ if (field_is_nontext) {
+ ValNodeAddPointer (&err_list, 0, "invalid action for field type");
+ }
+ ValNodeLink (&err_list, TestDialog (dlg->edit));
+ break;
+ case ActionChoice_swap:
+ if (field_is_nontext) {
+ ValNodeAddPointer (&err_list, 0, "invalid action for field type");
+ }
+ ValNodeLink (&err_list, TestDialog (dlg->edit));
+ break;
+ case ActionChoice_remove:
+ break;
+ case ActionChoice_parse:
+ if (field_is_nontext) {
+ ValNodeAddPointer (&err_list, 0, "invalid action for field type");
+ }
+ ValNodeLink (&err_list, TestDialog (dlg->edit));
+ ValNodeLink (&err_list, TestDialog (dlg->text_portion));
+ break;
+ }
+
+ return err_list;
+}
+
+
+static void ChangeEditAECRActionDialogText (TexT t)
+{
+ EditAECRActionDlgPtr dlg;
+
+ dlg = (EditAECRActionDlgPtr) GetObjectExtra (t);
+ if (dlg != NULL && dlg->change_notify != NULL) {
+ (dlg->change_notify)(dlg->change_userdata);
+ }
+}
+
+
+static Pointer AECRActionFromEditDialog (DialoG d)
+{
+ EditAECRActionDlgPtr dlg;
+ AECRActionPtr action = NULL;
+ Uint1 qual_type;
+ ApplyActionPtr apply;
+ EditActionPtr edit;
+ ConvertActionPtr convert;
+ CopyActionPtr copy;
+ SwapActionPtr swap;
+ AECRParseActionPtr parse;
+ RemoveActionPtr remove;
+
+ dlg = (EditAECRActionDlgPtr) GetObjectExtra (d);
+ if (dlg == NULL) return NULL;
+
+ action = AECRActionNew ();
+
+ qual_type = FieldTypeChoiceFromPopupValue (GetValue (dlg->qual_type));
+
+ switch (dlg->action_type) {
+ case ActionChoice_apply:
+ apply = ApplyActionNew();
+ apply->field = DialogToPointer (dlg->field_dlg);
+ if (IsFieldTypeNonText (apply->field)) {
+ apply->value = StringSave ("TRUE");
+ } else {
+ apply->value = SaveStringFromText (dlg->value_txt);
+ }
+ apply->existing_text = (Uint2) DialogToPointer (dlg->existing_text);
+ action->action = ValNodeNew (NULL);
+ action->action->choice = dlg->action_type;
+ action->action->data.ptrvalue = apply;
+ break;
+ case ActionChoice_edit:
+ edit = EditActionNew ();
+ edit->field = DialogToPointer (dlg->field_dlg);
+ edit->edit = DialogToPointer (dlg->edit);
+ action->action = ValNodeNew (NULL);
+ action->action->choice = dlg->action_type;
+ action->action->data.ptrvalue = edit;
+ break;
+ case ActionChoice_convert:
+ convert = ConvertActionNew();
+ convert->fields = DialogToPointer (dlg->field_dlg);
+ convert->existing_text = (Uint2) DialogToPointer (dlg->existing_text);
+ action->action = ValNodeNew (NULL);
+ action->action->choice = dlg->action_type;
+ action->action->data.ptrvalue = convert;
+ break;
+ case ActionChoice_copy:
+ copy = CopyActionNew();
+ copy->fields = DialogToPointer (dlg->field_dlg);
+ copy->existing_text = (Uint2) DialogToPointer (dlg->existing_text);
+ action->action = ValNodeNew (NULL);
+ action->action->choice = dlg->action_type;
+ action->action->data.ptrvalue = copy;
+ break;
+ case ActionChoice_swap:
+ swap = SwapActionNew();
+ swap->fields = DialogToPointer (dlg->field_dlg);
+ action->action = ValNodeNew (NULL);
+ action->action->choice = dlg->action_type;
+ action->action->data.ptrvalue = swap;
+ break;
+ case ActionChoice_remove:
+ remove = RemoveActionNew();
+ remove->field = DialogToPointer (dlg->field_dlg);
+ action->action = ValNodeNew (NULL);
+ action->action->choice = dlg->action_type;
+ action->action->data.ptrvalue = remove;
+ break;
+ case ActionChoice_parse:
+ parse = AECRParseActionNew();
+ parse->fields = DialogToPointer (dlg->field_dlg);
+ parse->portion = DialogToPointer (dlg->text_portion);
+ parse->remove_from_parsed = GetStatus (dlg->remove_from_parsed);
+ parse->existing_text = (Uint2) DialogToPointer (dlg->existing_text);
+ action->action = ValNodeNew (NULL);
+ action->action->choice = dlg->action_type;
+ action->action->data.ptrvalue = parse;
+ break;
+ }
+
+ action->constraint = DialogToPointer (dlg->constraint_dlg);
+
+ return (Pointer) action;
+}
+
+
+static Boolean MolInfoAllowed (Int4 action_type)
+{
+ if (action_type != ActionChoice_edit
+ && action_type != ActionChoice_copy
+ && action_type != ActionChoice_swap
+ && action_type != ActionChoice_parse) {
+ return TRUE;
+ } else {
+ return FALSE;
+ }
+}
+
+
+static void FieldToAECRDialog (ValNodePtr field, DialoG dlg, Int4 action_type, Int4 field_type)
+{
+ ValNode vn;
+
+ if (field == NULL) {
+ PointerToDialog (dlg, NULL);
+ } else if (field_type == FieldType_molinfo_field && !MolInfoAllowed (action_type)) {
+ vn.choice = FieldType_source_qual;
+ vn.data.ptrvalue = NULL;
+ vn.next = NULL;
+ PointerToDialog (dlg, &vn);
+ } else {
+ PointerToDialog (dlg, field);
+ }
+}
+
+
+
+static DialoG
+EditAECRActionDialog
+(GrouP h,
+ AECRActionPtr action,
+ Boolean indexer_version,
+ Nlm_ChangeNotifyProc change_notify,
+ Pointer change_userdata,
+ Nlm_ChangeNotifyProc redraw_notify,
+ Pointer redraw_userdata)
+{
+ EditAECRActionDlgPtr dlg;
+ GrouP p;
+ Uint1 field_type;
+ GrouP control_group;
+ ApplyActionPtr apply;
+ EditActionPtr edit;
+ AECRParseActionPtr parse;
+ RemoveActionPtr remove;
+ ConvertActionPtr convert;
+ CopyActionPtr copy;
+ SwapActionPtr swap;
+
+ dlg = (EditAECRActionDlgPtr) MemNew (sizeof (EditAECRActionDlgData));
+
+ p = HiddenGroup (h, -1, 0, NULL);
+ SetObjectExtra (p, dlg, StdCleanupExtraProc);
+ dlg->dialog = (DialoG) p;
+ dlg->todialog = NULL;
+ dlg->fromdialog = AECRActionFromEditDialog;
+ dlg->testdialog = TestAECRActionDialog;
+ dlg->change_notify = change_notify;
+ dlg->change_userdata = change_userdata;
+ dlg->redraw_notify = redraw_notify;
+ dlg->redraw_userdata = redraw_userdata;
+
+ if (action == NULL || action->action == NULL) {
+ dlg->action_type = ActionChoice_apply;
+ } else {
+ dlg->action_type = action->action->choice;
+ }
+
+ dlg->qual_type = PopupList (p, TRUE, ChangeAECRQualPopup);
+ SetObjectExtra (dlg->qual_type, dlg, NULL);
+ PopupItem (dlg->qual_type, "Source Qual");
+ PopupItem (dlg->qual_type, "Feature Qual");
+ PopupItem (dlg->qual_type, "CDS-Gene-Prot Qual");
+ if (MolInfoAllowed (dlg->action_type)) {
+ PopupItem (dlg->qual_type, "MolInfo Qual");
+ }
+ field_type = FieldTypeFromAECRAction (action);
+ switch (field_type) {
+ case FieldType_source_qual:
+ SetValue (dlg->qual_type, 1);
+ break;
+ case FieldType_feature_field:
+ SetValue (dlg->qual_type, 2);
+ break;
+ case FieldType_cds_gene_prot:
+ SetValue (dlg->qual_type, 3);
+ break;
+ case FieldType_molinfo_field:
+ if (MolInfoAllowed(dlg->action_type)) {
+ SetValue (dlg->qual_type, 4);
+ } else {
+ SetValue (dlg->qual_type, 1);
+ }
+ break;
+ default:
+ SetValue (dlg->qual_type, 1);
+ break;
+ }
+
+ dlg->field_dlg = NULL;
+ dlg->value_txt = NULL;
+ dlg->existing_text = NULL;
+
+ control_group = HiddenGroup (p, -1, 0, NULL);
+ switch (dlg->action_type) {
+ case ActionChoice_apply:
+ dlg->field_dlg = FieldTypeDialog (control_group, FALSE, FALSE, ChangeApplyFieldType, dlg);
+ dlg->value_txt = DialogText (control_group, "", 20, ChangeEditAECRActionDialogText);
+ SetObjectExtra (dlg->value_txt, dlg, NULL);
+ AlignObjects (ALIGN_CENTER, (HANDLE) dlg->field_dlg, (HANDLE) dlg->value_txt, NULL);
+ dlg->existing_text = ExistingTextDialog (p, change_notify, change_userdata);
+ if (action != NULL && action->action != NULL && action->action->data.ptrvalue != NULL) {
+ apply = (ApplyActionPtr) action->action->data.ptrvalue;
+ PointerToDialog (dlg->field_dlg, apply->field);
+ SetTitle (dlg->value_txt, apply->value);
+ PointerToDialog (dlg->existing_text, (Pointer) apply->existing_text);
+ }
+ ChangeDialogForApplyFieldChoice (dlg);
+ break;
+ case ActionChoice_edit:
+ dlg->field_dlg = FieldTypeDialog (control_group, TRUE, FALSE, change_notify, change_userdata);
+ dlg->edit = FieldEditDialog (control_group, change_notify, change_userdata);
+ AlignObjects (ALIGN_CENTER, (HANDLE) dlg->field_dlg, (HANDLE) dlg->edit, NULL);
+ if (action != NULL && action->action != NULL
+ && action->action->data.ptrvalue != NULL) {
+ edit = (EditActionPtr) action->action->data.ptrvalue;
+ PointerToDialog (dlg->edit, edit->edit);
+ FieldToAECRDialog (edit->field, dlg->field_dlg, dlg->action_type, field_type);
+ }
+
+ break;
+ case ActionChoice_remove:
+ dlg->field_dlg = FieldTypeDialog (control_group, FALSE, TRUE, change_notify, change_userdata);
+ if (action != NULL && action->action != NULL && action->action->data.ptrvalue != NULL) {
+ remove = (RemoveActionPtr) action->action->data.ptrvalue;
+ PointerToDialog (dlg->field_dlg, remove->field);
+ }
+ break;
+ case ActionChoice_convert:
+ dlg->field_dlg = FieldPairTypeDialog (control_group, TRUE, change_notify, change_userdata);
+ dlg->existing_text = ExistingTextDialog (p, change_notify, change_userdata);
+ if (action != NULL && action->action != NULL && action->action->data.ptrvalue != NULL) {
+ convert = (ConvertActionPtr) action->action->data.ptrvalue;
+ PointerToDialog (dlg->field_dlg, convert->fields);
+ PointerToDialog (dlg->existing_text, (Pointer) convert->existing_text);
+ }
+ break;
+ case ActionChoice_copy:
+ dlg->field_dlg = FieldPairTypeDialog (control_group, FALSE, change_notify, change_userdata);
+ dlg->existing_text = ExistingTextDialog (p, change_notify, change_userdata);
+ if (action != NULL && action->action != NULL
+ && action->action->data.ptrvalue != NULL) {
+ copy = (CopyActionPtr) action->action->data.ptrvalue;
+ FieldToAECRDialog (copy->fields, dlg->field_dlg, dlg->action_type, field_type);
+ PointerToDialog (dlg->existing_text, (Pointer) copy->existing_text);
+ }
+ break;
+ case ActionChoice_swap:
+ dlg->field_dlg = FieldPairTypeDialog (control_group, FALSE, change_notify, change_userdata);
+ if (action != NULL && action->action != NULL
+ && action->action->data.ptrvalue != NULL) {
+ swap = (SwapActionPtr) action->action->data.ptrvalue;
+ FieldToAECRDialog (swap->fields, dlg->field_dlg, dlg->action_type, field_type);
+ }
+ break;
+ case ActionChoice_parse:
+ dlg->field_dlg = FieldPairTypeDialog (control_group, FALSE, change_notify, change_userdata);
+ dlg->text_portion = TextPortionDialog (control_group, TRUE, change_notify, change_userdata);
+ dlg->remove_from_parsed = CheckBox (control_group, "Remove from parsed field", NULL);
+ AlignObjects (ALIGN_CENTER, (HANDLE) dlg->field_dlg, (HANDLE) dlg->text_portion, (HANDLE) dlg->remove_from_parsed, NULL);
+ dlg->existing_text = ExistingTextDialog (p, change_notify, change_userdata);
+ if (action != NULL && action->action != NULL
+ && action->action->data.ptrvalue != NULL) {
+ parse = (AECRParseActionPtr) action->action->data.ptrvalue;
+ FieldToAECRDialog (parse->fields, dlg->field_dlg, dlg->action_type, field_type);
+ PointerToDialog (dlg->text_portion, parse->portion);
+ SetStatus (dlg->remove_from_parsed, parse->remove_from_parsed);
+ PointerToDialog (dlg->existing_text, (Pointer) parse->existing_text);
+ }
+ break;
+ }
+
+ dlg->constraint_dlg = ConstraintSetDialog (p, change_notify, change_userdata);
+ if (action != NULL) {
+ PointerToDialog (dlg->constraint_dlg, action->constraint);
+ }
+
+ AlignObjects (ALIGN_CENTER, (HANDLE) dlg->qual_type,
+ (HANDLE) dlg->constraint_dlg,
+ (HANDLE) control_group,
+ (HANDLE) dlg->existing_text,
+ NULL);
+ return (DialoG) p;
+}
+
+
+typedef struct applyfeatureactiondlg {
+ DIALOG_MESSAGE_BLOCK
+ DialoG feature_type_dlg;
+ ButtoN apply_to_parts;
+ TexT only_this_part;
+ ButtoN partial5;
+ ButtoN partial3;
+ GrouP strand_group;
+ GrouP use_whole_interval;
+ TexT left_end;
+ TexT right_end;
+ GrouP all_or_some_group;
+ TexT accession_list_txt;
+ ButtoN add_redundant;
+ /* for CDS */
+ ButtoN add_mrna;
+ PopuP reading_frame;
+ TexT protein_name;
+ TexT protein_description;
+
+ /* for RNA */
+ DialoG ncrna_class;
+ TexT rna_name;
+
+ /* for import features */
+ DialoG quals;
+
+ /* for all */
+ TexT gene_locus;
+ TexT gene_description;
+ TexT comment;
+
+ Nlm_ChangeNotifyProc change_notify;
+ Pointer change_userdata;
+
+
+} ApplyFeatureActionDlgData, PNTR ApplyFeatureActionDlgPtr;
+
+
+static ValNodePtr TestApplyFeatureActionDialog (DialoG d)
+{
+ ApplyFeatureActionDlgPtr dlg;
+ ValNodePtr err_list = NULL;
+
+ dlg = (ApplyFeatureActionDlgPtr) GetObjectExtra (d);
+ if (dlg == NULL) {
+ return NULL;
+ }
+
+ err_list = TestDialog (dlg->feature_type_dlg);
+
+ return err_list;
+}
+
+
+static void ChangeApplyFeatureActionDlg (ApplyFeatureActionDlgPtr dlg)
+{
+ if (dlg == NULL) return;
+
+ if (GetStatus (dlg->apply_to_parts)) {
+ SafeEnable (dlg->only_this_part);
+ } else {
+ SafeDisable (dlg->only_this_part);
+ }
+
+ if (dlg->use_whole_interval != NULL) {
+ if (GetValue (dlg->use_whole_interval) == 2) {
+ Enable (dlg->left_end);
+ Enable (dlg->right_end);
+ } else {
+ Disable (dlg->left_end);
+ Disable (dlg->right_end);
+ }
+ }
+
+ if (dlg->all_or_some_group != NULL) {
+ if (GetValue (dlg->all_or_some_group) == 2) {
+ Enable (dlg->accession_list_txt);
+ } else {
+ Disable (dlg->accession_list_txt);
+ }
+ }
+
+ if (dlg->change_notify != NULL) {
+ (dlg->change_notify) (dlg->change_userdata);
+ }
+}
+
+
+static CharPtr SequenceListWrite (ValNodePtr seq_list)
+{
+ Int4 len = 0;
+ ValNodePtr vnp;
+ CharPtr txt = NULL;
+
+ if (seq_list == NULL) return NULL;
+ for (vnp = seq_list; vnp != NULL; vnp = vnp->next) {
+ len += StringLen (vnp->data.ptrvalue) + 2;
+ }
+
+ txt = (CharPtr) MemNew (sizeof (Char) * len);
+ for (vnp = seq_list; vnp != NULL; vnp = vnp->next) {
+ StringCat (txt, vnp->data.ptrvalue);
+ if (vnp->next != NULL) {
+ StringCat (txt, ";");
+ }
+ }
+ return txt;
+}
+
+
+static ValNodePtr SequenceListCollect (CharPtr txt)
+{
+ ValNodePtr seq_list = NULL;
+ CharPtr cp;
+
+ if (StringHasNoText (txt)) {
+ return NULL;
+ }
+ cp = StringChr (txt, ';');
+ while (cp != NULL && *txt != 0) {
+ *cp = 0;
+ if (!StringHasNoText (txt)) {
+ ValNodeAddPointer (&seq_list, 0, StringSave (txt));
+ }
+ *cp = ';';
+ txt = cp + 1;
+ cp = StringChr (txt, ':');
+ }
+ if (!StringHasNoText (txt)) {
+ ValNodeAddPointer (&seq_list, 0, StringSave (txt));
+ }
+ return seq_list;
+}
+
+
+static CharPtr FindFeatQualValue (ValNodePtr vnp, Int4 featqual)
+{
+ FeatQualLegalValPtr q;
+ CharPtr str = NULL;
+ while (vnp != NULL && str == NULL) {
+ q = (FeatQualLegalValPtr) vnp->data.ptrvalue;
+ if (q != NULL && q->qual == featqual) {
+ str = q->val;
+ }
+ vnp = vnp->next;
+ }
+ if (str == NULL) {
+ str = "";
+ }
+ return str;
+}
+
+
+static void SetFeatQualValue (ValNodePtr PNTR fields, Int4 featqual, CharPtr val)
+{
+ FeatQualLegalValPtr q;
+
+ q = FeatQualLegalValNew ();
+ q->qual = featqual;
+ q->val = StringSave (val);
+ ValNodeAddPointer (fields, 1, q);
+}
+
+
+static SeqFeatPtr CreateFeatureWithImportFeatureQuals (ApplyFeatureActionPtr action)
+{
+ SeqFeatPtr sfp;
+ ValNodePtr vnp;
+ FeatQualLegalValPtr q;
+ GBQualPtr gbq;
+ CharPtr qualname, cp;
+
+ sfp = SeqFeatNew();
+ sfp->idx.subtype = GetFeatdefFromFeatureType (action->type);
+ sfp->data.choice = FindFeatFromFeatDefType (sfp->idx.subtype);
+
+ for (vnp = action->fields; vnp != NULL; vnp = vnp->next) {
+ q = (FeatQualLegalValPtr) vnp->data.ptrvalue;
+ if (q != NULL && q->qual != Feat_qual_legal_gene && q->qual != Feat_qual_legal_gene_description && q->qual != Feat_qual_legal_note) {
+ gbq = GBQualNew ();
+ qualname = StringSave (GetFeatQualName(q->qual));
+ cp = StringChr (qualname, '-');
+ while (cp != NULL) {
+ *cp = '_';
+ cp = StringChr (cp + 1, '-');
+ }
+ gbq->qual = qualname;
+ gbq->val = StringSave (q->val);
+ gbq->next = sfp->qual;
+ sfp->qual = gbq;
+ }
+ }
+ return sfp;
+}
+
+
+static void AddGBQualsToActionFields (GBQualPtr gbq, ApplyFeatureActionPtr action)
+{
+ Int4 qualtype;
+
+ if (action == NULL) return;
+
+ while (gbq != NULL) {
+ qualtype = GetFeatQualByName (gbq->qual);
+ if (qualtype > -1) {
+ SetFeatQualValue (&(action->fields), qualtype, gbq->val);
+ }
+ gbq = gbq->next;
+ }
+}
+
+
+static void ApplyFeatureActionToDialog (DialoG d, Pointer data)
+{
+ ApplyFeatureActionDlgPtr dlg;
+ ApplyFeatureActionPtr action;
+ Char num[20];
+ LocationIntervalPtr lint;
+ CharPtr txt;
+ ValNode vn;
+
+ dlg = (ApplyFeatureActionDlgPtr) GetObjectExtra (d);
+ if (dlg == NULL) {
+ return;
+ }
+
+ action = (ApplyFeatureActionPtr) data;
+
+ if (action == NULL) {
+ PointerToDialog (dlg->feature_type_dlg, NULL);
+ SetStatus (dlg->apply_to_parts, FALSE);
+ SetTitle (dlg->only_this_part, "");
+ SetStatus (dlg->partial5, FALSE);
+ SetStatus (dlg->partial3, FALSE);
+ SetValue (dlg->strand_group, 1);
+ SetValue (dlg->use_whole_interval, 1);
+ SetTitle (dlg->left_end, "");
+ SetTitle (dlg->right_end, "");
+ SetValue (dlg->all_or_some_group, 1);
+ SetTitle (dlg->accession_list_txt, "");
+ SetStatus (dlg->add_redundant, FALSE);
+
+ /* for CDS */
+ SafeSetStatus (dlg->add_mrna, FALSE);
+ SafeSetValue (dlg->reading_frame, 4);
+ SafeSetTitle (dlg->protein_name, "");
+ SafeSetTitle (dlg->protein_description, "");
+
+ /* for RNA */
+ PointerToDialog (dlg->ncrna_class, NULL);
+ SafeSetTitle (dlg->rna_name, "");
+
+ /* for import features */
+ PointerToDialog (dlg->quals, NULL);
+
+ /* for all */
+ SafeSetTitle (dlg->gene_locus, "");
+ SafeSetTitle (dlg->gene_description, "");
+ SafeSetTitle (dlg->comment, "");
+ } else {
+ vn.choice = (Uint1) action->type;
+ vn.next = NULL;
+ vn.data.ptrvalue = NULL;
+ PointerToDialog (dlg->feature_type_dlg, &vn);
+
+ SetStatus (dlg->apply_to_parts, action->apply_to_parts);
+ if (action->only_seg_num > -1) {
+ sprintf (num, "%d", action->only_seg_num);
+ SetTitle (dlg->only_this_part, num);
+ } else {
+ SetTitle (dlg->only_this_part, "");
+ }
+ SetStatus (dlg->partial5, action->partial5);
+ SetStatus (dlg->partial3, action->partial3);
+ if (action->plus_strand) {
+ SetValue (dlg->strand_group, 1);
+ } else {
+ SetValue (dlg->strand_group, 2);
+ }
+ if (action->location == NULL || action->location->choice == LocationChoice_whole_sequence) {
+ SetValue (dlg->use_whole_interval, 1);
+ SetTitle (dlg->left_end, "");
+ SetTitle (dlg->right_end, "");
+ } else {
+ SetValue (dlg->use_whole_interval, 2);
+ lint = (LocationIntervalPtr) action->location->data.ptrvalue;
+ if (lint == NULL) {
+ SetTitle (dlg->left_end, "");
+ SetTitle (dlg->right_end, "");
+ } else {
+ sprintf (num, "%d", lint->from);
+ SetTitle (dlg->left_end, num);
+ sprintf (num, "%d", lint->to);
+ SetTitle (dlg->right_end, num);
+ }
+ }
+
+ if (action->seq_list == NULL || action->seq_list->choice == SequenceListChoice_all) {
+ SetValue (dlg->all_or_some_group, 1);
+ SetTitle (dlg->accession_list_txt, "");
+ } else {
+ txt = SequenceListWrite (action->seq_list->data.ptrvalue);
+ SetValue (dlg->all_or_some_group, 2);
+ SetTitle (dlg->accession_list_txt, txt);
+ txt = MemFree (txt);
+ }
+
+ SetStatus (dlg->add_redundant, action->add_redundant);
+
+ /* for CDS */
+ SafeSetStatus (dlg->add_mrna, action->add_mrna);
+ txt = FindFeatQualValue (action->fields, Feat_qual_legal_codon_start);
+ if (StringICmp (txt, "best") == 0) {
+ SafeSetValue (dlg->reading_frame, 4);
+ } else {
+ SafeSetValue (dlg->reading_frame, atoi (txt));
+ }
+
+ SafeSetTitle (dlg->protein_name, FindFeatQualValue (action->fields, Feat_qual_legal_product));
+ SafeSetTitle (dlg->protein_description, FindFeatQualValue (action->fields, Feat_qual_legal_description));
+
+ /* for RNA */
+ PointerToDialog (dlg->ncrna_class, FindFeatQualValue (action->fields, Feat_qual_legal_ncRNA_class));
+ SafeSetTitle (dlg->rna_name, FindFeatQualValue (action->fields, Feat_qual_legal_product));
+
+ /* for all */
+ SafeSetTitle (dlg->gene_locus, FindFeatQualValue (action->fields, Feat_qual_legal_gene));
+ SafeSetTitle (dlg->gene_description, FindFeatQualValue (action->fields, Feat_qual_legal_gene_description));
+ SafeSetTitle (dlg->comment, FindFeatQualValue (action->fields, Feat_qual_legal_note));
+ }
+
+ ChangeApplyFeatureActionDlg (dlg);
+ if (dlg->change_notify != NULL) {
+ (dlg->change_notify) (dlg->change_userdata);
+ }
+}
+
+
+static Pointer DialogToApplyFeatureAction (DialoG d)
+{
+ ApplyFeatureActionDlgPtr dlg;
+ ApplyFeatureActionPtr action;
+ CharPtr num_txt, txt;
+ Char num[15];
+ LocationIntervalPtr lint;
+ Int4 frame;
+ GBQualPtr gbq;
+ ValNodePtr vnp;
+
+ dlg = (ApplyFeatureActionDlgPtr) GetObjectExtra (d);
+ if (dlg == NULL) {
+ return NULL;
+ }
+
+ vnp = DialogToPointer (dlg->feature_type_dlg);
+ if (vnp == NULL) {
+ return NULL;
+ }
+
+ action = ApplyFeatureActionNew();
+
+ action->type = vnp->choice;
+ vnp = ValNodeFree (vnp);
+
+ action->apply_to_parts = GetStatus (dlg->apply_to_parts);
+ if (action->apply_to_parts && !TextHasNoText (dlg->only_this_part)) {
+ num_txt = SaveStringFromText (dlg->only_this_part);
+ action->only_seg_num = atoi (num_txt);
+ num_txt = MemFree (num_txt);
+ }
+
+ action->partial5 = GetStatus (dlg->partial5);
+ action->partial3 = GetStatus (dlg->partial3);
+ if (GetValue (dlg->strand_group) == 1) {
+ action->plus_strand = TRUE;
+ } else {
+ action->plus_strand = FALSE;
+ }
+
+ if (GetValue (dlg->use_whole_interval) == 1) {
+ action->location = ValNodeNew(NULL);
+ action->location->choice = LocationChoice_whole_sequence;
+ } else {
+ lint = LocationIntervalNew ();
+ num_txt = SaveStringFromText (dlg->left_end);
+ lint->from = atoi (num_txt);
+ num_txt = MemFree (num_txt);
+ num_txt = SaveStringFromText (dlg->right_end);
+ lint->to = atoi (num_txt);
+ num_txt = MemFree (num_txt);
+ action->location = ValNodeNew(NULL);
+ action->location->choice = LocationChoice_interval;
+ action->location->data.ptrvalue = lint;
+ }
+
+ if (GetValue (dlg->all_or_some_group) == 1) {
+ action->seq_list = ValNodeNew(NULL);
+ action->seq_list->choice = SequenceListChoice_all;
+ } else {
+ num_txt = SaveStringFromText (dlg->accession_list_txt);
+ action->seq_list = ValNodeNew(NULL);
+ action->seq_list->choice = SequenceListChoice_list;
+ action->seq_list->data.ptrvalue = SequenceListCollect (num_txt);
+ num_txt = MemFree (num_txt);
+ }
+
+ action->add_redundant = GetStatus (dlg->add_redundant);
+
+ /* for CDS */
+ if (dlg->add_mrna != NULL && GetStatus (dlg->add_mrna)) {
+ action->add_mrna = TRUE;
+ } else {
+ action->add_mrna = FALSE;
+ }
+
+ if (dlg->reading_frame != NULL) {
+ frame = GetValue (dlg->reading_frame);
+ if (frame > 0 && frame < 4) {
+ sprintf (num, "%d", frame);
+ SetFeatQualValue (&(action->fields), Feat_qual_legal_codon_start, num);
+ } else {
+ SetFeatQualValue (&(action->fields), Feat_qual_legal_codon_start, "best");
+ }
+ }
+
+ if (dlg->protein_name != NULL && !TextHasNoText (dlg->protein_name)) {
+ txt = SaveStringFromText (dlg->protein_name);
+ SetFeatQualValue (&(action->fields), Feat_qual_legal_product, txt);
+ txt = MemFree (txt);
+ }
+ if (dlg->protein_name != NULL && !TextHasNoText (dlg->protein_description)) {
+ txt = SaveStringFromText (dlg->protein_description);
+ SetFeatQualValue (&(action->fields), Feat_qual_legal_description, txt);
+ txt = MemFree (txt);
+ }
+
+ /* for RNA */
+ if (dlg->ncrna_class != NULL) {
+ txt = DialogToPointer (dlg->ncrna_class);
+ if (!StringHasNoText (txt)) {
+ SetFeatQualValue (&(action->fields), Feat_qual_legal_ncRNA_class, txt);
+ }
+ txt = MemFree (txt);
+ }
+ if (dlg->rna_name != NULL && !TextHasNoText (dlg->rna_name)) {
+ txt = SaveStringFromText (dlg->rna_name);
+ SetFeatQualValue (&(action->fields), Feat_qual_legal_product, txt);
+ txt = MemFree (txt);
+ }
+
+ /* for import features */
+ if (dlg->quals != NULL) {
+ gbq = DialogToPointer (dlg->quals);
+ AddGBQualsToActionFields (gbq, action);
+ gbq = GBQualFree (gbq);
+ }
+
+ /* for all */
+ if (dlg->gene_locus != NULL && !TextHasNoText (dlg->gene_locus)) {
+ txt = SaveStringFromText (dlg->gene_locus);
+ SetFeatQualValue (&(action->fields), Feat_qual_legal_gene, txt);
+ txt = MemFree (txt);
+ }
+ if (dlg->gene_description != NULL && !TextHasNoText (dlg->gene_description)) {
+ txt = SaveStringFromText (dlg->gene_description);
+ SetFeatQualValue (&(action->fields), Feat_qual_legal_gene_description, txt);
+ txt = MemFree (txt);
+ }
+ if (dlg->comment != NULL && !TextHasNoText (dlg->comment)) {
+ txt = SaveStringFromText (dlg->comment);
+ SetFeatQualValue (&(action->fields), Feat_qual_legal_note, txt);
+ txt = MemFree (txt);
+ }
+
+ return action;
+}
+
+
+static void AddTextToComment (ButtoN b, CharPtr text)
+{
+ ApplyFeatureActionDlgPtr dlg;
+ CharPtr orig_comment;
+ CharPtr new_comment;
+
+ dlg = (ApplyFeatureActionDlgPtr) GetObjectExtra (b);
+ if (dlg == NULL || StringHasNoText (text))
+ {
+ return;
+ }
+
+ orig_comment = SaveStringFromText (dlg->comment);
+ if (StringHasNoText (orig_comment))
+ {
+ SetTitle (dlg->comment, text);
+ }
+ else
+ {
+ new_comment = (CharPtr) MemNew ((StringLen (orig_comment) + StringLen (text) + 3) * sizeof (Char));
+ if (new_comment != NULL)
+ {
+ StringCpy (new_comment, orig_comment);
+ StringCat (new_comment, "; ");
+ StringCat (new_comment, text);
+ SetTitle (dlg->comment, new_comment);
+ new_comment = MemFree (new_comment);
+ }
+ }
+ orig_comment = MemFree (orig_comment);
+}
+
+
+static void Add18SITS28SToComment (ButtoN b)
+{
+ AddTextToComment (b, "contains 18S ribosomal RNA, internal transcribed spacer 1, 5.8S ribosomal RNA, internal transcribed spacer 2, and 28S ribosomal RNA");
+}
+
+
+static void Add16SIGS23SToComment (ButtoN b)
+{
+ AddTextToComment (b, "contains 16S ribosomal RNA, 16S-23S ribosomal RNA intergenic spacer, and 23S ribosomal RNA");
+}
+
+
+static void ChangeApplyFeatureActionDlgBtn (ButtoN b)
+{
+ ApplyFeatureActionDlgPtr dlg;
+
+ dlg = (ApplyFeatureActionDlgPtr) GetObjectExtra (b);
+ if (dlg == NULL) return;
+ ChangeApplyFeatureActionDlg (dlg);
+}
+
+
+static void ChangeApplyFeatureActionDlgGrp (GrouP g)
+{
+ ApplyFeatureActionDlgPtr dlg;
+
+ dlg = (ApplyFeatureActionDlgPtr) GetObjectExtra (g);
+ if (dlg == NULL) return;
+ ChangeApplyFeatureActionDlg (dlg);
+}
+
+
+static DialoG
+ApplyFeatureActionDialog
+(GrouP h,
+ ApplyFeatureActionPtr action,
+ Boolean indexer_version,
+ Nlm_ChangeNotifyProc change_notify,
+ Pointer change_userdata,
+ Nlm_ChangeNotifyProc redraw_notify,
+ Pointer redraw_userdata)
+{
+ ApplyFeatureActionDlgPtr dlg;
+ GrouP p, g, parts_group, x, indexer_only_group;
+ GrouP r, r2, r3, r4, frame_grp = NULL, comment_btns_grp = NULL;
+ ButtoN comment_btn;
+ ValNodePtr feature_type_list = NULL;
+ SeqFeatPtr sfp;
+
+ dlg = (ApplyFeatureActionDlgPtr) MemNew (sizeof (ApplyFeatureActionDlgData));
+ p = HiddenGroup (h, -1, 0, NULL);
+ SetGroupSpacing (p, 10, 10);
+ SetObjectExtra (p, dlg, StdCleanupExtraProc);
+
+ dlg->dialog = (DialoG) p;
+ dlg->todialog = ApplyFeatureActionToDialog;
+ dlg->fromdialog = DialogToApplyFeatureAction;
+ dlg->dialogmessage = NULL;
+ dlg->testdialog = TestApplyFeatureActionDialog;
+ dlg->change_notify = change_notify;
+ dlg->change_userdata = change_userdata;
+
+ ValNodeAddPointer (&feature_type_list, Feature_type_cds, StringSave ("CDS"));
+ ValNodeAddPointer (&feature_type_list, Feature_type_gene, StringSave ("gene"));
+ ValNodeAddPointer (&feature_type_list, Feature_type_preRNA, StringSave ("precursor RNA"));
+ ValNodeAddPointer (&feature_type_list, Feature_type_mRNA, StringSave ("mRNA"));
+ ValNodeAddPointer (&feature_type_list, Feature_type_tRNA, StringSave ("tRNA"));
+ ValNodeAddPointer (&feature_type_list, Feature_type_rRNA, StringSave ("rRNA"));
+ ValNodeAddPointer (&feature_type_list, Feature_type_snRNA, StringSave ("snRNA"));
+ ValNodeAddPointer (&feature_type_list, Feature_type_scRNA, StringSave ("scRNA"));
+ ValNodeAddPointer (&feature_type_list, Feature_type_otherRNA, StringSave ("misc RNA"));
+ ValNodeAddPointer (&feature_type_list, Feature_type_ncRNA, StringSave ("ncRNA"));
+ ValNodeAddPointer (&feature_type_list, Feature_type_tmRNA, StringSave ("tmRNA"));
+ AddImportFeaturesToChoiceList (&feature_type_list);
+
+ /* note - the ValNodeSelectionDialog will free feature_type_list when done */
+ dlg->feature_type_dlg = ValNodeSelectionDialog (p, feature_type_list, TALL_SELECTION_LIST, ValNodeStringName,
+ ValNodeSimpleDataFree, ValNodeStringCopy,
+ ValNodeChoiceMatch, "feature type",
+ redraw_notify, redraw_userdata, FALSE);
+
+ parts_group = HiddenGroup (p, 1, 0, NULL);
+ dlg->apply_to_parts = CheckBox (parts_group, "Apply to segmented parts, not segmented sequence", ChangeApplyFeatureActionDlgBtn);
+ SetObjectExtra (dlg->apply_to_parts, dlg, NULL);
+ x = HiddenGroup (parts_group, 2, 0, NULL);
+ StaticPrompt (x, "Apply only to particular numbered segment", 0, dialogTextHeight, programFont, 'l');
+ dlg->only_this_part = DialogText (x, "", 4, NULL);
+ Disable (dlg->only_this_part);
+
+
+ g = HiddenGroup (p, 2, 0, NULL);
+ dlg->partial5 = CheckBox (g, "Incomplete at 5' end", NULL);
+ dlg->partial3 = CheckBox (g, "Incomplete at 3' end", NULL);
+
+ /* group for strand */
+ dlg->strand_group = HiddenGroup (p, 2, 0, NULL);
+ SetObjectExtra (dlg->strand_group, dlg, NULL);
+ RadioButton (dlg->strand_group, "Plus Strand");
+ RadioButton (dlg->strand_group, "Minus Strand");
+ SetValue (dlg->strand_group, 1);
+
+ /* coordinates */
+ if (indexer_version)
+ {
+ indexer_only_group = HiddenGroup (p, -1, 0, NULL);
+ r2 = HiddenGroup (indexer_only_group, 5, 0, NULL);
+ dlg->use_whole_interval = HiddenGroup (r2, 0, 2, ChangeApplyFeatureActionDlgGrp);
+ SetObjectExtra (dlg->use_whole_interval, dlg, NULL);
+ RadioButton (dlg->use_whole_interval, "Use Whole Sequence Interval");
+ RadioButton (dlg->use_whole_interval, "Use these coordinates:");
+ r3 = HiddenGroup (r2, 0, 2, NULL);
+ StaticPrompt (r3, "", 0, dialogTextHeight, programFont, 'l');
+ r4 = HiddenGroup (r3, 4, 0, NULL);
+ StaticPrompt (r4, "From", 0, dialogTextHeight, programFont, 'l');
+ dlg->left_end = DialogText (r4, "1", 5, NULL);
+ StaticPrompt (r4, "To", 0, dialogTextHeight, programFont, 'l');
+ dlg->right_end = DialogText (r4, "1", 5, NULL);
+ SetValue (dlg->use_whole_interval, 1);
+
+ /* apply to some sequences or all sequences */
+ dlg->all_or_some_group = HiddenGroup (indexer_only_group, 1, 0, ChangeApplyFeatureActionDlgGrp);
+ SetObjectExtra (dlg->all_or_some_group, dlg, NULL);
+ RadioButton (dlg->all_or_some_group, "Apply to all sequences");
+ RadioButton (dlg->all_or_some_group, "Apply to sequences in this list");
+ dlg->accession_list_txt = DialogText (dlg->all_or_some_group, "", 25, NULL);
+ SetValue (dlg->all_or_some_group, 1);
+
+ dlg->add_redundant = CheckBox (indexer_only_group, "Add even if feature of same type already present", ChangeApplyFeatureActionDlgBtn);
+ SetObjectExtra (dlg->add_redundant, dlg, NULL);
+ if (action != NULL && action->type == Feature_type_cds) {
+ dlg->add_mrna = CheckBox (indexer_only_group, "Also add mRNA", ChangeApplyFeatureActionDlgBtn);
+ SetObjectExtra (dlg->add_mrna, dlg, NULL);
+ }
+
+ AlignObjects (ALIGN_CENTER, (HANDLE) r2, (HANDLE) dlg->all_or_some_group, (HANDLE) dlg->add_redundant, (HANDLE) dlg->add_mrna, NULL);
+ }
+
+ if (action != NULL && action->type == Feature_type_cds) {
+ frame_grp = HiddenGroup (p, 2, 0, NULL);
+ StaticPrompt (frame_grp, "Reading Frame", 0, dialogTextHeight, programFont, 'l');
+ dlg->reading_frame = PopupList (frame_grp, TRUE, NULL);
+ PopupItem (dlg->reading_frame, "1");
+ PopupItem (dlg->reading_frame, "2");
+ PopupItem (dlg->reading_frame, "3");
+ PopupItem (dlg->reading_frame, "Best");
+ SetValue (dlg->reading_frame, 4);
+ }
+ r = HiddenGroup (p, 2, 0, NULL);
+ if (action != NULL && action->type == Feature_type_cds) {
+
+ StaticPrompt (r, "Protein Name", 0, dialogTextHeight, programFont, 'l');
+ dlg->protein_name = DialogText (r, "", 20, NULL);
+ StaticPrompt (r, "Protein Description", 0, dialogTextHeight, programFont, 'l');
+ dlg->protein_description = DialogText (r, "", 20, NULL);
+ } else if (action != NULL && (action->type == Feature_type_preRNA
+ || action->type == Feature_type_mRNA
+ || action->type == Feature_type_tRNA
+ || action->type == Feature_type_rRNA
+ || action->type == Feature_type_snRNA
+ || action->type == Feature_type_scRNA
+ || action->type == Feature_type_otherRNA
+ || action->type == Feature_type_tmRNA
+ || action->type == Feature_type_ncRNA)) {
+ /* RNA name */
+ StaticPrompt (r, "RNA Name", 0, dialogTextHeight, programFont, 'l');
+ dlg->rna_name = DialogText (r, "", 20, NULL);
+ /* ncRNA class */
+ if (action->type == Feature_type_ncRNA) {
+ StaticPrompt (r, "ncRNA Class", 0, dialogTextHeight, programFont, 'l');
+ dlg->ncrna_class = CreatencRNAClassDialog (r, FALSE, NULL, NULL);
+ }
+ } else if (action != NULL && action->type != Feature_type_gene) {
+ StaticPrompt (r, "Qualifiers", 0, dialogTextHeight, programFont, 'l');
+ sfp = CreateFeatureWithImportFeatureQuals (action);
+ dlg->quals = NewCreateImportFields (r, GetFeatureNameFromFeatureType (action->type), sfp, FALSE);
+ sfp = SeqFeatFree (sfp);
+ }
+
+ /* gene qualifiers ( for all ) */
+ StaticPrompt (r, "Gene Locus", 0, dialogTextHeight, programFont, 'l');
+ dlg->gene_locus = DialogText (r, "", 20, NULL);
+ StaticPrompt (r, "Gene Description", 0, dialogTextHeight, programFont, 'l');
+ dlg->gene_description = DialogText (r, "", 20, NULL);
+ StaticPrompt (r, "Comment", 0, dialogTextHeight, programFont, 'l');
+ dlg->comment = DialogText (r, "", 20, NULL);
+ if (action != NULL && action->type == Feature_type_otherRNA && indexer_version) {
+ comment_btns_grp = HiddenGroup (p, 2, 0, NULL);
+ comment_btn = PushButton (comment_btns_grp, "Add '18S-ITS-5.8S-ITS-28S' to comment", Add18SITS28SToComment);
+ SetObjectExtra (comment_btn, dlg, NULL);
+ comment_btn = PushButton (comment_btns_grp, "Add '16S-IGS-23S' to comment", Add16SIGS23SToComment);
+ SetObjectExtra (comment_btn, dlg, NULL);
+ }
+
+ AlignObjects (ALIGN_CENTER, (HANDLE) dlg->feature_type_dlg,
+ (HANDLE) parts_group,
+ (HANDLE) g,
+ (HANDLE) dlg->strand_group,
+ (HANDLE) indexer_only_group,
+ (HANDLE) r,
+ (HANDLE) (frame_grp != NULL ? frame_grp : comment_btns_grp),
+ NULL);
+
+ return (DialoG) p;
+}
+
+
+typedef struct removefeatureactiondlg {
+ DIALOG_MESSAGE_BLOCK
+ DialoG feature_type_dlg;
+ DialoG constraint_dlg;
+ Nlm_ChangeNotifyProc change_notify;
+ Pointer change_userdata;
+} RemoveFeatureActionDlgData, PNTR RemoveFeatureActionDlgPtr;
+
+
+static void RemoveFeatureActionToDialog (DialoG d, Pointer data)
+{
+ RemoveFeatureActionDlgPtr dlg;
+ RemoveFeatureActionPtr action;
+ ValNode vn;
+
+ dlg = (RemoveFeatureActionDlgPtr) GetObjectExtra (d);
+ if (dlg == NULL) return;
+
+ action = (RemoveFeatureActionPtr) data;
+ if (action == NULL) {
+ PointerToDialog (dlg->feature_type_dlg, NULL);
+ PointerToDialog (dlg->constraint_dlg, NULL);
+ } else {
+ vn.choice = action->type;
+ vn.data.ptrvalue = NULL;
+ vn.next = NULL;
+ PointerToDialog (dlg->feature_type_dlg, &vn);
+ PointerToDialog (dlg->constraint_dlg, action->constraint);
+ }
+
+}
+
+
+static Pointer DialogToRemoveFeatureAction (DialoG d)
+{
+ RemoveFeatureActionDlgPtr dlg;
+ RemoveFeatureActionPtr action;
+ ValNodePtr vnp;
+
+ dlg = (RemoveFeatureActionDlgPtr) GetObjectExtra (d);
+ if (dlg == NULL) return NULL;
+
+ vnp = DialogToPointer (dlg->feature_type_dlg);
+ if (vnp == NULL) return NULL;
+
+ action = RemoveFeatureActionNew ();
+ action->type = vnp->choice;
+ vnp = ValNodeFree (vnp);
+ action->constraint = DialogToPointer (dlg->constraint_dlg);
+ return action;
+}
+
+
+static ValNodePtr TestRemoveFeatureActionDialog (DialoG d)
+{
+ RemoveFeatureActionDlgPtr dlg;
+ dlg = (RemoveFeatureActionDlgPtr) GetObjectExtra (d);
+ if (dlg == NULL) return NULL;
+ return TestDialog (dlg->feature_type_dlg);
+}
+
+
+static DialoG
+RemoveFeatureActionDialog
+(GrouP h,
+ Boolean indexer_version,
+ Nlm_ChangeNotifyProc change_notify,
+ Pointer change_userdata)
+{
+ RemoveFeatureActionDlgPtr dlg;
+ GrouP p;
+
+ dlg = (RemoveFeatureActionDlgPtr) MemNew (sizeof (RemoveFeatureActionDlgData));
+ p = HiddenGroup (h, -1, 0, NULL);
+ SetGroupSpacing (p, 10, 10);
+ SetObjectExtra (p, dlg, StdCleanupExtraProc);
+
+ dlg->dialog = (DialoG) p;
+ dlg->todialog = RemoveFeatureActionToDialog;
+ dlg->fromdialog = DialogToRemoveFeatureAction;
+ dlg->dialogmessage = NULL;
+ dlg->testdialog = TestRemoveFeatureActionDialog;
+ dlg->change_notify = change_notify;
+ dlg->change_userdata = change_userdata;
+
+ dlg->feature_type_dlg = FeatureTypeDialog (p, change_notify, change_userdata);
+ dlg->constraint_dlg = ConstraintSetDialog (p, change_notify, change_userdata);
+
+ AlignObjects (ALIGN_CENTER, (HANDLE) dlg->feature_type_dlg, (HANDLE) dlg->constraint_dlg, NULL);
+
+ return (DialoG) p;
+}
+
+
+typedef struct editfeaturelocationactiondlg {
+ DIALOG_MESSAGE_BLOCK
+ DialoG feature_type_dlg;
+ PopuP feature_edit_type;
+ GrouP strand_edit_grp;
+ PopuP strand_from;
+ PopuP strand_to;
+ GrouP set_5_partial_grp;
+ PopuP set_5_type;
+ ButtoN extend5;
+ PopuP clear_5_type;
+ GrouP set_3_partial_grp;
+ PopuP set_3_type;
+ ButtoN extend3;
+ PopuP clear_3_type;
+ PopuP convert_loc;
+ DialoG constraint_dlg;
+ Nlm_ChangeNotifyProc change_notify;
+ Pointer change_userdata;
+} EditFeatureLocationActionDlgData, PNTR EditFeatureLocationActionDlgPtr;
+
+
+static void ChangeFeatureLocationEditType (PopuP p)
+{
+ EditFeatureLocationActionDlgPtr dlg;
+ Int2 val;
+
+ dlg = (EditFeatureLocationActionDlgPtr) GetObjectExtra (p);
+ if (dlg == NULL) return;
+
+ Hide (dlg->strand_edit_grp);
+ Hide (dlg->set_5_partial_grp);
+ Hide (dlg->clear_5_type);
+ Hide (dlg->set_3_partial_grp);
+ Hide (dlg->clear_3_type);
+ Hide (dlg->convert_loc);
+
+ val = GetValue (dlg->feature_edit_type);
+ switch (val) {
+ case 1:
+ Show (dlg->strand_edit_grp);
+ break;
+ case 2:
+ Show (dlg->set_5_partial_grp);
+ break;
+ case 3:
+ Show (dlg->clear_5_type);
+ break;
+ case 4:
+ Show (dlg->set_3_partial_grp);
+ break;
+ case 5:
+ Show (dlg->clear_3_type);
+ break;
+ case 6:
+ Show (dlg->convert_loc);
+ break;
+ }
+ if (dlg->change_notify != NULL) {
+ (dlg->change_notify) (dlg->change_userdata);
+ }
+}
+
+
+static void ResetFeatureLocationActionEditType (EditFeatureLocationActionDlgPtr dlg)
+{
+ if (dlg != NULL) {
+ SetValue (dlg->feature_edit_type, 1);
+ SetValue (dlg->strand_from, 1);
+ SetValue (dlg->strand_to, 1);
+ }
+}
+
+
+static void EditFeatureLocationActionToDialog (DialoG d, Pointer data)
+{
+ EditFeatureLocationActionDlgPtr dlg;
+ EditFeatureLocationActionPtr action;
+ ValNode vn;
+ EditLocationStrandPtr strand;
+ Partial5SetActionPtr set5;
+ Partial3SetActionPtr set3;
+
+ dlg = (EditFeatureLocationActionDlgPtr) GetObjectExtra (d);
+ if (dlg == NULL) return;
+
+ action = (EditFeatureLocationActionPtr) data;
+ if (action == NULL) {
+ PointerToDialog (dlg->feature_type_dlg, NULL);
+ ResetFeatureLocationActionEditType (dlg);
+ PointerToDialog (dlg->constraint_dlg, NULL);
+ } else {
+ vn.choice = action->type;
+ vn.data.ptrvalue = NULL;
+ vn.next = NULL;
+ PointerToDialog (dlg->feature_type_dlg, &vn);
+ PointerToDialog (dlg->constraint_dlg, action->constraint);
+ if (action->action == NULL) {
+ ResetFeatureLocationActionEditType (dlg);
+ } else {
+ switch (action->action->choice) {
+ case LocationEditType_strand:
+ SetValue (dlg->feature_edit_type, 1);
+ strand = (EditLocationStrandPtr) action->action->data.ptrvalue;
+ if (strand == NULL) {
+ SetValue (dlg->strand_from, 1);
+ SetValue (dlg->strand_to, 1);
+ } else {
+ switch (strand->strand_from) {
+ case Feature_location_strand_from_any:
+ SetValue (dlg->strand_from, 1);
+ break;
+ case Feature_location_strand_from_plus:
+ SetValue (dlg->strand_from, 2);
+ break;
+ case Feature_location_strand_from_minus:
+ SetValue (dlg->strand_from, 3);
+ break;
+ case Feature_location_strand_from_unknown:
+ SetValue (dlg->strand_from, 4);
+ break;
+ case Feature_location_strand_from_both:
+ SetValue (dlg->strand_from, 5);
+ break;
+ default:
+ SetValue (dlg->strand_from, 1);
+ break;
+ }
+ switch (strand->strand_to) {
+ case Feature_location_strand_to_plus:
+ SetValue (dlg->strand_to, 1);
+ break;
+ case Feature_location_strand_to_minus:
+ SetValue (dlg->strand_to, 2);
+ break;
+ case Feature_location_strand_to_unknown:
+ SetValue (dlg->strand_to, 3);
+ break;
+ case Feature_location_strand_to_both:
+ SetValue (dlg->strand_to, 4);
+ break;
+ case Feature_location_strand_to_reverse:
+ SetValue (dlg->strand_to, 5);
+ break;
+ default:
+ SetValue (dlg->strand_to, 1);
+ break;
+ }
+ }
+ break;
+ case LocationEditType_set_5_partial:
+ SetValue (dlg->feature_edit_type, 2);
+ set5 = (Partial5SetActionPtr) action->action->data.ptrvalue;
+ if (set5 == NULL) {
+ SetValue (dlg->set_5_type, 1);
+ SetStatus (dlg->extend5, FALSE);
+ } else {
+ switch (set5->constraint) {
+ case Partial_5_set_constraint_all:
+ SetValue (dlg->set_5_type, 1);
+ break;
+ case Partial_5_set_constraint_at_end:
+ SetValue (dlg->set_5_type, 2);
+ break;
+ case Partial_5_set_constraint_bad_start:
+ SetValue (dlg->set_5_type, 3);
+ break;
+ case Partial_5_set_constraint_frame_not_one:
+ SetValue (dlg->set_5_type, 4);
+ break;
+ default:
+ SetValue (dlg->set_5_type, 1);
+ break;
+ }
+ SetStatus (dlg->extend5, set5->extend);
+ }
+ break;
+ case LocationEditType_clear_5_partial:
+ SetValue (dlg->feature_edit_type, 3);
+ switch (action->action->data.intvalue) {
+ case Partial_5_clear_constraint_all:
+ SetValue (dlg->clear_5_type, 1);
+ break;
+ case Partial_5_clear_constraint_not_at_end:
+ SetValue (dlg->clear_5_type, 2);
+ break;
+ case Partial_5_clear_constraint_good_start:
+ SetValue (dlg->clear_5_type, 3);
+ break;
+ default:
+ SetValue (dlg->clear_5_type, 1);
+ break;
+ }
+ break;
+ case LocationEditType_set_3_partial:
+ SetValue (dlg->feature_edit_type, 4);
+ set3 = (Partial3SetActionPtr) action->action->data.ptrvalue;
+ if (set3 == NULL) {
+ SetValue (dlg->set_3_type, 1);
+ SetStatus (dlg->extend3, FALSE);
+ } else {
+ switch (set3->constraint) {
+ case Partial_3_set_constraint_all:
+ SetValue (dlg->set_3_type, 1);
+ break;
+ case Partial_3_set_constraint_at_end:
+ SetValue (dlg->set_3_type, 2);
+ break;
+ case Partial_3_set_constraint_bad_end:
+ SetValue (dlg->set_3_type, 3);
+ break;
+ default:
+ SetValue (dlg->set_3_type, 1);
+ break;
+ }
+ SetStatus (dlg->extend3, set3->extend);
+ }
+ break;
+ case LocationEditType_clear_3_partial:
+ SetValue (dlg->feature_edit_type, 5);
+ switch (action->action->data.intvalue) {
+ case Partial_3_clear_constraint_all:
+ SetValue (dlg->clear_3_type, 1);
+ break;
+ case Partial_3_clear_constraint_not_at_end:
+ SetValue (dlg->clear_3_type, 2);
+ break;
+ case Partial_3_clear_constraint_good_end:
+ SetValue (dlg->clear_3_type, 3);
+ break;
+ default:
+ SetValue (dlg->clear_3_type, 1);
+ break;
+ }
+ break;
+ case LocationEditType_convert:
+ SetValue (dlg->feature_edit_type, 6);
+ switch (action->action->data.intvalue) {
+ case Convert_location_type_join:
+ SetValue (dlg->convert_loc, 1);
+ break;
+ case Convert_location_type_order:
+ SetValue (dlg->convert_loc, 2);
+ break;
+ case Convert_location_type_merge:
+ SetValue (dlg->convert_loc, 3);
+ break;
+ default:
+ SetValue (dlg->convert_loc, 1);
+ break;
+ }
+ break;
+ default:
+ ResetFeatureLocationActionEditType (dlg);
+ break;
+ }
+ }
+ }
+ ChangeFeatureLocationEditType (dlg->feature_edit_type);
+}
+
+
+static Pointer DialogToEditFeatureLocationAction (DialoG d)
+{
+ EditFeatureLocationActionDlgPtr dlg;
+ EditFeatureLocationActionPtr action;
+ ValNodePtr vnp;
+ Int2 val, val2;
+ EditLocationStrandPtr strand;
+ Partial5SetActionPtr set5;
+ Partial3SetActionPtr set3;
+
+ dlg = (EditFeatureLocationActionDlgPtr) GetObjectExtra (d);
+ if (dlg == NULL) return NULL;
+
+ vnp = DialogToPointer (dlg->feature_type_dlg);
+ if (vnp == NULL) return NULL;
+
+ action = EditFeatureLocationActionNew ();
+ action->type = vnp->choice;
+ vnp = ValNodeFree (vnp);
+ action->constraint = DialogToPointer (dlg->constraint_dlg);
+
+ val = GetValue (dlg->feature_edit_type);
+ switch (val) {
+ case 1:
+ strand = EditLocationStrandNew ();
+ action->action = ValNodeNew (NULL);
+ action->action->choice = LocationEditType_strand;
+ action->action->data.ptrvalue = strand;
+ val2 = GetValue (dlg->strand_from);
+ switch (val2) {
+ case 1:
+ strand->strand_from = Feature_location_strand_from_any;
+ break;
+ case 2:
+ strand->strand_from = Feature_location_strand_from_plus;
+ break;
+ case 3:
+ strand->strand_from = Feature_location_strand_from_minus;
+ break;
+ case 4:
+ strand->strand_from = Feature_location_strand_from_unknown;
+ break;
+ case 5:
+ strand->strand_from = Feature_location_strand_from_both;
+ break;
+ default:
+ action = EditFeatureLocationActionFree (action);
+ return NULL;
+ }
+ val2 = GetValue (dlg->strand_to);
+ switch (val2) {
+ case 1:
+ strand->strand_to = Feature_location_strand_to_plus;
+ break;
+ case 2:
+ strand->strand_to = Feature_location_strand_to_minus;
+ break;
+ case 3:
+ strand->strand_to = Feature_location_strand_to_unknown;
+ break;
+ case 4:
+ strand->strand_to = Feature_location_strand_to_both;
+ break;
+ case 5:
+ strand->strand_to = Feature_location_strand_to_reverse;
+ break;
+ default:
+ action = EditFeatureLocationActionFree (action);
+ break;
+ }
+ break;
+ case 2:
+ set5 = Partial5SetActionNew ();
+ action->action = ValNodeNew (NULL);
+ action->action->choice = LocationEditType_set_5_partial;
+ action->action->data.ptrvalue = set5;
+ set5->extend = GetStatus (dlg->extend5);
+ val2 = GetValue (dlg->set_5_type);
+ switch (val2) {
+ case 1:
+ set5->constraint = Partial_5_set_constraint_all;
+ break;
+ case 2:
+ set5->constraint = Partial_5_set_constraint_at_end;
+ break;
+ case 3:
+ set5->constraint = Partial_5_set_constraint_bad_start;
+ break;
+ case 4:
+ set5->constraint = Partial_5_set_constraint_frame_not_one;
+ break;
+ default:
+ action = EditFeatureLocationActionFree (action);
+ return NULL;
+ break;
+ }
+ break;
+ case 3:
+ action->action = ValNodeNew (NULL);
+ action->action->choice = LocationEditType_clear_5_partial;
+ val2 = GetValue (dlg->clear_5_type);
+ switch (val2) {
+ case 1:
+ action->action->data.intvalue = Partial_5_clear_constraint_all;
+ break;
+ case 2:
+ action->action->data.intvalue = Partial_5_clear_constraint_not_at_end;
+ break;
+ case 3:
+ action->action->data.intvalue = Partial_5_clear_constraint_good_start;
+ break;
+ default:
+ action = EditFeatureLocationActionFree (action);
+ return NULL;
+ break;
+ }
+ break;
+ case 4:
+ set3 = Partial3SetActionNew ();
+ action->action = ValNodeNew (NULL);
+ action->action->choice = LocationEditType_set_3_partial;
+ action->action->data.ptrvalue = set3;
+ set3->extend = GetStatus (dlg->extend3);
+ val2 = GetValue (dlg->set_3_type);
+ switch (val2) {
+ case 1:
+ set3->constraint = Partial_3_set_constraint_all;
+ break;
+ case 2:
+ set3->constraint = Partial_3_set_constraint_at_end;
+ break;
+ case 3:
+ set3->constraint = Partial_3_set_constraint_bad_end;
+ break;
+ default:
+ action = EditFeatureLocationActionFree (action);
+ return NULL;
+ break;
+ }
+ break;
+ case 5:
+ action->action = ValNodeNew (NULL);
+ action->action->choice = LocationEditType_clear_3_partial;
+ val2 = GetValue (dlg->clear_3_type);
+ switch (val2) {
+ case 1:
+ action->action->data.intvalue = Partial_3_clear_constraint_all;
+ break;
+ case 2:
+ action->action->data.intvalue = Partial_3_clear_constraint_not_at_end;
+ break;
+ case 3:
+ action->action->data.intvalue = Partial_3_clear_constraint_good_end;
+ break;
+ default:
+ action = EditFeatureLocationActionFree (action);
+ return NULL;
+ break;
+ }
+ break;
+ case 6:
+ action->action = ValNodeNew (NULL);
+ action->action->choice = LocationEditType_convert;
+ val2 = GetValue (dlg->convert_loc);
+ switch (val2) {
+ case 1:
+ action->action->data.intvalue = Convert_location_type_join;
+ break;
+ case 2:
+ action->action->data.intvalue = Convert_location_type_order;
+ break;
+ case 3:
+ action->action->data.intvalue = Convert_location_type_merge;
+ break;
+ default:
+ action = EditFeatureLocationActionFree (action);
+ return NULL;
+ break;
+ }
+ break;
+ default:
+ action = EditFeatureLocationActionFree (action);
+ break;
+ }
+
+ return action;
+}
+
+
+static ValNodePtr TestEditFeatureLocationActionDialog (DialoG d)
+{
+ EditFeatureLocationActionDlgPtr dlg;
+ EditFeatureLocationActionPtr a;
+ ValNodePtr err_list = NULL;
+
+ dlg = (EditFeatureLocationActionDlgPtr) GetObjectExtra (d);
+ if (dlg == NULL) return NULL;
+ a = (EditFeatureLocationActionPtr) DialogToPointer (d);
+ if (a == NULL) {
+ ValNodeAddPointer (&err_list, 0, "bad action");
+ } else {
+ a = EditFeatureLocationActionFree (a);
+ err_list = TestDialog (dlg->feature_type_dlg);
+ }
+ return err_list;
+}
+
+
+static void ChangeEditFeatureLocationPopup (PopuP p)
+{
+ EditFeatureLocationActionDlgPtr dlg;
+
+ dlg = (EditFeatureLocationActionDlgPtr) GetObjectExtra (p);
+ if (dlg != NULL && dlg->change_notify != NULL) {
+ (dlg->change_notify) (dlg->change_userdata);
+ }
+}
+
+
+static void ChangeEditFeatureLocationButton (ButtoN b)
+{
+ EditFeatureLocationActionDlgPtr dlg;
+
+ dlg = (EditFeatureLocationActionDlgPtr) GetObjectExtra (b);
+ if (dlg != NULL && dlg->change_notify != NULL) {
+ (dlg->change_notify) (dlg->change_userdata);
+ }
+}
+
+
+static DialoG
+EditFeatureLocationActionDialog
+(GrouP h,
+ Boolean indexer_version,
+ Nlm_ChangeNotifyProc change_notify,
+ Pointer change_userdata)
+{
+ EditFeatureLocationActionDlgPtr dlg;
+ GrouP p;
+ GrouP g;
+
+ dlg = (EditFeatureLocationActionDlgPtr) MemNew (sizeof (EditFeatureLocationActionDlgData));
+ p = HiddenGroup (h, -1, 0, NULL);
+ SetGroupSpacing (p, 10, 10);
+ SetObjectExtra (p, dlg, StdCleanupExtraProc);
+
+ dlg->dialog = (DialoG) p;
+ dlg->todialog = EditFeatureLocationActionToDialog;
+ dlg->fromdialog = DialogToEditFeatureLocationAction;
+ dlg->dialogmessage = NULL;
+ dlg->testdialog = TestEditFeatureLocationActionDialog;
+ dlg->change_notify = change_notify;
+ dlg->change_userdata = change_userdata;
+
+ dlg->feature_type_dlg = FeatureTypeDialog (p, change_notify, change_userdata);
+
+ dlg->feature_edit_type = PopupList (p, TRUE, ChangeFeatureLocationEditType);
+ SetObjectExtra (dlg->feature_edit_type, dlg, NULL);
+ PopupItem (dlg->feature_edit_type, "Edit Strand");
+ PopupItem (dlg->feature_edit_type, "Set 5' Partial");
+ PopupItem (dlg->feature_edit_type, "Clear 5' Partial");
+ PopupItem (dlg->feature_edit_type, "Set 3' Partial");
+ PopupItem (dlg->feature_edit_type, "Clear 3' Partial");
+ PopupItem (dlg->feature_edit_type, "Convert location");
+ SetValue (dlg->feature_edit_type, 1);
+
+ g = HiddenGroup (p, 0, 0, NULL);
+ dlg->strand_edit_grp = HiddenGroup (g, 4, 0, NULL);
+
+ /* strand */
+ StaticPrompt (dlg->strand_edit_grp, "Convert location strand from", 0, dialogTextHeight, systemFont, 'l');
+ dlg->strand_from = PopupList (dlg->strand_edit_grp, TRUE, ChangeEditFeatureLocationPopup);
+ SetObjectExtra (dlg->strand_from, dlg, NULL);
+ PopupItem (dlg->strand_from, "Any");
+ PopupItem (dlg->strand_from, "Plus");
+ PopupItem (dlg->strand_from, "Minus");
+ PopupItem (dlg->strand_from, "Unknown");
+ PopupItem (dlg->strand_from, "Both");
+ SetValue (dlg->strand_from, 1);
+ dlg->strand_to = PopupList (dlg->strand_edit_grp, TRUE, ChangeEditFeatureLocationPopup);
+ SetObjectExtra (dlg->strand_to, dlg, NULL);
+ PopupItem (dlg->strand_to, "Plus");
+ PopupItem (dlg->strand_to, "Minus");
+ PopupItem (dlg->strand_to, "Unknown");
+ PopupItem (dlg->strand_to, "Both");
+ PopupItem (dlg->strand_to, "Reverse");
+ SetValue (dlg->strand_to, 5);
+
+ /* partials */
+ dlg->set_5_partial_grp = HiddenGroup (g, 2, 0, NULL);
+ dlg->set_5_type = PopupList (dlg->set_5_partial_grp, TRUE, ChangeEditFeatureLocationPopup);
+ SetObjectExtra (dlg->set_5_type, dlg, NULL);
+ PopupItem (dlg->set_5_type, "All");
+ PopupItem (dlg->set_5_type, "If 5' end at end of sequence");
+ PopupItem (dlg->set_5_type, "If bad start codon");
+ PopupItem (dlg->set_5_type, "If CDS frame > 1");
+ SetValue (dlg->set_5_type, 1);
+ dlg->extend5 = CheckBox (dlg->set_5_partial_grp, "Extend to 5' end if partial is set", ChangeEditFeatureLocationButton);
+ SetObjectExtra (dlg->extend5, dlg, NULL);
+
+ dlg->clear_5_type = PopupList (g, TRUE, ChangeEditFeatureLocationPopup);
+ SetObjectExtra (dlg->clear_5_type, dlg, NULL);
+ PopupItem (dlg->clear_5_type, "All");
+ PopupItem (dlg->clear_5_type, "If 5' end not at end of sequence");
+ PopupItem (dlg->clear_5_type, "If good start codon");
+ SetValue (dlg->clear_5_type, 1);
+
+ dlg->set_3_partial_grp = HiddenGroup (g, 2, 0, NULL);
+ dlg->set_3_type = PopupList (dlg->set_3_partial_grp, TRUE, ChangeEditFeatureLocationPopup);
+ SetObjectExtra (dlg->set_3_type, dlg, NULL);
+ PopupItem (dlg->set_3_type, "All");
+ PopupItem (dlg->set_3_type, "If 3' end at end of sequence");
+ PopupItem (dlg->set_3_type, "If bad stop codon");
+ SetValue (dlg->set_3_type, 1);
+ dlg->extend3 = CheckBox (dlg->set_3_partial_grp, "Extend to 3' end if partial is set", ChangeEditFeatureLocationButton);
+ SetObjectExtra (dlg->extend3, dlg, NULL);
+
+ dlg->clear_3_type = PopupList (g, TRUE, ChangeEditFeatureLocationPopup);
+ SetObjectExtra (dlg->clear_3_type, dlg, NULL);
+ PopupItem (dlg->clear_3_type, "All");
+ PopupItem (dlg->clear_3_type, "If 3' end not at end of sequence");
+ PopupItem (dlg->clear_3_type, "If good stop codon");
+ SetValue (dlg->clear_3_type, 1);
+
+ /* convert location */
+ dlg->convert_loc = PopupList (g, TRUE, ChangeEditFeatureLocationPopup);
+ SetObjectExtra (dlg->convert_loc, dlg, NULL);
+ PopupItem (dlg->convert_loc, "Join");
+ PopupItem (dlg->convert_loc, "Order");
+ PopupItem (dlg->convert_loc, "Single Interval");
+ SetValue (dlg->convert_loc, 1);
+
+ AlignObjects (ALIGN_MIDDLE, (HANDLE) dlg->strand_edit_grp,
+ (HANDLE) dlg->set_5_partial_grp,
+ (HANDLE) dlg->clear_5_type,
+ (HANDLE) dlg->set_3_partial_grp,
+ (HANDLE) dlg->clear_3_type,
+ (HANDLE) dlg->convert_loc,
+ (HANDLE) NULL);
+
+ dlg->constraint_dlg = ConstraintSetDialog (p, change_notify, change_userdata);
+
+ AlignObjects (ALIGN_CENTER, (HANDLE) dlg->feature_type_dlg,
+ (HANDLE) dlg->feature_edit_type,
+ (HANDLE) g,
+ (HANDLE) dlg->constraint_dlg,
+ NULL);
+
+ ChangeFeatureLocationEditType (dlg->feature_edit_type);
+
+ return (DialoG) p;
+}
+
+
+typedef struct parsesrcdlg {
+ DIALOG_MESSAGE_BLOCK
+ PopuP main_choice;
+ GrouP src_grp;
+ DialoG src_qual_choice;
+ GrouP feat_or_desc;
+ TexT structured_comment_field;
+ Nlm_ChangeNotifyProc change_notify;
+ Pointer change_userdata;
+} ParseSrcDlgData, PNTR ParseSrcDlgPtr;
+
+
+const CharPtr kTaxnameAfterBinomialString = "Taxname after binomial";
+
+static void ChangeParseSrcDialogPopup (PopuP p)
+{
+ ParseSrcDlgPtr dlg;
+ Int2 val;
+
+ dlg = (ParseSrcDlgPtr) GetObjectExtra (p);
+ if (dlg == NULL) return;
+
+ val = GetValue (dlg->main_choice);
+ switch (val) {
+ case 4:
+ Show (dlg->src_grp);
+ Hide (dlg->structured_comment_field);
+ break;
+ case 7:
+ Show (dlg->structured_comment_field);
+ Hide (dlg->src_grp);
+ break;
+ default:
+ Hide (dlg->structured_comment_field);
+ Hide (dlg->src_grp);
+ break;
+ }
+ if (dlg->change_notify != NULL) {
+ (dlg->change_notify) (dlg->change_userdata);
+ }
+}
+
+
+static void ChangeParseSrcDialogText (TexT t)
+{
+ ParseSrcDlgPtr dlg;
+
+ dlg = (ParseSrcDlgPtr) GetObjectExtra (t);
+ if (dlg == NULL) return;
+
+ if (dlg->change_notify != NULL) {
+ (dlg->change_notify) (dlg->change_userdata);
+ }
+}
+
+
+static void ParseSrcToDialog (DialoG d, Pointer data)
+{
+ ParseSrcDlgPtr dlg;
+ ValNodePtr src;
+ ParseSrcOrgPtr org;
+ ValNode vn;
+
+ dlg = (ParseSrcDlgPtr) GetObjectExtra (d);
+ if (dlg == NULL) return;
+
+ src = (ValNodePtr) data;
+ if (src == NULL) {
+ SetValue (dlg->main_choice, 4);
+ vn.choice = 0;
+ vn.data.ptrvalue = kTaxnameAfterBinomialString;
+ vn.next = NULL;
+ PointerToDialog (dlg->src_qual_choice, &vn);
+ SetValue (dlg->feat_or_desc, 1);
+ } else {
+ switch (src->choice) {
+ case ParseSrc_defline:
+ SetValue (dlg->main_choice, 1);
+ break;
+ case ParseSrc_flatfile:
+ SetValue (dlg->main_choice, 2);
+ break;
+ case ParseSrc_local_id:
+ SetValue (dlg->main_choice, 3);
+ break;
+ case ParseSrc_org:
+ SetValue (dlg->main_choice, 4);
+ org = (ParseSrcOrgPtr) src->data.ptrvalue;
+ if (org == NULL) {
+ SetValue (dlg->feat_or_desc, 1);
+ PointerToDialog (dlg->src_qual_choice, NULL);
+ } else {
+ switch (org->type) {
+ case Object_type_constraint_any:
+ SetValue (dlg->feat_or_desc, 1);
+ break;
+ case Object_type_constraint_feature:
+ SetValue (dlg->feat_or_desc, 2);
+ break;
+ case Object_type_constraint_descriptor:
+ SetValue (dlg->feat_or_desc, 3);
+ break;
+ default:
+ SetValue (dlg->feat_or_desc, 1);
+ break;
+ }
+ if (org->field == NULL) {
+ PointerToDialog (dlg->src_qual_choice, NULL);
+ } else if (org->field->choice == ParseSrcOrgChoice_taxname_after_binomial) {
+ vn.choice = 0;
+ vn.data.ptrvalue = kTaxnameAfterBinomialString;
+ vn.next = NULL;
+ PointerToDialog (dlg->src_qual_choice, &vn);
+ } else if (org->field->choice == ParseSrcOrgChoice_source_qual) {
+ vn.choice = 0;
+ vn.data.ptrvalue = GetSourceQualName (org->field->data.intvalue);
+ vn.next = NULL;
+ PointerToDialog (dlg->src_qual_choice, &vn);
+ } else {
+ PointerToDialog (dlg->src_qual_choice, NULL);
+ }
+ }
+ break;
+ case ParseSrc_comment:
+ SetValue (dlg->main_choice, 5);
+ break;
+ case ParseSrc_bankit_comment:
+ SetValue (dlg->main_choice, 6);
+ break;
+ case ParseSrc_structured_comment:
+ SetValue (dlg->main_choice, 7);
+ SetTitle (dlg->structured_comment_field, src->data.ptrvalue);
+ break;
+ case ParseSrc_file_id:
+ SetValue (dlg->main_choice, 8);
+ break;
+ default:
+ SetValue (dlg->main_choice, 0);
+ break;
+ }
+ }
+
+ ChangeParseSrcDialogPopup (dlg->main_choice);
+}
+
+
+static Pointer DialogToParseSrc (DialoG d)
+{
+ ParseSrcDlgPtr dlg;
+ ParseSrcOrgPtr org;
+ ValNodePtr src = NULL, vnp;
+ Int2 val;
+
+ dlg = (ParseSrcDlgPtr) GetObjectExtra (d);
+ if (dlg == NULL) return NULL;
+
+ val = GetValue (dlg->main_choice);
+ switch (val) {
+ case 1:
+ src = ValNodeNew (NULL);
+ src->choice = ParseSrc_defline;
+ break;
+ case 2:
+ src = ValNodeNew (NULL);
+ src->choice = ParseSrc_flatfile;
+ break;
+ case 3:
+ src = ValNodeNew (NULL);
+ src->choice = ParseSrc_local_id;
+ break;
+ case 4:
+ org = ParseSrcOrgNew ();
+ switch (GetValue (dlg->feat_or_desc)) {
+ case 1:
+ org->type = Object_type_constraint_any;
+ break;
+ case 2:
+ org->type = Object_type_constraint_feature;
+ break;
+ case 3:
+ org->type = Object_type_constraint_descriptor;
+ break;
+ default:
+ org->type = Object_type_constraint_any;
+ break;
+ }
+ vnp = (ValNodePtr) DialogToPointer (dlg->src_qual_choice);
+ if (vnp != NULL) {
+ org->field = ValNodeNew (NULL);
+ if (StringCmp (vnp->data.ptrvalue, kTaxnameAfterBinomialString) == 0) {
+ org->field->choice = ParseSrcOrgChoice_taxname_after_binomial;
+ } else {
+ org->field->choice = ParseSrcOrgChoice_source_qual;
+ org->field->data.intvalue = GetSourceQualTypeByName (vnp->data.ptrvalue);
+ }
+ vnp = ValNodeFree (vnp);
+ }
+ src = ValNodeNew (NULL);
+ src->choice = ParseSrc_org;
+ src->data.ptrvalue = org;
+ break;
+ case 5:
+ src = ValNodeNew (NULL);
+ src->choice = ParseSrc_comment;
+ break;
+ case 6:
+ src = ValNodeNew (NULL);
+ src->choice = ParseSrc_bankit_comment;
+ break;
+ case 7:
+ src = ValNodeNew (NULL);
+ src->choice = ParseSrc_structured_comment;
+ src->data.ptrvalue = SaveStringFromText (dlg->structured_comment_field);
+ break;
+ case 8:
+ src = ValNodeNew (NULL);
+ src->choice = ParseSrc_file_id;
+ break;
+ }
+ return src;
+}
+
+
+static ValNodePtr TestParseSrcDialog (DialoG d)
+{
+ ParseSrcDlgPtr dlg;
+ Int2 val;
+ ValNodePtr err_list = NULL;
+
+ dlg = (ParseSrcDlgPtr) GetObjectExtra (d);
+ if (dlg == NULL) return NULL;
+
+ val = GetValue (dlg->main_choice);
+ if (val < 1 || val > 8) {
+ ValNodeAddPointer (&err_list, 0, "main choice");
+ } else if (val == 4) {
+ ValNodeLink (&err_list, TestDialog (dlg->src_qual_choice));
+ } else if (val == 7 && TextHasNoText (dlg->structured_comment_field)) {
+ ValNodeAddPointer (&err_list, 0, "structured comment field");
+ }
+ return err_list;
+}
+
+
+static DialoG ParseSrcDialog (GrouP h, Nlm_ChangeNotifyProc change_notify, Pointer change_userdata)
+{
+ ParseSrcDlgPtr dlg;
+ GrouP p, g;
+ ValNodePtr qual_list;
+ ValNode vn;
+
+ p = HiddenGroup (h, 2, 0, NULL);
+ SetGroupSpacing (p, 10, 10);
+
+ dlg = (ParseSrcDlgPtr) MemNew (sizeof (ParseSrcDlgData));
+ SetObjectExtra (p, dlg, StdCleanupExtraProc);
+
+ dlg->dialog = (DialoG) p;
+ dlg->fromdialog = DialogToParseSrc;
+ dlg->todialog = ParseSrcToDialog;
+ dlg->testdialog = TestParseSrcDialog;
+ dlg->change_notify = change_notify;
+ dlg->change_userdata = change_userdata;
+
+ dlg->main_choice = PopupList (p, TRUE, ChangeParseSrcDialogPopup);
+ SetObjectExtra (dlg->main_choice, dlg, NULL);
+ PopupItem (dlg->main_choice, "Defline");
+ PopupItem (dlg->main_choice, "FlatFile");
+ PopupItem (dlg->main_choice, "Local ID");
+ PopupItem (dlg->main_choice, "Source Qualifier");
+ PopupItem (dlg->main_choice, "Comment");
+ PopupItem (dlg->main_choice, "BankIT Comment");
+ PopupItem (dlg->main_choice, "Structured Comment");
+ PopupItem (dlg->main_choice, "File ID");
+ SetValue (dlg->main_choice, 4);
+
+ g = HiddenGroup (p, 0, 0, NULL);
+ dlg->src_grp = HiddenGroup (g, -1, 0, NULL);
+ qual_list = ValNodeNew (NULL);
+ qual_list->choice = 0;
+ qual_list->data.ptrvalue = StringSave (kTaxnameAfterBinomialString);
+ qual_list->next = GetSourceQualList ();
+ dlg->src_qual_choice = ValNodeSelectionDialog (dlg->src_grp, qual_list, SHORT_SELECTION_LIST,
+ ValNodeStringName,
+ ValNodeSimpleDataFree,
+ ValNodeStringCopy,
+ ValNodeStringMatch,
+ "source qual",
+ change_notify, change_userdata, FALSE);
+ vn.choice = 0;
+ vn.data.ptrvalue = "Taxname after binomial";
+ vn.next = NULL;
+ PointerToDialog (dlg->src_qual_choice, &vn);
+ dlg->feat_or_desc = HiddenGroup (dlg->src_grp, 3, 0, NULL);
+ RadioButton (dlg->feat_or_desc, "Descriptors and Features");
+ RadioButton (dlg->feat_or_desc, "Descriptors Only");
+ RadioButton (dlg->feat_or_desc, "Features Only");
+ SetValue (dlg->feat_or_desc, 1);
+ AlignObjects (ALIGN_CENTER, (HANDLE) dlg->src_qual_choice, (HANDLE) dlg->feat_or_desc, NULL);
+
+ dlg->structured_comment_field = DialogText (g, "", 20, ChangeParseSrcDialogText);
+ SetObjectExtra (dlg->structured_comment_field, dlg, NULL);
+ Hide (dlg->structured_comment_field);
+
+ AlignObjects (ALIGN_CENTER, (HANDLE) dlg->src_grp, (HANDLE) dlg->structured_comment_field, NULL);
+
+ return (DialoG) p;
+}
+
+
+typedef struct parsedstdlg {
+ DIALOG_MESSAGE_BLOCK
+ PopuP main_choice;
+ GrouP src_grp;
+ DialoG src_qual_choice;
+ GrouP feat_or_desc;
+ GrouP feature_field_grp;
+ DialoG feature_type_choice;
+ DialoG feature_field_choice;
+ TexT dbxref_db;
+ Nlm_ChangeNotifyProc change_notify;
+ Pointer change_userdata;
+} ParseDstDlgData, PNTR ParseDstDlgPtr;
+
+
+static void ChangeParseDstDialogPopup (PopuP p)
+{
+ ParseDstDlgPtr dlg;
+ Int2 val;
+
+ dlg = (ParseDstDlgPtr) GetObjectExtra (p);
+ if (dlg == NULL) return;
+
+ val = GetValue (dlg->main_choice);
+ switch (val) {
+ case 2:
+ Show (dlg->src_grp);
+ Hide (dlg->feature_field_grp);
+ Hide (dlg->dbxref_db);
+ break;
+ case 3:
+ Hide (dlg->src_grp);
+ Show (dlg->feature_field_grp);
+ Hide (dlg->dbxref_db);
+ break;
+ case 4:
+ Hide (dlg->src_grp);
+ Hide (dlg->feature_field_grp);
+ Show (dlg->dbxref_db);
+ break;
+ default:
+ Hide (dlg->src_grp);
+ Hide (dlg->feature_field_grp);
+ Hide (dlg->dbxref_db);
+ break;
+ }
+ if (dlg->change_notify != NULL) {
+ (dlg->change_notify)(dlg->change_userdata);
+ }
+}
+
+
+static void ChangeParseDstDialogText (TexT t)
+{
+ ParseDstDlgPtr dlg;
+
+ dlg = (ParseDstDlgPtr) GetObjectExtra (t);
+ if (dlg == NULL) return;
+
+ if (dlg->change_notify != NULL) {
+ (dlg->change_notify)(dlg->change_userdata);
+ }
+}
+
+
+static void ParseDstToDialog (DialoG d, Pointer data)
+{
+ ParseDstDlgPtr dlg;
+ ValNodePtr dst;
+ ParseDstOrgPtr org;
+ FeatureFieldLegalPtr ffp;
+ ValNode vn;
+
+ dlg = (ParseDstDlgPtr) GetObjectExtra (d);
+ if (dlg == NULL) return;
+
+ dst = (ValNodePtr) data;
+ if (dst == NULL) {
+ SetValue (dlg->main_choice, 1);
+ } else {
+ switch (dst->choice) {
+ case ParseDest_defline:
+ SetValue (dlg->main_choice, 1);
+ break;
+ case ParseDest_org:
+ SetValue (dlg->main_choice, 2);
+ org = (ParseDstOrgPtr) dst->data.ptrvalue;
+ if (org == NULL) {
+ PointerToDialog (dlg->src_qual_choice, NULL);
+ SetValue (dlg->feat_or_desc, 1);
+ } else {
+ switch (org->type) {
+ case Object_type_constraint_any:
+ SetValue (dlg->feat_or_desc, 1);
+ break;
+ case Object_type_constraint_feature:
+ SetValue (dlg->feat_or_desc, 2);
+ break;
+ case Object_type_constraint_descriptor:
+ SetValue (dlg->feat_or_desc, 3);
+ break;
+ default:
+ SetValue (dlg->feat_or_desc, 1);
+ break;
+ }
+ if (org->field == NULL) {
+ PointerToDialog (dlg->src_qual_choice, NULL);
+ } else {
+ vn.choice = 0;
+ vn.data.ptrvalue = GetSourceQualName (org->field->data.intvalue);
+ vn.next = NULL;
+ PointerToDialog (dlg->src_qual_choice, &vn);
+ }
+ }
+ break;
+ case ParseDest_featqual:
+ SetValue (dlg->main_choice, 3);
+ ffp = (FeatureFieldLegalPtr) dst->data.ptrvalue;
+ if (ffp == NULL) {
+ PointerToDialog (dlg->feature_type_choice, NULL);
+ PointerToDialog (dlg->feature_field_choice, NULL);
+ } else {
+ vn.choice = ffp->type;
+ vn.data.ptrvalue = NULL;
+ vn.next = NULL;
+ PointerToDialog (dlg->feature_type_choice, &vn);
+ vn.choice = ffp->field;
+ PointerToDialog (dlg->feature_field_choice, &vn);
+ }
+ break;
+ case ParseDest_dbxref:
+ SetValue (dlg->main_choice, 4);
+ SetTitle (dlg->dbxref_db, dst->data.ptrvalue);
+ break;
+ }
+ }
+
+ ChangeParseDstDialogPopup (dlg->main_choice);
+}
+
+
+static Pointer DialogToParseDst (DialoG d)
+{
+ ParseDstDlgPtr dlg;
+ ParseDstOrgPtr org;
+ FeatureFieldLegalPtr ffp;
+ ValNodePtr dst = NULL, vnp;
+ Int2 val;
+
+ dlg = (ParseDstDlgPtr) GetObjectExtra (d);
+ if (dlg == NULL) return NULL;
+
+ val = GetValue (dlg->main_choice);
+ switch (val) {
+ case 1:
+ dst = ValNodeNew (NULL);
+ dst->choice = ParseDest_defline;
+ break;
+ case 2:
+ org = ParseDstOrgNew ();
+ switch (GetValue (dlg->feat_or_desc)) {
+ case 1:
+ org->type = Object_type_constraint_any;
+ break;
+ case 2:
+ org->type = Object_type_constraint_feature;
+ break;
+ case 3:
+ org->type = Object_type_constraint_descriptor;
+ break;
+ default:
+ org->type = Object_type_constraint_any;
+ break;
+ }
+ vnp = (ValNodePtr) DialogToPointer (dlg->src_qual_choice);
+ if (vnp != NULL) {
+ org->field = ValNodeNew (NULL);
+ org->field->choice = SourceQualChoice_textqual;
+ org->field->data.intvalue = GetSourceQualTypeByName (vnp->data.ptrvalue);
+ vnp = ValNodeFree (vnp);
+ }
+ dst = ValNodeNew (NULL);
+ dst->choice = ParseDest_org;
+ dst->data.ptrvalue = org;
+ break;
+ case 3:
+ ffp = FeatureFieldLegalNew ();
+ vnp = (ValNodePtr) DialogToPointer (dlg->feature_type_choice);
+ if (vnp != NULL) {
+ ffp->type = vnp->choice;
+ vnp = ValNodeFree (vnp);
+ }
+ vnp = (ValNodePtr) DialogToPointer (dlg->feature_field_choice);
+ if (vnp != NULL) {
+ ffp->field = vnp->choice;
+ vnp = ValNodeFree (vnp);
+ }
+ dst = ValNodeNew (NULL);
+ dst->choice = ParseDest_featqual;
+ dst->data.ptrvalue = ffp;
+ break;
+ case 4:
+ dst = ValNodeNew (NULL);
+ dst->choice = ParseDest_dbxref;
+ dst->data.ptrvalue = SaveStringFromText (dlg->dbxref_db);
+ break;
+ }
+ return dst;
+}
+
+
+static ValNodePtr TestParseDstDialog (DialoG d)
+{
+ ParseDstDlgPtr dlg;
+ ValNodePtr err_list = NULL;
+ Int2 val;
+
+ dlg = (ParseDstDlgPtr) GetObjectExtra (d);
+ if (dlg == NULL) return NULL;
+
+ val = GetValue (dlg->main_choice);
+ if (val < 1 || val > 4) {
+ ValNodeAddPointer (&err_list, 0, "main choice");
+ } else if (val == 2) {
+ ValNodeLink (&err_list, TestDialog (dlg->src_qual_choice));
+ } else if (val == 3) {
+ ValNodeLink (&err_list, TestDialog (dlg->feature_type_choice));
+ ValNodeLink (&err_list, TestDialog (dlg->feature_field_choice));
+ } else if (val == 4 && TextHasNoText (dlg->dbxref_db)) {
+ ValNodeAddPointer (&err_list, 0, "dbxref db");
+ }
+ return err_list;
+}
+
+
+static DialoG ParseDstDialog (GrouP h, Nlm_ChangeNotifyProc change_notify, Pointer change_userdata)
+{
+ ParseDstDlgPtr dlg;
+ GrouP p, g;
+ ValNodePtr qual_list;
+
+ p = HiddenGroup (h, 2, 0, NULL);
+ SetGroupSpacing (p, 10, 10);
+
+ dlg = (ParseDstDlgPtr) MemNew (sizeof (ParseDstDlgData));
+ SetObjectExtra (p, dlg, StdCleanupExtraProc);
+
+ dlg->dialog = (DialoG) p;
+ dlg->todialog = ParseDstToDialog;
+ dlg->fromdialog = DialogToParseDst;
+ dlg->testdialog = TestParseDstDialog;
+ dlg->change_notify = change_notify;
+ dlg->change_userdata = change_userdata;
+
+ dlg->main_choice = PopupList (p, TRUE, ChangeParseDstDialogPopup);
+ SetObjectExtra (dlg->main_choice, dlg, NULL);
+ PopupItem (dlg->main_choice, "Defline");
+ PopupItem (dlg->main_choice, "Source Qualifier");
+ PopupItem (dlg->main_choice, "Feature Qualifier");
+ PopupItem (dlg->main_choice, "Dbxref");
+ SetValue (dlg->main_choice, 1);
+
+ g = HiddenGroup (p, 0, 0, NULL);
+ dlg->src_grp = HiddenGroup (g, -1, 0, NULL);
+ qual_list = GetSourceQualList ();
+ dlg->src_qual_choice = ValNodeSelectionDialog (dlg->src_grp, qual_list, SHORT_SELECTION_LIST,
+ ValNodeStringName,
+ ValNodeSimpleDataFree,
+ ValNodeStringCopy,
+ ValNodeStringMatch,
+ "source qual",
+ change_notify, change_userdata, FALSE);
+ dlg->feat_or_desc = HiddenGroup (dlg->src_grp, 3, 0, NULL);
+ RadioButton (dlg->feat_or_desc, "Descriptors and Features");
+ RadioButton (dlg->feat_or_desc, "Descriptors Only");
+ RadioButton (dlg->feat_or_desc, "Features Only");
+ SetValue (dlg->feat_or_desc, 1);
+ AlignObjects (ALIGN_CENTER, (HANDLE) dlg->src_qual_choice, (HANDLE) dlg->feat_or_desc, NULL);
+ Hide (dlg->src_grp);
+
+ dlg->feature_field_grp = HiddenGroup (g, 2, 0, NULL);
+ dlg->feature_type_choice = FeatureTypeDialog (dlg->feature_field_grp, change_notify, change_userdata);
+ dlg->feature_field_choice = LegalFeatQualChoiceDialog (dlg->feature_field_grp, change_notify, change_userdata);
+ Hide (dlg->feature_field_grp);
+
+ dlg->dbxref_db = DialogText (g, "", 20, ChangeParseDstDialogText);
+ SetObjectExtra (dlg->dbxref_db, dlg, NULL);
+ Hide (dlg->dbxref_db);
+
+ AlignObjects (ALIGN_CENTER, (HANDLE) dlg->src_grp, (HANDLE) dlg->feature_field_grp, (HANDLE) dlg->dbxref_db, NULL);
+
+ return (DialoG) p;
+}
+
+
+typedef struct parseactiondlg {
+ DIALOG_MESSAGE_BLOCK
+ DialoG text_portion;
+ DialoG src;
+ DialoG dst;
+ GrouP cap_change;
+ ButtoN remove_from_parsed;
+ DialoG existing_text;
+ Nlm_ChangeNotifyProc change_notify;
+ Pointer change_userdata;
+ Nlm_ChangeNotifyProc redraw_notify;
+ Pointer redraw_userdata;
+} ParseActionDlgData, PNTR ParseActionDlgPtr;
+
+
+static void ParseActionToDialog (DialoG d, Pointer data)
+{
+ ParseActionDlgPtr dlg;
+ ParseActionPtr action;
+
+ dlg = (ParseActionDlgPtr) GetObjectExtra (d);
+ if (dlg == NULL) return;
+
+ action = (ParseActionPtr) data;
+ if (action == NULL) {
+ PointerToDialog (dlg->text_portion, NULL);
+ PointerToDialog (dlg->src, NULL);
+ PointerToDialog (dlg->dst, NULL);
+ SetValue (dlg->cap_change, 1);
+ SetStatus (dlg->remove_from_parsed, FALSE);
+ PointerToDialog (dlg->existing_text, NULL);
+ } else {
+ PointerToDialog (dlg->text_portion, action->portion);
+ PointerToDialog (dlg->src, action->src);
+ PointerToDialog (dlg->dst, action->dest);
+ switch (action->capitalization) {
+ case Cap_change_none:
+ SetValue (dlg->cap_change, 1);
+ break;
+ case Cap_change_tolower:
+ SetValue (dlg->cap_change, 2);
+ break;
+ case Cap_change_toupper:
+ SetValue (dlg->cap_change, 3);
+ break;
+ case Cap_change_firstcap:
+ SetValue (dlg->cap_change, 4);
+ break;
+ default:
+ SetValue (dlg->cap_change, 1);
+ break;
+ }
+ SetStatus (dlg->remove_from_parsed, action->remove_from_parsed);
+ PointerToDialog (dlg->existing_text, (Pointer) action->existing_text);
+ }
+}
+
+
+static Pointer DialogToParseAction (DialoG d)
+{
+ ParseActionDlgPtr dlg;
+ ParseActionPtr action;
+
+ dlg = (ParseActionDlgPtr) GetObjectExtra (d);
+ if (dlg == NULL) return NULL;
+
+ action = ParseActionNew();
+ action->portion = DialogToPointer (dlg->text_portion);
+ action->src = DialogToPointer (dlg->src);
+ action->dest = DialogToPointer (dlg->dst);
+ action->remove_from_parsed = GetStatus (dlg->remove_from_parsed);
+ switch (GetValue (dlg->cap_change)) {
+ case 1:
+ action->capitalization = Cap_change_none;
+ break;
+ case 2:
+ action->capitalization = Cap_change_tolower;
+ break;
+ case 3:
+ action->capitalization = Cap_change_toupper;
+ break;
+ case 4:
+ action->capitalization = Cap_change_firstcap;
+ break;
+ default:
+ action->capitalization = Cap_change_none;
+ break;
+ }
+ action->existing_text = (Uint2) DialogToPointer (dlg->existing_text);
+ return action;
+}
+
+
+static ValNodePtr TestParseActionDialog (DialoG d)
+{
+ ParseActionDlgPtr dlg;
+ ValNodePtr err_list = NULL;
+ Int2 val;
+
+ dlg = (ParseActionDlgPtr) GetObjectExtra (d);
+ if (dlg == NULL) return NULL;
+
+ ValNodeLink (&err_list, TestDialog (dlg->text_portion));
+ ValNodeLink (&err_list, TestDialog (dlg->src));
+ ValNodeLink (&err_list, TestDialog (dlg->dst));
+ ValNodeLink (&err_list, TestDialog (dlg->existing_text));
+ val = GetValue (dlg->cap_change);
+ if (val < 1 || val > 4) {
+ ValNodeAddPointer (&err_list, 0, "cap change");
+ }
+ return err_list;
+}
+
+
+static DialoG
+ParseActionDialog
+(GrouP h,
+ Boolean indexer_version,
+ Nlm_ChangeNotifyProc change_notify,
+ Pointer change_userdata,
+ Nlm_ChangeNotifyProc redraw_notify,
+ Pointer redraw_userdata)
+{
+ ParseActionDlgPtr dlg;
+ GrouP p, g;
+
+ dlg = (ParseActionDlgPtr) MemNew (sizeof (ParseActionDlgData));
+ p = HiddenGroup (h, -1, 0, NULL);
+ SetGroupSpacing (p, 10, 10);
+ SetObjectExtra (p, dlg, StdCleanupExtraProc);
+
+ dlg->dialog = (DialoG) p;
+ dlg->todialog = ParseActionToDialog;
+ dlg->fromdialog = DialogToParseAction;
+ dlg->dialogmessage = NULL;
+ dlg->testdialog = TestParseActionDialog;
+ dlg->change_notify = change_notify;
+ dlg->change_userdata = change_userdata;
+
+ dlg->text_portion = TextPortionDialog (p, TRUE, change_notify, change_userdata);
+
+ g = HiddenGroup (p, 2, 0, NULL);
+ StaticPrompt (g, "From", 0, popupMenuHeight, programFont, 'r');
+ dlg->src = ParseSrcDialog (g, change_notify, change_userdata);
+ StaticPrompt (g, "And place in", 0, popupMenuHeight, programFont, 'r');
+ dlg->dst = ParseDstDialog (g, change_notify, change_userdata);
+ dlg->cap_change = NormalGroup (p, 3, 0, "Capitalization", programFont, NULL);
+ SetGroupSpacing (dlg->cap_change, 10, 10);
+
+ RadioButton (dlg->cap_change, "No change");
+ RadioButton (dlg->cap_change, "To lower");
+ RadioButton (dlg->cap_change, "To upper");
+ RadioButton (dlg->cap_change, "First cap, rest lower");
+ SetValue (dlg->cap_change, 1);
+
+ dlg->remove_from_parsed = CheckBox (p, "Remove from parsed field", NULL);
+
+ dlg->existing_text = ExistingTextDialog (p, change_notify, change_userdata);
+
+
+ AlignObjects (ALIGN_CENTER, (HANDLE) dlg->cap_change,
+ (HANDLE) dlg->remove_from_parsed,
+ (HANDLE) dlg->existing_text,
+ (HANDLE) dlg->text_portion,
+ (HANDLE) g,
+ NULL);
+
+ return (DialoG) p;
+}
+
+
+typedef struct editmacroaction {
+ PopuP action_type;
+
+ DialoG action_dlg;
+
+ ButtoN accept_btn;
+ ButtoN test_btn;
+ ButtoN undo_btn;
+ ButtoN leave_dlg_up;
+ Boolean rebuild_window;
+ Char undo_file [PATH_MAX];
+} EditMacroActionData, PNTR EditMacroActionPtr;
+
+
+/* rebuild dialog with new feature type */
+static void ChangeMacroAction (Pointer data)
+{
+ EditMacroActionPtr e;
+
+ e = (EditMacroActionPtr) data;
+ if (e != NULL) {
+ e->rebuild_window = TRUE;
+ }
+}
+
+
+static void ChangeMacroActionPopup (PopuP p)
+{
+ ChangeMacroAction (GetObjectExtra (p));
+}
+
+
+static void EnableEditMacroActionAccept (Pointer data)
+{
+ EditMacroActionPtr e;
+ ValNodePtr err_list = NULL;
+
+ e = (EditMacroActionPtr) data;
+ if (e != NULL) {
+ err_list = TestDialog (e->action_dlg);
+ if (err_list == NULL) {
+ Enable (e->accept_btn);
+ Enable (e->test_btn);
+ } else {
+ Disable (e->accept_btn);
+ Disable (e->test_btn);
+ }
+ err_list = ValNodeFree (err_list);
+ }
+}
+
+
+static void RunMacroInEditor (ButtoN b)
+{
+ EditMacroActionPtr e;
+ ValNodePtr action;
+ ValNodePtr sep_list, vnp;
+ SeqEntryPtr sep;
+ Uint2 entityID;
+ Int4 num_fields = 0, num_features = 0;
+ Int4 tmp_fields, tmp_features;
+
+ e = (EditMacroActionPtr) GetObjectExtra (b);
+ if (e == NULL) return;
+
+ action = ValNodeNew (NULL);
+ switch (GetValue (e->action_type)) {
+ case 1:
+ action->choice = MacroActionChoice_add_feature;
+ action->data.ptrvalue = DialogToPointer (e->action_dlg);
+ break;
+ case 2:
+ case 3:
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ case 8:
+ action->choice = MacroActionChoice_aecr;
+ action->data.ptrvalue = DialogToPointer (e->action_dlg);
+ break;
+ case 9:
+ action->choice = MacroActionChoice_parse;
+ action->data.ptrvalue = DialogToPointer (e->action_dlg);
+ break;
+ case 10:
+ action->choice = MacroActionChoice_remove_feature;
+ action->data.ptrvalue = DialogToPointer (e->action_dlg);
+ break;
+ case 11:
+ action->choice = MacroActionChoice_edit_location;
+ action->data.ptrvalue = DialogToPointer (e->action_dlg);
+ break;
+ }
+
+ sep_list = GetViewedSeqEntryList ();
+ if (sep_list == NULL) {
+ Message (MSG_ERROR, "No records open!");
+ } else if (sep_list->next != NULL
+ && ANS_CANCEL == Message (MSG_OKC, "You have more than one record open - run macro for all open records?")) {
+ /* do nothing */
+ } else {
+ WatchCursor();
+ Update();
+ for (vnp = sep_list; vnp != NULL; vnp = vnp->next) {
+ sep = vnp->data.ptrvalue;
+ entityID = ObjMgrGetEntityIDForChoice(sep);
+ tmp_fields = 0;
+ tmp_features = 0;
+ ApplyMacroToSeqEntry (sep, action, &tmp_fields, &tmp_features);
+ num_fields += tmp_fields;
+ num_features += tmp_features;
+ ObjMgrSetDirtyFlag (entityID, TRUE);
+ ObjMgrSendMsg (OM_MSG_UPDATE, entityID, 0, 0);
+ }
+ sep_list = ValNodeFree (sep_list);
+ ArrowCursor ();
+ Update ();
+ Message (MSG_OK, "Macro action affected %d fields and created %d features", num_fields, num_features);
+ }
+
+ action = MacroActionChoiceFree (action);
+ Enable (e->undo_btn);
+}
+
+
+static Boolean SaveBackupSeqEntryList (CharPtr path)
+{
+ ValNodePtr sep_list, vnp;
+ AsnIoPtr aip;
+
+ aip = AsnIoOpen (path, "w");
+ if (aip == NULL) {
+ Message (MSG_ERROR, "Unable to open file for backup");
+ return FALSE;
+ }
+
+ sep_list = GetViewedSeqEntryList ();
+ if (sep_list == NULL) {
+ AsnIoClose (aip);
+ return FALSE;
+ }
+
+ for (vnp = sep_list; vnp != NULL; vnp = vnp->next) {
+ SeqEntryAsnWrite (vnp->data.ptrvalue, aip, NULL);
+ }
+
+ AsnIoClose (aip);
+ sep_list = ValNodeFree (sep_list);
+ return TRUE;
+}
+
+
+static ValNodePtr ReadBackupSeqEntryList (CharPtr path)
+{
+ AsnIoPtr aip;
+ ValNodePtr sep_list = NULL;
+ SeqEntryPtr sep;
+
+ aip = AsnIoOpen (path, "r");
+ if (aip == NULL) {
+ Message (MSG_ERROR, "Unable to open %s", path);
+ } else {
+ while ((sep = SeqEntryAsnRead (aip, NULL)) != NULL) {
+ ValNodeAddPointer (&sep_list, 0, sep);
+ }
+ AsnIoClose (aip);
+ }
+ return sep_list;
+}
+
+
+static void RestoreList (ValNodePtr curr_sep_list, ValNodePtr backup_sep_list)
+{
+ ValNodePtr vnp_c, vnp_b;
+ SeqEntryPtr sep_c, sep_b;
+ Uint2 entityID;
+
+ if (curr_sep_list == NULL) return;
+ if (ValNodeLen (curr_sep_list) != ValNodeLen (backup_sep_list)) {
+ Message (MSG_ERROR, "Backup list does not match current list. Unable to undo.");
+ return;
+ }
+
+ for (vnp_c = curr_sep_list, vnp_b = backup_sep_list; vnp_c != NULL && vnp_b != NULL; vnp_c = vnp_c->next, vnp_b = vnp_b->next) {
+ sep_c = vnp_c->data.ptrvalue;
+ sep_b = vnp_b->data.ptrvalue;
+ SeqEntrySetScope (NULL);
+ ReplaceSeqEntryWithSeqEntry (sep_c, sep_b, TRUE);
+ entityID = ObjMgrGetEntityIDForChoice (sep_c);
+ ObjMgrSetDirtyFlag (entityID, TRUE);
+ ObjMgrSendMsg (OM_MSG_UPDATE, entityID, 0, 0);
+ }
+ Update();
+}
+
+
+static void UndoMacroActionTest (ButtoN b)
+{
+ EditMacroActionPtr e;
+ ValNodePtr curr_list;
+ ValNodePtr backup_list;
+
+ e = (EditMacroActionPtr) GetObjectExtra (b);
+ if (e == NULL) return;
+
+ curr_list = GetViewedSeqEntryList ();
+ if (curr_list == NULL) {
+ Message (MSG_ERROR, "No records to undo");
+ Disable (e->undo_btn);
+ return;
+ } else {
+ backup_list = ReadBackupSeqEntryList (e->undo_file);
+ RestoreList (curr_list, backup_list);
+ Disable (e->undo_btn);
+ curr_list = ValNodeFree (curr_list);
+ backup_list = ValNodeFree (backup_list);
+ }
+
+}
+
+
+static WindoW
+BuildEditMacroActionWindow
+(ValNodePtr action,
+ Boolean indexer_version,
+ EditMacroActionPtr d,
+ ModalAcceptCancelPtr acp,
+ Boolean adding_new)
+{
+ ValNodePtr feature_type_list = NULL;
+ AECRActionPtr aecr = NULL;
+ ApplyFeatureActionPtr apply_feat = NULL;
+ RemoveFeatureActionPtr remove_feat = NULL;
+ EditFeatureLocationActionPtr edit_loc = NULL;
+ ParseActionPtr parse = NULL;
+ WindoW w;
+ GrouP h, c;
+ ButtoN b;
+ Int2 action_type;
+
+ w = MovableModalWindow(-20, -13, -10, -10, "Edit Action", NULL);
+#ifndef WIN_MAC
+ CreateStandardEditMenu (w);
+#endif
+
+ h = HiddenGroup (w, -1, 0, NULL);
+ SetGroupSpacing (h, 10, 10);
+
+ d->action_type = PopupList (h, TRUE, ChangeMacroActionPopup);
+ SetObjectExtra (d->action_type, d, NULL);
+ PopupItem (d->action_type, "Apply Feature");
+ PopupItem (d->action_type, "Apply Qualifier");
+ PopupItem (d->action_type, "Edit Qualifier");
+ PopupItem (d->action_type, "Convert Qualifier");
+ PopupItem (d->action_type, "Copy Qualifier");
+ PopupItem (d->action_type, "Swap Qualifier");
+ PopupItem (d->action_type, "Parse Qualifier");
+ PopupItem (d->action_type, "Remove Qualifier");
+ PopupItem (d->action_type, "Parse Text");
+ PopupItem (d->action_type, "Remove Feature");
+ PopupItem (d->action_type, "Edit Feature Location");
+
+ if (action == NULL) {
+ SetValue (d->action_type, 1);
+ } else {
+ switch (action->choice) {
+ case MacroActionChoice_add_feature:
+ SetValue (d->action_type, 1);
+ apply_feat = (ApplyFeatureActionPtr) action->data.ptrvalue;
+ break;
+ case MacroActionChoice_aecr:
+ aecr = (AECRActionPtr) action->data.ptrvalue;
+ if (aecr == NULL || aecr->action == NULL) {
+ SetValue (d->action_type, 2);
+ } else {
+ switch (aecr->action->choice) {
+ case ActionChoice_apply:
+ SetValue (d->action_type, 2);
+ break;
+ case ActionChoice_edit:
+ SetValue (d->action_type, 3);
+ break;
+ case ActionChoice_convert:
+ SetValue (d->action_type, 4);
+ break;
+ case ActionChoice_copy:
+ SetValue (d->action_type, 5);
+ break;
+ case ActionChoice_swap:
+ SetValue (d->action_type, 6);
+ break;
+ case ActionChoice_parse:
+ SetValue (d->action_type, 7);
+ break;
+ case ActionChoice_remove:
+ SetValue (d->action_type, 8);
+ break;
+ default:
+ SetValue (d->action_type, 2);
+ break;
+ }
+ }
+ break;
+ case MacroActionChoice_parse:
+ SetValue (d->action_type, 9);
+ parse = (ParseActionPtr) action->data.ptrvalue;
+ break;
+ case MacroActionChoice_remove_feature:
+ SetValue (d->action_type, 10);
+ remove_feat = (RemoveFeatureActionPtr) action->data.ptrvalue;
+ break;
+ case MacroActionChoice_edit_location:
+ SetValue (d->action_type, 11);
+ edit_loc = (EditFeatureLocationActionPtr) action->data.ptrvalue;
+ break;
+ default:
+ SetValue (d->action_type, 1);
+ break;
+ }
+ }
+ d->action_dlg = NULL;
+
+ action_type = GetValue (d->action_type);
+ /* set up remaining controls */
+ switch (action_type) {
+ case 1:
+ d->action_dlg = ApplyFeatureActionDialog (h, apply_feat, indexer_version, EnableEditMacroActionAccept, d, ChangeMacroAction, d);
+ PointerToDialog (d->action_dlg, apply_feat);
+ break;
+ case 2:
+ case 3:
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ case 8:
+ d->action_dlg = EditAECRActionDialog (h, aecr, indexer_version, EnableEditMacroActionAccept, d, ChangeMacroAction, d);
+ PointerToDialog (d->action_dlg, aecr);
+ break;
+ case 9:
+ d->action_dlg = ParseActionDialog (h, indexer_version, EnableEditMacroActionAccept, d, ChangeMacroAction, d);
+ PointerToDialog (d->action_dlg, parse);
+ break;
+ case 10:
+ d->action_dlg = RemoveFeatureActionDialog (h, indexer_version, EnableEditMacroActionAccept, d);
+ PointerToDialog (d->action_dlg, remove_feat);
+ break;
+ case 11:
+ d->action_dlg = EditFeatureLocationActionDialog (h, indexer_version, EnableEditMacroActionAccept, d);
+ PointerToDialog (d->action_dlg, edit_loc);
+ break;
+ }
+ c = HiddenGroup (h, 4, 0, NULL);
+ SetGroupSpacing (c, 10, 10);
+ d->accept_btn = PushButton (c, "Accept", ModalAcceptButton);
+ SetObjectExtra (d->accept_btn, acp, NULL);
+ if (d->undo_file[0] != 0) {
+ d->test_btn = PushButton (c, "Test", RunMacroInEditor);
+ SetObjectExtra (d->test_btn, d, NULL);
+ d->undo_btn = PushButton (c, "Undo", UndoMacroActionTest);
+ SetObjectExtra (d->undo_btn, d, NULL);
+ Disable (d->undo_btn);
+ }
+ b = PushButton (c, "Cancel", ModalCancelButton);
+ SetObjectExtra (b, acp, NULL);
+
+ if (adding_new) {
+ d->leave_dlg_up = CheckBox (h, "Leave dialog up (and add more macro actions)", NULL);
+ }
+ AlignObjects (ALIGN_CENTER, (HANDLE) c,
+ (HANDLE) d->action_type,
+ (HANDLE) d->action_dlg,
+ (HANDLE) d->leave_dlg_up,
+ NULL);
+ EnableEditMacroActionAccept (d);
+ return w;
+}
+
+
+static Boolean EditMacroAction (ValNodePtr action, Boolean indexer_version)
+{
+ EditMacroActionData d;
+ ModalAcceptCancelData acd;
+ Boolean rval = FALSE;
+ WindoW w, repl_w;
+ ValNodePtr action_copy = NULL;
+ Int2 action_type;
+
+ if (action == NULL) return FALSE;
+
+ d.accept_btn = NULL;
+ d.test_btn = NULL;
+ d.leave_dlg_up = NULL;
+
+ TmpNam (d.undo_file);
+ if (!SaveBackupSeqEntryList (d.undo_file)) {
+ d.undo_file[0] = 0;
+ }
+
+ action_copy = AsnIoMemCopy (action, (AsnReadFunc) MacroActionChoiceAsnRead, (AsnWriteFunc) MacroActionChoiceAsnWrite);
+ w = BuildEditMacroActionWindow (action_copy, indexer_version, &d, &acd, FALSE);
+ d.rebuild_window = FALSE;
+
+ Show (w);
+ Select (w);
+ acd.accepted = FALSE;
+ acd.cancelled = FALSE;
+ while (!acd.accepted && ! acd.cancelled)
+ {
+ ProcessExternalEvent ();
+ if (d.rebuild_window) {
+ /* copy data from dialog if compatible */
+ action_type = GetValue (d.action_type);
+ if (action_type == 1 && action_copy != NULL && action_copy->choice == MacroActionChoice_add_feature) {
+ action_copy = MacroActionChoiceFree (action_copy);
+ action_copy = ValNodeNew (NULL);
+ action_copy->choice = MacroActionChoice_add_feature;
+ action_copy->data.ptrvalue = DialogToPointer (d.action_dlg);
+ } else if (action_type > 1 && action_type < 9 && action_copy != NULL && action_copy->choice == MacroActionChoice_aecr) {
+ action_copy = MacroActionChoiceFree (action_copy);
+ action_copy = ValNodeNew (NULL);
+ action_copy->choice = MacroActionChoice_aecr;
+ action_copy->data.ptrvalue = BuildDefaultAECRAction (ActionTypeChoiceFromPopupValue (action_type), FieldTypeChoiceFromEditAECRActionDialog (d.action_dlg));
+ } else {
+ action_copy = MacroActionChoiceFree (action_copy);
+ if (action_type == 1) {
+ action_copy = ValNodeNew (NULL);
+ action_copy->choice = MacroActionChoice_add_feature;
+ action_copy->data.ptrvalue = BuildDefaultApplyFeatureAction (Feature_type_cds);
+ } else if (action_type >1 && action_type < 9) {
+ action_copy = ValNodeNew (NULL);
+ action_copy->choice = MacroActionChoice_aecr;
+ action_copy->data.ptrvalue = BuildDefaultAECRAction (ActionTypeChoiceFromPopupValue (action_type), FieldTypeChoiceFromEditAECRActionDialog (d.action_dlg));
+ } else if (action_type == 9) {
+ action_copy = ValNodeNew (NULL);
+ action_copy->choice = MacroActionChoice_parse;
+ action_copy->data.ptrvalue = BuildDefaultParseAction ();
+ } else if (action_type == 10) {
+ action_copy = ValNodeNew (NULL);
+ action_copy->choice = MacroActionChoice_remove_feature;
+ action_copy->data.ptrvalue = BuildDefaultRemoveFeatureAction ();
+ } else if (action_type == 11) {
+ action_copy = ValNodeNew (NULL);
+ action_copy->choice = MacroActionChoice_edit_location;
+ action_copy->data.ptrvalue = BuildDefaultEditFeatureLocationAction (Feature_type_gene);
+ }
+ }
+
+ /* replace window */
+ Remove (w);
+ repl_w = BuildEditMacroActionWindow (action_copy, indexer_version, &d, &acd, FALSE);
+ w = repl_w;
+ Show (w);
+ Select (w);
+ d.rebuild_window = FALSE;
+ }
+ Update ();
+ }
+ ProcessAnEvent ();
+ if (!acd.cancelled)
+ {
+ rval = TRUE;
+ switch (action->choice) {
+ case MacroActionChoice_aecr:
+ action->data.ptrvalue = AECRActionFree (action->data.ptrvalue);
+ break;
+ case MacroActionChoice_parse:
+ action->data.ptrvalue = ParseActionFree (action->data.ptrvalue);
+ break;
+ case MacroActionChoice_add_feature:
+ action->data.ptrvalue = ApplyFeatureActionFree (action->data.ptrvalue);
+ break;
+ case MacroActionChoice_remove_feature:
+ action->data.ptrvalue = RemoveFeatureActionFree (action->data.ptrvalue);
+ break;
+ case MacroActionChoice_edit_location:
+ action->data.ptrvalue = EditFeatureLocationActionFree (action->data.ptrvalue);
+ break;
+ }
+ switch (GetValue (d.action_type)) {
+ case 1:
+ action->choice = MacroActionChoice_add_feature;
+ action->data.ptrvalue = DialogToPointer (d.action_dlg);
+ break;
+ case 2:
+ case 3:
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ case 8:
+ action->choice = MacroActionChoice_aecr;
+ action->data.ptrvalue = DialogToPointer (d.action_dlg);
+ break;
+ case 9:
+ action->choice = MacroActionChoice_parse;
+ action->data.ptrvalue = DialogToPointer (d.action_dlg);
+ break;
+ case 10:
+ action->choice = MacroActionChoice_remove_feature;
+ action->data.ptrvalue = DialogToPointer (d.action_dlg);
+ break;
+ case 11:
+ action->choice = MacroActionChoice_edit_location;
+ action->data.ptrvalue = DialogToPointer (d.action_dlg);
+ break;
+ }
+ }
+ Remove (w);
+ FileRemove (d.undo_file);
+
+ action_copy = MacroActionChoiceFree (action_copy);
+ return rval;
+}
+
+
+static void AddMacroActions (MacroEditorFormPtr f, Int2 item)
+{
+ EditMacroActionData d;
+ ModalAcceptCancelData acd;
+ Boolean rval = FALSE;
+ WindoW w, repl_w;
+ ValNodePtr action_copy = NULL, new_action, prev_action = NULL;
+ Int2 pos;
+ Int2 action_type;
+ Boolean done = FALSE, leave_up;
+ Int4 scroll_pos;
+ BaR sb_vert;
+
+ if (f == NULL) return;
+
+ if (item > 0 && f->macro_list != NULL) {
+ pos = 1;
+ prev_action = f->macro_list;
+ while (pos < item && prev_action->next != NULL) {
+ pos++;
+ prev_action = prev_action->next;
+ }
+ }
+
+ action_copy = BuildDefaultNewMacroAction ();
+ d.accept_btn = NULL;
+ d.test_btn = NULL;
+ d.leave_dlg_up = NULL;
+ TmpNam (d.undo_file);
+ if (!SaveBackupSeqEntryList (d.undo_file)) {
+ d.undo_file[0] = 0;
+ }
+ w = BuildEditMacroActionWindow (action_copy, f->indexer_version, &d, &acd, TRUE);
+ d.rebuild_window = FALSE;
+
+ Show (w);
+ Select (w);
+ while (!done) {
+ acd.accepted = FALSE;
+ acd.cancelled = FALSE;
+ while (!acd.accepted && ! acd.cancelled)
+ {
+ ProcessExternalEvent ();
+ if (d.rebuild_window) {
+ /* copy data from dialog if compatible */
+ action_type = GetValue (d.action_type);
+ if (action_type == 1 && action_copy != NULL && action_copy->choice == MacroActionChoice_add_feature) {
+ action_copy = MacroActionChoiceFree (action_copy);
+ action_copy = ValNodeNew (NULL);
+ action_copy->choice = MacroActionChoice_add_feature;
+ action_copy->data.ptrvalue = DialogToPointer (d.action_dlg);
+ } else if (action_type > 1 && action_type < 9 && action_copy != NULL && action_copy->choice == MacroActionChoice_aecr) {
+ action_copy = MacroActionChoiceFree (action_copy);
+ action_copy = ValNodeNew (NULL);
+ action_copy->choice = MacroActionChoice_aecr;
+ action_copy->data.ptrvalue = BuildDefaultAECRAction (ActionTypeChoiceFromPopupValue (action_type), FieldTypeChoiceFromEditAECRActionDialog (d.action_dlg));
+ } else {
+ action_copy = MacroActionChoiceFree (action_copy);
+ if (action_type == 1) {
+ action_copy = ValNodeNew (NULL);
+ action_copy->choice = MacroActionChoice_add_feature;
+ action_copy->data.ptrvalue = BuildDefaultApplyFeatureAction (Feature_type_cds);
+ } else if (action_type > 1 && action_type < 9) {
+ action_copy = ValNodeNew (NULL);
+ action_copy->choice = MacroActionChoice_aecr;
+ action_copy->data.ptrvalue = BuildDefaultAECRAction (ActionTypeChoiceFromPopupValue (action_type), FieldTypeChoiceFromEditAECRActionDialog (d.action_dlg));
+ } else if (action_type == 9) {
+ action_copy = ValNodeNew (NULL);
+ action_copy->choice = MacroActionChoice_parse;
+ action_copy->data.ptrvalue = BuildDefaultParseAction ();
+ } else if (action_type == 10) {
+ action_copy = ValNodeNew (NULL);
+ action_copy->choice = MacroActionChoice_remove_feature;
+ action_copy->data.ptrvalue = BuildDefaultRemoveFeatureAction ();
+ } else if (action_type == 11) {
+ action_copy = ValNodeNew (NULL);
+ action_copy->choice = MacroActionChoice_edit_location;
+ action_copy->data.ptrvalue = BuildDefaultEditFeatureLocationAction (Feature_type_gene);
+ }
+ }
+
+ /* replace window */
+ leave_up = GetStatus (d.leave_dlg_up);
+ Remove (w);
+ repl_w = BuildEditMacroActionWindow (action_copy, f->indexer_version, &d, &acd, TRUE);
+ SetStatus (d.leave_dlg_up, leave_up);
+ w = repl_w;
+ Show (w);
+ Select (w);
+ d.rebuild_window = FALSE;
+ }
+ Update ();
+ }
+ ProcessAnEvent ();
+ if (acd.cancelled) {
+ done = TRUE;
+ } else {
+ /* get current scroll position */
+ sb_vert = GetSlateVScrollBar ((SlatE) f->macro_summary);
+ scroll_pos = GetBarValue (sb_vert);
+ /* we will want to increase the scroll position after each addition
+ * note that we need to get the scroll bar and check the initial position
+ * each time - if there was no scroll bar after the last update, scroll_pos
+ * needs to be zero to start.
+ */
+ scroll_pos++;
+
+ rval = TRUE;
+ /* create new action based on contents of dialog */
+ new_action = ValNodeNew (NULL);
+ switch (GetValue (d.action_type)) {
+ case 1:
+ new_action->choice = MacroActionChoice_add_feature;
+ new_action->data.ptrvalue = DialogToPointer (d.action_dlg);
+ break;
+ case 2:
+ case 3:
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ case 8:
+ new_action->choice = MacroActionChoice_aecr;
+ new_action->data.ptrvalue = DialogToPointer (d.action_dlg);
+ break;
+ case 9:
+ new_action->choice = MacroActionChoice_parse;
+ new_action->data.ptrvalue = DialogToPointer (d.action_dlg);
+ break;
+ case 10:
+ new_action->choice = MacroActionChoice_remove_feature;
+ new_action->data.ptrvalue = DialogToPointer (d.action_dlg);
+ break;
+ case 11:
+ new_action->choice = MacroActionChoice_edit_location;
+ new_action->data.ptrvalue = DialogToPointer (d.action_dlg);
+ break;
+ }
+ /* add action to macro list */
+ if (prev_action == NULL) {
+ /* put at start of list */
+ new_action->next = f->macro_list;
+ f->macro_list = new_action;
+ } else {
+ /* insert in list */
+ new_action->next = prev_action->next;
+ prev_action->next = new_action;
+ }
+ /* next action will be inserted after this one */
+ prev_action = new_action;
+ /* update summary */
+ UpdateMacroSummary (f, scroll_pos);
+
+ /* done if leave_dlg_up not checked */
+ if (!GetStatus (d.leave_dlg_up)) {
+ done = TRUE;
+ }
+ }
+ }
+ Remove (w);
+ action_copy = MacroActionChoiceFree (action_copy);
+}
+
+
+/* Functions for summarizing macro actions for display */
+
+static CharPtr SummarizeExistingText (Uint2 existing_text)
+{
+ CharPtr str = NULL;
+
+ switch (existing_text) {
+ case ExistingTextOption_append_semi :
+ str = "append separated by semicolon";
+ break;
+ case ExistingTextOption_append_space :
+ str = "append separated by space";
+ break;
+ case ExistingTextOption_append_colon :
+ str = "append separated by colon";
+ break;
+ case ExistingTextOption_append_none :
+ str = "append (no separator)";
+ break;
+ case ExistingTextOption_prefix_semi :
+ str = "prefix separated by semicolon";
+ break;
+ case ExistingTextOption_prefix_space :
+ str = "prefix separated by space";
+ break;
+ case ExistingTextOption_prefix_colon :
+ str = "prefix separated by colon";
+ break;
+ case ExistingTextOption_prefix_none :
+ str = "prefix (no separator)";
+ break;
+ case ExistingTextOption_leave_old :
+ str = "ignore new text when existing text is present";
+ break;
+ case ExistingTextOption_replace_old :
+ str = "overwrite existing text";
+ break;
+ default:
+ str = "invalid existing_text option";
+ break;
+ }
+ return str;
+}
+
+
+static CharPtr GetStringLocationPhrase (Uint2 match_location, Boolean not_present)
+{
+ CharPtr location_word = NULL;
+
+ switch (match_location) {
+ case String_location_contains :
+ if (not_present) {
+ location_word = "does not contain";
+ } else {
+ location_word = "contains";
+ }
+ break;
+ case String_location_equals :
+ if (not_present) {
+ location_word = "does not equal";
+ } else {
+ location_word = "equals";
+ }
+ break;
+ case String_location_starts :
+ if (not_present) {
+ location_word = "does not start with";
+ } else {
+ location_word = "starts with";
+ }
+ break;
+ case String_location_ends :
+ if (not_present) {
+ location_word = "does not end with";
+ } else {
+ location_word = "ends with";
+ }
+ break;
+ case String_location_inlist :
+ if (not_present) {
+ location_word = "is not one of";
+ } else {
+ location_word = "is one of";
+ }
+ break;
+ }
+ return location_word;
+}
+
+
+/* summarizing constraints */
+static CharPtr SummarizeStringConstraint (StringConstraintPtr constraint)
+{
+ CharPtr location_word = NULL;
+ CharPtr case_sensitive = "case-sensitive";
+ CharPtr whole_word = "whole word";
+ CharPtr str = NULL;
+ Int4 len;
+ CharPtr fmt = "%s '%s'";
+
+ if (constraint == NULL || constraint->match_text == NULL) return NULL;
+
+ location_word = GetStringLocationPhrase (constraint->match_location, constraint->not_present);
+ if (location_word == NULL) return NULL;
+ len = StringLen (location_word) + StringLen (constraint->match_text) + StringLen (fmt);
+ if (constraint->case_sensitive) {
+ len += StringLen (case_sensitive) + 3;
+ }
+ if (constraint->whole_word) {
+ len += StringLen (whole_word) + 3;
+ }
+ str = (CharPtr) MemNew (sizeof (Char) * len);
+ sprintf (str, fmt, location_word, constraint->match_text);
+ if (constraint->case_sensitive || constraint->whole_word) {
+ StringCat (str, " (");
+ }
+ if (constraint->case_sensitive) {
+ StringCat (str, case_sensitive);
+ if (constraint->whole_word) {
+ StringCat (str, ", ");
+ }
+ }
+ if (constraint->whole_word) {
+ StringCat (str, whole_word);
+ }
+ if (constraint->case_sensitive || constraint->whole_word) {
+ StringCat (str, ")");
+ }
+
+ return str;
+}
+
+
+static CharPtr SummarizeLocationConstraint (LocationConstraintPtr constraint)
+{
+ CharPtr str = NULL;
+ CharPtr strand_word = NULL, seq_word = NULL;
+ CharPtr fmt = "only objects";
+ Int4 len = 0;
+
+ if (constraint == NULL
+ || (constraint->strand == Strand_constraint_any
+ && constraint->seq_type == Seqtype_constraint_any)) {
+ return NULL;
+ }
+ if (constraint->seq_type == Seqtype_constraint_nuc) {
+ seq_word = "nucleotide sequences";
+ } else if (constraint->seq_type == Seqtype_constraint_prot) {
+ seq_word = "protein sequences";
+ }
+
+ if (constraint->strand == Strand_constraint_plus) {
+ strand_word = " on plus strands";
+ } else if (constraint->strand == Strand_constraint_minus) {
+ strand_word = " on minus strands";
+ }
+
+ if (seq_word == NULL && strand_word == NULL) {
+ return NULL;
+ }
+ len = StringLen (fmt) + 1;
+ if (strand_word != NULL) {
+ len += StringLen (strand_word);
+ }
+ if (seq_word != NULL) {
+ len += StringLen (seq_word) + 4;
+ }
+ str = (CharPtr) MemNew (sizeof (Char) * len);
+ sprintf (str, fmt);
+ if (strand_word == NULL) {
+ StringCat (str, " on ");
+ StringCat (str, seq_word);
+ } else {
+ StringCat (str, strand_word);
+ if (seq_word != NULL) {
+ StringCat (str, " of ");
+ StringCat (str, seq_word);
+ }
+ }
+ return str;
+}
+
+
+static CharPtr SummarizeSourceConstraint (SourceConstraintPtr constraint)
+{
+ CharPtr string, intro = NULL, field1, field2;
+ CharPtr match_fmt = "%s %s matches %s";
+ CharPtr present_fmt = "%s %s is present";
+ CharPtr text_fmt = "%s text %s";
+ CharPtr two_match_fmt = "%s %s matches %s and %s %s";
+ CharPtr one_match_fmt = "%s %s %s";
+ CharPtr summ = NULL;
+
+ if (constraint == NULL) return NULL;
+
+ string = SummarizeStringConstraint (constraint->constraint);
+ field1 = SummarizeSourceQual (constraint->field1);
+ field2 = SummarizeSourceQual (constraint->field2);
+
+ if (constraint->field1 == NULL && constraint->field2 == NULL && string == NULL) {
+ if (constraint->type_constraint == Object_type_constraint_feature) {
+ summ = "where source is a feature";
+ } else if (constraint->type_constraint == Object_type_constraint_descriptor) {
+ summ = "where source is a descriptor";
+ }
+ } else {
+ if (constraint->type_constraint == Object_type_constraint_any) {
+ intro = "where source";
+ } else if (constraint->type_constraint == Object_type_constraint_feature) {
+ intro = "where source feature";
+ } else if (constraint->type_constraint == Object_type_constraint_descriptor) {
+ intro = "where source descriptor";
+ } else {
+ string = MemFree (string);
+ field1 = MemFree (field1);
+ field2 = MemFree (field2);
+ return NULL;
+ }
+
+ if (string == NULL) {
+ if (field1 == NULL && field2 == NULL) {
+ if (constraint->type_constraint == Object_type_constraint_feature) {
+ summ = StringSave ("where source is a feature");
+ } else if (constraint->type_constraint == Object_type_constraint_descriptor) {
+ summ = StringSave ("where source is a descriptor");
+ }
+ } else if (field1 != NULL && field2 != NULL) {
+ summ = (CharPtr) MemNew (sizeof (Char) * (StringLen (match_fmt) + StringLen (intro) + StringLen (field1) + StringLen (field2)));
+ sprintf (summ, match_fmt, intro, field1, field2);
+ } else if (field1 != NULL) {
+ summ = (CharPtr) MemNew (sizeof (Char) * (StringLen (present_fmt) + StringLen (intro) + StringLen (field1)));
+ sprintf (summ, present_fmt, intro, field1);
+ } else if (field2 != NULL) {
+ summ = (CharPtr) MemNew (sizeof (Char) * (StringLen (present_fmt) + StringLen (intro) + StringLen (field2)));
+ sprintf (summ, present_fmt, intro, field2);
+ }
+ } else {
+ if (field1 == NULL && field2 == NULL) {
+ summ = (CharPtr) MemNew (sizeof (Char) * (StringLen (text_fmt) + StringLen (intro) + StringLen (string)));
+ sprintf (summ, text_fmt, intro, string);
+ } else if (field1 != NULL && field2 != NULL) {
+ summ = (CharPtr) MemNew (sizeof (Char) * (StringLen (two_match_fmt) + StringLen (intro)
+ + 2 * StringLen (field1) + StringLen (field2) + StringLen (string)));
+ sprintf (summ, two_match_fmt, intro, field1, field2, field1, string);
+ } else if (field1 != NULL) {
+ summ = (CharPtr) MemNew (sizeof (Char) * (StringLen (one_match_fmt) + StringLen (intro) + StringLen (field1) + StringLen (string)));
+ sprintf (summ, one_match_fmt, intro, field1, string);
+ } else if (field2 != NULL) {
+ summ = (CharPtr) MemNew (sizeof (Char) * (StringLen (one_match_fmt) + StringLen (intro) + StringLen (field2) + StringLen (string)));
+ sprintf (summ, one_match_fmt, intro, field2, string);
+ }
+ }
+ }
+ string = MemFree (string);
+ field1 = MemFree (field1);
+ field2 = MemFree (field2);
+ return summ;
+}
+
+
+
+static CharPtr SummarizeCDSGeneProtPseudoConstraint (CDSGeneProtPseudoConstraintPtr constraint)
+{
+ CharPtr summ = NULL, pseudo_feat;
+ CharPtr is_pseudo_fmt = "where %s is pseudo";
+ CharPtr not_pseudo_fmt = "where %s is not pseudo";
+
+ if (constraint != NULL) {
+ pseudo_feat = CDSGeneProtFeatureNameFromFeatureType (constraint->feature);
+ if (pseudo_feat != NULL) {
+ if (constraint->is_pseudo) {
+ summ = (CharPtr) MemNew (sizeof (Char) * (StringLen (is_pseudo_fmt) + StringLen (pseudo_feat)));
+ sprintf (summ, is_pseudo_fmt, pseudo_feat);
+ } else {
+ summ = (CharPtr) MemNew (sizeof (Char) * (StringLen (not_pseudo_fmt) + StringLen (pseudo_feat)));
+ sprintf (summ, not_pseudo_fmt, pseudo_feat);
+ }
+ }
+ }
+
+ return summ;
+}
+
+
+static CharPtr SummarizeCDSGeneProtQualConstraint (CDSGeneProtQualConstraintPtr constraint)
+{
+ CharPtr string, field1 = NULL, field2 = NULL;
+ CharPtr match_fmt = "where %s matches %s";
+ CharPtr present_fmt = "where %s is present";
+ CharPtr text_fmt = "where CDS-gene-prot text %s";
+ CharPtr two_match_fmt = "where %s matches %s and %s %s";
+ CharPtr one_match_fmt = "where %s %s";
+ CharPtr summ = NULL;
+
+ if (constraint == NULL) return NULL;
+
+ string = SummarizeStringConstraint (constraint->constraint);
+ if (constraint->field1 != NULL) {
+ field1 = CDSGeneProtNameFromField (constraint->field1->data.intvalue);
+ }
+ if (constraint->field2 != NULL) {
+ field2 = CDSGeneProtNameFromField (constraint->field2->data.intvalue);
+ }
+
+ if (string == NULL) {
+ if (field1 != NULL && field2 != NULL) {
+ summ = (CharPtr) MemNew (sizeof (Char) * (StringLen (match_fmt) + StringLen (field1) + StringLen (field2)));
+ sprintf (summ, match_fmt, field1, field2);
+ } else if (field1 != NULL) {
+ summ = (CharPtr) MemNew (sizeof (Char) * (StringLen (present_fmt) + StringLen (field1)));
+ sprintf (summ, present_fmt, field1);
+ } else if (field2 != NULL) {
+ summ = (CharPtr) MemNew (sizeof (Char) * (StringLen (present_fmt) + StringLen (field2)));
+ sprintf (summ, present_fmt, field2);
+ }
+ } else {
+ if (field1 == NULL && field2 == NULL) {
+ summ = (CharPtr) MemNew (sizeof (Char) * (StringLen (text_fmt) + StringLen (string)));
+ sprintf (summ, text_fmt, string);
+ } else if (field1 != NULL && field2 != NULL) {
+ summ = (CharPtr) MemNew (sizeof (Char) * (StringLen (two_match_fmt)
+ + 2 * StringLen (field1) + StringLen (field2) + StringLen (string)));
+ sprintf (summ, two_match_fmt, field1, field2, field1, string);
+ } else if (field1 != NULL) {
+ summ = (CharPtr) MemNew (sizeof (Char) * (StringLen (one_match_fmt) + StringLen (field1) + StringLen (string)));
+ sprintf (summ, one_match_fmt, field1, string);
+ } else if (field2 != NULL) {
+ summ = (CharPtr) MemNew (sizeof (Char) * (StringLen (one_match_fmt) + StringLen (field2) + StringLen (string)));
+ sprintf (summ, one_match_fmt, field2, string);
+ }
+ }
+
+ string = MemFree (string);
+ /* note - field1 and field2 aren't allocated, so we don't need to free them */
+
+ return summ;
+}
+
+
+static CharPtr SummarizeSequenceConstraint (SequenceConstraintPtr constraint)
+{
+ CharPtr summ = NULL;
+ CharPtr seq_word = NULL, featpresent = NULL, id = NULL;
+ Int4 len = 0;
+ CharPtr seq_word_intro = "where sequence type is ";
+ CharPtr feat_after = " is present";
+ CharPtr id_intro = "sequence ID ";
+
+ if (IsSequenceConstraintEmpty (constraint)) {
+ summ = StringSave ("Missing sequence constraint");
+ } else {
+ if (constraint->seqtype != NULL && constraint->seqtype->choice != SequenceConstraintMolTypeConstraint_any) {
+ switch (constraint->seqtype->choice) {
+ case SequenceConstraintMolTypeConstraint_nucleotide:
+ seq_word = "nucleotide";
+ break;
+ case SequenceConstraintMolTypeConstraint_dna:
+ seq_word = "DNA";
+ break;
+ case SequenceConstraintMolTypeConstraint_rna:
+ if (constraint->seqtype->data.intvalue == Sequence_constraint_rnamol_any) {
+ seq_word = "RNA";
+ } else {
+ seq_word = GetBiomolNameForRnaType (constraint->seqtype->data.intvalue);
+ }
+ break;
+ case SequenceConstraintMolTypeConstraint_protein:
+ seq_word = "protein";
+ break;
+ }
+ }
+
+ if (constraint->feature != Feature_type_any) {
+ featpresent = GetFeatureNameFromFeatureType (constraint->feature);
+ }
+
+ if (!IsStringConstraintEmpty (constraint->id)) {
+ id = SummarizeStringConstraint (constraint->id);
+ }
+
+ if (seq_word != NULL) {
+ len += StringLen (seq_word) + StringLen (seq_word_intro);
+ }
+
+ if (featpresent != NULL) {
+ if (len == 0) {
+ len += 6;
+ } else {
+ len += 5;
+ }
+ len += StringLen (featpresent);
+ len += StringLen (feat_after);
+ }
+
+ if (id != NULL) {
+ if (len == 0) {
+ len += 6;
+ } else {
+ len += 5;
+ }
+ len += StringLen (id_intro);
+ len += StringLen (id);
+ }
+
+ if (len == 0) {
+ summ = StringSave ("missing sequence constraint");
+ } else {
+ len++;
+ summ = (CharPtr) MemNew (sizeof (Char) * len);
+ summ[0] = 0;
+ if (seq_word != NULL) {
+ StringCat (summ, seq_word_intro);
+ StringCat (summ, seq_word);
+ }
+ if (featpresent != NULL) {
+ if (seq_word == NULL) {
+ StringCat (summ, "where ");
+ } else {
+ StringCat (summ, " and ");
+ }
+ StringCat (summ, featpresent);
+ StringCat (summ, feat_after);
+ }
+ if (id != NULL) {
+ if (seq_word == NULL && featpresent == NULL) {
+ StringCat (summ, "where ");
+ } else {
+ StringCat (summ, " and ");
+ }
+ StringCat (summ, id_intro);
+ StringCat (summ, id);
+ }
+ }
+ id = MemFree (id);
+ }
+ return summ;
+}
+
+static CharPtr SummarizeConstraint (ValNodePtr constraint)
+{
+ CharPtr phrase = NULL, tmp;
+ CharPtr fmt = "where object text %s";
+
+ if (constraint == NULL) return NULL;
+ switch (constraint->choice) {
+ case ConstraintChoice_string:
+ tmp = SummarizeStringConstraint (constraint->data.ptrvalue);
+ if (tmp != NULL) {
+ phrase = (CharPtr) MemNew (sizeof (Char) * (StringLen (tmp) + StringLen (fmt)));
+ sprintf (phrase, fmt, tmp);
+ tmp = MemFree (tmp);
+ }
+ break;
+ case ConstraintChoice_location:
+ phrase = SummarizeLocationConstraint (constraint->data.ptrvalue);
+ break;
+ case ConstraintChoice_source:
+ phrase = SummarizeSourceConstraint (constraint->data.ptrvalue);
+ break;
+ case ConstraintChoice_cdsgeneprot_qual:
+ phrase = SummarizeCDSGeneProtQualConstraint (constraint->data.ptrvalue);
+ break;
+ case ConstraintChoice_cdsgeneprot_pseudo:
+ phrase = SummarizeCDSGeneProtPseudoConstraint (constraint->data.ptrvalue);
+ break;
+ case ConstraintChoice_sequence:
+ phrase = SummarizeSequenceConstraint (constraint->data.ptrvalue);
+ break;
+ }
+ return phrase;
+}
+
+
+static CharPtr SummarizeConstraintSet (ValNodePtr constraint_set)
+{
+ ValNodePtr phrases = NULL, vnp;
+ Int4 len = 0;
+ CharPtr phrase, str = NULL;
+
+ while (constraint_set != NULL) {
+ phrase = SummarizeConstraint (constraint_set);
+ if (phrase != NULL) {
+ ValNodeAddPointer (&phrases, 0, phrase);
+ if (len > 0) {
+ len += 5; /* for " and " */
+ } else {
+ len += 1; /* for terminal NULL */
+ }
+ len += StringLen (phrase);
+ }
+ constraint_set = constraint_set->next;
+ }
+ if (len > 0) {
+ str = (CharPtr) MemNew (sizeof (Char) * len);
+ for (vnp = phrases; vnp != NULL; vnp = vnp->next) {
+ StringCat (str, vnp->data.ptrvalue);
+ if (vnp->next != NULL) {
+ StringCat (str, " and ");
+ }
+ }
+ }
+ return str;
+}
+
+/* summarizing AECR actions */
+static CharPtr SummarizeFieldPairType (ValNodePtr vnp, CharPtr connect_word)
+{
+ FeatureFieldPairPtr ffp;
+ CDSGeneProtFieldPairPtr cgp;
+ SourceQualPairPtr quals;
+ MolinfoFieldPairPtr m_fields;
+ CharPtr str = NULL;
+ CharPtr from_label = NULL, to_label = NULL;
+ CharPtr label_fmt = "%s %s %s";
+ CharPtr type_label_fmt = "%s %s %s %s";
+ CharPtr label = NULL;
+
+ if (connect_word == NULL) {
+ connect_word = "to";
+ }
+ if (vnp == NULL) {
+ str = StringSave ("missing field");
+ } else {
+ switch (vnp->choice) {
+ case FieldPairType_source_qual:
+ if (vnp->data.ptrvalue != NULL) {
+ quals = (SourceQualPairPtr) vnp->data.ptrvalue;
+ from_label = GetSourceQualName (quals->field_from);
+ to_label = GetSourceQualName (quals->field_to);
+ }
+ if (from_label != NULL && to_label != NULL) {
+ str = (CharPtr) MemNew (sizeof (Char) *
+ StringLen (from_label) + StringLen (connect_word) + StringLen (to_label)
+ + 3);
+ sprintf (str, "%s %s %s", from_label, connect_word, to_label);
+ } else {
+ str = StringSave ("missing field");
+ }
+ break;
+ case FieldPairType_feature_field:
+ ffp = (FeatureFieldPairPtr) vnp->data.ptrvalue;
+ if (ffp == NULL || ffp->field_from == NULL || ffp->field_to == NULL) {
+ str = StringSave ("missing field");
+ } else {
+ label = GetFeatureNameFromFeatureType (ffp->type);
+ from_label = FeatureFieldLabel (label, ffp->field_from);
+ to_label = FeatureFieldLabel (label, ffp->field_to);
+ str = (CharPtr) MemNew (sizeof (Char) *
+ (StringLen (label_fmt)
+ + StringLen (from_label) + StringLen (to_label)
+ + StringLen (connect_word)));
+ sprintf (str, label_fmt, from_label, connect_word, to_label);
+ from_label = MemFree (from_label);
+ to_label = MemFree (to_label);
+ }
+ break;
+ case FieldPairType_cds_gene_prot:
+ cgp = (CDSGeneProtFieldPairPtr) vnp->data.ptrvalue;
+ from_label = CDSGeneProtNameFromField (cgp->field_from);
+ to_label = CDSGeneProtNameFromField (cgp->field_to);
+ str = (CharPtr) MemNew (sizeof (Char) *
+ StringLen (from_label) + StringLen (connect_word) + StringLen (to_label)
+ + 3);
+ sprintf (str, "%s %s %s", from_label, connect_word, to_label);
+ break;
+ case FieldPairType_molinfo_field:
+ m_fields = (MolinfoFieldPairPtr) vnp->data.ptrvalue;
+ from_label = NULL;
+ to_label = NULL;
+ label = NULL;
+ switch (m_fields->choice) {
+ case MolinfoFieldPair_molecule:
+ from_label = BiomolNameFromBiomol (BiomolFromMoleculeType (((MolinfoMoleculePairPtr) m_fields->data.ptrvalue)->from));
+ to_label = BiomolNameFromBiomol (BiomolFromMoleculeType (((MolinfoMoleculePairPtr) m_fields->data.ptrvalue)->to));
+ label = "molecule";
+ break;
+ case MolinfoFieldPair_technique:
+ from_label = TechNameFromTech (TechFromTechniqueType (((MolinfoTechniquePairPtr) m_fields->data.ptrvalue)->from));
+ to_label = TechNameFromTech (TechFromTechniqueType (((MolinfoTechniquePairPtr) m_fields->data.ptrvalue)->to));
+ label = "technique";
+ break;
+ case MolinfoFieldPair_completedness:
+ from_label = CompletenessNameFromCompleteness (CompletenessFromCompletednessType (((MolinfoCompletednessPairPtr) m_fields->data.ptrvalue)->from));
+ to_label = CompletenessNameFromCompleteness (CompletenessFromCompletednessType (((MolinfoCompletednessPairPtr) m_fields->data.ptrvalue)->to));
+ label = "completeness";
+ break;
+ case MolinfoFieldPair_mol_class:
+ from_label = MolNameFromMol (MolFromMoleculeClassType (((MolinfoMolClassPairPtr) m_fields->data.ptrvalue)->from));
+ to_label = MolNameFromMol (MolFromMoleculeClassType (((MolinfoMolClassPairPtr) m_fields->data.ptrvalue)->to));
+ label = "class";
+ break;
+ case MolinfoFieldPair_topology:
+ from_label = TopologyNameFromTopology (TopologyFromTopologyType (((MolinfoTopologyPairPtr) m_fields->data.ptrvalue)->from));
+ to_label = TopologyNameFromTopology (TopologyFromTopologyType (((MolinfoTopologyPairPtr) m_fields->data.ptrvalue)->to));
+ label = "topology";
+ break;
+ case MolinfoFieldPair_strand:
+ from_label = StrandNameFromStrand (StrandFromStrandType (((MolinfoStrandPairPtr) m_fields->data.ptrvalue)->from));
+ to_label = StrandNameFromStrand (StrandFromStrandType (((MolinfoStrandPairPtr) m_fields->data.ptrvalue)->to));
+ label = "strand";
+ break;
+ }
+ if (from_label == NULL) {
+ from_label = "Unknown value";
+ }
+ if (to_label == NULL) {
+ to_label = "Unknown value";
+ }
+ if (label == NULL) {
+ label = "Unknown molinfo field";
+ }
+ str = (CharPtr) MemNew (sizeof (Char) * (StringLen (type_label_fmt)
+ + StringLen (label)
+ + StringLen (from_label)
+ + StringLen (to_label)
+ + StringLen (connect_word)));
+ sprintf (str, type_label_fmt, label, from_label, connect_word, to_label);
+ break;
+ default:
+ str = StringSave ("Invalid field type");
+ break;
+ }
+ }
+ return str;
+}
+
+
+static CharPtr SummarizeTextPortion (TextPortionPtr text_portion)
+{
+ CharPtr summ = NULL;
+ CharPtr left_fmt = NULL, right_fmt = NULL;
+ Int4 len = 6;
+
+ if (text_portion == NULL
+ || ((text_portion->left_text == NULL || text_portion->left_text[0] == 0)
+ && (text_portion->right_text == NULL || text_portion->right_text[0] == 0))) {
+ summ = StringSave ("entire text");
+ } else if (text_portion->inside) {
+ if (text_portion->left_text != NULL && text_portion->left_text[0] != 0) {
+ if (text_portion->include_left) {
+ left_fmt = "starting with ";
+ } else {
+ left_fmt = "just after ";
+ }
+ len += StringLen (left_fmt) + StringLen (text_portion->left_text) + 3;
+ }
+ if (text_portion->right_text != NULL && text_portion->right_text[0] != 0) {
+ if (text_portion->include_right) {
+ right_fmt = "up to and including ";
+ } else {
+ right_fmt = "up to ";
+ }
+ len += StringLen (right_fmt) + StringLen (text_portion->right_text) + 3;
+ if (left_fmt != NULL) {
+ len += 2;
+ }
+ }
+ if (left_fmt == NULL && right_fmt == NULL) {
+ summ = StringSave ("entire text");
+ } else {
+ summ = (CharPtr) MemNew (sizeof (Char) * len);
+ StringCat (summ, "text ");
+ if (left_fmt != NULL) {
+ StringCat (summ, left_fmt);
+ StringCat (summ, "'");
+ StringCat (summ, text_portion->left_text);
+ StringCat (summ, "'");
+ if (right_fmt != NULL) {
+ StringCat (summ, ", ");
+ }
+ }
+ if (right_fmt != NULL) {
+ StringCat (summ, right_fmt);
+ StringCat (summ, "'");
+ StringCat (summ, text_portion->right_text);
+ StringCat (summ, "'");
+ }
+ }
+ } else {
+ if (text_portion->right_text != NULL && text_portion->right_text[0] != 0) {
+ if (text_portion->include_right) {
+ right_fmt = "starting with ";
+ } else {
+ right_fmt = "after ";
+ }
+ len += StringLen (right_fmt) + StringLen (text_portion->right_text) + 3;
+ }
+ if (text_portion->left_text != NULL && text_portion->left_text[0] != 0) {
+ if (text_portion->include_left) {
+ left_fmt = "up to and including ";
+ } else {
+ left_fmt = "before ";
+ }
+ len += StringLen (left_fmt) + StringLen (text_portion->left_text) + 3;
+ if (right_fmt != NULL) {
+ len += 5;
+ }
+ }
+
+ if (left_fmt == NULL && right_fmt == NULL) {
+ summ = StringSave ("entire text");
+ } else {
+ summ = (CharPtr) MemNew (sizeof (Char) * len);
+ StringCat (summ, "text ");
+ if (right_fmt != NULL) {
+ StringCat (summ, right_fmt);
+ StringCat (summ, "'");
+ StringCat (summ, text_portion->right_text);
+ StringCat (summ, "'");
+ if (left_fmt != NULL) {
+ StringCat (summ, " and ");
+ }
+ }
+ if (left_fmt != NULL) {
+ StringCat (summ, left_fmt);
+ StringCat (summ, "'");
+ StringCat (summ, text_portion->left_text);
+ StringCat (summ, "'");
+ }
+ }
+ }
+ return summ;
+}
+
+
+static CharPtr SummarizeApplyAction (ApplyActionPtr a)
+{
+ CharPtr str = NULL;
+ CharPtr fmt = "Apply %s to %s (%s)";
+ CharPtr nontextqual_fmt = "Apply %s (%s)";
+ CharPtr field, existing_text;
+
+ if (a == NULL) {
+ str = StringSave ("No action");
+ } else if (a->value == NULL || a->field == NULL) {
+ str = StringSave ("Invalid action");
+ } else {
+ field = SummarizeFieldType (a->field);
+ existing_text = SummarizeExistingText (a->existing_text);
+ if (IsFieldTypeNonText (a->field)) {
+ str = (CharPtr) MemNew (sizeof (Char) * StringLen (nontextqual_fmt) + StringLen (field) + StringLen (existing_text));
+ sprintf (str, nontextqual_fmt, field, existing_text);
+ } else {
+ str = (CharPtr) MemNew (sizeof (Char) * (StringLen (fmt) + StringLen (a->value) + StringLen (field) + StringLen (existing_text)));
+ sprintf (str, fmt, a->value, field, existing_text);
+ }
+ field = MemFree (field);
+ }
+ return str;
+}
+
+
+static CharPtr SummarizeEditAction (EditActionPtr a)
+{
+ CharPtr str = NULL;
+ CharPtr fmt = "Edit %s replace '%s' with '%s'";
+ CharPtr field;
+
+ if (a == NULL) {
+ str = StringSave ("No action");
+ } else if (a->field == NULL || a->field == NULL || a->edit == NULL || a->edit->find_txt == NULL) {
+ str = StringSave ("Invalid action");
+ } else {
+ field = SummarizeFieldType (a->field);
+ str = (CharPtr) MemNew (sizeof (Char) * (StringLen (fmt) + StringLen (field) + StringLen (a->edit->find_txt) + StringLen (a->edit->repl_txt)));
+ sprintf (str, fmt, field, a->edit->find_txt, a->edit->repl_txt == NULL ? "" : a->edit->repl_txt);
+ field = MemFree (field);
+ }
+ return str;
+}
+
+
+static CharPtr SummarizeConvertAction (ConvertActionPtr a)
+{
+ CharPtr str = NULL;
+ CharPtr fmt = "Convert %s (%s)";
+ CharPtr fields, existing_text;
+
+ if (a == NULL) {
+ str = StringSave ("No action");
+ } else if (a->fields == NULL || a->fields == NULL) {
+ str = StringSave ("Invalid action");
+ } else {
+ fields = SummarizeFieldPairType (a->fields, "to");
+ existing_text = SummarizeExistingText (a->existing_text);
+ str = (CharPtr) MemNew (sizeof (Char) * (StringLen (fmt) + StringLen (fields) + StringLen (existing_text)));
+ sprintf (str, fmt, fields, existing_text);
+ fields = MemFree (fields);
+ }
+ return str;
+}
+
+
+static CharPtr SummarizeCopyAction (CopyActionPtr a)
+{
+ CharPtr str = NULL;
+ CharPtr fmt = "Copy %s (%s)";
+ CharPtr fields, existing_text;
+
+ if (a == NULL) {
+ str = StringSave ("No action");
+ } else if (a->fields == NULL) {
+ str = StringSave ("Invalid action");
+ } else {
+ fields = SummarizeFieldPairType (a->fields, "to");
+ existing_text = SummarizeExistingText (a->existing_text);
+ str = (CharPtr) MemNew (sizeof (Char) * (StringLen (fmt) + StringLen (fields) + StringLen (existing_text)));
+ sprintf (str, fmt, fields, existing_text);
+ fields = MemFree (fields);
+ }
+ return str;
+}
+
+
+static CharPtr SummarizeSwapAction (SwapActionPtr a)
+{
+ CharPtr str = NULL;
+ CharPtr fmt = "Swap %s";
+ CharPtr fields;
+
+ if (a == NULL) {
+ str = StringSave ("No action");
+ } else if (a->fields == NULL) {
+ str = StringSave ("Invalid action");
+ } else {
+ fields = SummarizeFieldPairType (a->fields, "with");
+ str = (CharPtr) MemNew (sizeof (Char) * (StringLen (fmt) + StringLen (fields)));
+ sprintf (str, fmt, fields);
+ fields = MemFree (fields);
+ }
+ return str;
+}
+
+
+static CharPtr SummarizeAECRParseAction (AECRParseActionPtr a)
+{
+ CharPtr str = NULL;
+ CharPtr fmt = "Parse %s from %s (%s)";
+ CharPtr fields, existing_text, text_portion;
+
+ if (a == NULL) {
+ str = StringSave ("No action");
+ } else if (a->fields == NULL) {
+ str = StringSave ("Invalid action");
+ } else {
+ fields = SummarizeFieldPairType (a->fields, "to");
+ existing_text = SummarizeExistingText (a->existing_text);
+ text_portion = SummarizeTextPortion (a->portion);
+ str = (CharPtr) MemNew (sizeof (Char) * (StringLen (fmt) + StringLen (text_portion) + StringLen (fields) + StringLen (existing_text)));
+ sprintf (str, fmt, text_portion, fields, existing_text);
+ fields = MemFree (fields);
+ text_portion = MemFree (text_portion);
+ }
+ return str;
+}
+
+
+static CharPtr SummarizeRemoveAction (RemoveActionPtr a)
+{
+ CharPtr str = NULL;
+ CharPtr fmt = "Remove %s";
+ CharPtr field;
+
+ if (a == NULL) {
+ str = StringSave ("No action");
+ } else if (a->field == NULL || a->field == NULL) {
+ str = StringSave ("Invalid action");
+ } else {
+ field = SummarizeFieldType (a->field);
+ str = (CharPtr) MemNew (sizeof (Char) * (StringLen (fmt) + StringLen (field)));
+ sprintf (str, fmt, field);
+ field = MemFree (field);
+ }
+ return str;
+}
+
+
+static CharPtr SummarizeAECRAction (AECRActionPtr a)
+{
+ CharPtr str = NULL, act = NULL, constraint = NULL;
+ if (a == NULL) {
+ str = StringSave ("No action");
+ } else if (a->action == NULL) {
+ str = StringSave ("Invalid command");
+ } else {
+ switch (a->action->choice) {
+ case ActionChoice_apply:
+ act = SummarizeApplyAction (a->action->data.ptrvalue);
+ break;
+ case ActionChoice_edit:
+ act = SummarizeEditAction (a->action->data.ptrvalue);
+ break;
+ case ActionChoice_convert:
+ act = SummarizeConvertAction (a->action->data.ptrvalue);
+ break;
+ case ActionChoice_copy:
+ act = SummarizeCopyAction (a->action->data.ptrvalue);
+ break;
+ case ActionChoice_swap:
+ act = SummarizeSwapAction (a->action->data.ptrvalue);
+ break;
+ case ActionChoice_remove:
+ act = SummarizeRemoveAction (a->action->data.ptrvalue);
+ break;
+ case ActionChoice_parse:
+ act = SummarizeAECRParseAction (a->action->data.ptrvalue);
+ break;
+ }
+ if (act == NULL) {
+ str = StringSave ("Invalid action");
+ } else {
+ constraint = SummarizeConstraintSet (a->constraint);
+ if (constraint == NULL) {
+ str = act;
+ } else {
+ str = (CharPtr) MemNew (sizeof (Char) * (StringLen(act) + 2 + StringLen (constraint)));
+ sprintf (str, "%s %s", act, constraint);
+ act = MemFree (act);
+ constraint = MemFree (constraint);
+ }
+ }
+ }
+ return str;
+}
+
+
+static CharPtr SummarizeParseSrc (ValNodePtr src)
+{
+ CharPtr summ = NULL;
+ CharPtr fmt = "structured comment field %s";
+ ParseSrcOrgPtr src_org;
+ Boolean need_to_save = TRUE;
+
+ if (src != NULL) {
+ switch (src->choice) {
+ case ParseSrc_defline:
+ summ = "defline";
+ break;
+ case ParseSrc_flatfile:
+ summ = "flat file";
+ break;
+ case ParseSrc_local_id:
+ summ = "local ID";
+ break;
+ case ParseSrc_org:
+ src_org = (ParseSrcOrgPtr) src->data.ptrvalue;
+ if (src_org != NULL) {
+ if (src_org->field != NULL) {
+ if (src_org->field->choice == ParseSrcOrgChoice_taxname_after_binomial) {
+ summ = kTaxnameAfterBinomialString;
+ } else if (src_org->field->choice == ParseSrcOrgChoice_source_qual) {
+ summ = GetSourceQualName (src_org->field->data.intvalue);
+ }
+ }
+ }
+ break;
+ case ParseSrc_comment:
+ summ = "comment";
+ break;
+ case ParseSrc_bankit_comment:
+ summ = "BankIT comment";
+ break;
+ case ParseSrc_structured_comment:
+ if (!StringHasNoText (src->data.ptrvalue)) {
+ summ = (CharPtr) MemNew (sizeof (Char) * (StringLen (src->data.ptrvalue) + StringLen (fmt)));
+ sprintf (summ, fmt, src->data.ptrvalue);
+ need_to_save = FALSE;
+ }
+ break;
+ case ParseSrc_file_id:
+ summ = "file ID";
+ break;
+ }
+ }
+ if (summ == NULL) {
+ summ = StringSave ("missing field");
+ } else if (need_to_save) {
+ summ = StringSave (summ);
+ }
+ return summ;
+}
+
+
+static CharPtr SummarizeParseDst (ValNodePtr dst)
+{
+ CharPtr summ = NULL;
+ CharPtr fmt = "%s %s";
+ CharPtr feature, field;
+ ParseDstOrgPtr dst_org;
+ Boolean need_to_save = TRUE;
+ FeatureFieldLegalPtr ffp;
+
+ if (dst != NULL) {
+ switch (dst->choice) {
+ case ParseDest_defline:
+ summ = "defline";
+ break;
+ case ParseDest_org:
+ dst_org = (ParseDstOrgPtr) dst->data.ptrvalue;
+ if (dst_org != NULL) {
+ if (dst_org->field != NULL) {
+ switch (dst_org->field->choice) {
+ case SourceQualChoice_textqual:
+ summ = GetSourceQualName (dst_org->field->data.intvalue);
+ break;
+ case SourceQualChoice_location:
+ summ = "location";
+ break;
+ case SourceQualChoice_origin:
+ summ = "origin";
+ break;
+ }
+ }
+ }
+ break;
+ case ParseDest_featqual:
+ ffp = (FeatureFieldLegalPtr) dst->data.ptrvalue;
+ if (ffp != NULL) {
+ feature = GetFeatureNameFromFeatureType (ffp->type);
+ field = GetFeatQualName (ffp->field);
+ summ = (CharPtr) MemNew (sizeof (Char) * (StringLen (fmt) + StringLen (feature) + StringLen (field)));
+ sprintf (summ, fmt, feature, field);
+ need_to_save = FALSE;
+ }
+ break;
+ case ParseDest_dbxref:
+ summ = "dbxref";
+ break;
+ }
+ }
+ if (summ == NULL) {
+ summ = StringSave ("missing field");
+ } else if (need_to_save) {
+ summ = StringSave (summ);
+ }
+ return summ;
+}
+
+
+static CharPtr SummarizeParseAction (ParseActionPtr p)
+{
+ CharPtr field_from = NULL, field_to = NULL;
+ CharPtr existing_text = NULL, text_portion = NULL;
+ CharPtr summ = NULL;
+ CharPtr fmt = "Parse %s from %s to %s (%s)";
+
+ if (p == NULL) {
+ summ = StringSave ("No action");
+ } else {
+ field_from = SummarizeParseSrc (p->src);
+ field_to = SummarizeParseDst (p->dest);
+ existing_text = SummarizeExistingText (p->existing_text);
+ text_portion = SummarizeTextPortion (p->portion);
+ summ = (CharPtr) MemNew (sizeof (Char) * (StringLen (fmt) + StringLen (text_portion) + StringLen (field_from) + StringLen (field_to) + StringLen (existing_text)));
+ sprintf (summ, fmt, text_portion, field_from, field_to, existing_text);
+ text_portion = MemFree (text_portion);
+ field_from = MemFree (field_from);
+ field_to = MemFree (field_to);
+ }
+ return summ;
+}
+
+
+static CharPtr SummarizeApplyFeatureAction (ApplyFeatureActionPtr a)
+{
+ CharPtr label = NULL;
+ CharPtr str;
+ CharPtr fmt = "Apply %s";
+
+ if (a == NULL) {
+ str = StringSave ("No action");
+ } else {
+ label = GetFeatureNameFromFeatureType (a->type);
+ str = (CharPtr) MemNew (sizeof (Char) * (StringLen (fmt) + StringLen (label)));
+ sprintf (str, fmt, label);
+ }
+ return str;
+}
+
+
+static CharPtr SummarizeRemoveFeatureAction (RemoveFeatureActionPtr a)
+{
+ CharPtr label = NULL;
+ CharPtr constraint, str;
+ CharPtr fmt = "Remove %s";
+ CharPtr constraint_fmt = "Remove %s %s";
+
+ if (a == NULL) {
+ str = StringSave ("No action");
+ } else {
+ label = GetFeatureNameFromFeatureType (a->type);
+ constraint = SummarizeConstraintSet (a->constraint);
+ if (constraint == NULL) {
+ str = (CharPtr) MemNew (sizeof (Char) * (StringLen (fmt) + StringLen (label)));
+ sprintf (str, fmt, label);
+ } else {
+ str = (CharPtr) MemNew (sizeof (Char) * (StringLen (constraint_fmt) + StringLen (label) + StringLen (constraint)));
+ sprintf (str, constraint_fmt, label, constraint);
+ constraint = MemFree (constraint);
+ }
+ }
+
+ return str;
+}
+
+
+static CharPtr SummarizeEditLocationStrand (EditLocationStrandPtr strand)
+{
+ CharPtr from_label = NULL, to_label = NULL;
+ CharPtr fmt = "Convert %s strand to %s";
+ CharPtr str = NULL;
+
+ if (strand == NULL) return NULL;
+
+ switch (strand->strand_from) {
+ case Feature_location_strand_from_any:
+ from_label = "any";
+ break;
+ case Feature_location_strand_from_plus:
+ from_label = "plus";
+ break;
+ case Feature_location_strand_from_minus:
+ from_label = "minus";
+ break;
+ case Feature_location_strand_from_unknown:
+ from_label = "unknown";
+ break;
+ case Feature_location_strand_from_both:
+ from_label = "both";
+ break;
+ }
+
+ switch (strand->strand_to) {
+ case Feature_location_strand_to_plus:
+ to_label = "plus";
+ break;
+ case Feature_location_strand_to_minus:
+ to_label = "minus";
+ break;
+ case Feature_location_strand_to_unknown:
+ to_label = "unknown";
+ break;
+ case Feature_location_strand_to_both:
+ to_label = "both";
+ break;
+ case Feature_location_strand_to_reverse:
+ to_label = "reverse";
+ break;
+ }
+
+ if (from_label != NULL && to_label != NULL) {
+ str = (CharPtr) MemNew (sizeof (Char) * (StringLen (fmt) + StringLen (from_label) + StringLen (to_label)));
+ sprintf (str, fmt, from_label, to_label);
+ }
+ return str;
+}
+
+
+static CharPtr SummarizePartial5SetAction (Partial5SetActionPtr a)
+{
+ CharPtr str = NULL;
+ CharPtr constraint = NULL, extend = NULL;
+ CharPtr fmt = "Set 5' partial%s%s";
+
+ if (a == NULL) return NULL;
+
+ switch (a->constraint) {
+ case Partial_5_set_constraint_all:
+ constraint = "";
+ break;
+ case Partial_5_set_constraint_at_end:
+ constraint = " when 5' end of location is at end of sequence";
+ break;
+ case Partial_5_set_constraint_bad_start:
+ constraint = " when coding region has no start codon";
+ break;
+ case Partial_5_set_constraint_frame_not_one:
+ constraint = " when coding region frame > 1";
+ break;
+ }
+ if (a->extend) {
+ extend = ", extend 5' end of feature to end of sequence";
+ } else {
+ extend = "";
+ }
+ if (constraint != NULL) {
+ str = (CharPtr) MemNew (sizeof (Char) * (StringLen (fmt)
+ + StringLen (constraint)
+ + StringLen (extend)));
+ sprintf (str, fmt, constraint, extend);
+ }
+ return str;
+}
+
+
+static CharPtr SummarizePartial5ClearAction (Int4 a)
+{
+ CharPtr str = NULL;
+
+ switch (a) {
+ case Partial_5_clear_constraint_all:
+ str = StringSave ("Clear 5' partial");
+ break;
+ case Partial_5_clear_constraint_not_at_end:
+ str = StringSave ("Clear 5' partial when 5' end of feature is not at end of sequence");
+ break;
+ case Partial_5_clear_constraint_good_start:
+ str = StringSave ("Clear 5' partial when coding region has start codon");
+ break;
+ }
+ return str;
+}
+
+
+static CharPtr SummarizePartial3SetAction (Partial3SetActionPtr a)
+{
+ CharPtr str = NULL;
+ CharPtr constraint = NULL, extend = NULL;
+ CharPtr fmt = "Set 3' partial%s%s";
+
+ if (a == NULL) return NULL;
+
+ switch (a->constraint) {
+ case Partial_3_set_constraint_all:
+ constraint = "";
+ break;
+ case Partial_3_set_constraint_at_end:
+ constraint = " when 3' end of location is at end of sequence";
+ break;
+ case Partial_3_set_constraint_bad_end:
+ constraint = " when coding region has no stop codon";
+ break;
+ }
+ if (a->extend) {
+ extend = ", extend 3' end of feature to end of sequence";
+ } else {
+ extend = "";
+ }
+ if (constraint != NULL) {
+ str = (CharPtr) MemNew (sizeof (Char) * (StringLen (fmt)
+ + StringLen (constraint)
+ + StringLen (extend)));
+ sprintf (str, fmt, constraint, extend);
+ }
+ return str;
+}
+
+
+static CharPtr SummarizePartial3ClearAction (Int4 a)
+{
+ CharPtr str = NULL;
+
+ switch (a) {
+ case Partial_3_clear_constraint_all:
+ str = StringSave ("Clear 3' partial");
+ break;
+ case Partial_3_clear_constraint_not_at_end:
+ str = StringSave ("Clear 3' partial when 3' end of feature is not at end of sequence");
+ break;
+ case Partial_3_clear_constraint_good_end:
+ str = StringSave ("Clear 3' partial when coding region has stop codon");
+ break;
+ }
+ return str;
+}
+
+
+static CharPtr SummarizeConvertLoc (Int4 a)
+{
+ CharPtr str = NULL;
+
+ switch (a) {
+ case Convert_location_type_join:
+ str = StringSave ("Convert location to join");
+ break;
+ case Convert_location_type_order:
+ str = StringSave ("Convert location to order");
+ break;
+ case Convert_location_type_merge:
+ str = StringSave ("Convert location to single interval");
+ break;
+ }
+ return str;
+}
+
+
+static CharPtr SummarizeEditFeatureLocationAction (EditFeatureLocationActionPtr a)
+{
+ CharPtr str = NULL, action_label = NULL, constraint, feature;
+ CharPtr fmt = "%s for %s features";
+ CharPtr constraint_fmt = "%s for %s features %s";
+
+ if (a == NULL || a->action == NULL) {
+ str = StringSave ("No action");
+ } else {
+
+ switch (a->action->choice) {
+ case LocationEditType_strand:
+ action_label = SummarizeEditLocationStrand (a->action->data.ptrvalue);
+ break;
+ case LocationEditType_set_5_partial:
+ action_label = SummarizePartial5SetAction (a->action->data.ptrvalue);
+ break;
+ case LocationEditType_clear_5_partial:
+ action_label = SummarizePartial5ClearAction (a->action->data.intvalue);
+ break;
+ case LocationEditType_set_3_partial:
+ action_label = SummarizePartial3SetAction (a->action->data.ptrvalue);
+ break;
+ case LocationEditType_clear_3_partial:
+ action_label = SummarizePartial3ClearAction (a->action->data.intvalue);
+ break;
+ case LocationEditType_convert:
+ action_label = SummarizeConvertLoc (a->action->data.intvalue);
+ break;
+ }
+ if (action_label == NULL) {
+ str = StringSave ("Invalid action");
+ } else {
+ feature = GetFeatureNameFromFeatureType (a->type);
+ constraint = SummarizeConstraintSet (a->constraint);
+ if (constraint == NULL) {
+ str = (CharPtr) MemNew (sizeof (Char) * (StringLen (fmt) + StringLen (action_label) + StringLen (feature)));
+ sprintf (str, fmt, action_label, feature);
+ } else {
+ str = (CharPtr) MemNew (sizeof (Char) * (StringLen (constraint_fmt) + StringLen (action_label) + StringLen (feature) + StringLen (constraint)));
+ sprintf (str, constraint_fmt, action_label, feature, constraint);
+ constraint = MemFree (constraint);
+ }
+ }
+ }
+ return str;
+}
+
+
+
+static CharPtr SummarizeMacroAction (ValNodePtr vnp)
+{
+ CharPtr str = NULL;
+
+ if (vnp == NULL) {
+ return StringSave ("No action");
+ }
+ switch (vnp->choice) {
+ case MacroActionChoice_aecr:
+ str = SummarizeAECRAction (vnp->data.ptrvalue);
+ break;
+ case MacroActionChoice_parse:
+ str = SummarizeParseAction (vnp->data.ptrvalue);
+ break;
+ case MacroActionChoice_add_feature:
+ str = SummarizeApplyFeatureAction (vnp->data.ptrvalue);
+ break;
+ case MacroActionChoice_remove_feature:
+ str = SummarizeRemoveFeatureAction (vnp->data.ptrvalue);
+ break;
+ case MacroActionChoice_edit_location:
+ str = SummarizeEditFeatureLocationAction (vnp->data.ptrvalue);
+ break;
+ default:
+ str = StringSave ("Invalid action");
+ break;
+ }
+ return str;
+}
+
+
+/* For using macro functions to apply tables */
+typedef struct tabcolumnconfigdlg {
+ DIALOG_MESSAGE_BLOCK
+ PopuP column_action;
+ GrouP qual_grp;
+ DialoG src_qual;
+ GrouP feature_field_grp;
+ DialoG feature_type;
+ DialoG feature_field;
+ DialoG cdsgeneprot;
+
+ ButtoN change_mrna;
+ GrouP apply_options;
+ ButtoN erase_when_blank;
+ DialoG existing_text;
+
+ Nlm_ChangeNotifyProc change_notify;
+ Pointer change_userdata;
+} TabColumnConfigDlgData, PNTR TabColumnConfigDlgPtr;
+
+static void TabColumnConfigPopupChange (PopuP p)
+{
+ TabColumnConfigDlgPtr dlg;
+
+ dlg = (TabColumnConfigDlgPtr) GetObjectExtra (p);
+ if (dlg != NULL && dlg->change_notify != NULL) {
+ (dlg->change_notify) (dlg->change_userdata);
+ }
+}
+
+
+static void TabColumnConfigFieldChange (Pointer data)
+{
+ TabColumnConfigDlgPtr dlg;
+ TabColumnConfigPtr config;
+
+ dlg = (TabColumnConfigDlgPtr) data;
+ if (dlg != NULL) {
+ config = (TabColumnConfigPtr) DialogToPointer (dlg->dialog);
+ if (config == NULL || !IsFieldTypeCDSProduct(config->field)) {
+ Disable (dlg->change_mrna);
+ } else {
+ Enable (dlg->change_mrna);
+ }
+ config = TabColumnConfigFree (config);
+ if (dlg->change_notify != NULL) {
+ (dlg->change_notify) (dlg->change_userdata);
+ }
+ }
+}
+
+
+static Pointer TabColumnConfigDialogToChoice (DialoG d)
+{
+ TabColumnConfigDlgPtr dlg;
+ TabColumnConfigPtr f;
+ Int2 val;
+ FeatureFieldPtr ff;
+ ValNodePtr vnp;
+
+ dlg = (TabColumnConfigDlgPtr) GetObjectExtra (d);
+ if (dlg == NULL) return NULL;
+
+ f = TabColumnConfigNew ();
+ f->match_mrna = FALSE;
+
+ val = GetValue (dlg->column_action);
+ if (val < 2) {
+ f = TabColumnConfigFree (f);
+ } else if (val < 8) {
+ f->match_type = val - 1;
+ f->existing_text = ExistingTextOption_replace_old;
+ f->skip_blank = TRUE;
+ } else {
+ if (val == 8) {
+ f->field = ValNodeNew (NULL);
+ f->field->choice = FieldType_source_qual;
+ f->field->data.ptrvalue = DialogToPointer (dlg->src_qual);
+ } else if (val == 9) {
+ f->field = ValNodeNew (NULL);
+ f->field->choice = FieldType_feature_field;
+ ff = FeatureFieldNew ();
+ vnp = DialogToPointer (dlg->feature_type);
+ if (vnp != NULL) {
+ ff->type = vnp->choice;
+ vnp = ValNodeFree (vnp);
+ }
+ vnp = DialogToPointer (dlg->feature_field);
+ if (vnp != NULL) {
+ ValNodeAddInt (&(ff->field), FeatQualChoice_legal_qual, vnp->choice);
+ ValNodeFree (vnp);
+ }
+ f->field->data.ptrvalue = ff;
+ } else if (val == 10) {
+ f->field = DialogToPointer (dlg->cdsgeneprot);
+ }
+
+ if (dlg->erase_when_blank == NULL) {
+ f->skip_blank = TRUE;
+ } else {
+ f->skip_blank = !GetStatus (dlg->erase_when_blank);
+ }
+ if (IsFieldTypeCDSProduct (f->field)) {
+ f->match_mrna = GetStatus (dlg->change_mrna);
+ }
+
+ f->existing_text = (Uint2) DialogToPointer (dlg->existing_text);
+ }
+
+ return f;
+}
+
+
+static void TabColumnActionChange (PopuP p)
+{
+ TabColumnConfigDlgPtr dlg;
+ TabColumnConfigPtr config;
+ Int2 val;
+
+ dlg = (TabColumnConfigDlgPtr) GetObjectExtra (p);
+ if (dlg == NULL) return;
+
+ val = GetValue (p);
+
+ switch (val) {
+ case 1:
+ case 2:
+ case 3:
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ /* matching, hide apply controls */
+ Hide (dlg->qual_grp);
+ Disable (dlg->apply_options);
+ break;
+ case 8:
+ /* show source qual, hide others */
+ Show (dlg->qual_grp);
+ Show (dlg->src_qual);
+ Hide (dlg->feature_field_grp);
+ Hide (dlg->cdsgeneprot);
+ Disable (dlg->change_mrna);
+ Enable (dlg->apply_options);
+ break;
+ case 9:
+ /* show feature qual, hide others */
+ Show (dlg->qual_grp);
+ Hide (dlg->src_qual);
+ Show (dlg->feature_field_grp);
+ Hide (dlg->cdsgeneprot);
+ config = DialogToPointer (dlg->dialog);
+ if (config == NULL || !IsFieldTypeCDSProduct (config->field)) {
+ SafeDisable (dlg->change_mrna);
+ } else {
+ SafeEnable (dlg->change_mrna);
+ }
+ config = TabColumnConfigFree (config);
+ Enable (dlg->apply_options);
+ break;
+ case 10:
+ /* show cds-gene-prot qual, hide others */
+ Show (dlg->qual_grp);
+ Hide (dlg->src_qual);
+ Hide (dlg->feature_field_grp);
+ Show (dlg->cdsgeneprot);
+ config = DialogToPointer (dlg->dialog);
+ if (config == NULL || !IsFieldTypeCDSProduct (config->field)) {
+ SafeDisable (dlg->change_mrna);
+ } else {
+ SafeEnable (dlg->change_mrna);
+ }
+ config = TabColumnConfigFree (config);
+ Enable (dlg->apply_options);
+ break;
+ }
+
+ if (dlg != NULL && dlg->change_notify != NULL) {
+ (dlg->change_notify) (dlg->change_userdata);
+ }
+}
+
+
+static void TabColumnConfigToDialog (DialoG d, Pointer data)
+{
+ TabColumnConfigDlgPtr dlg;
+ TabColumnConfigPtr f;
+ FeatureFieldPtr ff;
+ ValNode vn;
+
+ dlg = (TabColumnConfigDlgPtr) GetObjectExtra (d);
+ if (dlg == NULL) return;
+ f = (TabColumnConfigPtr) data;
+ if (f == NULL) {
+ SetValue (dlg->column_action, 1);
+ } else {
+ if (f->match_type > 0) {
+ SetValue (dlg->column_action, f->match_type + 1);
+ } else if (f->field == NULL) {
+ SetValue (dlg->column_action, 1);
+ } else {
+ if (f->field->choice == FieldType_source_qual) {
+ SetValue (dlg->column_action, 8);
+ PointerToDialog (dlg->src_qual, f->field->data.ptrvalue);
+ } else if (f->field->choice == FieldType_feature_field) {
+ SetValue (dlg->column_action, 9);
+ ff = (FeatureFieldPtr) f->field->data.ptrvalue;
+ if (ff == NULL) {
+ PointerToDialog (dlg->feature_type, NULL);
+ PointerToDialog (dlg->feature_field, NULL);
+ } else {
+ vn.choice = ff->type;
+ vn.data.ptrvalue = NULL;
+ vn.next = NULL;
+ PointerToDialog (dlg->feature_type, &vn);
+ if (ff->field == NULL || ff->field->choice != FeatQualChoice_legal_qual) {
+ PointerToDialog (dlg->feature_field, NULL);
+ } else {
+ vn.choice = ff->field->data.intvalue;
+ vn.data.ptrvalue = NULL;
+ vn.next = NULL;
+ PointerToDialog (dlg->feature_field, &vn);
+ }
+ }
+ } else if (f->field->choice == FieldType_cds_gene_prot) {
+ SetValue (dlg->column_action, 10);
+ PointerToDialog (dlg->cdsgeneprot, &vn);
+ }
+
+ SafeSetStatus (dlg->change_mrna, f->match_mrna);
+ SafeSetStatus (dlg->erase_when_blank, !f->skip_blank);
+ PointerToDialog (dlg->existing_text, (Pointer) f->existing_text);
+ }
+ }
+ TabColumnActionChange (dlg->column_action);
+}
+
+
+static void TabColumnConfigButtonChange (ButtoN b)
+{
+ TabColumnConfigDlgPtr dlg;
+
+ dlg = (TabColumnConfigDlgPtr) GetObjectExtra (b);
+ if (dlg != NULL && dlg->change_notify != NULL) {
+ (dlg->change_notify) (dlg->change_userdata);
+ }
+}
+
+
+static void SetTabColumnConfigDialogTitle (DialoG d, CharPtr title, Int4 num_blank)
+{
+ CharPtr real_title;
+ CharPtr title_fmt = "(%d are blank)%s";
+ TabColumnConfigDlgPtr dlg;
+
+ if (title == NULL) {
+ real_title = "";
+ } else if (num_blank > 0) {
+ real_title = (CharPtr) MemNew (sizeof (Char) * (StringLen (title_fmt) + StringLen (title) + 15));
+ sprintf (real_title, title_fmt, num_blank, title);
+ } else {
+ real_title = title;
+ }
+
+ SetTitle (d, real_title);
+
+ if (real_title != title) {
+ real_title = MemFree (real_title);
+ }
+
+ dlg = (TabColumnConfigDlgPtr) GetObjectExtra (d);
+ if (dlg != NULL) {
+ if (num_blank == 0) {
+ SafeDisable (dlg->erase_when_blank);
+ } else {
+ SafeEnable (dlg->erase_when_blank);
+ }
+ }
+}
+
+
+NLM_EXTERN DialoG TabColumnConfigDialog
+(GrouP h,
+ CharPtr title,
+ Int4 num_blank,
+ Nlm_ChangeNotifyProc change_notify,
+ Pointer change_userdata)
+{
+ TabColumnConfigDlgPtr dlg;
+ GrouP p;
+ CharPtr real_title;
+ CharPtr title_fmt = "(%d are blank)%s";
+ Boolean free_title = FALSE;
+
+ dlg = (TabColumnConfigDlgPtr) MemNew (sizeof (TabColumnConfigDlgData));
+
+ if (title == NULL) {
+ real_title = "";
+ } else if (num_blank > 0) {
+ real_title = (CharPtr) MemNew (sizeof (Char) * (StringLen (title_fmt) + StringLen (title) + 15));
+ sprintf (real_title, title_fmt, num_blank, title);
+ free_title = TRUE;
+ } else {
+ real_title = title;
+ }
+
+ p = NormalGroup (h, -1, 0, real_title, programFont, NULL);
+ SetObjectExtra (p, dlg, StdCleanupExtraProc);
+
+ if (free_title) {
+ real_title = MemFree (real_title);
+ }
+ dlg->dialog = (DialoG) p;
+ dlg->fromdialog = TabColumnConfigDialogToChoice;
+ dlg->todialog = TabColumnConfigToDialog;
+ dlg->change_notify = change_notify;
+ dlg->change_userdata = change_userdata;
+
+ dlg->column_action = PopupList (p, TRUE, TabColumnActionChange);
+ SetObjectExtra (dlg->column_action, dlg, NULL);
+ PopupItem (dlg->column_action, "Ignore column");
+ PopupItem (dlg->column_action, "Match to Feature ID");
+ PopupItem (dlg->column_action, "Match to Gene locus tag");
+ PopupItem (dlg->column_action, "Match to Protein ID");
+ PopupItem (dlg->column_action, "Match to Dbxref");
+ PopupItem (dlg->column_action, "Match to Nucleotide ID");
+ PopupItem (dlg->column_action, "Match to Taxname");
+ PopupItem (dlg->column_action, "Apply to Source Qual");
+ PopupItem (dlg->column_action, "Apply to Feature Field");
+ PopupItem (dlg->column_action, "Apply to CDS-Gene-Prot Field");
+ SetValue (dlg->column_action, 1);
+
+ dlg->qual_grp = HiddenGroup (p, 0, 0, NULL);
+ dlg->src_qual = SourceQualChoiceDialog (dlg->qual_grp, TRUE, FALSE, change_notify, change_userdata);
+ dlg->feature_field_grp = HiddenGroup (dlg->qual_grp, 2, 0, NULL);
+ dlg->feature_type = FeatureTypeDialog (dlg->feature_field_grp, TabColumnConfigFieldChange, dlg);
+ dlg->feature_field = LegalFeatQualChoiceDialog (dlg->feature_field_grp, TabColumnConfigFieldChange, dlg);
+ dlg->cdsgeneprot = CDSGeneProtFieldDialog (dlg->qual_grp, TabColumnConfigFieldChange, dlg);
+
+ dlg->change_mrna = CheckBox (p, "Also change mRNA product name", TabColumnConfigButtonChange);
+ SetObjectExtra (dlg->change_mrna, dlg, NULL);
+ Disable (dlg->change_mrna);
+
+ dlg->apply_options = HiddenGroup (p, -1, 0, NULL);
+ if (num_blank > 0 || title == NULL) {
+ dlg->erase_when_blank = CheckBox (dlg->apply_options, "Erase field when table cell is blank", NULL);
+ if (num_blank == 0) {
+ Disable (dlg->erase_when_blank);
+ }
+ } else {
+ dlg->erase_when_blank = NULL;
+ }
+ dlg->existing_text = ExistingTextDialog (dlg->apply_options, change_notify, change_userdata);
+
+ Disable (dlg->apply_options);
+
+ AlignObjects (ALIGN_CENTER, (HANDLE) dlg->existing_text,
+ (HANDLE) dlg->erase_when_blank,
+ NULL);
+
+ AlignObjects (ALIGN_CENTER, (HANDLE) dlg->qual_grp, (HANDLE) dlg->apply_options, (HANDLE) dlg->change_mrna, NULL);
+
+ return (DialoG) p;
+}
+
+
+static CharPtr SummarizeTabColumnConfig (TabColumnConfigPtr t)
+{
+ CharPtr summ = NULL;
+ CharPtr apply_fmt = "Apply to %s (%s)";
+ CharPtr field;
+ CharPtr erase_when_blank = ", remove field when cell is blank";
+ CharPtr also_mrna = ", make mRNA product match new CDS product";
+ CharPtr existing_text;
+ Int4 summ_len = 0;
+
+ if (t == NULL) return StringSave ("Ignore column");
+
+ switch (t->match_type) {
+ case 0:
+ field = SummarizeFieldType (t->field);
+ if (field == NULL) {
+ field = StringSave ("unspecified field");
+ }
+ existing_text = SummarizeExistingText (t->existing_text);
+ summ_len = StringLen (apply_fmt) + StringLen (field) + StringLen (existing_text);
+ if (!t->skip_blank) {
+ summ_len += StringLen (erase_when_blank);
+ }
+ if (t->match_mrna) {
+ summ_len += StringLen (also_mrna);
+ }
+ summ = (CharPtr) MemNew (sizeof (Char) * summ_len);
+ sprintf (summ, apply_fmt, field, existing_text);
+ if (!t->skip_blank) {
+ StringCat (summ, erase_when_blank);
+ }
+ if (t->match_mrna) {
+ StringCat (summ, also_mrna);
+ }
+ field = MemFree (field);
+ break;
+ case eTableMatchFeatureID:
+ summ = StringSave ("Match to feature ID");
+ break;
+ case eTableMatchGeneLocusTag:
+ summ = StringSave ("Match to gene locus tag");
+ break;
+ case eTableMatchProteinID:
+ summ = StringSave ("Match to protein ID");
+ break;
+ case eTableMatchDbxref:
+ summ = StringSave ("Match to feature dbxref");
+ break;
+ case eTableMatchNucID:
+ summ = StringSave ("Match to nucleotide ID");
+ break;
+ case eTableMatchBioSource:
+ summ = StringSave ("Match to taxname");
+ break;
+ }
+ return summ;
+}
+
+
+typedef struct tabcolumnconfiglistdialog {
+ DIALOG_MESSAGE_BLOCK
+ DoC column_list_doc;
+ DialoG edit_col_dlg;
+ Nlm_ChangeNotifyProc change_notify;
+ Pointer change_userdata;
+ TabColumnConfigPtr PNTR column_list;
+ CharPtr PNTR first_values;
+ Int4Ptr blank_list;
+ Int4 num_columns;
+ Int4 current_column;
+} TabColumnConfigListDlgData, PNTR TabColumnConfigListDlgPtr;
+
+
+static void CleanupTabColumnConfigListDialog (GraphiC g, VoidPtr data)
+
+{
+ TabColumnConfigListDlgPtr dlg;
+ Int4 i;
+
+ dlg = (TabColumnConfigListDlgPtr) data;
+ if (dlg != NULL) {
+ for (i = 0; i < dlg->num_columns; i++) {
+ dlg->column_list[i] = TabColumnConfigFree (dlg->column_list[i]);
+ dlg->first_values[i] = MemFree (dlg->first_values[i]);
+ }
+ dlg->column_list = MemFree (dlg->column_list);
+ dlg->first_values = MemFree (dlg->first_values);
+ dlg->blank_list = MemFree (dlg->blank_list);
+ }
+ StdCleanupExtraProc (g, data);
+}
+
+
+
+
+static Pointer DialogToTabColumnConfigList (DialoG d)
+{
+ TabColumnConfigListDlgPtr dlg;
+ Int4 i;
+ ValNodePtr column_list = NULL;
+
+ dlg = (TabColumnConfigListDlgPtr) GetObjectExtra (d);
+ if (dlg == NULL) return NULL;
+ for (i = 0; i < dlg->num_columns; i++) {
+ ValNodeAddPointer (&column_list, 0, TabColumnConfigCopy (dlg->column_list[i]));
+ }
+ return (Pointer) column_list;
+}
+
+
+static ValNodePtr TestTabColumnConfigListDialog (DialoG d)
+{
+ TabColumnConfigListDlgPtr dlg;
+ Int4 i;
+ ValNodePtr err_list = NULL;
+ Int4 num_match = 0;
+ Boolean have_apply = FALSE;
+
+ dlg = (TabColumnConfigListDlgPtr) GetObjectExtra (d);
+ if (dlg == NULL) return NULL;
+
+ for (i = 0; i < dlg->num_columns; i++) {
+ if (dlg->column_list[i] != NULL) {
+ if (dlg->column_list[i]->match_type > 0) {
+ num_match++;
+ } else if (!IsFieldTypeEmpty(dlg->column_list[i]->field)) {
+ have_apply = TRUE;
+ }
+ }
+ }
+ if (num_match == 0) {
+ ValNodeAddPointer (&err_list, 0, "No match column");
+ } else if (num_match > 1) {
+ ValNodeAddPointer (&err_list, 0, "Too many match columns");
+ }
+ if (!have_apply) {
+ ValNodeAddPointer (&err_list, 0, "No apply column");
+ }
+ return err_list;
+}
+
+
+static void PopulateTabConfigListColumnListDoc (DialoG d)
+{
+ TabColumnConfigListDlgPtr dlg;
+ Int4 i, len;
+ CharPtr str, tmp;
+ CharPtr row_fmt = "%d\t%s\t%s\n";
+ RecT r;
+ FonT font = programFont;
+ ParData ParFmt = {FALSE, FALSE, FALSE, FALSE, FALSE, 0, 0};
+ ColData ColFmt[] =
+ {
+ {0, 0, 4, 0, NULL, 'l', TRUE, FALSE, FALSE, FALSE, FALSE}, /* column number */
+ {0, 0, 1, 0, NULL, 'l', TRUE, FALSE, FALSE, FALSE, FALSE}, /* action */
+ {0, 0, 80, 0, NULL, 'l', TRUE, FALSE, FALSE, FALSE, TRUE} /* first value */
+ };
+
+ dlg = (TabColumnConfigListDlgPtr) GetObjectExtra (d);
+ if (dlg == NULL) return;
+
+ Reset (dlg->column_list_doc);
+
+ ObjectRect (dlg->column_list_doc, &r);
+ InsetRect (&r, 4, 4);
+
+ if (dlg->num_columns < 10) {
+ ColFmt[0].pixWidth = stdCharWidth * 2;
+ } else {
+ ColFmt[0].pixWidth = stdCharWidth * 3;
+ }
+ ColFmt[1].pixWidth = (r.right - r.left - ColFmt[0].pixWidth) / 2;
+ ColFmt[2].pixWidth = ColFmt[1].pixWidth;
+ for (i = 0; i < dlg->num_columns; i++) {
+ str = SummarizeTabColumnConfig (dlg->column_list[i]);
+ len = StringLen (str) + StringLen (dlg->first_values[i]) + 15 + StringLen (row_fmt);
+ tmp = (CharPtr) MemNew (sizeof (Char) * len);
+ sprintf (tmp, row_fmt, i + 1, str, dlg->first_values[i]);
+ str = MemFree (str);
+ AppendText (dlg->column_list_doc, tmp, &ParFmt, ColFmt, font);
+ tmp = MemFree (tmp);
+ }
+ UpdateDocument (dlg->column_list_doc, 0, 0);
+}
+
+
+static void ClickColumnListDoc (DoC d, PoinT pt)
+{
+ Int2 item, row, col;
+ RecT rct;
+ TabColumnConfigListDlgPtr dlg;
+
+ dlg = (TabColumnConfigListDlgPtr) GetObjectExtra (d);
+ if (dlg == NULL) return;
+
+ MapDocPoint (d, pt, &item, &row, &col, &rct);
+ if (item > 0) {
+ dlg->current_column = item - 1;
+ PointerToDialog (dlg->edit_col_dlg, dlg->column_list[item - 1]);
+ SetTabColumnConfigDialogTitle (dlg->edit_col_dlg, dlg->first_values[item - 1], dlg->blank_list[item - 1]);
+ }
+}
+
+
+static void ChangeTabColumnConfig (Pointer userdata)
+{
+ TabColumnConfigListDlgPtr dlg;
+
+ dlg = (TabColumnConfigListDlgPtr) userdata;
+ if (dlg == NULL) return;
+
+ dlg->column_list[dlg->current_column] = TabColumnConfigFree (dlg->column_list[dlg->current_column]);
+ dlg->column_list[dlg->current_column] = DialogToPointer (dlg->edit_col_dlg);
+ PopulateTabConfigListColumnListDoc (dlg->dialog);
+ if (dlg->change_notify != NULL) {
+ (dlg->change_notify)(dlg->change_userdata);
+ }
+}
+
+
+NLM_EXTERN DialoG TabColumnConfigListDialog (GrouP h, ValNodePtr first_values, ValNodePtr blank_list, Nlm_ChangeNotifyProc change_notify, Pointer change_userdata)
+{
+ TabColumnConfigListDlgPtr dlg;
+ GrouP p;
+ ValNodePtr vnp_v, vnp_b;
+ Int4 i;
+
+ dlg = (TabColumnConfigListDlgPtr) MemNew (sizeof (TabColumnConfigListDlgData));
+ if (dlg == NULL)
+ {
+ return NULL;
+ }
+
+ p = HiddenGroup (h, -1, 0, NULL);
+ SetObjectExtra (p, dlg, CleanupTabColumnConfigListDialog);
+
+ dlg->dialog = (DialoG) p;
+ dlg->fromdialog = DialogToTabColumnConfigList;
+ dlg->testdialog = TestTabColumnConfigListDialog;
+
+ dlg->change_notify = change_notify;
+ dlg->change_userdata = change_userdata;
+
+
+ dlg->column_list_doc = DocumentPanel (p, stdCharWidth * 50, stdLineHeight * 12);
+ SetObjectExtra (dlg->column_list_doc, dlg, NULL);
+ SetDocProcs (dlg->column_list_doc, ClickColumnListDoc, NULL, NULL, NULL);
+ dlg->edit_col_dlg = TabColumnConfigDialog (p, NULL, 0, ChangeTabColumnConfig, dlg);
+
+ AlignObjects (ALIGN_CENTER, (HANDLE) dlg->column_list_doc, (HANDLE) dlg->edit_col_dlg, NULL);
+
+ /* populate column list */
+ dlg->num_columns = ValNodeLen (blank_list);
+ dlg->column_list = (TabColumnConfigPtr PNTR) MemNew (sizeof (TabColumnConfigPtr) * dlg->num_columns);
+ dlg->first_values = MemNew (sizeof (CharPtr) * dlg->num_columns);
+ dlg->blank_list = (Int4Ptr) MemNew (sizeof (Int4) * dlg->num_columns);
+
+ vnp_v = first_values;
+ vnp_b = blank_list;
+ i = 0;
+ while (vnp_b != NULL) {
+ dlg->blank_list[i] = vnp_b->data.intvalue;
+ if (vnp_v == NULL || StringHasNoText (vnp_v->data.ptrvalue)) {
+ dlg->first_values[i] = StringSave ("First row value is blank");
+ } else {
+ dlg->first_values[i] = StringSave (vnp_v->data.ptrvalue);
+ }
+ dlg->column_list[i] = NULL;
+ vnp_b = vnp_b->next;
+ if (vnp_v != NULL) {
+ vnp_v = vnp_v->next;
+ }
+ i++;
+ }
+
+ PopulateTabConfigListColumnListDoc ((DialoG) p);
+
+ dlg->current_column = 0;
+ PointerToDialog (dlg->edit_col_dlg, dlg->column_list[0]);
+ SetTabColumnConfigDialogTitle (dlg->edit_col_dlg, dlg->first_values[0], dlg->blank_list[0]);
+
+ return (DialoG) p;
+}
diff --git a/desktop/macrodlg.h b/desktop/macrodlg.h
new file mode 100755
index 00000000..a7c26cfa
--- /dev/null
+++ b/desktop/macrodlg.h
@@ -0,0 +1,63 @@
+/* macrodlg.h
+* ===========================================================================
+*
+* PUBLIC DOMAIN NOTICE
+* National Center for Biotechnology Information (NCBI)
+*
+* This software/database is a "United States Government Work" under the
+* terms of the United States Copyright Act. It was written as part of
+* the author's official duties as a United States Government employee and
+* thus cannot be copyrighted. This software/database is freely available
+* to the public for use. The National Library of Medicine and the U.S.
+* Government do not place any restriction on its use or reproduction.
+* We would, however, appreciate having the NCBI and the author cited in
+* any work or product based on this material
+*
+* Although all reasonable efforts have been taken to ensure the accuracy
+* and reliability of the software and data, the NLM and the U.S.
+* Government do not and cannot warrant the performance or results that
+* may be obtained by using this software or data. The NLM and the U.S.
+* Government disclaim all warranties, express or implied, including
+* warranties of performance, merchantability or fitness for any particular
+* purpose.
+*
+* ===========================================================================
+*
+* File Name: macrodlg.h
+*
+* Author: Colleen Bollin
+*
+* Version Creation Date: 11/23/2007
+*
+* $Revision: 1.7 $
+*
+* File Description:
+*
+* Modifications:
+* --------------------------------------------------------------------------
+* Date Name Description of modification
+* ------- ---------- -----------------------------------------------------
+*
+*
+* ==========================================================================
+*/
+
+#ifndef MACRODLG_H
+#define MACRODLG_H
+
+#include <objmacro.h>
+
+NLM_EXTERN void LaunchMacroEditor (IteM i);
+NLM_EXTERN DialoG TabColumnConfigDialog
+(GrouP h,
+ CharPtr title,
+ Int4 num_blank,
+ Nlm_ChangeNotifyProc change_notify,
+ Pointer change_userdata);
+NLM_EXTERN DialoG TabColumnConfigListDialog (GrouP h, ValNodePtr first_values, ValNodePtr blank_list, Nlm_ChangeNotifyProc change_notify, Pointer change_userdata);
+
+NLM_EXTERN DialoG FeatureTypeDialog (GrouP h, Nlm_ChangeNotifyProc change_notify, Pointer change_userdata);
+NLM_EXTERN DialoG StringConstraintDialog (GrouP h, CharPtr label, Boolean clear_btn, Nlm_ChangeNotifyProc change_notify, Pointer change_userdata);
+
+
+#endif
diff --git a/desktop/pubdesc.c b/desktop/pubdesc.c
index a9a28b5a..6397f881 100644
--- a/desktop/pubdesc.c
+++ b/desktop/pubdesc.c
@@ -29,7 +29,7 @@
*
* Version Creation Date: 7/28/95
*
-* $Revision: 6.62 $
+* $Revision: 6.66 $
*
* File Description:
*
@@ -46,6 +46,8 @@
#include <utilpub.h>
#include <explore.h>
#include <toasn3.h>
+#include <mla2api.h>
+#include <dlogutil.h>
#define FIRST_PAGE 0
@@ -714,6 +716,9 @@ static Pointer PubdescPageToPubdescPtr (DialoG d)
Int2 val;
CitRetractPtr crp;
UIEnum uieval;
+ /* for fixing special characters */
+ SeqDescrPtr sdp_tmp;
+ Boolean fixed_chars = FALSE;
pdp = NULL;
ppp = (PubdescPagePtr) GetObjectExtra (d);
@@ -959,6 +964,19 @@ static Pointer PubdescPageToPubdescPtr (DialoG d)
}
}
}
+
+ /* fix special characters before returning */
+ sdp_tmp = SeqDescrNew(NULL);
+ sdp_tmp->choice = Seq_descr_pub;
+ sdp_tmp->data.ptrvalue = pdp;
+ FixSpecialCharactersForObject (OBJ_SEQDESC, sdp_tmp, "You may not include special characters in publication text.\nIf you do not choose replacement characters, these special characters will be replaced with '#'.", TRUE, &fixed_chars);
+ sdp_tmp->data.ptrvalue = NULL;
+ sdp_tmp = SeqDescrFree (sdp_tmp);
+ if (fixed_chars)
+ {
+ PointerToDialog (d, pdp);
+ }
+
return (Pointer) pdp;
}
@@ -1712,6 +1730,41 @@ static CitGenPtr ConvertCitArtToCitGen (CitArtPtr cap)
return cgp;
}
+static void FixEPubOnlyJournal (PubdescPagePtr ppp, Boolean only_if_ahead_of_print)
+
+{
+ Char str [256];
+ Int2 starting_year;
+ UIEnum val;
+ Int2 year = 0;
+
+ if (ppp == NULL) return;
+
+ GetTitle (ppp->year, str, sizeof (str));
+ if (StringDoesHaveText (str)) {
+ StrToInt (str, &year);
+ if (year < 1900) {
+ year = 0;
+ }
+ }
+
+ GetTitle (ppp->journal, str, sizeof (str) - 1);
+ if (StringHasNoText (str)) return;
+
+ if (! Mla2IsEPubOnlyJournal (str, &starting_year)) return;
+
+ if (starting_year > 0) {
+ if (year < starting_year) return;
+ }
+
+ if (only_if_ahead_of_print) {
+ if (GetEnumPopup (ppp->pubstatus, pubstatus_alist, &val) && val > 0) {
+ if ((Uint1) val != PUBSTATUS_aheadofprint) return;
+ }
+ }
+
+ SetEnumPopup (ppp->pubstatus, pubstatus_alist, (UIEnum) PUBSTATUS_epublish);
+}
static ValNodePtr LookupAnArticle (PubEquivLookupProc lookup, ValNodePtr oldpep, Boolean byMuid)
@@ -1871,6 +1924,7 @@ static void LookupCommonProc (ButtoN b, Boolean byMuid, Boolean byPmid)
PointerToDialog (ppp->dialog, (Pointer) pdp);
}
PubdescFree (pdp);
+ FixEPubOnlyJournal (ppp, FALSE);
Select (ParentWindow (b));
Update ();
}
@@ -2000,12 +2054,14 @@ static void LookupISOJournalProc (ButtoN b)
if (len > 1) {
if (ChooseFromMultipleJournals (str, sizeof (str) - 1, allTitles)) {
SetTitle (ppp->journal, str);
+ FixEPubOnlyJournal (ppp, FALSE);
} else {
Message (MSG_OK, "Unable to match journal");
}
} else if (len == 1 && StringDoesHaveText (allTitles->data.ptrvalue) &&
allTitles->choice == Cit_title_iso_jta) {
SetTitle (ppp->journal, allTitles->data.ptrvalue);
+ FixEPubOnlyJournal (ppp, FALSE);
} else {
Message (MSG_OK, "Unable to match journal");
}
@@ -2716,6 +2772,7 @@ static void PubdescAcceptFormButtonProc (ButtoN b)
return;
}
pdp = (PubdescPtr) DialogToPointer (pfp->data);
+
copy = AsnIoMemCopy ((Pointer) pdp,
(AsnReadFunc) PubdescAsnRead,
(AsnWriteFunc) PubdescAsnWrite);
@@ -3352,6 +3409,7 @@ static Boolean ReplaceAllCallback (GatherObjectPtr gop)
if (PubEquivMatch (pdp->pub, radp->deleteThis->pub) == 0) {
serial_number = GetSerialNumber (pdp->pub);
pdp->pub = PubEquivFree (pdp->pub);
+
pdp->pub = AsnIoMemCopy (radp->replaceWith->pub, (AsnReadFunc) PubEquivAsnRead,
(AsnWriteFunc) PubEquivAsnWrite);
SetSerialNumber (pdp->pub, serial_number);
@@ -4355,14 +4413,12 @@ extern Int2 LIBCALLBACK PubdescGenFunc (Pointer data)
typedef struct citart_inpress_struct {
- FILE *logfile;
Boolean error;
- CharPtr f_last_name, f_first_name, l_last_name, l_first_name;
+ CharPtr f_last_name, l_last_name;
CharPtr jour_title, jour_volume, jour_page, art_title;
Int2 year;
- Int1 rank;
ByteStorePtr uids_bs; /*pmids*/
@@ -4395,6 +4451,8 @@ typedef struct citationupdateform {
ButtoN Extra_Term;
TexT extra_term_text;
+ ButtoN expand_year;
+
PopuP new_query;
DoC rdoc;
ButtoN action;
@@ -4679,13 +4737,33 @@ static void AddPage(Entrez2RequestPtr e2rp, CharPtr term, Boolean is_1st)
EntrezAddToBooleanRequest (e2rp, NULL, 0, "PAGE",term, NULL, 0, 0, NULL, NULL, FALSE, FALSE);
}
-static void AddYear(Entrez2RequestPtr e2rp, CharPtr term, Boolean is_1st)
+static void AddYear(Entrez2RequestPtr e2rp, CharPtr term, Boolean is_1st, Boolean expand)
{
+ Int4 year;
+ Char year_buf[10];
if (StringHasNoText (term)) return;
if (!is_1st) {
EntrezAddToBooleanRequest (e2rp, NULL, ENTREZ_OP_AND, NULL, NULL, NULL, 0, 0, NULL, NULL, FALSE, FALSE);
}
- EntrezAddToBooleanRequest (e2rp, NULL, 0, "EDAT", term, NULL, 0, 0, NULL, NULL, FALSE, FALSE);
+ if (expand) {
+ year = atoi (term);
+ if (year > 0) {
+ EntrezAddToBooleanRequest (e2rp, NULL, ENTREZ_OP_LEFT_PAREN, NULL, NULL, NULL, 0, 0, NULL, NULL, FALSE, FALSE);
+ sprintf (year_buf, "%d", year - 1);
+ EntrezAddToBooleanRequest (e2rp, NULL, 0, "EDAT", year_buf, NULL, 0, 0, NULL, NULL, FALSE, FALSE);
+ EntrezAddToBooleanRequest (e2rp, NULL, ENTREZ_OP_OR, NULL, NULL, NULL, 0, 0, NULL, NULL, FALSE, FALSE);
+ sprintf (year_buf, "%d", year);
+ EntrezAddToBooleanRequest (e2rp, NULL, 0, "EDAT", year_buf, NULL, 0, 0, NULL, NULL, FALSE, FALSE);
+ EntrezAddToBooleanRequest (e2rp, NULL, ENTREZ_OP_OR, NULL, NULL, NULL, 0, 0, NULL, NULL, FALSE, FALSE);
+ sprintf (year_buf, "%d", year + 1);
+ EntrezAddToBooleanRequest (e2rp, NULL, 0, "EDAT", year_buf, NULL, 0, 0, NULL, NULL, FALSE, FALSE);
+ EntrezAddToBooleanRequest (e2rp, NULL, ENTREZ_OP_RIGHT_PAREN, NULL, NULL, NULL, 0, 0, NULL, NULL, FALSE, FALSE);
+ } else {
+ EntrezAddToBooleanRequest (e2rp, NULL, 0, "EDAT", term, NULL, 0, 0, NULL, NULL, FALSE, FALSE);
+ }
+ } else {
+ EntrezAddToBooleanRequest (e2rp, NULL, 0, "EDAT", term, NULL, 0, 0, NULL, NULL, FALSE, FALSE);
+ }
}
static void AddAll(Entrez2RequestPtr e2rp, CharPtr term, Boolean is_1st)
@@ -4698,72 +4776,62 @@ static void AddAll(Entrez2RequestPtr e2rp, CharPtr term, Boolean is_1st)
}
+static Entrez2RequestPtr QueryFromForm (CitationUpdateFormPtr cufp, Boolean use_all)
+{
+ Entrez2RequestPtr e2rp = NULL;
+ Boolean is_first_term = TRUE;
+ Char val_str[256];
+ if (cufp == NULL) return NULL;
-/*****************************************************************************
-*
-* Function: FormDefaultQuery
-* constructs entrez2 query from information passed in, execute
-* the query, and get back the uids from entrezReplyPtr.
-********************************pass uids back as bs of caipp. returns void.
-* Argument: CitArtInPressPtr
-*
-* Returns: void
-*
-*****************************************************************************/
-static void FormDefaultQuery (Entrez2RequestPtr e2rp, CitArtInPressPtr caipp) {
-
- Char year [16];
-
- if (caipp->year != -1) {
- sprintf(year, "%d", (int) caipp->year);
+ /* for new term in query, add to [all], then automatically go through Term mapping*/
+ /* add exta term (user supplied) as ALL, no specific field */
+ /* debug: assuming this is a well-formed query string, let the add func. parse it*/
+ if ( !TextHasNoText (cufp->extra_term_text) && (use_all || GetStatus (cufp->Extra_Term))) {
+ GetTitle (cufp->extra_term_text, val_str, sizeof (val_str));
+ e2rp = EntrezCreateBooleanRequest (TRUE, FALSE, "PubMed", val_str, 0, 0, NULL, 20, 0);
+ is_first_term = FALSE;
+ } else {
+ e2rp = EntrezCreateBooleanRequest (TRUE, FALSE, "PubMed", NULL, 0, 0, NULL, 20, 0);
}
- /* add all available fields as indicated by rank*/
- if (caipp->rank == 10) { /* add title, page, vol */
-
- AddJournal(e2rp, caipp->jour_title, TRUE); /* add first term*/
- AddVolume(e2rp, caipp->jour_volume, FALSE);
- AddPage(e2rp, caipp->jour_page, FALSE);
+ if ( ! TextHasNoText (cufp->f_auth_text) && (use_all || GetStatus (cufp->First_Author))) {
+ GetTitle (cufp->f_auth_text, val_str, sizeof (val_str));
+ AddAuthor(e2rp, val_str, is_first_term);
+ is_first_term = FALSE;
}
-
- else {
-
- if (caipp->rank > 4) { /* add author in all cases*/
- /***** term can be capital letter or lower case, (ENTREZ_OP_NONE is 0) */
- AddAuthor(e2rp, caipp->f_last_name, TRUE); /* add first term */
+ if ( !TextHasNoText (cufp->l_auth_text) && (use_all || GetStatus (cufp->Last_Author))) {
+ GetTitle (cufp->l_auth_text, val_str, sizeof (val_str));
+ AddAuthor(e2rp, val_str, is_first_term);
+ is_first_term = FALSE;
+ }
- if(StringCmp(caipp->l_last_name, "null") && StringCmp(caipp->l_last_name, caipp->f_last_name)) {
- AddAuthor(e2rp, caipp->l_last_name, FALSE);
- }
- }
-
- if (caipp->rank == 6) { /* add year, takes StringSave(year-1900)?? */
- AddYear(e2rp, year, FALSE);
- }
+ if ( !TextHasNoText (cufp->journal_text) && (use_all || GetStatus (cufp->Journal))) {
+ GetTitle (cufp->journal_text, val_str, sizeof (val_str));
+ AddJournal(e2rp, val_str, is_first_term);
+ is_first_term = FALSE;
+ }
- if (caipp->rank > 6) { /* add jour_title */
- AddJournal(e2rp, caipp->jour_title, FALSE); /* NOT first term*/
- }
-
- if (caipp->rank == 9) { /* add vol and year */
- AddVolume(e2rp, caipp->jour_volume, FALSE);
- AddYear(e2rp, year, FALSE);
- }
+ if ( !TextHasNoText (cufp->volume_text) && (use_all || GetStatus (cufp->Volume))) {
+ GetTitle (cufp->volume_text, val_str, sizeof (val_str));
+ AddVolume(e2rp, val_str, is_first_term);
+ is_first_term = FALSE;
+ }
- if (caipp->rank == 8) { /* add year or volume */
-
- if (caipp->year != -1) {
- AddYear(e2rp, year, FALSE);
- }
- else {
- AddVolume(e2rp, caipp->jour_volume, FALSE);
- }
- } /* end rank 8*/
- }
-}
+ if ( !TextHasNoText (cufp->page_text) && (use_all || GetStatus (cufp->Page))) {
+ GetTitle (cufp->page_text, val_str, sizeof (val_str));
+ AddPage(e2rp, val_str, is_first_term);
+ is_first_term = FALSE;
+ }
+ if ( !TextHasNoText (cufp->year_text) && (use_all || GetStatus (cufp->Year))) {
+ GetTitle (cufp->year_text, val_str, sizeof (val_str));
+ AddYear(e2rp, val_str, is_first_term, GetStatus (cufp->expand_year));
+ is_first_term = FALSE;
+ }
+ return e2rp;
+}
/*****************************************************************************
@@ -4788,17 +4856,6 @@ static void SendQuery (ButtoN b)
Entrez2RequestPtr e2rp = NULL;
- Char f_auth [64];
- Char l_auth [64];
- Char journal [64];
- Char volume [64];
- Char page [64];
- Char year [64];
- Char new_term [256];
-
- Boolean is_first_term = TRUE;
-
-
cufp = (CitationUpdateFormPtr) GetObjectExtra (b);
if (cufp == NULL) return;
@@ -4813,74 +4870,7 @@ static void SendQuery (ButtoN b)
/*** trick: must make sure to add Op : AND, after the first term, can't
add one before!! */
- if (choice == 1) { /* precess default query*/
-
- e2rp = EntrezCreateBooleanRequest (TRUE, FALSE, "PubMed", NULL, 0, 0, NULL, 20, 0);
-
- FormDefaultQuery (e2rp, caipp);
-
-
- /* add exta term (user supplied) as ALL, no specific field */
- if ( GetStatus (cufp->Extra_Term) ) {
- GetTitle (cufp->extra_term_text, new_term, sizeof (f_auth));
- AddAll(e2rp, new_term, FALSE);
- is_first_term = FALSE;
- }
- }
-
- if (choice == 2) { /*user specify query*/
-
- /* for new term in query, add to [all], then automatically go through Term mapping*/
- /* add exta term (user supplied) as ALL, no specific field */
- /* debug: assuming this is a well-formed query string, let the add func. parse it*/
- if ( GetStatus (cufp->Extra_Term) ) {
- GetTitle (cufp->extra_term_text, new_term, sizeof (f_auth));
- e2rp = EntrezCreateBooleanRequest (TRUE, FALSE, "PubMed", new_term, 0, 0, NULL, 20, 0);
- is_first_term = FALSE;
- }
- else{
- e2rp = EntrezCreateBooleanRequest (TRUE, FALSE, "PubMed", NULL, 0, 0, NULL, 20, 0);
- }
-
- if ( GetStatus (cufp->First_Author) ) {
- GetTitle (cufp->f_auth_text, f_auth, sizeof (f_auth));
- AddAuthor(e2rp, f_auth, is_first_term);
- is_first_term = FALSE;
- }
-
- if ( GetStatus (cufp->Last_Author) ) {
- GetTitle (cufp->l_auth_text, l_auth, sizeof (l_auth));
- AddAuthor(e2rp, l_auth, is_first_term);
- is_first_term = FALSE;
- }
-
- if ( GetStatus (cufp->Journal) ) {
- GetTitle (cufp->journal_text, journal, sizeof (journal));
- AddJournal(e2rp, journal, is_first_term);
- is_first_term = FALSE;
- }
-
- if ( GetStatus (cufp->Volume) ) {
- GetTitle (cufp->volume_text, volume, sizeof (volume));
- AddVolume(e2rp, volume, is_first_term);
- is_first_term = FALSE;
- }
-
- if ( GetStatus (cufp->Page) ) {
- GetTitle (cufp->page_text, volume, sizeof (page));
- AddPage(e2rp, page, is_first_term);
- is_first_term = FALSE;
- }
-
- if ( GetStatus (cufp->Year) ) {
- GetTitle (cufp->year_text, year, sizeof (year));
- AddYear(e2rp, year, is_first_term);
- is_first_term = FALSE;
- }
- }
-
- SetValue (cufp->new_query, 2); /* reset the popup list to display customize item*/
-
+ e2rp = QueryFromForm (cufp, choice == 1);
/* process query, get Uids, populate the caipp field*/
GetUidListFromE2Request (caipp, e2rp, cufp->rdoc);
@@ -5029,6 +5019,26 @@ static void Quit (ButtoN b)
}
+static void SetRequestType (ButtoN b)
+{
+ CitationUpdateFormPtr cufp;
+
+ cufp = (CitationUpdateFormPtr) GetObjectExtra (b);
+ if (cufp == NULL) return;
+
+ if (GetStatus (cufp->First_Author)
+ || GetStatus (cufp->Last_Author)
+ || GetStatus (cufp->Journal)
+ || GetStatus (cufp->Volume)
+ || GetStatus (cufp->Page)
+ || GetStatus (cufp->Year)
+ || GetStatus (cufp->Extra_Term)) {
+ SetValue (cufp->new_query, 2);
+ } else {
+ SetValue (cufp->new_query, 1);
+ }
+}
+
/*****************************************************************************
* Function: CreateCitationUpdateWindow_detail
@@ -5089,26 +5099,34 @@ static WindoW CreateCitationUpdateWindow_detail (Pointer userdata)
authors = HiddenGroup (cit_fields, 4, 0, NULL);
SetGroupSpacing (authors, 5, 3);
- cufp->First_Author = CheckBox (authors, "First Author", NULL);
+ cufp->First_Author = CheckBox (authors, "First Author", SetRequestType);
+ SetObjectExtra (cufp->First_Author, cufp, NULL);
cufp->f_auth_text = DialogText (authors, "", 12, NULL);
- cufp->Last_Author = CheckBox (authors, "Last Author", NULL);
+ cufp->Last_Author = CheckBox (authors, "Last Author", SetRequestType);
+ SetObjectExtra (cufp->Last_Author, cufp, NULL);
cufp->l_auth_text = DialogText (authors, "", 12, NULL);
journal = HiddenGroup (cit_fields, 2, 0, NULL);
SetGroupSpacing (journal, 5, 3);
- cufp->Journal = CheckBox (journal, "Journal", NULL);
+ cufp->Journal = CheckBox (journal, "Journal", SetRequestType);
+ SetObjectExtra (cufp->Journal, cufp, NULL);
cufp->journal_text = DialogText (journal, "", 30, NULL);
- imprint = HiddenGroup (cit_fields, 6, 0, NULL);
+ imprint = HiddenGroup (cit_fields, 7, 0, NULL);
SetGroupSpacing (imprint, 5, 3);
- cufp->Year = CheckBox (imprint, "Year", NULL);
+ cufp->Year = CheckBox (imprint, "Year", SetRequestType);
+ SetObjectExtra (cufp->Year, cufp, NULL);
cufp->year_text = DialogText (imprint, "", 6, NULL);
- cufp->Volume = CheckBox (imprint, "Volume", NULL);
+ cufp->expand_year = CheckBox (imprint, "+/- 1 Year", NULL);
+ SetStatus (cufp->expand_year, TRUE);
+ cufp->Volume = CheckBox (imprint, "Volume", SetRequestType);
+ SetObjectExtra (cufp->Volume, cufp, NULL);
cufp->volume_text = DialogText (imprint, "", 6, NULL);
- cufp->Page = CheckBox (imprint, "Page", NULL);
+ cufp->Page = CheckBox (imprint, "Page", SetRequestType);
+ SetObjectExtra (cufp->Page, cufp, NULL);
cufp->page_text = DialogText (imprint, "", 6, NULL);
@@ -5116,7 +5134,7 @@ static WindoW CreateCitationUpdateWindow_detail (Pointer userdata)
SetGroupSpacing (title, 5, 3);
StaticPrompt (title, "Article Title:", 0, dialogTextHeight, systemFont, 'l');
- cufp->art_title_text = ScrollText (title, 30, 1, systemFont, TRUE, NULL);
+ cufp->art_title_text = ScrollText (title, 30, 2, systemFont, TRUE, NULL);
SafeSetTitle (cufp->art_title_text, "");
i = HiddenGroup (h, 2, 0, NULL); /*3rd vertical item in h*/
@@ -5126,7 +5144,8 @@ static WindoW CreateCitationUpdateWindow_detail (Pointer userdata)
StaticPrompt (i, " ", 0, popupMenuHeight, programFont, 'l');
StaticPrompt (i, " ", 0, popupMenuHeight, programFont, 'l');
- cufp->Extra_Term = CheckBox (i, "Add these terms to new query", NULL);
+ cufp->Extra_Term = CheckBox (i, "Add these terms to new query", SetRequestType);
+ SetObjectExtra (cufp->Extra_Term, cufp, NULL);
cufp->extra_term_text = DialogText (i, "", 25, NULL);
@@ -5200,6 +5219,22 @@ static WindoW CreateCitationUpdateWindow_detail (Pointer userdata)
return w;
}
+
+static CharPtr GetLastNameFromPersonId (PersonIdPtr pid)
+{
+ NameStdPtr nsp;
+ CharPtr lname = NULL;
+
+ if (pid != NULL && pid->choice == 2) {
+ nsp = (NameStdPtr) pid->data;
+ if (nsp->names != NULL) {
+ lname = nsp->names[0];
+ }
+ }
+ return lname;
+}
+
+
/*****************************************************************************
* Function: PopulateWindow
* Description: use pdp to populate a caipp structure. No default query!!
@@ -5224,30 +5259,22 @@ static void PopulateWindow( WindoW w, PubdescPtr pdp)
CitJourPtr cjp;
ImprintPtr ImpPtr;
AuthListPtr alp;
- AuthorPtr f_author_p, l_author_p, ap; /* first and last authors*/
- PersonIdPtr pid_p, pid;
- NameStdPtr nsp;
+ AuthorPtr f_author_p = NULL, l_author_p = NULL, ap; /* first and last authors*/
+ PersonIdPtr pid;
ValNodePtr title_vnp, auth_vnp, art_title_vnp;
- /*could get rid of full names*/
- CharPtr f_first_name = NULL, f_last_name = NULL, l_first_name = NULL, l_last_name = NULL;
- CharPtr jour_title = NULL, jour_volume, jour_page, art_title = NULL;
+ CharPtr f_last_name = NULL, l_last_name = NULL;
+ CharPtr jour_title = NULL, jour_volume = NULL, jour_page = NULL, art_title = NULL;
- Int2 year;
- Int1 rank;
+ Int2 year = -1;
- Boolean has_author, has_title, has_volume, has_page, has_year, is_article;
- has_author = has_title = has_volume = has_page = has_year = is_article = FALSE;
+ Boolean is_article = FALSE;;
cufp = (CitationUpdateFormPtr) GetObjectExtra (w);
if (cufp == NULL) return;
- if ( (caipp = MemNew(sizeof(CitArtInPress))) == NULL) {
- return;
- }
-
pubdesc = pdp; /* don't really need this could use pubdesc*/
if(pubdesc == NULL) return;
@@ -5256,237 +5283,99 @@ static void PopulateWindow( WindoW w, PubdescPtr pdp)
for (pub=pubdesc->pub, cap=NULL; pub; pub=pub->next) {
if (pub->choice == PUB_Article) {
-
is_article = TRUE;
cap = (CitArtPtr) pub->data.ptrvalue;
if (cap == NULL) return;
/* look for cit-art from journals only*/
- if (cap->from ==1) {
-
- cjp = (CitJourPtr) cap->fromptr;
- if (cjp == NULL) return;
-
- ImpPtr =(ImprintPtr) cjp->imp;
- if(ImpPtr == NULL) return;
+ if (cap->from ==1) {
+ cjp = (CitJourPtr) cap->fromptr;
+ if (cjp == NULL) return;
+
+ ImpPtr =(ImprintPtr) cjp->imp;
+ if(ImpPtr == NULL) return;
-
- /* get article title */
- if( !cap->title ) { art_title = StringSave("No title was available"); }
- for (art_title_vnp=cap->title; art_title_vnp; art_title_vnp=art_title_vnp->next) {
- /*could combine the four*/
- if((art_title_vnp->choice == Cit_title_name) || (art_title_vnp->choice == Cit_title_tsub)|| (art_title_vnp->choice == Cit_title_trans)) {
- art_title = art_title_vnp->data.ptrvalue;
- }
- }
-
- /* get journal title */
- if( !cjp->title ) { jour_title = StringSave("null"); }
- for (title_vnp=cjp->title; title_vnp; title_vnp=title_vnp->next) {
- /*could combine the four*/
- if (title_vnp->choice == Cit_title_iso_jta) {
- jour_title = title_vnp->data.ptrvalue;
- }
- else if (title_vnp->choice == Cit_title_ml_jta) {
- jour_title = title_vnp->data.ptrvalue;
- }
- else if (title_vnp->choice == Cit_title_jta) {
- jour_title = title_vnp->data.ptrvalue;
- }
- else if (title_vnp->choice == Cit_title_name) {
- jour_title = title_vnp->data.ptrvalue;
- /* break; don't need break ??? */
- }
- else {
- jour_title = StringSave("this journal got a WEIRD title");
- }
- has_title = TRUE;
- }
+ /* get article title */
+ for (art_title_vnp=cap->title; art_title_vnp; art_title_vnp=art_title_vnp->next) {
+ /*could combine the four*/
+ if((art_title_vnp->choice == Cit_title_name) || (art_title_vnp->choice == Cit_title_tsub)|| (art_title_vnp->choice == Cit_title_trans)) {
+ art_title = art_title_vnp->data.ptrvalue;
+ }
+ }
+
+ /* get journal title */
+ for (title_vnp=cjp->title; title_vnp; title_vnp=title_vnp->next) {
+ /*could combine the four*/
+ if (title_vnp->choice == Cit_title_iso_jta) {
+ jour_title = title_vnp->data.ptrvalue;
+ }
+ else if (title_vnp->choice == Cit_title_ml_jta) {
+ jour_title = title_vnp->data.ptrvalue;
+ }
+ else if (title_vnp->choice == Cit_title_jta) {
+ jour_title = title_vnp->data.ptrvalue;
+ }
+ else if (title_vnp->choice == Cit_title_name) {
+ jour_title = title_vnp->data.ptrvalue;
+ /* break; don't need break ??? */
+ }
+ else {
+ jour_title = "this journal got a WEIRD title";
+ }
+ }
- if (ImpPtr->volume) {
- jour_volume = ImpPtr->volume;
- has_volume = TRUE;
- }
- else { jour_volume = StringSave("null"); }
-
- if (ImpPtr->pages) {
- jour_page = ImpPtr->pages;
- has_page = TRUE;
- }
- else { jour_page = StringSave("null"); }
+ if (ImpPtr->volume) {
+ jour_volume = ImpPtr->volume;
+ }
+
+ if (ImpPtr->pages) {
+ jour_page = ImpPtr->pages;
+ }
- /* not ideal behavior, although date is required in imp*/
- if ((DatePtr)ImpPtr->date == NULL) { return; }
-
- year = -1;
- DateRead (ImpPtr->date, &year, NULL, NULL, NULL);
- if (year != -1) { has_year = TRUE; }
-
- alp = (AuthListPtr) cap->authors;
- if (alp == NULL) {
-
- if (caipp->logfile) {
-
- fprintf(caipp->logfile,"|this in-press cit-art has no author| %s | %s| %s | %d\n", jour_title, jour_volume, jour_page, year);
- }
- return;
- }
-
- /*get ptr to both 1st and last author*/
- auth_vnp = (ValNodePtr) alp->names; /*get the first node */
-
- f_author_p = (AuthorPtr)auth_vnp->data.ptrvalue;
- l_author_p =(AuthorPtr)auth_vnp->data.ptrvalue;
-
- /* get the node for the last author, but ignore consortium */
- while (auth_vnp->next) {
- auth_vnp = auth_vnp->next;
- ap = (AuthorPtr) auth_vnp->data.ptrvalue;
- if (ap != NULL) {
- pid = (PersonIdPtr) ap->name;
- if (pid != NULL) {
- if (pid->choice == 2) {
- l_author_p =(AuthorPtr)auth_vnp->data.ptrvalue;
- }
+ /* not ideal behavior, although date is required in imp*/
+ if ((DatePtr)ImpPtr->date != NULL) {
+ DateRead (ImpPtr->date, &year, NULL, NULL, NULL);
}
- }
- }
-
- /* should be analyzing the value of alp->choice, not alp->names->choice*/
- if (alp->choice == 1) {
- /*could make this (getting name from author_p) a function */
- pid_p = (PersonIdPtr) f_author_p->name;
-
- if (pid_p->choice ==2) {
-
- nsp = (NameStdPtr) pid_p -> data;
-
- /* why didnot this work?? *
- if (!( nsp->names[0])) */
-
- if (nsp->names[0] != NULL ) {
-
- f_last_name = nsp->names[0];
- has_author = TRUE;
-
- if (nsp->names[1]!= NULL) {
- f_first_name = nsp->names[1];
- }
- else { f_first_name = StringSave("null"); }
-
- }
- /* set to null!! */
- else { f_last_name = StringSave("null");
- f_first_name = StringSave("null");
- }
- }
-
-
- /*now do the last author */
-
- if (l_author_p->name == f_author_p->name) { /*single author*/
- l_first_name = f_first_name;
- l_last_name =f_last_name;
- }
- else {
-
- pid_p = (PersonIdPtr) l_author_p->name;
- if (pid_p->choice ==2) {
- nsp = (NameStdPtr) pid_p -> data;
-
- if (nsp->names[0] != NULL ) {
-
- l_last_name = nsp->names[0];
- if (nsp->names[1]!= NULL) {
- l_first_name = nsp->names[1];
- }
- else { l_first_name = StringSave("null"); }
- }
- else { l_last_name = StringSave("null");
- l_first_name = StringSave("null");
- }
- }
- } /*end of last author */
- } /* end alp-> choice is std */
-
-
- /* here, if author list is not std names */
- else if (alp->choice == 2) {
-
- /* full name as last name*/
- f_last_name = (CharPtr)f_author_p;
- f_first_name = StringSave ("null");
- has_author = TRUE;
-
- l_last_name = (CharPtr)l_author_p;
- l_first_name = StringSave ("null");
- }
- else {
- /* full name as last name*/
- f_last_name = (CharPtr)f_author_p;
- f_first_name = StringSave ("null");
- has_author = TRUE;
-
- l_last_name = (CharPtr)l_author_p;
- l_first_name = StringSave ("null");
- }
-
-
-
- rank = 0;
- /*caculate rank*/
-
- if (has_page && has_volume && has_title) {
- rank = 10;
- }
- else if (has_author) {
- if (has_title) {
- if(has_year && has_volume) { rank = 9; }
- else if (has_year || has_volume) { rank = 8; }
- else { rank = 7; } /* auth + journal_title only*/
- }
- else if (has_year) { rank = 6; } /* auth + year only*/
- else { rank = 5; } /* author but no journal_title case */
- }
- else { rank = 0; } /*ignore all other combo*/
-
-
- rank = 0;
- /*caculate rank*/
- /* better set flags as key individual fields are collected!!
- * avoid many calls to StringCmp */
- /* must have first author, or (journal_title, volume and page)*/
-
- if (has_page && has_volume && has_title) {
- rank = 10;
- }
- else if (has_author) {
- if (has_title) {
- if(has_year && has_volume) { rank = 9; }
- else if (has_year || has_volume) { rank = 8; }
- else { rank = 7; } /* auth + journal_title only*/
- }
- else if (has_year) { rank = 6; } /* auth + year only*/
- else { rank = 5; } /* author but no journal_title case */
- }
- else { rank = 0; } /*ignore all other combo*/
-
-
- /* safe practice to save a new copy if the struct my go away. */
- caipp->jour_title = StringSave(jour_title);
- caipp->f_last_name = StringSave(f_last_name);
- caipp->f_first_name =StringSave(f_first_name);
- caipp->l_last_name = StringSave(l_last_name);
- caipp->l_first_name = StringSave(l_first_name);
- caipp->jour_volume = StringSave(jour_volume);
- caipp->jour_page = StringSave(jour_page);
- caipp->year = year;
- caipp->art_title = StringSave(art_title);
- caipp->rank = rank;
-
- /*} end if prepub*/
+
+ alp = (AuthListPtr) cap->authors;
+ if (alp != NULL) {
+ /*get ptr to both 1st and last author*/
+ auth_vnp = (ValNodePtr) alp->names; /*get the first node */
+
+ f_author_p = (AuthorPtr)auth_vnp->data.ptrvalue;
+ l_author_p =(AuthorPtr)auth_vnp->data.ptrvalue;
+
+ /* get the node for the last author, but ignore consortium */
+ while (auth_vnp->next) {
+ auth_vnp = auth_vnp->next;
+ ap = (AuthorPtr) auth_vnp->data.ptrvalue;
+ if (ap != NULL) {
+ pid = (PersonIdPtr) ap->name;
+ if (pid != NULL) {
+ if (pid->choice == 2) {
+ l_author_p =(AuthorPtr)auth_vnp->data.ptrvalue;
+ }
+ }
+ }
+ }
+
+ /* should be analyzing the value of alp->choice, not alp->names->choice*/
+ if (alp->choice == 1) {
+ /* std */
+ f_last_name = GetLastNameFromPersonId (f_author_p->name);
+ l_last_name = GetLastNameFromPersonId (l_author_p->name);
+ } else if (alp->choice == 2) {
+ /* full name as last name*/
+ f_last_name = (CharPtr)f_author_p;
+ l_last_name = (CharPtr)l_author_p;
+ } else {
+ /* full name as last name*/
+ f_last_name = (CharPtr)f_author_p;
+ l_last_name = (CharPtr)l_author_p;
+ }
+ }
} /*end if cit-art*/
} /*end if Pub_article*/
} /* end for, looped through all valnodes of pub*/
@@ -5498,9 +5387,20 @@ static void PopulateWindow( WindoW w, PubdescPtr pdp)
ArrowCursor ();
Update ();
- MemFree(caipp);
return;
}
+
+ if ( (caipp = MemNew(sizeof(CitArtInPress))) == NULL) {
+ return;
+ }
+
+ caipp->jour_title = StringSave(jour_title);
+ caipp->f_last_name = StringSave(f_last_name);
+ caipp->l_last_name = StringSave(l_last_name);
+ caipp->jour_volume = StringSave(jour_volume);
+ caipp->jour_page = StringSave(jour_page);
+ caipp->year = year;
+ caipp->art_title = StringSave(art_title);
cufp->caipp = caipp;
@@ -5532,17 +5432,45 @@ static void UpdateWindow( CitationUpdateFormPtr cufp, CitArtInPressPtr caipp)
if (caipp == NULL) return;
- year = MemNew(5);
- sprintf(year, "%d", caipp->year);
+ if (caipp->year > -1) {
+ year = MemNew(5);
+ sprintf(year, "%d", caipp->year);
+ SafeSetTitle (cufp->year_text, year);
+ } else {
+ SetTitle (cufp->year_text, "");
+ }
- SafeSetTitle (cufp->f_auth_text,caipp->f_last_name);
- SafeSetTitle (cufp->l_auth_text,caipp->l_last_name);
- SafeSetTitle (cufp->journal_text,caipp->jour_title);
- SafeSetTitle (cufp->year_text, year);
- SafeSetTitle (cufp->volume_text,caipp->jour_volume);
- SafeSetTitle (cufp->page_text,caipp->jour_page);
+ if (caipp->f_last_name == NULL) {
+ SetTitle (cufp->f_auth_text, "");
+ } else {
+ SafeSetTitle (cufp->f_auth_text, caipp->f_last_name);
+ }
+ if (caipp->l_last_name == NULL) {
+ SetTitle (cufp->l_auth_text, "");
+ } else {
+ SafeSetTitle (cufp->l_auth_text,caipp->l_last_name);
+ }
+ if (caipp->jour_title == NULL) {
+ SetTitle (cufp->journal_text, "");
+ } else {
+ SafeSetTitle (cufp->journal_text,caipp->jour_title);
+ }
+ if (caipp->jour_volume == NULL) {
+ SetTitle (cufp->volume_text, "");
+ } else {
+ SafeSetTitle (cufp->volume_text,caipp->jour_volume);
+ }
+ if (caipp->jour_page== NULL) {
+ SetTitle (cufp->page_text, "");
+ } else {
+ SafeSetTitle (cufp->page_text,caipp->jour_page);
+ }
- SafeSetTitle (cufp->art_title_text, caipp->art_title);
+ if (caipp->art_title == NULL) {
+ SetTitle (cufp->art_title_text, "");
+ } else {
+ SafeSetTitle (cufp->art_title_text, caipp->art_title);
+ }
SafeSetTitle (cufp->extra_term_text, "");
SetValue (cufp->new_query, 1); /* reset the popup to default query after an update*/
diff --git a/desktop/salpanel.c b/desktop/salpanel.c
index bfa4a3a2..472fc76c 100644
--- a/desktop/salpanel.c
+++ b/desktop/salpanel.c
@@ -29,7 +29,7 @@
*
* Version Creation Date: 1/27/96
*
-* $Revision: 6.88 $
+* $Revision: 6.92 $
*
* File Description:
*
@@ -54,6 +54,7 @@
#include <dlogutil.h>
#include <import.h>
#include <seqpanel.h>
+#include <cdrgn.h>
#define OBJ_VIRT 254
@@ -4616,7 +4617,7 @@ typedef struct batchapplyfeaturedetailsdlg
TexT rnaName;
TexT featcomment;
DialoG featdef_choice_dlg;
- PopuP rnaSubType;
+ DialoG rnaType;
PopuP reading_frame;
Int4 feattype;
Nlm_ChangeNotifyProc change_notify;
@@ -4631,9 +4632,10 @@ BatchApplyFeatureDetailsFree
{
bafdp->defline = MemFree (bafdp->defline);
bafdp->geneName = MemFree (bafdp->geneName);
- bafdp->geneDesc = MemFree (bafdp->geneDesc);
+ bafdp->geneDesc = MemFree (bafdp->geneDesc);
bafdp->protName = MemFree (bafdp->protName);
bafdp->protDesc = MemFree (bafdp->protDesc);
+ bafdp->rnaType = RnaTypeFree (bafdp->rnaType);
bafdp->rnaName = MemFree (bafdp->rnaName);
bafdp->featcomment = MemFree (bafdp->featcomment);
bafdp->featdef_name = MemFree (bafdp->featdef_name);
@@ -4659,24 +4661,11 @@ extern BatchApplyFeatureDetailsPtr BatchApplyFeatureDetailsNew (void)
bafdp->featdef_name = NULL;
bafdp->featdef_choice = FEATDEF_GENE;
bafdp->reading_frame = 4;
- bafdp->rnaSubType = 4;
+ bafdp->rnaType = NULL;
}
return bafdp;
}
-static ENUM_ALIST(rnax_subtype_alist)
- {" ", 99},
- {"unknown", 0},
- {"preRna", 1},
- {"mRNA", 2},
- {"tRNA", 3},
- {"rRNA", 4},
- {"snRNA", 5},
- {"scRNA", 6},
- {"snoRNA", 7},
- {"misc_RNA", 255},
-END_ENUM_ALIST
-
static void BatchApplyFeatureDetailsToDialog (DialoG d, Pointer data)
{
BatchApplyFeatureDetailsDlgPtr dlg;
@@ -4709,7 +4698,7 @@ static void BatchApplyFeatureDetailsToDialog (DialoG d, Pointer data)
vn.data.ptrvalue = NULL;
PointerToDialog (dlg->featdef_choice_dlg, &vn);
}
- SafeSetValue (dlg->rnaSubType, 4);
+ PointerToDialog (dlg->rnaType, NULL);
}
else
{
@@ -4774,7 +4763,7 @@ static void BatchApplyFeatureDetailsToDialog (DialoG d, Pointer data)
vn.data.ptrvalue = NULL;
PointerToDialog (dlg->featdef_choice_dlg, &vn);
}
- SafeSetValue (dlg->rnaSubType, bafdp->rnaSubType);
+ PointerToDialog (dlg->rnaType, bafdp->rnaType);
}
if (dlg->change_notify != NULL)
{
@@ -4787,7 +4776,6 @@ static Pointer BatchApplyFeatureDetailsDialogToData (DialoG d)
BatchApplyFeatureDetailsDlgPtr dlg;
BatchApplyFeatureDetailsPtr bafdp;
ValNodePtr vnp;
- UIEnum val;
dlg = (BatchApplyFeatureDetailsDlgPtr) GetObjectExtra (d);
if (dlg == NULL)
@@ -4893,21 +4881,7 @@ static Pointer BatchApplyFeatureDetailsDialogToData (DialoG d)
}
}
- if (dlg->rnaSubType == NULL)
- {
- bafdp->rnaSubType = 4;
- }
- else
- {
- if (GetEnumPopup (dlg->rnaSubType, rnax_subtype_alist, &val))
- {
- bafdp->rnaSubType = val;
- }
- else
- {
- bafdp->rnaSubType = 4;
- }
- }
+ bafdp->rnaType = DialogToPointer (dlg->rnaType);
return bafdp;
}
@@ -5079,6 +5053,7 @@ static void AddTextToComment (ButtoN b, CharPtr text)
BatchApplyFeatureDetailsDlgPtr dlg;
CharPtr orig_comment;
CharPtr new_comment;
+ RnaTypeData rtd;
dlg = (BatchApplyFeatureDetailsDlgPtr) GetObjectExtra (b);
if (dlg == NULL || StringHasNoText (text))
@@ -5105,7 +5080,9 @@ static void AddTextToComment (ButtoN b, CharPtr text)
}
orig_comment = MemFree (orig_comment);
- SetEnumPopup (dlg->rnaSubType, rnax_subtype_alist, (UIEnum) 255);
+ rtd.ncrna_class = NULL;
+ rtd.rna_featdef = FEATDEF_otherRNA;
+ PointerToDialog (dlg->rnaType, &rtd);
}
static void Add18SITS28SToComment (ButtoN b)
@@ -5149,6 +5126,7 @@ BatchApplyFeatureDetailsDialog (GrouP parent, Int4 feattype, Nlm_ChangeNotifyPro
Nlm_EnumFieldAssocPtr ap;
Int4 j;
Boolean is_indexer = FALSE;
+ RnaTypeData rtd;
dlg = (BatchApplyFeatureDetailsDlgPtr) MemNew (sizeof (BatchApplyFeatureDetailsDlgData));
if (dlg == NULL)
@@ -5190,11 +5168,10 @@ BatchApplyFeatureDetailsDialog (GrouP parent, Int4 feattype, Nlm_ChangeNotifyPro
}
else if (dlg->feattype == ADD_RRNA)
{
- r = HiddenGroup (p, 2, 0, NULL);
- StaticPrompt (r, "RNA subtype", 0, dialogTextHeight, programFont, 'l');
- dlg->rnaSubType = PopupList (r, TRUE, NULL);
- InitEnumPopup (dlg->rnaSubType, rnax_subtype_alist, NULL);
- SetEnumPopup (dlg->rnaSubType, rnax_subtype_alist, (UIEnum) 4);
+ dlg->rnaType = RnaTypeDialog (p, FALSE, change_notify, change_userdata);
+ rtd.ncrna_class = NULL;
+ rtd.rna_featdef = FEATDEF_rRNA;
+ PointerToDialog (dlg->rnaType, &rtd);
}
text_group = HiddenGroup (p, 0, 2, NULL);
@@ -5757,6 +5734,41 @@ ApplyOneCodingRegion
return sfp;
}
+
+typedef struct hasrna {
+ Boolean hasrna;
+ RnaTypePtr rtp;
+} HasRnaData, PNTR HasRnaPtr;
+
+static void AlreadyHasRNACallback (SeqFeatPtr sfp, Pointer userdata)
+{
+ HasRnaPtr hp;
+
+ if (sfp == NULL || sfp->data.choice != SEQFEAT_RNA || userdata == NULL)
+ {
+ return;
+ }
+
+ hp = (HasRnaPtr) userdata;
+
+ if (!hp->hasrna && MatchesRnaType (sfp, hp->rtp))
+ {
+ hp->hasrna = TRUE;
+ }
+}
+
+
+extern Boolean AlreadyHasRNA (SeqEntryPtr sep, RnaTypePtr rtp)
+{
+ HasRnaData hrd;
+
+ hrd.rtp = NULL;
+ hrd.hasrna = FALSE;
+ VisitFeaturesInSep (sep, &hrd, AlreadyHasRNACallback);
+ return hrd.hasrna;
+}
+
+
static SeqFeatPtr ApplyOneRNA
(BatchApplyFeatureDetailsPtr feature_details_data,
SeqEntryPtr sep,
@@ -5772,27 +5784,21 @@ static SeqFeatPtr ApplyOneRNA
return NULL;
}
- if (suppressDups && entityID > 0 &&
- AlreadyHasFeatOrDesc (sep, SEQFEAT_RNA, 0, feature_details_data->rnaSubType))
+ if (suppressDups && entityID > 0 && AlreadyHasRNA (sep, feature_details_data->rnaType))
{
return NULL;
}
rrp = RnaRefNew ();
- if (rrp == NULL)
- {
- return NULL;
- }
-
- rrp->type = feature_details_data->rnaSubType;
- if (! StringHasNoText (feature_details_data->rnaName)) {
- rrp->ext.choice = 1;
- rrp->ext.value.ptrvalue = StringSave (feature_details_data->rnaName);
- }
sfp = CreateNewFeature (nsep, NULL, SEQFEAT_RNA, NULL);
if (sfp != NULL) {
sfp->data.value.ptrvalue = (Pointer) rrp;
}
+ ApplyRnaTypeToSeqFeat (sfp, feature_details_data->rnaType);
+ if (! StringHasNoText (feature_details_data->rnaName)) {
+ ApplyProductToRNA (sfp, feature_details_data->rnaName);
+ }
+
return sfp;
}
@@ -6131,7 +6137,10 @@ static void DoApplyFeatureToAlignment (ButtoN b)
&errcount, &ambigList);
AddProductForCDS (sfp, feature_details_data, sep, nsep, aafdp->entityID);
}
-
+ else if (aafdp->feattype == ADD_RRNA)
+ {
+/* ConvertToOldRNAFormat (sfp); */
+ }
}
if (sfp != NULL
@@ -6192,10 +6201,7 @@ static void DoApplyFeatureToAlignment (ButtoN b)
else
{
/* add comment */
- if (!StringHasNoText (feature_details_data->featcomment))
- {
- sfp->comment = StringSave (feature_details_data->featcomment);
- }
+ AddToComment (sfp, feature_details_data->featcomment);
}
slp_this = slp_next;
diff --git a/desktop/salpanel.h b/desktop/salpanel.h
index 5a8ae5a4..c702126f 100644
--- a/desktop/salpanel.h
+++ b/desktop/salpanel.h
@@ -29,7 +29,7 @@
*
* Version Creation Date: 1/27/96
*
-* $Revision: 6.16 $
+* $Revision: 6.17 $
*
* File Description:
*
@@ -51,6 +51,7 @@
#include <txalign.h>
#include <explore.h>
#include <dlogutil.h>
+#include <cdrgn.h>
extern WindoW getwindow_frompanel (PaneL pnl);
extern PaneL GetPanelFromWindow (WindoW w);
@@ -127,11 +128,11 @@ typedef struct batchapplyfeaturedetails
CharPtr protName;
CharPtr protDesc;
CharPtr rnaName;
+ RnaTypePtr rnaType;
CharPtr featcomment;
Int4 featdef_choice;
CharPtr featdef_name;
Int4 reading_frame;
- Int4 rnaSubType;
} BatchApplyFeatureDetailsData, PNTR BatchApplyFeatureDetailsPtr;
@@ -148,6 +149,7 @@ extern void SortEnumFieldAssocPtrArray (EnumFieldAssocPtr alist, CompareFunc com
extern DialoG
BatchApplyFeatureDetailsDialog (GrouP parent, Int4 feattype, Nlm_ChangeNotifyProc change_notify, Pointer change_userdata);
extern Boolean OkToAcceptBatchApplyFeatureDetails (DialoG d);
+extern Boolean AlreadyHasRNA (SeqEntryPtr sep, RnaTypePtr rtp);
extern void
ApplyFeatureToAlignment
diff --git a/desktop/salsa.c b/desktop/salsa.c
index acb4ad53..5bcb6e2e 100644
--- a/desktop/salsa.c
+++ b/desktop/salsa.c
@@ -28,7 +28,7 @@
*
* Version Creation Date: 1/27/96
*
-* $Revision: 6.180 $
+* $Revision: 6.183 $
*
* File Description:
*
@@ -2722,21 +2722,7 @@ static void SalsaNewFeaturesMenu (MenU m, Boolean is_na)
while ((ompp = ObjMgrProcFindNext (omp, OMPROC_EDIT,
omtp->datatype, 0, ompp)) != NULL) {
subtype = ompp->subinputtype;
- if (subtype == fdp->featdef_key &&
- subtype != FEATDEF_PUB &&
- subtype != FEATDEF_IMP &&
- subtype != FEATDEF_Imp_CDS &&
- subtype != FEATDEF_misc_RNA &&
- subtype != FEATDEF_precursor_RNA &&
- subtype != FEATDEF_mat_peptide &&
- subtype != FEATDEF_sig_peptide &&
- subtype != FEATDEF_transit_peptide &&
- subtype != FEATDEF_source &&
- subtype != FEATDEF_virion &&
- subtype != FEATDEF_mutation &&
- subtype != FEATDEF_allele &&
- subtype != FEATDEF_site_ref &&
- subtype != FEATDEF_gap) {
+ if (subtype == fdp->featdef_key && OkToListFeatDefInRemainingFeatures (subtype)) {
i = CommandItem (sub, ompp->proclabel, SalsaNewFeatureMenuProc);
nfp = (NewFeaturePtr) MemNew (sizeof (NewFeatureData));
if (nfp != NULL) {
@@ -6592,6 +6578,24 @@ static Boolean DisplayFarPointerData (FarPointerPtr fpp, Int4 num)
return acd.accepted;
}
+
+static CharPtr FindFarPointerID (CharPtr str)
+{
+ CharPtr tmp = NULL;
+ if (StringHasNoText (str)) return NULL;
+
+ if (StringNICmp (str, "acc", 3) == 0) {
+ tmp = str + 3;
+ } else {
+ tmp = StringSearch (str, "|acc");
+ if (tmp != NULL) {
+ tmp += 4;
+ }
+ }
+ return tmp;
+}
+
+
/* This function will replace a sequence in an alignment record with one
* downloaded from GenBank. It will also adjust the alignment starts
* for that sequence if the GenBank sequence is not identical to the
@@ -6640,9 +6644,8 @@ static ValNodePtr CCNormalizeSeqAlignId (SeqAlignPtr salp, ValNodePtr vnp)
/* is this a farpointer ID? */
SeqIdWrite (far_pointer_list[i].sip_local, str, PRINTID_FASTA_LONG, sizeof (str) - 1);
- tmp = StringISearch (str, "acc");
+ tmp = FindFarPointerID (str);
if (tmp!=NULL) {
- tmp += 3;
if (*tmp == '|')
tmp++;
id_start = tmp;
@@ -7372,9 +7375,8 @@ static Boolean check_dbid_seqalign (SeqAlignPtr salp)
sip->next = NULL;
SeqIdWrite (sip, str, PRINTID_FASTA_LONG, 50);
sip->next = next;
- tmp = StringStr (str, "acc");
+ tmp = FindFarPointerID (str);
if (tmp!=NULL) {
- tmp++; tmp++; tmp++;
if (*tmp == '|')
tmp++;
TmpBuff = tmp;
diff --git a/desktop/seqpanel.c b/desktop/seqpanel.c
index b901c260..fd55fa25 100644
--- a/desktop/seqpanel.c
+++ b/desktop/seqpanel.c
@@ -1,4 +1,4 @@
-/* $Id: seqpanel.c,v 6.212 2007/07/18 16:00:17 bollin Exp $
+/* $Id: seqpanel.c,v 6.219 2008/02/28 20:24:30 bollin Exp $
* ===========================================================================
*
* PUBLIC DOMAIN NOTICE
@@ -47,6 +47,7 @@
#include <algo/blast/api/blast_seqalign.h>
#include <alignval.h>
#include <salptool.h>
+#include <vsm.h>
enum ESeqNum { eNumNone=1, eNumSide=2, eNumTop=3 };
enum EDrawGrid { eDrawGridOn=1, eDrawGridOff=2 };
@@ -1251,6 +1252,7 @@ static void DrawAlignment
/* finally draw everything */
best_id = SeqIdFindBestAccession (bsp->id);
alnlabel_len = (bvp->SeqStartPosX / bvp->CharWidth) - 10;
+ if (alnlabel_len < 10) alnlabel_len = 10;
alnlabel = (CharPtr) MemNew (sizeof (Char) * (alnlabel_len + 1));
SeqIdWrite (best_id, alnlabel, PRINTID_TEXTID_ACCESSION, alnlabel_len); /* Get label */
@@ -2466,11 +2468,12 @@ static void DrawSeqPanel (BioseqViewPtr bvp)
Int4 aln_idx;
Int4 start;
PaneL p;
+ Int4 vis_seq_start_line, vis_seq_start, vis_seq_stop;
if (bvp == NULL || bvp->bsp == NULL || bvp->SeqPanLines == NULL) return;
bsp = bvp->bsp;
p = bvp->seqView;
- spp = SeqPortNew (bsp, 0, bsp->length-1, Seq_strand_plus, Seq_code_iupacna);
+
buf = MemNew (SEQ_GROUP_SIZE+1);
if (bvp->seqAlignMode) { /* allocate it here, to speed up drawing of alignments */
seqbuf = MemNew (bvp->BlocksAtLine * SEQ_GROUP_SIZE + 3);
@@ -2494,6 +2497,20 @@ static void DrawSeqPanel (BioseqViewPtr bvp)
aln_idx++;
}
}
+
+ splp = bvp->SeqPanLines[line];
+ vis_seq_start_line = splp->bioSeqLine;
+ vis_seq_start = vis_seq_start_line * bvp->CharsAtLine;
+ if (vis_seq_start > bsp->length - 1)
+ {
+ spp = NULL;
+ }
+ else
+ {
+ vis_seq_stop = vis_seq_start + ((r.bottom - 3 * SEQ_Y_OFFSET - r.top) / (bvp->LineHeight == 0 ? 1 : bvp->LineHeight)) * bvp->CharsAtLine;
+ vis_seq_stop = MIN (vis_seq_stop, bsp->length - 1);
+ spp = SeqPortNew (bsp, vis_seq_start, vis_seq_stop, Seq_strand_plus, Seq_code_iupacna);
+ }
for (line = start; line < bvp->TotalLines && y <= r.bottom-2*SEQ_Y_OFFSET; line++) {
if (IsInRange(y, updateRect.top,updateRect.bottom) ||
@@ -2512,11 +2529,11 @@ static void DrawSeqPanel (BioseqViewPtr bvp)
break;
case eTypeSequence:
if (GetValue(bvp->newNumControl) != eNumNone) DrawSeqSideLineNumbers(x, y, splp->bioSeqLine, bvp); /* Draw line numbers */
- DrawSequence(x, y, splp->bioSeqLine, spp, buf, bvp); /* Draw the sequence */
+ DrawSequence(x, y, splp->bioSeqLine - vis_seq_start_line, spp, buf, bvp); /* Draw the sequence */
if (bvp->DrawGrid) DrawLtGrid(x, y+bvp->LineSpace/2, r.right, y+bvp->LineSpace/2);
break;
case eTypeSequenceComplement:
- DrawSequenceComplement(x, y, splp->bioSeqLine, spp, buf, bvp); /* Draw the sequence */
+ DrawSequenceComplement(x, y, splp->bioSeqLine - vis_seq_start_line, spp, buf, bvp); /* Draw the sequence */
if (bvp->DrawGrid) DrawLtGrid(x, y+bvp->LineSpace/2, r.right, y+bvp->LineSpace/2);
break;
case eTypeAlignSequence:
@@ -3133,8 +3150,8 @@ GetSeqChapterFeatureInfo
|| (fcontext.left <= chapter_start && fcontext.right > chapter_stop)))
{
Boolean coding = fcontext.seqfeattype == SEQFEAT_CDREGION;
- Int4 paraFrom = floor(fcontext.left / lineLength); /* feature starting paragraph */
- Int4 paraTo = ceil (fcontext.right / lineLength) + 1; /* feature ending paragraph */
+ Int4 paraFrom = (Int4)floor(fcontext.left / lineLength); /* feature starting paragraph */
+ Int4 paraTo = (Int4)ceil (fcontext.right / lineLength) + 1; /* feature ending paragraph */
/*BioseqPtr bsp_prot = BioseqFind (SeqLocId(sfp->product));*/
start = SeqLocStart (sfp->location);
stop = SeqLocStop (sfp->location);
@@ -3228,7 +3245,7 @@ static void UnindexSeqPanChapter (BioseqViewPtr bvp, ValNodePtr chapter_vnp, Int
if (chapter_vnp == NULL || bvp == NULL) return;
old_lines = CountChapterLines (chapter_vnp, bvp);
- num_paragraphs = floor(bvp->bsp->length / bvp->CharsAtLine) + 1; /* sequence length */
+ num_paragraphs = (Int4) floor(bvp->bsp->length / bvp->CharsAtLine) + 1; /* sequence length */
InitSeqPanChapter ((SeqPanParaPtr) chapter_vnp->data.ptrvalue,
chapter_number * SEQ_PAN_CHAPTER_SIZE, num_paragraphs);
@@ -4743,7 +4760,7 @@ static void SeqEdTranslateAndJournalOneCDS (SeqFeatPtr sfp, SeqEdFormPtr sefp)
sejp->next = end;
end->prev = sejp;
sefp->last_journal_entry = sejp;
- SeqEdTranslateOneCDS (sfp, sefp->bfp->bvd.bsp, sefp->input_entityID);
+ SeqEdTranslateOneCDS (sfp, sefp->bfp->bvd.bsp, sefp->input_entityID, Sequin_GlobalAlign2Seq);
SetUndoRedoStatus (sefp);
}
@@ -7839,21 +7856,7 @@ static void SeqEdNewFeaturesMenu (MenU m, Boolean is_na)
while ((ompp = ObjMgrProcFindNext (omp, OMPROC_EDIT,
omtp->datatype, 0, ompp)) != NULL) {
subtype = ompp->subinputtype;
- if (subtype == fdp->featdef_key &&
- subtype != FEATDEF_PUB &&
- subtype != FEATDEF_IMP &&
- subtype != FEATDEF_Imp_CDS &&
- subtype != FEATDEF_misc_RNA &&
- subtype != FEATDEF_precursor_RNA &&
- subtype != FEATDEF_mat_peptide &&
- subtype != FEATDEF_sig_peptide &&
- subtype != FEATDEF_transit_peptide &&
- subtype != FEATDEF_source &&
- subtype != FEATDEF_virion &&
- subtype != FEATDEF_mutation &&
- subtype != FEATDEF_allele &&
- subtype != FEATDEF_site_ref &&
- subtype != FEATDEF_gap) {
+ if (subtype == fdp->featdef_key && OkToListFeatDefInRemainingFeatures (subtype)) {
i = CommandItem (sub, ompp->proclabel, SeqEditNewFeatureMenuProc);
nfp = (NewFeaturePtr) MemNew (sizeof (NewFeatureData));
if (nfp != NULL) {
@@ -9615,349 +9618,6 @@ BioseqPageData seqAlnPnlPageData = {
NULL, NULL, ResizeSeqView, NULL
};
-/* The following section of code is used for retranslating a CDS and updating
- * the protein features based on an alignment between the old and new protein
- * sequences.
- */
-static Int4 SeqEdRemapCoord (SeqAlignPtr salp, Int4 coord, Boolean move_up, Int4 len)
-
-{
- Int4 aln_pos;
-
- if (salp == NULL) return -1;
- aln_pos = AlnMgr2MapBioseqToSeqAlign (salp, coord, 1);
- while (aln_pos == -1)
- {
- if (move_up)
- {
- if (coord >= len - 1)
- {
- return len - 1;
- }
- else
- {
- coord ++;
- }
- }
- else
- {
- if (coord <= 0)
- {
- return 0;
- }
- else
- {
- coord --;
- }
- }
- aln_pos = AlnMgr2MapBioseqToSeqAlign (salp, coord, 1);
- }
- return AlnMgr2MapSeqAlignToBioseq (salp, aln_pos, 2);
-}
-
-
-static void SeqEdRemapSeqIntLoc (SeqAlignPtr salp, SeqIntPtr sintp, Int4 seq_len)
-
-{
- if (salp == NULL || sintp == NULL) return;
- sintp->from = SeqEdRemapCoord (salp, sintp->from, TRUE, seq_len);
- sintp->to = SeqEdRemapCoord (salp, sintp->to, FALSE, seq_len);
-}
-
-static void SeqEdRemapSeqPntLoc (SeqAlignPtr salp, SeqPntPtr spp, Int4 seq_len)
-
-{
- if (salp == NULL || spp == NULL) return;
-
- spp->point = SeqEdRemapCoord (salp, spp->point, FALSE, seq_len);
-}
-
-
-static void SeqEdRemapPackSeqPnt (SeqAlignPtr salp, PackSeqPntPtr pspp, Int4 seq_len)
-
-{
- Uint1 used;
-
- if (salp == NULL || pspp == NULL) return;
- for (used = 0; used < pspp->used; used++)
- {
- pspp->pnts [used] = SeqEdRemapCoord (salp, pspp->pnts [used], FALSE, seq_len);
- }
-}
-
-
-NLM_EXTERN void SeqEdRemapLocation (SeqAlignPtr salp, SeqLocPtr slp, Int4 seq_len)
-
-{
-
- if (slp == NULL) return;
- switch (slp->choice) {
- case SEQLOC_INT :
- SeqEdRemapSeqIntLoc (salp, slp->data.ptrvalue, seq_len);
- break;
- case SEQLOC_PNT :
- SeqEdRemapSeqPntLoc (salp, slp->data.ptrvalue, seq_len);
- break;
- case SEQLOC_PACKED_PNT :
- SeqEdRemapPackSeqPnt (salp, slp->data.ptrvalue, seq_len);
- break;
- default :
- break;
- }
-}
-
-static void MakeLocationMatchEntireSequence (SeqLocPtr slp, BioseqPtr bsp)
-{
- SeqIntPtr sip;
-
- if (slp == NULL || bsp == NULL) return;
-
- if (slp->choice == SEQLOC_WHOLE)
- {
- SeqIdFree (slp->data.ptrvalue);
- slp->data.ptrvalue = SeqIdDup (bsp->id);
- }
- else if (slp->choice == SEQLOC_INT)
- {
- sip = (SeqIntPtr) slp->data.ptrvalue;
- if (sip == NULL)
- {
- sip = SeqIntNew ();
- slp->data.ptrvalue = sip;
- }
- if (sip != NULL)
- {
- sip->from = 0;
- sip->to = bsp->length - 1;
- }
- }
-}
-
-NLM_EXTERN Boolean SeqEdFixProteinFeatures (BioseqPtr oldbsp, BioseqPtr newbsp, Boolean force_fix)
-{
- SeqAlignPtr salp = NULL;
- Boolean revcomp = FALSE;
- SeqFeatPtr sfp;
- SeqMgrFeatContext fcontext;
- Boolean tried_to_get_alignment = FALSE;
- Boolean unmappable_feats = FALSE;
- SeqLocPtr slp_tmp = NULL;
-
- if (oldbsp == NULL || newbsp == NULL) return FALSE;
-
- /* get alignment between old and new proteins */
-
- if (ISA_na (oldbsp->mol) != ISA_na (newbsp->mol)) return FALSE;
-
- /* iterate through the features on the old protein. Full length features
- * should be set to the new length. Other features should be mapped through
- * the alignment (if possible), otherwise warn the user that they could not
- * be remapped. */
-
- if (!force_fix)
- {
- for (sfp = SeqMgrGetNextFeature (oldbsp, NULL, 0, 0, &fcontext);
- sfp != NULL && !unmappable_feats;
- sfp = SeqMgrGetNextFeature (oldbsp, sfp, 0, 0, &fcontext))
- {
- if (sfp->idx.subtype != FEATDEF_PROT)
- {
- if (salp == NULL)
- {
- salp = Sequin_GlobalAlign2Seq (oldbsp, newbsp, &revcomp);
- }
- if (salp == NULL)
- {
- unmappable_feats = TRUE;
- }
- else
- {
- slp_tmp = (SeqLocPtr) AsnIoMemCopy (sfp->location,
- (AsnReadFunc) SeqLocAsnRead,
- (AsnWriteFunc) SeqLocAsnWrite);
- SeqEdRemapLocation (salp, slp_tmp, newbsp->length);
- if (slp_tmp == NULL)
- {
- unmappable_feats = TRUE;
- }
- else
- {
- slp_tmp = SeqLocFree (slp_tmp);
- }
- }
- }
- }
- if (unmappable_feats)
- {
- return FALSE;
- }
- }
-
- for (sfp = SeqMgrGetNextFeature (oldbsp, NULL, 0, 0, &fcontext);
- sfp != NULL;
- sfp = SeqMgrGetNextFeature (oldbsp, sfp, 0, 0, &fcontext))
- {
- if (sfp->idx.subtype == FEATDEF_PROT)
- {
- /* make new location match new sequence length */
- MakeLocationMatchEntireSequence (sfp->location, newbsp);
- }
- else
- {
- if (salp == NULL && !tried_to_get_alignment)
- {
- salp = Sequin_GlobalAlign2Seq (oldbsp, newbsp, &revcomp);
- tried_to_get_alignment = TRUE;
- }
- if (salp != NULL)
- {
- SeqEdRemapLocation (salp, sfp->location, newbsp->length);
- }
- else
- {
- unmappable_feats = TRUE;
- }
- }
- }
-
- if (salp != NULL)
- {
- SeqAlignFree (salp);
- }
- if (unmappable_feats)
- {
- return FALSE;
- }
- else
- {
- return TRUE;
- }
-}
-
-
-NLM_EXTERN void SeqEdTranslateOneCDS (SeqFeatPtr sfp, BioseqPtr featbsp, Uint2 entityID)
-{
- ByteStorePtr bs;
- Char ch;
- CharPtr prot;
- CharPtr ptr;
- Int4 star_at_end = 0;
- BioseqPtr old_prot;
- SeqIdPtr new_prot_id;
- SeqEntryPtr parent, new_prot_sep;
- SeqLocPtr slp;
- Uint1 seq_data_type;
- Int4 old_length;
- BioseqPtr newbsp;
- ProtRefPtr prp;
- SeqFeatPtr prot_sfp;
- SeqDataPtr sdp;
-
- if (featbsp == NULL || sfp == NULL || sfp->location == NULL
- || sfp->data.choice != SEQFEAT_CDREGION)
- {
- return;
- }
-
- old_prot = BioseqFindFromSeqLoc (sfp->product);
- new_prot_id = SeqIdDup (SeqLocId (sfp->product));
- if (new_prot_id == NULL)
- {
- new_prot_id = MakeNewProteinSeqId (sfp->location, featbsp->id);
- }
-
- bs = ProteinFromCdRegionEx (sfp, TRUE, FALSE);
- if (bs != NULL) {
- prot = BSMerge (bs, NULL);
- bs = BSFree (bs);
- if (prot != NULL) {
- ptr = prot;
- ch = *ptr;
- while (ch != '\0') {
- *ptr = TO_UPPER (ch);
- if (ch == '*') {
- star_at_end = 1;
- } else {
- star_at_end = 0;
- }
- ptr++;
- ch = *ptr;
- }
- if (star_at_end)
- {
- *(ptr - 1) = 0;
- }
- bs = BSNew (1000);
- if (bs != NULL) {
- ptr = prot;
- BSWrite (bs, (VoidPtr) ptr, (Int4) StringLen (ptr));
- }
- MemFree (prot);
- }
- newbsp = BioseqNew ();
- if (newbsp != NULL) {
- newbsp->id = SeqIdParse ("lcl|CdRgnTransl");
- newbsp->repr = Seq_repr_raw;
- newbsp->mol = Seq_mol_aa;
- newbsp->seq_data_type = Seq_code_ncbieaa;
- newbsp->seq_data = (SeqDataPtr) bs;
- newbsp->length = BSLen (bs);
-
- if (old_prot == NULL)
- {
- /* need to create a new protein sequence */
- SeqIdFree (newbsp->id);
- newbsp->id = new_prot_id;
- new_prot_sep = SeqEntryNew ();
- new_prot_sep->choice = 1;
- new_prot_sep->data.ptrvalue = newbsp;
- parent = GetBestTopParentForData (entityID, featbsp);
- if (parent != NULL)
- {
- AddSeqEntryToSeqEntry (parent, new_prot_sep, TRUE);
- }
- slp = ValNodeNew (NULL);
- if (slp != NULL)
- {
- slp->choice = SEQLOC_WHOLE;
- slp->data.ptrvalue = SeqIdDup (new_prot_id);
- }
- sfp->product = slp;
-
- /* create full length protein feature */
- prp = ProtRefNew ();
- prot_sfp = CreateNewFeature (new_prot_sep, NULL, SEQFEAT_PROT, NULL);
- if (prot_sfp != NULL) {
- prot_sfp->data.value.ptrvalue = (Pointer) prp;
- }
- }
- else
- {
- /* propagate features to new protein */
- if (!SeqEdFixProteinFeatures (old_prot, newbsp, TRUE))
- {
- Message (MSG_ERROR, "Unable to construct alignment between old and new "
- "proteins - you will need to adjust the protein features "
- "manually.");
- }
-
- /* then replace old protein with new */
- seq_data_type = old_prot->seq_data_type;
- sdp = old_prot->seq_data;
- old_length = old_prot->length;
- old_prot->seq_data_type = newbsp->seq_data_type;
- old_prot->seq_data = newbsp->seq_data;
- old_prot->length = newbsp->length;
- newbsp->seq_data_type = seq_data_type;
- newbsp->seq_data = sdp;
- newbsp->length = old_length;
- BioseqFree (newbsp);
- }
- }
- }
-}
-
-
#define SEQ_ED_TRANSLATE_BUFFER_SIZE 32000
NLM_EXTERN SeqEdJournalPtr SeqEdJournalNewTranslate
(SeqFeatPtr sfp,
@@ -10108,7 +9768,7 @@ static Boolean PlayOneTranslationJournalEntry (SeqEdJournalPtr sejp)
AsnIoMemClose(aimp); /* close it */
}
- SeqEdTranslateOneCDS (sejp->sfp, sejp->bsp, sejp->entityID);
+ SeqEdTranslateOneCDS (sejp->sfp, sejp->bsp, sejp->entityID, Sequin_GlobalAlign2Seq);
return TRUE;
}
diff --git a/desktop/seqpanel.h b/desktop/seqpanel.h
index 2cd617d6..82201279 100644
--- a/desktop/seqpanel.h
+++ b/desktop/seqpanel.h
@@ -1,4 +1,4 @@
-/* $Id: seqpanel.h,v 6.17 2006/12/05 13:49:46 bollin Exp $
+/* $Id: seqpanel.h,v 6.18 2007/11/30 14:32:28 bollin Exp $
* ===========================================================================
*
* PUBLIC DOMAIN NOTICE
@@ -54,9 +54,6 @@ WriteAlignmentInterleaveToFileEx
extern ForM CreateSeqEditorWindow (Int2 left, Int2 top, CharPtr windowname, BioseqPtr bsp);
-NLM_EXTERN void SeqEdTranslateOneCDS (SeqFeatPtr sfp, BioseqPtr featbsp, Uint2 entityID);
-NLM_EXTERN void SeqEdRemapLocation (SeqAlignPtr salp, SeqLocPtr slp, Int4 seq_len);
-NLM_EXTERN Boolean SeqEdFixProteinFeatures (BioseqPtr oldbsp, BioseqPtr newbsp, Boolean force_fix);
NLM_EXTERN SeqAlignPtr Sequin_GlobalAlign2Seq (BioseqPtr bsp1, BioseqPtr bsp2, BoolPtr revcomp);
extern ForM CreateAlnEditorWindow (Int2 left, Int2 top, CharPtr windowname, SeqAlignPtr salp, Uint2 entityID);
NLM_EXTERN CharPtr FeatureLocationAlignment (SeqFeatPtr sfp, SeqAlignPtr salp, Int4 begin, Int4 fin);
diff --git a/desktop/seqsub.c b/desktop/seqsub.c
index d3e19864..9d6d0df5 100644
--- a/desktop/seqsub.c
+++ b/desktop/seqsub.c
@@ -29,7 +29,7 @@
*
* Version Creation Date: 1/22/95
*
-* $Revision: 6.34 $
+* $Revision: 6.36 $
*
* File Description:
*
@@ -3763,6 +3763,122 @@ static Boolean GetBioSourceFromSeqSubmit (SeqSubmitPtr ssp, BioSourcePtr PNTR pb
return rval;
}
+
+static CitSubPtr GetCitSubFromPub (PubdescPtr pdp)
+{
+ ValNodePtr vnp;
+ CitSubPtr cit = NULL;
+
+ if (pdp == NULL) return NULL;
+ for (vnp = pdp->pub; vnp != NULL && cit == NULL; vnp = vnp->next)
+ {
+ if (vnp->choice == PUB_Sub)
+ {
+ cit = vnp->data.ptrvalue;
+ }
+ }
+ return cit;
+}
+
+
+static ContactInfoPtr ContactInfoFromAuthList (AuthListPtr auth_list)
+{
+ ContactInfoPtr contact_info = NULL;
+ AffilPtr affil = NULL;
+ ValNodePtr vnp;
+ AuthorPtr author = NULL;
+
+ if (auth_list == NULL) return NULL;
+
+ for (vnp = auth_list->names; vnp != NULL && author == NULL; vnp = vnp->next)
+ {
+ if (vnp->choice == 1)
+ {
+ author = vnp->data.ptrvalue;
+ }
+ }
+
+ if (author != NULL)
+ {
+ contact_info = ContactInfoNew();
+ contact_info->contact = (AuthorPtr) AsnIoMemCopy (author, (AsnReadFunc) AuthorAsnRead, (AsnWriteFunc) AuthorAsnWrite);
+ if (contact_info->contact->affil == NULL && auth_list->affil != NULL)
+ {
+ contact_info->contact->affil = (AffilPtr) AsnIoMemCopy (auth_list->affil, (AsnReadFunc) AffilAsnRead, (AsnWriteFunc) AffilAsnWrite);
+ }
+ }
+
+ return contact_info;
+}
+
+
+static SubmitBlockPtr SubmitBlockFromSeqEntry (SeqEntryPtr sep)
+{
+ BioseqPtr bsp;
+ BioseqSetPtr bssp;
+ SeqDescrPtr sdp = NULL;
+ CitSubPtr cit = NULL;
+ SubmitBlockPtr sbp = NULL;
+
+ if (sep == NULL || sep->data.ptrvalue == NULL) return NULL;
+ if (IS_Bioseq (sep))
+ {
+ bsp = (BioseqPtr) sep->data.ptrvalue;
+ sdp = bsp->descr;
+ }
+ else if (IS_Bioseq_set (sep))
+ {
+ bssp = (BioseqSetPtr) sep->data.ptrvalue;
+ sdp = bssp->descr;
+ }
+ while (sdp != NULL && cit == NULL)
+ {
+ if (sdp->choice == Seq_descr_pub && sdp->data.ptrvalue != NULL)
+ {
+ cit = GetCitSubFromPub (sdp->data.ptrvalue);
+ }
+ sdp = sdp->next;
+ }
+
+ if (cit != NULL)
+ {
+ sbp = SubmitBlockNew ();
+ sbp->cit = (CitSubPtr) AsnIoMemCopy (cit, (AsnReadFunc) CitSubAsnRead, (AsnWriteFunc) CitSubAsnWrite);
+ sbp->contact = ContactInfoFromAuthList (sbp->cit->authors);
+ }
+
+ return sbp;
+}
+
+
+static void ListDescriptorsCallback (SeqDescrPtr sdp, Pointer data, Uint1 desc_choice)
+{
+ SeqDescrPtr tmp;
+
+ if (sdp != NULL && sdp->choice == desc_choice && data != NULL)
+ {
+ if (sdp->choice != Seq_descr_pub
+ || GetCitSubFromPub (sdp->data.ptrvalue) == NULL)
+ {
+ tmp = sdp->next;
+ sdp->next = NULL;
+ ValNodeLink ((ValNodePtr PNTR) data, AsnIoMemCopy (sdp, (AsnReadFunc) SeqDescrAsnRead, (AsnWriteFunc) SeqDescrAsnWrite));
+ sdp->next = tmp;
+ }
+ }
+}
+
+
+static void ListCommentsCallback (SeqDescrPtr sdp, Pointer data)
+{
+ ListDescriptorsCallback (sdp, data, Seq_descr_comment);
+}
+
+static void ListPubsCallback (SeqDescrPtr sdp, Pointer data)
+{
+ ListDescriptorsCallback (sdp, data, Seq_descr_pub);
+}
+
static Boolean ImportSeqSubmitForm (ForM f, CharPtr filename)
{
SubmitTemplateEditorPtr dlg;
@@ -3773,11 +3889,12 @@ static Boolean ImportSeqSubmitForm (ForM f, CharPtr filename)
Uint2 datatype;
Uint2 entityID;
FILE *fp;
- SubmitBlockPtr sbp = NULL;
+ SubmitBlockPtr sbp = NULL, t_sbp;
SeqDescrPtr sdp_comment, sdp_pub = NULL;
CharPtr comment = NULL;
BioSourcePtr biop = NULL;
MolInfoPtr mip = NULL;
+ SeqEntryPtr sep = NULL;
dlg = (SubmitTemplateEditorPtr) GetObjectExtra (f);
if (dlg == NULL)
@@ -3851,6 +3968,44 @@ static Boolean ImportSeqSubmitForm (ForM f, CharPtr filename)
sbp = (SubmitBlockPtr) dataptr;
}
}
+ else if (datatype == OBJ_SEQENTRY)
+ {
+ sep = (SeqEntryPtr) dataptr;
+ t_sbp = SubmitBlockFromSeqEntry (sep);
+ if (t_sbp != NULL)
+ {
+ if (sbp != NULL)
+ {
+ Message (MSG_ERROR, "Found more than one SubmitBlock! Bad file!");
+ bad_data_found = TRUE;
+ }
+ else if (ssp != NULL)
+ {
+ Message (MSG_ERROR, "Found Separate SeqSubmit and SubmitBlock! Bad file!");
+ bad_data_found = TRUE;
+ }
+ else
+ {
+ sbp = t_sbp;
+ VisitDescriptorsInSep (sep, &sdp_pub, ListPubsCallback);
+ sdp_comment = NULL;
+ VisitDescriptorsInSep (sep, &sdp_comment, ListCommentsCallback);
+ if (sdp_comment != NULL)
+ {
+ if (comment != NULL)
+ {
+ Message (MSG_ERROR, "Found more than one comment! Cannot edit this file!");
+ bad_data_found = TRUE;
+ }
+ else
+ {
+ comment = StringSave (sdp_comment->data.ptrvalue);
+ }
+ sdp_comment = SeqDescrFree (sdp_comment);
+ }
+ }
+ }
+ }
else if (datatype == OBJ_SEQDESC)
{
sdp_comment = (SeqDescrPtr) dataptr;
diff --git a/desktop/vsm.c b/desktop/vsm.c
index d5ba0196..4d49c64e 100644
--- a/desktop/vsm.c
+++ b/desktop/vsm.c
@@ -29,7 +29,7 @@
*
* Version Creation Date: 11-29-94
*
-* $Revision: 6.31 $
+* $Revision: 6.37 $
*
* File Description:
*
@@ -561,6 +561,35 @@ Boolean LIBCALL VSMAddToMenu (MenU m, Int2 menutype)
return TRUE;
}
+NLM_EXTERN Boolean OkToListFeatDefInRemainingFeatures (Uint2 subtype)
+{
+ if (subtype != FEATDEF_PUB &&
+ subtype != FEATDEF_IMP &&
+ subtype != FEATDEF_Imp_CDS &&
+ subtype != FEATDEF_misc_RNA &&
+ subtype != FEATDEF_precursor_RNA &&
+ subtype != FEATDEF_mat_peptide &&
+ subtype != FEATDEF_sig_peptide &&
+ subtype != FEATDEF_transit_peptide &&
+ subtype != FEATDEF_source &&
+ subtype != FEATDEF_virion &&
+ subtype != FEATDEF_mutation &&
+ subtype != FEATDEF_allele &&
+ subtype != FEATDEF_site_ref &&
+ subtype != FEATDEF_old_sequence &&
+ subtype != FEATDEF_5clip &&
+ subtype != FEATDEF_3clip &&
+ subtype != FEATDEF_repeat_unit &&
+ subtype != FEATDEF_snRNA &&
+ subtype != FEATDEF_scRNA &&
+ subtype != FEATDEF_snoRNA &&
+ subtype != FEATDEF_gap) {
+ return TRUE;
+ } else {
+ return FALSE;
+ }
+}
+
/*****************************************************************************
*
* VSMAddMenu(WindoW w, Int2 menutype)
@@ -694,36 +723,22 @@ Boolean LIBCALL VSMAddMenu (WindoW w, Int2 menutype)
}
}
}
- sub2 = SubMenu (sub, "Remaining Features");
- fdp = NULL;
- while ((fdp = FeatDefFindNext (fdp, &key, &label, 0, FALSE)) != NULL) {
- if (key != FEATDEF_BAD) {
- ompp = NULL;
- while ((ompp = ObjMgrProcFindNext (omp, proctype,
- omtp->datatype, 0, ompp)) != NULL) {
+ sub2 = SubMenu (sub, "Remaining Features");
+ fdp = NULL;
+ while ((fdp = FeatDefFindNext (fdp, &key, &label, 0, FALSE)) != NULL) {
+ if (key != FEATDEF_BAD) {
+ ompp = NULL;
+ while ((ompp = ObjMgrProcFindNext (omp, proctype,
+ omtp->datatype, 0, ompp)) != NULL) {
subtype = ompp->subinputtype;
- if (subtype == fdp->featdef_key &&
- subtype != FEATDEF_PUB &&
- subtype != FEATDEF_IMP &&
- subtype != FEATDEF_Imp_CDS &&
- subtype != FEATDEF_misc_RNA &&
- subtype != FEATDEF_precursor_RNA &&
- subtype != FEATDEF_mat_peptide &&
- subtype != FEATDEF_sig_peptide &&
- subtype != FEATDEF_transit_peptide &&
- subtype != FEATDEF_source &&
- subtype != FEATDEF_virion &&
- subtype != FEATDEF_mutation &&
- subtype != FEATDEF_allele &&
- subtype != FEATDEF_site_ref &&
- subtype != FEATDEF_gap) {
- i = CommandItem (sub2, ompp->proclabel, VSeqMgrStdMenuProc);
- SetObjectExtra(i, (VoidPtr)ompp, NULL);
- ctr++;
- }
- }
- }
- }
+ if (subtype == fdp->featdef_key && OkToListFeatDefInRemainingFeatures (subtype)) {
+ i = CommandItem (sub2, ompp->proclabel, VSeqMgrStdMenuProc);
+ SetObjectExtra(i, (VoidPtr)ompp, NULL);
+ ctr++;
+ }
+ }
+ }
+ }
} else {
sub = SubMenu (m, omtp->label);
do
@@ -966,7 +981,7 @@ static Boolean IsSeqEntryInAlignment (SeqAlignPtr salp, SeqEntryPtr sep)
static void FindAlignmentCallback (SeqAnnotPtr sap, Pointer userdata)
{
- WarnIfAlignmentPtr wiap;
+ WarnIfAlignmentPtr wiap;
SeqAlignPtr salp;
if (sap == NULL || sap->type != 2 || userdata == NULL) {
@@ -974,11 +989,33 @@ static void FindAlignmentCallback (SeqAnnotPtr sap, Pointer userdata)
}
wiap = (WarnIfAlignmentPtr) userdata;
if (wiap->found) return;
- salp = (SeqAlignPtr) sap->data;
+ salp = (SeqAlignPtr) sap->data;
if (salp == NULL) return;
wiap->found = IsSeqEntryInAlignment (salp, wiap->lookingfor);
}
+
+static void RemoveSeqEntryFromAlignments (SeqEntryPtr topsep, SeqEntryPtr sep)
+{
+ BioseqPtr bsp;
+ BioseqSetPtr bssp;
+ Boolean found = FALSE;
+ SeqEntryPtr this_sep;
+
+ if (IS_Bioseq (sep)) {
+ bsp = (BioseqPtr) sep->data.ptrvalue;
+ RemoveSequenceFromAlignments (topsep, bsp->id);
+ } else if (IS_Bioseq_set (sep)) {
+ bssp = (BioseqSetPtr) sep->data.ptrvalue;
+ for (this_sep = bssp->seq_set;
+ this_sep != NULL && !found;
+ this_sep = this_sep->next) {
+ RemoveSeqEntryFromAlignments (topsep, this_sep);
+ }
+ }
+}
+
+
static void WarnIfAlignment (Uint2 type, Pointer ptr, Uint2 input_entityID)
{
SeqEntryPtr sep;
@@ -996,7 +1033,9 @@ static void WarnIfAlignment (Uint2 type, Pointer ptr, Uint2 input_entityID)
VisitAnnotsInSep (topsep, &wiad, FindAlignmentCallback);
if (wiad.found) {
- Message (MSG_OK, "Warning - this sequence is part of an alignment.");
+ if (ANS_YES == Message (MSG_YN, "This sequence is part of an alignment. Would you like to remove it from the alignment?")) {
+ RemoveSeqEntryFromAlignments (topsep, sep);
+ }
}
}
diff --git a/desktop/vsm.h b/desktop/vsm.h
index 0407605f..4f313d84 100644
--- a/desktop/vsm.h
+++ b/desktop/vsm.h
@@ -29,7 +29,7 @@
*
* Version Creation Date: 11-29-94
*
-* $Revision: 6.1 $
+* $Revision: 6.2 $
*
* File Description:
*
@@ -125,6 +125,8 @@ Boolean LIBCALL VSMAddMenu PROTO((WindoW w, Int2 menutype));
#define VSM_VIEW_MENU 3 /* viewers */
#define VSM_EDIT_MENU 4 /* editors */
+NLM_EXTERN Boolean OkToListFeatDefInRemainingFeatures (Uint2 subtype);
+
#ifdef __cplusplus
}
#endif
diff --git a/desktop/vsmfile.c b/desktop/vsmfile.c
index 4fc0f1b4..957c4e07 100644
--- a/desktop/vsmfile.c
+++ b/desktop/vsmfile.c
@@ -29,7 +29,7 @@
*
* Version Creation Date: 11-29-94
*
-* $Revision: 6.20 $
+* $Revision: 6.22 $
*
* File Description:
*
@@ -73,6 +73,9 @@ Boolean LIBCALL VSMFileInit(void)
VSMGenericTextAsnOpen, PROC_PRIORITY_DEFAULT);
/*** SAVE ***/
+ ObjMgrProcLoad(OMPROC_SAVE, "Save Descriptor File", "Descriptor file", 0,0,0,0,NULL,
+ VSMDescriptorAsnSave, PROC_PRIORITY_DEFAULT);
+
ObjMgrProcLoad(OMPROC_SAVE, "Export Protein Feature Table","Protein Feature Table", 0,0,0,0,NULL,
VSMExportProteinFeatureTable, PROC_PRIORITY_DEFAULT);
@@ -138,7 +141,7 @@ Boolean LIBCALL VSMFileInit(void)
ObjMgrProcLoad(OMPROC_SAVE, "Save As Text ASN1 File","ASN.1 text file", 0,0,0,0,NULL,
VSMGenericTextAsnSave, PROC_PRIORITY_DEFAULT);
-
+
return TRUE;
}
@@ -1171,3 +1174,135 @@ Int2 LIBCALLBACK VSMGenericBinAsnSave ( Pointer data )
}
+static Boolean AddToSaveList (GatherContextPtr gcp)
+
+{
+ ValNodePtr PNTR list;
+
+ list = (ValNodePtr PNTR) gcp->userdata;
+ if (list == NULL) return TRUE;
+ ValNodeAddPointer (list, gcp->thistype, gcp->thisitem);
+ return TRUE;
+}
+
+
+typedef struct savesetsdp {
+ AsnIoPtr aip;
+ Boolean already_have_molinfo;
+} SaveSetSdpData, PNTR SaveSetSdpPtr;
+
+
+static void SaveSetDescriptors (SeqDescrPtr sdp, Pointer userdata)
+{
+ SaveSetSdpPtr sp;
+ MolInfoPtr mip;
+
+ if (sdp == NULL || userdata == NULL) return;
+ if (sdp->choice != Seq_descr_source
+ && sdp->choice != Seq_descr_pub
+ && sdp->choice != Seq_descr_molinfo
+ && sdp->choice != Seq_descr_comment) return;
+
+ sp = (SaveSetSdpPtr) userdata;
+ if (sdp->choice == Seq_descr_molinfo
+ && (mip = (MolInfoPtr) sdp->data.ptrvalue) != NULL)
+ {
+ if (mip->biomol == MOLECULE_TYPE_PEPTIDE || sp->already_have_molinfo)
+ {
+ return;
+ }
+ else
+ {
+ sp->already_have_molinfo = TRUE;
+ }
+ }
+ SeqDescAsnWrite (sdp, sp->aip, NULL);
+ AsnPrintNewLine (sp->aip);
+ AsnIoFlush (sp->aip);
+}
+
+Int2 LIBCALLBACK VSMDescriptorAsnSave (Pointer data)
+{
+ OMProcControlPtr ompcp;
+ Char filename[255];
+ SelStructPtr ssp, sel;
+ SeqDescrPtr sdp;
+ BioseqPtr bsp;
+ SeqEntryPtr sep;
+ SeqMgrDescContext dcontext;
+#ifdef WIN_MAC
+ FILE * fp;
+#endif
+ ValNodePtr entity_list = NULL, vnp;
+ SaveSetSdpData sd;
+ ValNodePtr obj_list = NULL;
+
+ ompcp = (OMProcControlPtr)data;
+ if (ompcp == NULL) return OM_MSG_RET_ERROR;
+
+ sd.already_have_molinfo = FALSE;
+ ssp = ObjMgrGetSelected();
+ if (ssp == NULL)
+ {
+ Message (MSG_ERROR, "You must select a sequence or set from which descriptors should be saved");
+ return OM_MSG_RET_DONE;
+ } else {
+ for (sel = ssp; sel != NULL; sel = sel->next)
+ {
+ GatherItem (sel->entityID, sel->itemID, sel->itemtype,
+ (Pointer) &obj_list, AddToSaveList);
+ }
+ }
+
+ /* get file name to use */
+ filename[0] = '\0';
+ if (GetOutputFileName(filename, (size_t)254, NULL))
+ {
+ WatchCursor();
+#ifdef WIN_MAC
+ fp = FileOpen (filename, "r");
+ if (fp != NULL) {
+ FileClose (fp);
+ } else {
+ FileCreate (filename, "TEXT", "ttxt");
+ }
+#endif
+
+ sd.aip = AsnIoOpen(filename, "w");
+ for (vnp = obj_list; vnp != NULL; vnp = vnp->next)
+ {
+ switch (vnp->choice) {
+ case OBJ_SEQDESC:
+ sdp = (SeqDescrPtr) vnp->data.ptrvalue;
+ SeqDescAsnWrite (sdp, sd.aip, NULL);
+ AsnPrintNewLine (sd.aip);
+ AsnIoFlush (sd.aip);
+ break;
+ case OBJ_BIOSEQ:
+ bsp = (BioseqPtr) vnp->data.ptrvalue;
+ for (sdp = SeqMgrGetNextDescriptor (bsp, NULL, 0, &dcontext);
+ sdp != NULL;
+ sdp = SeqMgrGetNextDescriptor (bsp, sdp, 0, &dcontext)) {
+ if (sdp->choice != Seq_descr_source
+ && sdp->choice != Seq_descr_pub
+ && sdp->choice != Seq_descr_molinfo
+ && sdp->choice != Seq_descr_comment) continue;
+ SeqDescAsnWrite (sdp, sd.aip, NULL);
+ AsnPrintNewLine (sd.aip);
+ AsnIoFlush (sd.aip);
+ }
+ break;
+ case OBJ_BIOSEQSET:
+ sep = SeqMgrGetSeqEntryForData (vnp->data.ptrvalue);
+ VisitDescriptorsInSep (sep, &sd, SaveSetDescriptors);
+ break;
+ }
+ }
+ AsnIoClose(sd.aip);
+ ArrowCursor();
+ }
+
+ return OM_MSG_RET_DONE;
+}
+
+
diff --git a/desktop/vsmfile.h b/desktop/vsmfile.h
index 32cfa81c..426c43e7 100644
--- a/desktop/vsmfile.h
+++ b/desktop/vsmfile.h
@@ -29,7 +29,7 @@
*
* Version Creation Date: 11-29-94
*
-* $Revision: 6.6 $
+* $Revision: 6.7 $
*
* File Description:
*
@@ -84,6 +84,7 @@ Int2 LIBCALLBACK VSMExportNucFeatureTableSelectedFeatures (Pointer data);
Int2 LIBCALLBACK VSMExportNucFeatureTableSelectedFeaturesSuppressProteinIDs (Pointer data);
Int2 LIBCALLBACK VSMExportProteinFeatureTable (Pointer data);
Int2 LIBCALLBACK VSMFastaSortedProtSave (Pointer data);
+Int2 LIBCALLBACK VSMDescriptorAsnSave (Pointer data);
NLM_EXTERN void ViewSortedProteins (SeqEntryPtr sep);
extern void ExportSeqAnnotFeatureTable (FILE *fp, SeqAnnotPtr sap);
diff --git a/desktop/vsmutil.c b/desktop/vsmutil.c
index fb09c052..71189ef5 100644
--- a/desktop/vsmutil.c
+++ b/desktop/vsmutil.c
@@ -29,7 +29,7 @@
*
* Version Creation Date: 3/3/95
*
-* $Revision: 6.47 $
+* $Revision: 6.55 $
*
* File Description:
*
@@ -114,6 +114,19 @@ typedef struct validextra {
FormActnFunc revalProc;
ButtoN revalBtn;
Boolean okaytosetviewtarget;
+ Boolean indexerVersion;
+ Int2 selected_text_start_item;
+ Int2 selected_text_start_col;
+ Int2 selected_text_start_row;
+ Int4 selected_text_start_offset;
+ Int2 selected_text_end_item;
+ Int2 selected_text_end_col;
+ Int2 selected_text_end_row;
+ Int4 selected_text_end_offset;
+ Int2 selected_text_anchor_item;
+ Int2 selected_text_anchor_col;
+ Int2 selected_text_anchor_row;
+ Int4 selected_text_anchor_offset;
} ValidExtra, PNTR ValidExtraPtr;
static WindoW validWindow = NULL;
@@ -156,6 +169,71 @@ static void InvalBorder (DoC d, Int2 item)
}
}
+
+static Int2 val_columns_for_copy[] = {1, 2, 3, 5};
+
+static void DrawTextSelection (DoC doc, ValidExtraPtr vep, Int2 item, RectPtr r)
+{
+ Int2 lineHeight, numRows, numCols;
+ Int2 last_right;
+ Int2 left_start;
+ Int4 top, line_y;
+ CharPtr txt;
+
+ if (vep == NULL || r == NULL
+ || item < vep->selected_text_start_item
+ || item > vep->selected_text_end_item) {
+ return;
+ }
+
+ if (vep->selected_text_start_item == vep->selected_text_end_item
+ && vep->selected_text_start_row == vep->selected_text_end_row
+ && vep->selected_text_start_offset == vep->selected_text_end_offset) {
+ /* if we've only selected one char, and it's blank, don't draw it. */
+ txt = GetSelectedDocText (doc, vep->selected_text_start_item, vep->selected_text_start_row,
+ vep->selected_text_start_col, vep->selected_text_start_offset,
+ vep->selected_text_end_item, vep->selected_text_end_row,
+ vep->selected_text_end_col, vep->selected_text_end_offset,
+ val_columns_for_copy, sizeof (val_columns_for_copy));
+ if (StringHasNoText (txt)) {
+ MemFree (txt);
+ return;
+ }
+ MemFree (txt);
+ }
+
+ GetItemParams4 (doc, item, &top, &numRows, &numCols, &lineHeight, NULL);
+
+ /* calculate missing rows from end first */
+ if (vep->selected_text_end_item == item) {
+ numRows = vep->selected_text_end_row;
+ last_right = PanelOffsetFromCharOffsetEx (doc, vep->font, item, vep->selected_text_end_col, vep->selected_text_end_offset);
+ } else {
+ last_right = r->right;
+ }
+
+ if (vep->selected_text_start_item == item) {
+ left_start = PanelOffsetFromCharOffsetEx (doc, vep->font, item, vep->selected_text_start_col, vep->selected_text_start_offset);
+ line_y = r->top + (vep->selected_text_start_row) * lineHeight - 1;
+ numRows -= vep->selected_text_start_row - 1;
+ } else {
+ left_start = PanelOffsetFromCharOffsetEx (doc, vep->font, item, 1, 0);
+ line_y = r->top + lineHeight - 1;
+ }
+
+ while (numRows > 1) {
+ MoveTo (left_start, line_y);
+ left_start = PanelOffsetFromCharOffsetEx (doc, vep->font, item, numCols, 0);
+ LineTo (r->right, line_y);
+ line_y += lineHeight;
+ numRows--;
+ }
+ MoveTo (left_start, line_y);
+ LineTo (last_right, line_y);
+
+}
+
+
static void DrawValid (DoC d, RectPtr r, Int2 item, Int2 firstLine)
{
@@ -169,19 +247,62 @@ static void DrawValid (DoC d, RectPtr r, Int2 item, Int2 firstLine)
rct.right = rct.left + 4;
PaintRect (&rct);
}
+ if (vep->indexerVersion && vep->selected_text_start_item > -1) {
+ DrawTextSelection (d, vep, item, r);
+ }
}
}
+
+static void UpdateValidTextSelection (ValidExtraPtr vep, DoC d, PoinT pt)
+{
+ Int2 item, row, col, offset;
+
+ if (vep == NULL) return;
+
+ MapDocPoint (d, pt, &item, &row, &col, NULL);
+
+ if (item < 1 || row < 1 || col < 1) return;
+ offset = GetTextSelectCharOffsetEx (pt, d, vep->font, item, row, col);
+ if (item > vep->selected_text_anchor_item
+ || (item == vep->selected_text_anchor_item
+ && (col > vep->selected_text_anchor_col
+ || (col == vep->selected_text_anchor_col
+ && (row > vep->selected_text_anchor_row
+ || (row == vep->selected_text_anchor_row
+ && offset >= vep->selected_text_anchor_offset)))))) {
+ vep->selected_text_start_item = vep->selected_text_anchor_item;
+ vep->selected_text_start_row = vep->selected_text_anchor_row;
+ vep->selected_text_start_col = vep->selected_text_anchor_col;
+ vep->selected_text_start_offset = vep->selected_text_anchor_offset;
+ vep->selected_text_end_item = item;
+ vep->selected_text_end_row = row;
+ vep->selected_text_end_col = col;
+ vep->selected_text_end_offset = offset;
+ } else {
+ vep->selected_text_start_item = item;
+ vep->selected_text_start_row = row;
+ vep->selected_text_start_col = col;
+ vep->selected_text_start_offset = offset;
+ vep->selected_text_end_item = vep->selected_text_anchor_item;
+ vep->selected_text_end_row = vep->selected_text_anchor_row;
+ vep->selected_text_end_col = vep->selected_text_anchor_col;
+ vep->selected_text_end_offset = vep->selected_text_anchor_offset;
+ }
+ InvalDocRows (d, 0, 0, 0);
+}
+
+
static void ClickValid (DoC d, PoinT pt)
{
Int2 item;
- Int2 row;
+ Int2 row, col;
ValidExtraPtr vep;
vep = GetObjectExtra (d);
if (vep != NULL) {
- MapDocPoint (d, pt, &item, &row, NULL, NULL);
+ MapDocPointEx (d, pt, &item, &row, &col, NULL, TRUE);
if (item > 0 && row > 0 && vep->clicked == item) {
vep->dblClick = dblClick;
} else {
@@ -191,10 +312,29 @@ static void ClickValid (DoC d, PoinT pt)
vep->shftKey = shftKey;
if (item > 0 && row > 0) {
vep->clicked = item;
+ if (vep->indexerVersion) {
+ vep->selected_text_anchor_item = item;
+ vep->selected_text_anchor_col = col;
+ vep->selected_text_anchor_row = row;
+ vep->selected_text_anchor_offset = GetTextSelectCharOffsetEx (pt, d, vep->font, item, row, col);
+ UpdateValidTextSelection (vep, d, pt);
+ }
}
}
}
+
+static void DragValid (DoC d, PoinT pt)
+{
+ ValidExtraPtr vep;
+
+ vep = GetObjectExtra (d);
+ if (vep != NULL && vep->indexerVersion) {
+ UpdateValidTextSelection (vep, d, pt);
+ }
+}
+
+
static Boolean FindSfpItem (GatherContextPtr gcp)
{
@@ -650,10 +790,10 @@ static void RepopVal (PopuP p)
static CharPtr FormatConsensusSpliceReport (CharPtr doc_line)
{
- CharPtr cp, cp2;
+ CharPtr cp, cp2, feat_start, feat_end = NULL;
CharPtr report_str = NULL;
CharPtr msg_abbrev = NULL;
- Char ch;
+ Char ch, ch_2;
Int4 pos;
cp = StringChr (doc_line, '\n');
@@ -669,14 +809,34 @@ static CharPtr FormatConsensusSpliceReport (CharPtr doc_line)
cp = StringSearch (cp, "position ");
cp2 = StringSearch (cp, "FEATURE:");
if (cp2 != NULL) {
+ feat_start = cp2 + 8;
+ if (feat_start != NULL) {
+ feat_end = StringChr (feat_start, ':');
+ if (feat_end != NULL) {
+ ch_2 = *feat_end;
+ *feat_end = 0;
+ }
+ }
ch = *cp2;
*cp2 = 0;
- report_str = (CharPtr) MemNew (sizeof (Char) * StringLen (cp));
+ if (feat_start == NULL) {
+ report_str = (CharPtr) MemNew (sizeof (Char) * StringLen (cp));
+ } else {
+ report_str = (CharPtr) MemNew (sizeof (Char) * (StringLen (cp) + StringLen (feat_start) + 2));
+ }
if (sscanf (cp, "position %ld of %s", &pos, report_str) == 2) {
- sprintf (report_str + StringLen (report_str), "\t%s at %ld", msg_abbrev, pos);
+ if (feat_start == NULL) {
+ sprintf (report_str + StringLen (report_str), "\t%s at %ld", msg_abbrev, pos);
+ } else {
+ sprintf (report_str + StringLen (report_str), "\t%s\t%s at %ld", feat_start, msg_abbrev, pos);
+ }
} else {
report_str = MemFree (report_str);
}
+ if (feat_end != NULL) {
+ *feat_end = ch_2;
+ }
+ *cp2 = ch;
}
return report_str;
@@ -748,7 +908,7 @@ static CharPtr GetEcNumberReport (SeqFeatPtr sfp)
ec_number = StringSave (str);
} else {
tmp = (CharPtr) MemNew (sizeof (Char) * (StringLen (ec_number) + StringLen (str) + 2));
- sprintf (tmp, "%s;%s", ec_number, gbq->val);
+ sprintf (tmp, "%s;%s", ec_number, str);
ec_number = MemFree (ec_number);
ec_number = tmp;
}
@@ -927,6 +1087,214 @@ extern Boolean WriteBadSpecificHostTable (ValNodePtr bad_biop_list, FILE *fp)
return any_in_list;
}
+
+typedef struct validatoreporttype {
+ ButtoN PNTR btn_array;
+ ValNodePtr errorfilter;
+} ValidatorReportTypeData, PNTR ValidatorReportTypePtr;
+
+
+static void EnableValidatorReportTypeButtons (ButtoN b)
+{
+ ValidatorReportTypePtr data;
+ ValNodePtr vnp, vnp2;
+ Int4 pos, pos2;
+ ErrFltrPtr efp;
+
+ data = (ValidatorReportTypePtr) GetObjectExtra (b);
+ if (data == NULL) return;
+
+ for (vnp = data->errorfilter, pos = 0;
+ vnp != NULL;
+ vnp = vnp->next, pos++)
+ {
+ if (data->btn_array[pos] == b)
+ {
+ efp = (ErrFltrPtr) vnp->data.ptrvalue;
+ if (efp != NULL && efp->subcode == INT_MIN)
+ {
+ if (GetStatus (b))
+ {
+ /* main category checked, disable subcategories */
+ for (vnp2 = vnp->next, pos2 = pos + 1;
+ vnp2 != NULL && (vnp2->data.ptrvalue == NULL
+ || ((ErrFltrPtr)vnp2->data.ptrvalue)->errcode == efp->errcode);
+ vnp2 = vnp2->next, pos2++)
+ {
+ Disable (data->btn_array[pos2]);
+ }
+ }
+ else
+ {
+ /* main category unchecked, enable subcategories */
+ for (vnp2 = vnp->next, pos2 = pos + 1;
+ vnp2 != NULL && (vnp2->data.ptrvalue == NULL || ((ErrFltrPtr)vnp2->data.ptrvalue)->errcode == efp->errcode);
+ vnp2 = vnp2->next, pos2++)
+ {
+ Enable (data->btn_array[pos2]);
+ }
+ }
+ }
+ break;
+ }
+ }
+}
+
+
+static ValNodePtr CollectValidatorReportTypes (ValidExtraPtr vep)
+{
+ ErrFltrPtr efp;
+ ValNodePtr chosen = NULL, vnp;
+ WindoW w, h, btn_grp, g1 = NULL, c;
+ Int4 num_buttons, i;
+ ValidatorReportTypeData data;
+ ButtoN PNTR btn_array;
+ ButtoN b;
+ int last_errcode = 0;
+ ModalAcceptCancelData acd;
+
+ if (vep == NULL || vep->errorfilter == NULL) return NULL;
+
+ /* if only one, just select the one */
+ if (vep->errorfilter->next == NULL)
+ {
+ ValNodeAddPointer (&chosen, 0, vep->errorfilter->data.ptrvalue);
+ return chosen;
+ }
+
+ num_buttons = ValNodeLen (vep->errorfilter);
+ btn_array = (ButtoN PNTR) MemNew (sizeof (ButtoN) * num_buttons);
+
+ data.btn_array = btn_array;
+ data.errorfilter = vep->errorfilter;
+
+ w = MovableModalWindow (-50, -33, -10, -10, "Choose Report Items", NULL);
+ SetGroupSpacing (w, 10, 10);
+ h = HiddenGroup (w, -1, 0, NULL);
+ SetGroupSpacing (h, 10, 10);
+
+ btn_grp = HiddenGroup (h, 3, 0, NULL);
+ for (vnp = vep->errorfilter, i = 0; vnp != NULL; vnp = vnp->next, i++) {
+ efp = (ErrFltrPtr) vnp->data.ptrvalue;
+ if (efp == NULL) continue;
+ if (efp->subcode == INT_MIN) {
+ g1 = NormalGroup (btn_grp, 0, 10, efp->text2, programFont, NULL);
+ btn_array[i] = CheckBox (g1, "All", EnableValidatorReportTypeButtons);
+ SetObjectExtra (btn_array[i], &data, NULL);
+ last_errcode = efp->errcode;
+ } else {
+ if (last_errcode != efp->errcode) {
+ g1 = NULL;
+ }
+ btn_array[i] = CheckBox (g1 == NULL ? btn_grp : g1, efp->text3 == NULL ? "" : efp->text3, NULL);
+ }
+ }
+
+ c = HiddenGroup (w, 4, 0, NULL);
+ SetGroupSpacing (c, 10, 2);
+ b = DefaultButton (c, "Accept", ModalAcceptButton);
+ SetObjectExtra (b, &acd, NULL);
+ b = PushButton (c, "Cancel", ModalCancelButton);
+ SetObjectExtra (b, &acd, NULL);
+
+ AlignObjects (ALIGN_CENTER, (HANDLE) btn_grp, (HANDLE) c, NULL);
+ RealizeWindow (w);
+
+ Show (w);
+ Select (w);
+ Update ();
+
+ acd.accepted = FALSE;
+ acd.cancelled = FALSE;
+
+ while (!acd.accepted && ! acd.cancelled)
+ {
+ while (!acd.accepted && ! acd.cancelled)
+ {
+ ProcessExternalEvent ();
+ Update ();
+ }
+ ProcessAnEvent ();
+
+ if (acd.accepted)
+ {
+ for (vnp = vep->errorfilter, i = 0; vnp != NULL; vnp = vnp->next, i++)
+ {
+ if (vnp->data.ptrvalue != NULL && GetStatus (btn_array[i]))
+ {
+ ValNodeAddPointer (&chosen, 0, vnp->data.ptrvalue);
+ }
+ }
+ }
+ }
+ btn_array = MemFree (btn_array);
+ Remove (w);
+ return chosen;
+}
+
+
+static Int4 FindReportPositionForError (ErrItemPtr eip, ValNodePtr chosen)
+{
+ Int4 pos;
+ ValNodePtr vnp;
+ ErrFltrPtr efp;
+
+ if (eip == NULL || chosen == NULL) return -1;
+
+ for (vnp = chosen, pos = 0; vnp != NULL; vnp = vnp->next, pos++)
+ {
+ efp = (ErrFltrPtr) vnp->data.ptrvalue;
+ if (efp != NULL && efp->errcode == eip->errcode
+ && (efp->subcode == INT_MIN || efp->subcode == eip->subcode))
+ {
+ return pos;
+ }
+ }
+ return -1;
+}
+
+
+static Boolean MakeStandardReports (ValNodePtr chosen, ValNodePtr PNTR reports_list, FILE *fp)
+{
+ ValNodePtr chosen_vnp, item_vnp;
+ ErrFltrPtr efp;
+ Int4 i;
+ CharPtr cp;
+ Boolean found_any = FALSE;
+ CharPtr label;
+
+ if (chosen == NULL || reports_list == NULL || fp == NULL) return FALSE;
+
+ for (chosen_vnp = chosen, i = 0; chosen_vnp != NULL; chosen_vnp = chosen_vnp->next, i++)
+ {
+ efp = (ErrFltrPtr) chosen_vnp->data.ptrvalue;
+ if (efp != NULL && reports_list[i] != NULL)
+ {
+ fprintf (fp, "%s%s%s\n", efp->text2 == NULL ? "" : efp->text2,
+ efp->subcode == INT_MIN || efp->text3 != NULL ? ":" : "",
+ efp->subcode == INT_MIN ? "ALL" : efp->text3 == NULL ? "" : efp->text3);
+ for (item_vnp = reports_list[i]; item_vnp != NULL; item_vnp = item_vnp->next)
+ {
+ cp = GetDiscrepancyItemText (item_vnp);
+ if (cp != NULL)
+ {
+ label = GetParentLabelForDiscrepancyItem (item_vnp);
+ if (label != NULL) {
+ fprintf (fp, "%s:", label);
+ label = MemFree (label);
+ }
+ fprintf (fp, "%s", cp);
+ found_any = TRUE;
+ cp = MemFree (cp);
+ }
+ }
+ fprintf (fp, "\n");
+ }
+ }
+ return found_any;
+}
+
+
static void MakeValidatorReport (ButtoN b)
{
ValidExtraPtr vep;
@@ -938,21 +1306,29 @@ static void MakeValidatorReport (ButtoN b)
Boolean found_any = FALSE;
FILE *fp;
ValNodePtr consensus_splice_list = NULL;
- ValNodePtr stop_codon_list = NULL;
ValNodePtr ecnumber_list = NULL;
ValNodePtr specific_host_list = NULL;
- ValNodePtr its_does_not_abut_list = NULL;
SeqFeatPtr sfp;
SeqDescrPtr sdp;
+ BioseqPtr bsp;
CharPtr str;
Char ch;
CharPtr tmp;
SeqMgrFeatContext fcontext;
SeqMgrDescContext dcontext;
+ ValNodePtr chosen = NULL;
+ ValNodePtr PNTR report_lists = NULL;
+ Int4 num_reports, pos;
vep = (ValidExtraPtr) GetObjectExtra (b);
if (vep == NULL) return;
+ chosen = CollectValidatorReportTypes (vep);
+ if (chosen == NULL) return;
+ num_reports = ValNodeLen (chosen);
+ report_lists = (ValNodePtr PNTR) MemNew (sizeof (ValNodePtr) * num_reports);
+ MemSet (report_lists, 0, sizeof (ValNodePtr) * num_reports);
+
TmpNam (path);
#ifdef WIN_MAC
fp = FileOpen (path, "r");
@@ -970,6 +1346,9 @@ static void MakeValidatorReport (ButtoN b)
item++;
eip = (ErrItemPtr) vnp->data.ptrvalue;
if (eip != NULL) {
+ pos = FindReportPositionForError (eip, chosen);
+ if (pos == -1) continue;
+
if (eip->errcode == 5 && (eip->subcode == 16 || eip->subcode == 137 || eip->subcode == 138 || eip->subcode == 139)) {
/* ERR_SEQ_FEAT_NotSpliceConsensus */
str = GetDocText (vep->doc, item, 0, 5);
@@ -990,18 +1369,13 @@ static void MakeValidatorReport (ButtoN b)
if (cp != NULL) {
ValNodeAddPointer (&consensus_splice_list, 0, cp);
}
- } else if (eip->errcode == 5 && eip->subcode == 9) {
- sfp = SeqMgrGetDesiredFeature (eip->entityID, NULL, eip->itemID, 0, NULL, &fcontext);
- if (sfp != NULL) {
- ValNodeAddPointer (&stop_codon_list, OBJ_SEQFEAT, sfp);
- }
} else if (eip->errcode == 5 && (eip->subcode == 124 || eip->subcode == 125 || eip->subcode == 126)) {
/* ERR_SEQ_FEAT_BadEcNumberValue */
sfp = SeqMgrGetDesiredFeature (eip->entityID, NULL, eip->itemID, 0, NULL, &fcontext);
if (sfp != NULL) {
ValNodeAddPointer (&ecnumber_list, OBJ_SEQFEAT, sfp);
}
- } else if (eip->errcode == 2 && eip->subcode == 29 && StringCmp (eip->message, "Invalid value for specific host") == 0) {
+ } else if (eip->errcode == 2 && eip->subcode == 50) {
if (eip->itemtype == OBJ_SEQDESC) {
sdp = SeqMgrGetDesiredDescriptor (eip->entityID, NULL, eip->itemID, 0, NULL, &dcontext);
if (sdp != NULL) {
@@ -1013,10 +1387,20 @@ static void MakeValidatorReport (ButtoN b)
ValNodeAddPointer (&specific_host_list, OBJ_SEQFEAT, sfp);
}
}
- } else if (eip->errcode == 5 && eip->subcode == 116 && eip->itemtype == OBJ_SEQFEAT) {
+ } else if (eip->itemtype == OBJ_SEQFEAT) {
sfp = SeqMgrGetDesiredFeature (eip->entityID, NULL, eip->itemID, 0, NULL, &fcontext);
if (sfp != NULL) {
- ValNodeAddPointer (&its_does_not_abut_list, OBJ_SEQFEAT, sfp);
+ ValNodeAddPointer (&(report_lists[pos]), OBJ_SEQFEAT, sfp);
+ }
+ } else if (eip->itemtype == OBJ_SEQDESC) {
+ sdp = SeqMgrGetDesiredDescriptor (eip->entityID, NULL, eip->itemID, 0, NULL, &dcontext);
+ if (sdp != NULL) {
+ ValNodeAddPointer (&(report_lists[pos]), OBJ_SEQDESC, sdp);
+ }
+ } else if (eip->itemtype == OBJ_BIOSEQ) {
+ bsp = GetBioseqGivenIDs (eip->entityID, eip->itemID, OBJ_BIOSEQ);
+ if (bsp != NULL) {
+ ValNodeAddPointer (&(report_lists[pos]), OBJ_BIOSEQ, bsp);
}
}
}
@@ -1028,23 +1412,11 @@ static void MakeValidatorReport (ButtoN b)
for (vnp = consensus_splice_list; vnp != NULL; vnp = vnp->next) {
fprintf (fp, "%s\n", vnp->data.ptrvalue);
}
+ fprintf (fp, "\n");
found_any = TRUE;
consensus_splice_list = ValNodeFreeData (consensus_splice_list);
}
- if (stop_codon_list != NULL) {
- fprintf (fp, "Internal Stop Codons\n");
- for (vnp = stop_codon_list; vnp != NULL; vnp = vnp->next) {
- cp = GetDiscrepancyItemText (vnp);
- if (cp != NULL) {
- fprintf (fp, "%s", cp);
- found_any = TRUE;
- cp = MemFree (cp);
- }
- }
- stop_codon_list = ValNodeFree (stop_codon_list);
- }
-
if (ecnumber_list != NULL) {
fprintf (fp, "EC Number Errors\n");
for (vnp = ecnumber_list; vnp != NULL; vnp = vnp->next) {
@@ -1055,6 +1427,7 @@ static void MakeValidatorReport (ButtoN b)
cp = MemFree (cp);
}
}
+ fprintf (fp, "\n");
ecnumber_list = ValNodeFree (ecnumber_list);
}
@@ -1064,18 +1437,13 @@ static void MakeValidatorReport (ButtoN b)
found_any = TRUE;
}
- if (its_does_not_abut_list != NULL) {
- fprintf (fp, "ITS Features that do not Abut rRNA\n");
- for (vnp = its_does_not_abut_list; vnp != NULL; vnp = vnp->next) {
- cp = GetDiscrepancyItemText (vnp);
- if (cp != NULL) {
- fprintf (fp, "%s", cp);
- found_any = TRUE;
- cp = MemFree (cp);
- }
- }
- its_does_not_abut_list = ValNodeFree (its_does_not_abut_list);
- }
+ found_any |= MakeStandardReports (chosen, report_lists, fp);
+
+ for (pos = 0; pos < num_reports; pos++) {
+ report_lists[pos] = ValNodeFree (report_lists[pos]);
+ }
+ report_lists = MemFree (report_lists);
+ chosen = ValNodeFree (chosen);
FileClose (fp);
if (found_any) {
@@ -1349,16 +1717,27 @@ static void CopyValToClipboard (ValidExtraPtr vep)
{
FILE *fp;
Char path [PATH_MAX];
+ CharPtr selected_text;
if (vep == NULL) return;
- TmpNam (path);
- fp = FileOpen (path, "w");
- if (fp != NULL) {
- SaveDocument (vep->doc, fp);
- FileClose (fp);
- FileToClipboard (path);
+ selected_text = GetSelectedDocText (vep->doc, vep->selected_text_start_item, vep->selected_text_start_row,
+ vep->selected_text_start_col, vep->selected_text_start_offset,
+ vep->selected_text_end_item, vep->selected_text_end_row,
+ vep->selected_text_end_col, vep->selected_text_end_offset,
+ val_columns_for_copy, sizeof (val_columns_for_copy));
+ if (StringHasNoText (selected_text)) {
+ TmpNam (path);
+ fp = FileOpen (path, "w");
+ if (fp != NULL) {
+ SaveDocument (vep->doc, fp);
+ FileClose (fp);
+ FileToClipboard (path);
+ }
+ FileRemove (path);
+ } else {
+ StringToClipboard (selected_text);
}
- FileRemove (path);
+ selected_text = MemFree (selected_text);
}
static void PrintValProc (ValidExtraPtr vep)
@@ -1476,6 +1855,7 @@ extern void CreateValidateWindowEx (ErrNotifyProc notify, CharPtr title,
if (validWindow == NULL) {
vep = (ValidExtraPtr) MemNew (sizeof (ValidExtra));
if (vep != NULL) {
+ vep->indexerVersion = indexerVersion;
if (title == NULL || title [0] == '\0') {
title = "Validation Errors";
}
@@ -1583,7 +1963,7 @@ extern void CreateValidateWindowEx (ErrNotifyProc notify, CharPtr title,
vep->doc = DocumentPanel (g, stdCharWidth * 30, stdLineHeight * 20);
SetObjectExtra (vep->doc, vep, NULL);
SetDocAutoAdjust (vep->doc, FALSE);
- SetDocProcs (vep->doc, ClickValid, NULL, ReleaseValid, NULL);
+ SetDocProcs (vep->doc, ClickValid, DragValid, ReleaseValid, NULL);
SetDocShade (vep->doc, DrawValid, NULL, NULL, NULL);
vep->font = font;
diff --git a/doc/blast/blast.html b/doc/blast/blast.html
index 39c9f632..e17ea04c 100644
--- a/doc/blast/blast.html
+++ b/doc/blast/blast.html
@@ -13,7 +13,7 @@
<pre>
README for stand-alone BLAST
-$Date: 2005/05/05 13:53:10 $
+$Date: 2007/10/29 13:30:52 $
Table of contents
-----------------
@@ -33,14 +33,15 @@ Introduction
NCBI provides binaries for the following platforms:
-Apple MacOS X (ppc32)
+Apple MacOS X (ppc32/ia32)
FreeBSD 4.5 (ia32)
IBM AIX 5.1 (ppc64)
-Linux (kernel 2.4, glibc 2.3.2) (ia32, ia64, amd64)
+Linux (kernel 2.6, glibc 2.3) (ia32, ia64, x64)
Microsoft Windows 2000 (ia32)
SGI IRIX 6.5 (mips64)
Sun Solaris 9 (ia32)
-Sun Solaris 8 (sparc64)
+Sun Solaris 10 (sparc64)
+Sun Solaris 10 (x64)
We will attempt to produce binaries for other platforms upon request.
diff --git a/doc/fwd_check.sh b/doc/fwd_check.sh
index cc530dc5..7b48e97a 100755
--- a/doc/fwd_check.sh
+++ b/doc/fwd_check.sh
@@ -1,5 +1,5 @@
#! /bin/sh
-# $Id: fwd_check.sh,v 1.27 2006/05/25 19:40:23 lavr Exp $
+# $Id: fwd_check.sh,v 1.42 2008/02/27 17:19:43 lavr Exp $
# Author: Denis Vakatov (vakatov@ncbi,nlm.nih.gov)
# Modified: Anton Lavrentiev (lavr@ncbi.nlm.nih.gov)
#
@@ -16,35 +16,43 @@ EOF
{
cat <<EOF
-;130.14.22.1 5853 RETIRED
-;130.14.22.2 5859 RETIRED
-;130.14.22.8 5840 RETIRED
-;130.14.22.30 5810 RETIRED
-;130.14.22.31 5812 RETIRED
-;130.14.22.32 5811 RETIRED
-;130.14.22.12 5845 RETIRED
-130.14.25.13 5555 INTERNAL
-130.14.29.112 5860 OK
+;130.14.25.13 5555 RETIRED
+10.10.150.7 5555 INTERNAL
+130.14.29.112 5860 RESERVED
130.14.29.112 5861 RESERVED
130.14.29.112 5862 RESERVED
130.14.29.112 5863 RESERVED
-130.14.29.112 5864 RESERVED
-130.14.29.112 5865 RESERVED
+130.14.29.112 5864 OK
+130.14.29.112 5865 OK
130.14.29.112 5866 RESERVED
130.14.29.112 5867 OK
130.14.29.112 5868 OK
130.14.29.112 5869 OK
-130.14.29.112 5870 OK
+130.14.29.112 5870 RESERVED
+130.14.29.112 4444 RETIRED
+130.14.29.112 4445 RESERVED
+130.14.29.112 4446 RESERVED
+130.14.29.112 4447 RESERVED
+130.14.29.112 4448 OK
+130.14.29.112 4449 OK
+130.14.29.112 4450 RESERVED
+130.14.29.112 4451 OK
+130.14.29.112 4452 OK
+130.14.29.112 4453 OK
+130.14.29.112 4454 RESERVED
EOF
} |
while read x_host x_port x_status ; do
test "`echo $x_host | grep -c '^[;]'`" != "0" && continue
+ if [ "$x_port" -lt "5860" -o "$x_port" -gt "5870" ]; then
+ test -z "$HTTP_CAF" -o -n "$HTTP_CAF_EXTERNAL" && continue
+ fi
if [ "$x_status" = "RETIRED" -o \
- "$x_status" = "RESERVED" -o \
- "$x_status" = "READYING" ]; then
+ "$x_status" = "RESERVED" ]; then
echo "${x_host}:${x_port} $x_status"
continue
fi
+ test "$x_status" = "READYING" && unset x_status
( echo ; sleep $delay_sec ) | telnet $x_host $x_port >/tmp/$$ 2>&1 &
pid=$!
trap 'rm -f /tmp/$$; kill $pid >/dev/null 2>&1' 1 2 15
@@ -52,11 +60,15 @@ while read x_host x_port x_status ; do
guard=$!
wait $pid >/dev/null 2>&1
kill $guard >/dev/null 2>&1
- grep -s 'NCBI Firewall Daemon: Invalid ticket\. *Connection closed\.' /tmp/$$ >/dev/null 2>&1
- if test $? -eq 0 ; then
- echo "${x_host}:${x_port} ${x_status}"
+ test -n "$HTTP_CAF_EXTERNAL" || \
+ cp="`tail +4 /tmp/$$ 2>/dev/null | grep -s '^[0-9]\{1,3\}[.][0-9]\{1,3\}[.][0-9]\{1,3\}[.][0-9]\{1,3\}:[0-9]\{1,5\}'`"
+ grep -qs 'NCBI Firewall Daemon: Invalid ticket\. *Connection closed\.' /tmp/$$ >/dev/null 2>&1
+ if [ $? -eq 0 ]; then
+ echo "${x_host}:${x_port} ${x_status:-OKAY}${cp:+ }${cp}"
+ elif [ -z "$x_status" ]; then
+ echo "${x_host}:${x_port} READYING"
else
- echo "${x_host}:${x_port} FAILED ( telnet $x_host $x_port )"
+ echo "${x_host}:${x_port} FAILED ( telnet $x_host $x_port )"
fi
rm -f /tmp/$$
done 2>&1 | grep -v 'Terminated'
diff --git a/doc/man/Nentrez.1 b/doc/man/Nentrez.1
deleted file mode 100644
index 55d19028..00000000
--- a/doc/man/Nentrez.1
+++ /dev/null
@@ -1,19 +0,0 @@
-.TH NENTREZ 1 2001-11-21 NCBI "NCBI Tools User's Manual"
-.SH NAME
-Nentrez \- a graphical client for the NCBI Entrez retrieval system
-.SH SYNOPSIS
-.B Nentrez
-.SH DESCRIPTION
-\fBNentrez\fP (Network Entrez) is a TCP/IP-based client-server version
-of WWW Entrez. This means it makes a direct connection with the NCBI
-databases over the Internet to retrieve its data. The data comes in a
-binary form taking up less network bandwidth during transfer.
-.SH OPTIONS
-None.
-.SH AUTHOR
-The National Center for Biotechnology Information.
-.SH SEE ALSO
-.ad l
-.BR entrez2 (1),
-.BR netentcf (1),
-<http://www.ncbi.nlm.nih.gov/Entrez/Network/nentrez.overview.html>
diff --git a/doc/man/asn2all.1 b/doc/man/asn2all.1
index 3166882c..19f76172 100644
--- a/doc/man/asn2all.1
+++ b/doc/man/asn2all.1
@@ -1,4 +1,4 @@
-.TH ASN2ALL 1 2005-05-16 NCBI "NCBI Tools User's Manual"
+.TH ASN2ALL 1 2007-10-19 NCBI "NCBI Tools User's Manual"
.SH NAME
asn2all \- generate reports from ASN.1 biological data
.SH SYNOPSIS
@@ -14,6 +14,7 @@ asn2all \- generate reports from ASN.1 biological data
[\|\fB\-f\fP\ \fIformat\fP\|]
[\|\fB\-h\fP\|]
[\|\fB\-i\fP\ \fIfilename\fP\|]
+[\|\fB\-k\fP\|]
[\|\fB\-l\fP\|]
[\|\fB\-n\fP\ \fIpolicy\fP\|]
[\|\fB\-o\fP\ \fIfilename\fP\|]
@@ -130,6 +131,9 @@ Display extra Help message
\fB\-i\fP\ \fIfilename\fP
Input file name (standard input by default)
.TP
+\fB\-k\fP
+Enable local fetching
+.TP
\fB\-l\fP
Lock components in advance
.TP
diff --git a/doc/man/asn2gb.1 b/doc/man/asn2gb.1
index 5e2b2c58..a7357724 100644
--- a/doc/man/asn2gb.1
+++ b/doc/man/asn2gb.1
@@ -1,4 +1,4 @@
-.TH ASN2GB 1 2006-05-29 NCBI "NCBI Tools User's Manual"
+.TH ASN2GB 1 2007-10-19 NCBI "NCBI Tools User's Manual"
.SH NAME
asn2gb \- convert ASN.1 biological data to a GenBank-style flat format
.SH SYNOPSIS
@@ -206,10 +206,14 @@ oldasn2gb/newasn2gb
Custom flags (all default to off):
.RS
.PD 0
-.IP 2
-Hide most imported features
.IP 4
-Hide SNP features
+Hide features
+.IP 1792
+Hide references
+.IP 8192
+Hide sources
+.IP 262144
+Hide translations
.PD
.RE
.\" .TP
@@ -227,4 +231,5 @@ The National Center for Biotechnology Information.
.BR asn2fsa (1),
.BR asn2xml (1),
.BR asndhuff (1),
-.BR insdseqget (1).
+.BR insdseqget (1),
+asn2gb.txt.
diff --git a/doc/man/asn2idx.1 b/doc/man/asn2idx.1
index 5bf2d04e..87a57839 100644
--- a/doc/man/asn2idx.1
+++ b/doc/man/asn2idx.1
@@ -1,12 +1,14 @@
-.TH ASN2IDX 1 2005-05-16 NCBI "NCBI Tools User's Manual"
+.TH ASN2IDX 1 2007-10-19 NCBI "NCBI Tools User's Manual"
.SH NAME
asn2idx \- index ASN.1 Bioseq-sets for fast access to individual sequences
.SH SYNOPSIS
.B asn2idx
[\|\fB\-\fP\|]
[\|\fB\-b\fP\|]
-[\|\fB\-d\fP\ \fIstr\fP\|]
-\fB\-p\fP\ \fIstr\fP
+[\|\fB\-d\fP\ \fIdir\fP\|]
+[\|\fB\-f\fP\ \fIfilter\fP\|]
+\fB\-p\fP\ \fIpath\fP
+[\|\fB\-r\fP\ \fIpath\fP\|]
[\|\fB\-t\fP\|]
[\|\fB\-x\fP\ \fIstr\fP\|]
.SH DESCRIPTION
@@ -23,17 +25,23 @@ Print usage message
\fB\-b\fP
Bioseq-sets are Binary
.TP
-\fB\-d\fP\ \fIstr\fP
+\fB\-d\fP\ \fIdir\fP
Required Subdirectory
.TP
-\fB\-p\fP\ \fIstr\fP
+\fB\-f\fP\ \fIfilter\fP
+Filter (default = \fBgbcon,gbest,gbgss,gbsts\fP)
+.TP
+\fB\-p\fP\ \fIpath\fP
Path to Files
.TP
+\fB\-p\fP\ \fIpath\fP
+Path for Results
+.TP
\fB\-t\fP
Recurse
.TP
\fB\-x\fP\ \fIstr\fP
-File Selection Substring (default = .aso)
+File Selection Substring (default = \fB.aso\fP)
.SH AUTHOR
The National Center for Biotechnology Information.
.SH SEE ALSO
diff --git a/doc/man/asnval.1 b/doc/man/asnval.1
index c53ded12..29673f03 100644
--- a/doc/man/asnval.1
+++ b/doc/man/asnval.1
@@ -1,4 +1,4 @@
-.TH ASNVAL 1 2006-05-29 NCBI "NCBI Tools User's Manual"
+.TH ASNVAL 1 2007-10-19 NCBI "NCBI Tools User's Manual"
.SH NAME
asnval \- validate ASN.1 biological sequence records
.SH SYNOPSIS
@@ -11,16 +11,19 @@ asnval \- validate ASN.1 biological sequence records
[\|\fB\-J\fP\|]
[\|\fB\-L\fP\ \fIfilename\fP\|]
[\|\fB\-M\fP\|]
+[\|\fB\-N\fP\ \fIflags\fP\|]
[\|\fB\-P\fP\ \fIN\fP\|]
[\|\fB\-Q\fP\ \fIN\fP\|]
[\|\fB\-R\fP\ \fIN\fP\|]
[\|\fB\-S\fP\ \fIN\fP\|]
[\|\fB\-T\fP\|]
+[\|\fB\-X\fP\|]
[\|\fB\-Y\fP\|]
[\|\fB\-Z\fP\|]
[\|\fB\-a\fP\ \fItype\fP\|]
[\|\fB\-b\fP\|]
[\|\fB\-c\fP\|]
+[\|\fB\-d\fP\ \fIpath\fP\|]
[\|\fB\-e\fP\|]
[\|\fB\-i\fP\ \fIfilename\fP\|]
[\|\fB\-k\fP\|]
@@ -61,6 +64,21 @@ Log File
\fB\-M\fP
Match locus_tag against General ID
.TP
+\fB\-N\fP\ \fIflags\fP
+Latitude-longitude / country flags
+.RS
+.PD 0
+.IP 0
+none
+.IP 1
+test state/province
+.IP 2
+ignore water exception
+.IP 3
+both of the above
+.PD
+.RE
+.TP
\fB\-P\fP\ \fIN\fP
Highest severity for error to show:
.RS
@@ -90,6 +108,9 @@ Skip count
\fB\-T\fP
Use Threads
.TP
+\fB\-X\fP
+Exon splice check
+.TP
\fB\-Y\fP
Check against old IDs
.TP
@@ -123,6 +144,9 @@ Batch file is Binary
\fB\-c\fP
Batch file is Compressed
.TP
+\fB\-d\fP\ \fIpath\fP
+Path to Indexed Binary ASN.1 Data
+.TP
\fB\-e\fP
Ignore transcription/translation Exceptions
.TP
@@ -139,7 +163,7 @@ Lock components in advance
Single output file
.TP
\fB\-p\fP\ \fIpath\fP
-Path to ASN.1 Files [String]
+Path to ASN.1 Files
.TP
\fB\-r\fP
Remote Fetching from ID
@@ -155,4 +179,5 @@ File selection substring (\fB.ent\fP by default)
.SH AUTHOR
The National Center for Biotechnology Information.
.SH SEE ALSO
+.BR cleanasn (1),
.BR sequin (1).
diff --git a/doc/man/blast.1 b/doc/man/blast.1
index 9f787531..e6205e04 100644
--- a/doc/man/blast.1
+++ b/doc/man/blast.1
@@ -1,4 +1,4 @@
-.TH BLAST 1 2006-05-29 NCBI "NCBI Tools User's Manual"
+.TH BLAST 1 2007-10-19 NCBI "NCBI Tools User's Manual"
.SH NAME
bl2seq, blast, blastall, blastall_old, blastcl3, blastpgp, impala, megablast, rpsblast, seedtop \- Basic Local Alignment Search Tool
.SH SYNOPSIS
@@ -61,8 +61,8 @@ bl2seq, blast, blastall, blastall_old, blastcl3, blastpgp, impala, megablast, rp
[\|\fB\-c\fP\|]
[\|\fB\-d\fP\ \fIstr\fP\|]
[\|\fB\-e\fP\ \fIX\fP\|]
-[\|\fB\-f\fP\ \fIN\fP\|]
-[\|\fB\-g\fP\ \fIN\fP\|]
+[\|\fB\-f\fP\ \fIX\fP\|]
+[\|\fB\-g\fP\|]
[\|\fB\-h\fP\ \fIN\fP\|]
[\|\fB\-i\fP\ \fIfilename\fP\|]
[\|\fB\-j\fP\ \fIfilename\fP\|]
@@ -111,7 +111,7 @@ bl2seq, blast, blastall, blastall_old, blastcl3, blastpgp, impala, megablast, rp
[\|\fB\-b\fP\ \fIN\fP\|]
[\|\fB\-d\fP\ \fIstr\fP\|]
[\|\fB\-e\fP\ \fIX\fP\|]
-[\|\fB\-f\fP\ \fIN\fP\|]
+[\|\fB\-f\fP\ \fIX\fP\|]
[\|\fB\-g\ F\fP\|]
[\|\fB\-i\fP\ \fIfilename\fP\|]
[\|\fB\-l\fP\ \fIstr\fP\|]
@@ -157,7 +157,7 @@ bl2seq, blast, blastall, blastall_old, blastcl3, blastpgp, impala, megablast, rp
[\|\fB\-b\fP\ \fIN\fP\|]
[\|\fB\-d\fP\ \fIstr\fP\|]
[\|\fB\-e\fP\ \fIX\fP\|]
-[\|\fB\-f\fP\ \fIN\fP\|]
+[\|\fB\-f\fP\ \fIX\fP\|]
[\|\fB\-g\ F\fP\|]
[\|\fB\-i\fP\ \fIfilename\fP\|]
[\|\fB\-l\fP\ \fIstr\fP\|]
@@ -201,7 +201,7 @@ bl2seq, blast, blastall, blastall_old, blastcl3, blastpgp, impala, megablast, rp
[\|\fB\-b\fP\ \fIN\fP\|]
[\|\fB\-d\fP\ \fIstr\fP\|]
[\|\fB\-e\fP\ \fIX\fP\|]
-[\|\fB\-f\fP\ \fIN\fP\|]
+[\|\fB\-f\fP\ \fIX\fP\|]
[\|\fB\-g\ F\fP\|]
[\|\fB\-i\fP\ \fIfilename\fP\|]
[\|\fB\-m\fP\ \fIN\fP\|]
@@ -314,6 +314,7 @@ bl2seq, blast, blastall, blastall_old, blastcl3, blastpgp, impala, megablast, rp
[\|\fB\-V\fP\|]
[\|\fB\-W\fP\ \fIN\fP\|]
[\|\fB\-X\fP\ \fIN\fP\|]
+[\|\fB\-Y\fP\ \fIX\fP\|]
[\|\fB\-Z\fP\ \fIN\fP\|]
[\|\fB\-a\fP\ \fIN\fP\|]
[\|\fB\-b\fP\ \fIN\fP\|]
@@ -346,7 +347,6 @@ bl2seq, blast, blastall, blastall_old, blastcl3, blastpgp, impala, megablast, rp
[\|\fB\-P\fP\ \fIN\fP\|]
[\|\fB\-T\fP\|]
[\|\fB\-U\fP\|]
-[\|\fB\-V\fP\|]
[\|\fB\-X\fP\ \fIN\fP\|]
[\|\fB\-Y\fP\ \fIX\fP\|]
[\|\fB\-Z\fP\ \fIN\fP\|]
@@ -378,6 +378,7 @@ bl2seq, blast, blastall, blastall_old, blastcl3, blastpgp, impala, megablast, rp
[\|\fB\-X\fP\ \fIN\fP\|]
[\|\fB\-d\fP\ \fIstr\fP\|]
[\|\fB\-e\fP\ \fIX\fP\|]
+[\|\fB\-f\fP\|]
[\|\fB\-i\fP\ \fIfilename\fP\|]
[\|\fB\-k\fP\ \fIfilename\fP\|]
[\|\fB\-o\fP\ \fIfilename\fP\|]
@@ -481,20 +482,23 @@ Print usage message
Input sequences in the form of accession.version
.TP
\fB\-A\fP\ \fIN\fP (blastall, blastall_old, blastcl3, blastpgp, megablast)
-Multiple Hits window size (default is 40 for blastpgp and 0 for other
-commands, but blastall, blastall_old, and blastcl3 interpret 0 as 40
-for all programs but blastn and megablast)
+Multiple Hits window size; generally defaults to 0 (for single-hit
+extensions), but defaults to 40 when using discontiguous templates.
.TP
\fB\-B\fP\ \fIN\fP (blast)
-Produce on-the-fly tabular output:
+Produce on-the-fly output:
.RS
.PD 0
.IP 0
none (default)
.IP 1
-just offsets and quality values
+table of offsets and quality values
.IP 2
add sequence data
+.IP 3
+text ASN.1
+.IP 4
+binary ASN.1
.PD
.RE
.TP
@@ -505,11 +509,11 @@ Number of concatenated queries, in blastn or tblastn mode
Input Alignment File for PSI-BLAST Restart
.TP
\fB\-C\fP\ \fIX\fP (blast, blastall, blastall_old, blastcl3)
-Use composition-based statistics for tblastn:
+Use composition-based statistics for blastp or tblastn:
.RS
.PD 0
.IP "D or d"
-Default (equivalent to F)
+Default (equivalent to \fBT\fP)
.IP "0, F, or f"
No composition-based statistics
.IP "1, T, or t"
@@ -522,6 +526,12 @@ Composition-based score adjustment as in \fIBioinformatics\fP 21:902-911,
2005, unconditionally
.PD
.RE
+.RS
+When enabling statistics in blastall, blastall_old, or blastcl3 (\fIi.e.\fP,
+not blast), appending \fBu\fP (case-insensitive) to the mode enables
+use of unified p-values combining alignment and compositional p-values
+in round 1 only.
+.RE
.TP
\fB\-C\fP\ \fIfilename\fP (blastpgp)
Output File for PSI-BLAST Checkpointing
@@ -556,6 +566,10 @@ all ungapped segments endpoints
traditional BLAST output (default)
.IP 3
tab-delimited one line format
+.IP 4
+incremental text ASN.1
+.IP 5
+incremental binary ASN.1
.PD
.RE
.TP
@@ -742,7 +756,7 @@ two simultaneous
rpsblast)
Use lower case filtering for the query sequence
.TP
-\fB\-V\fP (bl2seq, blastall, megablast, rpsblast)
+\fB\-V\fP (bl2seq, blastall, megablast)
Force use of legacy engine
.TP
\fB\-V\fP (blast)
@@ -765,7 +779,7 @@ commands vary with "program": 30 for blastn, 20 for megablast, 0 for
tblastx, and 15 for everything else.)
.TP
\fB\-Y\fP\ \fIX\fP (bl2seq, blast, blastall, blastall_old, blastcl3,
-blastpgp, rpsblast)
+blastpgp, megablast, rpsblast)
Effective length of the search space (use zero for the real size)
.TP
\fB\-Z\fP\ \fIN\fP (blast, blastall, blastall_old, blastcl3, blastpgp,
@@ -775,7 +789,7 @@ bits (default is 50 for blastn and megablast, 0 for tblastx, 25 for
others)
.TP
\fB\-a\fP\ \fIfilename\fP (bl2seq)
-Write SeqAnnot output to \fIfilename\fP
+Write text ASN.1 output to \fIfilename\fP
.TP
\fB\-a\fP\ \fIN\fP (blast, blastall, blastall_old, blastcl3, blastpgp,
impala, megablast, rpsblast)
@@ -805,7 +819,7 @@ RPS BLAST Database
\fB\-e\fP\ \fIX\fP
Expectation value (E) (default = 10.0)
.TP
-\fB\-f\fP\ \fIN\fP (blastall, blastall_old, blastcl3)
+\fB\-f\fP\ \fIX\fP (blast, blastall, blastall_old, blastcl3)
Threshold for extending hits, default if zero: 0 for blastn and
megablast, 11 for blastp, 12 for blastx, and 13 for tblasn and
tblastx.
@@ -816,27 +830,18 @@ Threshold for extending hits (default 11)
\fB\-f\fP (megablast)
Show full IDs in the output (default - only GIs or accessions)
.TP
+\fB\-f\fP (seedtop)
+Force searching for patterns even if they are too likely
+.TP
\fB\-g\ F\fP (bl2seq, blastall, blastall_old, blastcl3)
Do not perform gapped alignment (N/A for tblastx)
.TP
-\fB\-g\fP\ \fIN\fP (blast)
-Use greedy algorithm for gapped extensions:
-.RS
-.PD 0
-.IP 0
-no (default)
-.IP 1
-one-step
-.IP 2
-two-step
-.IP 3
-two-step with ungapped
-.PD
-.RE
+\fB\-g\fP (blast)
+Use greedy algorithm for gapped extensions
.TP
\fB\-g\ F\fP (megablast)
-Generate words for every fourth base of the database (only relevant
-for discontiguous words)
+Make discontiguous megablast generate words for every base of the
+database (mandatory with the current BLAST engine)
.TP
\fB\-h\fP\ \fIN\fP (blast)
Frame shift penalty for out-of-frame gapping (blastx, tblastn only;
@@ -963,8 +968,7 @@ Reward for a nucleotide match (blastn only) (default = 10 for seedtop,
-10 for everything else)
.TP
\fB\-s\fP (blast)
-Generate words for every base of the database (default is every 4th;
-may only be used with discontiguous words)
+No-op (formerly requested generating words for every base of the database)
.TP
\fB\-s\fP (blastall, blastall_old, blastcl3, blastpgp)
Compute locally optimal Smith-Waterman alignments.
diff --git a/doc/man/cleanasn.1 b/doc/man/cleanasn.1
index a6a6e2f6..b0ccaae9 100644
--- a/doc/man/cleanasn.1
+++ b/doc/man/cleanasn.1
@@ -1,54 +1,59 @@
-.TH CLEANASN 1 2006-05-29 NCBI "NCBI Tools User's Manual"
+.TH CLEANASN 1 2007-10-19 NCBI "NCBI Tools User's Manual"
.SH NAME
-cleanasn \- clean up irregularities in NCBI ASN.1 Seq-entry objects
+cleanasn \- clean up irregularities in NCBI ASN.1 objects
.SH SYNOPSIS
.B cleanasn
[\|\fB\-\fP\|]
+[\|\fB\-F\fP\ \fIstr\fP\|]
+[\|\fB\-K\fP\ \fIstr\fP\|]
+[\|\fB\-N\fP\ \fIstr\fP\|]
[\|\fB\-R\fP\|]
-[\|\fB\-c\fP\ \fIstr\fP\|]
+[\|\fB\-T\fP\|]
+[\|\fB\-a\fP\ \fIstr\fP\|]
+[\|\fB\-b\fP\|]
+[\|\fB\-c\fP\|]
[\|\fB\-f\fP\ \fIstr\fP\|]
-[\|\fB\-l\fP\ \fIstr\fP\|]
-\fB\-p\fP\ \fIpath\fP
+[\|\fB\-i\fP\ \fIfilename\fP\|]
+[\|\fB\-l\fP\ \fIfilename\fP\|]
+[\|\fB\-o\fP\ \fIfilename\fP\|]
+[\|\fB\-p\fP\ \fIpath\fP\|]
[\|\fB\-r\fP\ \fIpath\fP\|]
-[\|\fB\-t\fP\|]
+[\|\fB\-x\fP\ \fIext\fP\|]
.SH DESCRIPTION
\fBcleanasn\fP is a utility program to clean up irregularities in NCBI
-ASN.1 Seq-entry or Seq-submit objects.
+ASN.1 objects.
.SH OPTIONS
A summary of options is included below.
.TP
\fB\-\fP
Print usage message
.TP
-\fB\-R\fP
-Enable remote fetching from NCBI's ID database
-.TP
-\fB\-c\fP\ \fIstr\fP
-Perform general clean-ups, per the flags in \fIstr\fP:
+\fB\-F\fP\ \fIstr\fP
+Clean up features, per the flags in str:
.RS
.PD 0
-.IP b
-BasicSeqEntryCleanup
-.IP s
-SeriousSeqEntryCleanup
+.IP u
+Remove User-objects
+.IP d
+Remove db_xrefs
+.IP r
+Remove redundant gene xrefs
.PD
.RE
.TP
-\fB\-f\fP\ \fIstr\fP
-Remove extraneous features, per the flags in \fIstr\fP:
+\fB\-K\fP\ \fIstr\fP
+Perform a general cleanup, per the flags in str:
.RS
.PD 0
-.IP u
-Remove User objects
-.IP d
-Remove Database cross-references
-.IP r
-Remove Redundant gene cross-references
+.IP b
+BasicSeqEntryCleanup
+.IP s
+SeriousSeqEntryCleanup
.PD
.RE
.TP
-\fB\-l\fP\ \fIstr\fP
-Link related features, per the flags in \fIstr\fP:
+\fB\-N\fP\ \fIstr\fP
+Clean up links, per the flags in str:
.RS
.PD 0
.IP o
@@ -57,16 +62,64 @@ LinkCDSmRNAbyOverlap
LinkCDSmRNAbyProduct
.IP r
ReassignFeatureIDs
+.IP c
+ClearFeatureIDs
.PD
.RE
.TP
+\fB\-R\fP
+Remote fetching from ID (NCBI sequence databases)
+.TP
+\fB\-T\fP
+Taxonomy Lookup
+.TP
+\fB\-a\fP\ \fIstr\fP
+ASN.1 type
+.RS
+.PD 0
+.IP a
+Any (default)
+.IP e
+Seq-entry
+.IP b
+Bioseq
+.IP s
+Bioseq-set
+.IP m
+Seq-submit
+.IP t
+Batch Processing [String]
+.PD
+.RE
+.TP
+\fB\-b\fP
+Input ASN.1 is Binary
+.TP
+\fB\-c\fP
+Input ASN.1 is Compressed
+.TP
+\fB\-f\fP\ \fIstr\fP
+Substring filter
+.TP
+\fB\-i\fP\ \fIfilename\fP
+Single input file (defaults to stdin)
+.TP
+\fB\-l\fP\ \fIfilename\fP
+Log file
+.TP
+\fB\-o\fP\ \fIfilename\fP
+Single output file (defaults to stdout)
+.TP
\fB\-p\fP\ \fIpath\fP
-Path to input files
+Process all matching files in \fIpath\fP
.TP
\fB\-r\fP\ \fIpath\fP
-Path for Results (changes are otherwise made in place)
+Path for results
.TP
-\fB\-t\fP
-Enable Taxonomy lookup
+\fB\-x\fP\ \fIext\fP
+File selection suffix for use with \fB\-p\fP (defaults to \fB.ent\fP)
.SH AUTHOR
The National Center for Biotechnology Information.
+.SH SEE ALSO
+asnval (1),
+sequin (1).
diff --git a/doc/man/entrcmd.1 b/doc/man/entrcmd.1
deleted file mode 100644
index 7bead9ca..00000000
--- a/doc/man/entrcmd.1
+++ /dev/null
@@ -1,102 +0,0 @@
-.TH ENTRCMD 1 2001-10-03 NCBI "NCBI Tools User's Manual"
-.SH NAME
-entrcmd \- non-interactive command line interface for Entrez
-.SH SYNOPSIS
-.B entrcmd
-[\|\fB\-\fP\|]
-[\|\fB\-c\fP\|]
-[\|\fB\-d\fP\ \fIstr\fP\|]
-[\|\fB\-e\fP\ \fIstr\fP\|]
-[\|\fB\-f\fP\|]
-[\|\fB\-g\ F\fP\|]
-[\|\fB\-h\fP\|]
-[\|\fB\-i\fP\ \fIstr\fP\|]
-[\|\fB\-l\fP\ \fIstr\fP\|]
-[\|\fB\-n\fP\ \fIfilename\fP\|]
-[\|\fB\-o\fP\ \fIfilename\fP\|]
-\fB\-p\fP\ \fIstr\fP
-[\|\fB\-r\fP\|]
-[\|\fB\-s\fP\|]
-[\|\fB\-t\fP\ \fIstr\fP\|]
-[\|\fB\-u\fP\ \fIstr\fP\|]
-[\|\fB\-w\fP\ \fIstr\fP\|]
-[\|\fB\-x\fP\ \fIstr\fP\|]
-[\|\fB\-y\fP\ \fIN\fP\|]
-.SH DESCRIPTION
-\fBentrcmd\fP is a non-interactive command-line interface which allows
-a user to perform a series of neighboring and output operations, based
-upon an initial set of UIDs or a boolean expression which describes a
-set of UIDs. Alternatively, it can be used to display an
-alphabetically sorted list of terms near an initial term.
-.SH OPTIONS
-A summary of options is included below.
-.TP
-\fB\-\fP
-Print usage message
-.TP
-\fB\-c\fP
-\&'Check' WWW output Forms
-.TP
-\fB\-d\fP\ \fIstr\fP
-Initial database (default = m)
-.TP
-\fB\-e\fP\ \fIstr\fP
-Boolean expression
-.TP
-\fB\-f\fP
-For WWW output, use Forms
-.TP
-\fB\-g\ F\fP
-Do not use WWW-style encoding for special input characters
-.TP
-\fB\-h\fP
-Print detailed help. Requires, but ignores, \fB\-p\fP\ \fIstr\fP
-.TP
-\fB\-i\fP\ \fIstr\fP
-Comma-delimited list of files to import for named UID list
-.TP
-\fB\-l\fP\ \fIstr\fP
-Taxonomy lookup string
-.TP
-\fB\-n\fP\ \fIfilename\fP
-On-the-fly neighboring from \fIfilename\fP
-.TP
-\fB\-o\fP\ \fIfilename\fP
-Output file (default = stdout)
-.TP
-\fB\-p\fP\ \fIstr\fP
-Program of commands
-.TP
-\fB\-r\fP
-Get sequences from ID Repository
-.TP
-\fB\-s\fP
-Display status report
-.TP
-\fB\-t\fP\ \fIstr\fP
-Produce a list of terms
-.TP
-\fB\-u\fP\ \fIstr\fP
-Comma-delimited list of UIDs
-.TP
-\fB\-w\fP\ \fIstr\fP
-Produce WWW/HTML formatted output, using \fIstr\fP (/htbin is
-recommended) as the directory prefix for linked hypertext items.
-.TP
-\fB\-x\fP\ \fIstr\fP
-Name of export file for named UID list
-.TP
-\fB\-y\fP\ \fIN\fP
-Complexity:
-.RS
-.PD 0
-.IP 1
-bioseq only
-.IP 2
-bioseq set
-.IP 3
-nuc-prot set (default)
-.PD
-.RE
-.SH AUTHOR
-The National Center for Biotechnology Information.
diff --git a/doc/man/entrez2.1 b/doc/man/entrez2.1
index 4a6e2c09..91194df4 100644
--- a/doc/man/entrez2.1
+++ b/doc/man/entrez2.1
@@ -1,4 +1,4 @@
-.TH ENTREZ2 1 2001-11-21 NCBI "NCBI Tools User's Manual"
+.TH ENTREZ2 1 2007-10-19 NCBI "NCBI Tools User's Manual"
.SH NAME
entrez2 \- a graphical client for the NCBI Entrez retrieval system
.SH SYNOPSIS
@@ -14,6 +14,4 @@ None.
The National Center for Biotechnology Information.
.SH SEE ALSO
.ad l
-.BR Nentrez (1),
-.BR netentcf (1),
<http://www.ncbi.nlm.nih.gov/Entrez/Network/nentrez.overview.html>
diff --git a/doc/man/formatdb.1 b/doc/man/formatdb.1
index 4c5c04bd..23e4e233 100644
--- a/doc/man/formatdb.1
+++ b/doc/man/formatdb.1
@@ -1,4 +1,4 @@
-.TH FORMATDB 1 2005-11-04 NCBI "NCBI Tools User's Manual"
+.TH FORMATDB 1 2007-10-19 NCBI "NCBI Tools User's Manual"
.SH NAME
formatdb \- format protein or nucleotide databases for BLAST
.SH SYNOPSIS
@@ -99,9 +99,9 @@ Title for database file [String]
.TP
\fB\-v\fP\ \fIN\fP
Break up large FASTA files into 'volumes' of size \fIN\fP million
-letters. As part of the creation of a volume, \fBformatdb\fP writes a
-new type of BLAST database file, called an alias file, with the
-extension 'nal' or 'pal'.
+letters (4000 by default). As part of the creation of a volume,
+\fBformatdb\fP writes a new type of BLAST database file, called an
+alias file, with the extension 'nal' or 'pal'.
.SH AUTHOR
The National Center for Biotechnology Information.
.SH SEE ALSO
diff --git a/doc/man/getfeat.1 b/doc/man/getfeat.1
deleted file mode 100644
index 8f32b4b3..00000000
--- a/doc/man/getfeat.1
+++ /dev/null
@@ -1,64 +0,0 @@
-.TH GETFEAT 1 2002-08-23 NCBI "NCBI Tools User's Manual"
-.SH NAME
-getfeat \- extract information about sequences' coding regions
-.SH SYNOPSIS
-.B getfeat
-[\|\fB\-\fP\|]
-[\|\fB\-a\fP\|]
-[\|\fB\-b\fP\|]
-[\|\fB\-g\fP\ \fIN\fP\|]
-[\|\fB\-i\fP\ \fIstr\fP\|]
-[\|\fB\-l\ F\fP\|]
-[\|\fB\-o\fP\ \fIfilename\fP\|]
-[\|\fB\-p\fP\|]
-[\|\fB\-r\fP\ \fIN\fP\|]
-[\|\fB\-s\ F\fP\|]
-.SH DESCRIPTION
-\fBgetfeat\fP retrieves biological sequences over the network and
-extracts information about their coding regions.
-.SH OPTIONS
-A summary of options is included below.
-.TP
-\fB\-\fP
-Print usage message
-.TP
-\fB\-a\fP
-ID is GenBank accession
-.TP
-\fB\-b\fP
-ID is PIR accession
-.TP
-\fB\-g\fP\ \fIN\fP
-GenInfo Import ID
-.TP
-\fB\-i\fP\ \fIstr\fP
-Input string id (default = \fBANANIFDR1\fP)
-.TP
-\fB\-l\ F\fP
-ID is NOT GenBank locus
-.TP
-\fB\-o\fP\ \fIfilename\fP
-Output File Name (default = \fBgetfeat.out\fP)
-.TP
-\fB\-p\fP
-ID is PIR locus
-.TP
-\fB\-r\fP\ \fIN\fP
-Return type:
-.RS
-.PD 0
-.IP 1
-Bioseq
-.IP 2
-Seg-set
-.IP 3
-Nuc-prot (default)
-.IP 4
-Pub-set
-.PD
-.RE
-.TP
-\fB\-s\ F\fP
-Do not output a Seq-entry.
-.SH AUTHOR
-The National Center for Biotechnology Information.
diff --git a/doc/man/idfetch.1 b/doc/man/idfetch.1
index 188deff1..4d378114 100644
--- a/doc/man/idfetch.1
+++ b/doc/man/idfetch.1
@@ -1,4 +1,4 @@
-.TH IDFETCH 1 2005-06-24 NCBI "NCBI Tools User's Manual"
+.TH IDFETCH 1 2007-10-19 NCBI "NCBI Tools User's Manual"
.SH NAME
idfetch \- retrieve biological data from the NCBI ID1 server
.SH SYNOPSIS
@@ -30,7 +30,7 @@ Print usage message
.TP
\fB\-F\fP\ \fIstr\fP
Add the specified feature types (comma-delimited); allowed values are
-CDD, SNP, SNP_graph, MGC, HPRD, and STS.
+CDD, SNP, SNP_graph, MGC, HPRD, STS, tRNA, and microRNA.
.TP
\fB\-G\fP\ \fIfilename\fP
File with list of GIs, (versioned) accessions, FASTA SeqID's to dump
diff --git a/doc/man/netentcf.1 b/doc/man/netentcf.1
deleted file mode 100644
index bc7e23d3..00000000
--- a/doc/man/netentcf.1
+++ /dev/null
@@ -1,16 +0,0 @@
-.TH NETENTCF 1 2001-10-05 NCBI "NCBI Tools User's Manual"
-.SH NAME
-netentcf \- change Entrez network configuration
-.SH SYNOPSIS
-.B netentcf
-.SH DESCRIPTION
-\fBnetentcf\fP lets you configure Network Entrez's firewall and proxy
-settings.
-.SH OPTIONS
-None.
-.SH AUTHOR
-The National Center for Biotechnology Information.
-.SH SEE ALSO
-.ad l
-.BR Nentrez (1),
-<http://www.ncbi.nlm.nih.gov/Entrez/Network/nentrez.overview.html>
diff --git a/doc/man/nps2gps.1 b/doc/man/nps2gps.1
index 5540b3d3..eaf43926 100644
--- a/doc/man/nps2gps.1
+++ b/doc/man/nps2gps.1
@@ -1,16 +1,17 @@
-.TH NPS2GPS 1 2005-11-04 NCBI "NCBI Tools User's Manual"
+.TH NPS2GPS 1 2007-10-19 NCBI "NCBI Tools User's Manual"
.SH NAME
nps2gps \- convert nucleotide-protein sets to ASN.1 genomic product sets
.SH SYNOPSIS
.B nps2gps
[\|\fB\-\fP\|]
+[\|\fB\-F\fP\|]
[\|\fB\-L\fP\|]
[\|\fB\-R\fP\|]
[\|\fB\-f\fP\ \fIstr\fP\|]
[\|\fB\-i\fP\ \fIfilename\fP\|]
[\|\fB\-o\fP\ \fIfilename\fP\|]
-[\|\fB\-p\fP\ \fIstr\fP\|]
-[\|\fB\-r\fP\ \fIstr\fP\|]
+[\|\fB\-p\fP\ \fIpath\fP\|]
+[\|\fB\-r\fP\ \fIpath\fP\|]
[\|\fB\-x\fP\ \fIstr\fP\|]
.SH DESCRIPTION
\fBnps2gps\fP converts NCBI Bioseq-sets from simple nucleotide-protein
@@ -22,6 +23,9 @@ A summary of options is included below.
\fB\-\fP
Print usage message
.TP
+\fB\-F\fP
+Map by Feature ID
+.TP
\fB\-L\fP
Lock components in advance
.TP
@@ -37,10 +41,10 @@ Single input file (default = stdin)
\fB\-o\fP\ \fIfilename\fP
Single output file (default = stdout)
.TP
-\fB\-p\fP\ \fIstr\fP
+\fB\-p\fP\ \fIpath\fP
Path to files for batch conversion
.TP
-\fB\-r\fP\ \fIstr\fP
+\fB\-r\fP\ \fIpath\fP
Path for results of batch conversion
.TP
\fB\-x\fP\ \fIstr\fP
diff --git a/doc/man/tbl2asn.1 b/doc/man/tbl2asn.1
index 0ca7ba6f..e1b984c6 100644
--- a/doc/man/tbl2asn.1
+++ b/doc/man/tbl2asn.1
@@ -1,4 +1,4 @@
-.TH TBL2ASN 1 2006-05-29 NCBI "NCBI Tools User's Manual"
+.TH TBL2ASN 1 2007-10-19 NCBI "NCBI Tools User's Manual"
.SH NAME
tbl2asn \- prepare a GenBank submission using an ASCII feature table
.SH SYNOPSIS
@@ -6,18 +6,22 @@ tbl2asn \- prepare a GenBank submission using an ASCII feature table
[\|\fB\-\fP\|]
[\|\fB\-B\fP\ \fIstr\fP\|]
[\|\fB\-C\fP\ \fIstr\fP\|]
+[\|\fB\-D\fP\ \fIfilename\fP\|]
[\|\fB\-E\fP\ \fIstr\fP\|]
-[\|\fB\-F\fP\|]
+[\|\fB\-F\fP\ \fIstr\fP|]
[\|\fB\-G\fP\ \fIstr\fP\|]
[\|\fB\-H\fP\|]
+[\|\fB\-K\fP\|]
[\|\fB\-L\fP\|]
[\|\fB\-M\fP\ \fIstr\fP\|]
+[\|\fB\-O\fP\|]
[\|\fB\-P\fP\|]
[\|\fB\-Q\fP\|]
[\|\fB\-R\fP\|]
[\|\fB\-S\fP\|]
[\|\fB\-T\fP\|]
[\|\fB\-U\fP\|]
+[\|\fB\-W\fP\|]
[\|\fB\-X\fP\ \fIstr\fP\|]
[\|\fB\-Y\fP\ \fIfilename\fP\|]
[\|\fB\-a\fP\ \fIstr\fP\|]
@@ -25,6 +29,7 @@ tbl2asn \- prepare a GenBank submission using an ASCII feature table
[\|\fB\-c\fP\|]
[\|\fB\-d\fP\|]
[\|\fB\-e\fP\|]
+[\|\fB\-f\fP\ \fIfilename\fP\|]
[\|\fB\-g\fP\|]
[\|\fB\-h\fP\|]
[\|\fB\-i\fP\ \fIfilename\fP\|]
@@ -64,11 +69,14 @@ Alignment Beginning gap characters
\fB\-C\fP\ \fIstr\fP
Genome Center tag
.TP
+\fB\-D\fP\ \fIfilename\fP
+Descriptors file
+.TP
\fB\-E\fP\ \fIstr\fP
Alignment End gap characters
.TP
\fB\-F\fP
-Feature ID links
+Feature ID links (\fBo\fP by Overlap, \fBp\fP by Product)
.TP
\fB\-G\fP\ \fIstr\fP
Alignment middle Gap characters
@@ -76,12 +84,18 @@ Alignment middle Gap characters
\fB\-H\fP
Implicit gaps
.TP
+\fB\-K\fP
+Safe Bioseq-set
+.TP
\fB\-L\fP
Force Local protein_id/transcript_id
.TP
\fB\-M\fP\ \fIstr\fP
Alignment Match characters
.TP
+\fB\-O\fP
+Allow run-on ORFs
+.TP
\fB\-P\fP
Alignment is Proteins
.TP
@@ -100,6 +114,9 @@ Remote Taxonomy lookup
\fB\-U\fP
Remove Unnecessary gene xref
.TP
+\fB\-W\fP
+Log progress
+.TP
\fB\-X\fP\ \fIstr\fP
Alignment missing characters
.TP
@@ -121,6 +138,9 @@ Read FASTAs as Delta
\fB\-e\fP
Read PHRAP/ACE format
.TP
+\fB\-f\fP\ \fIfilename\fP
+Single table file
+.TP
\fB\-g\fP
Input is a genomic product set
.TP
diff --git a/doc/sdk.doc b/doc/sdk.doc
index 602a2efe..a5bfba61 100644
--- a/doc/sdk.doc
+++ b/doc/sdk.doc
Binary files differ
diff --git a/doc/tbl2asn.txt b/doc/tbl2asn.txt
index 6b7bb4c0..7f4fa2d4 100755
--- a/doc/tbl2asn.txt
+++ b/doc/tbl2asn.txt
@@ -62,16 +62,16 @@ that has a .tbl suffix, and then generate a .sqn file.
The -t command-line argument specifies the template file.
Normally a single FASTA sequence per .fsa file is expected. If there are
-multiple sequences, only the first is processed, unless one of two other
-flags is given. These are discussed below.
+multiple sequences, only the first is processed, unless one of two -a flag
+variants are given. These are discussed below.
-The -s flag tells tbl2asn to package the multiple FASTA components as a set
+The -a s flag tells tbl2asn to package the multiple FASTA components as a set
of unrelated sequences. This accommodates users who create a single file
-instead of one file per sequence. A single FASTA component can now have gap
+instead of one file per sequence. A single FASTA component can now have gap
indications (e.g., >?unk100) on a separate line as long as it is followed
immediately by more sequence lines, with no > and a mock identifier.
-The -d flag tells the program to make a delta sequence out of the multiple
+The -a d flag tells the program to make a delta sequence out of the multiple
components. This can be used for HTGS submissions where the sequence of
the BAC/PAC clone has not been completely determined. By convention, gaps
of 100 base pairs should be inserted in between the actual sequence
@@ -89,20 +89,21 @@ transcripts, and all proteins will be entered into the database and given
accessions. Note, however, that -g cannot be used for records submitted to
GenBank. It is only suitable for records going into RefSeq.
-If a feature table is not given, the -c flag tells tbl2asn to annotate the
-longest Open Reading Frame (ORF) on each record. The -m flag allows
+If a feature table is not given, the -k c flag tells tbl2asn to annotate the
+longest Open Reading Frame (ORF) on each record. The -k m flag allows
alternative start codons to be used when finding the ORF. The protein will
be named 'unknown' unless the name is present in the .fsa file definition
-line, e.g., [protein=helicase].
+line, e.g., [protein=helicase]. The two flags can be combined as -k cm.
-Data records will be validated when the -v flag is indicated. Output is
+Data records will be validated when the -V v flag is indicated. Output is
saved to files with a .val suffix. The validator checks for many things,
including internal stops in CDS features and mismatches between the CDS
translation and the supplied protein sequence. Errors need to be corrected
before submitting files to GenBank.
-GenBank format output is generated when the -b flag is used. Resulting
-files have a .gbf suffix.
+GenBank format output is generated when the -V b flag is used. Resulting
+files have a .gbf suffix. The validation and flatfile generation flags can
+be combined as -V vb.
NUCLEOTIDE SEQUENCE FORMAT
diff --git a/errmsg/valid.msg b/errmsg/valid.msg
index ea171b43..c17a4f2b 100644
--- a/errmsg/valid.msg
+++ b/errmsg/valid.msg
@@ -404,6 +404,14 @@ The lat_lon coordinate does not map to the indicated country.
$^ LatLonState, 49
The lat_lon coordinate does not map to the indicated state or province.
+$^ BadSpecificHost, 50
+A BioSource descriptor or feature has a specific host value that may
+require a taxonomy consult.
+
+$^ RefGeneTrackingIllegalStatus, 51
+The RefGeneTracking user object has an illegal Status value.
+
+
$$ GENERIC, 3
$^ NonAsciiAsn, 1
@@ -490,7 +498,7 @@ Bioseq packaged in the set, perhaps within a nuc-prot set. RefSeq records may
however be referenced remotely.
$^ InconsistentMolInfoBiomols, 12
-Mol-info.biomol is inconsistent within a segset or parts set.
+Mol-info.biomol is inconsistent within a segset, parts set, or pop/phy/mut/eco set.
$^ ArchaicFeatureLocation, 13
A feature location should refer to the accession or gi number, not a local or general ID.
@@ -1080,6 +1088,18 @@ and wobble expansion of the anticodon sequence.
$^ BadAnticodonStrand, 147
The tRNA feature location and anticodon location are not on the same strand.
+$^ UndesiredGeneSynonym, 148
+The gene synonym is uninformative.
+
+$^ UndesiredProteinName, 149
+The protein name is uninformative.
+
+$^ FeatureBeginsOrEndsInGap, 150
+The feature starts or stops within a sequence gap.
+
+$^ GeneOntologyTermMissingGOID, 151
+A Gene Ontology (GO) term is missing the GO Identifier.
+
$$ SEQ_ALIGN, 6
$^ SeqIdProblem, 1
diff --git a/link/mswin/asnmacro.rc b/link/mswin/asnmacro.rc
new file mode 100644
index 00000000..56ba660a
--- /dev/null
+++ b/link/mswin/asnmacro.rc
@@ -0,0 +1,11 @@
+#include <windows.h>
+#include "ncbirc.h"
+
+STRINGTABLE
+ BEGIN
+ STR_PROGRAM, "Asn Barcode Validator"
+ END
+
+ICO_PROGRAM ICON ncbilogo.ico
+ICO_NCBILOGO ICON ncbilogo.ico
+
diff --git a/link/mswin/cleanasn.rc b/link/mswin/cleanasn.rc
new file mode 100644
index 00000000..1008aa99
--- /dev/null
+++ b/link/mswin/cleanasn.rc
@@ -0,0 +1,10 @@
+#include <windows.h>
+#include "ncbirc.h"
+
+STRINGTABLE
+ BEGIN
+ STR_PROGRAM, "Cleanasn"
+ END
+
+ICO_PROGRAM ICON ncbilogo.ico
+ICO_NCBILOGO ICON ncbilogo.ico
diff --git a/link/mswin/cspeedtest.rc b/link/mswin/cspeedtest.rc
new file mode 100644
index 00000000..f2f22922
--- /dev/null
+++ b/link/mswin/cspeedtest.rc
@@ -0,0 +1,10 @@
+#include <windows.h>
+#include "ncbirc.h"
+
+STRINGTABLE
+ BEGIN
+ STR_PROGRAM, "cspeedtest"
+ END
+
+ICO_PROGRAM ICON ncbilogo.ico
+ICO_NCBILOGO ICON ncbilogo.ico
diff --git a/link/mswin/raw2delt.rc b/link/mswin/raw2delt.rc
new file mode 100644
index 00000000..33730107
--- /dev/null
+++ b/link/mswin/raw2delt.rc
@@ -0,0 +1,11 @@
+#include <windows.h>
+#include "ncbirc.h"
+
+STRINGTABLE
+ BEGIN
+ STR_PROGRAM, "raw2delt"
+ END
+
+ICO_PROGRAM ICON ncbilogo.ico
+ICO_NCBILOGO ICON ncbilogo.ico
+
diff --git a/make/makeall.unx b/make/makeall.unx
index fdc924c4..cdf8971b 100644
--- a/make/makeall.unx
+++ b/make/makeall.unx
@@ -1,6 +1,6 @@
# makefile for asntool and ncbi core routines,
#
-# $Id: makeall.unx,v 6.286 2007/08/03 12:42:48 lavr Exp $
+# $Id: makeall.unx,v 6.291 2008/01/25 19:56:25 ucko Exp $
#
# cdromlib data access functions, vibrant, and entrez
# SunOS with unbundled ANSI compiler [ make LCL=acc RAN=ranlib CC=acc ]
@@ -188,18 +188,18 @@ SRC1 = ncbimain.c $(SRC1e)
SRC2 = objacces.c objalign.c objall.c objbibli.c \
objfeat.c objgen.c objloc.c objmedli.c objpub.c \
objres.c objscoremat.c objseq.c objblock.c objcode.c objsset.c \
- objsub.c objprt.c objfdef.c objalignloc.c \
- objpubme.c objmdrs.c objproj.c objgbseq.c objtseq.c objinsdseq.c \
+ objsub.c objprt.c objfdef.c objalignloc.c objtable.c \
+ objpubme.c objmdrs.c objproj.c objgbseq.c objtseq.c objinsdseq.c objmacro.c \
objent2.c ent2api.c pmfapi.c objtax3.c tax3api.c objegkludge.c objentgene.c \
objmla2.c mla2api.c qblastapi.c vecscnapi.c objmim.c mimapi.c cddapi.c seqport.c \
sequtil.c prtutil.c simple.c tofasta.c tofile.c tomedlin.c \
valid.c alignmgr.c aliparse.c aliread.c alignval.c sqnutil1.c sqnutil2.c sqnutil3.c \
- subutil.c edutil.c asn2ff1.c asn2ff2.c asn2ff3.c asn2ff4.c \
+ sqnutil4.c subutil.c edutil.c asn2ff1.c asn2ff2.c asn2ff3.c asn2ff4.c \
asn2ff5.c asn2ff6.c asn2gnb1.c asn2gnb2.c asn2gnb3.c asn2gnb4.c \
asn2gnb5.c asn2gnb6.c ftusrstr.c gbfeat.c gbftglob.c \
gbparint.c utilpars.c utilpub.c ffprint.c wprint.c satutil.c \
seqmgr.c objmgr.c gather.c accmmdbs.c acccn3ds.c lsqfetch.c findrepl.c \
- codon.c jzcoll.c jzmisc.c maputil.c mconsist.c \
+ codon.c jzcoll.c jzmisc.c maputil.c mconsist.c macroapi.c \
salpedit.c salpstat.c salpacc.c salprop.c salsap.c salstruc.c salutil.c \
udvseq.c blocks.c pgppop.c samutil.c ddvcolor.c viewmgr.c ddvcreate.c \
jsavlt.c needleman.c txalign.c fdlobj.c alignmgr2.c alnread.c
@@ -232,7 +232,7 @@ SRC20 = drawseq.c dotmatrx.c fea2seg.c fstyle.c smdlg1.c smdlg2.c smdlg3.c \
vsm.c vsmfile.c vsmutil.c udvgraph.c udvopen.c udvpanel.c dotvibrant.c \
dlgutil1.c dlgutil2.c e2trmlst.c e2docsum.c asn2graphic.c \
medview.c bspview.c gbfview.c gphview.c gphdraw.c gxydraw.c gtrdraw.c \
- seqpanel.c ingengraph.c ingenext.c ingenwin.c \
+ seqpanel.c ingengraph.c ingenext.c ingenwin.c macrodlg.c \
biosrc.c cdrgn.c import.c pubdesc.c seqsub.c mapgene.c prtgene.c salogif.c
SRC45 = ddvclick.c ddvgraph.c ddvopen.c ddvpanel.c
@@ -304,6 +304,9 @@ SRC61 = blast_api.c blast_format.c blast_input.c blast_mtlock.c \
seqsrc_multiseq.c seqsrc_readdb.c twoseq_api.c dust_filter.c \
blast_message_api.c
+SRCALL = $(THR_SRC) $(SRC1) $(SRC2) $(SRC3) $(SRC4) $(SRC5) $(SRC20) $(SRC22) \
+ $(SRC23) $(SRC28) $(SRC30) $(SRC50) $(SRC60) $(SRC61) $(SRCCOMPADJ)
+
# objects needed for versions of asntool and entrez
THR_OBJ = ncbithr.o
@@ -329,18 +332,18 @@ OBJ1 = ncbimain.o $(OBJ1e)
OBJ2 = objacces.o objalign.o objall.o objbibli.o \
objfeat.o objgen.o objloc.o objmedli.o objpub.o \
objres.o objscoremat.o objseq.o objblock.o objcode.o objsset.o \
- objsub.o objprt.o objfdef.o objalignloc.o \
- objpubme.o objmdrs.o objproj.o objgbseq.o objtseq.o objinsdseq.o \
+ objsub.o objprt.o objfdef.o objalignloc.o objtable.o \
+ objpubme.o objmdrs.o objproj.o objgbseq.o objtseq.o objinsdseq.o objmacro.o \
objent2.o ent2api.o pmfapi.o objtax3.o tax3api.o objegkludge.o objentgene.o \
objmla2.o mla2api.o qblastapi.o vecscnapi.o objmim.o mimapi.o cddapi.o seqport.o \
sequtil.o prtutil.o simple.o tofasta.o tofile.o tomedlin.o \
valid.o alignmgr.o aliparse.o aliread.o alignval.o sqnutil1.o sqnutil2.o sqnutil3.o \
- subutil.o edutil.o asn2ff1.o asn2ff2.o asn2ff3.o asn2ff4.o \
+ sqnutil4.o subutil.o edutil.o asn2ff1.o asn2ff2.o asn2ff3.o asn2ff4.o \
asn2ff5.o asn2ff6.o asn2gnb1.o asn2gnb2.o asn2gnb3.o asn2gnb4.o \
asn2gnb5.o asn2gnb6.o ftusrstr.o gbfeat.o gbftglob.o \
gbparint.o utilpars.o utilpub.o ffprint.o wprint.o satutil.o \
seqmgr.o objmgr.o gather.o accmmdbs.o acccn3ds.o lsqfetch.o findrepl.o \
- codon.o jzcoll.o jzmisc.o maputil.o mconsist.o \
+ codon.o jzcoll.o jzmisc.o maputil.o mconsist.o macroapi.o \
salpedit.o salpstat.o salpacc.o salprop.o salsap.o salstruc.o salutil.o \
udvseq.o blocks.o pgppop.o samutil.o ddvcolor.o viewmgr.o ddvcreate.o \
jsavlt.o needleman.o txalign.o fdlobj.o alignmgr2.o alnread.o
@@ -383,7 +386,7 @@ OBJ20 = drawseq.o dotmatrx.o fea2seg.o fstyle.o smdlg1.o smdlg2.o smdlg3.o \
vsm.o vsmfile.o vsmutil.o udvgraph.o udvopen.o udvpanel.o dotvibrant.o \
dlgutil1.o dlgutil2.o e2trmlst.o e2docsum.o asn2graphic.o \
medview.o bspview.o gbfview.o gphview.o gphdraw.o gxydraw.o gtrdraw.o \
- seqpanel.o ingengraph.o ingenext.o ingenwin.o \
+ seqpanel.o ingengraph.o ingenext.o ingenwin.o macrodlg.o \
biosrc.o cdrgn.o import.o pubdesc.o seqsub.o mapgene.o prtgene.o salogif.o
OBJ45 = ddvclick.o ddvgraph.o ddvopen.o ddvpanel.o
@@ -483,8 +486,7 @@ nocopy : sources $(THR_OBJ) $(LIB1) $(LIB2) $(LIB3) $(DLIB4) $(DLIB400) \
$(DLIB28) $(DLIB30) $(DLIB3000) \
$(DLIB34) $(DLIB37) $(DLIB38) $(LIB50) $(LIB60) $(LIB61) $(NCBI_SHLIBS)
-sources : $(THR_SRC) $(SRC1) $(SRC2) $(SRC3) $(SRC4) $(SRC5) $(SRC20) $(SRC22) \
- $(SRC23) $(SRC28) $(SRC30) $(SRC50) $(SRC60) $(SRC61) $(SRCCOMPADJ)
+sources : $(SRCALL)
## To clean out the directory without removing make
##
@@ -669,6 +671,8 @@ shlib.alf :
## get all the source files
##
+$(SRCALL) : copy
+
copy :
-chmod -R ug+rw,o+r . ../include
$(SRCCOPY) ../corelib/tsprintf.h ../include
@@ -714,6 +718,7 @@ copy :
-mkdir -p ../include/util/creaders
cp -fp ../util/creaders/*.h ../include/util/creaders
$(SRCCOPY) ../ctools/*.c .
+ $(SRCCOPY) ../ctools/*.h .
-mkdir ../include/ctools
-chmod ug+rw,o+r ../include/ctools
cp -fp ../ctools/*.h ../include/ctools
diff --git a/make/makeallchives b/make/makeallchives
index 2e8a1826..6c841e7a 100755
--- a/make/makeallchives
+++ b/make/makeallchives
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $Id: makeallchives,v 1.83 2006/08/30 12:10:29 ivanov Exp $
+# $Id: makeallchives 117677 2008-01-18 17:07:17Z vakatov $
#
#
# Creates all archives from a directory above 'ncbi'
diff --git a/make/makedemo.unx b/make/makedemo.unx
index 6a89a7df..f1d6c534 100644
--- a/make/makedemo.unx
+++ b/make/makedemo.unx
@@ -1,6 +1,6 @@
# makefile for demo programs
#
-# $Id: makedemo.unx,v 6.87 2006/11/16 15:36:19 coulouri Exp $
+# $Id: makedemo.unx,v 6.88 2008/01/25 19:56:25 ucko Exp $
#
# Sun with unbundled ANSI compiler [ make CC=acc ]
# Sun with Gnu C [ make CC=gcc ]
@@ -150,6 +150,8 @@ clean :
## get all the source files
##
+$(SRC1) : copy
+
copy :
$(SRCCOPY) ../demo/*.* .
$(SRCCOPY) ../regexp/test/*.* .
diff --git a/make/makedis.csh b/make/makedis.csh
index 3f977b8b..98f1e39e 100755
--- a/make/makedis.csh
+++ b/make/makedis.csh
@@ -1,6 +1,6 @@
#!/bin/csh -f
#
-# $Id: makedis.csh,v 1.116 2007/05/09 16:06:55 ucko Exp $
+# $Id: makedis.csh 117677 2008-01-18 17:07:17Z vakatov $
#
## PUBLIC DOMAIN NOTICE
# National Center for Biotechnology Information
diff --git a/make/makeindx.unx b/make/makeindx.unx
index 365c5967..d7be0dae 100644
--- a/make/makeindx.unx
+++ b/make/makeindx.unx
@@ -1,6 +1,6 @@
# makefile for flat2asn
#
-# $Id: makeindx.unx,v 6.5 2002/06/17 14:27:20 ivanov Exp $
+# $Id: makeindx.unx,v 6.6 2008/01/25 19:56:25 ucko Exp $
#
# Sun with unbundled ANSI compiler [ make LCL=acc RAN=ranlib CC=acc ]
# Sun with Gnu C [ make LCL=gcc RAN=ranlib CC=gcc ]
@@ -61,6 +61,8 @@ SRC_P = add.c asci_blk.c citation.c flat2asn.c flatargs.c \
nucprot.c ref.c sp_global.c sp_ref.c sp_ascii.c\
taxcash.c utilfeat.c utilref.c
+SRC_ALL = $(SRC_I) $(SRC_P)
+
# objects needed for indexing and parsing
OBJ_I = indx_blk.o block.o entry.o gb_index.o em_index.o \
@@ -77,7 +79,7 @@ all : copy .WAIT nocopy flat2asn
nocopy : sources $(LIBPARSE)
-sources : $(SRC_I) $(SRC_P)
+sources : $(SRC_ALL)
## To clean out the directory without removing make
##
@@ -96,6 +98,8 @@ clean :
## get all the source files
##
+$(SRC_ALL) : copy
+
copy :
- chmod -R ug+rw,o+r .
$(SRCCOPY) ../internal/parser/*.h ../include
diff --git a/make/makenet.unx b/make/makenet.unx
index 7df93375..46839d7e 100644
--- a/make/makenet.unx
+++ b/make/makenet.unx
@@ -1,6 +1,6 @@
# makefile for network demo programs and network entrez
#
-# $Id: makenet.unx,v 6.219 2007/04/18 15:52:34 kans Exp $
+# $Id: makenet.unx,v 6.224 2008/01/25 19:56:25 ucko Exp $
# test, ignore
#
# Sun with unbundled ANSI compiler [ make CC=acc RAN=ranlib ]
@@ -85,6 +85,7 @@ BLIB12 = libncbitax.a
BLIB13 = libncbiid0.a
#BLIB14 = libncbibls0.a
BLIB19 = libncbispel.a
+BLIB22 = libncbimmdb.a
BLIB23 = libncbitool.a
BLIBCOMPADJ = libblastcompadj.a
BLIB24 = libncbisugg.a
@@ -252,7 +253,7 @@ SRC27 = indexlist.c isamlist.c memmap.c miscutils.c
SRC31 = netcnfg.c trmlst.c docsum.c
-SRC33 = smartnet.c
+SRC33 = smartnet.c namedpipe.c
SRC35 = ssputil.c
@@ -300,7 +301,7 @@ OBJ27 = indexlist.o isamlist.o memmap.o miscutils.o
OBJ31 = netcnfg.o trmlst.o docsum.o
-OBJ33 = smartnet.o
+OBJ33 = smartnet.o namedpipe.o
OBJ35 = ssputil.o
@@ -366,6 +367,8 @@ SERV_SRC = $(SRCENTSRV)
SERVERS = $(EXESUGGSRV) $(EXEQUERY) $(EXESEQUIN) $(EXEPSEQUIN) $(EXESBTEDIT) $(EXENQUERY)
+ALL_SRC = $(NET_LIBS_SRC) $(CLI_SRC) $(SERV_SRC)
+
## All things to make
##
all : ln-if-absent copy .WAIT nocopy
@@ -378,7 +381,7 @@ nocopy : sources $(BLIB6) $(BLIB7) $(BLIB8) $(BLIB9) \
$(DLIB31) $(DLIB33) $(NCBI_SHLIBS) $(CLIENTS) $(VIB) \
$(DLIB42) $(DLIB43) $(DLIB44)
-sources : $(NET_LIBS_SRC) $(CLI_SRC)
+sources : $(ALL_SRC)
servers : $(SERV_SRC) $(SERVERS)
@@ -386,7 +389,7 @@ utilities : $(EXEUTIL)
vibutilities : $(EXEUTILVIB)
-.NO_PARALLEL: copy nocopy Tentrez sequin Psequin sbtedit Ssequin elecpcr asn2fast asn2asn cleanasn Nbatch Nbatch3 Nentrcmd seqget idfetch test_ncbi_socket test_ncbi_dsock debug_server rtestval rasn2ff asn2gb asn2gb_psf asn2fsa asn2fsa_psf tbl2asn tbl2asn_psf asn2all gene2xml asnval asnval_psf asndisc asndisc_psf asnstrip flint gbseqget insdseqget trna2sap trna2tbl testent2 entrez2 spidey dotmatrix ingenue condense bl2seq
+.NO_PARALLEL: copy nocopy Tentrez sequin Psequin sbtedit Ssequin elecpcr asn2fast asn2asn cleanasn cspeedtest Nbatch Nbatch3 Nentrcmd seqget idfetch test_ncbi_socket test_ncbi_dsock debug_server rtestval rasn2ff asn2gb asn2gb_psf asn2fsa asn2fsa_psf tbl2asn tbl2asn_psf raw2delt asn2all gene2xml asnval asnval_psf asndisc asndisc_psf asnmacro asnstrip flint gbseqget insdseqget trna2sap trna2tbl testent2 entrez2 spidey dotmatrix ingenue condense bl2seq
.WAIT:
echo Waiting...go
@@ -451,6 +454,8 @@ shlib.alf :
rm -f ../shlib/*.a
+$(ALL_SRC) : copy
+
copy :
$(SRCCOPY) ../connect/test/*.c .
$(SRCCOPY) ../network/entrez/client/*.h ../include
@@ -515,6 +520,7 @@ copy :
$(SRCCOPY) ../demo/asn2fast.c .
$(SRCCOPY) ../demo/asn2asn.c .
$(SRCCOPY) ../demo/cleanasn.c .
+ $(SRCCOPY) ../demo/cspeedtest.c .
$(SRCCOPY) ../demo/fetchent.c .
$(SRCCOPY) ../demo/udvmain.c .
$(SRCCOPY) ../demo/rtestval.c .
@@ -525,8 +531,10 @@ copy :
$(SRCCOPY) ../demo/gene2xml.c .
$(SRCCOPY) ../demo/asnval.c .
$(SRCCOPY) ../demo/asndisc.c .
+ $(SRCCOPY) ../demo/asnmacro.c .
$(SRCCOPY) ../demo/asnstrip.c .
$(SRCCOPY) ../demo/tbl2asn.c .
+ $(SRCCOPY) ../demo/raw2delt.c .
$(SRCCOPY) ../demo/flint.c .
$(SRCCOPY) ../demo/gbseqget.c .
$(SRCCOPY) ../demo/insdseqget.c .
@@ -694,6 +702,8 @@ docsum.o : docsum.c
$(CC) $(CFLAGS) docsum.c
smartnet.o : smartnet.c
$(CC) $(CFLAGS) smartnet.c
+namedpipe.o : namedpipe.c
+ $(CC) $(CFLAGS) namedpipe.c
ssputil.o : ssputil.c
$(CC) $(CFLAGS) ssputil.c
objblst3.o : objblst3.c
@@ -986,7 +996,7 @@ asn2all : asn2all.c
# tbl2asn
tbl2asn : tbl2asn.c
$(CC) -o tbl2asn $(LDFLAGS) tbl2asn.c $(LIB23) $(LIBCOMPADJ) \
- $(LIB2) $(NETCLILIB) $(LIB1) $(OTHERLIBS)
+ $(LIB2) $(NETCLILIB) $(LIB1) $(OTHERLIBS)
# tbl2asn_psf, uses PUBSEQBioseqFetchEnable instead of PubSeqFetchEnable
# should be used only internally within NCBI.
@@ -995,6 +1005,11 @@ tbl2asn_psf : tbl2asn.c
$(LIB23) $(LIBCOMPADJ) $(LIB2) $(LIB1) $(NCBI_SYBLIBS_CT_r) \
$(OTHERLIBS) $(THREAD_OTHERLIBS)
+# raw2delt
+raw2delt : raw2delt.c
+ $(CC) -o raw2delt $(LDFLAGS) raw2delt.c $(LIB22) $(LIBCOMPADJ) \
+ $(LIB2) $(NETCLILIB) $(LIB1) $(OTHERLIBS)
+
# gene2xml program (gene2xml)
gene2xml : gene2xml.c
$(CC) -g -o gene2xml $(LDFLAGS) gene2xml.c $(NETCLILIB) $(LIB2) $(LIB1) $(OTHERLIBS)
@@ -1032,10 +1047,15 @@ asndisc_psf : asndisc.c
$(LIB23) $(LIBCOMPADJ) $(LIB2) $(LIB1) $(NCBI_SYBLIBS_CT_r) \
$(OTHERLIBS) $(THREAD_OTHERLIBS)
+# asnmacro
+asnmacro : asnmacro.c
+ $(CC) -o asnmacro $(LDFLAGS) asnmacro.c $(LIB61) $(LIB60) $(LIB23) $(LIBCOMPADJ) \
+ $(LIB2) $(LIB1) $(OTHERLIBS)
+
# asnstrip program (asnstrip)
asnstrip : asnstrip.c
$(CC) -o asnstrip $(LDFLAGS) asnstrip.c $(LIB23) $(LIBCOMPADJ) \
- $(LIB2) $(NETCLILIB) $(LIB1) $(OTHERLIBS)
+ $(LIB2) $(NETCLILIB) $(LIB1) $(OTHERLIBS)
# flint program (flint)
flint : flint.c
@@ -1118,6 +1138,11 @@ asn2asn : asn2asn.c
cleanasn : cleanasn.c
$(CC) -o cleanasn $(LDFLAGS) cleanasn.c $(LIB41) $(LIB23) $(LIB6) $(LIB2) $(LIB1) $(OTHERLIBS)
+# demo program (cspeedtest)
+
+cspeedtest : cspeedtest.c
+ $(CC) -o cspeedtest $(LDFLAGS) cspeedtest.c $(LIB41) $(LIB23) $(LIB6) $(LIB2) $(LIB1) $(OTHERLIBS)
+
# demo program (fetchent)
fetchent : fetchent.c
diff --git a/make/msvc800_prj/algo/blast/api/blastapi.vcproj b/make/msvc800_prj/algo/blast/api/blastapi.vcproj
index 5883b749..0dd9f4c3 100644
--- a/make/msvc800_prj/algo/blast/api/blastapi.vcproj
+++ b/make/msvc800_prj/algo/blast/api/blastapi.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="blastapi"
- ProjectGUID="{96FC3702-E2ED-434F-BBA5-3DE1366FFA1F}"
+ ProjectGUID="{6058EDC4-453A-48B1-8E27-83820FFB7203}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/algo/blast/composition_adjustment/blastcompadj.vcproj b/make/msvc800_prj/algo/blast/composition_adjustment/blastcompadj.vcproj
index 2183be1b..60792fad 100644
--- a/make/msvc800_prj/algo/blast/composition_adjustment/blastcompadj.vcproj
+++ b/make/msvc800_prj/algo/blast/composition_adjustment/blastcompadj.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="blastcompadj"
- ProjectGUID="{F7164C61-0D7C-4EC8-9209-88A760907B6B}"
+ ProjectGUID="{A2E2AE46-C7B9-4544-B138-6F7662DF2216}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/algo/blast/core/blast.vcproj b/make/msvc800_prj/algo/blast/core/blast.vcproj
index 1bb205dc..97107994 100644
--- a/make/msvc800_prj/algo/blast/core/blast.vcproj
+++ b/make/msvc800_prj/algo/blast/core/blast.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="blast"
- ProjectGUID="{CD41CEB1-4E2C-494B-86E8-E29AF398D7ED}"
+ ProjectGUID="{B8E40D4D-C20C-42BD-B5E4-6BEB9D08344A}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/all.vcproj b/make/msvc800_prj/all.vcproj
index 4a9058d2..ba359739 100644
--- a/make/msvc800_prj/all.vcproj
+++ b/make/msvc800_prj/all.vcproj
@@ -3,8 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="all"
- ProjectGUID="{27665816-D337-4E8D-AA41-AEB7CA3C7FF1}"
- RootNamespace="all"
+ ProjectGUID="{347672C9-B4CA-4B21-8281-51955A9C50AC}"
Keyword="MakeFileProj"
>
<Platforms>
diff --git a/make/msvc800_prj/all_demo.vcproj b/make/msvc800_prj/all_demo.vcproj
index 1ce4f9f5..7839af29 100644
--- a/make/msvc800_prj/all_demo.vcproj
+++ b/make/msvc800_prj/all_demo.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="all_demo"
- ProjectGUID="{D786BB9A-FC43-4C02-B1F8-A7F96B2B6D1C}"
+ ProjectGUID="{B2AEBA00-E619-4FD2-80DA-9F713DD0306E}"
Keyword="MakeFileProj"
>
<Platforms>
diff --git a/make/msvc800_prj/all_exe.vcproj b/make/msvc800_prj/all_exe.vcproj
index e8ece846..51da1032 100644
--- a/make/msvc800_prj/all_exe.vcproj
+++ b/make/msvc800_prj/all_exe.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="all_exe"
- ProjectGUID="{4109D7F4-1D18-495F-B5C7-DFEA565DE9C6}"
+ ProjectGUID="{4DFAAB85-944C-4B34-A3C0-70370B655451}"
Keyword="MakeFileProj"
>
<Platforms>
diff --git a/make/msvc800_prj/all_lib.vcproj b/make/msvc800_prj/all_lib.vcproj
index e5f64496..63933af6 100644
--- a/make/msvc800_prj/all_lib.vcproj
+++ b/make/msvc800_prj/all_lib.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="all_lib"
- ProjectGUID="{0204EA88-C175-4970-922F-6F2C4FDA52EE}"
+ ProjectGUID="{4FDCF0D2-40AA-4856-98BE-A6FD3B7A443C}"
Keyword="MakeFileProj"
>
<Platforms>
diff --git a/make/msvc800_prj/all_ncbi.vcproj b/make/msvc800_prj/all_ncbi.vcproj
index e28e3ded..69b59a83 100644
--- a/make/msvc800_prj/all_ncbi.vcproj
+++ b/make/msvc800_prj/all_ncbi.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="all_ncbi"
- ProjectGUID="{04452BB8-39AC-4DC3-8C42-58384D285FED}"
+ ProjectGUID="{CAD80EBF-2DAF-4091-B486-59D86D65A8AD}"
Keyword="MakeFileProj"
>
<Platforms>
diff --git a/make/msvc800_prj/asnlib/asntool/exe_asntool.vcproj b/make/msvc800_prj/asnlib/asntool/exe_asntool.vcproj
index bca835b5..5af45993 100644
--- a/make/msvc800_prj/asnlib/asntool/exe_asntool.vcproj
+++ b/make/msvc800_prj/asnlib/asntool/exe_asntool.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="exe_asntool"
- ProjectGUID="{9AA6C9C9-1442-48CD-BD94-F134953418A9}"
+ ProjectGUID="{95BF266E-0195-4BEB-B306-B99489EE3991}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/biostruc/ncbimmdb.vcproj b/make/msvc800_prj/biostruc/ncbimmdb.vcproj
index dfad6d5f..e2a67143 100644
--- a/make/msvc800_prj/biostruc/ncbimmdb.vcproj
+++ b/make/msvc800_prj/biostruc/ncbimmdb.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="ncbimmdb"
- ProjectGUID="{98C1A680-89B6-4911-8C36-42D14F43B868}"
+ ProjectGUID="{2DD94017-2F95-470D-94F5-9F10AD650BDC}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/cdromlib/ncbiacc/ncbiacc.vcproj b/make/msvc800_prj/cdromlib/ncbiacc/ncbiacc.vcproj
index 23933a32..99b8be41 100644
--- a/make/msvc800_prj/cdromlib/ncbiacc/ncbiacc.vcproj
+++ b/make/msvc800_prj/cdromlib/ncbiacc/ncbiacc.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="ncbiacc"
- ProjectGUID="{AFDEDE71-796D-4896-BEE6-AFFC4F77CC09}"
+ ProjectGUID="{8FB57DC4-F98A-4E0D-BDBA-5AB2F7405B58}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/cdromlib/ncbicdr/ncbicdr.vcproj b/make/msvc800_prj/cdromlib/ncbicdr/ncbicdr.vcproj
index 90a39aec..bf841265 100644
--- a/make/msvc800_prj/cdromlib/ncbicdr/ncbicdr.vcproj
+++ b/make/msvc800_prj/cdromlib/ncbicdr/ncbicdr.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="ncbicdr"
- ProjectGUID="{3C4476FB-5518-425A-9D4E-44DD91068776}"
+ ProjectGUID="{F8832A8F-9EA0-4DFD-B181-FAA767F3B9AF}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/cdromlib/ncbinacc/ncbinacc.vcproj b/make/msvc800_prj/cdromlib/ncbinacc/ncbinacc.vcproj
index 106cef91..fc08b41f 100644
--- a/make/msvc800_prj/cdromlib/ncbinacc/ncbinacc.vcproj
+++ b/make/msvc800_prj/cdromlib/ncbinacc/ncbinacc.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="ncbinacc"
- ProjectGUID="{3E5CD700-5AE9-41CF-9A12-794A15EDE7D2}"
+ ProjectGUID="{7C0D1F06-0B97-49A1-A25D-93D5E7A96786}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/cn3d/ncbicn3d/ncbicn3d.vcproj b/make/msvc800_prj/cn3d/ncbicn3d/ncbicn3d.vcproj
index cae62497..4e6567d4 100644
--- a/make/msvc800_prj/cn3d/ncbicn3d/ncbicn3d.vcproj
+++ b/make/msvc800_prj/cn3d/ncbicn3d/ncbicn3d.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="ncbicn3d"
- ProjectGUID="{0A01AD98-3A52-430A-A7A8-2A3E990D1BA2}"
+ ProjectGUID="{2F198E60-4B02-46C3-8FEF-CE86D69E2C59}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/cn3d/ncbicn3d_ogl/ncbicn3d_ogl.vcproj b/make/msvc800_prj/cn3d/ncbicn3d_ogl/ncbicn3d_ogl.vcproj
index 424e6ea1..113625b2 100644
--- a/make/msvc800_prj/cn3d/ncbicn3d_ogl/ncbicn3d_ogl.vcproj
+++ b/make/msvc800_prj/cn3d/ncbicn3d_ogl/ncbicn3d_ogl.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="ncbicn3d_ogl"
- ProjectGUID="{B5934B23-8476-4D68-9769-2A65BF5C33A4}"
+ ProjectGUID="{DEBC32A0-A4F7-4C4C-9E93-62C1C4E6544D}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/connect/test/http_connector_hit/http_connector_hit.vcproj b/make/msvc800_prj/connect/test/http_connector_hit/http_connector_hit.vcproj
index 18775d5e..35ae2ecf 100644
--- a/make/msvc800_prj/connect/test/http_connector_hit/http_connector_hit.vcproj
+++ b/make/msvc800_prj/connect/test/http_connector_hit/http_connector_hit.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="http_connector_hit"
- ProjectGUID="{A73BBA44-40FF-4306-AF50-94737CD49839}"
+ ProjectGUID="{6266F193-8E41-4543-BB84-4DEA87146A44}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/connect/test/socket_io_bouncer/socket_io_bouncer.vcproj b/make/msvc800_prj/connect/test/socket_io_bouncer/socket_io_bouncer.vcproj
index 9d559d67..962ae180 100644
--- a/make/msvc800_prj/connect/test/socket_io_bouncer/socket_io_bouncer.vcproj
+++ b/make/msvc800_prj/connect/test/socket_io_bouncer/socket_io_bouncer.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="socket_io_bouncer"
- ProjectGUID="{1F10C6E1-3C88-4C78-9C18-05AC31B2421F}"
+ ProjectGUID="{BC50422E-D841-4EDF-B987-5135EC4D8F11}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/connect/test/test_ncbi_buffer/test_ncbi_buffer.vcproj b/make/msvc800_prj/connect/test/test_ncbi_buffer/test_ncbi_buffer.vcproj
index d0788f36..7fe90d3d 100644
--- a/make/msvc800_prj/connect/test/test_ncbi_buffer/test_ncbi_buffer.vcproj
+++ b/make/msvc800_prj/connect/test/test_ncbi_buffer/test_ncbi_buffer.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="test_ncbi_buffer"
- ProjectGUID="{9149ED1B-E896-4A64-A3D2-C42FC10A7F63}"
+ ProjectGUID="{2EDD4E60-025D-4167-B827-9A700DFA6D72}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/connect/test/test_ncbi_connutil_hit/test_ncbi_connutil_hit.vcproj b/make/msvc800_prj/connect/test/test_ncbi_connutil_hit/test_ncbi_connutil_hit.vcproj
index 5f07c0d6..d143e972 100644
--- a/make/msvc800_prj/connect/test/test_ncbi_connutil_hit/test_ncbi_connutil_hit.vcproj
+++ b/make/msvc800_prj/connect/test/test_ncbi_connutil_hit/test_ncbi_connutil_hit.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="test_ncbi_connutil_hit"
- ProjectGUID="{AD565A88-01DA-4401-8E8F-53CCF8C759B5}"
+ ProjectGUID="{760EA748-5473-48CE-8BE0-76538A0CE1B2}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/connect/test/test_ncbi_connutil_misc/test_ncbi_connutil_misc.vcproj b/make/msvc800_prj/connect/test/test_ncbi_connutil_misc/test_ncbi_connutil_misc.vcproj
index 5b0c5f40..c7853310 100644
--- a/make/msvc800_prj/connect/test/test_ncbi_connutil_misc/test_ncbi_connutil_misc.vcproj
+++ b/make/msvc800_prj/connect/test/test_ncbi_connutil_misc/test_ncbi_connutil_misc.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="test_ncbi_connutil_misc"
- ProjectGUID="{E85F8917-C596-477B-8D92-851E3726DE96}"
+ ProjectGUID="{9218C976-8194-4AD4-BC5C-7CBC456C2475}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/connect/test/test_ncbi_core/test_ncbi_core.vcproj b/make/msvc800_prj/connect/test/test_ncbi_core/test_ncbi_core.vcproj
index 13d1424c..85685766 100644
--- a/make/msvc800_prj/connect/test/test_ncbi_core/test_ncbi_core.vcproj
+++ b/make/msvc800_prj/connect/test/test_ncbi_core/test_ncbi_core.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="test_ncbi_core"
- ProjectGUID="{A6AC837C-8852-48B3-9232-57A2493AEDA4}"
+ ProjectGUID="{167BDE33-267C-49EE-9AC5-6177D283D799}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/connect/test/test_ncbi_disp/test_ncbi_disp.vcproj b/make/msvc800_prj/connect/test/test_ncbi_disp/test_ncbi_disp.vcproj
index 98414ac1..d2373d3a 100644
--- a/make/msvc800_prj/connect/test/test_ncbi_disp/test_ncbi_disp.vcproj
+++ b/make/msvc800_prj/connect/test/test_ncbi_disp/test_ncbi_disp.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="test_ncbi_disp"
- ProjectGUID="{AAD6BEB3-618D-492E-BFC8-D3892D9D26AB}"
+ ProjectGUID="{087A2516-3C90-4D46-AEA9-670592894CB4}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/connect/test/test_ncbi_dsock/test_ncbi_dsock.vcproj b/make/msvc800_prj/connect/test/test_ncbi_dsock/test_ncbi_dsock.vcproj
index bedfe9a0..77e43d4e 100644
--- a/make/msvc800_prj/connect/test/test_ncbi_dsock/test_ncbi_dsock.vcproj
+++ b/make/msvc800_prj/connect/test/test_ncbi_dsock/test_ncbi_dsock.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="test_ncbi_dsock"
- ProjectGUID="{032E43BB-816C-4BEE-9ABD-1E0B599C007A}"
+ ProjectGUID="{3B976840-4F3F-46A9-832D-4AB79417F712}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/connect/test/test_ncbi_file_connector/test_ncbi_file_connector.vcproj b/make/msvc800_prj/connect/test/test_ncbi_file_connector/test_ncbi_file_connector.vcproj
index 44c26c42..affa74e0 100644
--- a/make/msvc800_prj/connect/test/test_ncbi_file_connector/test_ncbi_file_connector.vcproj
+++ b/make/msvc800_prj/connect/test/test_ncbi_file_connector/test_ncbi_file_connector.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="test_ncbi_file_connector"
- ProjectGUID="{57BABFE8-331D-41A9-8776-314F2D8791E2}"
+ ProjectGUID="{F171E3D9-FC0B-4404-B96F-AD98C055CD8B}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/connect/test/test_ncbi_http_connector/test_ncbi_http_connector.vcproj b/make/msvc800_prj/connect/test/test_ncbi_http_connector/test_ncbi_http_connector.vcproj
index 36805175..ed177417 100644
--- a/make/msvc800_prj/connect/test/test_ncbi_http_connector/test_ncbi_http_connector.vcproj
+++ b/make/msvc800_prj/connect/test/test_ncbi_http_connector/test_ncbi_http_connector.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="test_ncbi_http_connector"
- ProjectGUID="{8B6B0E08-62BA-4E92-8672-06CCA7432096}"
+ ProjectGUID="{862D2BCD-67ED-4398-A811-7E247C2029E5}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/connect/test/test_ncbi_http_get/test_ncbi_http_get.vcproj b/make/msvc800_prj/connect/test/test_ncbi_http_get/test_ncbi_http_get.vcproj
index 1be6af23..471d873a 100644
--- a/make/msvc800_prj/connect/test/test_ncbi_http_get/test_ncbi_http_get.vcproj
+++ b/make/msvc800_prj/connect/test/test_ncbi_http_get/test_ncbi_http_get.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="test_ncbi_http_get"
- ProjectGUID="{C5FFDC7A-C2A7-49C0-9EED-92D987AC3AC9}"
+ ProjectGUID="{DD51F357-26FE-46F2-9AC9-5B682DBC198C}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/connect/test/test_ncbi_memory_connector/test_ncbi_memory_connector.vcproj b/make/msvc800_prj/connect/test/test_ncbi_memory_connector/test_ncbi_memory_connector.vcproj
index ccd5db0d..ee528472 100644
--- a/make/msvc800_prj/connect/test/test_ncbi_memory_connector/test_ncbi_memory_connector.vcproj
+++ b/make/msvc800_prj/connect/test/test_ncbi_memory_connector/test_ncbi_memory_connector.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="test_ncbi_memory_connector"
- ProjectGUID="{42140DF3-03C5-4A99-9D7B-F4385733D694}"
+ ProjectGUID="{6F8036D0-9AEE-4B60-A65A-5A51A9D8725F}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/connect/test/test_ncbi_sendmail/test_ncbi_sendmail.vcproj b/make/msvc800_prj/connect/test/test_ncbi_sendmail/test_ncbi_sendmail.vcproj
index 076a3a86..1a29a535 100644
--- a/make/msvc800_prj/connect/test/test_ncbi_sendmail/test_ncbi_sendmail.vcproj
+++ b/make/msvc800_prj/connect/test/test_ncbi_sendmail/test_ncbi_sendmail.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="test_ncbi_sendmail"
- ProjectGUID="{AA4B7095-5FBB-41E5-AE2A-39247638EC14}"
+ ProjectGUID="{E459338E-39A8-49C9-9DFC-612E47863CE3}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/connect/test/test_ncbi_service_connector/test_ncbi_service_connector.vcproj b/make/msvc800_prj/connect/test/test_ncbi_service_connector/test_ncbi_service_connector.vcproj
index c242b4b7..ea5e7655 100644
--- a/make/msvc800_prj/connect/test/test_ncbi_service_connector/test_ncbi_service_connector.vcproj
+++ b/make/msvc800_prj/connect/test/test_ncbi_service_connector/test_ncbi_service_connector.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="test_ncbi_service_connector"
- ProjectGUID="{A40959E8-B640-49F7-B2E0-806A03544AB5}"
+ ProjectGUID="{7719A61E-FAE1-4564-AD24-416318E48967}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/connect/test/test_ncbi_socket/test_ncbi_socket.vcproj b/make/msvc800_prj/connect/test/test_ncbi_socket/test_ncbi_socket.vcproj
index e3e9b960..2bd0bb4d 100644
--- a/make/msvc800_prj/connect/test/test_ncbi_socket/test_ncbi_socket.vcproj
+++ b/make/msvc800_prj/connect/test/test_ncbi_socket/test_ncbi_socket.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="test_ncbi_socket"
- ProjectGUID="{67F5D600-6FE3-420E-B9F3-7EA1DD452FC9}"
+ ProjectGUID="{E6CE793E-7882-4E77-9D26-22C950DE0AFE}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/connect/test/test_ncbi_socket_connector/test_ncbi_socket_connector.vcproj b/make/msvc800_prj/connect/test/test_ncbi_socket_connector/test_ncbi_socket_connector.vcproj
index e8309ed5..d34ce1e4 100644
--- a/make/msvc800_prj/connect/test/test_ncbi_socket_connector/test_ncbi_socket_connector.vcproj
+++ b/make/msvc800_prj/connect/test/test_ncbi_socket_connector/test_ncbi_socket_connector.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="test_ncbi_socket_connector"
- ProjectGUID="{BD7E75D1-DEDC-450E-A3E5-4823C06100D5}"
+ ProjectGUID="{9AAE2D3F-4D37-43B6-96EB-593DE7679811}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/connect/test/xconntest.vcproj b/make/msvc800_prj/connect/test/xconntest.vcproj
index a3f1d3bb..e48a44ac 100644
--- a/make/msvc800_prj/connect/test/xconntest.vcproj
+++ b/make/msvc800_prj/connect/test/xconntest.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="xconntest"
- ProjectGUID="{8D0BB3E1-BFB0-4557-9DD0-A2E82D3D9C70}"
+ ProjectGUID="{A9561C14-6DAF-4A28-9F59-297D39432D0B}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/corelib/ncbi/ncbi.vcproj b/make/msvc800_prj/corelib/ncbi/ncbi.vcproj
index abcc3d23..3b76d224 100644
--- a/make/msvc800_prj/corelib/ncbi/ncbi.vcproj
+++ b/make/msvc800_prj/corelib/ncbi/ncbi.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="ncbi"
- ProjectGUID="{E29B255C-2B3A-4E74-85E1-6CD033DFA55D}"
+ ProjectGUID="{F6DB30E7-94C5-4760-92FA-449884953A9D}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/corelib/ncbiconfig.vcproj b/make/msvc800_prj/corelib/ncbiconfig.vcproj
index 6a44c2fa..41138539 100644
--- a/make/msvc800_prj/corelib/ncbiconfig.vcproj
+++ b/make/msvc800_prj/corelib/ncbiconfig.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="ncbiconfig"
- ProjectGUID="{CF596340-202E-4E79-B041-F4310A422C20}"
+ ProjectGUID="{74B970B2-6C7F-4AEE-9031-27CC087D7214}"
Keyword="MakeFileProj"
>
<Platforms>
diff --git a/make/msvc800_prj/corelib/ncbimain/ncbimain.vcproj b/make/msvc800_prj/corelib/ncbimain/ncbimain.vcproj
index 921e705f..c6a20e57 100644
--- a/make/msvc800_prj/corelib/ncbimain/ncbimain.vcproj
+++ b/make/msvc800_prj/corelib/ncbimain/ncbimain.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="ncbimain"
- ProjectGUID="{35C18E88-9F42-49EA-9881-C3128245490F}"
+ ProjectGUID="{610E62DA-4DD6-479E-8D85-1FB87126D750}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/ddv/ddv/exe_ddv.vcproj b/make/msvc800_prj/ddv/ddv/exe_ddv.vcproj
index 565074fe..60ae1b37 100644
--- a/make/msvc800_prj/ddv/ddv/exe_ddv.vcproj
+++ b/make/msvc800_prj/ddv/ddv/exe_ddv.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="exe_ddv"
- ProjectGUID="{3BF6CF52-B403-4F8A-8DD5-4F1CF619CCC9}"
+ ProjectGUID="{49F50B13-96C8-44F1-9B8C-68197E0DBE7E}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/ddv/ddvlib/ddvlib.vcproj b/make/msvc800_prj/ddv/ddvlib/ddvlib.vcproj
index e3c49019..4c3375b8 100644
--- a/make/msvc800_prj/ddv/ddvlib/ddvlib.vcproj
+++ b/make/msvc800_prj/ddv/ddvlib/ddvlib.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="ddvlib"
- ProjectGUID="{3D2820CB-F5E6-4807-864C-2C751ADC556D}"
+ ProjectGUID="{D2059A10-7A4D-471A-BAEA-76479FD2773D}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/demo/asn2all/demo_asn2all.vcproj b/make/msvc800_prj/demo/asn2all/demo_asn2all.vcproj
index 78ea5ec3..ab5e6e9b 100644
--- a/make/msvc800_prj/demo/asn2all/demo_asn2all.vcproj
+++ b/make/msvc800_prj/demo/asn2all/demo_asn2all.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="demo_asn2all"
- ProjectGUID="{C817F26E-4541-45D0-A6DA-59E58DB9DB7E}"
+ ProjectGUID="{D3E7608D-BA37-41A8-8012-9DC2E44E2703}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/demo/asn2ff/demo_asn2ff.vcproj b/make/msvc800_prj/demo/asn2ff/demo_asn2ff.vcproj
index b17387a1..054bd5a6 100644
--- a/make/msvc800_prj/demo/asn2ff/demo_asn2ff.vcproj
+++ b/make/msvc800_prj/demo/asn2ff/demo_asn2ff.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="demo_asn2ff"
- ProjectGUID="{D3D92BB5-1C47-4797-8486-4441926F2A54}"
+ ProjectGUID="{DD4C129E-9390-41EC-90E8-CEDF4C6F7152}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/demo/asn2fsa/demo_asn2fsa.vcproj b/make/msvc800_prj/demo/asn2fsa/demo_asn2fsa.vcproj
index c8267bc6..b0e73cbd 100644
--- a/make/msvc800_prj/demo/asn2fsa/demo_asn2fsa.vcproj
+++ b/make/msvc800_prj/demo/asn2fsa/demo_asn2fsa.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="demo_asn2fsa"
- ProjectGUID="{2675C4D0-0894-426B-B291-2807B4B79D3F}"
+ ProjectGUID="{A901D889-28AD-4B69-9F81-5817D0B7120F}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/demo/asn2gb/demo_asn2gb.vcproj b/make/msvc800_prj/demo/asn2gb/demo_asn2gb.vcproj
index b95bcad1..b3c0e819 100644
--- a/make/msvc800_prj/demo/asn2gb/demo_asn2gb.vcproj
+++ b/make/msvc800_prj/demo/asn2gb/demo_asn2gb.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="demo_asn2gb"
- ProjectGUID="{9CC7403B-4370-4C93-9155-697EA11A8810}"
+ ProjectGUID="{1DDF5590-54DA-48B9-9168-E970F443F224}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/demo/asn2idx/demo_asn2idx.vcproj b/make/msvc800_prj/demo/asn2idx/demo_asn2idx.vcproj
index 926c5323..33815320 100644
--- a/make/msvc800_prj/demo/asn2idx/demo_asn2idx.vcproj
+++ b/make/msvc800_prj/demo/asn2idx/demo_asn2idx.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="demo_asn2idx"
- ProjectGUID="{06636583-FBC6-4274-9BD8-B5956A23B5C8}"
+ ProjectGUID="{A546FCD9-97BD-475F-975E-04AB9AC4E077}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/demo/asn2xml/demo_asn2xml.vcproj b/make/msvc800_prj/demo/asn2xml/demo_asn2xml.vcproj
index b0f5a9e0..3c8aed76 100644
--- a/make/msvc800_prj/demo/asn2xml/demo_asn2xml.vcproj
+++ b/make/msvc800_prj/demo/asn2xml/demo_asn2xml.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="demo_asn2xml"
- ProjectGUID="{CBF870AB-2EE6-4F12-9F0E-0D8CB207751D}"
+ ProjectGUID="{C17DDF84-6A2C-4801-85ED-04AD0B29CD0F}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/demo/asnbarval/demo_asnbarval.vcproj b/make/msvc800_prj/demo/asnbarval/demo_asnbarval.vcproj
new file mode 100644
index 00000000..b062850a
--- /dev/null
+++ b/make/msvc800_prj/demo/asnbarval/demo_asnbarval.vcproj
@@ -0,0 +1,953 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="demo_asnbarval"
+ ProjectGUID="{1136C677-E611-42A1-8BBF-C68BBFE19470}"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ <Platform
+ Name="x64"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="DebugDLL|Win32"
+ OutputDirectory=".\DebugDLL"
+ IntermediateDirectory=".\DebugDLL"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="1"
+ TypeLibraryName="$(OutDir)/demo_asnbarval.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..,..\..\..\..\corelib,..\..\..\..\connect,..\..\..\..\api,..\..\..\..\asnstat,..\..\..\..\asnlib,..\..\..\..\access,..\..\..\..\object,..\..\..\..\cdromlib,..\..\..\..\biostruc,..\..\..\..\tools"
+ PreprocessorDefinitions="_CONSOLE;WIN32;_DEBUG"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ RuntimeTypeInfo="true"
+ PrecompiledHeaderFile="$(IntDir)/demo_asnbarval.pch"
+ AssemblerListingLocation="$(IntDir)/"
+ ObjectFile="$(IntDir)/"
+ ProgramDataBaseFileName="$(IntDir)/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="1"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="oldnames.lib wsock32.lib"
+ OutputFile="$(OutDir)/asnbarval.exe"
+ LinkIncremental="2"
+ SuppressStartupBanner="true"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)/asnbarval.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile="$(OutDir)/demo_asnbarval.bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory=".\Release"
+ IntermediateDirectory=".\Release"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="1"
+ TypeLibraryName="$(OutDir)/demo_asnbarval.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..,..\..\..\..\corelib,..\..\..\..\connect,..\..\..\..\api,..\..\..\..\asnstat,..\..\..\..\asnlib,..\..\..\..\access,..\..\..\..\object,..\..\..\..\cdromlib,..\..\..\..\biostruc,..\..\..\..\tools"
+ PreprocessorDefinitions="_CONSOLE;WIN32;NDEBUG"
+ StringPooling="true"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ RuntimeTypeInfo="true"
+ PrecompiledHeaderFile="$(IntDir)/demo_asnbarval.pch"
+ AssemblerListingLocation="$(IntDir)/"
+ ObjectFile="$(IntDir)/"
+ ProgramDataBaseFileName="$(IntDir)/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="oldnames.lib wsock32.lib"
+ OutputFile="$(OutDir)/asnbarval.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ ProgramDatabaseFile="$(OutDir)/asnbarval.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile="$(OutDir)/demo_asnbarval.bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="ReleaseDLL|Win32"
+ OutputDirectory=".\ReleaseDLL"
+ IntermediateDirectory=".\ReleaseDLL"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="1"
+ TypeLibraryName="$(OutDir)/demo_asnbarval.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..,..\..\..\..\corelib,..\..\..\..\connect,..\..\..\..\api,..\..\..\..\asnstat,..\..\..\..\asnlib,..\..\..\..\access,..\..\..\..\object,..\..\..\..\cdromlib,..\..\..\..\biostruc,..\..\..\..\tools"
+ PreprocessorDefinitions="_CONSOLE;WIN32;NDEBUG"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ RuntimeTypeInfo="true"
+ PrecompiledHeaderFile="$(IntDir)/demo_asnbarval.pch"
+ AssemblerListingLocation="$(IntDir)/"
+ ObjectFile="$(IntDir)/"
+ ProgramDataBaseFileName="$(IntDir)/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="oldnames.lib wsock32.lib"
+ OutputFile="$(OutDir)/asnbarval.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ ProgramDatabaseFile="$(OutDir)/asnbarval.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile="$(OutDir)/demo_asnbarval.bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="1"
+ TypeLibraryName="$(OutDir)/demo_asnbarval.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..,..\..\..\..\corelib,..\..\..\..\connect,..\..\..\..\api,..\..\..\..\asnstat,..\..\..\..\asnlib,..\..\..\..\access,..\..\..\..\object,..\..\..\..\cdromlib,..\..\..\..\biostruc,..\..\..\..\tools"
+ PreprocessorDefinitions="_CONSOLE;WIN32;_DEBUG"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ RuntimeTypeInfo="true"
+ PrecompiledHeaderFile="$(IntDir)/demo_asnbarval.pch"
+ AssemblerListingLocation="$(IntDir)/"
+ ObjectFile="$(IntDir)/"
+ ProgramDataBaseFileName="$(IntDir)/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="1"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="oldnames.lib wsock32.lib"
+ OutputFile="$(OutDir)/asnbarval.exe"
+ LinkIncremental="2"
+ SuppressStartupBanner="true"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)/asnbarval.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile="$(OutDir)/demo_asnbarval.bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="DebugDLL|x64"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="3"
+ TypeLibraryName="$(OutDir)/demo_asnbarval.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..,..\..\..\..\corelib,..\..\..\..\connect,..\..\..\..\api,..\..\..\..\asnstat,..\..\..\..\asnlib,..\..\..\..\access,..\..\..\..\object,..\..\..\..\cdromlib,..\..\..\..\biostruc,..\..\..\..\tools"
+ PreprocessorDefinitions="_CONSOLE;WIN32;_DEBUG"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ RuntimeTypeInfo="true"
+ PrecompiledHeaderFile="$(IntDir)/demo_asnbarval.pch"
+ AssemblerListingLocation="$(IntDir)/"
+ ObjectFile="$(IntDir)/"
+ ProgramDataBaseFileName="$(IntDir)/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="1"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="oldnames.lib wsock32.lib"
+ OutputFile="$(OutDir)/asnbarval.exe"
+ LinkIncremental="2"
+ SuppressStartupBanner="true"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)/asnbarval.pdb"
+ SubSystem="1"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile="$(OutDir)/demo_asnbarval.bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|x64"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="3"
+ TypeLibraryName="$(OutDir)/demo_asnbarval.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..,..\..\..\..\corelib,..\..\..\..\connect,..\..\..\..\api,..\..\..\..\asnstat,..\..\..\..\asnlib,..\..\..\..\access,..\..\..\..\object,..\..\..\..\cdromlib,..\..\..\..\biostruc,..\..\..\..\tools"
+ PreprocessorDefinitions="_CONSOLE;WIN32;NDEBUG"
+ StringPooling="true"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ RuntimeTypeInfo="true"
+ PrecompiledHeaderFile="$(IntDir)/demo_asnbarval.pch"
+ AssemblerListingLocation="$(IntDir)/"
+ ObjectFile="$(IntDir)/"
+ ProgramDataBaseFileName="$(IntDir)/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="oldnames.lib wsock32.lib"
+ OutputFile="$(OutDir)/asnbarval.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ ProgramDatabaseFile="$(OutDir)/asnbarval.pdb"
+ SubSystem="1"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile="$(OutDir)/demo_asnbarval.bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="ReleaseDLL|x64"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="3"
+ TypeLibraryName="$(OutDir)/demo_asnbarval.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..,..\..\..\..\corelib,..\..\..\..\connect,..\..\..\..\api,..\..\..\..\asnstat,..\..\..\..\asnlib,..\..\..\..\access,..\..\..\..\object,..\..\..\..\cdromlib,..\..\..\..\biostruc,..\..\..\..\tools"
+ PreprocessorDefinitions="_CONSOLE;WIN32;NDEBUG"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ RuntimeTypeInfo="true"
+ PrecompiledHeaderFile="$(IntDir)/demo_asnbarval.pch"
+ AssemblerListingLocation="$(IntDir)/"
+ ObjectFile="$(IntDir)/"
+ ProgramDataBaseFileName="$(IntDir)/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="oldnames.lib wsock32.lib"
+ OutputFile="$(OutDir)/asnbarval.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ ProgramDatabaseFile="$(OutDir)/asnbarval.pdb"
+ SubSystem="1"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile="$(OutDir)/demo_asnbarval.bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|x64"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="3"
+ TypeLibraryName="$(OutDir)/demo_asnbarval.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..,..\..\..\..\corelib,..\..\..\..\connect,..\..\..\..\api,..\..\..\..\asnstat,..\..\..\..\asnlib,..\..\..\..\access,..\..\..\..\object,..\..\..\..\cdromlib,..\..\..\..\biostruc,..\..\..\..\tools"
+ PreprocessorDefinitions="_CONSOLE;WIN32;_DEBUG"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ RuntimeTypeInfo="true"
+ PrecompiledHeaderFile="$(IntDir)/demo_asnbarval.pch"
+ AssemblerListingLocation="$(IntDir)/"
+ ObjectFile="$(IntDir)/"
+ ProgramDataBaseFileName="$(IntDir)/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="1"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="oldnames.lib wsock32.lib"
+ OutputFile="$(OutDir)/asnbarval.exe"
+ LinkIncremental="2"
+ SuppressStartupBanner="true"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)/asnbarval.pdb"
+ SubSystem="1"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile="$(OutDir)/demo_asnbarval.bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+ >
+ <File
+ RelativePath="..\..\..\..\demo\asnbarval.c"
+ >
+ <FileConfiguration
+ Name="DebugDLL|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="ReleaseDLL|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="DebugDLL|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="ReleaseDLL|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\..\link\mswin\asnbarval.rc"
+ >
+ <FileConfiguration
+ Name="DebugDLL|Win32"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions=""
+ AdditionalIncludeDirectories="\ivanov\ncbi\link\mswin"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions=""
+ AdditionalIncludeDirectories="\ivanov\ncbi\link\mswin"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="ReleaseDLL|Win32"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions=""
+ AdditionalIncludeDirectories="\ivanov\ncbi\link\mswin"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions=""
+ AdditionalIncludeDirectories="\ivanov\ncbi\link\mswin"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="DebugDLL|x64"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions=""
+ AdditionalIncludeDirectories="\ivanov\ncbi\link\mswin"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|x64"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions=""
+ AdditionalIncludeDirectories="\ivanov\ncbi\link\mswin"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="ReleaseDLL|x64"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions=""
+ AdditionalIncludeDirectories="\ivanov\ncbi\link\mswin"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|x64"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions=""
+ AdditionalIncludeDirectories="\ivanov\ncbi\link\mswin"
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl"
+ >
+ </Filter>
+ <File
+ RelativePath="..\..\..\..\link\mswin\ncbilogo.ico"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
+
diff --git a/make/msvc800_prj/demo/asndhuff/demo_asndhuff.vcproj b/make/msvc800_prj/demo/asndhuff/demo_asndhuff.vcproj
index e9e74dbd..4016b498 100644
--- a/make/msvc800_prj/demo/asndhuff/demo_asndhuff.vcproj
+++ b/make/msvc800_prj/demo/asndhuff/demo_asndhuff.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="demo_asndhuff"
- ProjectGUID="{6E9207DA-5998-4B79-8850-D019EEA4251D}"
+ ProjectGUID="{95AE7147-09C4-4C87-A6AB-9B5714D51714}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/demo/asndisc/demo_asndisc.vcproj b/make/msvc800_prj/demo/asndisc/demo_asndisc.vcproj
index 485a1d46..2ed9b377 100644
--- a/make/msvc800_prj/demo/asndisc/demo_asndisc.vcproj
+++ b/make/msvc800_prj/demo/asndisc/demo_asndisc.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="demo_asndisc"
- ProjectGUID="{D1B78D4D-E0B1-4430-AA1A-20E870FBC038}"
+ ProjectGUID="{6171ABC9-E3CF-402A-A5A1-58FF5A6D3AB5}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/demo/asnstrip/demo_asnstrip.vcproj b/make/msvc800_prj/demo/asnstrip/demo_asnstrip.vcproj
new file mode 100644
index 00000000..21cfb0e3
--- /dev/null
+++ b/make/msvc800_prj/demo/asnstrip/demo_asnstrip.vcproj
@@ -0,0 +1,949 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="demo_asnstrip"
+ ProjectGUID="{24B6F0A3-B354-4089-B489-560DEF53C75C}"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ <Platform
+ Name="x64"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="DebugDLL|Win32"
+ OutputDirectory=".\DebugDLL"
+ IntermediateDirectory=".\DebugDLL"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="1"
+ TypeLibraryName="$(OutDir)/demo_asnstrip.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..,..\..\..\..\corelib,..\..\..\..\connect,..\..\..\..\api,..\..\..\..\asnstat,..\..\..\..\asnlib,..\..\..\..\access,..\..\..\..\object,..\..\..\..\cdromlib,..\..\..\..\biostruc,..\..\..\..\tools"
+ PreprocessorDefinitions="_CONSOLE;WIN32;_DEBUG"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ RuntimeTypeInfo="true"
+ PrecompiledHeaderFile="$(IntDir)/demo_asnstrip.pch"
+ AssemblerListingLocation="$(IntDir)/"
+ ObjectFile="$(IntDir)/"
+ ProgramDataBaseFileName="$(IntDir)/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="1"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="oldnames.lib wsock32.lib"
+ OutputFile="$(OutDir)/asnstrip.exe"
+ LinkIncremental="2"
+ SuppressStartupBanner="true"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)/asnstrip.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile="$(OutDir)/demo_asnstrip.bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="1"
+ TypeLibraryName="$(OutDir)/demo_asnstrip.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..,..\..\..\..\corelib,..\..\..\..\connect,..\..\..\..\api,..\..\..\..\asnstat,..\..\..\..\asnlib,..\..\..\..\access,..\..\..\..\object,..\..\..\..\cdromlib,..\..\..\..\biostruc,..\..\..\..\tools"
+ PreprocessorDefinitions="_CONSOLE;WIN32;_DEBUG"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ RuntimeTypeInfo="true"
+ PrecompiledHeaderFile="$(IntDir)/demo_asnstrip.pch"
+ AssemblerListingLocation="$(IntDir)/"
+ ObjectFile="$(IntDir)/"
+ ProgramDataBaseFileName="$(IntDir)/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="1"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="oldnames.lib wsock32.lib"
+ OutputFile="$(OutDir)/asnstrip.exe"
+ LinkIncremental="2"
+ SuppressStartupBanner="true"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)/asnstrip.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile="$(OutDir)/demo_asnstrip.bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory=".\Release"
+ IntermediateDirectory=".\Release"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="1"
+ TypeLibraryName="$(OutDir)/demo_asnstrip.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..,..\..\..\..\corelib,..\..\..\..\connect,..\..\..\..\api,..\..\..\..\asnstat,..\..\..\..\asnlib,..\..\..\..\access,..\..\..\..\object,..\..\..\..\cdromlib,..\..\..\..\biostruc,..\..\..\..\tools"
+ PreprocessorDefinitions="_CONSOLE;WIN32;NDEBUG"
+ StringPooling="true"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ RuntimeTypeInfo="true"
+ PrecompiledHeaderFile="$(IntDir)/demo_asnstrip.pch"
+ AssemblerListingLocation="$(IntDir)/"
+ ObjectFile="$(IntDir)/"
+ ProgramDataBaseFileName="$(IntDir)/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="oldnames.lib wsock32.lib"
+ OutputFile="$(OutDir)/asnstrip.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ ProgramDatabaseFile="$(OutDir)/asnstrip.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile="$(OutDir)/demo_asnstrip.bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="ReleaseDLL|Win32"
+ OutputDirectory=".\ReleaseDLL"
+ IntermediateDirectory=".\ReleaseDLL"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="1"
+ TypeLibraryName="$(OutDir)/demo_asnstrip.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..,..\..\..\..\corelib,..\..\..\..\connect,..\..\..\..\api,..\..\..\..\asnstat,..\..\..\..\asnlib,..\..\..\..\access,..\..\..\..\object,..\..\..\..\cdromlib,..\..\..\..\biostruc,..\..\..\..\tools"
+ PreprocessorDefinitions="_CONSOLE;WIN32;NDEBUG"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ RuntimeTypeInfo="true"
+ PrecompiledHeaderFile="$(IntDir)/demo_asnstrip.pch"
+ AssemblerListingLocation="$(IntDir)/"
+ ObjectFile="$(IntDir)/"
+ ProgramDataBaseFileName="$(IntDir)/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="oldnames.lib wsock32.lib"
+ OutputFile="$(OutDir)/asnstrip.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ ProgramDatabaseFile="$(OutDir)/asnstrip.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile="$(OutDir)/demo_asnstrip.bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="DebugDLL|x64"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="3"
+ TypeLibraryName="$(OutDir)/demo_asnstrip.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..,..\..\..\..\corelib,..\..\..\..\connect,..\..\..\..\api,..\..\..\..\asnstat,..\..\..\..\asnlib,..\..\..\..\access,..\..\..\..\object,..\..\..\..\cdromlib,..\..\..\..\biostruc,..\..\..\..\tools"
+ PreprocessorDefinitions="_CONSOLE;WIN32;_DEBUG"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ RuntimeTypeInfo="true"
+ PrecompiledHeaderFile="$(IntDir)/demo_asnstrip.pch"
+ AssemblerListingLocation="$(IntDir)/"
+ ObjectFile="$(IntDir)/"
+ ProgramDataBaseFileName="$(IntDir)/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="1"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="oldnames.lib wsock32.lib"
+ OutputFile="$(OutDir)/asnstrip.exe"
+ LinkIncremental="2"
+ SuppressStartupBanner="true"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)/asnstrip.pdb"
+ SubSystem="1"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile="$(OutDir)/demo_asnstrip.bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|x64"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="3"
+ TypeLibraryName="$(OutDir)/demo_asnstrip.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..,..\..\..\..\corelib,..\..\..\..\connect,..\..\..\..\api,..\..\..\..\asnstat,..\..\..\..\asnlib,..\..\..\..\access,..\..\..\..\object,..\..\..\..\cdromlib,..\..\..\..\biostruc,..\..\..\..\tools"
+ PreprocessorDefinitions="_CONSOLE;WIN32;_DEBUG"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ RuntimeTypeInfo="true"
+ PrecompiledHeaderFile="$(IntDir)/demo_asnstrip.pch"
+ AssemblerListingLocation="$(IntDir)/"
+ ObjectFile="$(IntDir)/"
+ ProgramDataBaseFileName="$(IntDir)/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="1"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="oldnames.lib wsock32.lib"
+ OutputFile="$(OutDir)/asnstrip.exe"
+ LinkIncremental="2"
+ SuppressStartupBanner="true"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)/asnstrip.pdb"
+ SubSystem="1"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile="$(OutDir)/demo_asnstrip.bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|x64"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="3"
+ TypeLibraryName="$(OutDir)/demo_asnstrip.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..,..\..\..\..\corelib,..\..\..\..\connect,..\..\..\..\api,..\..\..\..\asnstat,..\..\..\..\asnlib,..\..\..\..\access,..\..\..\..\object,..\..\..\..\cdromlib,..\..\..\..\biostruc,..\..\..\..\tools"
+ PreprocessorDefinitions="_CONSOLE;WIN32;NDEBUG"
+ StringPooling="true"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ RuntimeTypeInfo="true"
+ PrecompiledHeaderFile="$(IntDir)/demo_asnstrip.pch"
+ AssemblerListingLocation="$(IntDir)/"
+ ObjectFile="$(IntDir)/"
+ ProgramDataBaseFileName="$(IntDir)/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="oldnames.lib wsock32.lib"
+ OutputFile="$(OutDir)/asnstrip.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ ProgramDatabaseFile="$(OutDir)/asnstrip.pdb"
+ SubSystem="1"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile="$(OutDir)/demo_asnstrip.bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="ReleaseDLL|x64"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="3"
+ TypeLibraryName="$(OutDir)/demo_asnstrip.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..,..\..\..\..\corelib,..\..\..\..\connect,..\..\..\..\api,..\..\..\..\asnstat,..\..\..\..\asnlib,..\..\..\..\access,..\..\..\..\object,..\..\..\..\cdromlib,..\..\..\..\biostruc,..\..\..\..\tools"
+ PreprocessorDefinitions="_CONSOLE;WIN32;NDEBUG"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ RuntimeTypeInfo="true"
+ PrecompiledHeaderFile="$(IntDir)/demo_asnstrip.pch"
+ AssemblerListingLocation="$(IntDir)/"
+ ObjectFile="$(IntDir)/"
+ ProgramDataBaseFileName="$(IntDir)/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="oldnames.lib wsock32.lib"
+ OutputFile="$(OutDir)/asnstrip.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ ProgramDatabaseFile="$(OutDir)/asnstrip.pdb"
+ SubSystem="1"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile="$(OutDir)/demo_asnstrip.bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+ >
+ <File
+ RelativePath="..\..\..\..\demo\asnstrip.c"
+ >
+ <FileConfiguration
+ Name="DebugDLL|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="ReleaseDLL|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="DebugDLL|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="ReleaseDLL|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\..\link\mswin\asnstrip.rc"
+ >
+ <FileConfiguration
+ Name="DebugDLL|Win32"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions=""
+ AdditionalIncludeDirectories="\ivanov\ncbi\link\mswin"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions=""
+ AdditionalIncludeDirectories="\ivanov\ncbi\link\mswin"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions=""
+ AdditionalIncludeDirectories="\ivanov\ncbi\link\mswin"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="ReleaseDLL|Win32"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions=""
+ AdditionalIncludeDirectories="\ivanov\ncbi\link\mswin"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="DebugDLL|x64"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions=""
+ AdditionalIncludeDirectories="\ivanov\ncbi\link\mswin"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|x64"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions=""
+ AdditionalIncludeDirectories="\ivanov\ncbi\link\mswin"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|x64"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions=""
+ AdditionalIncludeDirectories="\ivanov\ncbi\link\mswin"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="ReleaseDLL|x64"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions=""
+ AdditionalIncludeDirectories="\ivanov\ncbi\link\mswin"
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
+
diff --git a/make/msvc800_prj/demo/asnval/demo_asnval.vcproj b/make/msvc800_prj/demo/asnval/demo_asnval.vcproj
index a71cf566..1ac619a0 100644
--- a/make/msvc800_prj/demo/asnval/demo_asnval.vcproj
+++ b/make/msvc800_prj/demo/asnval/demo_asnval.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="demo_asnval"
- ProjectGUID="{D13243FE-FD39-476C-BAB7-14C583B3BC9E}"
+ ProjectGUID="{43D2CAEA-F7C5-43AB-9460-53229B1A8CCE}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/demo/bl2seq/demo_bl2seq.vcproj b/make/msvc800_prj/demo/bl2seq/demo_bl2seq.vcproj
index 7e88f6ee..b83969c8 100644
--- a/make/msvc800_prj/demo/bl2seq/demo_bl2seq.vcproj
+++ b/make/msvc800_prj/demo/bl2seq/demo_bl2seq.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="demo_bl2seq"
- ProjectGUID="{E778C1FD-C2F7-47A9-A453-259F6F520B4A}"
+ ProjectGUID="{CFF41F73-FF0C-4EDF-94FD-5FDCB8D0D19F}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/demo/blast/demo_blast.vcproj b/make/msvc800_prj/demo/blast/demo_blast.vcproj
index 4dddf849..88bc6e35 100644
--- a/make/msvc800_prj/demo/blast/demo_blast.vcproj
+++ b/make/msvc800_prj/demo/blast/demo_blast.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="demo_blast"
- ProjectGUID="{F832691F-2EF5-4937-BBB4-626EE814A383}"
+ ProjectGUID="{4E04088C-D796-4227-8227-2539E30F04BD}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/demo/blastall/demo_blastall.vcproj b/make/msvc800_prj/demo/blastall/demo_blastall.vcproj
index 46c1e4a6..e74203c6 100644
--- a/make/msvc800_prj/demo/blastall/demo_blastall.vcproj
+++ b/make/msvc800_prj/demo/blastall/demo_blastall.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="demo_blastall"
- ProjectGUID="{3039EEDE-B503-4E9D-AAEF-79EF07DF3A9B}"
+ ProjectGUID="{36A2447A-460B-4A29-9327-18BE2B7007CB}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/demo/blastclust/demo_blastclust.vcproj b/make/msvc800_prj/demo/blastclust/demo_blastclust.vcproj
index 47718034..287920a4 100644
--- a/make/msvc800_prj/demo/blastclust/demo_blastclust.vcproj
+++ b/make/msvc800_prj/demo/blastclust/demo_blastclust.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="demo_blastclust"
- ProjectGUID="{1C14632F-22E1-40D3-B0C8-1E53C72ED92F}"
+ ProjectGUID="{61F9752D-4AE9-4B68-8D20-FF5CF31631A9}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/demo/blastpgp/demo_blastpgp.vcproj b/make/msvc800_prj/demo/blastpgp/demo_blastpgp.vcproj
index f6da827e..7db75c7c 100644
--- a/make/msvc800_prj/demo/blastpgp/demo_blastpgp.vcproj
+++ b/make/msvc800_prj/demo/blastpgp/demo_blastpgp.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="demo_blastpgp"
- ProjectGUID="{AA8B7736-A934-41FD-A1F2-92FA47FE518E}"
+ ProjectGUID="{9DC94AC5-FEA4-40B1-9F01-B08B899DE64E}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/demo/ccp/demo_ccp.vcproj b/make/msvc800_prj/demo/ccp/demo_ccp.vcproj
index da0f0ff6..387c5cb1 100644
--- a/make/msvc800_prj/demo/ccp/demo_ccp.vcproj
+++ b/make/msvc800_prj/demo/ccp/demo_ccp.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="demo_ccp"
- ProjectGUID="{1E7F80A2-A2F7-43C5-A5CD-D9A745A2D9BC}"
+ ProjectGUID="{F8DA831A-6128-4FB6-A41F-D4051D736D81}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/demo/ccpv/demo_ccpv.vcproj b/make/msvc800_prj/demo/ccpv/demo_ccpv.vcproj
index 9b4c54d4..79fab6ad 100644
--- a/make/msvc800_prj/demo/ccpv/demo_ccpv.vcproj
+++ b/make/msvc800_prj/demo/ccpv/demo_ccpv.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="demo_ccpv"
- ProjectGUID="{4C2CCC7D-3D19-4E13-9317-3927894F0F3B}"
+ ProjectGUID="{3F5FD5F7-2FB9-477E-9011-F09EECEA56E3}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/demo/cdscan/demo_cdscan.vcproj b/make/msvc800_prj/demo/cdscan/demo_cdscan.vcproj
index 54e29923..6816abde 100644
--- a/make/msvc800_prj/demo/cdscan/demo_cdscan.vcproj
+++ b/make/msvc800_prj/demo/cdscan/demo_cdscan.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="demo_cdscan"
- ProjectGUID="{D221EDFA-64EB-479A-B15B-792A90ADE47D}"
+ ProjectGUID="{A8DC9C13-504F-4ED7-B299-ED251D8D7D57}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/demo/checksub/demo_checksub.vcproj b/make/msvc800_prj/demo/checksub/demo_checksub.vcproj
index 13da8d9b..9ce5f193 100644
--- a/make/msvc800_prj/demo/checksub/demo_checksub.vcproj
+++ b/make/msvc800_prj/demo/checksub/demo_checksub.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="demo_checksub"
- ProjectGUID="{83D6FAB0-4A26-4EB6-9B0D-7E665CBE703C}"
+ ProjectGUID="{D6205067-CD94-494E-A553-C3706C7CFB3B}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/demo/cnsgn/demo_cnsgn.vcproj b/make/msvc800_prj/demo/cnsgn/demo_cnsgn.vcproj
index 9da37a4f..a9ed9ca1 100644
--- a/make/msvc800_prj/demo/cnsgn/demo_cnsgn.vcproj
+++ b/make/msvc800_prj/demo/cnsgn/demo_cnsgn.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="demo_cnsgn"
- ProjectGUID="{2874FAEF-31B3-4A57-9CD4-998089E73480}"
+ ProjectGUID="{9BCA1F30-F3E2-4F16-8974-C0C2D3902292}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/demo/cnsgnv/demo_cnsgnv.vcproj b/make/msvc800_prj/demo/cnsgnv/demo_cnsgnv.vcproj
index 396d1f38..259e8a84 100644
--- a/make/msvc800_prj/demo/cnsgnv/demo_cnsgnv.vcproj
+++ b/make/msvc800_prj/demo/cnsgnv/demo_cnsgnv.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="demo_cnsgnv"
- ProjectGUID="{F97DC7EE-9AD3-48A6-8F68-2CFA84F4B38A}"
+ ProjectGUID="{27575CBA-8AD7-4999-995C-694483047B3C}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/demo/cnsrt/demo_cnsrt.vcproj b/make/msvc800_prj/demo/cnsrt/demo_cnsrt.vcproj
index ff21eb0a..2d1abbe7 100644
--- a/make/msvc800_prj/demo/cnsrt/demo_cnsrt.vcproj
+++ b/make/msvc800_prj/demo/cnsrt/demo_cnsrt.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="demo_cnsrt"
- ProjectGUID="{487B891B-190D-4534-9B6F-120C53FB4BB9}"
+ ProjectGUID="{8D7875E5-8DC6-44CA-8B25-6501CC30C301}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/demo/cnsrtv/demo_cnsrtv.vcproj b/make/msvc800_prj/demo/cnsrtv/demo_cnsrtv.vcproj
index c7056c01..48d9b5c9 100644
--- a/make/msvc800_prj/demo/cnsrtv/demo_cnsrtv.vcproj
+++ b/make/msvc800_prj/demo/cnsrtv/demo_cnsrtv.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="demo_cnsrtv"
- ProjectGUID="{750C92D0-CF2F-413E-8D46-CE2D01901322}"
+ ProjectGUID="{6A9781AB-D45C-4D85-971D-04ED02400001}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/demo/copymat/demo_copymat.vcproj b/make/msvc800_prj/demo/copymat/demo_copymat.vcproj
index ed87fd95..b1c0035b 100644
--- a/make/msvc800_prj/demo/copymat/demo_copymat.vcproj
+++ b/make/msvc800_prj/demo/copymat/demo_copymat.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="demo_copymat"
- ProjectGUID="{1DC69786-C012-46C5-8B82-92C093434D05}"
+ ProjectGUID="{090B589F-7704-4D2F-9778-F884AFFB2359}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/demo/dosimple/demo_dosimple.vcproj b/make/msvc800_prj/demo/dosimple/demo_dosimple.vcproj
index fe830be8..bc6223e9 100644
--- a/make/msvc800_prj/demo/dosimple/demo_dosimple.vcproj
+++ b/make/msvc800_prj/demo/dosimple/demo_dosimple.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="demo_dosimple"
- ProjectGUID="{4F4585B4-7710-4BCA-86CE-4766F0F905E8}"
+ ProjectGUID="{C6348B36-F5C4-43A9-8577-4F6646B3D78D}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/demo/dust/demo_dust.vcproj b/make/msvc800_prj/demo/dust/demo_dust.vcproj
index ef57015b..f7074734 100644
--- a/make/msvc800_prj/demo/dust/demo_dust.vcproj
+++ b/make/msvc800_prj/demo/dust/demo_dust.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="demo_dust"
- ProjectGUID="{EC823D54-D2D0-4E00-A831-2BA12DF2AD50}"
+ ProjectGUID="{7D38F129-EF19-4A07-8EDC-AED9E364E2CB}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/demo/dustv/demo_dustv.vcproj b/make/msvc800_prj/demo/dustv/demo_dustv.vcproj
index 9ae0ce28..ecfc128b 100644
--- a/make/msvc800_prj/demo/dustv/demo_dustv.vcproj
+++ b/make/msvc800_prj/demo/dustv/demo_dustv.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="demo_dustv"
- ProjectGUID="{D3DCCB97-8DA8-4F61-BE14-F7078635FE43}"
+ ProjectGUID="{C19E4244-4CAD-40A7-900A-7942991DFB75}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/demo/entrez2/demo_entrez2.vcproj b/make/msvc800_prj/demo/entrez2/demo_entrez2.vcproj
index 2e77fd3a..41428bbd 100644
--- a/make/msvc800_prj/demo/entrez2/demo_entrez2.vcproj
+++ b/make/msvc800_prj/demo/entrez2/demo_entrez2.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="demo_entrez2"
- ProjectGUID="{053F419B-7D93-4051-A624-C6753A0B1A43}"
+ ProjectGUID="{7BFFD010-510A-4C0C-BD77-5845016DABBA}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/demo/epi/demo_epi.vcproj b/make/msvc800_prj/demo/epi/demo_epi.vcproj
index 53c4ef63..fd6be956 100644
--- a/make/msvc800_prj/demo/epi/demo_epi.vcproj
+++ b/make/msvc800_prj/demo/epi/demo_epi.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="demo_epi"
- ProjectGUID="{DAF15754-B721-430A-A1B9-55D6D67C036D}"
+ ProjectGUID="{B487568D-8168-46AC-80AA-86F955301F21}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/demo/epiv/demo_epiv.vcproj b/make/msvc800_prj/demo/epiv/demo_epiv.vcproj
index 895d64f4..2b6f4b84 100644
--- a/make/msvc800_prj/demo/epiv/demo_epiv.vcproj
+++ b/make/msvc800_prj/demo/epiv/demo_epiv.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="demo_epiv"
- ProjectGUID="{7ACBE6DC-0F7B-4071-B3EF-8DFD67CC4D13}"
+ ProjectGUID="{CF28E0B7-FBC4-4850-98C7-0B2716D3A9BC}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/demo/fa2htgs/demo_fa2htgs.vcproj b/make/msvc800_prj/demo/fa2htgs/demo_fa2htgs.vcproj
index 4b84a508..374a9bc8 100644
--- a/make/msvc800_prj/demo/fa2htgs/demo_fa2htgs.vcproj
+++ b/make/msvc800_prj/demo/fa2htgs/demo_fa2htgs.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="demo_fa2htgs"
- ProjectGUID="{0F815DB5-EFA3-482B-8E8C-3DEFFD34F614}"
+ ProjectGUID="{051B2ABA-EDD6-455D-8600-53B8EB79DF21}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/demo/fastacmd/demo_fastacmd.vcproj b/make/msvc800_prj/demo/fastacmd/demo_fastacmd.vcproj
index b86d0d05..4f856fe7 100644
--- a/make/msvc800_prj/demo/fastacmd/demo_fastacmd.vcproj
+++ b/make/msvc800_prj/demo/fastacmd/demo_fastacmd.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="demo_fastacmd"
- ProjectGUID="{C9D7C3C5-2568-46D9-A1C8-08305F90C6A0}"
+ ProjectGUID="{531E4D12-C794-4509-8160-A6B6FCB1FE0C}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/demo/flint/demo_flint.vcproj b/make/msvc800_prj/demo/flint/demo_flint.vcproj
index 88bf69fd..31098e47 100644
--- a/make/msvc800_prj/demo/flint/demo_flint.vcproj
+++ b/make/msvc800_prj/demo/flint/demo_flint.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="demo_flint"
- ProjectGUID="{3EFBB872-C18C-4F90-BA06-286C205E8A8A}"
+ ProjectGUID="{00DEC39E-11F7-40B4-8840-0556F331A964}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/demo/formatdb/demo_formatdb.vcproj b/make/msvc800_prj/demo/formatdb/demo_formatdb.vcproj
index 1947a862..efc4626b 100644
--- a/make/msvc800_prj/demo/formatdb/demo_formatdb.vcproj
+++ b/make/msvc800_prj/demo/formatdb/demo_formatdb.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="demo_formatdb"
- ProjectGUID="{3218262E-1A52-4542-8F22-A49D06C334AC}"
+ ProjectGUID="{FE555145-82E8-4721-B2CB-A60B94658A65}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/demo/formatrpsdb/demo_formatrpsdb.vcproj b/make/msvc800_prj/demo/formatrpsdb/demo_formatrpsdb.vcproj
index 485d96dc..ebe890e6 100644
--- a/make/msvc800_prj/demo/formatrpsdb/demo_formatrpsdb.vcproj
+++ b/make/msvc800_prj/demo/formatrpsdb/demo_formatrpsdb.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="demo_formatrpsdb"
- ProjectGUID="{1DF27097-97DB-4932-BD3B-6F14A92816A3}"
+ ProjectGUID="{C2B3A6D5-5498-4D73-826A-4A839EBA9571}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/demo/gbseqget/demo_gbseqget.vcproj b/make/msvc800_prj/demo/gbseqget/demo_gbseqget.vcproj
index dea18050..a75184c6 100644
--- a/make/msvc800_prj/demo/gbseqget/demo_gbseqget.vcproj
+++ b/make/msvc800_prj/demo/gbseqget/demo_gbseqget.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="demo_gbseqget"
- ProjectGUID="{F2092248-A59C-4CC3-8571-F6F6809919A5}"
+ ProjectGUID="{D92CDEC8-1E56-4F1C-8563-04037BCCB9BD}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/demo/gene2xml/demo_gene2xml.vcproj b/make/msvc800_prj/demo/gene2xml/demo_gene2xml.vcproj
index f633c686..a028df30 100644
--- a/make/msvc800_prj/demo/gene2xml/demo_gene2xml.vcproj
+++ b/make/msvc800_prj/demo/gene2xml/demo_gene2xml.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="demo_gene2xml"
- ProjectGUID="{A276E338-0D0C-4A5C-88C7-531574422EBA}"
+ ProjectGUID="{CCEA00C6-F850-4BDA-B420-6214E40A3469}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/demo/getmesh/demo_getmesh.vcproj b/make/msvc800_prj/demo/getmesh/demo_getmesh.vcproj
index 55d2e9a7..8429048f 100644
--- a/make/msvc800_prj/demo/getmesh/demo_getmesh.vcproj
+++ b/make/msvc800_prj/demo/getmesh/demo_getmesh.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="demo_getmesh"
- ProjectGUID="{A250CCFC-47DA-4895-BC62-66CADA053A52}"
+ ProjectGUID="{EB8FB82E-5466-4430-9BD2-17CF562E8349}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/demo/getpub/demo_getpub.vcproj b/make/msvc800_prj/demo/getpub/demo_getpub.vcproj
index 8c4f8d2f..f2ac9ba5 100644
--- a/make/msvc800_prj/demo/getpub/demo_getpub.vcproj
+++ b/make/msvc800_prj/demo/getpub/demo_getpub.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="demo_getpub"
- ProjectGUID="{876560CC-AE03-49C7-9FA8-D1656CB7F040}"
+ ProjectGUID="{1557FB61-9785-4955-ACB3-259F8695AA61}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/demo/gil2bin/demo_gil2bin.vcproj b/make/msvc800_prj/demo/gil2bin/demo_gil2bin.vcproj
index 7e71d9d5..0d8e20e5 100644
--- a/make/msvc800_prj/demo/gil2bin/demo_gil2bin.vcproj
+++ b/make/msvc800_prj/demo/gil2bin/demo_gil2bin.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="demo_gil2bin"
- ProjectGUID="{FD45D87E-E729-4BA2-90A6-F42C1ACD2CA4}"
+ ProjectGUID="{61AC31CE-6BF2-4C4A-97C7-7DE62A2A546E}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/demo/impala/demo_impala.vcproj b/make/msvc800_prj/demo/impala/demo_impala.vcproj
index f7bca06e..53bab9e5 100644
--- a/make/msvc800_prj/demo/impala/demo_impala.vcproj
+++ b/make/msvc800_prj/demo/impala/demo_impala.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="demo_impala"
- ProjectGUID="{D962509C-BBA8-43AC-BDB9-4D420B16D099}"
+ ProjectGUID="{B641C7E0-F29C-422C-B3C0-BC3C103BC973}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/demo/indexpub/demo_indexpub.vcproj b/make/msvc800_prj/demo/indexpub/demo_indexpub.vcproj
index 20dc8442..5c7a2931 100644
--- a/make/msvc800_prj/demo/indexpub/demo_indexpub.vcproj
+++ b/make/msvc800_prj/demo/indexpub/demo_indexpub.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="demo_indexpub"
- ProjectGUID="{86E2DEFE-91A2-400B-A093-82B0DE4968C0}"
+ ProjectGUID="{7FD62FF2-E65C-45F1-9BF3-12CD2D78C7A5}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/demo/insdseqget/demo_insdseqget.vcproj b/make/msvc800_prj/demo/insdseqget/demo_insdseqget.vcproj
index e445fb71..dbab06d2 100644
--- a/make/msvc800_prj/demo/insdseqget/demo_insdseqget.vcproj
+++ b/make/msvc800_prj/demo/insdseqget/demo_insdseqget.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="demo_insdseqget"
- ProjectGUID="{D3399079-037C-4873-AB41-8535E0F5124E}"
+ ProjectGUID="{DF2DCFDD-1AFC-418A-80AC-EA2624BB534A}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/demo/makemat/demo_makemat.vcproj b/make/msvc800_prj/demo/makemat/demo_makemat.vcproj
index bafd8c4c..143aa8e7 100644
--- a/make/msvc800_prj/demo/makemat/demo_makemat.vcproj
+++ b/make/msvc800_prj/demo/makemat/demo_makemat.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="demo_makemat"
- ProjectGUID="{9B82B22D-3287-4512-9C61-054CF931C402}"
+ ProjectGUID="{939AD270-6758-4304-9B42-F776B03B2B30}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/demo/megablast/demo_megablast.vcproj b/make/msvc800_prj/demo/megablast/demo_megablast.vcproj
index 9eeaf831..c60c2869 100644
--- a/make/msvc800_prj/demo/megablast/demo_megablast.vcproj
+++ b/make/msvc800_prj/demo/megablast/demo_megablast.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="demo_megablast"
- ProjectGUID="{6B0FCA0A-B988-4994-9343-8860CABDD9D2}"
+ ProjectGUID="{7B92691D-13E1-400B-BFDA-1C085DB12DC7}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/demo/nentrez/demo_nentrez.vcproj b/make/msvc800_prj/demo/nentrez/demo_nentrez.vcproj
index c7586233..94754cd8 100644
--- a/make/msvc800_prj/demo/nentrez/demo_nentrez.vcproj
+++ b/make/msvc800_prj/demo/nentrez/demo_nentrez.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="demo_nentrez"
- ProjectGUID="{3657A377-E327-4B16-9EE9-16E0E1ECFCE9}"
+ ProjectGUID="{02F5DB27-2C2D-4995-AE03-AE866FD0D726}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/demo/nentrez_ogl/demo_nentrez_ogl.vcproj b/make/msvc800_prj/demo/nentrez_ogl/demo_nentrez_ogl.vcproj
index 650b9ed1..f02cf558 100644
--- a/make/msvc800_prj/demo/nentrez_ogl/demo_nentrez_ogl.vcproj
+++ b/make/msvc800_prj/demo/nentrez_ogl/demo_nentrez_ogl.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="demo_nentrez_ogl"
- ProjectGUID="{0DF9D837-5184-4BB7-BFF0-FF679C5EB7AF}"
+ ProjectGUID="{13E51223-EDBF-46E1-A98A-895FB3685000}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/demo/netentcf/demo_netentcf.vcproj b/make/msvc800_prj/demo/netentcf/demo_netentcf.vcproj
index 46e63955..8f6f0020 100644
--- a/make/msvc800_prj/demo/netentcf/demo_netentcf.vcproj
+++ b/make/msvc800_prj/demo/netentcf/demo_netentcf.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="demo_netentcf"
- ProjectGUID="{AD4D8660-5128-4DAA-9CC9-BB4ABE051C4E}"
+ ProjectGUID="{4BCEFEBE-22AD-4D8E-BE1F-19FF5925271D}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/demo/raw2delt/demo_raw2delt.vcproj b/make/msvc800_prj/demo/raw2delt/demo_raw2delt.vcproj
new file mode 100644
index 00000000..a45aef6d
--- /dev/null
+++ b/make/msvc800_prj/demo/raw2delt/demo_raw2delt.vcproj
@@ -0,0 +1,949 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="demo_raw2delt"
+ ProjectGUID="{E6270A0D-B665-450E-BA6A-B9D648D5B145}"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ <Platform
+ Name="x64"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="1"
+ TypeLibraryName="$(OutDir)/demo_raw2delt.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..,..\..\..\..\corelib,..\..\..\..\api,..\..\..\..\asnstat,..\..\..\..\asnlib,..\..\..\..\access,..\..\..\..\object"
+ PreprocessorDefinitions="_CONSOLE;WIN32;_DEBUG"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ RuntimeTypeInfo="true"
+ PrecompiledHeaderFile="$(IntDir)/demo_raw2delt.pch"
+ AssemblerListingLocation="$(IntDir)/"
+ ObjectFile="$(IntDir)/"
+ ProgramDataBaseFileName="$(IntDir)/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="1"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="oldnames.lib wsock32.lib"
+ OutputFile="$(OutDir)/raw2delt.exe"
+ LinkIncremental="2"
+ SuppressStartupBanner="true"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)/raw2delt.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile="$(OutDir)/demo_raw2delt.bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="DebugDLL|Win32"
+ OutputDirectory=".\DebugDLL"
+ IntermediateDirectory=".\DebugDLL"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="1"
+ TypeLibraryName="$(OutDir)/demo_raw2delt.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..,..\..\..\..\corelib,..\..\..\..\api,..\..\..\..\asnstat,..\..\..\..\asnlib,..\..\..\..\access,..\..\..\..\object"
+ PreprocessorDefinitions="_CONSOLE;WIN32;_DEBUG"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ RuntimeTypeInfo="true"
+ PrecompiledHeaderFile="$(IntDir)/demo_raw2delt.pch"
+ AssemblerListingLocation="$(IntDir)/"
+ ObjectFile="$(IntDir)/"
+ ProgramDataBaseFileName="$(IntDir)/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="1"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="oldnames.lib wsock32.lib"
+ OutputFile="$(OutDir)/raw2delt.exe"
+ LinkIncremental="2"
+ SuppressStartupBanner="true"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)/raw2delt.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile="$(OutDir)/demo_raw2delt.bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory=".\Release"
+ IntermediateDirectory=".\Release"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="1"
+ TypeLibraryName="$(OutDir)/demo_raw2delt.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..,..\..\..\..\corelib,..\..\..\..\api,..\..\..\..\asnstat,..\..\..\..\asnlib,..\..\..\..\access,..\..\..\..\object"
+ PreprocessorDefinitions="_CONSOLE;WIN32;NDEBUG"
+ StringPooling="true"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ RuntimeTypeInfo="true"
+ PrecompiledHeaderFile="$(IntDir)/demo_raw2delt.pch"
+ AssemblerListingLocation="$(IntDir)/"
+ ObjectFile="$(IntDir)/"
+ ProgramDataBaseFileName="$(IntDir)/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="oldnames.lib wsock32.lib"
+ OutputFile="$(OutDir)/raw2delt.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ ProgramDatabaseFile="$(OutDir)/raw2delt.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile="$(OutDir)/demo_raw2delt.bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="ReleaseDLL|Win32"
+ OutputDirectory=".\ReleaseDLL"
+ IntermediateDirectory=".\ReleaseDLL"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="1"
+ TypeLibraryName="$(OutDir)/demo_raw2delt.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..,..\..\..\..\corelib,..\..\..\..\api,..\..\..\..\asnstat,..\..\..\..\asnlib,..\..\..\..\access,..\..\..\..\object"
+ PreprocessorDefinitions="_CONSOLE;WIN32;NDEBUG"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ RuntimeTypeInfo="true"
+ PrecompiledHeaderFile="$(IntDir)/demo_raw2delt.pch"
+ AssemblerListingLocation="$(IntDir)/"
+ ObjectFile="$(IntDir)/"
+ ProgramDataBaseFileName="$(IntDir)/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="oldnames.lib wsock32.lib"
+ OutputFile="$(OutDir)/raw2delt.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ ProgramDatabaseFile="$(OutDir)/raw2delt.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile="$(OutDir)/demo_raw2delt.bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|x64"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="3"
+ TypeLibraryName="$(OutDir)/demo_raw2delt.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..,..\..\..\..\corelib,..\..\..\..\api,..\..\..\..\asnstat,..\..\..\..\asnlib,..\..\..\..\access,..\..\..\..\object"
+ PreprocessorDefinitions="_CONSOLE;WIN32;_DEBUG"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ RuntimeTypeInfo="true"
+ PrecompiledHeaderFile="$(IntDir)/demo_raw2delt.pch"
+ AssemblerListingLocation="$(IntDir)/"
+ ObjectFile="$(IntDir)/"
+ ProgramDataBaseFileName="$(IntDir)/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="1"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="oldnames.lib wsock32.lib"
+ OutputFile="$(OutDir)/raw2delt.exe"
+ LinkIncremental="2"
+ SuppressStartupBanner="true"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)/raw2delt.pdb"
+ SubSystem="1"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile="$(OutDir)/demo_raw2delt.bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="DebugDLL|x64"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="3"
+ TypeLibraryName="$(OutDir)/demo_raw2delt.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..,..\..\..\..\corelib,..\..\..\..\api,..\..\..\..\asnstat,..\..\..\..\asnlib,..\..\..\..\access,..\..\..\..\object"
+ PreprocessorDefinitions="_CONSOLE;WIN32;_DEBUG"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ RuntimeTypeInfo="true"
+ PrecompiledHeaderFile="$(IntDir)/demo_raw2delt.pch"
+ AssemblerListingLocation="$(IntDir)/"
+ ObjectFile="$(IntDir)/"
+ ProgramDataBaseFileName="$(IntDir)/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="1"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="oldnames.lib wsock32.lib"
+ OutputFile="$(OutDir)/raw2delt.exe"
+ LinkIncremental="2"
+ SuppressStartupBanner="true"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)/raw2delt.pdb"
+ SubSystem="1"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile="$(OutDir)/demo_raw2delt.bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|x64"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="3"
+ TypeLibraryName="$(OutDir)/demo_raw2delt.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..,..\..\..\..\corelib,..\..\..\..\api,..\..\..\..\asnstat,..\..\..\..\asnlib,..\..\..\..\access,..\..\..\..\object"
+ PreprocessorDefinitions="_CONSOLE;WIN32;NDEBUG"
+ StringPooling="true"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ RuntimeTypeInfo="true"
+ PrecompiledHeaderFile="$(IntDir)/demo_raw2delt.pch"
+ AssemblerListingLocation="$(IntDir)/"
+ ObjectFile="$(IntDir)/"
+ ProgramDataBaseFileName="$(IntDir)/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="oldnames.lib wsock32.lib"
+ OutputFile="$(OutDir)/raw2delt.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ ProgramDatabaseFile="$(OutDir)/raw2delt.pdb"
+ SubSystem="1"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile="$(OutDir)/demo_raw2delt.bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="ReleaseDLL|x64"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="3"
+ TypeLibraryName="$(OutDir)/demo_raw2delt.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..,..\..\..\..\corelib,..\..\..\..\api,..\..\..\..\asnstat,..\..\..\..\asnlib,..\..\..\..\access,..\..\..\..\object"
+ PreprocessorDefinitions="_CONSOLE;WIN32;NDEBUG"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ RuntimeTypeInfo="true"
+ PrecompiledHeaderFile="$(IntDir)/demo_raw2delt.pch"
+ AssemblerListingLocation="$(IntDir)/"
+ ObjectFile="$(IntDir)/"
+ ProgramDataBaseFileName="$(IntDir)/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="oldnames.lib wsock32.lib"
+ OutputFile="$(OutDir)/raw2delt.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ ProgramDatabaseFile="$(OutDir)/raw2delt.pdb"
+ SubSystem="1"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile="$(OutDir)/demo_raw2delt.bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+ >
+ <File
+ RelativePath="..\..\..\..\demo\raw2delt.c"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="DebugDLL|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="ReleaseDLL|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="DebugDLL|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="ReleaseDLL|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\..\link\mswin\raw2delt.rc"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions=""
+ AdditionalIncludeDirectories="\ivanov\ncbi\link\mswin"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="DebugDLL|Win32"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions=""
+ AdditionalIncludeDirectories="\ivanov\ncbi\link\mswin"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions=""
+ AdditionalIncludeDirectories="\ivanov\ncbi\link\mswin"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="ReleaseDLL|Win32"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions=""
+ AdditionalIncludeDirectories="\ivanov\ncbi\link\mswin"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|x64"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions=""
+ AdditionalIncludeDirectories="\ivanov\ncbi\link\mswin"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="DebugDLL|x64"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions=""
+ AdditionalIncludeDirectories="\ivanov\ncbi\link\mswin"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|x64"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions=""
+ AdditionalIncludeDirectories="\ivanov\ncbi\link\mswin"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="ReleaseDLL|x64"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions=""
+ AdditionalIncludeDirectories="\ivanov\ncbi\link\mswin"
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
+
diff --git a/make/msvc800_prj/demo/rpsblast/demo_rpsblast.vcproj b/make/msvc800_prj/demo/rpsblast/demo_rpsblast.vcproj
index fda59283..e55acf1a 100644
--- a/make/msvc800_prj/demo/rpsblast/demo_rpsblast.vcproj
+++ b/make/msvc800_prj/demo/rpsblast/demo_rpsblast.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="demo_rpsblast"
- ProjectGUID="{8DD4CBD4-79DB-433D-86D3-FF9C61DC86A3}"
+ ProjectGUID="{84BE55F0-B6BE-4DFA-B387-4D09C24B4875}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/demo/searchv/demo_searchv.vcproj b/make/msvc800_prj/demo/searchv/demo_searchv.vcproj
index 5d315a8c..b047ba87 100644
--- a/make/msvc800_prj/demo/searchv/demo_searchv.vcproj
+++ b/make/msvc800_prj/demo/searchv/demo_searchv.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="demo_searchv"
- ProjectGUID="{8BA07548-3F40-4D95-8BF5-ED3F257ACB96}"
+ ProjectGUID="{478B9CE3-2141-4C1C-A54C-984865DF5930}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/demo/seedtop/demo_seedtop.vcproj b/make/msvc800_prj/demo/seedtop/demo_seedtop.vcproj
index 1f820a8c..ef243d51 100644
--- a/make/msvc800_prj/demo/seedtop/demo_seedtop.vcproj
+++ b/make/msvc800_prj/demo/seedtop/demo_seedtop.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="demo_seedtop"
- ProjectGUID="{33854DD9-B6AE-4BBA-9188-0A6AF2B9F098}"
+ ProjectGUID="{136554B9-6A33-46F2-9595-5B3E90A00553}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/demo/seqtest/demo_seqtest.vcproj b/make/msvc800_prj/demo/seqtest/demo_seqtest.vcproj
index c8c7aee5..11ef80f1 100644
--- a/make/msvc800_prj/demo/seqtest/demo_seqtest.vcproj
+++ b/make/msvc800_prj/demo/seqtest/demo_seqtest.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="demo_seqtest"
- ProjectGUID="{4B5696EE-C2E8-49D1-A0ED-4E54AF811221}"
+ ProjectGUID="{05C7D1D5-557E-4868-90BB-2F7B1B0DB9C6}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/demo/sigme/demo_sigme.vcproj b/make/msvc800_prj/demo/sigme/demo_sigme.vcproj
index f6701560..14160b4a 100644
--- a/make/msvc800_prj/demo/sigme/demo_sigme.vcproj
+++ b/make/msvc800_prj/demo/sigme/demo_sigme.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="demo_sigme"
- ProjectGUID="{6C98CBEC-6EEF-472F-9BD2-80CF04B58E84}"
+ ProjectGUID="{2861713F-5EA6-486E-AE98-55CC4200305E}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/demo/sigmev/demo_sigmev.vcproj b/make/msvc800_prj/demo/sigmev/demo_sigmev.vcproj
index 68355018..a5cd921b 100644
--- a/make/msvc800_prj/demo/sigmev/demo_sigmev.vcproj
+++ b/make/msvc800_prj/demo/sigmev/demo_sigmev.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="demo_sigmev"
- ProjectGUID="{AED09298-117B-4D01-8C01-45F820D3BDE8}"
+ ProjectGUID="{00EABCA8-578E-4BC9-A0DA-5006B5C28A3A}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/demo/spidey/demo_spidey.vcproj b/make/msvc800_prj/demo/spidey/demo_spidey.vcproj
index 22cf153d..300307cc 100644
--- a/make/msvc800_prj/demo/spidey/demo_spidey.vcproj
+++ b/make/msvc800_prj/demo/spidey/demo_spidey.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="demo_spidey"
- ProjectGUID="{E85FC734-1E47-413F-82E3-A83908FC3A77}"
+ ProjectGUID="{931A5E4E-E25D-4895-B202-E1D1B3F37ED1}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/demo/srchaa/demo_srchaa.vcproj b/make/msvc800_prj/demo/srchaa/demo_srchaa.vcproj
index f1deb033..d53ef88d 100644
--- a/make/msvc800_prj/demo/srchaa/demo_srchaa.vcproj
+++ b/make/msvc800_prj/demo/srchaa/demo_srchaa.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="demo_srchaa"
- ProjectGUID="{D2928CA0-E664-4C71-9254-AD1B1CB9A201}"
+ ProjectGUID="{A40990ED-A5F2-4175-A8A5-DEE67FDFD64A}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/demo/srchnt/demo_srchnt.vcproj b/make/msvc800_prj/demo/srchnt/demo_srchnt.vcproj
index 1ba2744d..4d810aff 100644
--- a/make/msvc800_prj/demo/srchnt/demo_srchnt.vcproj
+++ b/make/msvc800_prj/demo/srchnt/demo_srchnt.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="demo_srchnt"
- ProjectGUID="{924EF5EC-35C3-41A2-AB29-827D491DA574}"
+ ProjectGUID="{29EAEDFD-B486-433D-8809-7C4B298BFF17}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/demo/tbl2asn/demo_tbl2asn.vcproj b/make/msvc800_prj/demo/tbl2asn/demo_tbl2asn.vcproj
index 4df1de21..c335c47b 100644
--- a/make/msvc800_prj/demo/tbl2asn/demo_tbl2asn.vcproj
+++ b/make/msvc800_prj/demo/tbl2asn/demo_tbl2asn.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="demo_tbl2asn"
- ProjectGUID="{42E5A984-7EA8-4DF0-9918-970247935C64}"
+ ProjectGUID="{F7125366-276A-455F-A1AA-80846F7BE09F}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/demo/testcore/demo_testcore.vcproj b/make/msvc800_prj/demo/testcore/demo_testcore.vcproj
index a6c2afa4..c0b2a6c8 100644
--- a/make/msvc800_prj/demo/testcore/demo_testcore.vcproj
+++ b/make/msvc800_prj/demo/testcore/demo_testcore.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="demo_testcore"
- ProjectGUID="{3684FA7A-0E39-4377-876F-17FA3C6869F2}"
+ ProjectGUID="{986196FD-0900-451E-818F-7373FBAFF793}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/demo/testobj/demo_testobj.vcproj b/make/msvc800_prj/demo/testobj/demo_testobj.vcproj
index 3f1157a9..c2e47817 100644
--- a/make/msvc800_prj/demo/testobj/demo_testobj.vcproj
+++ b/make/msvc800_prj/demo/testobj/demo_testobj.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="demo_testobj"
- ProjectGUID="{69D59444-9FA8-41D4-82AC-1CA12A8F160F}"
+ ProjectGUID="{09DBA8E7-7471-4D6D-B6EF-5B8B2B32A020}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/demo/twop/demo_twop.vcproj b/make/msvc800_prj/demo/twop/demo_twop.vcproj
index 4d8c544d..2113d9ae 100644
--- a/make/msvc800_prj/demo/twop/demo_twop.vcproj
+++ b/make/msvc800_prj/demo/twop/demo_twop.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="demo_twop"
- ProjectGUID="{C015E441-C32E-4F5F-9DCA-9B9329E3B7C0}"
+ ProjectGUID="{B592842F-6270-4C2E-8FBC-DBE1D5EF71D0}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/demo/twopv/demo_twopv.vcproj b/make/msvc800_prj/demo/twopv/demo_twopv.vcproj
index afedf012..a6e09e12 100644
--- a/make/msvc800_prj/demo/twopv/demo_twopv.vcproj
+++ b/make/msvc800_prj/demo/twopv/demo_twopv.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="demo_twopv"
- ProjectGUID="{8C72F165-0AC2-4462-BAB9-8AE276273AC0}"
+ ProjectGUID="{FAB79DB6-B9B5-4FDA-B2FB-17B4BEB6011F}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/demo/udv/demo_udv.vcproj b/make/msvc800_prj/demo/udv/demo_udv.vcproj
index 15b72cb2..df9a1cce 100644
--- a/make/msvc800_prj/demo/udv/demo_udv.vcproj
+++ b/make/msvc800_prj/demo/udv/demo_udv.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="demo_udv"
- ProjectGUID="{914A88CB-0667-40BC-8F0F-4594BA7B9D85}"
+ ProjectGUID="{5E35A42F-8E72-4ED7-ABA3-469E86F14DB8}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/demo/vecscreen/demo_vecscreen.vcproj b/make/msvc800_prj/demo/vecscreen/demo_vecscreen.vcproj
index 971994cd..6e730bd8 100644
--- a/make/msvc800_prj/demo/vecscreen/demo_vecscreen.vcproj
+++ b/make/msvc800_prj/demo/vecscreen/demo_vecscreen.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="demo_vecscreen"
- ProjectGUID="{805D635B-FA95-4A2B-A5DD-1EC3667AE7B1}"
+ ProjectGUID="{B9B3203E-0C07-46DB-BABE-3024B22F923C}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/desktop/ncbidesk.vcproj b/make/msvc800_prj/desktop/ncbidesk.vcproj
index 2d1b0434..769d0fe6 100644
--- a/make/msvc800_prj/desktop/ncbidesk.vcproj
+++ b/make/msvc800_prj/desktop/ncbidesk.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="ncbidesk"
- ProjectGUID="{FD5A8225-8809-4FFB-9190-B6403A2AD467}"
+ ProjectGUID="{BDDE8ABD-4E45-49DA-B499-131BD6FCABBD}"
>
<Platforms>
<Platform
@@ -2601,6 +2601,82 @@
</FileConfiguration>
</File>
<File
+ RelativePath="..\..\..\desktop\macrodlg.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="ReleaseDLL|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="DebugDLL|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="ReleaseDLL|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="DebugDLL|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
RelativePath="..\..\..\desktop\mapgene.c"
>
<FileConfiguration
@@ -5126,6 +5202,10 @@
>
</File>
<File
+ RelativePath="..\..\..\desktop\macrodlg.h"
+ >
+ </File>
+ <File
RelativePath="..\..\..\desktop\mapgene.h"
>
</File>
diff --git a/make/msvc800_prj/gif/vibgif.vcproj b/make/msvc800_prj/gif/vibgif.vcproj
index 4ab41f7c..6cb4b078 100644
--- a/make/msvc800_prj/gif/vibgif.vcproj
+++ b/make/msvc800_prj/gif/vibgif.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="vibgif"
- ProjectGUID="{08C550B7-3DA6-46A6-96EB-A48806F1900C}"
+ ProjectGUID="{A0F67E98-8A07-4319-A3E8-B983D522D8CA}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/internal/all_internal.vcproj b/make/msvc800_prj/internal/all_internal.vcproj
index 43b489bf..88ed831e 100644
--- a/make/msvc800_prj/internal/all_internal.vcproj
+++ b/make/msvc800_prj/internal/all_internal.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="all_internal"
- ProjectGUID="{FEA214E0-E333-43A5-BD15-E5902264A91A}"
+ ProjectGUID="{53EC88ED-74CA-4F01-8FDB-94989A896E22}"
Keyword="MakeFileProj"
>
<Platforms>
diff --git a/make/msvc800_prj/internal/smart/smartnet/smartnet.vcproj b/make/msvc800_prj/internal/smart/smartnet/smartnet.vcproj
index 04470847..1b0cfddc 100644
--- a/make/msvc800_prj/internal/smart/smartnet/smartnet.vcproj
+++ b/make/msvc800_prj/internal/smart/smartnet/smartnet.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="smartnet"
- ProjectGUID="{2B743DB7-9F8B-4652-B45D-04E23AE2B547}"
+ ProjectGUID="{43337FCD-B171-4441-B44E-D1C90C2700EE}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/ncbi.sln b/make/msvc800_prj/ncbi.sln
index 0a5bc3dd..5d1b3554 100644
--- a/make/msvc800_prj/ncbi.sln
+++ b/make/msvc800_prj/ncbi.sln
@@ -1,1248 +1,1296 @@

Microsoft Visual Studio Solution File, Format Version 9.00
# Visual Studio 2005
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "all", "all.vcproj", "{27665816-D337-4E8D-AA41-AEB7CA3C7FF1}"
- ProjectSection(ProjectDependencies) = postProject
- {0204EA88-C175-4970-922F-6F2C4FDA52EE} = {0204EA88-C175-4970-922F-6F2C4FDA52EE}
- {4109D7F4-1D18-495F-B5C7-DFEA565DE9C6} = {4109D7F4-1D18-495F-B5C7-DFEA565DE9C6}
- {D786BB9A-FC43-4C02-B1F8-A7F96B2B6D1C} = {D786BB9A-FC43-4C02-B1F8-A7F96B2B6D1C}
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "all_demo", "all_demo.vcproj", "{D786BB9A-FC43-4C02-B1F8-A7F96B2B6D1C}"
- ProjectSection(ProjectDependencies) = postProject
- {8FBFAE5E-50CA-42EF-B614-BEA3252064BD} = {8FBFAE5E-50CA-42EF-B614-BEA3252064BD}
- {BD7E75D1-DEDC-450E-A3E5-4823C06100D5} = {BD7E75D1-DEDC-450E-A3E5-4823C06100D5}
- {67F5D600-6FE3-420E-B9F3-7EA1DD452FC9} = {67F5D600-6FE3-420E-B9F3-7EA1DD452FC9}
- {A40959E8-B640-49F7-B2E0-806A03544AB5} = {A40959E8-B640-49F7-B2E0-806A03544AB5}
- {AA4B7095-5FBB-41E5-AE2A-39247638EC14} = {AA4B7095-5FBB-41E5-AE2A-39247638EC14}
- {42140DF3-03C5-4A99-9D7B-F4385733D694} = {42140DF3-03C5-4A99-9D7B-F4385733D694}
- {C5FFDC7A-C2A7-49C0-9EED-92D987AC3AC9} = {C5FFDC7A-C2A7-49C0-9EED-92D987AC3AC9}
- {8B6B0E08-62BA-4E92-8672-06CCA7432096} = {8B6B0E08-62BA-4E92-8672-06CCA7432096}
- {57BABFE8-331D-41A9-8776-314F2D8791E2} = {57BABFE8-331D-41A9-8776-314F2D8791E2}
- {032E43BB-816C-4BEE-9ABD-1E0B599C007A} = {032E43BB-816C-4BEE-9ABD-1E0B599C007A}
- {AAD6BEB3-618D-492E-BFC8-D3892D9D26AB} = {AAD6BEB3-618D-492E-BFC8-D3892D9D26AB}
- {A6AC837C-8852-48B3-9232-57A2493AEDA4} = {A6AC837C-8852-48B3-9232-57A2493AEDA4}
- {E85F8917-C596-477B-8D92-851E3726DE96} = {E85F8917-C596-477B-8D92-851E3726DE96}
- {AD565A88-01DA-4401-8E8F-53CCF8C759B5} = {AD565A88-01DA-4401-8E8F-53CCF8C759B5}
- {9149ED1B-E896-4A64-A3D2-C42FC10A7F63} = {9149ED1B-E896-4A64-A3D2-C42FC10A7F63}
- {1F10C6E1-3C88-4C78-9C18-05AC31B2421F} = {1F10C6E1-3C88-4C78-9C18-05AC31B2421F}
- {A73BBA44-40FF-4306-AF50-94737CD49839} = {A73BBA44-40FF-4306-AF50-94737CD49839}
- {805D635B-FA95-4A2B-A5DD-1EC3667AE7B1} = {805D635B-FA95-4A2B-A5DD-1EC3667AE7B1}
- {914A88CB-0667-40BC-8F0F-4594BA7B9D85} = {914A88CB-0667-40BC-8F0F-4594BA7B9D85}
- {8C72F165-0AC2-4462-BAB9-8AE276273AC0} = {8C72F165-0AC2-4462-BAB9-8AE276273AC0}
- {C015E441-C32E-4F5F-9DCA-9B9329E3B7C0} = {C015E441-C32E-4F5F-9DCA-9B9329E3B7C0}
- {69D59444-9FA8-41D4-82AC-1CA12A8F160F} = {69D59444-9FA8-41D4-82AC-1CA12A8F160F}
- {3684FA7A-0E39-4377-876F-17FA3C6869F2} = {3684FA7A-0E39-4377-876F-17FA3C6869F2}
- {42E5A984-7EA8-4DF0-9918-970247935C64} = {42E5A984-7EA8-4DF0-9918-970247935C64}
- {924EF5EC-35C3-41A2-AB29-827D491DA574} = {924EF5EC-35C3-41A2-AB29-827D491DA574}
- {D2928CA0-E664-4C71-9254-AD1B1CB9A201} = {D2928CA0-E664-4C71-9254-AD1B1CB9A201}
- {E85FC734-1E47-413F-82E3-A83908FC3A77} = {E85FC734-1E47-413F-82E3-A83908FC3A77}
- {AED09298-117B-4D01-8C01-45F820D3BDE8} = {AED09298-117B-4D01-8C01-45F820D3BDE8}
- {6C98CBEC-6EEF-472F-9BD2-80CF04B58E84} = {6C98CBEC-6EEF-472F-9BD2-80CF04B58E84}
- {4B5696EE-C2E8-49D1-A0ED-4E54AF811221} = {4B5696EE-C2E8-49D1-A0ED-4E54AF811221}
- {33854DD9-B6AE-4BBA-9188-0A6AF2B9F098} = {33854DD9-B6AE-4BBA-9188-0A6AF2B9F098}
- {8BA07548-3F40-4D95-8BF5-ED3F257ACB96} = {8BA07548-3F40-4D95-8BF5-ED3F257ACB96}
- {8DD4CBD4-79DB-433D-86D3-FF9C61DC86A3} = {8DD4CBD4-79DB-433D-86D3-FF9C61DC86A3}
- {CCA73A4F-96E8-48BE-A1B6-77EC3697584C} = {CCA73A4F-96E8-48BE-A1B6-77EC3697584C}
- {D0B197BF-1409-4108-81C0-A2754CD97ADA} = {D0B197BF-1409-4108-81C0-A2754CD97ADA}
- {AD4D8660-5128-4DAA-9CC9-BB4ABE051C4E} = {AD4D8660-5128-4DAA-9CC9-BB4ABE051C4E}
- {0DF9D837-5184-4BB7-BFF0-FF679C5EB7AF} = {0DF9D837-5184-4BB7-BFF0-FF679C5EB7AF}
- {3657A377-E327-4B16-9EE9-16E0E1ECFCE9} = {3657A377-E327-4B16-9EE9-16E0E1ECFCE9}
- {6B0FCA0A-B988-4994-9343-8860CABDD9D2} = {6B0FCA0A-B988-4994-9343-8860CABDD9D2}
- {9B82B22D-3287-4512-9C61-054CF931C402} = {9B82B22D-3287-4512-9C61-054CF931C402}
- {86E2DEFE-91A2-400B-A093-82B0DE4968C0} = {86E2DEFE-91A2-400B-A093-82B0DE4968C0}
- {D3399079-037C-4873-AB41-8535E0F5124E} = {D3399079-037C-4873-AB41-8535E0F5124E}
- {D962509C-BBA8-43AC-BDB9-4D420B16D099} = {D962509C-BBA8-43AC-BDB9-4D420B16D099}
- {FD45D87E-E729-4BA2-90A6-F42C1ACD2CA4} = {FD45D87E-E729-4BA2-90A6-F42C1ACD2CA4}
- {876560CC-AE03-49C7-9FA8-D1656CB7F040} = {876560CC-AE03-49C7-9FA8-D1656CB7F040}
- {A250CCFC-47DA-4895-BC62-66CADA053A52} = {A250CCFC-47DA-4895-BC62-66CADA053A52}
- {A276E338-0D0C-4A5C-88C7-531574422EBA} = {A276E338-0D0C-4A5C-88C7-531574422EBA}
- {F2092248-A59C-4CC3-8571-F6F6809919A5} = {F2092248-A59C-4CC3-8571-F6F6809919A5}
- {1DF27097-97DB-4932-BD3B-6F14A92816A3} = {1DF27097-97DB-4932-BD3B-6F14A92816A3}
- {3218262E-1A52-4542-8F22-A49D06C334AC} = {3218262E-1A52-4542-8F22-A49D06C334AC}
- {3EFBB872-C18C-4F90-BA06-286C205E8A8A} = {3EFBB872-C18C-4F90-BA06-286C205E8A8A}
- {C9D7C3C5-2568-46D9-A1C8-08305F90C6A0} = {C9D7C3C5-2568-46D9-A1C8-08305F90C6A0}
- {0F815DB5-EFA3-482B-8E8C-3DEFFD34F614} = {0F815DB5-EFA3-482B-8E8C-3DEFFD34F614}
- {7ACBE6DC-0F7B-4071-B3EF-8DFD67CC4D13} = {7ACBE6DC-0F7B-4071-B3EF-8DFD67CC4D13}
- {DAF15754-B721-430A-A1B9-55D6D67C036D} = {DAF15754-B721-430A-A1B9-55D6D67C036D}
- {053F419B-7D93-4051-A624-C6753A0B1A43} = {053F419B-7D93-4051-A624-C6753A0B1A43}
- {D3DCCB97-8DA8-4F61-BE14-F7078635FE43} = {D3DCCB97-8DA8-4F61-BE14-F7078635FE43}
- {EC823D54-D2D0-4E00-A831-2BA12DF2AD50} = {EC823D54-D2D0-4E00-A831-2BA12DF2AD50}
- {4F4585B4-7710-4BCA-86CE-4766F0F905E8} = {4F4585B4-7710-4BCA-86CE-4766F0F905E8}
- {1DC69786-C012-46C5-8B82-92C093434D05} = {1DC69786-C012-46C5-8B82-92C093434D05}
- {750C92D0-CF2F-413E-8D46-CE2D01901322} = {750C92D0-CF2F-413E-8D46-CE2D01901322}
- {487B891B-190D-4534-9B6F-120C53FB4BB9} = {487B891B-190D-4534-9B6F-120C53FB4BB9}
- {F97DC7EE-9AD3-48A6-8F68-2CFA84F4B38A} = {F97DC7EE-9AD3-48A6-8F68-2CFA84F4B38A}
- {2874FAEF-31B3-4A57-9CD4-998089E73480} = {2874FAEF-31B3-4A57-9CD4-998089E73480}
- {83D6FAB0-4A26-4EB6-9B0D-7E665CBE703C} = {83D6FAB0-4A26-4EB6-9B0D-7E665CBE703C}
- {D221EDFA-64EB-479A-B15B-792A90ADE47D} = {D221EDFA-64EB-479A-B15B-792A90ADE47D}
- {4C2CCC7D-3D19-4E13-9317-3927894F0F3B} = {4C2CCC7D-3D19-4E13-9317-3927894F0F3B}
- {1E7F80A2-A2F7-43C5-A5CD-D9A745A2D9BC} = {1E7F80A2-A2F7-43C5-A5CD-D9A745A2D9BC}
- {AA8B7736-A934-41FD-A1F2-92FA47FE518E} = {AA8B7736-A934-41FD-A1F2-92FA47FE518E}
- {1C14632F-22E1-40D3-B0C8-1E53C72ED92F} = {1C14632F-22E1-40D3-B0C8-1E53C72ED92F}
- {3039EEDE-B503-4E9D-AAEF-79EF07DF3A9B} = {3039EEDE-B503-4E9D-AAEF-79EF07DF3A9B}
- {F832691F-2EF5-4937-BBB4-626EE814A383} = {F832691F-2EF5-4937-BBB4-626EE814A383}
- {E778C1FD-C2F7-47A9-A453-259F6F520B4A} = {E778C1FD-C2F7-47A9-A453-259F6F520B4A}
- {D1B78D4D-E0B1-4430-AA1A-20E870FBC038} = {D1B78D4D-E0B1-4430-AA1A-20E870FBC038}
- {D13243FE-FD39-476C-BAB7-14C583B3BC9E} = {D13243FE-FD39-476C-BAB7-14C583B3BC9E}
- {049092E8-80F0-40F6-81F1-0AF99640134D} = {049092E8-80F0-40F6-81F1-0AF99640134D}
- {6E9207DA-5998-4B79-8850-D019EEA4251D} = {6E9207DA-5998-4B79-8850-D019EEA4251D}
- {9CC7403B-4370-4C93-9155-697EA11A8810} = {9CC7403B-4370-4C93-9155-697EA11A8810}
- {2675C4D0-0894-426B-B291-2807B4B79D3F} = {2675C4D0-0894-426B-B291-2807B4B79D3F}
- {D3D92BB5-1C47-4797-8486-4441926F2A54} = {D3D92BB5-1C47-4797-8486-4441926F2A54}
- {C817F26E-4541-45D0-A6DA-59E58DB9DB7E} = {C817F26E-4541-45D0-A6DA-59E58DB9DB7E}
- {06636583-FBC6-4274-9BD8-B5956A23B5C8} = {06636583-FBC6-4274-9BD8-B5956A23B5C8}
- {CBF870AB-2EE6-4F12-9F0E-0D8CB207751D} = {CBF870AB-2EE6-4F12-9F0E-0D8CB207751D}
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "all_exe", "all_exe.vcproj", "{4109D7F4-1D18-495F-B5C7-DFEA565DE9C6}"
- ProjectSection(ProjectDependencies) = postProject
- {6F58FEBB-1C0A-4C28-B0D4-82629AC0E1C6} = {6F58FEBB-1C0A-4C28-B0D4-82629AC0E1C6}
- {BB120D1D-3A68-4107-A8A1-427E448DEA98} = {BB120D1D-3A68-4107-A8A1-427E448DEA98}
- {002CC81D-C6AF-4AED-8624-301D0E13ED46} = {002CC81D-C6AF-4AED-8624-301D0E13ED46}
- {3BF6CF52-B403-4F8A-8DD5-4F1CF619CCC9} = {3BF6CF52-B403-4F8A-8DD5-4F1CF619CCC9}
- {74C9A79B-EAE3-46B3-848E-73C3B5F679B9} = {74C9A79B-EAE3-46B3-848E-73C3B5F679B9}
- {9AA6C9C9-1442-48CD-BD94-F134953418A9} = {9AA6C9C9-1442-48CD-BD94-F134953418A9}
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "all_internal", "internal\all_internal.vcproj", "{FEA214E0-E333-43A5-BD15-E5902264A91A}"
- ProjectSection(ProjectDependencies) = postProject
- {ACB6E56A-AA8C-43C8-B9C4-A8E1E10E496C} = {ACB6E56A-AA8C-43C8-B9C4-A8E1E10E496C}
- {2B743DB7-9F8B-4652-B45D-04E23AE2B547} = {2B743DB7-9F8B-4652-B45D-04E23AE2B547}
- {808F70AF-6AA9-49CB-A7AE-28E85C1D22FE} = {808F70AF-6AA9-49CB-A7AE-28E85C1D22FE}
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "all_lib", "all_lib.vcproj", "{0204EA88-C175-4970-922F-6F2C4FDA52EE}"
- ProjectSection(ProjectDependencies) = postProject
- {F7164C61-0D7C-4EC8-9209-88A760907B6B} = {F7164C61-0D7C-4EC8-9209-88A760907B6B}
- {96FC3702-E2ED-434F-BBA5-3DE1366FFA1F} = {96FC3702-E2ED-434F-BBA5-3DE1366FFA1F}
- {CD41CEB1-4E2C-494B-86E8-E29AF398D7ED} = {CD41CEB1-4E2C-494B-86E8-E29AF398D7ED}
- {21191422-314F-421D-93A8-EABF933C3065} = {21191422-314F-421D-93A8-EABF933C3065}
- {08C550B7-3DA6-46A6-96EB-A48806F1900C} = {08C550B7-3DA6-46A6-96EB-A48806F1900C}
- {94B3883E-2A1C-4B7C-A98F-6ED6343F0D8B} = {94B3883E-2A1C-4B7C-A98F-6ED6343F0D8B}
- {F2107221-7687-4F18-AEAC-FAA7C4EFCC16} = {F2107221-7687-4F18-AEAC-FAA7C4EFCC16}
- {47BB9C01-3751-4E25-87AE-6B4BAAA00340} = {47BB9C01-3751-4E25-87AE-6B4BAAA00340}
- {E2B932C9-4C8A-4922-9DFF-9FB646184223} = {E2B932C9-4C8A-4922-9DFF-9FB646184223}
- {327A10DD-2251-4191-8425-17E535235D30} = {327A10DD-2251-4191-8425-17E535235D30}
- {45CF24A4-E238-4E5C-BACC-5F0D6556A8EC} = {45CF24A4-E238-4E5C-BACC-5F0D6556A8EC}
- {A9FD8A3D-345F-4F7B-B8D6-9032E1884F94} = {A9FD8A3D-345F-4F7B-B8D6-9032E1884F94}
- {32AB53DD-66B1-4E17-B411-FEB804E62CF0} = {32AB53DD-66B1-4E17-B411-FEB804E62CF0}
- {F8CD481D-462C-40ED-98FA-C6EEF477B5CF} = {F8CD481D-462C-40ED-98FA-C6EEF477B5CF}
- {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2} = {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2}
- {98C1A680-89B6-4911-8C36-42D14F43B868} = {98C1A680-89B6-4911-8C36-42D14F43B868}
- {707F859C-FE05-486E-BB82-A447A6CD5036} = {707F859C-FE05-486E-BB82-A447A6CD5036}
- {FD5A8225-8809-4FFB-9190-B6403A2AD467} = {FD5A8225-8809-4FFB-9190-B6403A2AD467}
- {B5934B23-8476-4D68-9769-2A65BF5C33A4} = {B5934B23-8476-4D68-9769-2A65BF5C33A4}
- {0A01AD98-3A52-430A-A7A8-2A3E990D1BA2} = {0A01AD98-3A52-430A-A7A8-2A3E990D1BA2}
- {3C4476FB-5518-425A-9D4E-44DD91068776} = {3C4476FB-5518-425A-9D4E-44DD91068776}
- {AFDEDE71-796D-4896-BEE6-AFFC4F77CC09} = {AFDEDE71-796D-4896-BEE6-AFFC4F77CC09}
- {CF596340-202E-4E79-B041-F4310A422C20} = {CF596340-202E-4E79-B041-F4310A422C20}
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D} = {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}
- {4502FEB5-256A-4E4E-A8EF-34F7C7FC09DB} = {4502FEB5-256A-4E4E-A8EF-34F7C7FC09DB}
- {3D2820CB-F5E6-4807-864C-2C751ADC556D} = {3D2820CB-F5E6-4807-864C-2C751ADC556D}
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "all_ncbi", "all_ncbi.vcproj", "{04452BB8-39AC-4DC3-8C42-58384D285FED}"
- ProjectSection(ProjectDependencies) = postProject
- {FEA214E0-E333-43A5-BD15-E5902264A91A} = {FEA214E0-E333-43A5-BD15-E5902264A91A}
- {0204EA88-C175-4970-922F-6F2C4FDA52EE} = {0204EA88-C175-4970-922F-6F2C4FDA52EE}
- {4109D7F4-1D18-495F-B5C7-DFEA565DE9C6} = {4109D7F4-1D18-495F-B5C7-DFEA565DE9C6}
- {D786BB9A-FC43-4C02-B1F8-A7F96B2B6D1C} = {D786BB9A-FC43-4C02-B1F8-A7F96B2B6D1C}
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "all", "all.vcproj", "{347672C9-B4CA-4B21-8281-51955A9C50AC}"
+ ProjectSection(ProjectDependencies) = postProject
+ {4FDCF0D2-40AA-4856-98BE-A6FD3B7A443C} = {4FDCF0D2-40AA-4856-98BE-A6FD3B7A443C}
+ {4DFAAB85-944C-4B34-A3C0-70370B655451} = {4DFAAB85-944C-4B34-A3C0-70370B655451}
+ {B2AEBA00-E619-4FD2-80DA-9F713DD0306E} = {B2AEBA00-E619-4FD2-80DA-9F713DD0306E}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "all_demo", "all_demo.vcproj", "{B2AEBA00-E619-4FD2-80DA-9F713DD0306E}"
+ ProjectSection(ProjectDependencies) = postProject
+ {08AA84EC-97CC-4997-BFFF-7CDC535A5C25} = {08AA84EC-97CC-4997-BFFF-7CDC535A5C25}
+ {E6270A0D-B665-450E-BA6A-B9D648D5B145} = {E6270A0D-B665-450E-BA6A-B9D648D5B145}
+ {1136C677-E611-42A1-8BBF-C68BBFE19470} = {1136C677-E611-42A1-8BBF-C68BBFE19470}
+ {B6875C47-6809-4972-A89D-0085058670C9} = {B6875C47-6809-4972-A89D-0085058670C9}
+ {9AAE2D3F-4D37-43B6-96EB-593DE7679811} = {9AAE2D3F-4D37-43B6-96EB-593DE7679811}
+ {E6CE793E-7882-4E77-9D26-22C950DE0AFE} = {E6CE793E-7882-4E77-9D26-22C950DE0AFE}
+ {7719A61E-FAE1-4564-AD24-416318E48967} = {7719A61E-FAE1-4564-AD24-416318E48967}
+ {E459338E-39A8-49C9-9DFC-612E47863CE3} = {E459338E-39A8-49C9-9DFC-612E47863CE3}
+ {6F8036D0-9AEE-4B60-A65A-5A51A9D8725F} = {6F8036D0-9AEE-4B60-A65A-5A51A9D8725F}
+ {DD51F357-26FE-46F2-9AC9-5B682DBC198C} = {DD51F357-26FE-46F2-9AC9-5B682DBC198C}
+ {862D2BCD-67ED-4398-A811-7E247C2029E5} = {862D2BCD-67ED-4398-A811-7E247C2029E5}
+ {F171E3D9-FC0B-4404-B96F-AD98C055CD8B} = {F171E3D9-FC0B-4404-B96F-AD98C055CD8B}
+ {3B976840-4F3F-46A9-832D-4AB79417F712} = {3B976840-4F3F-46A9-832D-4AB79417F712}
+ {087A2516-3C90-4D46-AEA9-670592894CB4} = {087A2516-3C90-4D46-AEA9-670592894CB4}
+ {167BDE33-267C-49EE-9AC5-6177D283D799} = {167BDE33-267C-49EE-9AC5-6177D283D799}
+ {9218C976-8194-4AD4-BC5C-7CBC456C2475} = {9218C976-8194-4AD4-BC5C-7CBC456C2475}
+ {760EA748-5473-48CE-8BE0-76538A0CE1B2} = {760EA748-5473-48CE-8BE0-76538A0CE1B2}
+ {2EDD4E60-025D-4167-B827-9A700DFA6D72} = {2EDD4E60-025D-4167-B827-9A700DFA6D72}
+ {BC50422E-D841-4EDF-B987-5135EC4D8F11} = {BC50422E-D841-4EDF-B987-5135EC4D8F11}
+ {6266F193-8E41-4543-BB84-4DEA87146A44} = {6266F193-8E41-4543-BB84-4DEA87146A44}
+ {B9B3203E-0C07-46DB-BABE-3024B22F923C} = {B9B3203E-0C07-46DB-BABE-3024B22F923C}
+ {5E35A42F-8E72-4ED7-ABA3-469E86F14DB8} = {5E35A42F-8E72-4ED7-ABA3-469E86F14DB8}
+ {FAB79DB6-B9B5-4FDA-B2FB-17B4BEB6011F} = {FAB79DB6-B9B5-4FDA-B2FB-17B4BEB6011F}
+ {B592842F-6270-4C2E-8FBC-DBE1D5EF71D0} = {B592842F-6270-4C2E-8FBC-DBE1D5EF71D0}
+ {09DBA8E7-7471-4D6D-B6EF-5B8B2B32A020} = {09DBA8E7-7471-4D6D-B6EF-5B8B2B32A020}
+ {986196FD-0900-451E-818F-7373FBAFF793} = {986196FD-0900-451E-818F-7373FBAFF793}
+ {F7125366-276A-455F-A1AA-80846F7BE09F} = {F7125366-276A-455F-A1AA-80846F7BE09F}
+ {29EAEDFD-B486-433D-8809-7C4B298BFF17} = {29EAEDFD-B486-433D-8809-7C4B298BFF17}
+ {A40990ED-A5F2-4175-A8A5-DEE67FDFD64A} = {A40990ED-A5F2-4175-A8A5-DEE67FDFD64A}
+ {931A5E4E-E25D-4895-B202-E1D1B3F37ED1} = {931A5E4E-E25D-4895-B202-E1D1B3F37ED1}
+ {00EABCA8-578E-4BC9-A0DA-5006B5C28A3A} = {00EABCA8-578E-4BC9-A0DA-5006B5C28A3A}
+ {2861713F-5EA6-486E-AE98-55CC4200305E} = {2861713F-5EA6-486E-AE98-55CC4200305E}
+ {05C7D1D5-557E-4868-90BB-2F7B1B0DB9C6} = {05C7D1D5-557E-4868-90BB-2F7B1B0DB9C6}
+ {136554B9-6A33-46F2-9595-5B3E90A00553} = {136554B9-6A33-46F2-9595-5B3E90A00553}
+ {478B9CE3-2141-4C1C-A54C-984865DF5930} = {478B9CE3-2141-4C1C-A54C-984865DF5930}
+ {84BE55F0-B6BE-4DFA-B387-4D09C24B4875} = {84BE55F0-B6BE-4DFA-B387-4D09C24B4875}
+ {8EFB0853-50E8-4167-88A5-2C71DAB74098} = {8EFB0853-50E8-4167-88A5-2C71DAB74098}
+ {82933EEE-EB79-486D-A8E2-B440D33D924A} = {82933EEE-EB79-486D-A8E2-B440D33D924A}
+ {4BCEFEBE-22AD-4D8E-BE1F-19FF5925271D} = {4BCEFEBE-22AD-4D8E-BE1F-19FF5925271D}
+ {13E51223-EDBF-46E1-A98A-895FB3685000} = {13E51223-EDBF-46E1-A98A-895FB3685000}
+ {02F5DB27-2C2D-4995-AE03-AE866FD0D726} = {02F5DB27-2C2D-4995-AE03-AE866FD0D726}
+ {7B92691D-13E1-400B-BFDA-1C085DB12DC7} = {7B92691D-13E1-400B-BFDA-1C085DB12DC7}
+ {939AD270-6758-4304-9B42-F776B03B2B30} = {939AD270-6758-4304-9B42-F776B03B2B30}
+ {7FD62FF2-E65C-45F1-9BF3-12CD2D78C7A5} = {7FD62FF2-E65C-45F1-9BF3-12CD2D78C7A5}
+ {DF2DCFDD-1AFC-418A-80AC-EA2624BB534A} = {DF2DCFDD-1AFC-418A-80AC-EA2624BB534A}
+ {B641C7E0-F29C-422C-B3C0-BC3C103BC973} = {B641C7E0-F29C-422C-B3C0-BC3C103BC973}
+ {61AC31CE-6BF2-4C4A-97C7-7DE62A2A546E} = {61AC31CE-6BF2-4C4A-97C7-7DE62A2A546E}
+ {1557FB61-9785-4955-ACB3-259F8695AA61} = {1557FB61-9785-4955-ACB3-259F8695AA61}
+ {EB8FB82E-5466-4430-9BD2-17CF562E8349} = {EB8FB82E-5466-4430-9BD2-17CF562E8349}
+ {CCEA00C6-F850-4BDA-B420-6214E40A3469} = {CCEA00C6-F850-4BDA-B420-6214E40A3469}
+ {D92CDEC8-1E56-4F1C-8563-04037BCCB9BD} = {D92CDEC8-1E56-4F1C-8563-04037BCCB9BD}
+ {C2B3A6D5-5498-4D73-826A-4A839EBA9571} = {C2B3A6D5-5498-4D73-826A-4A839EBA9571}
+ {FE555145-82E8-4721-B2CB-A60B94658A65} = {FE555145-82E8-4721-B2CB-A60B94658A65}
+ {00DEC39E-11F7-40B4-8840-0556F331A964} = {00DEC39E-11F7-40B4-8840-0556F331A964}
+ {531E4D12-C794-4509-8160-A6B6FCB1FE0C} = {531E4D12-C794-4509-8160-A6B6FCB1FE0C}
+ {051B2ABA-EDD6-455D-8600-53B8EB79DF21} = {051B2ABA-EDD6-455D-8600-53B8EB79DF21}
+ {CF28E0B7-FBC4-4850-98C7-0B2716D3A9BC} = {CF28E0B7-FBC4-4850-98C7-0B2716D3A9BC}
+ {B487568D-8168-46AC-80AA-86F955301F21} = {B487568D-8168-46AC-80AA-86F955301F21}
+ {7BFFD010-510A-4C0C-BD77-5845016DABBA} = {7BFFD010-510A-4C0C-BD77-5845016DABBA}
+ {C19E4244-4CAD-40A7-900A-7942991DFB75} = {C19E4244-4CAD-40A7-900A-7942991DFB75}
+ {7D38F129-EF19-4A07-8EDC-AED9E364E2CB} = {7D38F129-EF19-4A07-8EDC-AED9E364E2CB}
+ {C6348B36-F5C4-43A9-8577-4F6646B3D78D} = {C6348B36-F5C4-43A9-8577-4F6646B3D78D}
+ {28B5A386-FA1C-4106-AB6E-5DA967D979E0} = {28B5A386-FA1C-4106-AB6E-5DA967D979E0}
+ {090B589F-7704-4D2F-9778-F884AFFB2359} = {090B589F-7704-4D2F-9778-F884AFFB2359}
+ {6A9781AB-D45C-4D85-971D-04ED02400001} = {6A9781AB-D45C-4D85-971D-04ED02400001}
+ {8D7875E5-8DC6-44CA-8B25-6501CC30C301} = {8D7875E5-8DC6-44CA-8B25-6501CC30C301}
+ {27575CBA-8AD7-4999-995C-694483047B3C} = {27575CBA-8AD7-4999-995C-694483047B3C}
+ {9BCA1F30-F3E2-4F16-8974-C0C2D3902292} = {9BCA1F30-F3E2-4F16-8974-C0C2D3902292}
+ {5F755177-01B3-44E5-BC77-6FCF825CE0C8} = {5F755177-01B3-44E5-BC77-6FCF825CE0C8}
+ {D6205067-CD94-494E-A553-C3706C7CFB3B} = {D6205067-CD94-494E-A553-C3706C7CFB3B}
+ {A8DC9C13-504F-4ED7-B299-ED251D8D7D57} = {A8DC9C13-504F-4ED7-B299-ED251D8D7D57}
+ {3F5FD5F7-2FB9-477E-9011-F09EECEA56E3} = {3F5FD5F7-2FB9-477E-9011-F09EECEA56E3}
+ {F8DA831A-6128-4FB6-A41F-D4051D736D81} = {F8DA831A-6128-4FB6-A41F-D4051D736D81}
+ {9DC94AC5-FEA4-40B1-9F01-B08B899DE64E} = {9DC94AC5-FEA4-40B1-9F01-B08B899DE64E}
+ {61F9752D-4AE9-4B68-8D20-FF5CF31631A9} = {61F9752D-4AE9-4B68-8D20-FF5CF31631A9}
+ {36A2447A-460B-4A29-9327-18BE2B7007CB} = {36A2447A-460B-4A29-9327-18BE2B7007CB}
+ {4E04088C-D796-4227-8227-2539E30F04BD} = {4E04088C-D796-4227-8227-2539E30F04BD}
+ {CFF41F73-FF0C-4EDF-94FD-5FDCB8D0D19F} = {CFF41F73-FF0C-4EDF-94FD-5FDCB8D0D19F}
+ {6171ABC9-E3CF-402A-A5A1-58FF5A6D3AB5} = {6171ABC9-E3CF-402A-A5A1-58FF5A6D3AB5}
+ {43D2CAEA-F7C5-43AB-9460-53229B1A8CCE} = {43D2CAEA-F7C5-43AB-9460-53229B1A8CCE}
+ {24B6F0A3-B354-4089-B489-560DEF53C75C} = {24B6F0A3-B354-4089-B489-560DEF53C75C}
+ {95AE7147-09C4-4C87-A6AB-9B5714D51714} = {95AE7147-09C4-4C87-A6AB-9B5714D51714}
+ {1DDF5590-54DA-48B9-9168-E970F443F224} = {1DDF5590-54DA-48B9-9168-E970F443F224}
+ {A901D889-28AD-4B69-9F81-5817D0B7120F} = {A901D889-28AD-4B69-9F81-5817D0B7120F}
+ {DD4C129E-9390-41EC-90E8-CEDF4C6F7152} = {DD4C129E-9390-41EC-90E8-CEDF4C6F7152}
+ {D3E7608D-BA37-41A8-8012-9DC2E44E2703} = {D3E7608D-BA37-41A8-8012-9DC2E44E2703}
+ {A546FCD9-97BD-475F-975E-04AB9AC4E077} = {A546FCD9-97BD-475F-975E-04AB9AC4E077}
+ {C17DDF84-6A2C-4801-85ED-04AD0B29CD0F} = {C17DDF84-6A2C-4801-85ED-04AD0B29CD0F}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "all_exe", "all_exe.vcproj", "{4DFAAB85-944C-4B34-A3C0-70370B655451}"
+ ProjectSection(ProjectDependencies) = postProject
+ {028EEC3D-499E-453C-A1F4-5A4478BBB39F} = {028EEC3D-499E-453C-A1F4-5A4478BBB39F}
+ {67436D24-0D70-48D5-B1AE-6E8DFA978983} = {67436D24-0D70-48D5-B1AE-6E8DFA978983}
+ {86F47145-3ABB-45BA-8D51-89C24997882F} = {86F47145-3ABB-45BA-8D51-89C24997882F}
+ {49F50B13-96C8-44F1-9B8C-68197E0DBE7E} = {49F50B13-96C8-44F1-9B8C-68197E0DBE7E}
+ {0516C2CE-F3B1-476B-AECC-9E2A02D40D8D} = {0516C2CE-F3B1-476B-AECC-9E2A02D40D8D}
+ {95BF266E-0195-4BEB-B306-B99489EE3991} = {95BF266E-0195-4BEB-B306-B99489EE3991}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "all_internal", "internal\all_internal.vcproj", "{53EC88ED-74CA-4F01-8FDB-94989A896E22}"
+ ProjectSection(ProjectDependencies) = postProject
+ {8B58713F-B6F4-4A76-9888-309FDDFB985D} = {8B58713F-B6F4-4A76-9888-309FDDFB985D}
+ {43337FCD-B171-4441-B44E-D1C90C2700EE} = {43337FCD-B171-4441-B44E-D1C90C2700EE}
+ {7469FFC1-059F-45B2-A9B8-B17CD881CA8D} = {7469FFC1-059F-45B2-A9B8-B17CD881CA8D}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "all_lib", "all_lib.vcproj", "{4FDCF0D2-40AA-4856-98BE-A6FD3B7A443C}"
+ ProjectSection(ProjectDependencies) = postProject
+ {A9561C14-6DAF-4A28-9F59-297D39432D0B} = {A9561C14-6DAF-4A28-9F59-297D39432D0B}
+ {610E62DA-4DD6-479E-8D85-1FB87126D750} = {610E62DA-4DD6-479E-8D85-1FB87126D750}
+ {A2E2AE46-C7B9-4544-B138-6F7662DF2216} = {A2E2AE46-C7B9-4544-B138-6F7662DF2216}
+ {6058EDC4-453A-48B1-8E27-83820FFB7203} = {6058EDC4-453A-48B1-8E27-83820FFB7203}
+ {B8E40D4D-C20C-42BD-B5E4-6BEB9D08344A} = {B8E40D4D-C20C-42BD-B5E4-6BEB9D08344A}
+ {C0B91754-0757-42BD-8F53-C05964FFFB66} = {C0B91754-0757-42BD-8F53-C05964FFFB66}
+ {A0F67E98-8A07-4319-A3E8-B983D522D8CA} = {A0F67E98-8A07-4319-A3E8-B983D522D8CA}
+ {E2180D54-5F75-47B7-8D77-00D04A6BEF69} = {E2180D54-5F75-47B7-8D77-00D04A6BEF69}
+ {25806259-F586-4AAC-BDD1-50C1B227147D} = {25806259-F586-4AAC-BDD1-50C1B227147D}
+ {DE96F5AB-AC39-44FF-9BAB-36805FE07A86} = {DE96F5AB-AC39-44FF-9BAB-36805FE07A86}
+ {AB9DEE32-64FD-4700-84DF-485166A3E367} = {AB9DEE32-64FD-4700-84DF-485166A3E367}
+ {14D69C18-0E8E-4816-8CC6-FC22AEA3E1C7} = {14D69C18-0E8E-4816-8CC6-FC22AEA3E1C7}
+ {759991FD-441C-4267-A364-1BB2236C67B8} = {759991FD-441C-4267-A364-1BB2236C67B8}
+ {C2857848-3327-46C6-929C-192629A21F60} = {C2857848-3327-46C6-929C-192629A21F60}
+ {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937} = {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937}
+ {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0} = {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0}
+ {7C0D1F06-0B97-49A1-A25D-93D5E7A96786} = {7C0D1F06-0B97-49A1-A25D-93D5E7A96786}
+ {2DD94017-2F95-470D-94F5-9F10AD650BDC} = {2DD94017-2F95-470D-94F5-9F10AD650BDC}
+ {85E82D79-6144-4151-A3E7-8140E9ED01CF} = {85E82D79-6144-4151-A3E7-8140E9ED01CF}
+ {BDDE8ABD-4E45-49DA-B499-131BD6FCABBD} = {BDDE8ABD-4E45-49DA-B499-131BD6FCABBD}
+ {DEBC32A0-A4F7-4C4C-9E93-62C1C4E6544D} = {DEBC32A0-A4F7-4C4C-9E93-62C1C4E6544D}
+ {2F198E60-4B02-46C3-8FEF-CE86D69E2C59} = {2F198E60-4B02-46C3-8FEF-CE86D69E2C59}
+ {F8832A8F-9EA0-4DFD-B181-FAA767F3B9AF} = {F8832A8F-9EA0-4DFD-B181-FAA767F3B9AF}
+ {8FB57DC4-F98A-4E0D-BDBA-5AB2F7405B58} = {8FB57DC4-F98A-4E0D-BDBA-5AB2F7405B58}
+ {74B970B2-6C7F-4AEE-9031-27CC087D7214} = {74B970B2-6C7F-4AEE-9031-27CC087D7214}
+ {F6DB30E7-94C5-4760-92FA-449884953A9D} = {F6DB30E7-94C5-4760-92FA-449884953A9D}
+ {2746DC43-68A9-42FE-80F0-1806679538FA} = {2746DC43-68A9-42FE-80F0-1806679538FA}
+ {D2059A10-7A4D-471A-BAEA-76479FD2773D} = {D2059A10-7A4D-471A-BAEA-76479FD2773D}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "all_ncbi", "all_ncbi.vcproj", "{CAD80EBF-2DAF-4091-B486-59D86D65A8AD}"
+ ProjectSection(ProjectDependencies) = postProject
+ {53EC88ED-74CA-4F01-8FDB-94989A896E22} = {53EC88ED-74CA-4F01-8FDB-94989A896E22}
+ {4FDCF0D2-40AA-4856-98BE-A6FD3B7A443C} = {4FDCF0D2-40AA-4856-98BE-A6FD3B7A443C}
+ {4DFAAB85-944C-4B34-A3C0-70370B655451} = {4DFAAB85-944C-4B34-A3C0-70370B655451}
+ {B2AEBA00-E619-4FD2-80DA-9F713DD0306E} = {B2AEBA00-E619-4FD2-80DA-9F713DD0306E}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "blast", "algo\blast\core\blast.vcproj", "{CD41CEB1-4E2C-494B-86E8-E29AF398D7ED}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "blast", "algo\blast\core\blast.vcproj", "{B8E40D4D-C20C-42BD-B5E4-6BEB9D08344A}"
ProjectSection(ProjectDependencies) = postProject
- {CF596340-202E-4E79-B041-F4310A422C20} = {CF596340-202E-4E79-B041-F4310A422C20}
+ {74B970B2-6C7F-4AEE-9031-27CC087D7214} = {74B970B2-6C7F-4AEE-9031-27CC087D7214}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "blastapi", "algo\blast\api\blastapi.vcproj", "{96FC3702-E2ED-434F-BBA5-3DE1366FFA1F}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "blastapi", "algo\blast\api\blastapi.vcproj", "{6058EDC4-453A-48B1-8E27-83820FFB7203}"
ProjectSection(ProjectDependencies) = postProject
- {CF596340-202E-4E79-B041-F4310A422C20} = {CF596340-202E-4E79-B041-F4310A422C20}
+ {74B970B2-6C7F-4AEE-9031-27CC087D7214} = {74B970B2-6C7F-4AEE-9031-27CC087D7214}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "blastcompadj", "algo\blast\composition_adjustment\blastcompadj.vcproj", "{F7164C61-0D7C-4EC8-9209-88A760907B6B}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "blastcompadj", "algo\blast\composition_adjustment\blastcompadj.vcproj", "{A2E2AE46-C7B9-4544-B138-6F7662DF2216}"
ProjectSection(ProjectDependencies) = postProject
- {CF596340-202E-4E79-B041-F4310A422C20} = {CF596340-202E-4E79-B041-F4310A422C20}
+ {74B970B2-6C7F-4AEE-9031-27CC087D7214} = {74B970B2-6C7F-4AEE-9031-27CC087D7214}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ddvlib", "ddv\ddvlib\ddvlib.vcproj", "{3D2820CB-F5E6-4807-864C-2C751ADC556D}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ddvlib", "ddv\ddvlib\ddvlib.vcproj", "{D2059A10-7A4D-471A-BAEA-76479FD2773D}"
ProjectSection(ProjectDependencies) = postProject
- {CF596340-202E-4E79-B041-F4310A422C20} = {CF596340-202E-4E79-B041-F4310A422C20}
+ {74B970B2-6C7F-4AEE-9031-27CC087D7214} = {74B970B2-6C7F-4AEE-9031-27CC087D7214}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_asn2all", "demo\asn2all\demo_asn2all.vcproj", "{C817F26E-4541-45D0-A6DA-59E58DB9DB7E}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_asn2all", "demo\asn2all\demo_asn2all.vcproj", "{D3E7608D-BA37-41A8-8012-9DC2E44E2703}"
ProjectSection(ProjectDependencies) = postProject
- {35C18E88-9F42-49EA-9881-C3128245490F} = {35C18E88-9F42-49EA-9881-C3128245490F}
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D} = {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}
- {F8CD481D-462C-40ED-98FA-C6EEF477B5CF} = {F8CD481D-462C-40ED-98FA-C6EEF477B5CF}
- {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2} = {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2}
- {32AB53DD-66B1-4E17-B411-FEB804E62CF0} = {32AB53DD-66B1-4E17-B411-FEB804E62CF0}
- {327A10DD-2251-4191-8425-17E535235D30} = {327A10DD-2251-4191-8425-17E535235D30}
- {707F859C-FE05-486E-BB82-A447A6CD5036} = {707F859C-FE05-486E-BB82-A447A6CD5036}
+ {610E62DA-4DD6-479E-8D85-1FB87126D750} = {610E62DA-4DD6-479E-8D85-1FB87126D750}
+ {F6DB30E7-94C5-4760-92FA-449884953A9D} = {F6DB30E7-94C5-4760-92FA-449884953A9D}
+ {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0} = {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0}
+ {7C0D1F06-0B97-49A1-A25D-93D5E7A96786} = {7C0D1F06-0B97-49A1-A25D-93D5E7A96786}
+ {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937} = {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937}
+ {14D69C18-0E8E-4816-8CC6-FC22AEA3E1C7} = {14D69C18-0E8E-4816-8CC6-FC22AEA3E1C7}
+ {85E82D79-6144-4151-A3E7-8140E9ED01CF} = {85E82D79-6144-4151-A3E7-8140E9ED01CF}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_asn2ff", "demo\asn2ff\demo_asn2ff.vcproj", "{D3D92BB5-1C47-4797-8486-4441926F2A54}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_asn2ff", "demo\asn2ff\demo_asn2ff.vcproj", "{DD4C129E-9390-41EC-90E8-CEDF4C6F7152}"
ProjectSection(ProjectDependencies) = postProject
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D} = {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}
- {F8CD481D-462C-40ED-98FA-C6EEF477B5CF} = {F8CD481D-462C-40ED-98FA-C6EEF477B5CF}
- {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2} = {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2}
- {F2107221-7687-4F18-AEAC-FAA7C4EFCC16} = {F2107221-7687-4F18-AEAC-FAA7C4EFCC16}
+ {F6DB30E7-94C5-4760-92FA-449884953A9D} = {F6DB30E7-94C5-4760-92FA-449884953A9D}
+ {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0} = {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0}
+ {7C0D1F06-0B97-49A1-A25D-93D5E7A96786} = {7C0D1F06-0B97-49A1-A25D-93D5E7A96786}
+ {25806259-F586-4AAC-BDD1-50C1B227147D} = {25806259-F586-4AAC-BDD1-50C1B227147D}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_asn2fsa", "demo\asn2fsa\demo_asn2fsa.vcproj", "{2675C4D0-0894-426B-B291-2807B4B79D3F}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_asn2fsa", "demo\asn2fsa\demo_asn2fsa.vcproj", "{A901D889-28AD-4B69-9F81-5817D0B7120F}"
ProjectSection(ProjectDependencies) = postProject
- {35C18E88-9F42-49EA-9881-C3128245490F} = {35C18E88-9F42-49EA-9881-C3128245490F}
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D} = {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}
- {F7164C61-0D7C-4EC8-9209-88A760907B6B} = {F7164C61-0D7C-4EC8-9209-88A760907B6B}
- {F8CD481D-462C-40ED-98FA-C6EEF477B5CF} = {F8CD481D-462C-40ED-98FA-C6EEF477B5CF}
- {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2} = {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2}
- {32AB53DD-66B1-4E17-B411-FEB804E62CF0} = {32AB53DD-66B1-4E17-B411-FEB804E62CF0}
- {327A10DD-2251-4191-8425-17E535235D30} = {327A10DD-2251-4191-8425-17E535235D30}
- {707F859C-FE05-486E-BB82-A447A6CD5036} = {707F859C-FE05-486E-BB82-A447A6CD5036}
+ {610E62DA-4DD6-479E-8D85-1FB87126D750} = {610E62DA-4DD6-479E-8D85-1FB87126D750}
+ {F6DB30E7-94C5-4760-92FA-449884953A9D} = {F6DB30E7-94C5-4760-92FA-449884953A9D}
+ {A2E2AE46-C7B9-4544-B138-6F7662DF2216} = {A2E2AE46-C7B9-4544-B138-6F7662DF2216}
+ {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0} = {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0}
+ {7C0D1F06-0B97-49A1-A25D-93D5E7A96786} = {7C0D1F06-0B97-49A1-A25D-93D5E7A96786}
+ {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937} = {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937}
+ {14D69C18-0E8E-4816-8CC6-FC22AEA3E1C7} = {14D69C18-0E8E-4816-8CC6-FC22AEA3E1C7}
+ {85E82D79-6144-4151-A3E7-8140E9ED01CF} = {85E82D79-6144-4151-A3E7-8140E9ED01CF}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_asn2gb", "demo\asn2gb\demo_asn2gb.vcproj", "{9CC7403B-4370-4C93-9155-697EA11A8810}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_asn2gb", "demo\asn2gb\demo_asn2gb.vcproj", "{1DDF5590-54DA-48B9-9168-E970F443F224}"
ProjectSection(ProjectDependencies) = postProject
- {35C18E88-9F42-49EA-9881-C3128245490F} = {35C18E88-9F42-49EA-9881-C3128245490F}
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D} = {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}
- {F8CD481D-462C-40ED-98FA-C6EEF477B5CF} = {F8CD481D-462C-40ED-98FA-C6EEF477B5CF}
- {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2} = {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2}
- {32AB53DD-66B1-4E17-B411-FEB804E62CF0} = {32AB53DD-66B1-4E17-B411-FEB804E62CF0}
- {327A10DD-2251-4191-8425-17E535235D30} = {327A10DD-2251-4191-8425-17E535235D30}
- {707F859C-FE05-486E-BB82-A447A6CD5036} = {707F859C-FE05-486E-BB82-A447A6CD5036}
+ {610E62DA-4DD6-479E-8D85-1FB87126D750} = {610E62DA-4DD6-479E-8D85-1FB87126D750}
+ {F6DB30E7-94C5-4760-92FA-449884953A9D} = {F6DB30E7-94C5-4760-92FA-449884953A9D}
+ {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0} = {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0}
+ {7C0D1F06-0B97-49A1-A25D-93D5E7A96786} = {7C0D1F06-0B97-49A1-A25D-93D5E7A96786}
+ {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937} = {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937}
+ {14D69C18-0E8E-4816-8CC6-FC22AEA3E1C7} = {14D69C18-0E8E-4816-8CC6-FC22AEA3E1C7}
+ {85E82D79-6144-4151-A3E7-8140E9ED01CF} = {85E82D79-6144-4151-A3E7-8140E9ED01CF}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_asn2idx", "demo\asn2idx\demo_asn2idx.vcproj", "{06636583-FBC6-4274-9BD8-B5956A23B5C8}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_asn2idx", "demo\asn2idx\demo_asn2idx.vcproj", "{A546FCD9-97BD-475F-975E-04AB9AC4E077}"
ProjectSection(ProjectDependencies) = postProject
- {35C18E88-9F42-49EA-9881-C3128245490F} = {35C18E88-9F42-49EA-9881-C3128245490F}
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D} = {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}
- {F8CD481D-462C-40ED-98FA-C6EEF477B5CF} = {F8CD481D-462C-40ED-98FA-C6EEF477B5CF}
- {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2} = {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2}
- {32AB53DD-66B1-4E17-B411-FEB804E62CF0} = {32AB53DD-66B1-4E17-B411-FEB804E62CF0}
+ {610E62DA-4DD6-479E-8D85-1FB87126D750} = {610E62DA-4DD6-479E-8D85-1FB87126D750}
+ {F6DB30E7-94C5-4760-92FA-449884953A9D} = {F6DB30E7-94C5-4760-92FA-449884953A9D}
+ {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0} = {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0}
+ {7C0D1F06-0B97-49A1-A25D-93D5E7A96786} = {7C0D1F06-0B97-49A1-A25D-93D5E7A96786}
+ {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937} = {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_asn2xml", "demo\asn2xml\demo_asn2xml.vcproj", "{CBF870AB-2EE6-4F12-9F0E-0D8CB207751D}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_asn2xml", "demo\asn2xml\demo_asn2xml.vcproj", "{C17DDF84-6A2C-4801-85ED-04AD0B29CD0F}"
ProjectSection(ProjectDependencies) = postProject
- {35C18E88-9F42-49EA-9881-C3128245490F} = {35C18E88-9F42-49EA-9881-C3128245490F}
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D} = {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}
- {F8CD481D-462C-40ED-98FA-C6EEF477B5CF} = {F8CD481D-462C-40ED-98FA-C6EEF477B5CF}
- {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2} = {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2}
+ {610E62DA-4DD6-479E-8D85-1FB87126D750} = {610E62DA-4DD6-479E-8D85-1FB87126D750}
+ {F6DB30E7-94C5-4760-92FA-449884953A9D} = {F6DB30E7-94C5-4760-92FA-449884953A9D}
+ {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0} = {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0}
+ {7C0D1F06-0B97-49A1-A25D-93D5E7A96786} = {7C0D1F06-0B97-49A1-A25D-93D5E7A96786}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_asnbarval", "demo\asnbarval\demo_asnbarval.vcproj", "{E95696E6-C316-4957-853A-547A1088D338}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_asnbarval", "demo\asnbarval\demo_asnbarval.vcproj", "{1136C677-E611-42A1-8BBF-C68BBFE19470}"
ProjectSection(ProjectDependencies) = postProject
- {35C18E88-9F42-49EA-9881-C3128245490F} = {35C18E88-9F42-49EA-9881-C3128245490F}
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D} = {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}
- {32AB53DD-66B1-4E17-B411-FEB804E62CF0} = {32AB53DD-66B1-4E17-B411-FEB804E62CF0}
- {AFDEDE71-796D-4896-BEE6-AFFC4F77CC09} = {AFDEDE71-796D-4896-BEE6-AFFC4F77CC09}
- {F8CD481D-462C-40ED-98FA-C6EEF477B5CF} = {F8CD481D-462C-40ED-98FA-C6EEF477B5CF}
- {98C1A680-89B6-4911-8C36-42D14F43B868} = {98C1A680-89B6-4911-8C36-42D14F43B868}
+ {610E62DA-4DD6-479E-8D85-1FB87126D750} = {610E62DA-4DD6-479E-8D85-1FB87126D750}
+ {F6DB30E7-94C5-4760-92FA-449884953A9D} = {F6DB30E7-94C5-4760-92FA-449884953A9D}
+ {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937} = {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937}
+ {8FB57DC4-F98A-4E0D-BDBA-5AB2F7405B58} = {8FB57DC4-F98A-4E0D-BDBA-5AB2F7405B58}
+ {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0} = {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0}
+ {2DD94017-2F95-470D-94F5-9F10AD650BDC} = {2DD94017-2F95-470D-94F5-9F10AD650BDC}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_asndhuff", "demo\asndhuff\demo_asndhuff.vcproj", "{6E9207DA-5998-4B79-8850-D019EEA4251D}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_asndhuff", "demo\asndhuff\demo_asndhuff.vcproj", "{95AE7147-09C4-4C87-A6AB-9B5714D51714}"
ProjectSection(ProjectDependencies) = postProject
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D} = {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}
- {F8CD481D-462C-40ED-98FA-C6EEF477B5CF} = {F8CD481D-462C-40ED-98FA-C6EEF477B5CF}
- {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2} = {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2}
- {3C4476FB-5518-425A-9D4E-44DD91068776} = {3C4476FB-5518-425A-9D4E-44DD91068776}
- {AFDEDE71-796D-4896-BEE6-AFFC4F77CC09} = {AFDEDE71-796D-4896-BEE6-AFFC4F77CC09}
- {F2107221-7687-4F18-AEAC-FAA7C4EFCC16} = {F2107221-7687-4F18-AEAC-FAA7C4EFCC16}
+ {F6DB30E7-94C5-4760-92FA-449884953A9D} = {F6DB30E7-94C5-4760-92FA-449884953A9D}
+ {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0} = {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0}
+ {7C0D1F06-0B97-49A1-A25D-93D5E7A96786} = {7C0D1F06-0B97-49A1-A25D-93D5E7A96786}
+ {F8832A8F-9EA0-4DFD-B181-FAA767F3B9AF} = {F8832A8F-9EA0-4DFD-B181-FAA767F3B9AF}
+ {8FB57DC4-F98A-4E0D-BDBA-5AB2F7405B58} = {8FB57DC4-F98A-4E0D-BDBA-5AB2F7405B58}
+ {25806259-F586-4AAC-BDD1-50C1B227147D} = {25806259-F586-4AAC-BDD1-50C1B227147D}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_asndisc", "demo\asndisc\demo_asndisc.vcproj", "{D1B78D4D-E0B1-4430-AA1A-20E870FBC038}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_asndisc", "demo\asndisc\demo_asndisc.vcproj", "{6171ABC9-E3CF-402A-A5A1-58FF5A6D3AB5}"
ProjectSection(ProjectDependencies) = postProject
- {35C18E88-9F42-49EA-9881-C3128245490F} = {35C18E88-9F42-49EA-9881-C3128245490F}
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D} = {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}
- {F8CD481D-462C-40ED-98FA-C6EEF477B5CF} = {F8CD481D-462C-40ED-98FA-C6EEF477B5CF}
- {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2} = {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2}
- {32AB53DD-66B1-4E17-B411-FEB804E62CF0} = {32AB53DD-66B1-4E17-B411-FEB804E62CF0}
- {327A10DD-2251-4191-8425-17E535235D30} = {327A10DD-2251-4191-8425-17E535235D30}
- {707F859C-FE05-486E-BB82-A447A6CD5036} = {707F859C-FE05-486E-BB82-A447A6CD5036}
+ {610E62DA-4DD6-479E-8D85-1FB87126D750} = {610E62DA-4DD6-479E-8D85-1FB87126D750}
+ {F6DB30E7-94C5-4760-92FA-449884953A9D} = {F6DB30E7-94C5-4760-92FA-449884953A9D}
+ {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0} = {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0}
+ {7C0D1F06-0B97-49A1-A25D-93D5E7A96786} = {7C0D1F06-0B97-49A1-A25D-93D5E7A96786}
+ {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937} = {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937}
+ {14D69C18-0E8E-4816-8CC6-FC22AEA3E1C7} = {14D69C18-0E8E-4816-8CC6-FC22AEA3E1C7}
+ {85E82D79-6144-4151-A3E7-8140E9ED01CF} = {85E82D79-6144-4151-A3E7-8140E9ED01CF}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_asnstrip", "demo\asnstrip\demo_asnstrip.vcproj", "{049092E8-80F0-40F6-81F1-0AF99640134D}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_asnmacro", "demo\asnmacro\demo_asnmacro.vcproj", "{08AA84EC-97CC-4997-BFFF-7CDC535A5C25}"
ProjectSection(ProjectDependencies) = postProject
- {35C18E88-9F42-49EA-9881-C3128245490F} = {35C18E88-9F42-49EA-9881-C3128245490F}
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D} = {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}
- {F8CD481D-462C-40ED-98FA-C6EEF477B5CF} = {F8CD481D-462C-40ED-98FA-C6EEF477B5CF}
- {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2} = {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2}
- {32AB53DD-66B1-4E17-B411-FEB804E62CF0} = {32AB53DD-66B1-4E17-B411-FEB804E62CF0}
+ {610E62DA-4DD6-479E-8D85-1FB87126D750} = {610E62DA-4DD6-479E-8D85-1FB87126D750}
+ {F6DB30E7-94C5-4760-92FA-449884953A9D} = {F6DB30E7-94C5-4760-92FA-449884953A9D}
+ {7C0D1F06-0B97-49A1-A25D-93D5E7A96786} = {7C0D1F06-0B97-49A1-A25D-93D5E7A96786}
+ {14D69C18-0E8E-4816-8CC6-FC22AEA3E1C7} = {14D69C18-0E8E-4816-8CC6-FC22AEA3E1C7}
+ {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0} = {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0}
+ {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937} = {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937}
+ {759991FD-441C-4267-A364-1BB2236C67B8} = {759991FD-441C-4267-A364-1BB2236C67B8}
+ {A2E2AE46-C7B9-4544-B138-6F7662DF2216} = {A2E2AE46-C7B9-4544-B138-6F7662DF2216}
+ {6058EDC4-453A-48B1-8E27-83820FFB7203} = {6058EDC4-453A-48B1-8E27-83820FFB7203}
+ {B8E40D4D-C20C-42BD-B5E4-6BEB9D08344A} = {B8E40D4D-C20C-42BD-B5E4-6BEB9D08344A}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_asnval", "demo\asnval\demo_asnval.vcproj", "{D13243FE-FD39-476C-BAB7-14C583B3BC9E}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_asnstrip", "demo\asnstrip\demo_asnstrip.vcproj", "{24B6F0A3-B354-4089-B489-560DEF53C75C}"
ProjectSection(ProjectDependencies) = postProject
- {35C18E88-9F42-49EA-9881-C3128245490F} = {35C18E88-9F42-49EA-9881-C3128245490F}
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D} = {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}
- {F8CD481D-462C-40ED-98FA-C6EEF477B5CF} = {F8CD481D-462C-40ED-98FA-C6EEF477B5CF}
- {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2} = {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2}
- {32AB53DD-66B1-4E17-B411-FEB804E62CF0} = {32AB53DD-66B1-4E17-B411-FEB804E62CF0}
- {327A10DD-2251-4191-8425-17E535235D30} = {327A10DD-2251-4191-8425-17E535235D30}
- {707F859C-FE05-486E-BB82-A447A6CD5036} = {707F859C-FE05-486E-BB82-A447A6CD5036}
+ {610E62DA-4DD6-479E-8D85-1FB87126D750} = {610E62DA-4DD6-479E-8D85-1FB87126D750}
+ {F6DB30E7-94C5-4760-92FA-449884953A9D} = {F6DB30E7-94C5-4760-92FA-449884953A9D}
+ {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0} = {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0}
+ {7C0D1F06-0B97-49A1-A25D-93D5E7A96786} = {7C0D1F06-0B97-49A1-A25D-93D5E7A96786}
+ {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937} = {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_bl2seq", "demo\bl2seq\demo_bl2seq.vcproj", "{E778C1FD-C2F7-47A9-A453-259F6F520B4A}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_asnval", "demo\asnval\demo_asnval.vcproj", "{43D2CAEA-F7C5-43AB-9460-53229B1A8CCE}"
ProjectSection(ProjectDependencies) = postProject
- {35C18E88-9F42-49EA-9881-C3128245490F} = {35C18E88-9F42-49EA-9881-C3128245490F}
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D} = {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}
- {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2} = {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2}
- {327A10DD-2251-4191-8425-17E535235D30} = {327A10DD-2251-4191-8425-17E535235D30}
- {707F859C-FE05-486E-BB82-A447A6CD5036} = {707F859C-FE05-486E-BB82-A447A6CD5036}
- {F8CD481D-462C-40ED-98FA-C6EEF477B5CF} = {F8CD481D-462C-40ED-98FA-C6EEF477B5CF}
- {32AB53DD-66B1-4E17-B411-FEB804E62CF0} = {32AB53DD-66B1-4E17-B411-FEB804E62CF0}
- {F7164C61-0D7C-4EC8-9209-88A760907B6B} = {F7164C61-0D7C-4EC8-9209-88A760907B6B}
- {96FC3702-E2ED-434F-BBA5-3DE1366FFA1F} = {96FC3702-E2ED-434F-BBA5-3DE1366FFA1F}
- {CD41CEB1-4E2C-494B-86E8-E29AF398D7ED} = {CD41CEB1-4E2C-494B-86E8-E29AF398D7ED}
+ {610E62DA-4DD6-479E-8D85-1FB87126D750} = {610E62DA-4DD6-479E-8D85-1FB87126D750}
+ {F6DB30E7-94C5-4760-92FA-449884953A9D} = {F6DB30E7-94C5-4760-92FA-449884953A9D}
+ {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0} = {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0}
+ {7C0D1F06-0B97-49A1-A25D-93D5E7A96786} = {7C0D1F06-0B97-49A1-A25D-93D5E7A96786}
+ {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937} = {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937}
+ {14D69C18-0E8E-4816-8CC6-FC22AEA3E1C7} = {14D69C18-0E8E-4816-8CC6-FC22AEA3E1C7}
+ {85E82D79-6144-4151-A3E7-8140E9ED01CF} = {85E82D79-6144-4151-A3E7-8140E9ED01CF}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_blast", "demo\blast\demo_blast.vcproj", "{F832691F-2EF5-4937-BBB4-626EE814A383}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_bl2seq", "demo\bl2seq\demo_bl2seq.vcproj", "{CFF41F73-FF0C-4EDF-94FD-5FDCB8D0D19F}"
ProjectSection(ProjectDependencies) = postProject
- {35C18E88-9F42-49EA-9881-C3128245490F} = {35C18E88-9F42-49EA-9881-C3128245490F}
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D} = {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}
- {32AB53DD-66B1-4E17-B411-FEB804E62CF0} = {32AB53DD-66B1-4E17-B411-FEB804E62CF0}
- {F8CD481D-462C-40ED-98FA-C6EEF477B5CF} = {F8CD481D-462C-40ED-98FA-C6EEF477B5CF}
- {98C1A680-89B6-4911-8C36-42D14F43B868} = {98C1A680-89B6-4911-8C36-42D14F43B868}
- {F7164C61-0D7C-4EC8-9209-88A760907B6B} = {F7164C61-0D7C-4EC8-9209-88A760907B6B}
- {96FC3702-E2ED-434F-BBA5-3DE1366FFA1F} = {96FC3702-E2ED-434F-BBA5-3DE1366FFA1F}
- {CD41CEB1-4E2C-494B-86E8-E29AF398D7ED} = {CD41CEB1-4E2C-494B-86E8-E29AF398D7ED}
+ {610E62DA-4DD6-479E-8D85-1FB87126D750} = {610E62DA-4DD6-479E-8D85-1FB87126D750}
+ {F6DB30E7-94C5-4760-92FA-449884953A9D} = {F6DB30E7-94C5-4760-92FA-449884953A9D}
+ {7C0D1F06-0B97-49A1-A25D-93D5E7A96786} = {7C0D1F06-0B97-49A1-A25D-93D5E7A96786}
+ {14D69C18-0E8E-4816-8CC6-FC22AEA3E1C7} = {14D69C18-0E8E-4816-8CC6-FC22AEA3E1C7}
+ {85E82D79-6144-4151-A3E7-8140E9ED01CF} = {85E82D79-6144-4151-A3E7-8140E9ED01CF}
+ {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0} = {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0}
+ {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937} = {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937}
+ {A2E2AE46-C7B9-4544-B138-6F7662DF2216} = {A2E2AE46-C7B9-4544-B138-6F7662DF2216}
+ {6058EDC4-453A-48B1-8E27-83820FFB7203} = {6058EDC4-453A-48B1-8E27-83820FFB7203}
+ {B8E40D4D-C20C-42BD-B5E4-6BEB9D08344A} = {B8E40D4D-C20C-42BD-B5E4-6BEB9D08344A}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_blastall", "demo\blastall\demo_blastall.vcproj", "{3039EEDE-B503-4E9D-AAEF-79EF07DF3A9B}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_blast", "demo\blast\demo_blast.vcproj", "{4E04088C-D796-4227-8227-2539E30F04BD}"
ProjectSection(ProjectDependencies) = postProject
- {35C18E88-9F42-49EA-9881-C3128245490F} = {35C18E88-9F42-49EA-9881-C3128245490F}
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D} = {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}
- {F7164C61-0D7C-4EC8-9209-88A760907B6B} = {F7164C61-0D7C-4EC8-9209-88A760907B6B}
- {96FC3702-E2ED-434F-BBA5-3DE1366FFA1F} = {96FC3702-E2ED-434F-BBA5-3DE1366FFA1F}
- {CD41CEB1-4E2C-494B-86E8-E29AF398D7ED} = {CD41CEB1-4E2C-494B-86E8-E29AF398D7ED}
- {F8CD481D-462C-40ED-98FA-C6EEF477B5CF} = {F8CD481D-462C-40ED-98FA-C6EEF477B5CF}
- {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2} = {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2}
- {32AB53DD-66B1-4E17-B411-FEB804E62CF0} = {32AB53DD-66B1-4E17-B411-FEB804E62CF0}
+ {610E62DA-4DD6-479E-8D85-1FB87126D750} = {610E62DA-4DD6-479E-8D85-1FB87126D750}
+ {F6DB30E7-94C5-4760-92FA-449884953A9D} = {F6DB30E7-94C5-4760-92FA-449884953A9D}
+ {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937} = {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937}
+ {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0} = {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0}
+ {2DD94017-2F95-470D-94F5-9F10AD650BDC} = {2DD94017-2F95-470D-94F5-9F10AD650BDC}
+ {A2E2AE46-C7B9-4544-B138-6F7662DF2216} = {A2E2AE46-C7B9-4544-B138-6F7662DF2216}
+ {6058EDC4-453A-48B1-8E27-83820FFB7203} = {6058EDC4-453A-48B1-8E27-83820FFB7203}
+ {B8E40D4D-C20C-42BD-B5E4-6BEB9D08344A} = {B8E40D4D-C20C-42BD-B5E4-6BEB9D08344A}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_blastclust", "demo\blastclust\demo_blastclust.vcproj", "{1C14632F-22E1-40D3-B0C8-1E53C72ED92F}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_blastall", "demo\blastall\demo_blastall.vcproj", "{36A2447A-460B-4A29-9327-18BE2B7007CB}"
ProjectSection(ProjectDependencies) = postProject
- {35C18E88-9F42-49EA-9881-C3128245490F} = {35C18E88-9F42-49EA-9881-C3128245490F}
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D} = {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}
- {F7164C61-0D7C-4EC8-9209-88A760907B6B} = {F7164C61-0D7C-4EC8-9209-88A760907B6B}
- {F8CD481D-462C-40ED-98FA-C6EEF477B5CF} = {F8CD481D-462C-40ED-98FA-C6EEF477B5CF}
- {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2} = {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2}
- {32AB53DD-66B1-4E17-B411-FEB804E62CF0} = {32AB53DD-66B1-4E17-B411-FEB804E62CF0}
+ {610E62DA-4DD6-479E-8D85-1FB87126D750} = {610E62DA-4DD6-479E-8D85-1FB87126D750}
+ {F6DB30E7-94C5-4760-92FA-449884953A9D} = {F6DB30E7-94C5-4760-92FA-449884953A9D}
+ {A2E2AE46-C7B9-4544-B138-6F7662DF2216} = {A2E2AE46-C7B9-4544-B138-6F7662DF2216}
+ {6058EDC4-453A-48B1-8E27-83820FFB7203} = {6058EDC4-453A-48B1-8E27-83820FFB7203}
+ {B8E40D4D-C20C-42BD-B5E4-6BEB9D08344A} = {B8E40D4D-C20C-42BD-B5E4-6BEB9D08344A}
+ {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0} = {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0}
+ {7C0D1F06-0B97-49A1-A25D-93D5E7A96786} = {7C0D1F06-0B97-49A1-A25D-93D5E7A96786}
+ {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937} = {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_blastpgp", "demo\blastpgp\demo_blastpgp.vcproj", "{AA8B7736-A934-41FD-A1F2-92FA47FE518E}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_blastclust", "demo\blastclust\demo_blastclust.vcproj", "{61F9752D-4AE9-4B68-8D20-FF5CF31631A9}"
ProjectSection(ProjectDependencies) = postProject
- {35C18E88-9F42-49EA-9881-C3128245490F} = {35C18E88-9F42-49EA-9881-C3128245490F}
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D} = {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}
- {F7164C61-0D7C-4EC8-9209-88A760907B6B} = {F7164C61-0D7C-4EC8-9209-88A760907B6B}
- {F8CD481D-462C-40ED-98FA-C6EEF477B5CF} = {F8CD481D-462C-40ED-98FA-C6EEF477B5CF}
- {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2} = {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2}
- {32AB53DD-66B1-4E17-B411-FEB804E62CF0} = {32AB53DD-66B1-4E17-B411-FEB804E62CF0}
+ {610E62DA-4DD6-479E-8D85-1FB87126D750} = {610E62DA-4DD6-479E-8D85-1FB87126D750}
+ {F6DB30E7-94C5-4760-92FA-449884953A9D} = {F6DB30E7-94C5-4760-92FA-449884953A9D}
+ {A2E2AE46-C7B9-4544-B138-6F7662DF2216} = {A2E2AE46-C7B9-4544-B138-6F7662DF2216}
+ {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0} = {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0}
+ {7C0D1F06-0B97-49A1-A25D-93D5E7A96786} = {7C0D1F06-0B97-49A1-A25D-93D5E7A96786}
+ {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937} = {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_ccp", "demo\ccp\demo_ccp.vcproj", "{1E7F80A2-A2F7-43C5-A5CD-D9A745A2D9BC}"
- ProjectSection(ProjectDependencies) = postProject
- {35C18E88-9F42-49EA-9881-C3128245490F} = {35C18E88-9F42-49EA-9881-C3128245490F}
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D} = {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}
- {F8CD481D-462C-40ED-98FA-C6EEF477B5CF} = {F8CD481D-462C-40ED-98FA-C6EEF477B5CF}
- {3C4476FB-5518-425A-9D4E-44DD91068776} = {3C4476FB-5518-425A-9D4E-44DD91068776}
- {327A10DD-2251-4191-8425-17E535235D30} = {327A10DD-2251-4191-8425-17E535235D30}
- {E2B932C9-4C8A-4922-9DFF-9FB646184223} = {E2B932C9-4C8A-4922-9DFF-9FB646184223}
- {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2} = {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2}
- {32AB53DD-66B1-4E17-B411-FEB804E62CF0} = {32AB53DD-66B1-4E17-B411-FEB804E62CF0}
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_blastpgp", "demo\blastpgp\demo_blastpgp.vcproj", "{9DC94AC5-FEA4-40B1-9F01-B08B899DE64E}"
+ ProjectSection(ProjectDependencies) = postProject
+ {610E62DA-4DD6-479E-8D85-1FB87126D750} = {610E62DA-4DD6-479E-8D85-1FB87126D750}
+ {F6DB30E7-94C5-4760-92FA-449884953A9D} = {F6DB30E7-94C5-4760-92FA-449884953A9D}
+ {A2E2AE46-C7B9-4544-B138-6F7662DF2216} = {A2E2AE46-C7B9-4544-B138-6F7662DF2216}
+ {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0} = {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0}
+ {7C0D1F06-0B97-49A1-A25D-93D5E7A96786} = {7C0D1F06-0B97-49A1-A25D-93D5E7A96786}
+ {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937} = {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937}
EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_ccpv", "demo\ccpv\demo_ccpv.vcproj", "{4C2CCC7D-3D19-4E13-9317-3927894F0F3B}"
- ProjectSection(ProjectDependencies) = postProject
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D} = {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}
- {96FC3702-E2ED-434F-BBA5-3DE1366FFA1F} = {96FC3702-E2ED-434F-BBA5-3DE1366FFA1F}
- {CD41CEB1-4E2C-494B-86E8-E29AF398D7ED} = {CD41CEB1-4E2C-494B-86E8-E29AF398D7ED}
- {F8CD481D-462C-40ED-98FA-C6EEF477B5CF} = {F8CD481D-462C-40ED-98FA-C6EEF477B5CF}
- {F2107221-7687-4F18-AEAC-FAA7C4EFCC16} = {F2107221-7687-4F18-AEAC-FAA7C4EFCC16}
- {3C4476FB-5518-425A-9D4E-44DD91068776} = {3C4476FB-5518-425A-9D4E-44DD91068776}
- {327A10DD-2251-4191-8425-17E535235D30} = {327A10DD-2251-4191-8425-17E535235D30}
- {E2B932C9-4C8A-4922-9DFF-9FB646184223} = {E2B932C9-4C8A-4922-9DFF-9FB646184223}
- {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2} = {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2}
- {32AB53DD-66B1-4E17-B411-FEB804E62CF0} = {32AB53DD-66B1-4E17-B411-FEB804E62CF0}
- {FD5A8225-8809-4FFB-9190-B6403A2AD467} = {FD5A8225-8809-4FFB-9190-B6403A2AD467}
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_ccp", "demo\ccp\demo_ccp.vcproj", "{F8DA831A-6128-4FB6-A41F-D4051D736D81}"
+ ProjectSection(ProjectDependencies) = postProject
+ {610E62DA-4DD6-479E-8D85-1FB87126D750} = {610E62DA-4DD6-479E-8D85-1FB87126D750}
+ {F6DB30E7-94C5-4760-92FA-449884953A9D} = {F6DB30E7-94C5-4760-92FA-449884953A9D}
+ {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0} = {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0}
+ {F8832A8F-9EA0-4DFD-B181-FAA767F3B9AF} = {F8832A8F-9EA0-4DFD-B181-FAA767F3B9AF}
+ {14D69C18-0E8E-4816-8CC6-FC22AEA3E1C7} = {14D69C18-0E8E-4816-8CC6-FC22AEA3E1C7}
+ {AB9DEE32-64FD-4700-84DF-485166A3E367} = {AB9DEE32-64FD-4700-84DF-485166A3E367}
+ {7C0D1F06-0B97-49A1-A25D-93D5E7A96786} = {7C0D1F06-0B97-49A1-A25D-93D5E7A96786}
+ {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937} = {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_ccpv", "demo\ccpv\demo_ccpv.vcproj", "{3F5FD5F7-2FB9-477E-9011-F09EECEA56E3}"
+ ProjectSection(ProjectDependencies) = postProject
+ {F6DB30E7-94C5-4760-92FA-449884953A9D} = {F6DB30E7-94C5-4760-92FA-449884953A9D}
+ {6058EDC4-453A-48B1-8E27-83820FFB7203} = {6058EDC4-453A-48B1-8E27-83820FFB7203}
+ {B8E40D4D-C20C-42BD-B5E4-6BEB9D08344A} = {B8E40D4D-C20C-42BD-B5E4-6BEB9D08344A}
+ {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0} = {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0}
+ {25806259-F586-4AAC-BDD1-50C1B227147D} = {25806259-F586-4AAC-BDD1-50C1B227147D}
+ {F8832A8F-9EA0-4DFD-B181-FAA767F3B9AF} = {F8832A8F-9EA0-4DFD-B181-FAA767F3B9AF}
+ {14D69C18-0E8E-4816-8CC6-FC22AEA3E1C7} = {14D69C18-0E8E-4816-8CC6-FC22AEA3E1C7}
+ {AB9DEE32-64FD-4700-84DF-485166A3E367} = {AB9DEE32-64FD-4700-84DF-485166A3E367}
+ {7C0D1F06-0B97-49A1-A25D-93D5E7A96786} = {7C0D1F06-0B97-49A1-A25D-93D5E7A96786}
+ {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937} = {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937}
+ {BDDE8ABD-4E45-49DA-B499-131BD6FCABBD} = {BDDE8ABD-4E45-49DA-B499-131BD6FCABBD}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_cdscan", "demo\cdscan\demo_cdscan.vcproj", "{D221EDFA-64EB-479A-B15B-792A90ADE47D}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_cdscan", "demo\cdscan\demo_cdscan.vcproj", "{A8DC9C13-504F-4ED7-B299-ED251D8D7D57}"
ProjectSection(ProjectDependencies) = postProject
- {CF596340-202E-4E79-B041-F4310A422C20} = {CF596340-202E-4E79-B041-F4310A422C20}
- {327A10DD-2251-4191-8425-17E535235D30} = {327A10DD-2251-4191-8425-17E535235D30}
- {E2B932C9-4C8A-4922-9DFF-9FB646184223} = {E2B932C9-4C8A-4922-9DFF-9FB646184223}
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D} = {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}
- {F8CD481D-462C-40ED-98FA-C6EEF477B5CF} = {F8CD481D-462C-40ED-98FA-C6EEF477B5CF}
- {3C4476FB-5518-425A-9D4E-44DD91068776} = {3C4476FB-5518-425A-9D4E-44DD91068776}
- {F2107221-7687-4F18-AEAC-FAA7C4EFCC16} = {F2107221-7687-4F18-AEAC-FAA7C4EFCC16}
- {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2} = {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2}
- {AFDEDE71-796D-4896-BEE6-AFFC4F77CC09} = {AFDEDE71-796D-4896-BEE6-AFFC4F77CC09}
+ {74B970B2-6C7F-4AEE-9031-27CC087D7214} = {74B970B2-6C7F-4AEE-9031-27CC087D7214}
+ {14D69C18-0E8E-4816-8CC6-FC22AEA3E1C7} = {14D69C18-0E8E-4816-8CC6-FC22AEA3E1C7}
+ {AB9DEE32-64FD-4700-84DF-485166A3E367} = {AB9DEE32-64FD-4700-84DF-485166A3E367}
+ {F6DB30E7-94C5-4760-92FA-449884953A9D} = {F6DB30E7-94C5-4760-92FA-449884953A9D}
+ {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0} = {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0}
+ {F8832A8F-9EA0-4DFD-B181-FAA767F3B9AF} = {F8832A8F-9EA0-4DFD-B181-FAA767F3B9AF}
+ {25806259-F586-4AAC-BDD1-50C1B227147D} = {25806259-F586-4AAC-BDD1-50C1B227147D}
+ {7C0D1F06-0B97-49A1-A25D-93D5E7A96786} = {7C0D1F06-0B97-49A1-A25D-93D5E7A96786}
+ {8FB57DC4-F98A-4E0D-BDBA-5AB2F7405B58} = {8FB57DC4-F98A-4E0D-BDBA-5AB2F7405B58}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_checksub", "demo\checksub\demo_checksub.vcproj", "{83D6FAB0-4A26-4EB6-9B0D-7E665CBE703C}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_checksub", "demo\checksub\demo_checksub.vcproj", "{D6205067-CD94-494E-A553-C3706C7CFB3B}"
ProjectSection(ProjectDependencies) = postProject
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D} = {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}
- {F8CD481D-462C-40ED-98FA-C6EEF477B5CF} = {F8CD481D-462C-40ED-98FA-C6EEF477B5CF}
- {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2} = {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2}
- {F2107221-7687-4F18-AEAC-FAA7C4EFCC16} = {F2107221-7687-4F18-AEAC-FAA7C4EFCC16}
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_cnsgn", "demo\cnsgn\demo_cnsgn.vcproj", "{2874FAEF-31B3-4A57-9CD4-998089E73480}"
+ {F6DB30E7-94C5-4760-92FA-449884953A9D} = {F6DB30E7-94C5-4760-92FA-449884953A9D}
+ {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0} = {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0}
+ {7C0D1F06-0B97-49A1-A25D-93D5E7A96786} = {7C0D1F06-0B97-49A1-A25D-93D5E7A96786}
+ {25806259-F586-4AAC-BDD1-50C1B227147D} = {25806259-F586-4AAC-BDD1-50C1B227147D}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_cleanasn", "demo\cleanasn\demo_cleanasn.vcproj", "{5F755177-01B3-44E5-BC77-6FCF825CE0C8}"
ProjectSection(ProjectDependencies) = postProject
- {35C18E88-9F42-49EA-9881-C3128245490F} = {35C18E88-9F42-49EA-9881-C3128245490F}
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D} = {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}
- {F7164C61-0D7C-4EC8-9209-88A760907B6B} = {F7164C61-0D7C-4EC8-9209-88A760907B6B}
- {F8CD481D-462C-40ED-98FA-C6EEF477B5CF} = {F8CD481D-462C-40ED-98FA-C6EEF477B5CF}
- {3C4476FB-5518-425A-9D4E-44DD91068776} = {3C4476FB-5518-425A-9D4E-44DD91068776}
- {327A10DD-2251-4191-8425-17E535235D30} = {327A10DD-2251-4191-8425-17E535235D30}
- {E2B932C9-4C8A-4922-9DFF-9FB646184223} = {E2B932C9-4C8A-4922-9DFF-9FB646184223}
- {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2} = {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2}
- {32AB53DD-66B1-4E17-B411-FEB804E62CF0} = {32AB53DD-66B1-4E17-B411-FEB804E62CF0}
- {45CF24A4-E238-4E5C-BACC-5F0D6556A8EC} = {45CF24A4-E238-4E5C-BACC-5F0D6556A8EC}
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_cnsgnv", "demo\cnsgnv\demo_cnsgnv.vcproj", "{F97DC7EE-9AD3-48A6-8F68-2CFA84F4B38A}"
+ {610E62DA-4DD6-479E-8D85-1FB87126D750} = {610E62DA-4DD6-479E-8D85-1FB87126D750}
+ {F6DB30E7-94C5-4760-92FA-449884953A9D} = {F6DB30E7-94C5-4760-92FA-449884953A9D}
+ {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0} = {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0}
+ {7C0D1F06-0B97-49A1-A25D-93D5E7A96786} = {7C0D1F06-0B97-49A1-A25D-93D5E7A96786}
+ {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937} = {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_cnsgn", "demo\cnsgn\demo_cnsgn.vcproj", "{9BCA1F30-F3E2-4F16-8974-C0C2D3902292}"
ProjectSection(ProjectDependencies) = postProject
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D} = {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}
- {96FC3702-E2ED-434F-BBA5-3DE1366FFA1F} = {96FC3702-E2ED-434F-BBA5-3DE1366FFA1F}
- {CD41CEB1-4E2C-494B-86E8-E29AF398D7ED} = {CD41CEB1-4E2C-494B-86E8-E29AF398D7ED}
- {F8CD481D-462C-40ED-98FA-C6EEF477B5CF} = {F8CD481D-462C-40ED-98FA-C6EEF477B5CF}
- {F2107221-7687-4F18-AEAC-FAA7C4EFCC16} = {F2107221-7687-4F18-AEAC-FAA7C4EFCC16}
- {3C4476FB-5518-425A-9D4E-44DD91068776} = {3C4476FB-5518-425A-9D4E-44DD91068776}
- {327A10DD-2251-4191-8425-17E535235D30} = {327A10DD-2251-4191-8425-17E535235D30}
- {E2B932C9-4C8A-4922-9DFF-9FB646184223} = {E2B932C9-4C8A-4922-9DFF-9FB646184223}
- {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2} = {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2}
- {32AB53DD-66B1-4E17-B411-FEB804E62CF0} = {32AB53DD-66B1-4E17-B411-FEB804E62CF0}
- {FD5A8225-8809-4FFB-9190-B6403A2AD467} = {FD5A8225-8809-4FFB-9190-B6403A2AD467}
+ {610E62DA-4DD6-479E-8D85-1FB87126D750} = {610E62DA-4DD6-479E-8D85-1FB87126D750}
+ {F6DB30E7-94C5-4760-92FA-449884953A9D} = {F6DB30E7-94C5-4760-92FA-449884953A9D}
+ {A2E2AE46-C7B9-4544-B138-6F7662DF2216} = {A2E2AE46-C7B9-4544-B138-6F7662DF2216}
+ {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0} = {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0}
+ {F8832A8F-9EA0-4DFD-B181-FAA767F3B9AF} = {F8832A8F-9EA0-4DFD-B181-FAA767F3B9AF}
+ {14D69C18-0E8E-4816-8CC6-FC22AEA3E1C7} = {14D69C18-0E8E-4816-8CC6-FC22AEA3E1C7}
+ {AB9DEE32-64FD-4700-84DF-485166A3E367} = {AB9DEE32-64FD-4700-84DF-485166A3E367}
+ {7C0D1F06-0B97-49A1-A25D-93D5E7A96786} = {7C0D1F06-0B97-49A1-A25D-93D5E7A96786}
+ {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937} = {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937}
+ {759991FD-441C-4267-A364-1BB2236C67B8} = {759991FD-441C-4267-A364-1BB2236C67B8}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_cnsrt", "demo\cnsrt\demo_cnsrt.vcproj", "{487B891B-190D-4534-9B6F-120C53FB4BB9}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_cnsgnv", "demo\cnsgnv\demo_cnsgnv.vcproj", "{27575CBA-8AD7-4999-995C-694483047B3C}"
ProjectSection(ProjectDependencies) = postProject
- {35C18E88-9F42-49EA-9881-C3128245490F} = {35C18E88-9F42-49EA-9881-C3128245490F}
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D} = {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}
- {F8CD481D-462C-40ED-98FA-C6EEF477B5CF} = {F8CD481D-462C-40ED-98FA-C6EEF477B5CF}
- {3C4476FB-5518-425A-9D4E-44DD91068776} = {3C4476FB-5518-425A-9D4E-44DD91068776}
- {327A10DD-2251-4191-8425-17E535235D30} = {327A10DD-2251-4191-8425-17E535235D30}
- {E2B932C9-4C8A-4922-9DFF-9FB646184223} = {E2B932C9-4C8A-4922-9DFF-9FB646184223}
- {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2} = {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2}
- {32AB53DD-66B1-4E17-B411-FEB804E62CF0} = {32AB53DD-66B1-4E17-B411-FEB804E62CF0}
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_cnsrtv", "demo\cnsrtv\demo_cnsrtv.vcproj", "{750C92D0-CF2F-413E-8D46-CE2D01901322}"
- ProjectSection(ProjectDependencies) = postProject
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D} = {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}
- {96FC3702-E2ED-434F-BBA5-3DE1366FFA1F} = {96FC3702-E2ED-434F-BBA5-3DE1366FFA1F}
- {CD41CEB1-4E2C-494B-86E8-E29AF398D7ED} = {CD41CEB1-4E2C-494B-86E8-E29AF398D7ED}
- {F8CD481D-462C-40ED-98FA-C6EEF477B5CF} = {F8CD481D-462C-40ED-98FA-C6EEF477B5CF}
- {F2107221-7687-4F18-AEAC-FAA7C4EFCC16} = {F2107221-7687-4F18-AEAC-FAA7C4EFCC16}
- {3C4476FB-5518-425A-9D4E-44DD91068776} = {3C4476FB-5518-425A-9D4E-44DD91068776}
- {327A10DD-2251-4191-8425-17E535235D30} = {327A10DD-2251-4191-8425-17E535235D30}
- {E2B932C9-4C8A-4922-9DFF-9FB646184223} = {E2B932C9-4C8A-4922-9DFF-9FB646184223}
- {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2} = {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2}
- {32AB53DD-66B1-4E17-B411-FEB804E62CF0} = {32AB53DD-66B1-4E17-B411-FEB804E62CF0}
- {FD5A8225-8809-4FFB-9190-B6403A2AD467} = {FD5A8225-8809-4FFB-9190-B6403A2AD467}
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_copymat", "demo\copymat\demo_copymat.vcproj", "{1DC69786-C012-46C5-8B82-92C093434D05}"
- ProjectSection(ProjectDependencies) = postProject
- {35C18E88-9F42-49EA-9881-C3128245490F} = {35C18E88-9F42-49EA-9881-C3128245490F}
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D} = {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}
- {F7164C61-0D7C-4EC8-9209-88A760907B6B} = {F7164C61-0D7C-4EC8-9209-88A760907B6B}
- {CD41CEB1-4E2C-494B-86E8-E29AF398D7ED} = {CD41CEB1-4E2C-494B-86E8-E29AF398D7ED}
- {F8CD481D-462C-40ED-98FA-C6EEF477B5CF} = {F8CD481D-462C-40ED-98FA-C6EEF477B5CF}
- {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2} = {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2}
- {32AB53DD-66B1-4E17-B411-FEB804E62CF0} = {32AB53DD-66B1-4E17-B411-FEB804E62CF0}
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_dosimple", "demo\dosimple\demo_dosimple.vcproj", "{4F4585B4-7710-4BCA-86CE-4766F0F905E8}"
- ProjectSection(ProjectDependencies) = postProject
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D} = {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}
- {F8CD481D-462C-40ED-98FA-C6EEF477B5CF} = {F8CD481D-462C-40ED-98FA-C6EEF477B5CF}
- {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2} = {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2}
- {F2107221-7687-4F18-AEAC-FAA7C4EFCC16} = {F2107221-7687-4F18-AEAC-FAA7C4EFCC16}
+ {F6DB30E7-94C5-4760-92FA-449884953A9D} = {F6DB30E7-94C5-4760-92FA-449884953A9D}
+ {6058EDC4-453A-48B1-8E27-83820FFB7203} = {6058EDC4-453A-48B1-8E27-83820FFB7203}
+ {B8E40D4D-C20C-42BD-B5E4-6BEB9D08344A} = {B8E40D4D-C20C-42BD-B5E4-6BEB9D08344A}
+ {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0} = {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0}
+ {25806259-F586-4AAC-BDD1-50C1B227147D} = {25806259-F586-4AAC-BDD1-50C1B227147D}
+ {F8832A8F-9EA0-4DFD-B181-FAA767F3B9AF} = {F8832A8F-9EA0-4DFD-B181-FAA767F3B9AF}
+ {14D69C18-0E8E-4816-8CC6-FC22AEA3E1C7} = {14D69C18-0E8E-4816-8CC6-FC22AEA3E1C7}
+ {AB9DEE32-64FD-4700-84DF-485166A3E367} = {AB9DEE32-64FD-4700-84DF-485166A3E367}
+ {7C0D1F06-0B97-49A1-A25D-93D5E7A96786} = {7C0D1F06-0B97-49A1-A25D-93D5E7A96786}
+ {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937} = {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937}
+ {BDDE8ABD-4E45-49DA-B499-131BD6FCABBD} = {BDDE8ABD-4E45-49DA-B499-131BD6FCABBD}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_dust", "demo\dust\demo_dust.vcproj", "{EC823D54-D2D0-4E00-A831-2BA12DF2AD50}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_cnsrt", "demo\cnsrt\demo_cnsrt.vcproj", "{8D7875E5-8DC6-44CA-8B25-6501CC30C301}"
ProjectSection(ProjectDependencies) = postProject
- {35C18E88-9F42-49EA-9881-C3128245490F} = {35C18E88-9F42-49EA-9881-C3128245490F}
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D} = {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}
- {F8CD481D-462C-40ED-98FA-C6EEF477B5CF} = {F8CD481D-462C-40ED-98FA-C6EEF477B5CF}
- {3C4476FB-5518-425A-9D4E-44DD91068776} = {3C4476FB-5518-425A-9D4E-44DD91068776}
- {327A10DD-2251-4191-8425-17E535235D30} = {327A10DD-2251-4191-8425-17E535235D30}
- {E2B932C9-4C8A-4922-9DFF-9FB646184223} = {E2B932C9-4C8A-4922-9DFF-9FB646184223}
- {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2} = {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2}
- {32AB53DD-66B1-4E17-B411-FEB804E62CF0} = {32AB53DD-66B1-4E17-B411-FEB804E62CF0}
+ {610E62DA-4DD6-479E-8D85-1FB87126D750} = {610E62DA-4DD6-479E-8D85-1FB87126D750}
+ {F6DB30E7-94C5-4760-92FA-449884953A9D} = {F6DB30E7-94C5-4760-92FA-449884953A9D}
+ {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0} = {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0}
+ {F8832A8F-9EA0-4DFD-B181-FAA767F3B9AF} = {F8832A8F-9EA0-4DFD-B181-FAA767F3B9AF}
+ {14D69C18-0E8E-4816-8CC6-FC22AEA3E1C7} = {14D69C18-0E8E-4816-8CC6-FC22AEA3E1C7}
+ {AB9DEE32-64FD-4700-84DF-485166A3E367} = {AB9DEE32-64FD-4700-84DF-485166A3E367}
+ {7C0D1F06-0B97-49A1-A25D-93D5E7A96786} = {7C0D1F06-0B97-49A1-A25D-93D5E7A96786}
+ {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937} = {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_dustv", "demo\dustv\demo_dustv.vcproj", "{D3DCCB97-8DA8-4F61-BE14-F7078635FE43}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_cnsrtv", "demo\cnsrtv\demo_cnsrtv.vcproj", "{6A9781AB-D45C-4D85-971D-04ED02400001}"
ProjectSection(ProjectDependencies) = postProject
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D} = {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}
- {96FC3702-E2ED-434F-BBA5-3DE1366FFA1F} = {96FC3702-E2ED-434F-BBA5-3DE1366FFA1F}
- {CD41CEB1-4E2C-494B-86E8-E29AF398D7ED} = {CD41CEB1-4E2C-494B-86E8-E29AF398D7ED}
- {F8CD481D-462C-40ED-98FA-C6EEF477B5CF} = {F8CD481D-462C-40ED-98FA-C6EEF477B5CF}
- {F2107221-7687-4F18-AEAC-FAA7C4EFCC16} = {F2107221-7687-4F18-AEAC-FAA7C4EFCC16}
- {3C4476FB-5518-425A-9D4E-44DD91068776} = {3C4476FB-5518-425A-9D4E-44DD91068776}
- {327A10DD-2251-4191-8425-17E535235D30} = {327A10DD-2251-4191-8425-17E535235D30}
- {E2B932C9-4C8A-4922-9DFF-9FB646184223} = {E2B932C9-4C8A-4922-9DFF-9FB646184223}
- {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2} = {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2}
- {32AB53DD-66B1-4E17-B411-FEB804E62CF0} = {32AB53DD-66B1-4E17-B411-FEB804E62CF0}
- {FD5A8225-8809-4FFB-9190-B6403A2AD467} = {FD5A8225-8809-4FFB-9190-B6403A2AD467}
- EndProjectSection
+ {F6DB30E7-94C5-4760-92FA-449884953A9D} = {F6DB30E7-94C5-4760-92FA-449884953A9D}
+ {6058EDC4-453A-48B1-8E27-83820FFB7203} = {6058EDC4-453A-48B1-8E27-83820FFB7203}
+ {B8E40D4D-C20C-42BD-B5E4-6BEB9D08344A} = {B8E40D4D-C20C-42BD-B5E4-6BEB9D08344A}
+ {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0} = {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0}
+ {25806259-F586-4AAC-BDD1-50C1B227147D} = {25806259-F586-4AAC-BDD1-50C1B227147D}
+ {F8832A8F-9EA0-4DFD-B181-FAA767F3B9AF} = {F8832A8F-9EA0-4DFD-B181-FAA767F3B9AF}
+ {14D69C18-0E8E-4816-8CC6-FC22AEA3E1C7} = {14D69C18-0E8E-4816-8CC6-FC22AEA3E1C7}
+ {AB9DEE32-64FD-4700-84DF-485166A3E367} = {AB9DEE32-64FD-4700-84DF-485166A3E367}
+ {7C0D1F06-0B97-49A1-A25D-93D5E7A96786} = {7C0D1F06-0B97-49A1-A25D-93D5E7A96786}
+ {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937} = {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937}
+ {BDDE8ABD-4E45-49DA-B499-131BD6FCABBD} = {BDDE8ABD-4E45-49DA-B499-131BD6FCABBD}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_copymat", "demo\copymat\demo_copymat.vcproj", "{090B589F-7704-4D2F-9778-F884AFFB2359}"
+ ProjectSection(ProjectDependencies) = postProject
+ {610E62DA-4DD6-479E-8D85-1FB87126D750} = {610E62DA-4DD6-479E-8D85-1FB87126D750}
+ {F6DB30E7-94C5-4760-92FA-449884953A9D} = {F6DB30E7-94C5-4760-92FA-449884953A9D}
+ {A2E2AE46-C7B9-4544-B138-6F7662DF2216} = {A2E2AE46-C7B9-4544-B138-6F7662DF2216}
+ {B8E40D4D-C20C-42BD-B5E4-6BEB9D08344A} = {B8E40D4D-C20C-42BD-B5E4-6BEB9D08344A}
+ {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0} = {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0}
+ {7C0D1F06-0B97-49A1-A25D-93D5E7A96786} = {7C0D1F06-0B97-49A1-A25D-93D5E7A96786}
+ {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937} = {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937}
+ EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_entrez2", "demo\entrez2\demo_entrez2.vcproj", "{053F419B-7D93-4051-A624-C6753A0B1A43}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_cspeedtest", "demo\cspeedtest\demo_cspeedtest.vcproj", "{28B5A386-FA1C-4106-AB6E-5DA967D979E0}"
ProjectSection(ProjectDependencies) = postProject
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D} = {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}
- {F7164C61-0D7C-4EC8-9209-88A760907B6B} = {F7164C61-0D7C-4EC8-9209-88A760907B6B}
- {96FC3702-E2ED-434F-BBA5-3DE1366FFA1F} = {96FC3702-E2ED-434F-BBA5-3DE1366FFA1F}
- {CD41CEB1-4E2C-494B-86E8-E29AF398D7ED} = {CD41CEB1-4E2C-494B-86E8-E29AF398D7ED}
- {F8CD481D-462C-40ED-98FA-C6EEF477B5CF} = {F8CD481D-462C-40ED-98FA-C6EEF477B5CF}
- {F2107221-7687-4F18-AEAC-FAA7C4EFCC16} = {F2107221-7687-4F18-AEAC-FAA7C4EFCC16}
- {32AB53DD-66B1-4E17-B411-FEB804E62CF0} = {32AB53DD-66B1-4E17-B411-FEB804E62CF0}
- {98C1A680-89B6-4911-8C36-42D14F43B868} = {98C1A680-89B6-4911-8C36-42D14F43B868}
- {FD5A8225-8809-4FFB-9190-B6403A2AD467} = {FD5A8225-8809-4FFB-9190-B6403A2AD467}
+ {610E62DA-4DD6-479E-8D85-1FB87126D750} = {610E62DA-4DD6-479E-8D85-1FB87126D750}
+ {F6DB30E7-94C5-4760-92FA-449884953A9D} = {F6DB30E7-94C5-4760-92FA-449884953A9D}
+ {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0} = {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0}
+ {7C0D1F06-0B97-49A1-A25D-93D5E7A96786} = {7C0D1F06-0B97-49A1-A25D-93D5E7A96786}
+ {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937} = {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_epi", "demo\epi\demo_epi.vcproj", "{DAF15754-B721-430A-A1B9-55D6D67C036D}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_dosimple", "demo\dosimple\demo_dosimple.vcproj", "{C6348B36-F5C4-43A9-8577-4F6646B3D78D}"
ProjectSection(ProjectDependencies) = postProject
- {35C18E88-9F42-49EA-9881-C3128245490F} = {35C18E88-9F42-49EA-9881-C3128245490F}
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D} = {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}
- {F8CD481D-462C-40ED-98FA-C6EEF477B5CF} = {F8CD481D-462C-40ED-98FA-C6EEF477B5CF}
- {3C4476FB-5518-425A-9D4E-44DD91068776} = {3C4476FB-5518-425A-9D4E-44DD91068776}
- {327A10DD-2251-4191-8425-17E535235D30} = {327A10DD-2251-4191-8425-17E535235D30}
- {E2B932C9-4C8A-4922-9DFF-9FB646184223} = {E2B932C9-4C8A-4922-9DFF-9FB646184223}
- {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2} = {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2}
- {32AB53DD-66B1-4E17-B411-FEB804E62CF0} = {32AB53DD-66B1-4E17-B411-FEB804E62CF0}
+ {F6DB30E7-94C5-4760-92FA-449884953A9D} = {F6DB30E7-94C5-4760-92FA-449884953A9D}
+ {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0} = {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0}
+ {7C0D1F06-0B97-49A1-A25D-93D5E7A96786} = {7C0D1F06-0B97-49A1-A25D-93D5E7A96786}
+ {25806259-F586-4AAC-BDD1-50C1B227147D} = {25806259-F586-4AAC-BDD1-50C1B227147D}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_epiv", "demo\epiv\demo_epiv.vcproj", "{7ACBE6DC-0F7B-4071-B3EF-8DFD67CC4D13}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_dust", "demo\dust\demo_dust.vcproj", "{7D38F129-EF19-4A07-8EDC-AED9E364E2CB}"
ProjectSection(ProjectDependencies) = postProject
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D} = {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}
- {96FC3702-E2ED-434F-BBA5-3DE1366FFA1F} = {96FC3702-E2ED-434F-BBA5-3DE1366FFA1F}
- {CD41CEB1-4E2C-494B-86E8-E29AF398D7ED} = {CD41CEB1-4E2C-494B-86E8-E29AF398D7ED}
- {F8CD481D-462C-40ED-98FA-C6EEF477B5CF} = {F8CD481D-462C-40ED-98FA-C6EEF477B5CF}
- {F2107221-7687-4F18-AEAC-FAA7C4EFCC16} = {F2107221-7687-4F18-AEAC-FAA7C4EFCC16}
- {3C4476FB-5518-425A-9D4E-44DD91068776} = {3C4476FB-5518-425A-9D4E-44DD91068776}
- {327A10DD-2251-4191-8425-17E535235D30} = {327A10DD-2251-4191-8425-17E535235D30}
- {E2B932C9-4C8A-4922-9DFF-9FB646184223} = {E2B932C9-4C8A-4922-9DFF-9FB646184223}
- {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2} = {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2}
- {32AB53DD-66B1-4E17-B411-FEB804E62CF0} = {32AB53DD-66B1-4E17-B411-FEB804E62CF0}
- {FD5A8225-8809-4FFB-9190-B6403A2AD467} = {FD5A8225-8809-4FFB-9190-B6403A2AD467}
+ {610E62DA-4DD6-479E-8D85-1FB87126D750} = {610E62DA-4DD6-479E-8D85-1FB87126D750}
+ {F6DB30E7-94C5-4760-92FA-449884953A9D} = {F6DB30E7-94C5-4760-92FA-449884953A9D}
+ {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0} = {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0}
+ {F8832A8F-9EA0-4DFD-B181-FAA767F3B9AF} = {F8832A8F-9EA0-4DFD-B181-FAA767F3B9AF}
+ {14D69C18-0E8E-4816-8CC6-FC22AEA3E1C7} = {14D69C18-0E8E-4816-8CC6-FC22AEA3E1C7}
+ {AB9DEE32-64FD-4700-84DF-485166A3E367} = {AB9DEE32-64FD-4700-84DF-485166A3E367}
+ {7C0D1F06-0B97-49A1-A25D-93D5E7A96786} = {7C0D1F06-0B97-49A1-A25D-93D5E7A96786}
+ {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937} = {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_fa2htgs", "demo\fa2htgs\demo_fa2htgs.vcproj", "{0F815DB5-EFA3-482B-8E8C-3DEFFD34F614}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_dustv", "demo\dustv\demo_dustv.vcproj", "{C19E4244-4CAD-40A7-900A-7942991DFB75}"
ProjectSection(ProjectDependencies) = postProject
- {35C18E88-9F42-49EA-9881-C3128245490F} = {35C18E88-9F42-49EA-9881-C3128245490F}
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D} = {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}
- {F8CD481D-462C-40ED-98FA-C6EEF477B5CF} = {F8CD481D-462C-40ED-98FA-C6EEF477B5CF}
- {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2} = {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2}
+ {F6DB30E7-94C5-4760-92FA-449884953A9D} = {F6DB30E7-94C5-4760-92FA-449884953A9D}
+ {6058EDC4-453A-48B1-8E27-83820FFB7203} = {6058EDC4-453A-48B1-8E27-83820FFB7203}
+ {B8E40D4D-C20C-42BD-B5E4-6BEB9D08344A} = {B8E40D4D-C20C-42BD-B5E4-6BEB9D08344A}
+ {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0} = {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0}
+ {25806259-F586-4AAC-BDD1-50C1B227147D} = {25806259-F586-4AAC-BDD1-50C1B227147D}
+ {F8832A8F-9EA0-4DFD-B181-FAA767F3B9AF} = {F8832A8F-9EA0-4DFD-B181-FAA767F3B9AF}
+ {14D69C18-0E8E-4816-8CC6-FC22AEA3E1C7} = {14D69C18-0E8E-4816-8CC6-FC22AEA3E1C7}
+ {AB9DEE32-64FD-4700-84DF-485166A3E367} = {AB9DEE32-64FD-4700-84DF-485166A3E367}
+ {7C0D1F06-0B97-49A1-A25D-93D5E7A96786} = {7C0D1F06-0B97-49A1-A25D-93D5E7A96786}
+ {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937} = {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937}
+ {BDDE8ABD-4E45-49DA-B499-131BD6FCABBD} = {BDDE8ABD-4E45-49DA-B499-131BD6FCABBD}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_fastacmd", "demo\fastacmd\demo_fastacmd.vcproj", "{C9D7C3C5-2568-46D9-A1C8-08305F90C6A0}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_entrez2", "demo\entrez2\demo_entrez2.vcproj", "{7BFFD010-510A-4C0C-BD77-5845016DABBA}"
ProjectSection(ProjectDependencies) = postProject
- {35C18E88-9F42-49EA-9881-C3128245490F} = {35C18E88-9F42-49EA-9881-C3128245490F}
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D} = {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}
- {F7164C61-0D7C-4EC8-9209-88A760907B6B} = {F7164C61-0D7C-4EC8-9209-88A760907B6B}
- {F8CD481D-462C-40ED-98FA-C6EEF477B5CF} = {F8CD481D-462C-40ED-98FA-C6EEF477B5CF}
- {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2} = {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2}
- {32AB53DD-66B1-4E17-B411-FEB804E62CF0} = {32AB53DD-66B1-4E17-B411-FEB804E62CF0}
+ {F6DB30E7-94C5-4760-92FA-449884953A9D} = {F6DB30E7-94C5-4760-92FA-449884953A9D}
+ {A2E2AE46-C7B9-4544-B138-6F7662DF2216} = {A2E2AE46-C7B9-4544-B138-6F7662DF2216}
+ {6058EDC4-453A-48B1-8E27-83820FFB7203} = {6058EDC4-453A-48B1-8E27-83820FFB7203}
+ {B8E40D4D-C20C-42BD-B5E4-6BEB9D08344A} = {B8E40D4D-C20C-42BD-B5E4-6BEB9D08344A}
+ {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0} = {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0}
+ {25806259-F586-4AAC-BDD1-50C1B227147D} = {25806259-F586-4AAC-BDD1-50C1B227147D}
+ {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937} = {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937}
+ {2DD94017-2F95-470D-94F5-9F10AD650BDC} = {2DD94017-2F95-470D-94F5-9F10AD650BDC}
+ {BDDE8ABD-4E45-49DA-B499-131BD6FCABBD} = {BDDE8ABD-4E45-49DA-B499-131BD6FCABBD}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_flint", "demo\flint\demo_flint.vcproj", "{3EFBB872-C18C-4F90-BA06-286C205E8A8A}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_epi", "demo\epi\demo_epi.vcproj", "{B487568D-8168-46AC-80AA-86F955301F21}"
ProjectSection(ProjectDependencies) = postProject
- {35C18E88-9F42-49EA-9881-C3128245490F} = {35C18E88-9F42-49EA-9881-C3128245490F}
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D} = {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}
- {F8CD481D-462C-40ED-98FA-C6EEF477B5CF} = {F8CD481D-462C-40ED-98FA-C6EEF477B5CF}
- {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2} = {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2}
- {32AB53DD-66B1-4E17-B411-FEB804E62CF0} = {32AB53DD-66B1-4E17-B411-FEB804E62CF0}
- {327A10DD-2251-4191-8425-17E535235D30} = {327A10DD-2251-4191-8425-17E535235D30}
- {707F859C-FE05-486E-BB82-A447A6CD5036} = {707F859C-FE05-486E-BB82-A447A6CD5036}
+ {610E62DA-4DD6-479E-8D85-1FB87126D750} = {610E62DA-4DD6-479E-8D85-1FB87126D750}
+ {F6DB30E7-94C5-4760-92FA-449884953A9D} = {F6DB30E7-94C5-4760-92FA-449884953A9D}
+ {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0} = {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0}
+ {F8832A8F-9EA0-4DFD-B181-FAA767F3B9AF} = {F8832A8F-9EA0-4DFD-B181-FAA767F3B9AF}
+ {14D69C18-0E8E-4816-8CC6-FC22AEA3E1C7} = {14D69C18-0E8E-4816-8CC6-FC22AEA3E1C7}
+ {AB9DEE32-64FD-4700-84DF-485166A3E367} = {AB9DEE32-64FD-4700-84DF-485166A3E367}
+ {7C0D1F06-0B97-49A1-A25D-93D5E7A96786} = {7C0D1F06-0B97-49A1-A25D-93D5E7A96786}
+ {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937} = {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_formatdb", "demo\formatdb\demo_formatdb.vcproj", "{3218262E-1A52-4542-8F22-A49D06C334AC}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_epiv", "demo\epiv\demo_epiv.vcproj", "{CF28E0B7-FBC4-4850-98C7-0B2716D3A9BC}"
ProjectSection(ProjectDependencies) = postProject
- {35C18E88-9F42-49EA-9881-C3128245490F} = {35C18E88-9F42-49EA-9881-C3128245490F}
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D} = {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}
- {F7164C61-0D7C-4EC8-9209-88A760907B6B} = {F7164C61-0D7C-4EC8-9209-88A760907B6B}
- {F8CD481D-462C-40ED-98FA-C6EEF477B5CF} = {F8CD481D-462C-40ED-98FA-C6EEF477B5CF}
- {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2} = {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2}
- {32AB53DD-66B1-4E17-B411-FEB804E62CF0} = {32AB53DD-66B1-4E17-B411-FEB804E62CF0}
+ {F6DB30E7-94C5-4760-92FA-449884953A9D} = {F6DB30E7-94C5-4760-92FA-449884953A9D}
+ {6058EDC4-453A-48B1-8E27-83820FFB7203} = {6058EDC4-453A-48B1-8E27-83820FFB7203}
+ {B8E40D4D-C20C-42BD-B5E4-6BEB9D08344A} = {B8E40D4D-C20C-42BD-B5E4-6BEB9D08344A}
+ {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0} = {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0}
+ {25806259-F586-4AAC-BDD1-50C1B227147D} = {25806259-F586-4AAC-BDD1-50C1B227147D}
+ {F8832A8F-9EA0-4DFD-B181-FAA767F3B9AF} = {F8832A8F-9EA0-4DFD-B181-FAA767F3B9AF}
+ {14D69C18-0E8E-4816-8CC6-FC22AEA3E1C7} = {14D69C18-0E8E-4816-8CC6-FC22AEA3E1C7}
+ {AB9DEE32-64FD-4700-84DF-485166A3E367} = {AB9DEE32-64FD-4700-84DF-485166A3E367}
+ {7C0D1F06-0B97-49A1-A25D-93D5E7A96786} = {7C0D1F06-0B97-49A1-A25D-93D5E7A96786}
+ {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937} = {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937}
+ {BDDE8ABD-4E45-49DA-B499-131BD6FCABBD} = {BDDE8ABD-4E45-49DA-B499-131BD6FCABBD}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_formatrpsdb", "demo\formatrpsdb\demo_formatrpsdb.vcproj", "{1DF27097-97DB-4932-BD3B-6F14A92816A3}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_fa2htgs", "demo\fa2htgs\demo_fa2htgs.vcproj", "{051B2ABA-EDD6-455D-8600-53B8EB79DF21}"
ProjectSection(ProjectDependencies) = postProject
- {35C18E88-9F42-49EA-9881-C3128245490F} = {35C18E88-9F42-49EA-9881-C3128245490F}
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D} = {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}
- {32AB53DD-66B1-4E17-B411-FEB804E62CF0} = {32AB53DD-66B1-4E17-B411-FEB804E62CF0}
- {F8CD481D-462C-40ED-98FA-C6EEF477B5CF} = {F8CD481D-462C-40ED-98FA-C6EEF477B5CF}
- {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2} = {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2}
- {F7164C61-0D7C-4EC8-9209-88A760907B6B} = {F7164C61-0D7C-4EC8-9209-88A760907B6B}
- {CD41CEB1-4E2C-494B-86E8-E29AF398D7ED} = {CD41CEB1-4E2C-494B-86E8-E29AF398D7ED}
+ {610E62DA-4DD6-479E-8D85-1FB87126D750} = {610E62DA-4DD6-479E-8D85-1FB87126D750}
+ {F6DB30E7-94C5-4760-92FA-449884953A9D} = {F6DB30E7-94C5-4760-92FA-449884953A9D}
+ {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0} = {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0}
+ {7C0D1F06-0B97-49A1-A25D-93D5E7A96786} = {7C0D1F06-0B97-49A1-A25D-93D5E7A96786}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_gbseqget", "demo\gbseqget\demo_gbseqget.vcproj", "{F2092248-A59C-4CC3-8571-F6F6809919A5}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_fastacmd", "demo\fastacmd\demo_fastacmd.vcproj", "{531E4D12-C794-4509-8160-A6B6FCB1FE0C}"
ProjectSection(ProjectDependencies) = postProject
- {35C18E88-9F42-49EA-9881-C3128245490F} = {35C18E88-9F42-49EA-9881-C3128245490F}
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D} = {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}
- {F8CD481D-462C-40ED-98FA-C6EEF477B5CF} = {F8CD481D-462C-40ED-98FA-C6EEF477B5CF}
- {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2} = {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2}
- {32AB53DD-66B1-4E17-B411-FEB804E62CF0} = {32AB53DD-66B1-4E17-B411-FEB804E62CF0}
- {327A10DD-2251-4191-8425-17E535235D30} = {327A10DD-2251-4191-8425-17E535235D30}
- {707F859C-FE05-486E-BB82-A447A6CD5036} = {707F859C-FE05-486E-BB82-A447A6CD5036}
+ {610E62DA-4DD6-479E-8D85-1FB87126D750} = {610E62DA-4DD6-479E-8D85-1FB87126D750}
+ {F6DB30E7-94C5-4760-92FA-449884953A9D} = {F6DB30E7-94C5-4760-92FA-449884953A9D}
+ {A2E2AE46-C7B9-4544-B138-6F7662DF2216} = {A2E2AE46-C7B9-4544-B138-6F7662DF2216}
+ {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0} = {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0}
+ {7C0D1F06-0B97-49A1-A25D-93D5E7A96786} = {7C0D1F06-0B97-49A1-A25D-93D5E7A96786}
+ {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937} = {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_gene2xml", "demo\gene2xml\demo_gene2xml.vcproj", "{A276E338-0D0C-4A5C-88C7-531574422EBA}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_flint", "demo\flint\demo_flint.vcproj", "{00DEC39E-11F7-40B4-8840-0556F331A964}"
ProjectSection(ProjectDependencies) = postProject
- {35C18E88-9F42-49EA-9881-C3128245490F} = {35C18E88-9F42-49EA-9881-C3128245490F}
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D} = {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}
- {F8CD481D-462C-40ED-98FA-C6EEF477B5CF} = {F8CD481D-462C-40ED-98FA-C6EEF477B5CF}
- {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2} = {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2}
+ {610E62DA-4DD6-479E-8D85-1FB87126D750} = {610E62DA-4DD6-479E-8D85-1FB87126D750}
+ {F6DB30E7-94C5-4760-92FA-449884953A9D} = {F6DB30E7-94C5-4760-92FA-449884953A9D}
+ {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0} = {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0}
+ {7C0D1F06-0B97-49A1-A25D-93D5E7A96786} = {7C0D1F06-0B97-49A1-A25D-93D5E7A96786}
+ {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937} = {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937}
+ {14D69C18-0E8E-4816-8CC6-FC22AEA3E1C7} = {14D69C18-0E8E-4816-8CC6-FC22AEA3E1C7}
+ {85E82D79-6144-4151-A3E7-8140E9ED01CF} = {85E82D79-6144-4151-A3E7-8140E9ED01CF}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_getmesh", "demo\getmesh\demo_getmesh.vcproj", "{A250CCFC-47DA-4895-BC62-66CADA053A52}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_formatdb", "demo\formatdb\demo_formatdb.vcproj", "{FE555145-82E8-4721-B2CB-A60B94658A65}"
ProjectSection(ProjectDependencies) = postProject
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D} = {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}
- {F2107221-7687-4F18-AEAC-FAA7C4EFCC16} = {F2107221-7687-4F18-AEAC-FAA7C4EFCC16}
+ {610E62DA-4DD6-479E-8D85-1FB87126D750} = {610E62DA-4DD6-479E-8D85-1FB87126D750}
+ {F6DB30E7-94C5-4760-92FA-449884953A9D} = {F6DB30E7-94C5-4760-92FA-449884953A9D}
+ {A2E2AE46-C7B9-4544-B138-6F7662DF2216} = {A2E2AE46-C7B9-4544-B138-6F7662DF2216}
+ {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0} = {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0}
+ {7C0D1F06-0B97-49A1-A25D-93D5E7A96786} = {7C0D1F06-0B97-49A1-A25D-93D5E7A96786}
+ {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937} = {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_getpub", "demo\getpub\demo_getpub.vcproj", "{876560CC-AE03-49C7-9FA8-D1656CB7F040}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_formatrpsdb", "demo\formatrpsdb\demo_formatrpsdb.vcproj", "{C2B3A6D5-5498-4D73-826A-4A839EBA9571}"
ProjectSection(ProjectDependencies) = postProject
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D} = {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}
- {F2107221-7687-4F18-AEAC-FAA7C4EFCC16} = {F2107221-7687-4F18-AEAC-FAA7C4EFCC16}
+ {610E62DA-4DD6-479E-8D85-1FB87126D750} = {610E62DA-4DD6-479E-8D85-1FB87126D750}
+ {F6DB30E7-94C5-4760-92FA-449884953A9D} = {F6DB30E7-94C5-4760-92FA-449884953A9D}
+ {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937} = {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937}
+ {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0} = {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0}
+ {7C0D1F06-0B97-49A1-A25D-93D5E7A96786} = {7C0D1F06-0B97-49A1-A25D-93D5E7A96786}
+ {A2E2AE46-C7B9-4544-B138-6F7662DF2216} = {A2E2AE46-C7B9-4544-B138-6F7662DF2216}
+ {B8E40D4D-C20C-42BD-B5E4-6BEB9D08344A} = {B8E40D4D-C20C-42BD-B5E4-6BEB9D08344A}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_gil2bin", "demo\gil2bin\demo_gil2bin.vcproj", "{FD45D87E-E729-4BA2-90A6-F42C1ACD2CA4}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_gbseqget", "demo\gbseqget\demo_gbseqget.vcproj", "{D92CDEC8-1E56-4F1C-8563-04037BCCB9BD}"
ProjectSection(ProjectDependencies) = postProject
- {35C18E88-9F42-49EA-9881-C3128245490F} = {35C18E88-9F42-49EA-9881-C3128245490F}
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D} = {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}
- {F7164C61-0D7C-4EC8-9209-88A760907B6B} = {F7164C61-0D7C-4EC8-9209-88A760907B6B}
- {F8CD481D-462C-40ED-98FA-C6EEF477B5CF} = {F8CD481D-462C-40ED-98FA-C6EEF477B5CF}
- {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2} = {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2}
- {32AB53DD-66B1-4E17-B411-FEB804E62CF0} = {32AB53DD-66B1-4E17-B411-FEB804E62CF0}
+ {610E62DA-4DD6-479E-8D85-1FB87126D750} = {610E62DA-4DD6-479E-8D85-1FB87126D750}
+ {F6DB30E7-94C5-4760-92FA-449884953A9D} = {F6DB30E7-94C5-4760-92FA-449884953A9D}
+ {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0} = {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0}
+ {7C0D1F06-0B97-49A1-A25D-93D5E7A96786} = {7C0D1F06-0B97-49A1-A25D-93D5E7A96786}
+ {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937} = {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937}
+ {14D69C18-0E8E-4816-8CC6-FC22AEA3E1C7} = {14D69C18-0E8E-4816-8CC6-FC22AEA3E1C7}
+ {85E82D79-6144-4151-A3E7-8140E9ED01CF} = {85E82D79-6144-4151-A3E7-8140E9ED01CF}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_impala", "demo\impala\demo_impala.vcproj", "{D962509C-BBA8-43AC-BDB9-4D420B16D099}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_gene2xml", "demo\gene2xml\demo_gene2xml.vcproj", "{CCEA00C6-F850-4BDA-B420-6214E40A3469}"
ProjectSection(ProjectDependencies) = postProject
- {35C18E88-9F42-49EA-9881-C3128245490F} = {35C18E88-9F42-49EA-9881-C3128245490F}
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D} = {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}
- {F7164C61-0D7C-4EC8-9209-88A760907B6B} = {F7164C61-0D7C-4EC8-9209-88A760907B6B}
- {F8CD481D-462C-40ED-98FA-C6EEF477B5CF} = {F8CD481D-462C-40ED-98FA-C6EEF477B5CF}
- {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2} = {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2}
- {32AB53DD-66B1-4E17-B411-FEB804E62CF0} = {32AB53DD-66B1-4E17-B411-FEB804E62CF0}
+ {610E62DA-4DD6-479E-8D85-1FB87126D750} = {610E62DA-4DD6-479E-8D85-1FB87126D750}
+ {F6DB30E7-94C5-4760-92FA-449884953A9D} = {F6DB30E7-94C5-4760-92FA-449884953A9D}
+ {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0} = {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0}
+ {7C0D1F06-0B97-49A1-A25D-93D5E7A96786} = {7C0D1F06-0B97-49A1-A25D-93D5E7A96786}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_indexpub", "demo\indexpub\demo_indexpub.vcproj", "{86E2DEFE-91A2-400B-A093-82B0DE4968C0}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_getmesh", "demo\getmesh\demo_getmesh.vcproj", "{EB8FB82E-5466-4430-9BD2-17CF562E8349}"
ProjectSection(ProjectDependencies) = postProject
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D} = {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}
- {F2107221-7687-4F18-AEAC-FAA7C4EFCC16} = {F2107221-7687-4F18-AEAC-FAA7C4EFCC16}
+ {F6DB30E7-94C5-4760-92FA-449884953A9D} = {F6DB30E7-94C5-4760-92FA-449884953A9D}
+ {25806259-F586-4AAC-BDD1-50C1B227147D} = {25806259-F586-4AAC-BDD1-50C1B227147D}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_insdseqget", "demo\insdseqget\demo_insdseqget.vcproj", "{D3399079-037C-4873-AB41-8535E0F5124E}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_getpub", "demo\getpub\demo_getpub.vcproj", "{1557FB61-9785-4955-ACB3-259F8695AA61}"
ProjectSection(ProjectDependencies) = postProject
- {35C18E88-9F42-49EA-9881-C3128245490F} = {35C18E88-9F42-49EA-9881-C3128245490F}
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D} = {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}
- {F8CD481D-462C-40ED-98FA-C6EEF477B5CF} = {F8CD481D-462C-40ED-98FA-C6EEF477B5CF}
- {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2} = {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2}
- {32AB53DD-66B1-4E17-B411-FEB804E62CF0} = {32AB53DD-66B1-4E17-B411-FEB804E62CF0}
- {327A10DD-2251-4191-8425-17E535235D30} = {327A10DD-2251-4191-8425-17E535235D30}
- {707F859C-FE05-486E-BB82-A447A6CD5036} = {707F859C-FE05-486E-BB82-A447A6CD5036}
+ {F6DB30E7-94C5-4760-92FA-449884953A9D} = {F6DB30E7-94C5-4760-92FA-449884953A9D}
+ {25806259-F586-4AAC-BDD1-50C1B227147D} = {25806259-F586-4AAC-BDD1-50C1B227147D}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_makemat", "demo\makemat\demo_makemat.vcproj", "{9B82B22D-3287-4512-9C61-054CF931C402}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_gil2bin", "demo\gil2bin\demo_gil2bin.vcproj", "{61AC31CE-6BF2-4C4A-97C7-7DE62A2A546E}"
ProjectSection(ProjectDependencies) = postProject
- {35C18E88-9F42-49EA-9881-C3128245490F} = {35C18E88-9F42-49EA-9881-C3128245490F}
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D} = {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}
- {F7164C61-0D7C-4EC8-9209-88A760907B6B} = {F7164C61-0D7C-4EC8-9209-88A760907B6B}
- {F8CD481D-462C-40ED-98FA-C6EEF477B5CF} = {F8CD481D-462C-40ED-98FA-C6EEF477B5CF}
- {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2} = {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2}
- {32AB53DD-66B1-4E17-B411-FEB804E62CF0} = {32AB53DD-66B1-4E17-B411-FEB804E62CF0}
+ {610E62DA-4DD6-479E-8D85-1FB87126D750} = {610E62DA-4DD6-479E-8D85-1FB87126D750}
+ {F6DB30E7-94C5-4760-92FA-449884953A9D} = {F6DB30E7-94C5-4760-92FA-449884953A9D}
+ {A2E2AE46-C7B9-4544-B138-6F7662DF2216} = {A2E2AE46-C7B9-4544-B138-6F7662DF2216}
+ {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0} = {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0}
+ {7C0D1F06-0B97-49A1-A25D-93D5E7A96786} = {7C0D1F06-0B97-49A1-A25D-93D5E7A96786}
+ {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937} = {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_megablast", "demo\megablast\demo_megablast.vcproj", "{6B0FCA0A-B988-4994-9343-8860CABDD9D2}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_impala", "demo\impala\demo_impala.vcproj", "{B641C7E0-F29C-422C-B3C0-BC3C103BC973}"
ProjectSection(ProjectDependencies) = postProject
- {35C18E88-9F42-49EA-9881-C3128245490F} = {35C18E88-9F42-49EA-9881-C3128245490F}
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D} = {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}
- {F8CD481D-462C-40ED-98FA-C6EEF477B5CF} = {F8CD481D-462C-40ED-98FA-C6EEF477B5CF}
- {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2} = {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2}
- {32AB53DD-66B1-4E17-B411-FEB804E62CF0} = {32AB53DD-66B1-4E17-B411-FEB804E62CF0}
- {F7164C61-0D7C-4EC8-9209-88A760907B6B} = {F7164C61-0D7C-4EC8-9209-88A760907B6B}
- {96FC3702-E2ED-434F-BBA5-3DE1366FFA1F} = {96FC3702-E2ED-434F-BBA5-3DE1366FFA1F}
- {CD41CEB1-4E2C-494B-86E8-E29AF398D7ED} = {CD41CEB1-4E2C-494B-86E8-E29AF398D7ED}
+ {610E62DA-4DD6-479E-8D85-1FB87126D750} = {610E62DA-4DD6-479E-8D85-1FB87126D750}
+ {F6DB30E7-94C5-4760-92FA-449884953A9D} = {F6DB30E7-94C5-4760-92FA-449884953A9D}
+ {A2E2AE46-C7B9-4544-B138-6F7662DF2216} = {A2E2AE46-C7B9-4544-B138-6F7662DF2216}
+ {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0} = {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0}
+ {7C0D1F06-0B97-49A1-A25D-93D5E7A96786} = {7C0D1F06-0B97-49A1-A25D-93D5E7A96786}
+ {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937} = {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_nentrez", "demo\nentrez\demo_nentrez.vcproj", "{3657A377-E327-4B16-9EE9-16E0E1ECFCE9}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_indexpub", "demo\indexpub\demo_indexpub.vcproj", "{7FD62FF2-E65C-45F1-9BF3-12CD2D78C7A5}"
ProjectSection(ProjectDependencies) = postProject
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D} = {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}
- {F7164C61-0D7C-4EC8-9209-88A760907B6B} = {F7164C61-0D7C-4EC8-9209-88A760907B6B}
- {96FC3702-E2ED-434F-BBA5-3DE1366FFA1F} = {96FC3702-E2ED-434F-BBA5-3DE1366FFA1F}
- {CD41CEB1-4E2C-494B-86E8-E29AF398D7ED} = {CD41CEB1-4E2C-494B-86E8-E29AF398D7ED}
- {F8CD481D-462C-40ED-98FA-C6EEF477B5CF} = {F8CD481D-462C-40ED-98FA-C6EEF477B5CF}
- {F2107221-7687-4F18-AEAC-FAA7C4EFCC16} = {F2107221-7687-4F18-AEAC-FAA7C4EFCC16}
- {3C4476FB-5518-425A-9D4E-44DD91068776} = {3C4476FB-5518-425A-9D4E-44DD91068776}
- {327A10DD-2251-4191-8425-17E535235D30} = {327A10DD-2251-4191-8425-17E535235D30}
- {E2B932C9-4C8A-4922-9DFF-9FB646184223} = {E2B932C9-4C8A-4922-9DFF-9FB646184223}
- {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2} = {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2}
- {98C1A680-89B6-4911-8C36-42D14F43B868} = {98C1A680-89B6-4911-8C36-42D14F43B868}
- {32AB53DD-66B1-4E17-B411-FEB804E62CF0} = {32AB53DD-66B1-4E17-B411-FEB804E62CF0}
- {45CF24A4-E238-4E5C-BACC-5F0D6556A8EC} = {45CF24A4-E238-4E5C-BACC-5F0D6556A8EC}
- {3D2820CB-F5E6-4807-864C-2C751ADC556D} = {3D2820CB-F5E6-4807-864C-2C751ADC556D}
- {FD5A8225-8809-4FFB-9190-B6403A2AD467} = {FD5A8225-8809-4FFB-9190-B6403A2AD467}
- {0A01AD98-3A52-430A-A7A8-2A3E990D1BA2} = {0A01AD98-3A52-430A-A7A8-2A3E990D1BA2}
- {47BB9C01-3751-4E25-87AE-6B4BAAA00340} = {47BB9C01-3751-4E25-87AE-6B4BAAA00340}
- {707F859C-FE05-486E-BB82-A447A6CD5036} = {707F859C-FE05-486E-BB82-A447A6CD5036}
+ {F6DB30E7-94C5-4760-92FA-449884953A9D} = {F6DB30E7-94C5-4760-92FA-449884953A9D}
+ {25806259-F586-4AAC-BDD1-50C1B227147D} = {25806259-F586-4AAC-BDD1-50C1B227147D}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_nentrez_ogl", "demo\nentrez_ogl\demo_nentrez_ogl.vcproj", "{0DF9D837-5184-4BB7-BFF0-FF679C5EB7AF}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_insdseqget", "demo\insdseqget\demo_insdseqget.vcproj", "{DF2DCFDD-1AFC-418A-80AC-EA2624BB534A}"
ProjectSection(ProjectDependencies) = postProject
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D} = {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}
- {F7164C61-0D7C-4EC8-9209-88A760907B6B} = {F7164C61-0D7C-4EC8-9209-88A760907B6B}
- {96FC3702-E2ED-434F-BBA5-3DE1366FFA1F} = {96FC3702-E2ED-434F-BBA5-3DE1366FFA1F}
- {CD41CEB1-4E2C-494B-86E8-E29AF398D7ED} = {CD41CEB1-4E2C-494B-86E8-E29AF398D7ED}
- {F8CD481D-462C-40ED-98FA-C6EEF477B5CF} = {F8CD481D-462C-40ED-98FA-C6EEF477B5CF}
- {F2107221-7687-4F18-AEAC-FAA7C4EFCC16} = {F2107221-7687-4F18-AEAC-FAA7C4EFCC16}
- {3C4476FB-5518-425A-9D4E-44DD91068776} = {3C4476FB-5518-425A-9D4E-44DD91068776}
- {327A10DD-2251-4191-8425-17E535235D30} = {327A10DD-2251-4191-8425-17E535235D30}
- {E2B932C9-4C8A-4922-9DFF-9FB646184223} = {E2B932C9-4C8A-4922-9DFF-9FB646184223}
- {AFDEDE71-796D-4896-BEE6-AFFC4F77CC09} = {AFDEDE71-796D-4896-BEE6-AFFC4F77CC09}
- {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2} = {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2}
- {98C1A680-89B6-4911-8C36-42D14F43B868} = {98C1A680-89B6-4911-8C36-42D14F43B868}
- {32AB53DD-66B1-4E17-B411-FEB804E62CF0} = {32AB53DD-66B1-4E17-B411-FEB804E62CF0}
- {45CF24A4-E238-4E5C-BACC-5F0D6556A8EC} = {45CF24A4-E238-4E5C-BACC-5F0D6556A8EC}
- {3D2820CB-F5E6-4807-864C-2C751ADC556D} = {3D2820CB-F5E6-4807-864C-2C751ADC556D}
- {FD5A8225-8809-4FFB-9190-B6403A2AD467} = {FD5A8225-8809-4FFB-9190-B6403A2AD467}
- {B5934B23-8476-4D68-9769-2A65BF5C33A4} = {B5934B23-8476-4D68-9769-2A65BF5C33A4}
- {47BB9C01-3751-4E25-87AE-6B4BAAA00340} = {47BB9C01-3751-4E25-87AE-6B4BAAA00340}
- {707F859C-FE05-486E-BB82-A447A6CD5036} = {707F859C-FE05-486E-BB82-A447A6CD5036}
+ {610E62DA-4DD6-479E-8D85-1FB87126D750} = {610E62DA-4DD6-479E-8D85-1FB87126D750}
+ {F6DB30E7-94C5-4760-92FA-449884953A9D} = {F6DB30E7-94C5-4760-92FA-449884953A9D}
+ {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0} = {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0}
+ {7C0D1F06-0B97-49A1-A25D-93D5E7A96786} = {7C0D1F06-0B97-49A1-A25D-93D5E7A96786}
+ {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937} = {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937}
+ {14D69C18-0E8E-4816-8CC6-FC22AEA3E1C7} = {14D69C18-0E8E-4816-8CC6-FC22AEA3E1C7}
+ {85E82D79-6144-4151-A3E7-8140E9ED01CF} = {85E82D79-6144-4151-A3E7-8140E9ED01CF}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_netentcf", "demo\netentcf\demo_netentcf.vcproj", "{AD4D8660-5128-4DAA-9CC9-BB4ABE051C4E}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_makemat", "demo\makemat\demo_makemat.vcproj", "{939AD270-6758-4304-9B42-F776B03B2B30}"
ProjectSection(ProjectDependencies) = postProject
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D} = {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}
- {F8CD481D-462C-40ED-98FA-C6EEF477B5CF} = {F8CD481D-462C-40ED-98FA-C6EEF477B5CF}
- {F2107221-7687-4F18-AEAC-FAA7C4EFCC16} = {F2107221-7687-4F18-AEAC-FAA7C4EFCC16}
- {3C4476FB-5518-425A-9D4E-44DD91068776} = {3C4476FB-5518-425A-9D4E-44DD91068776}
- {E2B932C9-4C8A-4922-9DFF-9FB646184223} = {E2B932C9-4C8A-4922-9DFF-9FB646184223}
- {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2} = {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2}
- {47BB9C01-3751-4E25-87AE-6B4BAAA00340} = {47BB9C01-3751-4E25-87AE-6B4BAAA00340}
+ {610E62DA-4DD6-479E-8D85-1FB87126D750} = {610E62DA-4DD6-479E-8D85-1FB87126D750}
+ {F6DB30E7-94C5-4760-92FA-449884953A9D} = {F6DB30E7-94C5-4760-92FA-449884953A9D}
+ {A2E2AE46-C7B9-4544-B138-6F7662DF2216} = {A2E2AE46-C7B9-4544-B138-6F7662DF2216}
+ {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0} = {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0}
+ {7C0D1F06-0B97-49A1-A25D-93D5E7A96786} = {7C0D1F06-0B97-49A1-A25D-93D5E7A96786}
+ {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937} = {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_regexp", "regexp\demo\demo_regexp.vcproj", "{D0B197BF-1409-4108-81C0-A2754CD97ADA}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_megablast", "demo\megablast\demo_megablast.vcproj", "{7B92691D-13E1-400B-BFDA-1C085DB12DC7}"
ProjectSection(ProjectDependencies) = postProject
- {21191422-314F-421D-93A8-EABF933C3065} = {21191422-314F-421D-93A8-EABF933C3065}
+ {610E62DA-4DD6-479E-8D85-1FB87126D750} = {610E62DA-4DD6-479E-8D85-1FB87126D750}
+ {F6DB30E7-94C5-4760-92FA-449884953A9D} = {F6DB30E7-94C5-4760-92FA-449884953A9D}
+ {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0} = {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0}
+ {7C0D1F06-0B97-49A1-A25D-93D5E7A96786} = {7C0D1F06-0B97-49A1-A25D-93D5E7A96786}
+ {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937} = {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937}
+ {A2E2AE46-C7B9-4544-B138-6F7662DF2216} = {A2E2AE46-C7B9-4544-B138-6F7662DF2216}
+ {6058EDC4-453A-48B1-8E27-83820FFB7203} = {6058EDC4-453A-48B1-8E27-83820FFB7203}
+ {B8E40D4D-C20C-42BD-B5E4-6BEB9D08344A} = {B8E40D4D-C20C-42BD-B5E4-6BEB9D08344A}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_regexp_grep", "regexp\demo\demo_regexp_grep.vcproj", "{CCA73A4F-96E8-48BE-A1B6-77EC3697584C}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_nentrez", "demo\nentrez\demo_nentrez.vcproj", "{02F5DB27-2C2D-4995-AE03-AE866FD0D726}"
ProjectSection(ProjectDependencies) = postProject
- {21191422-314F-421D-93A8-EABF933C3065} = {21191422-314F-421D-93A8-EABF933C3065}
+ {F6DB30E7-94C5-4760-92FA-449884953A9D} = {F6DB30E7-94C5-4760-92FA-449884953A9D}
+ {A2E2AE46-C7B9-4544-B138-6F7662DF2216} = {A2E2AE46-C7B9-4544-B138-6F7662DF2216}
+ {6058EDC4-453A-48B1-8E27-83820FFB7203} = {6058EDC4-453A-48B1-8E27-83820FFB7203}
+ {B8E40D4D-C20C-42BD-B5E4-6BEB9D08344A} = {B8E40D4D-C20C-42BD-B5E4-6BEB9D08344A}
+ {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0} = {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0}
+ {25806259-F586-4AAC-BDD1-50C1B227147D} = {25806259-F586-4AAC-BDD1-50C1B227147D}
+ {F8832A8F-9EA0-4DFD-B181-FAA767F3B9AF} = {F8832A8F-9EA0-4DFD-B181-FAA767F3B9AF}
+ {14D69C18-0E8E-4816-8CC6-FC22AEA3E1C7} = {14D69C18-0E8E-4816-8CC6-FC22AEA3E1C7}
+ {AB9DEE32-64FD-4700-84DF-485166A3E367} = {AB9DEE32-64FD-4700-84DF-485166A3E367}
+ {7C0D1F06-0B97-49A1-A25D-93D5E7A96786} = {7C0D1F06-0B97-49A1-A25D-93D5E7A96786}
+ {2DD94017-2F95-470D-94F5-9F10AD650BDC} = {2DD94017-2F95-470D-94F5-9F10AD650BDC}
+ {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937} = {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937}
+ {759991FD-441C-4267-A364-1BB2236C67B8} = {759991FD-441C-4267-A364-1BB2236C67B8}
+ {D2059A10-7A4D-471A-BAEA-76479FD2773D} = {D2059A10-7A4D-471A-BAEA-76479FD2773D}
+ {BDDE8ABD-4E45-49DA-B499-131BD6FCABBD} = {BDDE8ABD-4E45-49DA-B499-131BD6FCABBD}
+ {2F198E60-4B02-46C3-8FEF-CE86D69E2C59} = {2F198E60-4B02-46C3-8FEF-CE86D69E2C59}
+ {DE96F5AB-AC39-44FF-9BAB-36805FE07A86} = {DE96F5AB-AC39-44FF-9BAB-36805FE07A86}
+ {85E82D79-6144-4151-A3E7-8140E9ED01CF} = {85E82D79-6144-4151-A3E7-8140E9ED01CF}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_rpsblast", "demo\rpsblast\demo_rpsblast.vcproj", "{8DD4CBD4-79DB-433D-86D3-FF9C61DC86A3}"
- ProjectSection(ProjectDependencies) = postProject
- {35C18E88-9F42-49EA-9881-C3128245490F} = {35C18E88-9F42-49EA-9881-C3128245490F}
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D} = {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}
- {F7164C61-0D7C-4EC8-9209-88A760907B6B} = {F7164C61-0D7C-4EC8-9209-88A760907B6B}
- {96FC3702-E2ED-434F-BBA5-3DE1366FFA1F} = {96FC3702-E2ED-434F-BBA5-3DE1366FFA1F}
- {CD41CEB1-4E2C-494B-86E8-E29AF398D7ED} = {CD41CEB1-4E2C-494B-86E8-E29AF398D7ED}
- {F8CD481D-462C-40ED-98FA-C6EEF477B5CF} = {F8CD481D-462C-40ED-98FA-C6EEF477B5CF}
- {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2} = {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2}
- {32AB53DD-66B1-4E17-B411-FEB804E62CF0} = {32AB53DD-66B1-4E17-B411-FEB804E62CF0}
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_nentrez_ogl", "demo\nentrez_ogl\demo_nentrez_ogl.vcproj", "{13E51223-EDBF-46E1-A98A-895FB3685000}"
+ ProjectSection(ProjectDependencies) = postProject
+ {F6DB30E7-94C5-4760-92FA-449884953A9D} = {F6DB30E7-94C5-4760-92FA-449884953A9D}
+ {A2E2AE46-C7B9-4544-B138-6F7662DF2216} = {A2E2AE46-C7B9-4544-B138-6F7662DF2216}
+ {6058EDC4-453A-48B1-8E27-83820FFB7203} = {6058EDC4-453A-48B1-8E27-83820FFB7203}
+ {B8E40D4D-C20C-42BD-B5E4-6BEB9D08344A} = {B8E40D4D-C20C-42BD-B5E4-6BEB9D08344A}
+ {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0} = {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0}
+ {25806259-F586-4AAC-BDD1-50C1B227147D} = {25806259-F586-4AAC-BDD1-50C1B227147D}
+ {F8832A8F-9EA0-4DFD-B181-FAA767F3B9AF} = {F8832A8F-9EA0-4DFD-B181-FAA767F3B9AF}
+ {14D69C18-0E8E-4816-8CC6-FC22AEA3E1C7} = {14D69C18-0E8E-4816-8CC6-FC22AEA3E1C7}
+ {AB9DEE32-64FD-4700-84DF-485166A3E367} = {AB9DEE32-64FD-4700-84DF-485166A3E367}
+ {8FB57DC4-F98A-4E0D-BDBA-5AB2F7405B58} = {8FB57DC4-F98A-4E0D-BDBA-5AB2F7405B58}
+ {7C0D1F06-0B97-49A1-A25D-93D5E7A96786} = {7C0D1F06-0B97-49A1-A25D-93D5E7A96786}
+ {2DD94017-2F95-470D-94F5-9F10AD650BDC} = {2DD94017-2F95-470D-94F5-9F10AD650BDC}
+ {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937} = {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937}
+ {759991FD-441C-4267-A364-1BB2236C67B8} = {759991FD-441C-4267-A364-1BB2236C67B8}
+ {D2059A10-7A4D-471A-BAEA-76479FD2773D} = {D2059A10-7A4D-471A-BAEA-76479FD2773D}
+ {BDDE8ABD-4E45-49DA-B499-131BD6FCABBD} = {BDDE8ABD-4E45-49DA-B499-131BD6FCABBD}
+ {DEBC32A0-A4F7-4C4C-9E93-62C1C4E6544D} = {DEBC32A0-A4F7-4C4C-9E93-62C1C4E6544D}
+ {DE96F5AB-AC39-44FF-9BAB-36805FE07A86} = {DE96F5AB-AC39-44FF-9BAB-36805FE07A86}
+ {85E82D79-6144-4151-A3E7-8140E9ED01CF} = {85E82D79-6144-4151-A3E7-8140E9ED01CF}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_searchv", "demo\searchv\demo_searchv.vcproj", "{8BA07548-3F40-4D95-8BF5-ED3F257ACB96}"
- ProjectSection(ProjectDependencies) = postProject
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D} = {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}
- {96FC3702-E2ED-434F-BBA5-3DE1366FFA1F} = {96FC3702-E2ED-434F-BBA5-3DE1366FFA1F}
- {CD41CEB1-4E2C-494B-86E8-E29AF398D7ED} = {CD41CEB1-4E2C-494B-86E8-E29AF398D7ED}
- {F8CD481D-462C-40ED-98FA-C6EEF477B5CF} = {F8CD481D-462C-40ED-98FA-C6EEF477B5CF}
- {F2107221-7687-4F18-AEAC-FAA7C4EFCC16} = {F2107221-7687-4F18-AEAC-FAA7C4EFCC16}
- {3C4476FB-5518-425A-9D4E-44DD91068776} = {3C4476FB-5518-425A-9D4E-44DD91068776}
- {327A10DD-2251-4191-8425-17E535235D30} = {327A10DD-2251-4191-8425-17E535235D30}
- {E2B932C9-4C8A-4922-9DFF-9FB646184223} = {E2B932C9-4C8A-4922-9DFF-9FB646184223}
- {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2} = {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2}
- {32AB53DD-66B1-4E17-B411-FEB804E62CF0} = {32AB53DD-66B1-4E17-B411-FEB804E62CF0}
- {FD5A8225-8809-4FFB-9190-B6403A2AD467} = {FD5A8225-8809-4FFB-9190-B6403A2AD467}
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_netentcf", "demo\netentcf\demo_netentcf.vcproj", "{4BCEFEBE-22AD-4D8E-BE1F-19FF5925271D}"
+ ProjectSection(ProjectDependencies) = postProject
+ {F6DB30E7-94C5-4760-92FA-449884953A9D} = {F6DB30E7-94C5-4760-92FA-449884953A9D}
+ {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0} = {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0}
+ {25806259-F586-4AAC-BDD1-50C1B227147D} = {25806259-F586-4AAC-BDD1-50C1B227147D}
+ {F8832A8F-9EA0-4DFD-B181-FAA767F3B9AF} = {F8832A8F-9EA0-4DFD-B181-FAA767F3B9AF}
+ {AB9DEE32-64FD-4700-84DF-485166A3E367} = {AB9DEE32-64FD-4700-84DF-485166A3E367}
+ {7C0D1F06-0B97-49A1-A25D-93D5E7A96786} = {7C0D1F06-0B97-49A1-A25D-93D5E7A96786}
+ {DE96F5AB-AC39-44FF-9BAB-36805FE07A86} = {DE96F5AB-AC39-44FF-9BAB-36805FE07A86}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_raw2delt", "demo\raw2delt\demo_raw2delt.vcproj", "{E6270A0D-B665-450E-BA6A-B9D648D5B145}"
+ ProjectSection(ProjectDependencies) = postProject
+ {610E62DA-4DD6-479E-8D85-1FB87126D750} = {610E62DA-4DD6-479E-8D85-1FB87126D750}
+ {F6DB30E7-94C5-4760-92FA-449884953A9D} = {F6DB30E7-94C5-4760-92FA-449884953A9D}
+ {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0} = {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0}
+ {2DD94017-2F95-470D-94F5-9F10AD650BDC} = {2DD94017-2F95-470D-94F5-9F10AD650BDC}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_regexp", "regexp\demo\demo_regexp.vcproj", "{82933EEE-EB79-486D-A8E2-B440D33D924A}"
+ ProjectSection(ProjectDependencies) = postProject
+ {C0B91754-0757-42BD-8F53-C05964FFFB66} = {C0B91754-0757-42BD-8F53-C05964FFFB66}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_regexp_grep", "regexp\demo\demo_regexp_grep.vcproj", "{8EFB0853-50E8-4167-88A5-2C71DAB74098}"
+ ProjectSection(ProjectDependencies) = postProject
+ {C0B91754-0757-42BD-8F53-C05964FFFB66} = {C0B91754-0757-42BD-8F53-C05964FFFB66}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_rpsblast", "demo\rpsblast\demo_rpsblast.vcproj", "{84BE55F0-B6BE-4DFA-B387-4D09C24B4875}"
+ ProjectSection(ProjectDependencies) = postProject
+ {610E62DA-4DD6-479E-8D85-1FB87126D750} = {610E62DA-4DD6-479E-8D85-1FB87126D750}
+ {F6DB30E7-94C5-4760-92FA-449884953A9D} = {F6DB30E7-94C5-4760-92FA-449884953A9D}
+ {A2E2AE46-C7B9-4544-B138-6F7662DF2216} = {A2E2AE46-C7B9-4544-B138-6F7662DF2216}
+ {6058EDC4-453A-48B1-8E27-83820FFB7203} = {6058EDC4-453A-48B1-8E27-83820FFB7203}
+ {B8E40D4D-C20C-42BD-B5E4-6BEB9D08344A} = {B8E40D4D-C20C-42BD-B5E4-6BEB9D08344A}
+ {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0} = {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0}
+ {7C0D1F06-0B97-49A1-A25D-93D5E7A96786} = {7C0D1F06-0B97-49A1-A25D-93D5E7A96786}
+ {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937} = {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_searchv", "demo\searchv\demo_searchv.vcproj", "{478B9CE3-2141-4C1C-A54C-984865DF5930}"
+ ProjectSection(ProjectDependencies) = postProject
+ {F6DB30E7-94C5-4760-92FA-449884953A9D} = {F6DB30E7-94C5-4760-92FA-449884953A9D}
+ {6058EDC4-453A-48B1-8E27-83820FFB7203} = {6058EDC4-453A-48B1-8E27-83820FFB7203}
+ {B8E40D4D-C20C-42BD-B5E4-6BEB9D08344A} = {B8E40D4D-C20C-42BD-B5E4-6BEB9D08344A}
+ {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0} = {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0}
+ {25806259-F586-4AAC-BDD1-50C1B227147D} = {25806259-F586-4AAC-BDD1-50C1B227147D}
+ {F8832A8F-9EA0-4DFD-B181-FAA767F3B9AF} = {F8832A8F-9EA0-4DFD-B181-FAA767F3B9AF}
+ {14D69C18-0E8E-4816-8CC6-FC22AEA3E1C7} = {14D69C18-0E8E-4816-8CC6-FC22AEA3E1C7}
+ {AB9DEE32-64FD-4700-84DF-485166A3E367} = {AB9DEE32-64FD-4700-84DF-485166A3E367}
+ {7C0D1F06-0B97-49A1-A25D-93D5E7A96786} = {7C0D1F06-0B97-49A1-A25D-93D5E7A96786}
+ {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937} = {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937}
+ {BDDE8ABD-4E45-49DA-B499-131BD6FCABBD} = {BDDE8ABD-4E45-49DA-B499-131BD6FCABBD}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_seedtop", "demo\seedtop\demo_seedtop.vcproj", "{33854DD9-B6AE-4BBA-9188-0A6AF2B9F098}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_seedtop", "demo\seedtop\demo_seedtop.vcproj", "{136554B9-6A33-46F2-9595-5B3E90A00553}"
ProjectSection(ProjectDependencies) = postProject
- {35C18E88-9F42-49EA-9881-C3128245490F} = {35C18E88-9F42-49EA-9881-C3128245490F}
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D} = {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}
- {F7164C61-0D7C-4EC8-9209-88A760907B6B} = {F7164C61-0D7C-4EC8-9209-88A760907B6B}
- {F8CD481D-462C-40ED-98FA-C6EEF477B5CF} = {F8CD481D-462C-40ED-98FA-C6EEF477B5CF}
- {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2} = {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2}
- {32AB53DD-66B1-4E17-B411-FEB804E62CF0} = {32AB53DD-66B1-4E17-B411-FEB804E62CF0}
+ {610E62DA-4DD6-479E-8D85-1FB87126D750} = {610E62DA-4DD6-479E-8D85-1FB87126D750}
+ {F6DB30E7-94C5-4760-92FA-449884953A9D} = {F6DB30E7-94C5-4760-92FA-449884953A9D}
+ {A2E2AE46-C7B9-4544-B138-6F7662DF2216} = {A2E2AE46-C7B9-4544-B138-6F7662DF2216}
+ {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0} = {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0}
+ {7C0D1F06-0B97-49A1-A25D-93D5E7A96786} = {7C0D1F06-0B97-49A1-A25D-93D5E7A96786}
+ {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937} = {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_seqtest", "demo\seqtest\demo_seqtest.vcproj", "{4B5696EE-C2E8-49D1-A0ED-4E54AF811221}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_seqtest", "demo\seqtest\demo_seqtest.vcproj", "{05C7D1D5-557E-4868-90BB-2F7B1B0DB9C6}"
ProjectSection(ProjectDependencies) = postProject
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D} = {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}
- {F8CD481D-462C-40ED-98FA-C6EEF477B5CF} = {F8CD481D-462C-40ED-98FA-C6EEF477B5CF}
- {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2} = {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2}
- {F2107221-7687-4F18-AEAC-FAA7C4EFCC16} = {F2107221-7687-4F18-AEAC-FAA7C4EFCC16}
+ {F6DB30E7-94C5-4760-92FA-449884953A9D} = {F6DB30E7-94C5-4760-92FA-449884953A9D}
+ {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0} = {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0}
+ {7C0D1F06-0B97-49A1-A25D-93D5E7A96786} = {7C0D1F06-0B97-49A1-A25D-93D5E7A96786}
+ {25806259-F586-4AAC-BDD1-50C1B227147D} = {25806259-F586-4AAC-BDD1-50C1B227147D}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_sigme", "demo\sigme\demo_sigme.vcproj", "{6C98CBEC-6EEF-472F-9BD2-80CF04B58E84}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_sigme", "demo\sigme\demo_sigme.vcproj", "{2861713F-5EA6-486E-AE98-55CC4200305E}"
ProjectSection(ProjectDependencies) = postProject
- {35C18E88-9F42-49EA-9881-C3128245490F} = {35C18E88-9F42-49EA-9881-C3128245490F}
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D} = {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}
- {F8CD481D-462C-40ED-98FA-C6EEF477B5CF} = {F8CD481D-462C-40ED-98FA-C6EEF477B5CF}
- {3C4476FB-5518-425A-9D4E-44DD91068776} = {3C4476FB-5518-425A-9D4E-44DD91068776}
- {327A10DD-2251-4191-8425-17E535235D30} = {327A10DD-2251-4191-8425-17E535235D30}
- {E2B932C9-4C8A-4922-9DFF-9FB646184223} = {E2B932C9-4C8A-4922-9DFF-9FB646184223}
- {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2} = {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2}
- {32AB53DD-66B1-4E17-B411-FEB804E62CF0} = {32AB53DD-66B1-4E17-B411-FEB804E62CF0}
+ {610E62DA-4DD6-479E-8D85-1FB87126D750} = {610E62DA-4DD6-479E-8D85-1FB87126D750}
+ {F6DB30E7-94C5-4760-92FA-449884953A9D} = {F6DB30E7-94C5-4760-92FA-449884953A9D}
+ {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0} = {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0}
+ {F8832A8F-9EA0-4DFD-B181-FAA767F3B9AF} = {F8832A8F-9EA0-4DFD-B181-FAA767F3B9AF}
+ {14D69C18-0E8E-4816-8CC6-FC22AEA3E1C7} = {14D69C18-0E8E-4816-8CC6-FC22AEA3E1C7}
+ {AB9DEE32-64FD-4700-84DF-485166A3E367} = {AB9DEE32-64FD-4700-84DF-485166A3E367}
+ {7C0D1F06-0B97-49A1-A25D-93D5E7A96786} = {7C0D1F06-0B97-49A1-A25D-93D5E7A96786}
+ {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937} = {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_sigmev", "demo\sigmev\demo_sigmev.vcproj", "{AED09298-117B-4D01-8C01-45F820D3BDE8}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_sigmev", "demo\sigmev\demo_sigmev.vcproj", "{00EABCA8-578E-4BC9-A0DA-5006B5C28A3A}"
ProjectSection(ProjectDependencies) = postProject
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D} = {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}
- {96FC3702-E2ED-434F-BBA5-3DE1366FFA1F} = {96FC3702-E2ED-434F-BBA5-3DE1366FFA1F}
- {CD41CEB1-4E2C-494B-86E8-E29AF398D7ED} = {CD41CEB1-4E2C-494B-86E8-E29AF398D7ED}
- {F8CD481D-462C-40ED-98FA-C6EEF477B5CF} = {F8CD481D-462C-40ED-98FA-C6EEF477B5CF}
- {F2107221-7687-4F18-AEAC-FAA7C4EFCC16} = {F2107221-7687-4F18-AEAC-FAA7C4EFCC16}
- {3C4476FB-5518-425A-9D4E-44DD91068776} = {3C4476FB-5518-425A-9D4E-44DD91068776}
- {327A10DD-2251-4191-8425-17E535235D30} = {327A10DD-2251-4191-8425-17E535235D30}
- {E2B932C9-4C8A-4922-9DFF-9FB646184223} = {E2B932C9-4C8A-4922-9DFF-9FB646184223}
- {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2} = {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2}
- {32AB53DD-66B1-4E17-B411-FEB804E62CF0} = {32AB53DD-66B1-4E17-B411-FEB804E62CF0}
- {FD5A8225-8809-4FFB-9190-B6403A2AD467} = {FD5A8225-8809-4FFB-9190-B6403A2AD467}
+ {F6DB30E7-94C5-4760-92FA-449884953A9D} = {F6DB30E7-94C5-4760-92FA-449884953A9D}
+ {6058EDC4-453A-48B1-8E27-83820FFB7203} = {6058EDC4-453A-48B1-8E27-83820FFB7203}
+ {B8E40D4D-C20C-42BD-B5E4-6BEB9D08344A} = {B8E40D4D-C20C-42BD-B5E4-6BEB9D08344A}
+ {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0} = {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0}
+ {25806259-F586-4AAC-BDD1-50C1B227147D} = {25806259-F586-4AAC-BDD1-50C1B227147D}
+ {F8832A8F-9EA0-4DFD-B181-FAA767F3B9AF} = {F8832A8F-9EA0-4DFD-B181-FAA767F3B9AF}
+ {14D69C18-0E8E-4816-8CC6-FC22AEA3E1C7} = {14D69C18-0E8E-4816-8CC6-FC22AEA3E1C7}
+ {AB9DEE32-64FD-4700-84DF-485166A3E367} = {AB9DEE32-64FD-4700-84DF-485166A3E367}
+ {7C0D1F06-0B97-49A1-A25D-93D5E7A96786} = {7C0D1F06-0B97-49A1-A25D-93D5E7A96786}
+ {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937} = {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937}
+ {BDDE8ABD-4E45-49DA-B499-131BD6FCABBD} = {BDDE8ABD-4E45-49DA-B499-131BD6FCABBD}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_spidey", "demo\spidey\demo_spidey.vcproj", "{E85FC734-1E47-413F-82E3-A83908FC3A77}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_spidey", "demo\spidey\demo_spidey.vcproj", "{931A5E4E-E25D-4895-B202-E1D1B3F37ED1}"
ProjectSection(ProjectDependencies) = postProject
- {35C18E88-9F42-49EA-9881-C3128245490F} = {35C18E88-9F42-49EA-9881-C3128245490F}
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D} = {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}
- {F7164C61-0D7C-4EC8-9209-88A760907B6B} = {F7164C61-0D7C-4EC8-9209-88A760907B6B}
- {F8CD481D-462C-40ED-98FA-C6EEF477B5CF} = {F8CD481D-462C-40ED-98FA-C6EEF477B5CF}
- {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2} = {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2}
- {327A10DD-2251-4191-8425-17E535235D30} = {327A10DD-2251-4191-8425-17E535235D30}
- {32AB53DD-66B1-4E17-B411-FEB804E62CF0} = {32AB53DD-66B1-4E17-B411-FEB804E62CF0}
- {707F859C-FE05-486E-BB82-A447A6CD5036} = {707F859C-FE05-486E-BB82-A447A6CD5036}
+ {610E62DA-4DD6-479E-8D85-1FB87126D750} = {610E62DA-4DD6-479E-8D85-1FB87126D750}
+ {F6DB30E7-94C5-4760-92FA-449884953A9D} = {F6DB30E7-94C5-4760-92FA-449884953A9D}
+ {A2E2AE46-C7B9-4544-B138-6F7662DF2216} = {A2E2AE46-C7B9-4544-B138-6F7662DF2216}
+ {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0} = {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0}
+ {7C0D1F06-0B97-49A1-A25D-93D5E7A96786} = {7C0D1F06-0B97-49A1-A25D-93D5E7A96786}
+ {14D69C18-0E8E-4816-8CC6-FC22AEA3E1C7} = {14D69C18-0E8E-4816-8CC6-FC22AEA3E1C7}
+ {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937} = {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937}
+ {85E82D79-6144-4151-A3E7-8140E9ED01CF} = {85E82D79-6144-4151-A3E7-8140E9ED01CF}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_srchaa", "demo\srchaa\demo_srchaa.vcproj", "{D2928CA0-E664-4C71-9254-AD1B1CB9A201}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_srchaa", "demo\srchaa\demo_srchaa.vcproj", "{A40990ED-A5F2-4175-A8A5-DEE67FDFD64A}"
ProjectSection(ProjectDependencies) = postProject
- {35C18E88-9F42-49EA-9881-C3128245490F} = {35C18E88-9F42-49EA-9881-C3128245490F}
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D} = {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}
- {F8CD481D-462C-40ED-98FA-C6EEF477B5CF} = {F8CD481D-462C-40ED-98FA-C6EEF477B5CF}
- {3C4476FB-5518-425A-9D4E-44DD91068776} = {3C4476FB-5518-425A-9D4E-44DD91068776}
- {327A10DD-2251-4191-8425-17E535235D30} = {327A10DD-2251-4191-8425-17E535235D30}
- {E2B932C9-4C8A-4922-9DFF-9FB646184223} = {E2B932C9-4C8A-4922-9DFF-9FB646184223}
- {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2} = {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2}
- {32AB53DD-66B1-4E17-B411-FEB804E62CF0} = {32AB53DD-66B1-4E17-B411-FEB804E62CF0}
- {A9FD8A3D-345F-4F7B-B8D6-9032E1884F94} = {A9FD8A3D-345F-4F7B-B8D6-9032E1884F94}
+ {610E62DA-4DD6-479E-8D85-1FB87126D750} = {610E62DA-4DD6-479E-8D85-1FB87126D750}
+ {F6DB30E7-94C5-4760-92FA-449884953A9D} = {F6DB30E7-94C5-4760-92FA-449884953A9D}
+ {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0} = {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0}
+ {F8832A8F-9EA0-4DFD-B181-FAA767F3B9AF} = {F8832A8F-9EA0-4DFD-B181-FAA767F3B9AF}
+ {14D69C18-0E8E-4816-8CC6-FC22AEA3E1C7} = {14D69C18-0E8E-4816-8CC6-FC22AEA3E1C7}
+ {AB9DEE32-64FD-4700-84DF-485166A3E367} = {AB9DEE32-64FD-4700-84DF-485166A3E367}
+ {7C0D1F06-0B97-49A1-A25D-93D5E7A96786} = {7C0D1F06-0B97-49A1-A25D-93D5E7A96786}
+ {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937} = {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937}
+ {C2857848-3327-46C6-929C-192629A21F60} = {C2857848-3327-46C6-929C-192629A21F60}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_srchnt", "demo\srchnt\demo_srchnt.vcproj", "{924EF5EC-35C3-41A2-AB29-827D491DA574}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_srchnt", "demo\srchnt\demo_srchnt.vcproj", "{29EAEDFD-B486-433D-8809-7C4B298BFF17}"
ProjectSection(ProjectDependencies) = postProject
- {35C18E88-9F42-49EA-9881-C3128245490F} = {35C18E88-9F42-49EA-9881-C3128245490F}
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D} = {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}
- {F8CD481D-462C-40ED-98FA-C6EEF477B5CF} = {F8CD481D-462C-40ED-98FA-C6EEF477B5CF}
- {3C4476FB-5518-425A-9D4E-44DD91068776} = {3C4476FB-5518-425A-9D4E-44DD91068776}
- {327A10DD-2251-4191-8425-17E535235D30} = {327A10DD-2251-4191-8425-17E535235D30}
- {E2B932C9-4C8A-4922-9DFF-9FB646184223} = {E2B932C9-4C8A-4922-9DFF-9FB646184223}
- {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2} = {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2}
- {32AB53DD-66B1-4E17-B411-FEB804E62CF0} = {32AB53DD-66B1-4E17-B411-FEB804E62CF0}
+ {610E62DA-4DD6-479E-8D85-1FB87126D750} = {610E62DA-4DD6-479E-8D85-1FB87126D750}
+ {F6DB30E7-94C5-4760-92FA-449884953A9D} = {F6DB30E7-94C5-4760-92FA-449884953A9D}
+ {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0} = {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0}
+ {F8832A8F-9EA0-4DFD-B181-FAA767F3B9AF} = {F8832A8F-9EA0-4DFD-B181-FAA767F3B9AF}
+ {14D69C18-0E8E-4816-8CC6-FC22AEA3E1C7} = {14D69C18-0E8E-4816-8CC6-FC22AEA3E1C7}
+ {AB9DEE32-64FD-4700-84DF-485166A3E367} = {AB9DEE32-64FD-4700-84DF-485166A3E367}
+ {7C0D1F06-0B97-49A1-A25D-93D5E7A96786} = {7C0D1F06-0B97-49A1-A25D-93D5E7A96786}
+ {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937} = {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_tbl2asn", "demo\tbl2asn\demo_tbl2asn.vcproj", "{42E5A984-7EA8-4DF0-9918-970247935C64}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_tbl2asn", "demo\tbl2asn\demo_tbl2asn.vcproj", "{F7125366-276A-455F-A1AA-80846F7BE09F}"
ProjectSection(ProjectDependencies) = postProject
- {35C18E88-9F42-49EA-9881-C3128245490F} = {35C18E88-9F42-49EA-9881-C3128245490F}
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D} = {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}
- {F8CD481D-462C-40ED-98FA-C6EEF477B5CF} = {F8CD481D-462C-40ED-98FA-C6EEF477B5CF}
- {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2} = {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2}
- {32AB53DD-66B1-4E17-B411-FEB804E62CF0} = {32AB53DD-66B1-4E17-B411-FEB804E62CF0}
+ {610E62DA-4DD6-479E-8D85-1FB87126D750} = {610E62DA-4DD6-479E-8D85-1FB87126D750}
+ {F6DB30E7-94C5-4760-92FA-449884953A9D} = {F6DB30E7-94C5-4760-92FA-449884953A9D}
+ {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0} = {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0}
+ {7C0D1F06-0B97-49A1-A25D-93D5E7A96786} = {7C0D1F06-0B97-49A1-A25D-93D5E7A96786}
+ {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937} = {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_testcore", "demo\testcore\demo_testcore.vcproj", "{3684FA7A-0E39-4377-876F-17FA3C6869F2}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_testcore", "demo\testcore\demo_testcore.vcproj", "{986196FD-0900-451E-818F-7373FBAFF793}"
ProjectSection(ProjectDependencies) = postProject
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D} = {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}
- {F2107221-7687-4F18-AEAC-FAA7C4EFCC16} = {F2107221-7687-4F18-AEAC-FAA7C4EFCC16}
+ {F6DB30E7-94C5-4760-92FA-449884953A9D} = {F6DB30E7-94C5-4760-92FA-449884953A9D}
+ {25806259-F586-4AAC-BDD1-50C1B227147D} = {25806259-F586-4AAC-BDD1-50C1B227147D}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_testobj", "demo\testobj\demo_testobj.vcproj", "{69D59444-9FA8-41D4-82AC-1CA12A8F160F}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_testobj", "demo\testobj\demo_testobj.vcproj", "{09DBA8E7-7471-4D6D-B6EF-5B8B2B32A020}"
ProjectSection(ProjectDependencies) = postProject
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D} = {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}
- {F8CD481D-462C-40ED-98FA-C6EEF477B5CF} = {F8CD481D-462C-40ED-98FA-C6EEF477B5CF}
- {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2} = {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2}
- {F2107221-7687-4F18-AEAC-FAA7C4EFCC16} = {F2107221-7687-4F18-AEAC-FAA7C4EFCC16}
+ {F6DB30E7-94C5-4760-92FA-449884953A9D} = {F6DB30E7-94C5-4760-92FA-449884953A9D}
+ {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0} = {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0}
+ {7C0D1F06-0B97-49A1-A25D-93D5E7A96786} = {7C0D1F06-0B97-49A1-A25D-93D5E7A96786}
+ {25806259-F586-4AAC-BDD1-50C1B227147D} = {25806259-F586-4AAC-BDD1-50C1B227147D}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_twop", "demo\twop\demo_twop.vcproj", "{C015E441-C32E-4F5F-9DCA-9B9329E3B7C0}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_twop", "demo\twop\demo_twop.vcproj", "{B592842F-6270-4C2E-8FBC-DBE1D5EF71D0}"
ProjectSection(ProjectDependencies) = postProject
- {35C18E88-9F42-49EA-9881-C3128245490F} = {35C18E88-9F42-49EA-9881-C3128245490F}
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D} = {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}
- {F7164C61-0D7C-4EC8-9209-88A760907B6B} = {F7164C61-0D7C-4EC8-9209-88A760907B6B}
- {F8CD481D-462C-40ED-98FA-C6EEF477B5CF} = {F8CD481D-462C-40ED-98FA-C6EEF477B5CF}
- {3C4476FB-5518-425A-9D4E-44DD91068776} = {3C4476FB-5518-425A-9D4E-44DD91068776}
- {327A10DD-2251-4191-8425-17E535235D30} = {327A10DD-2251-4191-8425-17E535235D30}
- {E2B932C9-4C8A-4922-9DFF-9FB646184223} = {E2B932C9-4C8A-4922-9DFF-9FB646184223}
- {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2} = {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2}
- {32AB53DD-66B1-4E17-B411-FEB804E62CF0} = {32AB53DD-66B1-4E17-B411-FEB804E62CF0}
+ {610E62DA-4DD6-479E-8D85-1FB87126D750} = {610E62DA-4DD6-479E-8D85-1FB87126D750}
+ {F6DB30E7-94C5-4760-92FA-449884953A9D} = {F6DB30E7-94C5-4760-92FA-449884953A9D}
+ {A2E2AE46-C7B9-4544-B138-6F7662DF2216} = {A2E2AE46-C7B9-4544-B138-6F7662DF2216}
+ {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0} = {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0}
+ {F8832A8F-9EA0-4DFD-B181-FAA767F3B9AF} = {F8832A8F-9EA0-4DFD-B181-FAA767F3B9AF}
+ {14D69C18-0E8E-4816-8CC6-FC22AEA3E1C7} = {14D69C18-0E8E-4816-8CC6-FC22AEA3E1C7}
+ {AB9DEE32-64FD-4700-84DF-485166A3E367} = {AB9DEE32-64FD-4700-84DF-485166A3E367}
+ {7C0D1F06-0B97-49A1-A25D-93D5E7A96786} = {7C0D1F06-0B97-49A1-A25D-93D5E7A96786}
+ {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937} = {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_twopv", "demo\twopv\demo_twopv.vcproj", "{8C72F165-0AC2-4462-BAB9-8AE276273AC0}"
- ProjectSection(ProjectDependencies) = postProject
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D} = {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}
- {F7164C61-0D7C-4EC8-9209-88A760907B6B} = {F7164C61-0D7C-4EC8-9209-88A760907B6B}
- {96FC3702-E2ED-434F-BBA5-3DE1366FFA1F} = {96FC3702-E2ED-434F-BBA5-3DE1366FFA1F}
- {CD41CEB1-4E2C-494B-86E8-E29AF398D7ED} = {CD41CEB1-4E2C-494B-86E8-E29AF398D7ED}
- {F8CD481D-462C-40ED-98FA-C6EEF477B5CF} = {F8CD481D-462C-40ED-98FA-C6EEF477B5CF}
- {F2107221-7687-4F18-AEAC-FAA7C4EFCC16} = {F2107221-7687-4F18-AEAC-FAA7C4EFCC16}
- {3C4476FB-5518-425A-9D4E-44DD91068776} = {3C4476FB-5518-425A-9D4E-44DD91068776}
- {327A10DD-2251-4191-8425-17E535235D30} = {327A10DD-2251-4191-8425-17E535235D30}
- {E2B932C9-4C8A-4922-9DFF-9FB646184223} = {E2B932C9-4C8A-4922-9DFF-9FB646184223}
- {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2} = {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2}
- {32AB53DD-66B1-4E17-B411-FEB804E62CF0} = {32AB53DD-66B1-4E17-B411-FEB804E62CF0}
- {FD5A8225-8809-4FFB-9190-B6403A2AD467} = {FD5A8225-8809-4FFB-9190-B6403A2AD467}
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_udv", "demo\udv\demo_udv.vcproj", "{914A88CB-0667-40BC-8F0F-4594BA7B9D85}"
- ProjectSection(ProjectDependencies) = postProject
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D} = {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}
- {F7164C61-0D7C-4EC8-9209-88A760907B6B} = {F7164C61-0D7C-4EC8-9209-88A760907B6B}
- {96FC3702-E2ED-434F-BBA5-3DE1366FFA1F} = {96FC3702-E2ED-434F-BBA5-3DE1366FFA1F}
- {CD41CEB1-4E2C-494B-86E8-E29AF398D7ED} = {CD41CEB1-4E2C-494B-86E8-E29AF398D7ED}
- {F8CD481D-462C-40ED-98FA-C6EEF477B5CF} = {F8CD481D-462C-40ED-98FA-C6EEF477B5CF}
- {32AB53DD-66B1-4E17-B411-FEB804E62CF0} = {32AB53DD-66B1-4E17-B411-FEB804E62CF0}
- {F2107221-7687-4F18-AEAC-FAA7C4EFCC16} = {F2107221-7687-4F18-AEAC-FAA7C4EFCC16}
- {3C4476FB-5518-425A-9D4E-44DD91068776} = {3C4476FB-5518-425A-9D4E-44DD91068776}
- {327A10DD-2251-4191-8425-17E535235D30} = {327A10DD-2251-4191-8425-17E535235D30}
- {E2B932C9-4C8A-4922-9DFF-9FB646184223} = {E2B932C9-4C8A-4922-9DFF-9FB646184223}
- {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2} = {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2}
- {3D2820CB-F5E6-4807-864C-2C751ADC556D} = {3D2820CB-F5E6-4807-864C-2C751ADC556D}
- {FD5A8225-8809-4FFB-9190-B6403A2AD467} = {FD5A8225-8809-4FFB-9190-B6403A2AD467}
- {47BB9C01-3751-4E25-87AE-6B4BAAA00340} = {47BB9C01-3751-4E25-87AE-6B4BAAA00340}
- {707F859C-FE05-486E-BB82-A447A6CD5036} = {707F859C-FE05-486E-BB82-A447A6CD5036}
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_vecscreen", "demo\vecscreen\demo_vecscreen.vcproj", "{805D635B-FA95-4A2B-A5DD-1EC3667AE7B1}"
- ProjectSection(ProjectDependencies) = postProject
- {35C18E88-9F42-49EA-9881-C3128245490F} = {35C18E88-9F42-49EA-9881-C3128245490F}
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D} = {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}
- {F7164C61-0D7C-4EC8-9209-88A760907B6B} = {F7164C61-0D7C-4EC8-9209-88A760907B6B}
- {F8CD481D-462C-40ED-98FA-C6EEF477B5CF} = {F8CD481D-462C-40ED-98FA-C6EEF477B5CF}
- {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2} = {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2}
- {32AB53DD-66B1-4E17-B411-FEB804E62CF0} = {32AB53DD-66B1-4E17-B411-FEB804E62CF0}
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "exe_asntool", "asnlib\asntool\exe_asntool.vcproj", "{9AA6C9C9-1442-48CD-BD94-F134953418A9}"
- ProjectSection(ProjectDependencies) = postProject
- {35C18E88-9F42-49EA-9881-C3128245490F} = {35C18E88-9F42-49EA-9881-C3128245490F}
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D} = {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "exe_blastcl3", "network\blast3\blastcl3\exe_blastcl3.vcproj", "{74C9A79B-EAE3-46B3-848E-73C3B5F679B9}"
- ProjectSection(ProjectDependencies) = postProject
- {35C18E88-9F42-49EA-9881-C3128245490F} = {35C18E88-9F42-49EA-9881-C3128245490F}
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D} = {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}
- {F7164C61-0D7C-4EC8-9209-88A760907B6B} = {F7164C61-0D7C-4EC8-9209-88A760907B6B}
- {96FC3702-E2ED-434F-BBA5-3DE1366FFA1F} = {96FC3702-E2ED-434F-BBA5-3DE1366FFA1F}
- {CD41CEB1-4E2C-494B-86E8-E29AF398D7ED} = {CD41CEB1-4E2C-494B-86E8-E29AF398D7ED}
- {F8CD481D-462C-40ED-98FA-C6EEF477B5CF} = {F8CD481D-462C-40ED-98FA-C6EEF477B5CF}
- {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2} = {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2}
- {327A10DD-2251-4191-8425-17E535235D30} = {327A10DD-2251-4191-8425-17E535235D30}
- {32AB53DD-66B1-4E17-B411-FEB804E62CF0} = {32AB53DD-66B1-4E17-B411-FEB804E62CF0}
- {45CF24A4-E238-4E5C-BACC-5F0D6556A8EC} = {45CF24A4-E238-4E5C-BACC-5F0D6556A8EC}
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "exe_ddv", "ddv\ddv\exe_ddv.vcproj", "{3BF6CF52-B403-4F8A-8DD5-4F1CF619CCC9}"
- ProjectSection(ProjectDependencies) = postProject
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D} = {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}
- {F7164C61-0D7C-4EC8-9209-88A760907B6B} = {F7164C61-0D7C-4EC8-9209-88A760907B6B}
- {96FC3702-E2ED-434F-BBA5-3DE1366FFA1F} = {96FC3702-E2ED-434F-BBA5-3DE1366FFA1F}
- {CD41CEB1-4E2C-494B-86E8-E29AF398D7ED} = {CD41CEB1-4E2C-494B-86E8-E29AF398D7ED}
- {F8CD481D-462C-40ED-98FA-C6EEF477B5CF} = {F8CD481D-462C-40ED-98FA-C6EEF477B5CF}
- {32AB53DD-66B1-4E17-B411-FEB804E62CF0} = {32AB53DD-66B1-4E17-B411-FEB804E62CF0}
- {F2107221-7687-4F18-AEAC-FAA7C4EFCC16} = {F2107221-7687-4F18-AEAC-FAA7C4EFCC16}
- {3C4476FB-5518-425A-9D4E-44DD91068776} = {3C4476FB-5518-425A-9D4E-44DD91068776}
- {327A10DD-2251-4191-8425-17E535235D30} = {327A10DD-2251-4191-8425-17E535235D30}
- {E2B932C9-4C8A-4922-9DFF-9FB646184223} = {E2B932C9-4C8A-4922-9DFF-9FB646184223}
- {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2} = {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2}
- {3D2820CB-F5E6-4807-864C-2C751ADC556D} = {3D2820CB-F5E6-4807-864C-2C751ADC556D}
- {FD5A8225-8809-4FFB-9190-B6403A2AD467} = {FD5A8225-8809-4FFB-9190-B6403A2AD467}
- {47BB9C01-3751-4E25-87AE-6B4BAAA00340} = {47BB9C01-3751-4E25-87AE-6B4BAAA00340}
- {707F859C-FE05-486E-BB82-A447A6CD5036} = {707F859C-FE05-486E-BB82-A447A6CD5036}
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "exe_idfetch", "network\idfetch\exe_idfetch.vcproj", "{BB120D1D-3A68-4107-A8A1-427E448DEA98}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_twopv", "demo\twopv\demo_twopv.vcproj", "{FAB79DB6-B9B5-4FDA-B2FB-17B4BEB6011F}"
+ ProjectSection(ProjectDependencies) = postProject
+ {F6DB30E7-94C5-4760-92FA-449884953A9D} = {F6DB30E7-94C5-4760-92FA-449884953A9D}
+ {A2E2AE46-C7B9-4544-B138-6F7662DF2216} = {A2E2AE46-C7B9-4544-B138-6F7662DF2216}
+ {6058EDC4-453A-48B1-8E27-83820FFB7203} = {6058EDC4-453A-48B1-8E27-83820FFB7203}
+ {B8E40D4D-C20C-42BD-B5E4-6BEB9D08344A} = {B8E40D4D-C20C-42BD-B5E4-6BEB9D08344A}
+ {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0} = {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0}
+ {25806259-F586-4AAC-BDD1-50C1B227147D} = {25806259-F586-4AAC-BDD1-50C1B227147D}
+ {F8832A8F-9EA0-4DFD-B181-FAA767F3B9AF} = {F8832A8F-9EA0-4DFD-B181-FAA767F3B9AF}
+ {14D69C18-0E8E-4816-8CC6-FC22AEA3E1C7} = {14D69C18-0E8E-4816-8CC6-FC22AEA3E1C7}
+ {AB9DEE32-64FD-4700-84DF-485166A3E367} = {AB9DEE32-64FD-4700-84DF-485166A3E367}
+ {7C0D1F06-0B97-49A1-A25D-93D5E7A96786} = {7C0D1F06-0B97-49A1-A25D-93D5E7A96786}
+ {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937} = {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937}
+ {BDDE8ABD-4E45-49DA-B499-131BD6FCABBD} = {BDDE8ABD-4E45-49DA-B499-131BD6FCABBD}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_udv", "demo\udv\demo_udv.vcproj", "{5E35A42F-8E72-4ED7-ABA3-469E86F14DB8}"
+ ProjectSection(ProjectDependencies) = postProject
+ {F6DB30E7-94C5-4760-92FA-449884953A9D} = {F6DB30E7-94C5-4760-92FA-449884953A9D}
+ {A2E2AE46-C7B9-4544-B138-6F7662DF2216} = {A2E2AE46-C7B9-4544-B138-6F7662DF2216}
+ {6058EDC4-453A-48B1-8E27-83820FFB7203} = {6058EDC4-453A-48B1-8E27-83820FFB7203}
+ {B8E40D4D-C20C-42BD-B5E4-6BEB9D08344A} = {B8E40D4D-C20C-42BD-B5E4-6BEB9D08344A}
+ {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0} = {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0}
+ {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937} = {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937}
+ {25806259-F586-4AAC-BDD1-50C1B227147D} = {25806259-F586-4AAC-BDD1-50C1B227147D}
+ {F8832A8F-9EA0-4DFD-B181-FAA767F3B9AF} = {F8832A8F-9EA0-4DFD-B181-FAA767F3B9AF}
+ {14D69C18-0E8E-4816-8CC6-FC22AEA3E1C7} = {14D69C18-0E8E-4816-8CC6-FC22AEA3E1C7}
+ {AB9DEE32-64FD-4700-84DF-485166A3E367} = {AB9DEE32-64FD-4700-84DF-485166A3E367}
+ {7C0D1F06-0B97-49A1-A25D-93D5E7A96786} = {7C0D1F06-0B97-49A1-A25D-93D5E7A96786}
+ {D2059A10-7A4D-471A-BAEA-76479FD2773D} = {D2059A10-7A4D-471A-BAEA-76479FD2773D}
+ {BDDE8ABD-4E45-49DA-B499-131BD6FCABBD} = {BDDE8ABD-4E45-49DA-B499-131BD6FCABBD}
+ {DE96F5AB-AC39-44FF-9BAB-36805FE07A86} = {DE96F5AB-AC39-44FF-9BAB-36805FE07A86}
+ {85E82D79-6144-4151-A3E7-8140E9ED01CF} = {85E82D79-6144-4151-A3E7-8140E9ED01CF}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo_vecscreen", "demo\vecscreen\demo_vecscreen.vcproj", "{B9B3203E-0C07-46DB-BABE-3024B22F923C}"
+ ProjectSection(ProjectDependencies) = postProject
+ {610E62DA-4DD6-479E-8D85-1FB87126D750} = {610E62DA-4DD6-479E-8D85-1FB87126D750}
+ {F6DB30E7-94C5-4760-92FA-449884953A9D} = {F6DB30E7-94C5-4760-92FA-449884953A9D}
+ {A2E2AE46-C7B9-4544-B138-6F7662DF2216} = {A2E2AE46-C7B9-4544-B138-6F7662DF2216}
+ {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0} = {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0}
+ {7C0D1F06-0B97-49A1-A25D-93D5E7A96786} = {7C0D1F06-0B97-49A1-A25D-93D5E7A96786}
+ {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937} = {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "exe_asntool", "asnlib\asntool\exe_asntool.vcproj", "{95BF266E-0195-4BEB-B306-B99489EE3991}"
+ ProjectSection(ProjectDependencies) = postProject
+ {610E62DA-4DD6-479E-8D85-1FB87126D750} = {610E62DA-4DD6-479E-8D85-1FB87126D750}
+ {F6DB30E7-94C5-4760-92FA-449884953A9D} = {F6DB30E7-94C5-4760-92FA-449884953A9D}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "exe_blastcl3", "network\blast3\blastcl3\exe_blastcl3.vcproj", "{0516C2CE-F3B1-476B-AECC-9E2A02D40D8D}"
+ ProjectSection(ProjectDependencies) = postProject
+ {610E62DA-4DD6-479E-8D85-1FB87126D750} = {610E62DA-4DD6-479E-8D85-1FB87126D750}
+ {F6DB30E7-94C5-4760-92FA-449884953A9D} = {F6DB30E7-94C5-4760-92FA-449884953A9D}
+ {A2E2AE46-C7B9-4544-B138-6F7662DF2216} = {A2E2AE46-C7B9-4544-B138-6F7662DF2216}
+ {6058EDC4-453A-48B1-8E27-83820FFB7203} = {6058EDC4-453A-48B1-8E27-83820FFB7203}
+ {B8E40D4D-C20C-42BD-B5E4-6BEB9D08344A} = {B8E40D4D-C20C-42BD-B5E4-6BEB9D08344A}
+ {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0} = {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0}
+ {7C0D1F06-0B97-49A1-A25D-93D5E7A96786} = {7C0D1F06-0B97-49A1-A25D-93D5E7A96786}
+ {14D69C18-0E8E-4816-8CC6-FC22AEA3E1C7} = {14D69C18-0E8E-4816-8CC6-FC22AEA3E1C7}
+ {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937} = {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937}
+ {759991FD-441C-4267-A364-1BB2236C67B8} = {759991FD-441C-4267-A364-1BB2236C67B8}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "exe_ddv", "ddv\ddv\exe_ddv.vcproj", "{49F50B13-96C8-44F1-9B8C-68197E0DBE7E}"
+ ProjectSection(ProjectDependencies) = postProject
+ {F6DB30E7-94C5-4760-92FA-449884953A9D} = {F6DB30E7-94C5-4760-92FA-449884953A9D}
+ {A2E2AE46-C7B9-4544-B138-6F7662DF2216} = {A2E2AE46-C7B9-4544-B138-6F7662DF2216}
+ {6058EDC4-453A-48B1-8E27-83820FFB7203} = {6058EDC4-453A-48B1-8E27-83820FFB7203}
+ {B8E40D4D-C20C-42BD-B5E4-6BEB9D08344A} = {B8E40D4D-C20C-42BD-B5E4-6BEB9D08344A}
+ {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0} = {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0}
+ {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937} = {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937}
+ {25806259-F586-4AAC-BDD1-50C1B227147D} = {25806259-F586-4AAC-BDD1-50C1B227147D}
+ {F8832A8F-9EA0-4DFD-B181-FAA767F3B9AF} = {F8832A8F-9EA0-4DFD-B181-FAA767F3B9AF}
+ {14D69C18-0E8E-4816-8CC6-FC22AEA3E1C7} = {14D69C18-0E8E-4816-8CC6-FC22AEA3E1C7}
+ {AB9DEE32-64FD-4700-84DF-485166A3E367} = {AB9DEE32-64FD-4700-84DF-485166A3E367}
+ {7C0D1F06-0B97-49A1-A25D-93D5E7A96786} = {7C0D1F06-0B97-49A1-A25D-93D5E7A96786}
+ {D2059A10-7A4D-471A-BAEA-76479FD2773D} = {D2059A10-7A4D-471A-BAEA-76479FD2773D}
+ {BDDE8ABD-4E45-49DA-B499-131BD6FCABBD} = {BDDE8ABD-4E45-49DA-B499-131BD6FCABBD}
+ {DE96F5AB-AC39-44FF-9BAB-36805FE07A86} = {DE96F5AB-AC39-44FF-9BAB-36805FE07A86}
+ {85E82D79-6144-4151-A3E7-8140E9ED01CF} = {85E82D79-6144-4151-A3E7-8140E9ED01CF}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "exe_idfetch", "network\idfetch\exe_idfetch.vcproj", "{67436D24-0D70-48D5-B1AE-6E8DFA978983}"
ProjectSection(ProjectDependencies) = postProject
- {35C18E88-9F42-49EA-9881-C3128245490F} = {35C18E88-9F42-49EA-9881-C3128245490F}
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D} = {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}
- {F8CD481D-462C-40ED-98FA-C6EEF477B5CF} = {F8CD481D-462C-40ED-98FA-C6EEF477B5CF}
- {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2} = {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2}
- {327A10DD-2251-4191-8425-17E535235D30} = {327A10DD-2251-4191-8425-17E535235D30}
- {32AB53DD-66B1-4E17-B411-FEB804E62CF0} = {32AB53DD-66B1-4E17-B411-FEB804E62CF0}
- {707F859C-FE05-486E-BB82-A447A6CD5036} = {707F859C-FE05-486E-BB82-A447A6CD5036}
+ {610E62DA-4DD6-479E-8D85-1FB87126D750} = {610E62DA-4DD6-479E-8D85-1FB87126D750}
+ {F6DB30E7-94C5-4760-92FA-449884953A9D} = {F6DB30E7-94C5-4760-92FA-449884953A9D}
+ {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0} = {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0}
+ {7C0D1F06-0B97-49A1-A25D-93D5E7A96786} = {7C0D1F06-0B97-49A1-A25D-93D5E7A96786}
+ {14D69C18-0E8E-4816-8CC6-FC22AEA3E1C7} = {14D69C18-0E8E-4816-8CC6-FC22AEA3E1C7}
+ {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937} = {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937}
+ {85E82D79-6144-4151-A3E7-8140E9ED01CF} = {85E82D79-6144-4151-A3E7-8140E9ED01CF}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "exe_sbtedit", "sequin\sbtedit\exe_sbtedit.vcproj", "{6F58FEBB-1C0A-4C28-B0D4-82629AC0E1C6}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "exe_sbtedit", "sequin\sbtedit\exe_sbtedit.vcproj", "{028EEC3D-499E-453C-A1F4-5A4478BBB39F}"
ProjectSection(ProjectDependencies) = postProject
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D} = {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}
- {96FC3702-E2ED-434F-BBA5-3DE1366FFA1F} = {96FC3702-E2ED-434F-BBA5-3DE1366FFA1F}
- {CD41CEB1-4E2C-494B-86E8-E29AF398D7ED} = {CD41CEB1-4E2C-494B-86E8-E29AF398D7ED}
- {F8CD481D-462C-40ED-98FA-C6EEF477B5CF} = {F8CD481D-462C-40ED-98FA-C6EEF477B5CF}
- {F2107221-7687-4F18-AEAC-FAA7C4EFCC16} = {F2107221-7687-4F18-AEAC-FAA7C4EFCC16}
- {3C4476FB-5518-425A-9D4E-44DD91068776} = {3C4476FB-5518-425A-9D4E-44DD91068776}
- {E2B932C9-4C8A-4922-9DFF-9FB646184223} = {E2B932C9-4C8A-4922-9DFF-9FB646184223}
- {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2} = {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2}
- {327A10DD-2251-4191-8425-17E535235D30} = {327A10DD-2251-4191-8425-17E535235D30}
- {4502FEB5-256A-4E4E-A8EF-34F7C7FC09DB} = {4502FEB5-256A-4E4E-A8EF-34F7C7FC09DB}
- {A9FD8A3D-345F-4F7B-B8D6-9032E1884F94} = {A9FD8A3D-345F-4F7B-B8D6-9032E1884F94}
- {FD5A8225-8809-4FFB-9190-B6403A2AD467} = {FD5A8225-8809-4FFB-9190-B6403A2AD467}
- {98C1A680-89B6-4911-8C36-42D14F43B868} = {98C1A680-89B6-4911-8C36-42D14F43B868}
- {32AB53DD-66B1-4E17-B411-FEB804E62CF0} = {32AB53DD-66B1-4E17-B411-FEB804E62CF0}
- {45CF24A4-E238-4E5C-BACC-5F0D6556A8EC} = {45CF24A4-E238-4E5C-BACC-5F0D6556A8EC}
- {47BB9C01-3751-4E25-87AE-6B4BAAA00340} = {47BB9C01-3751-4E25-87AE-6B4BAAA00340}
+ {F6DB30E7-94C5-4760-92FA-449884953A9D} = {F6DB30E7-94C5-4760-92FA-449884953A9D}
+ {A2E2AE46-C7B9-4544-B138-6F7662DF2216} = {A2E2AE46-C7B9-4544-B138-6F7662DF2216}
+ {6058EDC4-453A-48B1-8E27-83820FFB7203} = {6058EDC4-453A-48B1-8E27-83820FFB7203}
+ {B8E40D4D-C20C-42BD-B5E4-6BEB9D08344A} = {B8E40D4D-C20C-42BD-B5E4-6BEB9D08344A}
+ {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0} = {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0}
+ {25806259-F586-4AAC-BDD1-50C1B227147D} = {25806259-F586-4AAC-BDD1-50C1B227147D}
+ {F8832A8F-9EA0-4DFD-B181-FAA767F3B9AF} = {F8832A8F-9EA0-4DFD-B181-FAA767F3B9AF}
+ {AB9DEE32-64FD-4700-84DF-485166A3E367} = {AB9DEE32-64FD-4700-84DF-485166A3E367}
+ {7C0D1F06-0B97-49A1-A25D-93D5E7A96786} = {7C0D1F06-0B97-49A1-A25D-93D5E7A96786}
+ {14D69C18-0E8E-4816-8CC6-FC22AEA3E1C7} = {14D69C18-0E8E-4816-8CC6-FC22AEA3E1C7}
+ {2746DC43-68A9-42FE-80F0-1806679538FA} = {2746DC43-68A9-42FE-80F0-1806679538FA}
+ {C2857848-3327-46C6-929C-192629A21F60} = {C2857848-3327-46C6-929C-192629A21F60}
+ {BDDE8ABD-4E45-49DA-B499-131BD6FCABBD} = {BDDE8ABD-4E45-49DA-B499-131BD6FCABBD}
+ {2DD94017-2F95-470D-94F5-9F10AD650BDC} = {2DD94017-2F95-470D-94F5-9F10AD650BDC}
+ {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937} = {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937}
+ {759991FD-441C-4267-A364-1BB2236C67B8} = {759991FD-441C-4267-A364-1BB2236C67B8}
+ {DE96F5AB-AC39-44FF-9BAB-36805FE07A86} = {DE96F5AB-AC39-44FF-9BAB-36805FE07A86}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "exe_sequin", "sequin\sequin\exe_sequin.vcproj", "{002CC81D-C6AF-4AED-8624-301D0E13ED46}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "exe_sequin", "sequin\sequin\exe_sequin.vcproj", "{86F47145-3ABB-45BA-8D51-89C24997882F}"
ProjectSection(ProjectDependencies) = postProject
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D} = {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}
- {F7164C61-0D7C-4EC8-9209-88A760907B6B} = {F7164C61-0D7C-4EC8-9209-88A760907B6B}
- {96FC3702-E2ED-434F-BBA5-3DE1366FFA1F} = {96FC3702-E2ED-434F-BBA5-3DE1366FFA1F}
- {CD41CEB1-4E2C-494B-86E8-E29AF398D7ED} = {CD41CEB1-4E2C-494B-86E8-E29AF398D7ED}
- {F8CD481D-462C-40ED-98FA-C6EEF477B5CF} = {F8CD481D-462C-40ED-98FA-C6EEF477B5CF}
- {F2107221-7687-4F18-AEAC-FAA7C4EFCC16} = {F2107221-7687-4F18-AEAC-FAA7C4EFCC16}
- {3C4476FB-5518-425A-9D4E-44DD91068776} = {3C4476FB-5518-425A-9D4E-44DD91068776}
- {E2B932C9-4C8A-4922-9DFF-9FB646184223} = {E2B932C9-4C8A-4922-9DFF-9FB646184223}
- {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2} = {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2}
- {327A10DD-2251-4191-8425-17E535235D30} = {327A10DD-2251-4191-8425-17E535235D30}
- {4502FEB5-256A-4E4E-A8EF-34F7C7FC09DB} = {4502FEB5-256A-4E4E-A8EF-34F7C7FC09DB}
- {A9FD8A3D-345F-4F7B-B8D6-9032E1884F94} = {A9FD8A3D-345F-4F7B-B8D6-9032E1884F94}
- {FD5A8225-8809-4FFB-9190-B6403A2AD467} = {FD5A8225-8809-4FFB-9190-B6403A2AD467}
- {98C1A680-89B6-4911-8C36-42D14F43B868} = {98C1A680-89B6-4911-8C36-42D14F43B868}
- {32AB53DD-66B1-4E17-B411-FEB804E62CF0} = {32AB53DD-66B1-4E17-B411-FEB804E62CF0}
- {45CF24A4-E238-4E5C-BACC-5F0D6556A8EC} = {45CF24A4-E238-4E5C-BACC-5F0D6556A8EC}
- {47BB9C01-3751-4E25-87AE-6B4BAAA00340} = {47BB9C01-3751-4E25-87AE-6B4BAAA00340}
+ {F6DB30E7-94C5-4760-92FA-449884953A9D} = {F6DB30E7-94C5-4760-92FA-449884953A9D}
+ {A2E2AE46-C7B9-4544-B138-6F7662DF2216} = {A2E2AE46-C7B9-4544-B138-6F7662DF2216}
+ {6058EDC4-453A-48B1-8E27-83820FFB7203} = {6058EDC4-453A-48B1-8E27-83820FFB7203}
+ {B8E40D4D-C20C-42BD-B5E4-6BEB9D08344A} = {B8E40D4D-C20C-42BD-B5E4-6BEB9D08344A}
+ {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0} = {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0}
+ {25806259-F586-4AAC-BDD1-50C1B227147D} = {25806259-F586-4AAC-BDD1-50C1B227147D}
+ {F8832A8F-9EA0-4DFD-B181-FAA767F3B9AF} = {F8832A8F-9EA0-4DFD-B181-FAA767F3B9AF}
+ {AB9DEE32-64FD-4700-84DF-485166A3E367} = {AB9DEE32-64FD-4700-84DF-485166A3E367}
+ {7C0D1F06-0B97-49A1-A25D-93D5E7A96786} = {7C0D1F06-0B97-49A1-A25D-93D5E7A96786}
+ {14D69C18-0E8E-4816-8CC6-FC22AEA3E1C7} = {14D69C18-0E8E-4816-8CC6-FC22AEA3E1C7}
+ {2746DC43-68A9-42FE-80F0-1806679538FA} = {2746DC43-68A9-42FE-80F0-1806679538FA}
+ {C2857848-3327-46C6-929C-192629A21F60} = {C2857848-3327-46C6-929C-192629A21F60}
+ {BDDE8ABD-4E45-49DA-B499-131BD6FCABBD} = {BDDE8ABD-4E45-49DA-B499-131BD6FCABBD}
+ {2DD94017-2F95-470D-94F5-9F10AD650BDC} = {2DD94017-2F95-470D-94F5-9F10AD650BDC}
+ {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937} = {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937}
+ {759991FD-441C-4267-A364-1BB2236C67B8} = {759991FD-441C-4267-A364-1BB2236C67B8}
+ {DE96F5AB-AC39-44FF-9BAB-36805FE07A86} = {DE96F5AB-AC39-44FF-9BAB-36805FE07A86}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "exe_ssequin", "sequin\ssequin\exe_ssequin.vcproj", "{808F70AF-6AA9-49CB-A7AE-28E85C1D22FE}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "exe_ssequin", "sequin\ssequin\exe_ssequin.vcproj", "{7469FFC1-059F-45B2-A9B8-B17CD881CA8D}"
ProjectSection(ProjectDependencies) = postProject
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D} = {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}
- {F7164C61-0D7C-4EC8-9209-88A760907B6B} = {F7164C61-0D7C-4EC8-9209-88A760907B6B}
- {96FC3702-E2ED-434F-BBA5-3DE1366FFA1F} = {96FC3702-E2ED-434F-BBA5-3DE1366FFA1F}
- {CD41CEB1-4E2C-494B-86E8-E29AF398D7ED} = {CD41CEB1-4E2C-494B-86E8-E29AF398D7ED}
- {ACB6E56A-AA8C-43C8-B9C4-A8E1E10E496C} = {ACB6E56A-AA8C-43C8-B9C4-A8E1E10E496C}
- {F8CD481D-462C-40ED-98FA-C6EEF477B5CF} = {F8CD481D-462C-40ED-98FA-C6EEF477B5CF}
- {F2107221-7687-4F18-AEAC-FAA7C4EFCC16} = {F2107221-7687-4F18-AEAC-FAA7C4EFCC16}
- {3C4476FB-5518-425A-9D4E-44DD91068776} = {3C4476FB-5518-425A-9D4E-44DD91068776}
- {E2B932C9-4C8A-4922-9DFF-9FB646184223} = {E2B932C9-4C8A-4922-9DFF-9FB646184223}
- {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2} = {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2}
- {327A10DD-2251-4191-8425-17E535235D30} = {327A10DD-2251-4191-8425-17E535235D30}
- {4502FEB5-256A-4E4E-A8EF-34F7C7FC09DB} = {4502FEB5-256A-4E4E-A8EF-34F7C7FC09DB}
- {A9FD8A3D-345F-4F7B-B8D6-9032E1884F94} = {A9FD8A3D-345F-4F7B-B8D6-9032E1884F94}
- {FD5A8225-8809-4FFB-9190-B6403A2AD467} = {FD5A8225-8809-4FFB-9190-B6403A2AD467}
- {98C1A680-89B6-4911-8C36-42D14F43B868} = {98C1A680-89B6-4911-8C36-42D14F43B868}
- {32AB53DD-66B1-4E17-B411-FEB804E62CF0} = {32AB53DD-66B1-4E17-B411-FEB804E62CF0}
- {45CF24A4-E238-4E5C-BACC-5F0D6556A8EC} = {45CF24A4-E238-4E5C-BACC-5F0D6556A8EC}
- {47BB9C01-3751-4E25-87AE-6B4BAAA00340} = {47BB9C01-3751-4E25-87AE-6B4BAAA00340}
- {2B743DB7-9F8B-4652-B45D-04E23AE2B547} = {2B743DB7-9F8B-4652-B45D-04E23AE2B547}
+ {F6DB30E7-94C5-4760-92FA-449884953A9D} = {F6DB30E7-94C5-4760-92FA-449884953A9D}
+ {A2E2AE46-C7B9-4544-B138-6F7662DF2216} = {A2E2AE46-C7B9-4544-B138-6F7662DF2216}
+ {6058EDC4-453A-48B1-8E27-83820FFB7203} = {6058EDC4-453A-48B1-8E27-83820FFB7203}
+ {B8E40D4D-C20C-42BD-B5E4-6BEB9D08344A} = {B8E40D4D-C20C-42BD-B5E4-6BEB9D08344A}
+ {8B58713F-B6F4-4A76-9888-309FDDFB985D} = {8B58713F-B6F4-4A76-9888-309FDDFB985D}
+ {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0} = {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0}
+ {25806259-F586-4AAC-BDD1-50C1B227147D} = {25806259-F586-4AAC-BDD1-50C1B227147D}
+ {F8832A8F-9EA0-4DFD-B181-FAA767F3B9AF} = {F8832A8F-9EA0-4DFD-B181-FAA767F3B9AF}
+ {AB9DEE32-64FD-4700-84DF-485166A3E367} = {AB9DEE32-64FD-4700-84DF-485166A3E367}
+ {7C0D1F06-0B97-49A1-A25D-93D5E7A96786} = {7C0D1F06-0B97-49A1-A25D-93D5E7A96786}
+ {14D69C18-0E8E-4816-8CC6-FC22AEA3E1C7} = {14D69C18-0E8E-4816-8CC6-FC22AEA3E1C7}
+ {2746DC43-68A9-42FE-80F0-1806679538FA} = {2746DC43-68A9-42FE-80F0-1806679538FA}
+ {C2857848-3327-46C6-929C-192629A21F60} = {C2857848-3327-46C6-929C-192629A21F60}
+ {BDDE8ABD-4E45-49DA-B499-131BD6FCABBD} = {BDDE8ABD-4E45-49DA-B499-131BD6FCABBD}
+ {2DD94017-2F95-470D-94F5-9F10AD650BDC} = {2DD94017-2F95-470D-94F5-9F10AD650BDC}
+ {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937} = {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937}
+ {759991FD-441C-4267-A364-1BB2236C67B8} = {759991FD-441C-4267-A364-1BB2236C67B8}
+ {DE96F5AB-AC39-44FF-9BAB-36805FE07A86} = {DE96F5AB-AC39-44FF-9BAB-36805FE07A86}
+ {43337FCD-B171-4441-B44E-D1C90C2700EE} = {43337FCD-B171-4441-B44E-D1C90C2700EE}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "http_connector_hit", "connect\test\http_connector_hit\http_connector_hit.vcproj", "{A73BBA44-40FF-4306-AF50-94737CD49839}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "http_connector_hit", "connect\test\http_connector_hit\http_connector_hit.vcproj", "{6266F193-8E41-4543-BB84-4DEA87146A44}"
ProjectSection(ProjectDependencies) = postProject
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D} = {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}
+ {F6DB30E7-94C5-4760-92FA-449884953A9D} = {F6DB30E7-94C5-4760-92FA-449884953A9D}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "medarch", "network\medarch\client\medarch.vcproj", "{4502FEB5-256A-4E4E-A8EF-34F7C7FC09DB}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "medarch", "network\medarch\client\medarch.vcproj", "{2746DC43-68A9-42FE-80F0-1806679538FA}"
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ncbi", "corelib\ncbi\ncbi.vcproj", "{E29B255C-2B3A-4E74-85E1-6CD033DFA55D}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ncbi", "corelib\ncbi\ncbi.vcproj", "{F6DB30E7-94C5-4760-92FA-449884953A9D}"
ProjectSection(ProjectDependencies) = postProject
- {CF596340-202E-4E79-B041-F4310A422C20} = {CF596340-202E-4E79-B041-F4310A422C20}
+ {74B970B2-6C7F-4AEE-9031-27CC087D7214} = {74B970B2-6C7F-4AEE-9031-27CC087D7214}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ncbiacc", "cdromlib\ncbiacc\ncbiacc.vcproj", "{AFDEDE71-796D-4896-BEE6-AFFC4F77CC09}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ncbiacc", "cdromlib\ncbiacc\ncbiacc.vcproj", "{8FB57DC4-F98A-4E0D-BDBA-5AB2F7405B58}"
ProjectSection(ProjectDependencies) = postProject
- {CF596340-202E-4E79-B041-F4310A422C20} = {CF596340-202E-4E79-B041-F4310A422C20}
+ {74B970B2-6C7F-4AEE-9031-27CC087D7214} = {74B970B2-6C7F-4AEE-9031-27CC087D7214}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ncbicdr", "cdromlib\ncbicdr\ncbicdr.vcproj", "{3C4476FB-5518-425A-9D4E-44DD91068776}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ncbicdr", "cdromlib\ncbicdr\ncbicdr.vcproj", "{F8832A8F-9EA0-4DFD-B181-FAA767F3B9AF}"
ProjectSection(ProjectDependencies) = postProject
- {CF596340-202E-4E79-B041-F4310A422C20} = {CF596340-202E-4E79-B041-F4310A422C20}
+ {74B970B2-6C7F-4AEE-9031-27CC087D7214} = {74B970B2-6C7F-4AEE-9031-27CC087D7214}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ncbicn3d", "cn3d\ncbicn3d\ncbicn3d.vcproj", "{0A01AD98-3A52-430A-A7A8-2A3E990D1BA2}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ncbicn3d", "cn3d\ncbicn3d\ncbicn3d.vcproj", "{2F198E60-4B02-46C3-8FEF-CE86D69E2C59}"
ProjectSection(ProjectDependencies) = postProject
- {CF596340-202E-4E79-B041-F4310A422C20} = {CF596340-202E-4E79-B041-F4310A422C20}
+ {74B970B2-6C7F-4AEE-9031-27CC087D7214} = {74B970B2-6C7F-4AEE-9031-27CC087D7214}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ncbicn3d_ogl", "cn3d\ncbicn3d_ogl\ncbicn3d_ogl.vcproj", "{B5934B23-8476-4D68-9769-2A65BF5C33A4}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ncbicn3d_ogl", "cn3d\ncbicn3d_ogl\ncbicn3d_ogl.vcproj", "{DEBC32A0-A4F7-4C4C-9E93-62C1C4E6544D}"
ProjectSection(ProjectDependencies) = postProject
- {CF596340-202E-4E79-B041-F4310A422C20} = {CF596340-202E-4E79-B041-F4310A422C20}
+ {74B970B2-6C7F-4AEE-9031-27CC087D7214} = {74B970B2-6C7F-4AEE-9031-27CC087D7214}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ncbiconfig", "corelib\ncbiconfig.vcproj", "{CF596340-202E-4E79-B041-F4310A422C20}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ncbiconfig", "corelib\ncbiconfig.vcproj", "{74B970B2-6C7F-4AEE-9031-27CC087D7214}"
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ncbidesk", "desktop\ncbidesk.vcproj", "{FD5A8225-8809-4FFB-9190-B6403A2AD467}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ncbidesk", "desktop\ncbidesk.vcproj", "{BDDE8ABD-4E45-49DA-B499-131BD6FCABBD}"
ProjectSection(ProjectDependencies) = postProject
- {CF596340-202E-4E79-B041-F4310A422C20} = {CF596340-202E-4E79-B041-F4310A422C20}
+ {74B970B2-6C7F-4AEE-9031-27CC087D7214} = {74B970B2-6C7F-4AEE-9031-27CC087D7214}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ncbiid1", "network\id1arch\ncbiid1.vcproj", "{707F859C-FE05-486E-BB82-A447A6CD5036}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ncbiid1", "network\id1arch\ncbiid1.vcproj", "{85E82D79-6144-4151-A3E7-8140E9ED01CF}"
ProjectSection(ProjectDependencies) = postProject
- {CF596340-202E-4E79-B041-F4310A422C20} = {CF596340-202E-4E79-B041-F4310A422C20}
+ {74B970B2-6C7F-4AEE-9031-27CC087D7214} = {74B970B2-6C7F-4AEE-9031-27CC087D7214}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ncbimain", "corelib\ncbimain\ncbimain.vcproj", "{35C18E88-9F42-49EA-9881-C3128245490F}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ncbimain", "corelib\ncbimain\ncbimain.vcproj", "{610E62DA-4DD6-479E-8D85-1FB87126D750}"
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ncbimmdb", "biostruc\ncbimmdb.vcproj", "{98C1A680-89B6-4911-8C36-42D14F43B868}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ncbimmdb", "biostruc\ncbimmdb.vcproj", "{2DD94017-2F95-470D-94F5-9F10AD650BDC}"
ProjectSection(ProjectDependencies) = postProject
- {CF596340-202E-4E79-B041-F4310A422C20} = {CF596340-202E-4E79-B041-F4310A422C20}
+ {74B970B2-6C7F-4AEE-9031-27CC087D7214} = {74B970B2-6C7F-4AEE-9031-27CC087D7214}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ncbinacc", "cdromlib\ncbinacc\ncbinacc.vcproj", "{3E5CD700-5AE9-41CF-9A12-794A15EDE7D2}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ncbinacc", "cdromlib\ncbinacc\ncbinacc.vcproj", "{7C0D1F06-0B97-49A1-A25D-93D5E7A96786}"
ProjectSection(ProjectDependencies) = postProject
- {CF596340-202E-4E79-B041-F4310A422C20} = {CF596340-202E-4E79-B041-F4310A422C20}
+ {74B970B2-6C7F-4AEE-9031-27CC087D7214} = {74B970B2-6C7F-4AEE-9031-27CC087D7214}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ncbiobj", "object\ncbiobj.vcproj", "{F8CD481D-462C-40ED-98FA-C6EEF477B5CF}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ncbiobj", "object\ncbiobj.vcproj", "{7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0}"
ProjectSection(ProjectDependencies) = postProject
- {CF596340-202E-4E79-B041-F4310A422C20} = {CF596340-202E-4E79-B041-F4310A422C20}
+ {74B970B2-6C7F-4AEE-9031-27CC087D7214} = {74B970B2-6C7F-4AEE-9031-27CC087D7214}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ncbispel", "network\spell\client\ncbispel.vcproj", "{ACB6E56A-AA8C-43C8-B9C4-A8E1E10E496C}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ncbispel", "network\spell\client\ncbispel.vcproj", "{8B58713F-B6F4-4A76-9888-309FDDFB985D}"
ProjectSection(ProjectDependencies) = postProject
- {CF596340-202E-4E79-B041-F4310A422C20} = {CF596340-202E-4E79-B041-F4310A422C20}
+ {74B970B2-6C7F-4AEE-9031-27CC087D7214} = {74B970B2-6C7F-4AEE-9031-27CC087D7214}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ncbitool", "tools\ncbitool.vcproj", "{32AB53DD-66B1-4E17-B411-FEB804E62CF0}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ncbitool", "tools\ncbitool.vcproj", "{19DB0E0E-BB30-4A19-93A8-7B67FBB0C937}"
ProjectSection(ProjectDependencies) = postProject
- {CF596340-202E-4E79-B041-F4310A422C20} = {CF596340-202E-4E79-B041-F4310A422C20}
+ {74B970B2-6C7F-4AEE-9031-27CC087D7214} = {74B970B2-6C7F-4AEE-9031-27CC087D7214}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ncbitxc2", "network\taxon1\taxon2\ncbitxc2.vcproj", "{A9FD8A3D-345F-4F7B-B8D6-9032E1884F94}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ncbitxc2", "network\taxon1\taxon2\ncbitxc2.vcproj", "{C2857848-3327-46C6-929C-192629A21F60}"
ProjectSection(ProjectDependencies) = postProject
- {CF596340-202E-4E79-B041-F4310A422C20} = {CF596340-202E-4E79-B041-F4310A422C20}
+ {74B970B2-6C7F-4AEE-9031-27CC087D7214} = {74B970B2-6C7F-4AEE-9031-27CC087D7214}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "netblast", "network\blast3\netblast\netblast.vcproj", "{45CF24A4-E238-4E5C-BACC-5F0D6556A8EC}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "netblast", "network\blast3\netblast\netblast.vcproj", "{759991FD-441C-4267-A364-1BB2236C67B8}"
ProjectSection(ProjectDependencies) = postProject
- {CF596340-202E-4E79-B041-F4310A422C20} = {CF596340-202E-4E79-B041-F4310A422C20}
+ {74B970B2-6C7F-4AEE-9031-27CC087D7214} = {74B970B2-6C7F-4AEE-9031-27CC087D7214}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "netcli", "network\nsclilib\netcli.vcproj", "{327A10DD-2251-4191-8425-17E535235D30}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "netcli", "network\nsclilib\netcli.vcproj", "{14D69C18-0E8E-4816-8CC6-FC22AEA3E1C7}"
ProjectSection(ProjectDependencies) = postProject
- {CF596340-202E-4E79-B041-F4310A422C20} = {CF596340-202E-4E79-B041-F4310A422C20}
+ {74B970B2-6C7F-4AEE-9031-27CC087D7214} = {74B970B2-6C7F-4AEE-9031-27CC087D7214}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "netentr", "network\entrez\client\netentr.vcproj", "{E2B932C9-4C8A-4922-9DFF-9FB646184223}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "netentr", "network\entrez\client\netentr.vcproj", "{AB9DEE32-64FD-4700-84DF-485166A3E367}"
ProjectSection(ProjectDependencies) = postProject
- {CF596340-202E-4E79-B041-F4310A422C20} = {CF596340-202E-4E79-B041-F4310A422C20}
+ {74B970B2-6C7F-4AEE-9031-27CC087D7214} = {74B970B2-6C7F-4AEE-9031-27CC087D7214}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "regexp", "regexp\regexp.vcproj", "{21191422-314F-421D-93A8-EABF933C3065}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "regexp", "regexp\regexp.vcproj", "{C0B91754-0757-42BD-8F53-C05964FFFB66}"
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "smartnet", "internal\smart\smartnet\smartnet.vcproj", "{2B743DB7-9F8B-4652-B45D-04E23AE2B547}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "smartnet", "internal\smart\smartnet\smartnet.vcproj", "{43337FCD-B171-4441-B44E-D1C90C2700EE}"
ProjectSection(ProjectDependencies) = postProject
- {CF596340-202E-4E79-B041-F4310A422C20} = {CF596340-202E-4E79-B041-F4310A422C20}
+ {74B970B2-6C7F-4AEE-9031-27CC087D7214} = {74B970B2-6C7F-4AEE-9031-27CC087D7214}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "socket_io_bouncer", "connect\test\socket_io_bouncer\socket_io_bouncer.vcproj", "{1F10C6E1-3C88-4C78-9C18-05AC31B2421F}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "socket_io_bouncer", "connect\test\socket_io_bouncer\socket_io_bouncer.vcproj", "{BC50422E-D841-4EDF-B987-5135EC4D8F11}"
ProjectSection(ProjectDependencies) = postProject
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D} = {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}
+ {F6DB30E7-94C5-4760-92FA-449884953A9D} = {F6DB30E7-94C5-4760-92FA-449884953A9D}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_ncbi_buffer", "connect\test\test_ncbi_buffer\test_ncbi_buffer.vcproj", "{9149ED1B-E896-4A64-A3D2-C42FC10A7F63}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_ncbi_buffer", "connect\test\test_ncbi_buffer\test_ncbi_buffer.vcproj", "{2EDD4E60-025D-4167-B827-9A700DFA6D72}"
ProjectSection(ProjectDependencies) = postProject
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D} = {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}
+ {F6DB30E7-94C5-4760-92FA-449884953A9D} = {F6DB30E7-94C5-4760-92FA-449884953A9D}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_ncbi_connutil_hit", "connect\test\test_ncbi_connutil_hit\test_ncbi_connutil_hit.vcproj", "{AD565A88-01DA-4401-8E8F-53CCF8C759B5}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_ncbi_connutil_hit", "connect\test\test_ncbi_connutil_hit\test_ncbi_connutil_hit.vcproj", "{760EA748-5473-48CE-8BE0-76538A0CE1B2}"
ProjectSection(ProjectDependencies) = postProject
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D} = {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}
+ {F6DB30E7-94C5-4760-92FA-449884953A9D} = {F6DB30E7-94C5-4760-92FA-449884953A9D}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_ncbi_connutil_misc", "connect\test\test_ncbi_connutil_misc\test_ncbi_connutil_misc.vcproj", "{E85F8917-C596-477B-8D92-851E3726DE96}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_ncbi_connutil_misc", "connect\test\test_ncbi_connutil_misc\test_ncbi_connutil_misc.vcproj", "{9218C976-8194-4AD4-BC5C-7CBC456C2475}"
ProjectSection(ProjectDependencies) = postProject
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D} = {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}
+ {F6DB30E7-94C5-4760-92FA-449884953A9D} = {F6DB30E7-94C5-4760-92FA-449884953A9D}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_ncbi_core", "connect\test\test_ncbi_core\test_ncbi_core.vcproj", "{A6AC837C-8852-48B3-9232-57A2493AEDA4}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_ncbi_core", "connect\test\test_ncbi_core\test_ncbi_core.vcproj", "{167BDE33-267C-49EE-9AC5-6177D283D799}"
ProjectSection(ProjectDependencies) = postProject
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D} = {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}
+ {F6DB30E7-94C5-4760-92FA-449884953A9D} = {F6DB30E7-94C5-4760-92FA-449884953A9D}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_ncbi_disp", "connect\test\test_ncbi_disp\test_ncbi_disp.vcproj", "{AAD6BEB3-618D-492E-BFC8-D3892D9D26AB}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_ncbi_disp", "connect\test\test_ncbi_disp\test_ncbi_disp.vcproj", "{087A2516-3C90-4D46-AEA9-670592894CB4}"
ProjectSection(ProjectDependencies) = postProject
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D} = {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}
+ {F6DB30E7-94C5-4760-92FA-449884953A9D} = {F6DB30E7-94C5-4760-92FA-449884953A9D}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_ncbi_dsock", "connect\test\test_ncbi_dsock\test_ncbi_dsock.vcproj", "{032E43BB-816C-4BEE-9ABD-1E0B599C007A}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_ncbi_dsock", "connect\test\test_ncbi_dsock\test_ncbi_dsock.vcproj", "{3B976840-4F3F-46A9-832D-4AB79417F712}"
ProjectSection(ProjectDependencies) = postProject
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D} = {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}
+ {F6DB30E7-94C5-4760-92FA-449884953A9D} = {F6DB30E7-94C5-4760-92FA-449884953A9D}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_ncbi_file_connector", "connect\test\test_ncbi_file_connector\test_ncbi_file_connector.vcproj", "{57BABFE8-331D-41A9-8776-314F2D8791E2}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_ncbi_file_connector", "connect\test\test_ncbi_file_connector\test_ncbi_file_connector.vcproj", "{F171E3D9-FC0B-4404-B96F-AD98C055CD8B}"
ProjectSection(ProjectDependencies) = postProject
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D} = {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}
+ {F6DB30E7-94C5-4760-92FA-449884953A9D} = {F6DB30E7-94C5-4760-92FA-449884953A9D}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_ncbi_http_connector", "connect\test\test_ncbi_http_connector\test_ncbi_http_connector.vcproj", "{8B6B0E08-62BA-4E92-8672-06CCA7432096}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_ncbi_http_connector", "connect\test\test_ncbi_http_connector\test_ncbi_http_connector.vcproj", "{862D2BCD-67ED-4398-A811-7E247C2029E5}"
ProjectSection(ProjectDependencies) = postProject
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D} = {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}
- {8D0BB3E1-BFB0-4557-9DD0-A2E82D3D9C70} = {8D0BB3E1-BFB0-4557-9DD0-A2E82D3D9C70}
+ {F6DB30E7-94C5-4760-92FA-449884953A9D} = {F6DB30E7-94C5-4760-92FA-449884953A9D}
+ {A9561C14-6DAF-4A28-9F59-297D39432D0B} = {A9561C14-6DAF-4A28-9F59-297D39432D0B}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_ncbi_http_get", "connect\test\test_ncbi_http_get\test_ncbi_http_get.vcproj", "{C5FFDC7A-C2A7-49C0-9EED-92D987AC3AC9}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_ncbi_http_get", "connect\test\test_ncbi_http_get\test_ncbi_http_get.vcproj", "{DD51F357-26FE-46F2-9AC9-5B682DBC198C}"
ProjectSection(ProjectDependencies) = postProject
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D} = {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}
+ {F6DB30E7-94C5-4760-92FA-449884953A9D} = {F6DB30E7-94C5-4760-92FA-449884953A9D}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_ncbi_memory_connector", "connect\test\test_ncbi_memory_connector\test_ncbi_memory_connector.vcproj", "{42140DF3-03C5-4A99-9D7B-F4385733D694}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_ncbi_memory_connector", "connect\test\test_ncbi_memory_connector\test_ncbi_memory_connector.vcproj", "{6F8036D0-9AEE-4B60-A65A-5A51A9D8725F}"
ProjectSection(ProjectDependencies) = postProject
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D} = {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}
- {8D0BB3E1-BFB0-4557-9DD0-A2E82D3D9C70} = {8D0BB3E1-BFB0-4557-9DD0-A2E82D3D9C70}
+ {F6DB30E7-94C5-4760-92FA-449884953A9D} = {F6DB30E7-94C5-4760-92FA-449884953A9D}
+ {A9561C14-6DAF-4A28-9F59-297D39432D0B} = {A9561C14-6DAF-4A28-9F59-297D39432D0B}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_ncbi_sendmail", "connect\test\test_ncbi_sendmail\test_ncbi_sendmail.vcproj", "{AA4B7095-5FBB-41E5-AE2A-39247638EC14}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_ncbi_sendmail", "connect\test\test_ncbi_sendmail\test_ncbi_sendmail.vcproj", "{E459338E-39A8-49C9-9DFC-612E47863CE3}"
ProjectSection(ProjectDependencies) = postProject
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D} = {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}
+ {F6DB30E7-94C5-4760-92FA-449884953A9D} = {F6DB30E7-94C5-4760-92FA-449884953A9D}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_ncbi_service_connector", "connect\test\test_ncbi_service_connector\test_ncbi_service_connector.vcproj", "{A40959E8-B640-49F7-B2E0-806A03544AB5}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_ncbi_service_connector", "connect\test\test_ncbi_service_connector\test_ncbi_service_connector.vcproj", "{7719A61E-FAE1-4564-AD24-416318E48967}"
ProjectSection(ProjectDependencies) = postProject
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D} = {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}
- {8D0BB3E1-BFB0-4557-9DD0-A2E82D3D9C70} = {8D0BB3E1-BFB0-4557-9DD0-A2E82D3D9C70}
+ {F6DB30E7-94C5-4760-92FA-449884953A9D} = {F6DB30E7-94C5-4760-92FA-449884953A9D}
+ {A9561C14-6DAF-4A28-9F59-297D39432D0B} = {A9561C14-6DAF-4A28-9F59-297D39432D0B}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_ncbi_socket", "connect\test\test_ncbi_socket\test_ncbi_socket.vcproj", "{67F5D600-6FE3-420E-B9F3-7EA1DD452FC9}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_ncbi_socket", "connect\test\test_ncbi_socket\test_ncbi_socket.vcproj", "{E6CE793E-7882-4E77-9D26-22C950DE0AFE}"
ProjectSection(ProjectDependencies) = postProject
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D} = {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}
+ {F6DB30E7-94C5-4760-92FA-449884953A9D} = {F6DB30E7-94C5-4760-92FA-449884953A9D}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_ncbi_socket_connector", "connect\test\test_ncbi_socket_connector\test_ncbi_socket_connector.vcproj", "{BD7E75D1-DEDC-450E-A3E5-4823C06100D5}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_ncbi_socket_connector", "connect\test\test_ncbi_socket_connector\test_ncbi_socket_connector.vcproj", "{9AAE2D3F-4D37-43B6-96EB-593DE7679811}"
ProjectSection(ProjectDependencies) = postProject
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D} = {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}
- {8D0BB3E1-BFB0-4557-9DD0-A2E82D3D9C70} = {8D0BB3E1-BFB0-4557-9DD0-A2E82D3D9C70}
+ {F6DB30E7-94C5-4760-92FA-449884953A9D} = {F6DB30E7-94C5-4760-92FA-449884953A9D}
+ {A9561C14-6DAF-4A28-9F59-297D39432D0B} = {A9561C14-6DAF-4A28-9F59-297D39432D0B}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_regexp", "regexp\test\test_regexp.vcproj", "{8FBFAE5E-50CA-42EF-B614-BEA3252064BD}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_regexp", "regexp\test\test_regexp.vcproj", "{B6875C47-6809-4972-A89D-0085058670C9}"
ProjectSection(ProjectDependencies) = postProject
- {21191422-314F-421D-93A8-EABF933C3065} = {21191422-314F-421D-93A8-EABF933C3065}
+ {C0B91754-0757-42BD-8F53-C05964FFFB66} = {C0B91754-0757-42BD-8F53-C05964FFFB66}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vibgif", "gif\vibgif.vcproj", "{08C550B7-3DA6-46A6-96EB-A48806F1900C}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vibgif", "gif\vibgif.vcproj", "{A0F67E98-8A07-4319-A3E8-B983D522D8CA}"
ProjectSection(ProjectDependencies) = postProject
- {CF596340-202E-4E79-B041-F4310A422C20} = {CF596340-202E-4E79-B041-F4310A422C20}
+ {74B970B2-6C7F-4AEE-9031-27CC087D7214} = {74B970B2-6C7F-4AEE-9031-27CC087D7214}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vibnet", "network\vibnet\vibnet.vcproj", "{47BB9C01-3751-4E25-87AE-6B4BAAA00340}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vibnet", "network\vibnet\vibnet.vcproj", "{DE96F5AB-AC39-44FF-9BAB-36805FE07A86}"
ProjectSection(ProjectDependencies) = postProject
- {CF596340-202E-4E79-B041-F4310A422C20} = {CF596340-202E-4E79-B041-F4310A422C20}
+ {74B970B2-6C7F-4AEE-9031-27CC087D7214} = {74B970B2-6C7F-4AEE-9031-27CC087D7214}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vibrant", "vibrant\vibrant\vibrant.vcproj", "{F2107221-7687-4F18-AEAC-FAA7C4EFCC16}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vibrant", "vibrant\vibrant\vibrant.vcproj", "{25806259-F586-4AAC-BDD1-50C1B227147D}"
ProjectSection(ProjectDependencies) = postProject
- {CF596340-202E-4E79-B041-F4310A422C20} = {CF596340-202E-4E79-B041-F4310A422C20}
+ {74B970B2-6C7F-4AEE-9031-27CC087D7214} = {74B970B2-6C7F-4AEE-9031-27CC087D7214}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vibrant_ogl", "vibrant\vibrant_ogl\vibrant_ogl.vcproj", "{94B3883E-2A1C-4B7C-A98F-6ED6343F0D8B}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vibrant_ogl", "vibrant\vibrant_ogl\vibrant_ogl.vcproj", "{E2180D54-5F75-47B7-8D77-00D04A6BEF69}"
ProjectSection(ProjectDependencies) = postProject
- {CF596340-202E-4E79-B041-F4310A422C20} = {CF596340-202E-4E79-B041-F4310A422C20}
+ {74B970B2-6C7F-4AEE-9031-27CC087D7214} = {74B970B2-6C7F-4AEE-9031-27CC087D7214}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xconntest", "connect\test\xconntest.vcproj", "{8D0BB3E1-BFB0-4557-9DD0-A2E82D3D9C70}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xconntest", "connect\test\xconntest.vcproj", "{A9561C14-6DAF-4A28-9F59-297D39432D0B}"
ProjectSection(ProjectDependencies) = postProject
- {CF596340-202E-4E79-B041-F4310A422C20} = {CF596340-202E-4E79-B041-F4310A422C20}
+ {74B970B2-6C7F-4AEE-9031-27CC087D7214} = {74B970B2-6C7F-4AEE-9031-27CC087D7214}
EndProjectSection
EndProject
Global
@@ -1257,2038 +1305,2102 @@ Global
ReleaseDLL|x64 = ReleaseDLL|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {27665816-D337-4E8D-AA41-AEB7CA3C7FF1}.Debug|Win32.ActiveCfg = Debug|Win32
- {27665816-D337-4E8D-AA41-AEB7CA3C7FF1}.Debug|Win32.Build.0 = Debug|Win32
- {27665816-D337-4E8D-AA41-AEB7CA3C7FF1}.Debug|x64.ActiveCfg = Debug|x64
- {27665816-D337-4E8D-AA41-AEB7CA3C7FF1}.Debug|x64.Build.0 = Debug|x64
- {27665816-D337-4E8D-AA41-AEB7CA3C7FF1}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {27665816-D337-4E8D-AA41-AEB7CA3C7FF1}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {27665816-D337-4E8D-AA41-AEB7CA3C7FF1}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {27665816-D337-4E8D-AA41-AEB7CA3C7FF1}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {27665816-D337-4E8D-AA41-AEB7CA3C7FF1}.Release|Win32.ActiveCfg = Release|Win32
- {27665816-D337-4E8D-AA41-AEB7CA3C7FF1}.Release|Win32.Build.0 = Release|Win32
- {27665816-D337-4E8D-AA41-AEB7CA3C7FF1}.Release|x64.ActiveCfg = Release|x64
- {27665816-D337-4E8D-AA41-AEB7CA3C7FF1}.Release|x64.Build.0 = Release|x64
- {27665816-D337-4E8D-AA41-AEB7CA3C7FF1}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {27665816-D337-4E8D-AA41-AEB7CA3C7FF1}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {27665816-D337-4E8D-AA41-AEB7CA3C7FF1}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {27665816-D337-4E8D-AA41-AEB7CA3C7FF1}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {D786BB9A-FC43-4C02-B1F8-A7F96B2B6D1C}.Debug|Win32.ActiveCfg = Debug|Win32
- {D786BB9A-FC43-4C02-B1F8-A7F96B2B6D1C}.Debug|Win32.Build.0 = Debug|Win32
- {D786BB9A-FC43-4C02-B1F8-A7F96B2B6D1C}.Debug|x64.ActiveCfg = Debug|x64
- {D786BB9A-FC43-4C02-B1F8-A7F96B2B6D1C}.Debug|x64.Build.0 = Debug|x64
- {D786BB9A-FC43-4C02-B1F8-A7F96B2B6D1C}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {D786BB9A-FC43-4C02-B1F8-A7F96B2B6D1C}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {D786BB9A-FC43-4C02-B1F8-A7F96B2B6D1C}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {D786BB9A-FC43-4C02-B1F8-A7F96B2B6D1C}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {D786BB9A-FC43-4C02-B1F8-A7F96B2B6D1C}.Release|Win32.ActiveCfg = Release|Win32
- {D786BB9A-FC43-4C02-B1F8-A7F96B2B6D1C}.Release|Win32.Build.0 = Release|Win32
- {D786BB9A-FC43-4C02-B1F8-A7F96B2B6D1C}.Release|x64.ActiveCfg = Release|x64
- {D786BB9A-FC43-4C02-B1F8-A7F96B2B6D1C}.Release|x64.Build.0 = Release|x64
- {D786BB9A-FC43-4C02-B1F8-A7F96B2B6D1C}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {D786BB9A-FC43-4C02-B1F8-A7F96B2B6D1C}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {D786BB9A-FC43-4C02-B1F8-A7F96B2B6D1C}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {D786BB9A-FC43-4C02-B1F8-A7F96B2B6D1C}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {4109D7F4-1D18-495F-B5C7-DFEA565DE9C6}.Debug|Win32.ActiveCfg = Debug|Win32
- {4109D7F4-1D18-495F-B5C7-DFEA565DE9C6}.Debug|Win32.Build.0 = Debug|Win32
- {4109D7F4-1D18-495F-B5C7-DFEA565DE9C6}.Debug|x64.ActiveCfg = Debug|x64
- {4109D7F4-1D18-495F-B5C7-DFEA565DE9C6}.Debug|x64.Build.0 = Debug|x64
- {4109D7F4-1D18-495F-B5C7-DFEA565DE9C6}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {4109D7F4-1D18-495F-B5C7-DFEA565DE9C6}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {4109D7F4-1D18-495F-B5C7-DFEA565DE9C6}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {4109D7F4-1D18-495F-B5C7-DFEA565DE9C6}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {4109D7F4-1D18-495F-B5C7-DFEA565DE9C6}.Release|Win32.ActiveCfg = Release|Win32
- {4109D7F4-1D18-495F-B5C7-DFEA565DE9C6}.Release|Win32.Build.0 = Release|Win32
- {4109D7F4-1D18-495F-B5C7-DFEA565DE9C6}.Release|x64.ActiveCfg = Release|x64
- {4109D7F4-1D18-495F-B5C7-DFEA565DE9C6}.Release|x64.Build.0 = Release|x64
- {4109D7F4-1D18-495F-B5C7-DFEA565DE9C6}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {4109D7F4-1D18-495F-B5C7-DFEA565DE9C6}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {4109D7F4-1D18-495F-B5C7-DFEA565DE9C6}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {4109D7F4-1D18-495F-B5C7-DFEA565DE9C6}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {FEA214E0-E333-43A5-BD15-E5902264A91A}.Debug|Win32.ActiveCfg = Debug|Win32
- {FEA214E0-E333-43A5-BD15-E5902264A91A}.Debug|Win32.Build.0 = Debug|Win32
- {FEA214E0-E333-43A5-BD15-E5902264A91A}.Debug|x64.ActiveCfg = Debug|x64
- {FEA214E0-E333-43A5-BD15-E5902264A91A}.Debug|x64.Build.0 = Debug|x64
- {FEA214E0-E333-43A5-BD15-E5902264A91A}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {FEA214E0-E333-43A5-BD15-E5902264A91A}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {FEA214E0-E333-43A5-BD15-E5902264A91A}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {FEA214E0-E333-43A5-BD15-E5902264A91A}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {FEA214E0-E333-43A5-BD15-E5902264A91A}.Release|Win32.ActiveCfg = Release|Win32
- {FEA214E0-E333-43A5-BD15-E5902264A91A}.Release|Win32.Build.0 = Release|Win32
- {FEA214E0-E333-43A5-BD15-E5902264A91A}.Release|x64.ActiveCfg = Release|x64
- {FEA214E0-E333-43A5-BD15-E5902264A91A}.Release|x64.Build.0 = Release|x64
- {FEA214E0-E333-43A5-BD15-E5902264A91A}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {FEA214E0-E333-43A5-BD15-E5902264A91A}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {FEA214E0-E333-43A5-BD15-E5902264A91A}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {FEA214E0-E333-43A5-BD15-E5902264A91A}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {0204EA88-C175-4970-922F-6F2C4FDA52EE}.Debug|Win32.ActiveCfg = Debug|Win32
- {0204EA88-C175-4970-922F-6F2C4FDA52EE}.Debug|Win32.Build.0 = Debug|Win32
- {0204EA88-C175-4970-922F-6F2C4FDA52EE}.Debug|x64.ActiveCfg = Debug|x64
- {0204EA88-C175-4970-922F-6F2C4FDA52EE}.Debug|x64.Build.0 = Debug|x64
- {0204EA88-C175-4970-922F-6F2C4FDA52EE}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {0204EA88-C175-4970-922F-6F2C4FDA52EE}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {0204EA88-C175-4970-922F-6F2C4FDA52EE}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {0204EA88-C175-4970-922F-6F2C4FDA52EE}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {0204EA88-C175-4970-922F-6F2C4FDA52EE}.Release|Win32.ActiveCfg = Release|Win32
- {0204EA88-C175-4970-922F-6F2C4FDA52EE}.Release|Win32.Build.0 = Release|Win32
- {0204EA88-C175-4970-922F-6F2C4FDA52EE}.Release|x64.ActiveCfg = Release|x64
- {0204EA88-C175-4970-922F-6F2C4FDA52EE}.Release|x64.Build.0 = Release|x64
- {0204EA88-C175-4970-922F-6F2C4FDA52EE}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {0204EA88-C175-4970-922F-6F2C4FDA52EE}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {0204EA88-C175-4970-922F-6F2C4FDA52EE}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {0204EA88-C175-4970-922F-6F2C4FDA52EE}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {04452BB8-39AC-4DC3-8C42-58384D285FED}.Debug|Win32.ActiveCfg = Debug|Win32
- {04452BB8-39AC-4DC3-8C42-58384D285FED}.Debug|Win32.Build.0 = Debug|Win32
- {04452BB8-39AC-4DC3-8C42-58384D285FED}.Debug|x64.ActiveCfg = Debug|x64
- {04452BB8-39AC-4DC3-8C42-58384D285FED}.Debug|x64.Build.0 = Debug|x64
- {04452BB8-39AC-4DC3-8C42-58384D285FED}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {04452BB8-39AC-4DC3-8C42-58384D285FED}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {04452BB8-39AC-4DC3-8C42-58384D285FED}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {04452BB8-39AC-4DC3-8C42-58384D285FED}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {04452BB8-39AC-4DC3-8C42-58384D285FED}.Release|Win32.ActiveCfg = Release|Win32
- {04452BB8-39AC-4DC3-8C42-58384D285FED}.Release|Win32.Build.0 = Release|Win32
- {04452BB8-39AC-4DC3-8C42-58384D285FED}.Release|x64.ActiveCfg = Release|x64
- {04452BB8-39AC-4DC3-8C42-58384D285FED}.Release|x64.Build.0 = Release|x64
- {04452BB8-39AC-4DC3-8C42-58384D285FED}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {04452BB8-39AC-4DC3-8C42-58384D285FED}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {04452BB8-39AC-4DC3-8C42-58384D285FED}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {04452BB8-39AC-4DC3-8C42-58384D285FED}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {CD41CEB1-4E2C-494B-86E8-E29AF398D7ED}.Debug|Win32.ActiveCfg = Debug|Win32
- {CD41CEB1-4E2C-494B-86E8-E29AF398D7ED}.Debug|Win32.Build.0 = Debug|Win32
- {CD41CEB1-4E2C-494B-86E8-E29AF398D7ED}.Debug|x64.ActiveCfg = Debug|x64
- {CD41CEB1-4E2C-494B-86E8-E29AF398D7ED}.Debug|x64.Build.0 = Debug|x64
- {CD41CEB1-4E2C-494B-86E8-E29AF398D7ED}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {CD41CEB1-4E2C-494B-86E8-E29AF398D7ED}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {CD41CEB1-4E2C-494B-86E8-E29AF398D7ED}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {CD41CEB1-4E2C-494B-86E8-E29AF398D7ED}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {CD41CEB1-4E2C-494B-86E8-E29AF398D7ED}.Release|Win32.ActiveCfg = Release|Win32
- {CD41CEB1-4E2C-494B-86E8-E29AF398D7ED}.Release|Win32.Build.0 = Release|Win32
- {CD41CEB1-4E2C-494B-86E8-E29AF398D7ED}.Release|x64.ActiveCfg = Release|x64
- {CD41CEB1-4E2C-494B-86E8-E29AF398D7ED}.Release|x64.Build.0 = Release|x64
- {CD41CEB1-4E2C-494B-86E8-E29AF398D7ED}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {CD41CEB1-4E2C-494B-86E8-E29AF398D7ED}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {CD41CEB1-4E2C-494B-86E8-E29AF398D7ED}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {CD41CEB1-4E2C-494B-86E8-E29AF398D7ED}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {96FC3702-E2ED-434F-BBA5-3DE1366FFA1F}.Debug|Win32.ActiveCfg = Debug|Win32
- {96FC3702-E2ED-434F-BBA5-3DE1366FFA1F}.Debug|Win32.Build.0 = Debug|Win32
- {96FC3702-E2ED-434F-BBA5-3DE1366FFA1F}.Debug|x64.ActiveCfg = Debug|x64
- {96FC3702-E2ED-434F-BBA5-3DE1366FFA1F}.Debug|x64.Build.0 = Debug|x64
- {96FC3702-E2ED-434F-BBA5-3DE1366FFA1F}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {96FC3702-E2ED-434F-BBA5-3DE1366FFA1F}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {96FC3702-E2ED-434F-BBA5-3DE1366FFA1F}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {96FC3702-E2ED-434F-BBA5-3DE1366FFA1F}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {96FC3702-E2ED-434F-BBA5-3DE1366FFA1F}.Release|Win32.ActiveCfg = Release|Win32
- {96FC3702-E2ED-434F-BBA5-3DE1366FFA1F}.Release|Win32.Build.0 = Release|Win32
- {96FC3702-E2ED-434F-BBA5-3DE1366FFA1F}.Release|x64.ActiveCfg = Release|x64
- {96FC3702-E2ED-434F-BBA5-3DE1366FFA1F}.Release|x64.Build.0 = Release|x64
- {96FC3702-E2ED-434F-BBA5-3DE1366FFA1F}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {96FC3702-E2ED-434F-BBA5-3DE1366FFA1F}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {96FC3702-E2ED-434F-BBA5-3DE1366FFA1F}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {96FC3702-E2ED-434F-BBA5-3DE1366FFA1F}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {F7164C61-0D7C-4EC8-9209-88A760907B6B}.Debug|Win32.ActiveCfg = Debug|Win32
- {F7164C61-0D7C-4EC8-9209-88A760907B6B}.Debug|Win32.Build.0 = Debug|Win32
- {F7164C61-0D7C-4EC8-9209-88A760907B6B}.Debug|x64.ActiveCfg = Debug|x64
- {F7164C61-0D7C-4EC8-9209-88A760907B6B}.Debug|x64.Build.0 = Debug|x64
- {F7164C61-0D7C-4EC8-9209-88A760907B6B}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {F7164C61-0D7C-4EC8-9209-88A760907B6B}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {F7164C61-0D7C-4EC8-9209-88A760907B6B}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {F7164C61-0D7C-4EC8-9209-88A760907B6B}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {F7164C61-0D7C-4EC8-9209-88A760907B6B}.Release|Win32.ActiveCfg = Release|Win32
- {F7164C61-0D7C-4EC8-9209-88A760907B6B}.Release|Win32.Build.0 = Release|Win32
- {F7164C61-0D7C-4EC8-9209-88A760907B6B}.Release|x64.ActiveCfg = Release|x64
- {F7164C61-0D7C-4EC8-9209-88A760907B6B}.Release|x64.Build.0 = Release|x64
- {F7164C61-0D7C-4EC8-9209-88A760907B6B}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {F7164C61-0D7C-4EC8-9209-88A760907B6B}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {F7164C61-0D7C-4EC8-9209-88A760907B6B}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {F7164C61-0D7C-4EC8-9209-88A760907B6B}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {3D2820CB-F5E6-4807-864C-2C751ADC556D}.Debug|Win32.ActiveCfg = Debug|Win32
- {3D2820CB-F5E6-4807-864C-2C751ADC556D}.Debug|Win32.Build.0 = Debug|Win32
- {3D2820CB-F5E6-4807-864C-2C751ADC556D}.Debug|x64.ActiveCfg = Debug|x64
- {3D2820CB-F5E6-4807-864C-2C751ADC556D}.Debug|x64.Build.0 = Debug|x64
- {3D2820CB-F5E6-4807-864C-2C751ADC556D}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {3D2820CB-F5E6-4807-864C-2C751ADC556D}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {3D2820CB-F5E6-4807-864C-2C751ADC556D}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {3D2820CB-F5E6-4807-864C-2C751ADC556D}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {3D2820CB-F5E6-4807-864C-2C751ADC556D}.Release|Win32.ActiveCfg = Release|Win32
- {3D2820CB-F5E6-4807-864C-2C751ADC556D}.Release|Win32.Build.0 = Release|Win32
- {3D2820CB-F5E6-4807-864C-2C751ADC556D}.Release|x64.ActiveCfg = Release|x64
- {3D2820CB-F5E6-4807-864C-2C751ADC556D}.Release|x64.Build.0 = Release|x64
- {3D2820CB-F5E6-4807-864C-2C751ADC556D}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {3D2820CB-F5E6-4807-864C-2C751ADC556D}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {3D2820CB-F5E6-4807-864C-2C751ADC556D}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {3D2820CB-F5E6-4807-864C-2C751ADC556D}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {C817F26E-4541-45D0-A6DA-59E58DB9DB7E}.Debug|Win32.ActiveCfg = Debug|Win32
- {C817F26E-4541-45D0-A6DA-59E58DB9DB7E}.Debug|Win32.Build.0 = Debug|Win32
- {C817F26E-4541-45D0-A6DA-59E58DB9DB7E}.Debug|x64.ActiveCfg = Debug|x64
- {C817F26E-4541-45D0-A6DA-59E58DB9DB7E}.Debug|x64.Build.0 = Debug|x64
- {C817F26E-4541-45D0-A6DA-59E58DB9DB7E}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {C817F26E-4541-45D0-A6DA-59E58DB9DB7E}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {C817F26E-4541-45D0-A6DA-59E58DB9DB7E}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {C817F26E-4541-45D0-A6DA-59E58DB9DB7E}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {C817F26E-4541-45D0-A6DA-59E58DB9DB7E}.Release|Win32.ActiveCfg = Release|Win32
- {C817F26E-4541-45D0-A6DA-59E58DB9DB7E}.Release|Win32.Build.0 = Release|Win32
- {C817F26E-4541-45D0-A6DA-59E58DB9DB7E}.Release|x64.ActiveCfg = Release|x64
- {C817F26E-4541-45D0-A6DA-59E58DB9DB7E}.Release|x64.Build.0 = Release|x64
- {C817F26E-4541-45D0-A6DA-59E58DB9DB7E}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {C817F26E-4541-45D0-A6DA-59E58DB9DB7E}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {C817F26E-4541-45D0-A6DA-59E58DB9DB7E}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {C817F26E-4541-45D0-A6DA-59E58DB9DB7E}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {D3D92BB5-1C47-4797-8486-4441926F2A54}.Debug|Win32.ActiveCfg = Debug|Win32
- {D3D92BB5-1C47-4797-8486-4441926F2A54}.Debug|Win32.Build.0 = Debug|Win32
- {D3D92BB5-1C47-4797-8486-4441926F2A54}.Debug|x64.ActiveCfg = Debug|x64
- {D3D92BB5-1C47-4797-8486-4441926F2A54}.Debug|x64.Build.0 = Debug|x64
- {D3D92BB5-1C47-4797-8486-4441926F2A54}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {D3D92BB5-1C47-4797-8486-4441926F2A54}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {D3D92BB5-1C47-4797-8486-4441926F2A54}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {D3D92BB5-1C47-4797-8486-4441926F2A54}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {D3D92BB5-1C47-4797-8486-4441926F2A54}.Release|Win32.ActiveCfg = Release|Win32
- {D3D92BB5-1C47-4797-8486-4441926F2A54}.Release|Win32.Build.0 = Release|Win32
- {D3D92BB5-1C47-4797-8486-4441926F2A54}.Release|x64.ActiveCfg = Release|x64
- {D3D92BB5-1C47-4797-8486-4441926F2A54}.Release|x64.Build.0 = Release|x64
- {D3D92BB5-1C47-4797-8486-4441926F2A54}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {D3D92BB5-1C47-4797-8486-4441926F2A54}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {D3D92BB5-1C47-4797-8486-4441926F2A54}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {D3D92BB5-1C47-4797-8486-4441926F2A54}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {2675C4D0-0894-426B-B291-2807B4B79D3F}.Debug|Win32.ActiveCfg = Debug|Win32
- {2675C4D0-0894-426B-B291-2807B4B79D3F}.Debug|Win32.Build.0 = Debug|Win32
- {2675C4D0-0894-426B-B291-2807B4B79D3F}.Debug|x64.ActiveCfg = Debug|x64
- {2675C4D0-0894-426B-B291-2807B4B79D3F}.Debug|x64.Build.0 = Debug|x64
- {2675C4D0-0894-426B-B291-2807B4B79D3F}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {2675C4D0-0894-426B-B291-2807B4B79D3F}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {2675C4D0-0894-426B-B291-2807B4B79D3F}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {2675C4D0-0894-426B-B291-2807B4B79D3F}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {2675C4D0-0894-426B-B291-2807B4B79D3F}.Release|Win32.ActiveCfg = Release|Win32
- {2675C4D0-0894-426B-B291-2807B4B79D3F}.Release|Win32.Build.0 = Release|Win32
- {2675C4D0-0894-426B-B291-2807B4B79D3F}.Release|x64.ActiveCfg = Release|x64
- {2675C4D0-0894-426B-B291-2807B4B79D3F}.Release|x64.Build.0 = Release|x64
- {2675C4D0-0894-426B-B291-2807B4B79D3F}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {2675C4D0-0894-426B-B291-2807B4B79D3F}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {2675C4D0-0894-426B-B291-2807B4B79D3F}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {2675C4D0-0894-426B-B291-2807B4B79D3F}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {9CC7403B-4370-4C93-9155-697EA11A8810}.Debug|Win32.ActiveCfg = Debug|Win32
- {9CC7403B-4370-4C93-9155-697EA11A8810}.Debug|Win32.Build.0 = Debug|Win32
- {9CC7403B-4370-4C93-9155-697EA11A8810}.Debug|x64.ActiveCfg = Debug|x64
- {9CC7403B-4370-4C93-9155-697EA11A8810}.Debug|x64.Build.0 = Debug|x64
- {9CC7403B-4370-4C93-9155-697EA11A8810}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {9CC7403B-4370-4C93-9155-697EA11A8810}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {9CC7403B-4370-4C93-9155-697EA11A8810}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {9CC7403B-4370-4C93-9155-697EA11A8810}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {9CC7403B-4370-4C93-9155-697EA11A8810}.Release|Win32.ActiveCfg = Release|Win32
- {9CC7403B-4370-4C93-9155-697EA11A8810}.Release|Win32.Build.0 = Release|Win32
- {9CC7403B-4370-4C93-9155-697EA11A8810}.Release|x64.ActiveCfg = Release|x64
- {9CC7403B-4370-4C93-9155-697EA11A8810}.Release|x64.Build.0 = Release|x64
- {9CC7403B-4370-4C93-9155-697EA11A8810}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {9CC7403B-4370-4C93-9155-697EA11A8810}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {9CC7403B-4370-4C93-9155-697EA11A8810}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {9CC7403B-4370-4C93-9155-697EA11A8810}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {06636583-FBC6-4274-9BD8-B5956A23B5C8}.Debug|Win32.ActiveCfg = Debug|Win32
- {06636583-FBC6-4274-9BD8-B5956A23B5C8}.Debug|Win32.Build.0 = Debug|Win32
- {06636583-FBC6-4274-9BD8-B5956A23B5C8}.Debug|x64.ActiveCfg = Debug|x64
- {06636583-FBC6-4274-9BD8-B5956A23B5C8}.Debug|x64.Build.0 = Debug|x64
- {06636583-FBC6-4274-9BD8-B5956A23B5C8}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {06636583-FBC6-4274-9BD8-B5956A23B5C8}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {06636583-FBC6-4274-9BD8-B5956A23B5C8}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {06636583-FBC6-4274-9BD8-B5956A23B5C8}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {06636583-FBC6-4274-9BD8-B5956A23B5C8}.Release|Win32.ActiveCfg = Release|Win32
- {06636583-FBC6-4274-9BD8-B5956A23B5C8}.Release|Win32.Build.0 = Release|Win32
- {06636583-FBC6-4274-9BD8-B5956A23B5C8}.Release|x64.ActiveCfg = Release|x64
- {06636583-FBC6-4274-9BD8-B5956A23B5C8}.Release|x64.Build.0 = Release|x64
- {06636583-FBC6-4274-9BD8-B5956A23B5C8}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {06636583-FBC6-4274-9BD8-B5956A23B5C8}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {06636583-FBC6-4274-9BD8-B5956A23B5C8}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {06636583-FBC6-4274-9BD8-B5956A23B5C8}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {CBF870AB-2EE6-4F12-9F0E-0D8CB207751D}.Debug|Win32.ActiveCfg = Debug|Win32
- {CBF870AB-2EE6-4F12-9F0E-0D8CB207751D}.Debug|Win32.Build.0 = Debug|Win32
- {CBF870AB-2EE6-4F12-9F0E-0D8CB207751D}.Debug|x64.ActiveCfg = Debug|x64
- {CBF870AB-2EE6-4F12-9F0E-0D8CB207751D}.Debug|x64.Build.0 = Debug|x64
- {CBF870AB-2EE6-4F12-9F0E-0D8CB207751D}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {CBF870AB-2EE6-4F12-9F0E-0D8CB207751D}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {CBF870AB-2EE6-4F12-9F0E-0D8CB207751D}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {CBF870AB-2EE6-4F12-9F0E-0D8CB207751D}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {CBF870AB-2EE6-4F12-9F0E-0D8CB207751D}.Release|Win32.ActiveCfg = Release|Win32
- {CBF870AB-2EE6-4F12-9F0E-0D8CB207751D}.Release|Win32.Build.0 = Release|Win32
- {CBF870AB-2EE6-4F12-9F0E-0D8CB207751D}.Release|x64.ActiveCfg = Release|x64
- {CBF870AB-2EE6-4F12-9F0E-0D8CB207751D}.Release|x64.Build.0 = Release|x64
- {CBF870AB-2EE6-4F12-9F0E-0D8CB207751D}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {CBF870AB-2EE6-4F12-9F0E-0D8CB207751D}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {CBF870AB-2EE6-4F12-9F0E-0D8CB207751D}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {CBF870AB-2EE6-4F12-9F0E-0D8CB207751D}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {E95696E6-C316-4957-853A-547A1088D338}.Debug|Win32.ActiveCfg = Debug|Win32
- {E95696E6-C316-4957-853A-547A1088D338}.Debug|Win32.Build.0 = Debug|Win32
- {E95696E6-C316-4957-853A-547A1088D338}.Debug|x64.ActiveCfg = Debug|x64
- {E95696E6-C316-4957-853A-547A1088D338}.Debug|x64.Build.0 = Debug|x64
- {E95696E6-C316-4957-853A-547A1088D338}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {E95696E6-C316-4957-853A-547A1088D338}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {E95696E6-C316-4957-853A-547A1088D338}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {E95696E6-C316-4957-853A-547A1088D338}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {E95696E6-C316-4957-853A-547A1088D338}.Release|Win32.ActiveCfg = Release|Win32
- {E95696E6-C316-4957-853A-547A1088D338}.Release|Win32.Build.0 = Release|Win32
- {E95696E6-C316-4957-853A-547A1088D338}.Release|x64.ActiveCfg = Release|x64
- {E95696E6-C316-4957-853A-547A1088D338}.Release|x64.Build.0 = Release|x64
- {E95696E6-C316-4957-853A-547A1088D338}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {E95696E6-C316-4957-853A-547A1088D338}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {E95696E6-C316-4957-853A-547A1088D338}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {E95696E6-C316-4957-853A-547A1088D338}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {6E9207DA-5998-4B79-8850-D019EEA4251D}.Debug|Win32.ActiveCfg = Debug|Win32
- {6E9207DA-5998-4B79-8850-D019EEA4251D}.Debug|Win32.Build.0 = Debug|Win32
- {6E9207DA-5998-4B79-8850-D019EEA4251D}.Debug|x64.ActiveCfg = Debug|x64
- {6E9207DA-5998-4B79-8850-D019EEA4251D}.Debug|x64.Build.0 = Debug|x64
- {6E9207DA-5998-4B79-8850-D019EEA4251D}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {6E9207DA-5998-4B79-8850-D019EEA4251D}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {6E9207DA-5998-4B79-8850-D019EEA4251D}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {6E9207DA-5998-4B79-8850-D019EEA4251D}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {6E9207DA-5998-4B79-8850-D019EEA4251D}.Release|Win32.ActiveCfg = Release|Win32
- {6E9207DA-5998-4B79-8850-D019EEA4251D}.Release|Win32.Build.0 = Release|Win32
- {6E9207DA-5998-4B79-8850-D019EEA4251D}.Release|x64.ActiveCfg = Release|x64
- {6E9207DA-5998-4B79-8850-D019EEA4251D}.Release|x64.Build.0 = Release|x64
- {6E9207DA-5998-4B79-8850-D019EEA4251D}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {6E9207DA-5998-4B79-8850-D019EEA4251D}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {6E9207DA-5998-4B79-8850-D019EEA4251D}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {6E9207DA-5998-4B79-8850-D019EEA4251D}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {D1B78D4D-E0B1-4430-AA1A-20E870FBC038}.Debug|Win32.ActiveCfg = Debug|Win32
- {D1B78D4D-E0B1-4430-AA1A-20E870FBC038}.Debug|Win32.Build.0 = Debug|Win32
- {D1B78D4D-E0B1-4430-AA1A-20E870FBC038}.Debug|x64.ActiveCfg = Debug|x64
- {D1B78D4D-E0B1-4430-AA1A-20E870FBC038}.Debug|x64.Build.0 = Debug|x64
- {D1B78D4D-E0B1-4430-AA1A-20E870FBC038}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {D1B78D4D-E0B1-4430-AA1A-20E870FBC038}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {D1B78D4D-E0B1-4430-AA1A-20E870FBC038}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {D1B78D4D-E0B1-4430-AA1A-20E870FBC038}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {D1B78D4D-E0B1-4430-AA1A-20E870FBC038}.Release|Win32.ActiveCfg = Release|Win32
- {D1B78D4D-E0B1-4430-AA1A-20E870FBC038}.Release|Win32.Build.0 = Release|Win32
- {D1B78D4D-E0B1-4430-AA1A-20E870FBC038}.Release|x64.ActiveCfg = Release|x64
- {D1B78D4D-E0B1-4430-AA1A-20E870FBC038}.Release|x64.Build.0 = Release|x64
- {D1B78D4D-E0B1-4430-AA1A-20E870FBC038}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {D1B78D4D-E0B1-4430-AA1A-20E870FBC038}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {D1B78D4D-E0B1-4430-AA1A-20E870FBC038}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {D1B78D4D-E0B1-4430-AA1A-20E870FBC038}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {049092E8-80F0-40F6-81F1-0AF99640134D}.Debug|Win32.ActiveCfg = Debug|Win32
- {049092E8-80F0-40F6-81F1-0AF99640134D}.Debug|Win32.Build.0 = Debug|Win32
- {049092E8-80F0-40F6-81F1-0AF99640134D}.Debug|x64.ActiveCfg = Debug|x64
- {049092E8-80F0-40F6-81F1-0AF99640134D}.Debug|x64.Build.0 = Debug|x64
- {049092E8-80F0-40F6-81F1-0AF99640134D}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {049092E8-80F0-40F6-81F1-0AF99640134D}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {049092E8-80F0-40F6-81F1-0AF99640134D}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {049092E8-80F0-40F6-81F1-0AF99640134D}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {049092E8-80F0-40F6-81F1-0AF99640134D}.Release|Win32.ActiveCfg = Release|Win32
- {049092E8-80F0-40F6-81F1-0AF99640134D}.Release|Win32.Build.0 = Release|Win32
- {049092E8-80F0-40F6-81F1-0AF99640134D}.Release|x64.ActiveCfg = Release|x64
- {049092E8-80F0-40F6-81F1-0AF99640134D}.Release|x64.Build.0 = Release|x64
- {049092E8-80F0-40F6-81F1-0AF99640134D}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {049092E8-80F0-40F6-81F1-0AF99640134D}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {049092E8-80F0-40F6-81F1-0AF99640134D}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {049092E8-80F0-40F6-81F1-0AF99640134D}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {D13243FE-FD39-476C-BAB7-14C583B3BC9E}.Debug|Win32.ActiveCfg = Debug|Win32
- {D13243FE-FD39-476C-BAB7-14C583B3BC9E}.Debug|Win32.Build.0 = Debug|Win32
- {D13243FE-FD39-476C-BAB7-14C583B3BC9E}.Debug|x64.ActiveCfg = Debug|x64
- {D13243FE-FD39-476C-BAB7-14C583B3BC9E}.Debug|x64.Build.0 = Debug|x64
- {D13243FE-FD39-476C-BAB7-14C583B3BC9E}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {D13243FE-FD39-476C-BAB7-14C583B3BC9E}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {D13243FE-FD39-476C-BAB7-14C583B3BC9E}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {D13243FE-FD39-476C-BAB7-14C583B3BC9E}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {D13243FE-FD39-476C-BAB7-14C583B3BC9E}.Release|Win32.ActiveCfg = Release|Win32
- {D13243FE-FD39-476C-BAB7-14C583B3BC9E}.Release|Win32.Build.0 = Release|Win32
- {D13243FE-FD39-476C-BAB7-14C583B3BC9E}.Release|x64.ActiveCfg = Release|x64
- {D13243FE-FD39-476C-BAB7-14C583B3BC9E}.Release|x64.Build.0 = Release|x64
- {D13243FE-FD39-476C-BAB7-14C583B3BC9E}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {D13243FE-FD39-476C-BAB7-14C583B3BC9E}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {D13243FE-FD39-476C-BAB7-14C583B3BC9E}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {D13243FE-FD39-476C-BAB7-14C583B3BC9E}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {E778C1FD-C2F7-47A9-A453-259F6F520B4A}.Debug|Win32.ActiveCfg = Debug|Win32
- {E778C1FD-C2F7-47A9-A453-259F6F520B4A}.Debug|Win32.Build.0 = Debug|Win32
- {E778C1FD-C2F7-47A9-A453-259F6F520B4A}.Debug|x64.ActiveCfg = Debug|x64
- {E778C1FD-C2F7-47A9-A453-259F6F520B4A}.Debug|x64.Build.0 = Debug|x64
- {E778C1FD-C2F7-47A9-A453-259F6F520B4A}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {E778C1FD-C2F7-47A9-A453-259F6F520B4A}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {E778C1FD-C2F7-47A9-A453-259F6F520B4A}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {E778C1FD-C2F7-47A9-A453-259F6F520B4A}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {E778C1FD-C2F7-47A9-A453-259F6F520B4A}.Release|Win32.ActiveCfg = Release|Win32
- {E778C1FD-C2F7-47A9-A453-259F6F520B4A}.Release|Win32.Build.0 = Release|Win32
- {E778C1FD-C2F7-47A9-A453-259F6F520B4A}.Release|x64.ActiveCfg = Release|x64
- {E778C1FD-C2F7-47A9-A453-259F6F520B4A}.Release|x64.Build.0 = Release|x64
- {E778C1FD-C2F7-47A9-A453-259F6F520B4A}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {E778C1FD-C2F7-47A9-A453-259F6F520B4A}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {E778C1FD-C2F7-47A9-A453-259F6F520B4A}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {E778C1FD-C2F7-47A9-A453-259F6F520B4A}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {F832691F-2EF5-4937-BBB4-626EE814A383}.Debug|Win32.ActiveCfg = Debug|Win32
- {F832691F-2EF5-4937-BBB4-626EE814A383}.Debug|Win32.Build.0 = Debug|Win32
- {F832691F-2EF5-4937-BBB4-626EE814A383}.Debug|x64.ActiveCfg = Debug|x64
- {F832691F-2EF5-4937-BBB4-626EE814A383}.Debug|x64.Build.0 = Debug|x64
- {F832691F-2EF5-4937-BBB4-626EE814A383}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {F832691F-2EF5-4937-BBB4-626EE814A383}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {F832691F-2EF5-4937-BBB4-626EE814A383}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {F832691F-2EF5-4937-BBB4-626EE814A383}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {F832691F-2EF5-4937-BBB4-626EE814A383}.Release|Win32.ActiveCfg = Release|Win32
- {F832691F-2EF5-4937-BBB4-626EE814A383}.Release|Win32.Build.0 = Release|Win32
- {F832691F-2EF5-4937-BBB4-626EE814A383}.Release|x64.ActiveCfg = Release|x64
- {F832691F-2EF5-4937-BBB4-626EE814A383}.Release|x64.Build.0 = Release|x64
- {F832691F-2EF5-4937-BBB4-626EE814A383}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {F832691F-2EF5-4937-BBB4-626EE814A383}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {F832691F-2EF5-4937-BBB4-626EE814A383}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {F832691F-2EF5-4937-BBB4-626EE814A383}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {3039EEDE-B503-4E9D-AAEF-79EF07DF3A9B}.Debug|Win32.ActiveCfg = Debug|Win32
- {3039EEDE-B503-4E9D-AAEF-79EF07DF3A9B}.Debug|Win32.Build.0 = Debug|Win32
- {3039EEDE-B503-4E9D-AAEF-79EF07DF3A9B}.Debug|x64.ActiveCfg = Debug|x64
- {3039EEDE-B503-4E9D-AAEF-79EF07DF3A9B}.Debug|x64.Build.0 = Debug|x64
- {3039EEDE-B503-4E9D-AAEF-79EF07DF3A9B}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {3039EEDE-B503-4E9D-AAEF-79EF07DF3A9B}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {3039EEDE-B503-4E9D-AAEF-79EF07DF3A9B}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {3039EEDE-B503-4E9D-AAEF-79EF07DF3A9B}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {3039EEDE-B503-4E9D-AAEF-79EF07DF3A9B}.Release|Win32.ActiveCfg = Release|Win32
- {3039EEDE-B503-4E9D-AAEF-79EF07DF3A9B}.Release|Win32.Build.0 = Release|Win32
- {3039EEDE-B503-4E9D-AAEF-79EF07DF3A9B}.Release|x64.ActiveCfg = Release|x64
- {3039EEDE-B503-4E9D-AAEF-79EF07DF3A9B}.Release|x64.Build.0 = Release|x64
- {3039EEDE-B503-4E9D-AAEF-79EF07DF3A9B}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {3039EEDE-B503-4E9D-AAEF-79EF07DF3A9B}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {3039EEDE-B503-4E9D-AAEF-79EF07DF3A9B}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {3039EEDE-B503-4E9D-AAEF-79EF07DF3A9B}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {1C14632F-22E1-40D3-B0C8-1E53C72ED92F}.Debug|Win32.ActiveCfg = Debug|Win32
- {1C14632F-22E1-40D3-B0C8-1E53C72ED92F}.Debug|Win32.Build.0 = Debug|Win32
- {1C14632F-22E1-40D3-B0C8-1E53C72ED92F}.Debug|x64.ActiveCfg = Debug|x64
- {1C14632F-22E1-40D3-B0C8-1E53C72ED92F}.Debug|x64.Build.0 = Debug|x64
- {1C14632F-22E1-40D3-B0C8-1E53C72ED92F}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {1C14632F-22E1-40D3-B0C8-1E53C72ED92F}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {1C14632F-22E1-40D3-B0C8-1E53C72ED92F}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {1C14632F-22E1-40D3-B0C8-1E53C72ED92F}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {1C14632F-22E1-40D3-B0C8-1E53C72ED92F}.Release|Win32.ActiveCfg = Release|Win32
- {1C14632F-22E1-40D3-B0C8-1E53C72ED92F}.Release|Win32.Build.0 = Release|Win32
- {1C14632F-22E1-40D3-B0C8-1E53C72ED92F}.Release|x64.ActiveCfg = Release|x64
- {1C14632F-22E1-40D3-B0C8-1E53C72ED92F}.Release|x64.Build.0 = Release|x64
- {1C14632F-22E1-40D3-B0C8-1E53C72ED92F}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {1C14632F-22E1-40D3-B0C8-1E53C72ED92F}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {1C14632F-22E1-40D3-B0C8-1E53C72ED92F}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {1C14632F-22E1-40D3-B0C8-1E53C72ED92F}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {AA8B7736-A934-41FD-A1F2-92FA47FE518E}.Debug|Win32.ActiveCfg = Debug|Win32
- {AA8B7736-A934-41FD-A1F2-92FA47FE518E}.Debug|Win32.Build.0 = Debug|Win32
- {AA8B7736-A934-41FD-A1F2-92FA47FE518E}.Debug|x64.ActiveCfg = Debug|x64
- {AA8B7736-A934-41FD-A1F2-92FA47FE518E}.Debug|x64.Build.0 = Debug|x64
- {AA8B7736-A934-41FD-A1F2-92FA47FE518E}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {AA8B7736-A934-41FD-A1F2-92FA47FE518E}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {AA8B7736-A934-41FD-A1F2-92FA47FE518E}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {AA8B7736-A934-41FD-A1F2-92FA47FE518E}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {AA8B7736-A934-41FD-A1F2-92FA47FE518E}.Release|Win32.ActiveCfg = Release|Win32
- {AA8B7736-A934-41FD-A1F2-92FA47FE518E}.Release|Win32.Build.0 = Release|Win32
- {AA8B7736-A934-41FD-A1F2-92FA47FE518E}.Release|x64.ActiveCfg = Release|x64
- {AA8B7736-A934-41FD-A1F2-92FA47FE518E}.Release|x64.Build.0 = Release|x64
- {AA8B7736-A934-41FD-A1F2-92FA47FE518E}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {AA8B7736-A934-41FD-A1F2-92FA47FE518E}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {AA8B7736-A934-41FD-A1F2-92FA47FE518E}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {AA8B7736-A934-41FD-A1F2-92FA47FE518E}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {1E7F80A2-A2F7-43C5-A5CD-D9A745A2D9BC}.Debug|Win32.ActiveCfg = Debug|Win32
- {1E7F80A2-A2F7-43C5-A5CD-D9A745A2D9BC}.Debug|Win32.Build.0 = Debug|Win32
- {1E7F80A2-A2F7-43C5-A5CD-D9A745A2D9BC}.Debug|x64.ActiveCfg = Debug|x64
- {1E7F80A2-A2F7-43C5-A5CD-D9A745A2D9BC}.Debug|x64.Build.0 = Debug|x64
- {1E7F80A2-A2F7-43C5-A5CD-D9A745A2D9BC}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {1E7F80A2-A2F7-43C5-A5CD-D9A745A2D9BC}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {1E7F80A2-A2F7-43C5-A5CD-D9A745A2D9BC}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {1E7F80A2-A2F7-43C5-A5CD-D9A745A2D9BC}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {1E7F80A2-A2F7-43C5-A5CD-D9A745A2D9BC}.Release|Win32.ActiveCfg = Release|Win32
- {1E7F80A2-A2F7-43C5-A5CD-D9A745A2D9BC}.Release|Win32.Build.0 = Release|Win32
- {1E7F80A2-A2F7-43C5-A5CD-D9A745A2D9BC}.Release|x64.ActiveCfg = Release|x64
- {1E7F80A2-A2F7-43C5-A5CD-D9A745A2D9BC}.Release|x64.Build.0 = Release|x64
- {1E7F80A2-A2F7-43C5-A5CD-D9A745A2D9BC}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {1E7F80A2-A2F7-43C5-A5CD-D9A745A2D9BC}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {1E7F80A2-A2F7-43C5-A5CD-D9A745A2D9BC}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {1E7F80A2-A2F7-43C5-A5CD-D9A745A2D9BC}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {4C2CCC7D-3D19-4E13-9317-3927894F0F3B}.Debug|Win32.ActiveCfg = Debug|Win32
- {4C2CCC7D-3D19-4E13-9317-3927894F0F3B}.Debug|Win32.Build.0 = Debug|Win32
- {4C2CCC7D-3D19-4E13-9317-3927894F0F3B}.Debug|x64.ActiveCfg = Debug|x64
- {4C2CCC7D-3D19-4E13-9317-3927894F0F3B}.Debug|x64.Build.0 = Debug|x64
- {4C2CCC7D-3D19-4E13-9317-3927894F0F3B}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {4C2CCC7D-3D19-4E13-9317-3927894F0F3B}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {4C2CCC7D-3D19-4E13-9317-3927894F0F3B}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {4C2CCC7D-3D19-4E13-9317-3927894F0F3B}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {4C2CCC7D-3D19-4E13-9317-3927894F0F3B}.Release|Win32.ActiveCfg = Release|Win32
- {4C2CCC7D-3D19-4E13-9317-3927894F0F3B}.Release|Win32.Build.0 = Release|Win32
- {4C2CCC7D-3D19-4E13-9317-3927894F0F3B}.Release|x64.ActiveCfg = Release|x64
- {4C2CCC7D-3D19-4E13-9317-3927894F0F3B}.Release|x64.Build.0 = Release|x64
- {4C2CCC7D-3D19-4E13-9317-3927894F0F3B}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {4C2CCC7D-3D19-4E13-9317-3927894F0F3B}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {4C2CCC7D-3D19-4E13-9317-3927894F0F3B}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {4C2CCC7D-3D19-4E13-9317-3927894F0F3B}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {D221EDFA-64EB-479A-B15B-792A90ADE47D}.Debug|Win32.ActiveCfg = Debug|Win32
- {D221EDFA-64EB-479A-B15B-792A90ADE47D}.Debug|Win32.Build.0 = Debug|Win32
- {D221EDFA-64EB-479A-B15B-792A90ADE47D}.Debug|x64.ActiveCfg = Debug|x64
- {D221EDFA-64EB-479A-B15B-792A90ADE47D}.Debug|x64.Build.0 = Debug|x64
- {D221EDFA-64EB-479A-B15B-792A90ADE47D}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {D221EDFA-64EB-479A-B15B-792A90ADE47D}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {D221EDFA-64EB-479A-B15B-792A90ADE47D}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {D221EDFA-64EB-479A-B15B-792A90ADE47D}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {D221EDFA-64EB-479A-B15B-792A90ADE47D}.Release|Win32.ActiveCfg = Release|Win32
- {D221EDFA-64EB-479A-B15B-792A90ADE47D}.Release|Win32.Build.0 = Release|Win32
- {D221EDFA-64EB-479A-B15B-792A90ADE47D}.Release|x64.ActiveCfg = Release|x64
- {D221EDFA-64EB-479A-B15B-792A90ADE47D}.Release|x64.Build.0 = Release|x64
- {D221EDFA-64EB-479A-B15B-792A90ADE47D}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {D221EDFA-64EB-479A-B15B-792A90ADE47D}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {D221EDFA-64EB-479A-B15B-792A90ADE47D}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {D221EDFA-64EB-479A-B15B-792A90ADE47D}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {83D6FAB0-4A26-4EB6-9B0D-7E665CBE703C}.Debug|Win32.ActiveCfg = Debug|Win32
- {83D6FAB0-4A26-4EB6-9B0D-7E665CBE703C}.Debug|Win32.Build.0 = Debug|Win32
- {83D6FAB0-4A26-4EB6-9B0D-7E665CBE703C}.Debug|x64.ActiveCfg = Debug|x64
- {83D6FAB0-4A26-4EB6-9B0D-7E665CBE703C}.Debug|x64.Build.0 = Debug|x64
- {83D6FAB0-4A26-4EB6-9B0D-7E665CBE703C}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {83D6FAB0-4A26-4EB6-9B0D-7E665CBE703C}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {83D6FAB0-4A26-4EB6-9B0D-7E665CBE703C}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {83D6FAB0-4A26-4EB6-9B0D-7E665CBE703C}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {83D6FAB0-4A26-4EB6-9B0D-7E665CBE703C}.Release|Win32.ActiveCfg = Release|Win32
- {83D6FAB0-4A26-4EB6-9B0D-7E665CBE703C}.Release|Win32.Build.0 = Release|Win32
- {83D6FAB0-4A26-4EB6-9B0D-7E665CBE703C}.Release|x64.ActiveCfg = Release|x64
- {83D6FAB0-4A26-4EB6-9B0D-7E665CBE703C}.Release|x64.Build.0 = Release|x64
- {83D6FAB0-4A26-4EB6-9B0D-7E665CBE703C}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {83D6FAB0-4A26-4EB6-9B0D-7E665CBE703C}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {83D6FAB0-4A26-4EB6-9B0D-7E665CBE703C}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {83D6FAB0-4A26-4EB6-9B0D-7E665CBE703C}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {2874FAEF-31B3-4A57-9CD4-998089E73480}.Debug|Win32.ActiveCfg = Debug|Win32
- {2874FAEF-31B3-4A57-9CD4-998089E73480}.Debug|Win32.Build.0 = Debug|Win32
- {2874FAEF-31B3-4A57-9CD4-998089E73480}.Debug|x64.ActiveCfg = Debug|x64
- {2874FAEF-31B3-4A57-9CD4-998089E73480}.Debug|x64.Build.0 = Debug|x64
- {2874FAEF-31B3-4A57-9CD4-998089E73480}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {2874FAEF-31B3-4A57-9CD4-998089E73480}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {2874FAEF-31B3-4A57-9CD4-998089E73480}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {2874FAEF-31B3-4A57-9CD4-998089E73480}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {2874FAEF-31B3-4A57-9CD4-998089E73480}.Release|Win32.ActiveCfg = Release|Win32
- {2874FAEF-31B3-4A57-9CD4-998089E73480}.Release|Win32.Build.0 = Release|Win32
- {2874FAEF-31B3-4A57-9CD4-998089E73480}.Release|x64.ActiveCfg = Release|x64
- {2874FAEF-31B3-4A57-9CD4-998089E73480}.Release|x64.Build.0 = Release|x64
- {2874FAEF-31B3-4A57-9CD4-998089E73480}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {2874FAEF-31B3-4A57-9CD4-998089E73480}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {2874FAEF-31B3-4A57-9CD4-998089E73480}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {2874FAEF-31B3-4A57-9CD4-998089E73480}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {F97DC7EE-9AD3-48A6-8F68-2CFA84F4B38A}.Debug|Win32.ActiveCfg = Debug|Win32
- {F97DC7EE-9AD3-48A6-8F68-2CFA84F4B38A}.Debug|Win32.Build.0 = Debug|Win32
- {F97DC7EE-9AD3-48A6-8F68-2CFA84F4B38A}.Debug|x64.ActiveCfg = Debug|x64
- {F97DC7EE-9AD3-48A6-8F68-2CFA84F4B38A}.Debug|x64.Build.0 = Debug|x64
- {F97DC7EE-9AD3-48A6-8F68-2CFA84F4B38A}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {F97DC7EE-9AD3-48A6-8F68-2CFA84F4B38A}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {F97DC7EE-9AD3-48A6-8F68-2CFA84F4B38A}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {F97DC7EE-9AD3-48A6-8F68-2CFA84F4B38A}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {F97DC7EE-9AD3-48A6-8F68-2CFA84F4B38A}.Release|Win32.ActiveCfg = Release|Win32
- {F97DC7EE-9AD3-48A6-8F68-2CFA84F4B38A}.Release|Win32.Build.0 = Release|Win32
- {F97DC7EE-9AD3-48A6-8F68-2CFA84F4B38A}.Release|x64.ActiveCfg = Release|x64
- {F97DC7EE-9AD3-48A6-8F68-2CFA84F4B38A}.Release|x64.Build.0 = Release|x64
- {F97DC7EE-9AD3-48A6-8F68-2CFA84F4B38A}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {F97DC7EE-9AD3-48A6-8F68-2CFA84F4B38A}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {F97DC7EE-9AD3-48A6-8F68-2CFA84F4B38A}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {F97DC7EE-9AD3-48A6-8F68-2CFA84F4B38A}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {487B891B-190D-4534-9B6F-120C53FB4BB9}.Debug|Win32.ActiveCfg = Debug|Win32
- {487B891B-190D-4534-9B6F-120C53FB4BB9}.Debug|Win32.Build.0 = Debug|Win32
- {487B891B-190D-4534-9B6F-120C53FB4BB9}.Debug|x64.ActiveCfg = Debug|x64
- {487B891B-190D-4534-9B6F-120C53FB4BB9}.Debug|x64.Build.0 = Debug|x64
- {487B891B-190D-4534-9B6F-120C53FB4BB9}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {487B891B-190D-4534-9B6F-120C53FB4BB9}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {487B891B-190D-4534-9B6F-120C53FB4BB9}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {487B891B-190D-4534-9B6F-120C53FB4BB9}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {487B891B-190D-4534-9B6F-120C53FB4BB9}.Release|Win32.ActiveCfg = Release|Win32
- {487B891B-190D-4534-9B6F-120C53FB4BB9}.Release|Win32.Build.0 = Release|Win32
- {487B891B-190D-4534-9B6F-120C53FB4BB9}.Release|x64.ActiveCfg = Release|x64
- {487B891B-190D-4534-9B6F-120C53FB4BB9}.Release|x64.Build.0 = Release|x64
- {487B891B-190D-4534-9B6F-120C53FB4BB9}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {487B891B-190D-4534-9B6F-120C53FB4BB9}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {487B891B-190D-4534-9B6F-120C53FB4BB9}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {487B891B-190D-4534-9B6F-120C53FB4BB9}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {750C92D0-CF2F-413E-8D46-CE2D01901322}.Debug|Win32.ActiveCfg = Debug|Win32
- {750C92D0-CF2F-413E-8D46-CE2D01901322}.Debug|Win32.Build.0 = Debug|Win32
- {750C92D0-CF2F-413E-8D46-CE2D01901322}.Debug|x64.ActiveCfg = Debug|x64
- {750C92D0-CF2F-413E-8D46-CE2D01901322}.Debug|x64.Build.0 = Debug|x64
- {750C92D0-CF2F-413E-8D46-CE2D01901322}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {750C92D0-CF2F-413E-8D46-CE2D01901322}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {750C92D0-CF2F-413E-8D46-CE2D01901322}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {750C92D0-CF2F-413E-8D46-CE2D01901322}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {750C92D0-CF2F-413E-8D46-CE2D01901322}.Release|Win32.ActiveCfg = Release|Win32
- {750C92D0-CF2F-413E-8D46-CE2D01901322}.Release|Win32.Build.0 = Release|Win32
- {750C92D0-CF2F-413E-8D46-CE2D01901322}.Release|x64.ActiveCfg = Release|x64
- {750C92D0-CF2F-413E-8D46-CE2D01901322}.Release|x64.Build.0 = Release|x64
- {750C92D0-CF2F-413E-8D46-CE2D01901322}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {750C92D0-CF2F-413E-8D46-CE2D01901322}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {750C92D0-CF2F-413E-8D46-CE2D01901322}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {750C92D0-CF2F-413E-8D46-CE2D01901322}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {1DC69786-C012-46C5-8B82-92C093434D05}.Debug|Win32.ActiveCfg = Debug|Win32
- {1DC69786-C012-46C5-8B82-92C093434D05}.Debug|Win32.Build.0 = Debug|Win32
- {1DC69786-C012-46C5-8B82-92C093434D05}.Debug|x64.ActiveCfg = Debug|x64
- {1DC69786-C012-46C5-8B82-92C093434D05}.Debug|x64.Build.0 = Debug|x64
- {1DC69786-C012-46C5-8B82-92C093434D05}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {1DC69786-C012-46C5-8B82-92C093434D05}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {1DC69786-C012-46C5-8B82-92C093434D05}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {1DC69786-C012-46C5-8B82-92C093434D05}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {1DC69786-C012-46C5-8B82-92C093434D05}.Release|Win32.ActiveCfg = Release|Win32
- {1DC69786-C012-46C5-8B82-92C093434D05}.Release|Win32.Build.0 = Release|Win32
- {1DC69786-C012-46C5-8B82-92C093434D05}.Release|x64.ActiveCfg = Release|x64
- {1DC69786-C012-46C5-8B82-92C093434D05}.Release|x64.Build.0 = Release|x64
- {1DC69786-C012-46C5-8B82-92C093434D05}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {1DC69786-C012-46C5-8B82-92C093434D05}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {1DC69786-C012-46C5-8B82-92C093434D05}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {1DC69786-C012-46C5-8B82-92C093434D05}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {4F4585B4-7710-4BCA-86CE-4766F0F905E8}.Debug|Win32.ActiveCfg = Debug|Win32
- {4F4585B4-7710-4BCA-86CE-4766F0F905E8}.Debug|Win32.Build.0 = Debug|Win32
- {4F4585B4-7710-4BCA-86CE-4766F0F905E8}.Debug|x64.ActiveCfg = Debug|x64
- {4F4585B4-7710-4BCA-86CE-4766F0F905E8}.Debug|x64.Build.0 = Debug|x64
- {4F4585B4-7710-4BCA-86CE-4766F0F905E8}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {4F4585B4-7710-4BCA-86CE-4766F0F905E8}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {4F4585B4-7710-4BCA-86CE-4766F0F905E8}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {4F4585B4-7710-4BCA-86CE-4766F0F905E8}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {4F4585B4-7710-4BCA-86CE-4766F0F905E8}.Release|Win32.ActiveCfg = Release|Win32
- {4F4585B4-7710-4BCA-86CE-4766F0F905E8}.Release|Win32.Build.0 = Release|Win32
- {4F4585B4-7710-4BCA-86CE-4766F0F905E8}.Release|x64.ActiveCfg = Release|x64
- {4F4585B4-7710-4BCA-86CE-4766F0F905E8}.Release|x64.Build.0 = Release|x64
- {4F4585B4-7710-4BCA-86CE-4766F0F905E8}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {4F4585B4-7710-4BCA-86CE-4766F0F905E8}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {4F4585B4-7710-4BCA-86CE-4766F0F905E8}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {4F4585B4-7710-4BCA-86CE-4766F0F905E8}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {EC823D54-D2D0-4E00-A831-2BA12DF2AD50}.Debug|Win32.ActiveCfg = Debug|Win32
- {EC823D54-D2D0-4E00-A831-2BA12DF2AD50}.Debug|Win32.Build.0 = Debug|Win32
- {EC823D54-D2D0-4E00-A831-2BA12DF2AD50}.Debug|x64.ActiveCfg = Debug|x64
- {EC823D54-D2D0-4E00-A831-2BA12DF2AD50}.Debug|x64.Build.0 = Debug|x64
- {EC823D54-D2D0-4E00-A831-2BA12DF2AD50}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {EC823D54-D2D0-4E00-A831-2BA12DF2AD50}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {EC823D54-D2D0-4E00-A831-2BA12DF2AD50}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {EC823D54-D2D0-4E00-A831-2BA12DF2AD50}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {EC823D54-D2D0-4E00-A831-2BA12DF2AD50}.Release|Win32.ActiveCfg = Release|Win32
- {EC823D54-D2D0-4E00-A831-2BA12DF2AD50}.Release|Win32.Build.0 = Release|Win32
- {EC823D54-D2D0-4E00-A831-2BA12DF2AD50}.Release|x64.ActiveCfg = Release|x64
- {EC823D54-D2D0-4E00-A831-2BA12DF2AD50}.Release|x64.Build.0 = Release|x64
- {EC823D54-D2D0-4E00-A831-2BA12DF2AD50}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {EC823D54-D2D0-4E00-A831-2BA12DF2AD50}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {EC823D54-D2D0-4E00-A831-2BA12DF2AD50}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {EC823D54-D2D0-4E00-A831-2BA12DF2AD50}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {D3DCCB97-8DA8-4F61-BE14-F7078635FE43}.Debug|Win32.ActiveCfg = Debug|Win32
- {D3DCCB97-8DA8-4F61-BE14-F7078635FE43}.Debug|Win32.Build.0 = Debug|Win32
- {D3DCCB97-8DA8-4F61-BE14-F7078635FE43}.Debug|x64.ActiveCfg = Debug|x64
- {D3DCCB97-8DA8-4F61-BE14-F7078635FE43}.Debug|x64.Build.0 = Debug|x64
- {D3DCCB97-8DA8-4F61-BE14-F7078635FE43}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {D3DCCB97-8DA8-4F61-BE14-F7078635FE43}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {D3DCCB97-8DA8-4F61-BE14-F7078635FE43}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {D3DCCB97-8DA8-4F61-BE14-F7078635FE43}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {D3DCCB97-8DA8-4F61-BE14-F7078635FE43}.Release|Win32.ActiveCfg = Release|Win32
- {D3DCCB97-8DA8-4F61-BE14-F7078635FE43}.Release|Win32.Build.0 = Release|Win32
- {D3DCCB97-8DA8-4F61-BE14-F7078635FE43}.Release|x64.ActiveCfg = Release|x64
- {D3DCCB97-8DA8-4F61-BE14-F7078635FE43}.Release|x64.Build.0 = Release|x64
- {D3DCCB97-8DA8-4F61-BE14-F7078635FE43}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {D3DCCB97-8DA8-4F61-BE14-F7078635FE43}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {D3DCCB97-8DA8-4F61-BE14-F7078635FE43}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {D3DCCB97-8DA8-4F61-BE14-F7078635FE43}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {053F419B-7D93-4051-A624-C6753A0B1A43}.Debug|Win32.ActiveCfg = Debug|Win32
- {053F419B-7D93-4051-A624-C6753A0B1A43}.Debug|Win32.Build.0 = Debug|Win32
- {053F419B-7D93-4051-A624-C6753A0B1A43}.Debug|x64.ActiveCfg = Debug|x64
- {053F419B-7D93-4051-A624-C6753A0B1A43}.Debug|x64.Build.0 = Debug|x64
- {053F419B-7D93-4051-A624-C6753A0B1A43}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {053F419B-7D93-4051-A624-C6753A0B1A43}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {053F419B-7D93-4051-A624-C6753A0B1A43}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {053F419B-7D93-4051-A624-C6753A0B1A43}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {053F419B-7D93-4051-A624-C6753A0B1A43}.Release|Win32.ActiveCfg = Release|Win32
- {053F419B-7D93-4051-A624-C6753A0B1A43}.Release|Win32.Build.0 = Release|Win32
- {053F419B-7D93-4051-A624-C6753A0B1A43}.Release|x64.ActiveCfg = Release|x64
- {053F419B-7D93-4051-A624-C6753A0B1A43}.Release|x64.Build.0 = Release|x64
- {053F419B-7D93-4051-A624-C6753A0B1A43}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {053F419B-7D93-4051-A624-C6753A0B1A43}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {053F419B-7D93-4051-A624-C6753A0B1A43}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {053F419B-7D93-4051-A624-C6753A0B1A43}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {DAF15754-B721-430A-A1B9-55D6D67C036D}.Debug|Win32.ActiveCfg = Debug|Win32
- {DAF15754-B721-430A-A1B9-55D6D67C036D}.Debug|Win32.Build.0 = Debug|Win32
- {DAF15754-B721-430A-A1B9-55D6D67C036D}.Debug|x64.ActiveCfg = Debug|x64
- {DAF15754-B721-430A-A1B9-55D6D67C036D}.Debug|x64.Build.0 = Debug|x64
- {DAF15754-B721-430A-A1B9-55D6D67C036D}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {DAF15754-B721-430A-A1B9-55D6D67C036D}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {DAF15754-B721-430A-A1B9-55D6D67C036D}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {DAF15754-B721-430A-A1B9-55D6D67C036D}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {DAF15754-B721-430A-A1B9-55D6D67C036D}.Release|Win32.ActiveCfg = Release|Win32
- {DAF15754-B721-430A-A1B9-55D6D67C036D}.Release|Win32.Build.0 = Release|Win32
- {DAF15754-B721-430A-A1B9-55D6D67C036D}.Release|x64.ActiveCfg = Release|x64
- {DAF15754-B721-430A-A1B9-55D6D67C036D}.Release|x64.Build.0 = Release|x64
- {DAF15754-B721-430A-A1B9-55D6D67C036D}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {DAF15754-B721-430A-A1B9-55D6D67C036D}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {DAF15754-B721-430A-A1B9-55D6D67C036D}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {DAF15754-B721-430A-A1B9-55D6D67C036D}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {7ACBE6DC-0F7B-4071-B3EF-8DFD67CC4D13}.Debug|Win32.ActiveCfg = Debug|Win32
- {7ACBE6DC-0F7B-4071-B3EF-8DFD67CC4D13}.Debug|Win32.Build.0 = Debug|Win32
- {7ACBE6DC-0F7B-4071-B3EF-8DFD67CC4D13}.Debug|x64.ActiveCfg = Debug|x64
- {7ACBE6DC-0F7B-4071-B3EF-8DFD67CC4D13}.Debug|x64.Build.0 = Debug|x64
- {7ACBE6DC-0F7B-4071-B3EF-8DFD67CC4D13}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {7ACBE6DC-0F7B-4071-B3EF-8DFD67CC4D13}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {7ACBE6DC-0F7B-4071-B3EF-8DFD67CC4D13}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {7ACBE6DC-0F7B-4071-B3EF-8DFD67CC4D13}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {7ACBE6DC-0F7B-4071-B3EF-8DFD67CC4D13}.Release|Win32.ActiveCfg = Release|Win32
- {7ACBE6DC-0F7B-4071-B3EF-8DFD67CC4D13}.Release|Win32.Build.0 = Release|Win32
- {7ACBE6DC-0F7B-4071-B3EF-8DFD67CC4D13}.Release|x64.ActiveCfg = Release|x64
- {7ACBE6DC-0F7B-4071-B3EF-8DFD67CC4D13}.Release|x64.Build.0 = Release|x64
- {7ACBE6DC-0F7B-4071-B3EF-8DFD67CC4D13}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {7ACBE6DC-0F7B-4071-B3EF-8DFD67CC4D13}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {7ACBE6DC-0F7B-4071-B3EF-8DFD67CC4D13}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {7ACBE6DC-0F7B-4071-B3EF-8DFD67CC4D13}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {0F815DB5-EFA3-482B-8E8C-3DEFFD34F614}.Debug|Win32.ActiveCfg = Debug|Win32
- {0F815DB5-EFA3-482B-8E8C-3DEFFD34F614}.Debug|Win32.Build.0 = Debug|Win32
- {0F815DB5-EFA3-482B-8E8C-3DEFFD34F614}.Debug|x64.ActiveCfg = Debug|x64
- {0F815DB5-EFA3-482B-8E8C-3DEFFD34F614}.Debug|x64.Build.0 = Debug|x64
- {0F815DB5-EFA3-482B-8E8C-3DEFFD34F614}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {0F815DB5-EFA3-482B-8E8C-3DEFFD34F614}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {0F815DB5-EFA3-482B-8E8C-3DEFFD34F614}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {0F815DB5-EFA3-482B-8E8C-3DEFFD34F614}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {0F815DB5-EFA3-482B-8E8C-3DEFFD34F614}.Release|Win32.ActiveCfg = Release|Win32
- {0F815DB5-EFA3-482B-8E8C-3DEFFD34F614}.Release|Win32.Build.0 = Release|Win32
- {0F815DB5-EFA3-482B-8E8C-3DEFFD34F614}.Release|x64.ActiveCfg = Release|x64
- {0F815DB5-EFA3-482B-8E8C-3DEFFD34F614}.Release|x64.Build.0 = Release|x64
- {0F815DB5-EFA3-482B-8E8C-3DEFFD34F614}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {0F815DB5-EFA3-482B-8E8C-3DEFFD34F614}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {0F815DB5-EFA3-482B-8E8C-3DEFFD34F614}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {0F815DB5-EFA3-482B-8E8C-3DEFFD34F614}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {C9D7C3C5-2568-46D9-A1C8-08305F90C6A0}.Debug|Win32.ActiveCfg = Debug|Win32
- {C9D7C3C5-2568-46D9-A1C8-08305F90C6A0}.Debug|Win32.Build.0 = Debug|Win32
- {C9D7C3C5-2568-46D9-A1C8-08305F90C6A0}.Debug|x64.ActiveCfg = Debug|x64
- {C9D7C3C5-2568-46D9-A1C8-08305F90C6A0}.Debug|x64.Build.0 = Debug|x64
- {C9D7C3C5-2568-46D9-A1C8-08305F90C6A0}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {C9D7C3C5-2568-46D9-A1C8-08305F90C6A0}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {C9D7C3C5-2568-46D9-A1C8-08305F90C6A0}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {C9D7C3C5-2568-46D9-A1C8-08305F90C6A0}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {C9D7C3C5-2568-46D9-A1C8-08305F90C6A0}.Release|Win32.ActiveCfg = Release|Win32
- {C9D7C3C5-2568-46D9-A1C8-08305F90C6A0}.Release|Win32.Build.0 = Release|Win32
- {C9D7C3C5-2568-46D9-A1C8-08305F90C6A0}.Release|x64.ActiveCfg = Release|x64
- {C9D7C3C5-2568-46D9-A1C8-08305F90C6A0}.Release|x64.Build.0 = Release|x64
- {C9D7C3C5-2568-46D9-A1C8-08305F90C6A0}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {C9D7C3C5-2568-46D9-A1C8-08305F90C6A0}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {C9D7C3C5-2568-46D9-A1C8-08305F90C6A0}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {C9D7C3C5-2568-46D9-A1C8-08305F90C6A0}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {3EFBB872-C18C-4F90-BA06-286C205E8A8A}.Debug|Win32.ActiveCfg = Debug|Win32
- {3EFBB872-C18C-4F90-BA06-286C205E8A8A}.Debug|Win32.Build.0 = Debug|Win32
- {3EFBB872-C18C-4F90-BA06-286C205E8A8A}.Debug|x64.ActiveCfg = Debug|x64
- {3EFBB872-C18C-4F90-BA06-286C205E8A8A}.Debug|x64.Build.0 = Debug|x64
- {3EFBB872-C18C-4F90-BA06-286C205E8A8A}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {3EFBB872-C18C-4F90-BA06-286C205E8A8A}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {3EFBB872-C18C-4F90-BA06-286C205E8A8A}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {3EFBB872-C18C-4F90-BA06-286C205E8A8A}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {3EFBB872-C18C-4F90-BA06-286C205E8A8A}.Release|Win32.ActiveCfg = Release|Win32
- {3EFBB872-C18C-4F90-BA06-286C205E8A8A}.Release|Win32.Build.0 = Release|Win32
- {3EFBB872-C18C-4F90-BA06-286C205E8A8A}.Release|x64.ActiveCfg = Release|x64
- {3EFBB872-C18C-4F90-BA06-286C205E8A8A}.Release|x64.Build.0 = Release|x64
- {3EFBB872-C18C-4F90-BA06-286C205E8A8A}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {3EFBB872-C18C-4F90-BA06-286C205E8A8A}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {3EFBB872-C18C-4F90-BA06-286C205E8A8A}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {3EFBB872-C18C-4F90-BA06-286C205E8A8A}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {3218262E-1A52-4542-8F22-A49D06C334AC}.Debug|Win32.ActiveCfg = Debug|Win32
- {3218262E-1A52-4542-8F22-A49D06C334AC}.Debug|Win32.Build.0 = Debug|Win32
- {3218262E-1A52-4542-8F22-A49D06C334AC}.Debug|x64.ActiveCfg = Debug|x64
- {3218262E-1A52-4542-8F22-A49D06C334AC}.Debug|x64.Build.0 = Debug|x64
- {3218262E-1A52-4542-8F22-A49D06C334AC}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {3218262E-1A52-4542-8F22-A49D06C334AC}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {3218262E-1A52-4542-8F22-A49D06C334AC}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {3218262E-1A52-4542-8F22-A49D06C334AC}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {3218262E-1A52-4542-8F22-A49D06C334AC}.Release|Win32.ActiveCfg = Release|Win32
- {3218262E-1A52-4542-8F22-A49D06C334AC}.Release|Win32.Build.0 = Release|Win32
- {3218262E-1A52-4542-8F22-A49D06C334AC}.Release|x64.ActiveCfg = Release|x64
- {3218262E-1A52-4542-8F22-A49D06C334AC}.Release|x64.Build.0 = Release|x64
- {3218262E-1A52-4542-8F22-A49D06C334AC}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {3218262E-1A52-4542-8F22-A49D06C334AC}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {3218262E-1A52-4542-8F22-A49D06C334AC}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {3218262E-1A52-4542-8F22-A49D06C334AC}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {1DF27097-97DB-4932-BD3B-6F14A92816A3}.Debug|Win32.ActiveCfg = Debug|Win32
- {1DF27097-97DB-4932-BD3B-6F14A92816A3}.Debug|Win32.Build.0 = Debug|Win32
- {1DF27097-97DB-4932-BD3B-6F14A92816A3}.Debug|x64.ActiveCfg = Debug|x64
- {1DF27097-97DB-4932-BD3B-6F14A92816A3}.Debug|x64.Build.0 = Debug|x64
- {1DF27097-97DB-4932-BD3B-6F14A92816A3}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {1DF27097-97DB-4932-BD3B-6F14A92816A3}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {1DF27097-97DB-4932-BD3B-6F14A92816A3}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {1DF27097-97DB-4932-BD3B-6F14A92816A3}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {1DF27097-97DB-4932-BD3B-6F14A92816A3}.Release|Win32.ActiveCfg = Release|Win32
- {1DF27097-97DB-4932-BD3B-6F14A92816A3}.Release|Win32.Build.0 = Release|Win32
- {1DF27097-97DB-4932-BD3B-6F14A92816A3}.Release|x64.ActiveCfg = Release|x64
- {1DF27097-97DB-4932-BD3B-6F14A92816A3}.Release|x64.Build.0 = Release|x64
- {1DF27097-97DB-4932-BD3B-6F14A92816A3}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {1DF27097-97DB-4932-BD3B-6F14A92816A3}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {1DF27097-97DB-4932-BD3B-6F14A92816A3}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {1DF27097-97DB-4932-BD3B-6F14A92816A3}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {F2092248-A59C-4CC3-8571-F6F6809919A5}.Debug|Win32.ActiveCfg = Debug|Win32
- {F2092248-A59C-4CC3-8571-F6F6809919A5}.Debug|Win32.Build.0 = Debug|Win32
- {F2092248-A59C-4CC3-8571-F6F6809919A5}.Debug|x64.ActiveCfg = Debug|x64
- {F2092248-A59C-4CC3-8571-F6F6809919A5}.Debug|x64.Build.0 = Debug|x64
- {F2092248-A59C-4CC3-8571-F6F6809919A5}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {F2092248-A59C-4CC3-8571-F6F6809919A5}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {F2092248-A59C-4CC3-8571-F6F6809919A5}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {F2092248-A59C-4CC3-8571-F6F6809919A5}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {F2092248-A59C-4CC3-8571-F6F6809919A5}.Release|Win32.ActiveCfg = Release|Win32
- {F2092248-A59C-4CC3-8571-F6F6809919A5}.Release|Win32.Build.0 = Release|Win32
- {F2092248-A59C-4CC3-8571-F6F6809919A5}.Release|x64.ActiveCfg = Release|x64
- {F2092248-A59C-4CC3-8571-F6F6809919A5}.Release|x64.Build.0 = Release|x64
- {F2092248-A59C-4CC3-8571-F6F6809919A5}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {F2092248-A59C-4CC3-8571-F6F6809919A5}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {F2092248-A59C-4CC3-8571-F6F6809919A5}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {F2092248-A59C-4CC3-8571-F6F6809919A5}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {A276E338-0D0C-4A5C-88C7-531574422EBA}.Debug|Win32.ActiveCfg = Debug|Win32
- {A276E338-0D0C-4A5C-88C7-531574422EBA}.Debug|Win32.Build.0 = Debug|Win32
- {A276E338-0D0C-4A5C-88C7-531574422EBA}.Debug|x64.ActiveCfg = Debug|x64
- {A276E338-0D0C-4A5C-88C7-531574422EBA}.Debug|x64.Build.0 = Debug|x64
- {A276E338-0D0C-4A5C-88C7-531574422EBA}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {A276E338-0D0C-4A5C-88C7-531574422EBA}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {A276E338-0D0C-4A5C-88C7-531574422EBA}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {A276E338-0D0C-4A5C-88C7-531574422EBA}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {A276E338-0D0C-4A5C-88C7-531574422EBA}.Release|Win32.ActiveCfg = Release|Win32
- {A276E338-0D0C-4A5C-88C7-531574422EBA}.Release|Win32.Build.0 = Release|Win32
- {A276E338-0D0C-4A5C-88C7-531574422EBA}.Release|x64.ActiveCfg = Release|x64
- {A276E338-0D0C-4A5C-88C7-531574422EBA}.Release|x64.Build.0 = Release|x64
- {A276E338-0D0C-4A5C-88C7-531574422EBA}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {A276E338-0D0C-4A5C-88C7-531574422EBA}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {A276E338-0D0C-4A5C-88C7-531574422EBA}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {A276E338-0D0C-4A5C-88C7-531574422EBA}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {A250CCFC-47DA-4895-BC62-66CADA053A52}.Debug|Win32.ActiveCfg = Debug|Win32
- {A250CCFC-47DA-4895-BC62-66CADA053A52}.Debug|Win32.Build.0 = Debug|Win32
- {A250CCFC-47DA-4895-BC62-66CADA053A52}.Debug|x64.ActiveCfg = Debug|x64
- {A250CCFC-47DA-4895-BC62-66CADA053A52}.Debug|x64.Build.0 = Debug|x64
- {A250CCFC-47DA-4895-BC62-66CADA053A52}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {A250CCFC-47DA-4895-BC62-66CADA053A52}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {A250CCFC-47DA-4895-BC62-66CADA053A52}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {A250CCFC-47DA-4895-BC62-66CADA053A52}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {A250CCFC-47DA-4895-BC62-66CADA053A52}.Release|Win32.ActiveCfg = Release|Win32
- {A250CCFC-47DA-4895-BC62-66CADA053A52}.Release|Win32.Build.0 = Release|Win32
- {A250CCFC-47DA-4895-BC62-66CADA053A52}.Release|x64.ActiveCfg = Release|x64
- {A250CCFC-47DA-4895-BC62-66CADA053A52}.Release|x64.Build.0 = Release|x64
- {A250CCFC-47DA-4895-BC62-66CADA053A52}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {A250CCFC-47DA-4895-BC62-66CADA053A52}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {A250CCFC-47DA-4895-BC62-66CADA053A52}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {A250CCFC-47DA-4895-BC62-66CADA053A52}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {876560CC-AE03-49C7-9FA8-D1656CB7F040}.Debug|Win32.ActiveCfg = Debug|Win32
- {876560CC-AE03-49C7-9FA8-D1656CB7F040}.Debug|Win32.Build.0 = Debug|Win32
- {876560CC-AE03-49C7-9FA8-D1656CB7F040}.Debug|x64.ActiveCfg = Debug|x64
- {876560CC-AE03-49C7-9FA8-D1656CB7F040}.Debug|x64.Build.0 = Debug|x64
- {876560CC-AE03-49C7-9FA8-D1656CB7F040}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {876560CC-AE03-49C7-9FA8-D1656CB7F040}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {876560CC-AE03-49C7-9FA8-D1656CB7F040}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {876560CC-AE03-49C7-9FA8-D1656CB7F040}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {876560CC-AE03-49C7-9FA8-D1656CB7F040}.Release|Win32.ActiveCfg = Release|Win32
- {876560CC-AE03-49C7-9FA8-D1656CB7F040}.Release|Win32.Build.0 = Release|Win32
- {876560CC-AE03-49C7-9FA8-D1656CB7F040}.Release|x64.ActiveCfg = Release|x64
- {876560CC-AE03-49C7-9FA8-D1656CB7F040}.Release|x64.Build.0 = Release|x64
- {876560CC-AE03-49C7-9FA8-D1656CB7F040}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {876560CC-AE03-49C7-9FA8-D1656CB7F040}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {876560CC-AE03-49C7-9FA8-D1656CB7F040}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {876560CC-AE03-49C7-9FA8-D1656CB7F040}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {FD45D87E-E729-4BA2-90A6-F42C1ACD2CA4}.Debug|Win32.ActiveCfg = Debug|Win32
- {FD45D87E-E729-4BA2-90A6-F42C1ACD2CA4}.Debug|Win32.Build.0 = Debug|Win32
- {FD45D87E-E729-4BA2-90A6-F42C1ACD2CA4}.Debug|x64.ActiveCfg = Debug|x64
- {FD45D87E-E729-4BA2-90A6-F42C1ACD2CA4}.Debug|x64.Build.0 = Debug|x64
- {FD45D87E-E729-4BA2-90A6-F42C1ACD2CA4}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {FD45D87E-E729-4BA2-90A6-F42C1ACD2CA4}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {FD45D87E-E729-4BA2-90A6-F42C1ACD2CA4}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {FD45D87E-E729-4BA2-90A6-F42C1ACD2CA4}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {FD45D87E-E729-4BA2-90A6-F42C1ACD2CA4}.Release|Win32.ActiveCfg = Release|Win32
- {FD45D87E-E729-4BA2-90A6-F42C1ACD2CA4}.Release|Win32.Build.0 = Release|Win32
- {FD45D87E-E729-4BA2-90A6-F42C1ACD2CA4}.Release|x64.ActiveCfg = Release|x64
- {FD45D87E-E729-4BA2-90A6-F42C1ACD2CA4}.Release|x64.Build.0 = Release|x64
- {FD45D87E-E729-4BA2-90A6-F42C1ACD2CA4}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {FD45D87E-E729-4BA2-90A6-F42C1ACD2CA4}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {FD45D87E-E729-4BA2-90A6-F42C1ACD2CA4}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {FD45D87E-E729-4BA2-90A6-F42C1ACD2CA4}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {D962509C-BBA8-43AC-BDB9-4D420B16D099}.Debug|Win32.ActiveCfg = Debug|Win32
- {D962509C-BBA8-43AC-BDB9-4D420B16D099}.Debug|Win32.Build.0 = Debug|Win32
- {D962509C-BBA8-43AC-BDB9-4D420B16D099}.Debug|x64.ActiveCfg = Debug|x64
- {D962509C-BBA8-43AC-BDB9-4D420B16D099}.Debug|x64.Build.0 = Debug|x64
- {D962509C-BBA8-43AC-BDB9-4D420B16D099}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {D962509C-BBA8-43AC-BDB9-4D420B16D099}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {D962509C-BBA8-43AC-BDB9-4D420B16D099}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {D962509C-BBA8-43AC-BDB9-4D420B16D099}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {D962509C-BBA8-43AC-BDB9-4D420B16D099}.Release|Win32.ActiveCfg = Release|Win32
- {D962509C-BBA8-43AC-BDB9-4D420B16D099}.Release|Win32.Build.0 = Release|Win32
- {D962509C-BBA8-43AC-BDB9-4D420B16D099}.Release|x64.ActiveCfg = Release|x64
- {D962509C-BBA8-43AC-BDB9-4D420B16D099}.Release|x64.Build.0 = Release|x64
- {D962509C-BBA8-43AC-BDB9-4D420B16D099}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {D962509C-BBA8-43AC-BDB9-4D420B16D099}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {D962509C-BBA8-43AC-BDB9-4D420B16D099}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {D962509C-BBA8-43AC-BDB9-4D420B16D099}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {86E2DEFE-91A2-400B-A093-82B0DE4968C0}.Debug|Win32.ActiveCfg = Debug|Win32
- {86E2DEFE-91A2-400B-A093-82B0DE4968C0}.Debug|Win32.Build.0 = Debug|Win32
- {86E2DEFE-91A2-400B-A093-82B0DE4968C0}.Debug|x64.ActiveCfg = Debug|x64
- {86E2DEFE-91A2-400B-A093-82B0DE4968C0}.Debug|x64.Build.0 = Debug|x64
- {86E2DEFE-91A2-400B-A093-82B0DE4968C0}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {86E2DEFE-91A2-400B-A093-82B0DE4968C0}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {86E2DEFE-91A2-400B-A093-82B0DE4968C0}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {86E2DEFE-91A2-400B-A093-82B0DE4968C0}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {86E2DEFE-91A2-400B-A093-82B0DE4968C0}.Release|Win32.ActiveCfg = Release|Win32
- {86E2DEFE-91A2-400B-A093-82B0DE4968C0}.Release|Win32.Build.0 = Release|Win32
- {86E2DEFE-91A2-400B-A093-82B0DE4968C0}.Release|x64.ActiveCfg = Release|x64
- {86E2DEFE-91A2-400B-A093-82B0DE4968C0}.Release|x64.Build.0 = Release|x64
- {86E2DEFE-91A2-400B-A093-82B0DE4968C0}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {86E2DEFE-91A2-400B-A093-82B0DE4968C0}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {86E2DEFE-91A2-400B-A093-82B0DE4968C0}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {86E2DEFE-91A2-400B-A093-82B0DE4968C0}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {D3399079-037C-4873-AB41-8535E0F5124E}.Debug|Win32.ActiveCfg = Debug|Win32
- {D3399079-037C-4873-AB41-8535E0F5124E}.Debug|Win32.Build.0 = Debug|Win32
- {D3399079-037C-4873-AB41-8535E0F5124E}.Debug|x64.ActiveCfg = Debug|x64
- {D3399079-037C-4873-AB41-8535E0F5124E}.Debug|x64.Build.0 = Debug|x64
- {D3399079-037C-4873-AB41-8535E0F5124E}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {D3399079-037C-4873-AB41-8535E0F5124E}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {D3399079-037C-4873-AB41-8535E0F5124E}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {D3399079-037C-4873-AB41-8535E0F5124E}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {D3399079-037C-4873-AB41-8535E0F5124E}.Release|Win32.ActiveCfg = Release|Win32
- {D3399079-037C-4873-AB41-8535E0F5124E}.Release|Win32.Build.0 = Release|Win32
- {D3399079-037C-4873-AB41-8535E0F5124E}.Release|x64.ActiveCfg = Release|x64
- {D3399079-037C-4873-AB41-8535E0F5124E}.Release|x64.Build.0 = Release|x64
- {D3399079-037C-4873-AB41-8535E0F5124E}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {D3399079-037C-4873-AB41-8535E0F5124E}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {D3399079-037C-4873-AB41-8535E0F5124E}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {D3399079-037C-4873-AB41-8535E0F5124E}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {9B82B22D-3287-4512-9C61-054CF931C402}.Debug|Win32.ActiveCfg = Debug|Win32
- {9B82B22D-3287-4512-9C61-054CF931C402}.Debug|Win32.Build.0 = Debug|Win32
- {9B82B22D-3287-4512-9C61-054CF931C402}.Debug|x64.ActiveCfg = Debug|x64
- {9B82B22D-3287-4512-9C61-054CF931C402}.Debug|x64.Build.0 = Debug|x64
- {9B82B22D-3287-4512-9C61-054CF931C402}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {9B82B22D-3287-4512-9C61-054CF931C402}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {9B82B22D-3287-4512-9C61-054CF931C402}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {9B82B22D-3287-4512-9C61-054CF931C402}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {9B82B22D-3287-4512-9C61-054CF931C402}.Release|Win32.ActiveCfg = Release|Win32
- {9B82B22D-3287-4512-9C61-054CF931C402}.Release|Win32.Build.0 = Release|Win32
- {9B82B22D-3287-4512-9C61-054CF931C402}.Release|x64.ActiveCfg = Release|x64
- {9B82B22D-3287-4512-9C61-054CF931C402}.Release|x64.Build.0 = Release|x64
- {9B82B22D-3287-4512-9C61-054CF931C402}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {9B82B22D-3287-4512-9C61-054CF931C402}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {9B82B22D-3287-4512-9C61-054CF931C402}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {9B82B22D-3287-4512-9C61-054CF931C402}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {6B0FCA0A-B988-4994-9343-8860CABDD9D2}.Debug|Win32.ActiveCfg = Debug|Win32
- {6B0FCA0A-B988-4994-9343-8860CABDD9D2}.Debug|Win32.Build.0 = Debug|Win32
- {6B0FCA0A-B988-4994-9343-8860CABDD9D2}.Debug|x64.ActiveCfg = Debug|x64
- {6B0FCA0A-B988-4994-9343-8860CABDD9D2}.Debug|x64.Build.0 = Debug|x64
- {6B0FCA0A-B988-4994-9343-8860CABDD9D2}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {6B0FCA0A-B988-4994-9343-8860CABDD9D2}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {6B0FCA0A-B988-4994-9343-8860CABDD9D2}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {6B0FCA0A-B988-4994-9343-8860CABDD9D2}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {6B0FCA0A-B988-4994-9343-8860CABDD9D2}.Release|Win32.ActiveCfg = Release|Win32
- {6B0FCA0A-B988-4994-9343-8860CABDD9D2}.Release|Win32.Build.0 = Release|Win32
- {6B0FCA0A-B988-4994-9343-8860CABDD9D2}.Release|x64.ActiveCfg = Release|x64
- {6B0FCA0A-B988-4994-9343-8860CABDD9D2}.Release|x64.Build.0 = Release|x64
- {6B0FCA0A-B988-4994-9343-8860CABDD9D2}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {6B0FCA0A-B988-4994-9343-8860CABDD9D2}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {6B0FCA0A-B988-4994-9343-8860CABDD9D2}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {6B0FCA0A-B988-4994-9343-8860CABDD9D2}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {3657A377-E327-4B16-9EE9-16E0E1ECFCE9}.Debug|Win32.ActiveCfg = Debug|Win32
- {3657A377-E327-4B16-9EE9-16E0E1ECFCE9}.Debug|Win32.Build.0 = Debug|Win32
- {3657A377-E327-4B16-9EE9-16E0E1ECFCE9}.Debug|x64.ActiveCfg = Debug|x64
- {3657A377-E327-4B16-9EE9-16E0E1ECFCE9}.Debug|x64.Build.0 = Debug|x64
- {3657A377-E327-4B16-9EE9-16E0E1ECFCE9}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {3657A377-E327-4B16-9EE9-16E0E1ECFCE9}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {3657A377-E327-4B16-9EE9-16E0E1ECFCE9}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {3657A377-E327-4B16-9EE9-16E0E1ECFCE9}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {3657A377-E327-4B16-9EE9-16E0E1ECFCE9}.Release|Win32.ActiveCfg = Release|Win32
- {3657A377-E327-4B16-9EE9-16E0E1ECFCE9}.Release|Win32.Build.0 = Release|Win32
- {3657A377-E327-4B16-9EE9-16E0E1ECFCE9}.Release|x64.ActiveCfg = Release|x64
- {3657A377-E327-4B16-9EE9-16E0E1ECFCE9}.Release|x64.Build.0 = Release|x64
- {3657A377-E327-4B16-9EE9-16E0E1ECFCE9}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {3657A377-E327-4B16-9EE9-16E0E1ECFCE9}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {3657A377-E327-4B16-9EE9-16E0E1ECFCE9}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {3657A377-E327-4B16-9EE9-16E0E1ECFCE9}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {0DF9D837-5184-4BB7-BFF0-FF679C5EB7AF}.Debug|Win32.ActiveCfg = Debug|Win32
- {0DF9D837-5184-4BB7-BFF0-FF679C5EB7AF}.Debug|Win32.Build.0 = Debug|Win32
- {0DF9D837-5184-4BB7-BFF0-FF679C5EB7AF}.Debug|x64.ActiveCfg = Debug|x64
- {0DF9D837-5184-4BB7-BFF0-FF679C5EB7AF}.Debug|x64.Build.0 = Debug|x64
- {0DF9D837-5184-4BB7-BFF0-FF679C5EB7AF}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {0DF9D837-5184-4BB7-BFF0-FF679C5EB7AF}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {0DF9D837-5184-4BB7-BFF0-FF679C5EB7AF}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {0DF9D837-5184-4BB7-BFF0-FF679C5EB7AF}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {0DF9D837-5184-4BB7-BFF0-FF679C5EB7AF}.Release|Win32.ActiveCfg = Release|Win32
- {0DF9D837-5184-4BB7-BFF0-FF679C5EB7AF}.Release|Win32.Build.0 = Release|Win32
- {0DF9D837-5184-4BB7-BFF0-FF679C5EB7AF}.Release|x64.ActiveCfg = Release|x64
- {0DF9D837-5184-4BB7-BFF0-FF679C5EB7AF}.Release|x64.Build.0 = Release|x64
- {0DF9D837-5184-4BB7-BFF0-FF679C5EB7AF}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {0DF9D837-5184-4BB7-BFF0-FF679C5EB7AF}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {0DF9D837-5184-4BB7-BFF0-FF679C5EB7AF}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {0DF9D837-5184-4BB7-BFF0-FF679C5EB7AF}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {AD4D8660-5128-4DAA-9CC9-BB4ABE051C4E}.Debug|Win32.ActiveCfg = Debug|Win32
- {AD4D8660-5128-4DAA-9CC9-BB4ABE051C4E}.Debug|Win32.Build.0 = Debug|Win32
- {AD4D8660-5128-4DAA-9CC9-BB4ABE051C4E}.Debug|x64.ActiveCfg = Debug|x64
- {AD4D8660-5128-4DAA-9CC9-BB4ABE051C4E}.Debug|x64.Build.0 = Debug|x64
- {AD4D8660-5128-4DAA-9CC9-BB4ABE051C4E}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {AD4D8660-5128-4DAA-9CC9-BB4ABE051C4E}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {AD4D8660-5128-4DAA-9CC9-BB4ABE051C4E}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {AD4D8660-5128-4DAA-9CC9-BB4ABE051C4E}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {AD4D8660-5128-4DAA-9CC9-BB4ABE051C4E}.Release|Win32.ActiveCfg = Release|Win32
- {AD4D8660-5128-4DAA-9CC9-BB4ABE051C4E}.Release|Win32.Build.0 = Release|Win32
- {AD4D8660-5128-4DAA-9CC9-BB4ABE051C4E}.Release|x64.ActiveCfg = Release|x64
- {AD4D8660-5128-4DAA-9CC9-BB4ABE051C4E}.Release|x64.Build.0 = Release|x64
- {AD4D8660-5128-4DAA-9CC9-BB4ABE051C4E}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {AD4D8660-5128-4DAA-9CC9-BB4ABE051C4E}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {AD4D8660-5128-4DAA-9CC9-BB4ABE051C4E}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {AD4D8660-5128-4DAA-9CC9-BB4ABE051C4E}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {D0B197BF-1409-4108-81C0-A2754CD97ADA}.Debug|Win32.ActiveCfg = Debug|Win32
- {D0B197BF-1409-4108-81C0-A2754CD97ADA}.Debug|Win32.Build.0 = Debug|Win32
- {D0B197BF-1409-4108-81C0-A2754CD97ADA}.Debug|x64.ActiveCfg = Debug|x64
- {D0B197BF-1409-4108-81C0-A2754CD97ADA}.Debug|x64.Build.0 = Debug|x64
- {D0B197BF-1409-4108-81C0-A2754CD97ADA}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {D0B197BF-1409-4108-81C0-A2754CD97ADA}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {D0B197BF-1409-4108-81C0-A2754CD97ADA}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {D0B197BF-1409-4108-81C0-A2754CD97ADA}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {D0B197BF-1409-4108-81C0-A2754CD97ADA}.Release|Win32.ActiveCfg = Release|Win32
- {D0B197BF-1409-4108-81C0-A2754CD97ADA}.Release|Win32.Build.0 = Release|Win32
- {D0B197BF-1409-4108-81C0-A2754CD97ADA}.Release|x64.ActiveCfg = Release|x64
- {D0B197BF-1409-4108-81C0-A2754CD97ADA}.Release|x64.Build.0 = Release|x64
- {D0B197BF-1409-4108-81C0-A2754CD97ADA}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {D0B197BF-1409-4108-81C0-A2754CD97ADA}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {D0B197BF-1409-4108-81C0-A2754CD97ADA}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {D0B197BF-1409-4108-81C0-A2754CD97ADA}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {CCA73A4F-96E8-48BE-A1B6-77EC3697584C}.Debug|Win32.ActiveCfg = Debug|Win32
- {CCA73A4F-96E8-48BE-A1B6-77EC3697584C}.Debug|Win32.Build.0 = Debug|Win32
- {CCA73A4F-96E8-48BE-A1B6-77EC3697584C}.Debug|x64.ActiveCfg = Debug|x64
- {CCA73A4F-96E8-48BE-A1B6-77EC3697584C}.Debug|x64.Build.0 = Debug|x64
- {CCA73A4F-96E8-48BE-A1B6-77EC3697584C}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {CCA73A4F-96E8-48BE-A1B6-77EC3697584C}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {CCA73A4F-96E8-48BE-A1B6-77EC3697584C}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {CCA73A4F-96E8-48BE-A1B6-77EC3697584C}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {CCA73A4F-96E8-48BE-A1B6-77EC3697584C}.Release|Win32.ActiveCfg = Release|Win32
- {CCA73A4F-96E8-48BE-A1B6-77EC3697584C}.Release|Win32.Build.0 = Release|Win32
- {CCA73A4F-96E8-48BE-A1B6-77EC3697584C}.Release|x64.ActiveCfg = Release|x64
- {CCA73A4F-96E8-48BE-A1B6-77EC3697584C}.Release|x64.Build.0 = Release|x64
- {CCA73A4F-96E8-48BE-A1B6-77EC3697584C}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {CCA73A4F-96E8-48BE-A1B6-77EC3697584C}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {CCA73A4F-96E8-48BE-A1B6-77EC3697584C}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {CCA73A4F-96E8-48BE-A1B6-77EC3697584C}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {8DD4CBD4-79DB-433D-86D3-FF9C61DC86A3}.Debug|Win32.ActiveCfg = Debug|Win32
- {8DD4CBD4-79DB-433D-86D3-FF9C61DC86A3}.Debug|Win32.Build.0 = Debug|Win32
- {8DD4CBD4-79DB-433D-86D3-FF9C61DC86A3}.Debug|x64.ActiveCfg = Debug|x64
- {8DD4CBD4-79DB-433D-86D3-FF9C61DC86A3}.Debug|x64.Build.0 = Debug|x64
- {8DD4CBD4-79DB-433D-86D3-FF9C61DC86A3}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {8DD4CBD4-79DB-433D-86D3-FF9C61DC86A3}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {8DD4CBD4-79DB-433D-86D3-FF9C61DC86A3}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {8DD4CBD4-79DB-433D-86D3-FF9C61DC86A3}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {8DD4CBD4-79DB-433D-86D3-FF9C61DC86A3}.Release|Win32.ActiveCfg = Release|Win32
- {8DD4CBD4-79DB-433D-86D3-FF9C61DC86A3}.Release|Win32.Build.0 = Release|Win32
- {8DD4CBD4-79DB-433D-86D3-FF9C61DC86A3}.Release|x64.ActiveCfg = Release|x64
- {8DD4CBD4-79DB-433D-86D3-FF9C61DC86A3}.Release|x64.Build.0 = Release|x64
- {8DD4CBD4-79DB-433D-86D3-FF9C61DC86A3}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {8DD4CBD4-79DB-433D-86D3-FF9C61DC86A3}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {8DD4CBD4-79DB-433D-86D3-FF9C61DC86A3}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {8DD4CBD4-79DB-433D-86D3-FF9C61DC86A3}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {8BA07548-3F40-4D95-8BF5-ED3F257ACB96}.Debug|Win32.ActiveCfg = Debug|Win32
- {8BA07548-3F40-4D95-8BF5-ED3F257ACB96}.Debug|Win32.Build.0 = Debug|Win32
- {8BA07548-3F40-4D95-8BF5-ED3F257ACB96}.Debug|x64.ActiveCfg = Debug|x64
- {8BA07548-3F40-4D95-8BF5-ED3F257ACB96}.Debug|x64.Build.0 = Debug|x64
- {8BA07548-3F40-4D95-8BF5-ED3F257ACB96}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {8BA07548-3F40-4D95-8BF5-ED3F257ACB96}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {8BA07548-3F40-4D95-8BF5-ED3F257ACB96}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {8BA07548-3F40-4D95-8BF5-ED3F257ACB96}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {8BA07548-3F40-4D95-8BF5-ED3F257ACB96}.Release|Win32.ActiveCfg = Release|Win32
- {8BA07548-3F40-4D95-8BF5-ED3F257ACB96}.Release|Win32.Build.0 = Release|Win32
- {8BA07548-3F40-4D95-8BF5-ED3F257ACB96}.Release|x64.ActiveCfg = Release|x64
- {8BA07548-3F40-4D95-8BF5-ED3F257ACB96}.Release|x64.Build.0 = Release|x64
- {8BA07548-3F40-4D95-8BF5-ED3F257ACB96}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {8BA07548-3F40-4D95-8BF5-ED3F257ACB96}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {8BA07548-3F40-4D95-8BF5-ED3F257ACB96}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {8BA07548-3F40-4D95-8BF5-ED3F257ACB96}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {33854DD9-B6AE-4BBA-9188-0A6AF2B9F098}.Debug|Win32.ActiveCfg = Debug|Win32
- {33854DD9-B6AE-4BBA-9188-0A6AF2B9F098}.Debug|Win32.Build.0 = Debug|Win32
- {33854DD9-B6AE-4BBA-9188-0A6AF2B9F098}.Debug|x64.ActiveCfg = Debug|x64
- {33854DD9-B6AE-4BBA-9188-0A6AF2B9F098}.Debug|x64.Build.0 = Debug|x64
- {33854DD9-B6AE-4BBA-9188-0A6AF2B9F098}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {33854DD9-B6AE-4BBA-9188-0A6AF2B9F098}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {33854DD9-B6AE-4BBA-9188-0A6AF2B9F098}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {33854DD9-B6AE-4BBA-9188-0A6AF2B9F098}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {33854DD9-B6AE-4BBA-9188-0A6AF2B9F098}.Release|Win32.ActiveCfg = Release|Win32
- {33854DD9-B6AE-4BBA-9188-0A6AF2B9F098}.Release|Win32.Build.0 = Release|Win32
- {33854DD9-B6AE-4BBA-9188-0A6AF2B9F098}.Release|x64.ActiveCfg = Release|x64
- {33854DD9-B6AE-4BBA-9188-0A6AF2B9F098}.Release|x64.Build.0 = Release|x64
- {33854DD9-B6AE-4BBA-9188-0A6AF2B9F098}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {33854DD9-B6AE-4BBA-9188-0A6AF2B9F098}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {33854DD9-B6AE-4BBA-9188-0A6AF2B9F098}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {33854DD9-B6AE-4BBA-9188-0A6AF2B9F098}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {4B5696EE-C2E8-49D1-A0ED-4E54AF811221}.Debug|Win32.ActiveCfg = Debug|Win32
- {4B5696EE-C2E8-49D1-A0ED-4E54AF811221}.Debug|Win32.Build.0 = Debug|Win32
- {4B5696EE-C2E8-49D1-A0ED-4E54AF811221}.Debug|x64.ActiveCfg = Debug|x64
- {4B5696EE-C2E8-49D1-A0ED-4E54AF811221}.Debug|x64.Build.0 = Debug|x64
- {4B5696EE-C2E8-49D1-A0ED-4E54AF811221}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {4B5696EE-C2E8-49D1-A0ED-4E54AF811221}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {4B5696EE-C2E8-49D1-A0ED-4E54AF811221}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {4B5696EE-C2E8-49D1-A0ED-4E54AF811221}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {4B5696EE-C2E8-49D1-A0ED-4E54AF811221}.Release|Win32.ActiveCfg = Release|Win32
- {4B5696EE-C2E8-49D1-A0ED-4E54AF811221}.Release|Win32.Build.0 = Release|Win32
- {4B5696EE-C2E8-49D1-A0ED-4E54AF811221}.Release|x64.ActiveCfg = Release|x64
- {4B5696EE-C2E8-49D1-A0ED-4E54AF811221}.Release|x64.Build.0 = Release|x64
- {4B5696EE-C2E8-49D1-A0ED-4E54AF811221}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {4B5696EE-C2E8-49D1-A0ED-4E54AF811221}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {4B5696EE-C2E8-49D1-A0ED-4E54AF811221}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {4B5696EE-C2E8-49D1-A0ED-4E54AF811221}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {6C98CBEC-6EEF-472F-9BD2-80CF04B58E84}.Debug|Win32.ActiveCfg = Debug|Win32
- {6C98CBEC-6EEF-472F-9BD2-80CF04B58E84}.Debug|Win32.Build.0 = Debug|Win32
- {6C98CBEC-6EEF-472F-9BD2-80CF04B58E84}.Debug|x64.ActiveCfg = Debug|x64
- {6C98CBEC-6EEF-472F-9BD2-80CF04B58E84}.Debug|x64.Build.0 = Debug|x64
- {6C98CBEC-6EEF-472F-9BD2-80CF04B58E84}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {6C98CBEC-6EEF-472F-9BD2-80CF04B58E84}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {6C98CBEC-6EEF-472F-9BD2-80CF04B58E84}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {6C98CBEC-6EEF-472F-9BD2-80CF04B58E84}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {6C98CBEC-6EEF-472F-9BD2-80CF04B58E84}.Release|Win32.ActiveCfg = Release|Win32
- {6C98CBEC-6EEF-472F-9BD2-80CF04B58E84}.Release|Win32.Build.0 = Release|Win32
- {6C98CBEC-6EEF-472F-9BD2-80CF04B58E84}.Release|x64.ActiveCfg = Release|x64
- {6C98CBEC-6EEF-472F-9BD2-80CF04B58E84}.Release|x64.Build.0 = Release|x64
- {6C98CBEC-6EEF-472F-9BD2-80CF04B58E84}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {6C98CBEC-6EEF-472F-9BD2-80CF04B58E84}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {6C98CBEC-6EEF-472F-9BD2-80CF04B58E84}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {6C98CBEC-6EEF-472F-9BD2-80CF04B58E84}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {AED09298-117B-4D01-8C01-45F820D3BDE8}.Debug|Win32.ActiveCfg = Debug|Win32
- {AED09298-117B-4D01-8C01-45F820D3BDE8}.Debug|Win32.Build.0 = Debug|Win32
- {AED09298-117B-4D01-8C01-45F820D3BDE8}.Debug|x64.ActiveCfg = Debug|x64
- {AED09298-117B-4D01-8C01-45F820D3BDE8}.Debug|x64.Build.0 = Debug|x64
- {AED09298-117B-4D01-8C01-45F820D3BDE8}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {AED09298-117B-4D01-8C01-45F820D3BDE8}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {AED09298-117B-4D01-8C01-45F820D3BDE8}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {AED09298-117B-4D01-8C01-45F820D3BDE8}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {AED09298-117B-4D01-8C01-45F820D3BDE8}.Release|Win32.ActiveCfg = Release|Win32
- {AED09298-117B-4D01-8C01-45F820D3BDE8}.Release|Win32.Build.0 = Release|Win32
- {AED09298-117B-4D01-8C01-45F820D3BDE8}.Release|x64.ActiveCfg = Release|x64
- {AED09298-117B-4D01-8C01-45F820D3BDE8}.Release|x64.Build.0 = Release|x64
- {AED09298-117B-4D01-8C01-45F820D3BDE8}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {AED09298-117B-4D01-8C01-45F820D3BDE8}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {AED09298-117B-4D01-8C01-45F820D3BDE8}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {AED09298-117B-4D01-8C01-45F820D3BDE8}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {E85FC734-1E47-413F-82E3-A83908FC3A77}.Debug|Win32.ActiveCfg = Debug|Win32
- {E85FC734-1E47-413F-82E3-A83908FC3A77}.Debug|Win32.Build.0 = Debug|Win32
- {E85FC734-1E47-413F-82E3-A83908FC3A77}.Debug|x64.ActiveCfg = Debug|x64
- {E85FC734-1E47-413F-82E3-A83908FC3A77}.Debug|x64.Build.0 = Debug|x64
- {E85FC734-1E47-413F-82E3-A83908FC3A77}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {E85FC734-1E47-413F-82E3-A83908FC3A77}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {E85FC734-1E47-413F-82E3-A83908FC3A77}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {E85FC734-1E47-413F-82E3-A83908FC3A77}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {E85FC734-1E47-413F-82E3-A83908FC3A77}.Release|Win32.ActiveCfg = Release|Win32
- {E85FC734-1E47-413F-82E3-A83908FC3A77}.Release|Win32.Build.0 = Release|Win32
- {E85FC734-1E47-413F-82E3-A83908FC3A77}.Release|x64.ActiveCfg = Release|x64
- {E85FC734-1E47-413F-82E3-A83908FC3A77}.Release|x64.Build.0 = Release|x64
- {E85FC734-1E47-413F-82E3-A83908FC3A77}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {E85FC734-1E47-413F-82E3-A83908FC3A77}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {E85FC734-1E47-413F-82E3-A83908FC3A77}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {E85FC734-1E47-413F-82E3-A83908FC3A77}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {D2928CA0-E664-4C71-9254-AD1B1CB9A201}.Debug|Win32.ActiveCfg = Debug|Win32
- {D2928CA0-E664-4C71-9254-AD1B1CB9A201}.Debug|Win32.Build.0 = Debug|Win32
- {D2928CA0-E664-4C71-9254-AD1B1CB9A201}.Debug|x64.ActiveCfg = Debug|x64
- {D2928CA0-E664-4C71-9254-AD1B1CB9A201}.Debug|x64.Build.0 = Debug|x64
- {D2928CA0-E664-4C71-9254-AD1B1CB9A201}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {D2928CA0-E664-4C71-9254-AD1B1CB9A201}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {D2928CA0-E664-4C71-9254-AD1B1CB9A201}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {D2928CA0-E664-4C71-9254-AD1B1CB9A201}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {D2928CA0-E664-4C71-9254-AD1B1CB9A201}.Release|Win32.ActiveCfg = Release|Win32
- {D2928CA0-E664-4C71-9254-AD1B1CB9A201}.Release|Win32.Build.0 = Release|Win32
- {D2928CA0-E664-4C71-9254-AD1B1CB9A201}.Release|x64.ActiveCfg = Release|x64
- {D2928CA0-E664-4C71-9254-AD1B1CB9A201}.Release|x64.Build.0 = Release|x64
- {D2928CA0-E664-4C71-9254-AD1B1CB9A201}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {D2928CA0-E664-4C71-9254-AD1B1CB9A201}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {D2928CA0-E664-4C71-9254-AD1B1CB9A201}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {D2928CA0-E664-4C71-9254-AD1B1CB9A201}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {924EF5EC-35C3-41A2-AB29-827D491DA574}.Debug|Win32.ActiveCfg = Debug|Win32
- {924EF5EC-35C3-41A2-AB29-827D491DA574}.Debug|Win32.Build.0 = Debug|Win32
- {924EF5EC-35C3-41A2-AB29-827D491DA574}.Debug|x64.ActiveCfg = Debug|x64
- {924EF5EC-35C3-41A2-AB29-827D491DA574}.Debug|x64.Build.0 = Debug|x64
- {924EF5EC-35C3-41A2-AB29-827D491DA574}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {924EF5EC-35C3-41A2-AB29-827D491DA574}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {924EF5EC-35C3-41A2-AB29-827D491DA574}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {924EF5EC-35C3-41A2-AB29-827D491DA574}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {924EF5EC-35C3-41A2-AB29-827D491DA574}.Release|Win32.ActiveCfg = Release|Win32
- {924EF5EC-35C3-41A2-AB29-827D491DA574}.Release|Win32.Build.0 = Release|Win32
- {924EF5EC-35C3-41A2-AB29-827D491DA574}.Release|x64.ActiveCfg = Release|x64
- {924EF5EC-35C3-41A2-AB29-827D491DA574}.Release|x64.Build.0 = Release|x64
- {924EF5EC-35C3-41A2-AB29-827D491DA574}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {924EF5EC-35C3-41A2-AB29-827D491DA574}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {924EF5EC-35C3-41A2-AB29-827D491DA574}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {924EF5EC-35C3-41A2-AB29-827D491DA574}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {42E5A984-7EA8-4DF0-9918-970247935C64}.Debug|Win32.ActiveCfg = Debug|Win32
- {42E5A984-7EA8-4DF0-9918-970247935C64}.Debug|Win32.Build.0 = Debug|Win32
- {42E5A984-7EA8-4DF0-9918-970247935C64}.Debug|x64.ActiveCfg = Debug|x64
- {42E5A984-7EA8-4DF0-9918-970247935C64}.Debug|x64.Build.0 = Debug|x64
- {42E5A984-7EA8-4DF0-9918-970247935C64}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {42E5A984-7EA8-4DF0-9918-970247935C64}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {42E5A984-7EA8-4DF0-9918-970247935C64}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {42E5A984-7EA8-4DF0-9918-970247935C64}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {42E5A984-7EA8-4DF0-9918-970247935C64}.Release|Win32.ActiveCfg = Release|Win32
- {42E5A984-7EA8-4DF0-9918-970247935C64}.Release|Win32.Build.0 = Release|Win32
- {42E5A984-7EA8-4DF0-9918-970247935C64}.Release|x64.ActiveCfg = Release|x64
- {42E5A984-7EA8-4DF0-9918-970247935C64}.Release|x64.Build.0 = Release|x64
- {42E5A984-7EA8-4DF0-9918-970247935C64}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {42E5A984-7EA8-4DF0-9918-970247935C64}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {42E5A984-7EA8-4DF0-9918-970247935C64}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {42E5A984-7EA8-4DF0-9918-970247935C64}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {3684FA7A-0E39-4377-876F-17FA3C6869F2}.Debug|Win32.ActiveCfg = Debug|Win32
- {3684FA7A-0E39-4377-876F-17FA3C6869F2}.Debug|Win32.Build.0 = Debug|Win32
- {3684FA7A-0E39-4377-876F-17FA3C6869F2}.Debug|x64.ActiveCfg = Debug|x64
- {3684FA7A-0E39-4377-876F-17FA3C6869F2}.Debug|x64.Build.0 = Debug|x64
- {3684FA7A-0E39-4377-876F-17FA3C6869F2}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {3684FA7A-0E39-4377-876F-17FA3C6869F2}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {3684FA7A-0E39-4377-876F-17FA3C6869F2}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {3684FA7A-0E39-4377-876F-17FA3C6869F2}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {3684FA7A-0E39-4377-876F-17FA3C6869F2}.Release|Win32.ActiveCfg = Release|Win32
- {3684FA7A-0E39-4377-876F-17FA3C6869F2}.Release|Win32.Build.0 = Release|Win32
- {3684FA7A-0E39-4377-876F-17FA3C6869F2}.Release|x64.ActiveCfg = Release|x64
- {3684FA7A-0E39-4377-876F-17FA3C6869F2}.Release|x64.Build.0 = Release|x64
- {3684FA7A-0E39-4377-876F-17FA3C6869F2}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {3684FA7A-0E39-4377-876F-17FA3C6869F2}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {3684FA7A-0E39-4377-876F-17FA3C6869F2}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {3684FA7A-0E39-4377-876F-17FA3C6869F2}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {69D59444-9FA8-41D4-82AC-1CA12A8F160F}.Debug|Win32.ActiveCfg = Debug|Win32
- {69D59444-9FA8-41D4-82AC-1CA12A8F160F}.Debug|Win32.Build.0 = Debug|Win32
- {69D59444-9FA8-41D4-82AC-1CA12A8F160F}.Debug|x64.ActiveCfg = Debug|x64
- {69D59444-9FA8-41D4-82AC-1CA12A8F160F}.Debug|x64.Build.0 = Debug|x64
- {69D59444-9FA8-41D4-82AC-1CA12A8F160F}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {69D59444-9FA8-41D4-82AC-1CA12A8F160F}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {69D59444-9FA8-41D4-82AC-1CA12A8F160F}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {69D59444-9FA8-41D4-82AC-1CA12A8F160F}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {69D59444-9FA8-41D4-82AC-1CA12A8F160F}.Release|Win32.ActiveCfg = Release|Win32
- {69D59444-9FA8-41D4-82AC-1CA12A8F160F}.Release|Win32.Build.0 = Release|Win32
- {69D59444-9FA8-41D4-82AC-1CA12A8F160F}.Release|x64.ActiveCfg = Release|x64
- {69D59444-9FA8-41D4-82AC-1CA12A8F160F}.Release|x64.Build.0 = Release|x64
- {69D59444-9FA8-41D4-82AC-1CA12A8F160F}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {69D59444-9FA8-41D4-82AC-1CA12A8F160F}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {69D59444-9FA8-41D4-82AC-1CA12A8F160F}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {69D59444-9FA8-41D4-82AC-1CA12A8F160F}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {C015E441-C32E-4F5F-9DCA-9B9329E3B7C0}.Debug|Win32.ActiveCfg = Debug|Win32
- {C015E441-C32E-4F5F-9DCA-9B9329E3B7C0}.Debug|Win32.Build.0 = Debug|Win32
- {C015E441-C32E-4F5F-9DCA-9B9329E3B7C0}.Debug|x64.ActiveCfg = Debug|x64
- {C015E441-C32E-4F5F-9DCA-9B9329E3B7C0}.Debug|x64.Build.0 = Debug|x64
- {C015E441-C32E-4F5F-9DCA-9B9329E3B7C0}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {C015E441-C32E-4F5F-9DCA-9B9329E3B7C0}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {C015E441-C32E-4F5F-9DCA-9B9329E3B7C0}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {C015E441-C32E-4F5F-9DCA-9B9329E3B7C0}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {C015E441-C32E-4F5F-9DCA-9B9329E3B7C0}.Release|Win32.ActiveCfg = Release|Win32
- {C015E441-C32E-4F5F-9DCA-9B9329E3B7C0}.Release|Win32.Build.0 = Release|Win32
- {C015E441-C32E-4F5F-9DCA-9B9329E3B7C0}.Release|x64.ActiveCfg = Release|x64
- {C015E441-C32E-4F5F-9DCA-9B9329E3B7C0}.Release|x64.Build.0 = Release|x64
- {C015E441-C32E-4F5F-9DCA-9B9329E3B7C0}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {C015E441-C32E-4F5F-9DCA-9B9329E3B7C0}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {C015E441-C32E-4F5F-9DCA-9B9329E3B7C0}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {C015E441-C32E-4F5F-9DCA-9B9329E3B7C0}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {8C72F165-0AC2-4462-BAB9-8AE276273AC0}.Debug|Win32.ActiveCfg = Debug|Win32
- {8C72F165-0AC2-4462-BAB9-8AE276273AC0}.Debug|Win32.Build.0 = Debug|Win32
- {8C72F165-0AC2-4462-BAB9-8AE276273AC0}.Debug|x64.ActiveCfg = Debug|x64
- {8C72F165-0AC2-4462-BAB9-8AE276273AC0}.Debug|x64.Build.0 = Debug|x64
- {8C72F165-0AC2-4462-BAB9-8AE276273AC0}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {8C72F165-0AC2-4462-BAB9-8AE276273AC0}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {8C72F165-0AC2-4462-BAB9-8AE276273AC0}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {8C72F165-0AC2-4462-BAB9-8AE276273AC0}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {8C72F165-0AC2-4462-BAB9-8AE276273AC0}.Release|Win32.ActiveCfg = Release|Win32
- {8C72F165-0AC2-4462-BAB9-8AE276273AC0}.Release|Win32.Build.0 = Release|Win32
- {8C72F165-0AC2-4462-BAB9-8AE276273AC0}.Release|x64.ActiveCfg = Release|x64
- {8C72F165-0AC2-4462-BAB9-8AE276273AC0}.Release|x64.Build.0 = Release|x64
- {8C72F165-0AC2-4462-BAB9-8AE276273AC0}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {8C72F165-0AC2-4462-BAB9-8AE276273AC0}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {8C72F165-0AC2-4462-BAB9-8AE276273AC0}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {8C72F165-0AC2-4462-BAB9-8AE276273AC0}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {914A88CB-0667-40BC-8F0F-4594BA7B9D85}.Debug|Win32.ActiveCfg = Debug|Win32
- {914A88CB-0667-40BC-8F0F-4594BA7B9D85}.Debug|Win32.Build.0 = Debug|Win32
- {914A88CB-0667-40BC-8F0F-4594BA7B9D85}.Debug|x64.ActiveCfg = Debug|x64
- {914A88CB-0667-40BC-8F0F-4594BA7B9D85}.Debug|x64.Build.0 = Debug|x64
- {914A88CB-0667-40BC-8F0F-4594BA7B9D85}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {914A88CB-0667-40BC-8F0F-4594BA7B9D85}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {914A88CB-0667-40BC-8F0F-4594BA7B9D85}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {914A88CB-0667-40BC-8F0F-4594BA7B9D85}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {914A88CB-0667-40BC-8F0F-4594BA7B9D85}.Release|Win32.ActiveCfg = Release|Win32
- {914A88CB-0667-40BC-8F0F-4594BA7B9D85}.Release|Win32.Build.0 = Release|Win32
- {914A88CB-0667-40BC-8F0F-4594BA7B9D85}.Release|x64.ActiveCfg = Release|x64
- {914A88CB-0667-40BC-8F0F-4594BA7B9D85}.Release|x64.Build.0 = Release|x64
- {914A88CB-0667-40BC-8F0F-4594BA7B9D85}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {914A88CB-0667-40BC-8F0F-4594BA7B9D85}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {914A88CB-0667-40BC-8F0F-4594BA7B9D85}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {914A88CB-0667-40BC-8F0F-4594BA7B9D85}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {805D635B-FA95-4A2B-A5DD-1EC3667AE7B1}.Debug|Win32.ActiveCfg = Debug|Win32
- {805D635B-FA95-4A2B-A5DD-1EC3667AE7B1}.Debug|Win32.Build.0 = Debug|Win32
- {805D635B-FA95-4A2B-A5DD-1EC3667AE7B1}.Debug|x64.ActiveCfg = Debug|x64
- {805D635B-FA95-4A2B-A5DD-1EC3667AE7B1}.Debug|x64.Build.0 = Debug|x64
- {805D635B-FA95-4A2B-A5DD-1EC3667AE7B1}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {805D635B-FA95-4A2B-A5DD-1EC3667AE7B1}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {805D635B-FA95-4A2B-A5DD-1EC3667AE7B1}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {805D635B-FA95-4A2B-A5DD-1EC3667AE7B1}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {805D635B-FA95-4A2B-A5DD-1EC3667AE7B1}.Release|Win32.ActiveCfg = Release|Win32
- {805D635B-FA95-4A2B-A5DD-1EC3667AE7B1}.Release|Win32.Build.0 = Release|Win32
- {805D635B-FA95-4A2B-A5DD-1EC3667AE7B1}.Release|x64.ActiveCfg = Release|x64
- {805D635B-FA95-4A2B-A5DD-1EC3667AE7B1}.Release|x64.Build.0 = Release|x64
- {805D635B-FA95-4A2B-A5DD-1EC3667AE7B1}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {805D635B-FA95-4A2B-A5DD-1EC3667AE7B1}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {805D635B-FA95-4A2B-A5DD-1EC3667AE7B1}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {805D635B-FA95-4A2B-A5DD-1EC3667AE7B1}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {9AA6C9C9-1442-48CD-BD94-F134953418A9}.Debug|Win32.ActiveCfg = Debug|Win32
- {9AA6C9C9-1442-48CD-BD94-F134953418A9}.Debug|Win32.Build.0 = Debug|Win32
- {9AA6C9C9-1442-48CD-BD94-F134953418A9}.Debug|x64.ActiveCfg = Debug|x64
- {9AA6C9C9-1442-48CD-BD94-F134953418A9}.Debug|x64.Build.0 = Debug|x64
- {9AA6C9C9-1442-48CD-BD94-F134953418A9}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {9AA6C9C9-1442-48CD-BD94-F134953418A9}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {9AA6C9C9-1442-48CD-BD94-F134953418A9}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {9AA6C9C9-1442-48CD-BD94-F134953418A9}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {9AA6C9C9-1442-48CD-BD94-F134953418A9}.Release|Win32.ActiveCfg = Release|Win32
- {9AA6C9C9-1442-48CD-BD94-F134953418A9}.Release|Win32.Build.0 = Release|Win32
- {9AA6C9C9-1442-48CD-BD94-F134953418A9}.Release|x64.ActiveCfg = Release|x64
- {9AA6C9C9-1442-48CD-BD94-F134953418A9}.Release|x64.Build.0 = Release|x64
- {9AA6C9C9-1442-48CD-BD94-F134953418A9}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {9AA6C9C9-1442-48CD-BD94-F134953418A9}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {9AA6C9C9-1442-48CD-BD94-F134953418A9}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {9AA6C9C9-1442-48CD-BD94-F134953418A9}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {74C9A79B-EAE3-46B3-848E-73C3B5F679B9}.Debug|Win32.ActiveCfg = Debug|Win32
- {74C9A79B-EAE3-46B3-848E-73C3B5F679B9}.Debug|Win32.Build.0 = Debug|Win32
- {74C9A79B-EAE3-46B3-848E-73C3B5F679B9}.Debug|x64.ActiveCfg = Debug|x64
- {74C9A79B-EAE3-46B3-848E-73C3B5F679B9}.Debug|x64.Build.0 = Debug|x64
- {74C9A79B-EAE3-46B3-848E-73C3B5F679B9}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {74C9A79B-EAE3-46B3-848E-73C3B5F679B9}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {74C9A79B-EAE3-46B3-848E-73C3B5F679B9}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {74C9A79B-EAE3-46B3-848E-73C3B5F679B9}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {74C9A79B-EAE3-46B3-848E-73C3B5F679B9}.Release|Win32.ActiveCfg = Release|Win32
- {74C9A79B-EAE3-46B3-848E-73C3B5F679B9}.Release|Win32.Build.0 = Release|Win32
- {74C9A79B-EAE3-46B3-848E-73C3B5F679B9}.Release|x64.ActiveCfg = Release|x64
- {74C9A79B-EAE3-46B3-848E-73C3B5F679B9}.Release|x64.Build.0 = Release|x64
- {74C9A79B-EAE3-46B3-848E-73C3B5F679B9}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {74C9A79B-EAE3-46B3-848E-73C3B5F679B9}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {74C9A79B-EAE3-46B3-848E-73C3B5F679B9}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {74C9A79B-EAE3-46B3-848E-73C3B5F679B9}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {3BF6CF52-B403-4F8A-8DD5-4F1CF619CCC9}.Debug|Win32.ActiveCfg = Debug|Win32
- {3BF6CF52-B403-4F8A-8DD5-4F1CF619CCC9}.Debug|Win32.Build.0 = Debug|Win32
- {3BF6CF52-B403-4F8A-8DD5-4F1CF619CCC9}.Debug|x64.ActiveCfg = Debug|x64
- {3BF6CF52-B403-4F8A-8DD5-4F1CF619CCC9}.Debug|x64.Build.0 = Debug|x64
- {3BF6CF52-B403-4F8A-8DD5-4F1CF619CCC9}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {3BF6CF52-B403-4F8A-8DD5-4F1CF619CCC9}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {3BF6CF52-B403-4F8A-8DD5-4F1CF619CCC9}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {3BF6CF52-B403-4F8A-8DD5-4F1CF619CCC9}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {3BF6CF52-B403-4F8A-8DD5-4F1CF619CCC9}.Release|Win32.ActiveCfg = Release|Win32
- {3BF6CF52-B403-4F8A-8DD5-4F1CF619CCC9}.Release|Win32.Build.0 = Release|Win32
- {3BF6CF52-B403-4F8A-8DD5-4F1CF619CCC9}.Release|x64.ActiveCfg = Release|x64
- {3BF6CF52-B403-4F8A-8DD5-4F1CF619CCC9}.Release|x64.Build.0 = Release|x64
- {3BF6CF52-B403-4F8A-8DD5-4F1CF619CCC9}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {3BF6CF52-B403-4F8A-8DD5-4F1CF619CCC9}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {3BF6CF52-B403-4F8A-8DD5-4F1CF619CCC9}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {3BF6CF52-B403-4F8A-8DD5-4F1CF619CCC9}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {BB120D1D-3A68-4107-A8A1-427E448DEA98}.Debug|Win32.ActiveCfg = Debug|Win32
- {BB120D1D-3A68-4107-A8A1-427E448DEA98}.Debug|Win32.Build.0 = Debug|Win32
- {BB120D1D-3A68-4107-A8A1-427E448DEA98}.Debug|x64.ActiveCfg = Debug|x64
- {BB120D1D-3A68-4107-A8A1-427E448DEA98}.Debug|x64.Build.0 = Debug|x64
- {BB120D1D-3A68-4107-A8A1-427E448DEA98}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {BB120D1D-3A68-4107-A8A1-427E448DEA98}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {BB120D1D-3A68-4107-A8A1-427E448DEA98}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {BB120D1D-3A68-4107-A8A1-427E448DEA98}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {BB120D1D-3A68-4107-A8A1-427E448DEA98}.Release|Win32.ActiveCfg = Release|Win32
- {BB120D1D-3A68-4107-A8A1-427E448DEA98}.Release|Win32.Build.0 = Release|Win32
- {BB120D1D-3A68-4107-A8A1-427E448DEA98}.Release|x64.ActiveCfg = Release|x64
- {BB120D1D-3A68-4107-A8A1-427E448DEA98}.Release|x64.Build.0 = Release|x64
- {BB120D1D-3A68-4107-A8A1-427E448DEA98}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {BB120D1D-3A68-4107-A8A1-427E448DEA98}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {BB120D1D-3A68-4107-A8A1-427E448DEA98}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {BB120D1D-3A68-4107-A8A1-427E448DEA98}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {6F58FEBB-1C0A-4C28-B0D4-82629AC0E1C6}.Debug|Win32.ActiveCfg = Debug|Win32
- {6F58FEBB-1C0A-4C28-B0D4-82629AC0E1C6}.Debug|Win32.Build.0 = Debug|Win32
- {6F58FEBB-1C0A-4C28-B0D4-82629AC0E1C6}.Debug|x64.ActiveCfg = Debug|x64
- {6F58FEBB-1C0A-4C28-B0D4-82629AC0E1C6}.Debug|x64.Build.0 = Debug|x64
- {6F58FEBB-1C0A-4C28-B0D4-82629AC0E1C6}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {6F58FEBB-1C0A-4C28-B0D4-82629AC0E1C6}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {6F58FEBB-1C0A-4C28-B0D4-82629AC0E1C6}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {6F58FEBB-1C0A-4C28-B0D4-82629AC0E1C6}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {6F58FEBB-1C0A-4C28-B0D4-82629AC0E1C6}.Release|Win32.ActiveCfg = Release|Win32
- {6F58FEBB-1C0A-4C28-B0D4-82629AC0E1C6}.Release|Win32.Build.0 = Release|Win32
- {6F58FEBB-1C0A-4C28-B0D4-82629AC0E1C6}.Release|x64.ActiveCfg = Release|x64
- {6F58FEBB-1C0A-4C28-B0D4-82629AC0E1C6}.Release|x64.Build.0 = Release|x64
- {6F58FEBB-1C0A-4C28-B0D4-82629AC0E1C6}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {6F58FEBB-1C0A-4C28-B0D4-82629AC0E1C6}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {6F58FEBB-1C0A-4C28-B0D4-82629AC0E1C6}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {6F58FEBB-1C0A-4C28-B0D4-82629AC0E1C6}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {002CC81D-C6AF-4AED-8624-301D0E13ED46}.Debug|Win32.ActiveCfg = Debug|Win32
- {002CC81D-C6AF-4AED-8624-301D0E13ED46}.Debug|Win32.Build.0 = Debug|Win32
- {002CC81D-C6AF-4AED-8624-301D0E13ED46}.Debug|x64.ActiveCfg = Debug|x64
- {002CC81D-C6AF-4AED-8624-301D0E13ED46}.Debug|x64.Build.0 = Debug|x64
- {002CC81D-C6AF-4AED-8624-301D0E13ED46}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {002CC81D-C6AF-4AED-8624-301D0E13ED46}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {002CC81D-C6AF-4AED-8624-301D0E13ED46}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {002CC81D-C6AF-4AED-8624-301D0E13ED46}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {002CC81D-C6AF-4AED-8624-301D0E13ED46}.Release|Win32.ActiveCfg = Release|Win32
- {002CC81D-C6AF-4AED-8624-301D0E13ED46}.Release|Win32.Build.0 = Release|Win32
- {002CC81D-C6AF-4AED-8624-301D0E13ED46}.Release|x64.ActiveCfg = Release|x64
- {002CC81D-C6AF-4AED-8624-301D0E13ED46}.Release|x64.Build.0 = Release|x64
- {002CC81D-C6AF-4AED-8624-301D0E13ED46}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {002CC81D-C6AF-4AED-8624-301D0E13ED46}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {002CC81D-C6AF-4AED-8624-301D0E13ED46}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {002CC81D-C6AF-4AED-8624-301D0E13ED46}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {808F70AF-6AA9-49CB-A7AE-28E85C1D22FE}.Debug|Win32.ActiveCfg = Debug|Win32
- {808F70AF-6AA9-49CB-A7AE-28E85C1D22FE}.Debug|Win32.Build.0 = Debug|Win32
- {808F70AF-6AA9-49CB-A7AE-28E85C1D22FE}.Debug|x64.ActiveCfg = Debug|x64
- {808F70AF-6AA9-49CB-A7AE-28E85C1D22FE}.Debug|x64.Build.0 = Debug|x64
- {808F70AF-6AA9-49CB-A7AE-28E85C1D22FE}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {808F70AF-6AA9-49CB-A7AE-28E85C1D22FE}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {808F70AF-6AA9-49CB-A7AE-28E85C1D22FE}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {808F70AF-6AA9-49CB-A7AE-28E85C1D22FE}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {808F70AF-6AA9-49CB-A7AE-28E85C1D22FE}.Release|Win32.ActiveCfg = Release|Win32
- {808F70AF-6AA9-49CB-A7AE-28E85C1D22FE}.Release|Win32.Build.0 = Release|Win32
- {808F70AF-6AA9-49CB-A7AE-28E85C1D22FE}.Release|x64.ActiveCfg = Release|x64
- {808F70AF-6AA9-49CB-A7AE-28E85C1D22FE}.Release|x64.Build.0 = Release|x64
- {808F70AF-6AA9-49CB-A7AE-28E85C1D22FE}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {808F70AF-6AA9-49CB-A7AE-28E85C1D22FE}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {808F70AF-6AA9-49CB-A7AE-28E85C1D22FE}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {808F70AF-6AA9-49CB-A7AE-28E85C1D22FE}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {A73BBA44-40FF-4306-AF50-94737CD49839}.Debug|Win32.ActiveCfg = Debug|Win32
- {A73BBA44-40FF-4306-AF50-94737CD49839}.Debug|Win32.Build.0 = Debug|Win32
- {A73BBA44-40FF-4306-AF50-94737CD49839}.Debug|x64.ActiveCfg = Debug|x64
- {A73BBA44-40FF-4306-AF50-94737CD49839}.Debug|x64.Build.0 = Debug|x64
- {A73BBA44-40FF-4306-AF50-94737CD49839}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {A73BBA44-40FF-4306-AF50-94737CD49839}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {A73BBA44-40FF-4306-AF50-94737CD49839}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {A73BBA44-40FF-4306-AF50-94737CD49839}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {A73BBA44-40FF-4306-AF50-94737CD49839}.Release|Win32.ActiveCfg = Release|Win32
- {A73BBA44-40FF-4306-AF50-94737CD49839}.Release|Win32.Build.0 = Release|Win32
- {A73BBA44-40FF-4306-AF50-94737CD49839}.Release|x64.ActiveCfg = Release|x64
- {A73BBA44-40FF-4306-AF50-94737CD49839}.Release|x64.Build.0 = Release|x64
- {A73BBA44-40FF-4306-AF50-94737CD49839}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {A73BBA44-40FF-4306-AF50-94737CD49839}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {A73BBA44-40FF-4306-AF50-94737CD49839}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {A73BBA44-40FF-4306-AF50-94737CD49839}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {4502FEB5-256A-4E4E-A8EF-34F7C7FC09DB}.Debug|Win32.ActiveCfg = Debug|Win32
- {4502FEB5-256A-4E4E-A8EF-34F7C7FC09DB}.Debug|Win32.Build.0 = Debug|Win32
- {4502FEB5-256A-4E4E-A8EF-34F7C7FC09DB}.Debug|x64.ActiveCfg = Debug|x64
- {4502FEB5-256A-4E4E-A8EF-34F7C7FC09DB}.Debug|x64.Build.0 = Debug|x64
- {4502FEB5-256A-4E4E-A8EF-34F7C7FC09DB}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {4502FEB5-256A-4E4E-A8EF-34F7C7FC09DB}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {4502FEB5-256A-4E4E-A8EF-34F7C7FC09DB}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {4502FEB5-256A-4E4E-A8EF-34F7C7FC09DB}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {4502FEB5-256A-4E4E-A8EF-34F7C7FC09DB}.Release|Win32.ActiveCfg = Release|Win32
- {4502FEB5-256A-4E4E-A8EF-34F7C7FC09DB}.Release|Win32.Build.0 = Release|Win32
- {4502FEB5-256A-4E4E-A8EF-34F7C7FC09DB}.Release|x64.ActiveCfg = Release|x64
- {4502FEB5-256A-4E4E-A8EF-34F7C7FC09DB}.Release|x64.Build.0 = Release|x64
- {4502FEB5-256A-4E4E-A8EF-34F7C7FC09DB}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {4502FEB5-256A-4E4E-A8EF-34F7C7FC09DB}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {4502FEB5-256A-4E4E-A8EF-34F7C7FC09DB}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {4502FEB5-256A-4E4E-A8EF-34F7C7FC09DB}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}.Debug|Win32.ActiveCfg = Debug|Win32
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}.Debug|Win32.Build.0 = Debug|Win32
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}.Debug|x64.ActiveCfg = Debug|x64
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}.Debug|x64.Build.0 = Debug|x64
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}.Release|Win32.ActiveCfg = Release|Win32
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}.Release|Win32.Build.0 = Release|Win32
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}.Release|x64.ActiveCfg = Release|x64
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}.Release|x64.Build.0 = Release|x64
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {E29B255C-2B3A-4E74-85E1-6CD033DFA55D}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {AFDEDE71-796D-4896-BEE6-AFFC4F77CC09}.Debug|Win32.ActiveCfg = Debug|Win32
- {AFDEDE71-796D-4896-BEE6-AFFC4F77CC09}.Debug|Win32.Build.0 = Debug|Win32
- {AFDEDE71-796D-4896-BEE6-AFFC4F77CC09}.Debug|x64.ActiveCfg = Debug|x64
- {AFDEDE71-796D-4896-BEE6-AFFC4F77CC09}.Debug|x64.Build.0 = Debug|x64
- {AFDEDE71-796D-4896-BEE6-AFFC4F77CC09}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {AFDEDE71-796D-4896-BEE6-AFFC4F77CC09}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {AFDEDE71-796D-4896-BEE6-AFFC4F77CC09}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {AFDEDE71-796D-4896-BEE6-AFFC4F77CC09}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {AFDEDE71-796D-4896-BEE6-AFFC4F77CC09}.Release|Win32.ActiveCfg = Release|Win32
- {AFDEDE71-796D-4896-BEE6-AFFC4F77CC09}.Release|Win32.Build.0 = Release|Win32
- {AFDEDE71-796D-4896-BEE6-AFFC4F77CC09}.Release|x64.ActiveCfg = Release|x64
- {AFDEDE71-796D-4896-BEE6-AFFC4F77CC09}.Release|x64.Build.0 = Release|x64
- {AFDEDE71-796D-4896-BEE6-AFFC4F77CC09}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {AFDEDE71-796D-4896-BEE6-AFFC4F77CC09}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {AFDEDE71-796D-4896-BEE6-AFFC4F77CC09}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {AFDEDE71-796D-4896-BEE6-AFFC4F77CC09}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {3C4476FB-5518-425A-9D4E-44DD91068776}.Debug|Win32.ActiveCfg = Debug|Win32
- {3C4476FB-5518-425A-9D4E-44DD91068776}.Debug|Win32.Build.0 = Debug|Win32
- {3C4476FB-5518-425A-9D4E-44DD91068776}.Debug|x64.ActiveCfg = Debug|x64
- {3C4476FB-5518-425A-9D4E-44DD91068776}.Debug|x64.Build.0 = Debug|x64
- {3C4476FB-5518-425A-9D4E-44DD91068776}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {3C4476FB-5518-425A-9D4E-44DD91068776}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {3C4476FB-5518-425A-9D4E-44DD91068776}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {3C4476FB-5518-425A-9D4E-44DD91068776}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {3C4476FB-5518-425A-9D4E-44DD91068776}.Release|Win32.ActiveCfg = Release|Win32
- {3C4476FB-5518-425A-9D4E-44DD91068776}.Release|Win32.Build.0 = Release|Win32
- {3C4476FB-5518-425A-9D4E-44DD91068776}.Release|x64.ActiveCfg = Release|x64
- {3C4476FB-5518-425A-9D4E-44DD91068776}.Release|x64.Build.0 = Release|x64
- {3C4476FB-5518-425A-9D4E-44DD91068776}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {3C4476FB-5518-425A-9D4E-44DD91068776}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {3C4476FB-5518-425A-9D4E-44DD91068776}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {3C4476FB-5518-425A-9D4E-44DD91068776}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {0A01AD98-3A52-430A-A7A8-2A3E990D1BA2}.Debug|Win32.ActiveCfg = Debug|Win32
- {0A01AD98-3A52-430A-A7A8-2A3E990D1BA2}.Debug|Win32.Build.0 = Debug|Win32
- {0A01AD98-3A52-430A-A7A8-2A3E990D1BA2}.Debug|x64.ActiveCfg = Debug|x64
- {0A01AD98-3A52-430A-A7A8-2A3E990D1BA2}.Debug|x64.Build.0 = Debug|x64
- {0A01AD98-3A52-430A-A7A8-2A3E990D1BA2}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {0A01AD98-3A52-430A-A7A8-2A3E990D1BA2}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {0A01AD98-3A52-430A-A7A8-2A3E990D1BA2}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {0A01AD98-3A52-430A-A7A8-2A3E990D1BA2}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {0A01AD98-3A52-430A-A7A8-2A3E990D1BA2}.Release|Win32.ActiveCfg = Release|Win32
- {0A01AD98-3A52-430A-A7A8-2A3E990D1BA2}.Release|Win32.Build.0 = Release|Win32
- {0A01AD98-3A52-430A-A7A8-2A3E990D1BA2}.Release|x64.ActiveCfg = Release|x64
- {0A01AD98-3A52-430A-A7A8-2A3E990D1BA2}.Release|x64.Build.0 = Release|x64
- {0A01AD98-3A52-430A-A7A8-2A3E990D1BA2}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {0A01AD98-3A52-430A-A7A8-2A3E990D1BA2}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {0A01AD98-3A52-430A-A7A8-2A3E990D1BA2}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {0A01AD98-3A52-430A-A7A8-2A3E990D1BA2}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {B5934B23-8476-4D68-9769-2A65BF5C33A4}.Debug|Win32.ActiveCfg = Debug|Win32
- {B5934B23-8476-4D68-9769-2A65BF5C33A4}.Debug|Win32.Build.0 = Debug|Win32
- {B5934B23-8476-4D68-9769-2A65BF5C33A4}.Debug|x64.ActiveCfg = Debug|x64
- {B5934B23-8476-4D68-9769-2A65BF5C33A4}.Debug|x64.Build.0 = Debug|x64
- {B5934B23-8476-4D68-9769-2A65BF5C33A4}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {B5934B23-8476-4D68-9769-2A65BF5C33A4}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {B5934B23-8476-4D68-9769-2A65BF5C33A4}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {B5934B23-8476-4D68-9769-2A65BF5C33A4}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {B5934B23-8476-4D68-9769-2A65BF5C33A4}.Release|Win32.ActiveCfg = Release|Win32
- {B5934B23-8476-4D68-9769-2A65BF5C33A4}.Release|Win32.Build.0 = Release|Win32
- {B5934B23-8476-4D68-9769-2A65BF5C33A4}.Release|x64.ActiveCfg = Release|x64
- {B5934B23-8476-4D68-9769-2A65BF5C33A4}.Release|x64.Build.0 = Release|x64
- {B5934B23-8476-4D68-9769-2A65BF5C33A4}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {B5934B23-8476-4D68-9769-2A65BF5C33A4}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {B5934B23-8476-4D68-9769-2A65BF5C33A4}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {B5934B23-8476-4D68-9769-2A65BF5C33A4}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {CF596340-202E-4E79-B041-F4310A422C20}.Debug|Win32.ActiveCfg = Debug|Win32
- {CF596340-202E-4E79-B041-F4310A422C20}.Debug|Win32.Build.0 = Debug|Win32
- {CF596340-202E-4E79-B041-F4310A422C20}.Debug|x64.ActiveCfg = Debug|x64
- {CF596340-202E-4E79-B041-F4310A422C20}.Debug|x64.Build.0 = Debug|x64
- {CF596340-202E-4E79-B041-F4310A422C20}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {CF596340-202E-4E79-B041-F4310A422C20}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {CF596340-202E-4E79-B041-F4310A422C20}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {CF596340-202E-4E79-B041-F4310A422C20}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {CF596340-202E-4E79-B041-F4310A422C20}.Release|Win32.ActiveCfg = Release|Win32
- {CF596340-202E-4E79-B041-F4310A422C20}.Release|Win32.Build.0 = Release|Win32
- {CF596340-202E-4E79-B041-F4310A422C20}.Release|x64.ActiveCfg = Release|x64
- {CF596340-202E-4E79-B041-F4310A422C20}.Release|x64.Build.0 = Release|x64
- {CF596340-202E-4E79-B041-F4310A422C20}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {CF596340-202E-4E79-B041-F4310A422C20}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {CF596340-202E-4E79-B041-F4310A422C20}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {CF596340-202E-4E79-B041-F4310A422C20}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {FD5A8225-8809-4FFB-9190-B6403A2AD467}.Debug|Win32.ActiveCfg = Debug|Win32
- {FD5A8225-8809-4FFB-9190-B6403A2AD467}.Debug|Win32.Build.0 = Debug|Win32
- {FD5A8225-8809-4FFB-9190-B6403A2AD467}.Debug|x64.ActiveCfg = Debug|x64
- {FD5A8225-8809-4FFB-9190-B6403A2AD467}.Debug|x64.Build.0 = Debug|x64
- {FD5A8225-8809-4FFB-9190-B6403A2AD467}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {FD5A8225-8809-4FFB-9190-B6403A2AD467}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {FD5A8225-8809-4FFB-9190-B6403A2AD467}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {FD5A8225-8809-4FFB-9190-B6403A2AD467}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {FD5A8225-8809-4FFB-9190-B6403A2AD467}.Release|Win32.ActiveCfg = Release|Win32
- {FD5A8225-8809-4FFB-9190-B6403A2AD467}.Release|Win32.Build.0 = Release|Win32
- {FD5A8225-8809-4FFB-9190-B6403A2AD467}.Release|x64.ActiveCfg = Release|x64
- {FD5A8225-8809-4FFB-9190-B6403A2AD467}.Release|x64.Build.0 = Release|x64
- {FD5A8225-8809-4FFB-9190-B6403A2AD467}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {FD5A8225-8809-4FFB-9190-B6403A2AD467}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {FD5A8225-8809-4FFB-9190-B6403A2AD467}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {FD5A8225-8809-4FFB-9190-B6403A2AD467}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {707F859C-FE05-486E-BB82-A447A6CD5036}.Debug|Win32.ActiveCfg = Debug|Win32
- {707F859C-FE05-486E-BB82-A447A6CD5036}.Debug|Win32.Build.0 = Debug|Win32
- {707F859C-FE05-486E-BB82-A447A6CD5036}.Debug|x64.ActiveCfg = Debug|x64
- {707F859C-FE05-486E-BB82-A447A6CD5036}.Debug|x64.Build.0 = Debug|x64
- {707F859C-FE05-486E-BB82-A447A6CD5036}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {707F859C-FE05-486E-BB82-A447A6CD5036}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {707F859C-FE05-486E-BB82-A447A6CD5036}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {707F859C-FE05-486E-BB82-A447A6CD5036}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {707F859C-FE05-486E-BB82-A447A6CD5036}.Release|Win32.ActiveCfg = Release|Win32
- {707F859C-FE05-486E-BB82-A447A6CD5036}.Release|Win32.Build.0 = Release|Win32
- {707F859C-FE05-486E-BB82-A447A6CD5036}.Release|x64.ActiveCfg = Release|x64
- {707F859C-FE05-486E-BB82-A447A6CD5036}.Release|x64.Build.0 = Release|x64
- {707F859C-FE05-486E-BB82-A447A6CD5036}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {707F859C-FE05-486E-BB82-A447A6CD5036}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {707F859C-FE05-486E-BB82-A447A6CD5036}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {707F859C-FE05-486E-BB82-A447A6CD5036}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {35C18E88-9F42-49EA-9881-C3128245490F}.Debug|Win32.ActiveCfg = Debug|Win32
- {35C18E88-9F42-49EA-9881-C3128245490F}.Debug|Win32.Build.0 = Debug|Win32
- {35C18E88-9F42-49EA-9881-C3128245490F}.Debug|x64.ActiveCfg = Debug|x64
- {35C18E88-9F42-49EA-9881-C3128245490F}.Debug|x64.Build.0 = Debug|x64
- {35C18E88-9F42-49EA-9881-C3128245490F}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {35C18E88-9F42-49EA-9881-C3128245490F}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {35C18E88-9F42-49EA-9881-C3128245490F}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {35C18E88-9F42-49EA-9881-C3128245490F}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {35C18E88-9F42-49EA-9881-C3128245490F}.Release|Win32.ActiveCfg = Release|Win32
- {35C18E88-9F42-49EA-9881-C3128245490F}.Release|Win32.Build.0 = Release|Win32
- {35C18E88-9F42-49EA-9881-C3128245490F}.Release|x64.ActiveCfg = Release|x64
- {35C18E88-9F42-49EA-9881-C3128245490F}.Release|x64.Build.0 = Release|x64
- {35C18E88-9F42-49EA-9881-C3128245490F}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {35C18E88-9F42-49EA-9881-C3128245490F}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {35C18E88-9F42-49EA-9881-C3128245490F}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {35C18E88-9F42-49EA-9881-C3128245490F}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {98C1A680-89B6-4911-8C36-42D14F43B868}.Debug|Win32.ActiveCfg = Debug|Win32
- {98C1A680-89B6-4911-8C36-42D14F43B868}.Debug|Win32.Build.0 = Debug|Win32
- {98C1A680-89B6-4911-8C36-42D14F43B868}.Debug|x64.ActiveCfg = Debug|x64
- {98C1A680-89B6-4911-8C36-42D14F43B868}.Debug|x64.Build.0 = Debug|x64
- {98C1A680-89B6-4911-8C36-42D14F43B868}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {98C1A680-89B6-4911-8C36-42D14F43B868}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {98C1A680-89B6-4911-8C36-42D14F43B868}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {98C1A680-89B6-4911-8C36-42D14F43B868}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {98C1A680-89B6-4911-8C36-42D14F43B868}.Release|Win32.ActiveCfg = Release|Win32
- {98C1A680-89B6-4911-8C36-42D14F43B868}.Release|Win32.Build.0 = Release|Win32
- {98C1A680-89B6-4911-8C36-42D14F43B868}.Release|x64.ActiveCfg = Release|x64
- {98C1A680-89B6-4911-8C36-42D14F43B868}.Release|x64.Build.0 = Release|x64
- {98C1A680-89B6-4911-8C36-42D14F43B868}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {98C1A680-89B6-4911-8C36-42D14F43B868}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {98C1A680-89B6-4911-8C36-42D14F43B868}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {98C1A680-89B6-4911-8C36-42D14F43B868}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2}.Debug|Win32.ActiveCfg = Debug|Win32
- {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2}.Debug|Win32.Build.0 = Debug|Win32
- {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2}.Debug|x64.ActiveCfg = Debug|x64
- {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2}.Debug|x64.Build.0 = Debug|x64
- {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2}.Release|Win32.ActiveCfg = Release|Win32
- {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2}.Release|Win32.Build.0 = Release|Win32
- {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2}.Release|x64.ActiveCfg = Release|x64
- {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2}.Release|x64.Build.0 = Release|x64
- {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {3E5CD700-5AE9-41CF-9A12-794A15EDE7D2}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {F8CD481D-462C-40ED-98FA-C6EEF477B5CF}.Debug|Win32.ActiveCfg = Debug|Win32
- {F8CD481D-462C-40ED-98FA-C6EEF477B5CF}.Debug|Win32.Build.0 = Debug|Win32
- {F8CD481D-462C-40ED-98FA-C6EEF477B5CF}.Debug|x64.ActiveCfg = Debug|x64
- {F8CD481D-462C-40ED-98FA-C6EEF477B5CF}.Debug|x64.Build.0 = Debug|x64
- {F8CD481D-462C-40ED-98FA-C6EEF477B5CF}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {F8CD481D-462C-40ED-98FA-C6EEF477B5CF}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {F8CD481D-462C-40ED-98FA-C6EEF477B5CF}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {F8CD481D-462C-40ED-98FA-C6EEF477B5CF}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {F8CD481D-462C-40ED-98FA-C6EEF477B5CF}.Release|Win32.ActiveCfg = Release|Win32
- {F8CD481D-462C-40ED-98FA-C6EEF477B5CF}.Release|Win32.Build.0 = Release|Win32
- {F8CD481D-462C-40ED-98FA-C6EEF477B5CF}.Release|x64.ActiveCfg = Release|x64
- {F8CD481D-462C-40ED-98FA-C6EEF477B5CF}.Release|x64.Build.0 = Release|x64
- {F8CD481D-462C-40ED-98FA-C6EEF477B5CF}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {F8CD481D-462C-40ED-98FA-C6EEF477B5CF}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {F8CD481D-462C-40ED-98FA-C6EEF477B5CF}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {F8CD481D-462C-40ED-98FA-C6EEF477B5CF}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {ACB6E56A-AA8C-43C8-B9C4-A8E1E10E496C}.Debug|Win32.ActiveCfg = Debug|Win32
- {ACB6E56A-AA8C-43C8-B9C4-A8E1E10E496C}.Debug|Win32.Build.0 = Debug|Win32
- {ACB6E56A-AA8C-43C8-B9C4-A8E1E10E496C}.Debug|x64.ActiveCfg = Debug|x64
- {ACB6E56A-AA8C-43C8-B9C4-A8E1E10E496C}.Debug|x64.Build.0 = Debug|x64
- {ACB6E56A-AA8C-43C8-B9C4-A8E1E10E496C}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {ACB6E56A-AA8C-43C8-B9C4-A8E1E10E496C}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {ACB6E56A-AA8C-43C8-B9C4-A8E1E10E496C}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {ACB6E56A-AA8C-43C8-B9C4-A8E1E10E496C}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {ACB6E56A-AA8C-43C8-B9C4-A8E1E10E496C}.Release|Win32.ActiveCfg = Release|Win32
- {ACB6E56A-AA8C-43C8-B9C4-A8E1E10E496C}.Release|Win32.Build.0 = Release|Win32
- {ACB6E56A-AA8C-43C8-B9C4-A8E1E10E496C}.Release|x64.ActiveCfg = Release|x64
- {ACB6E56A-AA8C-43C8-B9C4-A8E1E10E496C}.Release|x64.Build.0 = Release|x64
- {ACB6E56A-AA8C-43C8-B9C4-A8E1E10E496C}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {ACB6E56A-AA8C-43C8-B9C4-A8E1E10E496C}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {ACB6E56A-AA8C-43C8-B9C4-A8E1E10E496C}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {ACB6E56A-AA8C-43C8-B9C4-A8E1E10E496C}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {32AB53DD-66B1-4E17-B411-FEB804E62CF0}.Debug|Win32.ActiveCfg = Debug|Win32
- {32AB53DD-66B1-4E17-B411-FEB804E62CF0}.Debug|Win32.Build.0 = Debug|Win32
- {32AB53DD-66B1-4E17-B411-FEB804E62CF0}.Debug|x64.ActiveCfg = Debug|x64
- {32AB53DD-66B1-4E17-B411-FEB804E62CF0}.Debug|x64.Build.0 = Debug|x64
- {32AB53DD-66B1-4E17-B411-FEB804E62CF0}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {32AB53DD-66B1-4E17-B411-FEB804E62CF0}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {32AB53DD-66B1-4E17-B411-FEB804E62CF0}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {32AB53DD-66B1-4E17-B411-FEB804E62CF0}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {32AB53DD-66B1-4E17-B411-FEB804E62CF0}.Release|Win32.ActiveCfg = Release|Win32
- {32AB53DD-66B1-4E17-B411-FEB804E62CF0}.Release|Win32.Build.0 = Release|Win32
- {32AB53DD-66B1-4E17-B411-FEB804E62CF0}.Release|x64.ActiveCfg = Release|x64
- {32AB53DD-66B1-4E17-B411-FEB804E62CF0}.Release|x64.Build.0 = Release|x64
- {32AB53DD-66B1-4E17-B411-FEB804E62CF0}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {32AB53DD-66B1-4E17-B411-FEB804E62CF0}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {32AB53DD-66B1-4E17-B411-FEB804E62CF0}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {32AB53DD-66B1-4E17-B411-FEB804E62CF0}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {A9FD8A3D-345F-4F7B-B8D6-9032E1884F94}.Debug|Win32.ActiveCfg = Debug|Win32
- {A9FD8A3D-345F-4F7B-B8D6-9032E1884F94}.Debug|Win32.Build.0 = Debug|Win32
- {A9FD8A3D-345F-4F7B-B8D6-9032E1884F94}.Debug|x64.ActiveCfg = Debug|x64
- {A9FD8A3D-345F-4F7B-B8D6-9032E1884F94}.Debug|x64.Build.0 = Debug|x64
- {A9FD8A3D-345F-4F7B-B8D6-9032E1884F94}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {A9FD8A3D-345F-4F7B-B8D6-9032E1884F94}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {A9FD8A3D-345F-4F7B-B8D6-9032E1884F94}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {A9FD8A3D-345F-4F7B-B8D6-9032E1884F94}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {A9FD8A3D-345F-4F7B-B8D6-9032E1884F94}.Release|Win32.ActiveCfg = Release|Win32
- {A9FD8A3D-345F-4F7B-B8D6-9032E1884F94}.Release|Win32.Build.0 = Release|Win32
- {A9FD8A3D-345F-4F7B-B8D6-9032E1884F94}.Release|x64.ActiveCfg = Release|x64
- {A9FD8A3D-345F-4F7B-B8D6-9032E1884F94}.Release|x64.Build.0 = Release|x64
- {A9FD8A3D-345F-4F7B-B8D6-9032E1884F94}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {A9FD8A3D-345F-4F7B-B8D6-9032E1884F94}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {A9FD8A3D-345F-4F7B-B8D6-9032E1884F94}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {A9FD8A3D-345F-4F7B-B8D6-9032E1884F94}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {45CF24A4-E238-4E5C-BACC-5F0D6556A8EC}.Debug|Win32.ActiveCfg = Debug|Win32
- {45CF24A4-E238-4E5C-BACC-5F0D6556A8EC}.Debug|Win32.Build.0 = Debug|Win32
- {45CF24A4-E238-4E5C-BACC-5F0D6556A8EC}.Debug|x64.ActiveCfg = Debug|x64
- {45CF24A4-E238-4E5C-BACC-5F0D6556A8EC}.Debug|x64.Build.0 = Debug|x64
- {45CF24A4-E238-4E5C-BACC-5F0D6556A8EC}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {45CF24A4-E238-4E5C-BACC-5F0D6556A8EC}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {45CF24A4-E238-4E5C-BACC-5F0D6556A8EC}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {45CF24A4-E238-4E5C-BACC-5F0D6556A8EC}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {45CF24A4-E238-4E5C-BACC-5F0D6556A8EC}.Release|Win32.ActiveCfg = Release|Win32
- {45CF24A4-E238-4E5C-BACC-5F0D6556A8EC}.Release|Win32.Build.0 = Release|Win32
- {45CF24A4-E238-4E5C-BACC-5F0D6556A8EC}.Release|x64.ActiveCfg = Release|x64
- {45CF24A4-E238-4E5C-BACC-5F0D6556A8EC}.Release|x64.Build.0 = Release|x64
- {45CF24A4-E238-4E5C-BACC-5F0D6556A8EC}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {45CF24A4-E238-4E5C-BACC-5F0D6556A8EC}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {45CF24A4-E238-4E5C-BACC-5F0D6556A8EC}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {45CF24A4-E238-4E5C-BACC-5F0D6556A8EC}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {327A10DD-2251-4191-8425-17E535235D30}.Debug|Win32.ActiveCfg = Debug|Win32
- {327A10DD-2251-4191-8425-17E535235D30}.Debug|Win32.Build.0 = Debug|Win32
- {327A10DD-2251-4191-8425-17E535235D30}.Debug|x64.ActiveCfg = Debug|x64
- {327A10DD-2251-4191-8425-17E535235D30}.Debug|x64.Build.0 = Debug|x64
- {327A10DD-2251-4191-8425-17E535235D30}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {327A10DD-2251-4191-8425-17E535235D30}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {327A10DD-2251-4191-8425-17E535235D30}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {327A10DD-2251-4191-8425-17E535235D30}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {327A10DD-2251-4191-8425-17E535235D30}.Release|Win32.ActiveCfg = Release|Win32
- {327A10DD-2251-4191-8425-17E535235D30}.Release|Win32.Build.0 = Release|Win32
- {327A10DD-2251-4191-8425-17E535235D30}.Release|x64.ActiveCfg = Release|x64
- {327A10DD-2251-4191-8425-17E535235D30}.Release|x64.Build.0 = Release|x64
- {327A10DD-2251-4191-8425-17E535235D30}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {327A10DD-2251-4191-8425-17E535235D30}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {327A10DD-2251-4191-8425-17E535235D30}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {327A10DD-2251-4191-8425-17E535235D30}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {E2B932C9-4C8A-4922-9DFF-9FB646184223}.Debug|Win32.ActiveCfg = Debug|Win32
- {E2B932C9-4C8A-4922-9DFF-9FB646184223}.Debug|Win32.Build.0 = Debug|Win32
- {E2B932C9-4C8A-4922-9DFF-9FB646184223}.Debug|x64.ActiveCfg = Debug|x64
- {E2B932C9-4C8A-4922-9DFF-9FB646184223}.Debug|x64.Build.0 = Debug|x64
- {E2B932C9-4C8A-4922-9DFF-9FB646184223}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {E2B932C9-4C8A-4922-9DFF-9FB646184223}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {E2B932C9-4C8A-4922-9DFF-9FB646184223}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {E2B932C9-4C8A-4922-9DFF-9FB646184223}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {E2B932C9-4C8A-4922-9DFF-9FB646184223}.Release|Win32.ActiveCfg = Release|Win32
- {E2B932C9-4C8A-4922-9DFF-9FB646184223}.Release|Win32.Build.0 = Release|Win32
- {E2B932C9-4C8A-4922-9DFF-9FB646184223}.Release|x64.ActiveCfg = Release|x64
- {E2B932C9-4C8A-4922-9DFF-9FB646184223}.Release|x64.Build.0 = Release|x64
- {E2B932C9-4C8A-4922-9DFF-9FB646184223}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {E2B932C9-4C8A-4922-9DFF-9FB646184223}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {E2B932C9-4C8A-4922-9DFF-9FB646184223}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {E2B932C9-4C8A-4922-9DFF-9FB646184223}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {21191422-314F-421D-93A8-EABF933C3065}.Debug|Win32.ActiveCfg = Debug|Win32
- {21191422-314F-421D-93A8-EABF933C3065}.Debug|Win32.Build.0 = Debug|Win32
- {21191422-314F-421D-93A8-EABF933C3065}.Debug|x64.ActiveCfg = Debug|x64
- {21191422-314F-421D-93A8-EABF933C3065}.Debug|x64.Build.0 = Debug|x64
- {21191422-314F-421D-93A8-EABF933C3065}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {21191422-314F-421D-93A8-EABF933C3065}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {21191422-314F-421D-93A8-EABF933C3065}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {21191422-314F-421D-93A8-EABF933C3065}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {21191422-314F-421D-93A8-EABF933C3065}.Release|Win32.ActiveCfg = Release|Win32
- {21191422-314F-421D-93A8-EABF933C3065}.Release|Win32.Build.0 = Release|Win32
- {21191422-314F-421D-93A8-EABF933C3065}.Release|x64.ActiveCfg = Release|x64
- {21191422-314F-421D-93A8-EABF933C3065}.Release|x64.Build.0 = Release|x64
- {21191422-314F-421D-93A8-EABF933C3065}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {21191422-314F-421D-93A8-EABF933C3065}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {21191422-314F-421D-93A8-EABF933C3065}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {21191422-314F-421D-93A8-EABF933C3065}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {2B743DB7-9F8B-4652-B45D-04E23AE2B547}.Debug|Win32.ActiveCfg = Debug|Win32
- {2B743DB7-9F8B-4652-B45D-04E23AE2B547}.Debug|Win32.Build.0 = Debug|Win32
- {2B743DB7-9F8B-4652-B45D-04E23AE2B547}.Debug|x64.ActiveCfg = Debug|x64
- {2B743DB7-9F8B-4652-B45D-04E23AE2B547}.Debug|x64.Build.0 = Debug|x64
- {2B743DB7-9F8B-4652-B45D-04E23AE2B547}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {2B743DB7-9F8B-4652-B45D-04E23AE2B547}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {2B743DB7-9F8B-4652-B45D-04E23AE2B547}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {2B743DB7-9F8B-4652-B45D-04E23AE2B547}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {2B743DB7-9F8B-4652-B45D-04E23AE2B547}.Release|Win32.ActiveCfg = Release|Win32
- {2B743DB7-9F8B-4652-B45D-04E23AE2B547}.Release|Win32.Build.0 = Release|Win32
- {2B743DB7-9F8B-4652-B45D-04E23AE2B547}.Release|x64.ActiveCfg = Release|x64
- {2B743DB7-9F8B-4652-B45D-04E23AE2B547}.Release|x64.Build.0 = Release|x64
- {2B743DB7-9F8B-4652-B45D-04E23AE2B547}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {2B743DB7-9F8B-4652-B45D-04E23AE2B547}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {2B743DB7-9F8B-4652-B45D-04E23AE2B547}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {2B743DB7-9F8B-4652-B45D-04E23AE2B547}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {1F10C6E1-3C88-4C78-9C18-05AC31B2421F}.Debug|Win32.ActiveCfg = Debug|Win32
- {1F10C6E1-3C88-4C78-9C18-05AC31B2421F}.Debug|Win32.Build.0 = Debug|Win32
- {1F10C6E1-3C88-4C78-9C18-05AC31B2421F}.Debug|x64.ActiveCfg = Debug|x64
- {1F10C6E1-3C88-4C78-9C18-05AC31B2421F}.Debug|x64.Build.0 = Debug|x64
- {1F10C6E1-3C88-4C78-9C18-05AC31B2421F}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {1F10C6E1-3C88-4C78-9C18-05AC31B2421F}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {1F10C6E1-3C88-4C78-9C18-05AC31B2421F}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {1F10C6E1-3C88-4C78-9C18-05AC31B2421F}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {1F10C6E1-3C88-4C78-9C18-05AC31B2421F}.Release|Win32.ActiveCfg = Release|Win32
- {1F10C6E1-3C88-4C78-9C18-05AC31B2421F}.Release|Win32.Build.0 = Release|Win32
- {1F10C6E1-3C88-4C78-9C18-05AC31B2421F}.Release|x64.ActiveCfg = Release|x64
- {1F10C6E1-3C88-4C78-9C18-05AC31B2421F}.Release|x64.Build.0 = Release|x64
- {1F10C6E1-3C88-4C78-9C18-05AC31B2421F}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {1F10C6E1-3C88-4C78-9C18-05AC31B2421F}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {1F10C6E1-3C88-4C78-9C18-05AC31B2421F}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {1F10C6E1-3C88-4C78-9C18-05AC31B2421F}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {9149ED1B-E896-4A64-A3D2-C42FC10A7F63}.Debug|Win32.ActiveCfg = Debug|Win32
- {9149ED1B-E896-4A64-A3D2-C42FC10A7F63}.Debug|Win32.Build.0 = Debug|Win32
- {9149ED1B-E896-4A64-A3D2-C42FC10A7F63}.Debug|x64.ActiveCfg = Debug|x64
- {9149ED1B-E896-4A64-A3D2-C42FC10A7F63}.Debug|x64.Build.0 = Debug|x64
- {9149ED1B-E896-4A64-A3D2-C42FC10A7F63}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {9149ED1B-E896-4A64-A3D2-C42FC10A7F63}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {9149ED1B-E896-4A64-A3D2-C42FC10A7F63}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {9149ED1B-E896-4A64-A3D2-C42FC10A7F63}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {9149ED1B-E896-4A64-A3D2-C42FC10A7F63}.Release|Win32.ActiveCfg = Release|Win32
- {9149ED1B-E896-4A64-A3D2-C42FC10A7F63}.Release|Win32.Build.0 = Release|Win32
- {9149ED1B-E896-4A64-A3D2-C42FC10A7F63}.Release|x64.ActiveCfg = Release|x64
- {9149ED1B-E896-4A64-A3D2-C42FC10A7F63}.Release|x64.Build.0 = Release|x64
- {9149ED1B-E896-4A64-A3D2-C42FC10A7F63}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {9149ED1B-E896-4A64-A3D2-C42FC10A7F63}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {9149ED1B-E896-4A64-A3D2-C42FC10A7F63}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {9149ED1B-E896-4A64-A3D2-C42FC10A7F63}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {AD565A88-01DA-4401-8E8F-53CCF8C759B5}.Debug|Win32.ActiveCfg = Debug|Win32
- {AD565A88-01DA-4401-8E8F-53CCF8C759B5}.Debug|Win32.Build.0 = Debug|Win32
- {AD565A88-01DA-4401-8E8F-53CCF8C759B5}.Debug|x64.ActiveCfg = Debug|x64
- {AD565A88-01DA-4401-8E8F-53CCF8C759B5}.Debug|x64.Build.0 = Debug|x64
- {AD565A88-01DA-4401-8E8F-53CCF8C759B5}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {AD565A88-01DA-4401-8E8F-53CCF8C759B5}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {AD565A88-01DA-4401-8E8F-53CCF8C759B5}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {AD565A88-01DA-4401-8E8F-53CCF8C759B5}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {AD565A88-01DA-4401-8E8F-53CCF8C759B5}.Release|Win32.ActiveCfg = Release|Win32
- {AD565A88-01DA-4401-8E8F-53CCF8C759B5}.Release|Win32.Build.0 = Release|Win32
- {AD565A88-01DA-4401-8E8F-53CCF8C759B5}.Release|x64.ActiveCfg = Release|x64
- {AD565A88-01DA-4401-8E8F-53CCF8C759B5}.Release|x64.Build.0 = Release|x64
- {AD565A88-01DA-4401-8E8F-53CCF8C759B5}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {AD565A88-01DA-4401-8E8F-53CCF8C759B5}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {AD565A88-01DA-4401-8E8F-53CCF8C759B5}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {AD565A88-01DA-4401-8E8F-53CCF8C759B5}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {E85F8917-C596-477B-8D92-851E3726DE96}.Debug|Win32.ActiveCfg = Debug|Win32
- {E85F8917-C596-477B-8D92-851E3726DE96}.Debug|Win32.Build.0 = Debug|Win32
- {E85F8917-C596-477B-8D92-851E3726DE96}.Debug|x64.ActiveCfg = Debug|x64
- {E85F8917-C596-477B-8D92-851E3726DE96}.Debug|x64.Build.0 = Debug|x64
- {E85F8917-C596-477B-8D92-851E3726DE96}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {E85F8917-C596-477B-8D92-851E3726DE96}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {E85F8917-C596-477B-8D92-851E3726DE96}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {E85F8917-C596-477B-8D92-851E3726DE96}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {E85F8917-C596-477B-8D92-851E3726DE96}.Release|Win32.ActiveCfg = Release|Win32
- {E85F8917-C596-477B-8D92-851E3726DE96}.Release|Win32.Build.0 = Release|Win32
- {E85F8917-C596-477B-8D92-851E3726DE96}.Release|x64.ActiveCfg = Release|x64
- {E85F8917-C596-477B-8D92-851E3726DE96}.Release|x64.Build.0 = Release|x64
- {E85F8917-C596-477B-8D92-851E3726DE96}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {E85F8917-C596-477B-8D92-851E3726DE96}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {E85F8917-C596-477B-8D92-851E3726DE96}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {E85F8917-C596-477B-8D92-851E3726DE96}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {A6AC837C-8852-48B3-9232-57A2493AEDA4}.Debug|Win32.ActiveCfg = Debug|Win32
- {A6AC837C-8852-48B3-9232-57A2493AEDA4}.Debug|Win32.Build.0 = Debug|Win32
- {A6AC837C-8852-48B3-9232-57A2493AEDA4}.Debug|x64.ActiveCfg = Debug|x64
- {A6AC837C-8852-48B3-9232-57A2493AEDA4}.Debug|x64.Build.0 = Debug|x64
- {A6AC837C-8852-48B3-9232-57A2493AEDA4}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {A6AC837C-8852-48B3-9232-57A2493AEDA4}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {A6AC837C-8852-48B3-9232-57A2493AEDA4}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {A6AC837C-8852-48B3-9232-57A2493AEDA4}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {A6AC837C-8852-48B3-9232-57A2493AEDA4}.Release|Win32.ActiveCfg = Release|Win32
- {A6AC837C-8852-48B3-9232-57A2493AEDA4}.Release|Win32.Build.0 = Release|Win32
- {A6AC837C-8852-48B3-9232-57A2493AEDA4}.Release|x64.ActiveCfg = Release|x64
- {A6AC837C-8852-48B3-9232-57A2493AEDA4}.Release|x64.Build.0 = Release|x64
- {A6AC837C-8852-48B3-9232-57A2493AEDA4}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {A6AC837C-8852-48B3-9232-57A2493AEDA4}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {A6AC837C-8852-48B3-9232-57A2493AEDA4}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {A6AC837C-8852-48B3-9232-57A2493AEDA4}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {AAD6BEB3-618D-492E-BFC8-D3892D9D26AB}.Debug|Win32.ActiveCfg = Debug|Win32
- {AAD6BEB3-618D-492E-BFC8-D3892D9D26AB}.Debug|Win32.Build.0 = Debug|Win32
- {AAD6BEB3-618D-492E-BFC8-D3892D9D26AB}.Debug|x64.ActiveCfg = Debug|x64
- {AAD6BEB3-618D-492E-BFC8-D3892D9D26AB}.Debug|x64.Build.0 = Debug|x64
- {AAD6BEB3-618D-492E-BFC8-D3892D9D26AB}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {AAD6BEB3-618D-492E-BFC8-D3892D9D26AB}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {AAD6BEB3-618D-492E-BFC8-D3892D9D26AB}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {AAD6BEB3-618D-492E-BFC8-D3892D9D26AB}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {AAD6BEB3-618D-492E-BFC8-D3892D9D26AB}.Release|Win32.ActiveCfg = Release|Win32
- {AAD6BEB3-618D-492E-BFC8-D3892D9D26AB}.Release|Win32.Build.0 = Release|Win32
- {AAD6BEB3-618D-492E-BFC8-D3892D9D26AB}.Release|x64.ActiveCfg = Release|x64
- {AAD6BEB3-618D-492E-BFC8-D3892D9D26AB}.Release|x64.Build.0 = Release|x64
- {AAD6BEB3-618D-492E-BFC8-D3892D9D26AB}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {AAD6BEB3-618D-492E-BFC8-D3892D9D26AB}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {AAD6BEB3-618D-492E-BFC8-D3892D9D26AB}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {AAD6BEB3-618D-492E-BFC8-D3892D9D26AB}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {032E43BB-816C-4BEE-9ABD-1E0B599C007A}.Debug|Win32.ActiveCfg = Debug|Win32
- {032E43BB-816C-4BEE-9ABD-1E0B599C007A}.Debug|Win32.Build.0 = Debug|Win32
- {032E43BB-816C-4BEE-9ABD-1E0B599C007A}.Debug|x64.ActiveCfg = Debug|x64
- {032E43BB-816C-4BEE-9ABD-1E0B599C007A}.Debug|x64.Build.0 = Debug|x64
- {032E43BB-816C-4BEE-9ABD-1E0B599C007A}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {032E43BB-816C-4BEE-9ABD-1E0B599C007A}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {032E43BB-816C-4BEE-9ABD-1E0B599C007A}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {032E43BB-816C-4BEE-9ABD-1E0B599C007A}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {032E43BB-816C-4BEE-9ABD-1E0B599C007A}.Release|Win32.ActiveCfg = Release|Win32
- {032E43BB-816C-4BEE-9ABD-1E0B599C007A}.Release|Win32.Build.0 = Release|Win32
- {032E43BB-816C-4BEE-9ABD-1E0B599C007A}.Release|x64.ActiveCfg = Release|x64
- {032E43BB-816C-4BEE-9ABD-1E0B599C007A}.Release|x64.Build.0 = Release|x64
- {032E43BB-816C-4BEE-9ABD-1E0B599C007A}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {032E43BB-816C-4BEE-9ABD-1E0B599C007A}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {032E43BB-816C-4BEE-9ABD-1E0B599C007A}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {032E43BB-816C-4BEE-9ABD-1E0B599C007A}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {57BABFE8-331D-41A9-8776-314F2D8791E2}.Debug|Win32.ActiveCfg = Debug|Win32
- {57BABFE8-331D-41A9-8776-314F2D8791E2}.Debug|Win32.Build.0 = Debug|Win32
- {57BABFE8-331D-41A9-8776-314F2D8791E2}.Debug|x64.ActiveCfg = Debug|x64
- {57BABFE8-331D-41A9-8776-314F2D8791E2}.Debug|x64.Build.0 = Debug|x64
- {57BABFE8-331D-41A9-8776-314F2D8791E2}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {57BABFE8-331D-41A9-8776-314F2D8791E2}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {57BABFE8-331D-41A9-8776-314F2D8791E2}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {57BABFE8-331D-41A9-8776-314F2D8791E2}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {57BABFE8-331D-41A9-8776-314F2D8791E2}.Release|Win32.ActiveCfg = Release|Win32
- {57BABFE8-331D-41A9-8776-314F2D8791E2}.Release|Win32.Build.0 = Release|Win32
- {57BABFE8-331D-41A9-8776-314F2D8791E2}.Release|x64.ActiveCfg = Release|x64
- {57BABFE8-331D-41A9-8776-314F2D8791E2}.Release|x64.Build.0 = Release|x64
- {57BABFE8-331D-41A9-8776-314F2D8791E2}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {57BABFE8-331D-41A9-8776-314F2D8791E2}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {57BABFE8-331D-41A9-8776-314F2D8791E2}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {57BABFE8-331D-41A9-8776-314F2D8791E2}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {8B6B0E08-62BA-4E92-8672-06CCA7432096}.Debug|Win32.ActiveCfg = Debug|Win32
- {8B6B0E08-62BA-4E92-8672-06CCA7432096}.Debug|Win32.Build.0 = Debug|Win32
- {8B6B0E08-62BA-4E92-8672-06CCA7432096}.Debug|x64.ActiveCfg = Debug|x64
- {8B6B0E08-62BA-4E92-8672-06CCA7432096}.Debug|x64.Build.0 = Debug|x64
- {8B6B0E08-62BA-4E92-8672-06CCA7432096}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {8B6B0E08-62BA-4E92-8672-06CCA7432096}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {8B6B0E08-62BA-4E92-8672-06CCA7432096}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {8B6B0E08-62BA-4E92-8672-06CCA7432096}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {8B6B0E08-62BA-4E92-8672-06CCA7432096}.Release|Win32.ActiveCfg = Release|Win32
- {8B6B0E08-62BA-4E92-8672-06CCA7432096}.Release|Win32.Build.0 = Release|Win32
- {8B6B0E08-62BA-4E92-8672-06CCA7432096}.Release|x64.ActiveCfg = Release|x64
- {8B6B0E08-62BA-4E92-8672-06CCA7432096}.Release|x64.Build.0 = Release|x64
- {8B6B0E08-62BA-4E92-8672-06CCA7432096}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {8B6B0E08-62BA-4E92-8672-06CCA7432096}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {8B6B0E08-62BA-4E92-8672-06CCA7432096}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {8B6B0E08-62BA-4E92-8672-06CCA7432096}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {C5FFDC7A-C2A7-49C0-9EED-92D987AC3AC9}.Debug|Win32.ActiveCfg = Debug|Win32
- {C5FFDC7A-C2A7-49C0-9EED-92D987AC3AC9}.Debug|Win32.Build.0 = Debug|Win32
- {C5FFDC7A-C2A7-49C0-9EED-92D987AC3AC9}.Debug|x64.ActiveCfg = Debug|x64
- {C5FFDC7A-C2A7-49C0-9EED-92D987AC3AC9}.Debug|x64.Build.0 = Debug|x64
- {C5FFDC7A-C2A7-49C0-9EED-92D987AC3AC9}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {C5FFDC7A-C2A7-49C0-9EED-92D987AC3AC9}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {C5FFDC7A-C2A7-49C0-9EED-92D987AC3AC9}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {C5FFDC7A-C2A7-49C0-9EED-92D987AC3AC9}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {C5FFDC7A-C2A7-49C0-9EED-92D987AC3AC9}.Release|Win32.ActiveCfg = Release|Win32
- {C5FFDC7A-C2A7-49C0-9EED-92D987AC3AC9}.Release|Win32.Build.0 = Release|Win32
- {C5FFDC7A-C2A7-49C0-9EED-92D987AC3AC9}.Release|x64.ActiveCfg = Release|x64
- {C5FFDC7A-C2A7-49C0-9EED-92D987AC3AC9}.Release|x64.Build.0 = Release|x64
- {C5FFDC7A-C2A7-49C0-9EED-92D987AC3AC9}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {C5FFDC7A-C2A7-49C0-9EED-92D987AC3AC9}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {C5FFDC7A-C2A7-49C0-9EED-92D987AC3AC9}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {C5FFDC7A-C2A7-49C0-9EED-92D987AC3AC9}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {42140DF3-03C5-4A99-9D7B-F4385733D694}.Debug|Win32.ActiveCfg = Debug|Win32
- {42140DF3-03C5-4A99-9D7B-F4385733D694}.Debug|Win32.Build.0 = Debug|Win32
- {42140DF3-03C5-4A99-9D7B-F4385733D694}.Debug|x64.ActiveCfg = Debug|x64
- {42140DF3-03C5-4A99-9D7B-F4385733D694}.Debug|x64.Build.0 = Debug|x64
- {42140DF3-03C5-4A99-9D7B-F4385733D694}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {42140DF3-03C5-4A99-9D7B-F4385733D694}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {42140DF3-03C5-4A99-9D7B-F4385733D694}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {42140DF3-03C5-4A99-9D7B-F4385733D694}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {42140DF3-03C5-4A99-9D7B-F4385733D694}.Release|Win32.ActiveCfg = Release|Win32
- {42140DF3-03C5-4A99-9D7B-F4385733D694}.Release|Win32.Build.0 = Release|Win32
- {42140DF3-03C5-4A99-9D7B-F4385733D694}.Release|x64.ActiveCfg = Release|x64
- {42140DF3-03C5-4A99-9D7B-F4385733D694}.Release|x64.Build.0 = Release|x64
- {42140DF3-03C5-4A99-9D7B-F4385733D694}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {42140DF3-03C5-4A99-9D7B-F4385733D694}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {42140DF3-03C5-4A99-9D7B-F4385733D694}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {42140DF3-03C5-4A99-9D7B-F4385733D694}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {AA4B7095-5FBB-41E5-AE2A-39247638EC14}.Debug|Win32.ActiveCfg = Debug|Win32
- {AA4B7095-5FBB-41E5-AE2A-39247638EC14}.Debug|Win32.Build.0 = Debug|Win32
- {AA4B7095-5FBB-41E5-AE2A-39247638EC14}.Debug|x64.ActiveCfg = Debug|x64
- {AA4B7095-5FBB-41E5-AE2A-39247638EC14}.Debug|x64.Build.0 = Debug|x64
- {AA4B7095-5FBB-41E5-AE2A-39247638EC14}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {AA4B7095-5FBB-41E5-AE2A-39247638EC14}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {AA4B7095-5FBB-41E5-AE2A-39247638EC14}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {AA4B7095-5FBB-41E5-AE2A-39247638EC14}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {AA4B7095-5FBB-41E5-AE2A-39247638EC14}.Release|Win32.ActiveCfg = Release|Win32
- {AA4B7095-5FBB-41E5-AE2A-39247638EC14}.Release|Win32.Build.0 = Release|Win32
- {AA4B7095-5FBB-41E5-AE2A-39247638EC14}.Release|x64.ActiveCfg = Release|x64
- {AA4B7095-5FBB-41E5-AE2A-39247638EC14}.Release|x64.Build.0 = Release|x64
- {AA4B7095-5FBB-41E5-AE2A-39247638EC14}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {AA4B7095-5FBB-41E5-AE2A-39247638EC14}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {AA4B7095-5FBB-41E5-AE2A-39247638EC14}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {AA4B7095-5FBB-41E5-AE2A-39247638EC14}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {A40959E8-B640-49F7-B2E0-806A03544AB5}.Debug|Win32.ActiveCfg = Debug|Win32
- {A40959E8-B640-49F7-B2E0-806A03544AB5}.Debug|Win32.Build.0 = Debug|Win32
- {A40959E8-B640-49F7-B2E0-806A03544AB5}.Debug|x64.ActiveCfg = Debug|x64
- {A40959E8-B640-49F7-B2E0-806A03544AB5}.Debug|x64.Build.0 = Debug|x64
- {A40959E8-B640-49F7-B2E0-806A03544AB5}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {A40959E8-B640-49F7-B2E0-806A03544AB5}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {A40959E8-B640-49F7-B2E0-806A03544AB5}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {A40959E8-B640-49F7-B2E0-806A03544AB5}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {A40959E8-B640-49F7-B2E0-806A03544AB5}.Release|Win32.ActiveCfg = Release|Win32
- {A40959E8-B640-49F7-B2E0-806A03544AB5}.Release|Win32.Build.0 = Release|Win32
- {A40959E8-B640-49F7-B2E0-806A03544AB5}.Release|x64.ActiveCfg = Release|x64
- {A40959E8-B640-49F7-B2E0-806A03544AB5}.Release|x64.Build.0 = Release|x64
- {A40959E8-B640-49F7-B2E0-806A03544AB5}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {A40959E8-B640-49F7-B2E0-806A03544AB5}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {A40959E8-B640-49F7-B2E0-806A03544AB5}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {A40959E8-B640-49F7-B2E0-806A03544AB5}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {67F5D600-6FE3-420E-B9F3-7EA1DD452FC9}.Debug|Win32.ActiveCfg = Debug|Win32
- {67F5D600-6FE3-420E-B9F3-7EA1DD452FC9}.Debug|Win32.Build.0 = Debug|Win32
- {67F5D600-6FE3-420E-B9F3-7EA1DD452FC9}.Debug|x64.ActiveCfg = Debug|x64
- {67F5D600-6FE3-420E-B9F3-7EA1DD452FC9}.Debug|x64.Build.0 = Debug|x64
- {67F5D600-6FE3-420E-B9F3-7EA1DD452FC9}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {67F5D600-6FE3-420E-B9F3-7EA1DD452FC9}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {67F5D600-6FE3-420E-B9F3-7EA1DD452FC9}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {67F5D600-6FE3-420E-B9F3-7EA1DD452FC9}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {67F5D600-6FE3-420E-B9F3-7EA1DD452FC9}.Release|Win32.ActiveCfg = Release|Win32
- {67F5D600-6FE3-420E-B9F3-7EA1DD452FC9}.Release|Win32.Build.0 = Release|Win32
- {67F5D600-6FE3-420E-B9F3-7EA1DD452FC9}.Release|x64.ActiveCfg = Release|x64
- {67F5D600-6FE3-420E-B9F3-7EA1DD452FC9}.Release|x64.Build.0 = Release|x64
- {67F5D600-6FE3-420E-B9F3-7EA1DD452FC9}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {67F5D600-6FE3-420E-B9F3-7EA1DD452FC9}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {67F5D600-6FE3-420E-B9F3-7EA1DD452FC9}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {67F5D600-6FE3-420E-B9F3-7EA1DD452FC9}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {BD7E75D1-DEDC-450E-A3E5-4823C06100D5}.Debug|Win32.ActiveCfg = Debug|Win32
- {BD7E75D1-DEDC-450E-A3E5-4823C06100D5}.Debug|Win32.Build.0 = Debug|Win32
- {BD7E75D1-DEDC-450E-A3E5-4823C06100D5}.Debug|x64.ActiveCfg = Debug|x64
- {BD7E75D1-DEDC-450E-A3E5-4823C06100D5}.Debug|x64.Build.0 = Debug|x64
- {BD7E75D1-DEDC-450E-A3E5-4823C06100D5}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {BD7E75D1-DEDC-450E-A3E5-4823C06100D5}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {BD7E75D1-DEDC-450E-A3E5-4823C06100D5}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {BD7E75D1-DEDC-450E-A3E5-4823C06100D5}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {BD7E75D1-DEDC-450E-A3E5-4823C06100D5}.Release|Win32.ActiveCfg = Release|Win32
- {BD7E75D1-DEDC-450E-A3E5-4823C06100D5}.Release|Win32.Build.0 = Release|Win32
- {BD7E75D1-DEDC-450E-A3E5-4823C06100D5}.Release|x64.ActiveCfg = Release|x64
- {BD7E75D1-DEDC-450E-A3E5-4823C06100D5}.Release|x64.Build.0 = Release|x64
- {BD7E75D1-DEDC-450E-A3E5-4823C06100D5}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {BD7E75D1-DEDC-450E-A3E5-4823C06100D5}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {BD7E75D1-DEDC-450E-A3E5-4823C06100D5}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {BD7E75D1-DEDC-450E-A3E5-4823C06100D5}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {8FBFAE5E-50CA-42EF-B614-BEA3252064BD}.Debug|Win32.ActiveCfg = Debug|Win32
- {8FBFAE5E-50CA-42EF-B614-BEA3252064BD}.Debug|Win32.Build.0 = Debug|Win32
- {8FBFAE5E-50CA-42EF-B614-BEA3252064BD}.Debug|x64.ActiveCfg = Debug|x64
- {8FBFAE5E-50CA-42EF-B614-BEA3252064BD}.Debug|x64.Build.0 = Debug|x64
- {8FBFAE5E-50CA-42EF-B614-BEA3252064BD}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {8FBFAE5E-50CA-42EF-B614-BEA3252064BD}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {8FBFAE5E-50CA-42EF-B614-BEA3252064BD}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {8FBFAE5E-50CA-42EF-B614-BEA3252064BD}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {8FBFAE5E-50CA-42EF-B614-BEA3252064BD}.Release|Win32.ActiveCfg = Release|Win32
- {8FBFAE5E-50CA-42EF-B614-BEA3252064BD}.Release|Win32.Build.0 = Release|Win32
- {8FBFAE5E-50CA-42EF-B614-BEA3252064BD}.Release|x64.ActiveCfg = Release|x64
- {8FBFAE5E-50CA-42EF-B614-BEA3252064BD}.Release|x64.Build.0 = Release|x64
- {8FBFAE5E-50CA-42EF-B614-BEA3252064BD}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {8FBFAE5E-50CA-42EF-B614-BEA3252064BD}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {8FBFAE5E-50CA-42EF-B614-BEA3252064BD}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {8FBFAE5E-50CA-42EF-B614-BEA3252064BD}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {08C550B7-3DA6-46A6-96EB-A48806F1900C}.Debug|Win32.ActiveCfg = Debug|Win32
- {08C550B7-3DA6-46A6-96EB-A48806F1900C}.Debug|Win32.Build.0 = Debug|Win32
- {08C550B7-3DA6-46A6-96EB-A48806F1900C}.Debug|x64.ActiveCfg = Debug|x64
- {08C550B7-3DA6-46A6-96EB-A48806F1900C}.Debug|x64.Build.0 = Debug|x64
- {08C550B7-3DA6-46A6-96EB-A48806F1900C}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {08C550B7-3DA6-46A6-96EB-A48806F1900C}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {08C550B7-3DA6-46A6-96EB-A48806F1900C}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {08C550B7-3DA6-46A6-96EB-A48806F1900C}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {08C550B7-3DA6-46A6-96EB-A48806F1900C}.Release|Win32.ActiveCfg = Release|Win32
- {08C550B7-3DA6-46A6-96EB-A48806F1900C}.Release|Win32.Build.0 = Release|Win32
- {08C550B7-3DA6-46A6-96EB-A48806F1900C}.Release|x64.ActiveCfg = Release|x64
- {08C550B7-3DA6-46A6-96EB-A48806F1900C}.Release|x64.Build.0 = Release|x64
- {08C550B7-3DA6-46A6-96EB-A48806F1900C}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {08C550B7-3DA6-46A6-96EB-A48806F1900C}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {08C550B7-3DA6-46A6-96EB-A48806F1900C}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {08C550B7-3DA6-46A6-96EB-A48806F1900C}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {47BB9C01-3751-4E25-87AE-6B4BAAA00340}.Debug|Win32.ActiveCfg = Debug|Win32
- {47BB9C01-3751-4E25-87AE-6B4BAAA00340}.Debug|Win32.Build.0 = Debug|Win32
- {47BB9C01-3751-4E25-87AE-6B4BAAA00340}.Debug|x64.ActiveCfg = Debug|x64
- {47BB9C01-3751-4E25-87AE-6B4BAAA00340}.Debug|x64.Build.0 = Debug|x64
- {47BB9C01-3751-4E25-87AE-6B4BAAA00340}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {47BB9C01-3751-4E25-87AE-6B4BAAA00340}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {47BB9C01-3751-4E25-87AE-6B4BAAA00340}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {47BB9C01-3751-4E25-87AE-6B4BAAA00340}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {47BB9C01-3751-4E25-87AE-6B4BAAA00340}.Release|Win32.ActiveCfg = Release|Win32
- {47BB9C01-3751-4E25-87AE-6B4BAAA00340}.Release|Win32.Build.0 = Release|Win32
- {47BB9C01-3751-4E25-87AE-6B4BAAA00340}.Release|x64.ActiveCfg = Release|x64
- {47BB9C01-3751-4E25-87AE-6B4BAAA00340}.Release|x64.Build.0 = Release|x64
- {47BB9C01-3751-4E25-87AE-6B4BAAA00340}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {47BB9C01-3751-4E25-87AE-6B4BAAA00340}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {47BB9C01-3751-4E25-87AE-6B4BAAA00340}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {47BB9C01-3751-4E25-87AE-6B4BAAA00340}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {F2107221-7687-4F18-AEAC-FAA7C4EFCC16}.Debug|Win32.ActiveCfg = Debug|Win32
- {F2107221-7687-4F18-AEAC-FAA7C4EFCC16}.Debug|Win32.Build.0 = Debug|Win32
- {F2107221-7687-4F18-AEAC-FAA7C4EFCC16}.Debug|x64.ActiveCfg = Debug|x64
- {F2107221-7687-4F18-AEAC-FAA7C4EFCC16}.Debug|x64.Build.0 = Debug|x64
- {F2107221-7687-4F18-AEAC-FAA7C4EFCC16}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {F2107221-7687-4F18-AEAC-FAA7C4EFCC16}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {F2107221-7687-4F18-AEAC-FAA7C4EFCC16}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {F2107221-7687-4F18-AEAC-FAA7C4EFCC16}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {F2107221-7687-4F18-AEAC-FAA7C4EFCC16}.Release|Win32.ActiveCfg = Release|Win32
- {F2107221-7687-4F18-AEAC-FAA7C4EFCC16}.Release|Win32.Build.0 = Release|Win32
- {F2107221-7687-4F18-AEAC-FAA7C4EFCC16}.Release|x64.ActiveCfg = Release|x64
- {F2107221-7687-4F18-AEAC-FAA7C4EFCC16}.Release|x64.Build.0 = Release|x64
- {F2107221-7687-4F18-AEAC-FAA7C4EFCC16}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {F2107221-7687-4F18-AEAC-FAA7C4EFCC16}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {F2107221-7687-4F18-AEAC-FAA7C4EFCC16}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {F2107221-7687-4F18-AEAC-FAA7C4EFCC16}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {94B3883E-2A1C-4B7C-A98F-6ED6343F0D8B}.Debug|Win32.ActiveCfg = Debug|Win32
- {94B3883E-2A1C-4B7C-A98F-6ED6343F0D8B}.Debug|Win32.Build.0 = Debug|Win32
- {94B3883E-2A1C-4B7C-A98F-6ED6343F0D8B}.Debug|x64.ActiveCfg = Debug|x64
- {94B3883E-2A1C-4B7C-A98F-6ED6343F0D8B}.Debug|x64.Build.0 = Debug|x64
- {94B3883E-2A1C-4B7C-A98F-6ED6343F0D8B}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {94B3883E-2A1C-4B7C-A98F-6ED6343F0D8B}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {94B3883E-2A1C-4B7C-A98F-6ED6343F0D8B}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {94B3883E-2A1C-4B7C-A98F-6ED6343F0D8B}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {94B3883E-2A1C-4B7C-A98F-6ED6343F0D8B}.Release|Win32.ActiveCfg = Release|Win32
- {94B3883E-2A1C-4B7C-A98F-6ED6343F0D8B}.Release|Win32.Build.0 = Release|Win32
- {94B3883E-2A1C-4B7C-A98F-6ED6343F0D8B}.Release|x64.ActiveCfg = Release|x64
- {94B3883E-2A1C-4B7C-A98F-6ED6343F0D8B}.Release|x64.Build.0 = Release|x64
- {94B3883E-2A1C-4B7C-A98F-6ED6343F0D8B}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {94B3883E-2A1C-4B7C-A98F-6ED6343F0D8B}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {94B3883E-2A1C-4B7C-A98F-6ED6343F0D8B}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {94B3883E-2A1C-4B7C-A98F-6ED6343F0D8B}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
- {8D0BB3E1-BFB0-4557-9DD0-A2E82D3D9C70}.Debug|Win32.ActiveCfg = Debug|Win32
- {8D0BB3E1-BFB0-4557-9DD0-A2E82D3D9C70}.Debug|Win32.Build.0 = Debug|Win32
- {8D0BB3E1-BFB0-4557-9DD0-A2E82D3D9C70}.Debug|x64.ActiveCfg = Debug|x64
- {8D0BB3E1-BFB0-4557-9DD0-A2E82D3D9C70}.Debug|x64.Build.0 = Debug|x64
- {8D0BB3E1-BFB0-4557-9DD0-A2E82D3D9C70}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
- {8D0BB3E1-BFB0-4557-9DD0-A2E82D3D9C70}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
- {8D0BB3E1-BFB0-4557-9DD0-A2E82D3D9C70}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
- {8D0BB3E1-BFB0-4557-9DD0-A2E82D3D9C70}.DebugDLL|x64.Build.0 = DebugDLL|x64
- {8D0BB3E1-BFB0-4557-9DD0-A2E82D3D9C70}.Release|Win32.ActiveCfg = Release|Win32
- {8D0BB3E1-BFB0-4557-9DD0-A2E82D3D9C70}.Release|Win32.Build.0 = Release|Win32
- {8D0BB3E1-BFB0-4557-9DD0-A2E82D3D9C70}.Release|x64.ActiveCfg = Release|x64
- {8D0BB3E1-BFB0-4557-9DD0-A2E82D3D9C70}.Release|x64.Build.0 = Release|x64
- {8D0BB3E1-BFB0-4557-9DD0-A2E82D3D9C70}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
- {8D0BB3E1-BFB0-4557-9DD0-A2E82D3D9C70}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
- {8D0BB3E1-BFB0-4557-9DD0-A2E82D3D9C70}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
- {8D0BB3E1-BFB0-4557-9DD0-A2E82D3D9C70}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {347672C9-B4CA-4B21-8281-51955A9C50AC}.Debug|Win32.ActiveCfg = Debug|Win32
+ {347672C9-B4CA-4B21-8281-51955A9C50AC}.Debug|Win32.Build.0 = Debug|Win32
+ {347672C9-B4CA-4B21-8281-51955A9C50AC}.Debug|x64.ActiveCfg = Debug|x64
+ {347672C9-B4CA-4B21-8281-51955A9C50AC}.Debug|x64.Build.0 = Debug|x64
+ {347672C9-B4CA-4B21-8281-51955A9C50AC}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {347672C9-B4CA-4B21-8281-51955A9C50AC}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {347672C9-B4CA-4B21-8281-51955A9C50AC}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {347672C9-B4CA-4B21-8281-51955A9C50AC}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {347672C9-B4CA-4B21-8281-51955A9C50AC}.Release|Win32.ActiveCfg = Release|Win32
+ {347672C9-B4CA-4B21-8281-51955A9C50AC}.Release|Win32.Build.0 = Release|Win32
+ {347672C9-B4CA-4B21-8281-51955A9C50AC}.Release|x64.ActiveCfg = Release|x64
+ {347672C9-B4CA-4B21-8281-51955A9C50AC}.Release|x64.Build.0 = Release|x64
+ {347672C9-B4CA-4B21-8281-51955A9C50AC}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {347672C9-B4CA-4B21-8281-51955A9C50AC}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {347672C9-B4CA-4B21-8281-51955A9C50AC}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {347672C9-B4CA-4B21-8281-51955A9C50AC}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {B2AEBA00-E619-4FD2-80DA-9F713DD0306E}.Debug|Win32.ActiveCfg = Debug|Win32
+ {B2AEBA00-E619-4FD2-80DA-9F713DD0306E}.Debug|Win32.Build.0 = Debug|Win32
+ {B2AEBA00-E619-4FD2-80DA-9F713DD0306E}.Debug|x64.ActiveCfg = Debug|x64
+ {B2AEBA00-E619-4FD2-80DA-9F713DD0306E}.Debug|x64.Build.0 = Debug|x64
+ {B2AEBA00-E619-4FD2-80DA-9F713DD0306E}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {B2AEBA00-E619-4FD2-80DA-9F713DD0306E}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {B2AEBA00-E619-4FD2-80DA-9F713DD0306E}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {B2AEBA00-E619-4FD2-80DA-9F713DD0306E}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {B2AEBA00-E619-4FD2-80DA-9F713DD0306E}.Release|Win32.ActiveCfg = Release|Win32
+ {B2AEBA00-E619-4FD2-80DA-9F713DD0306E}.Release|Win32.Build.0 = Release|Win32
+ {B2AEBA00-E619-4FD2-80DA-9F713DD0306E}.Release|x64.ActiveCfg = Release|x64
+ {B2AEBA00-E619-4FD2-80DA-9F713DD0306E}.Release|x64.Build.0 = Release|x64
+ {B2AEBA00-E619-4FD2-80DA-9F713DD0306E}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {B2AEBA00-E619-4FD2-80DA-9F713DD0306E}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {B2AEBA00-E619-4FD2-80DA-9F713DD0306E}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {B2AEBA00-E619-4FD2-80DA-9F713DD0306E}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {4DFAAB85-944C-4B34-A3C0-70370B655451}.Debug|Win32.ActiveCfg = Debug|Win32
+ {4DFAAB85-944C-4B34-A3C0-70370B655451}.Debug|Win32.Build.0 = Debug|Win32
+ {4DFAAB85-944C-4B34-A3C0-70370B655451}.Debug|x64.ActiveCfg = Debug|x64
+ {4DFAAB85-944C-4B34-A3C0-70370B655451}.Debug|x64.Build.0 = Debug|x64
+ {4DFAAB85-944C-4B34-A3C0-70370B655451}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {4DFAAB85-944C-4B34-A3C0-70370B655451}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {4DFAAB85-944C-4B34-A3C0-70370B655451}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {4DFAAB85-944C-4B34-A3C0-70370B655451}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {4DFAAB85-944C-4B34-A3C0-70370B655451}.Release|Win32.ActiveCfg = Release|Win32
+ {4DFAAB85-944C-4B34-A3C0-70370B655451}.Release|Win32.Build.0 = Release|Win32
+ {4DFAAB85-944C-4B34-A3C0-70370B655451}.Release|x64.ActiveCfg = Release|x64
+ {4DFAAB85-944C-4B34-A3C0-70370B655451}.Release|x64.Build.0 = Release|x64
+ {4DFAAB85-944C-4B34-A3C0-70370B655451}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {4DFAAB85-944C-4B34-A3C0-70370B655451}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {4DFAAB85-944C-4B34-A3C0-70370B655451}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {4DFAAB85-944C-4B34-A3C0-70370B655451}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {53EC88ED-74CA-4F01-8FDB-94989A896E22}.Debug|Win32.ActiveCfg = Debug|Win32
+ {53EC88ED-74CA-4F01-8FDB-94989A896E22}.Debug|Win32.Build.0 = Debug|Win32
+ {53EC88ED-74CA-4F01-8FDB-94989A896E22}.Debug|x64.ActiveCfg = Debug|x64
+ {53EC88ED-74CA-4F01-8FDB-94989A896E22}.Debug|x64.Build.0 = Debug|x64
+ {53EC88ED-74CA-4F01-8FDB-94989A896E22}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {53EC88ED-74CA-4F01-8FDB-94989A896E22}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {53EC88ED-74CA-4F01-8FDB-94989A896E22}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {53EC88ED-74CA-4F01-8FDB-94989A896E22}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {53EC88ED-74CA-4F01-8FDB-94989A896E22}.Release|Win32.ActiveCfg = Release|Win32
+ {53EC88ED-74CA-4F01-8FDB-94989A896E22}.Release|Win32.Build.0 = Release|Win32
+ {53EC88ED-74CA-4F01-8FDB-94989A896E22}.Release|x64.ActiveCfg = Release|x64
+ {53EC88ED-74CA-4F01-8FDB-94989A896E22}.Release|x64.Build.0 = Release|x64
+ {53EC88ED-74CA-4F01-8FDB-94989A896E22}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {53EC88ED-74CA-4F01-8FDB-94989A896E22}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {53EC88ED-74CA-4F01-8FDB-94989A896E22}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {53EC88ED-74CA-4F01-8FDB-94989A896E22}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {4FDCF0D2-40AA-4856-98BE-A6FD3B7A443C}.Debug|Win32.ActiveCfg = Debug|Win32
+ {4FDCF0D2-40AA-4856-98BE-A6FD3B7A443C}.Debug|Win32.Build.0 = Debug|Win32
+ {4FDCF0D2-40AA-4856-98BE-A6FD3B7A443C}.Debug|x64.ActiveCfg = Debug|x64
+ {4FDCF0D2-40AA-4856-98BE-A6FD3B7A443C}.Debug|x64.Build.0 = Debug|x64
+ {4FDCF0D2-40AA-4856-98BE-A6FD3B7A443C}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {4FDCF0D2-40AA-4856-98BE-A6FD3B7A443C}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {4FDCF0D2-40AA-4856-98BE-A6FD3B7A443C}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {4FDCF0D2-40AA-4856-98BE-A6FD3B7A443C}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {4FDCF0D2-40AA-4856-98BE-A6FD3B7A443C}.Release|Win32.ActiveCfg = Release|Win32
+ {4FDCF0D2-40AA-4856-98BE-A6FD3B7A443C}.Release|Win32.Build.0 = Release|Win32
+ {4FDCF0D2-40AA-4856-98BE-A6FD3B7A443C}.Release|x64.ActiveCfg = Release|x64
+ {4FDCF0D2-40AA-4856-98BE-A6FD3B7A443C}.Release|x64.Build.0 = Release|x64
+ {4FDCF0D2-40AA-4856-98BE-A6FD3B7A443C}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {4FDCF0D2-40AA-4856-98BE-A6FD3B7A443C}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {4FDCF0D2-40AA-4856-98BE-A6FD3B7A443C}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {4FDCF0D2-40AA-4856-98BE-A6FD3B7A443C}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {CAD80EBF-2DAF-4091-B486-59D86D65A8AD}.Debug|Win32.ActiveCfg = Debug|Win32
+ {CAD80EBF-2DAF-4091-B486-59D86D65A8AD}.Debug|Win32.Build.0 = Debug|Win32
+ {CAD80EBF-2DAF-4091-B486-59D86D65A8AD}.Debug|x64.ActiveCfg = Debug|x64
+ {CAD80EBF-2DAF-4091-B486-59D86D65A8AD}.Debug|x64.Build.0 = Debug|x64
+ {CAD80EBF-2DAF-4091-B486-59D86D65A8AD}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {CAD80EBF-2DAF-4091-B486-59D86D65A8AD}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {CAD80EBF-2DAF-4091-B486-59D86D65A8AD}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {CAD80EBF-2DAF-4091-B486-59D86D65A8AD}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {CAD80EBF-2DAF-4091-B486-59D86D65A8AD}.Release|Win32.ActiveCfg = Release|Win32
+ {CAD80EBF-2DAF-4091-B486-59D86D65A8AD}.Release|Win32.Build.0 = Release|Win32
+ {CAD80EBF-2DAF-4091-B486-59D86D65A8AD}.Release|x64.ActiveCfg = Release|x64
+ {CAD80EBF-2DAF-4091-B486-59D86D65A8AD}.Release|x64.Build.0 = Release|x64
+ {CAD80EBF-2DAF-4091-B486-59D86D65A8AD}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {CAD80EBF-2DAF-4091-B486-59D86D65A8AD}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {CAD80EBF-2DAF-4091-B486-59D86D65A8AD}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {CAD80EBF-2DAF-4091-B486-59D86D65A8AD}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {B8E40D4D-C20C-42BD-B5E4-6BEB9D08344A}.Debug|Win32.ActiveCfg = Debug|Win32
+ {B8E40D4D-C20C-42BD-B5E4-6BEB9D08344A}.Debug|Win32.Build.0 = Debug|Win32
+ {B8E40D4D-C20C-42BD-B5E4-6BEB9D08344A}.Debug|x64.ActiveCfg = Debug|x64
+ {B8E40D4D-C20C-42BD-B5E4-6BEB9D08344A}.Debug|x64.Build.0 = Debug|x64
+ {B8E40D4D-C20C-42BD-B5E4-6BEB9D08344A}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {B8E40D4D-C20C-42BD-B5E4-6BEB9D08344A}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {B8E40D4D-C20C-42BD-B5E4-6BEB9D08344A}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {B8E40D4D-C20C-42BD-B5E4-6BEB9D08344A}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {B8E40D4D-C20C-42BD-B5E4-6BEB9D08344A}.Release|Win32.ActiveCfg = Release|Win32
+ {B8E40D4D-C20C-42BD-B5E4-6BEB9D08344A}.Release|Win32.Build.0 = Release|Win32
+ {B8E40D4D-C20C-42BD-B5E4-6BEB9D08344A}.Release|x64.ActiveCfg = Release|x64
+ {B8E40D4D-C20C-42BD-B5E4-6BEB9D08344A}.Release|x64.Build.0 = Release|x64
+ {B8E40D4D-C20C-42BD-B5E4-6BEB9D08344A}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {B8E40D4D-C20C-42BD-B5E4-6BEB9D08344A}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {B8E40D4D-C20C-42BD-B5E4-6BEB9D08344A}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {B8E40D4D-C20C-42BD-B5E4-6BEB9D08344A}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {6058EDC4-453A-48B1-8E27-83820FFB7203}.Debug|Win32.ActiveCfg = Debug|Win32
+ {6058EDC4-453A-48B1-8E27-83820FFB7203}.Debug|Win32.Build.0 = Debug|Win32
+ {6058EDC4-453A-48B1-8E27-83820FFB7203}.Debug|x64.ActiveCfg = Debug|x64
+ {6058EDC4-453A-48B1-8E27-83820FFB7203}.Debug|x64.Build.0 = Debug|x64
+ {6058EDC4-453A-48B1-8E27-83820FFB7203}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {6058EDC4-453A-48B1-8E27-83820FFB7203}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {6058EDC4-453A-48B1-8E27-83820FFB7203}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {6058EDC4-453A-48B1-8E27-83820FFB7203}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {6058EDC4-453A-48B1-8E27-83820FFB7203}.Release|Win32.ActiveCfg = Release|Win32
+ {6058EDC4-453A-48B1-8E27-83820FFB7203}.Release|Win32.Build.0 = Release|Win32
+ {6058EDC4-453A-48B1-8E27-83820FFB7203}.Release|x64.ActiveCfg = Release|x64
+ {6058EDC4-453A-48B1-8E27-83820FFB7203}.Release|x64.Build.0 = Release|x64
+ {6058EDC4-453A-48B1-8E27-83820FFB7203}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {6058EDC4-453A-48B1-8E27-83820FFB7203}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {6058EDC4-453A-48B1-8E27-83820FFB7203}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {6058EDC4-453A-48B1-8E27-83820FFB7203}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {A2E2AE46-C7B9-4544-B138-6F7662DF2216}.Debug|Win32.ActiveCfg = Debug|Win32
+ {A2E2AE46-C7B9-4544-B138-6F7662DF2216}.Debug|Win32.Build.0 = Debug|Win32
+ {A2E2AE46-C7B9-4544-B138-6F7662DF2216}.Debug|x64.ActiveCfg = Debug|x64
+ {A2E2AE46-C7B9-4544-B138-6F7662DF2216}.Debug|x64.Build.0 = Debug|x64
+ {A2E2AE46-C7B9-4544-B138-6F7662DF2216}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {A2E2AE46-C7B9-4544-B138-6F7662DF2216}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {A2E2AE46-C7B9-4544-B138-6F7662DF2216}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {A2E2AE46-C7B9-4544-B138-6F7662DF2216}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {A2E2AE46-C7B9-4544-B138-6F7662DF2216}.Release|Win32.ActiveCfg = Release|Win32
+ {A2E2AE46-C7B9-4544-B138-6F7662DF2216}.Release|Win32.Build.0 = Release|Win32
+ {A2E2AE46-C7B9-4544-B138-6F7662DF2216}.Release|x64.ActiveCfg = Release|x64
+ {A2E2AE46-C7B9-4544-B138-6F7662DF2216}.Release|x64.Build.0 = Release|x64
+ {A2E2AE46-C7B9-4544-B138-6F7662DF2216}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {A2E2AE46-C7B9-4544-B138-6F7662DF2216}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {A2E2AE46-C7B9-4544-B138-6F7662DF2216}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {A2E2AE46-C7B9-4544-B138-6F7662DF2216}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {D2059A10-7A4D-471A-BAEA-76479FD2773D}.Debug|Win32.ActiveCfg = Debug|Win32
+ {D2059A10-7A4D-471A-BAEA-76479FD2773D}.Debug|Win32.Build.0 = Debug|Win32
+ {D2059A10-7A4D-471A-BAEA-76479FD2773D}.Debug|x64.ActiveCfg = Debug|x64
+ {D2059A10-7A4D-471A-BAEA-76479FD2773D}.Debug|x64.Build.0 = Debug|x64
+ {D2059A10-7A4D-471A-BAEA-76479FD2773D}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {D2059A10-7A4D-471A-BAEA-76479FD2773D}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {D2059A10-7A4D-471A-BAEA-76479FD2773D}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {D2059A10-7A4D-471A-BAEA-76479FD2773D}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {D2059A10-7A4D-471A-BAEA-76479FD2773D}.Release|Win32.ActiveCfg = Release|Win32
+ {D2059A10-7A4D-471A-BAEA-76479FD2773D}.Release|Win32.Build.0 = Release|Win32
+ {D2059A10-7A4D-471A-BAEA-76479FD2773D}.Release|x64.ActiveCfg = Release|x64
+ {D2059A10-7A4D-471A-BAEA-76479FD2773D}.Release|x64.Build.0 = Release|x64
+ {D2059A10-7A4D-471A-BAEA-76479FD2773D}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {D2059A10-7A4D-471A-BAEA-76479FD2773D}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {D2059A10-7A4D-471A-BAEA-76479FD2773D}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {D2059A10-7A4D-471A-BAEA-76479FD2773D}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {D3E7608D-BA37-41A8-8012-9DC2E44E2703}.Debug|Win32.ActiveCfg = Debug|Win32
+ {D3E7608D-BA37-41A8-8012-9DC2E44E2703}.Debug|Win32.Build.0 = Debug|Win32
+ {D3E7608D-BA37-41A8-8012-9DC2E44E2703}.Debug|x64.ActiveCfg = Debug|x64
+ {D3E7608D-BA37-41A8-8012-9DC2E44E2703}.Debug|x64.Build.0 = Debug|x64
+ {D3E7608D-BA37-41A8-8012-9DC2E44E2703}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {D3E7608D-BA37-41A8-8012-9DC2E44E2703}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {D3E7608D-BA37-41A8-8012-9DC2E44E2703}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {D3E7608D-BA37-41A8-8012-9DC2E44E2703}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {D3E7608D-BA37-41A8-8012-9DC2E44E2703}.Release|Win32.ActiveCfg = Release|Win32
+ {D3E7608D-BA37-41A8-8012-9DC2E44E2703}.Release|Win32.Build.0 = Release|Win32
+ {D3E7608D-BA37-41A8-8012-9DC2E44E2703}.Release|x64.ActiveCfg = Release|x64
+ {D3E7608D-BA37-41A8-8012-9DC2E44E2703}.Release|x64.Build.0 = Release|x64
+ {D3E7608D-BA37-41A8-8012-9DC2E44E2703}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {D3E7608D-BA37-41A8-8012-9DC2E44E2703}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {D3E7608D-BA37-41A8-8012-9DC2E44E2703}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {D3E7608D-BA37-41A8-8012-9DC2E44E2703}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {DD4C129E-9390-41EC-90E8-CEDF4C6F7152}.Debug|Win32.ActiveCfg = Debug|Win32
+ {DD4C129E-9390-41EC-90E8-CEDF4C6F7152}.Debug|Win32.Build.0 = Debug|Win32
+ {DD4C129E-9390-41EC-90E8-CEDF4C6F7152}.Debug|x64.ActiveCfg = Debug|x64
+ {DD4C129E-9390-41EC-90E8-CEDF4C6F7152}.Debug|x64.Build.0 = Debug|x64
+ {DD4C129E-9390-41EC-90E8-CEDF4C6F7152}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {DD4C129E-9390-41EC-90E8-CEDF4C6F7152}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {DD4C129E-9390-41EC-90E8-CEDF4C6F7152}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {DD4C129E-9390-41EC-90E8-CEDF4C6F7152}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {DD4C129E-9390-41EC-90E8-CEDF4C6F7152}.Release|Win32.ActiveCfg = Release|Win32
+ {DD4C129E-9390-41EC-90E8-CEDF4C6F7152}.Release|Win32.Build.0 = Release|Win32
+ {DD4C129E-9390-41EC-90E8-CEDF4C6F7152}.Release|x64.ActiveCfg = Release|x64
+ {DD4C129E-9390-41EC-90E8-CEDF4C6F7152}.Release|x64.Build.0 = Release|x64
+ {DD4C129E-9390-41EC-90E8-CEDF4C6F7152}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {DD4C129E-9390-41EC-90E8-CEDF4C6F7152}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {DD4C129E-9390-41EC-90E8-CEDF4C6F7152}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {DD4C129E-9390-41EC-90E8-CEDF4C6F7152}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {A901D889-28AD-4B69-9F81-5817D0B7120F}.Debug|Win32.ActiveCfg = Debug|Win32
+ {A901D889-28AD-4B69-9F81-5817D0B7120F}.Debug|Win32.Build.0 = Debug|Win32
+ {A901D889-28AD-4B69-9F81-5817D0B7120F}.Debug|x64.ActiveCfg = Debug|x64
+ {A901D889-28AD-4B69-9F81-5817D0B7120F}.Debug|x64.Build.0 = Debug|x64
+ {A901D889-28AD-4B69-9F81-5817D0B7120F}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {A901D889-28AD-4B69-9F81-5817D0B7120F}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {A901D889-28AD-4B69-9F81-5817D0B7120F}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {A901D889-28AD-4B69-9F81-5817D0B7120F}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {A901D889-28AD-4B69-9F81-5817D0B7120F}.Release|Win32.ActiveCfg = Release|Win32
+ {A901D889-28AD-4B69-9F81-5817D0B7120F}.Release|Win32.Build.0 = Release|Win32
+ {A901D889-28AD-4B69-9F81-5817D0B7120F}.Release|x64.ActiveCfg = Release|x64
+ {A901D889-28AD-4B69-9F81-5817D0B7120F}.Release|x64.Build.0 = Release|x64
+ {A901D889-28AD-4B69-9F81-5817D0B7120F}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {A901D889-28AD-4B69-9F81-5817D0B7120F}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {A901D889-28AD-4B69-9F81-5817D0B7120F}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {A901D889-28AD-4B69-9F81-5817D0B7120F}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {1DDF5590-54DA-48B9-9168-E970F443F224}.Debug|Win32.ActiveCfg = Debug|Win32
+ {1DDF5590-54DA-48B9-9168-E970F443F224}.Debug|Win32.Build.0 = Debug|Win32
+ {1DDF5590-54DA-48B9-9168-E970F443F224}.Debug|x64.ActiveCfg = Debug|x64
+ {1DDF5590-54DA-48B9-9168-E970F443F224}.Debug|x64.Build.0 = Debug|x64
+ {1DDF5590-54DA-48B9-9168-E970F443F224}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {1DDF5590-54DA-48B9-9168-E970F443F224}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {1DDF5590-54DA-48B9-9168-E970F443F224}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {1DDF5590-54DA-48B9-9168-E970F443F224}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {1DDF5590-54DA-48B9-9168-E970F443F224}.Release|Win32.ActiveCfg = Release|Win32
+ {1DDF5590-54DA-48B9-9168-E970F443F224}.Release|Win32.Build.0 = Release|Win32
+ {1DDF5590-54DA-48B9-9168-E970F443F224}.Release|x64.ActiveCfg = Release|x64
+ {1DDF5590-54DA-48B9-9168-E970F443F224}.Release|x64.Build.0 = Release|x64
+ {1DDF5590-54DA-48B9-9168-E970F443F224}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {1DDF5590-54DA-48B9-9168-E970F443F224}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {1DDF5590-54DA-48B9-9168-E970F443F224}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {1DDF5590-54DA-48B9-9168-E970F443F224}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {A546FCD9-97BD-475F-975E-04AB9AC4E077}.Debug|Win32.ActiveCfg = Debug|Win32
+ {A546FCD9-97BD-475F-975E-04AB9AC4E077}.Debug|Win32.Build.0 = Debug|Win32
+ {A546FCD9-97BD-475F-975E-04AB9AC4E077}.Debug|x64.ActiveCfg = Debug|x64
+ {A546FCD9-97BD-475F-975E-04AB9AC4E077}.Debug|x64.Build.0 = Debug|x64
+ {A546FCD9-97BD-475F-975E-04AB9AC4E077}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {A546FCD9-97BD-475F-975E-04AB9AC4E077}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {A546FCD9-97BD-475F-975E-04AB9AC4E077}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {A546FCD9-97BD-475F-975E-04AB9AC4E077}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {A546FCD9-97BD-475F-975E-04AB9AC4E077}.Release|Win32.ActiveCfg = Release|Win32
+ {A546FCD9-97BD-475F-975E-04AB9AC4E077}.Release|Win32.Build.0 = Release|Win32
+ {A546FCD9-97BD-475F-975E-04AB9AC4E077}.Release|x64.ActiveCfg = Release|x64
+ {A546FCD9-97BD-475F-975E-04AB9AC4E077}.Release|x64.Build.0 = Release|x64
+ {A546FCD9-97BD-475F-975E-04AB9AC4E077}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {A546FCD9-97BD-475F-975E-04AB9AC4E077}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {A546FCD9-97BD-475F-975E-04AB9AC4E077}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {A546FCD9-97BD-475F-975E-04AB9AC4E077}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {C17DDF84-6A2C-4801-85ED-04AD0B29CD0F}.Debug|Win32.ActiveCfg = Debug|Win32
+ {C17DDF84-6A2C-4801-85ED-04AD0B29CD0F}.Debug|Win32.Build.0 = Debug|Win32
+ {C17DDF84-6A2C-4801-85ED-04AD0B29CD0F}.Debug|x64.ActiveCfg = Debug|x64
+ {C17DDF84-6A2C-4801-85ED-04AD0B29CD0F}.Debug|x64.Build.0 = Debug|x64
+ {C17DDF84-6A2C-4801-85ED-04AD0B29CD0F}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {C17DDF84-6A2C-4801-85ED-04AD0B29CD0F}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {C17DDF84-6A2C-4801-85ED-04AD0B29CD0F}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {C17DDF84-6A2C-4801-85ED-04AD0B29CD0F}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {C17DDF84-6A2C-4801-85ED-04AD0B29CD0F}.Release|Win32.ActiveCfg = Release|Win32
+ {C17DDF84-6A2C-4801-85ED-04AD0B29CD0F}.Release|Win32.Build.0 = Release|Win32
+ {C17DDF84-6A2C-4801-85ED-04AD0B29CD0F}.Release|x64.ActiveCfg = Release|x64
+ {C17DDF84-6A2C-4801-85ED-04AD0B29CD0F}.Release|x64.Build.0 = Release|x64
+ {C17DDF84-6A2C-4801-85ED-04AD0B29CD0F}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {C17DDF84-6A2C-4801-85ED-04AD0B29CD0F}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {C17DDF84-6A2C-4801-85ED-04AD0B29CD0F}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {C17DDF84-6A2C-4801-85ED-04AD0B29CD0F}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {1136C677-E611-42A1-8BBF-C68BBFE19470}.Debug|Win32.ActiveCfg = Debug|Win32
+ {1136C677-E611-42A1-8BBF-C68BBFE19470}.Debug|Win32.Build.0 = Debug|Win32
+ {1136C677-E611-42A1-8BBF-C68BBFE19470}.Debug|x64.ActiveCfg = Debug|x64
+ {1136C677-E611-42A1-8BBF-C68BBFE19470}.Debug|x64.Build.0 = Debug|x64
+ {1136C677-E611-42A1-8BBF-C68BBFE19470}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {1136C677-E611-42A1-8BBF-C68BBFE19470}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {1136C677-E611-42A1-8BBF-C68BBFE19470}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {1136C677-E611-42A1-8BBF-C68BBFE19470}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {1136C677-E611-42A1-8BBF-C68BBFE19470}.Release|Win32.ActiveCfg = Release|Win32
+ {1136C677-E611-42A1-8BBF-C68BBFE19470}.Release|Win32.Build.0 = Release|Win32
+ {1136C677-E611-42A1-8BBF-C68BBFE19470}.Release|x64.ActiveCfg = Release|x64
+ {1136C677-E611-42A1-8BBF-C68BBFE19470}.Release|x64.Build.0 = Release|x64
+ {1136C677-E611-42A1-8BBF-C68BBFE19470}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {1136C677-E611-42A1-8BBF-C68BBFE19470}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {1136C677-E611-42A1-8BBF-C68BBFE19470}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {1136C677-E611-42A1-8BBF-C68BBFE19470}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {95AE7147-09C4-4C87-A6AB-9B5714D51714}.Debug|Win32.ActiveCfg = Debug|Win32
+ {95AE7147-09C4-4C87-A6AB-9B5714D51714}.Debug|Win32.Build.0 = Debug|Win32
+ {95AE7147-09C4-4C87-A6AB-9B5714D51714}.Debug|x64.ActiveCfg = Debug|x64
+ {95AE7147-09C4-4C87-A6AB-9B5714D51714}.Debug|x64.Build.0 = Debug|x64
+ {95AE7147-09C4-4C87-A6AB-9B5714D51714}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {95AE7147-09C4-4C87-A6AB-9B5714D51714}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {95AE7147-09C4-4C87-A6AB-9B5714D51714}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {95AE7147-09C4-4C87-A6AB-9B5714D51714}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {95AE7147-09C4-4C87-A6AB-9B5714D51714}.Release|Win32.ActiveCfg = Release|Win32
+ {95AE7147-09C4-4C87-A6AB-9B5714D51714}.Release|Win32.Build.0 = Release|Win32
+ {95AE7147-09C4-4C87-A6AB-9B5714D51714}.Release|x64.ActiveCfg = Release|x64
+ {95AE7147-09C4-4C87-A6AB-9B5714D51714}.Release|x64.Build.0 = Release|x64
+ {95AE7147-09C4-4C87-A6AB-9B5714D51714}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {95AE7147-09C4-4C87-A6AB-9B5714D51714}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {95AE7147-09C4-4C87-A6AB-9B5714D51714}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {95AE7147-09C4-4C87-A6AB-9B5714D51714}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {6171ABC9-E3CF-402A-A5A1-58FF5A6D3AB5}.Debug|Win32.ActiveCfg = Debug|Win32
+ {6171ABC9-E3CF-402A-A5A1-58FF5A6D3AB5}.Debug|Win32.Build.0 = Debug|Win32
+ {6171ABC9-E3CF-402A-A5A1-58FF5A6D3AB5}.Debug|x64.ActiveCfg = Debug|x64
+ {6171ABC9-E3CF-402A-A5A1-58FF5A6D3AB5}.Debug|x64.Build.0 = Debug|x64
+ {6171ABC9-E3CF-402A-A5A1-58FF5A6D3AB5}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {6171ABC9-E3CF-402A-A5A1-58FF5A6D3AB5}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {6171ABC9-E3CF-402A-A5A1-58FF5A6D3AB5}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {6171ABC9-E3CF-402A-A5A1-58FF5A6D3AB5}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {6171ABC9-E3CF-402A-A5A1-58FF5A6D3AB5}.Release|Win32.ActiveCfg = Release|Win32
+ {6171ABC9-E3CF-402A-A5A1-58FF5A6D3AB5}.Release|Win32.Build.0 = Release|Win32
+ {6171ABC9-E3CF-402A-A5A1-58FF5A6D3AB5}.Release|x64.ActiveCfg = Release|x64
+ {6171ABC9-E3CF-402A-A5A1-58FF5A6D3AB5}.Release|x64.Build.0 = Release|x64
+ {6171ABC9-E3CF-402A-A5A1-58FF5A6D3AB5}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {6171ABC9-E3CF-402A-A5A1-58FF5A6D3AB5}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {6171ABC9-E3CF-402A-A5A1-58FF5A6D3AB5}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {6171ABC9-E3CF-402A-A5A1-58FF5A6D3AB5}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {08AA84EC-97CC-4997-BFFF-7CDC535A5C25}.Debug|Win32.ActiveCfg = Debug|Win32
+ {08AA84EC-97CC-4997-BFFF-7CDC535A5C25}.Debug|Win32.Build.0 = Debug|Win32
+ {08AA84EC-97CC-4997-BFFF-7CDC535A5C25}.Debug|x64.ActiveCfg = Debug|x64
+ {08AA84EC-97CC-4997-BFFF-7CDC535A5C25}.Debug|x64.Build.0 = Debug|x64
+ {08AA84EC-97CC-4997-BFFF-7CDC535A5C25}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {08AA84EC-97CC-4997-BFFF-7CDC535A5C25}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {08AA84EC-97CC-4997-BFFF-7CDC535A5C25}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {08AA84EC-97CC-4997-BFFF-7CDC535A5C25}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {08AA84EC-97CC-4997-BFFF-7CDC535A5C25}.Release|Win32.ActiveCfg = Release|Win32
+ {08AA84EC-97CC-4997-BFFF-7CDC535A5C25}.Release|Win32.Build.0 = Release|Win32
+ {08AA84EC-97CC-4997-BFFF-7CDC535A5C25}.Release|x64.ActiveCfg = Release|x64
+ {08AA84EC-97CC-4997-BFFF-7CDC535A5C25}.Release|x64.Build.0 = Release|x64
+ {08AA84EC-97CC-4997-BFFF-7CDC535A5C25}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {08AA84EC-97CC-4997-BFFF-7CDC535A5C25}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {08AA84EC-97CC-4997-BFFF-7CDC535A5C25}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {08AA84EC-97CC-4997-BFFF-7CDC535A5C25}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {24B6F0A3-B354-4089-B489-560DEF53C75C}.Debug|Win32.ActiveCfg = Debug|Win32
+ {24B6F0A3-B354-4089-B489-560DEF53C75C}.Debug|Win32.Build.0 = Debug|Win32
+ {24B6F0A3-B354-4089-B489-560DEF53C75C}.Debug|x64.ActiveCfg = Debug|x64
+ {24B6F0A3-B354-4089-B489-560DEF53C75C}.Debug|x64.Build.0 = Debug|x64
+ {24B6F0A3-B354-4089-B489-560DEF53C75C}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {24B6F0A3-B354-4089-B489-560DEF53C75C}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {24B6F0A3-B354-4089-B489-560DEF53C75C}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {24B6F0A3-B354-4089-B489-560DEF53C75C}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {24B6F0A3-B354-4089-B489-560DEF53C75C}.Release|Win32.ActiveCfg = Release|Win32
+ {24B6F0A3-B354-4089-B489-560DEF53C75C}.Release|Win32.Build.0 = Release|Win32
+ {24B6F0A3-B354-4089-B489-560DEF53C75C}.Release|x64.ActiveCfg = Release|x64
+ {24B6F0A3-B354-4089-B489-560DEF53C75C}.Release|x64.Build.0 = Release|x64
+ {24B6F0A3-B354-4089-B489-560DEF53C75C}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {24B6F0A3-B354-4089-B489-560DEF53C75C}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {24B6F0A3-B354-4089-B489-560DEF53C75C}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {24B6F0A3-B354-4089-B489-560DEF53C75C}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {43D2CAEA-F7C5-43AB-9460-53229B1A8CCE}.Debug|Win32.ActiveCfg = Debug|Win32
+ {43D2CAEA-F7C5-43AB-9460-53229B1A8CCE}.Debug|Win32.Build.0 = Debug|Win32
+ {43D2CAEA-F7C5-43AB-9460-53229B1A8CCE}.Debug|x64.ActiveCfg = Debug|x64
+ {43D2CAEA-F7C5-43AB-9460-53229B1A8CCE}.Debug|x64.Build.0 = Debug|x64
+ {43D2CAEA-F7C5-43AB-9460-53229B1A8CCE}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {43D2CAEA-F7C5-43AB-9460-53229B1A8CCE}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {43D2CAEA-F7C5-43AB-9460-53229B1A8CCE}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {43D2CAEA-F7C5-43AB-9460-53229B1A8CCE}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {43D2CAEA-F7C5-43AB-9460-53229B1A8CCE}.Release|Win32.ActiveCfg = Release|Win32
+ {43D2CAEA-F7C5-43AB-9460-53229B1A8CCE}.Release|Win32.Build.0 = Release|Win32
+ {43D2CAEA-F7C5-43AB-9460-53229B1A8CCE}.Release|x64.ActiveCfg = Release|x64
+ {43D2CAEA-F7C5-43AB-9460-53229B1A8CCE}.Release|x64.Build.0 = Release|x64
+ {43D2CAEA-F7C5-43AB-9460-53229B1A8CCE}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {43D2CAEA-F7C5-43AB-9460-53229B1A8CCE}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {43D2CAEA-F7C5-43AB-9460-53229B1A8CCE}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {43D2CAEA-F7C5-43AB-9460-53229B1A8CCE}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {CFF41F73-FF0C-4EDF-94FD-5FDCB8D0D19F}.Debug|Win32.ActiveCfg = Debug|Win32
+ {CFF41F73-FF0C-4EDF-94FD-5FDCB8D0D19F}.Debug|Win32.Build.0 = Debug|Win32
+ {CFF41F73-FF0C-4EDF-94FD-5FDCB8D0D19F}.Debug|x64.ActiveCfg = Debug|x64
+ {CFF41F73-FF0C-4EDF-94FD-5FDCB8D0D19F}.Debug|x64.Build.0 = Debug|x64
+ {CFF41F73-FF0C-4EDF-94FD-5FDCB8D0D19F}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {CFF41F73-FF0C-4EDF-94FD-5FDCB8D0D19F}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {CFF41F73-FF0C-4EDF-94FD-5FDCB8D0D19F}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {CFF41F73-FF0C-4EDF-94FD-5FDCB8D0D19F}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {CFF41F73-FF0C-4EDF-94FD-5FDCB8D0D19F}.Release|Win32.ActiveCfg = Release|Win32
+ {CFF41F73-FF0C-4EDF-94FD-5FDCB8D0D19F}.Release|Win32.Build.0 = Release|Win32
+ {CFF41F73-FF0C-4EDF-94FD-5FDCB8D0D19F}.Release|x64.ActiveCfg = Release|x64
+ {CFF41F73-FF0C-4EDF-94FD-5FDCB8D0D19F}.Release|x64.Build.0 = Release|x64
+ {CFF41F73-FF0C-4EDF-94FD-5FDCB8D0D19F}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {CFF41F73-FF0C-4EDF-94FD-5FDCB8D0D19F}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {CFF41F73-FF0C-4EDF-94FD-5FDCB8D0D19F}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {CFF41F73-FF0C-4EDF-94FD-5FDCB8D0D19F}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {4E04088C-D796-4227-8227-2539E30F04BD}.Debug|Win32.ActiveCfg = Debug|Win32
+ {4E04088C-D796-4227-8227-2539E30F04BD}.Debug|Win32.Build.0 = Debug|Win32
+ {4E04088C-D796-4227-8227-2539E30F04BD}.Debug|x64.ActiveCfg = Debug|x64
+ {4E04088C-D796-4227-8227-2539E30F04BD}.Debug|x64.Build.0 = Debug|x64
+ {4E04088C-D796-4227-8227-2539E30F04BD}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {4E04088C-D796-4227-8227-2539E30F04BD}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {4E04088C-D796-4227-8227-2539E30F04BD}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {4E04088C-D796-4227-8227-2539E30F04BD}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {4E04088C-D796-4227-8227-2539E30F04BD}.Release|Win32.ActiveCfg = Release|Win32
+ {4E04088C-D796-4227-8227-2539E30F04BD}.Release|Win32.Build.0 = Release|Win32
+ {4E04088C-D796-4227-8227-2539E30F04BD}.Release|x64.ActiveCfg = Release|x64
+ {4E04088C-D796-4227-8227-2539E30F04BD}.Release|x64.Build.0 = Release|x64
+ {4E04088C-D796-4227-8227-2539E30F04BD}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {4E04088C-D796-4227-8227-2539E30F04BD}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {4E04088C-D796-4227-8227-2539E30F04BD}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {4E04088C-D796-4227-8227-2539E30F04BD}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {36A2447A-460B-4A29-9327-18BE2B7007CB}.Debug|Win32.ActiveCfg = Debug|Win32
+ {36A2447A-460B-4A29-9327-18BE2B7007CB}.Debug|Win32.Build.0 = Debug|Win32
+ {36A2447A-460B-4A29-9327-18BE2B7007CB}.Debug|x64.ActiveCfg = Debug|x64
+ {36A2447A-460B-4A29-9327-18BE2B7007CB}.Debug|x64.Build.0 = Debug|x64
+ {36A2447A-460B-4A29-9327-18BE2B7007CB}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {36A2447A-460B-4A29-9327-18BE2B7007CB}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {36A2447A-460B-4A29-9327-18BE2B7007CB}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {36A2447A-460B-4A29-9327-18BE2B7007CB}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {36A2447A-460B-4A29-9327-18BE2B7007CB}.Release|Win32.ActiveCfg = Release|Win32
+ {36A2447A-460B-4A29-9327-18BE2B7007CB}.Release|Win32.Build.0 = Release|Win32
+ {36A2447A-460B-4A29-9327-18BE2B7007CB}.Release|x64.ActiveCfg = Release|x64
+ {36A2447A-460B-4A29-9327-18BE2B7007CB}.Release|x64.Build.0 = Release|x64
+ {36A2447A-460B-4A29-9327-18BE2B7007CB}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {36A2447A-460B-4A29-9327-18BE2B7007CB}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {36A2447A-460B-4A29-9327-18BE2B7007CB}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {36A2447A-460B-4A29-9327-18BE2B7007CB}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {61F9752D-4AE9-4B68-8D20-FF5CF31631A9}.Debug|Win32.ActiveCfg = Debug|Win32
+ {61F9752D-4AE9-4B68-8D20-FF5CF31631A9}.Debug|Win32.Build.0 = Debug|Win32
+ {61F9752D-4AE9-4B68-8D20-FF5CF31631A9}.Debug|x64.ActiveCfg = Debug|x64
+ {61F9752D-4AE9-4B68-8D20-FF5CF31631A9}.Debug|x64.Build.0 = Debug|x64
+ {61F9752D-4AE9-4B68-8D20-FF5CF31631A9}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {61F9752D-4AE9-4B68-8D20-FF5CF31631A9}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {61F9752D-4AE9-4B68-8D20-FF5CF31631A9}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {61F9752D-4AE9-4B68-8D20-FF5CF31631A9}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {61F9752D-4AE9-4B68-8D20-FF5CF31631A9}.Release|Win32.ActiveCfg = Release|Win32
+ {61F9752D-4AE9-4B68-8D20-FF5CF31631A9}.Release|Win32.Build.0 = Release|Win32
+ {61F9752D-4AE9-4B68-8D20-FF5CF31631A9}.Release|x64.ActiveCfg = Release|x64
+ {61F9752D-4AE9-4B68-8D20-FF5CF31631A9}.Release|x64.Build.0 = Release|x64
+ {61F9752D-4AE9-4B68-8D20-FF5CF31631A9}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {61F9752D-4AE9-4B68-8D20-FF5CF31631A9}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {61F9752D-4AE9-4B68-8D20-FF5CF31631A9}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {61F9752D-4AE9-4B68-8D20-FF5CF31631A9}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {9DC94AC5-FEA4-40B1-9F01-B08B899DE64E}.Debug|Win32.ActiveCfg = Debug|Win32
+ {9DC94AC5-FEA4-40B1-9F01-B08B899DE64E}.Debug|Win32.Build.0 = Debug|Win32
+ {9DC94AC5-FEA4-40B1-9F01-B08B899DE64E}.Debug|x64.ActiveCfg = Debug|x64
+ {9DC94AC5-FEA4-40B1-9F01-B08B899DE64E}.Debug|x64.Build.0 = Debug|x64
+ {9DC94AC5-FEA4-40B1-9F01-B08B899DE64E}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {9DC94AC5-FEA4-40B1-9F01-B08B899DE64E}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {9DC94AC5-FEA4-40B1-9F01-B08B899DE64E}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {9DC94AC5-FEA4-40B1-9F01-B08B899DE64E}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {9DC94AC5-FEA4-40B1-9F01-B08B899DE64E}.Release|Win32.ActiveCfg = Release|Win32
+ {9DC94AC5-FEA4-40B1-9F01-B08B899DE64E}.Release|Win32.Build.0 = Release|Win32
+ {9DC94AC5-FEA4-40B1-9F01-B08B899DE64E}.Release|x64.ActiveCfg = Release|x64
+ {9DC94AC5-FEA4-40B1-9F01-B08B899DE64E}.Release|x64.Build.0 = Release|x64
+ {9DC94AC5-FEA4-40B1-9F01-B08B899DE64E}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {9DC94AC5-FEA4-40B1-9F01-B08B899DE64E}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {9DC94AC5-FEA4-40B1-9F01-B08B899DE64E}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {9DC94AC5-FEA4-40B1-9F01-B08B899DE64E}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {F8DA831A-6128-4FB6-A41F-D4051D736D81}.Debug|Win32.ActiveCfg = Debug|Win32
+ {F8DA831A-6128-4FB6-A41F-D4051D736D81}.Debug|Win32.Build.0 = Debug|Win32
+ {F8DA831A-6128-4FB6-A41F-D4051D736D81}.Debug|x64.ActiveCfg = Debug|x64
+ {F8DA831A-6128-4FB6-A41F-D4051D736D81}.Debug|x64.Build.0 = Debug|x64
+ {F8DA831A-6128-4FB6-A41F-D4051D736D81}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {F8DA831A-6128-4FB6-A41F-D4051D736D81}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {F8DA831A-6128-4FB6-A41F-D4051D736D81}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {F8DA831A-6128-4FB6-A41F-D4051D736D81}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {F8DA831A-6128-4FB6-A41F-D4051D736D81}.Release|Win32.ActiveCfg = Release|Win32
+ {F8DA831A-6128-4FB6-A41F-D4051D736D81}.Release|Win32.Build.0 = Release|Win32
+ {F8DA831A-6128-4FB6-A41F-D4051D736D81}.Release|x64.ActiveCfg = Release|x64
+ {F8DA831A-6128-4FB6-A41F-D4051D736D81}.Release|x64.Build.0 = Release|x64
+ {F8DA831A-6128-4FB6-A41F-D4051D736D81}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {F8DA831A-6128-4FB6-A41F-D4051D736D81}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {F8DA831A-6128-4FB6-A41F-D4051D736D81}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {F8DA831A-6128-4FB6-A41F-D4051D736D81}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {3F5FD5F7-2FB9-477E-9011-F09EECEA56E3}.Debug|Win32.ActiveCfg = Debug|Win32
+ {3F5FD5F7-2FB9-477E-9011-F09EECEA56E3}.Debug|Win32.Build.0 = Debug|Win32
+ {3F5FD5F7-2FB9-477E-9011-F09EECEA56E3}.Debug|x64.ActiveCfg = Debug|x64
+ {3F5FD5F7-2FB9-477E-9011-F09EECEA56E3}.Debug|x64.Build.0 = Debug|x64
+ {3F5FD5F7-2FB9-477E-9011-F09EECEA56E3}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {3F5FD5F7-2FB9-477E-9011-F09EECEA56E3}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {3F5FD5F7-2FB9-477E-9011-F09EECEA56E3}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {3F5FD5F7-2FB9-477E-9011-F09EECEA56E3}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {3F5FD5F7-2FB9-477E-9011-F09EECEA56E3}.Release|Win32.ActiveCfg = Release|Win32
+ {3F5FD5F7-2FB9-477E-9011-F09EECEA56E3}.Release|Win32.Build.0 = Release|Win32
+ {3F5FD5F7-2FB9-477E-9011-F09EECEA56E3}.Release|x64.ActiveCfg = Release|x64
+ {3F5FD5F7-2FB9-477E-9011-F09EECEA56E3}.Release|x64.Build.0 = Release|x64
+ {3F5FD5F7-2FB9-477E-9011-F09EECEA56E3}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {3F5FD5F7-2FB9-477E-9011-F09EECEA56E3}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {3F5FD5F7-2FB9-477E-9011-F09EECEA56E3}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {3F5FD5F7-2FB9-477E-9011-F09EECEA56E3}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {A8DC9C13-504F-4ED7-B299-ED251D8D7D57}.Debug|Win32.ActiveCfg = Debug|Win32
+ {A8DC9C13-504F-4ED7-B299-ED251D8D7D57}.Debug|Win32.Build.0 = Debug|Win32
+ {A8DC9C13-504F-4ED7-B299-ED251D8D7D57}.Debug|x64.ActiveCfg = Debug|x64
+ {A8DC9C13-504F-4ED7-B299-ED251D8D7D57}.Debug|x64.Build.0 = Debug|x64
+ {A8DC9C13-504F-4ED7-B299-ED251D8D7D57}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {A8DC9C13-504F-4ED7-B299-ED251D8D7D57}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {A8DC9C13-504F-4ED7-B299-ED251D8D7D57}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {A8DC9C13-504F-4ED7-B299-ED251D8D7D57}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {A8DC9C13-504F-4ED7-B299-ED251D8D7D57}.Release|Win32.ActiveCfg = Release|Win32
+ {A8DC9C13-504F-4ED7-B299-ED251D8D7D57}.Release|Win32.Build.0 = Release|Win32
+ {A8DC9C13-504F-4ED7-B299-ED251D8D7D57}.Release|x64.ActiveCfg = Release|x64
+ {A8DC9C13-504F-4ED7-B299-ED251D8D7D57}.Release|x64.Build.0 = Release|x64
+ {A8DC9C13-504F-4ED7-B299-ED251D8D7D57}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {A8DC9C13-504F-4ED7-B299-ED251D8D7D57}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {A8DC9C13-504F-4ED7-B299-ED251D8D7D57}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {A8DC9C13-504F-4ED7-B299-ED251D8D7D57}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {D6205067-CD94-494E-A553-C3706C7CFB3B}.Debug|Win32.ActiveCfg = Debug|Win32
+ {D6205067-CD94-494E-A553-C3706C7CFB3B}.Debug|Win32.Build.0 = Debug|Win32
+ {D6205067-CD94-494E-A553-C3706C7CFB3B}.Debug|x64.ActiveCfg = Debug|x64
+ {D6205067-CD94-494E-A553-C3706C7CFB3B}.Debug|x64.Build.0 = Debug|x64
+ {D6205067-CD94-494E-A553-C3706C7CFB3B}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {D6205067-CD94-494E-A553-C3706C7CFB3B}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {D6205067-CD94-494E-A553-C3706C7CFB3B}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {D6205067-CD94-494E-A553-C3706C7CFB3B}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {D6205067-CD94-494E-A553-C3706C7CFB3B}.Release|Win32.ActiveCfg = Release|Win32
+ {D6205067-CD94-494E-A553-C3706C7CFB3B}.Release|Win32.Build.0 = Release|Win32
+ {D6205067-CD94-494E-A553-C3706C7CFB3B}.Release|x64.ActiveCfg = Release|x64
+ {D6205067-CD94-494E-A553-C3706C7CFB3B}.Release|x64.Build.0 = Release|x64
+ {D6205067-CD94-494E-A553-C3706C7CFB3B}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {D6205067-CD94-494E-A553-C3706C7CFB3B}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {D6205067-CD94-494E-A553-C3706C7CFB3B}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {D6205067-CD94-494E-A553-C3706C7CFB3B}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {5F755177-01B3-44E5-BC77-6FCF825CE0C8}.Debug|Win32.ActiveCfg = Debug|Win32
+ {5F755177-01B3-44E5-BC77-6FCF825CE0C8}.Debug|Win32.Build.0 = Debug|Win32
+ {5F755177-01B3-44E5-BC77-6FCF825CE0C8}.Debug|x64.ActiveCfg = Debug|x64
+ {5F755177-01B3-44E5-BC77-6FCF825CE0C8}.Debug|x64.Build.0 = Debug|x64
+ {5F755177-01B3-44E5-BC77-6FCF825CE0C8}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {5F755177-01B3-44E5-BC77-6FCF825CE0C8}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {5F755177-01B3-44E5-BC77-6FCF825CE0C8}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {5F755177-01B3-44E5-BC77-6FCF825CE0C8}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {5F755177-01B3-44E5-BC77-6FCF825CE0C8}.Release|Win32.ActiveCfg = Release|Win32
+ {5F755177-01B3-44E5-BC77-6FCF825CE0C8}.Release|Win32.Build.0 = Release|Win32
+ {5F755177-01B3-44E5-BC77-6FCF825CE0C8}.Release|x64.ActiveCfg = Release|x64
+ {5F755177-01B3-44E5-BC77-6FCF825CE0C8}.Release|x64.Build.0 = Release|x64
+ {5F755177-01B3-44E5-BC77-6FCF825CE0C8}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {5F755177-01B3-44E5-BC77-6FCF825CE0C8}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {5F755177-01B3-44E5-BC77-6FCF825CE0C8}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {5F755177-01B3-44E5-BC77-6FCF825CE0C8}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {9BCA1F30-F3E2-4F16-8974-C0C2D3902292}.Debug|Win32.ActiveCfg = Debug|Win32
+ {9BCA1F30-F3E2-4F16-8974-C0C2D3902292}.Debug|Win32.Build.0 = Debug|Win32
+ {9BCA1F30-F3E2-4F16-8974-C0C2D3902292}.Debug|x64.ActiveCfg = Debug|x64
+ {9BCA1F30-F3E2-4F16-8974-C0C2D3902292}.Debug|x64.Build.0 = Debug|x64
+ {9BCA1F30-F3E2-4F16-8974-C0C2D3902292}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {9BCA1F30-F3E2-4F16-8974-C0C2D3902292}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {9BCA1F30-F3E2-4F16-8974-C0C2D3902292}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {9BCA1F30-F3E2-4F16-8974-C0C2D3902292}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {9BCA1F30-F3E2-4F16-8974-C0C2D3902292}.Release|Win32.ActiveCfg = Release|Win32
+ {9BCA1F30-F3E2-4F16-8974-C0C2D3902292}.Release|Win32.Build.0 = Release|Win32
+ {9BCA1F30-F3E2-4F16-8974-C0C2D3902292}.Release|x64.ActiveCfg = Release|x64
+ {9BCA1F30-F3E2-4F16-8974-C0C2D3902292}.Release|x64.Build.0 = Release|x64
+ {9BCA1F30-F3E2-4F16-8974-C0C2D3902292}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {9BCA1F30-F3E2-4F16-8974-C0C2D3902292}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {9BCA1F30-F3E2-4F16-8974-C0C2D3902292}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {9BCA1F30-F3E2-4F16-8974-C0C2D3902292}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {27575CBA-8AD7-4999-995C-694483047B3C}.Debug|Win32.ActiveCfg = Debug|Win32
+ {27575CBA-8AD7-4999-995C-694483047B3C}.Debug|Win32.Build.0 = Debug|Win32
+ {27575CBA-8AD7-4999-995C-694483047B3C}.Debug|x64.ActiveCfg = Debug|x64
+ {27575CBA-8AD7-4999-995C-694483047B3C}.Debug|x64.Build.0 = Debug|x64
+ {27575CBA-8AD7-4999-995C-694483047B3C}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {27575CBA-8AD7-4999-995C-694483047B3C}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {27575CBA-8AD7-4999-995C-694483047B3C}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {27575CBA-8AD7-4999-995C-694483047B3C}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {27575CBA-8AD7-4999-995C-694483047B3C}.Release|Win32.ActiveCfg = Release|Win32
+ {27575CBA-8AD7-4999-995C-694483047B3C}.Release|Win32.Build.0 = Release|Win32
+ {27575CBA-8AD7-4999-995C-694483047B3C}.Release|x64.ActiveCfg = Release|x64
+ {27575CBA-8AD7-4999-995C-694483047B3C}.Release|x64.Build.0 = Release|x64
+ {27575CBA-8AD7-4999-995C-694483047B3C}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {27575CBA-8AD7-4999-995C-694483047B3C}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {27575CBA-8AD7-4999-995C-694483047B3C}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {27575CBA-8AD7-4999-995C-694483047B3C}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {8D7875E5-8DC6-44CA-8B25-6501CC30C301}.Debug|Win32.ActiveCfg = Debug|Win32
+ {8D7875E5-8DC6-44CA-8B25-6501CC30C301}.Debug|Win32.Build.0 = Debug|Win32
+ {8D7875E5-8DC6-44CA-8B25-6501CC30C301}.Debug|x64.ActiveCfg = Debug|x64
+ {8D7875E5-8DC6-44CA-8B25-6501CC30C301}.Debug|x64.Build.0 = Debug|x64
+ {8D7875E5-8DC6-44CA-8B25-6501CC30C301}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {8D7875E5-8DC6-44CA-8B25-6501CC30C301}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {8D7875E5-8DC6-44CA-8B25-6501CC30C301}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {8D7875E5-8DC6-44CA-8B25-6501CC30C301}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {8D7875E5-8DC6-44CA-8B25-6501CC30C301}.Release|Win32.ActiveCfg = Release|Win32
+ {8D7875E5-8DC6-44CA-8B25-6501CC30C301}.Release|Win32.Build.0 = Release|Win32
+ {8D7875E5-8DC6-44CA-8B25-6501CC30C301}.Release|x64.ActiveCfg = Release|x64
+ {8D7875E5-8DC6-44CA-8B25-6501CC30C301}.Release|x64.Build.0 = Release|x64
+ {8D7875E5-8DC6-44CA-8B25-6501CC30C301}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {8D7875E5-8DC6-44CA-8B25-6501CC30C301}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {8D7875E5-8DC6-44CA-8B25-6501CC30C301}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {8D7875E5-8DC6-44CA-8B25-6501CC30C301}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {6A9781AB-D45C-4D85-971D-04ED02400001}.Debug|Win32.ActiveCfg = Debug|Win32
+ {6A9781AB-D45C-4D85-971D-04ED02400001}.Debug|Win32.Build.0 = Debug|Win32
+ {6A9781AB-D45C-4D85-971D-04ED02400001}.Debug|x64.ActiveCfg = Debug|x64
+ {6A9781AB-D45C-4D85-971D-04ED02400001}.Debug|x64.Build.0 = Debug|x64
+ {6A9781AB-D45C-4D85-971D-04ED02400001}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {6A9781AB-D45C-4D85-971D-04ED02400001}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {6A9781AB-D45C-4D85-971D-04ED02400001}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {6A9781AB-D45C-4D85-971D-04ED02400001}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {6A9781AB-D45C-4D85-971D-04ED02400001}.Release|Win32.ActiveCfg = Release|Win32
+ {6A9781AB-D45C-4D85-971D-04ED02400001}.Release|Win32.Build.0 = Release|Win32
+ {6A9781AB-D45C-4D85-971D-04ED02400001}.Release|x64.ActiveCfg = Release|x64
+ {6A9781AB-D45C-4D85-971D-04ED02400001}.Release|x64.Build.0 = Release|x64
+ {6A9781AB-D45C-4D85-971D-04ED02400001}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {6A9781AB-D45C-4D85-971D-04ED02400001}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {6A9781AB-D45C-4D85-971D-04ED02400001}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {6A9781AB-D45C-4D85-971D-04ED02400001}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {090B589F-7704-4D2F-9778-F884AFFB2359}.Debug|Win32.ActiveCfg = Debug|Win32
+ {090B589F-7704-4D2F-9778-F884AFFB2359}.Debug|Win32.Build.0 = Debug|Win32
+ {090B589F-7704-4D2F-9778-F884AFFB2359}.Debug|x64.ActiveCfg = Debug|x64
+ {090B589F-7704-4D2F-9778-F884AFFB2359}.Debug|x64.Build.0 = Debug|x64
+ {090B589F-7704-4D2F-9778-F884AFFB2359}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {090B589F-7704-4D2F-9778-F884AFFB2359}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {090B589F-7704-4D2F-9778-F884AFFB2359}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {090B589F-7704-4D2F-9778-F884AFFB2359}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {090B589F-7704-4D2F-9778-F884AFFB2359}.Release|Win32.ActiveCfg = Release|Win32
+ {090B589F-7704-4D2F-9778-F884AFFB2359}.Release|Win32.Build.0 = Release|Win32
+ {090B589F-7704-4D2F-9778-F884AFFB2359}.Release|x64.ActiveCfg = Release|x64
+ {090B589F-7704-4D2F-9778-F884AFFB2359}.Release|x64.Build.0 = Release|x64
+ {090B589F-7704-4D2F-9778-F884AFFB2359}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {090B589F-7704-4D2F-9778-F884AFFB2359}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {090B589F-7704-4D2F-9778-F884AFFB2359}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {090B589F-7704-4D2F-9778-F884AFFB2359}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {28B5A386-FA1C-4106-AB6E-5DA967D979E0}.Debug|Win32.ActiveCfg = Debug|Win32
+ {28B5A386-FA1C-4106-AB6E-5DA967D979E0}.Debug|Win32.Build.0 = Debug|Win32
+ {28B5A386-FA1C-4106-AB6E-5DA967D979E0}.Debug|x64.ActiveCfg = Debug|x64
+ {28B5A386-FA1C-4106-AB6E-5DA967D979E0}.Debug|x64.Build.0 = Debug|x64
+ {28B5A386-FA1C-4106-AB6E-5DA967D979E0}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {28B5A386-FA1C-4106-AB6E-5DA967D979E0}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {28B5A386-FA1C-4106-AB6E-5DA967D979E0}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {28B5A386-FA1C-4106-AB6E-5DA967D979E0}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {28B5A386-FA1C-4106-AB6E-5DA967D979E0}.Release|Win32.ActiveCfg = Release|Win32
+ {28B5A386-FA1C-4106-AB6E-5DA967D979E0}.Release|Win32.Build.0 = Release|Win32
+ {28B5A386-FA1C-4106-AB6E-5DA967D979E0}.Release|x64.ActiveCfg = Release|x64
+ {28B5A386-FA1C-4106-AB6E-5DA967D979E0}.Release|x64.Build.0 = Release|x64
+ {28B5A386-FA1C-4106-AB6E-5DA967D979E0}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {28B5A386-FA1C-4106-AB6E-5DA967D979E0}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {28B5A386-FA1C-4106-AB6E-5DA967D979E0}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {28B5A386-FA1C-4106-AB6E-5DA967D979E0}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {C6348B36-F5C4-43A9-8577-4F6646B3D78D}.Debug|Win32.ActiveCfg = Debug|Win32
+ {C6348B36-F5C4-43A9-8577-4F6646B3D78D}.Debug|Win32.Build.0 = Debug|Win32
+ {C6348B36-F5C4-43A9-8577-4F6646B3D78D}.Debug|x64.ActiveCfg = Debug|x64
+ {C6348B36-F5C4-43A9-8577-4F6646B3D78D}.Debug|x64.Build.0 = Debug|x64
+ {C6348B36-F5C4-43A9-8577-4F6646B3D78D}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {C6348B36-F5C4-43A9-8577-4F6646B3D78D}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {C6348B36-F5C4-43A9-8577-4F6646B3D78D}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {C6348B36-F5C4-43A9-8577-4F6646B3D78D}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {C6348B36-F5C4-43A9-8577-4F6646B3D78D}.Release|Win32.ActiveCfg = Release|Win32
+ {C6348B36-F5C4-43A9-8577-4F6646B3D78D}.Release|Win32.Build.0 = Release|Win32
+ {C6348B36-F5C4-43A9-8577-4F6646B3D78D}.Release|x64.ActiveCfg = Release|x64
+ {C6348B36-F5C4-43A9-8577-4F6646B3D78D}.Release|x64.Build.0 = Release|x64
+ {C6348B36-F5C4-43A9-8577-4F6646B3D78D}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {C6348B36-F5C4-43A9-8577-4F6646B3D78D}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {C6348B36-F5C4-43A9-8577-4F6646B3D78D}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {C6348B36-F5C4-43A9-8577-4F6646B3D78D}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {7D38F129-EF19-4A07-8EDC-AED9E364E2CB}.Debug|Win32.ActiveCfg = Debug|Win32
+ {7D38F129-EF19-4A07-8EDC-AED9E364E2CB}.Debug|Win32.Build.0 = Debug|Win32
+ {7D38F129-EF19-4A07-8EDC-AED9E364E2CB}.Debug|x64.ActiveCfg = Debug|x64
+ {7D38F129-EF19-4A07-8EDC-AED9E364E2CB}.Debug|x64.Build.0 = Debug|x64
+ {7D38F129-EF19-4A07-8EDC-AED9E364E2CB}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {7D38F129-EF19-4A07-8EDC-AED9E364E2CB}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {7D38F129-EF19-4A07-8EDC-AED9E364E2CB}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {7D38F129-EF19-4A07-8EDC-AED9E364E2CB}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {7D38F129-EF19-4A07-8EDC-AED9E364E2CB}.Release|Win32.ActiveCfg = Release|Win32
+ {7D38F129-EF19-4A07-8EDC-AED9E364E2CB}.Release|Win32.Build.0 = Release|Win32
+ {7D38F129-EF19-4A07-8EDC-AED9E364E2CB}.Release|x64.ActiveCfg = Release|x64
+ {7D38F129-EF19-4A07-8EDC-AED9E364E2CB}.Release|x64.Build.0 = Release|x64
+ {7D38F129-EF19-4A07-8EDC-AED9E364E2CB}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {7D38F129-EF19-4A07-8EDC-AED9E364E2CB}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {7D38F129-EF19-4A07-8EDC-AED9E364E2CB}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {7D38F129-EF19-4A07-8EDC-AED9E364E2CB}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {C19E4244-4CAD-40A7-900A-7942991DFB75}.Debug|Win32.ActiveCfg = Debug|Win32
+ {C19E4244-4CAD-40A7-900A-7942991DFB75}.Debug|Win32.Build.0 = Debug|Win32
+ {C19E4244-4CAD-40A7-900A-7942991DFB75}.Debug|x64.ActiveCfg = Debug|x64
+ {C19E4244-4CAD-40A7-900A-7942991DFB75}.Debug|x64.Build.0 = Debug|x64
+ {C19E4244-4CAD-40A7-900A-7942991DFB75}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {C19E4244-4CAD-40A7-900A-7942991DFB75}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {C19E4244-4CAD-40A7-900A-7942991DFB75}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {C19E4244-4CAD-40A7-900A-7942991DFB75}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {C19E4244-4CAD-40A7-900A-7942991DFB75}.Release|Win32.ActiveCfg = Release|Win32
+ {C19E4244-4CAD-40A7-900A-7942991DFB75}.Release|Win32.Build.0 = Release|Win32
+ {C19E4244-4CAD-40A7-900A-7942991DFB75}.Release|x64.ActiveCfg = Release|x64
+ {C19E4244-4CAD-40A7-900A-7942991DFB75}.Release|x64.Build.0 = Release|x64
+ {C19E4244-4CAD-40A7-900A-7942991DFB75}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {C19E4244-4CAD-40A7-900A-7942991DFB75}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {C19E4244-4CAD-40A7-900A-7942991DFB75}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {C19E4244-4CAD-40A7-900A-7942991DFB75}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {7BFFD010-510A-4C0C-BD77-5845016DABBA}.Debug|Win32.ActiveCfg = Debug|Win32
+ {7BFFD010-510A-4C0C-BD77-5845016DABBA}.Debug|Win32.Build.0 = Debug|Win32
+ {7BFFD010-510A-4C0C-BD77-5845016DABBA}.Debug|x64.ActiveCfg = Debug|x64
+ {7BFFD010-510A-4C0C-BD77-5845016DABBA}.Debug|x64.Build.0 = Debug|x64
+ {7BFFD010-510A-4C0C-BD77-5845016DABBA}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {7BFFD010-510A-4C0C-BD77-5845016DABBA}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {7BFFD010-510A-4C0C-BD77-5845016DABBA}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {7BFFD010-510A-4C0C-BD77-5845016DABBA}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {7BFFD010-510A-4C0C-BD77-5845016DABBA}.Release|Win32.ActiveCfg = Release|Win32
+ {7BFFD010-510A-4C0C-BD77-5845016DABBA}.Release|Win32.Build.0 = Release|Win32
+ {7BFFD010-510A-4C0C-BD77-5845016DABBA}.Release|x64.ActiveCfg = Release|x64
+ {7BFFD010-510A-4C0C-BD77-5845016DABBA}.Release|x64.Build.0 = Release|x64
+ {7BFFD010-510A-4C0C-BD77-5845016DABBA}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {7BFFD010-510A-4C0C-BD77-5845016DABBA}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {7BFFD010-510A-4C0C-BD77-5845016DABBA}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {7BFFD010-510A-4C0C-BD77-5845016DABBA}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {B487568D-8168-46AC-80AA-86F955301F21}.Debug|Win32.ActiveCfg = Debug|Win32
+ {B487568D-8168-46AC-80AA-86F955301F21}.Debug|Win32.Build.0 = Debug|Win32
+ {B487568D-8168-46AC-80AA-86F955301F21}.Debug|x64.ActiveCfg = Debug|x64
+ {B487568D-8168-46AC-80AA-86F955301F21}.Debug|x64.Build.0 = Debug|x64
+ {B487568D-8168-46AC-80AA-86F955301F21}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {B487568D-8168-46AC-80AA-86F955301F21}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {B487568D-8168-46AC-80AA-86F955301F21}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {B487568D-8168-46AC-80AA-86F955301F21}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {B487568D-8168-46AC-80AA-86F955301F21}.Release|Win32.ActiveCfg = Release|Win32
+ {B487568D-8168-46AC-80AA-86F955301F21}.Release|Win32.Build.0 = Release|Win32
+ {B487568D-8168-46AC-80AA-86F955301F21}.Release|x64.ActiveCfg = Release|x64
+ {B487568D-8168-46AC-80AA-86F955301F21}.Release|x64.Build.0 = Release|x64
+ {B487568D-8168-46AC-80AA-86F955301F21}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {B487568D-8168-46AC-80AA-86F955301F21}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {B487568D-8168-46AC-80AA-86F955301F21}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {B487568D-8168-46AC-80AA-86F955301F21}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {CF28E0B7-FBC4-4850-98C7-0B2716D3A9BC}.Debug|Win32.ActiveCfg = Debug|Win32
+ {CF28E0B7-FBC4-4850-98C7-0B2716D3A9BC}.Debug|Win32.Build.0 = Debug|Win32
+ {CF28E0B7-FBC4-4850-98C7-0B2716D3A9BC}.Debug|x64.ActiveCfg = Debug|x64
+ {CF28E0B7-FBC4-4850-98C7-0B2716D3A9BC}.Debug|x64.Build.0 = Debug|x64
+ {CF28E0B7-FBC4-4850-98C7-0B2716D3A9BC}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {CF28E0B7-FBC4-4850-98C7-0B2716D3A9BC}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {CF28E0B7-FBC4-4850-98C7-0B2716D3A9BC}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {CF28E0B7-FBC4-4850-98C7-0B2716D3A9BC}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {CF28E0B7-FBC4-4850-98C7-0B2716D3A9BC}.Release|Win32.ActiveCfg = Release|Win32
+ {CF28E0B7-FBC4-4850-98C7-0B2716D3A9BC}.Release|Win32.Build.0 = Release|Win32
+ {CF28E0B7-FBC4-4850-98C7-0B2716D3A9BC}.Release|x64.ActiveCfg = Release|x64
+ {CF28E0B7-FBC4-4850-98C7-0B2716D3A9BC}.Release|x64.Build.0 = Release|x64
+ {CF28E0B7-FBC4-4850-98C7-0B2716D3A9BC}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {CF28E0B7-FBC4-4850-98C7-0B2716D3A9BC}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {CF28E0B7-FBC4-4850-98C7-0B2716D3A9BC}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {CF28E0B7-FBC4-4850-98C7-0B2716D3A9BC}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {051B2ABA-EDD6-455D-8600-53B8EB79DF21}.Debug|Win32.ActiveCfg = Debug|Win32
+ {051B2ABA-EDD6-455D-8600-53B8EB79DF21}.Debug|Win32.Build.0 = Debug|Win32
+ {051B2ABA-EDD6-455D-8600-53B8EB79DF21}.Debug|x64.ActiveCfg = Debug|x64
+ {051B2ABA-EDD6-455D-8600-53B8EB79DF21}.Debug|x64.Build.0 = Debug|x64
+ {051B2ABA-EDD6-455D-8600-53B8EB79DF21}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {051B2ABA-EDD6-455D-8600-53B8EB79DF21}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {051B2ABA-EDD6-455D-8600-53B8EB79DF21}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {051B2ABA-EDD6-455D-8600-53B8EB79DF21}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {051B2ABA-EDD6-455D-8600-53B8EB79DF21}.Release|Win32.ActiveCfg = Release|Win32
+ {051B2ABA-EDD6-455D-8600-53B8EB79DF21}.Release|Win32.Build.0 = Release|Win32
+ {051B2ABA-EDD6-455D-8600-53B8EB79DF21}.Release|x64.ActiveCfg = Release|x64
+ {051B2ABA-EDD6-455D-8600-53B8EB79DF21}.Release|x64.Build.0 = Release|x64
+ {051B2ABA-EDD6-455D-8600-53B8EB79DF21}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {051B2ABA-EDD6-455D-8600-53B8EB79DF21}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {051B2ABA-EDD6-455D-8600-53B8EB79DF21}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {051B2ABA-EDD6-455D-8600-53B8EB79DF21}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {531E4D12-C794-4509-8160-A6B6FCB1FE0C}.Debug|Win32.ActiveCfg = Debug|Win32
+ {531E4D12-C794-4509-8160-A6B6FCB1FE0C}.Debug|Win32.Build.0 = Debug|Win32
+ {531E4D12-C794-4509-8160-A6B6FCB1FE0C}.Debug|x64.ActiveCfg = Debug|x64
+ {531E4D12-C794-4509-8160-A6B6FCB1FE0C}.Debug|x64.Build.0 = Debug|x64
+ {531E4D12-C794-4509-8160-A6B6FCB1FE0C}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {531E4D12-C794-4509-8160-A6B6FCB1FE0C}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {531E4D12-C794-4509-8160-A6B6FCB1FE0C}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {531E4D12-C794-4509-8160-A6B6FCB1FE0C}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {531E4D12-C794-4509-8160-A6B6FCB1FE0C}.Release|Win32.ActiveCfg = Release|Win32
+ {531E4D12-C794-4509-8160-A6B6FCB1FE0C}.Release|Win32.Build.0 = Release|Win32
+ {531E4D12-C794-4509-8160-A6B6FCB1FE0C}.Release|x64.ActiveCfg = Release|x64
+ {531E4D12-C794-4509-8160-A6B6FCB1FE0C}.Release|x64.Build.0 = Release|x64
+ {531E4D12-C794-4509-8160-A6B6FCB1FE0C}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {531E4D12-C794-4509-8160-A6B6FCB1FE0C}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {531E4D12-C794-4509-8160-A6B6FCB1FE0C}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {531E4D12-C794-4509-8160-A6B6FCB1FE0C}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {00DEC39E-11F7-40B4-8840-0556F331A964}.Debug|Win32.ActiveCfg = Debug|Win32
+ {00DEC39E-11F7-40B4-8840-0556F331A964}.Debug|Win32.Build.0 = Debug|Win32
+ {00DEC39E-11F7-40B4-8840-0556F331A964}.Debug|x64.ActiveCfg = Debug|x64
+ {00DEC39E-11F7-40B4-8840-0556F331A964}.Debug|x64.Build.0 = Debug|x64
+ {00DEC39E-11F7-40B4-8840-0556F331A964}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {00DEC39E-11F7-40B4-8840-0556F331A964}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {00DEC39E-11F7-40B4-8840-0556F331A964}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {00DEC39E-11F7-40B4-8840-0556F331A964}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {00DEC39E-11F7-40B4-8840-0556F331A964}.Release|Win32.ActiveCfg = Release|Win32
+ {00DEC39E-11F7-40B4-8840-0556F331A964}.Release|Win32.Build.0 = Release|Win32
+ {00DEC39E-11F7-40B4-8840-0556F331A964}.Release|x64.ActiveCfg = Release|x64
+ {00DEC39E-11F7-40B4-8840-0556F331A964}.Release|x64.Build.0 = Release|x64
+ {00DEC39E-11F7-40B4-8840-0556F331A964}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {00DEC39E-11F7-40B4-8840-0556F331A964}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {00DEC39E-11F7-40B4-8840-0556F331A964}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {00DEC39E-11F7-40B4-8840-0556F331A964}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {FE555145-82E8-4721-B2CB-A60B94658A65}.Debug|Win32.ActiveCfg = Debug|Win32
+ {FE555145-82E8-4721-B2CB-A60B94658A65}.Debug|Win32.Build.0 = Debug|Win32
+ {FE555145-82E8-4721-B2CB-A60B94658A65}.Debug|x64.ActiveCfg = Debug|x64
+ {FE555145-82E8-4721-B2CB-A60B94658A65}.Debug|x64.Build.0 = Debug|x64
+ {FE555145-82E8-4721-B2CB-A60B94658A65}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {FE555145-82E8-4721-B2CB-A60B94658A65}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {FE555145-82E8-4721-B2CB-A60B94658A65}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {FE555145-82E8-4721-B2CB-A60B94658A65}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {FE555145-82E8-4721-B2CB-A60B94658A65}.Release|Win32.ActiveCfg = Release|Win32
+ {FE555145-82E8-4721-B2CB-A60B94658A65}.Release|Win32.Build.0 = Release|Win32
+ {FE555145-82E8-4721-B2CB-A60B94658A65}.Release|x64.ActiveCfg = Release|x64
+ {FE555145-82E8-4721-B2CB-A60B94658A65}.Release|x64.Build.0 = Release|x64
+ {FE555145-82E8-4721-B2CB-A60B94658A65}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {FE555145-82E8-4721-B2CB-A60B94658A65}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {FE555145-82E8-4721-B2CB-A60B94658A65}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {FE555145-82E8-4721-B2CB-A60B94658A65}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {C2B3A6D5-5498-4D73-826A-4A839EBA9571}.Debug|Win32.ActiveCfg = Debug|Win32
+ {C2B3A6D5-5498-4D73-826A-4A839EBA9571}.Debug|Win32.Build.0 = Debug|Win32
+ {C2B3A6D5-5498-4D73-826A-4A839EBA9571}.Debug|x64.ActiveCfg = Debug|x64
+ {C2B3A6D5-5498-4D73-826A-4A839EBA9571}.Debug|x64.Build.0 = Debug|x64
+ {C2B3A6D5-5498-4D73-826A-4A839EBA9571}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {C2B3A6D5-5498-4D73-826A-4A839EBA9571}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {C2B3A6D5-5498-4D73-826A-4A839EBA9571}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {C2B3A6D5-5498-4D73-826A-4A839EBA9571}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {C2B3A6D5-5498-4D73-826A-4A839EBA9571}.Release|Win32.ActiveCfg = Release|Win32
+ {C2B3A6D5-5498-4D73-826A-4A839EBA9571}.Release|Win32.Build.0 = Release|Win32
+ {C2B3A6D5-5498-4D73-826A-4A839EBA9571}.Release|x64.ActiveCfg = Release|x64
+ {C2B3A6D5-5498-4D73-826A-4A839EBA9571}.Release|x64.Build.0 = Release|x64
+ {C2B3A6D5-5498-4D73-826A-4A839EBA9571}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {C2B3A6D5-5498-4D73-826A-4A839EBA9571}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {C2B3A6D5-5498-4D73-826A-4A839EBA9571}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {C2B3A6D5-5498-4D73-826A-4A839EBA9571}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {D92CDEC8-1E56-4F1C-8563-04037BCCB9BD}.Debug|Win32.ActiveCfg = Debug|Win32
+ {D92CDEC8-1E56-4F1C-8563-04037BCCB9BD}.Debug|Win32.Build.0 = Debug|Win32
+ {D92CDEC8-1E56-4F1C-8563-04037BCCB9BD}.Debug|x64.ActiveCfg = Debug|x64
+ {D92CDEC8-1E56-4F1C-8563-04037BCCB9BD}.Debug|x64.Build.0 = Debug|x64
+ {D92CDEC8-1E56-4F1C-8563-04037BCCB9BD}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {D92CDEC8-1E56-4F1C-8563-04037BCCB9BD}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {D92CDEC8-1E56-4F1C-8563-04037BCCB9BD}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {D92CDEC8-1E56-4F1C-8563-04037BCCB9BD}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {D92CDEC8-1E56-4F1C-8563-04037BCCB9BD}.Release|Win32.ActiveCfg = Release|Win32
+ {D92CDEC8-1E56-4F1C-8563-04037BCCB9BD}.Release|Win32.Build.0 = Release|Win32
+ {D92CDEC8-1E56-4F1C-8563-04037BCCB9BD}.Release|x64.ActiveCfg = Release|x64
+ {D92CDEC8-1E56-4F1C-8563-04037BCCB9BD}.Release|x64.Build.0 = Release|x64
+ {D92CDEC8-1E56-4F1C-8563-04037BCCB9BD}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {D92CDEC8-1E56-4F1C-8563-04037BCCB9BD}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {D92CDEC8-1E56-4F1C-8563-04037BCCB9BD}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {D92CDEC8-1E56-4F1C-8563-04037BCCB9BD}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {CCEA00C6-F850-4BDA-B420-6214E40A3469}.Debug|Win32.ActiveCfg = Debug|Win32
+ {CCEA00C6-F850-4BDA-B420-6214E40A3469}.Debug|Win32.Build.0 = Debug|Win32
+ {CCEA00C6-F850-4BDA-B420-6214E40A3469}.Debug|x64.ActiveCfg = Debug|x64
+ {CCEA00C6-F850-4BDA-B420-6214E40A3469}.Debug|x64.Build.0 = Debug|x64
+ {CCEA00C6-F850-4BDA-B420-6214E40A3469}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {CCEA00C6-F850-4BDA-B420-6214E40A3469}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {CCEA00C6-F850-4BDA-B420-6214E40A3469}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {CCEA00C6-F850-4BDA-B420-6214E40A3469}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {CCEA00C6-F850-4BDA-B420-6214E40A3469}.Release|Win32.ActiveCfg = Release|Win32
+ {CCEA00C6-F850-4BDA-B420-6214E40A3469}.Release|Win32.Build.0 = Release|Win32
+ {CCEA00C6-F850-4BDA-B420-6214E40A3469}.Release|x64.ActiveCfg = Release|x64
+ {CCEA00C6-F850-4BDA-B420-6214E40A3469}.Release|x64.Build.0 = Release|x64
+ {CCEA00C6-F850-4BDA-B420-6214E40A3469}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {CCEA00C6-F850-4BDA-B420-6214E40A3469}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {CCEA00C6-F850-4BDA-B420-6214E40A3469}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {CCEA00C6-F850-4BDA-B420-6214E40A3469}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {EB8FB82E-5466-4430-9BD2-17CF562E8349}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EB8FB82E-5466-4430-9BD2-17CF562E8349}.Debug|Win32.Build.0 = Debug|Win32
+ {EB8FB82E-5466-4430-9BD2-17CF562E8349}.Debug|x64.ActiveCfg = Debug|x64
+ {EB8FB82E-5466-4430-9BD2-17CF562E8349}.Debug|x64.Build.0 = Debug|x64
+ {EB8FB82E-5466-4430-9BD2-17CF562E8349}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {EB8FB82E-5466-4430-9BD2-17CF562E8349}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {EB8FB82E-5466-4430-9BD2-17CF562E8349}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {EB8FB82E-5466-4430-9BD2-17CF562E8349}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {EB8FB82E-5466-4430-9BD2-17CF562E8349}.Release|Win32.ActiveCfg = Release|Win32
+ {EB8FB82E-5466-4430-9BD2-17CF562E8349}.Release|Win32.Build.0 = Release|Win32
+ {EB8FB82E-5466-4430-9BD2-17CF562E8349}.Release|x64.ActiveCfg = Release|x64
+ {EB8FB82E-5466-4430-9BD2-17CF562E8349}.Release|x64.Build.0 = Release|x64
+ {EB8FB82E-5466-4430-9BD2-17CF562E8349}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {EB8FB82E-5466-4430-9BD2-17CF562E8349}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {EB8FB82E-5466-4430-9BD2-17CF562E8349}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {EB8FB82E-5466-4430-9BD2-17CF562E8349}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {1557FB61-9785-4955-ACB3-259F8695AA61}.Debug|Win32.ActiveCfg = Debug|Win32
+ {1557FB61-9785-4955-ACB3-259F8695AA61}.Debug|Win32.Build.0 = Debug|Win32
+ {1557FB61-9785-4955-ACB3-259F8695AA61}.Debug|x64.ActiveCfg = Debug|x64
+ {1557FB61-9785-4955-ACB3-259F8695AA61}.Debug|x64.Build.0 = Debug|x64
+ {1557FB61-9785-4955-ACB3-259F8695AA61}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {1557FB61-9785-4955-ACB3-259F8695AA61}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {1557FB61-9785-4955-ACB3-259F8695AA61}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {1557FB61-9785-4955-ACB3-259F8695AA61}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {1557FB61-9785-4955-ACB3-259F8695AA61}.Release|Win32.ActiveCfg = Release|Win32
+ {1557FB61-9785-4955-ACB3-259F8695AA61}.Release|Win32.Build.0 = Release|Win32
+ {1557FB61-9785-4955-ACB3-259F8695AA61}.Release|x64.ActiveCfg = Release|x64
+ {1557FB61-9785-4955-ACB3-259F8695AA61}.Release|x64.Build.0 = Release|x64
+ {1557FB61-9785-4955-ACB3-259F8695AA61}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {1557FB61-9785-4955-ACB3-259F8695AA61}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {1557FB61-9785-4955-ACB3-259F8695AA61}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {1557FB61-9785-4955-ACB3-259F8695AA61}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {61AC31CE-6BF2-4C4A-97C7-7DE62A2A546E}.Debug|Win32.ActiveCfg = Debug|Win32
+ {61AC31CE-6BF2-4C4A-97C7-7DE62A2A546E}.Debug|Win32.Build.0 = Debug|Win32
+ {61AC31CE-6BF2-4C4A-97C7-7DE62A2A546E}.Debug|x64.ActiveCfg = Debug|x64
+ {61AC31CE-6BF2-4C4A-97C7-7DE62A2A546E}.Debug|x64.Build.0 = Debug|x64
+ {61AC31CE-6BF2-4C4A-97C7-7DE62A2A546E}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {61AC31CE-6BF2-4C4A-97C7-7DE62A2A546E}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {61AC31CE-6BF2-4C4A-97C7-7DE62A2A546E}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {61AC31CE-6BF2-4C4A-97C7-7DE62A2A546E}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {61AC31CE-6BF2-4C4A-97C7-7DE62A2A546E}.Release|Win32.ActiveCfg = Release|Win32
+ {61AC31CE-6BF2-4C4A-97C7-7DE62A2A546E}.Release|Win32.Build.0 = Release|Win32
+ {61AC31CE-6BF2-4C4A-97C7-7DE62A2A546E}.Release|x64.ActiveCfg = Release|x64
+ {61AC31CE-6BF2-4C4A-97C7-7DE62A2A546E}.Release|x64.Build.0 = Release|x64
+ {61AC31CE-6BF2-4C4A-97C7-7DE62A2A546E}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {61AC31CE-6BF2-4C4A-97C7-7DE62A2A546E}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {61AC31CE-6BF2-4C4A-97C7-7DE62A2A546E}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {61AC31CE-6BF2-4C4A-97C7-7DE62A2A546E}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {B641C7E0-F29C-422C-B3C0-BC3C103BC973}.Debug|Win32.ActiveCfg = Debug|Win32
+ {B641C7E0-F29C-422C-B3C0-BC3C103BC973}.Debug|Win32.Build.0 = Debug|Win32
+ {B641C7E0-F29C-422C-B3C0-BC3C103BC973}.Debug|x64.ActiveCfg = Debug|x64
+ {B641C7E0-F29C-422C-B3C0-BC3C103BC973}.Debug|x64.Build.0 = Debug|x64
+ {B641C7E0-F29C-422C-B3C0-BC3C103BC973}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {B641C7E0-F29C-422C-B3C0-BC3C103BC973}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {B641C7E0-F29C-422C-B3C0-BC3C103BC973}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {B641C7E0-F29C-422C-B3C0-BC3C103BC973}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {B641C7E0-F29C-422C-B3C0-BC3C103BC973}.Release|Win32.ActiveCfg = Release|Win32
+ {B641C7E0-F29C-422C-B3C0-BC3C103BC973}.Release|Win32.Build.0 = Release|Win32
+ {B641C7E0-F29C-422C-B3C0-BC3C103BC973}.Release|x64.ActiveCfg = Release|x64
+ {B641C7E0-F29C-422C-B3C0-BC3C103BC973}.Release|x64.Build.0 = Release|x64
+ {B641C7E0-F29C-422C-B3C0-BC3C103BC973}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {B641C7E0-F29C-422C-B3C0-BC3C103BC973}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {B641C7E0-F29C-422C-B3C0-BC3C103BC973}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {B641C7E0-F29C-422C-B3C0-BC3C103BC973}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {7FD62FF2-E65C-45F1-9BF3-12CD2D78C7A5}.Debug|Win32.ActiveCfg = Debug|Win32
+ {7FD62FF2-E65C-45F1-9BF3-12CD2D78C7A5}.Debug|Win32.Build.0 = Debug|Win32
+ {7FD62FF2-E65C-45F1-9BF3-12CD2D78C7A5}.Debug|x64.ActiveCfg = Debug|x64
+ {7FD62FF2-E65C-45F1-9BF3-12CD2D78C7A5}.Debug|x64.Build.0 = Debug|x64
+ {7FD62FF2-E65C-45F1-9BF3-12CD2D78C7A5}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {7FD62FF2-E65C-45F1-9BF3-12CD2D78C7A5}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {7FD62FF2-E65C-45F1-9BF3-12CD2D78C7A5}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {7FD62FF2-E65C-45F1-9BF3-12CD2D78C7A5}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {7FD62FF2-E65C-45F1-9BF3-12CD2D78C7A5}.Release|Win32.ActiveCfg = Release|Win32
+ {7FD62FF2-E65C-45F1-9BF3-12CD2D78C7A5}.Release|Win32.Build.0 = Release|Win32
+ {7FD62FF2-E65C-45F1-9BF3-12CD2D78C7A5}.Release|x64.ActiveCfg = Release|x64
+ {7FD62FF2-E65C-45F1-9BF3-12CD2D78C7A5}.Release|x64.Build.0 = Release|x64
+ {7FD62FF2-E65C-45F1-9BF3-12CD2D78C7A5}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {7FD62FF2-E65C-45F1-9BF3-12CD2D78C7A5}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {7FD62FF2-E65C-45F1-9BF3-12CD2D78C7A5}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {7FD62FF2-E65C-45F1-9BF3-12CD2D78C7A5}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {DF2DCFDD-1AFC-418A-80AC-EA2624BB534A}.Debug|Win32.ActiveCfg = Debug|Win32
+ {DF2DCFDD-1AFC-418A-80AC-EA2624BB534A}.Debug|Win32.Build.0 = Debug|Win32
+ {DF2DCFDD-1AFC-418A-80AC-EA2624BB534A}.Debug|x64.ActiveCfg = Debug|x64
+ {DF2DCFDD-1AFC-418A-80AC-EA2624BB534A}.Debug|x64.Build.0 = Debug|x64
+ {DF2DCFDD-1AFC-418A-80AC-EA2624BB534A}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {DF2DCFDD-1AFC-418A-80AC-EA2624BB534A}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {DF2DCFDD-1AFC-418A-80AC-EA2624BB534A}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {DF2DCFDD-1AFC-418A-80AC-EA2624BB534A}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {DF2DCFDD-1AFC-418A-80AC-EA2624BB534A}.Release|Win32.ActiveCfg = Release|Win32
+ {DF2DCFDD-1AFC-418A-80AC-EA2624BB534A}.Release|Win32.Build.0 = Release|Win32
+ {DF2DCFDD-1AFC-418A-80AC-EA2624BB534A}.Release|x64.ActiveCfg = Release|x64
+ {DF2DCFDD-1AFC-418A-80AC-EA2624BB534A}.Release|x64.Build.0 = Release|x64
+ {DF2DCFDD-1AFC-418A-80AC-EA2624BB534A}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {DF2DCFDD-1AFC-418A-80AC-EA2624BB534A}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {DF2DCFDD-1AFC-418A-80AC-EA2624BB534A}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {DF2DCFDD-1AFC-418A-80AC-EA2624BB534A}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {939AD270-6758-4304-9B42-F776B03B2B30}.Debug|Win32.ActiveCfg = Debug|Win32
+ {939AD270-6758-4304-9B42-F776B03B2B30}.Debug|Win32.Build.0 = Debug|Win32
+ {939AD270-6758-4304-9B42-F776B03B2B30}.Debug|x64.ActiveCfg = Debug|x64
+ {939AD270-6758-4304-9B42-F776B03B2B30}.Debug|x64.Build.0 = Debug|x64
+ {939AD270-6758-4304-9B42-F776B03B2B30}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {939AD270-6758-4304-9B42-F776B03B2B30}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {939AD270-6758-4304-9B42-F776B03B2B30}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {939AD270-6758-4304-9B42-F776B03B2B30}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {939AD270-6758-4304-9B42-F776B03B2B30}.Release|Win32.ActiveCfg = Release|Win32
+ {939AD270-6758-4304-9B42-F776B03B2B30}.Release|Win32.Build.0 = Release|Win32
+ {939AD270-6758-4304-9B42-F776B03B2B30}.Release|x64.ActiveCfg = Release|x64
+ {939AD270-6758-4304-9B42-F776B03B2B30}.Release|x64.Build.0 = Release|x64
+ {939AD270-6758-4304-9B42-F776B03B2B30}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {939AD270-6758-4304-9B42-F776B03B2B30}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {939AD270-6758-4304-9B42-F776B03B2B30}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {939AD270-6758-4304-9B42-F776B03B2B30}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {7B92691D-13E1-400B-BFDA-1C085DB12DC7}.Debug|Win32.ActiveCfg = Debug|Win32
+ {7B92691D-13E1-400B-BFDA-1C085DB12DC7}.Debug|Win32.Build.0 = Debug|Win32
+ {7B92691D-13E1-400B-BFDA-1C085DB12DC7}.Debug|x64.ActiveCfg = Debug|x64
+ {7B92691D-13E1-400B-BFDA-1C085DB12DC7}.Debug|x64.Build.0 = Debug|x64
+ {7B92691D-13E1-400B-BFDA-1C085DB12DC7}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {7B92691D-13E1-400B-BFDA-1C085DB12DC7}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {7B92691D-13E1-400B-BFDA-1C085DB12DC7}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {7B92691D-13E1-400B-BFDA-1C085DB12DC7}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {7B92691D-13E1-400B-BFDA-1C085DB12DC7}.Release|Win32.ActiveCfg = Release|Win32
+ {7B92691D-13E1-400B-BFDA-1C085DB12DC7}.Release|Win32.Build.0 = Release|Win32
+ {7B92691D-13E1-400B-BFDA-1C085DB12DC7}.Release|x64.ActiveCfg = Release|x64
+ {7B92691D-13E1-400B-BFDA-1C085DB12DC7}.Release|x64.Build.0 = Release|x64
+ {7B92691D-13E1-400B-BFDA-1C085DB12DC7}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {7B92691D-13E1-400B-BFDA-1C085DB12DC7}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {7B92691D-13E1-400B-BFDA-1C085DB12DC7}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {7B92691D-13E1-400B-BFDA-1C085DB12DC7}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {02F5DB27-2C2D-4995-AE03-AE866FD0D726}.Debug|Win32.ActiveCfg = Debug|Win32
+ {02F5DB27-2C2D-4995-AE03-AE866FD0D726}.Debug|Win32.Build.0 = Debug|Win32
+ {02F5DB27-2C2D-4995-AE03-AE866FD0D726}.Debug|x64.ActiveCfg = Debug|x64
+ {02F5DB27-2C2D-4995-AE03-AE866FD0D726}.Debug|x64.Build.0 = Debug|x64
+ {02F5DB27-2C2D-4995-AE03-AE866FD0D726}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {02F5DB27-2C2D-4995-AE03-AE866FD0D726}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {02F5DB27-2C2D-4995-AE03-AE866FD0D726}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {02F5DB27-2C2D-4995-AE03-AE866FD0D726}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {02F5DB27-2C2D-4995-AE03-AE866FD0D726}.Release|Win32.ActiveCfg = Release|Win32
+ {02F5DB27-2C2D-4995-AE03-AE866FD0D726}.Release|Win32.Build.0 = Release|Win32
+ {02F5DB27-2C2D-4995-AE03-AE866FD0D726}.Release|x64.ActiveCfg = Release|x64
+ {02F5DB27-2C2D-4995-AE03-AE866FD0D726}.Release|x64.Build.0 = Release|x64
+ {02F5DB27-2C2D-4995-AE03-AE866FD0D726}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {02F5DB27-2C2D-4995-AE03-AE866FD0D726}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {02F5DB27-2C2D-4995-AE03-AE866FD0D726}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {02F5DB27-2C2D-4995-AE03-AE866FD0D726}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {13E51223-EDBF-46E1-A98A-895FB3685000}.Debug|Win32.ActiveCfg = Debug|Win32
+ {13E51223-EDBF-46E1-A98A-895FB3685000}.Debug|Win32.Build.0 = Debug|Win32
+ {13E51223-EDBF-46E1-A98A-895FB3685000}.Debug|x64.ActiveCfg = Debug|x64
+ {13E51223-EDBF-46E1-A98A-895FB3685000}.Debug|x64.Build.0 = Debug|x64
+ {13E51223-EDBF-46E1-A98A-895FB3685000}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {13E51223-EDBF-46E1-A98A-895FB3685000}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {13E51223-EDBF-46E1-A98A-895FB3685000}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {13E51223-EDBF-46E1-A98A-895FB3685000}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {13E51223-EDBF-46E1-A98A-895FB3685000}.Release|Win32.ActiveCfg = Release|Win32
+ {13E51223-EDBF-46E1-A98A-895FB3685000}.Release|Win32.Build.0 = Release|Win32
+ {13E51223-EDBF-46E1-A98A-895FB3685000}.Release|x64.ActiveCfg = Release|x64
+ {13E51223-EDBF-46E1-A98A-895FB3685000}.Release|x64.Build.0 = Release|x64
+ {13E51223-EDBF-46E1-A98A-895FB3685000}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {13E51223-EDBF-46E1-A98A-895FB3685000}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {13E51223-EDBF-46E1-A98A-895FB3685000}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {13E51223-EDBF-46E1-A98A-895FB3685000}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {4BCEFEBE-22AD-4D8E-BE1F-19FF5925271D}.Debug|Win32.ActiveCfg = Debug|Win32
+ {4BCEFEBE-22AD-4D8E-BE1F-19FF5925271D}.Debug|Win32.Build.0 = Debug|Win32
+ {4BCEFEBE-22AD-4D8E-BE1F-19FF5925271D}.Debug|x64.ActiveCfg = Debug|x64
+ {4BCEFEBE-22AD-4D8E-BE1F-19FF5925271D}.Debug|x64.Build.0 = Debug|x64
+ {4BCEFEBE-22AD-4D8E-BE1F-19FF5925271D}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {4BCEFEBE-22AD-4D8E-BE1F-19FF5925271D}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {4BCEFEBE-22AD-4D8E-BE1F-19FF5925271D}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {4BCEFEBE-22AD-4D8E-BE1F-19FF5925271D}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {4BCEFEBE-22AD-4D8E-BE1F-19FF5925271D}.Release|Win32.ActiveCfg = Release|Win32
+ {4BCEFEBE-22AD-4D8E-BE1F-19FF5925271D}.Release|Win32.Build.0 = Release|Win32
+ {4BCEFEBE-22AD-4D8E-BE1F-19FF5925271D}.Release|x64.ActiveCfg = Release|x64
+ {4BCEFEBE-22AD-4D8E-BE1F-19FF5925271D}.Release|x64.Build.0 = Release|x64
+ {4BCEFEBE-22AD-4D8E-BE1F-19FF5925271D}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {4BCEFEBE-22AD-4D8E-BE1F-19FF5925271D}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {4BCEFEBE-22AD-4D8E-BE1F-19FF5925271D}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {4BCEFEBE-22AD-4D8E-BE1F-19FF5925271D}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {E6270A0D-B665-450E-BA6A-B9D648D5B145}.Debug|Win32.ActiveCfg = Debug|Win32
+ {E6270A0D-B665-450E-BA6A-B9D648D5B145}.Debug|Win32.Build.0 = Debug|Win32
+ {E6270A0D-B665-450E-BA6A-B9D648D5B145}.Debug|x64.ActiveCfg = Debug|x64
+ {E6270A0D-B665-450E-BA6A-B9D648D5B145}.Debug|x64.Build.0 = Debug|x64
+ {E6270A0D-B665-450E-BA6A-B9D648D5B145}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {E6270A0D-B665-450E-BA6A-B9D648D5B145}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {E6270A0D-B665-450E-BA6A-B9D648D5B145}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {E6270A0D-B665-450E-BA6A-B9D648D5B145}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {E6270A0D-B665-450E-BA6A-B9D648D5B145}.Release|Win32.ActiveCfg = Release|Win32
+ {E6270A0D-B665-450E-BA6A-B9D648D5B145}.Release|Win32.Build.0 = Release|Win32
+ {E6270A0D-B665-450E-BA6A-B9D648D5B145}.Release|x64.ActiveCfg = Release|x64
+ {E6270A0D-B665-450E-BA6A-B9D648D5B145}.Release|x64.Build.0 = Release|x64
+ {E6270A0D-B665-450E-BA6A-B9D648D5B145}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {E6270A0D-B665-450E-BA6A-B9D648D5B145}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {E6270A0D-B665-450E-BA6A-B9D648D5B145}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {E6270A0D-B665-450E-BA6A-B9D648D5B145}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {82933EEE-EB79-486D-A8E2-B440D33D924A}.Debug|Win32.ActiveCfg = Debug|Win32
+ {82933EEE-EB79-486D-A8E2-B440D33D924A}.Debug|Win32.Build.0 = Debug|Win32
+ {82933EEE-EB79-486D-A8E2-B440D33D924A}.Debug|x64.ActiveCfg = Debug|x64
+ {82933EEE-EB79-486D-A8E2-B440D33D924A}.Debug|x64.Build.0 = Debug|x64
+ {82933EEE-EB79-486D-A8E2-B440D33D924A}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {82933EEE-EB79-486D-A8E2-B440D33D924A}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {82933EEE-EB79-486D-A8E2-B440D33D924A}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {82933EEE-EB79-486D-A8E2-B440D33D924A}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {82933EEE-EB79-486D-A8E2-B440D33D924A}.Release|Win32.ActiveCfg = Release|Win32
+ {82933EEE-EB79-486D-A8E2-B440D33D924A}.Release|Win32.Build.0 = Release|Win32
+ {82933EEE-EB79-486D-A8E2-B440D33D924A}.Release|x64.ActiveCfg = Release|x64
+ {82933EEE-EB79-486D-A8E2-B440D33D924A}.Release|x64.Build.0 = Release|x64
+ {82933EEE-EB79-486D-A8E2-B440D33D924A}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {82933EEE-EB79-486D-A8E2-B440D33D924A}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {82933EEE-EB79-486D-A8E2-B440D33D924A}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {82933EEE-EB79-486D-A8E2-B440D33D924A}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {8EFB0853-50E8-4167-88A5-2C71DAB74098}.Debug|Win32.ActiveCfg = Debug|Win32
+ {8EFB0853-50E8-4167-88A5-2C71DAB74098}.Debug|Win32.Build.0 = Debug|Win32
+ {8EFB0853-50E8-4167-88A5-2C71DAB74098}.Debug|x64.ActiveCfg = Debug|x64
+ {8EFB0853-50E8-4167-88A5-2C71DAB74098}.Debug|x64.Build.0 = Debug|x64
+ {8EFB0853-50E8-4167-88A5-2C71DAB74098}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {8EFB0853-50E8-4167-88A5-2C71DAB74098}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {8EFB0853-50E8-4167-88A5-2C71DAB74098}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {8EFB0853-50E8-4167-88A5-2C71DAB74098}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {8EFB0853-50E8-4167-88A5-2C71DAB74098}.Release|Win32.ActiveCfg = Release|Win32
+ {8EFB0853-50E8-4167-88A5-2C71DAB74098}.Release|Win32.Build.0 = Release|Win32
+ {8EFB0853-50E8-4167-88A5-2C71DAB74098}.Release|x64.ActiveCfg = Release|x64
+ {8EFB0853-50E8-4167-88A5-2C71DAB74098}.Release|x64.Build.0 = Release|x64
+ {8EFB0853-50E8-4167-88A5-2C71DAB74098}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {8EFB0853-50E8-4167-88A5-2C71DAB74098}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {8EFB0853-50E8-4167-88A5-2C71DAB74098}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {8EFB0853-50E8-4167-88A5-2C71DAB74098}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {84BE55F0-B6BE-4DFA-B387-4D09C24B4875}.Debug|Win32.ActiveCfg = Debug|Win32
+ {84BE55F0-B6BE-4DFA-B387-4D09C24B4875}.Debug|Win32.Build.0 = Debug|Win32
+ {84BE55F0-B6BE-4DFA-B387-4D09C24B4875}.Debug|x64.ActiveCfg = Debug|x64
+ {84BE55F0-B6BE-4DFA-B387-4D09C24B4875}.Debug|x64.Build.0 = Debug|x64
+ {84BE55F0-B6BE-4DFA-B387-4D09C24B4875}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {84BE55F0-B6BE-4DFA-B387-4D09C24B4875}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {84BE55F0-B6BE-4DFA-B387-4D09C24B4875}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {84BE55F0-B6BE-4DFA-B387-4D09C24B4875}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {84BE55F0-B6BE-4DFA-B387-4D09C24B4875}.Release|Win32.ActiveCfg = Release|Win32
+ {84BE55F0-B6BE-4DFA-B387-4D09C24B4875}.Release|Win32.Build.0 = Release|Win32
+ {84BE55F0-B6BE-4DFA-B387-4D09C24B4875}.Release|x64.ActiveCfg = Release|x64
+ {84BE55F0-B6BE-4DFA-B387-4D09C24B4875}.Release|x64.Build.0 = Release|x64
+ {84BE55F0-B6BE-4DFA-B387-4D09C24B4875}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {84BE55F0-B6BE-4DFA-B387-4D09C24B4875}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {84BE55F0-B6BE-4DFA-B387-4D09C24B4875}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {84BE55F0-B6BE-4DFA-B387-4D09C24B4875}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {478B9CE3-2141-4C1C-A54C-984865DF5930}.Debug|Win32.ActiveCfg = Debug|Win32
+ {478B9CE3-2141-4C1C-A54C-984865DF5930}.Debug|Win32.Build.0 = Debug|Win32
+ {478B9CE3-2141-4C1C-A54C-984865DF5930}.Debug|x64.ActiveCfg = Debug|x64
+ {478B9CE3-2141-4C1C-A54C-984865DF5930}.Debug|x64.Build.0 = Debug|x64
+ {478B9CE3-2141-4C1C-A54C-984865DF5930}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {478B9CE3-2141-4C1C-A54C-984865DF5930}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {478B9CE3-2141-4C1C-A54C-984865DF5930}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {478B9CE3-2141-4C1C-A54C-984865DF5930}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {478B9CE3-2141-4C1C-A54C-984865DF5930}.Release|Win32.ActiveCfg = Release|Win32
+ {478B9CE3-2141-4C1C-A54C-984865DF5930}.Release|Win32.Build.0 = Release|Win32
+ {478B9CE3-2141-4C1C-A54C-984865DF5930}.Release|x64.ActiveCfg = Release|x64
+ {478B9CE3-2141-4C1C-A54C-984865DF5930}.Release|x64.Build.0 = Release|x64
+ {478B9CE3-2141-4C1C-A54C-984865DF5930}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {478B9CE3-2141-4C1C-A54C-984865DF5930}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {478B9CE3-2141-4C1C-A54C-984865DF5930}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {478B9CE3-2141-4C1C-A54C-984865DF5930}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {136554B9-6A33-46F2-9595-5B3E90A00553}.Debug|Win32.ActiveCfg = Debug|Win32
+ {136554B9-6A33-46F2-9595-5B3E90A00553}.Debug|Win32.Build.0 = Debug|Win32
+ {136554B9-6A33-46F2-9595-5B3E90A00553}.Debug|x64.ActiveCfg = Debug|x64
+ {136554B9-6A33-46F2-9595-5B3E90A00553}.Debug|x64.Build.0 = Debug|x64
+ {136554B9-6A33-46F2-9595-5B3E90A00553}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {136554B9-6A33-46F2-9595-5B3E90A00553}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {136554B9-6A33-46F2-9595-5B3E90A00553}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {136554B9-6A33-46F2-9595-5B3E90A00553}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {136554B9-6A33-46F2-9595-5B3E90A00553}.Release|Win32.ActiveCfg = Release|Win32
+ {136554B9-6A33-46F2-9595-5B3E90A00553}.Release|Win32.Build.0 = Release|Win32
+ {136554B9-6A33-46F2-9595-5B3E90A00553}.Release|x64.ActiveCfg = Release|x64
+ {136554B9-6A33-46F2-9595-5B3E90A00553}.Release|x64.Build.0 = Release|x64
+ {136554B9-6A33-46F2-9595-5B3E90A00553}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {136554B9-6A33-46F2-9595-5B3E90A00553}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {136554B9-6A33-46F2-9595-5B3E90A00553}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {136554B9-6A33-46F2-9595-5B3E90A00553}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {05C7D1D5-557E-4868-90BB-2F7B1B0DB9C6}.Debug|Win32.ActiveCfg = Debug|Win32
+ {05C7D1D5-557E-4868-90BB-2F7B1B0DB9C6}.Debug|Win32.Build.0 = Debug|Win32
+ {05C7D1D5-557E-4868-90BB-2F7B1B0DB9C6}.Debug|x64.ActiveCfg = Debug|x64
+ {05C7D1D5-557E-4868-90BB-2F7B1B0DB9C6}.Debug|x64.Build.0 = Debug|x64
+ {05C7D1D5-557E-4868-90BB-2F7B1B0DB9C6}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {05C7D1D5-557E-4868-90BB-2F7B1B0DB9C6}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {05C7D1D5-557E-4868-90BB-2F7B1B0DB9C6}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {05C7D1D5-557E-4868-90BB-2F7B1B0DB9C6}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {05C7D1D5-557E-4868-90BB-2F7B1B0DB9C6}.Release|Win32.ActiveCfg = Release|Win32
+ {05C7D1D5-557E-4868-90BB-2F7B1B0DB9C6}.Release|Win32.Build.0 = Release|Win32
+ {05C7D1D5-557E-4868-90BB-2F7B1B0DB9C6}.Release|x64.ActiveCfg = Release|x64
+ {05C7D1D5-557E-4868-90BB-2F7B1B0DB9C6}.Release|x64.Build.0 = Release|x64
+ {05C7D1D5-557E-4868-90BB-2F7B1B0DB9C6}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {05C7D1D5-557E-4868-90BB-2F7B1B0DB9C6}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {05C7D1D5-557E-4868-90BB-2F7B1B0DB9C6}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {05C7D1D5-557E-4868-90BB-2F7B1B0DB9C6}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {2861713F-5EA6-486E-AE98-55CC4200305E}.Debug|Win32.ActiveCfg = Debug|Win32
+ {2861713F-5EA6-486E-AE98-55CC4200305E}.Debug|Win32.Build.0 = Debug|Win32
+ {2861713F-5EA6-486E-AE98-55CC4200305E}.Debug|x64.ActiveCfg = Debug|x64
+ {2861713F-5EA6-486E-AE98-55CC4200305E}.Debug|x64.Build.0 = Debug|x64
+ {2861713F-5EA6-486E-AE98-55CC4200305E}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {2861713F-5EA6-486E-AE98-55CC4200305E}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {2861713F-5EA6-486E-AE98-55CC4200305E}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {2861713F-5EA6-486E-AE98-55CC4200305E}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {2861713F-5EA6-486E-AE98-55CC4200305E}.Release|Win32.ActiveCfg = Release|Win32
+ {2861713F-5EA6-486E-AE98-55CC4200305E}.Release|Win32.Build.0 = Release|Win32
+ {2861713F-5EA6-486E-AE98-55CC4200305E}.Release|x64.ActiveCfg = Release|x64
+ {2861713F-5EA6-486E-AE98-55CC4200305E}.Release|x64.Build.0 = Release|x64
+ {2861713F-5EA6-486E-AE98-55CC4200305E}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {2861713F-5EA6-486E-AE98-55CC4200305E}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {2861713F-5EA6-486E-AE98-55CC4200305E}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {2861713F-5EA6-486E-AE98-55CC4200305E}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {00EABCA8-578E-4BC9-A0DA-5006B5C28A3A}.Debug|Win32.ActiveCfg = Debug|Win32
+ {00EABCA8-578E-4BC9-A0DA-5006B5C28A3A}.Debug|Win32.Build.0 = Debug|Win32
+ {00EABCA8-578E-4BC9-A0DA-5006B5C28A3A}.Debug|x64.ActiveCfg = Debug|x64
+ {00EABCA8-578E-4BC9-A0DA-5006B5C28A3A}.Debug|x64.Build.0 = Debug|x64
+ {00EABCA8-578E-4BC9-A0DA-5006B5C28A3A}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {00EABCA8-578E-4BC9-A0DA-5006B5C28A3A}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {00EABCA8-578E-4BC9-A0DA-5006B5C28A3A}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {00EABCA8-578E-4BC9-A0DA-5006B5C28A3A}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {00EABCA8-578E-4BC9-A0DA-5006B5C28A3A}.Release|Win32.ActiveCfg = Release|Win32
+ {00EABCA8-578E-4BC9-A0DA-5006B5C28A3A}.Release|Win32.Build.0 = Release|Win32
+ {00EABCA8-578E-4BC9-A0DA-5006B5C28A3A}.Release|x64.ActiveCfg = Release|x64
+ {00EABCA8-578E-4BC9-A0DA-5006B5C28A3A}.Release|x64.Build.0 = Release|x64
+ {00EABCA8-578E-4BC9-A0DA-5006B5C28A3A}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {00EABCA8-578E-4BC9-A0DA-5006B5C28A3A}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {00EABCA8-578E-4BC9-A0DA-5006B5C28A3A}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {00EABCA8-578E-4BC9-A0DA-5006B5C28A3A}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {931A5E4E-E25D-4895-B202-E1D1B3F37ED1}.Debug|Win32.ActiveCfg = Debug|Win32
+ {931A5E4E-E25D-4895-B202-E1D1B3F37ED1}.Debug|Win32.Build.0 = Debug|Win32
+ {931A5E4E-E25D-4895-B202-E1D1B3F37ED1}.Debug|x64.ActiveCfg = Debug|x64
+ {931A5E4E-E25D-4895-B202-E1D1B3F37ED1}.Debug|x64.Build.0 = Debug|x64
+ {931A5E4E-E25D-4895-B202-E1D1B3F37ED1}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {931A5E4E-E25D-4895-B202-E1D1B3F37ED1}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {931A5E4E-E25D-4895-B202-E1D1B3F37ED1}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {931A5E4E-E25D-4895-B202-E1D1B3F37ED1}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {931A5E4E-E25D-4895-B202-E1D1B3F37ED1}.Release|Win32.ActiveCfg = Release|Win32
+ {931A5E4E-E25D-4895-B202-E1D1B3F37ED1}.Release|Win32.Build.0 = Release|Win32
+ {931A5E4E-E25D-4895-B202-E1D1B3F37ED1}.Release|x64.ActiveCfg = Release|x64
+ {931A5E4E-E25D-4895-B202-E1D1B3F37ED1}.Release|x64.Build.0 = Release|x64
+ {931A5E4E-E25D-4895-B202-E1D1B3F37ED1}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {931A5E4E-E25D-4895-B202-E1D1B3F37ED1}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {931A5E4E-E25D-4895-B202-E1D1B3F37ED1}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {931A5E4E-E25D-4895-B202-E1D1B3F37ED1}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {A40990ED-A5F2-4175-A8A5-DEE67FDFD64A}.Debug|Win32.ActiveCfg = Debug|Win32
+ {A40990ED-A5F2-4175-A8A5-DEE67FDFD64A}.Debug|Win32.Build.0 = Debug|Win32
+ {A40990ED-A5F2-4175-A8A5-DEE67FDFD64A}.Debug|x64.ActiveCfg = Debug|x64
+ {A40990ED-A5F2-4175-A8A5-DEE67FDFD64A}.Debug|x64.Build.0 = Debug|x64
+ {A40990ED-A5F2-4175-A8A5-DEE67FDFD64A}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {A40990ED-A5F2-4175-A8A5-DEE67FDFD64A}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {A40990ED-A5F2-4175-A8A5-DEE67FDFD64A}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {A40990ED-A5F2-4175-A8A5-DEE67FDFD64A}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {A40990ED-A5F2-4175-A8A5-DEE67FDFD64A}.Release|Win32.ActiveCfg = Release|Win32
+ {A40990ED-A5F2-4175-A8A5-DEE67FDFD64A}.Release|Win32.Build.0 = Release|Win32
+ {A40990ED-A5F2-4175-A8A5-DEE67FDFD64A}.Release|x64.ActiveCfg = Release|x64
+ {A40990ED-A5F2-4175-A8A5-DEE67FDFD64A}.Release|x64.Build.0 = Release|x64
+ {A40990ED-A5F2-4175-A8A5-DEE67FDFD64A}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {A40990ED-A5F2-4175-A8A5-DEE67FDFD64A}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {A40990ED-A5F2-4175-A8A5-DEE67FDFD64A}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {A40990ED-A5F2-4175-A8A5-DEE67FDFD64A}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {29EAEDFD-B486-433D-8809-7C4B298BFF17}.Debug|Win32.ActiveCfg = Debug|Win32
+ {29EAEDFD-B486-433D-8809-7C4B298BFF17}.Debug|Win32.Build.0 = Debug|Win32
+ {29EAEDFD-B486-433D-8809-7C4B298BFF17}.Debug|x64.ActiveCfg = Debug|x64
+ {29EAEDFD-B486-433D-8809-7C4B298BFF17}.Debug|x64.Build.0 = Debug|x64
+ {29EAEDFD-B486-433D-8809-7C4B298BFF17}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {29EAEDFD-B486-433D-8809-7C4B298BFF17}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {29EAEDFD-B486-433D-8809-7C4B298BFF17}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {29EAEDFD-B486-433D-8809-7C4B298BFF17}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {29EAEDFD-B486-433D-8809-7C4B298BFF17}.Release|Win32.ActiveCfg = Release|Win32
+ {29EAEDFD-B486-433D-8809-7C4B298BFF17}.Release|Win32.Build.0 = Release|Win32
+ {29EAEDFD-B486-433D-8809-7C4B298BFF17}.Release|x64.ActiveCfg = Release|x64
+ {29EAEDFD-B486-433D-8809-7C4B298BFF17}.Release|x64.Build.0 = Release|x64
+ {29EAEDFD-B486-433D-8809-7C4B298BFF17}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {29EAEDFD-B486-433D-8809-7C4B298BFF17}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {29EAEDFD-B486-433D-8809-7C4B298BFF17}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {29EAEDFD-B486-433D-8809-7C4B298BFF17}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {F7125366-276A-455F-A1AA-80846F7BE09F}.Debug|Win32.ActiveCfg = Debug|Win32
+ {F7125366-276A-455F-A1AA-80846F7BE09F}.Debug|Win32.Build.0 = Debug|Win32
+ {F7125366-276A-455F-A1AA-80846F7BE09F}.Debug|x64.ActiveCfg = Debug|x64
+ {F7125366-276A-455F-A1AA-80846F7BE09F}.Debug|x64.Build.0 = Debug|x64
+ {F7125366-276A-455F-A1AA-80846F7BE09F}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {F7125366-276A-455F-A1AA-80846F7BE09F}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {F7125366-276A-455F-A1AA-80846F7BE09F}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {F7125366-276A-455F-A1AA-80846F7BE09F}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {F7125366-276A-455F-A1AA-80846F7BE09F}.Release|Win32.ActiveCfg = Release|Win32
+ {F7125366-276A-455F-A1AA-80846F7BE09F}.Release|Win32.Build.0 = Release|Win32
+ {F7125366-276A-455F-A1AA-80846F7BE09F}.Release|x64.ActiveCfg = Release|x64
+ {F7125366-276A-455F-A1AA-80846F7BE09F}.Release|x64.Build.0 = Release|x64
+ {F7125366-276A-455F-A1AA-80846F7BE09F}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {F7125366-276A-455F-A1AA-80846F7BE09F}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {F7125366-276A-455F-A1AA-80846F7BE09F}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {F7125366-276A-455F-A1AA-80846F7BE09F}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {986196FD-0900-451E-818F-7373FBAFF793}.Debug|Win32.ActiveCfg = Debug|Win32
+ {986196FD-0900-451E-818F-7373FBAFF793}.Debug|Win32.Build.0 = Debug|Win32
+ {986196FD-0900-451E-818F-7373FBAFF793}.Debug|x64.ActiveCfg = Debug|x64
+ {986196FD-0900-451E-818F-7373FBAFF793}.Debug|x64.Build.0 = Debug|x64
+ {986196FD-0900-451E-818F-7373FBAFF793}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {986196FD-0900-451E-818F-7373FBAFF793}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {986196FD-0900-451E-818F-7373FBAFF793}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {986196FD-0900-451E-818F-7373FBAFF793}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {986196FD-0900-451E-818F-7373FBAFF793}.Release|Win32.ActiveCfg = Release|Win32
+ {986196FD-0900-451E-818F-7373FBAFF793}.Release|Win32.Build.0 = Release|Win32
+ {986196FD-0900-451E-818F-7373FBAFF793}.Release|x64.ActiveCfg = Release|x64
+ {986196FD-0900-451E-818F-7373FBAFF793}.Release|x64.Build.0 = Release|x64
+ {986196FD-0900-451E-818F-7373FBAFF793}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {986196FD-0900-451E-818F-7373FBAFF793}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {986196FD-0900-451E-818F-7373FBAFF793}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {986196FD-0900-451E-818F-7373FBAFF793}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {09DBA8E7-7471-4D6D-B6EF-5B8B2B32A020}.Debug|Win32.ActiveCfg = Debug|Win32
+ {09DBA8E7-7471-4D6D-B6EF-5B8B2B32A020}.Debug|Win32.Build.0 = Debug|Win32
+ {09DBA8E7-7471-4D6D-B6EF-5B8B2B32A020}.Debug|x64.ActiveCfg = Debug|x64
+ {09DBA8E7-7471-4D6D-B6EF-5B8B2B32A020}.Debug|x64.Build.0 = Debug|x64
+ {09DBA8E7-7471-4D6D-B6EF-5B8B2B32A020}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {09DBA8E7-7471-4D6D-B6EF-5B8B2B32A020}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {09DBA8E7-7471-4D6D-B6EF-5B8B2B32A020}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {09DBA8E7-7471-4D6D-B6EF-5B8B2B32A020}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {09DBA8E7-7471-4D6D-B6EF-5B8B2B32A020}.Release|Win32.ActiveCfg = Release|Win32
+ {09DBA8E7-7471-4D6D-B6EF-5B8B2B32A020}.Release|Win32.Build.0 = Release|Win32
+ {09DBA8E7-7471-4D6D-B6EF-5B8B2B32A020}.Release|x64.ActiveCfg = Release|x64
+ {09DBA8E7-7471-4D6D-B6EF-5B8B2B32A020}.Release|x64.Build.0 = Release|x64
+ {09DBA8E7-7471-4D6D-B6EF-5B8B2B32A020}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {09DBA8E7-7471-4D6D-B6EF-5B8B2B32A020}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {09DBA8E7-7471-4D6D-B6EF-5B8B2B32A020}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {09DBA8E7-7471-4D6D-B6EF-5B8B2B32A020}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {B592842F-6270-4C2E-8FBC-DBE1D5EF71D0}.Debug|Win32.ActiveCfg = Debug|Win32
+ {B592842F-6270-4C2E-8FBC-DBE1D5EF71D0}.Debug|Win32.Build.0 = Debug|Win32
+ {B592842F-6270-4C2E-8FBC-DBE1D5EF71D0}.Debug|x64.ActiveCfg = Debug|x64
+ {B592842F-6270-4C2E-8FBC-DBE1D5EF71D0}.Debug|x64.Build.0 = Debug|x64
+ {B592842F-6270-4C2E-8FBC-DBE1D5EF71D0}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {B592842F-6270-4C2E-8FBC-DBE1D5EF71D0}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {B592842F-6270-4C2E-8FBC-DBE1D5EF71D0}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {B592842F-6270-4C2E-8FBC-DBE1D5EF71D0}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {B592842F-6270-4C2E-8FBC-DBE1D5EF71D0}.Release|Win32.ActiveCfg = Release|Win32
+ {B592842F-6270-4C2E-8FBC-DBE1D5EF71D0}.Release|Win32.Build.0 = Release|Win32
+ {B592842F-6270-4C2E-8FBC-DBE1D5EF71D0}.Release|x64.ActiveCfg = Release|x64
+ {B592842F-6270-4C2E-8FBC-DBE1D5EF71D0}.Release|x64.Build.0 = Release|x64
+ {B592842F-6270-4C2E-8FBC-DBE1D5EF71D0}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {B592842F-6270-4C2E-8FBC-DBE1D5EF71D0}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {B592842F-6270-4C2E-8FBC-DBE1D5EF71D0}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {B592842F-6270-4C2E-8FBC-DBE1D5EF71D0}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {FAB79DB6-B9B5-4FDA-B2FB-17B4BEB6011F}.Debug|Win32.ActiveCfg = Debug|Win32
+ {FAB79DB6-B9B5-4FDA-B2FB-17B4BEB6011F}.Debug|Win32.Build.0 = Debug|Win32
+ {FAB79DB6-B9B5-4FDA-B2FB-17B4BEB6011F}.Debug|x64.ActiveCfg = Debug|x64
+ {FAB79DB6-B9B5-4FDA-B2FB-17B4BEB6011F}.Debug|x64.Build.0 = Debug|x64
+ {FAB79DB6-B9B5-4FDA-B2FB-17B4BEB6011F}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {FAB79DB6-B9B5-4FDA-B2FB-17B4BEB6011F}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {FAB79DB6-B9B5-4FDA-B2FB-17B4BEB6011F}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {FAB79DB6-B9B5-4FDA-B2FB-17B4BEB6011F}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {FAB79DB6-B9B5-4FDA-B2FB-17B4BEB6011F}.Release|Win32.ActiveCfg = Release|Win32
+ {FAB79DB6-B9B5-4FDA-B2FB-17B4BEB6011F}.Release|Win32.Build.0 = Release|Win32
+ {FAB79DB6-B9B5-4FDA-B2FB-17B4BEB6011F}.Release|x64.ActiveCfg = Release|x64
+ {FAB79DB6-B9B5-4FDA-B2FB-17B4BEB6011F}.Release|x64.Build.0 = Release|x64
+ {FAB79DB6-B9B5-4FDA-B2FB-17B4BEB6011F}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {FAB79DB6-B9B5-4FDA-B2FB-17B4BEB6011F}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {FAB79DB6-B9B5-4FDA-B2FB-17B4BEB6011F}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {FAB79DB6-B9B5-4FDA-B2FB-17B4BEB6011F}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {5E35A42F-8E72-4ED7-ABA3-469E86F14DB8}.Debug|Win32.ActiveCfg = Debug|Win32
+ {5E35A42F-8E72-4ED7-ABA3-469E86F14DB8}.Debug|Win32.Build.0 = Debug|Win32
+ {5E35A42F-8E72-4ED7-ABA3-469E86F14DB8}.Debug|x64.ActiveCfg = Debug|x64
+ {5E35A42F-8E72-4ED7-ABA3-469E86F14DB8}.Debug|x64.Build.0 = Debug|x64
+ {5E35A42F-8E72-4ED7-ABA3-469E86F14DB8}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {5E35A42F-8E72-4ED7-ABA3-469E86F14DB8}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {5E35A42F-8E72-4ED7-ABA3-469E86F14DB8}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {5E35A42F-8E72-4ED7-ABA3-469E86F14DB8}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {5E35A42F-8E72-4ED7-ABA3-469E86F14DB8}.Release|Win32.ActiveCfg = Release|Win32
+ {5E35A42F-8E72-4ED7-ABA3-469E86F14DB8}.Release|Win32.Build.0 = Release|Win32
+ {5E35A42F-8E72-4ED7-ABA3-469E86F14DB8}.Release|x64.ActiveCfg = Release|x64
+ {5E35A42F-8E72-4ED7-ABA3-469E86F14DB8}.Release|x64.Build.0 = Release|x64
+ {5E35A42F-8E72-4ED7-ABA3-469E86F14DB8}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {5E35A42F-8E72-4ED7-ABA3-469E86F14DB8}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {5E35A42F-8E72-4ED7-ABA3-469E86F14DB8}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {5E35A42F-8E72-4ED7-ABA3-469E86F14DB8}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {B9B3203E-0C07-46DB-BABE-3024B22F923C}.Debug|Win32.ActiveCfg = Debug|Win32
+ {B9B3203E-0C07-46DB-BABE-3024B22F923C}.Debug|Win32.Build.0 = Debug|Win32
+ {B9B3203E-0C07-46DB-BABE-3024B22F923C}.Debug|x64.ActiveCfg = Debug|x64
+ {B9B3203E-0C07-46DB-BABE-3024B22F923C}.Debug|x64.Build.0 = Debug|x64
+ {B9B3203E-0C07-46DB-BABE-3024B22F923C}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {B9B3203E-0C07-46DB-BABE-3024B22F923C}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {B9B3203E-0C07-46DB-BABE-3024B22F923C}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {B9B3203E-0C07-46DB-BABE-3024B22F923C}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {B9B3203E-0C07-46DB-BABE-3024B22F923C}.Release|Win32.ActiveCfg = Release|Win32
+ {B9B3203E-0C07-46DB-BABE-3024B22F923C}.Release|Win32.Build.0 = Release|Win32
+ {B9B3203E-0C07-46DB-BABE-3024B22F923C}.Release|x64.ActiveCfg = Release|x64
+ {B9B3203E-0C07-46DB-BABE-3024B22F923C}.Release|x64.Build.0 = Release|x64
+ {B9B3203E-0C07-46DB-BABE-3024B22F923C}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {B9B3203E-0C07-46DB-BABE-3024B22F923C}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {B9B3203E-0C07-46DB-BABE-3024B22F923C}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {B9B3203E-0C07-46DB-BABE-3024B22F923C}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {95BF266E-0195-4BEB-B306-B99489EE3991}.Debug|Win32.ActiveCfg = Debug|Win32
+ {95BF266E-0195-4BEB-B306-B99489EE3991}.Debug|Win32.Build.0 = Debug|Win32
+ {95BF266E-0195-4BEB-B306-B99489EE3991}.Debug|x64.ActiveCfg = Debug|x64
+ {95BF266E-0195-4BEB-B306-B99489EE3991}.Debug|x64.Build.0 = Debug|x64
+ {95BF266E-0195-4BEB-B306-B99489EE3991}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {95BF266E-0195-4BEB-B306-B99489EE3991}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {95BF266E-0195-4BEB-B306-B99489EE3991}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {95BF266E-0195-4BEB-B306-B99489EE3991}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {95BF266E-0195-4BEB-B306-B99489EE3991}.Release|Win32.ActiveCfg = Release|Win32
+ {95BF266E-0195-4BEB-B306-B99489EE3991}.Release|Win32.Build.0 = Release|Win32
+ {95BF266E-0195-4BEB-B306-B99489EE3991}.Release|x64.ActiveCfg = Release|x64
+ {95BF266E-0195-4BEB-B306-B99489EE3991}.Release|x64.Build.0 = Release|x64
+ {95BF266E-0195-4BEB-B306-B99489EE3991}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {95BF266E-0195-4BEB-B306-B99489EE3991}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {95BF266E-0195-4BEB-B306-B99489EE3991}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {95BF266E-0195-4BEB-B306-B99489EE3991}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {0516C2CE-F3B1-476B-AECC-9E2A02D40D8D}.Debug|Win32.ActiveCfg = Debug|Win32
+ {0516C2CE-F3B1-476B-AECC-9E2A02D40D8D}.Debug|Win32.Build.0 = Debug|Win32
+ {0516C2CE-F3B1-476B-AECC-9E2A02D40D8D}.Debug|x64.ActiveCfg = Debug|x64
+ {0516C2CE-F3B1-476B-AECC-9E2A02D40D8D}.Debug|x64.Build.0 = Debug|x64
+ {0516C2CE-F3B1-476B-AECC-9E2A02D40D8D}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {0516C2CE-F3B1-476B-AECC-9E2A02D40D8D}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {0516C2CE-F3B1-476B-AECC-9E2A02D40D8D}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {0516C2CE-F3B1-476B-AECC-9E2A02D40D8D}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {0516C2CE-F3B1-476B-AECC-9E2A02D40D8D}.Release|Win32.ActiveCfg = Release|Win32
+ {0516C2CE-F3B1-476B-AECC-9E2A02D40D8D}.Release|Win32.Build.0 = Release|Win32
+ {0516C2CE-F3B1-476B-AECC-9E2A02D40D8D}.Release|x64.ActiveCfg = Release|x64
+ {0516C2CE-F3B1-476B-AECC-9E2A02D40D8D}.Release|x64.Build.0 = Release|x64
+ {0516C2CE-F3B1-476B-AECC-9E2A02D40D8D}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {0516C2CE-F3B1-476B-AECC-9E2A02D40D8D}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {0516C2CE-F3B1-476B-AECC-9E2A02D40D8D}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {0516C2CE-F3B1-476B-AECC-9E2A02D40D8D}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {49F50B13-96C8-44F1-9B8C-68197E0DBE7E}.Debug|Win32.ActiveCfg = Debug|Win32
+ {49F50B13-96C8-44F1-9B8C-68197E0DBE7E}.Debug|Win32.Build.0 = Debug|Win32
+ {49F50B13-96C8-44F1-9B8C-68197E0DBE7E}.Debug|x64.ActiveCfg = Debug|x64
+ {49F50B13-96C8-44F1-9B8C-68197E0DBE7E}.Debug|x64.Build.0 = Debug|x64
+ {49F50B13-96C8-44F1-9B8C-68197E0DBE7E}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {49F50B13-96C8-44F1-9B8C-68197E0DBE7E}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {49F50B13-96C8-44F1-9B8C-68197E0DBE7E}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {49F50B13-96C8-44F1-9B8C-68197E0DBE7E}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {49F50B13-96C8-44F1-9B8C-68197E0DBE7E}.Release|Win32.ActiveCfg = Release|Win32
+ {49F50B13-96C8-44F1-9B8C-68197E0DBE7E}.Release|Win32.Build.0 = Release|Win32
+ {49F50B13-96C8-44F1-9B8C-68197E0DBE7E}.Release|x64.ActiveCfg = Release|x64
+ {49F50B13-96C8-44F1-9B8C-68197E0DBE7E}.Release|x64.Build.0 = Release|x64
+ {49F50B13-96C8-44F1-9B8C-68197E0DBE7E}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {49F50B13-96C8-44F1-9B8C-68197E0DBE7E}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {49F50B13-96C8-44F1-9B8C-68197E0DBE7E}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {49F50B13-96C8-44F1-9B8C-68197E0DBE7E}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {67436D24-0D70-48D5-B1AE-6E8DFA978983}.Debug|Win32.ActiveCfg = Debug|Win32
+ {67436D24-0D70-48D5-B1AE-6E8DFA978983}.Debug|Win32.Build.0 = Debug|Win32
+ {67436D24-0D70-48D5-B1AE-6E8DFA978983}.Debug|x64.ActiveCfg = Debug|x64
+ {67436D24-0D70-48D5-B1AE-6E8DFA978983}.Debug|x64.Build.0 = Debug|x64
+ {67436D24-0D70-48D5-B1AE-6E8DFA978983}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {67436D24-0D70-48D5-B1AE-6E8DFA978983}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {67436D24-0D70-48D5-B1AE-6E8DFA978983}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {67436D24-0D70-48D5-B1AE-6E8DFA978983}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {67436D24-0D70-48D5-B1AE-6E8DFA978983}.Release|Win32.ActiveCfg = Release|Win32
+ {67436D24-0D70-48D5-B1AE-6E8DFA978983}.Release|Win32.Build.0 = Release|Win32
+ {67436D24-0D70-48D5-B1AE-6E8DFA978983}.Release|x64.ActiveCfg = Release|x64
+ {67436D24-0D70-48D5-B1AE-6E8DFA978983}.Release|x64.Build.0 = Release|x64
+ {67436D24-0D70-48D5-B1AE-6E8DFA978983}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {67436D24-0D70-48D5-B1AE-6E8DFA978983}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {67436D24-0D70-48D5-B1AE-6E8DFA978983}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {67436D24-0D70-48D5-B1AE-6E8DFA978983}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {028EEC3D-499E-453C-A1F4-5A4478BBB39F}.Debug|Win32.ActiveCfg = Debug|Win32
+ {028EEC3D-499E-453C-A1F4-5A4478BBB39F}.Debug|Win32.Build.0 = Debug|Win32
+ {028EEC3D-499E-453C-A1F4-5A4478BBB39F}.Debug|x64.ActiveCfg = Debug|x64
+ {028EEC3D-499E-453C-A1F4-5A4478BBB39F}.Debug|x64.Build.0 = Debug|x64
+ {028EEC3D-499E-453C-A1F4-5A4478BBB39F}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {028EEC3D-499E-453C-A1F4-5A4478BBB39F}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {028EEC3D-499E-453C-A1F4-5A4478BBB39F}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {028EEC3D-499E-453C-A1F4-5A4478BBB39F}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {028EEC3D-499E-453C-A1F4-5A4478BBB39F}.Release|Win32.ActiveCfg = Release|Win32
+ {028EEC3D-499E-453C-A1F4-5A4478BBB39F}.Release|Win32.Build.0 = Release|Win32
+ {028EEC3D-499E-453C-A1F4-5A4478BBB39F}.Release|x64.ActiveCfg = Release|x64
+ {028EEC3D-499E-453C-A1F4-5A4478BBB39F}.Release|x64.Build.0 = Release|x64
+ {028EEC3D-499E-453C-A1F4-5A4478BBB39F}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {028EEC3D-499E-453C-A1F4-5A4478BBB39F}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {028EEC3D-499E-453C-A1F4-5A4478BBB39F}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {028EEC3D-499E-453C-A1F4-5A4478BBB39F}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {86F47145-3ABB-45BA-8D51-89C24997882F}.Debug|Win32.ActiveCfg = Debug|Win32
+ {86F47145-3ABB-45BA-8D51-89C24997882F}.Debug|Win32.Build.0 = Debug|Win32
+ {86F47145-3ABB-45BA-8D51-89C24997882F}.Debug|x64.ActiveCfg = Debug|x64
+ {86F47145-3ABB-45BA-8D51-89C24997882F}.Debug|x64.Build.0 = Debug|x64
+ {86F47145-3ABB-45BA-8D51-89C24997882F}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {86F47145-3ABB-45BA-8D51-89C24997882F}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {86F47145-3ABB-45BA-8D51-89C24997882F}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {86F47145-3ABB-45BA-8D51-89C24997882F}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {86F47145-3ABB-45BA-8D51-89C24997882F}.Release|Win32.ActiveCfg = Release|Win32
+ {86F47145-3ABB-45BA-8D51-89C24997882F}.Release|Win32.Build.0 = Release|Win32
+ {86F47145-3ABB-45BA-8D51-89C24997882F}.Release|x64.ActiveCfg = Release|x64
+ {86F47145-3ABB-45BA-8D51-89C24997882F}.Release|x64.Build.0 = Release|x64
+ {86F47145-3ABB-45BA-8D51-89C24997882F}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {86F47145-3ABB-45BA-8D51-89C24997882F}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {86F47145-3ABB-45BA-8D51-89C24997882F}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {86F47145-3ABB-45BA-8D51-89C24997882F}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {7469FFC1-059F-45B2-A9B8-B17CD881CA8D}.Debug|Win32.ActiveCfg = Debug|Win32
+ {7469FFC1-059F-45B2-A9B8-B17CD881CA8D}.Debug|Win32.Build.0 = Debug|Win32
+ {7469FFC1-059F-45B2-A9B8-B17CD881CA8D}.Debug|x64.ActiveCfg = Debug|x64
+ {7469FFC1-059F-45B2-A9B8-B17CD881CA8D}.Debug|x64.Build.0 = Debug|x64
+ {7469FFC1-059F-45B2-A9B8-B17CD881CA8D}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {7469FFC1-059F-45B2-A9B8-B17CD881CA8D}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {7469FFC1-059F-45B2-A9B8-B17CD881CA8D}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {7469FFC1-059F-45B2-A9B8-B17CD881CA8D}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {7469FFC1-059F-45B2-A9B8-B17CD881CA8D}.Release|Win32.ActiveCfg = Release|Win32
+ {7469FFC1-059F-45B2-A9B8-B17CD881CA8D}.Release|Win32.Build.0 = Release|Win32
+ {7469FFC1-059F-45B2-A9B8-B17CD881CA8D}.Release|x64.ActiveCfg = Release|x64
+ {7469FFC1-059F-45B2-A9B8-B17CD881CA8D}.Release|x64.Build.0 = Release|x64
+ {7469FFC1-059F-45B2-A9B8-B17CD881CA8D}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {7469FFC1-059F-45B2-A9B8-B17CD881CA8D}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {7469FFC1-059F-45B2-A9B8-B17CD881CA8D}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {7469FFC1-059F-45B2-A9B8-B17CD881CA8D}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {6266F193-8E41-4543-BB84-4DEA87146A44}.Debug|Win32.ActiveCfg = Debug|Win32
+ {6266F193-8E41-4543-BB84-4DEA87146A44}.Debug|Win32.Build.0 = Debug|Win32
+ {6266F193-8E41-4543-BB84-4DEA87146A44}.Debug|x64.ActiveCfg = Debug|x64
+ {6266F193-8E41-4543-BB84-4DEA87146A44}.Debug|x64.Build.0 = Debug|x64
+ {6266F193-8E41-4543-BB84-4DEA87146A44}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {6266F193-8E41-4543-BB84-4DEA87146A44}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {6266F193-8E41-4543-BB84-4DEA87146A44}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {6266F193-8E41-4543-BB84-4DEA87146A44}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {6266F193-8E41-4543-BB84-4DEA87146A44}.Release|Win32.ActiveCfg = Release|Win32
+ {6266F193-8E41-4543-BB84-4DEA87146A44}.Release|Win32.Build.0 = Release|Win32
+ {6266F193-8E41-4543-BB84-4DEA87146A44}.Release|x64.ActiveCfg = Release|x64
+ {6266F193-8E41-4543-BB84-4DEA87146A44}.Release|x64.Build.0 = Release|x64
+ {6266F193-8E41-4543-BB84-4DEA87146A44}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {6266F193-8E41-4543-BB84-4DEA87146A44}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {6266F193-8E41-4543-BB84-4DEA87146A44}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {6266F193-8E41-4543-BB84-4DEA87146A44}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {2746DC43-68A9-42FE-80F0-1806679538FA}.Debug|Win32.ActiveCfg = Debug|Win32
+ {2746DC43-68A9-42FE-80F0-1806679538FA}.Debug|Win32.Build.0 = Debug|Win32
+ {2746DC43-68A9-42FE-80F0-1806679538FA}.Debug|x64.ActiveCfg = Debug|x64
+ {2746DC43-68A9-42FE-80F0-1806679538FA}.Debug|x64.Build.0 = Debug|x64
+ {2746DC43-68A9-42FE-80F0-1806679538FA}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {2746DC43-68A9-42FE-80F0-1806679538FA}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {2746DC43-68A9-42FE-80F0-1806679538FA}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {2746DC43-68A9-42FE-80F0-1806679538FA}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {2746DC43-68A9-42FE-80F0-1806679538FA}.Release|Win32.ActiveCfg = Release|Win32
+ {2746DC43-68A9-42FE-80F0-1806679538FA}.Release|Win32.Build.0 = Release|Win32
+ {2746DC43-68A9-42FE-80F0-1806679538FA}.Release|x64.ActiveCfg = Release|x64
+ {2746DC43-68A9-42FE-80F0-1806679538FA}.Release|x64.Build.0 = Release|x64
+ {2746DC43-68A9-42FE-80F0-1806679538FA}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {2746DC43-68A9-42FE-80F0-1806679538FA}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {2746DC43-68A9-42FE-80F0-1806679538FA}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {2746DC43-68A9-42FE-80F0-1806679538FA}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {F6DB30E7-94C5-4760-92FA-449884953A9D}.Debug|Win32.ActiveCfg = Debug|Win32
+ {F6DB30E7-94C5-4760-92FA-449884953A9D}.Debug|Win32.Build.0 = Debug|Win32
+ {F6DB30E7-94C5-4760-92FA-449884953A9D}.Debug|x64.ActiveCfg = Debug|x64
+ {F6DB30E7-94C5-4760-92FA-449884953A9D}.Debug|x64.Build.0 = Debug|x64
+ {F6DB30E7-94C5-4760-92FA-449884953A9D}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {F6DB30E7-94C5-4760-92FA-449884953A9D}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {F6DB30E7-94C5-4760-92FA-449884953A9D}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {F6DB30E7-94C5-4760-92FA-449884953A9D}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {F6DB30E7-94C5-4760-92FA-449884953A9D}.Release|Win32.ActiveCfg = Release|Win32
+ {F6DB30E7-94C5-4760-92FA-449884953A9D}.Release|Win32.Build.0 = Release|Win32
+ {F6DB30E7-94C5-4760-92FA-449884953A9D}.Release|x64.ActiveCfg = Release|x64
+ {F6DB30E7-94C5-4760-92FA-449884953A9D}.Release|x64.Build.0 = Release|x64
+ {F6DB30E7-94C5-4760-92FA-449884953A9D}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {F6DB30E7-94C5-4760-92FA-449884953A9D}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {F6DB30E7-94C5-4760-92FA-449884953A9D}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {F6DB30E7-94C5-4760-92FA-449884953A9D}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {8FB57DC4-F98A-4E0D-BDBA-5AB2F7405B58}.Debug|Win32.ActiveCfg = Debug|Win32
+ {8FB57DC4-F98A-4E0D-BDBA-5AB2F7405B58}.Debug|Win32.Build.0 = Debug|Win32
+ {8FB57DC4-F98A-4E0D-BDBA-5AB2F7405B58}.Debug|x64.ActiveCfg = Debug|x64
+ {8FB57DC4-F98A-4E0D-BDBA-5AB2F7405B58}.Debug|x64.Build.0 = Debug|x64
+ {8FB57DC4-F98A-4E0D-BDBA-5AB2F7405B58}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {8FB57DC4-F98A-4E0D-BDBA-5AB2F7405B58}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {8FB57DC4-F98A-4E0D-BDBA-5AB2F7405B58}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {8FB57DC4-F98A-4E0D-BDBA-5AB2F7405B58}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {8FB57DC4-F98A-4E0D-BDBA-5AB2F7405B58}.Release|Win32.ActiveCfg = Release|Win32
+ {8FB57DC4-F98A-4E0D-BDBA-5AB2F7405B58}.Release|Win32.Build.0 = Release|Win32
+ {8FB57DC4-F98A-4E0D-BDBA-5AB2F7405B58}.Release|x64.ActiveCfg = Release|x64
+ {8FB57DC4-F98A-4E0D-BDBA-5AB2F7405B58}.Release|x64.Build.0 = Release|x64
+ {8FB57DC4-F98A-4E0D-BDBA-5AB2F7405B58}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {8FB57DC4-F98A-4E0D-BDBA-5AB2F7405B58}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {8FB57DC4-F98A-4E0D-BDBA-5AB2F7405B58}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {8FB57DC4-F98A-4E0D-BDBA-5AB2F7405B58}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {F8832A8F-9EA0-4DFD-B181-FAA767F3B9AF}.Debug|Win32.ActiveCfg = Debug|Win32
+ {F8832A8F-9EA0-4DFD-B181-FAA767F3B9AF}.Debug|Win32.Build.0 = Debug|Win32
+ {F8832A8F-9EA0-4DFD-B181-FAA767F3B9AF}.Debug|x64.ActiveCfg = Debug|x64
+ {F8832A8F-9EA0-4DFD-B181-FAA767F3B9AF}.Debug|x64.Build.0 = Debug|x64
+ {F8832A8F-9EA0-4DFD-B181-FAA767F3B9AF}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {F8832A8F-9EA0-4DFD-B181-FAA767F3B9AF}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {F8832A8F-9EA0-4DFD-B181-FAA767F3B9AF}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {F8832A8F-9EA0-4DFD-B181-FAA767F3B9AF}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {F8832A8F-9EA0-4DFD-B181-FAA767F3B9AF}.Release|Win32.ActiveCfg = Release|Win32
+ {F8832A8F-9EA0-4DFD-B181-FAA767F3B9AF}.Release|Win32.Build.0 = Release|Win32
+ {F8832A8F-9EA0-4DFD-B181-FAA767F3B9AF}.Release|x64.ActiveCfg = Release|x64
+ {F8832A8F-9EA0-4DFD-B181-FAA767F3B9AF}.Release|x64.Build.0 = Release|x64
+ {F8832A8F-9EA0-4DFD-B181-FAA767F3B9AF}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {F8832A8F-9EA0-4DFD-B181-FAA767F3B9AF}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {F8832A8F-9EA0-4DFD-B181-FAA767F3B9AF}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {F8832A8F-9EA0-4DFD-B181-FAA767F3B9AF}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {2F198E60-4B02-46C3-8FEF-CE86D69E2C59}.Debug|Win32.ActiveCfg = Debug|Win32
+ {2F198E60-4B02-46C3-8FEF-CE86D69E2C59}.Debug|Win32.Build.0 = Debug|Win32
+ {2F198E60-4B02-46C3-8FEF-CE86D69E2C59}.Debug|x64.ActiveCfg = Debug|x64
+ {2F198E60-4B02-46C3-8FEF-CE86D69E2C59}.Debug|x64.Build.0 = Debug|x64
+ {2F198E60-4B02-46C3-8FEF-CE86D69E2C59}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {2F198E60-4B02-46C3-8FEF-CE86D69E2C59}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {2F198E60-4B02-46C3-8FEF-CE86D69E2C59}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {2F198E60-4B02-46C3-8FEF-CE86D69E2C59}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {2F198E60-4B02-46C3-8FEF-CE86D69E2C59}.Release|Win32.ActiveCfg = Release|Win32
+ {2F198E60-4B02-46C3-8FEF-CE86D69E2C59}.Release|Win32.Build.0 = Release|Win32
+ {2F198E60-4B02-46C3-8FEF-CE86D69E2C59}.Release|x64.ActiveCfg = Release|x64
+ {2F198E60-4B02-46C3-8FEF-CE86D69E2C59}.Release|x64.Build.0 = Release|x64
+ {2F198E60-4B02-46C3-8FEF-CE86D69E2C59}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {2F198E60-4B02-46C3-8FEF-CE86D69E2C59}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {2F198E60-4B02-46C3-8FEF-CE86D69E2C59}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {2F198E60-4B02-46C3-8FEF-CE86D69E2C59}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {DEBC32A0-A4F7-4C4C-9E93-62C1C4E6544D}.Debug|Win32.ActiveCfg = Debug|Win32
+ {DEBC32A0-A4F7-4C4C-9E93-62C1C4E6544D}.Debug|Win32.Build.0 = Debug|Win32
+ {DEBC32A0-A4F7-4C4C-9E93-62C1C4E6544D}.Debug|x64.ActiveCfg = Debug|x64
+ {DEBC32A0-A4F7-4C4C-9E93-62C1C4E6544D}.Debug|x64.Build.0 = Debug|x64
+ {DEBC32A0-A4F7-4C4C-9E93-62C1C4E6544D}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {DEBC32A0-A4F7-4C4C-9E93-62C1C4E6544D}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {DEBC32A0-A4F7-4C4C-9E93-62C1C4E6544D}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {DEBC32A0-A4F7-4C4C-9E93-62C1C4E6544D}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {DEBC32A0-A4F7-4C4C-9E93-62C1C4E6544D}.Release|Win32.ActiveCfg = Release|Win32
+ {DEBC32A0-A4F7-4C4C-9E93-62C1C4E6544D}.Release|Win32.Build.0 = Release|Win32
+ {DEBC32A0-A4F7-4C4C-9E93-62C1C4E6544D}.Release|x64.ActiveCfg = Release|x64
+ {DEBC32A0-A4F7-4C4C-9E93-62C1C4E6544D}.Release|x64.Build.0 = Release|x64
+ {DEBC32A0-A4F7-4C4C-9E93-62C1C4E6544D}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {DEBC32A0-A4F7-4C4C-9E93-62C1C4E6544D}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {DEBC32A0-A4F7-4C4C-9E93-62C1C4E6544D}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {DEBC32A0-A4F7-4C4C-9E93-62C1C4E6544D}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {74B970B2-6C7F-4AEE-9031-27CC087D7214}.Debug|Win32.ActiveCfg = Debug|Win32
+ {74B970B2-6C7F-4AEE-9031-27CC087D7214}.Debug|Win32.Build.0 = Debug|Win32
+ {74B970B2-6C7F-4AEE-9031-27CC087D7214}.Debug|x64.ActiveCfg = Debug|x64
+ {74B970B2-6C7F-4AEE-9031-27CC087D7214}.Debug|x64.Build.0 = Debug|x64
+ {74B970B2-6C7F-4AEE-9031-27CC087D7214}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {74B970B2-6C7F-4AEE-9031-27CC087D7214}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {74B970B2-6C7F-4AEE-9031-27CC087D7214}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {74B970B2-6C7F-4AEE-9031-27CC087D7214}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {74B970B2-6C7F-4AEE-9031-27CC087D7214}.Release|Win32.ActiveCfg = Release|Win32
+ {74B970B2-6C7F-4AEE-9031-27CC087D7214}.Release|Win32.Build.0 = Release|Win32
+ {74B970B2-6C7F-4AEE-9031-27CC087D7214}.Release|x64.ActiveCfg = Release|x64
+ {74B970B2-6C7F-4AEE-9031-27CC087D7214}.Release|x64.Build.0 = Release|x64
+ {74B970B2-6C7F-4AEE-9031-27CC087D7214}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {74B970B2-6C7F-4AEE-9031-27CC087D7214}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {74B970B2-6C7F-4AEE-9031-27CC087D7214}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {74B970B2-6C7F-4AEE-9031-27CC087D7214}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {BDDE8ABD-4E45-49DA-B499-131BD6FCABBD}.Debug|Win32.ActiveCfg = Debug|Win32
+ {BDDE8ABD-4E45-49DA-B499-131BD6FCABBD}.Debug|Win32.Build.0 = Debug|Win32
+ {BDDE8ABD-4E45-49DA-B499-131BD6FCABBD}.Debug|x64.ActiveCfg = Debug|x64
+ {BDDE8ABD-4E45-49DA-B499-131BD6FCABBD}.Debug|x64.Build.0 = Debug|x64
+ {BDDE8ABD-4E45-49DA-B499-131BD6FCABBD}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {BDDE8ABD-4E45-49DA-B499-131BD6FCABBD}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {BDDE8ABD-4E45-49DA-B499-131BD6FCABBD}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {BDDE8ABD-4E45-49DA-B499-131BD6FCABBD}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {BDDE8ABD-4E45-49DA-B499-131BD6FCABBD}.Release|Win32.ActiveCfg = Release|Win32
+ {BDDE8ABD-4E45-49DA-B499-131BD6FCABBD}.Release|Win32.Build.0 = Release|Win32
+ {BDDE8ABD-4E45-49DA-B499-131BD6FCABBD}.Release|x64.ActiveCfg = Release|x64
+ {BDDE8ABD-4E45-49DA-B499-131BD6FCABBD}.Release|x64.Build.0 = Release|x64
+ {BDDE8ABD-4E45-49DA-B499-131BD6FCABBD}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {BDDE8ABD-4E45-49DA-B499-131BD6FCABBD}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {BDDE8ABD-4E45-49DA-B499-131BD6FCABBD}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {BDDE8ABD-4E45-49DA-B499-131BD6FCABBD}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {85E82D79-6144-4151-A3E7-8140E9ED01CF}.Debug|Win32.ActiveCfg = Debug|Win32
+ {85E82D79-6144-4151-A3E7-8140E9ED01CF}.Debug|Win32.Build.0 = Debug|Win32
+ {85E82D79-6144-4151-A3E7-8140E9ED01CF}.Debug|x64.ActiveCfg = Debug|x64
+ {85E82D79-6144-4151-A3E7-8140E9ED01CF}.Debug|x64.Build.0 = Debug|x64
+ {85E82D79-6144-4151-A3E7-8140E9ED01CF}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {85E82D79-6144-4151-A3E7-8140E9ED01CF}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {85E82D79-6144-4151-A3E7-8140E9ED01CF}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {85E82D79-6144-4151-A3E7-8140E9ED01CF}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {85E82D79-6144-4151-A3E7-8140E9ED01CF}.Release|Win32.ActiveCfg = Release|Win32
+ {85E82D79-6144-4151-A3E7-8140E9ED01CF}.Release|Win32.Build.0 = Release|Win32
+ {85E82D79-6144-4151-A3E7-8140E9ED01CF}.Release|x64.ActiveCfg = Release|x64
+ {85E82D79-6144-4151-A3E7-8140E9ED01CF}.Release|x64.Build.0 = Release|x64
+ {85E82D79-6144-4151-A3E7-8140E9ED01CF}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {85E82D79-6144-4151-A3E7-8140E9ED01CF}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {85E82D79-6144-4151-A3E7-8140E9ED01CF}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {85E82D79-6144-4151-A3E7-8140E9ED01CF}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {610E62DA-4DD6-479E-8D85-1FB87126D750}.Debug|Win32.ActiveCfg = Debug|Win32
+ {610E62DA-4DD6-479E-8D85-1FB87126D750}.Debug|Win32.Build.0 = Debug|Win32
+ {610E62DA-4DD6-479E-8D85-1FB87126D750}.Debug|x64.ActiveCfg = Debug|x64
+ {610E62DA-4DD6-479E-8D85-1FB87126D750}.Debug|x64.Build.0 = Debug|x64
+ {610E62DA-4DD6-479E-8D85-1FB87126D750}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {610E62DA-4DD6-479E-8D85-1FB87126D750}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {610E62DA-4DD6-479E-8D85-1FB87126D750}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {610E62DA-4DD6-479E-8D85-1FB87126D750}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {610E62DA-4DD6-479E-8D85-1FB87126D750}.Release|Win32.ActiveCfg = Release|Win32
+ {610E62DA-4DD6-479E-8D85-1FB87126D750}.Release|Win32.Build.0 = Release|Win32
+ {610E62DA-4DD6-479E-8D85-1FB87126D750}.Release|x64.ActiveCfg = Release|x64
+ {610E62DA-4DD6-479E-8D85-1FB87126D750}.Release|x64.Build.0 = Release|x64
+ {610E62DA-4DD6-479E-8D85-1FB87126D750}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {610E62DA-4DD6-479E-8D85-1FB87126D750}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {610E62DA-4DD6-479E-8D85-1FB87126D750}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {610E62DA-4DD6-479E-8D85-1FB87126D750}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {2DD94017-2F95-470D-94F5-9F10AD650BDC}.Debug|Win32.ActiveCfg = Debug|Win32
+ {2DD94017-2F95-470D-94F5-9F10AD650BDC}.Debug|Win32.Build.0 = Debug|Win32
+ {2DD94017-2F95-470D-94F5-9F10AD650BDC}.Debug|x64.ActiveCfg = Debug|x64
+ {2DD94017-2F95-470D-94F5-9F10AD650BDC}.Debug|x64.Build.0 = Debug|x64
+ {2DD94017-2F95-470D-94F5-9F10AD650BDC}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {2DD94017-2F95-470D-94F5-9F10AD650BDC}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {2DD94017-2F95-470D-94F5-9F10AD650BDC}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {2DD94017-2F95-470D-94F5-9F10AD650BDC}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {2DD94017-2F95-470D-94F5-9F10AD650BDC}.Release|Win32.ActiveCfg = Release|Win32
+ {2DD94017-2F95-470D-94F5-9F10AD650BDC}.Release|Win32.Build.0 = Release|Win32
+ {2DD94017-2F95-470D-94F5-9F10AD650BDC}.Release|x64.ActiveCfg = Release|x64
+ {2DD94017-2F95-470D-94F5-9F10AD650BDC}.Release|x64.Build.0 = Release|x64
+ {2DD94017-2F95-470D-94F5-9F10AD650BDC}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {2DD94017-2F95-470D-94F5-9F10AD650BDC}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {2DD94017-2F95-470D-94F5-9F10AD650BDC}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {2DD94017-2F95-470D-94F5-9F10AD650BDC}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {7C0D1F06-0B97-49A1-A25D-93D5E7A96786}.Debug|Win32.ActiveCfg = Debug|Win32
+ {7C0D1F06-0B97-49A1-A25D-93D5E7A96786}.Debug|Win32.Build.0 = Debug|Win32
+ {7C0D1F06-0B97-49A1-A25D-93D5E7A96786}.Debug|x64.ActiveCfg = Debug|x64
+ {7C0D1F06-0B97-49A1-A25D-93D5E7A96786}.Debug|x64.Build.0 = Debug|x64
+ {7C0D1F06-0B97-49A1-A25D-93D5E7A96786}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {7C0D1F06-0B97-49A1-A25D-93D5E7A96786}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {7C0D1F06-0B97-49A1-A25D-93D5E7A96786}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {7C0D1F06-0B97-49A1-A25D-93D5E7A96786}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {7C0D1F06-0B97-49A1-A25D-93D5E7A96786}.Release|Win32.ActiveCfg = Release|Win32
+ {7C0D1F06-0B97-49A1-A25D-93D5E7A96786}.Release|Win32.Build.0 = Release|Win32
+ {7C0D1F06-0B97-49A1-A25D-93D5E7A96786}.Release|x64.ActiveCfg = Release|x64
+ {7C0D1F06-0B97-49A1-A25D-93D5E7A96786}.Release|x64.Build.0 = Release|x64
+ {7C0D1F06-0B97-49A1-A25D-93D5E7A96786}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {7C0D1F06-0B97-49A1-A25D-93D5E7A96786}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {7C0D1F06-0B97-49A1-A25D-93D5E7A96786}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {7C0D1F06-0B97-49A1-A25D-93D5E7A96786}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0}.Debug|Win32.ActiveCfg = Debug|Win32
+ {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0}.Debug|Win32.Build.0 = Debug|Win32
+ {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0}.Debug|x64.ActiveCfg = Debug|x64
+ {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0}.Debug|x64.Build.0 = Debug|x64
+ {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0}.Release|Win32.ActiveCfg = Release|Win32
+ {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0}.Release|Win32.Build.0 = Release|Win32
+ {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0}.Release|x64.ActiveCfg = Release|x64
+ {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0}.Release|x64.Build.0 = Release|x64
+ {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {8B58713F-B6F4-4A76-9888-309FDDFB985D}.Debug|Win32.ActiveCfg = Debug|Win32
+ {8B58713F-B6F4-4A76-9888-309FDDFB985D}.Debug|Win32.Build.0 = Debug|Win32
+ {8B58713F-B6F4-4A76-9888-309FDDFB985D}.Debug|x64.ActiveCfg = Debug|x64
+ {8B58713F-B6F4-4A76-9888-309FDDFB985D}.Debug|x64.Build.0 = Debug|x64
+ {8B58713F-B6F4-4A76-9888-309FDDFB985D}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {8B58713F-B6F4-4A76-9888-309FDDFB985D}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {8B58713F-B6F4-4A76-9888-309FDDFB985D}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {8B58713F-B6F4-4A76-9888-309FDDFB985D}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {8B58713F-B6F4-4A76-9888-309FDDFB985D}.Release|Win32.ActiveCfg = Release|Win32
+ {8B58713F-B6F4-4A76-9888-309FDDFB985D}.Release|Win32.Build.0 = Release|Win32
+ {8B58713F-B6F4-4A76-9888-309FDDFB985D}.Release|x64.ActiveCfg = Release|x64
+ {8B58713F-B6F4-4A76-9888-309FDDFB985D}.Release|x64.Build.0 = Release|x64
+ {8B58713F-B6F4-4A76-9888-309FDDFB985D}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {8B58713F-B6F4-4A76-9888-309FDDFB985D}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {8B58713F-B6F4-4A76-9888-309FDDFB985D}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {8B58713F-B6F4-4A76-9888-309FDDFB985D}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937}.Debug|Win32.ActiveCfg = Debug|Win32
+ {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937}.Debug|Win32.Build.0 = Debug|Win32
+ {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937}.Debug|x64.ActiveCfg = Debug|x64
+ {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937}.Debug|x64.Build.0 = Debug|x64
+ {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937}.Release|Win32.ActiveCfg = Release|Win32
+ {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937}.Release|Win32.Build.0 = Release|Win32
+ {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937}.Release|x64.ActiveCfg = Release|x64
+ {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937}.Release|x64.Build.0 = Release|x64
+ {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {19DB0E0E-BB30-4A19-93A8-7B67FBB0C937}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {C2857848-3327-46C6-929C-192629A21F60}.Debug|Win32.ActiveCfg = Debug|Win32
+ {C2857848-3327-46C6-929C-192629A21F60}.Debug|Win32.Build.0 = Debug|Win32
+ {C2857848-3327-46C6-929C-192629A21F60}.Debug|x64.ActiveCfg = Debug|x64
+ {C2857848-3327-46C6-929C-192629A21F60}.Debug|x64.Build.0 = Debug|x64
+ {C2857848-3327-46C6-929C-192629A21F60}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {C2857848-3327-46C6-929C-192629A21F60}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {C2857848-3327-46C6-929C-192629A21F60}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {C2857848-3327-46C6-929C-192629A21F60}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {C2857848-3327-46C6-929C-192629A21F60}.Release|Win32.ActiveCfg = Release|Win32
+ {C2857848-3327-46C6-929C-192629A21F60}.Release|Win32.Build.0 = Release|Win32
+ {C2857848-3327-46C6-929C-192629A21F60}.Release|x64.ActiveCfg = Release|x64
+ {C2857848-3327-46C6-929C-192629A21F60}.Release|x64.Build.0 = Release|x64
+ {C2857848-3327-46C6-929C-192629A21F60}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {C2857848-3327-46C6-929C-192629A21F60}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {C2857848-3327-46C6-929C-192629A21F60}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {C2857848-3327-46C6-929C-192629A21F60}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {759991FD-441C-4267-A364-1BB2236C67B8}.Debug|Win32.ActiveCfg = Debug|Win32
+ {759991FD-441C-4267-A364-1BB2236C67B8}.Debug|Win32.Build.0 = Debug|Win32
+ {759991FD-441C-4267-A364-1BB2236C67B8}.Debug|x64.ActiveCfg = Debug|x64
+ {759991FD-441C-4267-A364-1BB2236C67B8}.Debug|x64.Build.0 = Debug|x64
+ {759991FD-441C-4267-A364-1BB2236C67B8}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {759991FD-441C-4267-A364-1BB2236C67B8}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {759991FD-441C-4267-A364-1BB2236C67B8}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {759991FD-441C-4267-A364-1BB2236C67B8}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {759991FD-441C-4267-A364-1BB2236C67B8}.Release|Win32.ActiveCfg = Release|Win32
+ {759991FD-441C-4267-A364-1BB2236C67B8}.Release|Win32.Build.0 = Release|Win32
+ {759991FD-441C-4267-A364-1BB2236C67B8}.Release|x64.ActiveCfg = Release|x64
+ {759991FD-441C-4267-A364-1BB2236C67B8}.Release|x64.Build.0 = Release|x64
+ {759991FD-441C-4267-A364-1BB2236C67B8}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {759991FD-441C-4267-A364-1BB2236C67B8}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {759991FD-441C-4267-A364-1BB2236C67B8}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {759991FD-441C-4267-A364-1BB2236C67B8}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {14D69C18-0E8E-4816-8CC6-FC22AEA3E1C7}.Debug|Win32.ActiveCfg = Debug|Win32
+ {14D69C18-0E8E-4816-8CC6-FC22AEA3E1C7}.Debug|Win32.Build.0 = Debug|Win32
+ {14D69C18-0E8E-4816-8CC6-FC22AEA3E1C7}.Debug|x64.ActiveCfg = Debug|x64
+ {14D69C18-0E8E-4816-8CC6-FC22AEA3E1C7}.Debug|x64.Build.0 = Debug|x64
+ {14D69C18-0E8E-4816-8CC6-FC22AEA3E1C7}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {14D69C18-0E8E-4816-8CC6-FC22AEA3E1C7}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {14D69C18-0E8E-4816-8CC6-FC22AEA3E1C7}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {14D69C18-0E8E-4816-8CC6-FC22AEA3E1C7}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {14D69C18-0E8E-4816-8CC6-FC22AEA3E1C7}.Release|Win32.ActiveCfg = Release|Win32
+ {14D69C18-0E8E-4816-8CC6-FC22AEA3E1C7}.Release|Win32.Build.0 = Release|Win32
+ {14D69C18-0E8E-4816-8CC6-FC22AEA3E1C7}.Release|x64.ActiveCfg = Release|x64
+ {14D69C18-0E8E-4816-8CC6-FC22AEA3E1C7}.Release|x64.Build.0 = Release|x64
+ {14D69C18-0E8E-4816-8CC6-FC22AEA3E1C7}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {14D69C18-0E8E-4816-8CC6-FC22AEA3E1C7}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {14D69C18-0E8E-4816-8CC6-FC22AEA3E1C7}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {14D69C18-0E8E-4816-8CC6-FC22AEA3E1C7}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {AB9DEE32-64FD-4700-84DF-485166A3E367}.Debug|Win32.ActiveCfg = Debug|Win32
+ {AB9DEE32-64FD-4700-84DF-485166A3E367}.Debug|Win32.Build.0 = Debug|Win32
+ {AB9DEE32-64FD-4700-84DF-485166A3E367}.Debug|x64.ActiveCfg = Debug|x64
+ {AB9DEE32-64FD-4700-84DF-485166A3E367}.Debug|x64.Build.0 = Debug|x64
+ {AB9DEE32-64FD-4700-84DF-485166A3E367}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {AB9DEE32-64FD-4700-84DF-485166A3E367}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {AB9DEE32-64FD-4700-84DF-485166A3E367}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {AB9DEE32-64FD-4700-84DF-485166A3E367}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {AB9DEE32-64FD-4700-84DF-485166A3E367}.Release|Win32.ActiveCfg = Release|Win32
+ {AB9DEE32-64FD-4700-84DF-485166A3E367}.Release|Win32.Build.0 = Release|Win32
+ {AB9DEE32-64FD-4700-84DF-485166A3E367}.Release|x64.ActiveCfg = Release|x64
+ {AB9DEE32-64FD-4700-84DF-485166A3E367}.Release|x64.Build.0 = Release|x64
+ {AB9DEE32-64FD-4700-84DF-485166A3E367}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {AB9DEE32-64FD-4700-84DF-485166A3E367}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {AB9DEE32-64FD-4700-84DF-485166A3E367}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {AB9DEE32-64FD-4700-84DF-485166A3E367}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {C0B91754-0757-42BD-8F53-C05964FFFB66}.Debug|Win32.ActiveCfg = Debug|Win32
+ {C0B91754-0757-42BD-8F53-C05964FFFB66}.Debug|Win32.Build.0 = Debug|Win32
+ {C0B91754-0757-42BD-8F53-C05964FFFB66}.Debug|x64.ActiveCfg = Debug|x64
+ {C0B91754-0757-42BD-8F53-C05964FFFB66}.Debug|x64.Build.0 = Debug|x64
+ {C0B91754-0757-42BD-8F53-C05964FFFB66}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {C0B91754-0757-42BD-8F53-C05964FFFB66}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {C0B91754-0757-42BD-8F53-C05964FFFB66}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {C0B91754-0757-42BD-8F53-C05964FFFB66}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {C0B91754-0757-42BD-8F53-C05964FFFB66}.Release|Win32.ActiveCfg = Release|Win32
+ {C0B91754-0757-42BD-8F53-C05964FFFB66}.Release|Win32.Build.0 = Release|Win32
+ {C0B91754-0757-42BD-8F53-C05964FFFB66}.Release|x64.ActiveCfg = Release|x64
+ {C0B91754-0757-42BD-8F53-C05964FFFB66}.Release|x64.Build.0 = Release|x64
+ {C0B91754-0757-42BD-8F53-C05964FFFB66}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {C0B91754-0757-42BD-8F53-C05964FFFB66}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {C0B91754-0757-42BD-8F53-C05964FFFB66}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {C0B91754-0757-42BD-8F53-C05964FFFB66}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {43337FCD-B171-4441-B44E-D1C90C2700EE}.Debug|Win32.ActiveCfg = Debug|Win32
+ {43337FCD-B171-4441-B44E-D1C90C2700EE}.Debug|Win32.Build.0 = Debug|Win32
+ {43337FCD-B171-4441-B44E-D1C90C2700EE}.Debug|x64.ActiveCfg = Debug|x64
+ {43337FCD-B171-4441-B44E-D1C90C2700EE}.Debug|x64.Build.0 = Debug|x64
+ {43337FCD-B171-4441-B44E-D1C90C2700EE}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {43337FCD-B171-4441-B44E-D1C90C2700EE}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {43337FCD-B171-4441-B44E-D1C90C2700EE}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {43337FCD-B171-4441-B44E-D1C90C2700EE}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {43337FCD-B171-4441-B44E-D1C90C2700EE}.Release|Win32.ActiveCfg = Release|Win32
+ {43337FCD-B171-4441-B44E-D1C90C2700EE}.Release|Win32.Build.0 = Release|Win32
+ {43337FCD-B171-4441-B44E-D1C90C2700EE}.Release|x64.ActiveCfg = Release|x64
+ {43337FCD-B171-4441-B44E-D1C90C2700EE}.Release|x64.Build.0 = Release|x64
+ {43337FCD-B171-4441-B44E-D1C90C2700EE}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {43337FCD-B171-4441-B44E-D1C90C2700EE}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {43337FCD-B171-4441-B44E-D1C90C2700EE}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {43337FCD-B171-4441-B44E-D1C90C2700EE}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {BC50422E-D841-4EDF-B987-5135EC4D8F11}.Debug|Win32.ActiveCfg = Debug|Win32
+ {BC50422E-D841-4EDF-B987-5135EC4D8F11}.Debug|Win32.Build.0 = Debug|Win32
+ {BC50422E-D841-4EDF-B987-5135EC4D8F11}.Debug|x64.ActiveCfg = Debug|x64
+ {BC50422E-D841-4EDF-B987-5135EC4D8F11}.Debug|x64.Build.0 = Debug|x64
+ {BC50422E-D841-4EDF-B987-5135EC4D8F11}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {BC50422E-D841-4EDF-B987-5135EC4D8F11}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {BC50422E-D841-4EDF-B987-5135EC4D8F11}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {BC50422E-D841-4EDF-B987-5135EC4D8F11}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {BC50422E-D841-4EDF-B987-5135EC4D8F11}.Release|Win32.ActiveCfg = Release|Win32
+ {BC50422E-D841-4EDF-B987-5135EC4D8F11}.Release|Win32.Build.0 = Release|Win32
+ {BC50422E-D841-4EDF-B987-5135EC4D8F11}.Release|x64.ActiveCfg = Release|x64
+ {BC50422E-D841-4EDF-B987-5135EC4D8F11}.Release|x64.Build.0 = Release|x64
+ {BC50422E-D841-4EDF-B987-5135EC4D8F11}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {BC50422E-D841-4EDF-B987-5135EC4D8F11}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {BC50422E-D841-4EDF-B987-5135EC4D8F11}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {BC50422E-D841-4EDF-B987-5135EC4D8F11}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {2EDD4E60-025D-4167-B827-9A700DFA6D72}.Debug|Win32.ActiveCfg = Debug|Win32
+ {2EDD4E60-025D-4167-B827-9A700DFA6D72}.Debug|Win32.Build.0 = Debug|Win32
+ {2EDD4E60-025D-4167-B827-9A700DFA6D72}.Debug|x64.ActiveCfg = Debug|x64
+ {2EDD4E60-025D-4167-B827-9A700DFA6D72}.Debug|x64.Build.0 = Debug|x64
+ {2EDD4E60-025D-4167-B827-9A700DFA6D72}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {2EDD4E60-025D-4167-B827-9A700DFA6D72}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {2EDD4E60-025D-4167-B827-9A700DFA6D72}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {2EDD4E60-025D-4167-B827-9A700DFA6D72}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {2EDD4E60-025D-4167-B827-9A700DFA6D72}.Release|Win32.ActiveCfg = Release|Win32
+ {2EDD4E60-025D-4167-B827-9A700DFA6D72}.Release|Win32.Build.0 = Release|Win32
+ {2EDD4E60-025D-4167-B827-9A700DFA6D72}.Release|x64.ActiveCfg = Release|x64
+ {2EDD4E60-025D-4167-B827-9A700DFA6D72}.Release|x64.Build.0 = Release|x64
+ {2EDD4E60-025D-4167-B827-9A700DFA6D72}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {2EDD4E60-025D-4167-B827-9A700DFA6D72}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {2EDD4E60-025D-4167-B827-9A700DFA6D72}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {2EDD4E60-025D-4167-B827-9A700DFA6D72}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {760EA748-5473-48CE-8BE0-76538A0CE1B2}.Debug|Win32.ActiveCfg = Debug|Win32
+ {760EA748-5473-48CE-8BE0-76538A0CE1B2}.Debug|Win32.Build.0 = Debug|Win32
+ {760EA748-5473-48CE-8BE0-76538A0CE1B2}.Debug|x64.ActiveCfg = Debug|x64
+ {760EA748-5473-48CE-8BE0-76538A0CE1B2}.Debug|x64.Build.0 = Debug|x64
+ {760EA748-5473-48CE-8BE0-76538A0CE1B2}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {760EA748-5473-48CE-8BE0-76538A0CE1B2}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {760EA748-5473-48CE-8BE0-76538A0CE1B2}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {760EA748-5473-48CE-8BE0-76538A0CE1B2}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {760EA748-5473-48CE-8BE0-76538A0CE1B2}.Release|Win32.ActiveCfg = Release|Win32
+ {760EA748-5473-48CE-8BE0-76538A0CE1B2}.Release|Win32.Build.0 = Release|Win32
+ {760EA748-5473-48CE-8BE0-76538A0CE1B2}.Release|x64.ActiveCfg = Release|x64
+ {760EA748-5473-48CE-8BE0-76538A0CE1B2}.Release|x64.Build.0 = Release|x64
+ {760EA748-5473-48CE-8BE0-76538A0CE1B2}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {760EA748-5473-48CE-8BE0-76538A0CE1B2}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {760EA748-5473-48CE-8BE0-76538A0CE1B2}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {760EA748-5473-48CE-8BE0-76538A0CE1B2}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {9218C976-8194-4AD4-BC5C-7CBC456C2475}.Debug|Win32.ActiveCfg = Debug|Win32
+ {9218C976-8194-4AD4-BC5C-7CBC456C2475}.Debug|Win32.Build.0 = Debug|Win32
+ {9218C976-8194-4AD4-BC5C-7CBC456C2475}.Debug|x64.ActiveCfg = Debug|x64
+ {9218C976-8194-4AD4-BC5C-7CBC456C2475}.Debug|x64.Build.0 = Debug|x64
+ {9218C976-8194-4AD4-BC5C-7CBC456C2475}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {9218C976-8194-4AD4-BC5C-7CBC456C2475}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {9218C976-8194-4AD4-BC5C-7CBC456C2475}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {9218C976-8194-4AD4-BC5C-7CBC456C2475}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {9218C976-8194-4AD4-BC5C-7CBC456C2475}.Release|Win32.ActiveCfg = Release|Win32
+ {9218C976-8194-4AD4-BC5C-7CBC456C2475}.Release|Win32.Build.0 = Release|Win32
+ {9218C976-8194-4AD4-BC5C-7CBC456C2475}.Release|x64.ActiveCfg = Release|x64
+ {9218C976-8194-4AD4-BC5C-7CBC456C2475}.Release|x64.Build.0 = Release|x64
+ {9218C976-8194-4AD4-BC5C-7CBC456C2475}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {9218C976-8194-4AD4-BC5C-7CBC456C2475}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {9218C976-8194-4AD4-BC5C-7CBC456C2475}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {9218C976-8194-4AD4-BC5C-7CBC456C2475}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {167BDE33-267C-49EE-9AC5-6177D283D799}.Debug|Win32.ActiveCfg = Debug|Win32
+ {167BDE33-267C-49EE-9AC5-6177D283D799}.Debug|Win32.Build.0 = Debug|Win32
+ {167BDE33-267C-49EE-9AC5-6177D283D799}.Debug|x64.ActiveCfg = Debug|x64
+ {167BDE33-267C-49EE-9AC5-6177D283D799}.Debug|x64.Build.0 = Debug|x64
+ {167BDE33-267C-49EE-9AC5-6177D283D799}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {167BDE33-267C-49EE-9AC5-6177D283D799}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {167BDE33-267C-49EE-9AC5-6177D283D799}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {167BDE33-267C-49EE-9AC5-6177D283D799}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {167BDE33-267C-49EE-9AC5-6177D283D799}.Release|Win32.ActiveCfg = Release|Win32
+ {167BDE33-267C-49EE-9AC5-6177D283D799}.Release|Win32.Build.0 = Release|Win32
+ {167BDE33-267C-49EE-9AC5-6177D283D799}.Release|x64.ActiveCfg = Release|x64
+ {167BDE33-267C-49EE-9AC5-6177D283D799}.Release|x64.Build.0 = Release|x64
+ {167BDE33-267C-49EE-9AC5-6177D283D799}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {167BDE33-267C-49EE-9AC5-6177D283D799}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {167BDE33-267C-49EE-9AC5-6177D283D799}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {167BDE33-267C-49EE-9AC5-6177D283D799}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {087A2516-3C90-4D46-AEA9-670592894CB4}.Debug|Win32.ActiveCfg = Debug|Win32
+ {087A2516-3C90-4D46-AEA9-670592894CB4}.Debug|Win32.Build.0 = Debug|Win32
+ {087A2516-3C90-4D46-AEA9-670592894CB4}.Debug|x64.ActiveCfg = Debug|x64
+ {087A2516-3C90-4D46-AEA9-670592894CB4}.Debug|x64.Build.0 = Debug|x64
+ {087A2516-3C90-4D46-AEA9-670592894CB4}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {087A2516-3C90-4D46-AEA9-670592894CB4}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {087A2516-3C90-4D46-AEA9-670592894CB4}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {087A2516-3C90-4D46-AEA9-670592894CB4}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {087A2516-3C90-4D46-AEA9-670592894CB4}.Release|Win32.ActiveCfg = Release|Win32
+ {087A2516-3C90-4D46-AEA9-670592894CB4}.Release|Win32.Build.0 = Release|Win32
+ {087A2516-3C90-4D46-AEA9-670592894CB4}.Release|x64.ActiveCfg = Release|x64
+ {087A2516-3C90-4D46-AEA9-670592894CB4}.Release|x64.Build.0 = Release|x64
+ {087A2516-3C90-4D46-AEA9-670592894CB4}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {087A2516-3C90-4D46-AEA9-670592894CB4}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {087A2516-3C90-4D46-AEA9-670592894CB4}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {087A2516-3C90-4D46-AEA9-670592894CB4}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {3B976840-4F3F-46A9-832D-4AB79417F712}.Debug|Win32.ActiveCfg = Debug|Win32
+ {3B976840-4F3F-46A9-832D-4AB79417F712}.Debug|Win32.Build.0 = Debug|Win32
+ {3B976840-4F3F-46A9-832D-4AB79417F712}.Debug|x64.ActiveCfg = Debug|x64
+ {3B976840-4F3F-46A9-832D-4AB79417F712}.Debug|x64.Build.0 = Debug|x64
+ {3B976840-4F3F-46A9-832D-4AB79417F712}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {3B976840-4F3F-46A9-832D-4AB79417F712}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {3B976840-4F3F-46A9-832D-4AB79417F712}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {3B976840-4F3F-46A9-832D-4AB79417F712}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {3B976840-4F3F-46A9-832D-4AB79417F712}.Release|Win32.ActiveCfg = Release|Win32
+ {3B976840-4F3F-46A9-832D-4AB79417F712}.Release|Win32.Build.0 = Release|Win32
+ {3B976840-4F3F-46A9-832D-4AB79417F712}.Release|x64.ActiveCfg = Release|x64
+ {3B976840-4F3F-46A9-832D-4AB79417F712}.Release|x64.Build.0 = Release|x64
+ {3B976840-4F3F-46A9-832D-4AB79417F712}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {3B976840-4F3F-46A9-832D-4AB79417F712}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {3B976840-4F3F-46A9-832D-4AB79417F712}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {3B976840-4F3F-46A9-832D-4AB79417F712}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {F171E3D9-FC0B-4404-B96F-AD98C055CD8B}.Debug|Win32.ActiveCfg = Debug|Win32
+ {F171E3D9-FC0B-4404-B96F-AD98C055CD8B}.Debug|Win32.Build.0 = Debug|Win32
+ {F171E3D9-FC0B-4404-B96F-AD98C055CD8B}.Debug|x64.ActiveCfg = Debug|x64
+ {F171E3D9-FC0B-4404-B96F-AD98C055CD8B}.Debug|x64.Build.0 = Debug|x64
+ {F171E3D9-FC0B-4404-B96F-AD98C055CD8B}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {F171E3D9-FC0B-4404-B96F-AD98C055CD8B}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {F171E3D9-FC0B-4404-B96F-AD98C055CD8B}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {F171E3D9-FC0B-4404-B96F-AD98C055CD8B}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {F171E3D9-FC0B-4404-B96F-AD98C055CD8B}.Release|Win32.ActiveCfg = Release|Win32
+ {F171E3D9-FC0B-4404-B96F-AD98C055CD8B}.Release|Win32.Build.0 = Release|Win32
+ {F171E3D9-FC0B-4404-B96F-AD98C055CD8B}.Release|x64.ActiveCfg = Release|x64
+ {F171E3D9-FC0B-4404-B96F-AD98C055CD8B}.Release|x64.Build.0 = Release|x64
+ {F171E3D9-FC0B-4404-B96F-AD98C055CD8B}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {F171E3D9-FC0B-4404-B96F-AD98C055CD8B}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {F171E3D9-FC0B-4404-B96F-AD98C055CD8B}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {F171E3D9-FC0B-4404-B96F-AD98C055CD8B}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {862D2BCD-67ED-4398-A811-7E247C2029E5}.Debug|Win32.ActiveCfg = Debug|Win32
+ {862D2BCD-67ED-4398-A811-7E247C2029E5}.Debug|Win32.Build.0 = Debug|Win32
+ {862D2BCD-67ED-4398-A811-7E247C2029E5}.Debug|x64.ActiveCfg = Debug|x64
+ {862D2BCD-67ED-4398-A811-7E247C2029E5}.Debug|x64.Build.0 = Debug|x64
+ {862D2BCD-67ED-4398-A811-7E247C2029E5}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {862D2BCD-67ED-4398-A811-7E247C2029E5}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {862D2BCD-67ED-4398-A811-7E247C2029E5}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {862D2BCD-67ED-4398-A811-7E247C2029E5}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {862D2BCD-67ED-4398-A811-7E247C2029E5}.Release|Win32.ActiveCfg = Release|Win32
+ {862D2BCD-67ED-4398-A811-7E247C2029E5}.Release|Win32.Build.0 = Release|Win32
+ {862D2BCD-67ED-4398-A811-7E247C2029E5}.Release|x64.ActiveCfg = Release|x64
+ {862D2BCD-67ED-4398-A811-7E247C2029E5}.Release|x64.Build.0 = Release|x64
+ {862D2BCD-67ED-4398-A811-7E247C2029E5}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {862D2BCD-67ED-4398-A811-7E247C2029E5}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {862D2BCD-67ED-4398-A811-7E247C2029E5}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {862D2BCD-67ED-4398-A811-7E247C2029E5}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {DD51F357-26FE-46F2-9AC9-5B682DBC198C}.Debug|Win32.ActiveCfg = Debug|Win32
+ {DD51F357-26FE-46F2-9AC9-5B682DBC198C}.Debug|Win32.Build.0 = Debug|Win32
+ {DD51F357-26FE-46F2-9AC9-5B682DBC198C}.Debug|x64.ActiveCfg = Debug|x64
+ {DD51F357-26FE-46F2-9AC9-5B682DBC198C}.Debug|x64.Build.0 = Debug|x64
+ {DD51F357-26FE-46F2-9AC9-5B682DBC198C}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {DD51F357-26FE-46F2-9AC9-5B682DBC198C}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {DD51F357-26FE-46F2-9AC9-5B682DBC198C}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {DD51F357-26FE-46F2-9AC9-5B682DBC198C}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {DD51F357-26FE-46F2-9AC9-5B682DBC198C}.Release|Win32.ActiveCfg = Release|Win32
+ {DD51F357-26FE-46F2-9AC9-5B682DBC198C}.Release|Win32.Build.0 = Release|Win32
+ {DD51F357-26FE-46F2-9AC9-5B682DBC198C}.Release|x64.ActiveCfg = Release|x64
+ {DD51F357-26FE-46F2-9AC9-5B682DBC198C}.Release|x64.Build.0 = Release|x64
+ {DD51F357-26FE-46F2-9AC9-5B682DBC198C}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {DD51F357-26FE-46F2-9AC9-5B682DBC198C}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {DD51F357-26FE-46F2-9AC9-5B682DBC198C}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {DD51F357-26FE-46F2-9AC9-5B682DBC198C}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {6F8036D0-9AEE-4B60-A65A-5A51A9D8725F}.Debug|Win32.ActiveCfg = Debug|Win32
+ {6F8036D0-9AEE-4B60-A65A-5A51A9D8725F}.Debug|Win32.Build.0 = Debug|Win32
+ {6F8036D0-9AEE-4B60-A65A-5A51A9D8725F}.Debug|x64.ActiveCfg = Debug|x64
+ {6F8036D0-9AEE-4B60-A65A-5A51A9D8725F}.Debug|x64.Build.0 = Debug|x64
+ {6F8036D0-9AEE-4B60-A65A-5A51A9D8725F}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {6F8036D0-9AEE-4B60-A65A-5A51A9D8725F}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {6F8036D0-9AEE-4B60-A65A-5A51A9D8725F}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {6F8036D0-9AEE-4B60-A65A-5A51A9D8725F}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {6F8036D0-9AEE-4B60-A65A-5A51A9D8725F}.Release|Win32.ActiveCfg = Release|Win32
+ {6F8036D0-9AEE-4B60-A65A-5A51A9D8725F}.Release|Win32.Build.0 = Release|Win32
+ {6F8036D0-9AEE-4B60-A65A-5A51A9D8725F}.Release|x64.ActiveCfg = Release|x64
+ {6F8036D0-9AEE-4B60-A65A-5A51A9D8725F}.Release|x64.Build.0 = Release|x64
+ {6F8036D0-9AEE-4B60-A65A-5A51A9D8725F}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {6F8036D0-9AEE-4B60-A65A-5A51A9D8725F}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {6F8036D0-9AEE-4B60-A65A-5A51A9D8725F}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {6F8036D0-9AEE-4B60-A65A-5A51A9D8725F}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {E459338E-39A8-49C9-9DFC-612E47863CE3}.Debug|Win32.ActiveCfg = Debug|Win32
+ {E459338E-39A8-49C9-9DFC-612E47863CE3}.Debug|Win32.Build.0 = Debug|Win32
+ {E459338E-39A8-49C9-9DFC-612E47863CE3}.Debug|x64.ActiveCfg = Debug|x64
+ {E459338E-39A8-49C9-9DFC-612E47863CE3}.Debug|x64.Build.0 = Debug|x64
+ {E459338E-39A8-49C9-9DFC-612E47863CE3}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {E459338E-39A8-49C9-9DFC-612E47863CE3}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {E459338E-39A8-49C9-9DFC-612E47863CE3}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {E459338E-39A8-49C9-9DFC-612E47863CE3}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {E459338E-39A8-49C9-9DFC-612E47863CE3}.Release|Win32.ActiveCfg = Release|Win32
+ {E459338E-39A8-49C9-9DFC-612E47863CE3}.Release|Win32.Build.0 = Release|Win32
+ {E459338E-39A8-49C9-9DFC-612E47863CE3}.Release|x64.ActiveCfg = Release|x64
+ {E459338E-39A8-49C9-9DFC-612E47863CE3}.Release|x64.Build.0 = Release|x64
+ {E459338E-39A8-49C9-9DFC-612E47863CE3}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {E459338E-39A8-49C9-9DFC-612E47863CE3}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {E459338E-39A8-49C9-9DFC-612E47863CE3}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {E459338E-39A8-49C9-9DFC-612E47863CE3}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {7719A61E-FAE1-4564-AD24-416318E48967}.Debug|Win32.ActiveCfg = Debug|Win32
+ {7719A61E-FAE1-4564-AD24-416318E48967}.Debug|Win32.Build.0 = Debug|Win32
+ {7719A61E-FAE1-4564-AD24-416318E48967}.Debug|x64.ActiveCfg = Debug|x64
+ {7719A61E-FAE1-4564-AD24-416318E48967}.Debug|x64.Build.0 = Debug|x64
+ {7719A61E-FAE1-4564-AD24-416318E48967}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {7719A61E-FAE1-4564-AD24-416318E48967}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {7719A61E-FAE1-4564-AD24-416318E48967}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {7719A61E-FAE1-4564-AD24-416318E48967}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {7719A61E-FAE1-4564-AD24-416318E48967}.Release|Win32.ActiveCfg = Release|Win32
+ {7719A61E-FAE1-4564-AD24-416318E48967}.Release|Win32.Build.0 = Release|Win32
+ {7719A61E-FAE1-4564-AD24-416318E48967}.Release|x64.ActiveCfg = Release|x64
+ {7719A61E-FAE1-4564-AD24-416318E48967}.Release|x64.Build.0 = Release|x64
+ {7719A61E-FAE1-4564-AD24-416318E48967}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {7719A61E-FAE1-4564-AD24-416318E48967}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {7719A61E-FAE1-4564-AD24-416318E48967}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {7719A61E-FAE1-4564-AD24-416318E48967}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {E6CE793E-7882-4E77-9D26-22C950DE0AFE}.Debug|Win32.ActiveCfg = Debug|Win32
+ {E6CE793E-7882-4E77-9D26-22C950DE0AFE}.Debug|Win32.Build.0 = Debug|Win32
+ {E6CE793E-7882-4E77-9D26-22C950DE0AFE}.Debug|x64.ActiveCfg = Debug|x64
+ {E6CE793E-7882-4E77-9D26-22C950DE0AFE}.Debug|x64.Build.0 = Debug|x64
+ {E6CE793E-7882-4E77-9D26-22C950DE0AFE}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {E6CE793E-7882-4E77-9D26-22C950DE0AFE}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {E6CE793E-7882-4E77-9D26-22C950DE0AFE}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {E6CE793E-7882-4E77-9D26-22C950DE0AFE}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {E6CE793E-7882-4E77-9D26-22C950DE0AFE}.Release|Win32.ActiveCfg = Release|Win32
+ {E6CE793E-7882-4E77-9D26-22C950DE0AFE}.Release|Win32.Build.0 = Release|Win32
+ {E6CE793E-7882-4E77-9D26-22C950DE0AFE}.Release|x64.ActiveCfg = Release|x64
+ {E6CE793E-7882-4E77-9D26-22C950DE0AFE}.Release|x64.Build.0 = Release|x64
+ {E6CE793E-7882-4E77-9D26-22C950DE0AFE}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {E6CE793E-7882-4E77-9D26-22C950DE0AFE}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {E6CE793E-7882-4E77-9D26-22C950DE0AFE}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {E6CE793E-7882-4E77-9D26-22C950DE0AFE}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {9AAE2D3F-4D37-43B6-96EB-593DE7679811}.Debug|Win32.ActiveCfg = Debug|Win32
+ {9AAE2D3F-4D37-43B6-96EB-593DE7679811}.Debug|Win32.Build.0 = Debug|Win32
+ {9AAE2D3F-4D37-43B6-96EB-593DE7679811}.Debug|x64.ActiveCfg = Debug|x64
+ {9AAE2D3F-4D37-43B6-96EB-593DE7679811}.Debug|x64.Build.0 = Debug|x64
+ {9AAE2D3F-4D37-43B6-96EB-593DE7679811}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {9AAE2D3F-4D37-43B6-96EB-593DE7679811}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {9AAE2D3F-4D37-43B6-96EB-593DE7679811}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {9AAE2D3F-4D37-43B6-96EB-593DE7679811}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {9AAE2D3F-4D37-43B6-96EB-593DE7679811}.Release|Win32.ActiveCfg = Release|Win32
+ {9AAE2D3F-4D37-43B6-96EB-593DE7679811}.Release|Win32.Build.0 = Release|Win32
+ {9AAE2D3F-4D37-43B6-96EB-593DE7679811}.Release|x64.ActiveCfg = Release|x64
+ {9AAE2D3F-4D37-43B6-96EB-593DE7679811}.Release|x64.Build.0 = Release|x64
+ {9AAE2D3F-4D37-43B6-96EB-593DE7679811}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {9AAE2D3F-4D37-43B6-96EB-593DE7679811}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {9AAE2D3F-4D37-43B6-96EB-593DE7679811}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {9AAE2D3F-4D37-43B6-96EB-593DE7679811}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {B6875C47-6809-4972-A89D-0085058670C9}.Debug|Win32.ActiveCfg = Debug|Win32
+ {B6875C47-6809-4972-A89D-0085058670C9}.Debug|Win32.Build.0 = Debug|Win32
+ {B6875C47-6809-4972-A89D-0085058670C9}.Debug|x64.ActiveCfg = Debug|x64
+ {B6875C47-6809-4972-A89D-0085058670C9}.Debug|x64.Build.0 = Debug|x64
+ {B6875C47-6809-4972-A89D-0085058670C9}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {B6875C47-6809-4972-A89D-0085058670C9}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {B6875C47-6809-4972-A89D-0085058670C9}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {B6875C47-6809-4972-A89D-0085058670C9}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {B6875C47-6809-4972-A89D-0085058670C9}.Release|Win32.ActiveCfg = Release|Win32
+ {B6875C47-6809-4972-A89D-0085058670C9}.Release|Win32.Build.0 = Release|Win32
+ {B6875C47-6809-4972-A89D-0085058670C9}.Release|x64.ActiveCfg = Release|x64
+ {B6875C47-6809-4972-A89D-0085058670C9}.Release|x64.Build.0 = Release|x64
+ {B6875C47-6809-4972-A89D-0085058670C9}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {B6875C47-6809-4972-A89D-0085058670C9}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {B6875C47-6809-4972-A89D-0085058670C9}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {B6875C47-6809-4972-A89D-0085058670C9}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {A0F67E98-8A07-4319-A3E8-B983D522D8CA}.Debug|Win32.ActiveCfg = Debug|Win32
+ {A0F67E98-8A07-4319-A3E8-B983D522D8CA}.Debug|Win32.Build.0 = Debug|Win32
+ {A0F67E98-8A07-4319-A3E8-B983D522D8CA}.Debug|x64.ActiveCfg = Debug|x64
+ {A0F67E98-8A07-4319-A3E8-B983D522D8CA}.Debug|x64.Build.0 = Debug|x64
+ {A0F67E98-8A07-4319-A3E8-B983D522D8CA}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {A0F67E98-8A07-4319-A3E8-B983D522D8CA}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {A0F67E98-8A07-4319-A3E8-B983D522D8CA}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {A0F67E98-8A07-4319-A3E8-B983D522D8CA}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {A0F67E98-8A07-4319-A3E8-B983D522D8CA}.Release|Win32.ActiveCfg = Release|Win32
+ {A0F67E98-8A07-4319-A3E8-B983D522D8CA}.Release|Win32.Build.0 = Release|Win32
+ {A0F67E98-8A07-4319-A3E8-B983D522D8CA}.Release|x64.ActiveCfg = Release|x64
+ {A0F67E98-8A07-4319-A3E8-B983D522D8CA}.Release|x64.Build.0 = Release|x64
+ {A0F67E98-8A07-4319-A3E8-B983D522D8CA}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {A0F67E98-8A07-4319-A3E8-B983D522D8CA}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {A0F67E98-8A07-4319-A3E8-B983D522D8CA}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {A0F67E98-8A07-4319-A3E8-B983D522D8CA}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {DE96F5AB-AC39-44FF-9BAB-36805FE07A86}.Debug|Win32.ActiveCfg = Debug|Win32
+ {DE96F5AB-AC39-44FF-9BAB-36805FE07A86}.Debug|Win32.Build.0 = Debug|Win32
+ {DE96F5AB-AC39-44FF-9BAB-36805FE07A86}.Debug|x64.ActiveCfg = Debug|x64
+ {DE96F5AB-AC39-44FF-9BAB-36805FE07A86}.Debug|x64.Build.0 = Debug|x64
+ {DE96F5AB-AC39-44FF-9BAB-36805FE07A86}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {DE96F5AB-AC39-44FF-9BAB-36805FE07A86}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {DE96F5AB-AC39-44FF-9BAB-36805FE07A86}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {DE96F5AB-AC39-44FF-9BAB-36805FE07A86}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {DE96F5AB-AC39-44FF-9BAB-36805FE07A86}.Release|Win32.ActiveCfg = Release|Win32
+ {DE96F5AB-AC39-44FF-9BAB-36805FE07A86}.Release|Win32.Build.0 = Release|Win32
+ {DE96F5AB-AC39-44FF-9BAB-36805FE07A86}.Release|x64.ActiveCfg = Release|x64
+ {DE96F5AB-AC39-44FF-9BAB-36805FE07A86}.Release|x64.Build.0 = Release|x64
+ {DE96F5AB-AC39-44FF-9BAB-36805FE07A86}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {DE96F5AB-AC39-44FF-9BAB-36805FE07A86}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {DE96F5AB-AC39-44FF-9BAB-36805FE07A86}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {DE96F5AB-AC39-44FF-9BAB-36805FE07A86}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {25806259-F586-4AAC-BDD1-50C1B227147D}.Debug|Win32.ActiveCfg = Debug|Win32
+ {25806259-F586-4AAC-BDD1-50C1B227147D}.Debug|Win32.Build.0 = Debug|Win32
+ {25806259-F586-4AAC-BDD1-50C1B227147D}.Debug|x64.ActiveCfg = Debug|x64
+ {25806259-F586-4AAC-BDD1-50C1B227147D}.Debug|x64.Build.0 = Debug|x64
+ {25806259-F586-4AAC-BDD1-50C1B227147D}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {25806259-F586-4AAC-BDD1-50C1B227147D}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {25806259-F586-4AAC-BDD1-50C1B227147D}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {25806259-F586-4AAC-BDD1-50C1B227147D}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {25806259-F586-4AAC-BDD1-50C1B227147D}.Release|Win32.ActiveCfg = Release|Win32
+ {25806259-F586-4AAC-BDD1-50C1B227147D}.Release|Win32.Build.0 = Release|Win32
+ {25806259-F586-4AAC-BDD1-50C1B227147D}.Release|x64.ActiveCfg = Release|x64
+ {25806259-F586-4AAC-BDD1-50C1B227147D}.Release|x64.Build.0 = Release|x64
+ {25806259-F586-4AAC-BDD1-50C1B227147D}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {25806259-F586-4AAC-BDD1-50C1B227147D}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {25806259-F586-4AAC-BDD1-50C1B227147D}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {25806259-F586-4AAC-BDD1-50C1B227147D}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {E2180D54-5F75-47B7-8D77-00D04A6BEF69}.Debug|Win32.ActiveCfg = Debug|Win32
+ {E2180D54-5F75-47B7-8D77-00D04A6BEF69}.Debug|Win32.Build.0 = Debug|Win32
+ {E2180D54-5F75-47B7-8D77-00D04A6BEF69}.Debug|x64.ActiveCfg = Debug|x64
+ {E2180D54-5F75-47B7-8D77-00D04A6BEF69}.Debug|x64.Build.0 = Debug|x64
+ {E2180D54-5F75-47B7-8D77-00D04A6BEF69}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {E2180D54-5F75-47B7-8D77-00D04A6BEF69}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {E2180D54-5F75-47B7-8D77-00D04A6BEF69}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {E2180D54-5F75-47B7-8D77-00D04A6BEF69}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {E2180D54-5F75-47B7-8D77-00D04A6BEF69}.Release|Win32.ActiveCfg = Release|Win32
+ {E2180D54-5F75-47B7-8D77-00D04A6BEF69}.Release|Win32.Build.0 = Release|Win32
+ {E2180D54-5F75-47B7-8D77-00D04A6BEF69}.Release|x64.ActiveCfg = Release|x64
+ {E2180D54-5F75-47B7-8D77-00D04A6BEF69}.Release|x64.Build.0 = Release|x64
+ {E2180D54-5F75-47B7-8D77-00D04A6BEF69}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {E2180D54-5F75-47B7-8D77-00D04A6BEF69}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {E2180D54-5F75-47B7-8D77-00D04A6BEF69}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {E2180D54-5F75-47B7-8D77-00D04A6BEF69}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
+ {A9561C14-6DAF-4A28-9F59-297D39432D0B}.Debug|Win32.ActiveCfg = Debug|Win32
+ {A9561C14-6DAF-4A28-9F59-297D39432D0B}.Debug|Win32.Build.0 = Debug|Win32
+ {A9561C14-6DAF-4A28-9F59-297D39432D0B}.Debug|x64.ActiveCfg = Debug|x64
+ {A9561C14-6DAF-4A28-9F59-297D39432D0B}.Debug|x64.Build.0 = Debug|x64
+ {A9561C14-6DAF-4A28-9F59-297D39432D0B}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32
+ {A9561C14-6DAF-4A28-9F59-297D39432D0B}.DebugDLL|Win32.Build.0 = DebugDLL|Win32
+ {A9561C14-6DAF-4A28-9F59-297D39432D0B}.DebugDLL|x64.ActiveCfg = DebugDLL|x64
+ {A9561C14-6DAF-4A28-9F59-297D39432D0B}.DebugDLL|x64.Build.0 = DebugDLL|x64
+ {A9561C14-6DAF-4A28-9F59-297D39432D0B}.Release|Win32.ActiveCfg = Release|Win32
+ {A9561C14-6DAF-4A28-9F59-297D39432D0B}.Release|Win32.Build.0 = Release|Win32
+ {A9561C14-6DAF-4A28-9F59-297D39432D0B}.Release|x64.ActiveCfg = Release|x64
+ {A9561C14-6DAF-4A28-9F59-297D39432D0B}.Release|x64.Build.0 = Release|x64
+ {A9561C14-6DAF-4A28-9F59-297D39432D0B}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32
+ {A9561C14-6DAF-4A28-9F59-297D39432D0B}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32
+ {A9561C14-6DAF-4A28-9F59-297D39432D0B}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64
+ {A9561C14-6DAF-4A28-9F59-297D39432D0B}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/make/msvc800_prj/network/blast3/blastcl3/exe_blastcl3.vcproj b/make/msvc800_prj/network/blast3/blastcl3/exe_blastcl3.vcproj
index a819dd24..83ba8601 100644
--- a/make/msvc800_prj/network/blast3/blastcl3/exe_blastcl3.vcproj
+++ b/make/msvc800_prj/network/blast3/blastcl3/exe_blastcl3.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="exe_blastcl3"
- ProjectGUID="{74C9A79B-EAE3-46B3-848E-73C3B5F679B9}"
+ ProjectGUID="{0516C2CE-F3B1-476B-AECC-9E2A02D40D8D}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/network/blast3/netblast/netblast.vcproj b/make/msvc800_prj/network/blast3/netblast/netblast.vcproj
index 2d1f6a06..b0a6e77f 100644
--- a/make/msvc800_prj/network/blast3/netblast/netblast.vcproj
+++ b/make/msvc800_prj/network/blast3/netblast/netblast.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="netblast"
- ProjectGUID="{45CF24A4-E238-4E5C-BACC-5F0D6556A8EC}"
+ ProjectGUID="{759991FD-441C-4267-A364-1BB2236C67B8}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/network/entrez/client/netentr.vcproj b/make/msvc800_prj/network/entrez/client/netentr.vcproj
index 0025b09d..79be0b8b 100644
--- a/make/msvc800_prj/network/entrez/client/netentr.vcproj
+++ b/make/msvc800_prj/network/entrez/client/netentr.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="netentr"
- ProjectGUID="{E2B932C9-4C8A-4922-9DFF-9FB646184223}"
+ ProjectGUID="{AB9DEE32-64FD-4700-84DF-485166A3E367}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/network/id1arch/ncbiid1.vcproj b/make/msvc800_prj/network/id1arch/ncbiid1.vcproj
index 4bb1b158..f6994c4b 100644
--- a/make/msvc800_prj/network/id1arch/ncbiid1.vcproj
+++ b/make/msvc800_prj/network/id1arch/ncbiid1.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="ncbiid1"
- ProjectGUID="{707F859C-FE05-486E-BB82-A447A6CD5036}"
+ ProjectGUID="{85E82D79-6144-4151-A3E7-8140E9ED01CF}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/network/idfetch/exe_idfetch.vcproj b/make/msvc800_prj/network/idfetch/exe_idfetch.vcproj
index b0ad2c6c..69fc407f 100644
--- a/make/msvc800_prj/network/idfetch/exe_idfetch.vcproj
+++ b/make/msvc800_prj/network/idfetch/exe_idfetch.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="exe_idfetch"
- ProjectGUID="{BB120D1D-3A68-4107-A8A1-427E448DEA98}"
+ ProjectGUID="{67436D24-0D70-48D5-B1AE-6E8DFA978983}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/network/medarch/client/medarch.vcproj b/make/msvc800_prj/network/medarch/client/medarch.vcproj
index 4f84b498..727f002c 100644
--- a/make/msvc800_prj/network/medarch/client/medarch.vcproj
+++ b/make/msvc800_prj/network/medarch/client/medarch.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="medarch"
- ProjectGUID="{4502FEB5-256A-4E4E-A8EF-34F7C7FC09DB}"
+ ProjectGUID="{2746DC43-68A9-42FE-80F0-1806679538FA}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/network/nsclilib/netcli.vcproj b/make/msvc800_prj/network/nsclilib/netcli.vcproj
index 07fd39a8..f68a94c2 100644
--- a/make/msvc800_prj/network/nsclilib/netcli.vcproj
+++ b/make/msvc800_prj/network/nsclilib/netcli.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="netcli"
- ProjectGUID="{327A10DD-2251-4191-8425-17E535235D30}"
+ ProjectGUID="{14D69C18-0E8E-4816-8CC6-FC22AEA3E1C7}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/network/spell/client/ncbispel.vcproj b/make/msvc800_prj/network/spell/client/ncbispel.vcproj
index db5b37c7..45faa29e 100644
--- a/make/msvc800_prj/network/spell/client/ncbispel.vcproj
+++ b/make/msvc800_prj/network/spell/client/ncbispel.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="ncbispel"
- ProjectGUID="{ACB6E56A-AA8C-43C8-B9C4-A8E1E10E496C}"
+ ProjectGUID="{8B58713F-B6F4-4A76-9888-309FDDFB985D}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/network/taxon1/taxon2/ncbitxc2.vcproj b/make/msvc800_prj/network/taxon1/taxon2/ncbitxc2.vcproj
index 8281cd67..f8067df7 100644
--- a/make/msvc800_prj/network/taxon1/taxon2/ncbitxc2.vcproj
+++ b/make/msvc800_prj/network/taxon1/taxon2/ncbitxc2.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="ncbitxc2"
- ProjectGUID="{A9FD8A3D-345F-4F7B-B8D6-9032E1884F94}"
+ ProjectGUID="{C2857848-3327-46C6-929C-192629A21F60}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/network/vibnet/vibnet.vcproj b/make/msvc800_prj/network/vibnet/vibnet.vcproj
index afd03908..35bce4b5 100644
--- a/make/msvc800_prj/network/vibnet/vibnet.vcproj
+++ b/make/msvc800_prj/network/vibnet/vibnet.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="vibnet"
- ProjectGUID="{47BB9C01-3751-4E25-87AE-6B4BAAA00340}"
+ ProjectGUID="{DE96F5AB-AC39-44FF-9BAB-36805FE07A86}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/object/ncbiobj.vcproj b/make/msvc800_prj/object/ncbiobj.vcproj
index 759ea42d..1b67231b 100644
--- a/make/msvc800_prj/object/ncbiobj.vcproj
+++ b/make/msvc800_prj/object/ncbiobj.vcproj
@@ -3,7 +3,8 @@
ProjectType="Visual C++"
Version="8.00"
Name="ncbiobj"
- ProjectGUID="{F8CD481D-462C-40ED-98FA-C6EEF477B5CF}"
+ ProjectGUID="{7B5BF3BF-33A5-4830-A9CC-78EBD3F368E0}"
+ RootNamespace="ncbiobj"
>
<Platforms>
<Platform
@@ -92,9 +93,9 @@
/>
</Configuration>
<Configuration
- Name="Debug|Win32"
- OutputDirectory=".\Debug"
- IntermediateDirectory=".\Debug"
+ Name="ReleaseDLL|x64"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="4"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
UseOfMFC="0"
@@ -114,14 +115,17 @@
/>
<Tool
Name="VCMIDLTool"
+ TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
- Optimization="0"
+ Optimization="2"
+ InlineFunctionExpansion="1"
AdditionalIncludeDirectories="..\..\..,..\..\..\corelib,..\..\..\asnstat,..\..\..\asnlib,..\..\..\object,..\..\..\api,..\..\..\cdromlib,..\..\..\biostruc,..\..\..\ddv,..\..\..\access,..\..\..\connect,..\..\..\tools"
- PreprocessorDefinitions="WIN32;_DEBUG"
- BasicRuntimeChecks="3"
- RuntimeLibrary="1"
+ PreprocessorDefinitions="WIN32;NDEBUG"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
RuntimeTypeInfo="true"
PrecompiledHeaderFile="$(IntDir)/ncbiobj.pch"
AssemblerListingLocation="$(IntDir)/"
@@ -129,14 +133,13 @@
ProgramDataBaseFileName="$(IntDir)/"
WarningLevel="3"
SuppressStartupBanner="true"
- DebugInformationFormat="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
- PreprocessorDefinitions="_DEBUG"
+ PreprocessorDefinitions="NDEBUG"
Culture="1033"
/>
<Tool
@@ -166,9 +169,9 @@
/>
</Configuration>
<Configuration
- Name="Release|Win32"
- OutputDirectory=".\Release"
- IntermediateDirectory=".\Release"
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
ConfigurationType="4"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
UseOfMFC="0"
@@ -191,13 +194,11 @@
/>
<Tool
Name="VCCLCompilerTool"
- Optimization="2"
- InlineFunctionExpansion="1"
+ Optimization="0"
AdditionalIncludeDirectories="..\..\..,..\..\..\corelib,..\..\..\asnstat,..\..\..\asnlib,..\..\..\object,..\..\..\api,..\..\..\cdromlib,..\..\..\biostruc,..\..\..\ddv,..\..\..\access,..\..\..\connect,..\..\..\tools"
- PreprocessorDefinitions="WIN32;NDEBUG"
- StringPooling="true"
- RuntimeLibrary="0"
- EnableFunctionLevelLinking="true"
+ PreprocessorDefinitions="WIN32;_DEBUG"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
RuntimeTypeInfo="true"
PrecompiledHeaderFile="$(IntDir)/ncbiobj.pch"
AssemblerListingLocation="$(IntDir)/"
@@ -205,13 +206,14 @@
ProgramDataBaseFileName="$(IntDir)/"
WarningLevel="3"
SuppressStartupBanner="true"
+ DebugInformationFormat="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG"
+ PreprocessorDefinitions="_DEBUG"
Culture="1033"
/>
<Tool
@@ -241,9 +243,9 @@
/>
</Configuration>
<Configuration
- Name="DebugDLL|Win32"
- OutputDirectory=".\DebugDLL"
- IntermediateDirectory=".\DebugDLL"
+ Name="Debug|x64"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="4"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
UseOfMFC="0"
@@ -263,6 +265,7 @@
/>
<Tool
Name="VCMIDLTool"
+ TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
@@ -270,7 +273,7 @@
AdditionalIncludeDirectories="..\..\..,..\..\..\corelib,..\..\..\asnstat,..\..\..\asnlib,..\..\..\object,..\..\..\api,..\..\..\cdromlib,..\..\..\biostruc,..\..\..\ddv,..\..\..\access,..\..\..\connect,..\..\..\tools"
PreprocessorDefinitions="WIN32;_DEBUG"
BasicRuntimeChecks="3"
- RuntimeLibrary="3"
+ RuntimeLibrary="1"
RuntimeTypeInfo="true"
PrecompiledHeaderFile="$(IntDir)/ncbiobj.pch"
AssemblerListingLocation="$(IntDir)/"
@@ -315,9 +318,9 @@
/>
</Configuration>
<Configuration
- Name="ReleaseDLL|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ Name="Release|Win32"
+ OutputDirectory=".\Release"
+ IntermediateDirectory=".\Release"
ConfigurationType="4"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
UseOfMFC="0"
@@ -337,7 +340,6 @@
/>
<Tool
Name="VCMIDLTool"
- TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
@@ -346,7 +348,7 @@
AdditionalIncludeDirectories="..\..\..,..\..\..\corelib,..\..\..\asnstat,..\..\..\asnlib,..\..\..\object,..\..\..\api,..\..\..\cdromlib,..\..\..\biostruc,..\..\..\ddv,..\..\..\access,..\..\..\connect,..\..\..\tools"
PreprocessorDefinitions="WIN32;NDEBUG"
StringPooling="true"
- RuntimeLibrary="2"
+ RuntimeLibrary="0"
EnableFunctionLevelLinking="true"
RuntimeTypeInfo="true"
PrecompiledHeaderFile="$(IntDir)/ncbiobj.pch"
@@ -391,7 +393,7 @@
/>
</Configuration>
<Configuration
- Name="Debug|x64"
+ Name="Release|x64"
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="4"
@@ -417,11 +419,13 @@
/>
<Tool
Name="VCCLCompilerTool"
- Optimization="0"
+ Optimization="2"
+ InlineFunctionExpansion="1"
AdditionalIncludeDirectories="..\..\..,..\..\..\corelib,..\..\..\asnstat,..\..\..\asnlib,..\..\..\object,..\..\..\api,..\..\..\cdromlib,..\..\..\biostruc,..\..\..\ddv,..\..\..\access,..\..\..\connect,..\..\..\tools"
- PreprocessorDefinitions="WIN32;_DEBUG"
- BasicRuntimeChecks="3"
- RuntimeLibrary="1"
+ PreprocessorDefinitions="WIN32;NDEBUG"
+ StringPooling="true"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
RuntimeTypeInfo="true"
PrecompiledHeaderFile="$(IntDir)/ncbiobj.pch"
AssemblerListingLocation="$(IntDir)/"
@@ -429,14 +433,13 @@
ProgramDataBaseFileName="$(IntDir)/"
WarningLevel="3"
SuppressStartupBanner="true"
- DebugInformationFormat="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
- PreprocessorDefinitions="_DEBUG"
+ PreprocessorDefinitions="NDEBUG"
Culture="1033"
/>
<Tool
@@ -466,9 +469,9 @@
/>
</Configuration>
<Configuration
- Name="Release|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ Name="DebugDLL|Win32"
+ OutputDirectory=".\DebugDLL"
+ IntermediateDirectory=".\DebugDLL"
ConfigurationType="4"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
UseOfMFC="0"
@@ -488,17 +491,14 @@
/>
<Tool
Name="VCMIDLTool"
- TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
- Optimization="2"
- InlineFunctionExpansion="1"
+ Optimization="0"
AdditionalIncludeDirectories="..\..\..,..\..\..\corelib,..\..\..\asnstat,..\..\..\asnlib,..\..\..\object,..\..\..\api,..\..\..\cdromlib,..\..\..\biostruc,..\..\..\ddv,..\..\..\access,..\..\..\connect,..\..\..\tools"
- PreprocessorDefinitions="WIN32;NDEBUG"
- StringPooling="true"
- RuntimeLibrary="0"
- EnableFunctionLevelLinking="true"
+ PreprocessorDefinitions="WIN32;_DEBUG"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
RuntimeTypeInfo="true"
PrecompiledHeaderFile="$(IntDir)/ncbiobj.pch"
AssemblerListingLocation="$(IntDir)/"
@@ -506,13 +506,14 @@
ProgramDataBaseFileName="$(IntDir)/"
WarningLevel="3"
SuppressStartupBanner="true"
+ DebugInformationFormat="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG"
+ PreprocessorDefinitions="_DEBUG"
Culture="1033"
/>
<Tool
@@ -637,7 +638,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -646,7 +647,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -655,7 +656,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -664,7 +665,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -673,7 +674,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -682,7 +683,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -713,7 +714,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -722,7 +723,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -731,7 +732,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -740,7 +741,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -749,7 +750,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -758,7 +759,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -789,7 +790,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -798,7 +799,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -807,7 +808,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -816,7 +817,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -825,7 +826,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -834,7 +835,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -865,7 +866,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -874,7 +875,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -883,7 +884,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -892,7 +893,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -901,7 +902,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -910,7 +911,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -941,7 +942,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -950,7 +951,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -959,7 +960,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -968,7 +969,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -977,7 +978,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -986,7 +987,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -1017,7 +1018,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -1026,7 +1027,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -1035,7 +1036,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -1044,7 +1045,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -1053,7 +1054,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -1062,7 +1063,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -1093,7 +1094,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -1102,7 +1103,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -1111,7 +1112,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -1120,7 +1121,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -1129,7 +1130,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -1138,7 +1139,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -1169,7 +1170,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -1178,7 +1179,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -1187,7 +1188,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -1196,7 +1197,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -1205,7 +1206,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -1214,7 +1215,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -1245,7 +1246,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -1254,7 +1255,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -1263,7 +1264,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -1272,7 +1273,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -1281,7 +1282,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -1290,7 +1291,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -1321,7 +1322,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -1330,7 +1331,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -1339,7 +1340,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -1348,7 +1349,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -1357,7 +1358,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -1366,7 +1367,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -1397,7 +1398,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -1406,7 +1407,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -1415,7 +1416,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -1424,7 +1425,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -1433,7 +1434,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -1442,7 +1443,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -1473,7 +1474,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -1482,7 +1483,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -1491,7 +1492,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -1500,7 +1501,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -1509,7 +1510,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -1518,7 +1519,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -1549,7 +1550,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -1558,7 +1559,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -1567,7 +1568,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -1576,7 +1577,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -1585,7 +1586,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -1594,7 +1595,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -1625,7 +1626,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -1634,7 +1635,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -1643,7 +1644,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -1652,7 +1653,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -1661,7 +1662,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -1670,7 +1671,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -1701,7 +1702,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -1710,7 +1711,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -1719,7 +1720,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -1728,7 +1729,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -1737,7 +1738,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -1746,7 +1747,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -1777,7 +1778,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -1786,7 +1787,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -1795,7 +1796,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -1804,7 +1805,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -1813,7 +1814,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -1822,7 +1823,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -1853,7 +1854,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -1862,7 +1863,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -1871,7 +1872,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -1880,7 +1881,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -1889,7 +1890,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -1898,7 +1899,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -1929,7 +1930,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -1938,7 +1939,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -1947,7 +1948,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -1956,7 +1957,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -1965,7 +1966,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -1974,7 +1975,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -2005,7 +2006,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -2014,7 +2015,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -2023,7 +2024,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -2032,7 +2033,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -2041,7 +2042,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -2050,7 +2051,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -2081,7 +2082,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -2090,7 +2091,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -2099,7 +2100,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -2108,7 +2109,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -2117,7 +2118,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -2126,7 +2127,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -2157,7 +2158,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -2166,7 +2167,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -2175,7 +2176,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -2184,7 +2185,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -2193,7 +2194,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -2202,7 +2203,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -2233,7 +2234,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -2242,7 +2243,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -2251,7 +2252,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -2260,7 +2261,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -2269,7 +2270,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -2278,7 +2279,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -2309,7 +2310,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -2318,7 +2319,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -2327,7 +2328,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -2336,7 +2337,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -2345,7 +2346,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -2354,7 +2355,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -2385,7 +2386,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -2394,7 +2395,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -2403,7 +2404,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -2412,7 +2413,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -2421,7 +2422,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -2430,7 +2431,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -2461,7 +2462,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -2470,7 +2471,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -2479,7 +2480,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -2488,7 +2489,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -2497,7 +2498,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -2506,7 +2507,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -2537,7 +2538,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -2546,7 +2547,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -2555,7 +2556,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -2564,7 +2565,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -2573,7 +2574,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -2582,7 +2583,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -2613,7 +2614,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -2622,7 +2623,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -2631,7 +2632,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -2640,7 +2641,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -2649,7 +2650,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -2658,7 +2659,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -2689,7 +2690,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -2698,7 +2699,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -2707,7 +2708,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -2716,7 +2717,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -2725,7 +2726,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -2734,7 +2735,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -2765,7 +2766,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -2774,7 +2775,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -2783,7 +2784,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -2792,7 +2793,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -2801,7 +2802,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -2810,7 +2811,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -2841,7 +2842,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -2850,7 +2851,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -2859,7 +2860,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -2868,7 +2869,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -2877,7 +2878,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -2886,7 +2887,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -2917,7 +2918,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -2926,7 +2927,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -2935,7 +2936,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -2944,7 +2945,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -2953,7 +2954,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -2962,7 +2963,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -2993,7 +2994,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -3002,7 +3003,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -3011,7 +3012,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -3020,7 +3021,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -3029,7 +3030,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -3038,7 +3039,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -3069,7 +3070,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -3078,7 +3079,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -3087,7 +3088,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -3096,7 +3097,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -3105,7 +3106,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -3114,7 +3115,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -3145,7 +3146,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -3154,7 +3155,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -3163,7 +3164,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -3172,7 +3173,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -3181,7 +3182,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -3190,7 +3191,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -3221,7 +3222,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -3230,7 +3231,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -3239,7 +3240,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -3248,7 +3249,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -3257,7 +3258,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -3266,7 +3267,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -3297,7 +3298,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -3306,7 +3307,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -3315,7 +3316,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -3324,7 +3325,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -3333,7 +3334,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -3342,7 +3343,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -3373,7 +3374,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -3382,7 +3383,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -3391,7 +3392,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -3400,7 +3401,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -3409,7 +3410,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -3418,7 +3419,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -3449,6 +3450,15 @@
/>
</FileConfiguration>
<FileConfiguration
+ Name="ReleaseDLL|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
Name="Debug|Win32"
>
<Tool
@@ -3458,6 +3468,15 @@
/>
</FileConfiguration>
<FileConfiguration
+ Name="Debug|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
Name="Release|Win32"
>
<Tool
@@ -3467,6 +3486,15 @@
/>
</FileConfiguration>
<FileConfiguration
+ Name="Release|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
Name="DebugDLL|Win32"
>
<Tool
@@ -3476,6 +3504,28 @@
/>
</FileConfiguration>
<FileConfiguration
+ Name="DebugDLL|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\api\macroapi.c"
+ >
+ <FileConfiguration
+ Name="ReleaseDLL|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
Name="ReleaseDLL|x64"
>
<Tool
@@ -3485,6 +3535,15 @@
/>
</FileConfiguration>
<FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
Name="Debug|x64"
>
<Tool
@@ -3494,6 +3553,15 @@
/>
</FileConfiguration>
<FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
Name="Release|x64"
>
<Tool
@@ -3503,6 +3571,15 @@
/>
</FileConfiguration>
<FileConfiguration
+ Name="DebugDLL|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
Name="DebugDLL|x64"
>
<Tool
@@ -3525,7 +3602,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -3534,7 +3611,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -3543,7 +3620,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -3552,7 +3629,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -3561,7 +3638,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -3570,7 +3647,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -3601,7 +3678,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -3610,7 +3687,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -3619,7 +3696,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -3628,7 +3705,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -3637,7 +3714,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -3646,7 +3723,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -3677,7 +3754,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -3686,7 +3763,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -3695,7 +3772,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -3704,7 +3781,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -3713,7 +3790,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -3722,7 +3799,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -3753,7 +3830,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -3762,7 +3839,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -3771,7 +3848,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -3780,7 +3857,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -3789,7 +3866,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -3798,7 +3875,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -3829,7 +3906,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -3838,7 +3915,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -3847,7 +3924,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -3856,7 +3933,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -3865,7 +3942,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -3874,7 +3951,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -3905,7 +3982,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -3914,7 +3991,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -3923,7 +4000,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -3932,7 +4009,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -3941,7 +4018,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -3950,7 +4027,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -3981,7 +4058,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -3990,7 +4067,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -3999,7 +4076,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -4008,7 +4085,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -4017,7 +4094,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -4026,7 +4103,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -4057,7 +4134,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -4066,7 +4143,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -4075,7 +4152,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -4084,7 +4161,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -4093,7 +4170,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -4102,7 +4179,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -4133,7 +4210,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -4142,7 +4219,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -4151,7 +4228,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -4160,7 +4237,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -4169,7 +4246,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -4178,7 +4255,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -4209,7 +4286,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -4218,7 +4295,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -4227,7 +4304,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -4236,7 +4313,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -4245,7 +4322,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -4254,7 +4331,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -4285,7 +4362,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -4294,7 +4371,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -4303,7 +4380,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -4312,7 +4389,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -4321,7 +4398,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -4330,7 +4407,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -4361,7 +4438,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -4370,7 +4447,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -4379,7 +4456,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -4388,7 +4465,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -4397,7 +4474,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -4406,7 +4483,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -4437,7 +4514,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -4446,7 +4523,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -4455,7 +4532,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -4464,7 +4541,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -4473,7 +4550,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -4482,7 +4559,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -4513,7 +4590,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -4522,7 +4599,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -4531,7 +4608,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -4540,7 +4617,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -4549,7 +4626,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -4558,7 +4635,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -4589,7 +4666,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -4598,7 +4675,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -4607,7 +4684,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -4616,7 +4693,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -4625,7 +4702,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -4634,7 +4711,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -4665,7 +4742,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -4674,7 +4751,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -4683,7 +4760,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -4692,7 +4769,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -4701,7 +4778,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -4710,7 +4787,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -4741,7 +4818,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -4750,7 +4827,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -4759,7 +4836,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -4768,7 +4845,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -4777,7 +4854,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -4786,7 +4863,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -4817,7 +4894,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -4826,7 +4903,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -4835,7 +4912,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -4844,7 +4921,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -4853,7 +4930,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -4862,7 +4939,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -4893,7 +4970,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -4902,7 +4979,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -4911,7 +4988,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -4920,7 +4997,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -4929,7 +5006,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -4938,7 +5015,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -4969,7 +5046,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -4978,7 +5055,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -4987,7 +5064,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -4996,7 +5073,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -5005,7 +5082,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -5014,7 +5091,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -5045,6 +5122,15 @@
/>
</FileConfiguration>
<FileConfiguration
+ Name="ReleaseDLL|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
Name="Debug|Win32"
>
<Tool
@@ -5054,6 +5140,15 @@
/>
</FileConfiguration>
<FileConfiguration
+ Name="Debug|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
Name="Release|Win32"
>
<Tool
@@ -5063,6 +5158,15 @@
/>
</FileConfiguration>
<FileConfiguration
+ Name="Release|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
Name="DebugDLL|Win32"
>
<Tool
@@ -5072,6 +5176,28 @@
/>
</FileConfiguration>
<FileConfiguration
+ Name="DebugDLL|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\object\objmacro.c"
+ >
+ <FileConfiguration
+ Name="ReleaseDLL|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
Name="ReleaseDLL|x64"
>
<Tool
@@ -5081,6 +5207,15 @@
/>
</FileConfiguration>
<FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
Name="Debug|x64"
>
<Tool
@@ -5090,6 +5225,15 @@
/>
</FileConfiguration>
<FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
Name="Release|x64"
>
<Tool
@@ -5099,6 +5243,15 @@
/>
</FileConfiguration>
<FileConfiguration
+ Name="DebugDLL|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
Name="DebugDLL|x64"
>
<Tool
@@ -5121,7 +5274,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -5130,7 +5283,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -5139,7 +5292,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -5148,7 +5301,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -5157,7 +5310,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -5166,7 +5319,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -5197,7 +5350,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -5206,7 +5359,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -5215,7 +5368,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -5224,7 +5377,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -5233,7 +5386,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -5242,7 +5395,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -5273,7 +5426,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -5282,7 +5435,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -5291,7 +5444,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -5300,7 +5453,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -5309,7 +5462,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -5318,7 +5471,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -5349,7 +5502,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -5358,7 +5511,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -5367,7 +5520,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -5376,7 +5529,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -5385,7 +5538,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -5394,7 +5547,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -5425,7 +5578,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -5434,7 +5587,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -5443,7 +5596,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -5452,7 +5605,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -5461,7 +5614,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -5470,7 +5623,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -5501,7 +5654,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -5510,7 +5663,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -5519,7 +5672,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -5528,7 +5681,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -5537,7 +5690,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -5546,7 +5699,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -5577,7 +5730,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -5586,7 +5739,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -5595,7 +5748,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -5604,7 +5757,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -5613,7 +5766,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -5622,7 +5775,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -5653,7 +5806,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -5662,7 +5815,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -5671,7 +5824,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -5680,7 +5833,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -5689,7 +5842,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -5698,7 +5851,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -5729,7 +5882,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -5738,7 +5891,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -5747,7 +5900,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -5756,7 +5909,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -5765,7 +5918,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -5774,7 +5927,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -5805,7 +5958,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -5814,7 +5967,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -5823,7 +5976,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -5832,7 +5985,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -5841,7 +5994,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -5850,7 +6003,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -5881,7 +6034,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -5890,7 +6043,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -5899,7 +6052,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -5908,7 +6061,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -5917,7 +6070,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -5926,7 +6079,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -5957,7 +6110,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -5966,7 +6119,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -5975,7 +6128,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -5984,7 +6137,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -5993,7 +6146,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -6002,7 +6155,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -6033,7 +6186,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -6042,7 +6195,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -6051,7 +6204,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -6060,7 +6213,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -6069,7 +6222,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -6078,7 +6231,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -6109,6 +6262,15 @@
/>
</FileConfiguration>
<FileConfiguration
+ Name="ReleaseDLL|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
Name="Debug|Win32"
>
<Tool
@@ -6118,6 +6280,15 @@
/>
</FileConfiguration>
<FileConfiguration
+ Name="Debug|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
Name="Release|Win32"
>
<Tool
@@ -6127,6 +6298,15 @@
/>
</FileConfiguration>
<FileConfiguration
+ Name="Release|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
Name="DebugDLL|Win32"
>
<Tool
@@ -6136,6 +6316,28 @@
/>
</FileConfiguration>
<FileConfiguration
+ Name="DebugDLL|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\object\objtable.c"
+ >
+ <FileConfiguration
+ Name="ReleaseDLL|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
Name="ReleaseDLL|x64"
>
<Tool
@@ -6145,6 +6347,15 @@
/>
</FileConfiguration>
<FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
Name="Debug|x64"
>
<Tool
@@ -6154,6 +6365,15 @@
/>
</FileConfiguration>
<FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
Name="Release|x64"
>
<Tool
@@ -6163,6 +6383,15 @@
/>
</FileConfiguration>
<FileConfiguration
+ Name="DebugDLL|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
Name="DebugDLL|x64"
>
<Tool
@@ -6185,7 +6414,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -6194,7 +6423,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -6203,7 +6432,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -6212,7 +6441,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -6221,7 +6450,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -6230,7 +6459,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -6261,7 +6490,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -6270,7 +6499,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -6279,7 +6508,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -6288,7 +6517,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -6297,7 +6526,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -6306,7 +6535,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -6337,7 +6566,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -6346,7 +6575,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -6355,7 +6584,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -6364,7 +6593,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -6373,7 +6602,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -6382,7 +6611,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -6413,7 +6642,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -6422,7 +6651,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -6431,7 +6660,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -6440,7 +6669,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -6449,7 +6678,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -6458,7 +6687,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -6489,7 +6718,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -6498,7 +6727,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -6507,7 +6736,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -6516,7 +6745,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -6525,7 +6754,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -6534,7 +6763,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -6565,7 +6794,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -6574,7 +6803,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -6583,7 +6812,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -6592,7 +6821,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -6601,7 +6830,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -6610,7 +6839,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -6641,7 +6870,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -6650,7 +6879,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -6659,7 +6888,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -6668,7 +6897,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -6677,7 +6906,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -6686,7 +6915,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -6717,7 +6946,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -6726,7 +6955,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -6735,7 +6964,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -6744,7 +6973,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -6753,7 +6982,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -6762,7 +6991,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -6793,7 +7022,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -6802,7 +7031,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -6811,7 +7040,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -6820,7 +7049,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -6829,7 +7058,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -6838,7 +7067,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -6869,7 +7098,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -6878,7 +7107,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -6887,7 +7116,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -6896,7 +7125,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -6905,7 +7134,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -6914,7 +7143,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -6945,7 +7174,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -6954,7 +7183,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -6963,7 +7192,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -6972,7 +7201,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -6981,7 +7210,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -6990,7 +7219,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -7021,7 +7250,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -7030,7 +7259,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -7039,7 +7268,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -7048,7 +7277,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -7057,7 +7286,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -7066,7 +7295,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -7097,7 +7326,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -7106,7 +7335,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -7115,7 +7344,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -7124,7 +7353,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -7133,7 +7362,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -7142,7 +7371,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -7173,7 +7402,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -7182,7 +7411,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -7191,7 +7420,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -7200,7 +7429,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -7209,7 +7438,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -7218,7 +7447,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -7249,7 +7478,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -7258,7 +7487,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -7267,7 +7496,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -7276,7 +7505,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -7285,7 +7514,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -7294,7 +7523,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -7325,7 +7554,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -7334,7 +7563,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -7343,7 +7572,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -7352,7 +7581,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -7361,7 +7590,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -7370,7 +7599,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -7401,7 +7630,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -7410,7 +7639,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -7419,7 +7648,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -7428,7 +7657,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -7437,7 +7666,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -7446,7 +7675,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -7477,7 +7706,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -7486,7 +7715,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -7495,7 +7724,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -7504,7 +7733,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -7513,7 +7742,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -7522,7 +7751,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -7553,7 +7782,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -7562,7 +7791,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -7571,7 +7800,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -7580,7 +7809,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -7589,7 +7818,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -7598,7 +7827,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -7629,7 +7858,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -7638,7 +7867,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -7647,7 +7876,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -7656,7 +7885,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -7665,7 +7894,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -7674,7 +7903,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -7705,7 +7934,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -7714,7 +7943,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -7723,7 +7952,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -7732,7 +7961,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -7741,7 +7970,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -7750,7 +7979,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -7781,7 +8010,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -7790,7 +8019,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -7799,7 +8028,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -7808,7 +8037,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -7817,7 +8046,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -7826,7 +8055,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -7845,6 +8074,10 @@
</FileConfiguration>
</File>
<File
+ RelativePath="..\..\..\api\sqnutil4.c"
+ >
+ </File>
+ <File
RelativePath="..\..\..\access\strucapi.c"
>
<FileConfiguration
@@ -7857,7 +8090,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -7866,7 +8099,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -7875,7 +8108,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -7884,7 +8117,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -7893,7 +8126,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -7902,7 +8135,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -7933,7 +8166,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -7942,7 +8175,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -7951,7 +8184,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -7960,7 +8193,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -7969,7 +8202,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -7978,7 +8211,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -8009,7 +8242,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -8018,7 +8251,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -8027,7 +8260,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -8036,7 +8269,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -8045,7 +8278,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -8054,7 +8287,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -8085,7 +8318,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -8094,7 +8327,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -8103,7 +8336,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -8112,7 +8345,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -8121,7 +8354,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -8130,7 +8363,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -8161,7 +8394,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -8170,7 +8403,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -8179,7 +8412,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -8188,7 +8421,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -8197,7 +8430,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -8206,7 +8439,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -8237,7 +8470,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -8246,7 +8479,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -8255,7 +8488,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -8264,7 +8497,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -8273,7 +8506,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -8282,7 +8515,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -8313,7 +8546,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -8322,7 +8555,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -8331,7 +8564,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -8340,7 +8573,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -8349,7 +8582,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -8358,7 +8591,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -8389,7 +8622,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -8398,7 +8631,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -8407,7 +8640,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -8416,7 +8649,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -8425,7 +8658,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -8434,7 +8667,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -8465,7 +8698,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -8474,7 +8707,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -8483,7 +8716,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -8492,7 +8725,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -8501,7 +8734,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -8510,7 +8743,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -8541,7 +8774,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -8550,7 +8783,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -8559,7 +8792,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -8568,7 +8801,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -8577,7 +8810,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -8586,7 +8819,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -8617,7 +8850,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -8626,7 +8859,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -8635,7 +8868,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -8644,7 +8877,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -8653,7 +8886,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -8662,7 +8895,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -8693,7 +8926,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -8702,7 +8935,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -8711,7 +8944,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -8720,7 +8953,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -8729,7 +8962,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -8738,7 +8971,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -8769,7 +9002,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -8778,7 +9011,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -8787,7 +9020,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -8796,7 +9029,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -8805,7 +9038,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -8814,7 +9047,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -8845,7 +9078,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="ReleaseDLL|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -8854,7 +9087,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -8863,7 +9096,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="DebugDLL|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -8872,7 +9105,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="ReleaseDLL|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -8881,7 +9114,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -8890,7 +9123,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugDLL|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -9182,6 +9415,10 @@
>
</File>
<File
+ RelativePath="..\..\..\api\macroapi.h"
+ >
+ </File>
+ <File
RelativePath="..\..\..\object\mapmime.h"
>
</File>
@@ -9294,6 +9531,10 @@
>
</File>
<File
+ RelativePath="..\..\..\object\objmacro.h"
+ >
+ </File>
+ <File
RelativePath="..\..\..\object\objmdrs.h"
>
</File>
@@ -9354,6 +9595,10 @@
>
</File>
<File
+ RelativePath="..\..\..\object\objtable.h"
+ >
+ </File>
+ <File
RelativePath="..\..\..\access\objtax3.h"
>
</File>
@@ -9510,4 +9755,3 @@
<Globals>
</Globals>
</VisualStudioProject>
-
diff --git a/make/msvc800_prj/regexp/demo/demo_regexp.vcproj b/make/msvc800_prj/regexp/demo/demo_regexp.vcproj
index 53ed4287..ef92424c 100644
--- a/make/msvc800_prj/regexp/demo/demo_regexp.vcproj
+++ b/make/msvc800_prj/regexp/demo/demo_regexp.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="demo_regexp"
- ProjectGUID="{D0B197BF-1409-4108-81C0-A2754CD97ADA}"
+ ProjectGUID="{82933EEE-EB79-486D-A8E2-B440D33D924A}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/regexp/demo/demo_regexp_grep.vcproj b/make/msvc800_prj/regexp/demo/demo_regexp_grep.vcproj
index cbe18d53..7fc83fdf 100644
--- a/make/msvc800_prj/regexp/demo/demo_regexp_grep.vcproj
+++ b/make/msvc800_prj/regexp/demo/demo_regexp_grep.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="demo_regexp_grep"
- ProjectGUID="{CCA73A4F-96E8-48BE-A1B6-77EC3697584C}"
+ ProjectGUID="{8EFB0853-50E8-4167-88A5-2C71DAB74098}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/regexp/regexp.vcproj b/make/msvc800_prj/regexp/regexp.vcproj
index a543519f..87d3adc0 100644
--- a/make/msvc800_prj/regexp/regexp.vcproj
+++ b/make/msvc800_prj/regexp/regexp.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="regexp"
- ProjectGUID="{21191422-314F-421D-93A8-EABF933C3065}"
+ ProjectGUID="{C0B91754-0757-42BD-8F53-C05964FFFB66}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/regexp/test/test_regexp.vcproj b/make/msvc800_prj/regexp/test/test_regexp.vcproj
index 44d29f3d..1b87eb4c 100644
--- a/make/msvc800_prj/regexp/test/test_regexp.vcproj
+++ b/make/msvc800_prj/regexp/test/test_regexp.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="test_regexp"
- ProjectGUID="{8FBFAE5E-50CA-42EF-B614-BEA3252064BD}"
+ ProjectGUID="{B6875C47-6809-4972-A89D-0085058670C9}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/sequin/sbtedit/exe_sbtedit.vcproj b/make/msvc800_prj/sequin/sbtedit/exe_sbtedit.vcproj
index d32ff173..8c0930e2 100644
--- a/make/msvc800_prj/sequin/sbtedit/exe_sbtedit.vcproj
+++ b/make/msvc800_prj/sequin/sbtedit/exe_sbtedit.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="exe_sbtedit"
- ProjectGUID="{6F58FEBB-1C0A-4C28-B0D4-82629AC0E1C6}"
+ ProjectGUID="{028EEC3D-499E-453C-A1F4-5A4478BBB39F}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/sequin/sequin/exe_sequin.vcproj b/make/msvc800_prj/sequin/sequin/exe_sequin.vcproj
index 3d33676c..2841db6f 100644
--- a/make/msvc800_prj/sequin/sequin/exe_sequin.vcproj
+++ b/make/msvc800_prj/sequin/sequin/exe_sequin.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="exe_sequin"
- ProjectGUID="{002CC81D-C6AF-4AED-8624-301D0E13ED46}"
+ ProjectGUID="{86F47145-3ABB-45BA-8D51-89C24997882F}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/sequin/ssequin/exe_ssequin.vcproj b/make/msvc800_prj/sequin/ssequin/exe_ssequin.vcproj
index 37bca95e..c315605c 100644
--- a/make/msvc800_prj/sequin/ssequin/exe_ssequin.vcproj
+++ b/make/msvc800_prj/sequin/ssequin/exe_ssequin.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="exe_ssequin"
- ProjectGUID="{808F70AF-6AA9-49CB-A7AE-28E85C1D22FE}"
+ ProjectGUID="{7469FFC1-059F-45B2-A9B8-B17CD881CA8D}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/tools/ncbitool.vcproj b/make/msvc800_prj/tools/ncbitool.vcproj
index 3ce5267c..b665dfb1 100644
--- a/make/msvc800_prj/tools/ncbitool.vcproj
+++ b/make/msvc800_prj/tools/ncbitool.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="ncbitool"
- ProjectGUID="{32AB53DD-66B1-4E17-B411-FEB804E62CF0}"
+ ProjectGUID="{19DB0E0E-BB30-4A19-93A8-7B67FBB0C937}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/vibrant/vibrant/vibrant.vcproj b/make/msvc800_prj/vibrant/vibrant/vibrant.vcproj
index 22ca0377..2aa60673 100644
--- a/make/msvc800_prj/vibrant/vibrant/vibrant.vcproj
+++ b/make/msvc800_prj/vibrant/vibrant/vibrant.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="vibrant"
- ProjectGUID="{F2107221-7687-4F18-AEAC-FAA7C4EFCC16}"
+ ProjectGUID="{25806259-F586-4AAC-BDD1-50C1B227147D}"
>
<Platforms>
<Platform
diff --git a/make/msvc800_prj/vibrant/vibrant_ogl/vibrant_ogl.vcproj b/make/msvc800_prj/vibrant/vibrant_ogl/vibrant_ogl.vcproj
index f0656114..08812286 100644
--- a/make/msvc800_prj/vibrant/vibrant_ogl/vibrant_ogl.vcproj
+++ b/make/msvc800_prj/vibrant/vibrant_ogl/vibrant_ogl.vcproj
@@ -3,7 +3,7 @@
ProjectType="Visual C++"
Version="8.00"
Name="vibrant_ogl"
- ProjectGUID="{94B3883E-2A1C-4B7C-A98F-6ED6343F0D8B}"
+ ProjectGUID="{E2180D54-5F75-47B7-8D77-00D04A6BEF69}"
>
<Platforms>
<Platform
diff --git a/make/msvc_prj/demo/asnmacro/demo_asnmacro.dsp b/make/msvc_prj/demo/asnmacro/demo_asnmacro.dsp
new file mode 100644
index 00000000..a503a0dc
--- /dev/null
+++ b/make/msvc_prj/demo/asnmacro/demo_asnmacro.dsp
@@ -0,0 +1,75 @@
+# Microsoft Developer Studio Project File - Name="demo_asnmacro" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Application" 0x0101
+
+CFG=demo_asnmacro - Win32 DebugDLL
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "demo_asnmacro.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "demo_asnmacro.mak" CFG="demo_asnmacro - Win32 DebugDLL"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "demo_asnmacro - Win32 DebugDLL" (based on "Win32 (x86) Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+MTL=midl.exe
+RSC=rc.exe
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "DebugDLL"
+# PROP BASE Intermediate_Dir "DebugDLL"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "DebugDLL"
+# PROP Intermediate_Dir "DebugDLL"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+LIB32=link.exe -lib
+# ADD BASE CPP /nologo /MDd /W3 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_NETENT_" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /GR /Z7 /Od /I "..\..\..\.." /I "..\..\..\..\corelib" /I "..\..\..\..\connect" /I "..\..\..\..\api" /I "..\..\..\..\asnstat" /I "..\..\..\..\asnlib" /I "..\..\..\..\access" /I "..\..\..\..\object" /I "..\..\..\..\cdromlib" /I "..\..\..\..\biostruc" /I "..\..\..\..\tools" /D "_CONSOLE" /D "WIN32" /D "_DEBUG" /YX /FD /GZ /c
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /pdb:none /debug /machine:I386
+# ADD LINK32 oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib wsock32.lib /nologo /subsystem:console /debug /machine:I386 /out:"DebugDLL/asnmacro.exe" /pdbtype:sept
+# SUBTRACT LINK32 /pdb:none
+# Begin Target
+
+# Name "demo_asnmacro - Win32 DebugDLL"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=..\..\..\..\demo\asnmacro.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\link\mswin\asnmacro.rc
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# End Group
+# End Target
+# End Project
diff --git a/make/msvc_prj/demo/cleanasn/demo_cleanasn.dsp b/make/msvc_prj/demo/cleanasn/demo_cleanasn.dsp
new file mode 100644
index 00000000..9a374b1e
--- /dev/null
+++ b/make/msvc_prj/demo/cleanasn/demo_cleanasn.dsp
@@ -0,0 +1,75 @@
+# Microsoft Developer Studio Project File - Name="demo_cleanasn" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Application" 0x0101
+
+CFG=demo_cleanasn - Win32 DebugDLL
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "demo_cleanasn.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "demo_cleanasn.mak" CFG="demo_cleanasn - Win32 DebugDLL"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "demo_cleanasn - Win32 DebugDLL" (based on "Win32 (x86) Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+MTL=midl.exe
+RSC=rc.exe
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "DebugDLL"
+# PROP BASE Intermediate_Dir "DebugDLL"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "DebugDLL"
+# PROP Intermediate_Dir "DebugDLL"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+LIB32=link.exe -lib
+# ADD BASE CPP /nologo /MDd /W3 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_NETENT_" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /GR /Z7 /Od /I "..\..\..\.." /I "..\..\..\..\corelib" /I "..\..\..\..\connect" /I "..\..\..\..\api" /I "..\..\..\..\asnstat" /I "..\..\..\..\asnlib" /I "..\..\..\..\access" /I "..\..\..\..\object" /I "..\..\..\..\cdromlib" /I "..\..\..\..\biostruc" /I "..\..\..\..\tools" /D "_CONSOLE" /D "WIN32" /D "_DEBUG" /YX /FD /GZ /c
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /pdb:none /debug /machine:I386
+# ADD LINK32 oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib wsock32.lib /nologo /subsystem:console /debug /machine:I386 /out:"DebugDLL/cleanasn.exe" /pdbtype:sept
+# SUBTRACT LINK32 /pdb:none
+# Begin Target
+
+# Name "demo_cleanasn - Win32 DebugDLL"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=..\..\..\..\demo\cleanasn.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\link\mswin\cleanasn.rc
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# End Group
+# End Target
+# End Project
diff --git a/make/msvc_prj/demo/cspeedtest/demo_cspeedtest.dsp b/make/msvc_prj/demo/cspeedtest/demo_cspeedtest.dsp
new file mode 100644
index 00000000..cf9765d8
--- /dev/null
+++ b/make/msvc_prj/demo/cspeedtest/demo_cspeedtest.dsp
@@ -0,0 +1,75 @@
+# Microsoft Developer Studio Project File - Name="demo_cspeedtest" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Application" 0x0101
+
+CFG=demo_cspeedtest - Win32 DebugDLL
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "demo_cspeedtest.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "demo_cspeedtest.mak" CFG="demo_cspeedtest - Win32 DebugDLL"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "demo_cspeedtest - Win32 DebugDLL" (based on "Win32 (x86) Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+MTL=midl.exe
+RSC=rc.exe
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "DebugDLL"
+# PROP BASE Intermediate_Dir "DebugDLL"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "DebugDLL"
+# PROP Intermediate_Dir "DebugDLL"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+LIB32=link.exe -lib
+# ADD BASE CPP /nologo /MDd /W3 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_NETENT_" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /GR /Z7 /Od /I "..\..\..\.." /I "..\..\..\..\corelib" /I "..\..\..\..\connect" /I "..\..\..\..\api" /I "..\..\..\..\asnstat" /I "..\..\..\..\asnlib" /I "..\..\..\..\access" /I "..\..\..\..\object" /I "..\..\..\..\cdromlib" /I "..\..\..\..\biostruc" /I "..\..\..\..\tools" /D "_CONSOLE" /D "WIN32" /D "_DEBUG" /YX /FD /GZ /c
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /pdb:none /debug /machine:I386
+# ADD LINK32 oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib wsock32.lib /nologo /subsystem:console /debug /machine:I386 /out:"DebugDLL/cspeedtest.exe" /pdbtype:sept
+# SUBTRACT LINK32 /pdb:none
+# Begin Target
+
+# Name "demo_cspeedtest - Win32 DebugDLL"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=..\..\..\..\demo\cspeedtest.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\link\mswin\cspeedtest.rc
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# End Group
+# End Target
+# End Project
diff --git a/make/msvc_prj/demo/raw2delt/demo_raw2delt.dsp b/make/msvc_prj/demo/raw2delt/demo_raw2delt.dsp
new file mode 100644
index 00000000..2461fb32
--- /dev/null
+++ b/make/msvc_prj/demo/raw2delt/demo_raw2delt.dsp
@@ -0,0 +1,75 @@
+# Microsoft Developer Studio Project File - Name="demo_raw2delt" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Application" 0x0101
+
+CFG=demo_raw2delt - Win32 DebugDLL
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "demo_raw2delt.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "demo_raw2delt.mak" CFG="demo_raw2delt - Win32 DebugDLL"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "demo_raw2delt - Win32 DebugDLL" (based on "Win32 (x86) Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+MTL=midl.exe
+RSC=rc.exe
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "DebugDLL"
+# PROP BASE Intermediate_Dir "DebugDLL"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "DebugDLL"
+# PROP Intermediate_Dir "DebugDLL"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+LIB32=link.exe -lib
+# ADD BASE CPP /nologo /MDd /W3 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_NETENT_" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /GR /Z7 /Od /I "..\..\..\.." /I "..\..\..\..\corelib" /I "..\..\..\..\api" /I "..\..\..\..\asnstat" /I "..\..\..\..\asnlib" /I "..\..\..\..\access" /I "..\..\..\..\object" /D "_CONSOLE" /D "WIN32" /D "_DEBUG" /YX /FD /GZ /c
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /pdb:none /debug /machine:I386
+# ADD LINK32 oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib wsock32.lib /nologo /subsystem:console /debug /machine:I386 /out:"DebugDLL/raw2delt.exe" /pdbtype:sept
+# SUBTRACT LINK32 /pdb:none
+# Begin Target
+
+# Name "demo_raw2delt - Win32 DebugDLL"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=..\..\..\..\demo\raw2delt.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\link\mswin\raw2delt.rc
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# End Group
+# End Target
+# End Project
diff --git a/make/msvc_prj/desktop/ncbidesk.dsp b/make/msvc_prj/desktop/ncbidesk.dsp
index 93abda1f..f51b52d9 100644
--- a/make/msvc_prj/desktop/ncbidesk.dsp
+++ b/make/msvc_prj/desktop/ncbidesk.dsp
@@ -165,6 +165,10 @@ SOURCE=..\..\..\desktop\layout.c
# End Source File
# Begin Source File
+SOURCE=..\..\..\desktop\macrodlg.c
+# End Source File
+# Begin Source File
+
SOURCE=..\..\..\desktop\mapgene.c
# End Source File
# Begin Source File
@@ -385,6 +389,10 @@ SOURCE=..\..\..\desktop\legend.h
# End Source File
# Begin Source File
+SOURCE=..\..\..\desktop\macrodlg.h
+# End Source File
+# Begin Source File
+
SOURCE=..\..\..\desktop\mapgene.h
# End Source File
# Begin Source File
diff --git a/make/msvc_prj/ncbi.dsw b/make/msvc_prj/ncbi.dsw
index 670b4705..64ef146b 100644
--- a/make/msvc_prj/ncbi.dsw
+++ b/make/msvc_prj/ncbi.dsw
@@ -90,6 +90,9 @@ Package=<4>
Project_Dep_Name demo_checksub
End Project Dependency
Begin Project Dependency
+ Project_Dep_Name demo_cleanasn
+ End Project Dependency
+ Begin Project Dependency
Project_Dep_Name demo_cnsgn
End Project Dependency
Begin Project Dependency
@@ -105,6 +108,9 @@ Package=<4>
Project_Dep_Name demo_copymat
End Project Dependency
Begin Project Dependency
+ Project_Dep_Name demo_cspeedtest
+ End Project Dependency
+ Begin Project Dependency
Project_Dep_Name demo_dosimple
End Project Dependency
Begin Project Dependency
@@ -284,6 +290,15 @@ Package=<4>
Begin Project Dependency
Project_Dep_Name test_regexp
End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name demo_asnbarval
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name demo_raw2delt
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name demo_asnmacro
+ End Project Dependency
}}}
###############################################################################
@@ -425,6 +440,12 @@ Package=<4>
Begin Project Dependency
Project_Dep_Name blastcompadj
End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name ncbimain
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name xconntest
+ End Project Dependency
}}}
###############################################################################
@@ -783,6 +804,48 @@ Package=<4>
###############################################################################
+Project: "demo_asnmacro"=.\demo\asnmacro\demo_asnmacro.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name blast
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name blastapi
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name blastcompadj
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name netblast
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name ncbitool
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name ncbiobj
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name netcli
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name ncbinacc
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name ncbi
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name ncbimain
+ End Project Dependency
+}}}
+
+###############################################################################
+
Project: "demo_asnstrip"=.\demo\asnstrip\demo_asnstrip.dsp - Package Owner=<4>
Package=<5>
@@ -1161,6 +1224,33 @@ Package=<4>
###############################################################################
+Project: "demo_cleanasn"=.\demo\cleanasn\demo_cleanasn.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name ncbitool
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name ncbinacc
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name ncbiobj
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name ncbi
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name ncbimain
+ End Project Dependency
+}}}
+
+###############################################################################
+
Project: "demo_cnsgn"=.\demo\cnsgn\demo_cnsgn.dsp - Package Owner=<4>
Package=<5>
@@ -1362,6 +1452,33 @@ Package=<4>
###############################################################################
+Project: "demo_cspeedtest"=.\demo\cspeedtest\demo_cspeedtest.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name ncbitool
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name ncbinacc
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name ncbiobj
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name ncbi
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name ncbimain
+ End Project Dependency
+}}}
+
+###############################################################################
+
Project: "demo_dosimple"=.\demo\dosimple\demo_dosimple.dsp - Package Owner=<4>
Package=<5>
@@ -2175,6 +2292,30 @@ Package=<4>
###############################################################################
+Project: "demo_raw2delt"=.\demo\raw2delt\demo_raw2delt.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name ncbimmdb
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name ncbiobj
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name ncbi
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name ncbimain
+ End Project Dependency
+}}}
+
+###############################################################################
+
Project: "demo_regexp"=.\regexp\demo\demo_regexp.dsp - Package Owner=<4>
Package=<5>
@@ -2979,6 +3120,9 @@ Package=<4>
Project_Dep_Name blastapi
End Project Dependency
Begin Project Dependency
+ Project_Dep_Name blastcompadj
+ End Project Dependency
+ Begin Project Dependency
Project_Dep_Name ncbi
End Project Dependency
}}}
diff --git a/make/msvc_prj/object/ncbiobj.dsp b/make/msvc_prj/object/ncbiobj.dsp
index 6cb57bf1..cd60d2c5 100644
--- a/make/msvc_prj/object/ncbiobj.dsp
+++ b/make/msvc_prj/object/ncbiobj.dsp
@@ -207,6 +207,10 @@ SOURCE=..\..\..\api\lsqfetch.c
# End Source File
# Begin Source File
+SOURCE=..\..\..\api\macroapi.c
+# End Source File
+# Begin Source File
+
SOURCE=..\..\..\api\maputil.c
# End Source File
# Begin Source File
@@ -291,6 +295,10 @@ SOURCE=..\..\..\object\objloc.c
# End Source File
# Begin Source File
+SOURCE=..\..\..\object\objmacro.c
+# End Source File
+# Begin Source File
+
SOURCE=..\..\..\object\objmdrs.c
# End Source File
# Begin Source File
@@ -347,6 +355,10 @@ SOURCE=..\..\..\object\objsub.c
# End Source File
# Begin Source File
+SOURCE=..\..\..\object\objtable.c
+# End Source File
+# Begin Source File
+
SOURCE=..\..\..\access\objtax3.c
# End Source File
# Begin Source File
@@ -435,6 +447,10 @@ SOURCE=..\..\..\api\sqnutil3.c
# End Source File
# Begin Source File
+SOURCE=..\..\..\api\sqnutil4.c
+# End Source File
+# Begin Source File
+
SOURCE=..\..\..\access\strucapi.c
# End Source File
# Begin Source File
@@ -763,6 +779,10 @@ SOURCE=..\..\..\api\lsqfetch.h
# End Source File
# Begin Source File
+SOURCE=..\..\..\api\macroapi.h
+# End Source File
+# Begin Source File
+
SOURCE=..\..\..\object\mapmime.h
# End Source File
# Begin Source File
@@ -875,6 +895,10 @@ SOURCE=..\..\..\object\objloc.h
# End Source File
# Begin Source File
+SOURCE=..\..\..\object\objmacro.h
+# End Source File
+# Begin Source File
+
SOURCE=..\..\..\object\objmdrs.h
# End Source File
# Begin Source File
@@ -935,6 +959,10 @@ SOURCE=..\..\..\object\objsub.h
# End Source File
# Begin Source File
+SOURCE=..\..\..\object\objtable.h
+# End Source File
+# Begin Source File
+
SOURCE=..\..\..\access\objtax3.h
# End Source File
# Begin Source File
diff --git a/make/xCode/ncbictoolkit/ncbictoolkit.xcodeproj/project.pbxproj b/make/xCode/ncbictoolkit/ncbictoolkit.xcodeproj/project.pbxproj
index 5b8c9cd0..d9d6fd01 100644
--- a/make/xCode/ncbictoolkit/ncbictoolkit.xcodeproj/project.pbxproj
+++ b/make/xCode/ncbictoolkit/ncbictoolkit.xcodeproj/project.pbxproj
@@ -7,6 +7,14 @@
objects = {
/* Begin PBXBuildFile section */
+ 3701072D0CCD3D410030B936 /* objtable.c in Sources */ = {isa = PBXBuildFile; fileRef = 3701072B0CCD3D410030B936 /* objtable.c */; };
+ 3701072E0CCD3D410030B936 /* objtable.h in Headers */ = {isa = PBXBuildFile; fileRef = 3701072C0CCD3D410030B936 /* objtable.h */; };
+ 371D8D6A0CFB6E3800170BF6 /* objmacro.c in Sources */ = {isa = PBXBuildFile; fileRef = 371D8D680CFB6E3800170BF6 /* objmacro.c */; };
+ 371D8D6B0CFB6E3800170BF6 /* objmacro.h in Headers */ = {isa = PBXBuildFile; fileRef = 371D8D690CFB6E3800170BF6 /* objmacro.h */; };
+ 371D8D6E0CFB6E7B00170BF6 /* macroapi.c in Sources */ = {isa = PBXBuildFile; fileRef = 371D8D6C0CFB6E7B00170BF6 /* macroapi.c */; };
+ 371D8D6F0CFB6E7B00170BF6 /* macroapi.h in Headers */ = {isa = PBXBuildFile; fileRef = 371D8D6D0CFB6E7B00170BF6 /* macroapi.h */; };
+ 371D8D720CFB6EBD00170BF6 /* macrodlg.c in Sources */ = {isa = PBXBuildFile; fileRef = 371D8D700CFB6EBD00170BF6 /* macrodlg.c */; };
+ 371D8D730CFB6EBD00170BF6 /* macrodlg.h in Headers */ = {isa = PBXBuildFile; fileRef = 371D8D710CFB6EBD00170BF6 /* macrodlg.h */; };
373A56D80BA5EE190055ED6F /* split_query.c in Sources */ = {isa = PBXBuildFile; fileRef = 373A56D60BA5EE190055ED6F /* split_query.c */; };
373A56D90BA5EE190055ED6F /* split_query.h in Headers */ = {isa = PBXBuildFile; fileRef = 373A56D70BA5EE190055ED6F /* split_query.h */; };
37569ACC0B9E06AA00AD4AB8 /* objscoremat.c in Sources */ = {isa = PBXBuildFile; fileRef = 37569ACB0B9E06AA00AD4AB8 /* objscoremat.c */; };
@@ -16,6 +24,7 @@
377925DF0BBD631100A61171 /* index_ungapped.h in Headers */ = {isa = PBXBuildFile; fileRef = 377925DD0BBD631100A61171 /* index_ungapped.h */; };
377B18A50BA7302000CFED28 /* gencode_singleton.c in Sources */ = {isa = PBXBuildFile; fileRef = 377B18A30BA7302000CFED28 /* gencode_singleton.c */; };
377B18A60BA7302000CFED28 /* gencode_singleton.h in Headers */ = {isa = PBXBuildFile; fileRef = 377B18A40BA7302000CFED28 /* gencode_singleton.h */; };
+ 379194780D2ED0700013E717 /* sqnutil4.c in Sources */ = {isa = PBXBuildFile; fileRef = 379194770D2ED0700013E717 /* sqnutil4.c */; };
379C4E2A0B4D973B0013063F /* netcnfg.c in Sources */ = {isa = PBXBuildFile; fileRef = 379C4E250B4D973B0013063F /* netcnfg.c */; };
379C4E2B0B4D973B0013063F /* netcnfg.h in Headers */ = {isa = PBXBuildFile; fileRef = 379C4E260B4D973B0013063F /* netcnfg.h */; };
37B126A90B6FF73000C686CA /* mla2api.c in Sources */ = {isa = PBXBuildFile; fileRef = 37B126A80B6FF73000C686CA /* mla2api.c */; };
@@ -1017,6 +1026,14 @@
/* Begin PBXFileReference section */
089C1667FE841158C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
08FB77AAFE841565C02AAC07 /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = "<absolute>"; };
+ 3701072B0CCD3D410030B936 /* objtable.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = objtable.c; path = ../../../object/objtable.c; sourceTree = SOURCE_ROOT; };
+ 3701072C0CCD3D410030B936 /* objtable.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = objtable.h; path = ../../../object/objtable.h; sourceTree = SOURCE_ROOT; };
+ 371D8D680CFB6E3800170BF6 /* objmacro.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = objmacro.c; path = ../../../object/objmacro.c; sourceTree = SOURCE_ROOT; };
+ 371D8D690CFB6E3800170BF6 /* objmacro.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = objmacro.h; path = ../../../object/objmacro.h; sourceTree = SOURCE_ROOT; };
+ 371D8D6C0CFB6E7B00170BF6 /* macroapi.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = macroapi.c; path = ../../../api/macroapi.c; sourceTree = SOURCE_ROOT; };
+ 371D8D6D0CFB6E7B00170BF6 /* macroapi.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = macroapi.h; path = ../../../api/macroapi.h; sourceTree = SOURCE_ROOT; };
+ 371D8D700CFB6EBD00170BF6 /* macrodlg.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = macrodlg.c; path = ../../../desktop/macrodlg.c; sourceTree = SOURCE_ROOT; };
+ 371D8D710CFB6EBD00170BF6 /* macrodlg.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = macrodlg.h; path = ../../../desktop/macrodlg.h; sourceTree = SOURCE_ROOT; };
373A56D60BA5EE190055ED6F /* split_query.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = split_query.c; path = ../../../algo/blast/core/split_query.c; sourceTree = SOURCE_ROOT; };
373A56D70BA5EE190055ED6F /* split_query.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = split_query.h; path = ../../../algo/blast/core/split_query.h; sourceTree = SOURCE_ROOT; };
37569ACB0B9E06AA00AD4AB8 /* objscoremat.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = objscoremat.c; path = ../../../object/objscoremat.c; sourceTree = SOURCE_ROOT; };
@@ -1026,6 +1043,7 @@
377925DD0BBD631100A61171 /* index_ungapped.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = index_ungapped.h; path = ../../../algo/blast/core/index_ungapped.h; sourceTree = SOURCE_ROOT; };
377B18A30BA7302000CFED28 /* gencode_singleton.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = gencode_singleton.c; path = ../../../algo/blast/core/gencode_singleton.c; sourceTree = SOURCE_ROOT; };
377B18A40BA7302000CFED28 /* gencode_singleton.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = gencode_singleton.h; path = ../../../algo/blast/core/gencode_singleton.h; sourceTree = SOURCE_ROOT; };
+ 379194770D2ED0700013E717 /* sqnutil4.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = sqnutil4.c; path = ../../../api/sqnutil4.c; sourceTree = SOURCE_ROOT; };
379C4E250B4D973B0013063F /* netcnfg.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = netcnfg.c; path = ../../../network/vibnet/netcnfg.c; sourceTree = SOURCE_ROOT; };
379C4E260B4D973B0013063F /* netcnfg.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = netcnfg.h; path = ../../../network/vibnet/netcnfg.h; sourceTree = SOURCE_ROOT; };
37B126A80B6FF73000C686CA /* mla2api.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = mla2api.c; path = ../../../access/mla2api.c; sourceTree = SOURCE_ROOT; };
@@ -2303,6 +2321,8 @@
37ED9A2B0B41B49B00BA3806 /* lookup_util.h */,
37ED9A2D0B41B49B00BA3806 /* lookup_wrap.h */,
37ED9A860B41B49B00BA3806 /* lsqfetch.h */,
+ 371D8D6D0CFB6E7B00170BF6 /* macroapi.h */,
+ 371D8D710CFB6EBD00170BF6 /* macrodlg.h */,
37ED9B170B41B49C00BA3806 /* mapcn3d.h */,
37ED9CBF0B41B49D00BA3806 /* mapgene.h */,
37ED9D7B0B41B49D00BA3806 /* mapmime.h */,
@@ -2427,6 +2447,7 @@
37ED9D930B41B49D00BA3806 /* objgen.h */,
37ED9D950B41B49D00BA3806 /* objinsdseq.h */,
37ED9D970B41B49D00BA3806 /* objloc.h */,
+ 371D8D690CFB6E3800170BF6 /* objmacro.h */,
37ED9D990B41B49D00BA3806 /* objmdrs.h */,
37ED9D9B0B41B49D00BA3806 /* objmedli.h */,
37ED9A8E0B41B49B00BA3806 /* objmgr.h */,
@@ -2447,6 +2468,7 @@
37ED9D590B41B49D00BA3806 /* objspell.h */,
37ED9DAC0B41B49D00BA3806 /* objsset.h */,
37ED9DAE0B41B49D00BA3806 /* objsub.h */,
+ 3701072C0CCD3D410030B936 /* objtable.h */,
37ED9D620B41B49D00BA3806 /* objtax1.h */,
37ED99910B41B49B00BA3806 /* objtax3.h */,
37ED9DB00B41B49D00BA3806 /* objtseq.h */,
@@ -2802,6 +2824,7 @@
37ED9A810B41B49B00BA3806 /* jzcoll.c */,
37ED9A830B41B49B00BA3806 /* jzmisc.c */,
37ED9A850B41B49B00BA3806 /* lsqfetch.c */,
+ 371D8D6C0CFB6E7B00170BF6 /* macroapi.c */,
37ED9A870B41B49B00BA3806 /* maputil.c */,
37ED9A890B41B49B00BA3806 /* mconsist.c */,
37ED9A8B0B41B49B00BA3806 /* needleman.c */,
@@ -2824,6 +2847,7 @@
37ED9AB00B41B49C00BA3806 /* sqnutil1.c */,
37ED9AB10B41B49C00BA3806 /* sqnutil2.c */,
37ED9AB20B41B49C00BA3806 /* sqnutil3.c */,
+ 379194770D2ED0700013E717 /* sqnutil4.c */,
37ED9AB40B41B49C00BA3806 /* subutil.c */,
37ED9AB60B41B49C00BA3806 /* tofasta.c */,
37ED9AB80B41B49C00BA3806 /* tofile.c */,
@@ -3046,6 +3070,7 @@
37ED9CB70B41B49D00BA3806 /* ingengraph.c */,
37ED9CB90B41B49D00BA3806 /* ingenwin.c */,
37ED9CBB0B41B49D00BA3806 /* layout.c */,
+ 371D8D700CFB6EBD00170BF6 /* macrodlg.c */,
37ED9CBE0B41B49D00BA3806 /* mapgene.c */,
37ED9CC00B41B49D00BA3806 /* medview.c */,
37ED9CC20B41B49D00BA3806 /* prtgene.c */,
@@ -3257,6 +3282,7 @@
37ED9D920B41B49D00BA3806 /* objgen.c */,
37ED9D940B41B49D00BA3806 /* objinsdseq.c */,
37ED9D960B41B49D00BA3806 /* objloc.c */,
+ 371D8D680CFB6E3800170BF6 /* objmacro.c */,
37ED9D980B41B49D00BA3806 /* objmdrs.c */,
37ED9D9A0B41B49D00BA3806 /* objmedli.c */,
37ED9D9C0B41B49D00BA3806 /* objmime.c */,
@@ -3269,6 +3295,7 @@
37ED9DA90B41B49D00BA3806 /* objseq.c */,
37ED9DAB0B41B49D00BA3806 /* objsset.c */,
37ED9DAD0B41B49D00BA3806 /* objsub.c */,
+ 3701072B0CCD3D410030B936 /* objtable.c */,
37ED9DAF0B41B49D00BA3806 /* objtseq.c */,
);
name = object;
@@ -3941,6 +3968,10 @@
373A56D90BA5EE190055ED6F /* split_query.h in Headers */,
377B18A60BA7302000CFED28 /* gencode_singleton.h in Headers */,
377925DF0BBD631100A61171 /* index_ungapped.h in Headers */,
+ 3701072E0CCD3D410030B936 /* objtable.h in Headers */,
+ 371D8D6B0CFB6E3800170BF6 /* objmacro.h in Headers */,
+ 371D8D6F0CFB6E7B00170BF6 /* macroapi.h in Headers */,
+ 371D8D730CFB6EBD00170BF6 /* macrodlg.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -4167,6 +4198,7 @@
37ED9FF10B41B4A000BA3806 /* sqnutil1.c in Sources */,
37ED9FF20B41B4A000BA3806 /* sqnutil2.c in Sources */,
37ED9FF30B41B4A000BA3806 /* sqnutil3.c in Sources */,
+ 379194780D2ED0700013E717 /* sqnutil4.c in Sources */,
37ED9FF50B41B4A000BA3806 /* subutil.c in Sources */,
37ED9FF70B41B4A000BA3806 /* tofasta.c in Sources */,
37ED9FF90B41B4A000BA3806 /* tofile.c in Sources */,
@@ -4520,6 +4552,10 @@
377B18A50BA7302000CFED28 /* gencode_singleton.c in Sources */,
377925DE0BBD631100A61171 /* index_ungapped.c in Sources */,
37DA1FCF0C639E5700223E99 /* ncbi_types.c in Sources */,
+ 3701072D0CCD3D410030B936 /* objtable.c in Sources */,
+ 371D8D6A0CFB6E3800170BF6 /* objmacro.c in Sources */,
+ 371D8D6E0CFB6E7B00170BF6 /* macroapi.c in Sources */,
+ 371D8D720CFB6EBD00170BF6 /* macrodlg.c in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
diff --git a/network/id2arch/id2.asn b/network/id2arch/id2.asn
index 00db0250..f2bf2950 100644
--- a/network/id2arch/id2.asn
+++ b/network/id2arch/id2.asn
@@ -1,4 +1,4 @@
---$Revision: 1.20 $
+--$Revision: 1.21 $
--********************************************************************
--
-- Network Id server network access
@@ -69,7 +69,8 @@ ID2-Request-Get-Seq-id ::= SEQUENCE {
gi (1), -- gi is preferred
text (2), -- text Seq-id (accession etc) is preferred
general (4), -- general Seq-id is preferred
- all (127) -- return all qualified Seq-ids of the sequence
+ all (127), -- return all qualified Seq-ids of the sequence
+ label (128) -- return a sequence string label as general id
} DEFAULT any
}
diff --git a/network/id2arch/id2.h b/network/id2arch/id2.h
index a76dd7ba..2092afb5 100644
--- a/network/id2arch/id2.h
+++ b/network/id2arch/id2.h
@@ -9,8 +9,8 @@
#include <asn.h>
#endif
-static char * asnfilename = "id2.h19";
-static AsnValxNode avnx[62] = {
+static char * asnfilename = "id2.h20";
+static AsnValxNode avnx[63] = {
{20,"set-value" ,1,0.0,&avnx[1] } ,
{20,"get-value" ,2,0.0,&avnx[2] } ,
{20,"force-value" ,3,0.0,&avnx[3] } ,
@@ -29,49 +29,50 @@ static AsnValxNode avnx[62] = {
{20,"mgc" ,16,0.0,&avnx[16] } ,
{20,"hprd" ,32,0.0,&avnx[17] } ,
{20,"sts" ,64,0.0,&avnx[18] } ,
- {20,"trna" ,128,0.0,NULL } ,
+ {20,"trna" ,128,0.0,&avnx[19] } ,
+ {20,"exon" ,512,0.0,NULL } ,
{3,NULL,0,0.0,NULL } ,
{3,NULL,1,0.0,NULL } ,
{3,NULL,1,0.0,NULL } ,
{3,NULL,0,0.0,NULL } ,
{3,NULL,0,0.0,NULL } ,
{3,NULL,0,0.0,NULL } ,
- {20,"none" ,0,0.0,&avnx[26] } ,
- {20,"seq-map" ,1,0.0,&avnx[27] } ,
+ {20,"none" ,0,0.0,&avnx[27] } ,
+ {20,"seq-map" ,1,0.0,&avnx[28] } ,
{20,"seq-data" ,2,0.0,NULL } ,
{3,NULL,0,0.0,NULL } ,
- {20,"warning" ,1,0.0,&avnx[30] } ,
- {20,"failed-command" ,2,0.0,&avnx[31] } ,
- {20,"failed-connection" ,3,0.0,&avnx[32] } ,
- {20,"failed-server" ,4,0.0,&avnx[33] } ,
- {20,"no-data" ,5,0.0,&avnx[34] } ,
- {20,"restricted-data" ,6,0.0,&avnx[35] } ,
- {20,"unsupported-command" ,7,0.0,&avnx[36] } ,
+ {20,"warning" ,1,0.0,&avnx[31] } ,
+ {20,"failed-command" ,2,0.0,&avnx[32] } ,
+ {20,"failed-connection" ,3,0.0,&avnx[33] } ,
+ {20,"failed-server" ,4,0.0,&avnx[34] } ,
+ {20,"no-data" ,5,0.0,&avnx[35] } ,
+ {20,"restricted-data" ,6,0.0,&avnx[36] } ,
+ {20,"unsupported-command" ,7,0.0,&avnx[37] } ,
{20,"invalid-arguments" ,8,0.0,NULL } ,
{3,NULL,0,0.0,NULL } ,
- {20,"live" ,0,0.0,&avnx[39] } ,
- {20,"suppressed-temp" ,1,0.0,&avnx[40] } ,
- {20,"suppressed" ,2,0.0,&avnx[41] } ,
- {20,"dead" ,3,0.0,&avnx[42] } ,
- {20,"protected" ,4,0.0,&avnx[43] } ,
+ {20,"live" ,0,0.0,&avnx[40] } ,
+ {20,"suppressed-temp" ,1,0.0,&avnx[41] } ,
+ {20,"suppressed" ,2,0.0,&avnx[42] } ,
+ {20,"dead" ,3,0.0,&avnx[43] } ,
+ {20,"protected" ,4,0.0,&avnx[44] } ,
{20,"withdrawn" ,5,0.0,NULL } ,
- {20,"seq-entry" ,0,0.0,&avnx[45] } ,
- {20,"seq-annot" ,1,0.0,&avnx[46] } ,
- {20,"id2s-split-info" ,2,0.0,&avnx[47] } ,
+ {20,"seq-entry" ,0,0.0,&avnx[46] } ,
+ {20,"seq-annot" ,1,0.0,&avnx[47] } ,
+ {20,"id2s-split-info" ,2,0.0,&avnx[48] } ,
{20,"id2s-chunk" ,3,0.0,NULL } ,
{3,NULL,0,0.0,NULL } ,
- {20,"asn-binary" ,0,0.0,&avnx[50] } ,
- {20,"asn-text" ,1,0.0,&avnx[51] } ,
+ {20,"asn-binary" ,0,0.0,&avnx[51] } ,
+ {20,"asn-text" ,1,0.0,&avnx[52] } ,
{20,"xml" ,2,0.0,NULL } ,
{3,NULL,0,0.0,NULL } ,
- {20,"none" ,0,0.0,&avnx[54] } ,
- {20,"gzip" ,1,0.0,&avnx[55] } ,
- {20,"nlmzip" ,2,0.0,&avnx[56] } ,
+ {20,"none" ,0,0.0,&avnx[55] } ,
+ {20,"gzip" ,1,0.0,&avnx[56] } ,
+ {20,"nlmzip" ,2,0.0,&avnx[57] } ,
{20,"bzip2" ,3,0.0,NULL } ,
{3,NULL,0,0.0,NULL } ,
{3,NULL,0,0.0,NULL } ,
- {20,"reply" ,0,0.0,&avnx[60] } ,
- {20,"last-octet-string" ,1,0.0,&avnx[61] } ,
+ {20,"reply" ,0,0.0,&avnx[61] } ,
+ {20,"last-octet-string" ,1,0.0,&avnx[62] } ,
{20,"nothing" ,2,0.0,NULL } };
static AsnType atx[148] = {
@@ -124,7 +125,7 @@ static AsnType atx[148] = {
{0, "blob-id" ,128,0,0,0,0,0,0,0,NULL,&atx[47],NULL,0,&atx[52]} ,
{415, "ID2-Blob-Id" ,1,0,0,0,0,0,0,0,NULL,&atx[20],&atx[48],0,&atx[58]} ,
{0, "sat" ,128,0,0,0,0,0,0,0,NULL,&atx[8],NULL,0,&atx[49]} ,
- {0, "sub-sat" ,128,1,0,0,1,0,0,0,&avnx[19],&atx[8],&avnx[11],0,&atx[50]} ,
+ {0, "sub-sat" ,128,1,0,0,1,0,0,0,&avnx[20],&atx[8],&avnx[11],0,&atx[50]} ,
{0, "sat-key" ,128,2,0,0,0,0,0,0,NULL,&atx[8],NULL,0,&atx[51]} ,
{0, "version" ,128,3,0,1,0,0,0,0,NULL,&atx[8],NULL,0,NULL} ,
{0, "resolve" ,128,1,0,0,0,0,0,0,NULL,&atx[20],&atx[53],0,NULL} ,
@@ -135,12 +136,12 @@ static AsnType atx[148] = {
{0, "get-data" ,128,2,0,1,0,0,0,0,NULL,&atx[58],NULL,0,NULL} ,
{416, "ID2-Get-Blob-Details" ,1,0,0,0,0,0,0,0,NULL,&atx[20],&atx[59],0,&atx[77]} ,
{0, "location" ,128,0,0,1,0,0,0,0,NULL,&atx[1],NULL,0,&atx[60]} ,
- {0, "seq-class-level" ,128,1,0,0,1,0,0,0,&avnx[20],&atx[8],NULL,0,&atx[61]} ,
- {0, "descr-level" ,128,2,0,0,1,0,0,0,&avnx[21],&atx[8],NULL,0,&atx[62]} ,
- {0, "descr-type-mask" ,128,3,0,0,1,0,0,0,&avnx[22],&atx[8],NULL,0,&atx[63]} ,
- {0, "annot-type-mask" ,128,4,0,0,1,0,0,0,&avnx[23],&atx[8],NULL,0,&atx[64]} ,
- {0, "feat-type-mask" ,128,5,0,0,1,0,0,0,&avnx[24],&atx[8],NULL,0,&atx[65]} ,
- {0, "sequence-level" ,128,6,0,0,1,0,0,0,&avnx[28],&atx[19],&avnx[25],0,NULL} ,
+ {0, "seq-class-level" ,128,1,0,0,1,0,0,0,&avnx[21],&atx[8],NULL,0,&atx[61]} ,
+ {0, "descr-level" ,128,2,0,0,1,0,0,0,&avnx[22],&atx[8],NULL,0,&atx[62]} ,
+ {0, "descr-type-mask" ,128,3,0,0,1,0,0,0,&avnx[23],&atx[8],NULL,0,&atx[63]} ,
+ {0, "annot-type-mask" ,128,4,0,0,1,0,0,0,&avnx[24],&atx[8],NULL,0,&atx[64]} ,
+ {0, "feat-type-mask" ,128,5,0,0,1,0,0,0,&avnx[25],&atx[8],NULL,0,&atx[65]} ,
+ {0, "sequence-level" ,128,6,0,0,1,0,0,0,&avnx[29],&atx[19],&avnx[26],0,NULL} ,
{0, "reget-blob" ,128,5,0,0,0,0,0,0,NULL,&atx[67],NULL,0,&atx[71]} ,
{412, "ID2-Request-ReGet-Blob" ,1,0,0,0,0,0,0,0,NULL,&atx[20],&atx[68],0,&atx[72]} ,
{0, "blob-id" ,128,0,0,0,0,0,0,0,NULL,&atx[47],NULL,0,&atx[69]} ,
@@ -158,7 +159,7 @@ static AsnType atx[148] = {
{0, "error" ,128,2,0,1,0,0,0,0,NULL,&atx[17],&atx[81],0,&atx[86]} ,
{0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[82],NULL,0,NULL} ,
{418, "ID2-Error" ,1,0,0,0,0,0,0,0,NULL,&atx[20],&atx[83],0,&atx[91]} ,
- {0, "severity" ,128,0,0,0,0,0,0,0,NULL,&atx[19],&avnx[29],0,&atx[84]} ,
+ {0, "severity" ,128,0,0,0,0,0,0,0,NULL,&atx[19],&avnx[30],0,&atx[84]} ,
{0, "retry-delay" ,128,1,0,1,0,0,0,0,NULL,&atx[8],NULL,0,&atx[85]} ,
{0, "message" ,128,2,0,1,0,0,0,0,NULL,&atx[14],NULL,0,NULL} ,
{0, "end-of-reply" ,128,3,0,1,0,0,0,0,NULL,&atx[23],NULL,0,&atx[87]} ,
@@ -179,27 +180,27 @@ static AsnType atx[148] = {
{421, "ID2-Reply-Get-Blob-Id" ,1,0,0,0,0,0,0,0,NULL,&atx[20],&atx[102],0,&atx[111]} ,
{0, "seq-id" ,128,0,0,0,0,0,0,0,NULL,&atx[0],NULL,0,&atx[103]} ,
{0, "blob-id" ,128,1,0,1,0,0,0,0,NULL,&atx[47],NULL,0,&atx[104]} ,
- {0, "split-version" ,128,2,0,0,1,0,0,0,&avnx[37],&atx[8],NULL,0,&atx[105]} ,
+ {0, "split-version" ,128,2,0,0,1,0,0,0,&avnx[38],&atx[8],NULL,0,&atx[105]} ,
{0, "annot-info" ,128,3,0,1,0,0,0,0,NULL,&atx[17],&atx[106],0,&atx[107]} ,
{0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[3],NULL,0,NULL} ,
{0, "end-of-reply" ,128,4,0,1,0,0,0,0,NULL,&atx[23],NULL,0,&atx[108]} ,
{0, "blob-state" ,128,5,0,1,0,0,0,0,NULL,&atx[109],NULL,0,NULL} ,
- {427, "ID2-Blob-State" ,1,0,0,0,0,0,0,0,NULL,&atx[19],&avnx[38],0,&atx[114]} ,
+ {427, "ID2-Blob-State" ,1,0,0,0,0,0,0,0,NULL,&atx[19],&avnx[39],0,&atx[114]} ,
{0, "get-blob-seq-ids" ,128,5,0,0,0,0,0,0,NULL,&atx[111],NULL,0,&atx[121]} ,
{422, "ID2-Reply-Get-Blob-Seq-ids" ,1,0,0,0,0,0,0,0,NULL,&atx[20],&atx[112],0,&atx[122]} ,
{0, "blob-id" ,128,0,0,0,0,0,0,0,NULL,&atx[47],NULL,0,&atx[113]} ,
{0, "ids" ,128,1,0,1,0,0,0,0,NULL,&atx[114],NULL,0,NULL} ,
{428, "ID2-Reply-Data" ,1,0,0,0,0,0,0,0,NULL,&atx[20],&atx[115],0,&atx[143]} ,
- {0, "data-type" ,128,0,0,0,1,0,0,0,&avnx[48],&atx[8],&avnx[44],0,&atx[116]} ,
- {0, "data-format" ,128,1,0,0,1,0,0,0,&avnx[52],&atx[8],&avnx[49],0,&atx[117]} ,
- {0, "data-compression" ,128,2,0,0,1,0,0,0,&avnx[57],&atx[8],&avnx[53],0,&atx[118]} ,
+ {0, "data-type" ,128,0,0,0,1,0,0,0,&avnx[49],&atx[8],&avnx[45],0,&atx[116]} ,
+ {0, "data-format" ,128,1,0,0,1,0,0,0,&avnx[53],&atx[8],&avnx[50],0,&atx[117]} ,
+ {0, "data-compression" ,128,2,0,0,1,0,0,0,&avnx[58],&atx[8],&avnx[54],0,&atx[118]} ,
{0, "data" ,128,3,0,0,0,0,0,0,NULL,&atx[17],&atx[119],0,NULL} ,
{0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[120],NULL,0,NULL} ,
{304, "OCTET STRING" ,0,4,0,0,0,0,0,0,NULL,NULL,NULL,0,NULL} ,
{0, "get-blob" ,128,6,0,0,0,0,0,0,NULL,&atx[122],NULL,0,&atx[126]} ,
{423, "ID2-Reply-Get-Blob" ,1,0,0,0,0,0,0,0,NULL,&atx[20],&atx[123],0,&atx[127]} ,
{0, "blob-id" ,128,0,0,0,0,0,0,0,NULL,&atx[47],NULL,0,&atx[124]} ,
- {0, "split-version" ,128,1,0,0,1,0,0,0,&avnx[58],&atx[8],NULL,0,&atx[125]} ,
+ {0, "split-version" ,128,1,0,0,1,0,0,0,&avnx[59],&atx[8],NULL,0,&atx[125]} ,
{0, "data" ,128,2,0,1,0,0,0,0,NULL,&atx[114],NULL,0,NULL} ,
{0, "reget-blob" ,128,7,0,0,0,0,0,0,NULL,&atx[127],NULL,0,&atx[132]} ,
{424, "ID2-Reply-ReGet-Blob" ,1,0,0,0,0,0,0,0,NULL,&atx[20],&atx[128],0,&atx[133]} ,
@@ -217,7 +218,7 @@ static AsnType atx[148] = {
{0, "blob-id" ,128,0,0,0,0,0,0,0,NULL,&atx[47],NULL,0,&atx[140]} ,
{0, "chunk-id" ,128,1,0,0,0,0,0,0,NULL,&atx[2],NULL,0,&atx[141]} ,
{0, "data" ,128,2,0,1,0,0,0,0,NULL,&atx[114],NULL,0,NULL} ,
- {0, "discard" ,128,5,0,1,0,0,0,0,NULL,&atx[19],&avnx[59],0,NULL} ,
+ {0, "discard" ,128,5,0,1,0,0,0,0,NULL,&atx[19],&avnx[60],0,NULL} ,
{429, "ID2-Blob-Seq-ids" ,1,0,0,0,0,0,0,0,NULL,&atx[17],&atx[144],0,&atx[145]} ,
{0, NULL,1,-1,0,0,0,0,0,0,NULL,&atx[145],NULL,0,NULL} ,
{430, "ID2-Blob-Seq-id" ,1,0,0,0,0,0,0,0,NULL,&atx[20],&atx[146],0,&atx[12]} ,
@@ -225,7 +226,7 @@ static AsnType atx[148] = {
{0, "replaced" ,128,1,0,1,0,0,0,0,NULL,&atx[23],NULL,0,NULL} };
static AsnModule ampx[1] = {
- { "NCBI-ID2Access" , "id2.h19",&atx[0],NULL,NULL,0,0} };
+ { "NCBI-ID2Access" , "id2.h20",&atx[0],NULL,NULL,0,0} };
static AsnValxNodePtr avn = avnx;
static AsnTypePtr at = atx;
diff --git a/network/medarch/client/medutil.c b/network/medarch/client/medutil.c
index 0b81a201..ff59c9fd 100644
--- a/network/medarch/client/medutil.c
+++ b/network/medarch/client/medutil.c
@@ -28,7 +28,7 @@
*
* Version Creation Date: 8/31/93
*
-* $Revision: 6.21 $
+* $Revision: 6.23 $
*
* File Description: Medline Utilities for MedArch
* Assumes user calls MedArchInit and Fini
@@ -44,6 +44,13 @@
*
* RCS Modification History:
* $Log: medutil.c,v $
+* Revision 6.23 2007/12/04 23:29:22 bazhin
+* MergePubIds() renamed to MergeNonPubmedPubIds(). Merging is
+* limited to types DOI and OTHER only.
+*
+* Revision 6.22 2007/12/04 20:07:02 bazhin
+* Added ability to merge input article ids with ones from med server.
+*
* Revision 6.21 2005/02/15 17:45:32 bazhin
* Modified MedlineToISO() function: now in addition to Cit-art.Auth-list.ml
* slot it also looks at Cit-art.Auth-list.Author.Person-id.ml one
@@ -587,6 +594,59 @@ void FindPub(SeqEntryPtr sep, Pointer data, Int4 index, Int2 indent)
}
}
+/**********************************************************/
+static void MergeNonPubmedPubIds(CitArtPtr new, CitArtPtr old)
+{
+ ValNodePtr vnpnew;
+ ValNodePtr vnpold;
+ ValNodePtr vnpoldprev;
+ ValNodePtr vnpoldnext;
+ DbtagPtr dpnew;
+ DbtagPtr dpold;
+
+ if(old->ids == NULL)
+ return;
+
+ vnpoldprev = NULL;
+ for(vnpold = old->ids; vnpold != NULL; vnpold = vnpoldnext)
+ {
+ vnpoldnext = vnpold->next;
+
+ if(vnpold->choice != ARTICLEID_DOI &&
+ vnpold->choice != ARTICLEID_OTHER)
+ {
+ vnpoldprev = vnpold;
+ continue;
+ }
+
+ for(vnpnew = new->ids; vnpnew != NULL; vnpnew = vnpnew->next)
+ {
+ if(vnpnew->choice != vnpold->choice)
+ continue;
+
+ if(vnpnew->choice != ARTICLEID_OTHER)
+ break;
+ dpnew = vnpnew->data.ptrvalue;
+ dpold = vnpold->data.ptrvalue;
+ if(StringCmp(dpold->db, dpnew->db) == 0)
+ break;
+ }
+
+ if(vnpnew != NULL)
+ {
+ vnpoldprev = vnpold;
+ continue;
+ }
+
+ vnpold->next = new->ids;
+ new->ids = vnpold;
+ if(vnpoldprev == NULL)
+ old->ids = vnpoldnext;
+ else
+ vnpoldprev->next = vnpoldnext;
+ }
+}
+
/*****************************************************************************
*
* FixPub(pub, fpop)
@@ -637,6 +697,9 @@ ValNodePtr FixPub(ValNodePtr pub, FindPubOptionPtr fpop)
if(ten_authors(pub->data.ptrvalue, tmp->data.ptrvalue))
{
fpop->fetches_succeeded++;
+ if(fpop->merge_ids != FALSE)
+ MergeNonPubmedPubIds(tmp->data.ptrvalue,
+ pub->data.ptrvalue);
PubFree(pub);
pub = ValNodeNew(tmp);
pub->choice = PUB_PMid;
@@ -996,6 +1059,10 @@ ValNodePtr FixPubEquiv(ValNodePtr pube, FindPubOptionPtr fpop)
pube = FixPubEquivAppend(pube, tmp2, tmp);
tmp->next = new;
+ if(fpop->merge_ids != FALSE)
+ MergeNonPubmedPubIds(new->data.ptrvalue,
+ citartptr->data.ptrvalue);
+
PubFree(citartptr);
citartptr = new;
}
diff --git a/network/medarch/client/medutil.h b/network/medarch/client/medutil.h
index daf20b22..88a2d90a 100644
--- a/network/medarch/client/medutil.h
+++ b/network/medarch/client/medutil.h
@@ -29,7 +29,7 @@
*
* Version Creation Date: 8/31/93
*
-* $Revision: 6.2 $
+* $Revision: 6.3 $
*
* File Description: * File Description: Medline Utilities for MedArch
* Assumes user calls MedArchInit and Fini
@@ -45,6 +45,10 @@
*
* RCS Modification History:
* $Log: medutil.h,v $
+* Revision 6.3 2007/12/04 20:06:35 bazhin
+* Added Boolean variable "merge_ids" to merge input article
+* ids with ones from med server.
+*
* Revision 6.2 2003/03/25 19:14:50 bazhin
* Function "ten_authors()" became public (from static).
*
@@ -93,6 +97,9 @@ typedef struct findpubstr {
lookups_succeeded, /* citartmatch worked */
fetches_attempted, /* FetchPubs tried */
fetches_succeeded; /* FetchPubs that worked */
+ Boolean merge_ids; /* If TRUE then merges Cit-art.ids from
+ input Cit-sub and one gotten from
+ med server. */
} FindPubOption, PNTR FindPubOptionPtr;
/* SeqEntryExplore callback to fix all Pubs */
diff --git a/network/taxon1/taxon2/txcdproc.c b/network/taxon1/taxon2/txcdproc.c
index b7a11b97..98df8b42 100644
--- a/network/taxon1/taxon2/txcdproc.c
+++ b/network/taxon1/taxon2/txcdproc.c
@@ -29,7 +29,7 @@
*
* Version Creation Date: 07/15/97
*
-* $Revision: 1.17 $
+* $Revision: 1.18 $
*
* File Description:
* API for Taxonomy service
@@ -44,6 +44,9 @@
*
* RCS Modification History:
* $Log: txcdproc.c,v $
+* Revision 1.18 2007/09/14 18:28:47 soussov
+* fixes bug in init function (it now calls NetFini instead of TaxArchFini
+*
* Revision 1.17 2006/07/13 17:14:49 bollin
* use Uint4 instead of Uint2 for itemID values
*
@@ -199,7 +202,7 @@ static Boolean TaxServInit(void)
if (svcp == NULL) {
ErrPostEx(SEV_ERROR, 0, 0, "NI_ServiceGet [%s] (%s)", ni_errlist[ni_errno], ni_errtext);
- TaxServFini();
+ NetFini();
return FALSE;
}
diff --git a/object/objalign.c b/object/objalign.c
index b455e527..4f32cc5a 100644
--- a/object/objalign.c
+++ b/object/objalign.c
@@ -29,7 +29,7 @@
*
* Version Creation Date: 4/1/91
*
-* $Revision: 6.14 $
+* $Revision: 6.15 $
*
* File Description: Object manager for module NCBI-Seqalign
*
@@ -332,6 +332,7 @@ NLM_EXTERN SeqAlignPtr LIBCALL SeqAlignFree (SeqAlignPtr sap)
{
DenseDiagPtr ddp, ddpnext;
StdSegPtr ssp, sspnext;
+ ValNodePtr anp, next;
if (sap == NULL)
return (SeqAlignPtr)NULL;
@@ -373,7 +374,16 @@ NLM_EXTERN SeqAlignPtr LIBCALL SeqAlignFree (SeqAlignPtr sap)
break;
}
ScoreSetFree(sap->score);
+ anp = sap->id;
+ while (anp != NULL) {
+ next = anp->next;
+ ObjectIdFree((ObjectIdPtr)anp->data.ptrvalue);
+ MemFree(anp);
+ anp = next;
+ }
+ /*
AsnGenericChoiceSeqOfFree(sap -> id, (AsnOptFreeFunc) ObjectIdFree);
+ */
AsnGenericUserSeqOfFree(sap -> ext, (AsnOptFreeFunc) UserObjectFree);
SeqLocSetFree(sap->bounds);
SeqIdFree(sap->master);
@@ -397,6 +407,7 @@ NLM_EXTERN Boolean LIBCALL SeqAlignAsnWrite (SeqAlignPtr sap, AsnIoPtr aip, AsnT
DenseDiagPtr ddp;
StdSegPtr ssp;
Boolean retval = FALSE;
+ ValNodePtr anp;
if (! loaded)
{
@@ -509,8 +520,18 @@ NLM_EXTERN Boolean LIBCALL SeqAlignAsnWrite (SeqAlignPtr sap, AsnIoPtr aip, AsnT
{
ErrPostEx(SEV_ERROR,0,0,"ASN3: SeqAlign.id stripped");
}
- else
- AsnGenericChoiceSeqOfAsnWrite(sap -> id, (AsnWriteFunc) ObjectIdAsnWrite, aip, SEQ_ALIGN_id, SEQ_ALIGN_id_E);
+ else {
+ if (! AsnOpenStruct(aip, SEQ_ALIGN_id, (Pointer)sap->id)) goto erret;
+ anp = sap->id;
+ while (anp != NULL) {
+ if (! ObjectIdAsnWrite((ObjectIdPtr)anp->data.ptrvalue, aip, SEQ_ALIGN_id_E)) goto erret;
+ anp = anp->next;
+ }
+ if (! AsnCloseStruct(aip, SEQ_ALIGN_id, (Pointer)sap->id)) goto erret;
+ /*
+ AsnGenericChoiceSeqOfAsnWrite(sap -> id, (AsnWriteFunc) ObjectIdAsnWrite, aip, SEQ_ALIGN_id, SEQ_ALIGN_id_E);
+ */
+ }
}
if (sap->ext != NULL)
@@ -548,6 +569,8 @@ NLM_EXTERN SeqAlignPtr LIBCALL SeqAlignAsnRead (AsnIoPtr aip, AsnTypePtr orig)
DenseDiagPtr currddp = NULL, ddp;
StdSegPtr currssp = NULL, ssp;
Boolean isError = FALSE;
+ ValNodePtr anp, prev = NULL;
+ ObjectIdPtr oip;
if (! loaded)
{
@@ -669,7 +692,25 @@ NLM_EXTERN SeqAlignPtr LIBCALL SeqAlignAsnRead (AsnIoPtr aip, AsnTypePtr orig)
}
else if (atp == SEQ_ALIGN_id)
{
+ if (AsnReadVal (aip, atp, &av) <= 0) goto erret; /* START_STRUCT */
+ while ((atp = AsnReadId(aip, amp, atp)) == SEQ_ALIGN_id_E) {
+ oip = ObjectIdAsnRead (aip, atp);
+ if (oip == NULL) goto erret;
+ anp = ValNodeNew (NULL);
+ if (anp == NULL) goto erret;
+ anp->data.ptrvalue = (Pointer) oip;
+ if (sap->id == NULL) {
+ sap->id = anp;
+ }
+ if (prev != NULL) {
+ prev->next = anp;
+ }
+ prev = anp;
+ }
+ if (AsnReadVal (aip, atp, &av) <= 0) goto erret; /* END_STRUCT */
+ /*
sap->id = AsnGenericChoiceSeqOfAsnRead(aip, amp, atp, &isError, (AsnReadFunc) ObjectIdAsnRead, (AsnOptFreeFunc) ObjectIdFree);
+ */
if (sap->id == NULL)
goto erret;
}
diff --git a/object/objfdef.c b/object/objfdef.c
index 586a2e6d..f3a2f62b 100644
--- a/object/objfdef.c
+++ b/object/objfdef.c
@@ -29,7 +29,7 @@
*
* Version Creation Date: 9/94
*
-* $Revision: 6.32 $
+* $Revision: 6.36 $
*
* File Description: Object manager for feature definitions
*
@@ -613,8 +613,8 @@ static CharPtr featDefSetMemStr = "FeatDefGroupSet ::= {\n" \
"{ typelabel \"mRNA\" , menulabel \"Mature Messenger RNA\" , featdef-key 6 , seqfeat-key 5 , entrygroup 2 , displaygroup 2 , molgroup na } ,\n" \
"{ typelabel \"tRNA\" , menulabel \"Transfer RNA\" , featdef-key 7 , seqfeat-key 5 , entrygroup 3 , displaygroup 3 , molgroup na } ,\n" \
"{ typelabel \"rRNA\" , menulabel \"Ribosomal RNA\" , featdef-key 8 , seqfeat-key 5 , entrygroup 3 , displaygroup 3 , molgroup na } ,\n" \
-"{ typelabel \"snRNA\" , menulabel \"Small Nuclear RNA\" , featdef-key 9 , seqfeat-key 5 , entrygroup 3 , displaygroup 3 , molgroup na } ,\n" \
-"{ typelabel \"scRNA\" , menulabel \"Small Cytoplasmic RNA\" , featdef-key 10 , seqfeat-key 5 , entrygroup 3 , displaygroup 3 , molgroup na } ,\n" \
+"{ typelabel \"snRNA\" , menulabel \"Small Nuclear RNA\" , featdef-key 9 , seqfeat-key 5 , entrygroup 0 , displaygroup 3 , molgroup na } ,\n" \
+"{ typelabel \"scRNA\" , menulabel \"Small Cytoplasmic RNA\" , featdef-key 10 , seqfeat-key 5 , entrygroup 0 , displaygroup 3 , molgroup na } ,\n" \
"{ typelabel \"RNA\" , menulabel \"Other Types of RNA\" , featdef-key 11 , seqfeat-key 5 , entrygroup 3 , displaygroup 3 , molgroup na } ,\n" \
"{ typelabel \"Cit\" , menulabel \"Bibliographic Citations\" , featdef-key 12 , seqfeat-key 6 , entrygroup 4 , displaygroup 4 , molgroup both } ,\n" \
"{ typelabel \"Xref\" , menulabel \"Reference to Another Sequence\" , featdef-key 13 , seqfeat-key 7 , entrygroup 4 , displaygroup 4 , molgroup both } ,\n" \
@@ -694,10 +694,12 @@ static CharPtr featDefSetMemStr = "FeatDefGroupSet ::= {\n" \
"{ typelabel \"mat_peptide\" , menulabel \"Mature Peptide\" , featdef-key 87 , seqfeat-key 4 , entrygroup 1 , displaygroup 1 , molgroup aa } ,\n" \
"{ typelabel \"sig_peptide\" , menulabel \"Signal Peptide\" , featdef-key 88 , seqfeat-key 4 , entrygroup 1 , displaygroup 1 , molgroup aa } ,\n" \
"{ typelabel \"transit_peptide\" , menulabel \"Transit Peptide\" , featdef-key 89 , seqfeat-key 4 , entrygroup 1 , displaygroup 1 , molgroup aa } ,\n" \
-"{ typelabel \"snoRNA\" , menulabel \"Small Nucleolar RNA\" , featdef-key 90 , seqfeat-key 5 , entrygroup 3 , displaygroup 3 , molgroup na } ,\n" \
+"{ typelabel \"snoRNA\" , menulabel \"Small Nucleolar RNA\" , featdef-key 90 , seqfeat-key 5 , entrygroup 0 , displaygroup 3 , molgroup na } ,\n" \
"{ typelabel \"gap\" , menulabel \"Gap\" , featdef-key 91 , seqfeat-key 8 , entrygroup 0 , displaygroup 4 , molgroup na } ,\n" \
"{ typelabel \"operon\" , menulabel \"Operon\" , featdef-key 92 , seqfeat-key 8 , entrygroup 1 , displaygroup 1 , molgroup na } ,\n" \
-"{ typelabel \"oriT\" , menulabel \"Origin of Transcription\" , featdef-key 93 , seqfeat-key 8 , entrygroup 5 , displaygroup 5 , molgroup na } } };\n";
+"{ typelabel \"oriT\" , menulabel \"Origin of Transcription\" , featdef-key 93 , seqfeat-key 8 , entrygroup 5 , displaygroup 5 , molgroup na } ,\n" \
+"{ typelabel \"ncRNA\" , menulabel \"Non-coding RNA\" , featdef-key 94 , seqfeat-key 5 , entrygroup 3 , displaygroup 3 , molgroup na } ,\n" \
+"{ typelabel \"tmRNA\" , menulabel \"Transfer-messenger RNA\" , featdef-key 95 , seqfeat-key 5 , entrygroup 3 , displaygroup 3 , molgroup na } } };\n";
#endif
/*****************************************************************************
@@ -930,8 +932,8 @@ NLM_EXTERN Uint1 LIBCALL FindFeatDefType(SeqFeatPtr sfp)
if (rrp->ext.choice == 1) {
name = (CharPtr) rrp->ext.value.ptrvalue;
if (StringICmp (name, "misc_RNA") == 0) return FEATDEF_otherRNA;
- if (StringICmp (name, "ncRNA") == 0) return FEATDEF_otherRNA; /* FEATDEF_ncRNA */
- if (StringICmp (name, "tmRNA") == 0) return FEATDEF_otherRNA; /* FEATDEF_tmRNA */
+ if (StringICmp (name, "ncRNA") == 0) return FEATDEF_ncRNA;
+ if (StringICmp (name, "tmRNA") == 0) return FEATDEF_tmRNA;
}
return FEATDEF_otherRNA;
}
@@ -1132,7 +1134,15 @@ protref: if (prp->name != NULL)
}
break;
case 1:
- label = (CharPtr)(trrp->ext.value.ptrvalue);
+ label = (CharPtr)(trrp->ext.value.ptrvalue);
+ if (StringCmp (label, "ncRNA") == 0 || StringCmp (label, "tmRNA") == 0 || StringCmp (label, "misc_RNA") == 0) {
+ for (gbp = sfp->qual; gbp != NULL; gbp = gbp->next) {
+ if (StringICmp ("product", gbp->qual) == 0) {
+ label = gbp->val;
+ break;
+ }
+ }
+ }
if (label != NULL) {
if (StringStr(label, typelabel) != NULL)
prefix = NULL;
@@ -1415,7 +1425,6 @@ NLM_EXTERN Int2 LIBCALL FeatDefLabel (SeqFeatPtr sfp, CharPtr buf, Int2 buflen,
{
Int2 len, i, diff;
CharPtr curr, typelabel, tmp;
- Uint1 extras = 0;
Char tbuf[40];
ImpFeatPtr ifp;
FeatDefPtr fdp;
diff --git a/object/objgen.c b/object/objgen.c
index c32da8b2..2c2b5f61 100644
--- a/object/objgen.c
+++ b/object/objgen.c
@@ -29,7 +29,7 @@
*
* Version Creation Date: 1/1/91
*
-* $Revision: 6.12 $
+* $Revision: 6.14 $
*
* File Description: Object manager for module NCBI-General
*
@@ -43,6 +43,12 @@
* it is linked as a DLL).
*
* $Log: objgen.c,v $
+* Revision 6.14 2008/01/25 15:24:21 kans
+* in UserFieldAsnRead, finished implementing ints, reals, oss as list, does not need num in advance
+*
+* Revision 6.13 2008/01/24 23:05:55 kans
+* User-field.strs stores strings as list, does not need num supplied in advance - have not done ints, reals, oss yet
+*
* Revision 6.12 2005/05/18 17:30:16 bollin
* added NameStdMatch and PersonIdMatch functions
*
@@ -1849,6 +1855,7 @@ NLM_EXTERN UserFieldPtr LIBCALL UserFieldAsnRead (AsnIoPtr aip, AsnTypePtr orig)
FloatHiPtr fp;
UserFieldPtr ufpa, ufpb = NULL;
UserObjectPtr uopa, uopb = NULL;
+ ValNodePtr vnp, first = NULL, last = NULL;
static char * emsg1 = "Too many %s in UserField. line %ld",
* emsg2 = "Too few %s in UserField. line %ld";
@@ -1901,108 +1908,174 @@ NLM_EXTERN UserFieldPtr LIBCALL UserFieldAsnRead (AsnIoPtr aip, AsnTypePtr orig)
{
ufp->choice = 7;
if (AsnReadVal(aip, atp, &av) <= 0) goto erret; /* start SEQUENCE OF */
- ufp->data.ptrvalue = MemNew((size_t)(sizeof(CharPtr) * num));
- if (ufp->data.ptrvalue == NULL)
- goto erret;
- cpp = (CharPtr PNTR) ufp->data.ptrvalue;
+
while ((atp = AsnReadId(aip, amp, atp)) == USER_FIELD_data_strs_E)
{
- if (i >= num)
+ if (num > 0 && i >= num)
{
ErrPost(CTX_NCBIOBJ,1, emsg1, "strs", aip->linenumber);
goto erret;
}
if (AsnReadVal(aip, atp, &av) <= 0) goto erret;
+ /*
cpp[i] = (CharPtr)av.ptrvalue;
+ */
+ vnp = ValNodeAddStr (&last, 0, (CharPtr)av.ptrvalue);
+ if (first == NULL) {
+ first = vnp;
+ }
+ last = vnp;
i++;
}
if (atp == NULL) goto erret;
- if (i != num)
+ if (num > 0 && i != num)
{
ErrPost(CTX_NCBIOBJ,1, emsg2, "strs", aip->linenumber);
goto erret;
}
if (AsnReadVal(aip, atp, &av) <= 0) goto erret; /* end SEQUENCE OF */
+
+ num = i;
+ ufp->num = num;
+
+ ufp->data.ptrvalue = MemNew((size_t)(sizeof(CharPtr) * num));
+ cpp = (CharPtr PNTR) ufp->data.ptrvalue;
+ if (cpp == NULL) goto erret;
+ for (vnp = first, i = 0; vnp != NULL && i < num; vnp = vnp->next, i++) {
+ cpp [i] = (CharPtr) vnp->data.ptrvalue;
+ }
+
+ ValNodeFree (first);
}
else if (atp == USER_FIELD_data_ints)
{
ufp->choice = 8;
if (AsnReadVal(aip, atp, &av) <= 0) goto erret; /* start SEQUENCE OF */
- ufp->data.ptrvalue = MemNew((size_t)(sizeof(Int4) * num));
- ip = (Int4Ptr) ufp->data.ptrvalue;
- if (ip == NULL) goto erret;
+
while ((atp = AsnReadId(aip, amp, atp)) == USER_FIELD_data_ints_E)
{
- if (i >= num)
+ if (num > 0 && i >= num)
{
ErrPost(CTX_NCBIOBJ,1, emsg1, "ints", aip->linenumber);
goto erret;
}
if (AsnReadVal(aip, atp, &av) <= 0) goto erret;
+ /*
ip[i] = av.intvalue;
+ */
+ vnp = ValNodeAddInt (&last, 0, (Int4)av.intvalue);
+ if (first == NULL) {
+ first = vnp;
+ }
+ last = vnp;
i++;
}
if (atp == NULL) goto erret;
- if (i != num)
+ if (num > 0 && i != num)
{
ErrPost(CTX_NCBIOBJ,1, emsg2, "ints", aip->linenumber);
goto erret;
}
if (AsnReadVal(aip, atp, &av) <= 0) goto erret; /* end SEQUENCE OF */
+
+ num = i;
+ ufp->num = num;
+
+ ufp->data.ptrvalue = MemNew((size_t)(sizeof(Int4) * num));
+ ip = (Int4Ptr) ufp->data.ptrvalue;
+ if (ip == NULL) goto erret;
+ for (vnp = first, i = 0; vnp != NULL && i < num; vnp = vnp->next, i++) {
+ ip [i] = (Int4) vnp->data.intvalue;
+ }
+
+ ValNodeFree (first);
}
else if (atp == USER_FIELD_data_reals)
{
ufp->choice = 9;
if (AsnReadVal(aip, atp, &av) <= 0) goto erret; /* start SEQUENCE OF */
- ufp->data.ptrvalue = MemNew((size_t)(sizeof(FloatHi) * num));
- fp = (FloatHiPtr) ufp->data.ptrvalue;
- if (fp == NULL)
- goto erret;
+
while ((atp = AsnReadId(aip, amp, atp)) == USER_FIELD_data_reals_E)
{
- if (i >= num)
+ if (num > 0 && i >= num)
{
ErrPost(CTX_NCBIOBJ,1, emsg1, "reals", aip->linenumber);
goto erret;
}
if (AsnReadVal(aip, atp, &av) <= 0) goto erret;
+ /*
fp[i] = av.realvalue;
+ */
+ vnp = ValNodeAddFloat (&last, 0, (FloatHi)av.realvalue);
+ if (first == NULL) {
+ first = vnp;
+ }
+ last = vnp;
i++;
}
if (atp == NULL) goto erret;
- if (i != num)
+ if (num > 0 && i != num)
{
ErrPost(CTX_NCBIOBJ,1, emsg2, "reals", aip->linenumber);
goto erret;
}
if (AsnReadVal(aip, atp, &av) <= 0) goto erret; /* end SEQUENCE OF */
+
+ num = i;
+ ufp->num = num;
+
+ ufp->data.ptrvalue = MemNew((size_t)(sizeof(FloatHi) * num));
+ fp = (FloatHiPtr) ufp->data.ptrvalue;
+ if (fp == NULL) goto erret;
+ for (vnp = first, i = 0; vnp != NULL && i < num; vnp = vnp->next, i++) {
+ fp [i] = (FloatHi) vnp->data.realvalue;
+ }
+
+ ValNodeFree (first);
}
else if (atp == USER_FIELD_data_oss)
{
ufp->choice = 10;
if (AsnReadVal(aip, atp, &av) <= 0) goto erret; /* start SEQUENCE OF */
- ufp->data.ptrvalue = MemNew((size_t)(sizeof(ByteStorePtr) * num));
- bpp = (ByteStorePtr PNTR) ufp->data.ptrvalue;
- if (bpp == NULL)
- goto erret;
+
while ((atp = AsnReadId(aip, amp, atp)) == USER_FIELD_data_oss_E)
{
- if (i >= num)
+ if (num > 0 && i >= num)
{
ErrPost(CTX_NCBIOBJ,1, emsg1, "oss", aip->linenumber);
goto erret;
}
if (AsnReadVal(aip, atp, &av) <= 0) goto erret;
+ /*
bpp[i] = (ByteStorePtr)av.ptrvalue;
+ */
+ vnp = ValNodeAddPointer (&last, 0, (Pointer)av.ptrvalue);
+ if (first == NULL) {
+ first = vnp;
+ }
+ last = vnp;
i++;
}
if (atp == NULL) goto erret;
- if (i != num)
+ if (num > 0 && i != num)
{
ErrPost(CTX_NCBIOBJ,1, emsg2, "oss", aip->linenumber);
goto erret;
}
if (AsnReadVal(aip, atp, &av) <= 0) goto erret; /* end SEQUENCE OF */
+
+ num = i;
+ ufp->num = num;
+
+ ufp->data.ptrvalue = MemNew((size_t)(sizeof(ByteStorePtr) * num));
+ bpp = (ByteStorePtr PNTR) ufp->data.ptrvalue;
+ if (bpp == NULL) goto erret;
+
+ for (vnp = first, i = 0; vnp != NULL && i < num; vnp = vnp->next, i++) {
+ bpp [i] = (ByteStorePtr) vnp->data.ptrvalue;
+ }
+
+ ValNodeFree (first);
}
else if (atp == USER_FIELD_data_fields)
{
diff --git a/object/objloc.c b/object/objloc.c
index a30f65be..1a9acc4c 100644
--- a/object/objloc.c
+++ b/object/objloc.c
@@ -29,7 +29,7 @@
*
* Version Creation Date: 4/1/91
*
-* $Revision: 6.10 $
+* $Revision: 6.11 $
*
* File Description: Object manager for module NCBI-Seqloc
*
@@ -41,6 +41,9 @@
*
*
* $Log: objloc.c,v $
+* Revision 6.11 2007/10/04 14:30:35 madden
+* Fix typo in SeqIdDup
+*
* Revision 6.10 2005/04/26 21:33:00 kans
* added SEQID_GPIPE
*
@@ -709,7 +712,7 @@ NLM_EXTERN SeqIdPtr LIBCALL SeqIdDup (SeqIdPtr oldid)
if (bt == NULL) return NULL;
bt->name = StringSave(at->name);
bt->accession = StringSave(at->accession);
- bt->release = StringSave(bt->release);
+ bt->release = StringSave(at->release);
bt->version = at->version;
newid->data.ptrvalue = bt;
break;
diff --git a/object/objmacro.c b/object/objmacro.c
new file mode 100755
index 00000000..1e95379c
--- /dev/null
+++ b/object/objmacro.c
@@ -0,0 +1,10615 @@
+#include <asn.h>
+
+#define NLM_GENERATED_CODE_PROTO
+
+#include <objmacro.h>
+
+static Boolean loaded = FALSE;
+
+#include <asnmacro.h>
+
+#ifndef NLM_EXTERN_LOADS
+#define NLM_EXTERN_LOADS {}
+#endif
+
+NLM_EXTERN Boolean LIBCALL
+objmacroAsnLoad(void)
+{
+
+ if ( ! loaded) {
+ NLM_EXTERN_LOADS
+
+ if ( ! AsnLoad ())
+ return FALSE;
+ loaded = TRUE;
+ }
+
+ return TRUE;
+}
+
+
+
+/**************************************************
+* Generated object loaders for Module NCBI-Macro
+* Generated using ASNCODE Revision: 6.16 at Feb 22, 2008 12:57 PM
+*
+**************************************************/
+
+
+/**************************************************
+*
+* AECRActionNew()
+*
+**************************************************/
+NLM_EXTERN
+AECRActionPtr LIBCALL
+AECRActionNew(void)
+{
+ AECRActionPtr ptr = MemNew((size_t) sizeof(AECRAction));
+
+ return ptr;
+
+}
+
+
+/**************************************************
+*
+* AECRActionFree()
+*
+**************************************************/
+NLM_EXTERN
+AECRActionPtr LIBCALL
+AECRActionFree(AECRActionPtr ptr)
+{
+
+ if(ptr == NULL) {
+ return NULL;
+ }
+ ActionChoiceFree(ptr -> action);
+ ConstraintChoiceSetFree(ptr -> constraint);
+ return MemFree(ptr);
+}
+
+
+/**************************************************
+*
+* AECRActionAsnRead()
+*
+**************************************************/
+NLM_EXTERN
+AECRActionPtr LIBCALL
+AECRActionAsnRead(AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ Boolean isError = FALSE;
+ AsnReadFunc func;
+ AECRActionPtr ptr;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return NULL;
+ }
+ }
+
+ if (aip == NULL) {
+ return NULL;
+ }
+
+ if (orig == NULL) { /* AECRAction ::= (self contained) */
+ atp = AsnReadId(aip, amp, AECR_ACTION);
+ } else {
+ atp = AsnLinkType(orig, AECR_ACTION);
+ }
+ /* link in local tree */
+ if (atp == NULL) {
+ return NULL;
+ }
+
+ ptr = AECRActionNew();
+ if (ptr == NULL) {
+ goto erret;
+ }
+ if (AsnReadVal(aip, atp, &av) <= 0) { /* read the start struct */
+ goto erret;
+ }
+
+ atp = AsnReadId(aip,amp, atp);
+ func = NULL;
+
+ if (atp == AECR_ACTION_action) {
+ ptr -> action = ActionChoiceAsnRead(aip, atp);
+ if (aip -> io_failure) {
+ goto erret;
+ }
+ atp = AsnReadId(aip,amp, atp);
+ }
+ if (atp == AECR_ACTION_constraint) {
+ ptr -> constraint = ConstraintChoiceSetAsnRead(aip, atp);
+ if (aip -> io_failure) {
+ goto erret;
+ }
+ atp = AsnReadId(aip,amp, atp);
+ }
+
+ if (AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ /* end struct */
+
+ret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return ptr;
+
+erret:
+ aip -> io_failure = TRUE;
+ ptr = AECRActionFree(ptr);
+ goto ret;
+}
+
+
+
+/**************************************************
+*
+* AECRActionAsnWrite()
+*
+**************************************************/
+NLM_EXTERN Boolean LIBCALL
+AECRActionAsnWrite(AECRActionPtr ptr, AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ Boolean retval = FALSE;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return FALSE;
+ }
+ }
+
+ if (aip == NULL) {
+ return FALSE;
+ }
+
+ atp = AsnLinkType(orig, AECR_ACTION); /* link local tree */
+ if (atp == NULL) {
+ return FALSE;
+ }
+
+ if (ptr == NULL) { AsnNullValueMsg(aip, atp); goto erret; }
+ if (! AsnOpenStruct(aip, atp, (Pointer) ptr)) {
+ goto erret;
+ }
+
+ if (ptr -> action != NULL) {
+ if ( ! ActionChoiceAsnWrite(ptr -> action, aip, AECR_ACTION_action)) {
+ goto erret;
+ }
+ }
+ if (ptr -> constraint != NULL) {
+ if ( ! ConstraintChoiceSetAsnWrite(ptr -> constraint, aip, AECR_ACTION_constraint)) {
+ goto erret;
+ }
+ }
+ if (! AsnCloseStruct(aip, atp, (Pointer)ptr)) {
+ goto erret;
+ }
+ retval = TRUE;
+
+erret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return retval;
+}
+
+
+
+/**************************************************
+*
+* ParseActionNew()
+*
+**************************************************/
+NLM_EXTERN
+ParseActionPtr LIBCALL
+ParseActionNew(void)
+{
+ ParseActionPtr ptr = MemNew((size_t) sizeof(ParseAction));
+
+ ptr -> capitalization = 0;
+ ptr -> remove_from_parsed = 0;
+ return ptr;
+
+}
+
+
+/**************************************************
+*
+* ParseActionFree()
+*
+**************************************************/
+NLM_EXTERN
+ParseActionPtr LIBCALL
+ParseActionFree(ParseActionPtr ptr)
+{
+
+ if(ptr == NULL) {
+ return NULL;
+ }
+ TextPortionFree(ptr -> portion);
+ ParseSrcFree(ptr -> src);
+ ParseDestFree(ptr -> dest);
+ return MemFree(ptr);
+}
+
+
+/**************************************************
+*
+* ParseActionAsnRead()
+*
+**************************************************/
+NLM_EXTERN
+ParseActionPtr LIBCALL
+ParseActionAsnRead(AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ Boolean isError = FALSE;
+ AsnReadFunc func;
+ ParseActionPtr ptr;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return NULL;
+ }
+ }
+
+ if (aip == NULL) {
+ return NULL;
+ }
+
+ if (orig == NULL) { /* ParseAction ::= (self contained) */
+ atp = AsnReadId(aip, amp, PARSE_ACTION);
+ } else {
+ atp = AsnLinkType(orig, PARSE_ACTION);
+ }
+ /* link in local tree */
+ if (atp == NULL) {
+ return NULL;
+ }
+
+ ptr = ParseActionNew();
+ if (ptr == NULL) {
+ goto erret;
+ }
+ if (AsnReadVal(aip, atp, &av) <= 0) { /* read the start struct */
+ goto erret;
+ }
+
+ atp = AsnReadId(aip,amp, atp);
+ func = NULL;
+
+ if (atp == PARSE_ACTION_portion) {
+ ptr -> portion = TextPortionAsnRead(aip, atp);
+ if (aip -> io_failure) {
+ goto erret;
+ }
+ atp = AsnReadId(aip,amp, atp);
+ }
+ if (atp == PARSE_ACTION_src) {
+ ptr -> src = ParseSrcAsnRead(aip, atp);
+ if (aip -> io_failure) {
+ goto erret;
+ }
+ atp = AsnReadId(aip,amp, atp);
+ }
+ if (atp == PARSE_ACTION_dest) {
+ ptr -> dest = ParseDestAsnRead(aip, atp);
+ if (aip -> io_failure) {
+ goto erret;
+ }
+ atp = AsnReadId(aip,amp, atp);
+ }
+ if (atp == PARSE_ACTION_capitalization) {
+ if ( AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ ptr -> capitalization = av.intvalue;
+ atp = AsnReadId(aip,amp, atp);
+ }
+ if (atp == PARSE_ACTION_remove_from_parsed) {
+ if ( AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ ptr -> remove_from_parsed = av.boolvalue;
+ atp = AsnReadId(aip,amp, atp);
+ }
+ if (atp == PARSE_ACTION_existing_text) {
+ if ( AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ ptr -> existing_text = av.intvalue;
+ atp = AsnReadId(aip,amp, atp);
+ }
+
+ if (AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ /* end struct */
+
+ret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return ptr;
+
+erret:
+ aip -> io_failure = TRUE;
+ ptr = ParseActionFree(ptr);
+ goto ret;
+}
+
+
+
+/**************************************************
+*
+* ParseActionAsnWrite()
+*
+**************************************************/
+NLM_EXTERN Boolean LIBCALL
+ParseActionAsnWrite(ParseActionPtr ptr, AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ Boolean retval = FALSE;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return FALSE;
+ }
+ }
+
+ if (aip == NULL) {
+ return FALSE;
+ }
+
+ atp = AsnLinkType(orig, PARSE_ACTION); /* link local tree */
+ if (atp == NULL) {
+ return FALSE;
+ }
+
+ if (ptr == NULL) { AsnNullValueMsg(aip, atp); goto erret; }
+ if (! AsnOpenStruct(aip, atp, (Pointer) ptr)) {
+ goto erret;
+ }
+
+ if (ptr -> portion != NULL) {
+ if ( ! TextPortionAsnWrite(ptr -> portion, aip, PARSE_ACTION_portion)) {
+ goto erret;
+ }
+ }
+ if (ptr -> src != NULL) {
+ if ( ! ParseSrcAsnWrite(ptr -> src, aip, PARSE_ACTION_src)) {
+ goto erret;
+ }
+ }
+ if (ptr -> dest != NULL) {
+ if ( ! ParseDestAsnWrite(ptr -> dest, aip, PARSE_ACTION_dest)) {
+ goto erret;
+ }
+ }
+ av.intvalue = ptr -> capitalization;
+ retval = AsnWrite(aip, PARSE_ACTION_capitalization, &av);
+ av.boolvalue = ptr -> remove_from_parsed;
+ retval = AsnWrite(aip, PARSE_ACTION_remove_from_parsed, &av);
+ av.intvalue = ptr -> existing_text;
+ retval = AsnWrite(aip, PARSE_ACTION_existing_text, &av);
+ if (! AsnCloseStruct(aip, atp, (Pointer)ptr)) {
+ goto erret;
+ }
+ retval = TRUE;
+
+erret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return retval;
+}
+
+
+
+/**************************************************
+*
+* MacroActionListFree()
+*
+**************************************************/
+NLM_EXTERN
+MacroActionListPtr LIBCALL
+MacroActionListFree(MacroActionListPtr ptr)
+{
+
+ if(ptr == NULL) {
+ return NULL;
+ }
+ AsnGenericChoiceSeqOfFree(ptr, (AsnOptFreeFunc) MacroActionChoiceFree);
+ return NULL;
+}
+
+
+/**************************************************
+*
+* MacroActionListAsnRead()
+*
+**************************************************/
+NLM_EXTERN
+MacroActionListPtr LIBCALL
+MacroActionListAsnRead(AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ Boolean isError = FALSE;
+ AsnReadFunc func;
+ MacroActionListPtr ptr;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return NULL;
+ }
+ }
+
+ if (aip == NULL) {
+ return NULL;
+ }
+
+ if (orig == NULL) { /* MacroActionList ::= (self contained) */
+ atp = AsnReadId(aip, amp, MACRO_ACTION_LIST);
+ } else {
+ atp = AsnLinkType(orig, MACRO_ACTION_LIST);
+ }
+ /* link in local tree */
+ if (atp == NULL) {
+ return NULL;
+ }
+
+ func = NULL;
+
+ ptr = AsnGenericChoiceSeqOfAsnRead(aip, amp, atp, &isError, (AsnReadFunc) MacroActionChoiceAsnRead, (AsnOptFreeFunc) MacroActionChoiceFree);
+ if (isError && ptr == NULL) {
+ goto erret;
+ }
+
+
+
+ret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return ptr;
+
+erret:
+ aip -> io_failure = TRUE;
+ ptr = MacroActionListFree(ptr);
+ goto ret;
+}
+
+
+
+/**************************************************
+*
+* MacroActionListAsnWrite()
+*
+**************************************************/
+NLM_EXTERN Boolean LIBCALL
+MacroActionListAsnWrite(MacroActionListPtr ptr, AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ Boolean retval = FALSE;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return FALSE;
+ }
+ }
+
+ if (aip == NULL) {
+ return FALSE;
+ }
+
+ atp = AsnLinkType(orig, MACRO_ACTION_LIST); /* link local tree */
+ if (atp == NULL) {
+ return FALSE;
+ }
+
+ if (ptr == NULL) { AsnNullValueMsg(aip, atp); goto erret; }
+ retval = AsnGenericChoiceSeqOfAsnWrite(ptr , (AsnWriteFunc) MacroActionChoiceAsnWrite, aip, atp, MACRO_ACTION_LIST_E);
+ retval = TRUE;
+
+erret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return retval;
+}
+
+
+
+/**************************************************
+*
+* StringConstraintNew()
+*
+**************************************************/
+NLM_EXTERN
+StringConstraintPtr LIBCALL
+StringConstraintNew(void)
+{
+ StringConstraintPtr ptr = MemNew((size_t) sizeof(StringConstraint));
+
+ ptr -> match_location = 1;
+ ptr -> case_sensitive = 0;
+ ptr -> whole_word = 0;
+ ptr -> not_present = 0;
+ return ptr;
+
+}
+
+
+/**************************************************
+*
+* StringConstraintFree()
+*
+**************************************************/
+NLM_EXTERN
+StringConstraintPtr LIBCALL
+StringConstraintFree(StringConstraintPtr ptr)
+{
+
+ if(ptr == NULL) {
+ return NULL;
+ }
+ MemFree(ptr -> match_text);
+ return MemFree(ptr);
+}
+
+
+/**************************************************
+*
+* StringConstraintAsnRead()
+*
+**************************************************/
+NLM_EXTERN
+StringConstraintPtr LIBCALL
+StringConstraintAsnRead(AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ Boolean isError = FALSE;
+ AsnReadFunc func;
+ StringConstraintPtr ptr;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return NULL;
+ }
+ }
+
+ if (aip == NULL) {
+ return NULL;
+ }
+
+ if (orig == NULL) { /* StringConstraint ::= (self contained) */
+ atp = AsnReadId(aip, amp, STRING_CONSTRAINT);
+ } else {
+ atp = AsnLinkType(orig, STRING_CONSTRAINT);
+ }
+ /* link in local tree */
+ if (atp == NULL) {
+ return NULL;
+ }
+
+ ptr = StringConstraintNew();
+ if (ptr == NULL) {
+ goto erret;
+ }
+ if (AsnReadVal(aip, atp, &av) <= 0) { /* read the start struct */
+ goto erret;
+ }
+
+ atp = AsnReadId(aip,amp, atp);
+ func = NULL;
+
+ if (atp == STRING_CONSTRAINT_match_text) {
+ if ( AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ ptr -> match_text = av.ptrvalue;
+ atp = AsnReadId(aip,amp, atp);
+ }
+ if (atp == CONSTRAINT_match_location) {
+ if ( AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ ptr -> match_location = av.intvalue;
+ atp = AsnReadId(aip,amp, atp);
+ }
+ if (atp == CONSTRAINT_case_sensitive) {
+ if ( AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ ptr -> case_sensitive = av.boolvalue;
+ atp = AsnReadId(aip,amp, atp);
+ }
+ if (atp == STRING_CONSTRAINT_whole_word) {
+ if ( AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ ptr -> whole_word = av.boolvalue;
+ atp = AsnReadId(aip,amp, atp);
+ }
+ if (atp == STRING_CONSTRAINT_not_present) {
+ if ( AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ ptr -> not_present = av.boolvalue;
+ atp = AsnReadId(aip,amp, atp);
+ }
+
+ if (AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ /* end struct */
+
+ret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return ptr;
+
+erret:
+ aip -> io_failure = TRUE;
+ ptr = StringConstraintFree(ptr);
+ goto ret;
+}
+
+
+
+/**************************************************
+*
+* StringConstraintAsnWrite()
+*
+**************************************************/
+NLM_EXTERN Boolean LIBCALL
+StringConstraintAsnWrite(StringConstraintPtr ptr, AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ Boolean retval = FALSE;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return FALSE;
+ }
+ }
+
+ if (aip == NULL) {
+ return FALSE;
+ }
+
+ atp = AsnLinkType(orig, STRING_CONSTRAINT); /* link local tree */
+ if (atp == NULL) {
+ return FALSE;
+ }
+
+ if (ptr == NULL) { AsnNullValueMsg(aip, atp); goto erret; }
+ if (! AsnOpenStruct(aip, atp, (Pointer) ptr)) {
+ goto erret;
+ }
+
+ if (ptr -> match_text != NULL) {
+ av.ptrvalue = ptr -> match_text;
+ retval = AsnWrite(aip, STRING_CONSTRAINT_match_text, &av);
+ }
+ av.intvalue = ptr -> match_location;
+ retval = AsnWrite(aip, CONSTRAINT_match_location, &av);
+ av.boolvalue = ptr -> case_sensitive;
+ retval = AsnWrite(aip, CONSTRAINT_case_sensitive, &av);
+ av.boolvalue = ptr -> whole_word;
+ retval = AsnWrite(aip, STRING_CONSTRAINT_whole_word, &av);
+ av.boolvalue = ptr -> not_present;
+ retval = AsnWrite(aip, STRING_CONSTRAINT_not_present, &av);
+ if (! AsnCloseStruct(aip, atp, (Pointer)ptr)) {
+ goto erret;
+ }
+ retval = TRUE;
+
+erret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return retval;
+}
+
+
+
+/**************************************************
+*
+* LocationConstraintNew()
+*
+**************************************************/
+NLM_EXTERN
+LocationConstraintPtr LIBCALL
+LocationConstraintNew(void)
+{
+ LocationConstraintPtr ptr = MemNew((size_t) sizeof(LocationConstraint));
+
+ ptr -> strand = 0;
+ ptr -> seq_type = 0;
+ return ptr;
+
+}
+
+
+/**************************************************
+*
+* LocationConstraintFree()
+*
+**************************************************/
+NLM_EXTERN
+LocationConstraintPtr LIBCALL
+LocationConstraintFree(LocationConstraintPtr ptr)
+{
+
+ if(ptr == NULL) {
+ return NULL;
+ }
+ return MemFree(ptr);
+}
+
+
+/**************************************************
+*
+* LocationConstraintAsnRead()
+*
+**************************************************/
+NLM_EXTERN
+LocationConstraintPtr LIBCALL
+LocationConstraintAsnRead(AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ Boolean isError = FALSE;
+ AsnReadFunc func;
+ LocationConstraintPtr ptr;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return NULL;
+ }
+ }
+
+ if (aip == NULL) {
+ return NULL;
+ }
+
+ if (orig == NULL) { /* LocationConstraint ::= (self contained) */
+ atp = AsnReadId(aip, amp, LOCATION_CONSTRAINT);
+ } else {
+ atp = AsnLinkType(orig, LOCATION_CONSTRAINT);
+ }
+ /* link in local tree */
+ if (atp == NULL) {
+ return NULL;
+ }
+
+ ptr = LocationConstraintNew();
+ if (ptr == NULL) {
+ goto erret;
+ }
+ if (AsnReadVal(aip, atp, &av) <= 0) { /* read the start struct */
+ goto erret;
+ }
+
+ atp = AsnReadId(aip,amp, atp);
+ func = NULL;
+
+ if (atp == LOCATION_CONSTRAINT_strand) {
+ if ( AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ ptr -> strand = av.intvalue;
+ atp = AsnReadId(aip,amp, atp);
+ }
+ if (atp == LOCATION_CONSTRAINT_seq_type) {
+ if ( AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ ptr -> seq_type = av.intvalue;
+ atp = AsnReadId(aip,amp, atp);
+ }
+
+ if (AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ /* end struct */
+
+ret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return ptr;
+
+erret:
+ aip -> io_failure = TRUE;
+ ptr = LocationConstraintFree(ptr);
+ goto ret;
+}
+
+
+
+/**************************************************
+*
+* LocationConstraintAsnWrite()
+*
+**************************************************/
+NLM_EXTERN Boolean LIBCALL
+LocationConstraintAsnWrite(LocationConstraintPtr ptr, AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ Boolean retval = FALSE;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return FALSE;
+ }
+ }
+
+ if (aip == NULL) {
+ return FALSE;
+ }
+
+ atp = AsnLinkType(orig, LOCATION_CONSTRAINT); /* link local tree */
+ if (atp == NULL) {
+ return FALSE;
+ }
+
+ if (ptr == NULL) { AsnNullValueMsg(aip, atp); goto erret; }
+ if (! AsnOpenStruct(aip, atp, (Pointer) ptr)) {
+ goto erret;
+ }
+
+ av.intvalue = ptr -> strand;
+ retval = AsnWrite(aip, LOCATION_CONSTRAINT_strand, &av);
+ av.intvalue = ptr -> seq_type;
+ retval = AsnWrite(aip, LOCATION_CONSTRAINT_seq_type, &av);
+ if (! AsnCloseStruct(aip, atp, (Pointer)ptr)) {
+ goto erret;
+ }
+ retval = TRUE;
+
+erret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return retval;
+}
+
+
+
+/**************************************************
+*
+* FeatQualLegalValNew()
+*
+**************************************************/
+NLM_EXTERN
+FeatQualLegalValPtr LIBCALL
+FeatQualLegalValNew(void)
+{
+ FeatQualLegalValPtr ptr = MemNew((size_t) sizeof(FeatQualLegalVal));
+
+ return ptr;
+
+}
+
+
+/**************************************************
+*
+* FeatQualLegalValFree()
+*
+**************************************************/
+NLM_EXTERN
+FeatQualLegalValPtr LIBCALL
+FeatQualLegalValFree(FeatQualLegalValPtr ptr)
+{
+
+ if(ptr == NULL) {
+ return NULL;
+ }
+ MemFree(ptr -> val);
+ return MemFree(ptr);
+}
+
+
+/**************************************************
+*
+* FeatQualLegalValAsnRead()
+*
+**************************************************/
+NLM_EXTERN
+FeatQualLegalValPtr LIBCALL
+FeatQualLegalValAsnRead(AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ Boolean isError = FALSE;
+ AsnReadFunc func;
+ FeatQualLegalValPtr ptr;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return NULL;
+ }
+ }
+
+ if (aip == NULL) {
+ return NULL;
+ }
+
+ if (orig == NULL) { /* FeatQualLegalVal ::= (self contained) */
+ atp = AsnReadId(aip, amp, FEAT_QUAL_LEGAL_VAL);
+ } else {
+ atp = AsnLinkType(orig, FEAT_QUAL_LEGAL_VAL);
+ }
+ /* link in local tree */
+ if (atp == NULL) {
+ return NULL;
+ }
+
+ ptr = FeatQualLegalValNew();
+ if (ptr == NULL) {
+ goto erret;
+ }
+ if (AsnReadVal(aip, atp, &av) <= 0) { /* read the start struct */
+ goto erret;
+ }
+
+ atp = AsnReadId(aip,amp, atp);
+ func = NULL;
+
+ if (atp == FEAT_QUAL_LEGAL_VAL_qual) {
+ if ( AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ ptr -> qual = av.intvalue;
+ atp = AsnReadId(aip,amp, atp);
+ }
+ if (atp == FEAT_QUAL_LEGAL_VAL_val) {
+ if ( AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ ptr -> val = av.ptrvalue;
+ atp = AsnReadId(aip,amp, atp);
+ }
+
+ if (AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ /* end struct */
+
+ret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return ptr;
+
+erret:
+ aip -> io_failure = TRUE;
+ ptr = FeatQualLegalValFree(ptr);
+ goto ret;
+}
+
+
+
+/**************************************************
+*
+* FeatQualLegalValAsnWrite()
+*
+**************************************************/
+NLM_EXTERN Boolean LIBCALL
+FeatQualLegalValAsnWrite(FeatQualLegalValPtr ptr, AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ Boolean retval = FALSE;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return FALSE;
+ }
+ }
+
+ if (aip == NULL) {
+ return FALSE;
+ }
+
+ atp = AsnLinkType(orig, FEAT_QUAL_LEGAL_VAL); /* link local tree */
+ if (atp == NULL) {
+ return FALSE;
+ }
+
+ if (ptr == NULL) { AsnNullValueMsg(aip, atp); goto erret; }
+ if (! AsnOpenStruct(aip, atp, (Pointer) ptr)) {
+ goto erret;
+ }
+
+ av.intvalue = ptr -> qual;
+ retval = AsnWrite(aip, FEAT_QUAL_LEGAL_VAL_qual, &av);
+ if (ptr -> val != NULL) {
+ av.ptrvalue = ptr -> val;
+ retval = AsnWrite(aip, FEAT_QUAL_LEGAL_VAL_val, &av);
+ }
+ if (! AsnCloseStruct(aip, atp, (Pointer)ptr)) {
+ goto erret;
+ }
+ retval = TRUE;
+
+erret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return retval;
+}
+
+
+
+/**************************************************
+*
+* FeatQualLegalValChoiceFree()
+*
+**************************************************/
+NLM_EXTERN
+FeatQualLegalValChoicePtr LIBCALL
+FeatQualLegalValChoiceFree(ValNodePtr anp)
+{
+ Pointer pnt;
+
+ if (anp == NULL) {
+ return NULL;
+ }
+
+ pnt = anp->data.ptrvalue;
+ switch (anp->choice)
+ {
+ default:
+ break;
+ case FeatQualLegalValChoice_qual:
+ FeatQualLegalValFree(anp -> data.ptrvalue);
+ break;
+ }
+ return MemFree(anp);
+}
+
+
+/**************************************************
+*
+* FeatQualLegalValChoiceAsnRead()
+*
+**************************************************/
+NLM_EXTERN
+FeatQualLegalValChoicePtr LIBCALL
+FeatQualLegalValChoiceAsnRead(AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ ValNodePtr anp;
+ Uint1 choice;
+ Boolean isError = FALSE;
+ Boolean nullIsError = FALSE;
+ AsnReadFunc func;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return NULL;
+ }
+ }
+
+ if (aip == NULL) {
+ return NULL;
+ }
+
+ if (orig == NULL) { /* FeatQualLegalValChoice ::= (self contained) */
+ atp = AsnReadId(aip, amp, FEAT_QUAL_LEGAL_VAL_CHOICE);
+ } else {
+ atp = AsnLinkType(orig, FEAT_QUAL_LEGAL_VAL_CHOICE); /* link in local tree */
+ }
+ if (atp == NULL) {
+ return NULL;
+ }
+
+ anp = ValNodeNew(NULL);
+ if (anp == NULL) {
+ goto erret;
+ }
+ if (AsnReadVal(aip, atp, &av) <= 0) { /* read the CHOICE or OpenStruct value (nothing) */
+ goto erret;
+ }
+
+ func = NULL;
+
+ atp = AsnReadId(aip, amp, atp); /* find the choice */
+ if (atp == NULL) {
+ goto erret;
+ }
+ if (atp == FEAT_QUAL_LEGAL_VAL_CHOICE_qual) {
+ choice = FeatQualLegalValChoice_qual;
+ func = (AsnReadFunc) FeatQualLegalValAsnRead;
+ }
+ anp->choice = choice;
+ if (func != NULL)
+ {
+ anp->data.ptrvalue = (* func)(aip, atp);
+ if (aip -> io_failure) goto erret;
+
+ if (nullIsError && anp->data.ptrvalue == NULL) {
+ goto erret;
+ }
+ }
+
+ret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return anp;
+
+erret:
+ anp = MemFree(anp);
+ aip -> io_failure = TRUE;
+ goto ret;
+}
+
+
+/**************************************************
+*
+* FeatQualLegalValChoiceAsnWrite()
+*
+**************************************************/
+NLM_EXTERN Boolean LIBCALL
+FeatQualLegalValChoiceAsnWrite(FeatQualLegalValChoicePtr anp, AsnIoPtr aip, AsnTypePtr orig)
+
+{
+ DataVal av;
+ AsnTypePtr atp, writetype = NULL;
+ Pointer pnt;
+ AsnWriteFunc func = NULL;
+ Boolean retval = FALSE;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad())
+ return FALSE;
+ }
+
+ if (aip == NULL)
+ return FALSE;
+
+ atp = AsnLinkType(orig, FEAT_QUAL_LEGAL_VAL_CHOICE); /* link local tree */
+ if (atp == NULL) {
+ return FALSE;
+ }
+
+ if (anp == NULL) { AsnNullValueMsg(aip, atp); goto erret; }
+
+ av.ptrvalue = (Pointer)anp;
+ if (! AsnWriteChoice(aip, atp, (Int2)anp->choice, &av)) {
+ goto erret;
+ }
+
+ pnt = anp->data.ptrvalue;
+ switch (anp->choice)
+ {
+ case FeatQualLegalValChoice_qual:
+ writetype = FEAT_QUAL_LEGAL_VAL_CHOICE_qual;
+ func = (AsnWriteFunc) FeatQualLegalValAsnWrite;
+ break;
+ }
+ if (writetype != NULL) {
+ retval = (* func)(pnt, aip, writetype); /* write it out */
+ }
+ if (!retval) {
+ goto erret;
+ }
+ retval = TRUE;
+
+erret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return retval;
+}
+
+
+/**************************************************
+*
+* FeatQualLegalSetFree()
+*
+**************************************************/
+NLM_EXTERN
+FeatQualLegalSetPtr LIBCALL
+FeatQualLegalSetFree(FeatQualLegalSetPtr ptr)
+{
+
+ if(ptr == NULL) {
+ return NULL;
+ }
+ AsnGenericChoiceSeqOfFree(ptr, (AsnOptFreeFunc) FeatQualLegalValChoiceFree);
+ return NULL;
+}
+
+
+/**************************************************
+*
+* FeatQualLegalSetAsnRead()
+*
+**************************************************/
+NLM_EXTERN
+FeatQualLegalSetPtr LIBCALL
+FeatQualLegalSetAsnRead(AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ Boolean isError = FALSE;
+ AsnReadFunc func;
+ FeatQualLegalSetPtr ptr;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return NULL;
+ }
+ }
+
+ if (aip == NULL) {
+ return NULL;
+ }
+
+ if (orig == NULL) { /* FeatQualLegalSet ::= (self contained) */
+ atp = AsnReadId(aip, amp, FEAT_QUAL_LEGAL_SET);
+ } else {
+ atp = AsnLinkType(orig, FEAT_QUAL_LEGAL_SET);
+ }
+ /* link in local tree */
+ if (atp == NULL) {
+ return NULL;
+ }
+
+ func = NULL;
+
+ ptr = AsnGenericChoiceSeqOfAsnRead(aip, amp, atp, &isError, (AsnReadFunc) FeatQualLegalValChoiceAsnRead, (AsnOptFreeFunc) FeatQualLegalValChoiceFree);
+ if (isError && ptr == NULL) {
+ goto erret;
+ }
+
+
+
+ret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return ptr;
+
+erret:
+ aip -> io_failure = TRUE;
+ ptr = FeatQualLegalSetFree(ptr);
+ goto ret;
+}
+
+
+
+/**************************************************
+*
+* FeatQualLegalSetAsnWrite()
+*
+**************************************************/
+NLM_EXTERN Boolean LIBCALL
+FeatQualLegalSetAsnWrite(FeatQualLegalSetPtr ptr, AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ Boolean retval = FALSE;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return FALSE;
+ }
+ }
+
+ if (aip == NULL) {
+ return FALSE;
+ }
+
+ atp = AsnLinkType(orig, FEAT_QUAL_LEGAL_SET); /* link local tree */
+ if (atp == NULL) {
+ return FALSE;
+ }
+
+ if (ptr == NULL) { AsnNullValueMsg(aip, atp); goto erret; }
+ retval = AsnGenericChoiceSeqOfAsnWrite(ptr , (AsnWriteFunc) FeatQualLegalValChoiceAsnWrite, aip, atp, FEAT_QUAL_LEGAL_SET_E);
+ retval = TRUE;
+
+erret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return retval;
+}
+
+
+
+/**************************************************
+*
+* FeatQualChoiceFree()
+*
+**************************************************/
+NLM_EXTERN
+FeatQualChoicePtr LIBCALL
+FeatQualChoiceFree(ValNodePtr anp)
+{
+ Pointer pnt;
+
+ if (anp == NULL) {
+ return NULL;
+ }
+
+ pnt = anp->data.ptrvalue;
+ switch (anp->choice)
+ {
+ default:
+ break;
+ case FeatQualChoice_illegal_qual:
+ StringConstraintFree(anp -> data.ptrvalue);
+ break;
+ }
+ return MemFree(anp);
+}
+
+
+/**************************************************
+*
+* FeatQualChoiceAsnRead()
+*
+**************************************************/
+NLM_EXTERN
+FeatQualChoicePtr LIBCALL
+FeatQualChoiceAsnRead(AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ ValNodePtr anp;
+ Uint1 choice;
+ Boolean isError = FALSE;
+ Boolean nullIsError = FALSE;
+ AsnReadFunc func;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return NULL;
+ }
+ }
+
+ if (aip == NULL) {
+ return NULL;
+ }
+
+ if (orig == NULL) { /* FeatQualChoice ::= (self contained) */
+ atp = AsnReadId(aip, amp, FEAT_QUAL_CHOICE);
+ } else {
+ atp = AsnLinkType(orig, FEAT_QUAL_CHOICE); /* link in local tree */
+ }
+ if (atp == NULL) {
+ return NULL;
+ }
+
+ anp = ValNodeNew(NULL);
+ if (anp == NULL) {
+ goto erret;
+ }
+ if (AsnReadVal(aip, atp, &av) <= 0) { /* read the CHOICE or OpenStruct value (nothing) */
+ goto erret;
+ }
+
+ func = NULL;
+
+ atp = AsnReadId(aip, amp, atp); /* find the choice */
+ if (atp == NULL) {
+ goto erret;
+ }
+ if (atp == FEAT_QUAL_CHOICE_legal_qual) {
+ choice = FeatQualChoice_legal_qual;
+ if (AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ anp->data.intvalue = av.intvalue;
+ }
+ else if (atp == FEAT_QUAL_CHOICE_illegal_qual) {
+ choice = FeatQualChoice_illegal_qual;
+ func = (AsnReadFunc) StringConstraintAsnRead;
+ }
+ anp->choice = choice;
+ if (func != NULL)
+ {
+ anp->data.ptrvalue = (* func)(aip, atp);
+ if (aip -> io_failure) goto erret;
+
+ if (nullIsError && anp->data.ptrvalue == NULL) {
+ goto erret;
+ }
+ }
+
+ret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return anp;
+
+erret:
+ anp = MemFree(anp);
+ aip -> io_failure = TRUE;
+ goto ret;
+}
+
+
+/**************************************************
+*
+* FeatQualChoiceAsnWrite()
+*
+**************************************************/
+NLM_EXTERN Boolean LIBCALL
+FeatQualChoiceAsnWrite(FeatQualChoicePtr anp, AsnIoPtr aip, AsnTypePtr orig)
+
+{
+ DataVal av;
+ AsnTypePtr atp, writetype = NULL;
+ Pointer pnt;
+ AsnWriteFunc func = NULL;
+ Boolean retval = FALSE;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad())
+ return FALSE;
+ }
+
+ if (aip == NULL)
+ return FALSE;
+
+ atp = AsnLinkType(orig, FEAT_QUAL_CHOICE); /* link local tree */
+ if (atp == NULL) {
+ return FALSE;
+ }
+
+ if (anp == NULL) { AsnNullValueMsg(aip, atp); goto erret; }
+
+ av.ptrvalue = (Pointer)anp;
+ if (! AsnWriteChoice(aip, atp, (Int2)anp->choice, &av)) {
+ goto erret;
+ }
+
+ pnt = anp->data.ptrvalue;
+ switch (anp->choice)
+ {
+ case FeatQualChoice_legal_qual:
+ av.intvalue = anp->data.intvalue;
+ retval = AsnWrite(aip, FEAT_QUAL_CHOICE_legal_qual, &av);
+ break;
+ case FeatQualChoice_illegal_qual:
+ writetype = FEAT_QUAL_CHOICE_illegal_qual;
+ func = (AsnWriteFunc) StringConstraintAsnWrite;
+ break;
+ }
+ if (writetype != NULL) {
+ retval = (* func)(pnt, aip, writetype); /* write it out */
+ }
+ if (!retval) {
+ goto erret;
+ }
+ retval = TRUE;
+
+erret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return retval;
+}
+
+
+/**************************************************
+*
+* FeatureFieldNew()
+*
+**************************************************/
+NLM_EXTERN
+FeatureFieldPtr LIBCALL
+FeatureFieldNew(void)
+{
+ FeatureFieldPtr ptr = MemNew((size_t) sizeof(FeatureField));
+
+ return ptr;
+
+}
+
+
+/**************************************************
+*
+* FeatureFieldFree()
+*
+**************************************************/
+NLM_EXTERN
+FeatureFieldPtr LIBCALL
+FeatureFieldFree(FeatureFieldPtr ptr)
+{
+
+ if(ptr == NULL) {
+ return NULL;
+ }
+ FeatQualChoiceFree(ptr -> field);
+ return MemFree(ptr);
+}
+
+
+/**************************************************
+*
+* FeatureFieldAsnRead()
+*
+**************************************************/
+NLM_EXTERN
+FeatureFieldPtr LIBCALL
+FeatureFieldAsnRead(AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ Boolean isError = FALSE;
+ AsnReadFunc func;
+ FeatureFieldPtr ptr;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return NULL;
+ }
+ }
+
+ if (aip == NULL) {
+ return NULL;
+ }
+
+ if (orig == NULL) { /* FeatureField ::= (self contained) */
+ atp = AsnReadId(aip, amp, FEATURE_FIELD);
+ } else {
+ atp = AsnLinkType(orig, FEATURE_FIELD);
+ }
+ /* link in local tree */
+ if (atp == NULL) {
+ return NULL;
+ }
+
+ ptr = FeatureFieldNew();
+ if (ptr == NULL) {
+ goto erret;
+ }
+ if (AsnReadVal(aip, atp, &av) <= 0) { /* read the start struct */
+ goto erret;
+ }
+
+ atp = AsnReadId(aip,amp, atp);
+ func = NULL;
+
+ if (atp == FEATURE_FIELD_type) {
+ if ( AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ ptr -> type = av.intvalue;
+ atp = AsnReadId(aip,amp, atp);
+ }
+ if (atp == FEATURE_FIELD_field) {
+ ptr -> field = FeatQualChoiceAsnRead(aip, atp);
+ if (aip -> io_failure) {
+ goto erret;
+ }
+ atp = AsnReadId(aip,amp, atp);
+ }
+
+ if (AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ /* end struct */
+
+ret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return ptr;
+
+erret:
+ aip -> io_failure = TRUE;
+ ptr = FeatureFieldFree(ptr);
+ goto ret;
+}
+
+
+
+/**************************************************
+*
+* FeatureFieldAsnWrite()
+*
+**************************************************/
+NLM_EXTERN Boolean LIBCALL
+FeatureFieldAsnWrite(FeatureFieldPtr ptr, AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ Boolean retval = FALSE;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return FALSE;
+ }
+ }
+
+ if (aip == NULL) {
+ return FALSE;
+ }
+
+ atp = AsnLinkType(orig, FEATURE_FIELD); /* link local tree */
+ if (atp == NULL) {
+ return FALSE;
+ }
+
+ if (ptr == NULL) { AsnNullValueMsg(aip, atp); goto erret; }
+ if (! AsnOpenStruct(aip, atp, (Pointer) ptr)) {
+ goto erret;
+ }
+
+ av.intvalue = ptr -> type;
+ retval = AsnWrite(aip, FEATURE_FIELD_type, &av);
+ if (ptr -> field != NULL) {
+ if ( ! FeatQualChoiceAsnWrite(ptr -> field, aip, FEATURE_FIELD_field)) {
+ goto erret;
+ }
+ }
+ if (! AsnCloseStruct(aip, atp, (Pointer)ptr)) {
+ goto erret;
+ }
+ retval = TRUE;
+
+erret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return retval;
+}
+
+
+
+/**************************************************
+*
+* FeatureFieldLegalNew()
+*
+**************************************************/
+NLM_EXTERN
+FeatureFieldLegalPtr LIBCALL
+FeatureFieldLegalNew(void)
+{
+ FeatureFieldLegalPtr ptr = MemNew((size_t) sizeof(FeatureFieldLegal));
+
+ return ptr;
+
+}
+
+
+/**************************************************
+*
+* FeatureFieldLegalFree()
+*
+**************************************************/
+NLM_EXTERN
+FeatureFieldLegalPtr LIBCALL
+FeatureFieldLegalFree(FeatureFieldLegalPtr ptr)
+{
+
+ if(ptr == NULL) {
+ return NULL;
+ }
+ return MemFree(ptr);
+}
+
+
+/**************************************************
+*
+* FeatureFieldLegalAsnRead()
+*
+**************************************************/
+NLM_EXTERN
+FeatureFieldLegalPtr LIBCALL
+FeatureFieldLegalAsnRead(AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ Boolean isError = FALSE;
+ AsnReadFunc func;
+ FeatureFieldLegalPtr ptr;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return NULL;
+ }
+ }
+
+ if (aip == NULL) {
+ return NULL;
+ }
+
+ if (orig == NULL) { /* FeatureFieldLegal ::= (self contained) */
+ atp = AsnReadId(aip, amp, FEATURE_FIELD_LEGAL);
+ } else {
+ atp = AsnLinkType(orig, FEATURE_FIELD_LEGAL);
+ }
+ /* link in local tree */
+ if (atp == NULL) {
+ return NULL;
+ }
+
+ ptr = FeatureFieldLegalNew();
+ if (ptr == NULL) {
+ goto erret;
+ }
+ if (AsnReadVal(aip, atp, &av) <= 0) { /* read the start struct */
+ goto erret;
+ }
+
+ atp = AsnReadId(aip,amp, atp);
+ func = NULL;
+
+ if (atp == FEATURE_FIELD_LEGAL_type) {
+ if ( AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ ptr -> type = av.intvalue;
+ atp = AsnReadId(aip,amp, atp);
+ }
+ if (atp == FEATURE_FIELD_LEGAL_field) {
+ if ( AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ ptr -> field = av.intvalue;
+ atp = AsnReadId(aip,amp, atp);
+ }
+
+ if (AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ /* end struct */
+
+ret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return ptr;
+
+erret:
+ aip -> io_failure = TRUE;
+ ptr = FeatureFieldLegalFree(ptr);
+ goto ret;
+}
+
+
+
+/**************************************************
+*
+* FeatureFieldLegalAsnWrite()
+*
+**************************************************/
+NLM_EXTERN Boolean LIBCALL
+FeatureFieldLegalAsnWrite(FeatureFieldLegalPtr ptr, AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ Boolean retval = FALSE;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return FALSE;
+ }
+ }
+
+ if (aip == NULL) {
+ return FALSE;
+ }
+
+ atp = AsnLinkType(orig, FEATURE_FIELD_LEGAL); /* link local tree */
+ if (atp == NULL) {
+ return FALSE;
+ }
+
+ if (ptr == NULL) { AsnNullValueMsg(aip, atp); goto erret; }
+ if (! AsnOpenStruct(aip, atp, (Pointer) ptr)) {
+ goto erret;
+ }
+
+ av.intvalue = ptr -> type;
+ retval = AsnWrite(aip, FEATURE_FIELD_LEGAL_type, &av);
+ av.intvalue = ptr -> field;
+ retval = AsnWrite(aip, FEATURE_FIELD_LEGAL_field, &av);
+ if (! AsnCloseStruct(aip, atp, (Pointer)ptr)) {
+ goto erret;
+ }
+ retval = TRUE;
+
+erret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return retval;
+}
+
+
+
+/**************************************************
+*
+* FeatureFieldPairNew()
+*
+**************************************************/
+NLM_EXTERN
+FeatureFieldPairPtr LIBCALL
+FeatureFieldPairNew(void)
+{
+ FeatureFieldPairPtr ptr = MemNew((size_t) sizeof(FeatureFieldPair));
+
+ return ptr;
+
+}
+
+
+/**************************************************
+*
+* FeatureFieldPairFree()
+*
+**************************************************/
+NLM_EXTERN
+FeatureFieldPairPtr LIBCALL
+FeatureFieldPairFree(FeatureFieldPairPtr ptr)
+{
+
+ if(ptr == NULL) {
+ return NULL;
+ }
+ FeatQualChoiceFree(ptr -> field_from);
+ FeatQualChoiceFree(ptr -> field_to);
+ return MemFree(ptr);
+}
+
+
+/**************************************************
+*
+* FeatureFieldPairAsnRead()
+*
+**************************************************/
+NLM_EXTERN
+FeatureFieldPairPtr LIBCALL
+FeatureFieldPairAsnRead(AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ Boolean isError = FALSE;
+ AsnReadFunc func;
+ FeatureFieldPairPtr ptr;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return NULL;
+ }
+ }
+
+ if (aip == NULL) {
+ return NULL;
+ }
+
+ if (orig == NULL) { /* FeatureFieldPair ::= (self contained) */
+ atp = AsnReadId(aip, amp, FEATURE_FIELD_PAIR);
+ } else {
+ atp = AsnLinkType(orig, FEATURE_FIELD_PAIR);
+ }
+ /* link in local tree */
+ if (atp == NULL) {
+ return NULL;
+ }
+
+ ptr = FeatureFieldPairNew();
+ if (ptr == NULL) {
+ goto erret;
+ }
+ if (AsnReadVal(aip, atp, &av) <= 0) { /* read the start struct */
+ goto erret;
+ }
+
+ atp = AsnReadId(aip,amp, atp);
+ func = NULL;
+
+ if (atp == FEATURE_FIELD_PAIR_type) {
+ if ( AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ ptr -> type = av.intvalue;
+ atp = AsnReadId(aip,amp, atp);
+ }
+ if (atp == FEATURE_FIELD_PAIR_field_from) {
+ ptr -> field_from = FeatQualChoiceAsnRead(aip, atp);
+ if (aip -> io_failure) {
+ goto erret;
+ }
+ atp = AsnReadId(aip,amp, atp);
+ }
+ if (atp == FEATURE_FIELD_PAIR_field_to) {
+ ptr -> field_to = FeatQualChoiceAsnRead(aip, atp);
+ if (aip -> io_failure) {
+ goto erret;
+ }
+ atp = AsnReadId(aip,amp, atp);
+ }
+
+ if (AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ /* end struct */
+
+ret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return ptr;
+
+erret:
+ aip -> io_failure = TRUE;
+ ptr = FeatureFieldPairFree(ptr);
+ goto ret;
+}
+
+
+
+/**************************************************
+*
+* FeatureFieldPairAsnWrite()
+*
+**************************************************/
+NLM_EXTERN Boolean LIBCALL
+FeatureFieldPairAsnWrite(FeatureFieldPairPtr ptr, AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ Boolean retval = FALSE;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return FALSE;
+ }
+ }
+
+ if (aip == NULL) {
+ return FALSE;
+ }
+
+ atp = AsnLinkType(orig, FEATURE_FIELD_PAIR); /* link local tree */
+ if (atp == NULL) {
+ return FALSE;
+ }
+
+ if (ptr == NULL) { AsnNullValueMsg(aip, atp); goto erret; }
+ if (! AsnOpenStruct(aip, atp, (Pointer) ptr)) {
+ goto erret;
+ }
+
+ av.intvalue = ptr -> type;
+ retval = AsnWrite(aip, FEATURE_FIELD_PAIR_type, &av);
+ if (ptr -> field_from != NULL) {
+ if ( ! FeatQualChoiceAsnWrite(ptr -> field_from, aip, FEATURE_FIELD_PAIR_field_from)) {
+ goto erret;
+ }
+ }
+ if (ptr -> field_to != NULL) {
+ if ( ! FeatQualChoiceAsnWrite(ptr -> field_to, aip, FEATURE_FIELD_PAIR_field_to)) {
+ goto erret;
+ }
+ }
+ if (! AsnCloseStruct(aip, atp, (Pointer)ptr)) {
+ goto erret;
+ }
+ retval = TRUE;
+
+erret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return retval;
+}
+
+
+
+/**************************************************
+*
+* SourceQualPairNew()
+*
+**************************************************/
+NLM_EXTERN
+SourceQualPairPtr LIBCALL
+SourceQualPairNew(void)
+{
+ SourceQualPairPtr ptr = MemNew((size_t) sizeof(SourceQualPair));
+
+ return ptr;
+
+}
+
+
+/**************************************************
+*
+* SourceQualPairFree()
+*
+**************************************************/
+NLM_EXTERN
+SourceQualPairPtr LIBCALL
+SourceQualPairFree(SourceQualPairPtr ptr)
+{
+
+ if(ptr == NULL) {
+ return NULL;
+ }
+ return MemFree(ptr);
+}
+
+
+/**************************************************
+*
+* SourceQualPairAsnRead()
+*
+**************************************************/
+NLM_EXTERN
+SourceQualPairPtr LIBCALL
+SourceQualPairAsnRead(AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ Boolean isError = FALSE;
+ AsnReadFunc func;
+ SourceQualPairPtr ptr;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return NULL;
+ }
+ }
+
+ if (aip == NULL) {
+ return NULL;
+ }
+
+ if (orig == NULL) { /* SourceQualPair ::= (self contained) */
+ atp = AsnReadId(aip, amp, SOURCE_QUAL_PAIR);
+ } else {
+ atp = AsnLinkType(orig, SOURCE_QUAL_PAIR);
+ }
+ /* link in local tree */
+ if (atp == NULL) {
+ return NULL;
+ }
+
+ ptr = SourceQualPairNew();
+ if (ptr == NULL) {
+ goto erret;
+ }
+ if (AsnReadVal(aip, atp, &av) <= 0) { /* read the start struct */
+ goto erret;
+ }
+
+ atp = AsnReadId(aip,amp, atp);
+ func = NULL;
+
+ if (atp == SOURCE_QUAL_PAIR_field_from) {
+ if ( AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ ptr -> field_from = av.intvalue;
+ atp = AsnReadId(aip,amp, atp);
+ }
+ if (atp == SOURCE_QUAL_PAIR_field_to) {
+ if ( AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ ptr -> field_to = av.intvalue;
+ atp = AsnReadId(aip,amp, atp);
+ }
+
+ if (AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ /* end struct */
+
+ret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return ptr;
+
+erret:
+ aip -> io_failure = TRUE;
+ ptr = SourceQualPairFree(ptr);
+ goto ret;
+}
+
+
+
+/**************************************************
+*
+* SourceQualPairAsnWrite()
+*
+**************************************************/
+NLM_EXTERN Boolean LIBCALL
+SourceQualPairAsnWrite(SourceQualPairPtr ptr, AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ Boolean retval = FALSE;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return FALSE;
+ }
+ }
+
+ if (aip == NULL) {
+ return FALSE;
+ }
+
+ atp = AsnLinkType(orig, SOURCE_QUAL_PAIR); /* link local tree */
+ if (atp == NULL) {
+ return FALSE;
+ }
+
+ if (ptr == NULL) { AsnNullValueMsg(aip, atp); goto erret; }
+ if (! AsnOpenStruct(aip, atp, (Pointer) ptr)) {
+ goto erret;
+ }
+
+ av.intvalue = ptr -> field_from;
+ retval = AsnWrite(aip, SOURCE_QUAL_PAIR_field_from, &av);
+ av.intvalue = ptr -> field_to;
+ retval = AsnWrite(aip, SOURCE_QUAL_PAIR_field_to, &av);
+ if (! AsnCloseStruct(aip, atp, (Pointer)ptr)) {
+ goto erret;
+ }
+ retval = TRUE;
+
+erret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return retval;
+}
+
+
+
+/**************************************************
+*
+* SourceQualChoiceFree()
+*
+**************************************************/
+NLM_EXTERN
+SourceQualChoicePtr LIBCALL
+SourceQualChoiceFree(ValNodePtr anp)
+{
+ Pointer pnt;
+
+ if (anp == NULL) {
+ return NULL;
+ }
+
+ pnt = anp->data.ptrvalue;
+ switch (anp->choice)
+ {
+ default:
+ break;
+ }
+ return MemFree(anp);
+}
+
+
+/**************************************************
+*
+* SourceQualChoiceAsnRead()
+*
+**************************************************/
+NLM_EXTERN
+SourceQualChoicePtr LIBCALL
+SourceQualChoiceAsnRead(AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ ValNodePtr anp;
+ Uint1 choice;
+ Boolean isError = FALSE;
+ Boolean nullIsError = FALSE;
+ AsnReadFunc func;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return NULL;
+ }
+ }
+
+ if (aip == NULL) {
+ return NULL;
+ }
+
+ if (orig == NULL) { /* SourceQualChoice ::= (self contained) */
+ atp = AsnReadId(aip, amp, SOURCE_QUAL_CHOICE);
+ } else {
+ atp = AsnLinkType(orig, SOURCE_QUAL_CHOICE); /* link in local tree */
+ }
+ if (atp == NULL) {
+ return NULL;
+ }
+
+ anp = ValNodeNew(NULL);
+ if (anp == NULL) {
+ goto erret;
+ }
+ if (AsnReadVal(aip, atp, &av) <= 0) { /* read the CHOICE or OpenStruct value (nothing) */
+ goto erret;
+ }
+
+ func = NULL;
+
+ atp = AsnReadId(aip, amp, atp); /* find the choice */
+ if (atp == NULL) {
+ goto erret;
+ }
+ if (atp == SOURCE_QUAL_CHOICE_textqual) {
+ choice = SourceQualChoice_textqual;
+ if (AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ anp->data.intvalue = av.intvalue;
+ }
+ else if (atp == SOURCE_QUAL_CHOICE_location) {
+ choice = SourceQualChoice_location;
+ if (AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ anp->data.intvalue = av.intvalue;
+ }
+ else if (atp == SOURCE_QUAL_CHOICE_origin) {
+ choice = SourceQualChoice_origin;
+ if (AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ anp->data.intvalue = av.intvalue;
+ }
+ anp->choice = choice;
+ if (func != NULL)
+ {
+ anp->data.ptrvalue = (* func)(aip, atp);
+ if (aip -> io_failure) goto erret;
+
+ if (nullIsError && anp->data.ptrvalue == NULL) {
+ goto erret;
+ }
+ }
+
+ret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return anp;
+
+erret:
+ anp = MemFree(anp);
+ aip -> io_failure = TRUE;
+ goto ret;
+}
+
+
+/**************************************************
+*
+* SourceQualChoiceAsnWrite()
+*
+**************************************************/
+NLM_EXTERN Boolean LIBCALL
+SourceQualChoiceAsnWrite(SourceQualChoicePtr anp, AsnIoPtr aip, AsnTypePtr orig)
+
+{
+ DataVal av;
+ AsnTypePtr atp, writetype = NULL;
+ Pointer pnt;
+ AsnWriteFunc func = NULL;
+ Boolean retval = FALSE;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad())
+ return FALSE;
+ }
+
+ if (aip == NULL)
+ return FALSE;
+
+ atp = AsnLinkType(orig, SOURCE_QUAL_CHOICE); /* link local tree */
+ if (atp == NULL) {
+ return FALSE;
+ }
+
+ if (anp == NULL) { AsnNullValueMsg(aip, atp); goto erret; }
+
+ av.ptrvalue = (Pointer)anp;
+ if (! AsnWriteChoice(aip, atp, (Int2)anp->choice, &av)) {
+ goto erret;
+ }
+
+ pnt = anp->data.ptrvalue;
+ switch (anp->choice)
+ {
+ case SourceQualChoice_textqual:
+ av.intvalue = anp->data.intvalue;
+ retval = AsnWrite(aip, SOURCE_QUAL_CHOICE_textqual, &av);
+ break;
+ case SourceQualChoice_location:
+ av.intvalue = anp->data.intvalue;
+ retval = AsnWrite(aip, SOURCE_QUAL_CHOICE_location, &av);
+ break;
+ case SourceQualChoice_origin:
+ av.intvalue = anp->data.intvalue;
+ retval = AsnWrite(aip, SOURCE_QUAL_CHOICE_origin, &av);
+ break;
+ }
+ if (writetype != NULL) {
+ retval = (* func)(pnt, aip, writetype); /* write it out */
+ }
+ if (!retval) {
+ goto erret;
+ }
+ retval = TRUE;
+
+erret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return retval;
+}
+
+
+/**************************************************
+*
+* CDSGeneProtFieldPairNew()
+*
+**************************************************/
+NLM_EXTERN
+CDSGeneProtFieldPairPtr LIBCALL
+CDSGeneProtFieldPairNew(void)
+{
+ CDSGeneProtFieldPairPtr ptr = MemNew((size_t) sizeof(CDSGeneProtFieldPair));
+
+ return ptr;
+
+}
+
+
+/**************************************************
+*
+* CDSGeneProtFieldPairFree()
+*
+**************************************************/
+NLM_EXTERN
+CDSGeneProtFieldPairPtr LIBCALL
+CDSGeneProtFieldPairFree(CDSGeneProtFieldPairPtr ptr)
+{
+
+ if(ptr == NULL) {
+ return NULL;
+ }
+ return MemFree(ptr);
+}
+
+
+/**************************************************
+*
+* CDSGeneProtFieldPairAsnRead()
+*
+**************************************************/
+NLM_EXTERN
+CDSGeneProtFieldPairPtr LIBCALL
+CDSGeneProtFieldPairAsnRead(AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ Boolean isError = FALSE;
+ AsnReadFunc func;
+ CDSGeneProtFieldPairPtr ptr;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return NULL;
+ }
+ }
+
+ if (aip == NULL) {
+ return NULL;
+ }
+
+ if (orig == NULL) { /* CDSGeneProtFieldPair ::= (self contained) */
+ atp = AsnReadId(aip, amp, CDSGENEPROT_FIELD_PAIR);
+ } else {
+ atp = AsnLinkType(orig, CDSGENEPROT_FIELD_PAIR);
+ }
+ /* link in local tree */
+ if (atp == NULL) {
+ return NULL;
+ }
+
+ ptr = CDSGeneProtFieldPairNew();
+ if (ptr == NULL) {
+ goto erret;
+ }
+ if (AsnReadVal(aip, atp, &av) <= 0) { /* read the start struct */
+ goto erret;
+ }
+
+ atp = AsnReadId(aip,amp, atp);
+ func = NULL;
+
+ if (atp == FIELD_PAIR_field_from) {
+ if ( AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ ptr -> field_from = av.intvalue;
+ atp = AsnReadId(aip,amp, atp);
+ }
+ if (atp == CDSGENEPROT_FIELD_PAIR_field_to) {
+ if ( AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ ptr -> field_to = av.intvalue;
+ atp = AsnReadId(aip,amp, atp);
+ }
+
+ if (AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ /* end struct */
+
+ret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return ptr;
+
+erret:
+ aip -> io_failure = TRUE;
+ ptr = CDSGeneProtFieldPairFree(ptr);
+ goto ret;
+}
+
+
+
+/**************************************************
+*
+* CDSGeneProtFieldPairAsnWrite()
+*
+**************************************************/
+NLM_EXTERN Boolean LIBCALL
+CDSGeneProtFieldPairAsnWrite(CDSGeneProtFieldPairPtr ptr, AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ Boolean retval = FALSE;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return FALSE;
+ }
+ }
+
+ if (aip == NULL) {
+ return FALSE;
+ }
+
+ atp = AsnLinkType(orig, CDSGENEPROT_FIELD_PAIR); /* link local tree */
+ if (atp == NULL) {
+ return FALSE;
+ }
+
+ if (ptr == NULL) { AsnNullValueMsg(aip, atp); goto erret; }
+ if (! AsnOpenStruct(aip, atp, (Pointer) ptr)) {
+ goto erret;
+ }
+
+ av.intvalue = ptr -> field_from;
+ retval = AsnWrite(aip, FIELD_PAIR_field_from, &av);
+ av.intvalue = ptr -> field_to;
+ retval = AsnWrite(aip, CDSGENEPROT_FIELD_PAIR_field_to, &av);
+ if (! AsnCloseStruct(aip, atp, (Pointer)ptr)) {
+ goto erret;
+ }
+ retval = TRUE;
+
+erret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return retval;
+}
+
+
+
+/**************************************************
+*
+* MolinfoFieldFree()
+*
+**************************************************/
+NLM_EXTERN
+MolinfoFieldPtr LIBCALL
+MolinfoFieldFree(ValNodePtr anp)
+{
+ Pointer pnt;
+
+ if (anp == NULL) {
+ return NULL;
+ }
+
+ pnt = anp->data.ptrvalue;
+ switch (anp->choice)
+ {
+ default:
+ break;
+ }
+ return MemFree(anp);
+}
+
+
+/**************************************************
+*
+* MolinfoFieldAsnRead()
+*
+**************************************************/
+NLM_EXTERN
+MolinfoFieldPtr LIBCALL
+MolinfoFieldAsnRead(AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ ValNodePtr anp;
+ Uint1 choice;
+ Boolean isError = FALSE;
+ Boolean nullIsError = FALSE;
+ AsnReadFunc func;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return NULL;
+ }
+ }
+
+ if (aip == NULL) {
+ return NULL;
+ }
+
+ if (orig == NULL) { /* MolinfoField ::= (self contained) */
+ atp = AsnReadId(aip, amp, MOLINFO_FIELD);
+ } else {
+ atp = AsnLinkType(orig, MOLINFO_FIELD); /* link in local tree */
+ }
+ if (atp == NULL) {
+ return NULL;
+ }
+
+ anp = ValNodeNew(NULL);
+ if (anp == NULL) {
+ goto erret;
+ }
+ if (AsnReadVal(aip, atp, &av) <= 0) { /* read the CHOICE or OpenStruct value (nothing) */
+ goto erret;
+ }
+
+ func = NULL;
+
+ atp = AsnReadId(aip, amp, atp); /* find the choice */
+ if (atp == NULL) {
+ goto erret;
+ }
+ if (atp == MOLINFO_FIELD_molecule) {
+ choice = MolinfoField_molecule;
+ if (AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ anp->data.intvalue = av.intvalue;
+ }
+ else if (atp == MOLINFO_FIELD_technique) {
+ choice = MolinfoField_technique;
+ if (AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ anp->data.intvalue = av.intvalue;
+ }
+ else if (atp == MOLINFO_FIELD_completedness) {
+ choice = MolinfoField_completedness;
+ if (AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ anp->data.intvalue = av.intvalue;
+ }
+ else if (atp == MOLINFO_FIELD_mol_class) {
+ choice = MolinfoField_mol_class;
+ if (AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ anp->data.intvalue = av.intvalue;
+ }
+ else if (atp == MOLINFO_FIELD_topology) {
+ choice = MolinfoField_topology;
+ if (AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ anp->data.intvalue = av.intvalue;
+ }
+ else if (atp == MOLINFO_FIELD_strand) {
+ choice = MolinfoField_strand;
+ if (AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ anp->data.intvalue = av.intvalue;
+ }
+ anp->choice = choice;
+ if (func != NULL)
+ {
+ anp->data.ptrvalue = (* func)(aip, atp);
+ if (aip -> io_failure) goto erret;
+
+ if (nullIsError && anp->data.ptrvalue == NULL) {
+ goto erret;
+ }
+ }
+
+ret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return anp;
+
+erret:
+ anp = MemFree(anp);
+ aip -> io_failure = TRUE;
+ goto ret;
+}
+
+
+/**************************************************
+*
+* MolinfoFieldAsnWrite()
+*
+**************************************************/
+NLM_EXTERN Boolean LIBCALL
+MolinfoFieldAsnWrite(MolinfoFieldPtr anp, AsnIoPtr aip, AsnTypePtr orig)
+
+{
+ DataVal av;
+ AsnTypePtr atp, writetype = NULL;
+ Pointer pnt;
+ AsnWriteFunc func = NULL;
+ Boolean retval = FALSE;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad())
+ return FALSE;
+ }
+
+ if (aip == NULL)
+ return FALSE;
+
+ atp = AsnLinkType(orig, MOLINFO_FIELD); /* link local tree */
+ if (atp == NULL) {
+ return FALSE;
+ }
+
+ if (anp == NULL) { AsnNullValueMsg(aip, atp); goto erret; }
+
+ av.ptrvalue = (Pointer)anp;
+ if (! AsnWriteChoice(aip, atp, (Int2)anp->choice, &av)) {
+ goto erret;
+ }
+
+ pnt = anp->data.ptrvalue;
+ switch (anp->choice)
+ {
+ case MolinfoField_molecule:
+ av.intvalue = anp->data.intvalue;
+ retval = AsnWrite(aip, MOLINFO_FIELD_molecule, &av);
+ break;
+ case MolinfoField_technique:
+ av.intvalue = anp->data.intvalue;
+ retval = AsnWrite(aip, MOLINFO_FIELD_technique, &av);
+ break;
+ case MolinfoField_completedness:
+ av.intvalue = anp->data.intvalue;
+ retval = AsnWrite(aip, MOLINFO_FIELD_completedness, &av);
+ break;
+ case MolinfoField_mol_class:
+ av.intvalue = anp->data.intvalue;
+ retval = AsnWrite(aip, MOLINFO_FIELD_mol_class, &av);
+ break;
+ case MolinfoField_topology:
+ av.intvalue = anp->data.intvalue;
+ retval = AsnWrite(aip, MOLINFO_FIELD_topology, &av);
+ break;
+ case MolinfoField_strand:
+ av.intvalue = anp->data.intvalue;
+ retval = AsnWrite(aip, MOLINFO_FIELD_strand, &av);
+ break;
+ }
+ if (writetype != NULL) {
+ retval = (* func)(pnt, aip, writetype); /* write it out */
+ }
+ if (!retval) {
+ goto erret;
+ }
+ retval = TRUE;
+
+erret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return retval;
+}
+
+
+/**************************************************
+*
+* MolinfoMoleculePairNew()
+*
+**************************************************/
+NLM_EXTERN
+MolinfoMoleculePairPtr LIBCALL
+MolinfoMoleculePairNew(void)
+{
+ MolinfoMoleculePairPtr ptr = MemNew((size_t) sizeof(MolinfoMoleculePair));
+
+ return ptr;
+
+}
+
+
+/**************************************************
+*
+* MolinfoMoleculePairFree()
+*
+**************************************************/
+NLM_EXTERN
+MolinfoMoleculePairPtr LIBCALL
+MolinfoMoleculePairFree(MolinfoMoleculePairPtr ptr)
+{
+
+ if(ptr == NULL) {
+ return NULL;
+ }
+ return MemFree(ptr);
+}
+
+
+/**************************************************
+*
+* MolinfoMoleculePairAsnRead()
+*
+**************************************************/
+NLM_EXTERN
+MolinfoMoleculePairPtr LIBCALL
+MolinfoMoleculePairAsnRead(AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ Boolean isError = FALSE;
+ AsnReadFunc func;
+ MolinfoMoleculePairPtr ptr;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return NULL;
+ }
+ }
+
+ if (aip == NULL) {
+ return NULL;
+ }
+
+ if (orig == NULL) { /* MolinfoMoleculePair ::= (self contained) */
+ atp = AsnReadId(aip, amp, MOLINFO_MOLECULE_PAIR);
+ } else {
+ atp = AsnLinkType(orig, MOLINFO_MOLECULE_PAIR);
+ }
+ /* link in local tree */
+ if (atp == NULL) {
+ return NULL;
+ }
+
+ ptr = MolinfoMoleculePairNew();
+ if (ptr == NULL) {
+ goto erret;
+ }
+ if (AsnReadVal(aip, atp, &av) <= 0) { /* read the start struct */
+ goto erret;
+ }
+
+ atp = AsnReadId(aip,amp, atp);
+ func = NULL;
+
+ if (atp == MOLINFO_MOLECULE_PAIR_from) {
+ if ( AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ ptr -> from = av.intvalue;
+ atp = AsnReadId(aip,amp, atp);
+ }
+ if (atp == MOLINFO_MOLECULE_PAIR_to) {
+ if ( AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ ptr -> to = av.intvalue;
+ atp = AsnReadId(aip,amp, atp);
+ }
+
+ if (AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ /* end struct */
+
+ret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return ptr;
+
+erret:
+ aip -> io_failure = TRUE;
+ ptr = MolinfoMoleculePairFree(ptr);
+ goto ret;
+}
+
+
+
+/**************************************************
+*
+* MolinfoMoleculePairAsnWrite()
+*
+**************************************************/
+NLM_EXTERN Boolean LIBCALL
+MolinfoMoleculePairAsnWrite(MolinfoMoleculePairPtr ptr, AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ Boolean retval = FALSE;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return FALSE;
+ }
+ }
+
+ if (aip == NULL) {
+ return FALSE;
+ }
+
+ atp = AsnLinkType(orig, MOLINFO_MOLECULE_PAIR); /* link local tree */
+ if (atp == NULL) {
+ return FALSE;
+ }
+
+ if (ptr == NULL) { AsnNullValueMsg(aip, atp); goto erret; }
+ if (! AsnOpenStruct(aip, atp, (Pointer) ptr)) {
+ goto erret;
+ }
+
+ av.intvalue = ptr -> from;
+ retval = AsnWrite(aip, MOLINFO_MOLECULE_PAIR_from, &av);
+ av.intvalue = ptr -> to;
+ retval = AsnWrite(aip, MOLINFO_MOLECULE_PAIR_to, &av);
+ if (! AsnCloseStruct(aip, atp, (Pointer)ptr)) {
+ goto erret;
+ }
+ retval = TRUE;
+
+erret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return retval;
+}
+
+
+
+/**************************************************
+*
+* MolinfoTechniquePairNew()
+*
+**************************************************/
+NLM_EXTERN
+MolinfoTechniquePairPtr LIBCALL
+MolinfoTechniquePairNew(void)
+{
+ MolinfoTechniquePairPtr ptr = MemNew((size_t) sizeof(MolinfoTechniquePair));
+
+ return ptr;
+
+}
+
+
+/**************************************************
+*
+* MolinfoTechniquePairFree()
+*
+**************************************************/
+NLM_EXTERN
+MolinfoTechniquePairPtr LIBCALL
+MolinfoTechniquePairFree(MolinfoTechniquePairPtr ptr)
+{
+
+ if(ptr == NULL) {
+ return NULL;
+ }
+ return MemFree(ptr);
+}
+
+
+/**************************************************
+*
+* MolinfoTechniquePairAsnRead()
+*
+**************************************************/
+NLM_EXTERN
+MolinfoTechniquePairPtr LIBCALL
+MolinfoTechniquePairAsnRead(AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ Boolean isError = FALSE;
+ AsnReadFunc func;
+ MolinfoTechniquePairPtr ptr;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return NULL;
+ }
+ }
+
+ if (aip == NULL) {
+ return NULL;
+ }
+
+ if (orig == NULL) { /* MolinfoTechniquePair ::= (self contained) */
+ atp = AsnReadId(aip, amp, MOLINFO_TECHNIQUE_PAIR);
+ } else {
+ atp = AsnLinkType(orig, MOLINFO_TECHNIQUE_PAIR);
+ }
+ /* link in local tree */
+ if (atp == NULL) {
+ return NULL;
+ }
+
+ ptr = MolinfoTechniquePairNew();
+ if (ptr == NULL) {
+ goto erret;
+ }
+ if (AsnReadVal(aip, atp, &av) <= 0) { /* read the start struct */
+ goto erret;
+ }
+
+ atp = AsnReadId(aip,amp, atp);
+ func = NULL;
+
+ if (atp == MOLINFO_TECHNIQUE_PAIR_from) {
+ if ( AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ ptr -> from = av.intvalue;
+ atp = AsnReadId(aip,amp, atp);
+ }
+ if (atp == MOLINFO_TECHNIQUE_PAIR_to) {
+ if ( AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ ptr -> to = av.intvalue;
+ atp = AsnReadId(aip,amp, atp);
+ }
+
+ if (AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ /* end struct */
+
+ret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return ptr;
+
+erret:
+ aip -> io_failure = TRUE;
+ ptr = MolinfoTechniquePairFree(ptr);
+ goto ret;
+}
+
+
+
+/**************************************************
+*
+* MolinfoTechniquePairAsnWrite()
+*
+**************************************************/
+NLM_EXTERN Boolean LIBCALL
+MolinfoTechniquePairAsnWrite(MolinfoTechniquePairPtr ptr, AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ Boolean retval = FALSE;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return FALSE;
+ }
+ }
+
+ if (aip == NULL) {
+ return FALSE;
+ }
+
+ atp = AsnLinkType(orig, MOLINFO_TECHNIQUE_PAIR); /* link local tree */
+ if (atp == NULL) {
+ return FALSE;
+ }
+
+ if (ptr == NULL) { AsnNullValueMsg(aip, atp); goto erret; }
+ if (! AsnOpenStruct(aip, atp, (Pointer) ptr)) {
+ goto erret;
+ }
+
+ av.intvalue = ptr -> from;
+ retval = AsnWrite(aip, MOLINFO_TECHNIQUE_PAIR_from, &av);
+ av.intvalue = ptr -> to;
+ retval = AsnWrite(aip, MOLINFO_TECHNIQUE_PAIR_to, &av);
+ if (! AsnCloseStruct(aip, atp, (Pointer)ptr)) {
+ goto erret;
+ }
+ retval = TRUE;
+
+erret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return retval;
+}
+
+
+
+/**************************************************
+*
+* MolinfoCompletednessPairNew()
+*
+**************************************************/
+NLM_EXTERN
+MolinfoCompletednessPairPtr LIBCALL
+MolinfoCompletednessPairNew(void)
+{
+ MolinfoCompletednessPairPtr ptr = MemNew((size_t) sizeof(MolinfoCompletednessPair));
+
+ return ptr;
+
+}
+
+
+/**************************************************
+*
+* MolinfoCompletednessPairFree()
+*
+**************************************************/
+NLM_EXTERN
+MolinfoCompletednessPairPtr LIBCALL
+MolinfoCompletednessPairFree(MolinfoCompletednessPairPtr ptr)
+{
+
+ if(ptr == NULL) {
+ return NULL;
+ }
+ return MemFree(ptr);
+}
+
+
+/**************************************************
+*
+* MolinfoCompletednessPairAsnRead()
+*
+**************************************************/
+NLM_EXTERN
+MolinfoCompletednessPairPtr LIBCALL
+MolinfoCompletednessPairAsnRead(AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ Boolean isError = FALSE;
+ AsnReadFunc func;
+ MolinfoCompletednessPairPtr ptr;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return NULL;
+ }
+ }
+
+ if (aip == NULL) {
+ return NULL;
+ }
+
+ if (orig == NULL) { /* MolinfoCompletednessPair ::= (self contained) */
+ atp = AsnReadId(aip, amp, MOLINFO_COMPLETEDNESS_PAIR);
+ } else {
+ atp = AsnLinkType(orig, MOLINFO_COMPLETEDNESS_PAIR);
+ }
+ /* link in local tree */
+ if (atp == NULL) {
+ return NULL;
+ }
+
+ ptr = MolinfoCompletednessPairNew();
+ if (ptr == NULL) {
+ goto erret;
+ }
+ if (AsnReadVal(aip, atp, &av) <= 0) { /* read the start struct */
+ goto erret;
+ }
+
+ atp = AsnReadId(aip,amp, atp);
+ func = NULL;
+
+ if (atp == MOLINFO_COMPLETEDNESS_PAIR_from) {
+ if ( AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ ptr -> from = av.intvalue;
+ atp = AsnReadId(aip,amp, atp);
+ }
+ if (atp == MOLINFO_COMPLETEDNESS_PAIR_to) {
+ if ( AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ ptr -> to = av.intvalue;
+ atp = AsnReadId(aip,amp, atp);
+ }
+
+ if (AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ /* end struct */
+
+ret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return ptr;
+
+erret:
+ aip -> io_failure = TRUE;
+ ptr = MolinfoCompletednessPairFree(ptr);
+ goto ret;
+}
+
+
+
+/**************************************************
+*
+* MolinfoCompletednessPairAsnWrite()
+*
+**************************************************/
+NLM_EXTERN Boolean LIBCALL
+MolinfoCompletednessPairAsnWrite(MolinfoCompletednessPairPtr ptr, AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ Boolean retval = FALSE;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return FALSE;
+ }
+ }
+
+ if (aip == NULL) {
+ return FALSE;
+ }
+
+ atp = AsnLinkType(orig, MOLINFO_COMPLETEDNESS_PAIR); /* link local tree */
+ if (atp == NULL) {
+ return FALSE;
+ }
+
+ if (ptr == NULL) { AsnNullValueMsg(aip, atp); goto erret; }
+ if (! AsnOpenStruct(aip, atp, (Pointer) ptr)) {
+ goto erret;
+ }
+
+ av.intvalue = ptr -> from;
+ retval = AsnWrite(aip, MOLINFO_COMPLETEDNESS_PAIR_from, &av);
+ av.intvalue = ptr -> to;
+ retval = AsnWrite(aip, MOLINFO_COMPLETEDNESS_PAIR_to, &av);
+ if (! AsnCloseStruct(aip, atp, (Pointer)ptr)) {
+ goto erret;
+ }
+ retval = TRUE;
+
+erret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return retval;
+}
+
+
+
+/**************************************************
+*
+* MolinfoMolClassPairNew()
+*
+**************************************************/
+NLM_EXTERN
+MolinfoMolClassPairPtr LIBCALL
+MolinfoMolClassPairNew(void)
+{
+ MolinfoMolClassPairPtr ptr = MemNew((size_t) sizeof(MolinfoMolClassPair));
+
+ return ptr;
+
+}
+
+
+/**************************************************
+*
+* MolinfoMolClassPairFree()
+*
+**************************************************/
+NLM_EXTERN
+MolinfoMolClassPairPtr LIBCALL
+MolinfoMolClassPairFree(MolinfoMolClassPairPtr ptr)
+{
+
+ if(ptr == NULL) {
+ return NULL;
+ }
+ return MemFree(ptr);
+}
+
+
+/**************************************************
+*
+* MolinfoMolClassPairAsnRead()
+*
+**************************************************/
+NLM_EXTERN
+MolinfoMolClassPairPtr LIBCALL
+MolinfoMolClassPairAsnRead(AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ Boolean isError = FALSE;
+ AsnReadFunc func;
+ MolinfoMolClassPairPtr ptr;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return NULL;
+ }
+ }
+
+ if (aip == NULL) {
+ return NULL;
+ }
+
+ if (orig == NULL) { /* MolinfoMolClassPair ::= (self contained) */
+ atp = AsnReadId(aip, amp, MOLINFO_MOL_CLASS_PAIR);
+ } else {
+ atp = AsnLinkType(orig, MOLINFO_MOL_CLASS_PAIR);
+ }
+ /* link in local tree */
+ if (atp == NULL) {
+ return NULL;
+ }
+
+ ptr = MolinfoMolClassPairNew();
+ if (ptr == NULL) {
+ goto erret;
+ }
+ if (AsnReadVal(aip, atp, &av) <= 0) { /* read the start struct */
+ goto erret;
+ }
+
+ atp = AsnReadId(aip,amp, atp);
+ func = NULL;
+
+ if (atp == MOLINFO_MOL_CLASS_PAIR_from) {
+ if ( AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ ptr -> from = av.intvalue;
+ atp = AsnReadId(aip,amp, atp);
+ }
+ if (atp == MOLINFO_MOL_CLASS_PAIR_to) {
+ if ( AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ ptr -> to = av.intvalue;
+ atp = AsnReadId(aip,amp, atp);
+ }
+
+ if (AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ /* end struct */
+
+ret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return ptr;
+
+erret:
+ aip -> io_failure = TRUE;
+ ptr = MolinfoMolClassPairFree(ptr);
+ goto ret;
+}
+
+
+
+/**************************************************
+*
+* MolinfoMolClassPairAsnWrite()
+*
+**************************************************/
+NLM_EXTERN Boolean LIBCALL
+MolinfoMolClassPairAsnWrite(MolinfoMolClassPairPtr ptr, AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ Boolean retval = FALSE;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return FALSE;
+ }
+ }
+
+ if (aip == NULL) {
+ return FALSE;
+ }
+
+ atp = AsnLinkType(orig, MOLINFO_MOL_CLASS_PAIR); /* link local tree */
+ if (atp == NULL) {
+ return FALSE;
+ }
+
+ if (ptr == NULL) { AsnNullValueMsg(aip, atp); goto erret; }
+ if (! AsnOpenStruct(aip, atp, (Pointer) ptr)) {
+ goto erret;
+ }
+
+ av.intvalue = ptr -> from;
+ retval = AsnWrite(aip, MOLINFO_MOL_CLASS_PAIR_from, &av);
+ av.intvalue = ptr -> to;
+ retval = AsnWrite(aip, MOLINFO_MOL_CLASS_PAIR_to, &av);
+ if (! AsnCloseStruct(aip, atp, (Pointer)ptr)) {
+ goto erret;
+ }
+ retval = TRUE;
+
+erret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return retval;
+}
+
+
+
+/**************************************************
+*
+* MolinfoTopologyPairNew()
+*
+**************************************************/
+NLM_EXTERN
+MolinfoTopologyPairPtr LIBCALL
+MolinfoTopologyPairNew(void)
+{
+ MolinfoTopologyPairPtr ptr = MemNew((size_t) sizeof(MolinfoTopologyPair));
+
+ return ptr;
+
+}
+
+
+/**************************************************
+*
+* MolinfoTopologyPairFree()
+*
+**************************************************/
+NLM_EXTERN
+MolinfoTopologyPairPtr LIBCALL
+MolinfoTopologyPairFree(MolinfoTopologyPairPtr ptr)
+{
+
+ if(ptr == NULL) {
+ return NULL;
+ }
+ return MemFree(ptr);
+}
+
+
+/**************************************************
+*
+* MolinfoTopologyPairAsnRead()
+*
+**************************************************/
+NLM_EXTERN
+MolinfoTopologyPairPtr LIBCALL
+MolinfoTopologyPairAsnRead(AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ Boolean isError = FALSE;
+ AsnReadFunc func;
+ MolinfoTopologyPairPtr ptr;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return NULL;
+ }
+ }
+
+ if (aip == NULL) {
+ return NULL;
+ }
+
+ if (orig == NULL) { /* MolinfoTopologyPair ::= (self contained) */
+ atp = AsnReadId(aip, amp, MOLINFO_TOPOLOGY_PAIR);
+ } else {
+ atp = AsnLinkType(orig, MOLINFO_TOPOLOGY_PAIR);
+ }
+ /* link in local tree */
+ if (atp == NULL) {
+ return NULL;
+ }
+
+ ptr = MolinfoTopologyPairNew();
+ if (ptr == NULL) {
+ goto erret;
+ }
+ if (AsnReadVal(aip, atp, &av) <= 0) { /* read the start struct */
+ goto erret;
+ }
+
+ atp = AsnReadId(aip,amp, atp);
+ func = NULL;
+
+ if (atp == MOLINFO_TOPOLOGY_PAIR_from) {
+ if ( AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ ptr -> from = av.intvalue;
+ atp = AsnReadId(aip,amp, atp);
+ }
+ if (atp == MOLINFO_TOPOLOGY_PAIR_to) {
+ if ( AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ ptr -> to = av.intvalue;
+ atp = AsnReadId(aip,amp, atp);
+ }
+
+ if (AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ /* end struct */
+
+ret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return ptr;
+
+erret:
+ aip -> io_failure = TRUE;
+ ptr = MolinfoTopologyPairFree(ptr);
+ goto ret;
+}
+
+
+
+/**************************************************
+*
+* MolinfoTopologyPairAsnWrite()
+*
+**************************************************/
+NLM_EXTERN Boolean LIBCALL
+MolinfoTopologyPairAsnWrite(MolinfoTopologyPairPtr ptr, AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ Boolean retval = FALSE;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return FALSE;
+ }
+ }
+
+ if (aip == NULL) {
+ return FALSE;
+ }
+
+ atp = AsnLinkType(orig, MOLINFO_TOPOLOGY_PAIR); /* link local tree */
+ if (atp == NULL) {
+ return FALSE;
+ }
+
+ if (ptr == NULL) { AsnNullValueMsg(aip, atp); goto erret; }
+ if (! AsnOpenStruct(aip, atp, (Pointer) ptr)) {
+ goto erret;
+ }
+
+ av.intvalue = ptr -> from;
+ retval = AsnWrite(aip, MOLINFO_TOPOLOGY_PAIR_from, &av);
+ av.intvalue = ptr -> to;
+ retval = AsnWrite(aip, MOLINFO_TOPOLOGY_PAIR_to, &av);
+ if (! AsnCloseStruct(aip, atp, (Pointer)ptr)) {
+ goto erret;
+ }
+ retval = TRUE;
+
+erret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return retval;
+}
+
+
+
+/**************************************************
+*
+* MolinfoStrandPairNew()
+*
+**************************************************/
+NLM_EXTERN
+MolinfoStrandPairPtr LIBCALL
+MolinfoStrandPairNew(void)
+{
+ MolinfoStrandPairPtr ptr = MemNew((size_t) sizeof(MolinfoStrandPair));
+
+ return ptr;
+
+}
+
+
+/**************************************************
+*
+* MolinfoStrandPairFree()
+*
+**************************************************/
+NLM_EXTERN
+MolinfoStrandPairPtr LIBCALL
+MolinfoStrandPairFree(MolinfoStrandPairPtr ptr)
+{
+
+ if(ptr == NULL) {
+ return NULL;
+ }
+ return MemFree(ptr);
+}
+
+
+/**************************************************
+*
+* MolinfoStrandPairAsnRead()
+*
+**************************************************/
+NLM_EXTERN
+MolinfoStrandPairPtr LIBCALL
+MolinfoStrandPairAsnRead(AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ Boolean isError = FALSE;
+ AsnReadFunc func;
+ MolinfoStrandPairPtr ptr;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return NULL;
+ }
+ }
+
+ if (aip == NULL) {
+ return NULL;
+ }
+
+ if (orig == NULL) { /* MolinfoStrandPair ::= (self contained) */
+ atp = AsnReadId(aip, amp, MOLINFO_STRAND_PAIR);
+ } else {
+ atp = AsnLinkType(orig, MOLINFO_STRAND_PAIR);
+ }
+ /* link in local tree */
+ if (atp == NULL) {
+ return NULL;
+ }
+
+ ptr = MolinfoStrandPairNew();
+ if (ptr == NULL) {
+ goto erret;
+ }
+ if (AsnReadVal(aip, atp, &av) <= 0) { /* read the start struct */
+ goto erret;
+ }
+
+ atp = AsnReadId(aip,amp, atp);
+ func = NULL;
+
+ if (atp == MOLINFO_STRAND_PAIR_from) {
+ if ( AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ ptr -> from = av.intvalue;
+ atp = AsnReadId(aip,amp, atp);
+ }
+ if (atp == MOLINFO_STRAND_PAIR_to) {
+ if ( AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ ptr -> to = av.intvalue;
+ atp = AsnReadId(aip,amp, atp);
+ }
+
+ if (AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ /* end struct */
+
+ret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return ptr;
+
+erret:
+ aip -> io_failure = TRUE;
+ ptr = MolinfoStrandPairFree(ptr);
+ goto ret;
+}
+
+
+
+/**************************************************
+*
+* MolinfoStrandPairAsnWrite()
+*
+**************************************************/
+NLM_EXTERN Boolean LIBCALL
+MolinfoStrandPairAsnWrite(MolinfoStrandPairPtr ptr, AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ Boolean retval = FALSE;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return FALSE;
+ }
+ }
+
+ if (aip == NULL) {
+ return FALSE;
+ }
+
+ atp = AsnLinkType(orig, MOLINFO_STRAND_PAIR); /* link local tree */
+ if (atp == NULL) {
+ return FALSE;
+ }
+
+ if (ptr == NULL) { AsnNullValueMsg(aip, atp); goto erret; }
+ if (! AsnOpenStruct(aip, atp, (Pointer) ptr)) {
+ goto erret;
+ }
+
+ av.intvalue = ptr -> from;
+ retval = AsnWrite(aip, MOLINFO_STRAND_PAIR_from, &av);
+ av.intvalue = ptr -> to;
+ retval = AsnWrite(aip, MOLINFO_STRAND_PAIR_to, &av);
+ if (! AsnCloseStruct(aip, atp, (Pointer)ptr)) {
+ goto erret;
+ }
+ retval = TRUE;
+
+erret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return retval;
+}
+
+
+
+/**************************************************
+*
+* MolinfoFieldPairFree()
+*
+**************************************************/
+NLM_EXTERN
+MolinfoFieldPairPtr LIBCALL
+MolinfoFieldPairFree(ValNodePtr anp)
+{
+ Pointer pnt;
+
+ if (anp == NULL) {
+ return NULL;
+ }
+
+ pnt = anp->data.ptrvalue;
+ switch (anp->choice)
+ {
+ default:
+ break;
+ case MolinfoFieldPair_molecule:
+ MolinfoMoleculePairFree(anp -> data.ptrvalue);
+ break;
+ case MolinfoFieldPair_technique:
+ MolinfoTechniquePairFree(anp -> data.ptrvalue);
+ break;
+ case MolinfoFieldPair_completedness:
+ MolinfoCompletednessPairFree(anp -> data.ptrvalue);
+ break;
+ case MolinfoFieldPair_mol_class:
+ MolinfoMolClassPairFree(anp -> data.ptrvalue);
+ break;
+ case MolinfoFieldPair_topology:
+ MolinfoTopologyPairFree(anp -> data.ptrvalue);
+ break;
+ case MolinfoFieldPair_strand:
+ MolinfoStrandPairFree(anp -> data.ptrvalue);
+ break;
+ }
+ return MemFree(anp);
+}
+
+
+/**************************************************
+*
+* MolinfoFieldPairAsnRead()
+*
+**************************************************/
+NLM_EXTERN
+MolinfoFieldPairPtr LIBCALL
+MolinfoFieldPairAsnRead(AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ ValNodePtr anp;
+ Uint1 choice;
+ Boolean isError = FALSE;
+ Boolean nullIsError = FALSE;
+ AsnReadFunc func;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return NULL;
+ }
+ }
+
+ if (aip == NULL) {
+ return NULL;
+ }
+
+ if (orig == NULL) { /* MolinfoFieldPair ::= (self contained) */
+ atp = AsnReadId(aip, amp, MOLINFO_FIELD_PAIR);
+ } else {
+ atp = AsnLinkType(orig, MOLINFO_FIELD_PAIR); /* link in local tree */
+ }
+ if (atp == NULL) {
+ return NULL;
+ }
+
+ anp = ValNodeNew(NULL);
+ if (anp == NULL) {
+ goto erret;
+ }
+ if (AsnReadVal(aip, atp, &av) <= 0) { /* read the CHOICE or OpenStruct value (nothing) */
+ goto erret;
+ }
+
+ func = NULL;
+
+ atp = AsnReadId(aip, amp, atp); /* find the choice */
+ if (atp == NULL) {
+ goto erret;
+ }
+ if (atp == MOLINFO_FIELD_PAIR_molecule) {
+ choice = MolinfoFieldPair_molecule;
+ func = (AsnReadFunc) MolinfoMoleculePairAsnRead;
+ }
+ else if (atp == MOLINFO_FIELD_PAIR_technique) {
+ choice = MolinfoFieldPair_technique;
+ func = (AsnReadFunc) MolinfoTechniquePairAsnRead;
+ }
+ else if (atp == FIELD_PAIR_completedness) {
+ choice = MolinfoFieldPair_completedness;
+ func = (AsnReadFunc) MolinfoCompletednessPairAsnRead;
+ }
+ else if (atp == MOLINFO_FIELD_PAIR_mol_class) {
+ choice = MolinfoFieldPair_mol_class;
+ func = (AsnReadFunc) MolinfoMolClassPairAsnRead;
+ }
+ else if (atp == MOLINFO_FIELD_PAIR_topology) {
+ choice = MolinfoFieldPair_topology;
+ func = (AsnReadFunc) MolinfoTopologyPairAsnRead;
+ }
+ else if (atp == MOLINFO_FIELD_PAIR_strand) {
+ choice = MolinfoFieldPair_strand;
+ func = (AsnReadFunc) MolinfoStrandPairAsnRead;
+ }
+ anp->choice = choice;
+ if (func != NULL)
+ {
+ anp->data.ptrvalue = (* func)(aip, atp);
+ if (aip -> io_failure) goto erret;
+
+ if (nullIsError && anp->data.ptrvalue == NULL) {
+ goto erret;
+ }
+ }
+
+ret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return anp;
+
+erret:
+ anp = MemFree(anp);
+ aip -> io_failure = TRUE;
+ goto ret;
+}
+
+
+/**************************************************
+*
+* MolinfoFieldPairAsnWrite()
+*
+**************************************************/
+NLM_EXTERN Boolean LIBCALL
+MolinfoFieldPairAsnWrite(MolinfoFieldPairPtr anp, AsnIoPtr aip, AsnTypePtr orig)
+
+{
+ DataVal av;
+ AsnTypePtr atp, writetype = NULL;
+ Pointer pnt;
+ AsnWriteFunc func = NULL;
+ Boolean retval = FALSE;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad())
+ return FALSE;
+ }
+
+ if (aip == NULL)
+ return FALSE;
+
+ atp = AsnLinkType(orig, MOLINFO_FIELD_PAIR); /* link local tree */
+ if (atp == NULL) {
+ return FALSE;
+ }
+
+ if (anp == NULL) { AsnNullValueMsg(aip, atp); goto erret; }
+
+ av.ptrvalue = (Pointer)anp;
+ if (! AsnWriteChoice(aip, atp, (Int2)anp->choice, &av)) {
+ goto erret;
+ }
+
+ pnt = anp->data.ptrvalue;
+ switch (anp->choice)
+ {
+ case MolinfoFieldPair_molecule:
+ writetype = MOLINFO_FIELD_PAIR_molecule;
+ func = (AsnWriteFunc) MolinfoMoleculePairAsnWrite;
+ break;
+ case MolinfoFieldPair_technique:
+ writetype = MOLINFO_FIELD_PAIR_technique;
+ func = (AsnWriteFunc) MolinfoTechniquePairAsnWrite;
+ break;
+ case MolinfoFieldPair_completedness:
+ writetype = FIELD_PAIR_completedness;
+ func = (AsnWriteFunc) MolinfoCompletednessPairAsnWrite;
+ break;
+ case MolinfoFieldPair_mol_class:
+ writetype = MOLINFO_FIELD_PAIR_mol_class;
+ func = (AsnWriteFunc) MolinfoMolClassPairAsnWrite;
+ break;
+ case MolinfoFieldPair_topology:
+ writetype = MOLINFO_FIELD_PAIR_topology;
+ func = (AsnWriteFunc) MolinfoTopologyPairAsnWrite;
+ break;
+ case MolinfoFieldPair_strand:
+ writetype = MOLINFO_FIELD_PAIR_strand;
+ func = (AsnWriteFunc) MolinfoStrandPairAsnWrite;
+ break;
+ }
+ if (writetype != NULL) {
+ retval = (* func)(pnt, aip, writetype); /* write it out */
+ }
+ if (!retval) {
+ goto erret;
+ }
+ retval = TRUE;
+
+erret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return retval;
+}
+
+
+/**************************************************
+*
+* SourceConstraintNew()
+*
+**************************************************/
+NLM_EXTERN
+SourceConstraintPtr LIBCALL
+SourceConstraintNew(void)
+{
+ SourceConstraintPtr ptr = MemNew((size_t) sizeof(SourceConstraint));
+
+ return ptr;
+
+}
+
+
+/**************************************************
+*
+* SourceConstraintFree()
+*
+**************************************************/
+NLM_EXTERN
+SourceConstraintPtr LIBCALL
+SourceConstraintFree(SourceConstraintPtr ptr)
+{
+
+ if(ptr == NULL) {
+ return NULL;
+ }
+ SourceQualChoiceFree(ptr -> field1);
+ SourceQualChoiceFree(ptr -> field2);
+ StringConstraintFree(ptr -> constraint);
+ return MemFree(ptr);
+}
+
+
+/**************************************************
+*
+* SourceConstraintAsnRead()
+*
+**************************************************/
+NLM_EXTERN
+SourceConstraintPtr LIBCALL
+SourceConstraintAsnRead(AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ Boolean isError = FALSE;
+ AsnReadFunc func;
+ SourceConstraintPtr ptr;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return NULL;
+ }
+ }
+
+ if (aip == NULL) {
+ return NULL;
+ }
+
+ if (orig == NULL) { /* SourceConstraint ::= (self contained) */
+ atp = AsnReadId(aip, amp, SOURCE_CONSTRAINT);
+ } else {
+ atp = AsnLinkType(orig, SOURCE_CONSTRAINT);
+ }
+ /* link in local tree */
+ if (atp == NULL) {
+ return NULL;
+ }
+
+ ptr = SourceConstraintNew();
+ if (ptr == NULL) {
+ goto erret;
+ }
+ if (AsnReadVal(aip, atp, &av) <= 0) { /* read the start struct */
+ goto erret;
+ }
+
+ atp = AsnReadId(aip,amp, atp);
+ func = NULL;
+
+ if (atp == SOURCE_CONSTRAINT_field1) {
+ ptr -> field1 = SourceQualChoiceAsnRead(aip, atp);
+ if (aip -> io_failure) {
+ goto erret;
+ }
+ atp = AsnReadId(aip,amp, atp);
+ }
+ if (atp == SOURCE_CONSTRAINT_field2) {
+ ptr -> field2 = SourceQualChoiceAsnRead(aip, atp);
+ if (aip -> io_failure) {
+ goto erret;
+ }
+ atp = AsnReadId(aip,amp, atp);
+ }
+ if (atp == SOURCE_CONSTRAINT_constraint) {
+ ptr -> constraint = StringConstraintAsnRead(aip, atp);
+ if (aip -> io_failure) {
+ goto erret;
+ }
+ atp = AsnReadId(aip,amp, atp);
+ }
+ if (atp == CONSTRAINT_type_constraint) {
+ if ( AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ ptr -> type_constraint = av.intvalue;
+ atp = AsnReadId(aip,amp, atp);
+ }
+
+ if (AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ /* end struct */
+
+ret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return ptr;
+
+erret:
+ aip -> io_failure = TRUE;
+ ptr = SourceConstraintFree(ptr);
+ goto ret;
+}
+
+
+
+/**************************************************
+*
+* SourceConstraintAsnWrite()
+*
+**************************************************/
+NLM_EXTERN Boolean LIBCALL
+SourceConstraintAsnWrite(SourceConstraintPtr ptr, AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ Boolean retval = FALSE;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return FALSE;
+ }
+ }
+
+ if (aip == NULL) {
+ return FALSE;
+ }
+
+ atp = AsnLinkType(orig, SOURCE_CONSTRAINT); /* link local tree */
+ if (atp == NULL) {
+ return FALSE;
+ }
+
+ if (ptr == NULL) { AsnNullValueMsg(aip, atp); goto erret; }
+ if (! AsnOpenStruct(aip, atp, (Pointer) ptr)) {
+ goto erret;
+ }
+
+ if (ptr -> field1 != NULL) {
+ if ( ! SourceQualChoiceAsnWrite(ptr -> field1, aip, SOURCE_CONSTRAINT_field1)) {
+ goto erret;
+ }
+ }
+ if (ptr -> field2 != NULL) {
+ if ( ! SourceQualChoiceAsnWrite(ptr -> field2, aip, SOURCE_CONSTRAINT_field2)) {
+ goto erret;
+ }
+ }
+ if (ptr -> constraint != NULL) {
+ if ( ! StringConstraintAsnWrite(ptr -> constraint, aip, SOURCE_CONSTRAINT_constraint)) {
+ goto erret;
+ }
+ }
+ av.intvalue = ptr -> type_constraint;
+ retval = AsnWrite(aip, CONSTRAINT_type_constraint, &av);
+ if (! AsnCloseStruct(aip, atp, (Pointer)ptr)) {
+ goto erret;
+ }
+ retval = TRUE;
+
+erret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return retval;
+}
+
+
+
+/**************************************************
+*
+* CDSGeneProtPseudoConstraintNew()
+*
+**************************************************/
+NLM_EXTERN
+CDSGeneProtPseudoConstraintPtr LIBCALL
+CDSGeneProtPseudoConstraintNew(void)
+{
+ CDSGeneProtPseudoConstraintPtr ptr = MemNew((size_t) sizeof(CDSGeneProtPseudoConstraint));
+
+ ptr -> is_pseudo = 1;
+ return ptr;
+
+}
+
+
+/**************************************************
+*
+* CDSGeneProtPseudoConstraintFree()
+*
+**************************************************/
+NLM_EXTERN
+CDSGeneProtPseudoConstraintPtr LIBCALL
+CDSGeneProtPseudoConstraintFree(CDSGeneProtPseudoConstraintPtr ptr)
+{
+
+ if(ptr == NULL) {
+ return NULL;
+ }
+ return MemFree(ptr);
+}
+
+
+/**************************************************
+*
+* CDSGeneProtPseudoConstraintAsnRead()
+*
+**************************************************/
+NLM_EXTERN
+CDSGeneProtPseudoConstraintPtr LIBCALL
+CDSGeneProtPseudoConstraintAsnRead(AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ Boolean isError = FALSE;
+ AsnReadFunc func;
+ CDSGeneProtPseudoConstraintPtr ptr;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return NULL;
+ }
+ }
+
+ if (aip == NULL) {
+ return NULL;
+ }
+
+ if (orig == NULL) { /* CDSGeneProtPseudoConstraint ::= (self contained) */
+ atp = AsnReadId(aip, amp, CDSGENEPROT_PSEUDO_CONSTRAINT);
+ } else {
+ atp = AsnLinkType(orig, CDSGENEPROT_PSEUDO_CONSTRAINT);
+ }
+ /* link in local tree */
+ if (atp == NULL) {
+ return NULL;
+ }
+
+ ptr = CDSGeneProtPseudoConstraintNew();
+ if (ptr == NULL) {
+ goto erret;
+ }
+ if (AsnReadVal(aip, atp, &av) <= 0) { /* read the start struct */
+ goto erret;
+ }
+
+ atp = AsnReadId(aip,amp, atp);
+ func = NULL;
+
+ if (atp == PSEUDO_CONSTRAINT_feature) {
+ if ( AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ ptr -> feature = av.intvalue;
+ atp = AsnReadId(aip,amp, atp);
+ }
+ if (atp == PSEUDO_CONSTRAINT_is_pseudo) {
+ if ( AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ ptr -> is_pseudo = av.boolvalue;
+ atp = AsnReadId(aip,amp, atp);
+ }
+
+ if (AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ /* end struct */
+
+ret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return ptr;
+
+erret:
+ aip -> io_failure = TRUE;
+ ptr = CDSGeneProtPseudoConstraintFree(ptr);
+ goto ret;
+}
+
+
+
+/**************************************************
+*
+* CDSGeneProtPseudoConstraintAsnWrite()
+*
+**************************************************/
+NLM_EXTERN Boolean LIBCALL
+CDSGeneProtPseudoConstraintAsnWrite(CDSGeneProtPseudoConstraintPtr ptr, AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ Boolean retval = FALSE;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return FALSE;
+ }
+ }
+
+ if (aip == NULL) {
+ return FALSE;
+ }
+
+ atp = AsnLinkType(orig, CDSGENEPROT_PSEUDO_CONSTRAINT); /* link local tree */
+ if (atp == NULL) {
+ return FALSE;
+ }
+
+ if (ptr == NULL) { AsnNullValueMsg(aip, atp); goto erret; }
+ if (! AsnOpenStruct(aip, atp, (Pointer) ptr)) {
+ goto erret;
+ }
+
+ av.intvalue = ptr -> feature;
+ retval = AsnWrite(aip, PSEUDO_CONSTRAINT_feature, &av);
+ av.boolvalue = ptr -> is_pseudo;
+ retval = AsnWrite(aip, PSEUDO_CONSTRAINT_is_pseudo, &av);
+ if (! AsnCloseStruct(aip, atp, (Pointer)ptr)) {
+ goto erret;
+ }
+ retval = TRUE;
+
+erret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return retval;
+}
+
+
+
+/**************************************************
+*
+* CDSGeneProtConstraintFieldFree()
+*
+**************************************************/
+NLM_EXTERN
+CDSGeneProtConstraintFieldPtr LIBCALL
+CDSGeneProtConstraintFieldFree(ValNodePtr anp)
+{
+ Pointer pnt;
+
+ if (anp == NULL) {
+ return NULL;
+ }
+
+ pnt = anp->data.ptrvalue;
+ switch (anp->choice)
+ {
+ default:
+ break;
+ }
+ return MemFree(anp);
+}
+
+
+/**************************************************
+*
+* CDSGeneProtConstraintFieldAsnRead()
+*
+**************************************************/
+NLM_EXTERN
+CDSGeneProtConstraintFieldPtr LIBCALL
+CDSGeneProtConstraintFieldAsnRead(AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ ValNodePtr anp;
+ Uint1 choice;
+ Boolean isError = FALSE;
+ Boolean nullIsError = FALSE;
+ AsnReadFunc func;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return NULL;
+ }
+ }
+
+ if (aip == NULL) {
+ return NULL;
+ }
+
+ if (orig == NULL) { /* CDSGeneProtConstraintField ::= (self contained) */
+ atp = AsnReadId(aip, amp, CDSGENEPROT_CONSTRAINT_FIELD);
+ } else {
+ atp = AsnLinkType(orig, CDSGENEPROT_CONSTRAINT_FIELD); /* link in local tree */
+ }
+ if (atp == NULL) {
+ return NULL;
+ }
+
+ anp = ValNodeNew(NULL);
+ if (anp == NULL) {
+ goto erret;
+ }
+ if (AsnReadVal(aip, atp, &av) <= 0) { /* read the CHOICE or OpenStruct value (nothing) */
+ goto erret;
+ }
+
+ func = NULL;
+
+ atp = AsnReadId(aip, amp, atp); /* find the choice */
+ if (atp == NULL) {
+ goto erret;
+ }
+ if (atp == CONSTRAINT_FIELD_field) {
+ choice = CDSGeneProtConstraintField_field;
+ if (AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ anp->data.intvalue = av.intvalue;
+ }
+ anp->choice = choice;
+ if (func != NULL)
+ {
+ anp->data.ptrvalue = (* func)(aip, atp);
+ if (aip -> io_failure) goto erret;
+
+ if (nullIsError && anp->data.ptrvalue == NULL) {
+ goto erret;
+ }
+ }
+
+ret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return anp;
+
+erret:
+ anp = MemFree(anp);
+ aip -> io_failure = TRUE;
+ goto ret;
+}
+
+
+/**************************************************
+*
+* CDSGeneProtConstraintFieldAsnWrite()
+*
+**************************************************/
+NLM_EXTERN Boolean LIBCALL
+CDSGeneProtConstraintFieldAsnWrite(CDSGeneProtConstraintFieldPtr anp, AsnIoPtr aip, AsnTypePtr orig)
+
+{
+ DataVal av;
+ AsnTypePtr atp, writetype = NULL;
+ Pointer pnt;
+ AsnWriteFunc func = NULL;
+ Boolean retval = FALSE;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad())
+ return FALSE;
+ }
+
+ if (aip == NULL)
+ return FALSE;
+
+ atp = AsnLinkType(orig, CDSGENEPROT_CONSTRAINT_FIELD); /* link local tree */
+ if (atp == NULL) {
+ return FALSE;
+ }
+
+ if (anp == NULL) { AsnNullValueMsg(aip, atp); goto erret; }
+
+ av.ptrvalue = (Pointer)anp;
+ if (! AsnWriteChoice(aip, atp, (Int2)anp->choice, &av)) {
+ goto erret;
+ }
+
+ pnt = anp->data.ptrvalue;
+ switch (anp->choice)
+ {
+ case CDSGeneProtConstraintField_field:
+ av.intvalue = anp->data.intvalue;
+ retval = AsnWrite(aip, CONSTRAINT_FIELD_field, &av);
+ break;
+ }
+ if (writetype != NULL) {
+ retval = (* func)(pnt, aip, writetype); /* write it out */
+ }
+ if (!retval) {
+ goto erret;
+ }
+ retval = TRUE;
+
+erret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return retval;
+}
+
+
+/**************************************************
+*
+* CDSGeneProtQualConstraintNew()
+*
+**************************************************/
+NLM_EXTERN
+CDSGeneProtQualConstraintPtr LIBCALL
+CDSGeneProtQualConstraintNew(void)
+{
+ CDSGeneProtQualConstraintPtr ptr = MemNew((size_t) sizeof(CDSGeneProtQualConstraint));
+
+ return ptr;
+
+}
+
+
+/**************************************************
+*
+* CDSGeneProtQualConstraintFree()
+*
+**************************************************/
+NLM_EXTERN
+CDSGeneProtQualConstraintPtr LIBCALL
+CDSGeneProtQualConstraintFree(CDSGeneProtQualConstraintPtr ptr)
+{
+
+ if(ptr == NULL) {
+ return NULL;
+ }
+ CDSGeneProtConstraintFieldFree(ptr -> field1);
+ CDSGeneProtConstraintFieldFree(ptr -> field2);
+ StringConstraintFree(ptr -> constraint);
+ return MemFree(ptr);
+}
+
+
+/**************************************************
+*
+* CDSGeneProtQualConstraintAsnRead()
+*
+**************************************************/
+NLM_EXTERN
+CDSGeneProtQualConstraintPtr LIBCALL
+CDSGeneProtQualConstraintAsnRead(AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ Boolean isError = FALSE;
+ AsnReadFunc func;
+ CDSGeneProtQualConstraintPtr ptr;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return NULL;
+ }
+ }
+
+ if (aip == NULL) {
+ return NULL;
+ }
+
+ if (orig == NULL) { /* CDSGeneProtQualConstraint ::= (self contained) */
+ atp = AsnReadId(aip, amp, CDSGENEPROT_QUAL_CONSTRAINT);
+ } else {
+ atp = AsnLinkType(orig, CDSGENEPROT_QUAL_CONSTRAINT);
+ }
+ /* link in local tree */
+ if (atp == NULL) {
+ return NULL;
+ }
+
+ ptr = CDSGeneProtQualConstraintNew();
+ if (ptr == NULL) {
+ goto erret;
+ }
+ if (AsnReadVal(aip, atp, &av) <= 0) { /* read the start struct */
+ goto erret;
+ }
+
+ atp = AsnReadId(aip,amp, atp);
+ func = NULL;
+
+ if (atp == QUAL_CONSTRAINT_field1) {
+ ptr -> field1 = CDSGeneProtConstraintFieldAsnRead(aip, atp);
+ if (aip -> io_failure) {
+ goto erret;
+ }
+ atp = AsnReadId(aip,amp, atp);
+ }
+ if (atp == QUAL_CONSTRAINT_field2) {
+ ptr -> field2 = CDSGeneProtConstraintFieldAsnRead(aip, atp);
+ if (aip -> io_failure) {
+ goto erret;
+ }
+ atp = AsnReadId(aip,amp, atp);
+ }
+ if (atp == QUAL_CONSTRAINT_constraint) {
+ ptr -> constraint = StringConstraintAsnRead(aip, atp);
+ if (aip -> io_failure) {
+ goto erret;
+ }
+ atp = AsnReadId(aip,amp, atp);
+ }
+
+ if (AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ /* end struct */
+
+ret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return ptr;
+
+erret:
+ aip -> io_failure = TRUE;
+ ptr = CDSGeneProtQualConstraintFree(ptr);
+ goto ret;
+}
+
+
+
+/**************************************************
+*
+* CDSGeneProtQualConstraintAsnWrite()
+*
+**************************************************/
+NLM_EXTERN Boolean LIBCALL
+CDSGeneProtQualConstraintAsnWrite(CDSGeneProtQualConstraintPtr ptr, AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ Boolean retval = FALSE;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return FALSE;
+ }
+ }
+
+ if (aip == NULL) {
+ return FALSE;
+ }
+
+ atp = AsnLinkType(orig, CDSGENEPROT_QUAL_CONSTRAINT); /* link local tree */
+ if (atp == NULL) {
+ return FALSE;
+ }
+
+ if (ptr == NULL) { AsnNullValueMsg(aip, atp); goto erret; }
+ if (! AsnOpenStruct(aip, atp, (Pointer) ptr)) {
+ goto erret;
+ }
+
+ if (ptr -> field1 != NULL) {
+ if ( ! CDSGeneProtConstraintFieldAsnWrite(ptr -> field1, aip, QUAL_CONSTRAINT_field1)) {
+ goto erret;
+ }
+ }
+ if (ptr -> field2 != NULL) {
+ if ( ! CDSGeneProtConstraintFieldAsnWrite(ptr -> field2, aip, QUAL_CONSTRAINT_field2)) {
+ goto erret;
+ }
+ }
+ if (ptr -> constraint != NULL) {
+ if ( ! StringConstraintAsnWrite(ptr -> constraint, aip, QUAL_CONSTRAINT_constraint)) {
+ goto erret;
+ }
+ }
+ if (! AsnCloseStruct(aip, atp, (Pointer)ptr)) {
+ goto erret;
+ }
+ retval = TRUE;
+
+erret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return retval;
+}
+
+
+
+/**************************************************
+*
+* SequenceConstraintMolTypeConstraintFree()
+*
+**************************************************/
+NLM_EXTERN
+SequenceConstraintMolTypeConstraintPtr LIBCALL
+SequenceConstraintMolTypeConstraintFree(ValNodePtr anp)
+{
+ Pointer pnt;
+
+ if (anp == NULL) {
+ return NULL;
+ }
+
+ pnt = anp->data.ptrvalue;
+ switch (anp->choice)
+ {
+ default:
+ break;
+ }
+ return MemFree(anp);
+}
+
+
+/**************************************************
+*
+* SequenceConstraintMolTypeConstraintAsnRead()
+*
+**************************************************/
+NLM_EXTERN
+SequenceConstraintMolTypeConstraintPtr LIBCALL
+SequenceConstraintMolTypeConstraintAsnRead(AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ ValNodePtr anp;
+ Uint1 choice;
+ Boolean isError = FALSE;
+ Boolean nullIsError = FALSE;
+ AsnReadFunc func;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return NULL;
+ }
+ }
+
+ if (aip == NULL) {
+ return NULL;
+ }
+
+ if (orig == NULL) { /* SequenceConstraintMolTypeConstraint ::= (self contained) */
+ atp = AsnReadId(aip, amp, CONSTRAINT_MOL_TYPE_CONSTRAINT);
+ } else {
+ atp = AsnLinkType(orig, CONSTRAINT_MOL_TYPE_CONSTRAINT); /* link in local tree */
+ }
+ if (atp == NULL) {
+ return NULL;
+ }
+
+ anp = ValNodeNew(NULL);
+ if (anp == NULL) {
+ goto erret;
+ }
+ if (AsnReadVal(aip, atp, &av) <= 0) { /* read the CHOICE or OpenStruct value (nothing) */
+ goto erret;
+ }
+
+ func = NULL;
+
+ atp = AsnReadId(aip, amp, atp); /* find the choice */
+ if (atp == NULL) {
+ goto erret;
+ }
+ if (atp == MOL_TYPE_CONSTRAINT_any) {
+ choice = SequenceConstraintMolTypeConstraint_any;
+ if (AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ anp->data.boolvalue = av.boolvalue;
+ }
+ else if (atp == MOL_TYPE_CONSTRAINT_nucleotide) {
+ choice = SequenceConstraintMolTypeConstraint_nucleotide;
+ if (AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ anp->data.boolvalue = av.boolvalue;
+ }
+ else if (atp == MOL_TYPE_CONSTRAINT_dna) {
+ choice = SequenceConstraintMolTypeConstraint_dna;
+ if (AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ anp->data.boolvalue = av.boolvalue;
+ }
+ else if (atp == MOL_TYPE_CONSTRAINT_rna) {
+ choice = SequenceConstraintMolTypeConstraint_rna;
+ if (AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ anp->data.intvalue = av.intvalue;
+ }
+ else if (atp == MOL_TYPE_CONSTRAINT_protein) {
+ choice = SequenceConstraintMolTypeConstraint_protein;
+ if (AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ anp->data.boolvalue = av.boolvalue;
+ }
+ anp->choice = choice;
+ if (func != NULL)
+ {
+ anp->data.ptrvalue = (* func)(aip, atp);
+ if (aip -> io_failure) goto erret;
+
+ if (nullIsError && anp->data.ptrvalue == NULL) {
+ goto erret;
+ }
+ }
+
+ret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return anp;
+
+erret:
+ anp = MemFree(anp);
+ aip -> io_failure = TRUE;
+ goto ret;
+}
+
+
+/**************************************************
+*
+* SequenceConstraintMolTypeConstraintAsnWrite()
+*
+**************************************************/
+NLM_EXTERN Boolean LIBCALL
+SequenceConstraintMolTypeConstraintAsnWrite(SequenceConstraintMolTypeConstraintPtr anp, AsnIoPtr aip, AsnTypePtr orig)
+
+{
+ DataVal av;
+ AsnTypePtr atp, writetype = NULL;
+ Pointer pnt;
+ AsnWriteFunc func = NULL;
+ Boolean retval = FALSE;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad())
+ return FALSE;
+ }
+
+ if (aip == NULL)
+ return FALSE;
+
+ atp = AsnLinkType(orig, CONSTRAINT_MOL_TYPE_CONSTRAINT); /* link local tree */
+ if (atp == NULL) {
+ return FALSE;
+ }
+
+ if (anp == NULL) { AsnNullValueMsg(aip, atp); goto erret; }
+
+ av.ptrvalue = (Pointer)anp;
+ if (! AsnWriteChoice(aip, atp, (Int2)anp->choice, &av)) {
+ goto erret;
+ }
+
+ pnt = anp->data.ptrvalue;
+ switch (anp->choice)
+ {
+ case SequenceConstraintMolTypeConstraint_any:
+ av.boolvalue = anp->data.boolvalue;
+ retval = AsnWrite(aip, MOL_TYPE_CONSTRAINT_any, &av);
+ break;
+ case SequenceConstraintMolTypeConstraint_nucleotide:
+ av.boolvalue = anp->data.boolvalue;
+ retval = AsnWrite(aip, MOL_TYPE_CONSTRAINT_nucleotide, &av);
+ break;
+ case SequenceConstraintMolTypeConstraint_dna:
+ av.boolvalue = anp->data.boolvalue;
+ retval = AsnWrite(aip, MOL_TYPE_CONSTRAINT_dna, &av);
+ break;
+ case SequenceConstraintMolTypeConstraint_rna:
+ av.intvalue = anp->data.intvalue;
+ retval = AsnWrite(aip, MOL_TYPE_CONSTRAINT_rna, &av);
+ break;
+ case SequenceConstraintMolTypeConstraint_protein:
+ av.boolvalue = anp->data.boolvalue;
+ retval = AsnWrite(aip, MOL_TYPE_CONSTRAINT_protein, &av);
+ break;
+ }
+ if (writetype != NULL) {
+ retval = (* func)(pnt, aip, writetype); /* write it out */
+ }
+ if (!retval) {
+ goto erret;
+ }
+ retval = TRUE;
+
+erret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return retval;
+}
+
+
+/**************************************************
+*
+* SequenceConstraintNew()
+*
+**************************************************/
+NLM_EXTERN
+SequenceConstraintPtr LIBCALL
+SequenceConstraintNew(void)
+{
+ SequenceConstraintPtr ptr = MemNew((size_t) sizeof(SequenceConstraint));
+
+ return ptr;
+
+}
+
+
+/**************************************************
+*
+* SequenceConstraintFree()
+*
+**************************************************/
+NLM_EXTERN
+SequenceConstraintPtr LIBCALL
+SequenceConstraintFree(SequenceConstraintPtr ptr)
+{
+
+ if(ptr == NULL) {
+ return NULL;
+ }
+ SequenceConstraintMolTypeConstraintFree(ptr -> seqtype);
+ StringConstraintFree(ptr -> id);
+ return MemFree(ptr);
+}
+
+
+/**************************************************
+*
+* SequenceConstraintAsnRead()
+*
+**************************************************/
+NLM_EXTERN
+SequenceConstraintPtr LIBCALL
+SequenceConstraintAsnRead(AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ Boolean isError = FALSE;
+ AsnReadFunc func;
+ SequenceConstraintPtr ptr;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return NULL;
+ }
+ }
+
+ if (aip == NULL) {
+ return NULL;
+ }
+
+ if (orig == NULL) { /* SequenceConstraint ::= (self contained) */
+ atp = AsnReadId(aip, amp, SEQUENCE_CONSTRAINT);
+ } else {
+ atp = AsnLinkType(orig, SEQUENCE_CONSTRAINT);
+ }
+ /* link in local tree */
+ if (atp == NULL) {
+ return NULL;
+ }
+
+ ptr = SequenceConstraintNew();
+ if (ptr == NULL) {
+ goto erret;
+ }
+ if (AsnReadVal(aip, atp, &av) <= 0) { /* read the start struct */
+ goto erret;
+ }
+
+ atp = AsnReadId(aip,amp, atp);
+ func = NULL;
+
+ if (atp == SEQUENCE_CONSTRAINT_seqtype) {
+ ptr -> seqtype = SequenceConstraintMolTypeConstraintAsnRead(aip, atp);
+ if (aip -> io_failure) {
+ goto erret;
+ }
+ atp = AsnReadId(aip,amp, atp);
+ }
+ if (atp == SEQUENCE_CONSTRAINT_id) {
+ ptr -> id = StringConstraintAsnRead(aip, atp);
+ if (aip -> io_failure) {
+ goto erret;
+ }
+ atp = AsnReadId(aip,amp, atp);
+ }
+ if (atp == SEQUENCE_CONSTRAINT_feature) {
+ if ( AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ ptr -> feature = av.intvalue;
+ atp = AsnReadId(aip,amp, atp);
+ }
+
+ if (AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ /* end struct */
+
+ret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return ptr;
+
+erret:
+ aip -> io_failure = TRUE;
+ ptr = SequenceConstraintFree(ptr);
+ goto ret;
+}
+
+
+
+/**************************************************
+*
+* SequenceConstraintAsnWrite()
+*
+**************************************************/
+NLM_EXTERN Boolean LIBCALL
+SequenceConstraintAsnWrite(SequenceConstraintPtr ptr, AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ Boolean retval = FALSE;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return FALSE;
+ }
+ }
+
+ if (aip == NULL) {
+ return FALSE;
+ }
+
+ atp = AsnLinkType(orig, SEQUENCE_CONSTRAINT); /* link local tree */
+ if (atp == NULL) {
+ return FALSE;
+ }
+
+ if (ptr == NULL) { AsnNullValueMsg(aip, atp); goto erret; }
+ if (! AsnOpenStruct(aip, atp, (Pointer) ptr)) {
+ goto erret;
+ }
+
+ if (ptr -> seqtype != NULL) {
+ if ( ! SequenceConstraintMolTypeConstraintAsnWrite(ptr -> seqtype, aip, SEQUENCE_CONSTRAINT_seqtype)) {
+ goto erret;
+ }
+ }
+ if (ptr -> id != NULL) {
+ if ( ! StringConstraintAsnWrite(ptr -> id, aip, SEQUENCE_CONSTRAINT_id)) {
+ goto erret;
+ }
+ }
+ av.intvalue = ptr -> feature;
+ retval = AsnWrite(aip, SEQUENCE_CONSTRAINT_feature, &av);
+ if (! AsnCloseStruct(aip, atp, (Pointer)ptr)) {
+ goto erret;
+ }
+ retval = TRUE;
+
+erret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return retval;
+}
+
+
+
+/**************************************************
+*
+* ConstraintChoiceFree()
+*
+**************************************************/
+NLM_EXTERN
+ConstraintChoicePtr LIBCALL
+ConstraintChoiceFree(ValNodePtr anp)
+{
+ Pointer pnt;
+
+ if (anp == NULL) {
+ return NULL;
+ }
+
+ pnt = anp->data.ptrvalue;
+ switch (anp->choice)
+ {
+ default:
+ break;
+ case ConstraintChoice_string:
+ StringConstraintFree(anp -> data.ptrvalue);
+ break;
+ case ConstraintChoice_location:
+ LocationConstraintFree(anp -> data.ptrvalue);
+ break;
+ case ConstraintChoice_source:
+ SourceConstraintFree(anp -> data.ptrvalue);
+ break;
+ case ConstraintChoice_cdsgeneprot_qual:
+ CDSGeneProtQualConstraintFree(anp -> data.ptrvalue);
+ break;
+ case ConstraintChoice_cdsgeneprot_pseudo:
+ CDSGeneProtPseudoConstraintFree(anp -> data.ptrvalue);
+ break;
+ case ConstraintChoice_sequence:
+ SequenceConstraintFree(anp -> data.ptrvalue);
+ break;
+ }
+ return MemFree(anp);
+}
+
+
+/**************************************************
+*
+* ConstraintChoiceAsnRead()
+*
+**************************************************/
+NLM_EXTERN
+ConstraintChoicePtr LIBCALL
+ConstraintChoiceAsnRead(AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ ValNodePtr anp;
+ Uint1 choice;
+ Boolean isError = FALSE;
+ Boolean nullIsError = FALSE;
+ AsnReadFunc func;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return NULL;
+ }
+ }
+
+ if (aip == NULL) {
+ return NULL;
+ }
+
+ if (orig == NULL) { /* ConstraintChoice ::= (self contained) */
+ atp = AsnReadId(aip, amp, CONSTRAINT_CHOICE);
+ } else {
+ atp = AsnLinkType(orig, CONSTRAINT_CHOICE); /* link in local tree */
+ }
+ if (atp == NULL) {
+ return NULL;
+ }
+
+ anp = ValNodeNew(NULL);
+ if (anp == NULL) {
+ goto erret;
+ }
+ if (AsnReadVal(aip, atp, &av) <= 0) { /* read the CHOICE or OpenStruct value (nothing) */
+ goto erret;
+ }
+
+ func = NULL;
+
+ atp = AsnReadId(aip, amp, atp); /* find the choice */
+ if (atp == NULL) {
+ goto erret;
+ }
+ if (atp == CONSTRAINT_CHOICE_string) {
+ choice = ConstraintChoice_string;
+ func = (AsnReadFunc) StringConstraintAsnRead;
+ }
+ else if (atp == CONSTRAINT_CHOICE_location) {
+ choice = ConstraintChoice_location;
+ func = (AsnReadFunc) LocationConstraintAsnRead;
+ }
+ else if (atp == CONSTRAINT_CHOICE_source) {
+ choice = ConstraintChoice_source;
+ func = (AsnReadFunc) SourceConstraintAsnRead;
+ }
+ else if (atp == CHOICE_cdsgeneprot_qual) {
+ choice = ConstraintChoice_cdsgeneprot_qual;
+ func = (AsnReadFunc) CDSGeneProtQualConstraintAsnRead;
+ }
+ else if (atp == CHOICE_cdsgeneprot_pseudo) {
+ choice = ConstraintChoice_cdsgeneprot_pseudo;
+ func = (AsnReadFunc) CDSGeneProtPseudoConstraintAsnRead;
+ }
+ else if (atp == CONSTRAINT_CHOICE_sequence) {
+ choice = ConstraintChoice_sequence;
+ func = (AsnReadFunc) SequenceConstraintAsnRead;
+ }
+ anp->choice = choice;
+ if (func != NULL)
+ {
+ anp->data.ptrvalue = (* func)(aip, atp);
+ if (aip -> io_failure) goto erret;
+
+ if (nullIsError && anp->data.ptrvalue == NULL) {
+ goto erret;
+ }
+ }
+
+ret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return anp;
+
+erret:
+ anp = MemFree(anp);
+ aip -> io_failure = TRUE;
+ goto ret;
+}
+
+
+/**************************************************
+*
+* ConstraintChoiceAsnWrite()
+*
+**************************************************/
+NLM_EXTERN Boolean LIBCALL
+ConstraintChoiceAsnWrite(ConstraintChoicePtr anp, AsnIoPtr aip, AsnTypePtr orig)
+
+{
+ DataVal av;
+ AsnTypePtr atp, writetype = NULL;
+ Pointer pnt;
+ AsnWriteFunc func = NULL;
+ Boolean retval = FALSE;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad())
+ return FALSE;
+ }
+
+ if (aip == NULL)
+ return FALSE;
+
+ atp = AsnLinkType(orig, CONSTRAINT_CHOICE); /* link local tree */
+ if (atp == NULL) {
+ return FALSE;
+ }
+
+ if (anp == NULL) { AsnNullValueMsg(aip, atp); goto erret; }
+
+ av.ptrvalue = (Pointer)anp;
+ if (! AsnWriteChoice(aip, atp, (Int2)anp->choice, &av)) {
+ goto erret;
+ }
+
+ pnt = anp->data.ptrvalue;
+ switch (anp->choice)
+ {
+ case ConstraintChoice_string:
+ writetype = CONSTRAINT_CHOICE_string;
+ func = (AsnWriteFunc) StringConstraintAsnWrite;
+ break;
+ case ConstraintChoice_location:
+ writetype = CONSTRAINT_CHOICE_location;
+ func = (AsnWriteFunc) LocationConstraintAsnWrite;
+ break;
+ case ConstraintChoice_source:
+ writetype = CONSTRAINT_CHOICE_source;
+ func = (AsnWriteFunc) SourceConstraintAsnWrite;
+ break;
+ case ConstraintChoice_cdsgeneprot_qual:
+ writetype = CHOICE_cdsgeneprot_qual;
+ func = (AsnWriteFunc) CDSGeneProtQualConstraintAsnWrite;
+ break;
+ case ConstraintChoice_cdsgeneprot_pseudo:
+ writetype = CHOICE_cdsgeneprot_pseudo;
+ func = (AsnWriteFunc) CDSGeneProtPseudoConstraintAsnWrite;
+ break;
+ case ConstraintChoice_sequence:
+ writetype = CONSTRAINT_CHOICE_sequence;
+ func = (AsnWriteFunc) SequenceConstraintAsnWrite;
+ break;
+ }
+ if (writetype != NULL) {
+ retval = (* func)(pnt, aip, writetype); /* write it out */
+ }
+ if (!retval) {
+ goto erret;
+ }
+ retval = TRUE;
+
+erret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return retval;
+}
+
+
+/**************************************************
+*
+* ConstraintChoiceSetFree()
+*
+**************************************************/
+NLM_EXTERN
+ConstraintChoiceSetPtr LIBCALL
+ConstraintChoiceSetFree(ConstraintChoiceSetPtr ptr)
+{
+
+ if(ptr == NULL) {
+ return NULL;
+ }
+ AsnGenericChoiceSeqOfFree(ptr, (AsnOptFreeFunc) ConstraintChoiceFree);
+ return NULL;
+}
+
+
+/**************************************************
+*
+* ConstraintChoiceSetAsnRead()
+*
+**************************************************/
+NLM_EXTERN
+ConstraintChoiceSetPtr LIBCALL
+ConstraintChoiceSetAsnRead(AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ Boolean isError = FALSE;
+ AsnReadFunc func;
+ ConstraintChoiceSetPtr ptr;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return NULL;
+ }
+ }
+
+ if (aip == NULL) {
+ return NULL;
+ }
+
+ if (orig == NULL) { /* ConstraintChoiceSet ::= (self contained) */
+ atp = AsnReadId(aip, amp, CONSTRAINT_CHOICE_SET);
+ } else {
+ atp = AsnLinkType(orig, CONSTRAINT_CHOICE_SET);
+ }
+ /* link in local tree */
+ if (atp == NULL) {
+ return NULL;
+ }
+
+ func = NULL;
+
+ ptr = AsnGenericChoiceSeqOfAsnRead(aip, amp, atp, &isError, (AsnReadFunc) ConstraintChoiceAsnRead, (AsnOptFreeFunc) ConstraintChoiceFree);
+ if (isError && ptr == NULL) {
+ goto erret;
+ }
+
+
+
+ret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return ptr;
+
+erret:
+ aip -> io_failure = TRUE;
+ ptr = ConstraintChoiceSetFree(ptr);
+ goto ret;
+}
+
+
+
+/**************************************************
+*
+* ConstraintChoiceSetAsnWrite()
+*
+**************************************************/
+NLM_EXTERN Boolean LIBCALL
+ConstraintChoiceSetAsnWrite(ConstraintChoiceSetPtr ptr, AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ Boolean retval = FALSE;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return FALSE;
+ }
+ }
+
+ if (aip == NULL) {
+ return FALSE;
+ }
+
+ atp = AsnLinkType(orig, CONSTRAINT_CHOICE_SET); /* link local tree */
+ if (atp == NULL) {
+ return FALSE;
+ }
+
+ if (ptr == NULL) { AsnNullValueMsg(aip, atp); goto erret; }
+ retval = AsnGenericChoiceSeqOfAsnWrite(ptr , (AsnWriteFunc) ConstraintChoiceAsnWrite, aip, atp, CONSTRAINT_CHOICE_SET_E);
+ retval = TRUE;
+
+erret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return retval;
+}
+
+
+
+/**************************************************
+*
+* TextPortionNew()
+*
+**************************************************/
+NLM_EXTERN
+TextPortionPtr LIBCALL
+TextPortionNew(void)
+{
+ TextPortionPtr ptr = MemNew((size_t) sizeof(TextPortion));
+
+ ptr -> case_sensitive = 0;
+ ptr -> whole_word = 0;
+ return ptr;
+
+}
+
+
+/**************************************************
+*
+* TextPortionFree()
+*
+**************************************************/
+NLM_EXTERN
+TextPortionPtr LIBCALL
+TextPortionFree(TextPortionPtr ptr)
+{
+
+ if(ptr == NULL) {
+ return NULL;
+ }
+ MemFree(ptr -> left_text);
+ MemFree(ptr -> right_text);
+ return MemFree(ptr);
+}
+
+
+/**************************************************
+*
+* TextPortionAsnRead()
+*
+**************************************************/
+NLM_EXTERN
+TextPortionPtr LIBCALL
+TextPortionAsnRead(AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ Boolean isError = FALSE;
+ AsnReadFunc func;
+ TextPortionPtr ptr;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return NULL;
+ }
+ }
+
+ if (aip == NULL) {
+ return NULL;
+ }
+
+ if (orig == NULL) { /* TextPortion ::= (self contained) */
+ atp = AsnReadId(aip, amp, TEXT_PORTION);
+ } else {
+ atp = AsnLinkType(orig, TEXT_PORTION);
+ }
+ /* link in local tree */
+ if (atp == NULL) {
+ return NULL;
+ }
+
+ ptr = TextPortionNew();
+ if (ptr == NULL) {
+ goto erret;
+ }
+ if (AsnReadVal(aip, atp, &av) <= 0) { /* read the start struct */
+ goto erret;
+ }
+
+ atp = AsnReadId(aip,amp, atp);
+ func = NULL;
+
+ if (atp == TEXT_PORTION_left_text) {
+ if ( AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ ptr -> left_text = av.ptrvalue;
+ atp = AsnReadId(aip,amp, atp);
+ }
+ if (atp == TEXT_PORTION_include_left) {
+ if ( AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ ptr -> include_left = av.boolvalue;
+ atp = AsnReadId(aip,amp, atp);
+ }
+ if (atp == TEXT_PORTION_right_text) {
+ if ( AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ ptr -> right_text = av.ptrvalue;
+ atp = AsnReadId(aip,amp, atp);
+ }
+ if (atp == TEXT_PORTION_include_right) {
+ if ( AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ ptr -> include_right = av.boolvalue;
+ atp = AsnReadId(aip,amp, atp);
+ }
+ if (atp == TEXT_PORTION_inside) {
+ if ( AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ ptr -> inside = av.boolvalue;
+ atp = AsnReadId(aip,amp, atp);
+ }
+ if (atp == TEXT_PORTION_case_sensitive) {
+ if ( AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ ptr -> case_sensitive = av.boolvalue;
+ atp = AsnReadId(aip,amp, atp);
+ }
+ if (atp == TEXT_PORTION_whole_word) {
+ if ( AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ ptr -> whole_word = av.boolvalue;
+ atp = AsnReadId(aip,amp, atp);
+ }
+
+ if (AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ /* end struct */
+
+ret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return ptr;
+
+erret:
+ aip -> io_failure = TRUE;
+ ptr = TextPortionFree(ptr);
+ goto ret;
+}
+
+
+
+/**************************************************
+*
+* TextPortionAsnWrite()
+*
+**************************************************/
+NLM_EXTERN Boolean LIBCALL
+TextPortionAsnWrite(TextPortionPtr ptr, AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ Boolean retval = FALSE;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return FALSE;
+ }
+ }
+
+ if (aip == NULL) {
+ return FALSE;
+ }
+
+ atp = AsnLinkType(orig, TEXT_PORTION); /* link local tree */
+ if (atp == NULL) {
+ return FALSE;
+ }
+
+ if (ptr == NULL) { AsnNullValueMsg(aip, atp); goto erret; }
+ if (! AsnOpenStruct(aip, atp, (Pointer) ptr)) {
+ goto erret;
+ }
+
+ if (ptr -> left_text != NULL) {
+ av.ptrvalue = ptr -> left_text;
+ retval = AsnWrite(aip, TEXT_PORTION_left_text, &av);
+ }
+ av.boolvalue = ptr -> include_left;
+ retval = AsnWrite(aip, TEXT_PORTION_include_left, &av);
+ if (ptr -> right_text != NULL) {
+ av.ptrvalue = ptr -> right_text;
+ retval = AsnWrite(aip, TEXT_PORTION_right_text, &av);
+ }
+ av.boolvalue = ptr -> include_right;
+ retval = AsnWrite(aip, TEXT_PORTION_include_right, &av);
+ av.boolvalue = ptr -> inside;
+ retval = AsnWrite(aip, TEXT_PORTION_inside, &av);
+ av.boolvalue = ptr -> case_sensitive;
+ retval = AsnWrite(aip, TEXT_PORTION_case_sensitive, &av);
+ av.boolvalue = ptr -> whole_word;
+ retval = AsnWrite(aip, TEXT_PORTION_whole_word, &av);
+ if (! AsnCloseStruct(aip, atp, (Pointer)ptr)) {
+ goto erret;
+ }
+ retval = TRUE;
+
+erret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return retval;
+}
+
+
+
+/**************************************************
+*
+* FieldEditNew()
+*
+**************************************************/
+NLM_EXTERN
+FieldEditPtr LIBCALL
+FieldEditNew(void)
+{
+ FieldEditPtr ptr = MemNew((size_t) sizeof(FieldEdit));
+
+ ptr -> location = 0;
+ return ptr;
+
+}
+
+
+/**************************************************
+*
+* FieldEditFree()
+*
+**************************************************/
+NLM_EXTERN
+FieldEditPtr LIBCALL
+FieldEditFree(FieldEditPtr ptr)
+{
+
+ if(ptr == NULL) {
+ return NULL;
+ }
+ MemFree(ptr -> find_txt);
+ MemFree(ptr -> repl_txt);
+ return MemFree(ptr);
+}
+
+
+/**************************************************
+*
+* FieldEditAsnRead()
+*
+**************************************************/
+NLM_EXTERN
+FieldEditPtr LIBCALL
+FieldEditAsnRead(AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ Boolean isError = FALSE;
+ AsnReadFunc func;
+ FieldEditPtr ptr;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return NULL;
+ }
+ }
+
+ if (aip == NULL) {
+ return NULL;
+ }
+
+ if (orig == NULL) { /* FieldEdit ::= (self contained) */
+ atp = AsnReadId(aip, amp, FIELD_EDIT);
+ } else {
+ atp = AsnLinkType(orig, FIELD_EDIT);
+ }
+ /* link in local tree */
+ if (atp == NULL) {
+ return NULL;
+ }
+
+ ptr = FieldEditNew();
+ if (ptr == NULL) {
+ goto erret;
+ }
+ if (AsnReadVal(aip, atp, &av) <= 0) { /* read the start struct */
+ goto erret;
+ }
+
+ atp = AsnReadId(aip,amp, atp);
+ func = NULL;
+
+ if (atp == FIELD_EDIT_find_txt) {
+ if ( AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ ptr -> find_txt = av.ptrvalue;
+ atp = AsnReadId(aip,amp, atp);
+ }
+ if (atp == FIELD_EDIT_repl_txt) {
+ if ( AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ ptr -> repl_txt = av.ptrvalue;
+ atp = AsnReadId(aip,amp, atp);
+ }
+ if (atp == FIELD_EDIT_location) {
+ if ( AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ ptr -> location = av.intvalue;
+ atp = AsnReadId(aip,amp, atp);
+ }
+
+ if (AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ /* end struct */
+
+ret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return ptr;
+
+erret:
+ aip -> io_failure = TRUE;
+ ptr = FieldEditFree(ptr);
+ goto ret;
+}
+
+
+
+/**************************************************
+*
+* FieldEditAsnWrite()
+*
+**************************************************/
+NLM_EXTERN Boolean LIBCALL
+FieldEditAsnWrite(FieldEditPtr ptr, AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ Boolean retval = FALSE;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return FALSE;
+ }
+ }
+
+ if (aip == NULL) {
+ return FALSE;
+ }
+
+ atp = AsnLinkType(orig, FIELD_EDIT); /* link local tree */
+ if (atp == NULL) {
+ return FALSE;
+ }
+
+ if (ptr == NULL) { AsnNullValueMsg(aip, atp); goto erret; }
+ if (! AsnOpenStruct(aip, atp, (Pointer) ptr)) {
+ goto erret;
+ }
+
+ if (ptr -> find_txt != NULL) {
+ av.ptrvalue = ptr -> find_txt;
+ retval = AsnWrite(aip, FIELD_EDIT_find_txt, &av);
+ }
+ if (ptr -> repl_txt != NULL) {
+ av.ptrvalue = ptr -> repl_txt;
+ retval = AsnWrite(aip, FIELD_EDIT_repl_txt, &av);
+ }
+ av.intvalue = ptr -> location;
+ retval = AsnWrite(aip, FIELD_EDIT_location, &av);
+ if (! AsnCloseStruct(aip, atp, (Pointer)ptr)) {
+ goto erret;
+ }
+ retval = TRUE;
+
+erret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return retval;
+}
+
+
+
+/**************************************************
+*
+* FieldTypeFree()
+*
+**************************************************/
+NLM_EXTERN
+FieldTypePtr LIBCALL
+FieldTypeFree(ValNodePtr anp)
+{
+ Pointer pnt;
+
+ if (anp == NULL) {
+ return NULL;
+ }
+
+ pnt = anp->data.ptrvalue;
+ switch (anp->choice)
+ {
+ default:
+ break;
+ case FieldType_source_qual:
+ SourceQualChoiceFree(anp -> data.ptrvalue);
+ break;
+ case FieldType_feature_field:
+ FeatureFieldFree(anp -> data.ptrvalue);
+ break;
+ case FieldType_molinfo_field:
+ MolinfoFieldFree(anp -> data.ptrvalue);
+ break;
+ }
+ return MemFree(anp);
+}
+
+
+/**************************************************
+*
+* FieldTypeAsnRead()
+*
+**************************************************/
+NLM_EXTERN
+FieldTypePtr LIBCALL
+FieldTypeAsnRead(AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ ValNodePtr anp;
+ Uint1 choice;
+ Boolean isError = FALSE;
+ Boolean nullIsError = FALSE;
+ AsnReadFunc func;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return NULL;
+ }
+ }
+
+ if (aip == NULL) {
+ return NULL;
+ }
+
+ if (orig == NULL) { /* FieldType ::= (self contained) */
+ atp = AsnReadId(aip, amp, FIELD_TYPE);
+ } else {
+ atp = AsnLinkType(orig, FIELD_TYPE); /* link in local tree */
+ }
+ if (atp == NULL) {
+ return NULL;
+ }
+
+ anp = ValNodeNew(NULL);
+ if (anp == NULL) {
+ goto erret;
+ }
+ if (AsnReadVal(aip, atp, &av) <= 0) { /* read the CHOICE or OpenStruct value (nothing) */
+ goto erret;
+ }
+
+ func = NULL;
+
+ atp = AsnReadId(aip, amp, atp); /* find the choice */
+ if (atp == NULL) {
+ goto erret;
+ }
+ if (atp == FIELD_TYPE_source_qual) {
+ choice = FieldType_source_qual;
+ func = (AsnReadFunc) SourceQualChoiceAsnRead;
+ }
+ else if (atp == FIELD_TYPE_feature_field) {
+ choice = FieldType_feature_field;
+ func = (AsnReadFunc) FeatureFieldAsnRead;
+ }
+ else if (atp == FIELD_TYPE_cds_gene_prot) {
+ choice = FieldType_cds_gene_prot;
+ if (AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ anp->data.intvalue = av.intvalue;
+ }
+ else if (atp == FIELD_TYPE_molinfo_field) {
+ choice = FieldType_molinfo_field;
+ func = (AsnReadFunc) MolinfoFieldAsnRead;
+ }
+ anp->choice = choice;
+ if (func != NULL)
+ {
+ anp->data.ptrvalue = (* func)(aip, atp);
+ if (aip -> io_failure) goto erret;
+
+ if (nullIsError && anp->data.ptrvalue == NULL) {
+ goto erret;
+ }
+ }
+
+ret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return anp;
+
+erret:
+ anp = MemFree(anp);
+ aip -> io_failure = TRUE;
+ goto ret;
+}
+
+
+/**************************************************
+*
+* FieldTypeAsnWrite()
+*
+**************************************************/
+NLM_EXTERN Boolean LIBCALL
+FieldTypeAsnWrite(FieldTypePtr anp, AsnIoPtr aip, AsnTypePtr orig)
+
+{
+ DataVal av;
+ AsnTypePtr atp, writetype = NULL;
+ Pointer pnt;
+ AsnWriteFunc func = NULL;
+ Boolean retval = FALSE;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad())
+ return FALSE;
+ }
+
+ if (aip == NULL)
+ return FALSE;
+
+ atp = AsnLinkType(orig, FIELD_TYPE); /* link local tree */
+ if (atp == NULL) {
+ return FALSE;
+ }
+
+ if (anp == NULL) { AsnNullValueMsg(aip, atp); goto erret; }
+
+ av.ptrvalue = (Pointer)anp;
+ if (! AsnWriteChoice(aip, atp, (Int2)anp->choice, &av)) {
+ goto erret;
+ }
+
+ pnt = anp->data.ptrvalue;
+ switch (anp->choice)
+ {
+ case FieldType_source_qual:
+ writetype = FIELD_TYPE_source_qual;
+ func = (AsnWriteFunc) SourceQualChoiceAsnWrite;
+ break;
+ case FieldType_feature_field:
+ writetype = FIELD_TYPE_feature_field;
+ func = (AsnWriteFunc) FeatureFieldAsnWrite;
+ break;
+ case FieldType_cds_gene_prot:
+ av.intvalue = anp->data.intvalue;
+ retval = AsnWrite(aip, FIELD_TYPE_cds_gene_prot, &av);
+ break;
+ case FieldType_molinfo_field:
+ writetype = FIELD_TYPE_molinfo_field;
+ func = (AsnWriteFunc) MolinfoFieldAsnWrite;
+ break;
+ }
+ if (writetype != NULL) {
+ retval = (* func)(pnt, aip, writetype); /* write it out */
+ }
+ if (!retval) {
+ goto erret;
+ }
+ retval = TRUE;
+
+erret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return retval;
+}
+
+
+/**************************************************
+*
+* FieldPairTypeFree()
+*
+**************************************************/
+NLM_EXTERN
+FieldPairTypePtr LIBCALL
+FieldPairTypeFree(ValNodePtr anp)
+{
+ Pointer pnt;
+
+ if (anp == NULL) {
+ return NULL;
+ }
+
+ pnt = anp->data.ptrvalue;
+ switch (anp->choice)
+ {
+ default:
+ break;
+ case FieldPairType_source_qual:
+ SourceQualPairFree(anp -> data.ptrvalue);
+ break;
+ case FieldPairType_feature_field:
+ FeatureFieldPairFree(anp -> data.ptrvalue);
+ break;
+ case FieldPairType_cds_gene_prot:
+ CDSGeneProtFieldPairFree(anp -> data.ptrvalue);
+ break;
+ case FieldPairType_molinfo_field:
+ MolinfoFieldPairFree(anp -> data.ptrvalue);
+ break;
+ }
+ return MemFree(anp);
+}
+
+
+/**************************************************
+*
+* FieldPairTypeAsnRead()
+*
+**************************************************/
+NLM_EXTERN
+FieldPairTypePtr LIBCALL
+FieldPairTypeAsnRead(AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ ValNodePtr anp;
+ Uint1 choice;
+ Boolean isError = FALSE;
+ Boolean nullIsError = FALSE;
+ AsnReadFunc func;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return NULL;
+ }
+ }
+
+ if (aip == NULL) {
+ return NULL;
+ }
+
+ if (orig == NULL) { /* FieldPairType ::= (self contained) */
+ atp = AsnReadId(aip, amp, FIELD_PAIR_TYPE);
+ } else {
+ atp = AsnLinkType(orig, FIELD_PAIR_TYPE); /* link in local tree */
+ }
+ if (atp == NULL) {
+ return NULL;
+ }
+
+ anp = ValNodeNew(NULL);
+ if (anp == NULL) {
+ goto erret;
+ }
+ if (AsnReadVal(aip, atp, &av) <= 0) { /* read the CHOICE or OpenStruct value (nothing) */
+ goto erret;
+ }
+
+ func = NULL;
+
+ atp = AsnReadId(aip, amp, atp); /* find the choice */
+ if (atp == NULL) {
+ goto erret;
+ }
+ if (atp == FIELD_PAIR_TYPE_source_qual) {
+ choice = FieldPairType_source_qual;
+ func = (AsnReadFunc) SourceQualPairAsnRead;
+ }
+ else if (atp == FIELD_PAIR_TYPE_feature_field) {
+ choice = FieldPairType_feature_field;
+ func = (AsnReadFunc) FeatureFieldPairAsnRead;
+ }
+ else if (atp == FIELD_PAIR_TYPE_cds_gene_prot) {
+ choice = FieldPairType_cds_gene_prot;
+ func = (AsnReadFunc) CDSGeneProtFieldPairAsnRead;
+ }
+ else if (atp == FIELD_PAIR_TYPE_molinfo_field) {
+ choice = FieldPairType_molinfo_field;
+ func = (AsnReadFunc) MolinfoFieldPairAsnRead;
+ }
+ anp->choice = choice;
+ if (func != NULL)
+ {
+ anp->data.ptrvalue = (* func)(aip, atp);
+ if (aip -> io_failure) goto erret;
+
+ if (nullIsError && anp->data.ptrvalue == NULL) {
+ goto erret;
+ }
+ }
+
+ret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return anp;
+
+erret:
+ anp = MemFree(anp);
+ aip -> io_failure = TRUE;
+ goto ret;
+}
+
+
+/**************************************************
+*
+* FieldPairTypeAsnWrite()
+*
+**************************************************/
+NLM_EXTERN Boolean LIBCALL
+FieldPairTypeAsnWrite(FieldPairTypePtr anp, AsnIoPtr aip, AsnTypePtr orig)
+
+{
+ DataVal av;
+ AsnTypePtr atp, writetype = NULL;
+ Pointer pnt;
+ AsnWriteFunc func = NULL;
+ Boolean retval = FALSE;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad())
+ return FALSE;
+ }
+
+ if (aip == NULL)
+ return FALSE;
+
+ atp = AsnLinkType(orig, FIELD_PAIR_TYPE); /* link local tree */
+ if (atp == NULL) {
+ return FALSE;
+ }
+
+ if (anp == NULL) { AsnNullValueMsg(aip, atp); goto erret; }
+
+ av.ptrvalue = (Pointer)anp;
+ if (! AsnWriteChoice(aip, atp, (Int2)anp->choice, &av)) {
+ goto erret;
+ }
+
+ pnt = anp->data.ptrvalue;
+ switch (anp->choice)
+ {
+ case FieldPairType_source_qual:
+ writetype = FIELD_PAIR_TYPE_source_qual;
+ func = (AsnWriteFunc) SourceQualPairAsnWrite;
+ break;
+ case FieldPairType_feature_field:
+ writetype = FIELD_PAIR_TYPE_feature_field;
+ func = (AsnWriteFunc) FeatureFieldPairAsnWrite;
+ break;
+ case FieldPairType_cds_gene_prot:
+ writetype = FIELD_PAIR_TYPE_cds_gene_prot;
+ func = (AsnWriteFunc) CDSGeneProtFieldPairAsnWrite;
+ break;
+ case FieldPairType_molinfo_field:
+ writetype = FIELD_PAIR_TYPE_molinfo_field;
+ func = (AsnWriteFunc) MolinfoFieldPairAsnWrite;
+ break;
+ }
+ if (writetype != NULL) {
+ retval = (* func)(pnt, aip, writetype); /* write it out */
+ }
+ if (!retval) {
+ goto erret;
+ }
+ retval = TRUE;
+
+erret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return retval;
+}
+
+
+/**************************************************
+*
+* ApplyActionNew()
+*
+**************************************************/
+NLM_EXTERN
+ApplyActionPtr LIBCALL
+ApplyActionNew(void)
+{
+ ApplyActionPtr ptr = MemNew((size_t) sizeof(ApplyAction));
+
+ return ptr;
+
+}
+
+
+/**************************************************
+*
+* ApplyActionFree()
+*
+**************************************************/
+NLM_EXTERN
+ApplyActionPtr LIBCALL
+ApplyActionFree(ApplyActionPtr ptr)
+{
+
+ if(ptr == NULL) {
+ return NULL;
+ }
+ FieldTypeFree(ptr -> field);
+ MemFree(ptr -> value);
+ return MemFree(ptr);
+}
+
+
+/**************************************************
+*
+* ApplyActionAsnRead()
+*
+**************************************************/
+NLM_EXTERN
+ApplyActionPtr LIBCALL
+ApplyActionAsnRead(AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ Boolean isError = FALSE;
+ AsnReadFunc func;
+ ApplyActionPtr ptr;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return NULL;
+ }
+ }
+
+ if (aip == NULL) {
+ return NULL;
+ }
+
+ if (orig == NULL) { /* ApplyAction ::= (self contained) */
+ atp = AsnReadId(aip, amp, APPLY_ACTION);
+ } else {
+ atp = AsnLinkType(orig, APPLY_ACTION);
+ }
+ /* link in local tree */
+ if (atp == NULL) {
+ return NULL;
+ }
+
+ ptr = ApplyActionNew();
+ if (ptr == NULL) {
+ goto erret;
+ }
+ if (AsnReadVal(aip, atp, &av) <= 0) { /* read the start struct */
+ goto erret;
+ }
+
+ atp = AsnReadId(aip,amp, atp);
+ func = NULL;
+
+ if (atp == APPLY_ACTION_field) {
+ ptr -> field = FieldTypeAsnRead(aip, atp);
+ if (aip -> io_failure) {
+ goto erret;
+ }
+ atp = AsnReadId(aip,amp, atp);
+ }
+ if (atp == APPLY_ACTION_value) {
+ if ( AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ ptr -> value = av.ptrvalue;
+ atp = AsnReadId(aip,amp, atp);
+ }
+ if (atp == APPLY_ACTION_existing_text) {
+ if ( AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ ptr -> existing_text = av.intvalue;
+ atp = AsnReadId(aip,amp, atp);
+ }
+
+ if (AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ /* end struct */
+
+ret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return ptr;
+
+erret:
+ aip -> io_failure = TRUE;
+ ptr = ApplyActionFree(ptr);
+ goto ret;
+}
+
+
+
+/**************************************************
+*
+* ApplyActionAsnWrite()
+*
+**************************************************/
+NLM_EXTERN Boolean LIBCALL
+ApplyActionAsnWrite(ApplyActionPtr ptr, AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ Boolean retval = FALSE;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return FALSE;
+ }
+ }
+
+ if (aip == NULL) {
+ return FALSE;
+ }
+
+ atp = AsnLinkType(orig, APPLY_ACTION); /* link local tree */
+ if (atp == NULL) {
+ return FALSE;
+ }
+
+ if (ptr == NULL) { AsnNullValueMsg(aip, atp); goto erret; }
+ if (! AsnOpenStruct(aip, atp, (Pointer) ptr)) {
+ goto erret;
+ }
+
+ if (ptr -> field != NULL) {
+ if ( ! FieldTypeAsnWrite(ptr -> field, aip, APPLY_ACTION_field)) {
+ goto erret;
+ }
+ }
+ if (ptr -> value != NULL) {
+ av.ptrvalue = ptr -> value;
+ retval = AsnWrite(aip, APPLY_ACTION_value, &av);
+ }
+ av.intvalue = ptr -> existing_text;
+ retval = AsnWrite(aip, APPLY_ACTION_existing_text, &av);
+ if (! AsnCloseStruct(aip, atp, (Pointer)ptr)) {
+ goto erret;
+ }
+ retval = TRUE;
+
+erret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return retval;
+}
+
+
+
+/**************************************************
+*
+* EditActionNew()
+*
+**************************************************/
+NLM_EXTERN
+EditActionPtr LIBCALL
+EditActionNew(void)
+{
+ EditActionPtr ptr = MemNew((size_t) sizeof(EditAction));
+
+ return ptr;
+
+}
+
+
+/**************************************************
+*
+* EditActionFree()
+*
+**************************************************/
+NLM_EXTERN
+EditActionPtr LIBCALL
+EditActionFree(EditActionPtr ptr)
+{
+
+ if(ptr == NULL) {
+ return NULL;
+ }
+ FieldEditFree(ptr -> edit);
+ FieldTypeFree(ptr -> field);
+ return MemFree(ptr);
+}
+
+
+/**************************************************
+*
+* EditActionAsnRead()
+*
+**************************************************/
+NLM_EXTERN
+EditActionPtr LIBCALL
+EditActionAsnRead(AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ Boolean isError = FALSE;
+ AsnReadFunc func;
+ EditActionPtr ptr;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return NULL;
+ }
+ }
+
+ if (aip == NULL) {
+ return NULL;
+ }
+
+ if (orig == NULL) { /* EditAction ::= (self contained) */
+ atp = AsnReadId(aip, amp, EDIT_ACTION);
+ } else {
+ atp = AsnLinkType(orig, EDIT_ACTION);
+ }
+ /* link in local tree */
+ if (atp == NULL) {
+ return NULL;
+ }
+
+ ptr = EditActionNew();
+ if (ptr == NULL) {
+ goto erret;
+ }
+ if (AsnReadVal(aip, atp, &av) <= 0) { /* read the start struct */
+ goto erret;
+ }
+
+ atp = AsnReadId(aip,amp, atp);
+ func = NULL;
+
+ if (atp == EDIT_ACTION_edit) {
+ ptr -> edit = FieldEditAsnRead(aip, atp);
+ if (aip -> io_failure) {
+ goto erret;
+ }
+ atp = AsnReadId(aip,amp, atp);
+ }
+ if (atp == EDIT_ACTION_field) {
+ ptr -> field = FieldTypeAsnRead(aip, atp);
+ if (aip -> io_failure) {
+ goto erret;
+ }
+ atp = AsnReadId(aip,amp, atp);
+ }
+
+ if (AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ /* end struct */
+
+ret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return ptr;
+
+erret:
+ aip -> io_failure = TRUE;
+ ptr = EditActionFree(ptr);
+ goto ret;
+}
+
+
+
+/**************************************************
+*
+* EditActionAsnWrite()
+*
+**************************************************/
+NLM_EXTERN Boolean LIBCALL
+EditActionAsnWrite(EditActionPtr ptr, AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ Boolean retval = FALSE;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return FALSE;
+ }
+ }
+
+ if (aip == NULL) {
+ return FALSE;
+ }
+
+ atp = AsnLinkType(orig, EDIT_ACTION); /* link local tree */
+ if (atp == NULL) {
+ return FALSE;
+ }
+
+ if (ptr == NULL) { AsnNullValueMsg(aip, atp); goto erret; }
+ if (! AsnOpenStruct(aip, atp, (Pointer) ptr)) {
+ goto erret;
+ }
+
+ if (ptr -> edit != NULL) {
+ if ( ! FieldEditAsnWrite(ptr -> edit, aip, EDIT_ACTION_edit)) {
+ goto erret;
+ }
+ }
+ if (ptr -> field != NULL) {
+ if ( ! FieldTypeAsnWrite(ptr -> field, aip, EDIT_ACTION_field)) {
+ goto erret;
+ }
+ }
+ if (! AsnCloseStruct(aip, atp, (Pointer)ptr)) {
+ goto erret;
+ }
+ retval = TRUE;
+
+erret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return retval;
+}
+
+
+
+/**************************************************
+*
+* ConvertActionNew()
+*
+**************************************************/
+NLM_EXTERN
+ConvertActionPtr LIBCALL
+ConvertActionNew(void)
+{
+ ConvertActionPtr ptr = MemNew((size_t) sizeof(ConvertAction));
+
+ return ptr;
+
+}
+
+
+/**************************************************
+*
+* ConvertActionFree()
+*
+**************************************************/
+NLM_EXTERN
+ConvertActionPtr LIBCALL
+ConvertActionFree(ConvertActionPtr ptr)
+{
+
+ if(ptr == NULL) {
+ return NULL;
+ }
+ FieldPairTypeFree(ptr -> fields);
+ return MemFree(ptr);
+}
+
+
+/**************************************************
+*
+* ConvertActionAsnRead()
+*
+**************************************************/
+NLM_EXTERN
+ConvertActionPtr LIBCALL
+ConvertActionAsnRead(AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ Boolean isError = FALSE;
+ AsnReadFunc func;
+ ConvertActionPtr ptr;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return NULL;
+ }
+ }
+
+ if (aip == NULL) {
+ return NULL;
+ }
+
+ if (orig == NULL) { /* ConvertAction ::= (self contained) */
+ atp = AsnReadId(aip, amp, CONVERT_ACTION);
+ } else {
+ atp = AsnLinkType(orig, CONVERT_ACTION);
+ }
+ /* link in local tree */
+ if (atp == NULL) {
+ return NULL;
+ }
+
+ ptr = ConvertActionNew();
+ if (ptr == NULL) {
+ goto erret;
+ }
+ if (AsnReadVal(aip, atp, &av) <= 0) { /* read the start struct */
+ goto erret;
+ }
+
+ atp = AsnReadId(aip,amp, atp);
+ func = NULL;
+
+ if (atp == CONVERT_ACTION_fields) {
+ ptr -> fields = FieldPairTypeAsnRead(aip, atp);
+ if (aip -> io_failure) {
+ goto erret;
+ }
+ atp = AsnReadId(aip,amp, atp);
+ }
+ if (atp == CONVERT_ACTION_existing_text) {
+ if ( AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ ptr -> existing_text = av.intvalue;
+ atp = AsnReadId(aip,amp, atp);
+ }
+
+ if (AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ /* end struct */
+
+ret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return ptr;
+
+erret:
+ aip -> io_failure = TRUE;
+ ptr = ConvertActionFree(ptr);
+ goto ret;
+}
+
+
+
+/**************************************************
+*
+* ConvertActionAsnWrite()
+*
+**************************************************/
+NLM_EXTERN Boolean LIBCALL
+ConvertActionAsnWrite(ConvertActionPtr ptr, AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ Boolean retval = FALSE;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return FALSE;
+ }
+ }
+
+ if (aip == NULL) {
+ return FALSE;
+ }
+
+ atp = AsnLinkType(orig, CONVERT_ACTION); /* link local tree */
+ if (atp == NULL) {
+ return FALSE;
+ }
+
+ if (ptr == NULL) { AsnNullValueMsg(aip, atp); goto erret; }
+ if (! AsnOpenStruct(aip, atp, (Pointer) ptr)) {
+ goto erret;
+ }
+
+ if (ptr -> fields != NULL) {
+ if ( ! FieldPairTypeAsnWrite(ptr -> fields, aip, CONVERT_ACTION_fields)) {
+ goto erret;
+ }
+ }
+ av.intvalue = ptr -> existing_text;
+ retval = AsnWrite(aip, CONVERT_ACTION_existing_text, &av);
+ if (! AsnCloseStruct(aip, atp, (Pointer)ptr)) {
+ goto erret;
+ }
+ retval = TRUE;
+
+erret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return retval;
+}
+
+
+
+/**************************************************
+*
+* CopyActionNew()
+*
+**************************************************/
+NLM_EXTERN
+CopyActionPtr LIBCALL
+CopyActionNew(void)
+{
+ CopyActionPtr ptr = MemNew((size_t) sizeof(CopyAction));
+
+ return ptr;
+
+}
+
+
+/**************************************************
+*
+* CopyActionFree()
+*
+**************************************************/
+NLM_EXTERN
+CopyActionPtr LIBCALL
+CopyActionFree(CopyActionPtr ptr)
+{
+
+ if(ptr == NULL) {
+ return NULL;
+ }
+ FieldPairTypeFree(ptr -> fields);
+ return MemFree(ptr);
+}
+
+
+/**************************************************
+*
+* CopyActionAsnRead()
+*
+**************************************************/
+NLM_EXTERN
+CopyActionPtr LIBCALL
+CopyActionAsnRead(AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ Boolean isError = FALSE;
+ AsnReadFunc func;
+ CopyActionPtr ptr;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return NULL;
+ }
+ }
+
+ if (aip == NULL) {
+ return NULL;
+ }
+
+ if (orig == NULL) { /* CopyAction ::= (self contained) */
+ atp = AsnReadId(aip, amp, COPY_ACTION);
+ } else {
+ atp = AsnLinkType(orig, COPY_ACTION);
+ }
+ /* link in local tree */
+ if (atp == NULL) {
+ return NULL;
+ }
+
+ ptr = CopyActionNew();
+ if (ptr == NULL) {
+ goto erret;
+ }
+ if (AsnReadVal(aip, atp, &av) <= 0) { /* read the start struct */
+ goto erret;
+ }
+
+ atp = AsnReadId(aip,amp, atp);
+ func = NULL;
+
+ if (atp == COPY_ACTION_fields) {
+ ptr -> fields = FieldPairTypeAsnRead(aip, atp);
+ if (aip -> io_failure) {
+ goto erret;
+ }
+ atp = AsnReadId(aip,amp, atp);
+ }
+ if (atp == COPY_ACTION_existing_text) {
+ if ( AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ ptr -> existing_text = av.intvalue;
+ atp = AsnReadId(aip,amp, atp);
+ }
+
+ if (AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ /* end struct */
+
+ret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return ptr;
+
+erret:
+ aip -> io_failure = TRUE;
+ ptr = CopyActionFree(ptr);
+ goto ret;
+}
+
+
+
+/**************************************************
+*
+* CopyActionAsnWrite()
+*
+**************************************************/
+NLM_EXTERN Boolean LIBCALL
+CopyActionAsnWrite(CopyActionPtr ptr, AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ Boolean retval = FALSE;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return FALSE;
+ }
+ }
+
+ if (aip == NULL) {
+ return FALSE;
+ }
+
+ atp = AsnLinkType(orig, COPY_ACTION); /* link local tree */
+ if (atp == NULL) {
+ return FALSE;
+ }
+
+ if (ptr == NULL) { AsnNullValueMsg(aip, atp); goto erret; }
+ if (! AsnOpenStruct(aip, atp, (Pointer) ptr)) {
+ goto erret;
+ }
+
+ if (ptr -> fields != NULL) {
+ if ( ! FieldPairTypeAsnWrite(ptr -> fields, aip, COPY_ACTION_fields)) {
+ goto erret;
+ }
+ }
+ av.intvalue = ptr -> existing_text;
+ retval = AsnWrite(aip, COPY_ACTION_existing_text, &av);
+ if (! AsnCloseStruct(aip, atp, (Pointer)ptr)) {
+ goto erret;
+ }
+ retval = TRUE;
+
+erret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return retval;
+}
+
+
+
+/**************************************************
+*
+* SwapActionNew()
+*
+**************************************************/
+NLM_EXTERN
+SwapActionPtr LIBCALL
+SwapActionNew(void)
+{
+ SwapActionPtr ptr = MemNew((size_t) sizeof(SwapAction));
+
+ return ptr;
+
+}
+
+
+/**************************************************
+*
+* SwapActionFree()
+*
+**************************************************/
+NLM_EXTERN
+SwapActionPtr LIBCALL
+SwapActionFree(SwapActionPtr ptr)
+{
+
+ if(ptr == NULL) {
+ return NULL;
+ }
+ FieldPairTypeFree(ptr -> fields);
+ FieldTypeFree(ptr -> field_to);
+ return MemFree(ptr);
+}
+
+
+/**************************************************
+*
+* SwapActionAsnRead()
+*
+**************************************************/
+NLM_EXTERN
+SwapActionPtr LIBCALL
+SwapActionAsnRead(AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ Boolean isError = FALSE;
+ AsnReadFunc func;
+ SwapActionPtr ptr;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return NULL;
+ }
+ }
+
+ if (aip == NULL) {
+ return NULL;
+ }
+
+ if (orig == NULL) { /* SwapAction ::= (self contained) */
+ atp = AsnReadId(aip, amp, SWAP_ACTION);
+ } else {
+ atp = AsnLinkType(orig, SWAP_ACTION);
+ }
+ /* link in local tree */
+ if (atp == NULL) {
+ return NULL;
+ }
+
+ ptr = SwapActionNew();
+ if (ptr == NULL) {
+ goto erret;
+ }
+ if (AsnReadVal(aip, atp, &av) <= 0) { /* read the start struct */
+ goto erret;
+ }
+
+ atp = AsnReadId(aip,amp, atp);
+ func = NULL;
+
+ if (atp == SWAP_ACTION_fields) {
+ ptr -> fields = FieldPairTypeAsnRead(aip, atp);
+ if (aip -> io_failure) {
+ goto erret;
+ }
+ atp = AsnReadId(aip,amp, atp);
+ }
+ if (atp == SWAP_ACTION_field_to) {
+ ptr -> field_to = FieldTypeAsnRead(aip, atp);
+ if (aip -> io_failure) {
+ goto erret;
+ }
+ atp = AsnReadId(aip,amp, atp);
+ }
+
+ if (AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ /* end struct */
+
+ret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return ptr;
+
+erret:
+ aip -> io_failure = TRUE;
+ ptr = SwapActionFree(ptr);
+ goto ret;
+}
+
+
+
+/**************************************************
+*
+* SwapActionAsnWrite()
+*
+**************************************************/
+NLM_EXTERN Boolean LIBCALL
+SwapActionAsnWrite(SwapActionPtr ptr, AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ Boolean retval = FALSE;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return FALSE;
+ }
+ }
+
+ if (aip == NULL) {
+ return FALSE;
+ }
+
+ atp = AsnLinkType(orig, SWAP_ACTION); /* link local tree */
+ if (atp == NULL) {
+ return FALSE;
+ }
+
+ if (ptr == NULL) { AsnNullValueMsg(aip, atp); goto erret; }
+ if (! AsnOpenStruct(aip, atp, (Pointer) ptr)) {
+ goto erret;
+ }
+
+ if (ptr -> fields != NULL) {
+ if ( ! FieldPairTypeAsnWrite(ptr -> fields, aip, SWAP_ACTION_fields)) {
+ goto erret;
+ }
+ }
+ if (ptr -> field_to != NULL) {
+ if ( ! FieldTypeAsnWrite(ptr -> field_to, aip, SWAP_ACTION_field_to)) {
+ goto erret;
+ }
+ }
+ if (! AsnCloseStruct(aip, atp, (Pointer)ptr)) {
+ goto erret;
+ }
+ retval = TRUE;
+
+erret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return retval;
+}
+
+
+
+/**************************************************
+*
+* AECRParseActionNew()
+*
+**************************************************/
+NLM_EXTERN
+AECRParseActionPtr LIBCALL
+AECRParseActionNew(void)
+{
+ AECRParseActionPtr ptr = MemNew((size_t) sizeof(AECRParseAction));
+
+ ptr -> remove_from_parsed = 0;
+ return ptr;
+
+}
+
+
+/**************************************************
+*
+* AECRParseActionFree()
+*
+**************************************************/
+NLM_EXTERN
+AECRParseActionPtr LIBCALL
+AECRParseActionFree(AECRParseActionPtr ptr)
+{
+
+ if(ptr == NULL) {
+ return NULL;
+ }
+ TextPortionFree(ptr -> portion);
+ FieldPairTypeFree(ptr -> fields);
+ return MemFree(ptr);
+}
+
+
+/**************************************************
+*
+* AECRParseActionAsnRead()
+*
+**************************************************/
+NLM_EXTERN
+AECRParseActionPtr LIBCALL
+AECRParseActionAsnRead(AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ Boolean isError = FALSE;
+ AsnReadFunc func;
+ AECRParseActionPtr ptr;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return NULL;
+ }
+ }
+
+ if (aip == NULL) {
+ return NULL;
+ }
+
+ if (orig == NULL) { /* AECRParseAction ::= (self contained) */
+ atp = AsnReadId(aip, amp, AECRPARSE_ACTION);
+ } else {
+ atp = AsnLinkType(orig, AECRPARSE_ACTION);
+ }
+ /* link in local tree */
+ if (atp == NULL) {
+ return NULL;
+ }
+
+ ptr = AECRParseActionNew();
+ if (ptr == NULL) {
+ goto erret;
+ }
+ if (AsnReadVal(aip, atp, &av) <= 0) { /* read the start struct */
+ goto erret;
+ }
+
+ atp = AsnReadId(aip,amp, atp);
+ func = NULL;
+
+ if (atp == AECRPARSE_ACTION_portion) {
+ ptr -> portion = TextPortionAsnRead(aip, atp);
+ if (aip -> io_failure) {
+ goto erret;
+ }
+ atp = AsnReadId(aip,amp, atp);
+ }
+ if (atp == AECRPARSE_ACTION_fields) {
+ ptr -> fields = FieldPairTypeAsnRead(aip, atp);
+ if (aip -> io_failure) {
+ goto erret;
+ }
+ atp = AsnReadId(aip,amp, atp);
+ }
+ if (atp == ACTION_remove_from_parsed) {
+ if ( AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ ptr -> remove_from_parsed = av.boolvalue;
+ atp = AsnReadId(aip,amp, atp);
+ }
+ if (atp == AECRPARSE_ACTION_existing_text) {
+ if ( AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ ptr -> existing_text = av.intvalue;
+ atp = AsnReadId(aip,amp, atp);
+ }
+
+ if (AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ /* end struct */
+
+ret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return ptr;
+
+erret:
+ aip -> io_failure = TRUE;
+ ptr = AECRParseActionFree(ptr);
+ goto ret;
+}
+
+
+
+/**************************************************
+*
+* AECRParseActionAsnWrite()
+*
+**************************************************/
+NLM_EXTERN Boolean LIBCALL
+AECRParseActionAsnWrite(AECRParseActionPtr ptr, AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ Boolean retval = FALSE;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return FALSE;
+ }
+ }
+
+ if (aip == NULL) {
+ return FALSE;
+ }
+
+ atp = AsnLinkType(orig, AECRPARSE_ACTION); /* link local tree */
+ if (atp == NULL) {
+ return FALSE;
+ }
+
+ if (ptr == NULL) { AsnNullValueMsg(aip, atp); goto erret; }
+ if (! AsnOpenStruct(aip, atp, (Pointer) ptr)) {
+ goto erret;
+ }
+
+ if (ptr -> portion != NULL) {
+ if ( ! TextPortionAsnWrite(ptr -> portion, aip, AECRPARSE_ACTION_portion)) {
+ goto erret;
+ }
+ }
+ if (ptr -> fields != NULL) {
+ if ( ! FieldPairTypeAsnWrite(ptr -> fields, aip, AECRPARSE_ACTION_fields)) {
+ goto erret;
+ }
+ }
+ av.boolvalue = ptr -> remove_from_parsed;
+ retval = AsnWrite(aip, ACTION_remove_from_parsed, &av);
+ av.intvalue = ptr -> existing_text;
+ retval = AsnWrite(aip, AECRPARSE_ACTION_existing_text, &av);
+ if (! AsnCloseStruct(aip, atp, (Pointer)ptr)) {
+ goto erret;
+ }
+ retval = TRUE;
+
+erret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return retval;
+}
+
+
+
+/**************************************************
+*
+* RemoveActionNew()
+*
+**************************************************/
+NLM_EXTERN
+RemoveActionPtr LIBCALL
+RemoveActionNew(void)
+{
+ RemoveActionPtr ptr = MemNew((size_t) sizeof(RemoveAction));
+
+ return ptr;
+
+}
+
+
+/**************************************************
+*
+* RemoveActionFree()
+*
+**************************************************/
+NLM_EXTERN
+RemoveActionPtr LIBCALL
+RemoveActionFree(RemoveActionPtr ptr)
+{
+
+ if(ptr == NULL) {
+ return NULL;
+ }
+ FieldTypeFree(ptr -> field);
+ return MemFree(ptr);
+}
+
+
+/**************************************************
+*
+* RemoveActionAsnRead()
+*
+**************************************************/
+NLM_EXTERN
+RemoveActionPtr LIBCALL
+RemoveActionAsnRead(AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ Boolean isError = FALSE;
+ AsnReadFunc func;
+ RemoveActionPtr ptr;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return NULL;
+ }
+ }
+
+ if (aip == NULL) {
+ return NULL;
+ }
+
+ if (orig == NULL) { /* RemoveAction ::= (self contained) */
+ atp = AsnReadId(aip, amp, REMOVE_ACTION);
+ } else {
+ atp = AsnLinkType(orig, REMOVE_ACTION);
+ }
+ /* link in local tree */
+ if (atp == NULL) {
+ return NULL;
+ }
+
+ ptr = RemoveActionNew();
+ if (ptr == NULL) {
+ goto erret;
+ }
+ if (AsnReadVal(aip, atp, &av) <= 0) { /* read the start struct */
+ goto erret;
+ }
+
+ atp = AsnReadId(aip,amp, atp);
+ func = NULL;
+
+ if (atp == REMOVE_ACTION_field) {
+ ptr -> field = FieldTypeAsnRead(aip, atp);
+ if (aip -> io_failure) {
+ goto erret;
+ }
+ atp = AsnReadId(aip,amp, atp);
+ }
+
+ if (AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ /* end struct */
+
+ret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return ptr;
+
+erret:
+ aip -> io_failure = TRUE;
+ ptr = RemoveActionFree(ptr);
+ goto ret;
+}
+
+
+
+/**************************************************
+*
+* RemoveActionAsnWrite()
+*
+**************************************************/
+NLM_EXTERN Boolean LIBCALL
+RemoveActionAsnWrite(RemoveActionPtr ptr, AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ Boolean retval = FALSE;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return FALSE;
+ }
+ }
+
+ if (aip == NULL) {
+ return FALSE;
+ }
+
+ atp = AsnLinkType(orig, REMOVE_ACTION); /* link local tree */
+ if (atp == NULL) {
+ return FALSE;
+ }
+
+ if (ptr == NULL) { AsnNullValueMsg(aip, atp); goto erret; }
+ if (! AsnOpenStruct(aip, atp, (Pointer) ptr)) {
+ goto erret;
+ }
+
+ if (ptr -> field != NULL) {
+ if ( ! FieldTypeAsnWrite(ptr -> field, aip, REMOVE_ACTION_field)) {
+ goto erret;
+ }
+ }
+ if (! AsnCloseStruct(aip, atp, (Pointer)ptr)) {
+ goto erret;
+ }
+ retval = TRUE;
+
+erret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return retval;
+}
+
+
+
+/**************************************************
+*
+* ActionChoiceFree()
+*
+**************************************************/
+NLM_EXTERN
+ActionChoicePtr LIBCALL
+ActionChoiceFree(ValNodePtr anp)
+{
+ Pointer pnt;
+
+ if (anp == NULL) {
+ return NULL;
+ }
+
+ pnt = anp->data.ptrvalue;
+ switch (anp->choice)
+ {
+ default:
+ break;
+ case ActionChoice_apply:
+ ApplyActionFree(anp -> data.ptrvalue);
+ break;
+ case ActionChoice_edit:
+ EditActionFree(anp -> data.ptrvalue);
+ break;
+ case ActionChoice_convert:
+ ConvertActionFree(anp -> data.ptrvalue);
+ break;
+ case ActionChoice_copy:
+ CopyActionFree(anp -> data.ptrvalue);
+ break;
+ case ActionChoice_swap:
+ SwapActionFree(anp -> data.ptrvalue);
+ break;
+ case ActionChoice_remove:
+ RemoveActionFree(anp -> data.ptrvalue);
+ break;
+ case ActionChoice_parse:
+ AECRParseActionFree(anp -> data.ptrvalue);
+ break;
+ }
+ return MemFree(anp);
+}
+
+
+/**************************************************
+*
+* ActionChoiceAsnRead()
+*
+**************************************************/
+NLM_EXTERN
+ActionChoicePtr LIBCALL
+ActionChoiceAsnRead(AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ ValNodePtr anp;
+ Uint1 choice;
+ Boolean isError = FALSE;
+ Boolean nullIsError = FALSE;
+ AsnReadFunc func;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return NULL;
+ }
+ }
+
+ if (aip == NULL) {
+ return NULL;
+ }
+
+ if (orig == NULL) { /* ActionChoice ::= (self contained) */
+ atp = AsnReadId(aip, amp, ACTION_CHOICE);
+ } else {
+ atp = AsnLinkType(orig, ACTION_CHOICE); /* link in local tree */
+ }
+ if (atp == NULL) {
+ return NULL;
+ }
+
+ anp = ValNodeNew(NULL);
+ if (anp == NULL) {
+ goto erret;
+ }
+ if (AsnReadVal(aip, atp, &av) <= 0) { /* read the CHOICE or OpenStruct value (nothing) */
+ goto erret;
+ }
+
+ func = NULL;
+
+ atp = AsnReadId(aip, amp, atp); /* find the choice */
+ if (atp == NULL) {
+ goto erret;
+ }
+ if (atp == ACTION_CHOICE_apply) {
+ choice = ActionChoice_apply;
+ func = (AsnReadFunc) ApplyActionAsnRead;
+ }
+ else if (atp == ACTION_CHOICE_edit) {
+ choice = ActionChoice_edit;
+ func = (AsnReadFunc) EditActionAsnRead;
+ }
+ else if (atp == ACTION_CHOICE_convert) {
+ choice = ActionChoice_convert;
+ func = (AsnReadFunc) ConvertActionAsnRead;
+ }
+ else if (atp == ACTION_CHOICE_copy) {
+ choice = ActionChoice_copy;
+ func = (AsnReadFunc) CopyActionAsnRead;
+ }
+ else if (atp == ACTION_CHOICE_swap) {
+ choice = ActionChoice_swap;
+ func = (AsnReadFunc) SwapActionAsnRead;
+ }
+ else if (atp == ACTION_CHOICE_remove) {
+ choice = ActionChoice_remove;
+ func = (AsnReadFunc) RemoveActionAsnRead;
+ }
+ else if (atp == ACTION_CHOICE_parse) {
+ choice = ActionChoice_parse;
+ func = (AsnReadFunc) AECRParseActionAsnRead;
+ }
+ anp->choice = choice;
+ if (func != NULL)
+ {
+ anp->data.ptrvalue = (* func)(aip, atp);
+ if (aip -> io_failure) goto erret;
+
+ if (nullIsError && anp->data.ptrvalue == NULL) {
+ goto erret;
+ }
+ }
+
+ret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return anp;
+
+erret:
+ anp = MemFree(anp);
+ aip -> io_failure = TRUE;
+ goto ret;
+}
+
+
+/**************************************************
+*
+* ActionChoiceAsnWrite()
+*
+**************************************************/
+NLM_EXTERN Boolean LIBCALL
+ActionChoiceAsnWrite(ActionChoicePtr anp, AsnIoPtr aip, AsnTypePtr orig)
+
+{
+ DataVal av;
+ AsnTypePtr atp, writetype = NULL;
+ Pointer pnt;
+ AsnWriteFunc func = NULL;
+ Boolean retval = FALSE;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad())
+ return FALSE;
+ }
+
+ if (aip == NULL)
+ return FALSE;
+
+ atp = AsnLinkType(orig, ACTION_CHOICE); /* link local tree */
+ if (atp == NULL) {
+ return FALSE;
+ }
+
+ if (anp == NULL) { AsnNullValueMsg(aip, atp); goto erret; }
+
+ av.ptrvalue = (Pointer)anp;
+ if (! AsnWriteChoice(aip, atp, (Int2)anp->choice, &av)) {
+ goto erret;
+ }
+
+ pnt = anp->data.ptrvalue;
+ switch (anp->choice)
+ {
+ case ActionChoice_apply:
+ writetype = ACTION_CHOICE_apply;
+ func = (AsnWriteFunc) ApplyActionAsnWrite;
+ break;
+ case ActionChoice_edit:
+ writetype = ACTION_CHOICE_edit;
+ func = (AsnWriteFunc) EditActionAsnWrite;
+ break;
+ case ActionChoice_convert:
+ writetype = ACTION_CHOICE_convert;
+ func = (AsnWriteFunc) ConvertActionAsnWrite;
+ break;
+ case ActionChoice_copy:
+ writetype = ACTION_CHOICE_copy;
+ func = (AsnWriteFunc) CopyActionAsnWrite;
+ break;
+ case ActionChoice_swap:
+ writetype = ACTION_CHOICE_swap;
+ func = (AsnWriteFunc) SwapActionAsnWrite;
+ break;
+ case ActionChoice_remove:
+ writetype = ACTION_CHOICE_remove;
+ func = (AsnWriteFunc) RemoveActionAsnWrite;
+ break;
+ case ActionChoice_parse:
+ writetype = ACTION_CHOICE_parse;
+ func = (AsnWriteFunc) AECRParseActionAsnWrite;
+ break;
+ }
+ if (writetype != NULL) {
+ retval = (* func)(pnt, aip, writetype); /* write it out */
+ }
+ if (!retval) {
+ goto erret;
+ }
+ retval = TRUE;
+
+erret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return retval;
+}
+
+
+/**************************************************
+*
+* ParseSrcOrgChoiceFree()
+*
+**************************************************/
+NLM_EXTERN
+ParseSrcOrgChoicePtr LIBCALL
+ParseSrcOrgChoiceFree(ValNodePtr anp)
+{
+ Pointer pnt;
+
+ if (anp == NULL) {
+ return NULL;
+ }
+
+ pnt = anp->data.ptrvalue;
+ switch (anp->choice)
+ {
+ default:
+ break;
+ }
+ return MemFree(anp);
+}
+
+
+/**************************************************
+*
+* ParseSrcOrgChoiceAsnRead()
+*
+**************************************************/
+NLM_EXTERN
+ParseSrcOrgChoicePtr LIBCALL
+ParseSrcOrgChoiceAsnRead(AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ ValNodePtr anp;
+ Uint1 choice;
+ Boolean isError = FALSE;
+ Boolean nullIsError = FALSE;
+ AsnReadFunc func;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return NULL;
+ }
+ }
+
+ if (aip == NULL) {
+ return NULL;
+ }
+
+ if (orig == NULL) { /* ParseSrcOrgChoice ::= (self contained) */
+ atp = AsnReadId(aip, amp, PARSE_SRC_ORG_CHOICE);
+ } else {
+ atp = AsnLinkType(orig, PARSE_SRC_ORG_CHOICE); /* link in local tree */
+ }
+ if (atp == NULL) {
+ return NULL;
+ }
+
+ anp = ValNodeNew(NULL);
+ if (anp == NULL) {
+ goto erret;
+ }
+ if (AsnReadVal(aip, atp, &av) <= 0) { /* read the CHOICE or OpenStruct value (nothing) */
+ goto erret;
+ }
+
+ func = NULL;
+
+ atp = AsnReadId(aip, amp, atp); /* find the choice */
+ if (atp == NULL) {
+ goto erret;
+ }
+ if (atp == SRC_ORG_CHOICE_source_qual) {
+ choice = ParseSrcOrgChoice_source_qual;
+ if (AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ anp->data.intvalue = av.intvalue;
+ }
+ else if (atp == CHOICE_taxname_after_binomial) {
+ choice = ParseSrcOrgChoice_taxname_after_binomial;
+ if (AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ anp->data.boolvalue = av.boolvalue;
+ }
+ anp->choice = choice;
+ if (func != NULL)
+ {
+ anp->data.ptrvalue = (* func)(aip, atp);
+ if (aip -> io_failure) goto erret;
+
+ if (nullIsError && anp->data.ptrvalue == NULL) {
+ goto erret;
+ }
+ }
+
+ret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return anp;
+
+erret:
+ anp = MemFree(anp);
+ aip -> io_failure = TRUE;
+ goto ret;
+}
+
+
+/**************************************************
+*
+* ParseSrcOrgChoiceAsnWrite()
+*
+**************************************************/
+NLM_EXTERN Boolean LIBCALL
+ParseSrcOrgChoiceAsnWrite(ParseSrcOrgChoicePtr anp, AsnIoPtr aip, AsnTypePtr orig)
+
+{
+ DataVal av;
+ AsnTypePtr atp, writetype = NULL;
+ Pointer pnt;
+ AsnWriteFunc func = NULL;
+ Boolean retval = FALSE;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad())
+ return FALSE;
+ }
+
+ if (aip == NULL)
+ return FALSE;
+
+ atp = AsnLinkType(orig, PARSE_SRC_ORG_CHOICE); /* link local tree */
+ if (atp == NULL) {
+ return FALSE;
+ }
+
+ if (anp == NULL) { AsnNullValueMsg(aip, atp); goto erret; }
+
+ av.ptrvalue = (Pointer)anp;
+ if (! AsnWriteChoice(aip, atp, (Int2)anp->choice, &av)) {
+ goto erret;
+ }
+
+ pnt = anp->data.ptrvalue;
+ switch (anp->choice)
+ {
+ case ParseSrcOrgChoice_source_qual:
+ av.intvalue = anp->data.intvalue;
+ retval = AsnWrite(aip, SRC_ORG_CHOICE_source_qual, &av);
+ break;
+ case ParseSrcOrgChoice_taxname_after_binomial:
+ av.boolvalue = anp->data.boolvalue;
+ retval = AsnWrite(aip, CHOICE_taxname_after_binomial, &av);
+ break;
+ }
+ if (writetype != NULL) {
+ retval = (* func)(pnt, aip, writetype); /* write it out */
+ }
+ if (!retval) {
+ goto erret;
+ }
+ retval = TRUE;
+
+erret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return retval;
+}
+
+
+/**************************************************
+*
+* ParseSrcOrgNew()
+*
+**************************************************/
+NLM_EXTERN
+ParseSrcOrgPtr LIBCALL
+ParseSrcOrgNew(void)
+{
+ ParseSrcOrgPtr ptr = MemNew((size_t) sizeof(ParseSrcOrg));
+
+ ptr -> type = 0;
+ return ptr;
+
+}
+
+
+/**************************************************
+*
+* ParseSrcOrgFree()
+*
+**************************************************/
+NLM_EXTERN
+ParseSrcOrgPtr LIBCALL
+ParseSrcOrgFree(ParseSrcOrgPtr ptr)
+{
+
+ if(ptr == NULL) {
+ return NULL;
+ }
+ ParseSrcOrgChoiceFree(ptr -> field);
+ return MemFree(ptr);
+}
+
+
+/**************************************************
+*
+* ParseSrcOrgAsnRead()
+*
+**************************************************/
+NLM_EXTERN
+ParseSrcOrgPtr LIBCALL
+ParseSrcOrgAsnRead(AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ Boolean isError = FALSE;
+ AsnReadFunc func;
+ ParseSrcOrgPtr ptr;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return NULL;
+ }
+ }
+
+ if (aip == NULL) {
+ return NULL;
+ }
+
+ if (orig == NULL) { /* ParseSrcOrg ::= (self contained) */
+ atp = AsnReadId(aip, amp, PARSE_SRC_ORG);
+ } else {
+ atp = AsnLinkType(orig, PARSE_SRC_ORG);
+ }
+ /* link in local tree */
+ if (atp == NULL) {
+ return NULL;
+ }
+
+ ptr = ParseSrcOrgNew();
+ if (ptr == NULL) {
+ goto erret;
+ }
+ if (AsnReadVal(aip, atp, &av) <= 0) { /* read the start struct */
+ goto erret;
+ }
+
+ atp = AsnReadId(aip,amp, atp);
+ func = NULL;
+
+ if (atp == PARSE_SRC_ORG_field) {
+ ptr -> field = ParseSrcOrgChoiceAsnRead(aip, atp);
+ if (aip -> io_failure) {
+ goto erret;
+ }
+ atp = AsnReadId(aip,amp, atp);
+ }
+ if (atp == PARSE_SRC_ORG_type) {
+ if ( AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ ptr -> type = av.intvalue;
+ atp = AsnReadId(aip,amp, atp);
+ }
+
+ if (AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ /* end struct */
+
+ret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return ptr;
+
+erret:
+ aip -> io_failure = TRUE;
+ ptr = ParseSrcOrgFree(ptr);
+ goto ret;
+}
+
+
+
+/**************************************************
+*
+* ParseSrcOrgAsnWrite()
+*
+**************************************************/
+NLM_EXTERN Boolean LIBCALL
+ParseSrcOrgAsnWrite(ParseSrcOrgPtr ptr, AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ Boolean retval = FALSE;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return FALSE;
+ }
+ }
+
+ if (aip == NULL) {
+ return FALSE;
+ }
+
+ atp = AsnLinkType(orig, PARSE_SRC_ORG); /* link local tree */
+ if (atp == NULL) {
+ return FALSE;
+ }
+
+ if (ptr == NULL) { AsnNullValueMsg(aip, atp); goto erret; }
+ if (! AsnOpenStruct(aip, atp, (Pointer) ptr)) {
+ goto erret;
+ }
+
+ if (ptr -> field != NULL) {
+ if ( ! ParseSrcOrgChoiceAsnWrite(ptr -> field, aip, PARSE_SRC_ORG_field)) {
+ goto erret;
+ }
+ }
+ av.intvalue = ptr -> type;
+ retval = AsnWrite(aip, PARSE_SRC_ORG_type, &av);
+ if (! AsnCloseStruct(aip, atp, (Pointer)ptr)) {
+ goto erret;
+ }
+ retval = TRUE;
+
+erret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return retval;
+}
+
+
+
+/**************************************************
+*
+* ParseSrcFree()
+*
+**************************************************/
+NLM_EXTERN
+ParseSrcPtr LIBCALL
+ParseSrcFree(ValNodePtr anp)
+{
+ Pointer pnt;
+
+ if (anp == NULL) {
+ return NULL;
+ }
+
+ pnt = anp->data.ptrvalue;
+ switch (anp->choice)
+ {
+ default:
+ break;
+ case ParseSrc_org:
+ ParseSrcOrgFree(anp -> data.ptrvalue);
+ break;
+ case ParseSrc_structured_comment:
+ MemFree(anp -> data.ptrvalue);
+ break;
+ }
+ return MemFree(anp);
+}
+
+
+/**************************************************
+*
+* ParseSrcAsnRead()
+*
+**************************************************/
+NLM_EXTERN
+ParseSrcPtr LIBCALL
+ParseSrcAsnRead(AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ ValNodePtr anp;
+ Uint1 choice;
+ Boolean isError = FALSE;
+ Boolean nullIsError = FALSE;
+ AsnReadFunc func;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return NULL;
+ }
+ }
+
+ if (aip == NULL) {
+ return NULL;
+ }
+
+ if (orig == NULL) { /* ParseSrc ::= (self contained) */
+ atp = AsnReadId(aip, amp, PARSE_SRC);
+ } else {
+ atp = AsnLinkType(orig, PARSE_SRC); /* link in local tree */
+ }
+ if (atp == NULL) {
+ return NULL;
+ }
+
+ anp = ValNodeNew(NULL);
+ if (anp == NULL) {
+ goto erret;
+ }
+ if (AsnReadVal(aip, atp, &av) <= 0) { /* read the CHOICE or OpenStruct value (nothing) */
+ goto erret;
+ }
+
+ func = NULL;
+
+ atp = AsnReadId(aip, amp, atp); /* find the choice */
+ if (atp == NULL) {
+ goto erret;
+ }
+ if (atp == PARSE_SRC_defline) {
+ choice = ParseSrc_defline;
+ if (AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ anp->data.boolvalue = av.boolvalue;
+ }
+ else if (atp == PARSE_SRC_flatfile) {
+ choice = ParseSrc_flatfile;
+ if (AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ anp->data.boolvalue = av.boolvalue;
+ }
+ else if (atp == PARSE_SRC_local_id) {
+ choice = ParseSrc_local_id;
+ if (AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ anp->data.boolvalue = av.boolvalue;
+ }
+ else if (atp == PARSE_SRC_org) {
+ choice = ParseSrc_org;
+ func = (AsnReadFunc) ParseSrcOrgAsnRead;
+ }
+ else if (atp == PARSE_SRC_comment) {
+ choice = ParseSrc_comment;
+ if (AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ anp->data.boolvalue = av.boolvalue;
+ }
+ else if (atp == PARSE_SRC_bankit_comment) {
+ choice = ParseSrc_bankit_comment;
+ if (AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ anp->data.boolvalue = av.boolvalue;
+ }
+ else if (atp == PARSE_SRC_structured_comment) {
+ choice = ParseSrc_structured_comment;
+ if (AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ anp->data.ptrvalue = av.ptrvalue;
+ }
+ else if (atp == PARSE_SRC_file_id) {
+ choice = ParseSrc_file_id;
+ if (AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ anp->data.boolvalue = av.boolvalue;
+ }
+ anp->choice = choice;
+ if (func != NULL)
+ {
+ anp->data.ptrvalue = (* func)(aip, atp);
+ if (aip -> io_failure) goto erret;
+
+ if (nullIsError && anp->data.ptrvalue == NULL) {
+ goto erret;
+ }
+ }
+
+ret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return anp;
+
+erret:
+ anp = MemFree(anp);
+ aip -> io_failure = TRUE;
+ goto ret;
+}
+
+
+/**************************************************
+*
+* ParseSrcAsnWrite()
+*
+**************************************************/
+NLM_EXTERN Boolean LIBCALL
+ParseSrcAsnWrite(ParseSrcPtr anp, AsnIoPtr aip, AsnTypePtr orig)
+
+{
+ DataVal av;
+ AsnTypePtr atp, writetype = NULL;
+ Pointer pnt;
+ AsnWriteFunc func = NULL;
+ Boolean retval = FALSE;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad())
+ return FALSE;
+ }
+
+ if (aip == NULL)
+ return FALSE;
+
+ atp = AsnLinkType(orig, PARSE_SRC); /* link local tree */
+ if (atp == NULL) {
+ return FALSE;
+ }
+
+ if (anp == NULL) { AsnNullValueMsg(aip, atp); goto erret; }
+
+ av.ptrvalue = (Pointer)anp;
+ if (! AsnWriteChoice(aip, atp, (Int2)anp->choice, &av)) {
+ goto erret;
+ }
+
+ pnt = anp->data.ptrvalue;
+ switch (anp->choice)
+ {
+ case ParseSrc_defline:
+ av.boolvalue = anp->data.boolvalue;
+ retval = AsnWrite(aip, PARSE_SRC_defline, &av);
+ break;
+ case ParseSrc_flatfile:
+ av.boolvalue = anp->data.boolvalue;
+ retval = AsnWrite(aip, PARSE_SRC_flatfile, &av);
+ break;
+ case ParseSrc_local_id:
+ av.boolvalue = anp->data.boolvalue;
+ retval = AsnWrite(aip, PARSE_SRC_local_id, &av);
+ break;
+ case ParseSrc_org:
+ writetype = PARSE_SRC_org;
+ func = (AsnWriteFunc) ParseSrcOrgAsnWrite;
+ break;
+ case ParseSrc_comment:
+ av.boolvalue = anp->data.boolvalue;
+ retval = AsnWrite(aip, PARSE_SRC_comment, &av);
+ break;
+ case ParseSrc_bankit_comment:
+ av.boolvalue = anp->data.boolvalue;
+ retval = AsnWrite(aip, PARSE_SRC_bankit_comment, &av);
+ break;
+ case ParseSrc_structured_comment:
+ av.ptrvalue = anp->data.ptrvalue;
+ retval = AsnWrite(aip, PARSE_SRC_structured_comment, &av);
+ break;
+ case ParseSrc_file_id:
+ av.boolvalue = anp->data.boolvalue;
+ retval = AsnWrite(aip, PARSE_SRC_file_id, &av);
+ break;
+ }
+ if (writetype != NULL) {
+ retval = (* func)(pnt, aip, writetype); /* write it out */
+ }
+ if (!retval) {
+ goto erret;
+ }
+ retval = TRUE;
+
+erret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return retval;
+}
+
+
+/**************************************************
+*
+* ParseDstOrgNew()
+*
+**************************************************/
+NLM_EXTERN
+ParseDstOrgPtr LIBCALL
+ParseDstOrgNew(void)
+{
+ ParseDstOrgPtr ptr = MemNew((size_t) sizeof(ParseDstOrg));
+
+ ptr -> type = 0;
+ return ptr;
+
+}
+
+
+/**************************************************
+*
+* ParseDstOrgFree()
+*
+**************************************************/
+NLM_EXTERN
+ParseDstOrgPtr LIBCALL
+ParseDstOrgFree(ParseDstOrgPtr ptr)
+{
+
+ if(ptr == NULL) {
+ return NULL;
+ }
+ SourceQualChoiceFree(ptr -> field);
+ return MemFree(ptr);
+}
+
+
+/**************************************************
+*
+* ParseDstOrgAsnRead()
+*
+**************************************************/
+NLM_EXTERN
+ParseDstOrgPtr LIBCALL
+ParseDstOrgAsnRead(AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ Boolean isError = FALSE;
+ AsnReadFunc func;
+ ParseDstOrgPtr ptr;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return NULL;
+ }
+ }
+
+ if (aip == NULL) {
+ return NULL;
+ }
+
+ if (orig == NULL) { /* ParseDstOrg ::= (self contained) */
+ atp = AsnReadId(aip, amp, PARSE_DST_ORG);
+ } else {
+ atp = AsnLinkType(orig, PARSE_DST_ORG);
+ }
+ /* link in local tree */
+ if (atp == NULL) {
+ return NULL;
+ }
+
+ ptr = ParseDstOrgNew();
+ if (ptr == NULL) {
+ goto erret;
+ }
+ if (AsnReadVal(aip, atp, &av) <= 0) { /* read the start struct */
+ goto erret;
+ }
+
+ atp = AsnReadId(aip,amp, atp);
+ func = NULL;
+
+ if (atp == PARSE_DST_ORG_field) {
+ ptr -> field = SourceQualChoiceAsnRead(aip, atp);
+ if (aip -> io_failure) {
+ goto erret;
+ }
+ atp = AsnReadId(aip,amp, atp);
+ }
+ if (atp == PARSE_DST_ORG_type) {
+ if ( AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ ptr -> type = av.intvalue;
+ atp = AsnReadId(aip,amp, atp);
+ }
+
+ if (AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ /* end struct */
+
+ret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return ptr;
+
+erret:
+ aip -> io_failure = TRUE;
+ ptr = ParseDstOrgFree(ptr);
+ goto ret;
+}
+
+
+
+/**************************************************
+*
+* ParseDstOrgAsnWrite()
+*
+**************************************************/
+NLM_EXTERN Boolean LIBCALL
+ParseDstOrgAsnWrite(ParseDstOrgPtr ptr, AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ Boolean retval = FALSE;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return FALSE;
+ }
+ }
+
+ if (aip == NULL) {
+ return FALSE;
+ }
+
+ atp = AsnLinkType(orig, PARSE_DST_ORG); /* link local tree */
+ if (atp == NULL) {
+ return FALSE;
+ }
+
+ if (ptr == NULL) { AsnNullValueMsg(aip, atp); goto erret; }
+ if (! AsnOpenStruct(aip, atp, (Pointer) ptr)) {
+ goto erret;
+ }
+
+ if (ptr -> field != NULL) {
+ if ( ! SourceQualChoiceAsnWrite(ptr -> field, aip, PARSE_DST_ORG_field)) {
+ goto erret;
+ }
+ }
+ av.intvalue = ptr -> type;
+ retval = AsnWrite(aip, PARSE_DST_ORG_type, &av);
+ if (! AsnCloseStruct(aip, atp, (Pointer)ptr)) {
+ goto erret;
+ }
+ retval = TRUE;
+
+erret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return retval;
+}
+
+
+
+/**************************************************
+*
+* ParseDestFree()
+*
+**************************************************/
+NLM_EXTERN
+ParseDestPtr LIBCALL
+ParseDestFree(ValNodePtr anp)
+{
+ Pointer pnt;
+
+ if (anp == NULL) {
+ return NULL;
+ }
+
+ pnt = anp->data.ptrvalue;
+ switch (anp->choice)
+ {
+ default:
+ break;
+ case ParseDest_org:
+ ParseDstOrgFree(anp -> data.ptrvalue);
+ break;
+ case ParseDest_featqual:
+ FeatureFieldLegalFree(anp -> data.ptrvalue);
+ break;
+ case ParseDest_dbxref:
+ MemFree(anp -> data.ptrvalue);
+ break;
+ }
+ return MemFree(anp);
+}
+
+
+/**************************************************
+*
+* ParseDestAsnRead()
+*
+**************************************************/
+NLM_EXTERN
+ParseDestPtr LIBCALL
+ParseDestAsnRead(AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ ValNodePtr anp;
+ Uint1 choice;
+ Boolean isError = FALSE;
+ Boolean nullIsError = FALSE;
+ AsnReadFunc func;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return NULL;
+ }
+ }
+
+ if (aip == NULL) {
+ return NULL;
+ }
+
+ if (orig == NULL) { /* ParseDest ::= (self contained) */
+ atp = AsnReadId(aip, amp, PARSE_DEST);
+ } else {
+ atp = AsnLinkType(orig, PARSE_DEST); /* link in local tree */
+ }
+ if (atp == NULL) {
+ return NULL;
+ }
+
+ anp = ValNodeNew(NULL);
+ if (anp == NULL) {
+ goto erret;
+ }
+ if (AsnReadVal(aip, atp, &av) <= 0) { /* read the CHOICE or OpenStruct value (nothing) */
+ goto erret;
+ }
+
+ func = NULL;
+
+ atp = AsnReadId(aip, amp, atp); /* find the choice */
+ if (atp == NULL) {
+ goto erret;
+ }
+ if (atp == PARSE_DEST_defline) {
+ choice = ParseDest_defline;
+ if (AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ anp->data.boolvalue = av.boolvalue;
+ }
+ else if (atp == PARSE_DEST_org) {
+ choice = ParseDest_org;
+ func = (AsnReadFunc) ParseDstOrgAsnRead;
+ }
+ else if (atp == PARSE_DEST_featqual) {
+ choice = ParseDest_featqual;
+ func = (AsnReadFunc) FeatureFieldLegalAsnRead;
+ }
+ else if (atp == PARSE_DEST_dbxref) {
+ choice = ParseDest_dbxref;
+ if (AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ anp->data.ptrvalue = av.ptrvalue;
+ }
+ anp->choice = choice;
+ if (func != NULL)
+ {
+ anp->data.ptrvalue = (* func)(aip, atp);
+ if (aip -> io_failure) goto erret;
+
+ if (nullIsError && anp->data.ptrvalue == NULL) {
+ goto erret;
+ }
+ }
+
+ret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return anp;
+
+erret:
+ anp = MemFree(anp);
+ aip -> io_failure = TRUE;
+ goto ret;
+}
+
+
+/**************************************************
+*
+* ParseDestAsnWrite()
+*
+**************************************************/
+NLM_EXTERN Boolean LIBCALL
+ParseDestAsnWrite(ParseDestPtr anp, AsnIoPtr aip, AsnTypePtr orig)
+
+{
+ DataVal av;
+ AsnTypePtr atp, writetype = NULL;
+ Pointer pnt;
+ AsnWriteFunc func = NULL;
+ Boolean retval = FALSE;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad())
+ return FALSE;
+ }
+
+ if (aip == NULL)
+ return FALSE;
+
+ atp = AsnLinkType(orig, PARSE_DEST); /* link local tree */
+ if (atp == NULL) {
+ return FALSE;
+ }
+
+ if (anp == NULL) { AsnNullValueMsg(aip, atp); goto erret; }
+
+ av.ptrvalue = (Pointer)anp;
+ if (! AsnWriteChoice(aip, atp, (Int2)anp->choice, &av)) {
+ goto erret;
+ }
+
+ pnt = anp->data.ptrvalue;
+ switch (anp->choice)
+ {
+ case ParseDest_defline:
+ av.boolvalue = anp->data.boolvalue;
+ retval = AsnWrite(aip, PARSE_DEST_defline, &av);
+ break;
+ case ParseDest_org:
+ writetype = PARSE_DEST_org;
+ func = (AsnWriteFunc) ParseDstOrgAsnWrite;
+ break;
+ case ParseDest_featqual:
+ writetype = PARSE_DEST_featqual;
+ func = (AsnWriteFunc) FeatureFieldLegalAsnWrite;
+ break;
+ case ParseDest_dbxref:
+ av.ptrvalue = anp->data.ptrvalue;
+ retval = AsnWrite(aip, PARSE_DEST_dbxref, &av);
+ break;
+ }
+ if (writetype != NULL) {
+ retval = (* func)(pnt, aip, writetype); /* write it out */
+ }
+ if (!retval) {
+ goto erret;
+ }
+ retval = TRUE;
+
+erret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return retval;
+}
+
+
+/**************************************************
+*
+* LocationIntervalNew()
+*
+**************************************************/
+NLM_EXTERN
+LocationIntervalPtr LIBCALL
+LocationIntervalNew(void)
+{
+ LocationIntervalPtr ptr = MemNew((size_t) sizeof(LocationInterval));
+
+ return ptr;
+
+}
+
+
+/**************************************************
+*
+* LocationIntervalFree()
+*
+**************************************************/
+NLM_EXTERN
+LocationIntervalPtr LIBCALL
+LocationIntervalFree(LocationIntervalPtr ptr)
+{
+
+ if(ptr == NULL) {
+ return NULL;
+ }
+ return MemFree(ptr);
+}
+
+
+/**************************************************
+*
+* LocationIntervalAsnRead()
+*
+**************************************************/
+NLM_EXTERN
+LocationIntervalPtr LIBCALL
+LocationIntervalAsnRead(AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ Boolean isError = FALSE;
+ AsnReadFunc func;
+ LocationIntervalPtr ptr;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return NULL;
+ }
+ }
+
+ if (aip == NULL) {
+ return NULL;
+ }
+
+ if (orig == NULL) { /* LocationInterval ::= (self contained) */
+ atp = AsnReadId(aip, amp, LOCATION_INTERVAL);
+ } else {
+ atp = AsnLinkType(orig, LOCATION_INTERVAL);
+ }
+ /* link in local tree */
+ if (atp == NULL) {
+ return NULL;
+ }
+
+ ptr = LocationIntervalNew();
+ if (ptr == NULL) {
+ goto erret;
+ }
+ if (AsnReadVal(aip, atp, &av) <= 0) { /* read the start struct */
+ goto erret;
+ }
+
+ atp = AsnReadId(aip,amp, atp);
+ func = NULL;
+
+ if (atp == LOCATION_INTERVAL_from) {
+ if ( AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ ptr -> from = av.intvalue;
+ atp = AsnReadId(aip,amp, atp);
+ }
+ if (atp == LOCATION_INTERVAL_to) {
+ if ( AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ ptr -> to = av.intvalue;
+ atp = AsnReadId(aip,amp, atp);
+ }
+
+ if (AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ /* end struct */
+
+ret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return ptr;
+
+erret:
+ aip -> io_failure = TRUE;
+ ptr = LocationIntervalFree(ptr);
+ goto ret;
+}
+
+
+
+/**************************************************
+*
+* LocationIntervalAsnWrite()
+*
+**************************************************/
+NLM_EXTERN Boolean LIBCALL
+LocationIntervalAsnWrite(LocationIntervalPtr ptr, AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ Boolean retval = FALSE;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return FALSE;
+ }
+ }
+
+ if (aip == NULL) {
+ return FALSE;
+ }
+
+ atp = AsnLinkType(orig, LOCATION_INTERVAL); /* link local tree */
+ if (atp == NULL) {
+ return FALSE;
+ }
+
+ if (ptr == NULL) { AsnNullValueMsg(aip, atp); goto erret; }
+ if (! AsnOpenStruct(aip, atp, (Pointer) ptr)) {
+ goto erret;
+ }
+
+ av.intvalue = ptr -> from;
+ retval = AsnWrite(aip, LOCATION_INTERVAL_from, &av);
+ av.intvalue = ptr -> to;
+ retval = AsnWrite(aip, LOCATION_INTERVAL_to, &av);
+ if (! AsnCloseStruct(aip, atp, (Pointer)ptr)) {
+ goto erret;
+ }
+ retval = TRUE;
+
+erret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return retval;
+}
+
+
+
+/**************************************************
+*
+* LocationChoiceFree()
+*
+**************************************************/
+NLM_EXTERN
+LocationChoicePtr LIBCALL
+LocationChoiceFree(ValNodePtr anp)
+{
+ Pointer pnt;
+
+ if (anp == NULL) {
+ return NULL;
+ }
+
+ pnt = anp->data.ptrvalue;
+ switch (anp->choice)
+ {
+ default:
+ break;
+ case LocationChoice_interval:
+ LocationIntervalFree(anp -> data.ptrvalue);
+ break;
+ }
+ return MemFree(anp);
+}
+
+
+/**************************************************
+*
+* LocationChoiceAsnRead()
+*
+**************************************************/
+NLM_EXTERN
+LocationChoicePtr LIBCALL
+LocationChoiceAsnRead(AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ ValNodePtr anp;
+ Uint1 choice;
+ Boolean isError = FALSE;
+ Boolean nullIsError = FALSE;
+ AsnReadFunc func;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return NULL;
+ }
+ }
+
+ if (aip == NULL) {
+ return NULL;
+ }
+
+ if (orig == NULL) { /* LocationChoice ::= (self contained) */
+ atp = AsnReadId(aip, amp, LOCATION_CHOICE);
+ } else {
+ atp = AsnLinkType(orig, LOCATION_CHOICE); /* link in local tree */
+ }
+ if (atp == NULL) {
+ return NULL;
+ }
+
+ anp = ValNodeNew(NULL);
+ if (anp == NULL) {
+ goto erret;
+ }
+ if (AsnReadVal(aip, atp, &av) <= 0) { /* read the CHOICE or OpenStruct value (nothing) */
+ goto erret;
+ }
+
+ func = NULL;
+
+ atp = AsnReadId(aip, amp, atp); /* find the choice */
+ if (atp == NULL) {
+ goto erret;
+ }
+ if (atp == LOCATION_CHOICE_interval) {
+ choice = LocationChoice_interval;
+ func = (AsnReadFunc) LocationIntervalAsnRead;
+ }
+ else if (atp == LOCATION_CHOICE_whole_sequence) {
+ choice = LocationChoice_whole_sequence;
+ if (AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ anp->data.boolvalue = av.boolvalue;
+ }
+ anp->choice = choice;
+ if (func != NULL)
+ {
+ anp->data.ptrvalue = (* func)(aip, atp);
+ if (aip -> io_failure) goto erret;
+
+ if (nullIsError && anp->data.ptrvalue == NULL) {
+ goto erret;
+ }
+ }
+
+ret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return anp;
+
+erret:
+ anp = MemFree(anp);
+ aip -> io_failure = TRUE;
+ goto ret;
+}
+
+
+/**************************************************
+*
+* LocationChoiceAsnWrite()
+*
+**************************************************/
+NLM_EXTERN Boolean LIBCALL
+LocationChoiceAsnWrite(LocationChoicePtr anp, AsnIoPtr aip, AsnTypePtr orig)
+
+{
+ DataVal av;
+ AsnTypePtr atp, writetype = NULL;
+ Pointer pnt;
+ AsnWriteFunc func = NULL;
+ Boolean retval = FALSE;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad())
+ return FALSE;
+ }
+
+ if (aip == NULL)
+ return FALSE;
+
+ atp = AsnLinkType(orig, LOCATION_CHOICE); /* link local tree */
+ if (atp == NULL) {
+ return FALSE;
+ }
+
+ if (anp == NULL) { AsnNullValueMsg(aip, atp); goto erret; }
+
+ av.ptrvalue = (Pointer)anp;
+ if (! AsnWriteChoice(aip, atp, (Int2)anp->choice, &av)) {
+ goto erret;
+ }
+
+ pnt = anp->data.ptrvalue;
+ switch (anp->choice)
+ {
+ case LocationChoice_interval:
+ writetype = LOCATION_CHOICE_interval;
+ func = (AsnWriteFunc) LocationIntervalAsnWrite;
+ break;
+ case LocationChoice_whole_sequence:
+ av.boolvalue = anp->data.boolvalue;
+ retval = AsnWrite(aip, LOCATION_CHOICE_whole_sequence, &av);
+ break;
+ }
+ if (writetype != NULL) {
+ retval = (* func)(pnt, aip, writetype); /* write it out */
+ }
+ if (!retval) {
+ goto erret;
+ }
+ retval = TRUE;
+
+erret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return retval;
+}
+
+
+/**************************************************
+*
+* SequenceListFree()
+*
+**************************************************/
+NLM_EXTERN
+SequenceListPtr LIBCALL
+SequenceListFree(SequenceListPtr ptr)
+{
+
+ if(ptr == NULL) {
+ return NULL;
+ }
+ AsnGenericBaseSeqOfFree(ptr,ASNCODE_PTRVAL_SLOT);
+ return NULL;
+}
+
+
+/**************************************************
+*
+* SequenceListAsnRead()
+*
+**************************************************/
+NLM_EXTERN
+SequenceListPtr LIBCALL
+SequenceListAsnRead(AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ Boolean isError = FALSE;
+ AsnReadFunc func;
+ SequenceListPtr ptr;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return NULL;
+ }
+ }
+
+ if (aip == NULL) {
+ return NULL;
+ }
+
+ if (orig == NULL) { /* SequenceList ::= (self contained) */
+ atp = AsnReadId(aip, amp, SEQUENCE_LIST);
+ } else {
+ atp = AsnLinkType(orig, SEQUENCE_LIST);
+ }
+ /* link in local tree */
+ if (atp == NULL) {
+ return NULL;
+ }
+
+ func = NULL;
+
+ ptr = AsnGenericBaseSeqOfAsnRead(aip, amp, atp, ASNCODE_PTRVAL_SLOT, &isError);
+ if (isError && ptr == NULL) {
+ goto erret;
+ }
+
+
+
+ret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return ptr;
+
+erret:
+ aip -> io_failure = TRUE;
+ ptr = SequenceListFree(ptr);
+ goto ret;
+}
+
+
+
+/**************************************************
+*
+* SequenceListAsnWrite()
+*
+**************************************************/
+NLM_EXTERN Boolean LIBCALL
+SequenceListAsnWrite(SequenceListPtr ptr, AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ Boolean retval = FALSE;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return FALSE;
+ }
+ }
+
+ if (aip == NULL) {
+ return FALSE;
+ }
+
+ atp = AsnLinkType(orig, SEQUENCE_LIST); /* link local tree */
+ if (atp == NULL) {
+ return FALSE;
+ }
+
+ if (ptr == NULL) { AsnNullValueMsg(aip, atp); goto erret; }
+ retval = AsnGenericBaseSeqOfAsnWrite(ptr, ASNCODE_PTRVAL_SLOT, aip, atp, SEQUENCE_LIST_E);
+ retval = TRUE;
+
+erret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return retval;
+}
+
+
+
+/**************************************************
+*
+* SequenceListChoiceFree()
+*
+**************************************************/
+NLM_EXTERN
+SequenceListChoicePtr LIBCALL
+SequenceListChoiceFree(ValNodePtr anp)
+{
+ Pointer pnt;
+
+ if (anp == NULL) {
+ return NULL;
+ }
+
+ pnt = anp->data.ptrvalue;
+ switch (anp->choice)
+ {
+ default:
+ break;
+ case SequenceListChoice_list:
+ SequenceListFree(anp -> data.ptrvalue);
+ break;
+ }
+ return MemFree(anp);
+}
+
+
+/**************************************************
+*
+* SequenceListChoiceAsnRead()
+*
+**************************************************/
+NLM_EXTERN
+SequenceListChoicePtr LIBCALL
+SequenceListChoiceAsnRead(AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ ValNodePtr anp;
+ Uint1 choice;
+ Boolean isError = FALSE;
+ Boolean nullIsError = FALSE;
+ AsnReadFunc func;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return NULL;
+ }
+ }
+
+ if (aip == NULL) {
+ return NULL;
+ }
+
+ if (orig == NULL) { /* SequenceListChoice ::= (self contained) */
+ atp = AsnReadId(aip, amp, SEQUENCE_LIST_CHOICE);
+ } else {
+ atp = AsnLinkType(orig, SEQUENCE_LIST_CHOICE); /* link in local tree */
+ }
+ if (atp == NULL) {
+ return NULL;
+ }
+
+ anp = ValNodeNew(NULL);
+ if (anp == NULL) {
+ goto erret;
+ }
+ if (AsnReadVal(aip, atp, &av) <= 0) { /* read the CHOICE or OpenStruct value (nothing) */
+ goto erret;
+ }
+
+ func = NULL;
+
+ atp = AsnReadId(aip, amp, atp); /* find the choice */
+ if (atp == NULL) {
+ goto erret;
+ }
+ if (atp == SEQUENCE_LIST_CHOICE_list) {
+ choice = SequenceListChoice_list;
+ func = (AsnReadFunc) SequenceListAsnRead;
+ }
+ else if (atp == SEQUENCE_LIST_CHOICE_all) {
+ choice = SequenceListChoice_all;
+ if (AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ anp->data.boolvalue = av.boolvalue;
+ }
+ anp->choice = choice;
+ if (func != NULL)
+ {
+ anp->data.ptrvalue = (* func)(aip, atp);
+ if (aip -> io_failure) goto erret;
+
+ if (nullIsError && anp->data.ptrvalue == NULL) {
+ goto erret;
+ }
+ }
+
+ret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return anp;
+
+erret:
+ anp = MemFree(anp);
+ aip -> io_failure = TRUE;
+ goto ret;
+}
+
+
+/**************************************************
+*
+* SequenceListChoiceAsnWrite()
+*
+**************************************************/
+NLM_EXTERN Boolean LIBCALL
+SequenceListChoiceAsnWrite(SequenceListChoicePtr anp, AsnIoPtr aip, AsnTypePtr orig)
+
+{
+ DataVal av;
+ AsnTypePtr atp, writetype = NULL;
+ Pointer pnt;
+ AsnWriteFunc func = NULL;
+ Boolean retval = FALSE;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad())
+ return FALSE;
+ }
+
+ if (aip == NULL)
+ return FALSE;
+
+ atp = AsnLinkType(orig, SEQUENCE_LIST_CHOICE); /* link local tree */
+ if (atp == NULL) {
+ return FALSE;
+ }
+
+ if (anp == NULL) { AsnNullValueMsg(aip, atp); goto erret; }
+
+ av.ptrvalue = (Pointer)anp;
+ if (! AsnWriteChoice(aip, atp, (Int2)anp->choice, &av)) {
+ goto erret;
+ }
+
+ pnt = anp->data.ptrvalue;
+ switch (anp->choice)
+ {
+ case SequenceListChoice_list:
+ writetype = SEQUENCE_LIST_CHOICE_list;
+ func = (AsnWriteFunc) SequenceListAsnWrite;
+ break;
+ case SequenceListChoice_all:
+ av.boolvalue = anp->data.boolvalue;
+ retval = AsnWrite(aip, SEQUENCE_LIST_CHOICE_all, &av);
+ break;
+ }
+ if (writetype != NULL) {
+ retval = (* func)(pnt, aip, writetype); /* write it out */
+ }
+ if (!retval) {
+ goto erret;
+ }
+ retval = TRUE;
+
+erret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return retval;
+}
+
+
+/**************************************************
+*
+* ApplyFeatureActionNew()
+*
+**************************************************/
+NLM_EXTERN
+ApplyFeatureActionPtr LIBCALL
+ApplyFeatureActionNew(void)
+{
+ ApplyFeatureActionPtr ptr = MemNew((size_t) sizeof(ApplyFeatureAction));
+
+ ptr -> partial5 = 0;
+ ptr -> partial3 = 0;
+ ptr -> plus_strand = 1;
+ ptr -> add_redundant = 1;
+ ptr -> add_mrna = 0;
+ ptr -> apply_to_parts = 0;
+ ptr -> only_seg_num = -1;
+ return ptr;
+
+}
+
+
+/**************************************************
+*
+* ApplyFeatureActionFree()
+*
+**************************************************/
+NLM_EXTERN
+ApplyFeatureActionPtr LIBCALL
+ApplyFeatureActionFree(ApplyFeatureActionPtr ptr)
+{
+
+ if(ptr == NULL) {
+ return NULL;
+ }
+ LocationChoiceFree(ptr -> location);
+ SequenceListChoiceFree(ptr -> seq_list);
+ FeatQualLegalSetFree(ptr -> fields);
+ return MemFree(ptr);
+}
+
+
+/**************************************************
+*
+* ApplyFeatureActionAsnRead()
+*
+**************************************************/
+NLM_EXTERN
+ApplyFeatureActionPtr LIBCALL
+ApplyFeatureActionAsnRead(AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ Boolean isError = FALSE;
+ AsnReadFunc func;
+ ApplyFeatureActionPtr ptr;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return NULL;
+ }
+ }
+
+ if (aip == NULL) {
+ return NULL;
+ }
+
+ if (orig == NULL) { /* ApplyFeatureAction ::= (self contained) */
+ atp = AsnReadId(aip, amp, APPLY_FEATURE_ACTION);
+ } else {
+ atp = AsnLinkType(orig, APPLY_FEATURE_ACTION);
+ }
+ /* link in local tree */
+ if (atp == NULL) {
+ return NULL;
+ }
+
+ ptr = ApplyFeatureActionNew();
+ if (ptr == NULL) {
+ goto erret;
+ }
+ if (AsnReadVal(aip, atp, &av) <= 0) { /* read the start struct */
+ goto erret;
+ }
+
+ atp = AsnReadId(aip,amp, atp);
+ func = NULL;
+
+ if (atp == APPLY_FEATURE_ACTION_type) {
+ if ( AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ ptr -> type = av.intvalue;
+ atp = AsnReadId(aip,amp, atp);
+ }
+ if (atp == APPLY_FEATURE_ACTION_partial5) {
+ if ( AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ ptr -> partial5 = av.boolvalue;
+ atp = AsnReadId(aip,amp, atp);
+ }
+ if (atp == APPLY_FEATURE_ACTION_partial3) {
+ if ( AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ ptr -> partial3 = av.boolvalue;
+ atp = AsnReadId(aip,amp, atp);
+ }
+ if (atp == FEATURE_ACTION_plus_strand) {
+ if ( AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ ptr -> plus_strand = av.boolvalue;
+ atp = AsnReadId(aip,amp, atp);
+ }
+ if (atp == APPLY_FEATURE_ACTION_location) {
+ ptr -> location = LocationChoiceAsnRead(aip, atp);
+ if (aip -> io_failure) {
+ goto erret;
+ }
+ atp = AsnReadId(aip,amp, atp);
+ }
+ if (atp == APPLY_FEATURE_ACTION_seq_list) {
+ ptr -> seq_list = SequenceListChoiceAsnRead(aip, atp);
+ if (aip -> io_failure) {
+ goto erret;
+ }
+ atp = AsnReadId(aip,amp, atp);
+ }
+ if (atp == FEATURE_ACTION_add_redundant) {
+ if ( AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ ptr -> add_redundant = av.boolvalue;
+ atp = AsnReadId(aip,amp, atp);
+ }
+ if (atp == APPLY_FEATURE_ACTION_add_mrna) {
+ if ( AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ ptr -> add_mrna = av.boolvalue;
+ atp = AsnReadId(aip,amp, atp);
+ }
+ if (atp == FEATURE_ACTION_apply_to_parts) {
+ if ( AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ ptr -> apply_to_parts = av.boolvalue;
+ atp = AsnReadId(aip,amp, atp);
+ }
+ if (atp == FEATURE_ACTION_only_seg_num) {
+ if ( AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ ptr -> only_seg_num = av.intvalue;
+ atp = AsnReadId(aip,amp, atp);
+ }
+ if (atp == APPLY_FEATURE_ACTION_fields) {
+ ptr -> fields = FeatQualLegalSetAsnRead(aip, atp);
+ if (aip -> io_failure) {
+ goto erret;
+ }
+ atp = AsnReadId(aip,amp, atp);
+ }
+
+ if (AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ /* end struct */
+
+ret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return ptr;
+
+erret:
+ aip -> io_failure = TRUE;
+ ptr = ApplyFeatureActionFree(ptr);
+ goto ret;
+}
+
+
+
+/**************************************************
+*
+* ApplyFeatureActionAsnWrite()
+*
+**************************************************/
+NLM_EXTERN Boolean LIBCALL
+ApplyFeatureActionAsnWrite(ApplyFeatureActionPtr ptr, AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ Boolean retval = FALSE;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return FALSE;
+ }
+ }
+
+ if (aip == NULL) {
+ return FALSE;
+ }
+
+ atp = AsnLinkType(orig, APPLY_FEATURE_ACTION); /* link local tree */
+ if (atp == NULL) {
+ return FALSE;
+ }
+
+ if (ptr == NULL) { AsnNullValueMsg(aip, atp); goto erret; }
+ if (! AsnOpenStruct(aip, atp, (Pointer) ptr)) {
+ goto erret;
+ }
+
+ av.intvalue = ptr -> type;
+ retval = AsnWrite(aip, APPLY_FEATURE_ACTION_type, &av);
+ av.boolvalue = ptr -> partial5;
+ retval = AsnWrite(aip, APPLY_FEATURE_ACTION_partial5, &av);
+ av.boolvalue = ptr -> partial3;
+ retval = AsnWrite(aip, APPLY_FEATURE_ACTION_partial3, &av);
+ av.boolvalue = ptr -> plus_strand;
+ retval = AsnWrite(aip, FEATURE_ACTION_plus_strand, &av);
+ if (ptr -> location != NULL) {
+ if ( ! LocationChoiceAsnWrite(ptr -> location, aip, APPLY_FEATURE_ACTION_location)) {
+ goto erret;
+ }
+ }
+ if (ptr -> seq_list != NULL) {
+ if ( ! SequenceListChoiceAsnWrite(ptr -> seq_list, aip, APPLY_FEATURE_ACTION_seq_list)) {
+ goto erret;
+ }
+ }
+ av.boolvalue = ptr -> add_redundant;
+ retval = AsnWrite(aip, FEATURE_ACTION_add_redundant, &av);
+ av.boolvalue = ptr -> add_mrna;
+ retval = AsnWrite(aip, APPLY_FEATURE_ACTION_add_mrna, &av);
+ av.boolvalue = ptr -> apply_to_parts;
+ retval = AsnWrite(aip, FEATURE_ACTION_apply_to_parts, &av);
+ av.intvalue = ptr -> only_seg_num;
+ retval = AsnWrite(aip, FEATURE_ACTION_only_seg_num, &av);
+ if (ptr -> fields != NULL) {
+ if ( ! FeatQualLegalSetAsnWrite(ptr -> fields, aip, APPLY_FEATURE_ACTION_fields)) {
+ goto erret;
+ }
+ }
+ if (! AsnCloseStruct(aip, atp, (Pointer)ptr)) {
+ goto erret;
+ }
+ retval = TRUE;
+
+erret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return retval;
+}
+
+
+
+/**************************************************
+*
+* RemoveFeatureActionNew()
+*
+**************************************************/
+NLM_EXTERN
+RemoveFeatureActionPtr LIBCALL
+RemoveFeatureActionNew(void)
+{
+ RemoveFeatureActionPtr ptr = MemNew((size_t) sizeof(RemoveFeatureAction));
+
+ return ptr;
+
+}
+
+
+/**************************************************
+*
+* RemoveFeatureActionFree()
+*
+**************************************************/
+NLM_EXTERN
+RemoveFeatureActionPtr LIBCALL
+RemoveFeatureActionFree(RemoveFeatureActionPtr ptr)
+{
+
+ if(ptr == NULL) {
+ return NULL;
+ }
+ ConstraintChoiceSetFree(ptr -> constraint);
+ return MemFree(ptr);
+}
+
+
+/**************************************************
+*
+* RemoveFeatureActionAsnRead()
+*
+**************************************************/
+NLM_EXTERN
+RemoveFeatureActionPtr LIBCALL
+RemoveFeatureActionAsnRead(AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ Boolean isError = FALSE;
+ AsnReadFunc func;
+ RemoveFeatureActionPtr ptr;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return NULL;
+ }
+ }
+
+ if (aip == NULL) {
+ return NULL;
+ }
+
+ if (orig == NULL) { /* RemoveFeatureAction ::= (self contained) */
+ atp = AsnReadId(aip, amp, REMOVE_FEATURE_ACTION);
+ } else {
+ atp = AsnLinkType(orig, REMOVE_FEATURE_ACTION);
+ }
+ /* link in local tree */
+ if (atp == NULL) {
+ return NULL;
+ }
+
+ ptr = RemoveFeatureActionNew();
+ if (ptr == NULL) {
+ goto erret;
+ }
+ if (AsnReadVal(aip, atp, &av) <= 0) { /* read the start struct */
+ goto erret;
+ }
+
+ atp = AsnReadId(aip,amp, atp);
+ func = NULL;
+
+ if (atp == REMOVE_FEATURE_ACTION_type) {
+ if ( AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ ptr -> type = av.intvalue;
+ atp = AsnReadId(aip,amp, atp);
+ }
+ if (atp == FEATURE_ACTION_constraint) {
+ ptr -> constraint = ConstraintChoiceSetAsnRead(aip, atp);
+ if (aip -> io_failure) {
+ goto erret;
+ }
+ atp = AsnReadId(aip,amp, atp);
+ }
+
+ if (AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ /* end struct */
+
+ret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return ptr;
+
+erret:
+ aip -> io_failure = TRUE;
+ ptr = RemoveFeatureActionFree(ptr);
+ goto ret;
+}
+
+
+
+/**************************************************
+*
+* RemoveFeatureActionAsnWrite()
+*
+**************************************************/
+NLM_EXTERN Boolean LIBCALL
+RemoveFeatureActionAsnWrite(RemoveFeatureActionPtr ptr, AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ Boolean retval = FALSE;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return FALSE;
+ }
+ }
+
+ if (aip == NULL) {
+ return FALSE;
+ }
+
+ atp = AsnLinkType(orig, REMOVE_FEATURE_ACTION); /* link local tree */
+ if (atp == NULL) {
+ return FALSE;
+ }
+
+ if (ptr == NULL) { AsnNullValueMsg(aip, atp); goto erret; }
+ if (! AsnOpenStruct(aip, atp, (Pointer) ptr)) {
+ goto erret;
+ }
+
+ av.intvalue = ptr -> type;
+ retval = AsnWrite(aip, REMOVE_FEATURE_ACTION_type, &av);
+ if (ptr -> constraint != NULL) {
+ if ( ! ConstraintChoiceSetAsnWrite(ptr -> constraint, aip, FEATURE_ACTION_constraint)) {
+ goto erret;
+ }
+ }
+ if (! AsnCloseStruct(aip, atp, (Pointer)ptr)) {
+ goto erret;
+ }
+ retval = TRUE;
+
+erret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return retval;
+}
+
+
+
+/**************************************************
+*
+* EditLocationStrandNew()
+*
+**************************************************/
+NLM_EXTERN
+EditLocationStrandPtr LIBCALL
+EditLocationStrandNew(void)
+{
+ EditLocationStrandPtr ptr = MemNew((size_t) sizeof(EditLocationStrand));
+
+ return ptr;
+
+}
+
+
+/**************************************************
+*
+* EditLocationStrandFree()
+*
+**************************************************/
+NLM_EXTERN
+EditLocationStrandPtr LIBCALL
+EditLocationStrandFree(EditLocationStrandPtr ptr)
+{
+
+ if(ptr == NULL) {
+ return NULL;
+ }
+ return MemFree(ptr);
+}
+
+
+/**************************************************
+*
+* EditLocationStrandAsnRead()
+*
+**************************************************/
+NLM_EXTERN
+EditLocationStrandPtr LIBCALL
+EditLocationStrandAsnRead(AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ Boolean isError = FALSE;
+ AsnReadFunc func;
+ EditLocationStrandPtr ptr;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return NULL;
+ }
+ }
+
+ if (aip == NULL) {
+ return NULL;
+ }
+
+ if (orig == NULL) { /* EditLocationStrand ::= (self contained) */
+ atp = AsnReadId(aip, amp, EDIT_LOCATION_STRAND);
+ } else {
+ atp = AsnLinkType(orig, EDIT_LOCATION_STRAND);
+ }
+ /* link in local tree */
+ if (atp == NULL) {
+ return NULL;
+ }
+
+ ptr = EditLocationStrandNew();
+ if (ptr == NULL) {
+ goto erret;
+ }
+ if (AsnReadVal(aip, atp, &av) <= 0) { /* read the start struct */
+ goto erret;
+ }
+
+ atp = AsnReadId(aip,amp, atp);
+ func = NULL;
+
+ if (atp == LOCATION_STRAND_strand_from) {
+ if ( AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ ptr -> strand_from = av.intvalue;
+ atp = AsnReadId(aip,amp, atp);
+ }
+ if (atp == EDIT_LOCATION_STRAND_strand_to) {
+ if ( AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ ptr -> strand_to = av.intvalue;
+ atp = AsnReadId(aip,amp, atp);
+ }
+
+ if (AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ /* end struct */
+
+ret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return ptr;
+
+erret:
+ aip -> io_failure = TRUE;
+ ptr = EditLocationStrandFree(ptr);
+ goto ret;
+}
+
+
+
+/**************************************************
+*
+* EditLocationStrandAsnWrite()
+*
+**************************************************/
+NLM_EXTERN Boolean LIBCALL
+EditLocationStrandAsnWrite(EditLocationStrandPtr ptr, AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ Boolean retval = FALSE;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return FALSE;
+ }
+ }
+
+ if (aip == NULL) {
+ return FALSE;
+ }
+
+ atp = AsnLinkType(orig, EDIT_LOCATION_STRAND); /* link local tree */
+ if (atp == NULL) {
+ return FALSE;
+ }
+
+ if (ptr == NULL) { AsnNullValueMsg(aip, atp); goto erret; }
+ if (! AsnOpenStruct(aip, atp, (Pointer) ptr)) {
+ goto erret;
+ }
+
+ av.intvalue = ptr -> strand_from;
+ retval = AsnWrite(aip, LOCATION_STRAND_strand_from, &av);
+ av.intvalue = ptr -> strand_to;
+ retval = AsnWrite(aip, EDIT_LOCATION_STRAND_strand_to, &av);
+ if (! AsnCloseStruct(aip, atp, (Pointer)ptr)) {
+ goto erret;
+ }
+ retval = TRUE;
+
+erret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return retval;
+}
+
+
+
+/**************************************************
+*
+* Partial5SetActionNew()
+*
+**************************************************/
+NLM_EXTERN
+Partial5SetActionPtr LIBCALL
+Partial5SetActionNew(void)
+{
+ Partial5SetActionPtr ptr = MemNew((size_t) sizeof(Partial5SetAction));
+
+ return ptr;
+
+}
+
+
+/**************************************************
+*
+* Partial5SetActionFree()
+*
+**************************************************/
+NLM_EXTERN
+Partial5SetActionPtr LIBCALL
+Partial5SetActionFree(Partial5SetActionPtr ptr)
+{
+
+ if(ptr == NULL) {
+ return NULL;
+ }
+ return MemFree(ptr);
+}
+
+
+/**************************************************
+*
+* Partial5SetActionAsnRead()
+*
+**************************************************/
+NLM_EXTERN
+Partial5SetActionPtr LIBCALL
+Partial5SetActionAsnRead(AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ Boolean isError = FALSE;
+ AsnReadFunc func;
+ Partial5SetActionPtr ptr;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return NULL;
+ }
+ }
+
+ if (aip == NULL) {
+ return NULL;
+ }
+
+ if (orig == NULL) { /* Partial5SetAction ::= (self contained) */
+ atp = AsnReadId(aip, amp, PARTIAL_5_SET_ACTION);
+ } else {
+ atp = AsnLinkType(orig, PARTIAL_5_SET_ACTION);
+ }
+ /* link in local tree */
+ if (atp == NULL) {
+ return NULL;
+ }
+
+ ptr = Partial5SetActionNew();
+ if (ptr == NULL) {
+ goto erret;
+ }
+ if (AsnReadVal(aip, atp, &av) <= 0) { /* read the start struct */
+ goto erret;
+ }
+
+ atp = AsnReadId(aip,amp, atp);
+ func = NULL;
+
+ if (atp == PARTIAL_5_SET_ACTION_constraint) {
+ if ( AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ ptr -> constraint = av.intvalue;
+ atp = AsnReadId(aip,amp, atp);
+ }
+ if (atp == PARTIAL_5_SET_ACTION_extend) {
+ if ( AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ ptr -> extend = av.boolvalue;
+ atp = AsnReadId(aip,amp, atp);
+ }
+
+ if (AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ /* end struct */
+
+ret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return ptr;
+
+erret:
+ aip -> io_failure = TRUE;
+ ptr = Partial5SetActionFree(ptr);
+ goto ret;
+}
+
+
+
+/**************************************************
+*
+* Partial5SetActionAsnWrite()
+*
+**************************************************/
+NLM_EXTERN Boolean LIBCALL
+Partial5SetActionAsnWrite(Partial5SetActionPtr ptr, AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ Boolean retval = FALSE;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return FALSE;
+ }
+ }
+
+ if (aip == NULL) {
+ return FALSE;
+ }
+
+ atp = AsnLinkType(orig, PARTIAL_5_SET_ACTION); /* link local tree */
+ if (atp == NULL) {
+ return FALSE;
+ }
+
+ if (ptr == NULL) { AsnNullValueMsg(aip, atp); goto erret; }
+ if (! AsnOpenStruct(aip, atp, (Pointer) ptr)) {
+ goto erret;
+ }
+
+ av.intvalue = ptr -> constraint;
+ retval = AsnWrite(aip, PARTIAL_5_SET_ACTION_constraint, &av);
+ av.boolvalue = ptr -> extend;
+ retval = AsnWrite(aip, PARTIAL_5_SET_ACTION_extend, &av);
+ if (! AsnCloseStruct(aip, atp, (Pointer)ptr)) {
+ goto erret;
+ }
+ retval = TRUE;
+
+erret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return retval;
+}
+
+
+
+/**************************************************
+*
+* Partial3SetActionNew()
+*
+**************************************************/
+NLM_EXTERN
+Partial3SetActionPtr LIBCALL
+Partial3SetActionNew(void)
+{
+ Partial3SetActionPtr ptr = MemNew((size_t) sizeof(Partial3SetAction));
+
+ return ptr;
+
+}
+
+
+/**************************************************
+*
+* Partial3SetActionFree()
+*
+**************************************************/
+NLM_EXTERN
+Partial3SetActionPtr LIBCALL
+Partial3SetActionFree(Partial3SetActionPtr ptr)
+{
+
+ if(ptr == NULL) {
+ return NULL;
+ }
+ return MemFree(ptr);
+}
+
+
+/**************************************************
+*
+* Partial3SetActionAsnRead()
+*
+**************************************************/
+NLM_EXTERN
+Partial3SetActionPtr LIBCALL
+Partial3SetActionAsnRead(AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ Boolean isError = FALSE;
+ AsnReadFunc func;
+ Partial3SetActionPtr ptr;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return NULL;
+ }
+ }
+
+ if (aip == NULL) {
+ return NULL;
+ }
+
+ if (orig == NULL) { /* Partial3SetAction ::= (self contained) */
+ atp = AsnReadId(aip, amp, PARTIAL_3_SET_ACTION);
+ } else {
+ atp = AsnLinkType(orig, PARTIAL_3_SET_ACTION);
+ }
+ /* link in local tree */
+ if (atp == NULL) {
+ return NULL;
+ }
+
+ ptr = Partial3SetActionNew();
+ if (ptr == NULL) {
+ goto erret;
+ }
+ if (AsnReadVal(aip, atp, &av) <= 0) { /* read the start struct */
+ goto erret;
+ }
+
+ atp = AsnReadId(aip,amp, atp);
+ func = NULL;
+
+ if (atp == PARTIAL_3_SET_ACTION_constraint) {
+ if ( AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ ptr -> constraint = av.intvalue;
+ atp = AsnReadId(aip,amp, atp);
+ }
+ if (atp == PARTIAL_3_SET_ACTION_extend) {
+ if ( AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ ptr -> extend = av.boolvalue;
+ atp = AsnReadId(aip,amp, atp);
+ }
+
+ if (AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ /* end struct */
+
+ret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return ptr;
+
+erret:
+ aip -> io_failure = TRUE;
+ ptr = Partial3SetActionFree(ptr);
+ goto ret;
+}
+
+
+
+/**************************************************
+*
+* Partial3SetActionAsnWrite()
+*
+**************************************************/
+NLM_EXTERN Boolean LIBCALL
+Partial3SetActionAsnWrite(Partial3SetActionPtr ptr, AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ Boolean retval = FALSE;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return FALSE;
+ }
+ }
+
+ if (aip == NULL) {
+ return FALSE;
+ }
+
+ atp = AsnLinkType(orig, PARTIAL_3_SET_ACTION); /* link local tree */
+ if (atp == NULL) {
+ return FALSE;
+ }
+
+ if (ptr == NULL) { AsnNullValueMsg(aip, atp); goto erret; }
+ if (! AsnOpenStruct(aip, atp, (Pointer) ptr)) {
+ goto erret;
+ }
+
+ av.intvalue = ptr -> constraint;
+ retval = AsnWrite(aip, PARTIAL_3_SET_ACTION_constraint, &av);
+ av.boolvalue = ptr -> extend;
+ retval = AsnWrite(aip, PARTIAL_3_SET_ACTION_extend, &av);
+ if (! AsnCloseStruct(aip, atp, (Pointer)ptr)) {
+ goto erret;
+ }
+ retval = TRUE;
+
+erret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return retval;
+}
+
+
+
+/**************************************************
+*
+* LocationEditTypeFree()
+*
+**************************************************/
+NLM_EXTERN
+LocationEditTypePtr LIBCALL
+LocationEditTypeFree(ValNodePtr anp)
+{
+ Pointer pnt;
+
+ if (anp == NULL) {
+ return NULL;
+ }
+
+ pnt = anp->data.ptrvalue;
+ switch (anp->choice)
+ {
+ default:
+ break;
+ case LocationEditType_strand:
+ EditLocationStrandFree(anp -> data.ptrvalue);
+ break;
+ case LocationEditType_set_5_partial:
+ Partial5SetActionFree(anp -> data.ptrvalue);
+ break;
+ case LocationEditType_set_3_partial:
+ Partial3SetActionFree(anp -> data.ptrvalue);
+ break;
+ }
+ return MemFree(anp);
+}
+
+
+/**************************************************
+*
+* LocationEditTypeAsnRead()
+*
+**************************************************/
+NLM_EXTERN
+LocationEditTypePtr LIBCALL
+LocationEditTypeAsnRead(AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ ValNodePtr anp;
+ Uint1 choice;
+ Boolean isError = FALSE;
+ Boolean nullIsError = FALSE;
+ AsnReadFunc func;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return NULL;
+ }
+ }
+
+ if (aip == NULL) {
+ return NULL;
+ }
+
+ if (orig == NULL) { /* LocationEditType ::= (self contained) */
+ atp = AsnReadId(aip, amp, LOCATION_EDIT_TYPE);
+ } else {
+ atp = AsnLinkType(orig, LOCATION_EDIT_TYPE); /* link in local tree */
+ }
+ if (atp == NULL) {
+ return NULL;
+ }
+
+ anp = ValNodeNew(NULL);
+ if (anp == NULL) {
+ goto erret;
+ }
+ if (AsnReadVal(aip, atp, &av) <= 0) { /* read the CHOICE or OpenStruct value (nothing) */
+ goto erret;
+ }
+
+ func = NULL;
+
+ atp = AsnReadId(aip, amp, atp); /* find the choice */
+ if (atp == NULL) {
+ goto erret;
+ }
+ if (atp == LOCATION_EDIT_TYPE_strand) {
+ choice = LocationEditType_strand;
+ func = (AsnReadFunc) EditLocationStrandAsnRead;
+ }
+ else if (atp == EDIT_TYPE_set_5_partial) {
+ choice = LocationEditType_set_5_partial;
+ func = (AsnReadFunc) Partial5SetActionAsnRead;
+ }
+ else if (atp == EDIT_TYPE_clear_5_partial) {
+ choice = LocationEditType_clear_5_partial;
+ if (AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ anp->data.intvalue = av.intvalue;
+ }
+ else if (atp == EDIT_TYPE_set_3_partial) {
+ choice = LocationEditType_set_3_partial;
+ func = (AsnReadFunc) Partial3SetActionAsnRead;
+ }
+ else if (atp == EDIT_TYPE_clear_3_partial) {
+ choice = LocationEditType_clear_3_partial;
+ if (AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ anp->data.intvalue = av.intvalue;
+ }
+ else if (atp == LOCATION_EDIT_TYPE_convert) {
+ choice = LocationEditType_convert;
+ if (AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ anp->data.intvalue = av.intvalue;
+ }
+ anp->choice = choice;
+ if (func != NULL)
+ {
+ anp->data.ptrvalue = (* func)(aip, atp);
+ if (aip -> io_failure) goto erret;
+
+ if (nullIsError && anp->data.ptrvalue == NULL) {
+ goto erret;
+ }
+ }
+
+ret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return anp;
+
+erret:
+ anp = MemFree(anp);
+ aip -> io_failure = TRUE;
+ goto ret;
+}
+
+
+/**************************************************
+*
+* LocationEditTypeAsnWrite()
+*
+**************************************************/
+NLM_EXTERN Boolean LIBCALL
+LocationEditTypeAsnWrite(LocationEditTypePtr anp, AsnIoPtr aip, AsnTypePtr orig)
+
+{
+ DataVal av;
+ AsnTypePtr atp, writetype = NULL;
+ Pointer pnt;
+ AsnWriteFunc func = NULL;
+ Boolean retval = FALSE;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad())
+ return FALSE;
+ }
+
+ if (aip == NULL)
+ return FALSE;
+
+ atp = AsnLinkType(orig, LOCATION_EDIT_TYPE); /* link local tree */
+ if (atp == NULL) {
+ return FALSE;
+ }
+
+ if (anp == NULL) { AsnNullValueMsg(aip, atp); goto erret; }
+
+ av.ptrvalue = (Pointer)anp;
+ if (! AsnWriteChoice(aip, atp, (Int2)anp->choice, &av)) {
+ goto erret;
+ }
+
+ pnt = anp->data.ptrvalue;
+ switch (anp->choice)
+ {
+ case LocationEditType_strand:
+ writetype = LOCATION_EDIT_TYPE_strand;
+ func = (AsnWriteFunc) EditLocationStrandAsnWrite;
+ break;
+ case LocationEditType_set_5_partial:
+ writetype = EDIT_TYPE_set_5_partial;
+ func = (AsnWriteFunc) Partial5SetActionAsnWrite;
+ break;
+ case LocationEditType_clear_5_partial:
+ av.intvalue = anp->data.intvalue;
+ retval = AsnWrite(aip, EDIT_TYPE_clear_5_partial, &av);
+ break;
+ case LocationEditType_set_3_partial:
+ writetype = EDIT_TYPE_set_3_partial;
+ func = (AsnWriteFunc) Partial3SetActionAsnWrite;
+ break;
+ case LocationEditType_clear_3_partial:
+ av.intvalue = anp->data.intvalue;
+ retval = AsnWrite(aip, EDIT_TYPE_clear_3_partial, &av);
+ break;
+ case LocationEditType_convert:
+ av.intvalue = anp->data.intvalue;
+ retval = AsnWrite(aip, LOCATION_EDIT_TYPE_convert, &av);
+ break;
+ }
+ if (writetype != NULL) {
+ retval = (* func)(pnt, aip, writetype); /* write it out */
+ }
+ if (!retval) {
+ goto erret;
+ }
+ retval = TRUE;
+
+erret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return retval;
+}
+
+
+/**************************************************
+*
+* EditFeatureLocationActionNew()
+*
+**************************************************/
+NLM_EXTERN
+EditFeatureLocationActionPtr LIBCALL
+EditFeatureLocationActionNew(void)
+{
+ EditFeatureLocationActionPtr ptr = MemNew((size_t) sizeof(EditFeatureLocationAction));
+
+ return ptr;
+
+}
+
+
+/**************************************************
+*
+* EditFeatureLocationActionFree()
+*
+**************************************************/
+NLM_EXTERN
+EditFeatureLocationActionPtr LIBCALL
+EditFeatureLocationActionFree(EditFeatureLocationActionPtr ptr)
+{
+
+ if(ptr == NULL) {
+ return NULL;
+ }
+ LocationEditTypeFree(ptr -> action);
+ ConstraintChoiceSetFree(ptr -> constraint);
+ return MemFree(ptr);
+}
+
+
+/**************************************************
+*
+* EditFeatureLocationActionAsnRead()
+*
+**************************************************/
+NLM_EXTERN
+EditFeatureLocationActionPtr LIBCALL
+EditFeatureLocationActionAsnRead(AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ Boolean isError = FALSE;
+ AsnReadFunc func;
+ EditFeatureLocationActionPtr ptr;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return NULL;
+ }
+ }
+
+ if (aip == NULL) {
+ return NULL;
+ }
+
+ if (orig == NULL) { /* EditFeatureLocationAction ::= (self contained) */
+ atp = AsnReadId(aip, amp, EDIT_FEATURE_LOCATION_ACTION);
+ } else {
+ atp = AsnLinkType(orig, EDIT_FEATURE_LOCATION_ACTION);
+ }
+ /* link in local tree */
+ if (atp == NULL) {
+ return NULL;
+ }
+
+ ptr = EditFeatureLocationActionNew();
+ if (ptr == NULL) {
+ goto erret;
+ }
+ if (AsnReadVal(aip, atp, &av) <= 0) { /* read the start struct */
+ goto erret;
+ }
+
+ atp = AsnReadId(aip,amp, atp);
+ func = NULL;
+
+ if (atp == FEATURE_LOCATION_ACTION_type) {
+ if ( AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ ptr -> type = av.intvalue;
+ atp = AsnReadId(aip,amp, atp);
+ }
+ if (atp == FEATURE_LOCATION_ACTION_action) {
+ ptr -> action = LocationEditTypeAsnRead(aip, atp);
+ if (aip -> io_failure) {
+ goto erret;
+ }
+ atp = AsnReadId(aip,amp, atp);
+ }
+ if (atp == LOCATION_ACTION_constraint) {
+ ptr -> constraint = ConstraintChoiceSetAsnRead(aip, atp);
+ if (aip -> io_failure) {
+ goto erret;
+ }
+ atp = AsnReadId(aip,amp, atp);
+ }
+
+ if (AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ /* end struct */
+
+ret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return ptr;
+
+erret:
+ aip -> io_failure = TRUE;
+ ptr = EditFeatureLocationActionFree(ptr);
+ goto ret;
+}
+
+
+
+/**************************************************
+*
+* EditFeatureLocationActionAsnWrite()
+*
+**************************************************/
+NLM_EXTERN Boolean LIBCALL
+EditFeatureLocationActionAsnWrite(EditFeatureLocationActionPtr ptr, AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ Boolean retval = FALSE;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return FALSE;
+ }
+ }
+
+ if (aip == NULL) {
+ return FALSE;
+ }
+
+ atp = AsnLinkType(orig, EDIT_FEATURE_LOCATION_ACTION); /* link local tree */
+ if (atp == NULL) {
+ return FALSE;
+ }
+
+ if (ptr == NULL) { AsnNullValueMsg(aip, atp); goto erret; }
+ if (! AsnOpenStruct(aip, atp, (Pointer) ptr)) {
+ goto erret;
+ }
+
+ av.intvalue = ptr -> type;
+ retval = AsnWrite(aip, FEATURE_LOCATION_ACTION_type, &av);
+ if (ptr -> action != NULL) {
+ if ( ! LocationEditTypeAsnWrite(ptr -> action, aip, FEATURE_LOCATION_ACTION_action)) {
+ goto erret;
+ }
+ }
+ if (ptr -> constraint != NULL) {
+ if ( ! ConstraintChoiceSetAsnWrite(ptr -> constraint, aip, LOCATION_ACTION_constraint)) {
+ goto erret;
+ }
+ }
+ if (! AsnCloseStruct(aip, atp, (Pointer)ptr)) {
+ goto erret;
+ }
+ retval = TRUE;
+
+erret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return retval;
+}
+
+
+
+/**************************************************
+*
+* MacroActionChoiceFree()
+*
+**************************************************/
+NLM_EXTERN
+MacroActionChoicePtr LIBCALL
+MacroActionChoiceFree(ValNodePtr anp)
+{
+ Pointer pnt;
+
+ if (anp == NULL) {
+ return NULL;
+ }
+
+ pnt = anp->data.ptrvalue;
+ switch (anp->choice)
+ {
+ default:
+ break;
+ case MacroActionChoice_aecr:
+ AECRActionFree(anp -> data.ptrvalue);
+ break;
+ case MacroActionChoice_parse:
+ ParseActionFree(anp -> data.ptrvalue);
+ break;
+ case MacroActionChoice_add_feature:
+ ApplyFeatureActionFree(anp -> data.ptrvalue);
+ break;
+ case MacroActionChoice_remove_feature:
+ RemoveFeatureActionFree(anp -> data.ptrvalue);
+ break;
+ case MacroActionChoice_edit_location:
+ EditFeatureLocationActionFree(anp -> data.ptrvalue);
+ break;
+ }
+ return MemFree(anp);
+}
+
+
+/**************************************************
+*
+* MacroActionChoiceAsnRead()
+*
+**************************************************/
+NLM_EXTERN
+MacroActionChoicePtr LIBCALL
+MacroActionChoiceAsnRead(AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ ValNodePtr anp;
+ Uint1 choice;
+ Boolean isError = FALSE;
+ Boolean nullIsError = FALSE;
+ AsnReadFunc func;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad()) {
+ return NULL;
+ }
+ }
+
+ if (aip == NULL) {
+ return NULL;
+ }
+
+ if (orig == NULL) { /* MacroActionChoice ::= (self contained) */
+ atp = AsnReadId(aip, amp, MACRO_ACTION_CHOICE);
+ } else {
+ atp = AsnLinkType(orig, MACRO_ACTION_CHOICE); /* link in local tree */
+ }
+ if (atp == NULL) {
+ return NULL;
+ }
+
+ anp = ValNodeNew(NULL);
+ if (anp == NULL) {
+ goto erret;
+ }
+ if (AsnReadVal(aip, atp, &av) <= 0) { /* read the CHOICE or OpenStruct value (nothing) */
+ goto erret;
+ }
+
+ func = NULL;
+
+ atp = AsnReadId(aip, amp, atp); /* find the choice */
+ if (atp == NULL) {
+ goto erret;
+ }
+ if (atp == MACRO_ACTION_CHOICE_aecr) {
+ choice = MacroActionChoice_aecr;
+ func = (AsnReadFunc) AECRActionAsnRead;
+ }
+ else if (atp == MACRO_ACTION_CHOICE_parse) {
+ choice = MacroActionChoice_parse;
+ func = (AsnReadFunc) ParseActionAsnRead;
+ }
+ else if (atp == MACRO_ACTION_CHOICE_add_feature) {
+ choice = MacroActionChoice_add_feature;
+ func = (AsnReadFunc) ApplyFeatureActionAsnRead;
+ }
+ else if (atp == ACTION_CHOICE_remove_feature) {
+ choice = MacroActionChoice_remove_feature;
+ func = (AsnReadFunc) RemoveFeatureActionAsnRead;
+ }
+ else if (atp == ACTION_CHOICE_edit_location) {
+ choice = MacroActionChoice_edit_location;
+ func = (AsnReadFunc) EditFeatureLocationActionAsnRead;
+ }
+ anp->choice = choice;
+ if (func != NULL)
+ {
+ anp->data.ptrvalue = (* func)(aip, atp);
+ if (aip -> io_failure) goto erret;
+
+ if (nullIsError && anp->data.ptrvalue == NULL) {
+ goto erret;
+ }
+ }
+
+ret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return anp;
+
+erret:
+ anp = MemFree(anp);
+ aip -> io_failure = TRUE;
+ goto ret;
+}
+
+
+/**************************************************
+*
+* MacroActionChoiceAsnWrite()
+*
+**************************************************/
+NLM_EXTERN Boolean LIBCALL
+MacroActionChoiceAsnWrite(MacroActionChoicePtr anp, AsnIoPtr aip, AsnTypePtr orig)
+
+{
+ DataVal av;
+ AsnTypePtr atp, writetype = NULL;
+ Pointer pnt;
+ AsnWriteFunc func = NULL;
+ Boolean retval = FALSE;
+
+ if (! loaded)
+ {
+ if (! objmacroAsnLoad())
+ return FALSE;
+ }
+
+ if (aip == NULL)
+ return FALSE;
+
+ atp = AsnLinkType(orig, MACRO_ACTION_CHOICE); /* link local tree */
+ if (atp == NULL) {
+ return FALSE;
+ }
+
+ if (anp == NULL) { AsnNullValueMsg(aip, atp); goto erret; }
+
+ av.ptrvalue = (Pointer)anp;
+ if (! AsnWriteChoice(aip, atp, (Int2)anp->choice, &av)) {
+ goto erret;
+ }
+
+ pnt = anp->data.ptrvalue;
+ switch (anp->choice)
+ {
+ case MacroActionChoice_aecr:
+ writetype = MACRO_ACTION_CHOICE_aecr;
+ func = (AsnWriteFunc) AECRActionAsnWrite;
+ break;
+ case MacroActionChoice_parse:
+ writetype = MACRO_ACTION_CHOICE_parse;
+ func = (AsnWriteFunc) ParseActionAsnWrite;
+ break;
+ case MacroActionChoice_add_feature:
+ writetype = MACRO_ACTION_CHOICE_add_feature;
+ func = (AsnWriteFunc) ApplyFeatureActionAsnWrite;
+ break;
+ case MacroActionChoice_remove_feature:
+ writetype = ACTION_CHOICE_remove_feature;
+ func = (AsnWriteFunc) RemoveFeatureActionAsnWrite;
+ break;
+ case MacroActionChoice_edit_location:
+ writetype = ACTION_CHOICE_edit_location;
+ func = (AsnWriteFunc) EditFeatureLocationActionAsnWrite;
+ break;
+ }
+ if (writetype != NULL) {
+ retval = (* func)(pnt, aip, writetype); /* write it out */
+ }
+ if (!retval) {
+ goto erret;
+ }
+ retval = TRUE;
+
+erret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return retval;
+}
diff --git a/object/objmacro.h b/object/objmacro.h
new file mode 100755
index 00000000..647f34c7
--- /dev/null
+++ b/object/objmacro.h
@@ -0,0 +1,1538 @@
+#ifndef _objmacro_
+#define _objmacro_
+
+#undef NLM_EXTERN
+#ifdef NLM_IMPORT
+#define NLM_EXTERN NLM_IMPORT
+#else
+#define NLM_EXTERN extern
+#endif
+
+
+#ifdef __cplusplus
+extern "C" { /* } */
+#endif
+
+
+/**************************************************
+*
+* Generated objects for Module NCBI-Macro
+* Generated using ASNCODE Revision: 6.16 at Feb 22, 2008 12:57 PM
+*
+**************************************************/
+
+NLM_EXTERN Boolean LIBCALL
+objmacroAsnLoad PROTO((void));
+
+
+/**************************************************
+*
+* AECRAction
+*
+**************************************************/
+typedef struct struct_AECR_action {
+ ValNodePtr action;
+ ValNodePtr constraint;
+} AECRAction, PNTR AECRActionPtr;
+
+
+NLM_EXTERN AECRActionPtr LIBCALL AECRActionFree PROTO ((AECRActionPtr ));
+NLM_EXTERN AECRActionPtr LIBCALL AECRActionNew PROTO (( void ));
+NLM_EXTERN AECRActionPtr LIBCALL AECRActionAsnRead PROTO (( AsnIoPtr, AsnTypePtr));
+NLM_EXTERN Boolean LIBCALL AECRActionAsnWrite PROTO (( AECRActionPtr , AsnIoPtr, AsnTypePtr));
+
+
+
+/**************************************************
+*
+* ParseAction
+*
+**************************************************/
+typedef struct struct_Parse_action {
+ struct struct_Text_portion PNTR portion;
+ ValNodePtr src;
+ ValNodePtr dest;
+ Uint2 capitalization;
+ Uint1 remove_from_parsed;
+ Uint2 existing_text;
+} ParseAction, PNTR ParseActionPtr;
+
+
+NLM_EXTERN ParseActionPtr LIBCALL ParseActionFree PROTO ((ParseActionPtr ));
+NLM_EXTERN ParseActionPtr LIBCALL ParseActionNew PROTO (( void ));
+NLM_EXTERN ParseActionPtr LIBCALL ParseActionAsnRead PROTO (( AsnIoPtr, AsnTypePtr));
+NLM_EXTERN Boolean LIBCALL ParseActionAsnWrite PROTO (( ParseActionPtr , AsnIoPtr, AsnTypePtr));
+
+
+
+/**************************************************
+*
+* MacroActionList
+*
+**************************************************/
+typedef ValNode MacroActionList;
+typedef ValNodePtr MacroActionListPtr;
+#define MacroActionListNew() ValNodeNew(NULL)
+
+#ifdef NLM_GENERATED_CODE_PROTO
+
+NLM_EXTERN MacroActionListPtr LIBCALL MacroActionListFree PROTO ((MacroActionListPtr ));
+NLM_EXTERN MacroActionListPtr LIBCALL MacroActionListNew PROTO (( void ));
+NLM_EXTERN MacroActionListPtr LIBCALL MacroActionListAsnRead PROTO (( AsnIoPtr, AsnTypePtr));
+NLM_EXTERN Boolean LIBCALL MacroActionListAsnWrite PROTO (( MacroActionListPtr , AsnIoPtr, AsnTypePtr));
+
+#endif /* NLM_GENERATED_CODE_PROTO */
+
+/* following #defines are for enumerated type, not used by object loaders */
+#define String_location_contains 1
+#define String_location_equals 2
+#define String_location_starts 3
+#define String_location_ends 4
+#define String_location_inlist 5
+
+
+
+/**************************************************
+*
+* StringConstraint
+*
+**************************************************/
+typedef struct struct_String_constraint {
+ CharPtr match_text;
+ Uint2 match_location;
+ Uint1 case_sensitive;
+ Uint1 whole_word;
+ Uint1 not_present;
+} StringConstraint, PNTR StringConstraintPtr;
+
+
+NLM_EXTERN StringConstraintPtr LIBCALL StringConstraintFree PROTO ((StringConstraintPtr ));
+NLM_EXTERN StringConstraintPtr LIBCALL StringConstraintNew PROTO (( void ));
+NLM_EXTERN StringConstraintPtr LIBCALL StringConstraintAsnRead PROTO (( AsnIoPtr, AsnTypePtr));
+NLM_EXTERN Boolean LIBCALL StringConstraintAsnWrite PROTO (( StringConstraintPtr , AsnIoPtr, AsnTypePtr));
+
+/* following #defines are for enumerated type, not used by object loaders */
+#define Strand_constraint_any 0
+#define Strand_constraint_plus 1
+#define Strand_constraint_minus 2
+
+/* following #defines are for enumerated type, not used by object loaders */
+#define Seqtype_constraint_any 0
+#define Seqtype_constraint_nuc 1
+#define Seqtype_constraint_prot 2
+
+
+
+/**************************************************
+*
+* LocationConstraint
+*
+**************************************************/
+typedef struct struct_Location_constraint {
+ Uint2 strand;
+ Uint2 seq_type;
+} LocationConstraint, PNTR LocationConstraintPtr;
+
+
+NLM_EXTERN LocationConstraintPtr LIBCALL LocationConstraintFree PROTO ((LocationConstraintPtr ));
+NLM_EXTERN LocationConstraintPtr LIBCALL LocationConstraintNew PROTO (( void ));
+NLM_EXTERN LocationConstraintPtr LIBCALL LocationConstraintAsnRead PROTO (( AsnIoPtr, AsnTypePtr));
+NLM_EXTERN Boolean LIBCALL LocationConstraintAsnWrite PROTO (( LocationConstraintPtr , AsnIoPtr, AsnTypePtr));
+
+/* following #defines are for enumerated type, not used by object loaders */
+#define Object_type_constraint_any 0
+#define Object_type_constraint_feature 1
+#define Object_type_constraint_descriptor 2
+
+/* following #defines are for enumerated type, not used by object loaders */
+#define Feature_type_any 0
+#define Feature_type_gene 1
+#define Feature_type_org 2
+#define Feature_type_cds 3
+#define Feature_type_prot 4
+#define Feature_type_preRNA 5
+#define Feature_type_mRNA 6
+#define Feature_type_tRNA 7
+#define Feature_type_rRNA 8
+#define Feature_type_snRNA 9
+#define Feature_type_scRNA 10
+#define Feature_type_otherRNA 11
+#define Feature_type_pub 12
+#define Feature_type_seq 13
+#define Feature_type_imp 14
+#define Feature_type_allele 15
+#define Feature_type_attenuator 16
+#define Feature_type_c_region 17
+#define Feature_type_caat_signal 18
+#define Feature_type_imp_CDS 19
+#define Feature_type_conflict 20
+#define Feature_type_d_loop 21
+#define Feature_type_d_segment 22
+#define Feature_type_enhancer 23
+#define Feature_type_exon 24
+#define Feature_type_gC_signal 25
+#define Feature_type_iDNA 26
+#define Feature_type_intron 27
+#define Feature_type_j_segment 28
+#define Feature_type_ltr 29
+#define Feature_type_mat_peptide 30
+#define Feature_type_misc_binding 31
+#define Feature_type_misc_difference 32
+#define Feature_type_misc_feature 33
+#define Feature_type_misc_recomb 34
+#define Feature_type_misc_RNA 35
+#define Feature_type_misc_signal 36
+#define Feature_type_misc_structure 37
+#define Feature_type_modified_base 38
+#define Feature_type_mutation 39
+#define Feature_type_n_region 40
+#define Feature_type_old_sequence 41
+#define Feature_type_polyA_signal 42
+#define Feature_type_polyA_site 43
+#define Feature_type_precursor_RNA 44
+#define Feature_type_prim_transcript 45
+#define Feature_type_primer_bind 46
+#define Feature_type_promoter 47
+#define Feature_type_protein_bind 48
+#define Feature_type_rbs 49
+#define Feature_type_repeat_region 50
+#define Feature_type_repeat_unit 51
+#define Feature_type_rep_origin 52
+#define Feature_type_s_region 53
+#define Feature_type_satellite 54
+#define Feature_type_sig_peptide 55
+#define Feature_type_source 56
+#define Feature_type_stem_loop 57
+#define Feature_type_sts 58
+#define Feature_type_tata_signal 59
+#define Feature_type_terminator 60
+#define Feature_type_transit_peptide 61
+#define Feature_type_unsure 62
+#define Feature_type_v_region 63
+#define Feature_type_v_segment 64
+#define Feature_type_variation 65
+#define Feature_type_virion 66
+#define Feature_type_n3clip 67
+#define Feature_type_n3UTR 68
+#define Feature_type_n5clip 69
+#define Feature_type_n5UTR 70
+#define Feature_type_n10_signal 71
+#define Feature_type_n35_signal 72
+#define Feature_type_site_ref 73
+#define Feature_type_region 74
+#define Feature_type_comment 75
+#define Feature_type_bond 76
+#define Feature_type_site 77
+#define Feature_type_rsite 78
+#define Feature_type_user 79
+#define Feature_type_txinit 80
+#define Feature_type_num 81
+#define Feature_type_psec_str 82
+#define Feature_type_non_std_residue 83
+#define Feature_type_het 84
+#define Feature_type_biosrc 85
+#define Feature_type_preprotein 86
+#define Feature_type_mat_peptide_aa 87
+#define Feature_type_sig_peptide_aa 88
+#define Feature_type_transit_peptide_aa 89
+#define Feature_type_snoRNA 90
+#define Feature_type_gap 91
+#define Feature_type_operon 92
+#define Feature_type_oriT 93
+#define Feature_type_ncRNA 94
+#define Feature_type_tmRNA 95
+
+/* following #defines are for enumerated type, not used by object loaders */
+#define Feat_qual_legal_allele 1
+#define Feat_qual_legal_activity 2
+#define Feat_qual_legal_anticodon 3
+#define Feat_qual_legal_bound_moiety 4
+#define Feat_qual_legal_chromosome 5
+#define Feat_qual_legal_citation 6
+#define Feat_qual_legal_codon 7
+#define Feat_qual_legal_codon_start 8
+#define Feat_qual_legal_codons_recognized 9
+#define Feat_qual_legal_compare 10
+#define Feat_qual_legal_cons_splice 11
+#define Feat_qual_legal_db_xref 12
+#define Feat_qual_legal_description 13
+#define Feat_qual_legal_direction 14
+#define Feat_qual_legal_ec_number 15
+#define Feat_qual_legal_environmental_sample 16
+#define Feat_qual_legal_evidence 17
+#define Feat_qual_legal_exception 18
+#define Feat_qual_legal_experiment 19
+#define Feat_qual_legal_focus 20
+#define Feat_qual_legal_frequency 21
+#define Feat_qual_legal_function 22
+#define Feat_qual_legal_gene 23
+#define Feat_qual_legal_gene_description 24
+#define Feat_qual_legal_inference 25
+#define Feat_qual_legal_label 26
+#define Feat_qual_legal_locus_tag 27
+#define Feat_qual_legal_map 28
+#define Feat_qual_legal_mobile_element 29
+#define Feat_qual_legal_mod_base 30
+#define Feat_qual_legal_mol_type 31
+#define Feat_qual_legal_ncRNA_class 32
+#define Feat_qual_legal_note 33
+#define Feat_qual_legal_number 34
+#define Feat_qual_legal_old_locus_tag 35
+#define Feat_qual_legal_operon 36
+#define Feat_qual_legal_organism 37
+#define Feat_qual_legal_organelle 38
+#define Feat_qual_legal_partial 39
+#define Feat_qual_legal_phenotype 40
+#define Feat_qual_legal_plasmid 41
+#define Feat_qual_legal_product 42
+#define Feat_qual_legal_protein_id 43
+#define Feat_qual_legal_pseudo 44
+#define Feat_qual_legal_rearranged 45
+#define Feat_qual_legal_replace 46
+#define Feat_qual_legal_rpt_family 47
+#define Feat_qual_legal_rpt_type 48
+#define Feat_qual_legal_rpt_unit 49
+#define Feat_qual_legal_rpt_unit_seq 50
+#define Feat_qual_legal_rpt_unit_range 51
+#define Feat_qual_legal_segment 52
+#define Feat_qual_legal_sequenced_mol 53
+#define Feat_qual_legal_standard_name 54
+#define Feat_qual_legal_synonym 55
+#define Feat_qual_legal_transcript_id 56
+#define Feat_qual_legal_transgenic 57
+#define Feat_qual_legal_translation 58
+#define Feat_qual_legal_transl_except 59
+#define Feat_qual_legal_transl_table 60
+#define Feat_qual_legal_usedin 61
+
+
+
+/**************************************************
+*
+* FeatQualLegalVal
+*
+**************************************************/
+typedef struct struct_Feat_qual_legal_val {
+ Uint2 qual;
+ CharPtr val;
+} FeatQualLegalVal, PNTR FeatQualLegalValPtr;
+
+
+NLM_EXTERN FeatQualLegalValPtr LIBCALL FeatQualLegalValFree PROTO ((FeatQualLegalValPtr ));
+NLM_EXTERN FeatQualLegalValPtr LIBCALL FeatQualLegalValNew PROTO (( void ));
+NLM_EXTERN FeatQualLegalValPtr LIBCALL FeatQualLegalValAsnRead PROTO (( AsnIoPtr, AsnTypePtr));
+NLM_EXTERN Boolean LIBCALL FeatQualLegalValAsnWrite PROTO (( FeatQualLegalValPtr , AsnIoPtr, AsnTypePtr));
+
+typedef ValNodePtr FeatQualLegalValChoicePtr;
+typedef ValNode FeatQualLegalValChoice;
+#define FeatQualLegalValChoice_qual 1
+
+
+NLM_EXTERN FeatQualLegalValChoicePtr LIBCALL FeatQualLegalValChoiceFree PROTO ((FeatQualLegalValChoicePtr ));
+NLM_EXTERN FeatQualLegalValChoicePtr LIBCALL FeatQualLegalValChoiceAsnRead PROTO (( AsnIoPtr, AsnTypePtr));
+NLM_EXTERN Boolean LIBCALL FeatQualLegalValChoiceAsnWrite PROTO (( FeatQualLegalValChoicePtr , AsnIoPtr, AsnTypePtr));
+
+
+
+/**************************************************
+*
+* FeatQualLegalSet
+*
+**************************************************/
+typedef ValNode FeatQualLegalSet;
+typedef ValNodePtr FeatQualLegalSetPtr;
+#define FeatQualLegalSetNew() ValNodeNew(NULL)
+
+#ifdef NLM_GENERATED_CODE_PROTO
+
+NLM_EXTERN FeatQualLegalSetPtr LIBCALL FeatQualLegalSetFree PROTO ((FeatQualLegalSetPtr ));
+NLM_EXTERN FeatQualLegalSetPtr LIBCALL FeatQualLegalSetNew PROTO (( void ));
+NLM_EXTERN FeatQualLegalSetPtr LIBCALL FeatQualLegalSetAsnRead PROTO (( AsnIoPtr, AsnTypePtr));
+NLM_EXTERN Boolean LIBCALL FeatQualLegalSetAsnWrite PROTO (( FeatQualLegalSetPtr , AsnIoPtr, AsnTypePtr));
+
+#endif /* NLM_GENERATED_CODE_PROTO */
+
+typedef ValNodePtr FeatQualChoicePtr;
+typedef ValNode FeatQualChoice;
+#define FeatQualChoice_legal_qual 1
+#define FeatQualChoice_illegal_qual 2
+
+
+NLM_EXTERN FeatQualChoicePtr LIBCALL FeatQualChoiceFree PROTO ((FeatQualChoicePtr ));
+NLM_EXTERN FeatQualChoicePtr LIBCALL FeatQualChoiceAsnRead PROTO (( AsnIoPtr, AsnTypePtr));
+NLM_EXTERN Boolean LIBCALL FeatQualChoiceAsnWrite PROTO (( FeatQualChoicePtr , AsnIoPtr, AsnTypePtr));
+
+
+
+/**************************************************
+*
+* FeatureField
+*
+**************************************************/
+typedef struct struct_Feature_field {
+ Uint2 type;
+ ValNodePtr field;
+} FeatureField, PNTR FeatureFieldPtr;
+
+
+NLM_EXTERN FeatureFieldPtr LIBCALL FeatureFieldFree PROTO ((FeatureFieldPtr ));
+NLM_EXTERN FeatureFieldPtr LIBCALL FeatureFieldNew PROTO (( void ));
+NLM_EXTERN FeatureFieldPtr LIBCALL FeatureFieldAsnRead PROTO (( AsnIoPtr, AsnTypePtr));
+NLM_EXTERN Boolean LIBCALL FeatureFieldAsnWrite PROTO (( FeatureFieldPtr , AsnIoPtr, AsnTypePtr));
+
+
+
+/**************************************************
+*
+* FeatureFieldLegal
+*
+**************************************************/
+typedef struct struct_Feature_field_legal {
+ Uint2 type;
+ Uint2 field;
+} FeatureFieldLegal, PNTR FeatureFieldLegalPtr;
+
+
+NLM_EXTERN FeatureFieldLegalPtr LIBCALL FeatureFieldLegalFree PROTO ((FeatureFieldLegalPtr ));
+NLM_EXTERN FeatureFieldLegalPtr LIBCALL FeatureFieldLegalNew PROTO (( void ));
+NLM_EXTERN FeatureFieldLegalPtr LIBCALL FeatureFieldLegalAsnRead PROTO (( AsnIoPtr, AsnTypePtr));
+NLM_EXTERN Boolean LIBCALL FeatureFieldLegalAsnWrite PROTO (( FeatureFieldLegalPtr , AsnIoPtr, AsnTypePtr));
+
+
+
+/**************************************************
+*
+* FeatureFieldPair
+*
+**************************************************/
+typedef struct struct_Feature_field_pair {
+ Uint2 type;
+ ValNodePtr field_from;
+ ValNodePtr field_to;
+} FeatureFieldPair, PNTR FeatureFieldPairPtr;
+
+
+NLM_EXTERN FeatureFieldPairPtr LIBCALL FeatureFieldPairFree PROTO ((FeatureFieldPairPtr ));
+NLM_EXTERN FeatureFieldPairPtr LIBCALL FeatureFieldPairNew PROTO (( void ));
+NLM_EXTERN FeatureFieldPairPtr LIBCALL FeatureFieldPairAsnRead PROTO (( AsnIoPtr, AsnTypePtr));
+NLM_EXTERN Boolean LIBCALL FeatureFieldPairAsnWrite PROTO (( FeatureFieldPairPtr , AsnIoPtr, AsnTypePtr));
+
+/* following #defines are for enumerated type, not used by object loaders */
+#define Source_qual_acronym 1
+#define Source_qual_anamorph 2
+#define Source_qual_authority 3
+#define Source_qual_bio_material 4
+#define Source_qual_biotype 5
+#define Source_qual_biovar 6
+#define Source_qual_breed 7
+#define Source_qual_cell_line 8
+#define Source_qual_cell_type 9
+#define Source_qual_chemovar 10
+#define Source_qual_chromosome 11
+#define Source_qual_clone 12
+#define Source_qual_clone_lib 13
+#define Source_qual_collected_by 14
+#define Source_qual_collection_date 15
+#define Source_qual_common 16
+#define Source_qual_common_name 17
+#define Source_qual_country 18
+#define Source_qual_cultivar 19
+#define Source_qual_culture_collection 20
+#define Source_qual_dev_stage 21
+#define Source_qual_division 22
+#define Source_qual_dosage 23
+#define Source_qual_ecotype 24
+#define Source_qual_endogenous_virus_name 25
+#define Source_qual_environmental_sample 26
+#define Source_qual_forma 27
+#define Source_qual_forma_specialis 28
+#define Source_qual_frequency 29
+#define Source_qual_fwd_primer_name 30
+#define Source_qual_fwd_primer_seq 31
+#define Source_qual_gb_acronym 32
+#define Source_qual_gb_anamorph 33
+#define Source_qual_gb_synonym 34
+#define Source_qual_genotype 35
+#define Source_qual_germline 36
+#define Source_qual_group 37
+#define Source_qual_haplotype 38
+#define Source_qual_identified_by 39
+#define Source_qual_insertion_seq_name 40
+#define Source_qual_isolate 41
+#define Source_qual_isolation_source 42
+#define Source_qual_lab_host 43
+#define Source_qual_lat_lon 44
+#define Source_qual_lineage 45
+#define Source_qual_map 46
+#define Source_qual_metagenome_source 47
+#define Source_qual_metagenomic 48
+#define Source_qual_old_lineage 49
+#define Source_qual_old_name 50
+#define Source_qual_orgmod_note 51
+#define Source_qual_nat_host 52
+#define Source_qual_pathovar 53
+#define Source_qual_plasmid_name 54
+#define Source_qual_plastid_name 55
+#define Source_qual_pop_variant 56
+#define Source_qual_rearranged 57
+#define Source_qual_rev_primer_name 58
+#define Source_qual_rev_primer_seq 59
+#define Source_qual_segment 60
+#define Source_qual_serogroup 61
+#define Source_qual_serotype 62
+#define Source_qual_serovar 63
+#define Source_qual_sex 64
+#define Source_qual_specimen_voucher 65
+#define Source_qual_strain 66
+#define Source_qual_subclone 67
+#define Source_qual_subgroup 68
+#define Source_qual_subsource_note 69
+#define Source_qual_sub_species 70
+#define Source_qual_substrain 71
+#define Source_qual_subtype 72
+#define Source_qual_synonym 73
+#define Source_qual_taxname 74
+#define Source_qual_teleomorph 75
+#define Source_qual_tissue_lib 76
+#define Source_qual_tissue_type 77
+#define Source_qual_transgenic 78
+#define Source_qual_transposon_name 79
+#define Source_qual_type 80
+#define Source_qual_variety 81
+
+
+
+/**************************************************
+*
+* SourceQualPair
+*
+**************************************************/
+typedef struct struct_Source_qual_pair {
+ Uint2 field_from;
+ Uint2 field_to;
+} SourceQualPair, PNTR SourceQualPairPtr;
+
+
+NLM_EXTERN SourceQualPairPtr LIBCALL SourceQualPairFree PROTO ((SourceQualPairPtr ));
+NLM_EXTERN SourceQualPairPtr LIBCALL SourceQualPairNew PROTO (( void ));
+NLM_EXTERN SourceQualPairPtr LIBCALL SourceQualPairAsnRead PROTO (( AsnIoPtr, AsnTypePtr));
+NLM_EXTERN Boolean LIBCALL SourceQualPairAsnWrite PROTO (( SourceQualPairPtr , AsnIoPtr, AsnTypePtr));
+
+/* following #defines are for enumerated type, not used by object loaders */
+#define Source_location_unknown 0
+#define Source_location_genomic 1
+#define Source_location_chloroplast 2
+#define Source_location_chromoplast 3
+#define Source_location_kinetoplast 4
+#define Source_location_mitochondrion 5
+#define Source_location_plastid 6
+#define Source_location_macronuclear 7
+#define Source_location_extrachrom 8
+#define Source_location_plasmid 9
+#define Source_location_transposon 10
+#define Source_location_insertion_seq 11
+#define Source_location_cyanelle 12
+#define Source_location_proviral 13
+#define Source_location_virion 14
+#define Source_location_nucleomorph 15
+#define Source_location_apicoplast 16
+#define Source_location_leucoplast 17
+#define Source_location_proplastid 18
+#define Source_location_endogenous_virus 19
+#define Source_location_hydrogenosome 20
+#define Source_location_chromosome 21
+#define Source_location_chromatophore 22
+
+/* following #defines are for enumerated type, not used by object loaders */
+#define Source_origin_unknown 0
+#define Source_origin_natural 1
+#define Source_origin_natmut 2
+#define Source_origin_mut 3
+#define Source_origin_artificial 4
+#define Source_origin_synthetic 5
+#define Source_origin_other 255
+
+typedef ValNodePtr SourceQualChoicePtr;
+typedef ValNode SourceQualChoice;
+#define SourceQualChoice_textqual 1
+#define SourceQualChoice_location 2
+#define SourceQualChoice_origin 3
+
+
+NLM_EXTERN SourceQualChoicePtr LIBCALL SourceQualChoiceFree PROTO ((SourceQualChoicePtr ));
+NLM_EXTERN SourceQualChoicePtr LIBCALL SourceQualChoiceAsnRead PROTO (( AsnIoPtr, AsnTypePtr));
+NLM_EXTERN Boolean LIBCALL SourceQualChoiceAsnWrite PROTO (( SourceQualChoicePtr , AsnIoPtr, AsnTypePtr));
+
+/* following #defines are for enumerated type, not used by object loaders */
+#define CDSGeneProt_field_cds_comment 1
+#define CDSGeneProt_field_gene_locus 2
+#define CDSGeneProt_field_gene_description 3
+#define CDSGeneProt_field_gene_comment 4
+#define CDSGeneProt_field_gene_allele 5
+#define CDSGeneProt_field_gene_maploc 6
+#define CDSGeneProt_field_gene_locus_tag 7
+#define CDSGeneProt_field_gene_synonym 8
+#define CDSGeneProt_field_gene_old_locus_tag 9
+#define CDSGeneProt_field_mrna_product 10
+#define CDSGeneProt_field_mrna_comment 11
+#define CDSGeneProt_field_prot_name 12
+#define CDSGeneProt_field_prot_description 13
+#define CDSGeneProt_field_prot_ec_number 14
+#define CDSGeneProt_field_prot_activity 15
+#define CDSGeneProt_field_prot_comment 16
+#define CDSGeneProt_field_mat_peptide_name 17
+#define CDSGeneProt_field_mat_peptide_description 18
+#define CDSGeneProt_field_mat_peptide_ec_number 19
+#define CDSGeneProt_field_mat_peptide_activity 20
+#define CDSGeneProt_field_mat_peptide_comment 21
+
+
+
+/**************************************************
+*
+* CDSGeneProtFieldPair
+*
+**************************************************/
+typedef struct struct_CDSGeneProt_field_pair {
+ Uint2 field_from;
+ Uint2 field_to;
+} CDSGeneProtFieldPair, PNTR CDSGeneProtFieldPairPtr;
+
+
+NLM_EXTERN CDSGeneProtFieldPairPtr LIBCALL CDSGeneProtFieldPairFree PROTO ((CDSGeneProtFieldPairPtr ));
+NLM_EXTERN CDSGeneProtFieldPairPtr LIBCALL CDSGeneProtFieldPairNew PROTO (( void ));
+NLM_EXTERN CDSGeneProtFieldPairPtr LIBCALL CDSGeneProtFieldPairAsnRead PROTO (( AsnIoPtr, AsnTypePtr));
+NLM_EXTERN Boolean LIBCALL CDSGeneProtFieldPairAsnWrite PROTO (( CDSGeneProtFieldPairPtr , AsnIoPtr, AsnTypePtr));
+
+/* following #defines are for enumerated type, not used by object loaders */
+#define Molecule_type_unknown 0
+#define Molecule_type_genomic 1
+#define Molecule_type_precursor_RNA 2
+#define Molecule_type_mRNA 3
+#define Molecule_type_rRNA 4
+#define Molecule_type_tRNA 5
+#define Molecule_type_snRNA 6
+#define Molecule_type_scRNA 7
+#define Molecule_type_genomic_mRNA 8
+#define Molecule_type_cRNA 9
+#define Molecule_type_snoRNA 10
+#define Molecule_type_transcribed_RNA 11
+#define Molecule_type_ncRNA 12
+#define Molecule_type_transfer_messenger_RNA 13
+#define Molecule_type_other 14
+
+/* following #defines are for enumerated type, not used by object loaders */
+#define Technique_type_unknown 0
+#define Technique_type_standard 1
+#define Technique_type_est 2
+#define Technique_type_sts 3
+#define Technique_type_survey 4
+#define Technique_type_genetic_map 5
+#define Technique_type_physical_map 6
+#define Technique_type_derived 7
+#define Technique_type_concept_trans 8
+#define Technique_type_seq_pept 9
+#define Technique_type_both 10
+#define Technique_type_seq_pept_overlap 11
+#define Technique_type_seq_pept_homol 12
+#define Technique_type_concept_trans_a 13
+#define Technique_type_htgs_1 14
+#define Technique_type_htgs_2 15
+#define Technique_type_htgs_3 16
+#define Technique_type_fli_cDNA 17
+#define Technique_type_htgs_0 18
+#define Technique_type_htc 19
+#define Technique_type_wgs 20
+#define Technique_type_barcode 21
+#define Technique_type_composite_wgs_htgs 22
+#define Technique_type_tsa 23
+#define Technique_type_other 24
+
+/* following #defines are for enumerated type, not used by object loaders */
+#define Completedness_type_unknown 0
+#define Completedness_type_complete 1
+#define Completedness_type_partial 2
+#define Completedness_type_no_left 3
+#define Completedness_type_no_right 4
+#define Completedness_type_no_ends 5
+#define Completedness_type_has_left 6
+#define Completedness_type_has_right 7
+#define Completedness_type_other 6
+
+/* following #defines are for enumerated type, not used by object loaders */
+#define Molecule_class_type_unknown 0
+#define Molecule_class_type_dna 1
+#define Molecule_class_type_rna 2
+#define Molecule_class_type_protein 3
+#define Molecule_class_type_nucleotide 4
+#define Molecule_class_type_other 5
+
+/* following #defines are for enumerated type, not used by object loaders */
+#define Topology_type_unknown 0
+#define Topology_type_linear 1
+#define Topology_type_circular 2
+#define Topology_type_tandem 3
+#define Topology_type_other 4
+
+/* following #defines are for enumerated type, not used by object loaders */
+#define Strand_type_unknown 0
+#define Strand_type_single 1
+#define Strand_type_double__ 2
+#define Strand_type_mixed 3
+#define Strand_type_mixed_rev 4
+#define Strand_type_other 5
+
+typedef ValNodePtr MolinfoFieldPtr;
+typedef ValNode MolinfoField;
+#define MolinfoField_molecule 1
+#define MolinfoField_technique 2
+#define MolinfoField_completedness 3
+#define MolinfoField_mol_class 4
+#define MolinfoField_topology 5
+#define MolinfoField_strand 6
+
+
+NLM_EXTERN MolinfoFieldPtr LIBCALL MolinfoFieldFree PROTO ((MolinfoFieldPtr ));
+NLM_EXTERN MolinfoFieldPtr LIBCALL MolinfoFieldAsnRead PROTO (( AsnIoPtr, AsnTypePtr));
+NLM_EXTERN Boolean LIBCALL MolinfoFieldAsnWrite PROTO (( MolinfoFieldPtr , AsnIoPtr, AsnTypePtr));
+
+
+
+/**************************************************
+*
+* MolinfoMoleculePair
+*
+**************************************************/
+typedef struct struct_Molinfo_molecule_pair {
+ Uint2 from;
+ Uint2 to;
+} MolinfoMoleculePair, PNTR MolinfoMoleculePairPtr;
+
+
+NLM_EXTERN MolinfoMoleculePairPtr LIBCALL MolinfoMoleculePairFree PROTO ((MolinfoMoleculePairPtr ));
+NLM_EXTERN MolinfoMoleculePairPtr LIBCALL MolinfoMoleculePairNew PROTO (( void ));
+NLM_EXTERN MolinfoMoleculePairPtr LIBCALL MolinfoMoleculePairAsnRead PROTO (( AsnIoPtr, AsnTypePtr));
+NLM_EXTERN Boolean LIBCALL MolinfoMoleculePairAsnWrite PROTO (( MolinfoMoleculePairPtr , AsnIoPtr, AsnTypePtr));
+
+
+
+/**************************************************
+*
+* MolinfoTechniquePair
+*
+**************************************************/
+typedef struct struct_Molinfo_technique_pair {
+ Uint2 from;
+ Uint2 to;
+} MolinfoTechniquePair, PNTR MolinfoTechniquePairPtr;
+
+
+NLM_EXTERN MolinfoTechniquePairPtr LIBCALL MolinfoTechniquePairFree PROTO ((MolinfoTechniquePairPtr ));
+NLM_EXTERN MolinfoTechniquePairPtr LIBCALL MolinfoTechniquePairNew PROTO (( void ));
+NLM_EXTERN MolinfoTechniquePairPtr LIBCALL MolinfoTechniquePairAsnRead PROTO (( AsnIoPtr, AsnTypePtr));
+NLM_EXTERN Boolean LIBCALL MolinfoTechniquePairAsnWrite PROTO (( MolinfoTechniquePairPtr , AsnIoPtr, AsnTypePtr));
+
+
+
+/**************************************************
+*
+* MolinfoCompletednessPair
+*
+**************************************************/
+typedef struct struct_Molinfo_completedness_pair {
+ Uint2 from;
+ Uint2 to;
+} MolinfoCompletednessPair, PNTR MolinfoCompletednessPairPtr;
+
+
+NLM_EXTERN MolinfoCompletednessPairPtr LIBCALL MolinfoCompletednessPairFree PROTO ((MolinfoCompletednessPairPtr ));
+NLM_EXTERN MolinfoCompletednessPairPtr LIBCALL MolinfoCompletednessPairNew PROTO (( void ));
+NLM_EXTERN MolinfoCompletednessPairPtr LIBCALL MolinfoCompletednessPairAsnRead PROTO (( AsnIoPtr, AsnTypePtr));
+NLM_EXTERN Boolean LIBCALL MolinfoCompletednessPairAsnWrite PROTO (( MolinfoCompletednessPairPtr , AsnIoPtr, AsnTypePtr));
+
+
+
+/**************************************************
+*
+* MolinfoMolClassPair
+*
+**************************************************/
+typedef struct struct_Molinfo_mol_class_pair {
+ Uint2 from;
+ Uint2 to;
+} MolinfoMolClassPair, PNTR MolinfoMolClassPairPtr;
+
+
+NLM_EXTERN MolinfoMolClassPairPtr LIBCALL MolinfoMolClassPairFree PROTO ((MolinfoMolClassPairPtr ));
+NLM_EXTERN MolinfoMolClassPairPtr LIBCALL MolinfoMolClassPairNew PROTO (( void ));
+NLM_EXTERN MolinfoMolClassPairPtr LIBCALL MolinfoMolClassPairAsnRead PROTO (( AsnIoPtr, AsnTypePtr));
+NLM_EXTERN Boolean LIBCALL MolinfoMolClassPairAsnWrite PROTO (( MolinfoMolClassPairPtr , AsnIoPtr, AsnTypePtr));
+
+
+
+/**************************************************
+*
+* MolinfoTopologyPair
+*
+**************************************************/
+typedef struct struct_Molinfo_topology_pair {
+ Uint2 from;
+ Uint2 to;
+} MolinfoTopologyPair, PNTR MolinfoTopologyPairPtr;
+
+
+NLM_EXTERN MolinfoTopologyPairPtr LIBCALL MolinfoTopologyPairFree PROTO ((MolinfoTopologyPairPtr ));
+NLM_EXTERN MolinfoTopologyPairPtr LIBCALL MolinfoTopologyPairNew PROTO (( void ));
+NLM_EXTERN MolinfoTopologyPairPtr LIBCALL MolinfoTopologyPairAsnRead PROTO (( AsnIoPtr, AsnTypePtr));
+NLM_EXTERN Boolean LIBCALL MolinfoTopologyPairAsnWrite PROTO (( MolinfoTopologyPairPtr , AsnIoPtr, AsnTypePtr));
+
+
+
+/**************************************************
+*
+* MolinfoStrandPair
+*
+**************************************************/
+typedef struct struct_Molinfo_strand_pair {
+ Uint2 from;
+ Uint2 to;
+} MolinfoStrandPair, PNTR MolinfoStrandPairPtr;
+
+
+NLM_EXTERN MolinfoStrandPairPtr LIBCALL MolinfoStrandPairFree PROTO ((MolinfoStrandPairPtr ));
+NLM_EXTERN MolinfoStrandPairPtr LIBCALL MolinfoStrandPairNew PROTO (( void ));
+NLM_EXTERN MolinfoStrandPairPtr LIBCALL MolinfoStrandPairAsnRead PROTO (( AsnIoPtr, AsnTypePtr));
+NLM_EXTERN Boolean LIBCALL MolinfoStrandPairAsnWrite PROTO (( MolinfoStrandPairPtr , AsnIoPtr, AsnTypePtr));
+
+typedef ValNodePtr MolinfoFieldPairPtr;
+typedef ValNode MolinfoFieldPair;
+#define MolinfoFieldPair_molecule 1
+#define MolinfoFieldPair_technique 2
+#define MolinfoFieldPair_completedness 3
+#define MolinfoFieldPair_mol_class 4
+#define MolinfoFieldPair_topology 5
+#define MolinfoFieldPair_strand 6
+
+
+NLM_EXTERN MolinfoFieldPairPtr LIBCALL MolinfoFieldPairFree PROTO ((MolinfoFieldPairPtr ));
+NLM_EXTERN MolinfoFieldPairPtr LIBCALL MolinfoFieldPairAsnRead PROTO (( AsnIoPtr, AsnTypePtr));
+NLM_EXTERN Boolean LIBCALL MolinfoFieldPairAsnWrite PROTO (( MolinfoFieldPairPtr , AsnIoPtr, AsnTypePtr));
+
+
+
+/**************************************************
+*
+* SourceConstraint
+*
+**************************************************/
+typedef struct struct_Source_constraint {
+ ValNodePtr field1;
+ ValNodePtr field2;
+ struct struct_String_constraint PNTR constraint;
+ Uint2 type_constraint;
+} SourceConstraint, PNTR SourceConstraintPtr;
+
+
+NLM_EXTERN SourceConstraintPtr LIBCALL SourceConstraintFree PROTO ((SourceConstraintPtr ));
+NLM_EXTERN SourceConstraintPtr LIBCALL SourceConstraintNew PROTO (( void ));
+NLM_EXTERN SourceConstraintPtr LIBCALL SourceConstraintAsnRead PROTO (( AsnIoPtr, AsnTypePtr));
+NLM_EXTERN Boolean LIBCALL SourceConstraintAsnWrite PROTO (( SourceConstraintPtr , AsnIoPtr, AsnTypePtr));
+
+/* following #defines are for enumerated type, not used by object loaders */
+#define CDSGeneProt_feature_type_constraint_gene 1
+#define CDSGeneProt_feature_type_constraint_mRNA 2
+#define CDSGeneProt_feature_type_constraint_cds 3
+#define CDSGeneProt_feature_type_constraint_prot 4
+#define CDSGeneProt_feature_type_constraint_exon 5
+#define CDSGeneProt_feature_type_constraint_mat_peptide 6
+
+
+
+/**************************************************
+*
+* CDSGeneProtPseudoConstraint
+*
+**************************************************/
+typedef struct struct_CDSGeneProt_pseudo_constraint {
+ Uint2 feature;
+ Uint1 is_pseudo;
+} CDSGeneProtPseudoConstraint, PNTR CDSGeneProtPseudoConstraintPtr;
+
+
+NLM_EXTERN CDSGeneProtPseudoConstraintPtr LIBCALL CDSGeneProtPseudoConstraintFree PROTO ((CDSGeneProtPseudoConstraintPtr ));
+NLM_EXTERN CDSGeneProtPseudoConstraintPtr LIBCALL CDSGeneProtPseudoConstraintNew PROTO (( void ));
+NLM_EXTERN CDSGeneProtPseudoConstraintPtr LIBCALL CDSGeneProtPseudoConstraintAsnRead PROTO (( AsnIoPtr, AsnTypePtr));
+NLM_EXTERN Boolean LIBCALL CDSGeneProtPseudoConstraintAsnWrite PROTO (( CDSGeneProtPseudoConstraintPtr , AsnIoPtr, AsnTypePtr));
+
+typedef ValNodePtr CDSGeneProtConstraintFieldPtr;
+typedef ValNode CDSGeneProtConstraintField;
+#define CDSGeneProtConstraintField_field 1
+
+
+NLM_EXTERN CDSGeneProtConstraintFieldPtr LIBCALL CDSGeneProtConstraintFieldFree PROTO ((CDSGeneProtConstraintFieldPtr ));
+NLM_EXTERN CDSGeneProtConstraintFieldPtr LIBCALL CDSGeneProtConstraintFieldAsnRead PROTO (( AsnIoPtr, AsnTypePtr));
+NLM_EXTERN Boolean LIBCALL CDSGeneProtConstraintFieldAsnWrite PROTO (( CDSGeneProtConstraintFieldPtr , AsnIoPtr, AsnTypePtr));
+
+
+
+/**************************************************
+*
+* CDSGeneProtQualConstraint
+*
+**************************************************/
+typedef struct struct_CDSGeneProt_qual_constraint {
+ ValNodePtr field1;
+ ValNodePtr field2;
+ struct struct_String_constraint PNTR constraint;
+} CDSGeneProtQualConstraint, PNTR CDSGeneProtQualConstraintPtr;
+
+
+NLM_EXTERN CDSGeneProtQualConstraintPtr LIBCALL CDSGeneProtQualConstraintFree PROTO ((CDSGeneProtQualConstraintPtr ));
+NLM_EXTERN CDSGeneProtQualConstraintPtr LIBCALL CDSGeneProtQualConstraintNew PROTO (( void ));
+NLM_EXTERN CDSGeneProtQualConstraintPtr LIBCALL CDSGeneProtQualConstraintAsnRead PROTO (( AsnIoPtr, AsnTypePtr));
+NLM_EXTERN Boolean LIBCALL CDSGeneProtQualConstraintAsnWrite PROTO (( CDSGeneProtQualConstraintPtr , AsnIoPtr, AsnTypePtr));
+
+/* following #defines are for enumerated type, not used by object loaders */
+#define Sequence_constraint_rnamol_any 0
+#define Sequence_constraint_rnamol_genomic 1
+#define Sequence_constraint_rnamol_precursor_RNA 2
+#define Sequence_constraint_rnamol_mRNA 3
+#define Sequence_constraint_rnamol_rRNA 4
+#define Sequence_constraint_rnamol_tRNA 5
+#define Sequence_constraint_rnamol_snRNA 6
+#define Sequence_constraint_rnamol_scRNA 7
+#define Sequence_constraint_rnamol_genomic_mRNA 8
+#define Sequence_constraint_rnamol_cRNA 9
+#define Sequence_constraint_rnamol_snoRNA 10
+#define Sequence_constraint_rnamol_transcribed_RNA 11
+#define Sequence_constraint_rnamol_ncRNA 12
+#define Sequence_constraint_rnamol_transfer_messenger_RNA 13
+
+typedef ValNodePtr SequenceConstraintMolTypeConstraintPtr;
+typedef ValNode SequenceConstraintMolTypeConstraint;
+#define SequenceConstraintMolTypeConstraint_any 1
+#define SequenceConstraintMolTypeConstraint_nucleotide 2
+#define SequenceConstraintMolTypeConstraint_dna 3
+#define SequenceConstraintMolTypeConstraint_rna 4
+#define SequenceConstraintMolTypeConstraint_protein 5
+
+
+NLM_EXTERN SequenceConstraintMolTypeConstraintPtr LIBCALL SequenceConstraintMolTypeConstraintFree PROTO ((SequenceConstraintMolTypeConstraintPtr ));
+NLM_EXTERN SequenceConstraintMolTypeConstraintPtr LIBCALL SequenceConstraintMolTypeConstraintAsnRead PROTO (( AsnIoPtr, AsnTypePtr));
+NLM_EXTERN Boolean LIBCALL SequenceConstraintMolTypeConstraintAsnWrite PROTO (( SequenceConstraintMolTypeConstraintPtr , AsnIoPtr, AsnTypePtr));
+
+
+
+/**************************************************
+*
+* SequenceConstraint
+*
+**************************************************/
+typedef struct struct_Sequence_constraint {
+ ValNodePtr seqtype;
+ struct struct_String_constraint PNTR id;
+ Uint2 feature;
+} SequenceConstraint, PNTR SequenceConstraintPtr;
+
+
+NLM_EXTERN SequenceConstraintPtr LIBCALL SequenceConstraintFree PROTO ((SequenceConstraintPtr ));
+NLM_EXTERN SequenceConstraintPtr LIBCALL SequenceConstraintNew PROTO (( void ));
+NLM_EXTERN SequenceConstraintPtr LIBCALL SequenceConstraintAsnRead PROTO (( AsnIoPtr, AsnTypePtr));
+NLM_EXTERN Boolean LIBCALL SequenceConstraintAsnWrite PROTO (( SequenceConstraintPtr , AsnIoPtr, AsnTypePtr));
+
+typedef ValNodePtr ConstraintChoicePtr;
+typedef ValNode ConstraintChoice;
+#define ConstraintChoice_string 1
+#define ConstraintChoice_location 2
+#define ConstraintChoice_source 3
+#define ConstraintChoice_cdsgeneprot_qual 4
+#define ConstraintChoice_cdsgeneprot_pseudo 5
+#define ConstraintChoice_sequence 6
+
+
+NLM_EXTERN ConstraintChoicePtr LIBCALL ConstraintChoiceFree PROTO ((ConstraintChoicePtr ));
+NLM_EXTERN ConstraintChoicePtr LIBCALL ConstraintChoiceAsnRead PROTO (( AsnIoPtr, AsnTypePtr));
+NLM_EXTERN Boolean LIBCALL ConstraintChoiceAsnWrite PROTO (( ConstraintChoicePtr , AsnIoPtr, AsnTypePtr));
+
+
+
+/**************************************************
+*
+* ConstraintChoiceSet
+*
+**************************************************/
+typedef ValNode ConstraintChoiceSet;
+typedef ValNodePtr ConstraintChoiceSetPtr;
+#define ConstraintChoiceSetNew() ValNodeNew(NULL)
+
+#ifdef NLM_GENERATED_CODE_PROTO
+
+NLM_EXTERN ConstraintChoiceSetPtr LIBCALL ConstraintChoiceSetFree PROTO ((ConstraintChoiceSetPtr ));
+NLM_EXTERN ConstraintChoiceSetPtr LIBCALL ConstraintChoiceSetNew PROTO (( void ));
+NLM_EXTERN ConstraintChoiceSetPtr LIBCALL ConstraintChoiceSetAsnRead PROTO (( AsnIoPtr, AsnTypePtr));
+NLM_EXTERN Boolean LIBCALL ConstraintChoiceSetAsnWrite PROTO (( ConstraintChoiceSetPtr , AsnIoPtr, AsnTypePtr));
+
+#endif /* NLM_GENERATED_CODE_PROTO */
+
+
+
+/**************************************************
+*
+* TextPortion
+*
+**************************************************/
+typedef struct struct_Text_portion {
+ CharPtr left_text;
+ Uint1 include_left;
+ CharPtr right_text;
+ Uint1 include_right;
+ Uint1 inside;
+ Uint1 case_sensitive;
+ Uint1 whole_word;
+} TextPortion, PNTR TextPortionPtr;
+
+
+NLM_EXTERN TextPortionPtr LIBCALL TextPortionFree PROTO ((TextPortionPtr ));
+NLM_EXTERN TextPortionPtr LIBCALL TextPortionNew PROTO (( void ));
+NLM_EXTERN TextPortionPtr LIBCALL TextPortionAsnRead PROTO (( AsnIoPtr, AsnTypePtr));
+NLM_EXTERN Boolean LIBCALL TextPortionAsnWrite PROTO (( TextPortionPtr , AsnIoPtr, AsnTypePtr));
+
+/* following #defines are for enumerated type, not used by object loaders */
+#define Field_edit_location_anywhere 0
+#define Field_edit_location_beginning 1
+#define Field_edit_location_end 2
+
+
+
+/**************************************************
+*
+* FieldEdit
+*
+**************************************************/
+typedef struct struct_Field_edit {
+ CharPtr find_txt;
+ CharPtr repl_txt;
+ Uint2 location;
+} FieldEdit, PNTR FieldEditPtr;
+
+
+NLM_EXTERN FieldEditPtr LIBCALL FieldEditFree PROTO ((FieldEditPtr ));
+NLM_EXTERN FieldEditPtr LIBCALL FieldEditNew PROTO (( void ));
+NLM_EXTERN FieldEditPtr LIBCALL FieldEditAsnRead PROTO (( AsnIoPtr, AsnTypePtr));
+NLM_EXTERN Boolean LIBCALL FieldEditAsnWrite PROTO (( FieldEditPtr , AsnIoPtr, AsnTypePtr));
+
+typedef ValNodePtr FieldTypePtr;
+typedef ValNode FieldType;
+#define FieldType_source_qual 1
+#define FieldType_feature_field 2
+#define FieldType_cds_gene_prot 3
+#define FieldType_molinfo_field 4
+
+
+NLM_EXTERN FieldTypePtr LIBCALL FieldTypeFree PROTO ((FieldTypePtr ));
+NLM_EXTERN FieldTypePtr LIBCALL FieldTypeAsnRead PROTO (( AsnIoPtr, AsnTypePtr));
+NLM_EXTERN Boolean LIBCALL FieldTypeAsnWrite PROTO (( FieldTypePtr , AsnIoPtr, AsnTypePtr));
+
+typedef ValNodePtr FieldPairTypePtr;
+typedef ValNode FieldPairType;
+#define FieldPairType_source_qual 1
+#define FieldPairType_feature_field 2
+#define FieldPairType_cds_gene_prot 3
+#define FieldPairType_molinfo_field 4
+
+
+NLM_EXTERN FieldPairTypePtr LIBCALL FieldPairTypeFree PROTO ((FieldPairTypePtr ));
+NLM_EXTERN FieldPairTypePtr LIBCALL FieldPairTypeAsnRead PROTO (( AsnIoPtr, AsnTypePtr));
+NLM_EXTERN Boolean LIBCALL FieldPairTypeAsnWrite PROTO (( FieldPairTypePtr , AsnIoPtr, AsnTypePtr));
+
+/* following #defines are for enumerated type, not used by object loaders */
+#define ExistingTextOption_replace_old 1
+#define ExistingTextOption_append_semi 2
+#define ExistingTextOption_append_space 3
+#define ExistingTextOption_append_colon 4
+#define ExistingTextOption_append_none 5
+#define ExistingTextOption_prefix_semi 6
+#define ExistingTextOption_prefix_space 7
+#define ExistingTextOption_prefix_colon 8
+#define ExistingTextOption_prefix_none 9
+#define ExistingTextOption_leave_old 10
+
+
+
+/**************************************************
+*
+* ApplyAction
+*
+**************************************************/
+typedef struct struct_Apply_action {
+ ValNodePtr field;
+ CharPtr value;
+ Uint2 existing_text;
+} ApplyAction, PNTR ApplyActionPtr;
+
+
+NLM_EXTERN ApplyActionPtr LIBCALL ApplyActionFree PROTO ((ApplyActionPtr ));
+NLM_EXTERN ApplyActionPtr LIBCALL ApplyActionNew PROTO (( void ));
+NLM_EXTERN ApplyActionPtr LIBCALL ApplyActionAsnRead PROTO (( AsnIoPtr, AsnTypePtr));
+NLM_EXTERN Boolean LIBCALL ApplyActionAsnWrite PROTO (( ApplyActionPtr , AsnIoPtr, AsnTypePtr));
+
+
+
+/**************************************************
+*
+* EditAction
+*
+**************************************************/
+typedef struct struct_Edit_action {
+ struct struct_Field_edit PNTR edit;
+ ValNodePtr field;
+} EditAction, PNTR EditActionPtr;
+
+
+NLM_EXTERN EditActionPtr LIBCALL EditActionFree PROTO ((EditActionPtr ));
+NLM_EXTERN EditActionPtr LIBCALL EditActionNew PROTO (( void ));
+NLM_EXTERN EditActionPtr LIBCALL EditActionAsnRead PROTO (( AsnIoPtr, AsnTypePtr));
+NLM_EXTERN Boolean LIBCALL EditActionAsnWrite PROTO (( EditActionPtr , AsnIoPtr, AsnTypePtr));
+
+
+
+/**************************************************
+*
+* ConvertAction
+*
+**************************************************/
+typedef struct struct_Convert_action {
+ ValNodePtr fields;
+ Uint2 existing_text;
+} ConvertAction, PNTR ConvertActionPtr;
+
+
+NLM_EXTERN ConvertActionPtr LIBCALL ConvertActionFree PROTO ((ConvertActionPtr ));
+NLM_EXTERN ConvertActionPtr LIBCALL ConvertActionNew PROTO (( void ));
+NLM_EXTERN ConvertActionPtr LIBCALL ConvertActionAsnRead PROTO (( AsnIoPtr, AsnTypePtr));
+NLM_EXTERN Boolean LIBCALL ConvertActionAsnWrite PROTO (( ConvertActionPtr , AsnIoPtr, AsnTypePtr));
+
+
+
+/**************************************************
+*
+* CopyAction
+*
+**************************************************/
+typedef struct struct_Copy_action {
+ ValNodePtr fields;
+ Uint2 existing_text;
+} CopyAction, PNTR CopyActionPtr;
+
+
+NLM_EXTERN CopyActionPtr LIBCALL CopyActionFree PROTO ((CopyActionPtr ));
+NLM_EXTERN CopyActionPtr LIBCALL CopyActionNew PROTO (( void ));
+NLM_EXTERN CopyActionPtr LIBCALL CopyActionAsnRead PROTO (( AsnIoPtr, AsnTypePtr));
+NLM_EXTERN Boolean LIBCALL CopyActionAsnWrite PROTO (( CopyActionPtr , AsnIoPtr, AsnTypePtr));
+
+
+
+/**************************************************
+*
+* SwapAction
+*
+**************************************************/
+typedef struct struct_Swap_action {
+ ValNodePtr fields;
+ ValNodePtr field_to;
+} SwapAction, PNTR SwapActionPtr;
+
+
+NLM_EXTERN SwapActionPtr LIBCALL SwapActionFree PROTO ((SwapActionPtr ));
+NLM_EXTERN SwapActionPtr LIBCALL SwapActionNew PROTO (( void ));
+NLM_EXTERN SwapActionPtr LIBCALL SwapActionAsnRead PROTO (( AsnIoPtr, AsnTypePtr));
+NLM_EXTERN Boolean LIBCALL SwapActionAsnWrite PROTO (( SwapActionPtr , AsnIoPtr, AsnTypePtr));
+
+
+
+/**************************************************
+*
+* AECRParseAction
+*
+**************************************************/
+typedef struct struct_AECRParse_action {
+ struct struct_Text_portion PNTR portion;
+ ValNodePtr fields;
+ Uint1 remove_from_parsed;
+ Uint2 existing_text;
+} AECRParseAction, PNTR AECRParseActionPtr;
+
+
+NLM_EXTERN AECRParseActionPtr LIBCALL AECRParseActionFree PROTO ((AECRParseActionPtr ));
+NLM_EXTERN AECRParseActionPtr LIBCALL AECRParseActionNew PROTO (( void ));
+NLM_EXTERN AECRParseActionPtr LIBCALL AECRParseActionAsnRead PROTO (( AsnIoPtr, AsnTypePtr));
+NLM_EXTERN Boolean LIBCALL AECRParseActionAsnWrite PROTO (( AECRParseActionPtr , AsnIoPtr, AsnTypePtr));
+
+
+
+/**************************************************
+*
+* RemoveAction
+*
+**************************************************/
+typedef struct struct_Remove_action {
+ ValNodePtr field;
+} RemoveAction, PNTR RemoveActionPtr;
+
+
+NLM_EXTERN RemoveActionPtr LIBCALL RemoveActionFree PROTO ((RemoveActionPtr ));
+NLM_EXTERN RemoveActionPtr LIBCALL RemoveActionNew PROTO (( void ));
+NLM_EXTERN RemoveActionPtr LIBCALL RemoveActionAsnRead PROTO (( AsnIoPtr, AsnTypePtr));
+NLM_EXTERN Boolean LIBCALL RemoveActionAsnWrite PROTO (( RemoveActionPtr , AsnIoPtr, AsnTypePtr));
+
+typedef ValNodePtr ActionChoicePtr;
+typedef ValNode ActionChoice;
+#define ActionChoice_apply 1
+#define ActionChoice_edit 2
+#define ActionChoice_convert 3
+#define ActionChoice_copy 4
+#define ActionChoice_swap 5
+#define ActionChoice_remove 6
+#define ActionChoice_parse 7
+
+
+NLM_EXTERN ActionChoicePtr LIBCALL ActionChoiceFree PROTO ((ActionChoicePtr ));
+NLM_EXTERN ActionChoicePtr LIBCALL ActionChoiceAsnRead PROTO (( AsnIoPtr, AsnTypePtr));
+NLM_EXTERN Boolean LIBCALL ActionChoiceAsnWrite PROTO (( ActionChoicePtr , AsnIoPtr, AsnTypePtr));
+
+/* following #defines are for enumerated type, not used by object loaders */
+#define Cap_change_none 0
+#define Cap_change_tolower 1
+#define Cap_change_toupper 2
+#define Cap_change_firstcap 3
+
+typedef ValNodePtr ParseSrcOrgChoicePtr;
+typedef ValNode ParseSrcOrgChoice;
+#define ParseSrcOrgChoice_source_qual 1
+#define ParseSrcOrgChoice_taxname_after_binomial 2
+
+
+NLM_EXTERN ParseSrcOrgChoicePtr LIBCALL ParseSrcOrgChoiceFree PROTO ((ParseSrcOrgChoicePtr ));
+NLM_EXTERN ParseSrcOrgChoicePtr LIBCALL ParseSrcOrgChoiceAsnRead PROTO (( AsnIoPtr, AsnTypePtr));
+NLM_EXTERN Boolean LIBCALL ParseSrcOrgChoiceAsnWrite PROTO (( ParseSrcOrgChoicePtr , AsnIoPtr, AsnTypePtr));
+
+
+
+/**************************************************
+*
+* ParseSrcOrg
+*
+**************************************************/
+typedef struct struct_Parse_src_org {
+ ValNodePtr field;
+ Uint2 type;
+} ParseSrcOrg, PNTR ParseSrcOrgPtr;
+
+
+NLM_EXTERN ParseSrcOrgPtr LIBCALL ParseSrcOrgFree PROTO ((ParseSrcOrgPtr ));
+NLM_EXTERN ParseSrcOrgPtr LIBCALL ParseSrcOrgNew PROTO (( void ));
+NLM_EXTERN ParseSrcOrgPtr LIBCALL ParseSrcOrgAsnRead PROTO (( AsnIoPtr, AsnTypePtr));
+NLM_EXTERN Boolean LIBCALL ParseSrcOrgAsnWrite PROTO (( ParseSrcOrgPtr , AsnIoPtr, AsnTypePtr));
+
+typedef ValNodePtr ParseSrcPtr;
+typedef ValNode ParseSrc;
+#define ParseSrc_defline 1
+#define ParseSrc_flatfile 2
+#define ParseSrc_local_id 3
+#define ParseSrc_org 4
+#define ParseSrc_comment 5
+#define ParseSrc_bankit_comment 6
+#define ParseSrc_structured_comment 7
+#define ParseSrc_file_id 8
+
+
+NLM_EXTERN ParseSrcPtr LIBCALL ParseSrcFree PROTO ((ParseSrcPtr ));
+NLM_EXTERN ParseSrcPtr LIBCALL ParseSrcAsnRead PROTO (( AsnIoPtr, AsnTypePtr));
+NLM_EXTERN Boolean LIBCALL ParseSrcAsnWrite PROTO (( ParseSrcPtr , AsnIoPtr, AsnTypePtr));
+
+
+
+/**************************************************
+*
+* ParseDstOrg
+*
+**************************************************/
+typedef struct struct_Parse_dst_org {
+ ValNodePtr field;
+ Uint2 type;
+} ParseDstOrg, PNTR ParseDstOrgPtr;
+
+
+NLM_EXTERN ParseDstOrgPtr LIBCALL ParseDstOrgFree PROTO ((ParseDstOrgPtr ));
+NLM_EXTERN ParseDstOrgPtr LIBCALL ParseDstOrgNew PROTO (( void ));
+NLM_EXTERN ParseDstOrgPtr LIBCALL ParseDstOrgAsnRead PROTO (( AsnIoPtr, AsnTypePtr));
+NLM_EXTERN Boolean LIBCALL ParseDstOrgAsnWrite PROTO (( ParseDstOrgPtr , AsnIoPtr, AsnTypePtr));
+
+typedef ValNodePtr ParseDestPtr;
+typedef ValNode ParseDest;
+#define ParseDest_defline 1
+#define ParseDest_org 2
+#define ParseDest_featqual 3
+#define ParseDest_dbxref 4
+
+
+NLM_EXTERN ParseDestPtr LIBCALL ParseDestFree PROTO ((ParseDestPtr ));
+NLM_EXTERN ParseDestPtr LIBCALL ParseDestAsnRead PROTO (( AsnIoPtr, AsnTypePtr));
+NLM_EXTERN Boolean LIBCALL ParseDestAsnWrite PROTO (( ParseDestPtr , AsnIoPtr, AsnTypePtr));
+
+
+
+/**************************************************
+*
+* LocationInterval
+*
+**************************************************/
+typedef struct struct_Location_interval {
+ Int4 from;
+ Int4 to;
+} LocationInterval, PNTR LocationIntervalPtr;
+
+
+NLM_EXTERN LocationIntervalPtr LIBCALL LocationIntervalFree PROTO ((LocationIntervalPtr ));
+NLM_EXTERN LocationIntervalPtr LIBCALL LocationIntervalNew PROTO (( void ));
+NLM_EXTERN LocationIntervalPtr LIBCALL LocationIntervalAsnRead PROTO (( AsnIoPtr, AsnTypePtr));
+NLM_EXTERN Boolean LIBCALL LocationIntervalAsnWrite PROTO (( LocationIntervalPtr , AsnIoPtr, AsnTypePtr));
+
+typedef ValNodePtr LocationChoicePtr;
+typedef ValNode LocationChoice;
+#define LocationChoice_interval 1
+#define LocationChoice_whole_sequence 2
+
+
+NLM_EXTERN LocationChoicePtr LIBCALL LocationChoiceFree PROTO ((LocationChoicePtr ));
+NLM_EXTERN LocationChoicePtr LIBCALL LocationChoiceAsnRead PROTO (( AsnIoPtr, AsnTypePtr));
+NLM_EXTERN Boolean LIBCALL LocationChoiceAsnWrite PROTO (( LocationChoicePtr , AsnIoPtr, AsnTypePtr));
+
+
+
+/**************************************************
+*
+* SequenceList
+*
+**************************************************/
+typedef ValNode SequenceList;
+typedef ValNodePtr SequenceListPtr;
+#define SequenceListNew() ValNodeNew(NULL)
+
+#ifdef NLM_GENERATED_CODE_PROTO
+
+NLM_EXTERN SequenceListPtr LIBCALL SequenceListFree PROTO ((SequenceListPtr ));
+NLM_EXTERN SequenceListPtr LIBCALL SequenceListNew PROTO (( void ));
+NLM_EXTERN SequenceListPtr LIBCALL SequenceListAsnRead PROTO (( AsnIoPtr, AsnTypePtr));
+NLM_EXTERN Boolean LIBCALL SequenceListAsnWrite PROTO (( SequenceListPtr , AsnIoPtr, AsnTypePtr));
+
+#endif /* NLM_GENERATED_CODE_PROTO */
+
+typedef ValNodePtr SequenceListChoicePtr;
+typedef ValNode SequenceListChoice;
+#define SequenceListChoice_list 1
+#define SequenceListChoice_all 2
+
+
+NLM_EXTERN SequenceListChoicePtr LIBCALL SequenceListChoiceFree PROTO ((SequenceListChoicePtr ));
+NLM_EXTERN SequenceListChoicePtr LIBCALL SequenceListChoiceAsnRead PROTO (( AsnIoPtr, AsnTypePtr));
+NLM_EXTERN Boolean LIBCALL SequenceListChoiceAsnWrite PROTO (( SequenceListChoicePtr , AsnIoPtr, AsnTypePtr));
+
+
+
+/**************************************************
+*
+* ApplyFeatureAction
+*
+**************************************************/
+typedef struct struct_Apply_feature_action {
+ Uint2 type;
+ Uint1 partial5;
+ Uint1 partial3;
+ Uint1 plus_strand;
+ ValNodePtr location;
+ ValNodePtr seq_list;
+ Uint1 add_redundant;
+ Uint1 add_mrna;
+ Uint1 apply_to_parts;
+ Int4 only_seg_num;
+ ValNodePtr fields;
+} ApplyFeatureAction, PNTR ApplyFeatureActionPtr;
+
+
+NLM_EXTERN ApplyFeatureActionPtr LIBCALL ApplyFeatureActionFree PROTO ((ApplyFeatureActionPtr ));
+NLM_EXTERN ApplyFeatureActionPtr LIBCALL ApplyFeatureActionNew PROTO (( void ));
+NLM_EXTERN ApplyFeatureActionPtr LIBCALL ApplyFeatureActionAsnRead PROTO (( AsnIoPtr, AsnTypePtr));
+NLM_EXTERN Boolean LIBCALL ApplyFeatureActionAsnWrite PROTO (( ApplyFeatureActionPtr , AsnIoPtr, AsnTypePtr));
+
+
+
+/**************************************************
+*
+* RemoveFeatureAction
+*
+**************************************************/
+typedef struct struct_Remove_feature_action {
+ Uint2 type;
+ ValNodePtr constraint;
+} RemoveFeatureAction, PNTR RemoveFeatureActionPtr;
+
+
+NLM_EXTERN RemoveFeatureActionPtr LIBCALL RemoveFeatureActionFree PROTO ((RemoveFeatureActionPtr ));
+NLM_EXTERN RemoveFeatureActionPtr LIBCALL RemoveFeatureActionNew PROTO (( void ));
+NLM_EXTERN RemoveFeatureActionPtr LIBCALL RemoveFeatureActionAsnRead PROTO (( AsnIoPtr, AsnTypePtr));
+NLM_EXTERN Boolean LIBCALL RemoveFeatureActionAsnWrite PROTO (( RemoveFeatureActionPtr , AsnIoPtr, AsnTypePtr));
+
+/* following #defines are for enumerated type, not used by object loaders */
+#define Feature_location_strand_from_any 0
+#define Feature_location_strand_from_plus 1
+#define Feature_location_strand_from_minus 2
+#define Feature_location_strand_from_unknown 3
+#define Feature_location_strand_from_both 4
+
+/* following #defines are for enumerated type, not used by object loaders */
+#define Feature_location_strand_to_plus 1
+#define Feature_location_strand_to_minus 2
+#define Feature_location_strand_to_unknown 3
+#define Feature_location_strand_to_both 4
+#define Feature_location_strand_to_reverse 5
+
+
+
+/**************************************************
+*
+* EditLocationStrand
+*
+**************************************************/
+typedef struct struct_Edit_location_strand {
+ Uint2 strand_from;
+ Uint2 strand_to;
+} EditLocationStrand, PNTR EditLocationStrandPtr;
+
+
+NLM_EXTERN EditLocationStrandPtr LIBCALL EditLocationStrandFree PROTO ((EditLocationStrandPtr ));
+NLM_EXTERN EditLocationStrandPtr LIBCALL EditLocationStrandNew PROTO (( void ));
+NLM_EXTERN EditLocationStrandPtr LIBCALL EditLocationStrandAsnRead PROTO (( AsnIoPtr, AsnTypePtr));
+NLM_EXTERN Boolean LIBCALL EditLocationStrandAsnWrite PROTO (( EditLocationStrandPtr , AsnIoPtr, AsnTypePtr));
+
+/* following #defines are for enumerated type, not used by object loaders */
+#define Partial_5_set_constraint_all 0
+#define Partial_5_set_constraint_at_end 1
+#define Partial_5_set_constraint_bad_start 2
+#define Partial_5_set_constraint_frame_not_one 3
+
+
+
+/**************************************************
+*
+* Partial5SetAction
+*
+**************************************************/
+typedef struct struct_Partial_5_set_action {
+ Uint2 constraint;
+ Uint1 extend;
+} Partial5SetAction, PNTR Partial5SetActionPtr;
+
+
+NLM_EXTERN Partial5SetActionPtr LIBCALL Partial5SetActionFree PROTO ((Partial5SetActionPtr ));
+NLM_EXTERN Partial5SetActionPtr LIBCALL Partial5SetActionNew PROTO (( void ));
+NLM_EXTERN Partial5SetActionPtr LIBCALL Partial5SetActionAsnRead PROTO (( AsnIoPtr, AsnTypePtr));
+NLM_EXTERN Boolean LIBCALL Partial5SetActionAsnWrite PROTO (( Partial5SetActionPtr , AsnIoPtr, AsnTypePtr));
+
+/* following #defines are for enumerated type, not used by object loaders */
+#define Partial_5_clear_constraint_all 0
+#define Partial_5_clear_constraint_not_at_end 1
+#define Partial_5_clear_constraint_good_start 2
+
+/* following #defines are for enumerated type, not used by object loaders */
+#define Partial_3_set_constraint_all 0
+#define Partial_3_set_constraint_at_end 1
+#define Partial_3_set_constraint_bad_end 2
+
+
+
+/**************************************************
+*
+* Partial3SetAction
+*
+**************************************************/
+typedef struct struct_Partial_3_set_action {
+ Uint2 constraint;
+ Uint1 extend;
+} Partial3SetAction, PNTR Partial3SetActionPtr;
+
+
+NLM_EXTERN Partial3SetActionPtr LIBCALL Partial3SetActionFree PROTO ((Partial3SetActionPtr ));
+NLM_EXTERN Partial3SetActionPtr LIBCALL Partial3SetActionNew PROTO (( void ));
+NLM_EXTERN Partial3SetActionPtr LIBCALL Partial3SetActionAsnRead PROTO (( AsnIoPtr, AsnTypePtr));
+NLM_EXTERN Boolean LIBCALL Partial3SetActionAsnWrite PROTO (( Partial3SetActionPtr , AsnIoPtr, AsnTypePtr));
+
+/* following #defines are for enumerated type, not used by object loaders */
+#define Partial_3_clear_constraint_all 0
+#define Partial_3_clear_constraint_not_at_end 1
+#define Partial_3_clear_constraint_good_end 2
+
+/* following #defines are for enumerated type, not used by object loaders */
+#define Convert_location_type_join 1
+#define Convert_location_type_order 2
+#define Convert_location_type_merge 3
+
+typedef ValNodePtr LocationEditTypePtr;
+typedef ValNode LocationEditType;
+#define LocationEditType_strand 1
+#define LocationEditType_set_5_partial 2
+#define LocationEditType_clear_5_partial 3
+#define LocationEditType_set_3_partial 4
+#define LocationEditType_clear_3_partial 5
+#define LocationEditType_convert 6
+
+
+NLM_EXTERN LocationEditTypePtr LIBCALL LocationEditTypeFree PROTO ((LocationEditTypePtr ));
+NLM_EXTERN LocationEditTypePtr LIBCALL LocationEditTypeAsnRead PROTO (( AsnIoPtr, AsnTypePtr));
+NLM_EXTERN Boolean LIBCALL LocationEditTypeAsnWrite PROTO (( LocationEditTypePtr , AsnIoPtr, AsnTypePtr));
+
+
+
+/**************************************************
+*
+* EditFeatureLocationAction
+*
+**************************************************/
+typedef struct struct_Edit_feature_location_action {
+ Uint2 type;
+ ValNodePtr action;
+ ValNodePtr constraint;
+} EditFeatureLocationAction, PNTR EditFeatureLocationActionPtr;
+
+
+NLM_EXTERN EditFeatureLocationActionPtr LIBCALL EditFeatureLocationActionFree PROTO ((EditFeatureLocationActionPtr ));
+NLM_EXTERN EditFeatureLocationActionPtr LIBCALL EditFeatureLocationActionNew PROTO (( void ));
+NLM_EXTERN EditFeatureLocationActionPtr LIBCALL EditFeatureLocationActionAsnRead PROTO (( AsnIoPtr, AsnTypePtr));
+NLM_EXTERN Boolean LIBCALL EditFeatureLocationActionAsnWrite PROTO (( EditFeatureLocationActionPtr , AsnIoPtr, AsnTypePtr));
+
+typedef ValNodePtr MacroActionChoicePtr;
+typedef ValNode MacroActionChoice;
+#define MacroActionChoice_aecr 1
+#define MacroActionChoice_parse 2
+#define MacroActionChoice_add_feature 3
+#define MacroActionChoice_remove_feature 4
+#define MacroActionChoice_edit_location 5
+
+
+NLM_EXTERN MacroActionChoicePtr LIBCALL MacroActionChoiceFree PROTO ((MacroActionChoicePtr ));
+NLM_EXTERN MacroActionChoicePtr LIBCALL MacroActionChoiceAsnRead PROTO (( AsnIoPtr, AsnTypePtr));
+NLM_EXTERN Boolean LIBCALL MacroActionChoiceAsnWrite PROTO (( MacroActionChoicePtr , AsnIoPtr, AsnTypePtr));
+
+#ifdef __cplusplus
+/* { */ }
+#endif
+
+#endif /* _objmacro_ */
+
+#undef NLM_EXTERN
+#ifdef NLM_EXPORT
+#define NLM_EXTERN NLM_EXPORT
+#else
+#define NLM_EXTERN
+#endif
+
diff --git a/object/objpubd.h b/object/objpubd.h
index 0c73e100..05e0ef02 100644
--- a/object/objpubd.h
+++ b/object/objpubd.h
@@ -29,7 +29,7 @@
*
* Version Creation Date: 4/1/91
*
-* $Revision: 6.11 $
+* $Revision: 6.12 $
*
* File Description: Object manager interface for type Pubdesc from
* NCBI-Sequence. This is separate to avoid typedef
@@ -45,6 +45,9 @@
* ------- ---------- -----------------------------------------------------
*
* $Log: objpubd.h,v $
+* Revision 6.12 2007/12/04 17:50:55 kans
+* added MI_TECH_tsa
+*
* Revision 6.11 2005/12/29 13:46:18 bollin
* added PubdescContentMatch function
*
@@ -256,6 +259,7 @@ typedef struct molinfo {
#define MI_TECH_wgs 20 /* Whole Genome Shotgun */
#define MI_TECH_barcode 21 /* Barcode of Life Project */
#define MI_TECH_composite_wgs_htgs 22 /* Assembly/Scaffold composite of techniques */
+#define MI_TECH_tsa 23 /* Transcriptome Shotgun Assembly */
#define MI_TECH_other 255 /* doesnt' fit anything */
NLM_EXTERN MolInfoPtr LIBCALL MolInfoNew PROTO((void));
diff --git a/object/objseq.c b/object/objseq.c
index 282dfc37..6ed3b04d 100644
--- a/object/objseq.c
+++ b/object/objseq.c
@@ -29,7 +29,7 @@
*
* Version Creation Date: 4/1/91
*
-* $Revision: 6.29 $
+* $Revision: 6.30 $
*
* File Description: Object manager for module NCBI-Seq
*
@@ -60,6 +60,7 @@ static char *this_file = __FILE__;
#include <objgbseq.h>
#include <objinsdseq.h>
#include <objtseq.h>
+#include <objtable.h>
static Boolean SeqDescrAsnWriteExtra (ValNodePtr anp, AsnIoPtr aip, AsnTypePtr orig,
Boolean anp_not_null);
@@ -3115,6 +3116,7 @@ NLM_EXTERN SeqAnnotPtr LIBCALL SeqAnnotFree (SeqAnnotPtr sap)
SeqGraphPtr sgp, sgpnext;
SeqIdPtr sip;
SeqLocPtr slp;
+ SeqTablePtr stp;
if (sap == NULL)
return sap;
@@ -3161,6 +3163,10 @@ NLM_EXTERN SeqAnnotPtr LIBCALL SeqAnnotFree (SeqAnnotPtr sap)
slp = (SeqLocPtr)sap->data;
SeqLocSetFree(slp);
break;
+ case 6: /* SeqTable */
+ stp = (SeqTablePtr)sap->data;
+ SeqTableFree(stp);
+ break;
}
return (SeqAnnotPtr)MemFree(sap);
@@ -3269,6 +3275,9 @@ static Boolean SeqAnnotAsnWriteExtra (SeqAnnotPtr sap, AsnIoPtr aip, AsnTypePtr
case 5:
if (! SeqLocSetAsnWrite((SeqLocPtr)sap->data, aip, SEQ_ANNOT_data_locs, SEQ_ANNOT_data_locs_E)) goto erret;
break;
+ case 6:
+ if (! SeqTableAsnWrite((SeqTablePtr)sap->data, aip, SEQ_ANNOT_data_seq_table)) goto erret;
+ break;
}
if (! AsnCloseStruct(aip, atp, (Pointer)sap)) goto erret;
@@ -3385,6 +3394,11 @@ NLM_EXTERN SeqAnnotPtr LIBCALL SeqAnnotAsnRead (AsnIoPtr aip, AsnTypePtr orig)
sap->type = 3;
}
}
+ else if (atp == SEQ_ANNOT_data_seq_table)
+ {
+ sap->type = 6;
+ sap->data = (Pointer) SeqTableAsnRead(aip, atp);
+ }
atp = AsnReadId(aip, amp, atp); if (atp == NULL) goto erret; /* end struct */
if (AsnReadVal(aip, atp, &av) <= 0) goto erret;
diff --git a/object/objtable.c b/object/objtable.c
new file mode 100644
index 00000000..38162741
--- /dev/null
+++ b/object/objtable.c
@@ -0,0 +1,1633 @@
+#include <asn.h>
+
+#define NLM_GENERATED_CODE_PROTO
+
+#include <objtable.h>
+
+static Boolean loaded = FALSE;
+
+#include <asntable.h>
+#include <objloc.h>
+
+#ifndef NLM_EXTERN_LOADS
+#define NLM_EXTERN_LOADS {}
+#endif
+
+NLM_EXTERN Boolean LIBCALL
+objtableAsnLoad(void)
+{
+
+ if ( ! loaded) {
+ NLM_EXTERN_LOADS
+
+ if ( ! AsnLoad ())
+ return FALSE;
+ loaded = TRUE;
+ }
+
+ return TRUE;
+}
+
+
+
+/**************************************************
+* Generated object loaders for Module NCBI-SeqTable
+* Generated using ASNCODE Revision: 6.16 at Dec 12, 2007 3:30 PM
+*
+**************************************************/
+
+
+/**************************************************
+*
+* SeqTableColumnInfoNew()
+*
+**************************************************/
+NLM_EXTERN
+SeqTableColumnInfoPtr LIBCALL
+SeqTableColumnInfoNew(void)
+{
+ SeqTableColumnInfoPtr ptr = MemNew((size_t) sizeof(SeqTableColumnInfo));
+
+ return ptr;
+
+}
+
+
+/**************************************************
+*
+* SeqTableColumnInfoFree()
+*
+**************************************************/
+NLM_EXTERN
+SeqTableColumnInfoPtr LIBCALL
+SeqTableColumnInfoFree(SeqTableColumnInfoPtr ptr)
+{
+
+ if(ptr == NULL) {
+ return NULL;
+ }
+ MemFree(ptr -> title);
+ MemFree(ptr -> field_name);
+ return MemFree(ptr);
+}
+
+
+/**************************************************
+*
+* SeqTableColumnInfoAsnRead()
+*
+**************************************************/
+NLM_EXTERN
+SeqTableColumnInfoPtr LIBCALL
+SeqTableColumnInfoAsnRead(AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ Boolean isError = FALSE;
+ AsnReadFunc func;
+ SeqTableColumnInfoPtr ptr;
+
+ if (! loaded)
+ {
+ if (! objtableAsnLoad()) {
+ return NULL;
+ }
+ }
+
+ if (aip == NULL) {
+ return NULL;
+ }
+
+ if (orig == NULL) { /* SeqTableColumnInfo ::= (self contained) */
+ atp = AsnReadId(aip, amp, SEQTABLE_COLUMN_INFO);
+ } else {
+ atp = AsnLinkType(orig, SEQTABLE_COLUMN_INFO);
+ }
+ /* link in local tree */
+ if (atp == NULL) {
+ return NULL;
+ }
+
+ ptr = SeqTableColumnInfoNew();
+ if (ptr == NULL) {
+ goto erret;
+ }
+ if (AsnReadVal(aip, atp, &av) <= 0) { /* read the start struct */
+ goto erret;
+ }
+
+ atp = AsnReadId(aip,amp, atp);
+ func = NULL;
+
+ if (atp == SEQTABLE_COLUMN_INFO_title) {
+ if ( AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ ptr -> title = av.ptrvalue;
+ atp = AsnReadId(aip,amp, atp);
+ }
+ if (atp == SEQTABLE_COLUMN_INFO_field_id) {
+ if ( AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ ptr -> field_id = av.intvalue;
+ ptr -> OBbits__ |= 1<<0;
+ atp = AsnReadId(aip,amp, atp);
+ }
+ if (atp == SEQTABLE_COLUMN_INFO_field_name) {
+ if ( AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ ptr -> field_name = av.ptrvalue;
+ atp = AsnReadId(aip,amp, atp);
+ }
+
+ if (AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ /* end struct */
+
+ret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return ptr;
+
+erret:
+ aip -> io_failure = TRUE;
+ ptr = SeqTableColumnInfoFree(ptr);
+ goto ret;
+}
+
+
+
+/**************************************************
+*
+* SeqTableColumnInfoAsnWrite()
+*
+**************************************************/
+NLM_EXTERN Boolean LIBCALL
+SeqTableColumnInfoAsnWrite(SeqTableColumnInfoPtr ptr, AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ Boolean retval = FALSE;
+
+ if (! loaded)
+ {
+ if (! objtableAsnLoad()) {
+ return FALSE;
+ }
+ }
+
+ if (aip == NULL) {
+ return FALSE;
+ }
+
+ atp = AsnLinkType(orig, SEQTABLE_COLUMN_INFO); /* link local tree */
+ if (atp == NULL) {
+ return FALSE;
+ }
+
+ if (ptr == NULL) { AsnNullValueMsg(aip, atp); goto erret; }
+ if (! AsnOpenStruct(aip, atp, (Pointer) ptr)) {
+ goto erret;
+ }
+
+ if (ptr -> title != NULL) {
+ av.ptrvalue = ptr -> title;
+ retval = AsnWrite(aip, SEQTABLE_COLUMN_INFO_title, &av);
+ }
+ if (ptr -> field_id || (ptr -> OBbits__ & (1<<0) )){ av.intvalue = ptr -> field_id;
+ retval = AsnWrite(aip, SEQTABLE_COLUMN_INFO_field_id, &av);
+ }
+ if (ptr -> field_name != NULL) {
+ av.ptrvalue = ptr -> field_name;
+ retval = AsnWrite(aip, SEQTABLE_COLUMN_INFO_field_name, &av);
+ }
+ if (! AsnCloseStruct(aip, atp, (Pointer)ptr)) {
+ goto erret;
+ }
+ retval = TRUE;
+
+erret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return retval;
+}
+
+
+
+/**************************************************
+*
+* SeqTableColumnNew()
+*
+**************************************************/
+NLM_EXTERN
+SeqTableColumnPtr LIBCALL
+SeqTableColumnNew(void)
+{
+ SeqTableColumnPtr ptr = MemNew((size_t) sizeof(SeqTableColumn));
+
+ return ptr;
+
+}
+
+
+/**************************************************
+*
+* SeqTableColumnFree()
+*
+**************************************************/
+NLM_EXTERN
+SeqTableColumnPtr LIBCALL
+SeqTableColumnFree(SeqTableColumnPtr ptr)
+{
+
+ if(ptr == NULL) {
+ return NULL;
+ }
+ SeqTableColumnInfoFree(ptr -> header);
+ SeqTableMultiDataFree(ptr -> data);
+ SeqTableSparseIndexFree(ptr -> sparse);
+ SeqTableSingleDataFree(ptr -> default__);
+ SeqTableSingleDataFree(ptr -> sparse_other);
+ return MemFree(ptr);
+}
+
+
+/**************************************************
+*
+* SeqTableColumnAsnRead()
+*
+**************************************************/
+NLM_EXTERN
+SeqTableColumnPtr LIBCALL
+SeqTableColumnAsnRead(AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ Boolean isError = FALSE;
+ AsnReadFunc func;
+ SeqTableColumnPtr ptr;
+
+ if (! loaded)
+ {
+ if (! objtableAsnLoad()) {
+ return NULL;
+ }
+ }
+
+ if (aip == NULL) {
+ return NULL;
+ }
+
+ if (orig == NULL) { /* SeqTableColumn ::= (self contained) */
+ atp = AsnReadId(aip, amp, SEQTABLE_COLUMN);
+ } else {
+ atp = AsnLinkType(orig, SEQTABLE_COLUMN);
+ }
+ /* link in local tree */
+ if (atp == NULL) {
+ return NULL;
+ }
+
+ ptr = SeqTableColumnNew();
+ if (ptr == NULL) {
+ goto erret;
+ }
+ if (AsnReadVal(aip, atp, &av) <= 0) { /* read the start struct */
+ goto erret;
+ }
+
+ atp = AsnReadId(aip,amp, atp);
+ func = NULL;
+
+ if (atp == SEQTABLE_COLUMN_header) {
+ ptr -> header = SeqTableColumnInfoAsnRead(aip, atp);
+ if (aip -> io_failure) {
+ goto erret;
+ }
+ atp = AsnReadId(aip,amp, atp);
+ }
+ if (atp == SEQTABLE_COLUMN_data) {
+ ptr -> data = SeqTableMultiDataAsnRead(aip, atp);
+ if (aip -> io_failure) {
+ goto erret;
+ }
+ atp = AsnReadId(aip,amp, atp);
+ }
+ if (atp == SEQTABLE_COLUMN_sparse) {
+ ptr -> sparse = SeqTableSparseIndexAsnRead(aip, atp);
+ if (aip -> io_failure) {
+ goto erret;
+ }
+ atp = AsnReadId(aip,amp, atp);
+ }
+ if (atp == SEQTABLE_COLUMN_default) {
+ ptr -> default__ = SeqTableSingleDataAsnRead(aip, atp);
+ if (aip -> io_failure) {
+ goto erret;
+ }
+ atp = AsnReadId(aip,amp, atp);
+ }
+ if (atp == SEQTABLE_COLUMN_sparse_other) {
+ ptr -> sparse_other = SeqTableSingleDataAsnRead(aip, atp);
+ if (aip -> io_failure) {
+ goto erret;
+ }
+ atp = AsnReadId(aip,amp, atp);
+ }
+
+ if (AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ /* end struct */
+
+ret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return ptr;
+
+erret:
+ aip -> io_failure = TRUE;
+ ptr = SeqTableColumnFree(ptr);
+ goto ret;
+}
+
+
+
+/**************************************************
+*
+* SeqTableColumnAsnWrite()
+*
+**************************************************/
+NLM_EXTERN Boolean LIBCALL
+SeqTableColumnAsnWrite(SeqTableColumnPtr ptr, AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ Boolean retval = FALSE;
+
+ if (! loaded)
+ {
+ if (! objtableAsnLoad()) {
+ return FALSE;
+ }
+ }
+
+ if (aip == NULL) {
+ return FALSE;
+ }
+
+ atp = AsnLinkType(orig, SEQTABLE_COLUMN); /* link local tree */
+ if (atp == NULL) {
+ return FALSE;
+ }
+
+ if (ptr == NULL) { AsnNullValueMsg(aip, atp); goto erret; }
+ if (! AsnOpenStruct(aip, atp, (Pointer) ptr)) {
+ goto erret;
+ }
+
+ if (ptr -> header != NULL) {
+ if ( ! SeqTableColumnInfoAsnWrite(ptr -> header, aip, SEQTABLE_COLUMN_header)) {
+ goto erret;
+ }
+ }
+ if (ptr -> data != NULL) {
+ if ( ! SeqTableMultiDataAsnWrite(ptr -> data, aip, SEQTABLE_COLUMN_data)) {
+ goto erret;
+ }
+ }
+ if (ptr -> sparse != NULL) {
+ if ( ! SeqTableSparseIndexAsnWrite(ptr -> sparse, aip, SEQTABLE_COLUMN_sparse)) {
+ goto erret;
+ }
+ }
+ if (ptr -> default__ != NULL) {
+ if ( ! SeqTableSingleDataAsnWrite(ptr -> default__, aip, SEQTABLE_COLUMN_default)) {
+ goto erret;
+ }
+ }
+ if (ptr -> sparse_other != NULL) {
+ if ( ! SeqTableSingleDataAsnWrite(ptr -> sparse_other, aip, SEQTABLE_COLUMN_sparse_other)) {
+ goto erret;
+ }
+ }
+ if (! AsnCloseStruct(aip, atp, (Pointer)ptr)) {
+ goto erret;
+ }
+ retval = TRUE;
+
+erret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return retval;
+}
+
+
+
+/**************************************************
+*
+* SeqTableNew()
+*
+**************************************************/
+NLM_EXTERN
+SeqTablePtr LIBCALL
+SeqTableNew(void)
+{
+ SeqTablePtr ptr = MemNew((size_t) sizeof(SeqTable));
+
+ return ptr;
+
+}
+
+
+/**************************************************
+*
+* SeqTableFree()
+*
+**************************************************/
+NLM_EXTERN
+SeqTablePtr LIBCALL
+SeqTableFree(SeqTablePtr ptr)
+{
+
+ if(ptr == NULL) {
+ return NULL;
+ }
+ AsnGenericUserSeqOfFree(ptr -> columns, (AsnOptFreeFunc) SeqTableColumnFree);
+ return MemFree(ptr);
+}
+
+
+/**************************************************
+*
+* SeqTableAsnRead()
+*
+**************************************************/
+NLM_EXTERN
+SeqTablePtr LIBCALL
+SeqTableAsnRead(AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ Boolean isError = FALSE;
+ AsnReadFunc func;
+ SeqTablePtr ptr;
+
+ if (! loaded)
+ {
+ if (! objtableAsnLoad()) {
+ return NULL;
+ }
+ }
+
+ if (aip == NULL) {
+ return NULL;
+ }
+
+ if (orig == NULL) { /* SeqTable ::= (self contained) */
+ atp = AsnReadId(aip, amp, SEQ_TABLE);
+ } else {
+ atp = AsnLinkType(orig, SEQ_TABLE);
+ }
+ /* link in local tree */
+ if (atp == NULL) {
+ return NULL;
+ }
+
+ ptr = SeqTableNew();
+ if (ptr == NULL) {
+ goto erret;
+ }
+ if (AsnReadVal(aip, atp, &av) <= 0) { /* read the start struct */
+ goto erret;
+ }
+
+ atp = AsnReadId(aip,amp, atp);
+ func = NULL;
+
+ if (atp == SEQ_TABLE_feat_type) {
+ if ( AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ ptr -> feat_type = av.intvalue;
+ atp = AsnReadId(aip,amp, atp);
+ }
+ if (atp == SEQ_TABLE_feat_subtype) {
+ if ( AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ ptr -> feat_subtype = av.intvalue;
+ ptr -> OBbits__ |= 1<<0;
+ atp = AsnReadId(aip,amp, atp);
+ }
+ if (atp == SEQ_TABLE_num_rows) {
+ if ( AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ ptr -> num_rows = av.intvalue;
+ atp = AsnReadId(aip,amp, atp);
+ }
+ if (atp == SEQ_TABLE_columns) {
+ ptr -> columns = AsnGenericUserSeqOfAsnRead(aip, amp, atp, &isError, (AsnReadFunc) SeqTableColumnAsnRead, (AsnOptFreeFunc) SeqTableColumnFree);
+ if (isError && ptr -> columns == NULL) {
+ goto erret;
+ }
+ atp = AsnReadId(aip,amp, atp);
+ }
+
+ if (AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ /* end struct */
+
+ret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return ptr;
+
+erret:
+ aip -> io_failure = TRUE;
+ ptr = SeqTableFree(ptr);
+ goto ret;
+}
+
+
+
+/**************************************************
+*
+* SeqTableAsnWrite()
+*
+**************************************************/
+NLM_EXTERN Boolean LIBCALL
+SeqTableAsnWrite(SeqTablePtr ptr, AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ Boolean retval = FALSE;
+
+ if (! loaded)
+ {
+ if (! objtableAsnLoad()) {
+ return FALSE;
+ }
+ }
+
+ if (aip == NULL) {
+ return FALSE;
+ }
+
+ atp = AsnLinkType(orig, SEQ_TABLE); /* link local tree */
+ if (atp == NULL) {
+ return FALSE;
+ }
+
+ if (ptr == NULL) { AsnNullValueMsg(aip, atp); goto erret; }
+ if (! AsnOpenStruct(aip, atp, (Pointer) ptr)) {
+ goto erret;
+ }
+
+ av.intvalue = ptr -> feat_type;
+ retval = AsnWrite(aip, SEQ_TABLE_feat_type, &av);
+ if (ptr -> feat_subtype || (ptr -> OBbits__ & (1<<0) )){ av.intvalue = ptr -> feat_subtype;
+ retval = AsnWrite(aip, SEQ_TABLE_feat_subtype, &av);
+ }
+ av.intvalue = ptr -> num_rows;
+ retval = AsnWrite(aip, SEQ_TABLE_num_rows, &av);
+ AsnGenericUserSeqOfAsnWrite(ptr -> columns, (AsnWriteFunc) SeqTableColumnAsnWrite, aip, SEQ_TABLE_columns, SEQ_TABLE_columns_E);
+ if (! AsnCloseStruct(aip, atp, (Pointer)ptr)) {
+ goto erret;
+ }
+ retval = TRUE;
+
+erret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return retval;
+}
+
+
+
+/**************************************************
+*
+* CommonStringTableNew()
+*
+**************************************************/
+NLM_EXTERN
+CommonStringTablePtr LIBCALL
+CommonStringTableNew(void)
+{
+ CommonStringTablePtr ptr = MemNew((size_t) sizeof(CommonStringTable));
+
+ return ptr;
+
+}
+
+
+/**************************************************
+*
+* CommonStringTableFree()
+*
+**************************************************/
+NLM_EXTERN
+CommonStringTablePtr LIBCALL
+CommonStringTableFree(CommonStringTablePtr ptr)
+{
+
+ if(ptr == NULL) {
+ return NULL;
+ }
+ AsnGenericBaseSeqOfFree(ptr -> strings ,ASNCODE_PTRVAL_SLOT);
+ AsnGenericBaseSeqOfFree(ptr -> indexes ,ASNCODE_INTVAL_SLOT);
+ return MemFree(ptr);
+}
+
+
+/**************************************************
+*
+* CommonStringTableAsnRead()
+*
+**************************************************/
+NLM_EXTERN
+CommonStringTablePtr LIBCALL
+CommonStringTableAsnRead(AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ Boolean isError = FALSE;
+ AsnReadFunc func;
+ CommonStringTablePtr ptr;
+
+ if (! loaded)
+ {
+ if (! objtableAsnLoad()) {
+ return NULL;
+ }
+ }
+
+ if (aip == NULL) {
+ return NULL;
+ }
+
+ if (orig == NULL) { /* CommonStringTable ::= (self contained) */
+ atp = AsnReadId(aip, amp, COMMONSTRING_TABLE);
+ } else {
+ atp = AsnLinkType(orig, COMMONSTRING_TABLE);
+ }
+ /* link in local tree */
+ if (atp == NULL) {
+ return NULL;
+ }
+
+ ptr = CommonStringTableNew();
+ if (ptr == NULL) {
+ goto erret;
+ }
+ if (AsnReadVal(aip, atp, &av) <= 0) { /* read the start struct */
+ goto erret;
+ }
+
+ atp = AsnReadId(aip,amp, atp);
+ func = NULL;
+
+ if (atp == COMMONSTRING_TABLE_strings) {
+ ptr -> strings = AsnGenericBaseSeqOfAsnRead(aip, amp, atp, ASNCODE_PTRVAL_SLOT, &isError);
+ if (isError && ptr -> strings == NULL) {
+ goto erret;
+ }
+ atp = AsnReadId(aip,amp, atp);
+ }
+ if (atp == COMMONSTRING_TABLE_indexes) {
+ ptr -> indexes = AsnGenericBaseSeqOfAsnRead(aip, amp, atp, ASNCODE_INTVAL_SLOT, &isError);
+ if (isError && ptr -> indexes == NULL) {
+ goto erret;
+ }
+ atp = AsnReadId(aip,amp, atp);
+ }
+
+ if (AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ /* end struct */
+
+ret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return ptr;
+
+erret:
+ aip -> io_failure = TRUE;
+ ptr = CommonStringTableFree(ptr);
+ goto ret;
+}
+
+
+
+/**************************************************
+*
+* CommonStringTableAsnWrite()
+*
+**************************************************/
+NLM_EXTERN Boolean LIBCALL
+CommonStringTableAsnWrite(CommonStringTablePtr ptr, AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ Boolean retval = FALSE;
+
+ if (! loaded)
+ {
+ if (! objtableAsnLoad()) {
+ return FALSE;
+ }
+ }
+
+ if (aip == NULL) {
+ return FALSE;
+ }
+
+ atp = AsnLinkType(orig, COMMONSTRING_TABLE); /* link local tree */
+ if (atp == NULL) {
+ return FALSE;
+ }
+
+ if (ptr == NULL) { AsnNullValueMsg(aip, atp); goto erret; }
+ if (! AsnOpenStruct(aip, atp, (Pointer) ptr)) {
+ goto erret;
+ }
+
+ retval = AsnGenericBaseSeqOfAsnWrite(ptr -> strings ,ASNCODE_PTRVAL_SLOT, aip, COMMONSTRING_TABLE_strings, COMMONSTRING_TABLE_strings_E);
+ retval = AsnGenericBaseSeqOfAsnWrite(ptr -> indexes ,ASNCODE_INTVAL_SLOT, aip, COMMONSTRING_TABLE_indexes, COMMONSTRING_TABLE_indexes_E);
+ if (! AsnCloseStruct(aip, atp, (Pointer)ptr)) {
+ goto erret;
+ }
+ retval = TRUE;
+
+erret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return retval;
+}
+
+
+
+/**************************************************
+*
+* CommonBytesTableNew()
+*
+**************************************************/
+NLM_EXTERN
+CommonBytesTablePtr LIBCALL
+CommonBytesTableNew(void)
+{
+ CommonBytesTablePtr ptr = MemNew((size_t) sizeof(CommonBytesTable));
+
+ return ptr;
+
+}
+
+
+/**************************************************
+*
+* CommonBytesTableFree()
+*
+**************************************************/
+NLM_EXTERN
+CommonBytesTablePtr LIBCALL
+CommonBytesTableFree(CommonBytesTablePtr ptr)
+{
+
+ if(ptr == NULL) {
+ return NULL;
+ }
+ AsnGenericBaseSeqOfFree(ptr -> bytes ,ASNCODE_BYTEVAL_SLOT);
+ AsnGenericBaseSeqOfFree(ptr -> indexes ,ASNCODE_INTVAL_SLOT);
+ return MemFree(ptr);
+}
+
+
+/**************************************************
+*
+* CommonBytesTableAsnRead()
+*
+**************************************************/
+NLM_EXTERN
+CommonBytesTablePtr LIBCALL
+CommonBytesTableAsnRead(AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ Boolean isError = FALSE;
+ AsnReadFunc func;
+ CommonBytesTablePtr ptr;
+
+ if (! loaded)
+ {
+ if (! objtableAsnLoad()) {
+ return NULL;
+ }
+ }
+
+ if (aip == NULL) {
+ return NULL;
+ }
+
+ if (orig == NULL) { /* CommonBytesTable ::= (self contained) */
+ atp = AsnReadId(aip, amp, COMMONBYTES_TABLE);
+ } else {
+ atp = AsnLinkType(orig, COMMONBYTES_TABLE);
+ }
+ /* link in local tree */
+ if (atp == NULL) {
+ return NULL;
+ }
+
+ ptr = CommonBytesTableNew();
+ if (ptr == NULL) {
+ goto erret;
+ }
+ if (AsnReadVal(aip, atp, &av) <= 0) { /* read the start struct */
+ goto erret;
+ }
+
+ atp = AsnReadId(aip,amp, atp);
+ func = NULL;
+
+ if (atp == COMMONBYTES_TABLE_bytes) {
+ ptr -> bytes = AsnGenericBaseSeqOfAsnRead(aip, amp, atp, ASNCODE_BYTEVAL_SLOT, &isError);
+ if (isError && ptr -> bytes == NULL) {
+ goto erret;
+ }
+ atp = AsnReadId(aip,amp, atp);
+ }
+ if (atp == COMMONBYTES_TABLE_indexes) {
+ ptr -> indexes = AsnGenericBaseSeqOfAsnRead(aip, amp, atp, ASNCODE_INTVAL_SLOT, &isError);
+ if (isError && ptr -> indexes == NULL) {
+ goto erret;
+ }
+ atp = AsnReadId(aip,amp, atp);
+ }
+
+ if (AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ /* end struct */
+
+ret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return ptr;
+
+erret:
+ aip -> io_failure = TRUE;
+ ptr = CommonBytesTableFree(ptr);
+ goto ret;
+}
+
+
+
+/**************************************************
+*
+* CommonBytesTableAsnWrite()
+*
+**************************************************/
+NLM_EXTERN Boolean LIBCALL
+CommonBytesTableAsnWrite(CommonBytesTablePtr ptr, AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ Boolean retval = FALSE;
+
+ if (! loaded)
+ {
+ if (! objtableAsnLoad()) {
+ return FALSE;
+ }
+ }
+
+ if (aip == NULL) {
+ return FALSE;
+ }
+
+ atp = AsnLinkType(orig, COMMONBYTES_TABLE); /* link local tree */
+ if (atp == NULL) {
+ return FALSE;
+ }
+
+ if (ptr == NULL) { AsnNullValueMsg(aip, atp); goto erret; }
+ if (! AsnOpenStruct(aip, atp, (Pointer) ptr)) {
+ goto erret;
+ }
+
+ retval = AsnGenericBaseSeqOfAsnWrite(ptr -> bytes ,ASNCODE_BYTEVAL_SLOT, aip, COMMONBYTES_TABLE_bytes, COMMONBYTES_TABLE_bytes_E);
+ retval = AsnGenericBaseSeqOfAsnWrite(ptr -> indexes ,ASNCODE_INTVAL_SLOT, aip, COMMONBYTES_TABLE_indexes, COMMONBYTES_TABLE_indexes_E);
+ if (! AsnCloseStruct(aip, atp, (Pointer)ptr)) {
+ goto erret;
+ }
+ retval = TRUE;
+
+erret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return retval;
+}
+
+
+
+/**************************************************
+*
+* SeqTableMultiDataFree()
+*
+**************************************************/
+NLM_EXTERN
+SeqTableMultiDataPtr LIBCALL
+SeqTableMultiDataFree(ValNodePtr anp)
+{
+ Pointer pnt;
+
+ if (anp == NULL) {
+ return NULL;
+ }
+
+ pnt = anp->data.ptrvalue;
+ switch (anp->choice)
+ {
+ default:
+ break;
+ case SeqTableMultiData_int__:
+ AsnGenericBaseSeqOfFree((ValNodePtr) pnt,ASNCODE_INTVAL_SLOT);
+ break;
+ case SeqTableMultiData_real:
+ AsnGenericBaseSeqOfFree((ValNodePtr) pnt,ASNCODE_REALVAL_SLOT);
+ break;
+ case SeqTableMultiData_string:
+ AsnGenericBaseSeqOfFree((ValNodePtr) pnt,ASNCODE_PTRVAL_SLOT);
+ break;
+ case SeqTableMultiData_bytes:
+ AsnGenericBaseSeqOfFree((ValNodePtr) pnt,ASNCODE_BYTEVAL_SLOT);
+ break;
+ case SeqTableMultiData_common_string:
+ CommonStringTableFree(anp -> data.ptrvalue);
+ break;
+ case SeqTableMultiData_common_bytes:
+ CommonBytesTableFree(anp -> data.ptrvalue);
+ break;
+ case SeqTableMultiData_bit:
+ BSFree(anp -> data.ptrvalue);
+ break;
+ case SeqTableMultiData_loc:
+ AsnGenericChoiceSeqOfFree((Pointer) pnt, (AsnOptFreeFunc) SeqLocFree);
+ break;
+ case SeqTableMultiData_id:
+ AsnGenericChoiceSeqOfFree((Pointer) pnt, (AsnOptFreeFunc) SeqIdFree);
+ break;
+ case SeqTableMultiData_interval:
+ AsnGenericUserSeqOfFree((Pointer) pnt, (AsnOptFreeFunc) SeqIntFree);
+ break;
+ }
+ return MemFree(anp);
+}
+
+
+/**************************************************
+*
+* SeqTableMultiDataAsnRead()
+*
+**************************************************/
+NLM_EXTERN
+SeqTableMultiDataPtr LIBCALL
+SeqTableMultiDataAsnRead(AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ ValNodePtr anp;
+ Uint1 choice;
+ Boolean isError = FALSE;
+ Boolean nullIsError = FALSE;
+ AsnReadFunc func;
+
+ if (! loaded)
+ {
+ if (! objtableAsnLoad()) {
+ return NULL;
+ }
+ }
+
+ if (aip == NULL) {
+ return NULL;
+ }
+
+ if (orig == NULL) { /* SeqTableMultiData ::= (self contained) */
+ atp = AsnReadId(aip, amp, SEQTABLE_MULTI_DATA);
+ } else {
+ atp = AsnLinkType(orig, SEQTABLE_MULTI_DATA); /* link in local tree */
+ }
+ if (atp == NULL) {
+ return NULL;
+ }
+
+ anp = ValNodeNew(NULL);
+ if (anp == NULL) {
+ goto erret;
+ }
+ if (AsnReadVal(aip, atp, &av) <= 0) { /* read the CHOICE or OpenStruct value (nothing) */
+ goto erret;
+ }
+
+ func = NULL;
+
+ atp = AsnReadId(aip, amp, atp); /* find the choice */
+ if (atp == NULL) {
+ goto erret;
+ }
+ if (atp == SEQTABLE_MULTI_DATA_int) {
+ choice = SeqTableMultiData_int__;
+ anp -> data.ptrvalue =
+ AsnGenericBaseSeqOfAsnRead(aip, amp, atp, ASNCODE_INTVAL_SLOT, &isError);
+ if (isError && anp -> data.ptrvalue == NULL) {
+ goto erret;
+ }
+ }
+ else if (atp == SEQTABLE_MULTI_DATA_real) {
+ choice = SeqTableMultiData_real;
+ anp -> data.ptrvalue =
+ AsnGenericBaseSeqOfAsnRead(aip, amp, atp, ASNCODE_REALVAL_SLOT, &isError);
+ if (isError && anp -> data.ptrvalue == NULL) {
+ goto erret;
+ }
+ }
+ else if (atp == SEQTABLE_MULTI_DATA_string) {
+ choice = SeqTableMultiData_string;
+ anp -> data.ptrvalue =
+ AsnGenericBaseSeqOfAsnRead(aip, amp, atp, ASNCODE_PTRVAL_SLOT, &isError);
+ if (isError && anp -> data.ptrvalue == NULL) {
+ goto erret;
+ }
+ }
+ else if (atp == SEQTABLE_MULTI_DATA_bytes) {
+ choice = SeqTableMultiData_bytes;
+ anp -> data.ptrvalue =
+ AsnGenericBaseSeqOfAsnRead(aip, amp, atp, ASNCODE_BYTEVAL_SLOT, &isError);
+ if (isError && anp -> data.ptrvalue == NULL) {
+ goto erret;
+ }
+ }
+ else if (atp == MULTI_DATA_common_string) {
+ choice = SeqTableMultiData_common_string;
+ func = (AsnReadFunc) CommonStringTableAsnRead;
+ }
+ else if (atp == MULTI_DATA_common_bytes) {
+ choice = SeqTableMultiData_common_bytes;
+ func = (AsnReadFunc) CommonBytesTableAsnRead;
+ }
+ else if (atp == SEQTABLE_MULTI_DATA_bit) {
+ choice = SeqTableMultiData_bit;
+ if (AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ anp->data.ptrvalue = av.ptrvalue;
+ }
+ else if (atp == SEQTABLE_MULTI_DATA_loc) {
+ choice = SeqTableMultiData_loc;
+ anp -> data.ptrvalue =
+ AsnGenericChoiceSeqOfAsnRead(aip, amp, atp, &isError, (AsnReadFunc) SeqLocAsnRead, (AsnOptFreeFunc) SeqLocFree);
+ if (isError && anp -> data.ptrvalue == NULL) {
+ goto erret;
+ }
+ }
+ else if (atp == SEQTABLE_MULTI_DATA_id) {
+ choice = SeqTableMultiData_id;
+ anp -> data.ptrvalue =
+ AsnGenericChoiceSeqOfAsnRead(aip, amp, atp, &isError, (AsnReadFunc) SeqIdAsnRead, (AsnOptFreeFunc) SeqIdFree);
+ if (isError && anp -> data.ptrvalue == NULL) {
+ goto erret;
+ }
+ }
+ else if (atp == SEQTABLE_MULTI_DATA_interval) {
+ choice = SeqTableMultiData_interval;
+ anp -> data.ptrvalue =
+ AsnGenericUserSeqOfAsnRead(aip, amp, atp, &isError, (AsnReadFunc) SeqIntAsnRead, (AsnOptFreeFunc) SeqIntFree);
+ if (isError && anp -> data.ptrvalue == NULL) {
+ goto erret;
+ }
+ }
+ anp->choice = choice;
+ if (func != NULL)
+ {
+ anp->data.ptrvalue = (* func)(aip, atp);
+ if (aip -> io_failure) goto erret;
+
+ if (nullIsError && anp->data.ptrvalue == NULL) {
+ goto erret;
+ }
+ }
+
+ret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return anp;
+
+erret:
+ anp = MemFree(anp);
+ aip -> io_failure = TRUE;
+ goto ret;
+}
+
+
+/**************************************************
+*
+* SeqTableMultiDataAsnWrite()
+*
+**************************************************/
+NLM_EXTERN Boolean LIBCALL
+SeqTableMultiDataAsnWrite(SeqTableMultiDataPtr anp, AsnIoPtr aip, AsnTypePtr orig)
+
+{
+ DataVal av;
+ AsnTypePtr atp, writetype = NULL;
+ Pointer pnt;
+ AsnWriteFunc func = NULL;
+ Boolean retval = FALSE;
+
+ if (! loaded)
+ {
+ if (! objtableAsnLoad())
+ return FALSE;
+ }
+
+ if (aip == NULL)
+ return FALSE;
+
+ atp = AsnLinkType(orig, SEQTABLE_MULTI_DATA); /* link local tree */
+ if (atp == NULL) {
+ return FALSE;
+ }
+
+ if (anp == NULL) { AsnNullValueMsg(aip, atp); goto erret; }
+
+ av.ptrvalue = (Pointer)anp;
+ if (! AsnWriteChoice(aip, atp, (Int2)anp->choice, &av)) {
+ goto erret;
+ }
+
+ pnt = anp->data.ptrvalue;
+ switch (anp->choice)
+ {
+ case SeqTableMultiData_int__:
+ retval = AsnGenericBaseSeqOfAsnWrite((Pointer) pnt,ASNCODE_INTVAL_SLOT, aip, SEQTABLE_MULTI_DATA_int, SEQTABLE_MULTI_DATA_int_E); break;
+ case SeqTableMultiData_real:
+ retval = AsnGenericBaseSeqOfAsnWrite((Pointer) pnt,ASNCODE_REALVAL_SLOT, aip, SEQTABLE_MULTI_DATA_real, SEQTABLE_MULTI_DATA_real_E); break;
+ case SeqTableMultiData_string:
+ retval = AsnGenericBaseSeqOfAsnWrite((Pointer) pnt,ASNCODE_PTRVAL_SLOT, aip, SEQTABLE_MULTI_DATA_string, SEQTABLE_MULTI_DATA_string_E); break;
+ case SeqTableMultiData_bytes:
+ retval = AsnGenericBaseSeqOfAsnWrite((Pointer) pnt,ASNCODE_BYTEVAL_SLOT, aip, SEQTABLE_MULTI_DATA_bytes, SEQTABLE_MULTI_DATA_bytes_E); break;
+ case SeqTableMultiData_common_string:
+ writetype = MULTI_DATA_common_string;
+ func = (AsnWriteFunc) CommonStringTableAsnWrite;
+ break;
+ case SeqTableMultiData_common_bytes:
+ writetype = MULTI_DATA_common_bytes;
+ func = (AsnWriteFunc) CommonBytesTableAsnWrite;
+ break;
+ case SeqTableMultiData_bit:
+ av.ptrvalue = anp->data.ptrvalue;
+ retval = AsnWrite(aip, SEQTABLE_MULTI_DATA_bit, &av);
+ break;
+ case SeqTableMultiData_loc:
+ retval = AsnGenericChoiceSeqOfAsnWrite((Pointer) pnt, (AsnWriteFunc) SeqLocAsnWrite, aip, SEQTABLE_MULTI_DATA_loc, SEQTABLE_MULTI_DATA_loc_E);
+ break;
+ case SeqTableMultiData_id:
+ retval = AsnGenericChoiceSeqOfAsnWrite((Pointer) pnt, (AsnWriteFunc) SeqIdAsnWrite, aip, SEQTABLE_MULTI_DATA_id, SEQTABLE_MULTI_DATA_id_E);
+ break;
+ case SeqTableMultiData_interval:
+ retval = AsnGenericUserSeqOfAsnWrite((Pointer) pnt, (AsnWriteFunc) SeqIntAsnWrite, aip, SEQTABLE_MULTI_DATA_interval, SEQTABLE_MULTI_DATA_interval_E);
+ break;
+ }
+ if (writetype != NULL) {
+ retval = (* func)(pnt, aip, writetype); /* write it out */
+ }
+ if (!retval) {
+ goto erret;
+ }
+ retval = TRUE;
+
+erret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return retval;
+}
+
+
+/**************************************************
+*
+* SeqTableSingleDataFree()
+*
+**************************************************/
+NLM_EXTERN
+SeqTableSingleDataPtr LIBCALL
+SeqTableSingleDataFree(ValNodePtr anp)
+{
+ Pointer pnt;
+
+ if (anp == NULL) {
+ return NULL;
+ }
+
+ pnt = anp->data.ptrvalue;
+ switch (anp->choice)
+ {
+ default:
+ break;
+ case SeqTableSingleData_string:
+ MemFree(anp -> data.ptrvalue);
+ break;
+ case SeqTableSingleData_bytes:
+ BSFree(anp -> data.ptrvalue);
+ break;
+ case SeqTableSingleData_loc:
+ SeqLocFree(anp -> data.ptrvalue);
+ break;
+ case SeqTableSingleData_id:
+ SeqIdFree(anp -> data.ptrvalue);
+ break;
+ case SeqTableSingleData_interval:
+ SeqIntFree(anp -> data.ptrvalue);
+ break;
+ }
+ return MemFree(anp);
+}
+
+
+/**************************************************
+*
+* SeqTableSingleDataAsnRead()
+*
+**************************************************/
+NLM_EXTERN
+SeqTableSingleDataPtr LIBCALL
+SeqTableSingleDataAsnRead(AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ ValNodePtr anp;
+ Uint1 choice;
+ Boolean isError = FALSE;
+ Boolean nullIsError = FALSE;
+ AsnReadFunc func;
+
+ if (! loaded)
+ {
+ if (! objtableAsnLoad()) {
+ return NULL;
+ }
+ }
+
+ if (aip == NULL) {
+ return NULL;
+ }
+
+ if (orig == NULL) { /* SeqTableSingleData ::= (self contained) */
+ atp = AsnReadId(aip, amp, SEQTABLE_SINGLE_DATA);
+ } else {
+ atp = AsnLinkType(orig, SEQTABLE_SINGLE_DATA); /* link in local tree */
+ }
+ if (atp == NULL) {
+ return NULL;
+ }
+
+ anp = ValNodeNew(NULL);
+ if (anp == NULL) {
+ goto erret;
+ }
+ if (AsnReadVal(aip, atp, &av) <= 0) { /* read the CHOICE or OpenStruct value (nothing) */
+ goto erret;
+ }
+
+ func = NULL;
+
+ atp = AsnReadId(aip, amp, atp); /* find the choice */
+ if (atp == NULL) {
+ goto erret;
+ }
+ if (atp == SEQTABLE_SINGLE_DATA_int) {
+ choice = SeqTableSingleData_int__;
+ if (AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ anp->data.intvalue = av.intvalue;
+ }
+ else if (atp == SEQTABLE_SINGLE_DATA_real) {
+ choice = SeqTableSingleData_real;
+ if (AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ anp->data.realvalue = av.realvalue;
+ }
+ else if (atp == SEQTABLE_SINGLE_DATA_string) {
+ choice = SeqTableSingleData_string;
+ if (AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ anp->data.ptrvalue = av.ptrvalue;
+ }
+ else if (atp == SEQTABLE_SINGLE_DATA_bytes) {
+ choice = SeqTableSingleData_bytes;
+ if (AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ anp->data.ptrvalue = av.ptrvalue;
+ }
+ else if (atp == SEQTABLE_SINGLE_DATA_bit) {
+ choice = SeqTableSingleData_bit;
+ if (AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ anp->data.boolvalue = av.boolvalue;
+ }
+ else if (atp == SEQTABLE_SINGLE_DATA_loc) {
+ choice = SeqTableSingleData_loc;
+ func = (AsnReadFunc) SeqLocAsnRead;
+ }
+ else if (atp == SEQTABLE_SINGLE_DATA_id) {
+ choice = SeqTableSingleData_id;
+ func = (AsnReadFunc) SeqIdAsnRead;
+ }
+ else if (atp == SEQTABLE_SINGLE_DATA_interval) {
+ choice = SeqTableSingleData_interval;
+ func = (AsnReadFunc) SeqIntAsnRead;
+ }
+ anp->choice = choice;
+ if (func != NULL)
+ {
+ anp->data.ptrvalue = (* func)(aip, atp);
+ if (aip -> io_failure) goto erret;
+
+ if (nullIsError && anp->data.ptrvalue == NULL) {
+ goto erret;
+ }
+ }
+
+ret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return anp;
+
+erret:
+ anp = MemFree(anp);
+ aip -> io_failure = TRUE;
+ goto ret;
+}
+
+
+/**************************************************
+*
+* SeqTableSingleDataAsnWrite()
+*
+**************************************************/
+NLM_EXTERN Boolean LIBCALL
+SeqTableSingleDataAsnWrite(SeqTableSingleDataPtr anp, AsnIoPtr aip, AsnTypePtr orig)
+
+{
+ DataVal av;
+ AsnTypePtr atp, writetype = NULL;
+ Pointer pnt;
+ AsnWriteFunc func = NULL;
+ Boolean retval = FALSE;
+
+ if (! loaded)
+ {
+ if (! objtableAsnLoad())
+ return FALSE;
+ }
+
+ if (aip == NULL)
+ return FALSE;
+
+ atp = AsnLinkType(orig, SEQTABLE_SINGLE_DATA); /* link local tree */
+ if (atp == NULL) {
+ return FALSE;
+ }
+
+ if (anp == NULL) { AsnNullValueMsg(aip, atp); goto erret; }
+
+ av.ptrvalue = (Pointer)anp;
+ if (! AsnWriteChoice(aip, atp, (Int2)anp->choice, &av)) {
+ goto erret;
+ }
+
+ pnt = anp->data.ptrvalue;
+ switch (anp->choice)
+ {
+ case SeqTableSingleData_int__:
+ av.intvalue = anp->data.intvalue;
+ retval = AsnWrite(aip, SEQTABLE_SINGLE_DATA_int, &av);
+ break;
+ case SeqTableSingleData_real:
+ av.realvalue = anp->data.realvalue;
+ retval = AsnWrite(aip, SEQTABLE_SINGLE_DATA_real, &av);
+ break;
+ case SeqTableSingleData_string:
+ av.ptrvalue = anp->data.ptrvalue;
+ retval = AsnWrite(aip, SEQTABLE_SINGLE_DATA_string, &av);
+ break;
+ case SeqTableSingleData_bytes:
+ av.ptrvalue = anp->data.ptrvalue;
+ retval = AsnWrite(aip, SEQTABLE_SINGLE_DATA_bytes, &av);
+ break;
+ case SeqTableSingleData_bit:
+ av.boolvalue = anp->data.boolvalue;
+ retval = AsnWrite(aip, SEQTABLE_SINGLE_DATA_bit, &av);
+ break;
+ case SeqTableSingleData_loc:
+ writetype = SEQTABLE_SINGLE_DATA_loc;
+ func = (AsnWriteFunc) SeqLocAsnWrite;
+ break;
+ case SeqTableSingleData_id:
+ writetype = SEQTABLE_SINGLE_DATA_id;
+ func = (AsnWriteFunc) SeqIdAsnWrite;
+ break;
+ case SeqTableSingleData_interval:
+ writetype = SEQTABLE_SINGLE_DATA_interval;
+ func = (AsnWriteFunc) SeqIntAsnWrite;
+ break;
+ }
+ if (writetype != NULL) {
+ retval = (* func)(pnt, aip, writetype); /* write it out */
+ }
+ if (!retval) {
+ goto erret;
+ }
+ retval = TRUE;
+
+erret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return retval;
+}
+
+
+/**************************************************
+*
+* SeqTableSparseIndexFree()
+*
+**************************************************/
+NLM_EXTERN
+SeqTableSparseIndexPtr LIBCALL
+SeqTableSparseIndexFree(ValNodePtr anp)
+{
+ Pointer pnt;
+
+ if (anp == NULL) {
+ return NULL;
+ }
+
+ pnt = anp->data.ptrvalue;
+ switch (anp->choice)
+ {
+ default:
+ break;
+ case SeqTableSparseIndex_indexes:
+ AsnGenericBaseSeqOfFree((ValNodePtr) pnt,ASNCODE_INTVAL_SLOT);
+ break;
+ case SeqTableSparseIndex_bit_set:
+ BSFree(anp -> data.ptrvalue);
+ break;
+ }
+ return MemFree(anp);
+}
+
+
+/**************************************************
+*
+* SeqTableSparseIndexAsnRead()
+*
+**************************************************/
+NLM_EXTERN
+SeqTableSparseIndexPtr LIBCALL
+SeqTableSparseIndexAsnRead(AsnIoPtr aip, AsnTypePtr orig)
+{
+ DataVal av;
+ AsnTypePtr atp;
+ ValNodePtr anp;
+ Uint1 choice;
+ Boolean isError = FALSE;
+ Boolean nullIsError = FALSE;
+ AsnReadFunc func;
+
+ if (! loaded)
+ {
+ if (! objtableAsnLoad()) {
+ return NULL;
+ }
+ }
+
+ if (aip == NULL) {
+ return NULL;
+ }
+
+ if (orig == NULL) { /* SeqTableSparseIndex ::= (self contained) */
+ atp = AsnReadId(aip, amp, SEQTABLE_SPARSE_INDEX);
+ } else {
+ atp = AsnLinkType(orig, SEQTABLE_SPARSE_INDEX); /* link in local tree */
+ }
+ if (atp == NULL) {
+ return NULL;
+ }
+
+ anp = ValNodeNew(NULL);
+ if (anp == NULL) {
+ goto erret;
+ }
+ if (AsnReadVal(aip, atp, &av) <= 0) { /* read the CHOICE or OpenStruct value (nothing) */
+ goto erret;
+ }
+
+ func = NULL;
+
+ atp = AsnReadId(aip, amp, atp); /* find the choice */
+ if (atp == NULL) {
+ goto erret;
+ }
+ if (atp == SEQTABLE_SPARSE_INDEX_indexes) {
+ choice = SeqTableSparseIndex_indexes;
+ anp -> data.ptrvalue =
+ AsnGenericBaseSeqOfAsnRead(aip, amp, atp, ASNCODE_INTVAL_SLOT, &isError);
+ if (isError && anp -> data.ptrvalue == NULL) {
+ goto erret;
+ }
+ }
+ else if (atp == SEQTABLE_SPARSE_INDEX_bit_set) {
+ choice = SeqTableSparseIndex_bit_set;
+ if (AsnReadVal(aip, atp, &av) <= 0) {
+ goto erret;
+ }
+ anp->data.ptrvalue = av.ptrvalue;
+ }
+ anp->choice = choice;
+ if (func != NULL)
+ {
+ anp->data.ptrvalue = (* func)(aip, atp);
+ if (aip -> io_failure) goto erret;
+
+ if (nullIsError && anp->data.ptrvalue == NULL) {
+ goto erret;
+ }
+ }
+
+ret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return anp;
+
+erret:
+ anp = MemFree(anp);
+ aip -> io_failure = TRUE;
+ goto ret;
+}
+
+
+/**************************************************
+*
+* SeqTableSparseIndexAsnWrite()
+*
+**************************************************/
+NLM_EXTERN Boolean LIBCALL
+SeqTableSparseIndexAsnWrite(SeqTableSparseIndexPtr anp, AsnIoPtr aip, AsnTypePtr orig)
+
+{
+ DataVal av;
+ AsnTypePtr atp, writetype = NULL;
+ Pointer pnt;
+ AsnWriteFunc func = NULL;
+ Boolean retval = FALSE;
+
+ if (! loaded)
+ {
+ if (! objtableAsnLoad())
+ return FALSE;
+ }
+
+ if (aip == NULL)
+ return FALSE;
+
+ atp = AsnLinkType(orig, SEQTABLE_SPARSE_INDEX); /* link local tree */
+ if (atp == NULL) {
+ return FALSE;
+ }
+
+ if (anp == NULL) { AsnNullValueMsg(aip, atp); goto erret; }
+
+ av.ptrvalue = (Pointer)anp;
+ if (! AsnWriteChoice(aip, atp, (Int2)anp->choice, &av)) {
+ goto erret;
+ }
+
+ pnt = anp->data.ptrvalue;
+ switch (anp->choice)
+ {
+ case SeqTableSparseIndex_indexes:
+ retval = AsnGenericBaseSeqOfAsnWrite((Pointer) pnt,ASNCODE_INTVAL_SLOT, aip, SEQTABLE_SPARSE_INDEX_indexes, SEQTABLE_SPARSE_INDEX_indexes_E); break;
+ case SeqTableSparseIndex_bit_set:
+ av.ptrvalue = anp->data.ptrvalue;
+ retval = AsnWrite(aip, SEQTABLE_SPARSE_INDEX_bit_set, &av);
+ break;
+ }
+ if (writetype != NULL) {
+ retval = (* func)(pnt, aip, writetype); /* write it out */
+ }
+ if (!retval) {
+ goto erret;
+ }
+ retval = TRUE;
+
+erret:
+ AsnUnlinkType(orig); /* unlink local tree */
+ return retval;
+}
diff --git a/object/objtable.h b/object/objtable.h
new file mode 100644
index 00000000..5cb49023
--- /dev/null
+++ b/object/objtable.h
@@ -0,0 +1,188 @@
+#ifndef _objtable_
+#define _objtable_
+
+#undef NLM_EXTERN
+#ifdef NLM_IMPORT
+#define NLM_EXTERN NLM_IMPORT
+#else
+#define NLM_EXTERN extern
+#endif
+
+
+#ifdef __cplusplus
+extern "C" { /* } */
+#endif
+
+
+/**************************************************
+*
+* Generated objects for Module NCBI-SeqTable
+* Generated using ASNCODE Revision: 6.16 at Dec 12, 2007 3:30 PM
+*
+**************************************************/
+
+NLM_EXTERN Boolean LIBCALL
+objtableAsnLoad PROTO((void));
+
+
+/**************************************************
+*
+* SeqTableColumnInfo
+*
+**************************************************/
+typedef struct struct_SeqTable_column_info {
+ Uint4 OBbits__;
+ CharPtr title;
+#define OB__SeqTable_column_info_field_id 0
+
+ Int4 field_id;
+ CharPtr field_name;
+} SeqTableColumnInfo, PNTR SeqTableColumnInfoPtr;
+
+
+NLM_EXTERN SeqTableColumnInfoPtr LIBCALL SeqTableColumnInfoFree PROTO ((SeqTableColumnInfoPtr ));
+NLM_EXTERN SeqTableColumnInfoPtr LIBCALL SeqTableColumnInfoNew PROTO (( void ));
+NLM_EXTERN SeqTableColumnInfoPtr LIBCALL SeqTableColumnInfoAsnRead PROTO (( AsnIoPtr, AsnTypePtr));
+NLM_EXTERN Boolean LIBCALL SeqTableColumnInfoAsnWrite PROTO (( SeqTableColumnInfoPtr , AsnIoPtr, AsnTypePtr));
+
+
+
+/**************************************************
+*
+* SeqTableColumn
+*
+**************************************************/
+typedef struct struct_SeqTable_column {
+ struct struct_SeqTable_column PNTR next;
+ Uint4 OBbits__;
+ struct struct_SeqTable_column_info PNTR header;
+ ValNodePtr data;
+ ValNodePtr sparse;
+ ValNodePtr default__;
+ ValNodePtr sparse_other;
+} SeqTableColumn, PNTR SeqTableColumnPtr;
+
+
+NLM_EXTERN SeqTableColumnPtr LIBCALL SeqTableColumnFree PROTO ((SeqTableColumnPtr ));
+NLM_EXTERN SeqTableColumnPtr LIBCALL SeqTableColumnNew PROTO (( void ));
+NLM_EXTERN SeqTableColumnPtr LIBCALL SeqTableColumnAsnRead PROTO (( AsnIoPtr, AsnTypePtr));
+NLM_EXTERN Boolean LIBCALL SeqTableColumnAsnWrite PROTO (( SeqTableColumnPtr , AsnIoPtr, AsnTypePtr));
+
+
+
+/**************************************************
+*
+* SeqTable
+*
+**************************************************/
+typedef struct struct_Seq_table {
+ Uint4 OBbits__;
+ Int4 feat_type;
+#define OB__Seq_table_feat_subtype 0
+
+ Int4 feat_subtype;
+ Int4 num_rows;
+ struct struct_SeqTable_column PNTR columns;
+} SeqTable, PNTR SeqTablePtr;
+
+
+NLM_EXTERN SeqTablePtr LIBCALL SeqTableFree PROTO ((SeqTablePtr ));
+NLM_EXTERN SeqTablePtr LIBCALL SeqTableNew PROTO (( void ));
+NLM_EXTERN SeqTablePtr LIBCALL SeqTableAsnRead PROTO (( AsnIoPtr, AsnTypePtr));
+NLM_EXTERN Boolean LIBCALL SeqTableAsnWrite PROTO (( SeqTablePtr , AsnIoPtr, AsnTypePtr));
+
+
+
+/**************************************************
+*
+* CommonStringTable
+*
+**************************************************/
+typedef struct struct_CommonString_table {
+ Uint4 OBbits__;
+ ValNodePtr strings;
+ ValNodePtr indexes;
+} CommonStringTable, PNTR CommonStringTablePtr;
+
+
+NLM_EXTERN CommonStringTablePtr LIBCALL CommonStringTableFree PROTO ((CommonStringTablePtr ));
+NLM_EXTERN CommonStringTablePtr LIBCALL CommonStringTableNew PROTO (( void ));
+NLM_EXTERN CommonStringTablePtr LIBCALL CommonStringTableAsnRead PROTO (( AsnIoPtr, AsnTypePtr));
+NLM_EXTERN Boolean LIBCALL CommonStringTableAsnWrite PROTO (( CommonStringTablePtr , AsnIoPtr, AsnTypePtr));
+
+
+
+/**************************************************
+*
+* CommonBytesTable
+*
+**************************************************/
+typedef struct struct_CommonBytes_table {
+ Uint4 OBbits__;
+ ValNodePtr bytes;
+ ValNodePtr indexes;
+} CommonBytesTable, PNTR CommonBytesTablePtr;
+
+
+NLM_EXTERN CommonBytesTablePtr LIBCALL CommonBytesTableFree PROTO ((CommonBytesTablePtr ));
+NLM_EXTERN CommonBytesTablePtr LIBCALL CommonBytesTableNew PROTO (( void ));
+NLM_EXTERN CommonBytesTablePtr LIBCALL CommonBytesTableAsnRead PROTO (( AsnIoPtr, AsnTypePtr));
+NLM_EXTERN Boolean LIBCALL CommonBytesTableAsnWrite PROTO (( CommonBytesTablePtr , AsnIoPtr, AsnTypePtr));
+
+typedef ValNodePtr SeqTableMultiDataPtr;
+typedef ValNode SeqTableMultiData;
+#define SeqTableMultiData_int__ 1
+#define SeqTableMultiData_real 2
+#define SeqTableMultiData_string 3
+#define SeqTableMultiData_bytes 4
+#define SeqTableMultiData_common_string 5
+#define SeqTableMultiData_common_bytes 6
+#define SeqTableMultiData_bit 7
+#define SeqTableMultiData_loc 8
+#define SeqTableMultiData_id 9
+#define SeqTableMultiData_interval 10
+
+
+NLM_EXTERN SeqTableMultiDataPtr LIBCALL SeqTableMultiDataFree PROTO ((SeqTableMultiDataPtr ));
+NLM_EXTERN SeqTableMultiDataPtr LIBCALL SeqTableMultiDataAsnRead PROTO (( AsnIoPtr, AsnTypePtr));
+NLM_EXTERN Boolean LIBCALL SeqTableMultiDataAsnWrite PROTO (( SeqTableMultiDataPtr , AsnIoPtr, AsnTypePtr));
+
+typedef ValNodePtr SeqTableSingleDataPtr;
+typedef ValNode SeqTableSingleData;
+#define SeqTableSingleData_int__ 1
+#define SeqTableSingleData_real 2
+#define SeqTableSingleData_string 3
+#define SeqTableSingleData_bytes 4
+#define SeqTableSingleData_bit 5
+#define SeqTableSingleData_loc 6
+#define SeqTableSingleData_id 7
+#define SeqTableSingleData_interval 8
+
+
+NLM_EXTERN SeqTableSingleDataPtr LIBCALL SeqTableSingleDataFree PROTO ((SeqTableSingleDataPtr ));
+NLM_EXTERN SeqTableSingleDataPtr LIBCALL SeqTableSingleDataAsnRead PROTO (( AsnIoPtr, AsnTypePtr));
+NLM_EXTERN Boolean LIBCALL SeqTableSingleDataAsnWrite PROTO (( SeqTableSingleDataPtr , AsnIoPtr, AsnTypePtr));
+
+typedef ValNodePtr SeqTableSparseIndexPtr;
+typedef ValNode SeqTableSparseIndex;
+#define SeqTableSparseIndex_indexes 1
+#define SeqTableSparseIndex_bit_set 2
+
+
+NLM_EXTERN SeqTableSparseIndexPtr LIBCALL SeqTableSparseIndexFree PROTO ((SeqTableSparseIndexPtr ));
+NLM_EXTERN SeqTableSparseIndexPtr LIBCALL SeqTableSparseIndexAsnRead PROTO (( AsnIoPtr, AsnTypePtr));
+NLM_EXTERN Boolean LIBCALL SeqTableSparseIndexAsnWrite PROTO (( SeqTableSparseIndexPtr , AsnIoPtr, AsnTypePtr));
+
+#ifdef __cplusplus
+/* { */ }
+#endif
+
+#endif /* _objtable_ */
+
+#undef NLM_EXTERN
+#ifdef NLM_EXPORT
+#define NLM_EXTERN NLM_EXPORT
+#else
+#define NLM_EXTERN
+#endif
+
diff --git a/sequin/macro.asn b/sequin/macro.asn
new file mode 100755
index 00000000..06589618
--- /dev/null
+++ b/sequin/macro.asn
@@ -0,0 +1,814 @@
+--$Revision: 1.13 $
+--**********************************************************************
+--
+-- NCBI ASN.1 macro editing language specifications
+--
+-- by Colleen Bollin, 2007
+--
+--**********************************************************************
+
+NCBI-Macro DEFINITIONS ::=
+BEGIN
+
+EXPORTS AECR-action, Parse-action, Macro-action-list;
+
+-- simple constraints --
+
+String-location ::= ENUMERATED {
+ contains (1) ,
+ equals (2) ,
+ starts (3) ,
+ ends (4) ,
+ inlist (5) }
+
+String-constraint ::= SEQUENCE {
+ match-text VisibleString ,
+ match-location String-location DEFAULT contains ,
+ case-sensitive BOOLEAN DEFAULT FALSE ,
+ whole-word BOOLEAN DEFAULT FALSE ,
+ not-present BOOLEAN DEFAULT FALSE }
+
+Strand-constraint ::= ENUMERATED {
+ any (0) ,
+ plus (1) ,
+ minus (2) }
+
+Seqtype-constraint ::= ENUMERATED {
+ any (0) ,
+ nuc (1) ,
+ prot (2) }
+
+Location-constraint ::= SEQUENCE {
+ strand Strand-constraint DEFAULT any ,
+ seq-type Seqtype-constraint DEFAULT any }
+
+Object-type-constraint ::= ENUMERATED {
+ any (0) ,
+ feature (1) ,
+ descriptor (2) }
+
+
+-- feature values --
+
+Feature-type ::= ENUMERATED {
+ any (0) ,
+ gene (1) ,
+ org (2) ,
+ cds (3) ,
+ prot (4) ,
+ preRNA (5) ,
+ mRNA (6) ,
+ tRNA (7) ,
+ rRNA (8) ,
+ snRNA (9) ,
+ scRNA (10) ,
+ otherRNA (11) ,
+ pub (12) ,
+ seq (13) ,
+ imp (14) ,
+ allele (15) ,
+ attenuator (16) ,
+ c-region (17) ,
+ caat-signal (18) ,
+ imp-CDS (19) ,
+ conflict (20) ,
+ d-loop (21) ,
+ d-segment (22) ,
+ enhancer (23) ,
+ exon (24) ,
+ gC-signal (25) ,
+ iDNA (26) ,
+ intron (27) ,
+ j-segment (28) ,
+ ltr (29) ,
+ mat-peptide (30) ,
+ misc-binding (31) ,
+ misc-difference (32) ,
+ misc-feature (33) ,
+ misc-recomb (34) ,
+ misc-RNA (35) ,
+ misc-signal (36) ,
+ misc-structure (37) ,
+ modified-base (38) ,
+ mutation (39) ,
+ n-region (40) ,
+ old-sequence (41) ,
+ polyA-signal (42) ,
+ polyA-site (43) ,
+ precursor-RNA (44) ,
+ prim-transcript (45) ,
+ primer-bind (46) ,
+ promoter (47) ,
+ protein-bind (48) ,
+ rbs (49) ,
+ repeat-region (50) ,
+ repeat-unit (51) ,
+ rep-origin (52) ,
+ s-region (53) ,
+ satellite (54) ,
+ sig-peptide (55) ,
+ source (56) ,
+ stem-loop (57) ,
+ sts (58) ,
+ tata-signal (59) ,
+ terminator (60) ,
+ transit-peptide (61) ,
+ unsure (62) ,
+ v-region (63) ,
+ v-segment (64) ,
+ variation (65) ,
+ virion (66) ,
+ n3clip (67) ,
+ n3UTR (68) ,
+ n5clip (69) ,
+ n5UTR (70) ,
+ n10-signal (71) ,
+ n35-signal (72) ,
+ site-ref (73) ,
+ region (74) ,
+ comment (75) ,
+ bond (76) ,
+ site (77) ,
+ rsite (78) ,
+ user (79) ,
+ txinit (80) ,
+ num (81) ,
+ psec-str (82) ,
+ non-std-residue (83) ,
+ het (84) ,
+ biosrc (85) ,
+ preprotein (86) ,
+ mat-peptide-aa (87) ,
+ sig-peptide-aa (88) ,
+ transit-peptide-aa (89) ,
+ snoRNA (90) ,
+ gap (91) ,
+ operon (92) ,
+ oriT (93) ,
+ ncRNA (94) ,
+ tmRNA (95) }
+
+Feat-qual-legal ::= ENUMERATED {
+ allele (1) ,
+ activity (2) ,
+ anticodon (3) ,
+ bound-moiety (4) ,
+ chromosome (5),
+ citation (6),
+ codon (7) ,
+ codon-start (8) ,
+ codons-recognized (9) ,
+ compare (10) ,
+ cons-splice (11) ,
+ db-xref (12) ,
+ description (13) ,
+ direction (14) ,
+ ec-number (15) ,
+ environmental-sample (16) ,
+ evidence (17) ,
+ exception (18) ,
+ experiment (19) ,
+ focus (20) ,
+ frequency (21) ,
+ function (22) ,
+ gene (23) ,
+ gene-description (24) ,
+ inference (25) ,
+ label (26) ,
+ locus-tag (27) ,
+ map (28) ,
+ mobile-element (29) ,
+ mod-base (30) ,
+ mol-type (31) ,
+ ncRNA-class (32) ,
+ note (33) ,
+ number (34) ,
+ old-locus-tag (35) ,
+ operon (36) ,
+ organism (37) ,
+ organelle (38) ,
+ partial (39) ,
+ phenotype (40) ,
+ plasmid (41) ,
+ product (42) ,
+ protein-id (43) ,
+ pseudo (44) ,
+ rearranged (45) ,
+ replace (46) ,
+ rpt-family (47) ,
+ rpt-type (48) ,
+ rpt-unit (49) ,
+ rpt-unit-seq (50) ,
+ rpt-unit-range (51) ,
+ segment (52) ,
+ sequenced-mol (53) ,
+ standard-name (54) ,
+ synonym (55) ,
+ transcript-id (56) ,
+ transgenic (57) ,
+ translation (58) ,
+ transl-except (59) ,
+ transl-table (60) ,
+ usedin (61) }
+
+Feat-qual-legal-val ::= SEQUENCE {
+ qual Feat-qual-legal ,
+ val VisibleString }
+
+Feat-qual-legal-val-choice ::= CHOICE {
+ qual Feat-qual-legal-val }
+
+Feat-qual-legal-set ::= SET OF Feat-qual-legal-val-choice
+
+Feat-qual-choice ::= CHOICE {
+ legal-qual Feat-qual-legal ,
+ illegal-qual String-constraint }
+
+Feature-field ::= SEQUENCE {
+ type Feature-type ,
+ field Feat-qual-choice }
+
+Feature-field-legal ::= SEQUENCE {
+ type Feature-type ,
+ field Feat-qual-legal }
+
+Feature-field-pair ::= SEQUENCE {
+ type Feature-type ,
+ field-from Feat-qual-choice ,
+ field-to Feat-qual-choice }
+
+Source-qual ::= ENUMERATED {
+ acronym (1) ,
+ anamorph (2) ,
+ authority (3) ,
+ bio-material (4) ,
+ biotype (5) ,
+ biovar (6) ,
+ breed (7) ,
+ cell-line (8) ,
+ cell-type (9) ,
+ chemovar (10) ,
+ chromosome (11) ,
+ clone (12) ,
+ clone-lib (13) ,
+ collected-by (14) ,
+ collection-date (15) ,
+ common (16) ,
+ common-name (17) ,
+ country (18) ,
+ cultivar (19) ,
+ culture-collection (20) ,
+ dev-stage (21) ,
+ division (22) ,
+ dosage (23) ,
+ ecotype (24) ,
+ endogenous-virus-name (25) ,
+ environmental-sample (26) ,
+ forma (27) ,
+ forma-specialis (28) ,
+ frequency (29) ,
+ fwd-primer-name (30) ,
+ fwd-primer-seq (31) ,
+ gb-acronym (32) ,
+ gb-anamorph (33) ,
+ gb-synonym (34) ,
+ genotype (35) ,
+ germline (36) ,
+ group (37) ,
+ haplotype (38) ,
+ identified-by (39) ,
+ insertion-seq-name (40) ,
+ isolate (41) ,
+ isolation-source (42) ,
+ lab-host (43) ,
+ lat-lon (44) ,
+ lineage (45) ,
+ map (46) ,
+ metagenome-source (47) ,
+ metagenomic (48) ,
+ old-lineage (49) ,
+ old-name (50) ,
+ orgmod-note (51) ,
+ nat-host (52) ,
+ pathovar (53) ,
+ plasmid-name (54) ,
+ plastid-name (55) ,
+ pop-variant (56) ,
+ rearranged (57) ,
+ rev-primer-name (58) ,
+ rev-primer-seq (59) ,
+ segment (60) ,
+ serogroup (61) ,
+ serotype (62) ,
+ serovar (63) ,
+ sex (64) ,
+ specimen-voucher (65) ,
+ strain (66) ,
+ subclone (67) ,
+ subgroup (68) ,
+ subsource-note (69),
+ sub-species (70) ,
+ substrain (71) ,
+ subtype (72) ,
+ synonym (73) ,
+ taxname (74) ,
+ teleomorph (75) ,
+ tissue-lib (76) ,
+ tissue-type (77) ,
+ transgenic (78) ,
+ transposon-name (79) ,
+ type (80) ,
+ variety (81) }
+
+Source-qual-pair ::= SEQUENCE {
+ field-from Source-qual ,
+ field-to Source-qual }
+
+Source-location ::= ENUMERATED {
+ unknown (0) ,
+ genomic (1) ,
+ chloroplast (2) ,
+ chromoplast (3) ,
+ kinetoplast (4) ,
+ mitochondrion (5) ,
+ plastid (6) ,
+ macronuclear (7) ,
+ extrachrom (8) ,
+ plasmid (9) ,
+ transposon (10) ,
+ insertion-seq (11) ,
+ cyanelle (12) ,
+ proviral (13) ,
+ virion (14) ,
+ nucleomorph (15) ,
+ apicoplast (16) ,
+ leucoplast (17) ,
+ proplastid (18) ,
+ endogenous-virus (19) ,
+ hydrogenosome (20) ,
+ chromosome (21) ,
+ chromatophore (22) }
+
+Source-origin ::= ENUMERATED {
+ unknown (0) ,
+ natural (1) ,
+ natmut (2) ,
+ mut (3) ,
+ artificial (4) ,
+ synthetic (5) ,
+ other (255) }
+
+Source-qual-choice ::= CHOICE {
+ textqual Source-qual ,
+ location Source-location,
+ origin Source-origin }
+
+
+CDSGeneProt-field ::= ENUMERATED {
+ cds-comment (1) ,
+ gene-locus (2) ,
+ gene-description (3) ,
+ gene-comment (4) ,
+ gene-allele (5) ,
+ gene-maploc (6) ,
+ gene-locus-tag (7) ,
+ gene-synonym (8) ,
+ gene-old-locus-tag (9) ,
+ mrna-product (10) ,
+ mrna-comment (11) ,
+ prot-name (12) ,
+ prot-description (13) ,
+ prot-ec-number (14) ,
+ prot-activity (15) ,
+ prot-comment (16) ,
+ mat-peptide-name (17) ,
+ mat-peptide-description (18) ,
+ mat-peptide-ec-number (19) ,
+ mat-peptide-activity (20) ,
+ mat-peptide-comment (21) }
+
+CDSGeneProt-field-pair ::= SEQUENCE {
+ field-from CDSGeneProt-field ,
+ field-to CDSGeneProt-field }
+
+Molecule-type ::= ENUMERATED {
+ unknown (0) ,
+ genomic (1) ,
+ precursor-RNA (2) ,
+ mRNA (3) ,
+ rRNA (4) ,
+ tRNA (5) ,
+ snRNA (6) ,
+ scRNA (7) ,
+ genomic-mRNA (8) ,
+ cRNA (9) ,
+ snoRNA (10) ,
+ transcribed-RNA (11) ,
+ ncRNA (12) ,
+ transfer-messenger-RNA (13) ,
+ other (14) }
+
+Technique-type ::= ENUMERATED {
+ unknown (0) ,
+ standard (1) ,
+ est (2) ,
+ sts (3) ,
+ survey (4) ,
+ genetic-map (5) ,
+ physical-map (6) ,
+ derived (7) ,
+ concept-trans (8) ,
+ seq-pept (9) ,
+ both (10) ,
+ seq-pept-overlap (11) ,
+ seq-pept-homol (12) ,
+ concept-trans-a (13) ,
+ htgs-1 (14) ,
+ htgs-2 (15) ,
+ htgs-3 (16) ,
+ fli-cDNA (17) ,
+ htgs-0 (18) ,
+ htc (19) ,
+ wgs (20) ,
+ barcode (21) ,
+ composite-wgs-htgs (22) ,
+ tsa (23) ,
+ other (24) }
+
+Completedness-type ::= ENUMERATED {
+ unknown (0) ,
+ complete (1) ,
+ partial (2) ,
+ no-left (3) ,
+ no-right (4) ,
+ no-ends (5) ,
+ has-left (6) ,
+ has-right (7) ,
+ other (6) }
+
+Molecule-class-type ::= ENUMERATED {
+ unknown (0) ,
+ dna (1) ,
+ rna (2) ,
+ protein (3) ,
+ nucleotide (4),
+ other (5) }
+
+Topology-type ::= ENUMERATED {
+ unknown (0) ,
+ linear (1) ,
+ circular (2) ,
+ tandem (3) ,
+ other (4) }
+
+Strand-type ::= ENUMERATED {
+ unknown (0) ,
+ single (1) ,
+ double (2) ,
+ mixed (3) ,
+ mixed-rev (4) ,
+ other (5) }
+
+Molinfo-field ::= CHOICE {
+ molecule Molecule-type ,
+ technique Technique-type ,
+ completedness Completedness-type ,
+ mol-class Molecule-class-type ,
+ topology Topology-type ,
+ strand Strand-type }
+
+Molinfo-molecule-pair ::= SEQUENCE {
+ from Molecule-type ,
+ to Molecule-type }
+
+Molinfo-technique-pair ::= SEQUENCE {
+ from Technique-type ,
+ to Technique-type }
+
+Molinfo-completedness-pair ::= SEQUENCE {
+ from Completedness-type ,
+ to Completedness-type }
+
+Molinfo-mol-class-pair ::= SEQUENCE {
+ from Molecule-class-type ,
+ to Molecule-class-type }
+
+Molinfo-topology-pair ::= SEQUENCE {
+ from Topology-type ,
+ to Topology-type }
+
+Molinfo-strand-pair ::= SEQUENCE {
+ from Strand-type ,
+ to Strand-type }
+
+Molinfo-field-pair ::= CHOICE {
+ molecule Molinfo-molecule-pair ,
+ technique Molinfo-technique-pair ,
+ completedness Molinfo-completedness-pair ,
+ mol-class Molinfo-mol-class-pair ,
+ topology Molinfo-topology-pair ,
+ strand Molinfo-strand-pair }
+
+
+-- complex constraints --
+
+Source-constraint ::= SEQUENCE {
+ field1 Source-qual-choice OPTIONAL ,
+ field2 Source-qual-choice OPTIONAL ,
+ constraint String-constraint OPTIONAL ,
+ type-constraint Object-type-constraint OPTIONAL }
+
+CDSGeneProt-feature-type-constraint ::= ENUMERATED {
+ gene (1) ,
+ mRNA (2) ,
+ cds (3) ,
+ prot (4) ,
+ exon (5) ,
+ mat-peptide (6) }
+
+CDSGeneProt-pseudo-constraint ::= SEQUENCE {
+ feature CDSGeneProt-feature-type-constraint ,
+ is-pseudo BOOLEAN DEFAULT TRUE }
+
+CDSGeneProt-constraint-field ::= CHOICE {
+ field CDSGeneProt-field }
+
+CDSGeneProt-qual-constraint ::= SEQUENCE {
+ field1 CDSGeneProt-constraint-field OPTIONAL ,
+ field2 CDSGeneProt-constraint-field OPTIONAL ,
+ constraint String-constraint OPTIONAL }
+
+Sequence-constraint-rnamol ::= ENUMERATED {
+ any (0) ,
+ genomic (1) ,
+ precursor-RNA (2) ,
+ mRNA (3) ,
+ rRNA (4) ,
+ tRNA (5) ,
+ snRNA (6) ,
+ scRNA (7) ,
+ genomic-mRNA (8) ,
+ cRNA (9) ,
+ snoRNA (10) ,
+ transcribed-RNA (11) ,
+ ncRNA (12) ,
+ transfer-messenger-RNA (13) }
+
+Sequence-constraint-mol-type-constraint ::= CHOICE {
+ any NULL ,
+ nucleotide NULL ,
+ dna NULL ,
+ rna Sequence-constraint-rnamol ,
+ protein NULL }
+
+Sequence-constraint ::= SEQUENCE {
+ seqtype Sequence-constraint-mol-type-constraint OPTIONAL ,
+ id String-constraint OPTIONAL ,
+ feature Feature-type }
+
+Constraint-choice ::= CHOICE {
+ string String-constraint ,
+ location Location-constraint ,
+ source Source-constraint,
+ cdsgeneprot-qual CDSGeneProt-qual-constraint ,
+ cdsgeneprot-pseudo CDSGeneProt-pseudo-constraint ,
+ sequence Sequence-constraint }
+
+Constraint-choice-set ::= SET OF Constraint-choice
+
+Text-portion ::= SEQUENCE {
+ left-text VisibleString OPTIONAL ,
+ include-left BOOLEAN ,
+ right-text VisibleString OPTIONAL ,
+ include-right BOOLEAN ,
+ inside BOOLEAN ,
+ case-sensitive BOOLEAN DEFAULT FALSE ,
+ whole-word BOOLEAN DEFAULT FALSE }
+
+Field-edit-location ::= ENUMERATED {
+ anywhere (0) ,
+ beginning (1) ,
+ end (2) }
+
+Field-edit ::= SEQUENCE {
+ find-txt VisibleString ,
+ repl-txt VisibleString OPTIONAL ,
+ location Field-edit-location DEFAULT anywhere }
+
+Field-type ::= CHOICE {
+ source-qual Source-qual-choice ,
+ feature-field Feature-field ,
+ cds-gene-prot CDSGeneProt-field ,
+ molinfo-field Molinfo-field }
+
+Field-pair-type ::= CHOICE {
+ source-qual Source-qual-pair ,
+ feature-field Feature-field-pair ,
+ cds-gene-prot CDSGeneProt-field-pair ,
+ molinfo-field Molinfo-field-pair }
+
+ExistingTextOption ::= ENUMERATED {
+ replace-old (1) ,
+ append-semi (2) ,
+ append-space (3) ,
+ append-colon (4) ,
+ append-none (5) ,
+ prefix-semi (6) ,
+ prefix-space (7) ,
+ prefix-colon (8) ,
+ prefix-none (9) ,
+ leave-old (10) }
+
+
+Apply-action ::= SEQUENCE {
+ field Field-type ,
+ value VisibleString ,
+ existing-text ExistingTextOption }
+
+Edit-action ::= SEQUENCE {
+ edit Field-edit ,
+ field Field-type }
+
+Convert-action ::= SEQUENCE {
+ fields Field-pair-type ,
+ existing-text ExistingTextOption }
+
+Copy-action ::= SEQUENCE {
+ fields Field-pair-type ,
+ existing-text ExistingTextOption }
+
+Swap-action ::= SEQUENCE {
+ fields Field-pair-type ,
+ field-to Field-type }
+
+AECRParse-action ::= SEQUENCE {
+ portion Text-portion ,
+ fields Field-pair-type ,
+ remove-from-parsed BOOLEAN DEFAULT FALSE ,
+ existing-text ExistingTextOption }
+
+Remove-action ::= SEQUENCE {
+ field Field-type }
+
+Action-choice ::= CHOICE {
+ apply Apply-action ,
+ edit Edit-action ,
+ convert Convert-action ,
+ copy Copy-action ,
+ swap Swap-action ,
+ remove Remove-action ,
+ parse AECRParse-action }
+
+AECR-action ::= SEQUENCE {
+ action Action-choice ,
+ constraint Constraint-choice-set OPTIONAL }
+
+Cap-change ::= ENUMERATED {
+ none (0) ,
+ tolower (1) ,
+ toupper (2) ,
+ firstcap (3) }
+
+Parse-src-org-choice ::= CHOICE {
+ source-qual Source-qual ,
+ taxname-after-binomial NULL }
+
+Parse-src-org ::= SEQUENCE {
+ field Parse-src-org-choice ,
+ type Object-type-constraint DEFAULT any }
+
+Parse-src ::= CHOICE {
+ defline NULL ,
+ flatfile NULL ,
+ local-id NULL ,
+ org Parse-src-org ,
+ comment NULL ,
+ bankit-comment NULL ,
+ structured-comment VisibleString ,
+ file-id NULL }
+
+Parse-dst-org ::= SEQUENCE {
+ field Source-qual-choice ,
+ type Object-type-constraint DEFAULT any }
+
+Parse-dest ::= CHOICE {
+ defline NULL ,
+ org Parse-dst-org ,
+ featqual Feature-field-legal ,
+ dbxref VisibleString }
+
+Parse-action ::= SEQUENCE {
+ portion Text-portion ,
+ src Parse-src ,
+ dest Parse-dest ,
+ capitalization Cap-change DEFAULT none ,
+ remove-from-parsed BOOLEAN DEFAULT FALSE ,
+ existing-text ExistingTextOption }
+
+
+Location-interval ::= SEQUENCE {
+ from INTEGER ,
+ to INTEGER }
+
+Location-choice ::= CHOICE {
+ interval Location-interval ,
+ whole-sequence NULL }
+
+Sequence-list ::= SET OF VisibleString
+Sequence-list-choice ::= CHOICE {
+ list Sequence-list ,
+ all NULL }
+
+Apply-feature-action ::= SEQUENCE {
+ type Feature-type ,
+ partial5 BOOLEAN DEFAULT FALSE ,
+ partial3 BOOLEAN DEFAULT FALSE ,
+ plus-strand BOOLEAN DEFAULT TRUE ,
+ location Location-choice ,
+ seq-list Sequence-list-choice ,
+ add-redundant BOOLEAN DEFAULT TRUE ,
+ add-mrna BOOLEAN DEFAULT FALSE ,
+ apply-to-parts BOOLEAN DEFAULT FALSE ,
+ only-seg-num INTEGER DEFAULT -1 ,
+ fields Feat-qual-legal-set OPTIONAL }
+
+Remove-feature-action ::= SEQUENCE {
+ type Feature-type ,
+ constraint Constraint-choice-set OPTIONAL }
+
+Feature-location-strand-from ::= ENUMERATED {
+ any (0) ,
+ plus (1) ,
+ minus (2) ,
+ unknown (3) ,
+ both (4) }
+
+Feature-location-strand-to ::= ENUMERATED {
+ plus (1) ,
+ minus (2) ,
+ unknown (3) ,
+ both (4) ,
+ reverse (5) }
+
+Edit-location-strand ::= SEQUENCE {
+ strand-from Feature-location-strand-from ,
+ strand-to Feature-location-strand-to }
+
+Partial-5-set-constraint ::= ENUMERATED {
+ all (0) ,
+ at-end (1) ,
+ bad-start (2) ,
+ frame-not-one (3) }
+
+Partial-5-set-action ::= SEQUENCE {
+ constraint Partial-5-set-constraint ,
+ extend BOOLEAN }
+
+Partial-5-clear-constraint ::= ENUMERATED {
+ all (0) ,
+ not-at-end (1) ,
+ good-start (2) }
+
+Partial-3-set-constraint ::= ENUMERATED {
+ all (0) ,
+ at-end (1) ,
+ bad-end (2) }
+
+Partial-3-set-action ::= SEQUENCE {
+ constraint Partial-3-set-constraint ,
+ extend BOOLEAN }
+
+Partial-3-clear-constraint ::= ENUMERATED {
+ all (0) ,
+ not-at-end (1) ,
+ good-end (2) }
+
+Convert-location-type ::= ENUMERATED {
+ join (1) ,
+ order (2) ,
+ merge (3) }
+
+Location-edit-type ::= CHOICE {
+ strand Edit-location-strand ,
+ set-5-partial Partial-5-set-action ,
+ clear-5-partial Partial-5-clear-constraint ,
+ set-3-partial Partial-3-set-action ,
+ clear-3-partial Partial-3-clear-constraint ,
+ convert Convert-location-type }
+
+Edit-feature-location-action ::= SEQUENCE {
+ type Feature-type ,
+ action Location-edit-type ,
+ constraint Constraint-choice-set OPTIONAL }
+
+Macro-action-choice ::= CHOICE {
+ aecr AECR-action ,
+ parse Parse-action ,
+ add-feature Apply-feature-action ,
+ remove-feature Remove-feature-action ,
+ edit-location Edit-feature-location-action }
+
+
+Macro-action-list ::= SET OF Macro-action-choice
+
+END
diff --git a/sequin/sequin.h b/sequin/sequin.h
index b27516a2..aa5bff85 100644
--- a/sequin/sequin.h
+++ b/sequin/sequin.h
@@ -29,7 +29,7 @@
*
* Version Creation Date: 1/22/95
*
-* $Revision: 6.477 $
+* $Revision: 6.513 $
*
* File Description:
*
@@ -167,7 +167,6 @@ extern void ExtendFastaSet (IteM i);
extern void ExtendAllSequencesInSet (IteM i);
extern void SeqLocAdjustByOffset (SeqLocPtr slp, Int4 offset);
extern void SplitSegmentedFeatsMenuItem (IteM i);
-extern SeqLocPtr SeqLocWholeNew (BioseqPtr bsp);
extern SeqFeatPtr SeqFeatCopy (SeqFeatPtr sfp);
extern SeqLocPtr SeqLocReplaceLocalID (SeqLocPtr slp,
SeqIdPtr new_sip);
@@ -248,6 +247,7 @@ extern void EditPubsEx (BaseFormPtr bfp);
extern void RemovePubConsortiums (IteM i);
extern void ExtendPartialFeatures (IteM i);
+extern void ExtendPartialFeaturesWithConstraint (IteM i);
extern void TrimOrganismName (IteM i);
extern void SUCSubmitterProc (IteM i);
@@ -348,7 +348,6 @@ extern Uint2 PackageFormResults (SequinBlockPtr sbp, SeqEntryPtr sep,
extern void EnableFeaturesPerTarget (BaseFormPtr bfp);
extern void EnableAnalysisItems (BaseFormPtr bfp, Boolean isDocSum);
-extern Int4 ExtendSeqLocToEnd (SeqLocPtr slp, BioseqPtr bsp, Boolean end5);
extern void ExtendSeqLocToPosition (SeqLocPtr slp, Boolean end5, Int4 pos);
#define REGISTER_BIOSEQ_SEG_EDIT ObjMgrProcLoad(OMPROC_EDIT,"Edit Bioseq Seg","BioseqSegEditor",OBJ_BIOSEQ_SEG,0,OBJ_BIOSEQ_SEG,0,NULL,BioseqSegEditFunc,PROC_PRIORITY_DEFAULT)
@@ -435,7 +434,6 @@ extern void CombineMultipleCDS (IteM i);
extern void NewDescriptorMenuFunc (ObjMgrProcPtr ompp, BaseFormPtr bfp, Uint2 descsubtype);
extern Boolean PropagateFromGenBankBioseqSet (SeqEntryPtr sep, Boolean ask);
-extern CharPtr MergeValNodeStrings (ValNodePtr list, Boolean useReturn);
extern int LIBCALLBACK SortByVnpChoice (VoidPtr ptr1, VoidPtr ptr2);
extern void PrepareToConvertToCDS (SeqEntryPtr sep, Uint2 entityID,
Uint2 subtype, CharPtr findthis);
@@ -449,23 +447,21 @@ extern void ChangeGenBankNameToLocal (IteM i);
extern void RemoveGBIDsFromBioseqs (IteM i);
extern void RemoveGBIDsFromProteins (IteM i);
extern void RemoveGIsFromBioseqs (IteM i);
-extern CharPtr MergeValNodeStrings (ValNodePtr list, Boolean useReturn);
extern void CommonApplyToAllProc (BaseFormPtr bfp, Int2 type);
extern void ApplyTitle (IteM i);
extern void ApplyCDS (IteM i);
extern void ApplyRRNA (IteM i);
extern void ApplyImpFeat (IteM i);
-extern void AdjustCDSLocationsForUnknownGapsCallback (SeqFeatPtr sfp, Pointer userdata);
extern void AdjustCDSLocationsForKnownAndUnknownGapsCallback (SeqFeatPtr sfp, Pointer userdata);
extern void AdjustFeaturesForGaps (IteM i);
extern void LoadTPAAccessionNumbersFromFile (IteM i);
extern void LoadSecondaryAccessionNumbersFromFile (IteM i);
extern void LoadHistoryAccessionNumbersFromFile (IteM i);
extern void LoadOrganismModifierTable (IteM i);
+extern void LoadTaxConsult (IteM i);
extern void ExportOrganismTable (IteM i);
extern void LoadFeatureQualifierTable (IteM i);
-extern CharPtr GetModifierPopupPositionName (Int2 val);
extern void AddCodonListTotRNA (tRNAPtr trna, ValNodePtr codons);
@@ -807,13 +803,6 @@ extern void LogCDSAmbiguousFrame (LogInfoPtr lip, SeqFeatPtr sfp);
extern void LoadGenomeProjectIDsFromFile (IteM i);
extern void RemoveEmptyGenomeProjectIDs (IteM i);
-typedef struct sourcequaldesc
-{
- CharPtr name;
- Boolean isOrgMod;
- Uint1 subtype;
-} SourceQualDescData, PNTR SourceQualDescPtr;
-
extern CharPtr SourceQualValNodeName (ValNodePtr vnp);
extern ValNodePtr SourceQualValNodeDataCopy (ValNodePtr vnp);
extern Boolean SourceQualValNodeMatch (ValNodePtr vnp1, ValNodePtr vnp2);
@@ -888,7 +877,7 @@ extern void ExportLastLineage (IteM i);
#define LOCATION_CONSTRAINT_NUC_SEQ 2
#define LOCATION_CONSTRAINT_PROT_SEQ 3
-typedef struct locationconstraint
+typedef struct LocationConstraintX
{
Int4 left;
Int4 right;
@@ -896,7 +885,7 @@ typedef struct locationconstraint
Int4 match_choice;
Int4 strand;
Int4 sequence_type;
-} LocationConstraintData, PNTR LocationConstraintPtr;
+} LocationConstraintXData, PNTR LocationConstraintXPtr;
typedef enum
{
@@ -914,9 +903,9 @@ typedef struct stringconstraint
Boolean insensitive;
Boolean whole_word;
Boolean not_present;
-} StringConstraintData, PNTR StringConstraintPtr;
+} StringConstraintData, PNTR StringConstraintXPtr;
-extern StringConstraintPtr StringConstraintFree (StringConstraintPtr scp);
+extern StringConstraintXPtr StringConstraintXFree (StringConstraintXPtr scp);
typedef struct pseudoconstraint
{
@@ -935,7 +924,7 @@ typedef struct choiceconstraint
Int4 constraint_type;
ValNodePtr qual_choice;
ValNodePtr qual_choice_match;
- StringConstraintPtr string_constraint;
+ StringConstraintXPtr string_constraint;
PseudoConstraintPtr pseudo_constraint;
FreeValNodeProc free_vn_proc;
CopyValNodeDataProc copy_vn_proc;
@@ -943,20 +932,38 @@ typedef struct choiceconstraint
extern ChoiceConstraintPtr ChoiceConstraintFree (ChoiceConstraintPtr scp);
+typedef struct sequenceconstraint
+{
+ Boolean nucs_ok;
+ Boolean prots_ok;
+
+ Int4 other_constraint_type;
+ StringConstraintXPtr string_constraint;
+ ChoiceConstraintPtr source_constraint;
+ ValNodePtr feature_list;
+
+} SequenceConstraintXData, PNTR SequenceConstraintXPtr;
+
+extern SequenceConstraintXPtr SequenceConstraintXFree (SequenceConstraintXPtr scp);
+extern DialoG SequenceConstraintXDialog (GrouP g);
+extern Boolean DoesSequenceMatchSequenceConstraintX (BioseqPtr bsp, SequenceConstraintXPtr scp);
+
+
+
typedef struct filterset
{
- StringConstraintPtr scp;
+ StringConstraintXPtr scp;
ChoiceConstraintPtr ccp;
- LocationConstraintPtr lcp;
+ LocationConstraintXPtr lcp;
ChoiceConstraintPtr cgp;
- StringConstraintPtr id_list;
+ StringConstraintXPtr id_list;
} FilterSetData, PNTR FilterSetPtr;
extern void FilterSetClearText (FilterSetPtr fsp);
extern FilterSetPtr FilterSetNew (void);
extern FilterSetPtr FilterSetFree (FilterSetPtr fsp);
-extern Boolean DoesStringMatchConstraint (CharPtr pchSource, StringConstraintPtr scp);
+extern Boolean DoesStringMatchConstraintX (CharPtr pchSource, StringConstraintXPtr scp);
typedef CharPtr (*GetFeatureFieldString) PROTO ((SeqFeatPtr, ValNodePtr, FilterSetPtr));
typedef void (*SetFeatureFieldString) PROTO ((SeqFeatPtr, Pointer, FilterSetPtr));
@@ -999,18 +1006,18 @@ typedef struct textportion
CharPtr end_text;
Boolean insensitive;
Boolean whole_word;
-} TextPortionData, PNTR TextPortionPtr;
+} TextPortionXData, PNTR TextPortionXPtr;
-extern TextPortionPtr TextPortionFree (TextPortionPtr tp);
+extern TextPortionXPtr TextPortionXFree (TextPortionXPtr tp);
extern void
-FindTextPortionInString
+FindTextPortionXInString
(CharPtr str,
- TextPortionPtr tp,
+ TextPortionXPtr tp,
CharPtr PNTR ploc,
Int4Ptr plen);
-extern DialoG TextPortionDialogEx (GrouP h, Boolean inside, Nlm_ChangeNotifyProc change_notify, Pointer change_userdata);
-extern DialoG TextPortionDialog (GrouP h);
+extern DialoG TextPortionXDialogEx (GrouP h, Boolean inside, Nlm_ChangeNotifyProc change_notify, Pointer change_userdata);
+extern DialoG TextPortionXDialog (GrouP h);
#define CONVERT_TYPE_MOVE 0
#define CONVERT_TYPE_COPY 1
@@ -1031,13 +1038,13 @@ typedef struct convertfield
RemoveDescriptorFieldString remove_d_str_func;
NameFromValNodeProc name_field_func;
FilterSetPtr fsp;
- TextPortionPtr text_portion;
+ TextPortionXPtr text_portion;
Boolean strip_name_from_text;
Boolean remove_parsed;
} ConvertFieldData, PNTR ConvertFieldPtr;
-extern DialoG StringConstraintDialog (GrouP h, CharPtr label, Boolean clear_btn);
-extern DialoG LocationConstraintDialog (GrouP h, Boolean show_interval_controls, Boolean clear_btn);
+extern DialoG StringConstraintDialogX (GrouP h, CharPtr label, Boolean clear_btn);
+extern DialoG LocationConstraintXDialog (GrouP h, Boolean show_interval_controls, Boolean clear_btn);
enum pub_field_nums
{
@@ -1235,7 +1242,7 @@ ConstraintChoiceDialog
CharPtr text_name,
Boolean clear_btn,
Boolean use_pseudo);
-extern DialoG SourceConstraintDialog (GrouP h, Boolean clear_btn);
+extern DialoG SourceConstraintDialogX (GrouP h, Boolean clear_btn);
extern Boolean DoesOneSourceMatchConstraint (BioSourcePtr biop, ChoiceConstraintPtr scp);
extern DialoG CDSGeneProtConstraintDialog (GrouP h, Boolean clear_btn);
extern DialoG
@@ -1259,6 +1266,12 @@ typedef struct parsefield
extern ParseFieldPtr ParseFieldFree (ParseFieldPtr pfp);
+extern DialoG ParseFieldDestDialogEx
+(GrouP h,
+ Nlm_ChangeNotifyProc change_notify,
+ Pointer change_userdata,
+ Boolean is_search_field,
+ Boolean include_dbxref);
extern DialoG ParseFieldDestDialog
(GrouP h,
Nlm_ChangeNotifyProc change_notify,
@@ -1452,7 +1465,7 @@ extern void ConvertCodingRegionsWithInternalKnownGapToMiscFeat (IteM i);
extern void FixOneAlignmentOverGaps (SeqAlignPtr salp, Uint2 entityID);
extern void ConsolidateSegmentsOverKnownLengthGaps (SeqAlignPtr salp);
-extern void CreateDiscrepancyReportWindow ();
+extern void CreateDiscrepancyReportWindow (void);
extern void ScrollToDiscrepancyItem (ValNodePtr vnp, Pointer userdata);
extern void EditDiscrepancyItem (ValNodePtr vnp, Pointer userdata);
extern void WriteClickableListReport (FILE *fp, ValNodePtr discrepancy_list, Boolean show_all, Boolean use_feature_table_fmt);
@@ -1462,9 +1475,8 @@ extern void ChangeKnownGapLength (IteM i);
extern void AddFlankingNsToKnownLengthGaps (IteM i);
extern Int2 GetSequinAppParam (CharPtr section, CharPtr type, CharPtr dflt, CharPtr buf, Int2 buflen);
-extern Boolean DoBioseqFeaturesMatchSequenceConstraint (BioseqPtr bsp, ValNodePtr feat_list, StringConstraintPtr scp);
-extern Boolean DoesIDListMeetStringConstraint (SeqIdPtr sip, StringConstraintPtr string_constraint);
-extern void ResetCapitalization (Boolean first_is_upper, CharPtr pString);
+extern Boolean DoBioseqFeaturesMatchSequenceConstraintX (BioseqPtr bsp, ValNodePtr feat_list, StringConstraintXPtr scp);
+extern Boolean DoesIDListMeetStringConstraint (SeqIdPtr sip, StringConstraintXPtr string_constraint);
extern Int2 LIBCALLBACK ReorderSetByAccession (Pointer data);
extern Int2 LIBCALLBACK CopyDescriptorToList (Pointer data);
@@ -1516,7 +1528,7 @@ extern void MakeGeneralIDsFromLocusTags (IteM i);
extern void ShowClickableItemList (ValNodePtr clickable_list, BaseFormPtr bfp, CharPtr win_title, CharPtr label1, CharPtr label2);
extern Int4 CountChosenDiscrepancies (ValNodePtr discrepancy_list, Boolean count_all);
-extern void AddTranslExcept (SeqFeatPtr sfp, CharPtr cds_comment, Boolean use_strict);
+extern void AddTranslExcept (SeqFeatPtr sfp, CharPtr cds_comment, Boolean use_strict, Boolean extend);
enum table_data_errors
{
@@ -1603,17 +1615,20 @@ ConvertOneCDSToMiscFeat
extern void SuppressGenesOnFeaturesInsideMobileElements (IteM i);
-extern Int4 GetDeltaSeqLen (DeltaSeqPtr dsp);
extern BaseFormPtr GetBaseFormForEntityID (Uint2 entityID);
extern ValNodePtr ParseAccessionNumberListFromString (CharPtr list_str, SeqEntryPtr sep);
-extern SeqIdPtr CreateSeqIdFromText (CharPtr id_str, SeqEntryPtr sep);
extern SubSourcePtr FindBadLatLon (BioSourcePtr biop);
extern DialoG LatLonTestResultsDisplay (GrouP h);
extern void LatLonTool (IteM i);
extern DialoG SpecificHostResultsDisplay (GrouP h);
extern void FixSpecificHostValues (IteM i);
+extern DialoG LatLonCountryResultsDisplay (GrouP h);
+extern Pointer GetLatLonCountryCorrection (Uint1 data_choice, Pointer data, Pointer metadata);
+extern void LatLonCountryTool (IteM i);
+extern DialoG CountryTestResultsDisplay (GrouP h, Pointer metadata);
+extern void CountryFixupTool (IteM i);
extern void SetTransgenicOnSourceDescWhenSourceFeatPresent (IteM i);
extern void SetFocusOnSourceDescWhenSourceFeatPresent (IteM i);
@@ -1624,7 +1639,7 @@ extern const char *nucleotide_alphabet;
extern const char *protein_alphabet;
extern DialoG AlnSettingsDlg (GrouP h, Boolean allow_sequence_type);
-extern TSequenceInfoPtr GetDefaultSequenceInfo ();
+extern TSequenceInfoPtr GetDefaultSequenceInfo (void);
extern TSequenceInfoPtr GetAlignmentOptions (Uint1Ptr moltype, TSequenceInfoPtr sequence_info);
@@ -1634,6 +1649,85 @@ extern SeqFeatPtr GetGeneForFeature (SeqFeatPtr sfp);
extern void LoadFeatureFieldTable (IteM i);
+/* structure used for taxname options for loading values froma table or the Apply/Edit/Convert/Remove dialogs */
+typedef struct taxnameoptions {
+ Boolean remove_taxref;
+ Boolean remove_old_name;
+ Boolean remove_common;
+} TaxnameOptionsData, PNTR TaxnameOptionsPtr;
+
+extern void ApplyTaxnameOptionsToBioSource (BioSourcePtr biop, TaxnameOptionsPtr top);
+extern DialoG TaxnameOptionsDialog (GrouP h, Nlm_ChangeNotifyProc change_notify, Pointer change_userdata);
+
+extern void CleanTableLine (CharPtr line);
+
+extern void ApplyTagToCodingRegionsInSourceFeatures (IteM i);
+extern Boolean EntityIDAlreadyInList (Uint2 entityID, ValNodePtr entityIDList);
+
+extern void ResolveFeatureOverlaps (IteM i);
+extern void ConvertGeneralIdToLocalID (IteM i);
+
+extern void UpdateFeatures (IteM i);
+
+extern void AbbreviateCitSubAffilStates (IteM i);
+extern void RemoveQualityScores (BioseqPtr bsp, FILE *log_fp, BoolPtr data_in_log);
+extern void NewLoadFeatureQualifierTable (IteM i);
+extern void ListAllSequences (BioseqPtr bsp, Pointer userdata);
+extern void ChooseCategories (ValNodePtr value_list, Boolean do_choose);
+extern void ChooseCategoriesByStringConstraint (ValNodePtr value_list, StringConstraintXPtr scp, Boolean do_choose);
+extern void CapitalizeFirstLetterOfEveryWord (CharPtr pString);
+
+typedef void (*BulkSetFieldFunc) PROTO ((Pointer, Pointer));
+typedef Pointer (*BulkSetFieldStringFunc) PROTO ((Pointer, ApplyValuePtr));
+typedef Pointer (*BulkGetFieldFunc) PROTO ((Uint1, Pointer, Pointer));
+typedef CharPtr (*BulkDisplayFieldFunc) PROTO ((Pointer));
+typedef void (*BulkFreeFieldFunc) PROTO ((Pointer));
+typedef DialoG (*BulkCreateDlgFunc) PROTO ((GrouP, CharPtr, SeqEntryPtr));
+typedef Int4 (*BulkFormatColumnFunc) PROTO ((ColPtr, CharPtr));
+typedef void (*BulkDrawColumnFunc) PROTO ((Pointer, RectPtr));
+typedef Pointer (*BulkReleaseCellFunc) PROTO ((Pointer));
+typedef Pointer (*BulkCopyFieldFunc) PROTO ((Pointer));
+
+typedef struct bulkedfield {
+ CharPtr name;
+ BulkSetFieldFunc set_func;
+ BulkSetFieldStringFunc set_str_func;
+ BulkGetFieldFunc get_func;
+ BulkDisplayFieldFunc display_func;
+ BulkFreeFieldFunc free_func;
+ BulkCreateDlgFunc create_dlg_func;
+ BulkFormatColumnFunc format_col_func;
+ BulkDrawColumnFunc draw_col_func;
+ BulkReleaseCellFunc release_cell_func;
+ BulkCopyFieldFunc copy_func;
+} BulkEdFieldData, PNTR BulkEdFieldPtr;
+
+NLM_EXTERN Pointer BulkSetSimpleTextString (Pointer curr_val, ApplyValuePtr avp);
+NLM_EXTERN CharPtr BulkDisplaySimpleText (Pointer data);
+NLM_EXTERN void BulkFreeSimpleText (Pointer data);
+NLM_EXTERN Int4 BulkFormatSimpleText (ColPtr col, CharPtr name);
+NLM_EXTERN Pointer BulkSimpleTextCopy (Pointer data);
+NLM_EXTERN DialoG BulkSimpleTextDialog (GrouP g, CharPtr name, SeqEntryPtr sep);
+
+NLM_EXTERN void BulkEditorObjectList (Uint2 entityID, CharPtr title, ValNodePtr feat_list, BulkEdFieldPtr field_list);
+NLM_EXTERN DialoG
+CreateBulkEditorDialog
+(GrouP h,
+ BulkEdFieldPtr field_list,
+ ValNodePtr feat_list,
+ SeqEntryPtr sep,
+ Boolean collapse_by_default,
+ ClickableCallback single_click_func,
+ ClickableCallback double_click_func);
+
+NLM_EXTERN void RevCompOneFeatForBioseq (SeqFeatPtr sfp, BioseqPtr bsp);
+NLM_EXTERN void FlipSequenceIntervals (IteM i);
+
+#ifdef OS_MSWIN
+NLM_EXTERN Int4 RunSilent(const char *cmdline);
+#endif
+
+
#ifdef __cplusplus
}
#endif
diff --git a/sequin/sequin1.c b/sequin/sequin1.c
index 06cffe29..387f6d33 100644
--- a/sequin/sequin1.c
+++ b/sequin/sequin1.c
@@ -29,7 +29,7 @@
*
* Version Creation Date: 1/22/95
*
-* $Revision: 6.622 $
+* $Revision: 6.653 $
*
* File Description:
*
@@ -92,6 +92,7 @@ static char *time_of_compilation = "now";
#include <tax3api.h>
#include <validerr.h>
#include <algo/blast/api/blast_api.h>
+#include <findrepl.h>
/* USE_SMARTNET */
#ifdef USE_SMARTNET
@@ -130,7 +131,7 @@ static char *time_of_compilation = "now";
#include <Gestalt.h>
#endif
-#define SEQ_APP_VER "7.70"
+#define SEQ_APP_VER "8.03"
#ifndef CODECENTER
static char* sequin_version_binary = "Sequin Indexer Services Version " SEQ_APP_VER " " __DATE__ " " __TIME__;
@@ -147,6 +148,7 @@ extern EnumFieldAssoc biosource_genome_simple_alist [];
Boolean useDesktop = FALSE;
Boolean useEntrez = FALSE;
Boolean useSeqFetch = FALSE;
+Boolean useIdLookup = FALSE;
Boolean useLocal = FALSE;
Boolean useBlast = FALSE;
Boolean useMedarch = FALSE;
@@ -306,7 +308,7 @@ static Boolean strictLatLonCountry = FALSE;
static Int4 SMWriteBioseqObj(VoidPtr bio_data, SMUserDataPtr sm_usr_data,
VoidPtr data);
static Int4 SMReadBioseqObj(VoidPtr data, CharPtr buffer,
- Int4 length, Int4 fd);
+ Int4 length, void* fd);
#define SMART_KEY 1313
#define DUMB_KEY 1314
#endif
@@ -391,6 +393,9 @@ static void CheckForCookedBioseqs (SeqEntryPtr sep, Pointer mydata, Int4 index,
}
}
+static void TaxonValidate (SeqEntryPtr sep, ValidStructPtr vsp);
+
+
static Boolean OkayToWriteTheEntity (Uint2 entityID, ForM f)
{
@@ -406,6 +411,9 @@ static Boolean OkayToWriteTheEntity (Uint2 entityID, ForM f)
if (entityID < 1) return FALSE;
sep = GetTopSeqEntryForEntityID (entityID);
if (sep == NULL) return FALSE;
+
+ if (!FixSpecialCharacters (entityID)) return FALSE;
+
if (GetSequinAppParam ("PREFERENCES", "ASKBEFOREVALIDATE", NULL, str, sizeof (str))) {
if (StringICmp (str, "TRUE") == 0) {
if (! (subtoolMode ||smartnetMode || backupMode) ) {
@@ -424,15 +432,34 @@ static Boolean OkayToWriteTheEntity (Uint2 entityID, ForM f)
}
if (indexerVersion) {
vsp->alwaysRequireIsoJTA = TRUE;
+ if (smartnetMode) {
+ vsp->farFetchCDSproducts = TRUE;
+ vsp->farFetchMRNAproducts = TRUE;
+ }
}
oldErrSev = ErrSetMessageLevel (SEV_MAX);
vsp->validateAlignments = TRUE;
vsp->alignFindRemoteBsp = TRUE;
vsp->doSeqHistAssembly = FALSE;
+ if (smartnetMode) {
+ vsp->doSeqHistAssembly = TRUE;
+ vsp->farIDsInAlignments = TRUE;
+ if (useEntrez) {
+ /*
+ LookupFarSeqIDs (sep, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE);
+ vsp->inferenceAccnCheck = TRUE;
+ */
+ }
+ vsp->testLatLonSubregion = testLatLonSubregion;
+ vsp->strictLatLonCountry = strictLatLonCountry;
+ }
for (j = 0; j < 6; j++) {
vsp->errors [j] = 0;
}
ValidateSeqEntry (sep, vsp);
+ if (indexerVersion && useEntrez) {
+ TaxonValidate (sep, vsp);
+ }
ErrSetMessageLevel (oldErrSev);
ErrClear ();
ErrShow ();
@@ -1269,6 +1296,10 @@ static void SmartnetDoneFunc (BaseFormPtr bfp)
omudp = ObjMgrGetUserData(bfp->input_entityID, 0, 0, SMART_KEY);
if (omudp == NULL) return;
+
+ /* for now set dirty flag to force validation in OkayToWriteTheEntity */
+ ObjMgrSetDirtyFlag (bfp->input_entityID, TRUE);
+
omdp = ObjMgrGetData (bfp->input_entityID);
sm_usr_data = (SMUserDataPtr) omudp->userdata.ptrvalue;
@@ -1558,6 +1589,9 @@ static void ProcessDoneButton (ForM f)
vsp->errors [j] = 0;
}
ValidateSeqEntry (sep, vsp);
+ if (indexerVersion && useEntrez) {
+ TaxonValidate (sep, vsp);
+ }
ErrSetMessageLevel (oldErrSev);
ErrClear ();
ErrShow ();
@@ -1603,6 +1637,9 @@ static void ProcessDoneButton (ForM f)
}
vsp->errfunc = ValidErrCallback;
ValidateSeqEntry (sep, vsp);
+ if (indexerVersion && useEntrez) {
+ TaxonValidate (sep, vsp);
+ }
ErrSetMessageLevel (oldErrSev);
ErrSetHandler (oldErrHook);
ErrClear ();
@@ -1828,8 +1865,10 @@ static void ReportBadSpecificHostValues (SeqEntryPtr sep, ValidStructPtr vsp)
{
ValNodePtr bad_biop_list, vnp;
ObjValNodePtr ovp;
+ BioSourcePtr biop;
+ OrgModPtr mod;
- bad_biop_list = Taxon3CheckSpecificHostInSeqEntry (sep, TRUE);
+ bad_biop_list = Taxon3CheckSpecificHostInSeqEntry (sep, TRUE, FALSE);
for (vnp = bad_biop_list; vnp != NULL; vnp = vnp->next)
{
@@ -1837,6 +1876,8 @@ static void ReportBadSpecificHostValues (SeqEntryPtr sep, ValidStructPtr vsp)
vsp->descr = NULL;
vsp->bsp = NULL;
vsp->bssp = NULL;
+ biop = NULL;
+ mod = NULL;
if (vnp->choice == OBJ_SEQFEAT)
{
@@ -1852,6 +1893,7 @@ static void ReportBadSpecificHostValues (SeqEntryPtr sep, ValidStructPtr vsp)
{
vsp->bssp = vsp->sfp->idx.parentptr;
}
+ biop = (BioSourcePtr) vsp->sfp->data.value.ptrvalue;
}
else if (vnp->choice == OBJ_SEQDESC)
{
@@ -1872,13 +1914,27 @@ static void ReportBadSpecificHostValues (SeqEntryPtr sep, ValidStructPtr vsp)
vsp->bssp = ovp->idx.parentptr;
}
}
+ biop = vsp->descr->data.ptrvalue;
}
- ValidErr (vsp, SEV_WARNING, ERR_SEQ_DESCR_TaxonomyLookupProblem, "Invalid value for specific host");
+ if (biop != NULL && biop->org != NULL && biop->org->orgname != NULL)
+ {
+ mod = biop->org->orgname->mod;
+ while (mod != NULL && mod->subtype != ORGMOD_nat_host)
+ {
+ mod = mod->next;
+ }
+ if (mod != NULL)
+ {
+ ValidErr (vsp, SEV_WARNING, ERR_SEQ_DESCR_BadSpecificHost, "Invalid value for specific host: %s", mod->subname);
+ }
+ }
}
bad_biop_list = ValNodeFree (bad_biop_list);
}
+static Boolean log_tax_asn = FALSE;
+static Boolean log_tax_set = FALSE;
static void TaxonValidate (SeqEntryPtr sep, ValidStructPtr vsp)
@@ -1930,11 +1986,29 @@ static void TaxonValidate (SeqEntryPtr sep, ValidStructPtr vsp)
last = vnp2;
}
+#ifdef OS_UNIX
+ if (! log_tax_set) {
+ str = (CharPtr) getenv ("LOG_TAX_ASN");
+ if (StringDoesHaveText (str)) {
+ if (StringICmp (str, "TRUE") == 0) {
+ log_tax_asn = TRUE;
+ }
+ }
+ log_tax_set = TRUE;
+ }
+#endif
+
sev = ErrSetMessageLevel (SEV_WARNING);
+ if (log_tax_asn) {
+ LaunchAsnTextViewer ((Pointer) t3rq, (AsnWriteFunc) Taxon3RequestAsnWrite, "tax3 request");
+ }
t3ry = Tax3SynchronousQuery (t3rq);
ErrSetMessageLevel (sev);
Taxon3RequestFree (t3rq);
if (t3ry == NULL) return;
+ if (log_tax_asn) {
+ LaunchAsnTextViewer ((Pointer) t3ry, (AsnWriteFunc) Taxon3ReplyAsnWrite, "tax3 result");
+ }
for (trp = t3ry->reply, vnp = srclist.head;
trp != NULL && vnp != NULL;
@@ -2038,7 +2112,7 @@ static void TaxonValidate (SeqEntryPtr sep, ValidStructPtr vsp)
ReportBadSpecificHostValues (sep, vsp);
}
-static void ValSeqEntryFormEx (ForM f, Boolean doAligns, Int2 limit)
+static void ValSeqEntryFormEx (ForM f, Boolean doAligns, Int2 limit, Boolean inferenceAccnCheck)
{
Boolean allRawOrSeg = TRUE;
@@ -2102,7 +2176,7 @@ static void ValSeqEntryFormEx (ForM f, Boolean doAligns, Int2 limit)
}
}
}
- if (useEntrez) {
+ if (useEntrez && inferenceAccnCheck) {
LookupFarSeqIDs (sep, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE);
vsp->inferenceAccnCheck = TRUE;
}
@@ -2142,16 +2216,61 @@ static void ValSeqEntryFormEx (ForM f, Boolean doAligns, Int2 limit)
}
}
+static void CountInfAccnVer (SeqFeatPtr sfp, Pointer userdata)
+
+{
+ Int4Ptr countP;
+ GBQualPtr gbq;
+
+ if (sfp == NULL || userdata == NULL) return;
+ countP = (Int4Ptr) userdata;
+
+ for (gbq = sfp->qual; gbq != NULL; gbq = gbq->next) {
+ if (StringICmp (gbq->qual, "inference") == 0) {
+ (*countP)++;
+ }
+ }
+}
+
+static Boolean SmallInferenceAccnVer (ForM f)
+
+{
+ BaseFormPtr bfp;
+ Int4 count = 0;
+ SeqEntryPtr sep;
+
+ bfp = (BaseFormPtr) GetObjectExtra (f);
+ if (bfp == NULL) return FALSE;
+
+ sep = GetTopSeqEntryForEntityID (bfp->input_entityID);
+ if (sep == NULL) return FALSE;
+
+ VisitFeaturesInSep (sep, (Pointer) &count, CountInfAccnVer);
+
+ if (count < 100) return TRUE;
+
+ if (indexerVersion) {
+ Message (MSG_POST, "Validation skipping %ld inference accession.version tests",
+ (long) count);
+ }
+
+ return FALSE;
+}
+
extern void ValSeqEntryForm (ForM f)
{
- ValSeqEntryFormEx (f, TRUE, VALIDATE_ALL);
+ Boolean inferenceAccnCheck;
+
+ inferenceAccnCheck = SmallInferenceAccnVer (f);
+ ValSeqEntryFormEx (f, TRUE, VALIDATE_ALL, inferenceAccnCheck);
}
static void ValSeqEntryProc (IteM i)
{
BaseFormPtr bfp;
+ Boolean inferenceAccnCheck;
#ifdef WIN_MAC
bfp = (BaseFormPtr) currentFormDataPtr;
@@ -2159,7 +2278,8 @@ static void ValSeqEntryProc (IteM i)
bfp = (BaseFormPtr) GetObjectExtra (i);
#endif
if (bfp != NULL) {
- ValSeqEntryForm (bfp->form);
+ inferenceAccnCheck = SmallInferenceAccnVer (bfp->form);
+ ValSeqEntryFormEx (bfp->form, TRUE, VALIDATE_ALL, inferenceAccnCheck);
}
}
@@ -2174,7 +2294,22 @@ static void ValSeqEntryProcNoAln (IteM i)
bfp = (BaseFormPtr) GetObjectExtra (i);
#endif
if (bfp != NULL) {
- ValSeqEntryFormEx (bfp->form, FALSE, VALIDATE_ALL);
+ ValSeqEntryFormEx (bfp->form, FALSE, VALIDATE_ALL, FALSE);
+ }
+}
+
+static void ValSeqEntryProcInfAccn (IteM i)
+
+{
+ BaseFormPtr bfp;
+
+#ifdef WIN_MAC
+ bfp = (BaseFormPtr) currentFormDataPtr;
+#else
+ bfp = (BaseFormPtr) GetObjectExtra (i);
+#endif
+ if (bfp != NULL) {
+ ValSeqEntryFormEx (bfp->form, FALSE, VALIDATE_ALL, TRUE);
}
}
@@ -2189,7 +2324,7 @@ static void ValSeqEntryProcSpec (IteM i, Int2 limit)
bfp = (BaseFormPtr) GetObjectExtra (i);
#endif
if (bfp != NULL) {
- ValSeqEntryFormEx (bfp->form, FALSE, limit);
+ ValSeqEntryFormEx (bfp->form, FALSE, limit, FALSE);
}
}
@@ -4021,7 +4156,7 @@ replaced by the actual characters from the first sequence.";
const char *nucleotide_alphabet = "ABCDGHKMRSTUVWYabcdghkmrstuvwy";
const char *protein_alphabet = "ABCDEFGHIKLMPQRSTUVWXYZabcdefghiklmpqrstuvwxyz";
-extern TSequenceInfoPtr GetDefaultSequenceInfo ()
+extern TSequenceInfoPtr GetDefaultSequenceInfo (void)
{
TSequenceInfoPtr sequence_info = SequenceInfoNew();
@@ -5661,76 +5796,13 @@ static void DuplicateViewProc (IteM i)
}
}
-extern SeqEntryPtr RestoreFromFile (CharPtr path);
-extern SeqEntryPtr RestoreFromFile (CharPtr path)
-
-{
- BioseqPtr bsp;
- BioseqSetPtr bssp;
- Pointer dataptr;
- Uint2 datatype;
- Uint2 entityID;
- SeqEntryPtr rsult;
- SeqEntryPtr sep;
-
- rsult = NULL;
- if (path != NULL && path [0] != '\0') {
- dataptr = ObjMgrGenericAsnTextFileRead (path, &datatype, &entityID);
- if (dataptr != NULL && entityID > 0) {
- if (datatype == OBJ_SEQSUB || datatype == OBJ_SEQENTRY ||
- datatype == OBJ_BIOSEQ || datatype == OBJ_BIOSEQSET) {
- WatchCursor ();
- sep = GetTopSeqEntryForEntityID (entityID);
- if (sep == NULL) {
- sep = SeqEntryNew ();
- if (sep != NULL) {
- if (datatype == OBJ_BIOSEQ) {
- bsp = (BioseqPtr) dataptr;
- sep->choice = 1;
- sep->data.ptrvalue = bsp;
- SeqMgrSeqEntry (SM_BIOSEQ, (Pointer) bsp, sep);
- } else if (datatype == OBJ_BIOSEQSET) {
- bssp = (BioseqSetPtr) dataptr;
- sep->choice = 2;
- sep->data.ptrvalue = bssp;
- SeqMgrSeqEntry (SM_BIOSEQSET, (Pointer) bssp, sep);
- } else {
- sep = SeqEntryFree (sep);
- }
- }
- sep = GetTopSeqEntryForEntityID (entityID);
- }
- if (sep != NULL) {
- rsult = SeqEntryNew ();
- if (rsult != NULL) {
- rsult->choice = sep->choice;
- rsult->data.ptrvalue = sep->data.ptrvalue;
- sep->data.ptrvalue = NULL;
- if (datatype == OBJ_SEQSUB) {
- SeqSubmitFree ((SeqSubmitPtr) dataptr);
- } else {
- SeqEntryFree (sep);
- }
- /*Message (MSG_OK, "Call new object manager free function");*/
- }
- }
- ArrowCursor ();
- }
- /*
- ObjMgrDelete (entityID);
- */
- }
- }
- return rsult;
-}
static void RestoreSeqEntryProc (IteM i)
{
- SeqEntryPtr currsep;
BaseFormPtr bfp;
- SeqEntryPtr oldsep;
Char path [PATH_MAX];
+ Uint2 new_entityID;
#ifdef WIN_MAC
bfp = currentFormDataPtr;
@@ -5739,14 +5811,12 @@ static void RestoreSeqEntryProc (IteM i)
#endif
if (bfp != NULL && bfp->input_itemtype == OBJ_BIOSEQ) {
if (GetInputFileName (path, sizeof (path), "", "TEXT")) {
- SeqEntrySetScope (NULL);
- oldsep = RestoreFromFile (path);
- currsep = GetTopSeqEntryForEntityID (bfp->input_entityID);
- ReplaceSeqEntryWithSeqEntry (currsep, oldsep, TRUE);
- SeqEntrySetScope (NULL);
- bfp->input_entityID = ObjMgrGetEntityIDForChoice (currsep);
- ObjMgrSetDirtyFlag (bfp->input_entityID, TRUE);
- ObjMgrSendMsg (OM_MSG_UPDATE, bfp->input_entityID, 0, 0);
+ new_entityID = RestoreEntityIDFromFile (path, bfp->input_entityID);
+ if (new_entityID != 0) {
+ bfp->input_entityID = new_entityID;
+ ObjMgrSetDirtyFlag (bfp->input_entityID, TRUE);
+ ObjMgrSendMsg (OM_MSG_UPDATE, bfp->input_entityID, 0, 0);
+ }
}
}
}
@@ -6686,6 +6756,8 @@ static void BioseqViewFormMenus (WindoW w)
SetObjectExtra (i, bfp, NULL);
i = CommandItem (sub, "Validate no Alignments/ A", ValSeqEntryProcNoAln);
SetObjectExtra (i, bfp, NULL);
+ i = CommandItem (sub, "Validate check Inference", ValSeqEntryProcInfAccn);
+ SetObjectExtra (i, bfp, NULL);
SeparatorItem (sub);
i = CommandItem (sub, "Validate Inst", ValSeqEntryProcInst);
SetObjectExtra (i, bfp, NULL);
@@ -7378,10 +7450,16 @@ static void SequinSeqViewFormMessage (ForM f, Int2 mssg)
if (bfp != NULL) {
switch (mssg) {
case VIB_MSG_SAVE :
- SaveSeqSubmitProc (bfp, FALSE);
+ if (FixSpecialCharacters (bfp->input_entityID))
+ {
+ SaveSeqSubmitProc (bfp, FALSE);
+ }
break;
case VIB_MSG_SAVE_AS :
- SaveSeqSubmitProc (bfp, TRUE);
+ if (FixSpecialCharacters (bfp->input_entityID))
+ {
+ SaveSeqSubmitProc (bfp, TRUE);
+ }
break;
case VIB_MSG_CLOSE :
CloseProc (bfp);
@@ -9077,6 +9155,7 @@ static void SetupMacMenus (void)
validateMenu = SubMenu (m, "Validate");
CommandItem (validateMenu, "Validate Record/ V", ValSeqEntryProc);
CommandItem (validateMenu, "Validate no Alignments", ValSeqEntryProcNoAln);
+ CommandItem (validateMenu, "Validate check Inference", ValSeqEntryProcInfAccn);
SeparatorItem (validateMenu);
CommandItem (validateMenu, "Validate Inst", ValSeqEntryProcInst);
CommandItem (validateMenu, "Validate Hist", ValSeqEntryProcHist);
@@ -9804,6 +9883,7 @@ static void ReadSettings (void)
useDesktop = FALSE;
useEntrez = FALSE;
useLocal = FALSE;
+ useIdLookup = FALSE;
useBlast = FALSE;
useMedarch = FALSE;
newMedarch = FALSE;
@@ -9820,6 +9900,7 @@ static void ReadSettings (void)
useDesktop = TRUE;
useEntrez = TRUE;
useLocal = TRUE;
+ useIdLookup = TRUE;
useBlast = TRUE;
useMedarch = TRUE;
newMedarch = TRUE;
@@ -9833,6 +9914,7 @@ static void ReadSettings (void)
useDesktop = TRUE;
useEntrez = TRUE;
useLocal = TRUE;
+ useIdLookup = TRUE;
useBlast = TRUE;
useMedarch = TRUE;
newMedarch = TRUE;
@@ -9845,6 +9927,7 @@ static void ReadSettings (void)
useDesktop = TRUE;
useEntrez = TRUE;
useLocal = TRUE;
+ useIdLookup = TRUE;
useBlast = TRUE;
useMedarch = TRUE;
newMedarch = TRUE;
@@ -9856,6 +9939,7 @@ static void ReadSettings (void)
useDesktop = TRUE;
useEntrez = TRUE;
useLocal = TRUE;
+ useIdLookup = TRUE;
useBlast = TRUE;
useMedarch = TRUE;
newMedarch = TRUE;
@@ -9939,6 +10023,22 @@ static void ReadSettings (void)
if (StringICmp (str, "TRUE") == 0) {
allowDownload = FALSE;
useEntrez = FALSE;
+ useMedarch = FALSE;
+ useTaxon = FALSE;
+ }
+ }
+
+ useSeqFetch = useEntrez;
+
+ if (GetSequinAppParam ("SETTINGS", "SUPPRESSSEQFETCH", NULL, str, sizeof (str))) {
+ if (StringICmp (str, "TRUE") == 0) {
+ useSeqFetch = FALSE;
+ }
+ }
+
+ if (GetSequinAppParam ("SETTINGS", "SUPPRESSIDLOOKUP", NULL, str, sizeof (str))) {
+ if (StringICmp (str, "TRUE") == 0) {
+ useIdLookup = FALSE;
}
}
@@ -9953,6 +10053,12 @@ static void ReadSettings (void)
}
}
+ if (GetSequinAppParam ("SETTINGS", "SUPPRESSLOCAL", NULL, str, sizeof (str))) {
+ if (StringICmp (str, "TRUE") == 0) {
+ useLocal = FALSE;
+ }
+ }
+
if (GetSequinAppParam ("SETTINGS", "GENOMETAG", NULL, str, sizeof (str))) {
TrimSpacesAroundString (str);
if (! StringHasNoText (str)) {
@@ -10140,7 +10246,7 @@ extern Pointer ReadFromDirSub (CharPtr accn, Uint2Ptr datatype, Uint2Ptr entityI
#endif
#ifdef OS_MSWIN
sprintf (cmmd, "%s %s -o %s", dirsubfetchcmd, accn, path);
- system (cmmd);
+ RunSilent (cmmd);
#endif
fp = FileOpen (path, "r");
@@ -10197,7 +10303,7 @@ static Int2 LIBCALLBACK DirSubBioseqFetchFunc (Pointer data)
#endif
#ifdef OS_MSWIN
sprintf (cmmd, "%s %s -o %s", dirsubfetchcmd, tsip->accession, path);
- system (cmmd);
+ RunSilent (cmmd);
#endif
fp = FileOpen (path, "r");
@@ -10265,7 +10371,7 @@ extern Pointer ReadFromSmart (CharPtr accn, Uint2Ptr datatype, Uint2Ptr entityID
#endif
#ifdef OS_MSWIN
sprintf (cmmd, "%s %s -o %s", smartfetchcmd, accn, path);
- system (cmmd);
+ RunSilent (cmmd);
#endif
fp = FileOpen (path, "r");
@@ -10323,7 +10429,7 @@ static Int2 LIBCALLBACK SmartBioseqFetchFunc (Pointer data)
#endif
#ifdef OS_MSWIN
sprintf (cmmd, "%s %s -o %s", smartfetchcmd, tsip->accession, path);
- system (cmmd);
+ RunSilent (cmmd);
#endif
fp = FileOpen (path, "r");
@@ -10358,6 +10464,136 @@ static Boolean SmartFetchEnable (void)
return TRUE;
}
+static CharPtr hupfetchproc = "HUPBioseqFetch";
+
+static CharPtr hupfetchcmd = NULL;
+
+extern Pointer ReadFromHUP (CharPtr accn, Uint2Ptr datatype, Uint2Ptr entityID);
+extern Pointer ReadFromHUP (CharPtr accn, Uint2Ptr datatype, Uint2Ptr entityID)
+
+{
+ Char cmmd [256];
+ Pointer dataptr;
+ FILE* fp;
+ Char path [PATH_MAX];
+
+ if (datatype != NULL) {
+ *datatype = 0;
+ }
+ if (entityID != NULL) {
+ *entityID = 0;
+ }
+ if (! dirsubMode) return NULL;
+ if (StringHasNoText (accn)) return NULL;
+
+ if (hupfetchcmd == NULL) {
+ if (GetAppParam ("SEQUIN", "HUP", "FETCHSCRIPT", NULL, cmmd, sizeof (cmmd))) {
+ hupfetchcmd = StringSaveNoNull (cmmd);
+ }
+ }
+ if (hupfetchcmd == NULL) return NULL;
+
+ TmpNam (path);
+
+#ifdef OS_UNIX
+ sprintf (cmmd, "csh %s %s > %s", hupfetchcmd, accn, path);
+ system (cmmd);
+#endif
+#ifdef OS_MSWIN
+ sprintf (cmmd, "%s %s -o %s", hupfetchcmd, accn, path);
+ RunSilent (cmmd);
+#endif
+
+ fp = FileOpen (path, "r");
+ if (fp == NULL) {
+ FileRemove (path);
+ return NULL;
+ }
+ dataptr = ReadAsnFastaOrFlatFile (fp, datatype, entityID, FALSE, FALSE, TRUE, FALSE);
+ FileClose (fp);
+ FileRemove (path);
+ return dataptr;
+}
+
+
+static Int2 LIBCALLBACK HUPBioseqFetchFunc (Pointer data)
+
+{
+ BioseqPtr bsp;
+ Char cmmd [256];
+ Pointer dataptr;
+ Uint2 datatype;
+ Uint2 entityID;
+ FILE* fp;
+ OMProcControlPtr ompcp;
+ ObjMgrProcPtr ompp;
+ Char path [PATH_MAX];
+ SeqEntryPtr sep = NULL;
+ SeqIdPtr sip;
+ TextSeqIdPtr tsip;
+ OMUserDataPtr omudp;
+
+ ompcp = (OMProcControlPtr) data;
+ if (ompcp == NULL) return OM_MSG_RET_ERROR;
+ ompp = ompcp->proc;
+ if (ompp == NULL) return OM_MSG_RET_ERROR;
+ sip = (SeqIdPtr) ompcp->input_data;
+ if (sip == NULL) return OM_MSG_RET_ERROR;
+
+ if (sip->choice != SEQID_GENBANK) return OM_MSG_RET_ERROR;
+ tsip = (TextSeqIdPtr) sip->data.ptrvalue;
+ if (tsip == NULL || StringHasNoText (tsip->accession)) return OM_MSG_RET_ERROR;
+
+ if (hupfetchcmd == NULL) {
+ if (GetAppParam ("SEQUIN", "HUP", "FETCHSCRIPT", NULL, cmmd, sizeof (cmmd))) {
+ hupfetchcmd = StringSaveNoNull (cmmd);
+ }
+ }
+ if (hupfetchcmd == NULL) return OM_MSG_RET_ERROR;
+
+ TmpNam (path);
+
+#ifdef OS_UNIX
+ sprintf (cmmd, "csh %s %s > %s", hupfetchcmd, tsip->accession, path);
+ system (cmmd);
+#endif
+#ifdef OS_MSWIN
+ sprintf (cmmd, "%s %s -o %s", hupfetchcmd, tsip->accession, path);
+ RunSilent (cmmd);
+#endif
+
+ fp = FileOpen (path, "r");
+ if (fp == NULL) {
+ FileRemove (path);
+ return OM_MSG_RET_ERROR;
+ }
+ dataptr = ReadAsnFastaOrFlatFile (fp, &datatype, &entityID, FALSE, FALSE, TRUE, FALSE);
+ FileClose (fp);
+ FileRemove (path);
+
+ if (dataptr == NULL) return OM_MSG_RET_OK;
+
+ sep = GetTopSeqEntryForEntityID (entityID);
+ if (sep == NULL) return OM_MSG_RET_ERROR;
+ bsp = BioseqFindInSeqEntry (sip, sep);
+ ompcp->output_data = (Pointer) bsp;
+ ompcp->output_entityID = ObjMgrGetEntityIDForChoice (sep);
+
+ omudp = ObjMgrAddUserData(ompcp->output_entityID, ompp->procid, OMPROC_FETCH, 0);
+
+
+ return OM_MSG_RET_DONE;
+}
+
+static Boolean HUPFetchEnable (void)
+
+{
+ ObjMgrProcLoad (OMPROC_FETCH, hupfetchproc, hupfetchproc,
+ OBJ_SEQID, 0, OBJ_BIOSEQ, 0, NULL,
+ HUPBioseqFetchFunc, PROC_PRIORITY_DEFAULT);
+ return TRUE;
+}
+
static CharPtr tpasmartfetchproc = "TPASmartBioseqFetch";
static CharPtr tpasmartfetchcmd = NULL;
@@ -10395,7 +10631,7 @@ extern Pointer ReadFromTPASmart (CharPtr accn, Uint2Ptr datatype, Uint2Ptr entit
#endif
#ifdef OS_MSWIN
sprintf (cmmd, "%s %s -o %s", tpasmartfetchcmd, accn, path);
- system (cmmd);
+ RunSilent (cmmd);
#endif
fp = FileOpen (path, "r");
@@ -10452,7 +10688,7 @@ static Int2 LIBCALLBACK TPASmartBioseqFetchFunc (Pointer data)
#endif
#ifdef OS_MSWIN
sprintf (cmmd, "%s %s -o %s", tpasmartfetchcmd, tsip->accession, path);
- system (cmmd);
+ RunSilent (cmmd);
#endif
fp = FileOpen (path, "r");
@@ -10547,7 +10783,7 @@ static void CountBioSources (BioSourcePtr biop, Pointer userdata)
(*count)++;
}
-static Int4 SMReadBioseqObj(VoidPtr data, CharPtr buffer, Int4 length, Int4 fd)
+static Int4 SMReadBioseqObj(VoidPtr data, CharPtr buffer, Int4 length, void* fd)
{
AsnIoMemPtr aimp;
BaseFormPtr bfp;
@@ -10668,7 +10904,7 @@ static Int4 SMReadBioseqObj(VoidPtr data, CharPtr buffer, Int4 length, Int4 fd)
}
sm_user_data = MemNew(sizeof(SMUserData));
- sm_user_data->fd = fd;
+ sm_user_data->fd = (void*) fd;
sm_user_data->header = header;
if(bio_data == NULL) {
@@ -11038,8 +11274,6 @@ Int2 Main (void)
subtoolEntityID = 0;
leaveAsOldAsn = FALSE;
- useSeqFetch = useEntrez;
-
#if defined(OS_UNIX) || defined(WIN_MOTIF)
{{
Nlm_Int4 argc = GetArgc();
@@ -11090,6 +11324,10 @@ Int2 Main (void)
backupMode = TRUE;
} else if (StringCmp (argv[i], "-noseqfetch") == 0) {
useSeqFetch = FALSE;
+ } else if (StringCmp (argv[i], "-nolocalfetch") == 0) {
+ useLocal = FALSE;
+ } else if (StringCmp (argv[i], "-noseqidlookup") == 0) {
+ useIdLookup = FALSE;
}
#ifdef USE_SMARTNET
else if (StringCmp (argv[i], "-ds") == 0) {
@@ -11127,6 +11365,10 @@ Int2 Main (void)
nohelpMode = TRUE;
else if (StringCmp (argv[i], "-noseqfetch") == 0)
useSeqFetch = FALSE;
+ else if (StringCmp (argv[i], "-nolocalfetch") == 0)
+ useLocal = FALSE;
+ else if (StringCmp (argv[i], "-noseqidlookup") == 0)
+ useIdLookup = FALSE;
#ifdef USE_SMARTNET
else if (StringNCmp (argv[i], "-z", 2) == 0) {
smartnetMode = TRUE;
@@ -11253,33 +11495,64 @@ Int2 Main (void)
VSeqMgrInit (FALSE);
WatchCursor ();
-#ifdef USE_SMARTNET
- if (dirsubMode) {
- DirSubFetchEnable ();
- SmartFetchEnable ();
- TPASmartFetchEnable ();
- }
-#endif
+ /* register fetch functions */
-/*#ifdef USE_ENTREZ*/
if (useEntrez) {
/* EntrezBioseqFetchEnable ("Sequin", FALSE); */
if (useSeqFetch) {
/* ID1BioseqFetchEnable ("Sequin", FALSE); */
PubSeqFetchEnable ();
PubMedFetchEnable ();
- } else {
+ } else if (useIdLookup) {
PubSeqFetchEnableEx (FALSE, TRUE, TRUE, TRUE, TRUE);
PubMedFetchEnable ();
}
}
-/*#endif*/
-/*#ifdef USE_LOCAL*/
+#ifdef USE_SMARTNET
+ if (dirsubMode) {
+ if (useSeqFetch) {
+ /* DirSubFetchEnable (); */
+ TPASmartFetchEnable ();
+ SmartFetchEnable ();
+ HUPFetchEnable ();
+ }
+ }
+#endif
+
if (useLocal) {
LocalSeqFetchInit (FALSE);
}
-/*#endif*/
+
+/*
+#ifdef USE_SMARTNET
+ if (dirsubMode) {
+ if (only_use_smart) {
+ SmartFetchEnable ();
+ } else {
+ DirSubFetchEnable ();
+ SmartFetchEnable ();
+ TPASmartFetchEnable ();
+ }
+ }
+#endif
+
+ if (! only_use_smart) {
+ if (useEntrez) {
+ if (useSeqFetch) {
+ PubSeqFetchEnable ();
+ PubMedFetchEnable ();
+ } else {
+ PubSeqFetchEnableEx (FALSE, TRUE, TRUE, TRUE, TRUE);
+ PubMedFetchEnable ();
+ }
+ }
+
+ if (useLocal) {
+ LocalSeqFetchInit (FALSE);
+ }
+ }
+*/
#ifdef WIN_MAC
SetDeactivate (NULL, MacDeactProc);
@@ -11639,6 +11912,9 @@ Int2 Main (void)
Remove (initSubmitForm);
Remove (formatForm);
Remove (helpForm);
+
+ FreeSqnTempFiles ();
+
ArrowCursor ();
Update ();
@@ -11732,7 +12008,7 @@ extern void MakeBadSpecificHostValueTable (IteM i)
sep = GetTopSeqEntryForEntityID (bfp->input_entityID);
if (sep == NULL) return;
- bad_biop_list = Taxon3CheckSpecificHostInSeqEntry (sep, TRUE);
+ bad_biop_list = Taxon3CheckSpecificHostInSeqEntry (sep, TRUE, FALSE);
if (bad_biop_list == NULL)
{
@@ -11747,3 +12023,300 @@ extern void MakeBadSpecificHostValueTable (IteM i)
CloseLog (lip);
lip = FreeLog (lip);
}
+
+
+typedef struct updatefeaturesform {
+ FORM_MESSAGE_BLOCK
+ DialoG new_features;
+ ValNodePtr feat_list;
+ SeqAnnotPtr sap;
+} UpdateFeaturesFormData, PNTR UpdateFeaturesFormPtr;
+
+
+static void CleanupUpdateFeaturesForm (GraphiC g, VoidPtr data)
+{
+ UpdateFeaturesFormPtr f;
+
+ f = (UpdateFeaturesFormPtr) data;
+ if (f != NULL) {
+ f->feat_list = FreeClickableList (f->feat_list);
+ f->sap = SeqAnnotFree (f->sap);
+ }
+ StdCleanupFormProc (g, data);
+}
+
+
+
+static CharPtr GetNewItemDescription (SeqFeatPtr sfp)
+{
+ CharPtr location, label, row_text;
+ Char buf[129];
+
+ location = SeqLocPrintUseBestID (sfp->location);
+ label = (CharPtr) FeatDefTypeLabel(sfp);
+
+ FeatDefLabel (sfp, buf, sizeof (buf) - 1, OM_LABEL_CONTENT);
+
+ row_text = (CharPtr) MemNew (sizeof (Char) *
+ (StringLen (label)
+ + StringLen (buf)
+ + StringLen (location)
+ + 6));
+ sprintf (row_text, "%s:%s:%s\n", label, buf, location);
+ location = MemFree (location);
+ return row_text;
+}
+
+
+static ClickableItemPtr PutFeaturesInOldItem (ValNodePtr item_list)
+{
+ ClickableItemPtr cip_olditems, cip;
+ ValNodePtr vnp;
+
+ cip_olditems = (ClickableItemPtr) MemNew (sizeof (ClickableItemData));
+ if (item_list == NULL) {
+ cip_olditems->description = StringSave ("No old features found");
+ cip_olditems->chosen = FALSE;
+ } else {
+ for (vnp = item_list; vnp != NULL; vnp = vnp->next) {
+ cip = (ClickableItemPtr) MemNew (sizeof (ClickableItemData));
+ cip->description = GetNewItemDescription (vnp->data.ptrvalue);
+ cip->chosen = TRUE;
+ ValNodeAddPointer (&(cip->item_list), OBJ_SEQFEAT, vnp->data.ptrvalue);
+ ValNodeAddPointer (&(cip_olditems->subcategories), 0, cip);
+ }
+ cip_olditems->description = StringSave ("Old Features (check to delete)");
+ cip_olditems->chosen = TRUE;
+ }
+ return cip_olditems;
+}
+
+
+static void MarkChosenFeatures (ValNodePtr item_list, Boolean delete_marked)
+{
+ ClickableItemPtr cip;
+ ValNodePtr vnp;
+ SeqFeatPtr sfp;
+
+ while (item_list != NULL) {
+ cip = (ClickableItemPtr) item_list->data.ptrvalue;
+ if (cip != NULL) {
+ for (vnp = cip->item_list; vnp != NULL; vnp = vnp->next) {
+ if (vnp->choice == OBJ_SEQFEAT) {
+ sfp = (SeqFeatPtr) vnp->data.ptrvalue;
+ if ((cip->chosen && delete_marked) || (!cip->chosen && !delete_marked)) {
+ sfp->idx.deleteme = TRUE;
+ }
+ }
+ }
+ }
+ item_list = item_list->next;
+ }
+}
+
+
+static void MarkChosenFeaturesForBioseqs (ValNodePtr feat_list)
+{
+ ClickableItemPtr cip, cip_new, cip_old;
+
+ if (feat_list == NULL) return;
+ cip = (ClickableItemPtr) feat_list->data.ptrvalue;
+ if (cip->item_list != NULL && cip->item_list->choice == OBJ_BIOSEQ) {
+ if (cip->subcategories != NULL) {
+ cip_new = (ClickableItemPtr) cip->subcategories->data.ptrvalue;
+ MarkChosenFeatures (cip_new->subcategories, FALSE);
+ if (cip->subcategories->next != NULL) {
+ cip_old = (ClickableItemPtr) cip->subcategories->next->data.ptrvalue;
+ MarkChosenFeatures (cip_old->subcategories, TRUE);
+ }
+ }
+ MarkChosenFeaturesForBioseqs (feat_list->next);
+ } else if (feat_list->next != NULL && feat_list->next->next == NULL && cip->item_list == NULL) {
+ cip_new = (ClickableItemPtr) feat_list->data.ptrvalue;
+ cip_old = (ClickableItemPtr) feat_list->next->data.ptrvalue;
+ MarkChosenFeatures (cip_new->subcategories, FALSE);
+ MarkChosenFeatures (cip_old->subcategories, TRUE);
+ }
+}
+
+
+static void DoUpdateFeatures (ButtoN b)
+{
+ UpdateFeaturesFormPtr f;
+
+ f = (UpdateFeaturesFormPtr) GetObjectExtra (b);
+ if (f == NULL) return;
+
+ MarkChosenFeaturesForBioseqs (f->feat_list);
+
+ SmartAttachSeqAnnotToSeqEntry (f->input_entityID, f->sap, NULL);
+ f->sap = NULL;
+
+ DeleteMarkedObjects (f->input_entityID, 0, NULL);
+ ObjMgrSetDirtyFlag (f->input_entityID, TRUE);
+ ObjMgrSendMsg (OM_MSG_UPDATE, f->input_entityID, 0, 0);
+
+ Remove (f->form);
+}
+
+
+extern void UpdateFeatures (IteM i)
+{
+ BaseFormPtr bfp;
+ SeqEntryPtr sep;
+ Pointer dataptr;
+ Uint2 datatype;
+ FILE *fp;
+ Char path [PATH_MAX];
+ SeqAnnotPtr sap;
+ SeqFeatPtr sfp;
+ ValNodePtr new_feat_list = NULL, no_bsp_list = NULL, old_item_list;
+ Int4 leftmost = -1, rightmost = -1, new_left, new_right, tmp;
+ BioseqPtr bsp, last_bsp = NULL;
+ ClickableItemPtr cip = NULL, cip_newitems = NULL, cip_olditems, cip_newfeat;
+ SeqLocPtr slp;
+ WindoW w;
+ GrouP h, g, c;
+ ButtoN b;
+ UpdateFeaturesFormPtr f;
+ Char id [42];
+
+#ifdef WIN_MAC
+ bfp = currentFormDataPtr;
+#else
+ bfp = GetObjectExtra (i);
+#endif
+ if (bfp == NULL) return;
+ sep = GetTopSeqEntryForEntityID (bfp->input_entityID);
+ if (sep == NULL) return;
+
+ path [0] = '\0';
+ if (!GetInputFileName (path, sizeof (path), "", "TEXT")) {
+ return;
+ }
+
+ fp = FileOpen (path, "r");
+ if (fp == NULL) {
+ Message (MSG_ERROR, "Unable to open file!");
+ return;
+ }
+ dataptr = ReadAsnFastaOrFlatFile (fp, &datatype, NULL, FALSE, FALSE,
+ TRUE, TRUE);
+ FileClose (fp);
+ if (dataptr == NULL || datatype != OBJ_SEQANNOT) {
+ Message (MSG_ERROR, "File does not contain feature table!");
+ return;
+ }
+
+ sap = (SeqAnnotPtr) dataptr;
+ if (sap->type != 1) {
+ Message (MSG_ERROR, "File does not contain feature table!");
+ sap = SeqAnnotFree (sap);
+ return;
+ }
+
+ // list features for each bioseq
+ for (sfp = sap->data; sfp != NULL; sfp = sfp->next) {
+ bsp = BioseqFindFromSeqLoc (sfp->location);
+ if (bsp == NULL) {
+ ValNodeAddPointer (&no_bsp_list, OBJ_SEQFEAT, sfp);
+ } else {
+ if (bsp != last_bsp) {
+ if (last_bsp != NULL) {
+ slp = SeqLocIntNew (leftmost, rightmost, Seq_strand_plus, SeqIdDup (SeqIdFindWorst (bsp->id)));
+ old_item_list = ListFeaturesOverlappingLocation (last_bsp, slp, 0, 0);
+ slp = SeqLocFree (slp);
+ cip_olditems = PutFeaturesInOldItem (old_item_list);
+ old_item_list = ValNodeFree (old_item_list);
+ ValNodeAddPointer (&(cip->subcategories), 0, cip_olditems);
+ }
+ cip = (ClickableItemPtr) MemNew (sizeof (ClickableItemData));
+ ValNodeAddPointer (&(cip->item_list), OBJ_BIOSEQ, bsp);
+
+ SeqIdWrite (SeqIdFindBest (bsp->id, SEQID_GENBANK), id, PRINTID_FASTA_LONG, sizeof (id) - 1);
+ cip->description = StringSave (id);
+ cip_newitems = (ClickableItemPtr) MemNew (sizeof (ClickableItemData));
+ cip_newitems->description = StringSave ("New Features (check to import)");
+ cip_newitems->chosen = TRUE;
+ ValNodeAddPointer (&(cip->subcategories), 0, cip_newitems);
+ last_bsp = bsp;
+ ValNodeAddPointer (&new_feat_list, 0, cip);
+ leftmost = -1;
+ rightmost = -1;
+ }
+ cip_newfeat = (ClickableItemPtr) MemNew (sizeof (ClickableItemData));
+ cip_newfeat->description = GetNewItemDescription (sfp);
+ cip_newfeat->chosen = TRUE;
+ ValNodeAddPointer (&(cip_newfeat->item_list), OBJ_SEQFEAT, sfp);
+ ValNodeAddPointer (&(cip_newitems->subcategories), 0, cip_newfeat);
+ new_left = SeqLocStart (sfp->location);
+ new_right = SeqLocStop (sfp->location);
+ if (new_left > new_right) {
+ tmp = new_left;
+ new_left = new_right;
+ new_right = tmp;
+ }
+ if (leftmost == -1 || new_left < leftmost) {
+ leftmost = new_left;
+ }
+ if (rightmost == -1 || new_right > rightmost) {
+ rightmost = new_right;
+ }
+ }
+ }
+ if (last_bsp != NULL) {
+ slp = SeqLocIntNew (leftmost, rightmost, Seq_strand_plus, SeqIdDup (SeqIdFindWorst (bsp->id)));
+ old_item_list = ListFeaturesOverlappingLocation (last_bsp, slp, 0, 0);
+ slp = SeqLocFree (slp);
+ cip_olditems = PutFeaturesInOldItem (old_item_list);
+ old_item_list = ValNodeFree (old_item_list);
+ ValNodeAddPointer (&(cip->subcategories), 0, cip_olditems);
+ }
+
+ if (no_bsp_list != NULL) {
+ Message (MSG_ERROR, "%d features in table are not found on a Bioseq in this record!", ValNodeLen (no_bsp_list));
+ no_bsp_list = ValNodeFree (no_bsp_list);
+ }
+
+ if (new_feat_list == NULL) {
+ Message (MSG_ERROR, "No features found!");
+ sap = SeqAnnotFree (sap);
+ return;
+ }
+ if (new_feat_list->next == NULL) {
+ no_bsp_list = new_feat_list;
+ cip = (ClickableItemPtr) new_feat_list->data.ptrvalue;
+ new_feat_list = cip->subcategories;
+ cip->subcategories = NULL;
+ no_bsp_list = FreeClickableList (no_bsp_list);
+ }
+
+
+ /* Now create dialog to allow user to select new features to import and existing features to delete */
+ f = (UpdateFeaturesFormPtr) MemNew (sizeof (UpdateFeaturesFormData));
+ w = FixedWindow (-50, -33, -10, -10, "Update Features", StdCloseWindowProc);
+ SetObjectExtra (w, f, CleanupUpdateFeaturesForm);
+ f->form = (ForM) w;
+ f->input_entityID = bfp->input_entityID;
+ f->feat_list = new_feat_list;
+ f->sap = sap;
+ h = HiddenGroup (w, -1, 0, NULL);
+ SetGroupSpacing (h, 10, 10);
+ g = HiddenGroup (h, 2, 0, NULL);
+ f->new_features = CreateClickableListDialog (g, "New Features (check to import)", "label1", NULL, NULL, NULL, GetDiscrepancyItemText);
+ PointerToDialog (f->new_features, new_feat_list);
+/* f->old_features = CreateClickableListDialog (g, "Old Features", "label1",
+ ScrollToDiscrepancyItem, EditDiscrepancyItem, bfp,
+ GetDiscrepancyItemText); */
+ c = HiddenGroup (h, 4, 0, NULL);
+ b = PushButton (c, "Accept", DoUpdateFeatures);
+ SetObjectExtra (b, f, NULL);
+ PushButton (c, "Cancel", StdCancelButtonProc);
+
+ AlignObjects (ALIGN_CENTER, (HANDLE) g, (HANDLE) c, NULL);
+ Show (w);
+ Select (w);
+
+
+}
+
diff --git a/sequin/sequin10.c b/sequin/sequin10.c
index 3b6ebb6f..c61c7338 100644
--- a/sequin/sequin10.c
+++ b/sequin/sequin10.c
@@ -29,7 +29,7 @@
*
* Version Creation Date: 9/3/2003
*
-* $Revision: 1.366 $
+* $Revision: 1.405 $
*
* File Description:
*
@@ -51,9987 +51,20 @@
#include <gbftdef.h>
#include <gbfeat.h>
#include <biosrc.h>
+#include <findrepl.h>
+#include <asnenbin.h>
+#include <cdrgn.h>
+#include <macrodlg.h>
+#include <macroapi.h>
-/* The matchFunction functions are used to identify features that meet
- * specific requirements, usually that the feature is of a particular type.
- * This function is used instead of simply using the subtype for the feature
- * because some features are identified based on the contents or presence of
- * certain modifiers.
- * Functions of this type should always return FALSE if handed a NULL argument.
- */
-typedef Boolean (LIBCALLBACK *matchFunction) (
- SeqFeatPtr sfp
-);
-
-static void ListClauses (
- ValNodePtr clauselist,
- ValNodePtr PNTR strings,
- Boolean allow_semicolons,
- Boolean suppress_final_and
-);
-
-static void LabelClauses
-( ValNodePtr clause_list,
- Uint1 biomol,
- BioseqPtr bsp,
- Boolean suppress_locus_tag);
-
-static CharPtr GetProductName
-( SeqFeatPtr cds,
- BioseqPtr bsp,
- Boolean suppress_locus_tag);
-
-#define DEFLINE_FEATLIST 1
-#define DEFLINE_CLAUSEPLUS 2
-#define DEFLINE_REMOVEFEAT 3
-
-typedef struct featurelabeldata {
- Boolean pluralizable;
- Boolean is_typeword_first;
- CharPtr typeword;
- CharPtr description;
- CharPtr productname;
-} FeatureLabelData, PNTR FeatureLabelPtr;
-
-
-typedef struct featureclause {
- ValNodePtr featlist;
- FeatureLabelData feature_label_data;
- CharPtr allelename;
- CharPtr interval;
- Boolean is_alt_spliced;
- Boolean has_mrna;
- SeqLocPtr slp;
- GeneRefPtr grp;
- Boolean clause_info_only;
- Boolean is_unknown;
- Boolean make_plural;
- Boolean delete_me;
- /* this information used only for segments */
- Int2 numivals;
- Int4Ptr ivals;
-} FeatureClauseData, PNTR FeatureClausePtr;
-
-FeatureClausePtr NewFeatureClause (
- SeqFeatPtr sfp,
- BioseqPtr bsp,
- Boolean suppress_locus_tag);
-
-static void PluralizeConsolidatedClauseDescription (
- FeatureClausePtr fcp
-);
-
-typedef Boolean (LIBCALLBACK *ShouldRemoveFunction) (
- SeqFeatPtr sfp,
- FeatureClausePtr parent_fcp,
- FeatureClausePtr this_fcp,
- BioseqPtr bsp,
- Boolean isLonely,
- Boolean isRequested,
- Boolean isSegment,
- Boolean suppress_locus_tag
-);
-
-/* This section of the code contains some functions for dealing with
- * linked lists of strings */
-
-/* This function finds the first occurrence of "search" in one of the
- * strings in list "strings".
- * "search" could be part of the string or could be the entire string.
- */
-static ValNodePtr FindStringInStrings (
- ValNodePtr strings,
- CharPtr search
-)
-{
- while (strings != NULL)
- {
- if (StringStr (strings->data.ptrvalue, search))
- {
- return strings;
- }
- strings = strings->next;
- }
- return NULL;
-}
-
-/* This function finds the first item in "strings" that is identical to
- * "value".
- */
-extern ValNodePtr FindExactStringInStrings (
- ValNodePtr strings,
- CharPtr value
-)
-{
- ValNodePtr string_match;
-
- for (string_match = FindStringInStrings (strings, value);
- string_match != NULL
- && StringCmp (string_match->data.ptrvalue, value) != 0;
- string_match = FindStringInStrings (string_match->next, value))
- {}
- return string_match;
-}
-
-/* This function creates a new linked list of strings with copies of
- * contents of orig.
- */
-static ValNodePtr CopyStrings (
- ValNodePtr orig
-)
-{
- ValNodePtr new_string_start = NULL;
-
- while (orig != NULL)
- {
- ValNodeAddStr (&new_string_start, 0,
- StringSave (orig->data.ptrvalue));
- orig = orig->next;
- }
- return new_string_start;
-}
-
-/*
- * This section of the code contains functions and structures for obtaining a
- * description of the organism in the record, including functions for finding
- * the combination of modifiers that will make each organism description
- * unique.
- * The method used for determining the best combination of modifiers involves
- * creating a list of required modifiers, and then creating a list of
- * combinations of modifiers by adding modifiers one at a time
- * to see if the additional modifiers provide any more differentiation in
- * the list.
- * In order to do this, I start with a list of required modifiers, and
- * then create copies of this list. For each copy I add one of the modifiers
- * that are present in the bio sources and not already on the list.
- * If adding the modifier increases the differentiation, I add that copy to
- * the list of possible combinations, otherwise I discard it.
- * I then make copies of all of the new items I added to the list and
- * add another modifier to each list, keeping the combinations that increase
- * the differentiation and discarding the rest.
- * This process continues until I have a combination that produces completely
- * differentiated bio sources, or I run out of possible combinations.
- * If I run out of possible combinations, I select the best combination from
- * the list.
- * This search process occurs in FindBestCombo. The majority of the functions
- * in this section are here to support FindBestCombo, specifically to create,
- * copy, and grow lists of combinations.
- */
-
-/* BioSrcDescData is used to calculate the best possible combination of
- * source and organism modifiers for uniqueness.
- * biop contains the BioSourcePtr from a sequence in the record.
- * strings contains a list of string representations of the modifiers
- * for this combination for this organism.
- */
-typedef struct biosrcdescdata {
- BioSourcePtr biop;
- ValNodePtr strings;
- Pointer next;
-} BioSrcDescData, PNTR BioSrcDescPtr;
-
-/* OrgGroupData is used to calculate the best possible combination of
- * source and organism modifiers for uniqueness.
- * org_list is a list of all organisms that have identical descriptions
- * using the current set of modifiers.
- * num_organisms contains the number of organisms with identical descriptions.
- */
-typedef struct orggroupdata {
- BioSrcDescPtr org_list;
- Int4 num_organisms;
- Pointer next;
-} OrgGroupData, PNTR OrgGroupPtr;
-
-/* ModifierCombinationData is used to calculate the best possible combination
- * of source and organism modifiers for uniqueness.
- * num_groups is the number of groups of organisms with identical descriptions
- * using the modifiers specified in modifier_indices.
- * num_mods is the number of modifiers specified in modifier_indices.
- * max_orgs_in_group is the maximum number of organisms in any one group.
- * num_unique_orgs is the number of organisms that are alone in their groups
- * i.e., their description is unique.
- * modifier_indices is the list of modifier indices for this combination.
- * group_list is the list of groups of organisms with identical descriptions
- * using the modifiers specified in modifier_indices.
- */
-typedef struct modifiercombination {
- Int4 num_groups;
- Int4 num_mods;
- Int4 max_orgs_in_group;
- Int4 num_unique_orgs;
- ValNodePtr modifier_indices;
- OrgGroupPtr group_list;
- Pointer next;
-} ModifierCombinationData, PNTR ModifierCombinationPtr;
-
-/* ModifierItemGlobalData is used to store information about the available
- * modifiers - the name to use when displaying a list of checkboxes, whether
- * the modifier is an Organism modifier or a Source modifier, the subtype
- * to use when looking for the modifier in the organism qualifier list,
- * and whether this modifier is required by default.
- */
-typedef struct modifieritemglobal {
- CharPtr name;
- Boolean isOrgMod;
- Uint1 subtype;
-} ModifierItemGlobalData, PNTR ModifierItemGlobalPtr;
-
-/* ModifierItemLocalData is used to store information about the results of
- * a search of the set of organisms in a record and the results of user
- * input to a dialog for deciding which modifiers should be used in the
- * organism description.
- */
-typedef struct modifieritemlocal {
- ButtoN button;
- Boolean any_present;
- Boolean all_present;
- Boolean is_unique;
- CharPtr first_value_seen;
- ValNodePtr values_seen;
- Boolean all_unique;
- CharPtr status;
- Boolean required;
-} ModifierItemLocalData, PNTR ModifierItemLocalPtr;
-
-/* OrganismDescriptionModifiers is used to apply specific user preferences
- * for how to construct the organism descriptions - whether or not to use
- * labels for the modifiers, whether and how to limit the number of modifiers
- * used in any one organism description, whether to keep or remove modifier
- * information in parentheses in the organism taxonomy name, and whether or
- * not to apply modifiers to organisms with "sp." in the middle of the
- * taxonomy name.
- */
-typedef struct organismdescriptionmodifiers {
- Boolean use_labels;
- Int2 max_mods;
- Boolean keep_paren;
- Boolean exclude_sp;
- Boolean exclude_cf;
- Boolean exclude_aff;
- Boolean include_country_extra;
- Int4 clone_isolate_HIV_rule_num;
- Boolean use_modifiers;
- Boolean allow_semicolon_in_modifier;
-} OrganismDescriptionModifiers, PNTR OrganismDescriptionModifiersPtr;
-/* This is a list of the modifiers that are of interest */
-/* Note that if you modify the DefLineModifiers array, */
-/* you should make the corresponding change to the DefLinePos enum. */
-
-static ModifierItemGlobalData DefLineModifiers[] = {
- { "Acronym" , TRUE , ORGMOD_acronym },
- { "Anamorph" , TRUE , ORGMOD_anamorph },
- { "Authority" , TRUE , ORGMOD_authority },
- { "Biotype" , TRUE , ORGMOD_biotype },
- { "Biovar" , TRUE , ORGMOD_biovar },
- { "Breed" , TRUE , ORGMOD_breed },
- { "Cell-line" , FALSE, SUBSRC_cell_line },
- { "Cell-type" , FALSE, SUBSRC_cell_type },
- { "Chemovar" , TRUE , ORGMOD_chemovar },
- { "Chromosome" , FALSE, SUBSRC_chromosome },
- { "Clone" , FALSE, SUBSRC_clone },
- { "Clone-lib" , FALSE, SUBSRC_clone_lib },
- { "Collected-by" , FALSE, SUBSRC_collected_by },
- { "Collection-date" , FALSE, SUBSRC_collection_date },
- { "Common" , TRUE , ORGMOD_common },
- { "Country" , FALSE, SUBSRC_country },
- { "Cultivar" , TRUE , ORGMOD_cultivar },
- { "Dev-stage" , FALSE, SUBSRC_dev_stage },
- { "Ecotype" , TRUE , ORGMOD_ecotype },
- { "Endogenous-virus-name", FALSE, SUBSRC_endogenous_virus_name},
- { "Environmental-sample" , FALSE, SUBSRC_environmental_sample },
- { "Forma" , TRUE , ORGMOD_forma },
- { "Forma-specialis" , TRUE , ORGMOD_forma_specialis },
- { "Frequency" , FALSE, SUBSRC_frequency },
- { "Genotype" , FALSE, SUBSRC_genotype },
- { "Germline" , FALSE, SUBSRC_germline },
- { "Group" , TRUE , ORGMOD_group },
- { "Haplotype" , FALSE, SUBSRC_haplotype },
- { "Identified-by" , FALSE, SUBSRC_identified_by },
- { "Isolate" , TRUE , ORGMOD_isolate },
- { "Isolation-source" , FALSE, SUBSRC_isolation_source },
- { "Lab-host" , FALSE, SUBSRC_lab_host },
- { "Lat-lon" , FALSE, SUBSRC_lat_lon },
- { "Map" , FALSE, SUBSRC_map },
- { "Metagenomic" , FALSE, SUBSRC_metagenomic },
- { "Note-OrgMod" , TRUE, ORGMOD_other },
- { "Note-SubSrc" , FALSE, SUBSRC_other },
- { "Pathovar" , TRUE , ORGMOD_pathovar },
- { "Plasmid-name" , FALSE, SUBSRC_plasmid_name },
- { "Plastid-name" , FALSE, SUBSRC_plastid_name },
- { "Pop-variant" , FALSE, SUBSRC_pop_variant },
- { "Rearranged" , FALSE, SUBSRC_rearranged },
- { "Segment" , FALSE, SUBSRC_segment },
- { "Serogroup" , TRUE , ORGMOD_serogroup },
- { "Serotype" , TRUE , ORGMOD_serotype },
- { "Serovar" , TRUE , ORGMOD_serovar },
- { "Sex" , FALSE, SUBSRC_sex },
- { "Specific-host" , TRUE , ORGMOD_nat_host },
- { "Specimen voucher" , TRUE , ORGMOD_specimen_voucher },
- { "Strain" , TRUE , ORGMOD_strain },
- { "Subclone" , FALSE, SUBSRC_subclone },
- { "Subgroup" , TRUE , ORGMOD_subgroup },
- { "Sub-species" , TRUE , ORGMOD_sub_species },
- { "Substrain" , TRUE , ORGMOD_substrain },
- { "Subtype" , TRUE , ORGMOD_subtype },
- { "Synonym" , TRUE , ORGMOD_synonym },
- { "Teleomorph" , TRUE , ORGMOD_teleomorph },
- { "Tissue-lib" , FALSE, SUBSRC_tissue_lib },
- { "Tissue-type" , FALSE, SUBSRC_tissue_type },
- { "Transgenic" , FALSE, SUBSRC_transgenic },
- { "Type" , TRUE , ORGMOD_type },
- { "Variety" , TRUE , ORGMOD_variety }
-};
-
-static Boolean IsDeflineModifierRequiredByDefault (Boolean is_orgmod, Int2 index)
-{
- if (!is_orgmod
- && (index == SUBSRC_endogenous_virus_name
- || index == SUBSRC_plasmid_name
- || index == SUBSRC_transgenic)) {
- return TRUE;
- } else {
- return FALSE;
- }
-}
-
-typedef enum {
- DEFLINE_POS_Acronym = 0,
- DEFLINE_POS_Anamorph,
- DEFLINE_POS_Authority,
- DEFLINE_POS_Biotype,
- DEFLINE_POS_Biovar,
- DEFLINE_POS_Breed,
- DEFLINE_POS_Cell_line,
- DEFLINE_POS_Cell_type,
- DEFLINE_POS_Chemovar,
- DEFLINE_POS_Chromosome,
- DEFLINE_POS_Clone,
- DEFLINE_POS_Clone_lib,
- DEFLINE_POS_Collected_by,
- DEFLINE_POS_Collection_date,
- DEFLINE_POS_Common,
- DEFLINE_POS_Country,
- DEFLINE_POS_Cultivar,
- DEFLINE_POS_Dev_stage,
- DEFLINE_POS_Ecotype,
- DEFLINE_POS_Endogenous_virus_name,
- DEFLINE_POS_Environmental_sample,
- DEFLINE_POS_Forma,
- DEFLINE_POS_Forma_specialis,
- DEFLINE_POS_Frequency,
- DEFLINE_POS_Genotype,
- DEFLINE_POS_Germline,
- DEFLINE_POS_Group,
- DEFLINE_POS_Haplotype,
- DEFLINE_POS_Identified_by,
- DEFLINE_POS_Isolate,
- DEFLINE_POS_Isolation_source,
- DEFLINE_POS_Lab_host,
- DEFLINE_POS_Lat_lon,
- DEFLINE_POS_Map,
- DEFLINE_POS_Metagenomic,
- DEFLINE_POS_Note_orgmod,
- DEFLINE_POS_Note_subsrc,
- DEFLINE_POS_Pathovar,
- DEFLINE_POS_Plasmid_name,
- DEFLINE_POS_Plastid_name,
- DEFLINE_POS_Pop_variant,
- DEFLINE_POS_Rearranged,
- DEFLINE_POS_Segment,
- DEFLINE_POS_Serogroup,
- DEFLINE_POS_Serotype,
- DEFLINE_POS_Serovar,
- DEFLINE_POS_Sex,
- DEFLINE_POS_Specific_host,
- DEFLINE_POS_Specimen_voucher,
- DEFLINE_POS_Strain,
- DEFLINE_POS_Subclone,
- DEFLINE_POS_Subgroup,
- DEFLINE_POS_Sub_species,
- DEFLINE_POS_Substrain,
- DEFLINE_POS_Subtype,
- DEFLINE_POS_Synonym,
- DEFLINE_POS_Teleomorph,
- DEFLINE_POS_Tissue_lib,
- DEFLINE_POS_Tissue_type,
- DEFLINE_POS_Transgenic,
- DEFLINE_POS_Type,
- DEFLINE_POS_Variety
-} DefLinePos;
-
-#define NumDefLineModifiers (sizeof (DefLineModifiers) / sizeof (ModifierItemGlobalData))
-
-extern ValNodePtr GetSourceQualDescList (Boolean get_subsrc, Boolean get_orgmod, Boolean get_discouraged, Boolean get_discontinued)
-{
- Int4 index;
- ValNodePtr source_qual_list = NULL;
- SourceQualDescPtr sqdp;
- EnumFieldAssocPtr eap;
- Uint2 subtype;
- Boolean isOrgMod;
-
- eap = GetSubSourceAndOrgModEnum (get_discouraged, get_discontinued);
- for (index = 0; eap[index].name != NULL; index++)
- {
- if (StringHasNoText (eap[index].name)) {
- continue;
- }
- subtype = eap[index].value;
- if (subtype > 1000) {
- isOrgMod = FALSE;
- subtype -= 1000;
- } else {
- isOrgMod = TRUE;
- }
-
- /* create sqdp */
- if (isOrgMod && !get_orgmod) continue;
- if (!isOrgMod && !get_subsrc) continue;
- sqdp = (SourceQualDescPtr) MemNew (sizeof (SourceQualDescData));
- if (sqdp != NULL)
- {
- sqdp->name = eap [index].name;
- sqdp->isOrgMod = isOrgMod;
- sqdp->subtype = (Uint1) subtype;
- ValNodeAddPointer (&source_qual_list, 0, sqdp);
- }
- }
- eap = MemFree (eap);
-
- return source_qual_list;
-}
-
-typedef enum {
- clone_isolate_HIV_rule_prefer_clone = 1,
- clone_isolate_HIV_rule_prefer_isolate,
- clone_isolate_HIV_rule_want_both
-} clone_isolate_HIV_rule_values;
-
-/*
- * The CountModifiersProc is used as the callback function for
- * VisitBioSourcesInSep when we are getting a list of all the modifiers
- * that appear in the sources. We also obtain, for each modifier class,
- * the first value seen, whether or not each value seen is unique for
- * for the modifier, and whether or not the modifier is present for all
- * sources.
- */
-static void CountModifiersProc (
- BioSourcePtr biop,
- Pointer userdata
-)
-{
- ModifierItemLocalPtr ItemList;
- OrgModPtr mod;
- SubSourcePtr ssp;
- Int2 i;
- Boolean found_this_modifier;
-
- if (biop == NULL) return;
- ItemList = (ModifierItemLocalPtr) userdata;
-
- for (i=0; i < NumDefLineModifiers; i++)
- {
- found_this_modifier = FALSE;
- if (DefLineModifiers[i].isOrgMod)
- {
- if ( biop->org != NULL && biop->org->orgname != NULL)
- {
- mod = biop->org->orgname->mod;
- while (mod != NULL
- && mod->subtype != DefLineModifiers[i].subtype)
- {
- mod = mod->next;
- }
- if (mod != NULL && mod->subname != NULL)
- {
- found_this_modifier = TRUE;
- if (ItemList[i].first_value_seen != NULL)
- {
- if (StringCmp (ItemList[i].first_value_seen, mod->subname) != 0)
- {
- ItemList[i].is_unique = FALSE;
- }
- }
- else
- {
- ItemList[i].first_value_seen = mod->subname;
- }
- if ( FindExactStringInStrings (ItemList[i].values_seen, mod->subname)
- == NULL)
- {
- ValNodeAddStr (&ItemList[i].values_seen, 0, mod->subname);
- }
- else
- {
- ItemList[i].all_unique = FALSE;
- }
- }
- }
- } else {
- ssp = biop->subtype;
- while (ssp != NULL && ssp->subtype != DefLineModifiers[i].subtype)
- {
- ssp = ssp->next;
- }
- if (ssp != NULL && ssp->name != NULL)
- {
- found_this_modifier = TRUE;
- if (ItemList[i].first_value_seen != NULL)
- {
- if (StringCmp (ItemList[i].first_value_seen, ssp->name) != 0)
- {
- ItemList[i].is_unique = FALSE;
- }
- }
- else
- {
- ItemList[i].first_value_seen = ssp->name;
- }
- if ( FindExactStringInStrings (ItemList[i].values_seen, ssp->name)
- == NULL)
- {
- ValNodeAddStr (&ItemList[i].values_seen, 0, ssp->name);
- }
- else
- {
- ItemList[i].all_unique = FALSE;
- }
- }
- }
- if (found_this_modifier)
- {
- ItemList[i].any_present = TRUE;
- } else {
- ItemList[i].all_present = FALSE;
- }
- }
-}
-
-/* The CountModifiers function visits all of the bio sources, determining
- * which modifiers are present, which modifiers have only one value,
- * which modifiers have all different values, and which modifiers are
- * present in all sources.
- * After this survey is complete, the function prepares a short summary
- * of the above information for each modifier, which is used in the
- * definition line options dialog.
- */
-static void CountModifiers (
- ModifierItemLocalPtr ItemList,
- SeqEntryPtr sep
-)
-{
- Int2 i;
-
- for (i=0; i < NumDefLineModifiers; i++)
- {
- ItemList[i].all_present = TRUE;
- ItemList[i].is_unique = TRUE;
- ItemList[i].first_value_seen = NULL;
- ItemList[i].values_seen = NULL;
- ItemList[i].all_unique = TRUE;
- }
-
- VisitBioSourcesInSep (sep, ItemList, CountModifiersProc);
-
- for (i=0; i < NumDefLineModifiers; i++)
- {
- if (ItemList[i].all_present && ItemList[i].all_unique)
- {
- ItemList[i].status = "All present, all unique";
- }
- else if (ItemList[i].all_present && ItemList[i].is_unique)
- {
- ItemList[i].status = "All present, one unique";
- }
- else if (ItemList[i].all_present && ! ItemList[i].is_unique)
- {
- ItemList[i].status = "All present, mixed";
- }
- else if (! ItemList[i].all_present && ItemList[i].all_unique)
- {
- ItemList[i].status = "Some missing, all unique";
- }
- else if (! ItemList[i].all_present && ItemList[i].is_unique)
- {
- ItemList[i].status = "Some missing, one unique";
- }
- else if (! ItemList[i].all_present && ! ItemList[i].is_unique)
- {
- ItemList[i].status = "Some missing, mixed";
- }
- }
-}
-
-/* The BioSrcDescData structure is used to hold a BioSourcePtr, a list
- * of strings used to describe the biosource, including the taxonomy name
- * and the values of all of the modifiers selected so far for this bio
- * source, and a pointer to the next BioSrcDescData structure in the list.
- */
-
-/* The CopyBioSrcDescPtr function creates a copy of the linked list of
- * BioSrcDescData structures.
- */
-static BioSrcDescPtr CopyBioSrcDescPtr (
- BioSrcDescPtr orig
-)
-{
- BioSrcDescPtr new_bsdp_start;
-
- if (orig == NULL) return NULL;
-
- new_bsdp_start = (BioSrcDescPtr) MemNew (sizeof (BioSrcDescData));
- if (new_bsdp_start == NULL) return NULL;
-
- new_bsdp_start->biop = orig->biop;
- new_bsdp_start->strings = CopyStrings (orig->strings);
- new_bsdp_start->next = CopyBioSrcDescPtr (orig->next);
- return new_bsdp_start;
-}
-
-/* The FreeBioSrcDescPtr function frees the memory associated with a
- * linked list of BioSrcDescData structures.
- */
-static void FreeBioSrcDescPtr (
- BioSrcDescPtr bsdp
-)
-{
- if (bsdp == NULL) return;
- FreeBioSrcDescPtr (bsdp->next);
- bsdp->biop = NULL;
- ValNodeFreeData (bsdp->strings);
- MemFree (bsdp);
-}
-
-/* The AddQualToBioSrcDescPtr function finds the qualifier at the
- * feature_index position in the DefLineModifiers array in the
- * BioSourcePtr and adds the value for that modifier to the array
- * of strings describing the bio source.
- */
-static void AddQualToBioSrcDescPtr (
- BioSrcDescPtr bsdp,
- ModifierItemLocalPtr qual,
- Int2 feature_index
-)
-{
- OrgModPtr mod;
- SubSourcePtr ssp;
-
- if (bsdp == NULL) return;
- if (bsdp->biop == NULL) return;
-
- if (DefLineModifiers[feature_index].isOrgMod)
- {
- if (bsdp->biop->org == NULL || bsdp->biop->org->orgname == NULL) return;
- mod = bsdp->biop->org->orgname->mod;
- while (mod != NULL
- && mod->subtype != DefLineModifiers[feature_index].subtype)
- {
- mod = mod->next;
- }
- if (mod != NULL && mod->subname != NULL)
- {
- ValNodeCopyStr( &(bsdp->strings), 0, mod->subname);
- }
- } else {
- ssp = bsdp->biop->subtype;
- while (ssp != NULL
- && ssp->subtype != DefLineModifiers[feature_index].subtype)
- {
- ssp = ssp->next;
- }
- if (ssp != NULL)
- {
- if (ssp->subtype == SUBSRC_transgenic)
- {
- ValNodeCopyStr( &(bsdp->strings), 0, "transgenic");
- }
- else if (ssp->name != NULL)
- {
- ValNodeCopyStr( &(bsdp->strings), 0, ssp->name);
- }
- }
- }
-}
-
-/* The CompareOrganismDescriptors function compares the contents of the
- * lists of strings for each BioSrcDesc item.
- * The function returns:
- * -1 if org1 < org2
- * 0 if org1 = org2
- * 1 if org1 > org2
- */
-static int CompareOrganismDescriptors (
- BioSrcDescPtr org1,
- BioSrcDescPtr org2
-)
-{
- ValNodePtr vnp1, vnp2;
- int cmpval;
-
- vnp1 = org1->strings;
- vnp2 = org2->strings;
-
- while (vnp1 != NULL && vnp2 != NULL)
- {
- cmpval = StringCmp (vnp1->data.ptrvalue, vnp2->data.ptrvalue);
- if (cmpval != 0) return cmpval;
-
- vnp1 = vnp1->next;
- vnp2 = vnp2->next;
- }
- if (vnp1 == NULL && vnp2 == NULL)
- {
- return 0;
- }
- else if (vnp1 != NULL && vnp2 == NULL)
- {
- return 1;
- }
- else
- {
- return -1;
- }
-}
-
-/* The OrgGroupData structure contains a list of BioSrcDescData items
- * for which the contents of the descriptive strings list are identical,
- * i.e., all the organisms in the group would have the same description
- * if you used the modifiers used to generate this list of strings.
- * The structure also contains the number of organisms in the list
- * so that it will be easy to tell that the OrgGroup now contains a
- * single organism with a unique description.
- */
-
-/* The CopyOrgGroupList function creates a copy of the list of OrgGroups */
-static OrgGroupPtr CopyOrgGroupList (
- OrgGroupPtr orig
-)
-{
- OrgGroupPtr new_ogp_start;
-
- if (orig == NULL) return NULL;
-
- new_ogp_start = (OrgGroupPtr) MemNew (sizeof (OrgGroupData));
- if (new_ogp_start == NULL) return NULL;
-
- new_ogp_start->num_organisms = orig->num_organisms;
- new_ogp_start->org_list = CopyBioSrcDescPtr (orig->org_list);
- new_ogp_start->next = CopyOrgGroupList (orig->next);
- return new_ogp_start;
-}
-
-/* The FreeOrgGroupPtr function frees the memory associated with a
- * list of OrgGroups */
-static void FreeOrgGroupPtr (
- OrgGroupPtr ogp
-)
-{
- if (ogp == NULL) return;
- FreeOrgGroupPtr (ogp->next);
- FreeBioSrcDescPtr (ogp->org_list);
- MemFree (ogp);
- return;
-}
-
-/* The ReorderGroupOrgs function sorts the OrgGroup list based on the results
- * of the CompareOrganismDescriptors function.
- */
-static void ReorderGroupOrgs (
- OrgGroupPtr this_group
-)
-{
- BioSrcDescPtr bsdp;
- BioSrcDescPtr nextBsdp;
- BioSrcDescPtr prevBsdp;
- Boolean swap_needed = TRUE;
-
- if (this_group->org_list == NULL) return;
- if (this_group->org_list->next == NULL) return;
-
- while (swap_needed)
- {
- swap_needed = FALSE;
- bsdp = this_group->org_list;
- prevBsdp = NULL;
- while (bsdp->next != NULL)
- {
- nextBsdp = bsdp->next;
- if (CompareOrganismDescriptors (bsdp, nextBsdp) > 0)
- {
- swap_needed = TRUE;
- bsdp->next = nextBsdp->next;
- nextBsdp->next = bsdp;
- if (prevBsdp == NULL)
- {
- this_group->org_list = nextBsdp;
- }
- else
- {
- prevBsdp->next = nextBsdp;
- }
- prevBsdp = nextBsdp;
- }
- else
- {
- prevBsdp = bsdp;
- bsdp = bsdp->next;
- }
- }
- }
-}
-
-/* The ReGroupOrgs function operates on a single OrgGroup item.
- * If any of the BioSrcDesc items in the group now have different
- * descriptions, the function breaks it up into smaller, homogenous OrgGroups.
- */
-static void ReGroupOrgs (
- OrgGroupPtr this_group
-)
-{
- BioSrcDescPtr bsdp;
- OrgGroupPtr new_group;
- int num_organisms;
-
- if (this_group == NULL) return;
- bsdp = this_group->org_list;
- if (bsdp == NULL) return;
- num_organisms = 0;
- while (bsdp->next != NULL)
- {
- num_organisms ++;
- if (CompareOrganismDescriptors (bsdp, bsdp->next) != 0)
- {
- /* create new group to hold next set of organisms */
- new_group = (OrgGroupPtr) MemNew (sizeof (OrgGroupData));
- if (new_group == NULL) return;
- new_group->org_list = bsdp->next;
- new_group->num_organisms = this_group->num_organisms - num_organisms;
- new_group->next = this_group->next;
- this_group->next = new_group;
- this_group->num_organisms = num_organisms;
- bsdp->next = NULL;
- ReGroupOrgs (new_group);
- }
- else
- {
- bsdp = bsdp->next;
- }
- }
-}
-
-/* The AddQualToGroup function operates on a single OrgGroup item.
- * The function adds a qualifier to each BioSrcDesc item in the OrgGroup,
- * breaks the group into multiple groups if the group is no longer
- * homogenous, and sorts the new list.
- */
-static void AddQualToGroup (
- OrgGroupPtr this_group,
- ModifierItemLocalPtr qual,
- Int2 feature_index
-)
-{
- BioSrcDescPtr bsdp;
-
- if (this_group == NULL) return;
-
- bsdp = this_group->org_list;
- while (bsdp != NULL)
- {
- AddQualToBioSrcDescPtr (bsdp, qual, feature_index);
- bsdp= bsdp->next;
- }
-
- /* now reorder organisms and break up group */
- ReorderGroupOrgs (this_group);
-
- ReGroupOrgs (this_group);
-}
-
-/* The AddQualToGroupList function operates on a list of OrgGroup items.
- * It calls AddQualToGroup for each item in the list.
- */
-static void AddQualToGroupList (
- OrgGroupPtr group_list,
- ModifierItemLocalPtr qual,
- Int2 feature_index
-)
-{
- OrgGroupPtr ogp;
-
- ogp = group_list;
- while (ogp != NULL)
- {
- AddQualToGroup (ogp, qual, feature_index);
- ogp = ogp->next;
- }
-}
-
-/* The CopyModifierIndices function creates a new ValNode list with the
- * same data.intvalue values for each node as the original modifier_indices
- * ValNode list.
- */
-static ValNodePtr CopyModifierIndices (
- ValNodePtr modifier_indices
-)
-{
- ValNodePtr new_indices;
-
- if (modifier_indices == NULL) return NULL;
- new_indices = ValNodeNew (NULL);
- if (new_indices == NULL) return NULL;
- new_indices->choice = modifier_indices->choice;
- new_indices->data.intvalue = modifier_indices->data.intvalue;
- new_indices->next = CopyModifierIndices (modifier_indices->next);
- return new_indices;
-}
-
-/* The CopyModifierCombo creates a copy of a ModificationCombination item.
- * This includes creating a copy of the number and list of modifiers
- * and a copy of the number and list of OrgGroups, as well as copying the
- * maximum number of organisms in any one group and the number of unique
- * organism descriptions produced by this combination of modifiers.
- */
-static ModifierCombinationPtr CopyModifierCombo (
- ModifierCombinationPtr m
-)
-{
- ModifierCombinationPtr newm;
- ValNodePtr vnp;
- ValNodePtr newval;
-
- newm = (ModifierCombinationPtr) MemNew (sizeof (ModifierCombinationData));
- if (newm == NULL) return NULL;
-
- newm->next = NULL;
-
- /* copy list of modifier indices */
- newm->num_mods = m->num_mods;
- newm->modifier_indices = NULL;
- vnp = m->modifier_indices;
- if (vnp != NULL)
- {
- newm->modifier_indices = ValNodeNew (NULL);
- if (newm->modifier_indices == NULL) return NULL;
- newm->modifier_indices->data.intvalue = vnp->data.intvalue;
- vnp = vnp->next;
- while (vnp != NULL)
- {
- newval = ValNodeNew (newm->modifier_indices);
- if (newval == NULL) return NULL;
- newval->data.intvalue = vnp->data.intvalue;
- vnp = vnp->next;
- }
- }
-
- /* copy groups */
- newm->num_groups = m->num_groups;
- newm->group_list = CopyOrgGroupList (m->group_list);
-
- return newm;
-}
-
-/* This function creates a new ModifierCombination item using the supplied
- * OrgGroup list. It calculates the number of groups, maximum number of
- * organisms in any one group, and number of unique organisms.
- * Initially there are no modifiers.
- */
-static ModifierCombinationPtr NewModifierCombo (
- OrgGroupPtr group_list
-)
-{
- ModifierCombinationPtr newm;
- OrgGroupPtr ogp;
-
- newm = (ModifierCombinationPtr) MemNew (sizeof (ModifierCombinationData));
- if (newm == NULL) return NULL;
-
- newm->num_mods = 0;
- newm->modifier_indices = NULL;
- newm->num_unique_orgs = 0;
-
- /* copy groups */
- newm->group_list = CopyOrgGroupList (group_list);
-
- ogp = newm->group_list;
- newm->max_orgs_in_group = 0;
- newm->num_groups = 0;
- while (ogp != NULL)
- {
- if (newm->max_orgs_in_group < ogp->num_organisms)
- newm->max_orgs_in_group = ogp->num_organisms;
- if (ogp->num_organisms == 1)
- newm->num_unique_orgs ++;
- newm->num_groups ++;
- ogp = ogp->next;
- }
-
- newm->next = NULL;
- return newm;
-}
-
-/* This function frees the memory associated with a list of
- * ModifierCombination items.
- */
-static void FreeModifierCombo (
- ModifierCombinationPtr m
-)
-{
- if (m == NULL) return;
- FreeModifierCombo (m->next);
- ValNodeFree (m->modifier_indices);
- FreeOrgGroupPtr (m->group_list);
- MemFree (m);
-}
-
-/* This function adds the qualifier at the feature_index position in the
- * DefLineModifiers array to each OrgGroup in the list and recalculates
- * the maximum number of organisms in any one group and the number of
- * unique organism descriptions generated by this new combination of
- * modifiers.
- */
-static void AddQualToModifierCombo (
- ModifierCombinationPtr m,
- ModifierItemLocalPtr qual,
- Int2 feature_index
-)
-{
- OrgGroupPtr ogp;
- ValNodePtr vnp;
-
- if (m == NULL) return;
-
- /* now try adding the modifier, see if the number of groups goes up */
- /* if the number of organisms in each group is one, we can stop */
- vnp = ValNodeNew (m->modifier_indices);
- if (vnp == NULL) return;
- if (m->modifier_indices == NULL)
- {
- m->modifier_indices = vnp;
- }
- vnp->data.intvalue = feature_index;
- m->num_mods ++;
- AddQualToGroupList (m->group_list, qual, feature_index);
- ogp = m->group_list;
- m->max_orgs_in_group = 0;
- m->num_unique_orgs = 0;
- m->num_groups = 0;
- while (ogp != NULL)
- {
- if (m->max_orgs_in_group < ogp->num_organisms)
- m->max_orgs_in_group = ogp->num_organisms;
- if (ogp->num_organisms == 1)
- m->num_unique_orgs ++;
- m->num_groups ++;
- ogp = ogp->next;
- }
-}
-
-/* This function creates the initial OrgGroup list that is copied for every
- * ModifierCombination item.
- */
-static void BuildTaxOrgGroupList (
- BioSourcePtr biop,
- Pointer userdata
-)
-{
- OrgGroupPtr ogp;
- OrgGroupPtr prevOgp;
- OrgGroupPtr PNTR pogp;
- BioSrcDescPtr newBsdp;
- OrgRefPtr orp;
- int cmpval;
-
- pogp = (OrgGroupPtr PNTR) userdata;
- ogp = *pogp;
-
- newBsdp = (BioSrcDescPtr) MemNew (sizeof (BioSrcDescData));
- if (newBsdp == NULL) return;
- newBsdp->biop = biop;
- newBsdp->next = NULL;
- newBsdp->strings = NULL;
-
- /* add tax name as first string */
- /* later, move this into a separate function and add special handling */
- orp = biop->org;
- if (orp != NULL && orp->taxname != NULL)
- {
- ValNodeCopyStr (&(newBsdp->strings), 0, orp->taxname);
- }
-
- prevOgp = NULL;
- cmpval = -1;
- while (ogp != NULL && cmpval < 0)
- {
- if (ogp->org_list != NULL)
- {
- cmpval = CompareOrganismDescriptors (ogp->org_list, newBsdp);
- if (cmpval == 0)
- {
- newBsdp->next = ogp->org_list;
- ogp->org_list = newBsdp;
- ogp->num_organisms ++;
- }
- }
- if (cmpval < 0)
- {
- prevOgp = ogp;
- ogp = ogp->next;
- }
- }
- if (cmpval != 0)
- {
- /* create new group */
- ogp = (OrgGroupPtr) MemNew (sizeof (OrgGroupData));
- if (ogp == NULL) return;
- ogp->org_list = newBsdp;
- ogp->num_organisms = 1;
- ogp->next = NULL;
- if (prevOgp == NULL)
- {
- ogp->next = *pogp;
- *pogp = ogp;
- }
- else
- {
- ogp->next = prevOgp->next;
- prevOgp->next = ogp;
- }
- }
-}
-
-typedef struct bestsortdata {
- Int4 feature_index;
- Boolean all_unique;
- Boolean all_present;
- Boolean is_unique;
-} BestSortData, PNTR BestSortPtr;
-
-static Boolean Index1FoundBeforeIndex2 (
- Int4 index1,
- Int4 index2,
- ValNodePtr list
-)
-{
- ValNodePtr vnp;
- BestSortPtr bsp;
- for (vnp = list; vnp != NULL; vnp = vnp->next)
- {
- if ((bsp = vnp->data.ptrvalue) == NULL)
- {
- continue;
- }
- if (bsp->feature_index == index1) return TRUE;
- if (bsp->feature_index == index2) return FALSE;
- }
- return FALSE;
-}
-
-/* This function determines whether or not we should try adding this modifier
- * to our combination. If we've already tried it and not added it to the list,
- * there's no reason to try adding it again.
- */
-static Boolean OkToTryAddingQual (
- ModifierCombinationPtr m,
- ModifierItemLocalPtr ItemList,
- ValNodePtr available_modifiers_list,
- Int2 feature_index
-)
-{
- ValNodePtr vnp;
-
- /* if feature_index indicates a value we don't use for best combos, skip */
- if (feature_index == DEFLINE_POS_Map)
- {
- return FALSE;
- }
-
- if (m == NULL) return TRUE;
-
- /* if feature_index is lower than anything else on list (other than */
- /* a required value, this is a repeat combination, so skip it */
- vnp = m->modifier_indices;
- while (vnp != NULL)
- {
- if (feature_index == m->modifier_indices->data.intvalue)
- return FALSE;
- if (! ItemList[m->modifier_indices->data.intvalue].required &&
- Index1FoundBeforeIndex2 (feature_index,
- m->modifier_indices->data.intvalue,
- available_modifiers_list))
- {
- return FALSE;
- }
- vnp = vnp->next;
- }
- return TRUE;
-}
-
-static ValNodePtr GetListOfAvailableModifiers ( ModifierItemLocalPtr ItemList)
-{
- ValNodePtr vnp, head;
- Int2 feature_index;
- BestSortPtr bsp;
-
- head = NULL;
- for (feature_index = 0; feature_index < NumDefLineModifiers; feature_index++)
- {
- if ( ItemList[feature_index].any_present)
- {
- bsp = (BestSortPtr) MemNew (sizeof (BestSortData));
- if (bsp == NULL) return NULL;
- bsp->feature_index = feature_index;
- bsp->all_unique = ItemList[feature_index].all_unique;
- bsp->all_present = ItemList[feature_index].all_present;
- bsp->is_unique = ItemList[feature_index].is_unique;
- vnp = ValNodeNew (head);
- if (vnp == NULL) return NULL;
- vnp->data.ptrvalue = bsp;
- if (head == NULL) head = vnp;
- }
- }
- return head;
-}
-
-static Int4 DefLineQualSortOrder [] = {
- DEFLINE_POS_Transgenic,
- DEFLINE_POS_Plasmid_name,
- DEFLINE_POS_Endogenous_virus_name,
- DEFLINE_POS_Strain,
- DEFLINE_POS_Clone,
- DEFLINE_POS_Isolate,
- DEFLINE_POS_Haplotype,
- DEFLINE_POS_Cultivar,
- DEFLINE_POS_Specimen_voucher,
- DEFLINE_POS_Ecotype,
- DEFLINE_POS_Type,
- DEFLINE_POS_Serotype,
- DEFLINE_POS_Authority,
- DEFLINE_POS_Breed
-};
-
-static int LIBCALLBACK SortByImportanceAndPresence (
- VoidPtr ptr1,
- VoidPtr ptr2
-)
-{
- ValNodePtr vnp1;
- ValNodePtr vnp2;
- BestSortPtr bsp1, bsp2;
- Int4 num_defline_qual_sort_order, index;
-
- if (ptr1 == NULL && ptr2 == NULL) return 0;
-
- if (ptr1 == NULL && ptr2 != NULL) return -1;
- if (ptr1 != NULL && ptr2 == NULL) return 1;
-
- vnp1 = *((ValNodePtr PNTR) ptr1);
- vnp2 = *((ValNodePtr PNTR) ptr2);
- if (vnp1 == NULL || vnp2 == NULL) return 0;
- if (vnp1->data.ptrvalue == NULL || vnp2->data.ptrvalue == NULL) return 0;
-
- bsp1 = vnp1->data.ptrvalue;
- bsp2 = vnp2->data.ptrvalue;
- if (bsp1->feature_index == bsp2->feature_index) return 0;
-
- if (bsp1->all_present && bsp1->all_unique
- && (! bsp2->all_present || ! bsp2->all_unique))
- {
- return -1;
- }
- if (bsp2->all_present && bsp2->all_unique
- && (! bsp1->all_present || ! bsp1->all_unique))
- {
- return 1;
- }
-
- if ( ! bsp1->is_unique && bsp2->is_unique) return -1;
- if ( ! bsp2->is_unique && bsp1->is_unique) return 1;
-
- num_defline_qual_sort_order = sizeof (DefLineQualSortOrder) / sizeof (Int4);
- for (index = 0; index < num_defline_qual_sort_order; index++)
- {
- if (bsp1->feature_index == DefLineQualSortOrder [ index ]) return -1;
- if (bsp2->feature_index == DefLineQualSortOrder [ index ]) return 1;
- }
-
- if (bsp1->feature_index > bsp2->feature_index) return 1;
- if (bsp1->feature_index < bsp2->feature_index) return -1;
- return 0;
-}
-
-
-/* The function FindBestCombo tries to find the best combination of modifiers
- * to create unique organism descriptions. This is accomplished by
- * creating a list of required modifiers, and then creating a list of
- * combinations of modifiers by adding modifiers one at a time
- * to see if the additional modifiers provide any more differentiation in
- * the list.
- * In order to do this, I start with a list of required modifiers, and
- * then create copies of this list. For each copy I add one of the modifiers
- * that are present in the bio sources and not already on the list.
- * If adding the modifier increases the differentiation, I add that copy to
- * the list of possible combinations, otherwise I discard it.
- * The function then makes copies of all of the new items added to the list,
- * starting with the item pointed to by start_of_expand, and adds another
- * modifier to each combination, keeping the combinations that increase
- * the differentiation and discarding the rest.
- * This process continues until I have a combination that produces completely
- * differentiated bio sources, or I run out of possible combinations.
- * If the list of possible combinations is exhausted before each organism
- * has a unique description, the function selects the combination from the
- * list with the largest number of unique organism descriptions. If more
- * than one combination produces the largest number of unique organisms,
- * the combination with the largest number of unique organisms and the
- * largest number of groups will be selected.
- */
-static ModifierCombinationPtr FindBestCombo(
- SeqEntryPtr sep,
- ModifierItemLocalPtr ItemList
-)
-{
- OrgGroupPtr group_list;
- ModifierCombinationPtr mc_list, start_of_expand, best_found, end_of_list;
- ModifierCombinationPtr next_start_of_expand, m, newm;
- Int4 num_to_expand, next_num_to_expand;
- Int2 i;
- ValNodePtr available_modifier_list, vnp;
- BestSortPtr bsp;
-
- best_found = NULL;
-
- /* first, get list of organisms */
- group_list = NULL;
- VisitBioSourcesInSep (sep, &group_list, BuildTaxOrgGroupList);
-
- /* create combo with just the org groups */
- mc_list = NewModifierCombo (group_list);
- if (mc_list == NULL) return NULL;
-
- available_modifier_list = GetListOfAvailableModifiers (ItemList);
-
- /* next, add in any required qualifiers */
- for (vnp = available_modifier_list; vnp != NULL; vnp = vnp->next)
- {
- bsp = vnp->data.ptrvalue;
- if (bsp == NULL) return NULL;
- if (ItemList[bsp->feature_index].required)
- {
- AddQualToModifierCombo (mc_list, ItemList + bsp->feature_index,
- bsp->feature_index);
- }
- }
- if (mc_list->max_orgs_in_group == 1)
- {
- /* we're done - they're all unique */
- best_found = mc_list;
- return best_found;
- }
-
- available_modifier_list = SortValNode (available_modifier_list,
- SortByImportanceAndPresence);
- start_of_expand = mc_list;
- end_of_list = mc_list;
- num_to_expand = 1;
- while (best_found == NULL && start_of_expand != NULL)
- {
- next_num_to_expand = 0;
- next_start_of_expand = NULL;
- for (i=0; i < num_to_expand && start_of_expand != NULL; i++)
- {
- /* try adding qualifiers */
- for (vnp = available_modifier_list;
- vnp != NULL && best_found == NULL;
- vnp = vnp->next)
- {
- bsp = vnp->data.ptrvalue;
- if (bsp == NULL) return NULL;
- if (OkToTryAddingQual (start_of_expand, ItemList,
- available_modifier_list,
- bsp->feature_index))
- {
- newm = CopyModifierCombo (start_of_expand);
- AddQualToModifierCombo (newm, ItemList + bsp->feature_index,
- bsp->feature_index);
- if (start_of_expand->num_groups >= newm->num_groups)
- {
- /* situation didn't get better, don't bother to add this one */
- FreeModifierCombo (newm);
- newm = NULL;
- }
- else if (newm->max_orgs_in_group == 1)
- {
- best_found = newm;
- }
- else
- {
- end_of_list->next = newm;
- end_of_list = end_of_list->next;
- if (next_start_of_expand == NULL)
- next_start_of_expand = newm;
- next_num_to_expand++;
- }
- }
- }
- if (start_of_expand != NULL)
- {
- start_of_expand = start_of_expand->next;
- }
- }
- num_to_expand = next_num_to_expand;
- if (start_of_expand != NULL)
- {
- start_of_expand = start_of_expand->next;
- }
- }
-
- if (best_found != NULL)
- {
- FreeModifierCombo (mc_list);
- return best_found;
- }
-
- /* we want to find the one with the highest number of unique organisms */
- best_found = mc_list;
- m = mc_list->next;
- while (m!= NULL)
- {
- if (m->num_unique_orgs > best_found->num_unique_orgs)
- {
- best_found = m;
- }
- else if (m->num_unique_orgs == best_found->num_unique_orgs
- && m->num_groups > best_found->num_groups)
- {
- best_found = m;
- }
- else if (m->num_unique_orgs == best_found->num_unique_orgs
- && m->num_groups == best_found->num_groups
- && m->num_mods < best_found->num_mods)
- {
- best_found = m;
- }
- m = m->next;
- }
-
- m = mc_list;
- while (m != NULL)
- {
- if (m != best_found)
- {
- newm = m->next;
- m->next = NULL;
- FreeModifierCombo (m);
- m = newm;
- }
- else
- {
- FreeModifierCombo (m->next);
- m->next = NULL;
- m = NULL;
- }
- }
- return best_found;
-}
-
-/* create combo with the specified modifiers */
-static ModifierCombinationPtr CreateComboFromModList (
- ModifierItemLocalPtr modList
-)
-{
- ModifierCombinationPtr m;
- Int4 feature_index;
-
- m = NewModifierCombo (NULL);
- if (m == NULL) return NULL;
- for (feature_index = 0; feature_index < NumDefLineModifiers; feature_index++)
- {
- if (modList[feature_index].any_present && modList [feature_index].required)
- {
- AddQualToModifierCombo (m, modList + feature_index, feature_index);
- }
- }
- return m;
-}
-
-
-/* This is the callback function for sorting the modifier list. It
- * implements an order specified by the indexers.
- */
-static Int4 DefLineQualPresentationOrder [] = {
- DEFLINE_POS_Transgenic,
- DEFLINE_POS_Strain,
- DEFLINE_POS_Isolate,
- DEFLINE_POS_Cultivar,
- DEFLINE_POS_Specimen_voucher,
- DEFLINE_POS_Ecotype,
- DEFLINE_POS_Type,
- DEFLINE_POS_Serotype,
- DEFLINE_POS_Authority,
- DEFLINE_POS_Breed
-};
-
-static int LIBCALLBACK SortByImportance (
- VoidPtr ptr1,
- VoidPtr ptr2
-)
-{
- ValNodePtr vnp1;
- ValNodePtr vnp2;
- Int4 num_defline_qual_sort_order, index;
-
- if (ptr1 == NULL && ptr2 == NULL) return 0;
-
- if (ptr1 == NULL && ptr2 != NULL) return -1;
- if (ptr1 != NULL && ptr2 == NULL) return 1;
-
- vnp1 = *((ValNodePtr PNTR) ptr1);
- vnp2 = *((ValNodePtr PNTR) ptr2);
- if (vnp1 == NULL || vnp2 == NULL) return 0;
- if (vnp1->data.intvalue == vnp2->data.intvalue) return 0;
-
- num_defline_qual_sort_order = sizeof (DefLineQualPresentationOrder) / sizeof (Int4);
- for (index = 0; index < num_defline_qual_sort_order; index++)
- {
- if (vnp1->data.intvalue == DefLineQualPresentationOrder [ index ]) return -1;
- if (vnp2->data.intvalue == DefLineQualPresentationOrder [ index ]) return 1;
- }
-
- if ((vnp1->data.intvalue < 0 || vnp1->data.intvalue > NumDefLineModifiers)
- && (vnp2->data.intvalue < 0 || vnp2->data.intvalue > NumDefLineModifiers))
- {
- return 0;
- }
- if (vnp1->data.intvalue < 0 || vnp1->data.intvalue > NumDefLineModifiers)
- {
- return 1;
- }
- if (vnp2->data.intvalue < 0 || vnp2->data.intvalue > NumDefLineModifiers)
- {
- return -1;
- }
-
- if (DefLineModifiers [ vnp1->data.intvalue].isOrgMod
- && (! DefLineModifiers [ vnp2->data.intvalue].isOrgMod
- || vnp2->data.intvalue == DEFLINE_POS_Plasmid_name
- || vnp2->data.intvalue == DEFLINE_POS_Endogenous_virus_name))
- {
- return -1;
- }
- if (DefLineModifiers [ vnp2->data.intvalue].isOrgMod
- && (! DefLineModifiers [ vnp1->data.intvalue].isOrgMod
- || vnp1->data.intvalue == DEFLINE_POS_Plasmid_name
- || vnp1->data.intvalue == DEFLINE_POS_Endogenous_virus_name))
- {
- return 1;
- }
-
- if (vnp1->data.intvalue == DEFLINE_POS_Plasmid_name)
- {
- return -1;
- }
- if (vnp2->data.intvalue == DEFLINE_POS_Plasmid_name)
- {
- return 1;
- }
-
- if (vnp1->data.intvalue == DEFLINE_POS_Endogenous_virus_name)
- {
- return -1;
- }
- if (vnp2->data.intvalue == DEFLINE_POS_Endogenous_virus_name)
- {
- return 1;
- }
-
- if (! DefLineModifiers [ vnp1->data.intvalue].isOrgMod
- && vnp2->data.intvalue == DEFLINE_POS_Clone)
- {
- return 1;
- }
- if (! DefLineModifiers [ vnp2->data.intvalue].isOrgMod
- && vnp1->data.intvalue == DEFLINE_POS_Clone)
- {
- return -1;
- }
-
- if (! DefLineModifiers [ vnp1->data.intvalue].isOrgMod
- && vnp2->data.intvalue == DEFLINE_POS_Haplotype)
- {
- return 1;
- }
- if (! DefLineModifiers [ vnp2->data.intvalue].isOrgMod
- && vnp1->data.intvalue == DEFLINE_POS_Haplotype)
- {
- return -1;
- }
-
- if (vnp1->data.intvalue > vnp2->data.intvalue) return 1;
- if (vnp1->data.intvalue < vnp2->data.intvalue) return -1;
- return 0;
-}
-
-static Boolean RecordHasModifier (
- BioSourcePtr biop,
- Int4 modifier_index
-)
-{
- OrgModPtr mod;
- OrgNamePtr onp;
- SubSourcePtr ssp;
-
- if (biop == NULL
- || modifier_index < 0
- || modifier_index >= NumDefLineModifiers)
- {
- return FALSE;
- }
- if (DefLineModifiers[modifier_index].isOrgMod)
- {
- if (biop->org == NULL || (onp = biop->org->orgname) == NULL)
- {
- return FALSE;
- }
- mod = onp->mod;
- while (mod != NULL
- && mod->subtype != DefLineModifiers[modifier_index].subtype)
- {
- mod = mod->next;
- }
- if (mod != NULL && mod->subname != NULL)
- {
- return TRUE;
- }
- } else {
- ssp = biop->subtype;
- while (ssp != NULL && ssp->subtype != DefLineModifiers[modifier_index].subtype)
- {
- ssp = ssp->next;
- }
- if (ssp != NULL && ssp->name != NULL)
- {
- return TRUE;
- }
- }
- return FALSE;
-}
-
-/* This function adds in required modifiers for HIV sequences */
-static void AddHIVModifierIndices (
- ValNodePtr PNTR modifier_indices,
- BioSourcePtr biop,
- ModifierItemLocalPtr modList,
- CharPtr taxName,
- Int4 clone_isolate_HIV_rule_num
-)
-{
- ValNodePtr vnp;
- Boolean have_country_in_list;
- Boolean have_isolate_in_list;
- Boolean have_clone_in_list;
- Boolean have_country_mod;
- Boolean have_isolate_mod;
- Boolean have_clone_mod;
-
- /* special handling for HIV */
- if (StringICmp (taxName, "HIV-1") != 0
- && StringICmp (taxName, "HIV-2") != 0)
- {
- return;
- }
-
- have_country_in_list = FALSE;
- have_isolate_in_list = FALSE;
- have_clone_in_list = FALSE;
- have_country_mod = RecordHasModifier (biop, DEFLINE_POS_Country);
- have_isolate_mod = RecordHasModifier (biop, DEFLINE_POS_Isolate);
- have_clone_mod = RecordHasModifier (biop, DEFLINE_POS_Clone);
-
- if (modifier_indices != NULL)
- {
- for (vnp = *modifier_indices;
- vnp != NULL
- && (! have_country_in_list
- || ! have_isolate_in_list
- || ! have_clone_in_list);
- vnp = vnp->next)
- {
- if (vnp->data.intvalue == DEFLINE_POS_Country)
- {
- have_country_in_list = TRUE;
- }
- else if (vnp->data.intvalue == DEFLINE_POS_Isolate)
- {
- have_isolate_in_list = TRUE;
- }
- else if (vnp->data.intvalue == DEFLINE_POS_Clone)
- {
- have_clone_in_list = TRUE;
- }
- }
- }
-
- if ( ! have_country_in_list && have_country_mod)
- {
- vnp = ValNodeNew (*modifier_indices);
- vnp->data.intvalue = DEFLINE_POS_Country;
- if (*modifier_indices == NULL) *modifier_indices = vnp;
- }
-
- if ((have_clone_in_list && have_clone_mod)
- || (have_isolate_in_list && have_isolate_mod))
- {
- /* don't need HIV rule */
- }
- else
- {
- if ( ! have_isolate_in_list
- && have_isolate_mod
- && ( clone_isolate_HIV_rule_num == clone_isolate_HIV_rule_prefer_isolate
- || clone_isolate_HIV_rule_num == clone_isolate_HIV_rule_want_both
- || ! have_clone_mod))
- {
- vnp = ValNodeNew (*modifier_indices);
- vnp->data.intvalue = DEFLINE_POS_Isolate;
- if (*modifier_indices == NULL) *modifier_indices = vnp;
- }
-
- if ( ! have_clone_in_list
- && have_clone_mod
- && ( clone_isolate_HIV_rule_num == clone_isolate_HIV_rule_prefer_clone
- || clone_isolate_HIV_rule_num == clone_isolate_HIV_rule_want_both
- || ! have_isolate_mod))
- {
- vnp = ValNodeNew (*modifier_indices);
- vnp->data.intvalue = DEFLINE_POS_Clone;
- if (*modifier_indices == NULL) *modifier_indices = vnp;
- }
- }
-}
-
-static Boolean UseOrgModifier (OrgModPtr mod, CharPtr taxName);
-
-/* This function looks for an OrgMod note that contains the phrase
- * "type strain of". This function is used to determine whether
- * strain is a required modifier for the defline for this source.
- */
-static Boolean HasTypeStrainComment (BioSourcePtr biop)
-{
- OrgModPtr mod;
-
- if (biop == NULL || biop->org == NULL || biop->org->orgname == NULL)
- {
- return FALSE;
- }
-
- mod = biop->org->orgname->mod;
- while (mod != NULL && mod->subtype != ORGMOD_strain)
- {
- mod = mod->next;
- }
-
- if (mod == NULL)
- {
- return FALSE;
- }
-
- if (!UseOrgModifier (mod, biop->org->taxname))
- {
- return FALSE;
- }
-
- mod = biop->org->orgname->mod;
- while (mod != NULL)
- {
- if (mod->subtype == 255
- && StringISearch (mod->subname, "type strain of") != NULL)
- {
- return TRUE;
- }
- mod = mod->next;
- }
- return FALSE;
-}
-
-/* This function checks to see if there is a type strain comment on
- * the bio source. If there is one, it checks to see whether strain
- * is already in the list of modifiers for the definition line.
- * If strain is not already in the list, it is added.
- */
-static void
-AddTypeStrainModifierIndices
-(ValNodePtr PNTR modifier_indices,
- BioSourcePtr biop)
-{
- ValNodePtr vnp;
-
- if (modifier_indices == NULL || biop == NULL || ! HasTypeStrainComment (biop))
- {
- return;
- }
-
- for (vnp = *modifier_indices;
- vnp != NULL && vnp->data.intvalue != DEFLINE_POS_Strain;
- vnp = vnp->next)
- {
- }
-
- if (vnp == NULL)
- {
- ValNodeAddInt (modifier_indices, 0, DEFLINE_POS_Strain);
- }
-}
-
-static Boolean SpecialHandlingForSpecialTechniques (
- BioseqPtr bsp
-);
-
-/* This function checks to see if the Bioseq has a WGS technique.
- * If so, and if the strain text is not present in the taxname,
- * and strain is not already in the list of modifiers for the
- * definition line, add strain.
- */
-static void
-AddWGSModifierIndices
-(ValNodePtr PNTR modifier_indices,
- BioSourcePtr biop,
- BioseqPtr bsp)
-{
- ValNodePtr vnp;
- OrgModPtr omp;
-
- if (modifier_indices == NULL || biop == NULL
- || biop->org == NULL
- || biop->org->orgname == NULL
- || biop->org->orgname->mod == NULL
- || ! SpecialHandlingForSpecialTechniques (bsp))
- {
- return;
- }
-
- for (vnp = *modifier_indices;
- vnp != NULL && vnp->data.intvalue != DEFLINE_POS_Strain;
- vnp = vnp->next)
- {
- }
-
- if (vnp == NULL)
- {
- omp = biop->org->orgname->mod;
- while (omp != NULL && omp->subtype != ORGMOD_strain)
- {
- omp = omp->next;
- }
- if (omp != NULL)
- {
- if (StringStr (biop->org->taxname, omp->subname) != NULL)
- {
- /* don't add, present already */
- } else {
- /* add strain modifier */
- ValNodeAddInt (modifier_indices, 0, DEFLINE_POS_Strain);
- }
- }
- }
-}
-
-/* This function provides a label to be used in the definition line for
- * each modifier that requires one. Most modifiers use a label that is
- * similar to the name of the modifier displayed in the definition line
- * options dialog.
- */
-static void AddModifierLabel (
- Boolean use_labels,
- Boolean is_orgmod,
- Uint1 subtype,
- CharPtr modifier_text
-)
-{
- CharPtr cp;
- if (!is_orgmod && subtype == SUBSRC_endogenous_virus_name)
- {
- StringCpy (modifier_text, "endogenous virus");
- }
- else if (is_orgmod && subtype == ORGMOD_specimen_voucher)
- {
- if (use_labels)
- {
- StringCpy (modifier_text, "voucher");
- }
- else
- {
- modifier_text [0] = 0;
- }
- }
- else if (use_labels
- || (!is_orgmod
- && (subtype == SUBSRC_transgenic
- || subtype == SUBSRC_plasmid_name)))
- {
- if (is_orgmod)
- {
- StringCpy (modifier_text, GetOrgModQualName (subtype));
- } else {
- StringCpy (modifier_text, GetSubsourceQualName (subtype));
- }
- modifier_text[0] = tolower(modifier_text[0]);
- cp = StringStr (modifier_text, "-name");
- if (cp != NULL) *cp = 0;
- }
- else
- {
- modifier_text[0] = 0;
- }
-}
-
-typedef struct orgmodabbrevdata {
- Int2 subtype;
- CharPtr abbrev;
-} OrgModAbbrevData, PNTR OrgModAbbrevPtr;
-
-static OrgModAbbrevData orgmod_abbrevs[] = {
- { ORGMOD_variety, "var." },
- { ORGMOD_forma, "f." },
- { ORGMOD_forma_specialis, "f. sp." },
- { ORGMOD_pathovar, "pv." }
-};
-
-/* The UseOrgModifier function looks for the values of certain kinds of
- * modifiers in the taxonomy name, so that they will not be added to the
- * definition line as modifiers if they are already present in the
- * taxonomy name.
- */
-static Boolean UseOrgModifier (
- OrgModPtr mod,
- CharPtr taxName
-)
-{
- CharPtr value_found;
- Int4 value_len;
- Int4 num_abbrevs, i;
- CharPtr abbrev_start;
- Boolean other_abbrev_found;
-
- if (mod == NULL || mod->subname == NULL) return FALSE;
-
- num_abbrevs = sizeof (orgmod_abbrevs) / sizeof (OrgModAbbrevData);
-
- /* If selected modifiers already appear in the tax Name, */
- /* don't use them in the organism description again */
- if (mod->subtype == ORGMOD_strain
- || mod->subtype == ORGMOD_variety
- || mod->subtype == ORGMOD_sub_species
- || mod->subtype == ORGMOD_forma
- || mod->subtype == ORGMOD_forma_specialis
- || mod->subtype == ORGMOD_pathovar)
- {
- value_found = StringStr (taxName, mod->subname);
- value_len = StringLen (mod->subname);
- while (value_found != NULL)
- {
- if (value_found == taxName)
- {
- value_found = StringStr (value_found + 1, mod->subname);
- continue;
- }
- if (*(value_found - 1) != ' ' && *(value_found - 1) != '(')
- {
- value_found = StringStr (value_found + 1, mod->subname);
- continue;
- }
- if (*(value_found - 1) == ')' && *(value_found + value_len) != ')')
- {
- value_found = StringStr (value_found + 1, mod->subname);
- continue;
- }
- if (*(value_found + value_len) != ' ' && *(value_found + value_len) != 0)
- {
- value_found = StringStr (value_found + 1, mod->subname);
- continue;
- }
- other_abbrev_found = FALSE;
- for (i = 0; i < num_abbrevs; i++)
- {
- abbrev_start = value_found - StringLen (orgmod_abbrevs[i].abbrev) - 1;
- if (abbrev_start > taxName
- && StringNCmp (abbrev_start,
- orgmod_abbrevs[i].abbrev,
- StringLen (orgmod_abbrevs[i].abbrev)) == 0)
- {
- if (mod->subtype == orgmod_abbrevs[i].subtype)
- {
- return FALSE;
- }
- else
- {
- other_abbrev_found = TRUE;
- }
- }
- }
- if ( ! other_abbrev_found
- && ( mod->subtype == ORGMOD_strain
- || mod->subtype == ORGMOD_sub_species))
- {
- return FALSE;
- }
- value_found = StringStr (value_found + 1, mod->subname);
- }
- }
- return TRUE;
-}
-
-/* The SetRequiredModifiers function copies the default required values from
- * the global DefLineModifiers array into the local list of modifier
- * information.
- */
-static void SetRequiredModifiers (
- ModifierItemLocalPtr modList
-)
-{
- Int4 item_index;
-
- for (item_index = 0; item_index < NumDefLineModifiers; item_index++)
- {
- modList[item_index].required = IsDeflineModifierRequiredByDefault(DefLineModifiers[item_index].isOrgMod,
- DefLineModifiers[item_index].subtype);
- }
-
-}
-
-/* The AddBestComboModifiersToModList function sets the modifiers
- * selected by the FindBestCombo process as selected.
- */
-static void AddBestComboModifiersToModList (
- ModifierCombinationPtr m,
- ModifierItemLocalPtr modList
-)
-{
- ValNodePtr vnp;
-
- for (vnp = m->modifier_indices; vnp != NULL; vnp = vnp->next)
- {
- modList[vnp->data.intvalue].required = TRUE;
- }
-}
-
-/* This function fixes HIV abbreviations, removes items in parentheses,
- * and trims spaces around the taxonomy name.
- */
-static void CleanUpTaxName (
- CharPtr taxName,
- Boolean keep_in_paren
-)
-{
- CharPtr ptr;
-
- if (StringICmp (taxName, "Human immunodeficiency virus type 1") == 0
- || StringICmp (taxName, "Human immunodeficiency virus 1") == 0)
- {
- StringCpy (taxName, "HIV-1");
- }
- else if (StringICmp (taxName, "Human immunodeficiency virus type 2") == 0
- || StringICmp (taxName, "Human immunodeficiency virus 2") == 0)
- {
- StringCpy (taxName, "HIV-2");
- }
- else
- {
- if (! keep_in_paren)
- {
- ptr = StringStr (taxName, "(");
- if (ptr != NULL)
- *ptr = '\0';
- }
- TrimSpacesAroundString (taxName);
- }
-}
-
-/* This function gets the BioSource descriptor for the BioSeq. */
-static BioSourcePtr GetBiopForBsp (
- BioseqPtr bsp
-)
-{
- SeqMgrDescContext dcontext;
- SeqDescrPtr sdp;
- BioSourcePtr biop;
-
- if (bsp == NULL) return NULL;
- sdp = SeqMgrGetNextDescriptor (bsp, NULL, Seq_descr_source, &dcontext);
- if (sdp != NULL) {
- biop = (BioSourcePtr) sdp->data.ptrvalue;
- return biop;
- }
-
- return NULL;
-}
-
-/* This function generates a string describing the organism based on the
- * modifiers selected and other organism description options.
- */
-static CharPtr GetOrganismDescription (
- BioseqPtr bsp,
- ModifierItemLocalPtr modList,
- ModifierCombinationPtr m,
- OrganismDescriptionModifiersPtr odmp
-)
-{
- Char taxName [196];
- Char modifier_text [256];
- ValNodePtr strings;
- BioSourcePtr biop;
- OrgModPtr mod;
- SubSourcePtr ssp;
- ValNodePtr modifier_indices;
- ValNodePtr vnp;
- Int2 feature_index;
- CharPtr org_desc;
- CharPtr cp;
- Uint4 no_semicolon_len, label_len;
-
- biop = NULL;
- strings = NULL;
- taxName [0] = '\0';
-
- biop = GetBiopForBsp (bsp);
- if (biop == NULL) return NULL;
- if (biop->org == NULL) return NULL;
- if (biop->org->taxname == NULL) return NULL;
- StringNCpy (taxName, biop->org->taxname, sizeof (taxName) - 1);
- taxName [ sizeof (taxName) - 1] = 0;
-
- CleanUpTaxName (taxName, odmp->keep_paren);
-
- if (odmp->exclude_sp)
- {
- cp = StringStr (taxName, " sp.");
- /* check to make sure not "f. sp." */
- if (cp != NULL && cp[4] == ' '
- && (cp - taxName < 2 || *(cp - 2) != 'f' || *(cp - 1) != '.'))
- {
- return StringSave (taxName);
- }
- }
-
- if (odmp->exclude_cf)
- {
- cp = StringStr (taxName, " cf.");
- if (cp != NULL)
- {
- return StringSave (taxName);
- }
- }
-
- if (odmp->exclude_aff)
- {
- cp = StringStr (taxName, " aff.");
- if (cp != NULL)
- {
- return StringSave (taxName);
- }
- }
-
- if (biop->origin == ORG_MUT)
- {
- ValNodeAddStr (&strings, 0, StringSave ("Mutant"));
- }
-
- ValNodeAddStr (&strings, 0, StringSave (taxName));
-
- if (HasTypeStrainComment (biop))
- {
-
- }
-
- modifier_indices = CopyModifierIndices (m->modifier_indices);
- AddHIVModifierIndices (&modifier_indices, biop, modList, taxName,
- odmp->clone_isolate_HIV_rule_num);
- AddTypeStrainModifierIndices (&modifier_indices, biop);
- AddWGSModifierIndices (&modifier_indices, biop, bsp);
-
- modifier_indices = SortValNode (modifier_indices, SortByImportance);
- for (vnp = modifier_indices;
- vnp != NULL && (odmp->max_mods == -99 || odmp->max_mods > 0);
- vnp = vnp->next)
- {
- feature_index = vnp->data.intvalue;
- if (! odmp->use_modifiers && !IsDeflineModifierRequiredByDefault(DefLineModifiers[feature_index].isOrgMod,
- DefLineModifiers[feature_index].subtype))
- {
- /* do nothing */
- }
- else if (DefLineModifiers[feature_index].isOrgMod)
- {
- if (biop->org == NULL || biop->org->orgname == NULL) continue;
- mod = biop->org->orgname->mod;
- while (mod != NULL
- && mod->subtype != DefLineModifiers[feature_index].subtype)
- {
- mod = mod->next;
- }
- if ( UseOrgModifier (mod, taxName))
- {
- if (odmp->allow_semicolon_in_modifier) {
- no_semicolon_len = StringLen (mod->subname);
- } else {
- no_semicolon_len = StringCSpn (mod->subname, ";");
- }
-
- if (mod->subtype == ORGMOD_nat_host)
- {
- sprintf (modifier_text, "from ");
- if (no_semicolon_len > sizeof (modifier_text) - 6)
- {
- no_semicolon_len = sizeof (modifier_text) - 6;
- }
- StringNCpy (modifier_text + 5, mod->subname,
- no_semicolon_len);
- modifier_text[no_semicolon_len + 5] = 0;
- }
- else
- {
- AddModifierLabel (odmp->use_labels, TRUE, mod->subtype, modifier_text);
- if (modifier_text[0] != 0)
- StringCat (modifier_text, " ");
- label_len = StringLen (modifier_text);
- if (no_semicolon_len > (Int4) sizeof (modifier_text) - label_len - 1)
- {
- no_semicolon_len = (Int4) sizeof (modifier_text) - label_len - 1;
- }
- StringNCat (modifier_text, mod->subname,
- no_semicolon_len);
- modifier_text [ no_semicolon_len + label_len] = 0;
- }
- ValNodeCopyStr( &strings, 0, modifier_text);
- if (odmp->max_mods != -99)
- odmp->max_mods --;
- }
- } else {
- ssp = biop->subtype;
- while (ssp != NULL
- && ssp->subtype != DefLineModifiers[feature_index].subtype)
- {
- ssp = ssp->next;
- }
- if (ssp != NULL)
- {
- if (odmp->include_country_extra || odmp->allow_semicolon_in_modifier)
- {
- no_semicolon_len = StringLen (ssp->name);
- }
- else
- {
- no_semicolon_len = StringCSpn (ssp->name, ";");
- }
- AddModifierLabel (odmp->use_labels, FALSE, ssp->subtype, modifier_text);
- if (ssp->subtype == SUBSRC_transgenic)
- {
- /* do nothing, transgenic already captured from label */
- }
- else if (ssp->subtype == SUBSRC_country)
- {
- sprintf (modifier_text, "from ");
- if (no_semicolon_len > sizeof (modifier_text) - 6)
- {
- no_semicolon_len = sizeof (modifier_text) - 6;
- }
- StringNCpy (modifier_text + 5, ssp->name, no_semicolon_len);
- modifier_text[5 + no_semicolon_len] = 0;
- if (!odmp->include_country_extra)
- {
- cp = StringChr (modifier_text, ':');
- if (cp != NULL) *cp = 0;
- }
- }
- else if (ssp->name != NULL && ssp->name[0] != 0
- && (ssp->subtype != SUBSRC_plasmid_name
- || StringCmp (ssp->name, "unnamed") != 0))
- {
- if (modifier_text[0] != 0)
- StringCat (modifier_text, " ");
- label_len = StringLen (modifier_text);
- if (no_semicolon_len > sizeof (modifier_text) - 1 - label_len)
- {
- no_semicolon_len = sizeof (modifier_text) - 1 - label_len;
- }
- StringNCat (modifier_text, ssp->name, no_semicolon_len);
- modifier_text [ no_semicolon_len + label_len ] = 0;
- }
- ValNodeCopyStr( &strings, 0, modifier_text);
- if (odmp->max_mods != -99)
- odmp->max_mods --;
- }
- }
- }
-
- org_desc = MergeValNodeStrings (strings, FALSE);
- ValNodeFreeData (strings);
- ValNodeFree (modifier_indices);
- return org_desc;
-
-}
-
-/* end of organism description section */
-
-/* This section of code contains functions which are useful for dealing
- * with locations of features (SeqLocPtr objects).
- */
-
-/* This function determines whether location A is on the same strand as
- * location B
- */
-static Boolean AreAAndBOnSameStrand (
- SeqLocPtr slp1,
- SeqLocPtr slp2
-)
-{
- Uint1 strand1;
- Uint2 strand2;
-
- strand1 = SeqLocStrand (slp1);
- strand2 = SeqLocStrand (slp2);
- if (strand1 == Seq_strand_minus && strand2 != Seq_strand_minus)
- return FALSE;
- else if (strand1 != Seq_strand_minus && strand2 == Seq_strand_minus)
- return FALSE;
- else
- return TRUE;
-}
-
-/* This function determines whether location A is contained in or equal to
- * location B and on the same strand as location B.
- */
-static Boolean IsLocAInBonSameStrand (
- SeqLocPtr slp1,
- SeqLocPtr slp2
-)
-{
- if (! AreAAndBOnSameStrand ( slp1, slp2))
- {
- return FALSE;
- }
- else if ( SeqLocAinB (slp1, slp2) < 0)
- {
- return FALSE;
- }
- else
- {
- return TRUE;
- }
-}
-
-/* This function calculates the intersection between two locations.
- */
-static SeqLocPtr SeqLocIntersection (
- SeqLocPtr slp1,
- SeqLocPtr slp2,
- BioseqPtr bsp
-)
-{
- SeqLocPtr diff1, diff2, result;
-
- diff1 = SeqLocMerge ( bsp, slp1, NULL, FALSE, TRUE, FALSE);
- diff1 = SeqLocSubtract (diff1, slp2);
- diff2 = SeqLocMerge ( bsp, slp2, NULL, FALSE, TRUE, FALSE);
- diff2 = SeqLocSubtract (diff2, slp1);
- result = SeqLocMerge ( bsp, slp1, slp2, FALSE, TRUE, FALSE);
-
- if (diff1 != NULL)
- {
- result = SeqLocSubtract (result, diff1);
- SeqLocFree (diff1);
- if (result == NULL) return NULL;
- }
- if (diff2 != NULL)
- {
- result = SeqLocSubtract (result, diff2);
- SeqLocFree (diff2);
- if (result == NULL) return NULL;
- }
- return result;
-}
-
-#define ADJACENT_TYPE_ANY 0
-#define ADJACENT_TYPE_UPSTREAM 1
-#define ADJACENT_TYPE_DOWNSTREAM 2
-
-/* This function determines whether A is "next to" B and upstream or downstream
- * from B. A cannot overlap B. If allow_interval is TRUE, there can be
- * space between A and B.
- */
-static Boolean IsAAdjacentToB (
- SeqLocPtr a,
- SeqLocPtr b,
- BioseqPtr bsp,
- Int2 adjacent_type,
- Boolean allow_interval
-)
-{
- Int4 a_end, b_end;
- Uint2 strand;
-
- if (adjacent_type != ADJACENT_TYPE_ANY
- && adjacent_type != ADJACENT_TYPE_UPSTREAM
- && adjacent_type != ADJACENT_TYPE_DOWNSTREAM)
- {
- return FALSE;
- }
-
- if ( ! AreAAndBOnSameStrand (a, b))
- {
- return FALSE;
- }
-
- strand = SeqLocStrand (a);
- if ( adjacent_type == ADJACENT_TYPE_ANY)
- {
- a_end = GetOffsetInBioseq (a, bsp, SEQLOC_RIGHT_END);
- b_end = GetOffsetInBioseq (b, bsp, SEQLOC_LEFT_END);
- if ((allow_interval && b_end < a_end)
- || b_end == a_end + 1)
- {
- return TRUE;
- }
- a_end = GetOffsetInBioseq (a, bsp, SEQLOC_LEFT_END);
- b_end = GetOffsetInBioseq (b, bsp, SEQLOC_RIGHT_END);
- if ((allow_interval && b_end > a_end)
- || a_end == b_end + 1)
- {
- return TRUE;
- }
- return FALSE;
- }
- else if ( (strand == Seq_strand_minus
- && adjacent_type == ADJACENT_TYPE_UPSTREAM)
- || (strand != Seq_strand_minus
- && adjacent_type == ADJACENT_TYPE_DOWNSTREAM))
- {
- a_end = GetOffsetInBioseq (a, bsp, SEQLOC_RIGHT_END);
- b_end = GetOffsetInBioseq (b, bsp, SEQLOC_LEFT_END);
- if ((allow_interval && b_end < a_end)
- || b_end == a_end + 1)
- {
- return TRUE;
- }
- else
- {
- return FALSE;
- }
- }
- else
- {
- a_end = GetOffsetInBioseq (a, bsp, SEQLOC_LEFT_END);
- b_end = GetOffsetInBioseq (b, bsp, SEQLOC_RIGHT_END);
- if ((allow_interval && b_end > a_end)
- || a_end == b_end + 1)
- {
- return TRUE;
- }
- else
- {
- return FALSE;
- }
- }
-}
-
-static Boolean IsAEmptyIntervalOfB (SeqLocPtr a, SeqLocPtr b, BioseqPtr bsp)
-{
- Int4 a_right, a_left, b_right, b_left, prev_right, prev_left;
- SeqLocPtr slp;
- Uint1 a_strand, b_strand;
-
- if (a == NULL || b == NULL || bsp == NULL) return FALSE;
-
- a_strand = SeqLocStrand (a);
- b_strand = SeqLocStrand (b);
- if ((a_strand == Seq_strand_minus && b_strand != Seq_strand_minus)
- || (a_strand != Seq_strand_minus && b_strand == Seq_strand_minus)) {
- return FALSE;
- }
-
- a_right = GetOffsetInBioseq (a, bsp, SEQLOC_RIGHT_END);
- a_left = GetOffsetInBioseq (a, bsp, SEQLOC_LEFT_END);
-
- slp = SeqLocFindNext (b, NULL);
- prev_right = GetOffsetInBioseq (slp, bsp, SEQLOC_RIGHT_END);
- prev_left = GetOffsetInBioseq (slp, bsp, SEQLOC_LEFT_END);
- slp = SeqLocFindNext (b, slp);
- while (slp != NULL) {
- b_right = GetOffsetInBioseq (slp, bsp, SEQLOC_RIGHT_END);
- b_left = GetOffsetInBioseq (slp, bsp, SEQLOC_LEFT_END);
- if (a_left == prev_right + 1 && a_right == b_left - 1) {
- return TRUE;
- } else if (a_left == b_right + 1 && a_right == prev_left - 1) {
- return TRUE;
- } else {
- prev_right = b_right;
- prev_left = b_left;
- slp = SeqLocFindNext (b, slp);
- }
- }
- return FALSE;
-}
-
-
-static Boolean LocAContainsIntervalOfB (SeqLocPtr a, SeqLocPtr b)
-{
- SeqLocPtr interval;
- Boolean rval = FALSE;
-
- if (a == NULL || b == NULL) return FALSE;
-
- interval = SeqLocFindNext (b, NULL);
- while (interval != NULL && !rval) {
- if (IsLocAInBonSameStrand (interval, a)) {
- rval = TRUE;
- } else {
- interval = SeqLocFindNext (b, interval);
- }
- }
- return rval;
-}
-
-
-/* This section of code deals with identifying and labeling features
- * for the definition line.
- * The features currently handled are:
- * genes
- * exons
- * introns
- * LTRs
- * 3' UTRs
- * 5' UTRs
- * CDSs
- * rRNA
- * mRNA
- * misc RNA
- * snRNA
- * snoRNA
- * insertion sequences
- * integrons
- * D-loops
- * mRNA
- * tRNA
- * control regions
- * misc feature listed as intergenic spacer in comment
- * satellite sequences
- * promoter regions
- * endogenous virus source features
- * transposons
- */
-
-static Boolean LIBCALLBACK IsGene (
- SeqFeatPtr sfp
-)
-{
- if (sfp == NULL || sfp->data.choice != SEQFEAT_GENE) return FALSE;
- return TRUE;
-}
-
-static CharPtr GetGeneName (GeneRefPtr grp, Boolean suppress_locus_tag)
-{
- ValNodePtr syn;
-
- if (grp == NULL) return NULL;
- if (SeqMgrGeneIsSuppressed (grp)) return NULL;
- if (StringDoesHaveText (grp->locus)) return grp->locus;
- if (! suppress_locus_tag && StringDoesHaveText (grp->locus_tag))
- return grp->locus_tag;
- if (StringDoesHaveText (grp->desc)) return grp->desc;
- for (syn = grp->syn; syn != NULL; syn = syn->next)
- {
- if (syn != NULL && syn->data.ptrvalue != NULL)
- return syn->data.ptrvalue;
- }
- return NULL;
-}
-
-static CharPtr GetAlleleName (GeneRefPtr grp, Boolean suppress_locus_tag)
-{
- size_t lenallele;
- size_t lengenename;
- CharPtr gene_name;
- CharPtr buffer;
-
- if (grp == NULL) return NULL;
- if (StringHasNoText (grp->allele)) return NULL;
- gene_name = GetGeneName (grp, suppress_locus_tag);
- if (StringHasNoText (gene_name)) return NULL;
- lenallele = StringLen (grp->allele);
- lengenename = StringLen (gene_name);
-
- if (lenallele > lengenename
- && StringNICmp (gene_name, grp->allele, lengenename) == 0)
- {
- return StringSave (grp->allele);
- }
- else if (grp->allele[0] == '-')
- {
- buffer = MemNew (lenallele + lengenename + 1);
- if (buffer == NULL) return NULL;
- StringCpy (buffer, gene_name);
- StringCat (buffer, grp->allele);
- }
- else
- {
- buffer = MemNew (lenallele + lengenename + 2);
- if (buffer == NULL) return NULL;
- StringCpy (buffer, gene_name);
- StringCat (buffer, "-");
- StringCat (buffer, grp->allele);
- }
-
- return buffer;
-}
-
-/* This function compares the gene names and allele names of the gene
- * to see if they match.
- */
-static Boolean DoGenesMatch
-(GeneRefPtr grp1,
- GeneRefPtr grp2,
- Boolean suppress_locus_tag)
-{
- CharPtr name1;
- CharPtr name2;
-
- name1 = GetGeneName (grp1, suppress_locus_tag);
- name2 = GetGeneName (grp2, suppress_locus_tag);
- if (StringCmp (name1, name2) != 0) return FALSE;
-
- name1 = GetAlleleName (grp1, suppress_locus_tag);
- name2 = GetAlleleName (grp2, suppress_locus_tag);
- if ((name1 == NULL && name2 != NULL)
- || (name1 != NULL && name2 == NULL))
- {
- if (name1 != NULL) MemFree (name1);
- if (name2 != NULL) MemFree (name2);
- return FALSE;
- }
-
- if ((name1 == NULL && name2 == NULL)
- || (StringCmp (name1, name2) == 0))
- {
- if (name1 != NULL) MemFree (name1);
- if (name2 != NULL) MemFree (name2);
- return TRUE;
- }
-
- if (name1 != NULL) MemFree (name1);
- if (name2 != NULL) MemFree (name2);
- return FALSE;
-}
-
-/* This function looks at the pseudo flag on the object itself as well as
- * the pseudo flag on the gene reference for the object (if one is present).
- */
-static Boolean IsPseudo (
- SeqFeatPtr sfp
-)
-{
- GeneRefPtr grp;
- SeqMgrFeatContext context;
-
- if (sfp == NULL) return FALSE;
- if (sfp->pseudo) return TRUE;
- if (sfp->data.choice == SEQFEAT_GENE)
- {
- grp = sfp->data.value.ptrvalue;
- }
- else
- {
- grp = SeqMgrGetGeneXref (sfp);
- }
- if (grp == NULL)
- {
- if (sfp->data.choice != SEQFEAT_GENE) {
- sfp = SeqMgrGetOverlappingGene(sfp->location, &context);
- return IsPseudo(sfp);
- } else {
- return FALSE;
- }
- } else {
- return grp->pseudo;
- }
-}
-
-static Boolean LIBCALLBACK IsExon (
- SeqFeatPtr sfp
-)
-{
- if (sfp == NULL || sfp->idx.subtype != FEATDEF_exon) return FALSE;
- return TRUE;
-}
-
-static Boolean LIBCALLBACK IsIntron (
- SeqFeatPtr sfp
-)
-{
- if (sfp == NULL || sfp->idx.subtype != FEATDEF_intron) return FALSE;
- return TRUE;
-}
-
-static Boolean LIBCALLBACK IsExonOrIntron (SeqFeatPtr sfp)
-{
- return IsExon(sfp) || IsIntron(sfp);
-}
-
-static Boolean LIBCALLBACK IsLTR (
- SeqFeatPtr sfp
-)
-{
- if (sfp == NULL || sfp->idx.subtype != FEATDEF_LTR) return FALSE;
- return TRUE;
-}
-
-static CharPtr GetLTRDescription (
- SeqFeatPtr sfp
-)
-{
- CharPtr description;
- size_t comment_len;
- if (sfp == NULL) return NULL;
- if (sfp->comment == NULL) return NULL;
- comment_len = StringLen (sfp->comment);
- if (comment_len > 3 && StringCmp (sfp->comment + comment_len - 3, "LTR") == 0)
- {
- description = (CharPtr) MemNew (comment_len - 3);
- if (description == NULL) return NULL;
- StringNCpy (description, sfp->comment, comment_len - 4);
- description[comment_len - 4] = 0;
- }
- else
- {
- description = StringSave (sfp->comment);
- }
- return description;
-}
-
-static Boolean LIBCALLBACK Is3UTR (
- SeqFeatPtr sfp
-)
-{
- if (sfp == NULL || sfp->idx.subtype != FEATDEF_3UTR) return FALSE;
- return TRUE;
-}
-
-static Boolean LIBCALLBACK Is5UTR (
- SeqFeatPtr sfp
-)
-{
- if (sfp == NULL || sfp->idx.subtype != FEATDEF_5UTR) return FALSE;
- return TRUE;
-}
-
-static Boolean LIBCALLBACK IsCDS (SeqFeatPtr sfp)
-{
- if (sfp == NULL) return FALSE;
- if (sfp->data.choice == SEQFEAT_CDREGION)
- return TRUE;
- return FALSE;
-}
-
-static Boolean LIBCALLBACK IsrRNA (
- SeqFeatPtr sfp
-)
-{
- if (sfp == NULL || sfp->idx.subtype != FEATDEF_rRNA) return FALSE;
- return TRUE;
-}
-
-static Boolean LIBCALLBACK IsMiscRNA (
- SeqFeatPtr sfp
-)
-{
- if (sfp == NULL
- || (sfp->idx.subtype != FEATDEF_misc_RNA
- && sfp->idx.subtype != FEATDEF_otherRNA))
- {
- return FALSE;
- }
- return TRUE;
-}
-
-static Boolean LIBCALLBACK IssnoRNA (
- SeqFeatPtr sfp
-)
-{
- if (sfp == NULL || sfp->idx.subtype != FEATDEF_snoRNA) return FALSE;
- return TRUE;
-}
-
-static Boolean LIBCALLBACK IssnRNA (
- SeqFeatPtr sfp
-)
-{
- if (sfp == NULL || sfp->idx.subtype != FEATDEF_snRNA) return FALSE;
- return TRUE;
-}
-
-static Boolean LIBCALLBACK IsscRNA (
- SeqFeatPtr sfp
-)
-{
- if (sfp == NULL || sfp->idx.subtype != FEATDEF_scRNA) return FALSE;
- return TRUE;
-}
-
-static Boolean LIBCALLBACK IsPrecursorRNA (SeqFeatPtr sfp)
-{
- if (sfp == NULL || sfp->idx.subtype != FEATDEF_preRNA) return FALSE;
- return TRUE;
-}
-
-
-static CharPtr mobile_element_keywords [] = {
- "insertion sequence",
- "retrotransposon",
- "non-LTR retrotransposon",
- "transposon",
- "integron",
- "other",
- "SINE",
- "MITE",
- "LINE"
-};
-
-enum mobile_element_keyword_nums
-{
- eMobileElementInsertionSequence = 0,
- eMobileElementRetrotransposon,
- eMobileElementNonLTRRetrotransposon,
- eMobileElementTransposon,
- eMobileElementIntegron,
- eMobileElementOther,
- eMobileElementSINE,
- eMobileElementMITE,
- eMobileElementLINE
-};
-
-static Int4 StartsWithMobileElementKeyword (CharPtr txt)
-{
- Int4 i, keyword_len;
-
- for (i=0; i < sizeof (mobile_element_keywords) / sizeof (CharPtr); i++) {
- keyword_len = StringLen (mobile_element_keywords[i]);
- if (StringNCmp (txt, mobile_element_keywords[i], keyword_len) == 0
- && (*(txt + keyword_len) == ':' || *(txt + keyword_len) == 0)) {
- return i;
- }
- }
- return -1;
-}
-
-static Int4 IsMobileElementGBQual (GBQualPtr gbqual)
-{
- Int4 keyword_idx;
- if (gbqual == NULL || gbqual->qual == NULL || gbqual->val == NULL) return -1;
- if (StringCmp (gbqual->qual, "mobile_element") != 0) return -1;
- keyword_idx = StartsWithMobileElementKeyword (gbqual->val);
- if (keyword_idx < 0) return -1;
- if (keyword_idx == eMobileElementOther
- && StringStr (gbqual->val, "transposable element") == NULL) {
- return -1;
- } else {
- return keyword_idx;
- }
-}
-
-
-static Boolean FeatureDoesNotGetPartialComplete (SeqFeatPtr sfp)
-{
- GBQualPtr gbqual;
- Int4 keyword_idx;
- if (sfp == NULL || sfp->idx.subtype != FEATDEF_repeat_region) return FALSE;
-
- for (gbqual = sfp->qual; gbqual != NULL; gbqual = gbqual->next)
- {
- keyword_idx = IsMobileElementGBQual(gbqual);
- if (keyword_idx == eMobileElementSINE
- || keyword_idx == eMobileElementLINE) {
- return TRUE;
- }
- }
- return FALSE;
-}
-
-
-static Boolean LIBCALLBACK IsMobileElement (SeqFeatPtr sfp)
-{
- GBQualPtr gbqual;
- if (sfp == NULL || sfp->idx.subtype != FEATDEF_repeat_region) return FALSE;
-
- for (gbqual = sfp->qual; gbqual != NULL; gbqual = gbqual->next)
- {
- if (IsMobileElementGBQual(gbqual) > -1) {
- return TRUE;
- }
- }
- return FALSE;
-}
-
-static Boolean LIBCALLBACK IsRemovableMobileElement (SeqFeatPtr sfp)
-{
- GBQualPtr gbqual;
- Int4 keyword_idx;
- if (sfp == NULL || sfp->idx.subtype != FEATDEF_repeat_region) return FALSE;
-
- for (gbqual = sfp->qual; gbqual != NULL; gbqual = gbqual->next)
- {
- keyword_idx = IsMobileElementGBQual(gbqual);
- if (keyword_idx >= eMobileElementSINE
- && keyword_idx <= eMobileElementLINE) {
- return TRUE;
- }
- }
- return FALSE;
-}
-
-static CharPtr GetMobileElementTypeword (CharPtr desc_start, Int4 keyword_idx)
-{
- if (keyword_idx < 0) return NULL;
- if (StringHasNoText (desc_start)) {
- return mobile_element_keywords[keyword_idx];
- }
- switch (keyword_idx) {
- case eMobileElementTransposon:
- if (StringStr (desc_start, "P-element") != NULL) {
- return "P-element";
- } else if (StringStr (desc_start, "MITE") != NULL) {
- return "MITE";
- } else {
- return mobile_element_keywords[keyword_idx];
- }
- break;
- case eMobileElementOther:
- return "transposable element";
- break;
- case eMobileElementIntegron:
- if (StringStr (desc_start, "superintegron") != NULL) {
- return "superintegron";
- } else {
- return mobile_element_keywords[keyword_idx];
- }
- break;
- default:
- return mobile_element_keywords[keyword_idx];
- break;
- }
-}
-
-
-static void LIBCALLBACK GetMobileElementFeatureLabel (
- ValNodePtr featlist,
- BioseqPtr bsp,
- Uint1 biomol,
- FeatureLabelPtr flp
-)
-{
- GBQualPtr gbqual;
- Int4 keyword_idx = -1;
- Int4 keyword_len;
- Int4 val_len;
- SeqFeatPtr sfp;
- CharPtr desc_start = NULL, typeword, cp;
-
- flp->pluralizable = TRUE;
- flp->is_typeword_first = FALSE;
- flp->typeword = NULL;
- flp->description = NULL;
-
- if (featlist == NULL) return;
- sfp = featlist->data.ptrvalue;
- if (sfp == NULL) return;
-
- gbqual = sfp->qual;
- while (gbqual != NULL
- && (keyword_idx = IsMobileElementGBQual(gbqual)) < 0)
- {
- gbqual = gbqual->next;
- }
- if (gbqual == NULL) return;
-
- keyword_len = StringLen (mobile_element_keywords[keyword_idx]);
- desc_start = gbqual->val + keyword_len;
- while (isspace (*desc_start) || *desc_start == ':') {
- desc_start++;
- }
-
- /* find alternate typewords */
- typeword = GetMobileElementTypeword(desc_start, keyword_idx);
- if (typeword == NULL) return;
- keyword_len = StringLen (typeword);
-
- flp->typeword = StringSave (typeword);
- val_len = StringLen (desc_start);
-
- if (StringHasNoText (desc_start))
- {
- flp->is_typeword_first = FALSE;
- flp->description = NULL;
- } else if (StringCmp (desc_start, typeword) == 0) {
- /* just the keyword */
- flp->is_typeword_first = FALSE;
- flp->description = NULL;
- return;
- } else if (StringNCmp (desc_start, typeword, keyword_len) == 0) {
- /* starts with keyword */
- /* if keyword is hyphenated portion of name, no pluralization */
- if (desc_start[keyword_len] == '-') {
- flp->description = StringSave (desc_start);
- flp->typeword = MemFree (flp->typeword);
- flp->typeword = StringSave ("");
- flp->pluralizable = FALSE;
- } else {
- flp->is_typeword_first = TRUE;
- flp->description = StringSave (desc_start + keyword_len + 1);
- }
- return;
- } else if (val_len > 8 && StringCmp (desc_start + val_len - keyword_len, typeword) == 0
- && val_len - keyword_len - 1 >= 0
- && isspace (*(desc_start + val_len - keyword_len - 1))) {
- /* ends with keyword */
- flp->is_typeword_first = FALSE;
- flp->description = MemNew (val_len - keyword_len);
- if (flp->description == NULL) return;
- StringNCpy (flp->description, desc_start, val_len - keyword_len - 1);
- flp->description[val_len - keyword_len -1] = 0;
- } else if ((cp = StringStr (desc_start, typeword)) != NULL
- && cp != desc_start
- && isspace (*(cp -1))) {
- /* keyword in the middle */
- flp->description = StringSave (desc_start);
- flp->typeword = MemFree (flp->typeword);
- flp->typeword = StringSave ("");
- flp->pluralizable = FALSE;
- } else {
- /* keyword not in description */
- if (StringICmp (flp->typeword, "integron") == 0) {
- flp->is_typeword_first = FALSE;
- } else {
- flp->is_typeword_first = TRUE;
- }
- flp->description = StringSave (desc_start);
- if (StringCmp (flp->description, "") == 0) {
- flp->is_typeword_first = FALSE;
- }
- }
- if (StringCmp (flp->description, "unnamed") == 0) {
- flp->description = MemFree (flp->description);
- }
-}
-
-
-static Boolean LIBCALLBACK IsEndogenousVirusSequence (
- SeqFeatPtr sfp
-)
-{
- GBQualPtr gbqual;
- if (sfp == NULL || sfp->idx.subtype != FEATDEF_repeat_region) return FALSE;
-
- for (gbqual = sfp->qual; gbqual != NULL; gbqual = gbqual->next)
- {
- if (StringCmp (gbqual->qual, "endogenous_virus") == 0)
- return TRUE;
- }
- return FALSE;
-}
-
-static CharPtr GetEndogenousVirusSequenceDescription (
- SeqFeatPtr sfp
-)
-{
- GBQualPtr gbqual;
-
- if (sfp == NULL) return NULL;
-
- gbqual = sfp->qual;
- while (gbqual != NULL && StringCmp (gbqual->qual, "endogenous_virus") != 0)
- {
- gbqual = gbqual->next;
- }
- if (gbqual != NULL)
- {
- if (StringDoesHaveText (gbqual->val)
- && StringCmp (gbqual->val, "unnamed") != 0)
- {
- return StringSave (gbqual->val);
- }
- }
- return NULL;
-}
-
-static Boolean LIBCALLBACK IsDloop (
- SeqFeatPtr sfp
-)
-{
- if (sfp == NULL || sfp->idx.subtype != FEATDEF_D_loop) return FALSE;
- return TRUE;
-}
-
-static Boolean LIBCALLBACK IsmRNA (
- SeqFeatPtr sfp
-)
-{
- if (sfp == NULL || sfp->idx.subtype != FEATDEF_mRNA) return FALSE;
- return TRUE;
-}
-
-static Boolean LIBCALLBACK IstRNA (
- SeqFeatPtr sfp
-)
-{
- if (sfp == NULL || sfp->idx.subtype != FEATDEF_tRNA) return FALSE;
- return TRUE;
-}
-
-static Boolean LIBCALLBACK IsControlRegion (
- SeqFeatPtr sfp
-)
-{
- if (sfp == NULL
- || sfp->idx.subtype != FEATDEF_misc_feature
- || sfp->comment == NULL
- || StringNCmp (sfp->comment, "control region", StringLen ("control region")) != 0)
- {
- return FALSE;
- }
- return TRUE;
-}
-
-static Boolean LIBCALLBACK IsGeneCluster (
- SeqFeatPtr sfp
-)
-{
- if (sfp == NULL
- || sfp->idx.subtype != FEATDEF_misc_feature
- || sfp->comment == NULL
- || (StringStr (sfp->comment, "gene cluster") == NULL
- && StringStr (sfp->comment, "gene locus") == NULL))
- {
- return FALSE;
- }
- return TRUE;
-}
-
-
-static void LIBCALLBACK GetGeneClusterFeatureLabel (
- ValNodePtr featlist,
- BioseqPtr bsp,
- Uint1 biomol,
- FeatureLabelPtr flp
-)
-{
- SeqFeatPtr main_feat;
- CharPtr cp;
- Int4 datalen;
-
- if (featlist == NULL || featlist->data.ptrvalue == NULL) return;
- main_feat = featlist->data.ptrvalue;
- if (StringHasNoText (main_feat->comment)) return;
- cp = StringStr (main_feat->comment, "gene cluster");
- if (cp == NULL)
- {
- cp = StringStr (main_feat->comment, "gene locus");
- if (cp == NULL) return;
- flp->typeword = StringSave ("gene locus");
- }
- else
- {
- flp->typeword = StringSave ("gene cluster");
- }
- flp->pluralizable = FALSE;
- flp->is_typeword_first = FALSE;
- datalen = cp - main_feat->comment;
- if (datalen > 0)
- {
- flp->description = (CharPtr) MemNew ((datalen + 1) * sizeof (Char));
- StringNCpy (flp->description, main_feat->comment, datalen);
- flp->description [datalen] = 0;
- TrimSpacesAroundString (flp->description);
- }
- else
- {
- flp->description = NULL;
- }
-}
-
-
-static Boolean LIBCALLBACK IsIntergenicSpacer (
- SeqFeatPtr sfp
-)
-{
- if (sfp == NULL
- || sfp->idx.subtype != FEATDEF_misc_feature
- || sfp->comment == NULL
- || StringStr (sfp->comment, "intergenic spacer") == NULL)
- {
- return FALSE;
- }
- return TRUE;
-}
-
-/* This function produces the default definition line label for a misc_feature
- * that has the word "intergenic spacer" in the comment. If the comment starts
- * with the word "contains", "contains" is ignored. If "intergenic spacer"
- * appears first in the comment (or first after the word "contains", the text
- * after the words "intergenic spacer" but before the first semicolon (if any)
- * appear after the words "intergenic spacer" in the definition line. If there
- * are words after "contains" or at the beginning of the comment before the words
- * "intergenic spacer", this text will appear in the definition line before the words
- * "intergenic spacer".
- */
-static void LIBCALLBACK GetIntergenicSpacerFeatureLabel (
- ValNodePtr featlist,
- BioseqPtr bsp,
- Uint1 biomol,
- FeatureLabelPtr flp
-)
-{
- SeqFeatPtr main_feat;
- CharPtr cp, buffer;
- Int4 datalen, offset;
-
- if (featlist == NULL || featlist->data.ptrvalue == NULL) return;
- main_feat = featlist->data.ptrvalue;
- if (StringHasNoText (main_feat->comment)) return;
- if (StringNCmp (main_feat->comment, "contains ", 9) == 0)
- {
- buffer = main_feat->comment + 9;
- }
- else
- {
- buffer = main_feat->comment;
- }
- cp = StringStr (buffer, "intergenic spacer");
- if (cp == NULL) return;
- flp->typeword = StringSave ("intergenic spacer");
- flp->pluralizable = FALSE;
- if (cp == buffer)
- {
- flp->is_typeword_first = TRUE;
- offset = StringLen ("intergenic spacer") + 1;
- if (StringNCmp (cp + offset, "and ", 4) == 0
- || *(cp + StringLen("intergenic spacer")) == 0)
- {
- flp->description = NULL;
- }
- else
- {
- flp->description = StringSave (cp + StringLen ("intergenic spacer") + 1);
- cp = StringChr (flp->description, ';');
- if (cp != NULL)
- {
- *cp = 0;
- }
- }
- }
- else
- {
- flp->is_typeword_first = FALSE;
- datalen = cp - buffer;
- flp->description = MemNew ( datalen + 1);
- if (flp->description == NULL) return;
- StringNCpy (flp->description, buffer, datalen);
- flp->description [datalen] = 0;
- TrimSpacesAroundString (flp->description);
- }
-}
-
-/* These structures are used for parsing tRNA and intergenic spacer information
- * from misc_feature comments.
- */
-typedef struct trnadef
-{
- Char product_name [9];
- Char gene_name [5];
-} tRNADefData, PNTR tRNADefPtr;
-
-typedef struct intergenicspacerdef
-{
- Char first_gene [5];
- Char second_gene [5];
-} IntergenicSpacerDefData, PNTR IntergenicSpacerDefPtr;
-
-static Boolean IsUpperCaseChar (Char ch)
-{
- if (StringChr("ABCDEFGHIJKLMNOPQRSTUVWXYZ",ch) != NULL)
- return TRUE;
- else
- return FALSE;
-}
-
-static Boolean IsLowerCaseChar (Char ch)
-{
- if (StringChr("abcdefghijklmnopqrstuvwxyz",ch) != NULL)
- return TRUE;
- else
- return FALSE;
-}
-
-static tRNADefPtr ParsetRNAFromNoteForDefLine (CharPtr PNTR defline)
-{
- tRNADefPtr tdp;
- CharPtr cp, gene_start;
-
- if (defline == NULL || *defline == NULL)
- {
- return NULL;
- }
-
- /* tRNA name must start with "tRNA-" and be followed by one uppercase letter and
- * two lowercase letters.
- */
- cp = *defline;
- if (StringNCmp (cp, "tRNA-", 5) != 0
- || ! IsUpperCaseChar (*(cp + 5))
- || ! IsLowerCaseChar (*(cp + 6))
- || ! IsLowerCaseChar (*(cp + 7)))
- {
- return NULL;
- }
-
- gene_start = cp + 8;
- /* gene name is required */
- if (*gene_start == 0 || *gene_start == ',')
- {
- return NULL;
- }
- /* skip over spaces */
- while (isspace (*gene_start))
- {
- gene_start ++;
- }
-
- /* gene name must be in parentheses, start with letters "trn",
- * and end with one uppercase letter.
- */
- if (StringNCmp (gene_start, "(trn", 4) != 0
- || ! IsUpperCaseChar (*(gene_start + 4))
- || * (gene_start + 5) != ')')
- {
- return NULL;
- }
-
- tdp = (tRNADefPtr) MemNew (sizeof (tRNADefData));
- if (tdp == NULL)
- {
- return NULL;
- }
- StringNCpy (tdp->product_name, cp, 8);
- tdp->product_name [8] = 0;
- StringNCpy (tdp->gene_name, gene_start + 1, 4);
- tdp->gene_name [4] = 0;
- *defline = gene_start + 6;
- return tdp;
-}
-
-static IntergenicSpacerDefPtr ParseIntergenicSpacerFromNoteForDef (CharPtr PNTR defline)
-{
- IntergenicSpacerDefPtr idp;
- CharPtr cp;
-
- if (defline == NULL || *defline == NULL)
- {
- return NULL;
- }
-
- /* description must start with "trn" and be followed by one uppercase letter, followed
- * by a dash, followed by "trn", followed by one uppercase letter, followed by whitespace,
- * followed by the phrase "intergenic spacer".
- */
- cp = *defline;
- if (StringNCmp (cp, "trn", 3) != 0
- || ! IsUpperCaseChar (*(cp + 3))
- || *(cp + 4) != '-'
- || StringNCmp (cp + 5, "trn", 3) != 0
- || ! IsUpperCaseChar (*(cp + 8))
- || *(cp + 9) != ' '
- || StringNCmp (cp + 10 + StringSpn (cp + 10, " "), "intergenic spacer", 17) != 0)
- {
- return NULL;
- }
-
- idp = (IntergenicSpacerDefPtr) MemNew (sizeof (IntergenicSpacerDefData));
- if (idp == NULL)
- {
- return NULL;
- }
-
- StringNCpy (idp->first_gene, cp, 4);
- idp->first_gene [4] = 0;
- StringNCpy (idp->second_gene, cp + 5, 4);
- idp->second_gene [4] = 0;
- *defline = cp + 27;
- return idp;
-}
-
-/* This creates a feature clause from a tRNADef structure. */
-static FeatureClausePtr
-FeatureClauseFromParsedtRNA
-(tRNADefPtr tdp,
- SeqFeatPtr misc_feat,
- Boolean is_partial,
- BioseqPtr bsp,
- Boolean suppress_locus_tag)
-{
- FeatureClausePtr fcp;
-
- if (tdp == NULL)
- {
- return NULL;
- }
-
- fcp = NewFeatureClause ( misc_feat, bsp, suppress_locus_tag);
- if (fcp != NULL)
- {
- fcp->feature_label_data.is_typeword_first = FALSE;
- fcp->feature_label_data.typeword = StringSave ("gene");
- fcp->feature_label_data.description = (CharPtr) MemNew (16 * sizeof (Char));
- if (fcp->feature_label_data.description != NULL)
- {
- sprintf (fcp->feature_label_data.description, "%s (%s)",
- tdp->product_name, tdp->gene_name);
- }
- if (is_partial)
- {
- fcp->interval = StringSave ("partial sequence");
- }
- else
- {
- fcp->interval = StringSave ("complete sequence");
- }
- }
- return fcp;
-}
-
-/* This function produces a feature clause list that should replace the original
- * single clause for a misc_feat that contains a note with one or more tRNAs and
- * an intergenic spacer.
- */
-static ValNodePtr
-ParsetRNAIntergenicSpacerElements
-(SeqFeatPtr misc_feat,
-BioseqPtr bsp,
-Boolean suppress_locus_tag)
-{
- FeatureClausePtr fcp;
- ValNodePtr head, vnp;
- Boolean partial5, partial3;
- CharPtr cp;
- IntergenicSpacerDefPtr spacer = NULL;
- tRNADefPtr trna1 = NULL, trna2 = NULL;
- Boolean parse_list = TRUE;
-
-
- if (misc_feat == NULL
- || StringHasNoText (misc_feat->comment))
- {
- return NULL;
- }
-
- /* for list, must start with the word "contains" */
- if (StringNICmp (misc_feat->comment, "contains ", 9) == 0)
- {
- cp = misc_feat->comment + 9;
- }
- else
- {
- return NULL;
- }
-
- while (isspace (*cp))
- {
- cp ++;
- }
-
- trna1 = ParsetRNAFromNoteForDefLine (&cp);
- if (trna1 != NULL)
- {
- if (*cp == ',')
- {
- *cp++;
- }
- if (StringNCmp (cp, " and", 4) == 0)
- {
- cp += 4;
- }
- while (isspace (*cp))
- {
- cp++;
- }
- }
-
- spacer = ParseIntergenicSpacerFromNoteForDef (&cp);
- if (spacer != NULL)
- {
- if (*cp == ',')
- {
- *cp++;
- }
- if (StringNCmp (cp, " and", 4) == 0)
- {
- cp += 4;
- }
- while (isspace (*cp))
- {
- cp++;
- }
- }
-
- trna2 = ParsetRNAFromNoteForDefLine (&cp);
-
- while (isspace (*cp))
- {
- cp++;
- }
-
- head = NULL;
- CheckSeqLocForPartial (misc_feat->location, &partial5, &partial3);
-
- if ((*cp != 0 && *cp != ';') /* this must be the complete note or be separated from
- * the rest of the note by a semicolon
- */
- || ! parse_list /* didn't start with "contains" */
- || spacer == NULL /* no spacer */
- /* don't parse if genes don't match up */
- || (trna1 != NULL && StringCmp (trna1->gene_name, spacer->first_gene) != 0)
- || (trna2 != NULL && StringCmp (trna2->gene_name, spacer->second_gene) != 0))
- {
- /* do nothing - special parse conditions not met */
- trna1 = MemFree (trna1);
- trna2 = MemFree (trna2);
- spacer = MemFree (spacer);
- return NULL;
- }
-
- /* add clause for tRNA before spacer (if any) */
- fcp = FeatureClauseFromParsedtRNA (trna1, misc_feat, partial5, bsp, suppress_locus_tag);
- if (fcp != NULL)
- {
- vnp = ValNodeNew (head);
- if (head == NULL) head = vnp;
- if (vnp == NULL) return NULL;
- vnp->data.ptrvalue = fcp;
- vnp->choice = DEFLINE_CLAUSEPLUS;
- }
-
- /* spacer was already checked, so we know it is not NULL */
- fcp = NewFeatureClause ( misc_feat, bsp, suppress_locus_tag);
- if (fcp != NULL)
- {
- fcp->feature_label_data.is_typeword_first = FALSE;
- fcp->feature_label_data.typeword = StringSave ("intergenic spacer");
- fcp->feature_label_data.description = (CharPtr) MemNew (10 * sizeof (Char));
- if (fcp->feature_label_data.description != NULL)
- {
- sprintf (fcp->feature_label_data.description, "%s-%s",
- spacer->first_gene, spacer->second_gene);
- }
- if ((trna1 == NULL && partial5) || (trna2 == NULL && partial3))
- {
- fcp->interval = StringSave ("partial sequence");
- }
- else
- {
- fcp->interval = StringSave ("complete sequence");
- }
-
- vnp = ValNodeNew (head);
- if (head == NULL) head = vnp;
- if (vnp == NULL) return NULL;
- vnp->data.ptrvalue = fcp;
- vnp->choice = DEFLINE_CLAUSEPLUS;
- }
-
- /* add clause for tRNA after spacer (if any) */
- fcp = FeatureClauseFromParsedtRNA (trna2, misc_feat, partial3, bsp, suppress_locus_tag);
- if (fcp != NULL)
- {
- vnp = ValNodeNew (head);
- if (head == NULL) head = vnp;
- if (vnp == NULL) return NULL;
- vnp->data.ptrvalue = fcp;
- vnp->choice = DEFLINE_CLAUSEPLUS;
- }
-
- return head;
-}
-
-static Boolean LIBCALLBACK IsSatelliteSequence (
- SeqFeatPtr sfp
-)
-{
- GBQualPtr gbqual;
- if (sfp == NULL
- || sfp->idx.subtype != FEATDEF_repeat_region
- || StringHasNoText (sfp->comment)
- || (StringNCmp (sfp->comment, "microsatellite", 14) != 0
- && StringNCmp (sfp->comment, "satellite", 9) != 0))
- {
- return FALSE;
- }
-
- for (gbqual = sfp->qual; gbqual != NULL; gbqual = gbqual->next)
- {
- if (StringCmp (gbqual->qual, "rpt_type") == 0
- && StringCmp (gbqual->val, "tandem") == 0)
- {
- return TRUE;
- }
- }
- return FALSE;
-}
-
-static Boolean LIBCALLBACK IsPromoter (
- SeqFeatPtr sfp
-)
-{
- if (sfp == NULL || sfp->idx.subtype != FEATDEF_promoter) return FALSE;
- return TRUE;
-}
-
-static Boolean LIBCALLBACK IsEndogenousVirusSourceFeature (
- SeqFeatPtr sfp
-)
-{
- BioSourcePtr biop;
- SubSourcePtr ssp;
-
- if (sfp == NULL || sfp->idx.subtype != FEATDEF_BIOSRC) return FALSE;
- if ((biop = sfp->data.value.ptrvalue) == NULL) return FALSE;
- ssp = biop->subtype;
- while (ssp != NULL && ssp->subtype != SUBSRC_endogenous_virus_name)
- {
- ssp = ssp->next;
- }
- if (ssp != NULL) return TRUE;
- return FALSE;
-}
-
-static CharPtr GetEndogenousVirusSourceFeatureDescription (
- SeqFeatPtr sfp
-)
-{
- BioSourcePtr biop;
- SubSourcePtr ssp;
-
- if (sfp == NULL || sfp->idx.subtype != FEATDEF_BIOSRC) return NULL;
- if ((biop = sfp->data.value.ptrvalue) == NULL) return NULL;
- ssp = biop->subtype;
- while (ssp != NULL && ssp->subtype != SUBSRC_endogenous_virus_name)
- {
- ssp = ssp->next;
- }
- if (ssp != NULL && ssp->name != NULL)
- {
- return StringSave (ssp->name);
- }
- return NULL;
-}
-
-
-static CharPtr noncoding_feature_keywords[] = {
- "similar to ",
- "contains "
-};
-
-static CharPtr find_noncoding_feature_keyword (
- CharPtr comment
-)
-{
- Int4 i, num_noncoding_feature_keywords, keywordlen;
- CharPtr cp, buffer;
-
- if (comment == NULL) return NULL;
- num_noncoding_feature_keywords = sizeof (noncoding_feature_keywords) / sizeof (CharPtr);
- for (i=0; i < num_noncoding_feature_keywords; i++)
- {
- keywordlen = StringLen (noncoding_feature_keywords [i]);
- buffer = comment;
- while ((cp = StringStr (buffer, noncoding_feature_keywords [i])) != NULL)
- {
- if ( StringNCmp (cp + keywordlen,
- "GenBank Accession Number",
- StringLen ("GenBank Accession Number")) != 0)
- {
- return cp + keywordlen;
- }
- else
- {
- buffer = cp + 1;
- }
- }
- }
- return NULL;
-}
-
-static Boolean LIBCALLBACK IsNoncodingProductFeat (
- SeqFeatPtr sfp
-)
-{
- if ( sfp == NULL
- || sfp->idx.subtype != FEATDEF_misc_feature
- || sfp->comment == NULL
- || StringStr (sfp->comment, "intergenic") != NULL
- || (find_noncoding_feature_keyword (sfp->comment) == NULL
- && (StringStr (sfp->comment, "nonfunctional ") == NULL
- || StringStr (sfp->comment, " due to ") == NULL)))
- {
- return FALSE;
- }
-
- return TRUE;
-}
-
-static CharPtr GetNoncodingProductFeatProduct (
- SeqFeatPtr sfp
-)
-{
- CharPtr productname;
- Int4 namelen, compare_len;
- CharPtr name_start, sep;
-
- if (sfp == NULL || sfp->comment == NULL) return NULL;
-
- if ((name_start = StringStr (sfp->comment, "nonfunctional ")) != NULL
- && (sep = StringStr (sfp->comment, " due to ")) != NULL
- && sep > name_start)
- {
- productname = StringSave (name_start);
- productname [ sep - name_start] = 0;
- return productname;
- }
-
- name_start = find_noncoding_feature_keyword (sfp->comment);
- if (name_start == NULL) return NULL;
-
- sep = StringStr (name_start, ";");
- if (sep == NULL)
- {
- namelen = StringLen (name_start);
- }
- else
- {
- namelen = sep - name_start;
- }
-
- productname = MemNew (namelen + 6);
- if (productname == NULL) return NULL;
-
- StringNCpy (productname, name_start, namelen);
- productname [namelen] = 0;
-
- /* remove sequence from end of name if present */
- compare_len = StringLen (" sequence");
- if (StringCmp (productname + namelen - compare_len, " sequence") == 0)
- {
- productname [ namelen - compare_len] = 0;
- namelen = StringLen (productname);
- }
- /* add "-like" if not present */
- compare_len = StringLen ("-like");
- if (StringCmp (productname + namelen - compare_len, "-like") != 0)
- {
- StringCat (productname, "-like");
- namelen = StringLen (productname);
- }
- return productname;
-}
-
-static Boolean LIBCALLBACK IsMiscFeat (
- SeqFeatPtr sfp
-)
-{
- if ( sfp == NULL
- || sfp->idx.subtype != FEATDEF_misc_feature
- || sfp->comment == NULL)
- {
- return FALSE;
- }
-
- return TRUE;
-}
-
-static Boolean LIBCALLBACK IsOperon (
- SeqFeatPtr sfp
-)
-{
- if (sfp == NULL
- || sfp->idx.subtype != FEATDEF_operon)
- {
- return FALSE;
- }
-
- return TRUE;
-}
-
-static Boolean IsRecognizedFeature (
- SeqFeatPtr sfp
-)
-{
- if (IsGene (sfp)
- || IsCDS (sfp)
- || IsExon (sfp)
- || IsIntron (sfp)
- || IsLTR (sfp)
- || IsrRNA (sfp)
- || IstRNA (sfp)
- || IsmRNA (sfp)
- || IsMiscRNA (sfp)
- || IssnoRNA (sfp)
- || IssnRNA (sfp)
- || IsscRNA (sfp)
- || IsPrecursorRNA (sfp)
- || Is3UTR (sfp)
- || Is5UTR (sfp)
- || IsMobileElement (sfp)
- || IsEndogenousVirusSequence (sfp)
- || IsEndogenousVirusSourceFeature (sfp)
- || IsDloop (sfp)
- || IsSatelliteSequence (sfp)
- || IsControlRegion (sfp)
- || IsIntergenicSpacer (sfp)
- || IsGeneCluster (sfp)
- || IsNoncodingProductFeat (sfp)
- || IsPromoter (sfp)
- || IsMiscFeat (sfp)
- || IsOperon (sfp))
- {
- return TRUE;
- }
- else
- {
- return FALSE;
- }
-}
-
-/* The following section of code contains functions for dealing with lists of
- * clauses.
- */
-
-/* The functions for freeing the memory associated with lists of clauses
- * are recursive.
- */
-static void FreeListElement (ValNodePtr element);
-
-/* This function simply frees the ValNodePtr, since there is no extra
- * memory associated with a DEFLINE_FEATLIST item - the sfp that is
- * pointed to by data.ptrvalue came from the sequence indexing functions
- * and should under no circumstances be freed.
- */
-static void FreeFeatlist (
- ValNodePtr featlist
-)
-{
-
- if (featlist == NULL) return;
- ValNodeFree (featlist);
-}
-
-/* This function frees the memory associated with a FeatureClause, including
- * the memory associated with any subclauses.
- */
-static void FreeClausePlusData (
- FeatureClausePtr fcp
-)
-{
- if (fcp->interval != NULL)
- {
- MemFree (fcp->interval);
- fcp->interval = NULL;
- }
- if (fcp->allelename != NULL)
- {
- MemFree (fcp->allelename);
- fcp->allelename = NULL;
- }
- if (fcp->feature_label_data.typeword != NULL)
- {
- MemFree (fcp->feature_label_data.typeword);
- fcp->feature_label_data.typeword = NULL;
- }
- if (fcp->feature_label_data.description != NULL)
- {
- MemFree (fcp->feature_label_data.description);
- fcp->feature_label_data.description = NULL;
- }
- if (fcp->feature_label_data.productname != NULL)
- {
- MemFree (fcp->feature_label_data.productname);
- fcp->feature_label_data.productname = NULL;
- }
- if (fcp->featlist != NULL)
- {
- FreeListElement (fcp->featlist);
- fcp->featlist = NULL;
- }
- if (fcp->slp != NULL)
- {
- SeqLocFree (fcp->slp);
- }
-}
-
-/* This function frees the data associated with the FeatureClause
- * and then frees the ValNode.
- */
-static void FreeClausePlus (
- ValNodePtr clauseplus
-)
-{
- FeatureClausePtr data_struct;
-
- if (clauseplus == NULL) return;
- data_struct = (FeatureClausePtr) clauseplus->data.ptrvalue;
- if (data_struct != NULL)
- {
- FreeClausePlusData (data_struct);
- MemFree (data_struct);
- clauseplus->data.ptrvalue = NULL;
- }
- ValNodeFree (clauseplus);
-}
-
-/* This function frees a list of DEFLINE_FEATLIST, DEFLINE_REMOVEFEAT,
- * and DEFLINE_CLAUSEPLUS items, starting with the last item in the list.
- * It recursively frees memory associated with subclauses.
- */
-static void FreeListElement (
- ValNodePtr element
-)
-{
- if (element == NULL) return;
-
- FreeListElement (element->next);
- element->next = NULL;
- if (element->choice == DEFLINE_FEATLIST
- || element->choice == DEFLINE_REMOVEFEAT)
- {
- FreeFeatlist (element);
- }
- else if (element->choice == DEFLINE_CLAUSEPLUS)
- {
- FreeClausePlus (element);
- }
-}
-
-/* This function excises from the list pointed to by head all of the clauses
- * with the delete_me flag set to TRUE and all of the ValNodes with a choice
- * of DEFLINE_REMOVEFEAT.
- */
-static void DeleteFeatureClauses (
- ValNodePtr PNTR head
-)
-{
- ValNodePtr vnp, prev;
- FeatureClausePtr fcp;
- Boolean delete_this_one;
-
- if (head == NULL) return;
-
- prev = NULL;
- vnp = *head;
- while (vnp != NULL)
- {
- delete_this_one = FALSE;
-
- if (vnp->choice == DEFLINE_CLAUSEPLUS)
- {
- fcp = vnp->data.ptrvalue;
- if (fcp == NULL || fcp->delete_me || fcp->featlist == NULL)
- {
- delete_this_one = TRUE;
- }
- else
- {
- DeleteFeatureClauses (&fcp->featlist);
- if (fcp->featlist == NULL) delete_this_one = TRUE;
- }
- }
- else if (vnp->choice == DEFLINE_REMOVEFEAT)
- {
- delete_this_one = TRUE;
- }
-
- if (delete_this_one)
- {
- if (prev == NULL)
- {
- *head = vnp->next;
- vnp->next = NULL;
- FreeListElement (vnp);
- if (*head == NULL) return;
- vnp = *head;
- }
- else
- {
- prev->next = vnp->next;
- vnp->next = NULL;
- FreeListElement (vnp);
- vnp = prev->next;
- }
- }
- else
- {
- prev = vnp;
- vnp = vnp->next;
- }
- }
-}
-
-/* This function counts the number of features in the feature list that
- * satisfy the itemmatch function (or all of them, if itemmatch is NULL).
- * If recurse_past_found_item, the function will not count features in
- * subclauses of features that satisfy itemmatch.
- */
-static Int4 CountFeatures (
- ValNodePtr clause_list,
- matchFunction itemmatch,
- Boolean recurse_past_found_item
-)
-{
- ValNodePtr vnp;
- Int4 num_features;
- FeatureClausePtr fcp;
-
- num_features = 0;
- for (vnp = clause_list;
- vnp != NULL;
- vnp = vnp->next)
- {
- if (vnp->choice == DEFLINE_FEATLIST
- && (itemmatch == NULL || itemmatch (vnp->data.ptrvalue)))
- {
- num_features++;
- if (! recurse_past_found_item)
- {
- return num_features;
- }
- }
- else if (vnp->choice == DEFLINE_CLAUSEPLUS
- && (fcp = vnp->data.ptrvalue) != NULL)
- {
- num_features += CountFeatures (fcp->featlist,
- itemmatch,
- recurse_past_found_item);
- }
- }
- return num_features;
-}
-
-/* The following section of code contains functions for grouping features. */
-
-typedef struct matchruledata {
- matchFunction is_item;
- Int4 num_match_rules;
- matchFunction *match_rules;
-} MatchRuleData, PNTR MatchRulePtr;
-
-static void InitRuleForTopLevelClauses (MatchRulePtr mrp)
-{
- if (mrp == NULL)
- {
- return;
- }
- mrp->num_match_rules = 4;
- mrp->match_rules = MemNew (mrp->num_match_rules
- * sizeof (matchFunction));
- if (mrp->match_rules == NULL) return;
- mrp->match_rules[0] = IsMobileElement;
- mrp->match_rules[1] = IsEndogenousVirusSourceFeature;
- mrp->match_rules[2] = IsOperon;
- mrp->match_rules[3] = IsGeneCluster;
-}
-
-static void InitRuleForBottomLevelClauses (MatchRulePtr mrp)
-{
- if (mrp == NULL)
- {
- return;
- }
- mrp->num_match_rules = 6;
- mrp->match_rules = MemNew (mrp->num_match_rules
- * sizeof (matchFunction));
- if (mrp->match_rules == NULL) return;
- mrp->match_rules[0] = IsCDS;
- mrp->match_rules[1] = IsmRNA;
- mrp->match_rules[2] = IsGene;
- mrp->match_rules[3] = IsEndogenousVirusSourceFeature;
- mrp->match_rules[4] = IsOperon;
- mrp->match_rules[5] = IsGeneCluster;
-}
-
-/* NumGroupingRules is the number of features for which there is a list of
- * features to group under.
- * When grouping features, each feature in the list is examined sequentially.
- * If there is a rule set that applies to that feature, the entire feature
- * list is searched for each feature type that this feature might group
- * beneath. This preserves the biological order that was generated by the
- * original listing of features by sequence indexing.
- */
-#define NumGroupingRules 13
-static MatchRulePtr InitializeGroupingRules()
-{
- MatchRulePtr grouping_rules;
-
- grouping_rules = MemNew (NumGroupingRules * sizeof (MatchRuleData));
- if (grouping_rules == NULL) return NULL;
-
- grouping_rules[0].is_item = IsExon;
- grouping_rules[0].num_match_rules = 8;
- grouping_rules[0].match_rules = MemNew (grouping_rules[0].num_match_rules
- * sizeof (matchFunction));
- if (grouping_rules[0].match_rules == NULL) return NULL;
- grouping_rules[0].match_rules[0] = IsCDS;
- grouping_rules[0].match_rules[1] = IsNoncodingProductFeat;
- grouping_rules[0].match_rules[2] = IsDloop;
- grouping_rules[0].match_rules[3] = IsmRNA;
- grouping_rules[0].match_rules[4] = IsGene;
- grouping_rules[0].match_rules[5] = IsEndogenousVirusSourceFeature;
- grouping_rules[0].match_rules[6] = IsOperon;
- grouping_rules[0].match_rules[7] = IsGeneCluster;
-
- grouping_rules[1].is_item = IsIntron;
- grouping_rules[1].num_match_rules = 8;
- grouping_rules[1].match_rules = MemNew (grouping_rules[1].num_match_rules
- * sizeof (matchFunction));
- if (grouping_rules[1].match_rules == NULL) return NULL;
- grouping_rules[1].match_rules[0] = IsCDS;
- grouping_rules[1].match_rules[1] = IsNoncodingProductFeat;
- grouping_rules[1].match_rules[2] = IstRNA;
- grouping_rules[1].match_rules[3] = IsDloop;
- grouping_rules[1].match_rules[4] = IsGene;
- grouping_rules[1].match_rules[5] = IsEndogenousVirusSourceFeature;
- grouping_rules[1].match_rules[6] = IsOperon;
- grouping_rules[1].match_rules[7] = IsGeneCluster;
-
- grouping_rules[2].is_item = IsPromoter;
- InitRuleForBottomLevelClauses (grouping_rules + 2);
-
- grouping_rules[3].is_item = IsCDS;
- grouping_rules[3].num_match_rules = 5;
- grouping_rules[3].match_rules = MemNew (grouping_rules[3].num_match_rules
- * sizeof (matchFunction));
- if (grouping_rules[3].match_rules == NULL) return NULL;
- grouping_rules[3].match_rules[0] = IsmRNA;
- grouping_rules[3].match_rules[1] = IsMobileElement;
- grouping_rules[3].match_rules[2] = IsEndogenousVirusSourceFeature;
- grouping_rules[3].match_rules[3] = IsOperon;
- grouping_rules[3].match_rules[4] = IsGeneCluster;
-
- grouping_rules[4].is_item = IsMobileElement;
- InitRuleForTopLevelClauses (grouping_rules + 4);
-
- grouping_rules[5].is_item = Is3UTR;
- InitRuleForBottomLevelClauses (grouping_rules + 5);
-
- grouping_rules[6].is_item = Is5UTR;
- InitRuleForBottomLevelClauses (grouping_rules + 6);
-
- grouping_rules[7].is_item = IsLTR;
- InitRuleForBottomLevelClauses (grouping_rules + 7);
-
- grouping_rules[8].is_item = IsGene;
- InitRuleForTopLevelClauses (grouping_rules + 8);
-
- grouping_rules[9].is_item = IsIntergenicSpacer;
- InitRuleForTopLevelClauses (grouping_rules + 9);
-
- grouping_rules[10].is_item = IsNoncodingProductFeat;
- InitRuleForTopLevelClauses (grouping_rules + 10);
-
- grouping_rules[11].is_item = IsOperon;
- InitRuleForTopLevelClauses (grouping_rules + 11);
-
- grouping_rules[12].is_item = IsGeneCluster;
- InitRuleForTopLevelClauses (grouping_rules + 12);
-
- return grouping_rules;
-}
-
-static void FreeGroupingRules(
- MatchRulePtr grouping_rules
-)
-{
- Int4 i;
-
- if (grouping_rules == NULL) return;
-
- for (i = 0; i < NumGroupingRules; i++)
- {
- if (grouping_rules[i].match_rules != NULL)
- MemFree (grouping_rules[i].match_rules);
- grouping_rules[i].match_rules = NULL;
- }
- MemFree (grouping_rules);
-}
-
-static Boolean IsmRNASequence (BioseqPtr bsp)
-{
- SeqDescrPtr sdp;
- MolInfoPtr mip;
-
- if (bsp == NULL || bsp->mol != Seq_mol_rna || bsp->descr == NULL)
- {
- return FALSE;
- }
- sdp = bsp->descr;
- while (sdp != NULL && sdp->choice != Seq_descr_molinfo)
- {
- sdp = sdp->next;
- }
- if (sdp == NULL || sdp->data.ptrvalue == NULL)
- {
- return FALSE;
- }
- mip = (MolInfoPtr) sdp->data.ptrvalue;
-
- if (mip->biomol == 3)
- {
- return TRUE;
- }
- else
- {
- return FALSE;
- }
-}
-
-typedef struct matchcandidate
-{
- ValNodePtr matched_clause;
- SeqLocPtr slp;
-} MatchCandidateData, PNTR MatchCandidatePtr;
-
-/* This function searches the search_list for features that satisfy the
- * match function and satisfy locational requirements relative to the
- * clause.
- * If more than one clause meets the match requirements, the smallest one
- * is chosen.
- */
-static void FindBestMatchCandidate
-(FeatureClausePtr clause,
- ValNodePtr search_list,
- FeatureClausePtr search_parent,
- matchFunction match,
- Boolean gene_cluster_opp_strand,
- BioseqPtr bsp,
- MatchCandidatePtr current_candidate)
-{
- ValNodePtr search_clause;
- SeqFeatPtr addsfp, clause_sfp;
- FeatureClausePtr searchfcp;
- SeqLocPtr slp;
-
- if (clause == NULL || clause->slp == NULL || current_candidate == NULL) return;
-
- clause_sfp = (SeqFeatPtr) (clause->featlist->data.ptrvalue);
-
- for (search_clause = search_list;
- search_clause != NULL;
- search_clause = search_clause->next)
- {
- if (search_clause->data.ptrvalue == clause)
- continue;
- if (search_clause->choice == DEFLINE_FEATLIST
- && search_clause->data.ptrvalue != NULL)
- {
- addsfp = search_clause->data.ptrvalue;
- /* slp is the location of the feature we are trying to
- * group this feature with
- */
- if (search_parent != NULL)
- {
- slp = search_parent->slp;
- }
- else
- {
- slp = addsfp->location;
- }
- if (match (search_clause->data.ptrvalue))
- {
- /* Transposons, insertion sequences, integrons, and endogenous virii
- * take subfeatures regardless of whether the subfeature is
- * on the same strand.
- * Gene Clusters can optionally take subfeatures on either
- * strand (gene_cluster_opp_strand is flag).
- * Promoters will match up to features that are adjacent.
- * Introns will match up to coding regions whose intervals
- * are adjacent to the endpoints of the intron, or to other
- * features if the intron location is inside the other feature.
- * All other feature matches must be that the feature to
- * go into the clause must fit inside the location of the
- * other clause.
- */
- if (((match == IsMobileElement
- || match == IsEndogenousVirusSourceFeature
- || (match == IsGeneCluster && gene_cluster_opp_strand))
- && SeqLocAinB (clause->slp, slp) > -1)
- || IsLocAInBonSameStrand (clause->slp, slp)
- || ( IsPromoter (clause_sfp)
- && IsAAdjacentToB (clause->slp, search_parent->slp, bsp,
- ADJACENT_TYPE_UPSTREAM, TRUE))
- || IsmRNASequence (bsp)
- || (match == IsCDS
- && IsIntron (clause_sfp)
- && IsAEmptyIntervalOfB (clause->slp, slp, bsp))
- || (match == IsCDS
- && IsExon (clause_sfp)
- && LocAContainsIntervalOfB (clause->slp, slp)))
- {
- /* if we don't already have a candidate, or if this
- * candidate's location is inside the current candidate,
- * take this candidate.
- */
- if (current_candidate->matched_clause == NULL
- || SeqLocAinB (slp, current_candidate->slp) > 0)
- {
- current_candidate->matched_clause = search_clause;
- current_candidate->slp = slp;
- }
- }
- }
- }
- else if (search_clause->choice == DEFLINE_CLAUSEPLUS
- && search_clause->data.ptrvalue != NULL)
- {
- searchfcp = search_clause->data.ptrvalue;
- FindBestMatchCandidate (clause, searchfcp->featlist, searchfcp,
- match, gene_cluster_opp_strand, bsp,
- current_candidate);
- }
- }
-}
-
-
-/* This function iterates through the matches in the specified grouping rule.
- * If more than one match is found, the clause with the smallest location is
- * used.
- * If a match is found, the clause is added to the list of clauses for that
- * feature's parent clause.
- */
-static Boolean GroupClauseByRule (
- FeatureClausePtr clause,
- ValNodePtr search_list,
- MatchRulePtr grouping_rule,
- Boolean gene_cluster_opp_strand,
- BioseqPtr bsp
-)
-{
- Int4 rule_index;
- MatchCandidateData mcd;
- Boolean rval = FALSE;
- ValNodePtr newfeat;
-
- mcd.slp = NULL;
- mcd.matched_clause = NULL;
-
- for (rule_index = 0;
- rule_index < grouping_rule->num_match_rules;
- rule_index ++)
- {
-
- FindBestMatchCandidate (clause, search_list, NULL,
- grouping_rule->match_rules[rule_index],
- gene_cluster_opp_strand, bsp, &mcd);
- }
- if (mcd.matched_clause != NULL)
- {
- newfeat = ValNodeNew (mcd.matched_clause);
- if (newfeat == NULL) return FALSE;
- newfeat->choice = DEFLINE_CLAUSEPLUS;
- newfeat->data.ptrvalue = clause;
- rval = TRUE;
- }
- return rval;
-}
-
-
-/* This function determines whether a subclause contains just a 3' UTR feature
- * and no other details.
- */
-static Boolean Is3UTRClause (FeatureClausePtr clause)
-{
- if (clause == NULL
- || clause->featlist == NULL
- || clause->featlist->choice != DEFLINE_FEATLIST
- || clause->featlist->data.ptrvalue == NULL
- || clause->featlist->next != NULL)
- {
- return FALSE;
- }
- return Is3UTR(clause->featlist->data.ptrvalue);
-}
-
-/* This function will move 3' UTRs to the end of any subfeat lists
- * so that they can be listed after the partial/complete CDS.
- */
-static void Move3UTRToEndOfSubFeatList (ValNodePtr clause_list)
-{
- ValNodePtr vnp, prev, last_vnp;
- FeatureClausePtr clause;
-
- if (clause_list == NULL || clause_list->next == NULL)
- {
- return;
- }
- prev = clause_list;
- for (vnp = clause_list->next; vnp != NULL; vnp = vnp->next)
- {
- if (vnp->data.ptrvalue != NULL && vnp->choice == DEFLINE_CLAUSEPLUS)
- {
- clause = vnp->data.ptrvalue;
- if (Is3UTRClause (clause))
- {
- if (vnp->next != NULL)
- {
- /* move to end of clause list */
- last_vnp = vnp->next;
- while (last_vnp->next != NULL)
- {
- last_vnp = last_vnp->next;
- }
- prev->next = vnp->next;
- last_vnp->next = vnp;
- vnp->next = NULL;
- }
- }
- else
- {
- prev = vnp;
- Move3UTRToEndOfSubFeatList (clause->featlist);
- }
- }
- else
- {
- prev = vnp;
- }
- }
-}
-
-/* This function iterates over the list of features, attempting to find and
- * apply grouping rules for each feature.
- */
-static void GroupAllClauses (
- ValNodePtr PNTR clause_list,
- Boolean gene_cluster_opp_strand,
- BioseqPtr bsp
-)
-{
- MatchRulePtr grouping_rules;
- ValNodePtr vnp, prev;
- FeatureClausePtr clause;
- SeqFeatPtr main_feat;
- Int4 rule_index;
-
- grouping_rules = InitializeGroupingRules();
- if (grouping_rules == NULL) return;
-
- for (vnp = *clause_list; vnp != NULL; vnp = vnp->next)
- {
- if (vnp->choice == DEFLINE_CLAUSEPLUS && vnp->data.ptrvalue != NULL)
- {
- clause = vnp->data.ptrvalue;
- if (clause->featlist != NULL
- && clause->featlist->choice == DEFLINE_FEATLIST
- && clause->featlist->data.ptrvalue != NULL)
- {
- main_feat = clause->featlist->data.ptrvalue;
- for (rule_index = 0;
- rule_index < NumGroupingRules
- && ! grouping_rules[rule_index].is_item (main_feat);
- rule_index++)
- {
- }
- if (rule_index < NumGroupingRules)
- {
- if ( GroupClauseByRule (clause, *clause_list,
- grouping_rules + rule_index,
- gene_cluster_opp_strand,
- bsp))
- {
- vnp->data.ptrvalue = NULL;
- }
- }
- }
- }
- }
- FreeGroupingRules(grouping_rules);
-
- vnp = *clause_list;
- prev = NULL;
- while (vnp != NULL)
- {
- if (vnp->data.ptrvalue == NULL)
- {
- if (prev == NULL)
- {
- *clause_list = vnp->next;
- vnp->next = NULL;
- ValNodeFree (vnp);
- vnp = *clause_list;
- }
- else
- {
- prev->next = vnp->next;
- vnp->next = NULL;
- ValNodeFree (vnp);
- vnp = prev->next;
- }
- }
- else
- {
- prev = vnp;
- vnp = vnp->next;
- }
- }
-
- Move3UTRToEndOfSubFeatList (*clause_list);
-}
-
-/* This function exists to handle the special case where two or more exons
- * are alternatively spliced, but there are no CDSs to represent some of the
- * alternatively spliced forms. In order to make sure that all of the exons
- * that are alternatively spliced together appear with the CDS, they are
- * temporarily consolidated into a single clause with a location that
- * is the intersection of the exons' locations. The clause will be
- * re-expanded after grouping by the ExpandAltSplicedExons function.
- */
-static void GroupAltSplicedExons (
- ValNodePtr PNTR clause_list,
- BioseqPtr bsp,
- Boolean delete_now
-)
-{
- ValNodePtr clause, search_clause, vnp;
- FeatureClausePtr fcp, search_fcp;
- SeqFeatPtr sfp, search_sfp;
- SeqLocPtr new_slp;
-
- if (clause_list == NULL) return;
-
- for (clause = *clause_list; clause != NULL; clause = clause->next)
- {
- if (clause->choice != DEFLINE_CLAUSEPLUS
- || clause->data.ptrvalue == NULL)
- {
- continue;
- }
- fcp = clause->data.ptrvalue;
- if ( ! fcp->is_alt_spliced
- || fcp->delete_me
- || fcp->featlist == NULL
- || fcp->featlist->choice != DEFLINE_FEATLIST)
- {
- continue;
- }
- sfp = fcp->featlist->data.ptrvalue;
- if ( ! IsExon (sfp))
- {
- continue;
- }
-
- for ( search_clause = clause->next;
- search_clause != NULL
- && search_clause->choice == DEFLINE_CLAUSEPLUS
- && search_clause->data.ptrvalue != NULL
- && (search_fcp = search_clause->data.ptrvalue) != NULL
- && ! search_fcp->delete_me
- && search_fcp->is_alt_spliced
- && search_fcp->featlist != NULL
- && search_fcp->featlist->choice == DEFLINE_FEATLIST
- && (search_sfp = search_fcp->featlist->data.ptrvalue) != NULL
- && IsExon (search_sfp)
- && TestFeatOverlap (sfp, search_sfp, SIMPLE_OVERLAP) != -1;
- search_clause = search_clause->next)
- {
- vnp = ValNodeNew (fcp->featlist);
- if (vnp == NULL) return;
- vnp->choice = DEFLINE_FEATLIST;
- vnp->data.ptrvalue = search_sfp;
- search_fcp->delete_me = TRUE;
- new_slp = SeqLocIntersection (fcp->slp, search_fcp->slp, bsp);
- SeqLocFree (fcp->slp);
- fcp->slp = new_slp;
- }
- }
- if (delete_now)
- {
- DeleteFeatureClauses (clause_list);
- }
-}
-
-/* This function expands a clause filled with alternatively-spliced exons
- * that was created in the GroupAltSplicedExons function.
- */
-static void ExpandAltSplicedExons (
- ValNodePtr clause_list,
- BioseqPtr bsp,
- Boolean suppress_locus_tag)
-{
- ValNodePtr clause, rest_of_list, featlist, new_clause;
- FeatureClausePtr fcp, new_fcp;
- SeqFeatPtr sfp;
-
- for (clause = clause_list;
- clause != NULL;
- clause = clause->next)
- {
- if (clause->choice != DEFLINE_CLAUSEPLUS
- || (fcp = clause->data.ptrvalue) == NULL
- || fcp->featlist == NULL)
- {
- continue;
- }
- if ( fcp->featlist->choice == DEFLINE_FEATLIST
- && (sfp = fcp->featlist->data.ptrvalue) != NULL
- && IsExon (sfp)
- && fcp->featlist->next != NULL
- && fcp->featlist->next->choice == DEFLINE_FEATLIST
- && IsExon (fcp->featlist->next->data.ptrvalue))
- {
- rest_of_list = clause->next;
- clause->next = NULL;
- for (featlist = fcp->featlist->next;
- featlist != NULL
- && featlist->choice == DEFLINE_FEATLIST
- && IsExon (featlist->data.ptrvalue);
- featlist = featlist->next)
- {
- new_clause = ValNodeNew (clause);
- if (new_clause == NULL) return;
- new_fcp = NewFeatureClause (featlist->data.ptrvalue, bsp, suppress_locus_tag);
- if (new_fcp == NULL) return;
- new_fcp->grp = fcp->grp;
- new_fcp->is_alt_spliced = fcp->is_alt_spliced;
- new_fcp->make_plural = fcp->make_plural;
- new_clause->choice = DEFLINE_CLAUSEPLUS;
- new_clause->data.ptrvalue = new_fcp;
- }
- ValNodeFree (fcp->featlist->next);
- fcp->featlist->next = NULL;
- new_clause->next = rest_of_list;
-
- /* put back location for first exon - was reduced to union of
- * all exon intervals in GroupAltSplicedExons
- */
- SeqLocFree (fcp->slp);
- sfp = fcp->featlist->data.ptrvalue;
- fcp->slp = SeqLocMerge (bsp, sfp->location, NULL, FALSE, TRUE, FALSE);
- }
- else
- {
- ExpandAltSplicedExons (fcp->featlist, bsp, suppress_locus_tag);
- }
- }
-}
-
-static Boolean DoFeaturesShareGene (SeqFeatPtr sfp1, SeqFeatPtr sfp2)
-{
- Boolean share_gene = FALSE;
- SeqFeatPtr found_gene1, found_gene2;
-
- if (sfp1 != NULL && sfp2 != NULL
- && !SeqMgrGeneIsSuppressed (SeqMgrGetGeneXref(sfp1))
- && !SeqMgrGeneIsSuppressed (SeqMgrGetGeneXref(sfp2)))
- {
- found_gene1 = SeqMgrGetOverlappingGene (sfp1->location, NULL);
- found_gene2 = SeqMgrGetOverlappingGene (sfp2->location, NULL);
- if (found_gene1 == found_gene2 && found_gene1 != NULL)
- {
- share_gene = TRUE;
- }
- }
- return share_gene;
-}
-
-/* This function determines whether two features share the same product name */
-static Boolean
-DoProductNamesMatch
-(SeqFeatPtr sfp1,
- SeqFeatPtr sfp2,
- BioseqPtr bsp,
- Boolean suppress_locus_tag)
-{
- CharPtr productname1;
- CharPtr productname2;
- Boolean names_match = FALSE;
-
- productname1 = GetProductName (sfp1, bsp, suppress_locus_tag);
- productname2 = GetProductName (sfp2, bsp, suppress_locus_tag);
- if (StringHasNoText (productname1) && StringHasNoText (productname2))
- {
- names_match = TRUE;
- }
- else if (StringCmp (productname1, productname2) == 0)
- {
- names_match = TRUE;
- }
-
- productname1 = MemFree (productname1);
- productname2 = MemFree (productname2);
-
- return names_match;
-}
-
-/* This function should combine CDSs that do not have a joined location
- * but are part of the same gene and have the same protein name.
- */
-static void GroupSegmentedCDSs (
- ValNodePtr PNTR clause_list,
- BioseqPtr bsp,
- Boolean delete_now,
- Boolean suppress_locus_tag
-)
-{
- ValNodePtr clause, search_clause, vnp;
- FeatureClausePtr fcp, search_fcp;
- SeqFeatPtr sfp, search_sfp;
- SeqLocPtr new_slp;
-
- if (clause_list == NULL) return;
-
- for (clause = *clause_list; clause != NULL; clause = clause->next)
- {
- if (clause->choice != DEFLINE_CLAUSEPLUS
- || clause->data.ptrvalue == NULL)
- {
- continue;
- }
- fcp = clause->data.ptrvalue;
- if (fcp->delete_me
- || fcp->featlist == NULL
- || fcp->featlist->choice != DEFLINE_FEATLIST)
- {
- continue;
- }
- sfp = fcp->featlist->data.ptrvalue;
- if ( ! IsCDS (sfp))
- {
- continue;
- }
-
- for ( search_clause = clause->next;
- search_clause != NULL;
- search_clause = search_clause->next)
- {
- if (search_clause->choice != DEFLINE_CLAUSEPLUS
- || search_clause->data.ptrvalue == NULL
- || (search_fcp = search_clause->data.ptrvalue) == NULL
- || search_fcp->delete_me
- || search_fcp->featlist == NULL
- || search_fcp->featlist->choice != DEFLINE_FEATLIST
- || (search_sfp = search_fcp->featlist->data.ptrvalue) == NULL
- || ! IsCDS (search_sfp)
- || ! DoFeaturesShareGene (sfp, search_sfp)
- || ! DoProductNamesMatch (sfp, search_sfp, bsp, suppress_locus_tag))
- {
- continue;
- }
- vnp = ValNodeNew (fcp->featlist);
- if (vnp == NULL) return;
- vnp->choice = DEFLINE_FEATLIST;
- vnp->data.ptrvalue = search_sfp;
- search_fcp->delete_me = TRUE;
- new_slp = SeqLocMerge (bsp, fcp->slp, search_fcp->slp,
- FALSE, TRUE, FALSE);
-
- SeqLocFree (fcp->slp);
- fcp->slp = new_slp;
- }
- }
- if (delete_now)
- {
- DeleteFeatureClauses (clause_list);
- }
-}
-
-
-/* This function searches this list for clauses to which this gene should
- * apply. This is not taken care of by the GroupAllClauses function
- * because genes are added to clauses as a GeneRefPtr instead of as an
- * additional feature in the list, and because a gene can apply to more
- * than one clause, while other features should really only belong to
- * one clause.
- */
-static Boolean AddGeneToClauses
-( SeqFeatPtr gene,
- CharPtr gene_productname,
- ValNodePtr clause_list,
- Boolean suppress_locus_tag)
-{
- ValNodePtr clause;
- FeatureClausePtr fcp;
- SeqFeatPtr sfp, found_gene;
- GeneRefPtr grp;
- Boolean used_gene;
-
- if (gene == NULL || gene->data.value.ptrvalue == NULL) return FALSE;
- if (clause_list == NULL) return FALSE;
-
- used_gene = FALSE;
- grp = gene->data.value.ptrvalue;
- for (clause = clause_list; clause != NULL; clause = clause->next)
- {
- fcp = clause->data.ptrvalue;
- if (fcp == NULL || fcp->featlist == NULL) return FALSE;
- sfp = fcp->featlist->data.ptrvalue;
- if (sfp != NULL && !SeqMgrGeneIsSuppressed (SeqMgrGetGeneXref(sfp))
- && (IsCDS (sfp)
- || IsrRNA (sfp)
- || IstRNA (sfp)
- || IsmRNA (sfp)
- || IsMiscRNA (sfp)
- || IssnRNA (sfp)
- || IsscRNA (sfp)
- || IssnoRNA (sfp)
- || IsPrecursorRNA (sfp)
- || IsNoncodingProductFeat (sfp)))
- {
- if (fcp->grp == NULL)
- {
- found_gene = SeqMgrGetOverlappingGene (sfp->location, NULL);
- if (found_gene != NULL)
- {
- fcp->grp = (GeneRefPtr) found_gene->data.value.ptrvalue;
- }
- }
-
- if (fcp->grp != NULL && DoGenesMatch (fcp->grp, grp, suppress_locus_tag))
- {
- used_gene = TRUE;
- if (gene_productname != NULL
- && fcp->feature_label_data.productname == NULL
- && IsCDS (sfp))
- {
- fcp->feature_label_data.productname =
- StringSave (gene_productname);
- }
- }
- else if (fcp->grp == NULL
- && IsLocAInBonSameStrand (sfp->location, gene->location))
- {
- fcp->grp = grp;
- used_gene = TRUE;
- if (gene_productname != NULL
- && fcp->feature_label_data.productname == NULL
- && IsCDS (sfp))
- {
- fcp->feature_label_data.productname =
- StringSave (gene_productname);
- }
- }
- }
- }
- return used_gene;
-}
-
-/* This function iterates through the list of features and calls
- * AddGeneToClauses for each gene feature it finds.
- */
-static void GroupGenes (ValNodePtr PNTR clause_list, Boolean suppress_locus_tag)
-{
- ValNodePtr vnp;
- ValNodePtr featlist;
- FeatureClausePtr fcp;
-
- for (vnp = *clause_list; vnp != NULL; vnp = vnp->next)
- {
- if (vnp->choice != DEFLINE_CLAUSEPLUS) return;
- fcp = (FeatureClausePtr) vnp->data.ptrvalue;
- if (fcp == NULL) return;
-
- featlist = fcp->featlist;
- if (featlist != NULL
- && featlist->choice == DEFLINE_FEATLIST
- && IsGene (featlist->data.ptrvalue))
- {
- AddGeneToClauses (featlist->data.ptrvalue,
- fcp->feature_label_data.productname,
- vnp->next, suppress_locus_tag);
- }
- }
-}
-
-/* This function searches this list for clauses to which this mRNA should
- * apply. This is not taken care of by the GroupAllClauses function
- * because when an mRNA is added to a CDS, the product for the clause is
- * replaced and the location for the clause is expanded, rather than simply
- * adding the mRNA as an additional feature in the list, and because an
- * mRNA can apply to more than one clause, while other features should
- * really only belong to one clause.
- */
-static Boolean AddmRNAToClauses
-( SeqFeatPtr mRNA,
- ValNodePtr clause_list,
- BioseqPtr bsp,
- Boolean suppress_locus_tag)
-{
- ValNodePtr clause;
- FeatureClausePtr fcp;
- SeqFeatPtr sfp;
- Boolean used_mRNA;
- CharPtr productname;
- SeqLocPtr new_slp;
-
- if (mRNA == NULL || mRNA->data.value.ptrvalue == NULL) return FALSE;
- if (clause_list == NULL) return FALSE;
-
- used_mRNA = FALSE;
- productname = GetProductName (mRNA, bsp, suppress_locus_tag);
- if (productname == NULL) return TRUE;
-
- for (clause = clause_list; clause != NULL; clause = clause->next)
- {
- fcp = clause->data.ptrvalue;
- if (fcp == NULL || fcp->featlist == NULL) return FALSE;
- sfp = fcp->featlist->data.ptrvalue;
- if (sfp == NULL)
- {
- }
- else if (IsCDS (sfp)
- && fcp->feature_label_data.productname != NULL
- && StringCmp (fcp->feature_label_data.productname, productname) == 0)
- {
- used_mRNA = TRUE;
- fcp->has_mrna = TRUE;
- if (IsLocAInBonSameStrand (sfp->location, mRNA->location))
- {
- new_slp = SeqLocMerge (bsp, fcp->slp, mRNA->location,
- FALSE, TRUE, FALSE);
- if (new_slp == NULL) return FALSE;
- if (fcp->slp != NULL)
- {
- SeqLocFree (fcp->slp);
- }
- fcp->slp = new_slp;
- }
- }
- else if (fcp->feature_label_data.productname == NULL
- && (IsCDS (sfp) || IsGene (sfp))
- && (IsLocAInBonSameStrand (sfp->location, mRNA->location)
- || IsLocAInBonSameStrand (mRNA->location, sfp->location)))
- {
- fcp->feature_label_data.productname = StringSave (productname);
- used_mRNA = TRUE;
- fcp->has_mrna = TRUE;
- new_slp = SeqLocMerge (bsp, fcp->slp, mRNA->location,
- FALSE, TRUE, FALSE);
- if (new_slp == NULL) return FALSE;
- if (fcp->slp != NULL)
- {
- SeqLocFree (fcp->slp);
- }
- fcp->slp = new_slp;
- }
- }
- return used_mRNA;
-}
-
-/* This function iterates through the list of features and calls
- * AddmRNAToClauses for each mRNA feature it finds.
- */
-static void GroupmRNAs (
- ValNodePtr PNTR clause_list,
- BioseqPtr bsp,
- Boolean suppress_locus_tag
-)
-{
- ValNodePtr vnp;
- ValNodePtr featlist;
- FeatureClausePtr fcp;
-
- for (vnp = *clause_list; vnp != NULL; vnp = vnp->next)
- {
- if (vnp->choice != DEFLINE_CLAUSEPLUS) return;
- fcp = (FeatureClausePtr) vnp->data.ptrvalue;
- if (fcp == NULL) return;
-
- featlist = fcp->featlist;
- if (featlist != NULL
- && featlist->choice == DEFLINE_FEATLIST
- && IsmRNA (featlist->data.ptrvalue))
- {
- if (AddmRNAToClauses (featlist->data.ptrvalue, *clause_list, bsp, suppress_locus_tag))
- {
- fcp->delete_me = TRUE;
- }
- }
- }
- DeleteFeatureClauses (clause_list);
-}
-
-/* This section of code contains functions for generating labels for
- * clauses for the definition lines.
- */
-
-/* This function examines the specified typeword and determines whether it
- * should appear before or after the description of the feature in the
- * definition line.
- */
-static Boolean IsTypeWordFirst (
- CharPtr typeword
-)
-{
- Int4 i;
- if (typeword == NULL) return FALSE;
- if (StringCmp (typeword, "exon") == 0
- || StringCmp (typeword, "intron") == 0
- || StringCmp (typeword, "endogenous virus") == 0)
- {
- return TRUE;
- }
- else
- {
- i = StartsWithMobileElementKeyword (typeword);
- if (i >= 0 && i != eMobileElementIntegron) {
- return TRUE;
- }
- return FALSE;
- }
-}
-
-/* This function determines the word to use to indicate what type of feature
- * is being described in the definition line. For certain feature types,
- * the word to use in the definition line varies based on the type of
- * molecule in the record.
- */
-static CharPtr GetFeatureTypeWord (
- Uint1 biomol,
- SeqFeatPtr sfp
-)
-{
- if (sfp == NULL) return NULL;
- if ( IsExon (sfp))
- {
- return StringSave ("exon");
- }
- else if(IsIntron (sfp))
- {
- return StringSave ("intron");
- }
- else if (IsEndogenousVirusSequence (sfp))
- {
- return StringSave ("endogenous virus");
- }
- else if (IsControlRegion (sfp))
- {
- return StringSave ("control region");
- }
- else if (IsEndogenousVirusSourceFeature (sfp))
- {
- return StringSave ("endogenous virus");
- }
- else if (IsDloop (sfp))
- {
- return StringSave ("D-loop");
- }
- else if (IsLTR (sfp))
- {
- return StringSave ("LTR");
- }
- else if (Is3UTR (sfp))
- {
- return StringSave ("3' UTR");
- }
- else if (Is5UTR (sfp))
- {
- return StringSave ("5' UTR");
- }
- else if (IsOperon (sfp))
- {
- return StringSave ("operon");
- }
- else if (biomol == MOLECULE_TYPE_GENOMIC || biomol == MOLECULE_TYPE_CRNA)
- {
- if (IsPseudo (sfp))
- {
- return StringSave ("pseudogene");
- }
- else
- {
- return StringSave ("gene");
- }
- }
- else if ( IsrRNA (sfp) || IssnoRNA (sfp) || IssnRNA (sfp) || IsscRNA (sfp))
- {
- return NULL;
- }
- else if (IsPrecursorRNA (sfp))
- {
- return StringSave ("precursor RNA");
- }
- else if (biomol == MOLECULE_TYPE_MRNA)
- {
- if (IsPseudo (sfp))
- {
- return StringSave ("pseudogene mRNA");
- }
- else
- {
- return StringSave ("mRNA");
- }
- }
- else if (biomol == MOLECULE_TYPE_PRE_MRNA)
- {
- if (IsPseudo (sfp))
- {
- return StringSave ("pseudogene precursor RNA");
- }
- else
- {
- return StringSave ("precursor RNA");
- }
- }
- else if (biomol == MOLECULE_TYPE_OTHER_GENETIC_MATERIAL)
- {
- return StringSave ("gene");
- }
- return StringSave ("");
-}
-
-/* Frequently the product associated with a feature is listed as part of the
- * description of the feature in the definition line. This function determines
- * the name of the product associated with this specific feature. Some
- * features will be listed with the product of a feature that is associated
- * with the feature being described - this function does not look at other
- * features to determine a product name.
- * If the feature is a misc_feat with particular keywords in the comment,
- * the product will be determined based on the contents of the comment.
- * If the feature is a CDS and is marked as pseudo, the product will be
- * determined based on the contents of the comment.
- * If the feature is a gene and has different strings in the description than
- * in the locus or locus tag, the description will be used as the product for
- * the gene.
- * If none of the above conditions apply, the sequence indexing context label
- * will be used to obtain the product name for the feature.
- */
-static CharPtr GetProductName
-( SeqFeatPtr cds,
- BioseqPtr bsp,
- Boolean suppress_locus_tag)
-{
- CharPtr protein_name;
- CharPtr semicolon;
- size_t len_to_copy;
- SeqMgrFeatContext context;
- GeneRefPtr grp;
- CharPtr gene_name;
-
- if (cds == NULL) return NULL;
- protein_name = NULL;
- if (IsNoncodingProductFeat (cds))
- {
- return GetNoncodingProductFeatProduct (cds);
- }
- else if (cds->data.choice == SEQFEAT_CDREGION && cds->pseudo)
- {
- if (cds->comment != NULL)
- {
- semicolon = StringChr (cds->comment, ';');
- if (semicolon != NULL)
- {
- len_to_copy = semicolon - cds->comment;
- }
- else
- {
- len_to_copy = StringLen (cds->comment);
- }
- protein_name = MemNew (len_to_copy + 1);
- if (protein_name == NULL) return NULL;
- StringNCpy (protein_name, cds->comment, len_to_copy);
- protein_name[len_to_copy] = 0;
- }
- return protein_name;
- }
- else if (cds->data.choice == SEQFEAT_GENE)
- {
- grp = (GeneRefPtr) cds->data.value.ptrvalue;
- if (grp == NULL) return NULL;
- gene_name = GetGeneName (grp, suppress_locus_tag);
- if (grp->desc != NULL
- && StringCmp (grp->desc, gene_name) != 0)
- {
- return StringSave (grp->desc);
- }
-#if 0
- /* removed by request from Linda Yankie */
- if (grp->locus_tag != NULL && ! suppress_locus_tag
- && StringCmp (grp->locus_tag, gene_name) != 0)
- {
- return StringSave (grp->locus_tag);
- }
-#endif
- }
- else
- {
- if (SeqMgrGetDesiredFeature (0, bsp, 0, 0, cds, &context) == cds
- && context.label != NULL)
- {
- if ( IstRNA (cds) )
- {
- if (StringCmp (context.label, "Xxx") == 0) {
- protein_name = StringSave ("tRNA-OTHER");
- } else {
- protein_name = MemNew ( StringLen (context.label) + 6);
- if ( protein_name == NULL) return NULL;
- sprintf (protein_name, "tRNA-%s", context.label);
- }
- return protein_name;
- }
- else if ((IsCDS(cds) && StringCmp (context.label, "CDS") != 0)
- || (IsmRNA(cds) && StringCmp (context.label, "mRNA") != 0)
- || (! IsCDS(cds) && ! IsmRNA(cds)))
- {
- protein_name = StringSave (context.label);
- return protein_name;
- }
- }
- }
- return NULL;
-}
-
-/* This function searches a list of features recursively for a
- * feature that satisfies the itemmatch condition and is associated with
- * the same gene as the fcp clause passed to the function.
- * This is used to obtain a product for a feature that may share a gene with
- * a product-producing feature but may not be contained in the interval of
- * the product-producing feature.
- */
-static FeatureClausePtr FindProductInFeatureList (
- FeatureClausePtr fcp,
- ValNodePtr clause_list,
- matchFunction itemmatch,
- Boolean suppress_locus_tag)
-{
- ValNodePtr vnp;
- FeatureClausePtr vnp_fcp;
-
- for (vnp = clause_list; vnp != NULL; vnp = vnp->next)
- {
- if (vnp->choice == DEFLINE_CLAUSEPLUS && vnp->data.ptrvalue != NULL)
- {
- vnp_fcp = vnp->data.ptrvalue;
- if (DoGenesMatch (vnp_fcp->grp, fcp->grp, suppress_locus_tag)
- && vnp_fcp->featlist != NULL
- && vnp_fcp->featlist->choice == DEFLINE_FEATLIST
- && itemmatch (vnp_fcp->featlist->data.ptrvalue))
- {
- return vnp_fcp;
- }
- else
- {
- vnp_fcp = FindProductInFeatureList (fcp, vnp_fcp->featlist,
- itemmatch, suppress_locus_tag);
- if (vnp_fcp != NULL) return vnp_fcp;
- }
- }
- }
- return NULL;
-}
-
-/* This function uses the available information in the clause to generate
- * a description from the name of the gene (if any) and the name of the
- * product for the feature (if any).
- * If there is only a gene, the description will be the name of the gene.
- * If there is only a product, the description will be the name of the product.
- * If there is a gene and a product, the description will be the name of
- * the product followed by the name of the gene in parentheses.
- */
-static CharPtr GetGeneProtDescription
-( FeatureClausePtr fcp,
- BioseqPtr bsp,
- Boolean suppress_locus_tag)
-{
- SeqFeatPtr sfp;
- CharPtr protein_name;
- CharPtr gene_name;
- size_t description_length;
- CharPtr description;
-
- if (fcp == NULL
- || fcp->featlist == NULL
- || fcp->featlist->data.ptrvalue == NULL)
- {
- return NULL;
- }
- sfp = fcp->featlist->data.ptrvalue;
-
- description_length = 0;
-
- if (fcp->feature_label_data.productname != NULL)
- {
- protein_name = StringSave (fcp->feature_label_data.productname);
- }
- else
- {
- protein_name = GetProductName (sfp, bsp, suppress_locus_tag);
- if (protein_name == NULL && IsGene (sfp))
- {
-
- }
- }
- if (protein_name != NULL)
- {
- description_length += StringLen (protein_name);
- }
-
- gene_name = GetGeneName (fcp->grp, suppress_locus_tag);
- if (gene_name != NULL)
- {
- description_length += StringLen (gene_name);
- if (protein_name != NULL)
- {
- description_length += 3;
- }
- }
- description = (CharPtr) MemNew (description_length + 1);
- if (description == NULL) return NULL;
- if (protein_name != NULL)
- {
- if (gene_name != NULL)
- {
- sprintf (description, "%s (%s)", protein_name, gene_name);
- }
- else
- {
- sprintf (description, "%s", protein_name);
- }
- }
- else
- {
- if (gene_name != NULL)
- sprintf (description, gene_name);
- }
- if (protein_name != NULL) MemFree (protein_name);
- return description;
-}
-
-/* This array of match functions is used to identify, in order of preference,
- * the features that might be used to generate a product for a gene-protein
- * description if the feature has not already been grouped with a product
- * feature.
- */
-static matchFunction productfeatures[] = {
- IsCDS, IsmRNA, IstRNA
-};
-
-/* This function finds gene features without products and looks for
- * features that might provide products for them.
- */
-static void FindGeneProducts
-( ValNodePtr clause_list,
- BioseqPtr bsp,
- Boolean suppress_locus_tag)
-{
- ValNodePtr vnp;
- FeatureClausePtr fcp, productfcp;
- Int4 i, NumProductFeatureTypes;
-
- NumProductFeatureTypes = sizeof (productfeatures) / sizeof (matchFunction);
-
- for (vnp = clause_list; vnp != NULL; vnp = vnp->next)
- {
- if (vnp->choice == DEFLINE_CLAUSEPLUS
- && (fcp = vnp->data.ptrvalue) != NULL
- && fcp->featlist != NULL)
- {
- if (fcp->featlist->choice == DEFLINE_FEATLIST
- && IsGene (fcp->featlist->data.ptrvalue)
- && fcp->feature_label_data.productname == NULL)
- {
- productfcp = NULL;
- for (i=0; i < NumProductFeatureTypes && productfcp == NULL; i++)
- {
- productfcp = FindProductInFeatureList (fcp, clause_list,
- productfeatures[i],
- suppress_locus_tag);
- }
- if (productfcp != NULL)
- {
- fcp->is_alt_spliced = productfcp->is_alt_spliced;
- if (productfcp->feature_label_data.productname != NULL)
- {
- fcp->feature_label_data.productname =
- StringSave (productfcp->feature_label_data.productname);
- }
- else
- {
- fcp->feature_label_data.productname
- = GetProductName (productfcp->featlist->data.ptrvalue,
- bsp, suppress_locus_tag);
- }
- if (fcp->feature_label_data.description != NULL)
- {
- MemFree (fcp->feature_label_data.description);
- fcp->feature_label_data.description = NULL;
- }
- fcp->feature_label_data.description =
- GetGeneProtDescription (fcp, bsp, suppress_locus_tag);
- }
- }
- else
- {
- FindGeneProducts (fcp->featlist, bsp, suppress_locus_tag);
- }
- }
- }
-}
-
-static Boolean ShowInterval (
- SeqFeatPtr sfp
-)
-{
- if (IsSatelliteSequence (sfp) || IsExon (sfp) || IsIntron (sfp)
- || IsPromoter (sfp) || Is3UTR (sfp) || Is5UTR (sfp))
- return FALSE;
- return TRUE;
-}
-
-static CharPtr GetExonDescription (
- BioseqPtr bsp,
- SeqFeatPtr sfp
-)
-{
- SeqMgrFeatContext context;
- SeqFeatPtr new_sfp;
- CharPtr label;
-
- if ((new_sfp = SeqMgrGetDesiredFeature (sfp->idx.entityID, bsp, 0, 0, sfp, &context)) != sfp
- || context.label == NULL)
- {
- if ((new_sfp = SeqMgrGetDesiredFeature (0, bsp, 0, 0, sfp, &context)) != sfp
- || context.label == NULL)
- {
- return NULL;
- }
- }
- if ((IsExon (sfp) && StringCmp (context.label, "exon") == 0)
- || (IsIntron (sfp) && StringCmp (context.label, "intron") == 0))
- {
- return NULL;
- }
-
- label = StringSave (context.label);
- return label;
-}
-
-static CharPtr GetFeatureDescription
-( FeatureClausePtr fcp,
- BioseqPtr bsp,
- Boolean suppress_locus_tag)
-{
- SeqFeatPtr sfp;
-
- if ( fcp == NULL
- || fcp->featlist == NULL
- || fcp->featlist->data.ptrvalue == NULL)
- {
- return NULL;
- }
- sfp = fcp->featlist->data.ptrvalue;
- if (sfp == NULL) return NULL;
-
- if (IsExon (sfp) || IsIntron (sfp))
- {
- return GetExonDescription (bsp, sfp);
- }
- else if (IsEndogenousVirusSequence (sfp))
- {
- return GetEndogenousVirusSequenceDescription (sfp);
- }
- else if (IsEndogenousVirusSourceFeature (sfp))
- {
- return GetEndogenousVirusSourceFeatureDescription (sfp);
- }
- else if (IsControlRegion (sfp))
- {
- return NULL;
- }
- else if (IsDloop (sfp))
- {
- return NULL;
- }
- else if (Is3UTR (sfp))
- {
- return NULL;
- }
- else if (Is5UTR (sfp))
- {
- return NULL;
- }
- else if (IsLTR (sfp))
- {
- return GetLTRDescription (sfp);
- }
- else
- {
- return GetGeneProtDescription (fcp, bsp, suppress_locus_tag);
- }
-}
-
-static void LIBCALLBACK GetSatelliteFeatureLabel (
- ValNodePtr featlist,
- BioseqPtr bsp,
- Uint1 biomol,
- FeatureLabelPtr flp
-)
-{
- SeqFeatPtr main_feat;
- CharPtr semicolon;
-
- flp->description = NULL;
- flp->typeword = StringSave ("sequence");
- flp->pluralizable = FALSE;
- flp->is_typeword_first = FALSE;
-
- if (featlist == NULL) return;
- main_feat = featlist->data.ptrvalue;
- if (main_feat == NULL) return;
- if (StringHasNoText (main_feat->comment)) return;
-
- flp->description = StringSave (main_feat->comment);
- if ((semicolon = StringStr (flp->description, ";")) != NULL)
- {
- *semicolon = 0;
- }
-}
-
-static void LIBCALLBACK GetPromoterFeatureLabel (
- ValNodePtr featlist,
- BioseqPtr bsp,
- Uint1 biomol,
- FeatureLabelPtr flp
-)
-{
- SeqFeatPtr main_feat;
-
- flp->description = NULL;
- flp->typeword = StringSave ("promoter region");
-
- if (featlist == NULL) return;
- main_feat = featlist->data.ptrvalue;
- if (main_feat == NULL) return;
-
- flp->description = NULL;
- flp->pluralizable = FALSE;
- flp->is_typeword_first = FALSE;
-
-}
-
-/* This function temporarily removes a 3' UTR clause from the end of
- * a clause list so that it will not be included in the list of subfeatures
- * before a CDS in the definition line.
- * The 3' UTR clause should be put back if it was not the only clause in the
- * list.
- */
-static ValNodePtr Remove3UTRFromEndOfFeatList (ValNodePtr PNTR featlist)
-{
- ValNodePtr vnp, prev = NULL;
-
- if (featlist == NULL || *featlist == NULL) return NULL;
-
- for (vnp = *featlist; vnp != NULL && vnp->next != NULL; vnp = vnp->next)
- {
- prev = vnp;
- }
- if (vnp->choice == DEFLINE_CLAUSEPLUS && Is3UTRClause (vnp->data.ptrvalue))
- {
- if (prev == NULL)
- {
- *featlist = NULL;
- }
- else
- {
- prev->next = NULL;
- }
- }
- else
- {
- vnp = NULL;
- }
- return vnp;
-}
-
-static Uint1 GetMoleculeType (BioseqPtr bsp, Uint2 entityID);
-static void ConsolidateClauses (
- ValNodePtr PNTR list,
- BioseqPtr bsp,
- Uint1 biomol,
- Boolean delete_now,
- Boolean suppress_locus_tag);
-
-
-/* This function calculates the "interval" for a clause in the definition
- * line. The interval could be an empty string, it could indicate whether
- * the location of the feature is partial or complete and whether or not
- * the feature is a CDS, the interval could be a description of the
- * subfeatures of the clause, or the interval could be a combination of the
- * last two items if the feature is a CDS.
- */
-static CharPtr GetGenericInterval
-( FeatureClausePtr fcp,
- Uint1 biomol,
- BioseqPtr bsp,
- Boolean suppress_locus_tag)
-{
- CharPtr interval;
- Boolean partial5, partial3;
- SeqFeatPtr sfp;
- ValNodePtr featlist, strings, prev_feat;
- CharPtr subfeatlist;
- Int4 len;
- Boolean suppress_final_and;
- ValNodePtr utr3vnp = NULL;
- ValNodePtr last_feat;
- Uint1 molecule_type;
-
- if ( fcp == NULL || fcp->featlist == NULL) return NULL;
- if (fcp->is_unknown) return NULL;
- featlist = fcp->featlist;
- sfp = featlist->data.ptrvalue;
- if (sfp == NULL) return NULL;
- if ( IsExon (sfp) && fcp->is_alt_spliced)
- {
- return StringSave ("alternatively spliced");
- }
- if ( ! ShowInterval (sfp)) return NULL;
-
- subfeatlist = NULL;
- len = 50;
- CheckSeqLocForPartial (sfp->location, &partial5, &partial3);
-
- strings = NULL;
- prev_feat = NULL;
- while (featlist != NULL && featlist->choice != DEFLINE_CLAUSEPLUS)
- {
- prev_feat = featlist;
- featlist = featlist->next;
- }
- if (IsCDS (sfp))
- {
- utr3vnp = Remove3UTRFromEndOfFeatList (&featlist);
- }
- if (featlist != NULL)
- {
- suppress_final_and = FALSE;
- if (( IsCDS (sfp) && ! fcp->clause_info_only)
- || utr3vnp != NULL)
- {
- suppress_final_and = TRUE;
- }
- LabelClauses (featlist, biomol, bsp, suppress_locus_tag);
-
- molecule_type = GetMoleculeType (bsp, bsp->idx.entityID);
- /* consolidate genes/proteins with the same names (usually hypothetical proteins) */
- ConsolidateClauses (&featlist, bsp, molecule_type, TRUE,
- suppress_locus_tag);
-
- /* make sure featlist is still intact - may have consolidated it */
- if (prev_feat == NULL)
- {
- fcp->featlist = featlist;
- }
- else
- {
- prev_feat->next = featlist;
- }
-
- ListClauses (featlist, &strings, FALSE, suppress_final_and);
- subfeatlist = MergeValNodeStrings (strings, FALSE);
- ValNodeFreeData (strings);
- len += StringLen (subfeatlist) + 7;
-
- if (utr3vnp != NULL)
- {
- len += 14;
- }
- }
-
- interval = (CharPtr) MemNew (len * sizeof (Char));
- if (interval == NULL) return NULL;
- interval[0] = 0;
-
- if (StringDoesHaveText (subfeatlist))
- {
- StringCat (interval, subfeatlist);
- if ( ! IsCDS (sfp) || fcp->clause_info_only)
- {
- if (utr3vnp != NULL)
- {
- if (featlist->next != NULL)
- {
- StringCat (interval, ",");
- }
- StringCat (interval, " and 3' UTR");
- /* put 3' UTR back at end of featlist */
- if (featlist != NULL)
- {
- last_feat = featlist;
- while (last_feat != NULL && last_feat->next != NULL)
- {
- last_feat = last_feat->next;
- }
- last_feat->next = utr3vnp;
- }
- }
- if (subfeatlist != NULL) MemFree (subfeatlist);
- return interval;
- }
- if (utr3vnp == NULL)
- {
- StringCat (interval, " and ");
- }
- else
- {
- StringCat (interval, ", ");
- }
- }
-
- if (FeatureDoesNotGetPartialComplete (sfp))
- {
- /* don't add partial or complete */
- }
- else if (partial5 || partial3)
- {
- StringCat (interval, "partial ");
- }
- else
- {
- StringCat (interval, "complete ");
- }
- if (IsCDS (sfp) && ! IsPseudo (sfp))
- {
- StringCat (interval, "cds");
- if (fcp->is_alt_spliced)
- StringCat (interval, ", alternatively spliced");
- }
- else
- {
- StringCat (interval, "sequence");
- if (IsNoncodingProductFeat (sfp) && fcp->is_alt_spliced)
- {
- StringCat (interval, ", alternatively spliced");
- }
- }
-
- if (utr3vnp != NULL)
- {
- /* tack UTR3 on at end of clause */
- if (StringDoesHaveText (subfeatlist))
- {
- StringCat (interval, ",");
- }
- StringCat (interval, " and 3' UTR");
-
- /* put 3' UTR back at end of featlist */
- if (featlist != NULL)
- {
- last_feat = featlist;
- while (last_feat != NULL && last_feat->next != NULL)
- {
- last_feat = last_feat->next;
- }
- last_feat->next = utr3vnp;
- }
- }
-
- if (subfeatlist != NULL) MemFree (subfeatlist);
-
- return interval;
-}
-
-/* This function is used to generate feature label information for
- * a feature clause. It is called by the LabelFeature function if
- * a "GetFeatureLabel" function is not found for the specific feature
- * type.
- * In the future it may be advisable to create "GetFeatureLabel" functions
- * for more of the specific feature types, to reduce the number of times
- * that the feature must be identified as being a certain type.
- */
-static void LIBCALLBACK GetGenericFeatureLabel
-( FeatureClausePtr fcp,
- BioseqPtr bsp,
- Uint1 biomol,
- FeatureLabelPtr flp,
- Boolean suppress_locus_tag)
-{
- SeqFeatPtr main_feat;
-
- if (fcp == NULL
- || fcp->featlist == NULL
- || fcp->featlist->data.ptrvalue == NULL)
- {
- return;
- }
- main_feat = fcp->featlist->data.ptrvalue;
- if (main_feat == NULL) return;
-
- if (flp->typeword == NULL)
- {
- flp->typeword = GetFeatureTypeWord (biomol, main_feat);
- flp->is_typeword_first = IsTypeWordFirst (flp->typeword);
- flp->pluralizable = TRUE;
- }
- if (flp->productname == NULL)
- {
- flp->productname = GetProductName (main_feat, bsp, suppress_locus_tag);
- }
- if (flp->description == NULL
- && (! IsMiscRNA (main_feat)
- || StringStr (flp->productname, "spacer") == NULL ))
- {
- flp->description = GetFeatureDescription (fcp, bsp, suppress_locus_tag);
- }
-
-}
-
-typedef void (LIBCALLBACK *GetFeatureLabelFunction) (
- ValNodePtr featlist,
- BioseqPtr bsp,
- Uint1 biomol,
- FeatureLabelPtr flp
-);
-
-typedef struct matchlabelfunction {
- matchFunction itemmatch;
- GetFeatureLabelFunction labelfunction;
-} MatchLabelFunctionData, PNTR MatchLabelFunctionPtr;
-
-static MatchLabelFunctionData label_functions[] = {
- { IsSatelliteSequence, GetSatelliteFeatureLabel },
- { IsMobileElement, GetMobileElementFeatureLabel },
- { IsPromoter, GetPromoterFeatureLabel },
- { IsIntergenicSpacer, GetIntergenicSpacerFeatureLabel },
- { IsGeneCluster, GetGeneClusterFeatureLabel }
-};
-
-typedef enum {
- DEFLINE_FEATLABEL_Satellite = 0,
- DEFLINE_FEATLABEL_Transposon,
- DEFLINE_FEATLABEL_Promoter,
- DEFLINE_FEATLABEL_IntergenicSpacer,
- DEFLINE_FEATLABEL_GeneCluster,
- NumDefLineFeatLabels
-} DefLineFeatLabel;
-
-static void LabelFeature
-( BioseqPtr bsp,
- Uint1 biomol,
- FeatureClausePtr new_clauseplus,
- Boolean suppress_locus_tag)
-{
- Int4 i;
- SeqFeatPtr main_feat;
-
- if (new_clauseplus == NULL || new_clauseplus->featlist == NULL) return;
-
- if (new_clauseplus->featlist->choice == DEFLINE_FEATLIST)
- {
- main_feat = (SeqFeatPtr) new_clauseplus->featlist->data.ptrvalue;
-
- new_clauseplus->allelename = GetAlleleName (new_clauseplus->grp,
- suppress_locus_tag);
- if (new_clauseplus->interval == NULL)
- {
- new_clauseplus->interval =
- GetGenericInterval (new_clauseplus, biomol, bsp, suppress_locus_tag);
- }
-
- for (i=0; i < NumDefLineFeatLabels; i++)
- {
- if (label_functions [i].itemmatch (main_feat))
- {
- label_functions [i].labelfunction ( new_clauseplus->featlist,
- bsp, biomol,
- &new_clauseplus->feature_label_data);
- return;
- }
- }
-
- GetGenericFeatureLabel ( new_clauseplus, bsp, biomol,
- &new_clauseplus->feature_label_data, suppress_locus_tag);
- return;
- }
-}
-
-/* This function is used to calculate the parts of a product name that
- * are "the same" for use as the name of an alternatively spliced product.
- * The common portion of the string must end at a recognized separator,
- * such as a space, comma, or dash instead of in the middle of a word.
- * The matching portions of the string could occur at the beginning or end
- * of the string, or even occasionally at the beginning and end of a
- * string, but not as the center of the string with a different beginning
- * and ending.
- */
-static CharPtr FindStringIntersection (
- CharPtr str1,
- CharPtr str2,
- Boolean str1_previously_stripped
-)
-{
- Int4 matchleftlen = 0;
- Int4 matchlefttoken = 0;
- Int4 matchrightidx1 = 0;
- Int4 matchrightidx2 = 0;
- Int4 matchrighttoken = 0;
- CharPtr match_string;
- Int4 len1;
- Int4 len2;
- Int4 match_len;
-
- if (str1 == NULL || str2 == NULL) return NULL;
- if (StringCmp (str1, str2) == 0) return StringSave (str1);
- len1 = StringLen (str1);
- len2 = StringLen (str2);
-
- while (str1[matchleftlen] != 0 && str2[matchleftlen] != 0
- && str1[matchleftlen] == str2[matchleftlen])
- {
- if (str1 [matchleftlen] == ','
- || str1 [matchleftlen] == '-')
- {
- matchlefttoken = matchleftlen;
- }
- else if (str1 [matchleftlen] == ' '
- && matchlefttoken != matchleftlen - 1)
- {
- matchlefttoken = matchleftlen;
- }
- matchleftlen++;
- }
- if (matchleftlen == len1 && str1_previously_stripped)
- {
- matchlefttoken = matchleftlen;
- }
- else
- {
- matchleftlen = matchlefttoken;
- }
-
- matchrightidx1 = len1;
- matchrightidx2 = len2;
-
- while (matchrightidx1 > -1 && matchrightidx2 > -1
- && str1[matchrightidx1] == str2[matchrightidx2])
- {
- if (str1 [matchrightidx1] == ' '
- || str1[matchrightidx1] == ','
- || str1[matchrightidx1] == '-')
- {
- matchrighttoken = matchrightidx1;
- }
- matchrightidx1--;
- matchrightidx2--;
- }
- if (matchrightidx1 == -1)
- {
- matchrighttoken = matchrightidx1;
- }
- else if (matchrighttoken > 0)
- {
- matchrightidx1 = matchrighttoken;
- }
- else if (str1_previously_stripped && matchrightidx1 < len1 - 1)
- {
- /* matchrightidx1 = matchrighttoken; */
- /* do nothing, leave right index where it is */
- }
- else
- {
- matchrightidx1 = len1;
- }
-
- match_len = matchleftlen;
- if (matchrightidx1 < len1 - 1)
- {
- match_len += len1 - matchrightidx1 - 1;
- }
-
- if (match_len <= 0) return NULL;
-
- match_string = MemNew (match_len + 2);
- if (match_string == NULL) return NULL;
- if (matchleftlen != 0)
- {
- StringNCpy (match_string, str1, matchleftlen);
- match_string[matchleftlen] = 0;
- }
- else
- {
- match_string[0] = 0;
- }
- if (matchrightidx1 < len1)
- {
- if (match_string[0] != 0) StringCat (match_string, " ");
- StringCat (match_string, str1 + matchrightidx1 + 1);
- }
- return match_string;
-}
-
-/* These are the words that are used to introduced the part of the protein
- * name that differs in alt-spliced products - they should not be part of
- * the alt-spliced product name.
- * Note that splice variant is listed before "variant" so that it will be
- * found first and "variant" will not be removed from "splice variant", leaving
- * splice as an orphan.
- */
-
-static CharPtr UnwantedWords [] = {
- "splice variant",
- "splice product",
- "variant",
- "isoform"
-};
-
-static void TrimUnwantedWordsFromAltSpliceProductName (
- CharPtr productname
-)
-{
- Int4 num_unwanted_words, i;
- size_t unwanted_word_len;
- CharPtr cp, tmp;
-
- num_unwanted_words = sizeof (UnwantedWords) / sizeof (CharPtr);
- for (i = 0; i < num_unwanted_words; i++)
- {
- unwanted_word_len = StringLen (UnwantedWords [i]);
- cp = StringStr (productname, UnwantedWords [i]);
- if (cp != NULL)
- {
- if (cp == productname)
- {
- /* word occurs in beginning of phrase */
- tmp = StringSave (productname + unwanted_word_len);
- StringCpy (productname, tmp);
- MemFree (tmp);
- }
- else if (cp - productname < StringLen (productname) - unwanted_word_len)
- {
- /* word occurs in middle of phrase */
- tmp = StringSave (cp + unwanted_word_len);
- StringCpy (cp - 1, tmp);
- MemFree (tmp);
- }
- else
- {
- /* word occurs at end of phrase */
- *cp = 0;
- }
- }
- }
-}
-
-
-static Boolean PreviouslyStripped (SeqFeatPtr cds, BioseqPtr bsp, CharPtr productname)
-{
- CharPtr expected_product_name;
- Boolean rval = FALSE;
-
- if (cds == NULL || StringHasNoText (productname)) return FALSE;
- expected_product_name = GetProductName (cds, bsp, FALSE);
- if (StringCmp (productname, expected_product_name) != 0) {
- rval = TRUE;
- }
- expected_product_name = MemFree (expected_product_name);
- return rval;
-}
-
-/* This function determines whether two CDSs meet the conditions for
- * alternative splicing, and if so, it returns the name of the alternatively
- * spliced product. In order to be alternatively spliced, the two CDSs
- * must have the same gene, must share a complete interval, and must have
- * similarly named products.
- */
-static CharPtr MeetAltSpliceRules
-( FeatureClausePtr cdsfcp1,
- FeatureClausePtr cdsfcp2,
- BioseqPtr bsp,
- Boolean suppress_locus_tag)
-{
- SeqFeatPtr cds1, cds2;
- CharPtr match_string;
- Int4 res;
-
- if (cdsfcp1 == NULL || cdsfcp2 == NULL
- || cdsfcp1->featlist == NULL || cdsfcp2->featlist == NULL)
- {
- return NULL;
- }
-
- cds1 = cdsfcp1->featlist->data.ptrvalue;
- cds2 = cdsfcp2->featlist->data.ptrvalue;
- if (! DoGenesMatch (cdsfcp1->grp, cdsfcp2->grp, suppress_locus_tag))
- return NULL;
-
- if ( (res = TestFeatOverlap (cds1, cds2, COMMON_INTERVAL)) != -1)
- {
- match_string = FindStringIntersection (
- cdsfcp1->feature_label_data.productname,
- cdsfcp2->feature_label_data.productname,
- PreviouslyStripped(cds1, bsp, cdsfcp1->feature_label_data.productname));
- return match_string;
- }
- return NULL;
-}
-
-/* This function is used by the FindAltSplices function to locate the
- * next CDS in a list of feature clauses.
- */
-static ValNodePtr FindNextCDSClause (ValNodePtr vnp)
-{
- FeatureClausePtr fcp;
-
- while (vnp != NULL)
- {
- if (vnp->choice == DEFLINE_CLAUSEPLUS)
- {
- fcp = vnp->data.ptrvalue;
- if (fcp != NULL && !fcp->delete_me && fcp->featlist != NULL
- && IsCDS (fcp->featlist->data.ptrvalue))
- {
- return vnp;
- }
- }
- vnp = vnp->next;
- }
- return NULL;
-}
-
-/* This function is used by the FindAltSplices function to move the features
- * and subclauses from the second CDS in an alternatively spliced pair of
- * CDSs to the feature clause for the first CDS, so that the subfeatures
- * can be properly listed.
- */
-static void MoveSubclauses (
- FeatureClausePtr dstfcp,
- FeatureClausePtr srcfcp
-)
-{
- ValNodePtr dst_last_feat, dst_first_clause, dst_last_clause;
- ValNodePtr src_last_feat, src_first_clause;
-
- if (dstfcp == NULL || srcfcp == NULL || srcfcp->featlist == NULL) return;
-
- dst_first_clause = NULL;
- dst_last_clause = NULL;
- src_first_clause = NULL;
-
- dst_last_feat = dstfcp->featlist;
- while (dst_last_feat != NULL
- && dst_last_feat->next != NULL
- && dst_last_feat->next->choice == DEFLINE_FEATLIST)
- {
- dst_last_feat = dst_last_feat->next;
- }
- if (dst_last_feat != NULL)
- {
- dst_first_clause = dst_last_feat->next;
- }
- dst_last_clause = dst_first_clause;
- while (dst_last_clause != NULL && dst_last_clause->next != NULL)
- {
- dst_last_clause = dst_last_clause->next;
- }
-
- src_last_feat = srcfcp->featlist;
- while (src_last_feat != NULL
- && src_last_feat->next != NULL
- && src_last_feat->next->choice == DEFLINE_FEATLIST)
- {
- src_last_feat = src_last_feat->next;
- }
- if (src_last_feat != NULL)
- {
- src_first_clause = src_last_feat->next;
- }
-
- /* insert features before clauses */
- if (dst_last_feat == NULL)
- {
- dstfcp->featlist = srcfcp->featlist;
- dst_last_feat = src_last_feat;
- }
- else
- {
- dst_last_feat->next = srcfcp->featlist;
- }
- /* insert clauses after feats */
- if (dst_first_clause != NULL)
- {
- src_last_feat->next = dst_first_clause;
- dst_last_clause->next = src_first_clause;
- }
- srcfcp->featlist = NULL;
-}
-
-/* we want to look through the list for CDS features */
-/* if we find two CDSs that are alternatively spliced, */
-/* we replace the first alternatively spliced CDS feature */
-/* with a new CDS feature that has the new protein name as */
-/* a comment and a data.choice value that indicates alt splicing */
-/* we remove the second alternatively spliced CDS feature from the list */
-
-static void FindAltSplices
-( ValNodePtr clause_list,
- BioseqPtr bsp,
- Boolean suppress_locus_tag)
-{
- FeatureClausePtr fcp1, fcp2;
- ValNodePtr cdsclause1, cdsclause2;
- ValNodePtr searchclause;
- CharPtr combined_protein_name;
- Boolean partial3_1, partial5_1, partial3_2, partial5_2;
- Int4 left1, left2, right1, right2;
-
- if (clause_list == NULL) return;
-
- cdsclause1 = FindNextCDSClause (clause_list);
- while (cdsclause1 != NULL)
- {
- fcp1 = (FeatureClausePtr) cdsclause1->data.ptrvalue;
- if (fcp1->feature_label_data.productname == NULL)
- {
- fcp1->feature_label_data.productname =
- GetProductName (fcp1->featlist->data.ptrvalue, bsp, suppress_locus_tag);
- }
- searchclause = cdsclause1->next;
- cdsclause2 = FindNextCDSClause (searchclause);
- while (cdsclause2 != NULL)
- {
- fcp2 = (FeatureClausePtr) cdsclause2->data.ptrvalue;
- if (fcp2->feature_label_data.productname == NULL)
- {
- fcp2->feature_label_data.productname =
- GetProductName (fcp2->featlist->data.ptrvalue, bsp, suppress_locus_tag);
- }
- combined_protein_name = MeetAltSpliceRules (fcp1, fcp2, bsp, suppress_locus_tag);
- if (combined_protein_name != NULL)
- {
- /* get rid of variant, splice variant, splice product, isoform, etc.*/
- TrimUnwantedWordsFromAltSpliceProductName (combined_protein_name);
-
- /* get rid of trailing spaces in protein name */
- TrimSpacesAroundString (combined_protein_name);
-
- /* copy new protein name into first clause */
- MemFree (fcp1->feature_label_data.productname);
- fcp1->feature_label_data.productname = combined_protein_name;
- CheckSeqLocForPartial (fcp1->slp, &partial5_1, &partial3_1);
- left1 = GetOffsetInBioseq (fcp1->slp, bsp, SEQLOC_LEFT_END);
- right1 = GetOffsetInBioseq (fcp1->slp, bsp, SEQLOC_RIGHT_END);
- CheckSeqLocForPartial (fcp2->slp, &partial5_2, &partial3_2);
- left2 = GetOffsetInBioseq (fcp2->slp, bsp, SEQLOC_LEFT_END);
- right2 = GetOffsetInBioseq (fcp2->slp, bsp, SEQLOC_RIGHT_END);
- fcp1->slp = SeqLocMerge (bsp, fcp1->slp, fcp2->slp,
- FALSE, TRUE, FALSE);
- if (left1 == left2)
- {
- partial5_1 |= partial5_2;
- }
- else
- {
- partial5_1 = left1 < left2 ? partial5_1 : partial5_2;
- }
- if (right1 == right2)
- {
- partial3_1 |= partial3_2;
- }
- else
- {
- partial3_1 = right1 > right2 ? partial3_1 : partial3_2;
- }
- SetSeqLocPartial (fcp1->slp, partial5_1, partial3_1);
- fcp1->is_alt_spliced = TRUE;
-
- /* copy over fcp2 subclauses */
- MoveSubclauses (fcp1, fcp2);
-
- /* remove second clause */
- fcp2->delete_me = TRUE;
- }
- searchclause = cdsclause2->next;
- cdsclause2 = FindNextCDSClause (searchclause);
- }
- cdsclause1 = FindNextCDSClause (cdsclause1->next);
- }
- DeleteFeatureClauses (&clause_list);
-}
-
-static void LabelClauses
-( ValNodePtr clause_list,
- Uint1 biomol,
- BioseqPtr bsp,
- Boolean suppress_locus_tag)
-{
- ValNodePtr clause;
-
- clause = clause_list;
- while (clause != NULL)
- {
- LabelFeature ( bsp, biomol, clause->data.ptrvalue, suppress_locus_tag);
- clause = clause->next;
- }
-}
-
-static CharPtr misc_words [] = {
- "internal transcribed spacer",
- "external transcribed spacer",
- "ribosomal RNA intergenic spacer",
- "ribosomal RNA",
- "intergenic spacer"
-};
-
-typedef enum {
- MISC_RNA_WORD_INTERNAL_SPACER = 0,
- MISC_RNA_WORD_EXTERNAL_SPACER,
- MISC_RNA_WORD_RNA_INTERGENIC_SPACER,
- MISC_RNA_WORD_RNA,
- MISC_RNA_WORD_INTERGENIC_SPACER,
- NUM_MISC_RNA_WORDS
-} MiscWord;
-
-static CharPtr separators [] = {
- ", and ",
- " and ",
- ", ",
- "; "
-};
-
-#define num_separators 3
-
-static ValNodePtr GetMiscRNAelements
-( SeqFeatPtr misc_rna,
- BioseqPtr bsp,
- Boolean suppress_locus_tag)
-{
- CharPtr buffer;
- Int4 i, best_i;
- CharPtr cansep [num_separators];
- CharPtr dataval;
- Int4 datalen;
- FeatureClausePtr fcp;
- FeatureClausePtr lastfcp;
- Int4 num_clauses;
- ValNodePtr head, vnp;
- Boolean partial5, partial3;
- Int4 word_i;
- CharPtr to_free;
- CharPtr word_loc;
-
- to_free = NULL;
-
- if (misc_rna == NULL) return NULL;
- buffer = GetProductName (misc_rna, bsp, suppress_locus_tag);
- to_free = buffer;
- if (buffer == NULL)
- {
- buffer = misc_rna->comment;
- }
- else if (StringNCmp (buffer, misc_rna->comment, StringLen (buffer) -1) == 0
- && buffer [ StringLen (buffer) - 1] == '>')
- {
- MemFree (buffer);
- to_free = NULL;
- buffer = misc_rna->comment;
- }
-
- if ( StringStr (buffer, "spacer") == NULL)
- {
- if (to_free != NULL)
- {
- MemFree (to_free);
- }
- return NULL;
- }
-
- if (StringNCmp (buffer, "contains ", 9) == 0)
- {
- buffer = buffer + 9;
- }
-
- head = NULL;
- CheckSeqLocForPartial (misc_rna->location, &partial5, &partial3);
- num_clauses = 0;
-
- while (buffer != NULL
- && buffer[0] != 0)
- {
- best_i = -1;
- for (i=0; i < num_separators; i++)
- {
- cansep [i] = StringStr (buffer, separators [i]);
- if (cansep [i] != NULL
- && (best_i == -1
- || cansep [i] < cansep [best_i]))
- {
- best_i = i;
- }
- }
-
- if (best_i == -1)
- {
- datalen = StringLen (buffer);
- }
- else
- {
- datalen = cansep [best_i] - buffer;
- }
-
- dataval = MemNew (datalen + 1);
- if (dataval == NULL) return NULL;
- StringNCpy (dataval, buffer, datalen);
- dataval [datalen] = 0;
-
- for (word_i=0;
- word_i < NUM_MISC_RNA_WORDS
- && (word_loc = StringStr (dataval, misc_words [word_i])) == NULL;
- word_i++) {}
- if (word_i < NUM_MISC_RNA_WORDS)
- {
- fcp = NewFeatureClause ( misc_rna, bsp, suppress_locus_tag);
- if (fcp == NULL) return NULL;
- if (word_i == MISC_RNA_WORD_INTERNAL_SPACER
- || word_i == MISC_RNA_WORD_EXTERNAL_SPACER
- || word_i == MISC_RNA_WORD_RNA_INTERGENIC_SPACER
- || word_i == MISC_RNA_WORD_INTERGENIC_SPACER)
- {
- if (word_loc == dataval)
- {
- fcp->feature_label_data.is_typeword_first = TRUE;
- fcp->feature_label_data.typeword = StringSave (misc_words [word_i]);
- if (StringLen (misc_words [word_i]) + 1 < StringLen (dataval))
- {
- fcp->feature_label_data.description =
- StringSave ( dataval + StringLen (misc_words [word_i]) + 1);
- }
- }
- else
- {
- fcp->feature_label_data.is_typeword_first = FALSE;
- fcp->feature_label_data.typeword = StringSave (misc_words [word_i]);
- if (StringLen (misc_words [word_i]) + 1 < StringLen (dataval))
- {
- fcp->feature_label_data.description =
- StringSave ( dataval);
- fcp->feature_label_data.description [word_loc - dataval - 1] = 0;
- }
- }
- MemFree (dataval);
- }
- else if (word_i == MISC_RNA_WORD_RNA)
- {
- fcp->feature_label_data.description = dataval;
- }
- if (num_clauses == 0 && partial5)
- {
- fcp->interval = StringSave ("partial sequence");
- }
- else
- {
- fcp->interval = StringSave ("complete sequence");
- }
-
- num_clauses ++;
- lastfcp = fcp;
-
- vnp = ValNodeNew (head);
- if (head == NULL) head = vnp;
- if (vnp == NULL) return NULL;
- vnp->data.ptrvalue = fcp;
- vnp->choice = DEFLINE_CLAUSEPLUS;
- }
- else
- {
- MemFree (dataval);
- }
- buffer += datalen;
- if (best_i != -1)
- {
- buffer += StringLen ( separators [best_i]);
- }
- }
-
- if ((num_clauses == 1 && partial3 && ! partial5)
- || (num_clauses > 1 && partial3))
- {
- MemFree (lastfcp->interval);
- lastfcp->interval = StringSave ("partial sequence");
- }
- if (to_free != NULL) MemFree (to_free);
- return head;
-}
-
-/* Some misc_RNA clauses have a comment that actually lists multiple
- * features. This function creates a clause for each element in the
- * comment and inserts the list of new clauses into the feature list
- * at the point where the single previous clause was.
- */
-static void ReplaceRNAClauses (
- ValNodePtr PNTR clause_list,
- BioseqPtr bsp,
- Boolean suppress_locus_tag)
-{
- FeatureClausePtr fcp;
- SeqFeatPtr main_feat;
- ValNodePtr clause, replacement_clauses, nextclause, vnp;
-
- if (clause_list == NULL || *clause_list == NULL) return;
- clause = *clause_list;
- while (clause != NULL)
- {
- nextclause = clause->next;
- fcp = (clause->data.ptrvalue);
- if (fcp == NULL
- || fcp->featlist == NULL
- || fcp->featlist->choice != DEFLINE_FEATLIST)
- {
- return;
- }
- main_feat = (SeqFeatPtr) fcp->featlist->data.ptrvalue;
-
- if (IsrRNA (main_feat) || IsMiscRNA (main_feat))
- {
- replacement_clauses = GetMiscRNAelements ( main_feat, bsp, suppress_locus_tag );
- if (replacement_clauses != NULL)
- {
- for (vnp = replacement_clauses; vnp->next != NULL; vnp = vnp->next) {}
- vnp->next = clause->next;
- clause->next = replacement_clauses;
- fcp->delete_me = TRUE;
- }
- }
- clause = nextclause;
- }
- DeleteFeatureClauses (clause_list);
-}
-
-/* Some misc_feat clauses have a comment that lists one or more tRNAs and
- * an intergenic spacer. This function creates a clause for each element
- * in the comment and inserts the list of new clauses into the feature list
- * at the point where the single previous clause was.
- */
-static void ReplaceIntergenicSpacerClauses (
- ValNodePtr PNTR clause_list,
- BioseqPtr bsp,
- Boolean suppress_locus_tag)
-{
- FeatureClausePtr fcp;
- SeqFeatPtr main_feat;
- ValNodePtr clause, replacement_clauses, nextclause, vnp;
-
- if (clause_list == NULL || *clause_list == NULL) return;
- clause = *clause_list;
- while (clause != NULL)
- {
- nextclause = clause->next;
- fcp = (clause->data.ptrvalue);
- if (fcp == NULL
- || fcp->featlist == NULL
- || fcp->featlist->choice != DEFLINE_FEATLIST)
- {
- return;
- }
- main_feat = (SeqFeatPtr) fcp->featlist->data.ptrvalue;
-
- if (IsIntergenicSpacer (main_feat)
- && (replacement_clauses = ParsetRNAIntergenicSpacerElements ( main_feat, bsp, suppress_locus_tag)) != NULL)
- {
- for (vnp = replacement_clauses; vnp->next != NULL; vnp = vnp->next) {}
- vnp->next = clause->next;
- clause->next = replacement_clauses;
- fcp->delete_me = TRUE;
- }
- clause = nextclause;
- }
- DeleteFeatureClauses (clause_list);
-}
-
-/* If we are applying a different rule for misc_feats, we need to recalculate
- * their descriptions.
- */
-static void RenameMiscFeats (ValNodePtr clause_list, Uint1 biomol)
-{
- ValNodePtr vnp, featlist;
- FeatureClausePtr fcp, featlistclause;
- SeqFeatPtr sfp;
- Int4 name_len;
-
- for (vnp = clause_list; vnp != NULL; vnp = vnp->next)
- {
- if (vnp->choice != DEFLINE_CLAUSEPLUS || vnp->data.ptrvalue == NULL)
- {
- continue;
- }
- fcp = vnp->data.ptrvalue;
- for (featlist = fcp->featlist; featlist != NULL; featlist = featlist->next)
- {
- if ( featlist->data.ptrvalue == NULL)
- {
- continue;
- }
- if (featlist->choice == DEFLINE_CLAUSEPLUS)
- {
- featlistclause = featlist->data.ptrvalue;
- RenameMiscFeats (featlistclause->featlist, biomol);
- continue;
- }
- if (featlist->choice != DEFLINE_FEATLIST)
- {
- continue;
- }
- sfp = featlist->data.ptrvalue;
- if (sfp->idx.subtype != FEATDEF_misc_feature
- || sfp->comment == NULL
- || IsIntergenicSpacer (sfp)
- || IsGeneCluster (sfp)
- || IsControlRegion (sfp))
- {
- continue;
- }
- if (fcp->feature_label_data.description != NULL)
- {
- fcp->feature_label_data.description
- = MemFree (fcp->feature_label_data.description);
- }
- name_len = StringCSpn (sfp->comment, ";");
- /* make sure we have space for terminating NULL */
- fcp->feature_label_data.description = MemNew ((name_len + 1) * sizeof (Char));
- if (fcp->feature_label_data.description == NULL) return;
- StringNCpy (fcp->feature_label_data.description, sfp->comment, name_len);
- fcp->feature_label_data.description [ name_len ] = 0;
- fcp->feature_label_data.typeword =
- MemFree (fcp->feature_label_data.typeword);
- if (biomol == MOLECULE_TYPE_GENOMIC)
- {
- fcp->feature_label_data.typeword = StringSave ("genomic sequence");
- }
- else if (biomol == MOLECULE_TYPE_MRNA)
- {
- fcp->feature_label_data.typeword = StringSave ("mRNA sequence");
- }
- else
- {
- fcp->feature_label_data.typeword = StringSave ("sequence");
- }
-
- fcp->interval = MemFree (fcp->interval);
- fcp->interval = StringSave ("");
- }
- }
-}
-
-static void RemoveUnwantedMiscFeats (
- ValNodePtr PNTR clause_list,
- Boolean delete_now
-)
-{
- ValNodePtr vnp, featlist;
- FeatureClausePtr fcp, featlistclause;
- SeqFeatPtr sfp;
-
- for (vnp = *clause_list; vnp != NULL; vnp = vnp->next)
- {
- if (vnp->choice != DEFLINE_CLAUSEPLUS || vnp->data.ptrvalue == NULL)
- {
- continue;
- }
- fcp = vnp->data.ptrvalue;
- for (featlist = fcp->featlist; featlist != NULL; featlist = featlist->next)
- {
- if ( featlist->data.ptrvalue == NULL)
- {
- continue;
- }
- if (featlist->choice == DEFLINE_CLAUSEPLUS)
- {
- featlistclause = featlist->data.ptrvalue;
- RemoveUnwantedMiscFeats (&(featlistclause->featlist), FALSE);
- continue;
- }
- if (featlist->choice != DEFLINE_FEATLIST)
- {
- continue;
- }
- sfp = featlist->data.ptrvalue;
- if ( sfp->idx.subtype == FEATDEF_misc_feature
- && ! IsNoncodingProductFeat (sfp)
- && ! IsControlRegion (sfp)
- && ! IsIntergenicSpacer (sfp)
- && ! IsGeneCluster (sfp))
- {
- fcp->delete_me = TRUE;
- }
- }
- }
- DeleteFeatureClauses (clause_list);
-}
-
-/* When a feature is on the minus strand, the clauses are listed by
- * sequence indexing in reverse biological order - we reverse the subclauses
- * for the feature in order to have them listed in the definition line
- * in biological order.
- * This is most noticeable when the main feature is a CDS with multiple
- * exons numbered sequentially. If the exons are on the minus strand and
- * appear as 9, 8, 7, 6, we want to display them in the definition line as
- * 6, 7, 8, 9.
- */
-static void ReverseClauses (
- ValNodePtr PNTR clause_list,
- matchFunction itemmatch
-)
-{
- ValNodePtr vnp, last_feat, first_feat, next_item, new_list;
- FeatureClausePtr fcp;
-
- if (clause_list == NULL || *clause_list == NULL) return;
-
- last_feat = NULL;
- first_feat = NULL;
- new_list = NULL;
- vnp = *clause_list;
- while (vnp != NULL)
- {
- next_item = vnp->next;
- fcp = NULL;
- if (vnp->choice == DEFLINE_CLAUSEPLUS
- && (fcp = vnp->data.ptrvalue) != NULL
- && fcp->slp != NULL
- && SeqLocStrand (fcp->slp) == Seq_strand_minus
- && fcp->featlist != NULL
- && fcp->featlist->choice == DEFLINE_FEATLIST
- && itemmatch (fcp->featlist->data.ptrvalue))
- {
- vnp->next = new_list;
- new_list = vnp;
- }
- else
- {
- if (first_feat == NULL)
- {
- first_feat = vnp;
- last_feat = vnp;
- }
- else
- {
- last_feat->next = vnp;
- last_feat = vnp;
- last_feat->next = NULL;
- }
- }
- if (fcp != NULL)
- {
- ReverseClauses (&(fcp->featlist), itemmatch);
- }
- vnp = next_item;
- }
- if (first_feat == NULL)
- {
- *clause_list = new_list;
- }
- else
- {
- last_feat->next = new_list;
- *clause_list = first_feat;
- }
-}
-
-/* This function is used to determine whether two features are both exons
- * and whether they are numerically sequential - i.e., exon 7 and exon 8
- * are a pair of consecutive exons, exon 7 and exon 9 are not, and exon 7
- * and intron 9 are not.
- */
-static Boolean ClausePairIsTwoConsecutiveExons (
- ValNodePtr vnp1,
- ValNodePtr vnp2,
- BioseqPtr bsp
-)
-{
- FeatureClausePtr fcp1, fcp2;
- SeqFeatPtr exon1, exon2;
- Int4 num1, num2;
- CharPtr exdesc1, exdesc2;
-
- if (vnp1 == NULL || vnp2 == NULL
- || vnp1->choice != DEFLINE_CLAUSEPLUS
- || vnp2->choice != DEFLINE_CLAUSEPLUS
- || vnp1->data.ptrvalue == NULL
- || vnp2->data.ptrvalue == NULL)
- {
- return FALSE;
- }
- fcp1 = vnp1->data.ptrvalue;
- fcp2 = vnp2->data.ptrvalue;
- if ( fcp1->featlist == NULL
- || fcp1->featlist->data.ptrvalue == NULL
- || fcp2->featlist == NULL
- || fcp2->featlist->data.ptrvalue == NULL
- || fcp1->featlist->choice != DEFLINE_FEATLIST
- || fcp2->featlist->choice != DEFLINE_FEATLIST
- || ! IsExon (fcp1->featlist->data.ptrvalue)
- || ! IsExon (fcp2->featlist->data.ptrvalue)
- || (fcp1->is_alt_spliced && ! fcp2->is_alt_spliced)
- || (! fcp1->is_alt_spliced && fcp2->is_alt_spliced))
- {
- return FALSE;
- }
-
- exon1 = (SeqFeatPtr)(fcp1->featlist->data.ptrvalue);
- exon2 = (SeqFeatPtr)(fcp2->featlist->data.ptrvalue);
-
- exdesc1 = GetExonDescription (bsp, exon1);
- exdesc2 = GetExonDescription (bsp, exon2);
- if (exdesc1 == NULL || exdesc2 == NULL)
- {
- if (exdesc1 != NULL) MemFree (exdesc1);
- if (exdesc2 != NULL) MemFree (exdesc2);
- return FALSE;
- }
-
- num1 = atoi (exdesc1);
- num2 = atoi (exdesc2);
- MemFree (exdesc1);
- MemFree (exdesc2);
-
- if (abs (num1 - num2) == 1)
- {
- return TRUE;
- }
-
- return FALSE;
-}
-
-/* This function counts the number of consecutive exons in a list.
- */
-static Int4 GetNumberOfConsecutiveExons (
- ValNodePtr list,
- BioseqPtr bsp
-)
-{
- ValNodePtr check;
- Int4 num_exons;
-
- num_exons = 0;
- check = list->next;
- if ( ! ClausePairIsTwoConsecutiveExons (list, check, bsp)) return 0;
-
- num_exons = 2;
- while ( check != NULL
- && ClausePairIsTwoConsecutiveExons (check, check->next, bsp))
- {
- num_exons++;
- check = check->next;
- }
- return num_exons;
-}
-
-/* This function replaces a list of three or more consecutive exon clauses
- * with a single "summary" clause that gives the range of exons present -
- * i.e., if you have exons 1, 2, 3, and 4, a clause will be created that
- * contains all four of those features and has a description of "1 through 4".
- */
-static void ReplaceExonClauseList (
- FeatureClausePtr fcp,
- ValNodePtr clause,
- Int4 num_exons,
- BioseqPtr bsp
-)
-{
- ValNodePtr lastfeat, tmpclause;
- FeatureClausePtr tmpfcp;
- Int4 i;
- CharPtr new_description;
- Int4 new_description_len;
- CharPtr exdesc1, exdesc2;
-
- if (fcp == NULL || clause == NULL) return;
-
- lastfeat = fcp->featlist;
- while (lastfeat != NULL && lastfeat->next != NULL)
- {
- lastfeat = lastfeat->next;
- }
- tmpclause = clause->next;
- for (i=0; i < num_exons - 1 && tmpclause != NULL; i++)
- {
- tmpfcp = tmpclause->data.ptrvalue;
- tmpfcp->delete_me = TRUE;
- if (lastfeat == NULL)
- {
- fcp->featlist = tmpfcp->featlist;
- }
- else
- {
- lastfeat->next = tmpfcp->featlist;
- }
- tmpfcp->featlist = NULL;
- while (lastfeat != NULL && lastfeat->next != NULL)
- {
- lastfeat = lastfeat->next;
- }
-
- tmpclause = tmpclause->next;
- }
-
- exdesc1 = GetExonDescription (bsp, fcp->featlist->data.ptrvalue);
- exdesc2 = GetExonDescription (bsp, lastfeat->data.ptrvalue);
- if (exdesc1 == NULL || exdesc2 == NULL)
- {
- if (exdesc1 != NULL) MemFree (exdesc1);
- if (exdesc2 != NULL) MemFree (exdesc2);
- return;
- }
- new_description_len =
- StringLen (exdesc1)
- + StringLen (exdesc2)
- + StringLen (" through ")
- + 1;
- new_description = MemNew (new_description_len * sizeof (Char));
- if (new_description == NULL) return;
- sprintf (new_description, "%s through %s", exdesc1, exdesc2);
- MemFree (exdesc1);
- MemFree (exdesc2);
- if (fcp->feature_label_data.description != NULL)
- {
- MemFree (fcp->feature_label_data.description);
- }
- fcp->feature_label_data.description = new_description;
-}
-
-/* This function recursively searches for lists of consecutive exons
- * and calls ReplaceExonClauseList to consolidate the exons into a list
- * clause.
- */
-static void RenameExonSequences (
- ValNodePtr PNTR list,
- BioseqPtr bsp,
- Boolean delete_now
-)
-{
- ValNodePtr clause;
- Int4 num_exons;
- FeatureClausePtr fcp;
-
- if (list == NULL) return;
- clause = *list;
- while (clause != NULL)
- {
- if (clause->choice == DEFLINE_CLAUSEPLUS
- && clause->data.ptrvalue != NULL)
- {
- fcp = clause->data.ptrvalue;
- if ( ! fcp->delete_me)
- {
- num_exons = GetNumberOfConsecutiveExons (clause, bsp);
- if (num_exons > 2)
- {
- ReplaceExonClauseList (fcp, clause, num_exons, bsp);
- }
- else
- {
- RenameExonSequences (&fcp->featlist, bsp, FALSE);
- }
- }
- }
- clause = clause->next;
- }
- if (delete_now) DeleteFeatureClauses (list);
-}
-
-static CharPtr organelleByGenome [] = {
- NULL,
- NULL,
- "chloroplast",
- "chromoplast",
- "kinetoplast",
- "mitochondrial",
- "plastid",
- "",
- "",
- "",
- "",
- "",
- "cyanelle",
- "",
- "",
- "",
- "apicoplast",
- "leucoplast",
- "proplastid",
- "",
- "hydrogenosome",
- NULL,
-};
-
-static CharPtr organelleByPopup [] = {
- NULL,
- "mitochondrial",
- "chloroplast",
- "kinetoplast",
- "plastid",
- "chromoplast",
- "cyanelle",
- "apicoplast",
- "leucoplast",
- "proplastid",
- NULL
-};
-#define DEFAULT_ORGANELLE_CLAUSE 10
-
-static void
-AddProductEnding
-(CharPtr str,
- BioseqPtr bsp,
- Int2 mitochloroflag,
- ValNodePtr strings)
-{
- Char orgnelle [80];
- BioSourcePtr biop;
- ValNodePtr last_string;
- Int4 num_genes;
- SubSourcePtr ssp;
-
- num_genes = 0;
- biop = GetBiopForBsp (bsp);
-
- if (biop != NULL) {
- if (FindStringInStrings (strings, "genes"))
- {
- num_genes = 2;
- }
- else if ((last_string = FindStringInStrings (strings, "gene")) != NULL
- && last_string->next != NULL
- && (last_string = FindStringInStrings (last_string->next, "gene")) != NULL)
- {
- num_genes = 2;
- }
- else
- {
- num_genes = 1;
- }
-
- orgnelle [0] = '\0';
-
- switch (biop->genome) {
- case GENOME_macronuclear :
- StringCat (str, "; macronuclear");
- break;
- case GENOME_nucleomorph :
- StringCat (str, "; nucleomorph");
- break;
- case GENOME_apicoplast :
- case GENOME_chloroplast :
- case GENOME_chromoplast :
- case GENOME_kinetoplast :
- case GENOME_mitochondrion :
- case GENOME_plastid :
- case GENOME_cyanelle :
- case GENOME_leucoplast :
- case GENOME_proplastid :
- case GENOME_hydrogenosome :
- sprintf (orgnelle, "; %s", organelleByGenome [biop->genome]);
- StringCat (str, orgnelle);
- break;
- default :
- ssp = biop->subtype;
- while (ssp != NULL && ssp->subtype != 255)
- {
- ssp = ssp->next;
- }
- if (ssp != NULL
- && ssp->name != NULL
- && StringStr (ssp->name, "micronuclear"))
- {
- StringCat (str, "; micronuclear");
- }
- else if (mitochloroflag > 0) {
- if (mitochloroflag > 9) {
- /* beyond list */
- }
- else {
- if (num_genes > 1)
- {
- sprintf (orgnelle, "; nuclear genes for %s products",
- organelleByPopup [mitochloroflag]);
- }
- else
- {
- sprintf (orgnelle, "; nuclear gene for %s product",
- organelleByPopup [mitochloroflag]);
- }
- StringCat (str, orgnelle);
- }
- }
- break;
- }
- }
-}
-
-/*---------------------------------------------------------------------*/
-/* */
-/* AutoDef_AddEnding () -- Add an ending on to the definition line */
-/* after the last feature. */
-/* */
-/*---------------------------------------------------------------------*/
-
-static void AutoDef_AddEnding (
- ValNodePtr clause_list,
- ValNodePtr PNTR strings,
- BioseqPtr bsp,
- Int2 mitochloroflag,
- Boolean alternate_splice_flag
-)
-{
- Char str [200];
- ValNodePtr last_string;
- Int4 new_data_len;
- CharPtr new_data;
-
- str[0] = 0;
- AddProductEnding (str, bsp, mitochloroflag, *strings);
- if (alternate_splice_flag) {
- StringCat (str, ", alternatively spliced");
- }
-
- StringCat (str, ".");
-
- last_string = *strings;
- if (last_string == NULL)
- {
- ValNodeAddStr (strings, 0, StringSave ( str));
- }
- else
- {
- while (last_string->next != NULL) last_string = last_string->next;
- new_data_len = StringLen (last_string->data.ptrvalue) + StringLen (str) + 1;
- new_data = (CharPtr) MemNew (new_data_len);
- if (new_data == NULL) return;
- StringCpy (new_data, last_string->data.ptrvalue);
- StringCat (new_data, str);
- MemFree (last_string->data.ptrvalue);
- last_string->data.ptrvalue = new_data;
- }
-}
-
-static Boolean LastIntervalChangeBeforeEnd (
- FeatureClausePtr onebefore,
- FeatureClausePtr thisclause,
- ValNodePtr rest_of_list
-)
-{
- ValNodePtr vnp;
- FeatureClausePtr fcp;
-
- if (onebefore == NULL || rest_of_list == NULL) return FALSE;
-
- if (StringCmp (onebefore->interval, thisclause->interval) == 0) return FALSE;
-
- for (vnp = rest_of_list; vnp != NULL; vnp = vnp->next)
- {
- if (vnp->choice == DEFLINE_CLAUSEPLUS && vnp->data.ptrvalue != NULL)
- {
- fcp = vnp->data.ptrvalue;
- if (StringCmp (thisclause->interval, fcp->interval) != 0) return FALSE;
- }
- }
- return TRUE;
-
-}
-
-static void PluralizeClauseIntervals (
- FeatureClausePtr fcp
-)
-{
- CharPtr new_interval, cp;
-
- if (fcp->interval != NULL
- && (cp = StringStr (fcp->interval, "gene, ")) != NULL)
- {
- new_interval = MemNew (StringLen (fcp->interval) + 2);
- if (new_interval == NULL) return;
- StringCpy (new_interval, fcp->interval);
- new_interval [ cp - fcp->interval + 4] = 's';
- StringCpy (new_interval + (cp - fcp->interval) + 5,
- cp + 4);
- MemFree (fcp->interval);
- fcp->interval = new_interval;
- }
-}
-
-static Boolean DisplayAlleleName (FeatureClausePtr thisclause)
-{
- if (thisclause == NULL) return FALSE;
- if (StringCmp (thisclause->feature_label_data.typeword, "gene") == 0
- || StringCmp (thisclause->feature_label_data.typeword, "pseudogene") == 0
- || StringCmp (thisclause->feature_label_data.typeword, "mRNA") == 0
- || StringCmp (thisclause->feature_label_data.typeword, "pseudogene mRNA") == 0
- || StringCmp (thisclause->feature_label_data.typeword, "precursor RNA") == 0
- || StringCmp (thisclause->feature_label_data.typeword, "pseudogene precursor RNA") == 0)
- {
- return TRUE;
- }
- return FALSE;
-}
-
-static void ListClauses (
- ValNodePtr clauselist,
- ValNodePtr PNTR strings,
- Boolean allow_semicolons,
- Boolean suppress_final_and
-)
-{
- FeatureClausePtr thisclause, onebefore, twobefore, oneafter, twoafter;
- Boolean print_typeword;
- Boolean print_and;
- Boolean print_comma;
- Boolean print_semicolon;
- Boolean print_comma_between_description_and_typeword;
- Boolean typeword_is_plural;
- size_t clause_len;
- CharPtr clause_string;
- Boolean oneafter_has_detail_change;
- Boolean oneafter_has_interval_change;
- Boolean oneafter_has_typeword_change;
- Boolean onebefore_has_detail_change;
- Boolean onebefore_has_interval_change;
- Boolean onebefore_has_typeword_change;
- SeqFeatPtr main_feat;
- CharPtr new_interval;
- ValNodePtr voneafter, vtwoafter;
-
- while (clauselist != NULL && clauselist->choice != DEFLINE_CLAUSEPLUS)
- {
- clauselist = clauselist->next;
- }
- if (clauselist == NULL) return;
-
- thisclause = clauselist->data.ptrvalue;
- onebefore = NULL;
- twobefore = NULL;
-
- while (thisclause != NULL)
- {
- oneafter_has_detail_change = FALSE;
- oneafter_has_interval_change = FALSE;
- oneafter_has_typeword_change = FALSE;
- onebefore_has_detail_change = FALSE;
- onebefore_has_interval_change = FALSE;
- onebefore_has_typeword_change = FALSE;
- if (onebefore != NULL)
- {
- if (StringCmp (onebefore->interval, thisclause->interval) != 0)
- onebefore_has_interval_change = TRUE;
- if (StringCmp (onebefore->feature_label_data.typeword,
- thisclause->feature_label_data.typeword) != 0)
- {
- onebefore_has_typeword_change = TRUE;
- }
- if (onebefore_has_typeword_change || onebefore_has_interval_change
- || (DisplayAlleleName (onebefore) && StringLen (onebefore->allelename) != 0)
- || (DisplayAlleleName (thisclause) && StringLen (thisclause->allelename) != 0))
- {
- onebefore_has_detail_change = TRUE;
- }
- }
- voneafter = clauselist->next;
- while (voneafter != NULL && voneafter->choice != DEFLINE_CLAUSEPLUS)
- {
- voneafter = voneafter->next;
- }
- if (voneafter == NULL)
- {
- vtwoafter = NULL;
- }
- else
- {
- vtwoafter = voneafter->next;
- while (vtwoafter != NULL && vtwoafter->choice != DEFLINE_CLAUSEPLUS)
- {
- vtwoafter = vtwoafter->next;
- }
- }
-
- if (voneafter != NULL)
- {
- oneafter = voneafter->data.ptrvalue;
- if (StringCmp (oneafter->interval, thisclause->interval) != 0)
- oneafter_has_interval_change = TRUE;
- if (StringCmp (oneafter->feature_label_data.typeword,
- thisclause->feature_label_data.typeword) != 0)
- {
- oneafter_has_typeword_change = TRUE;
- }
- if (oneafter_has_typeword_change || oneafter_has_interval_change
- || (DisplayAlleleName (thisclause) && StringLen (thisclause->allelename) != 0)
- || (DisplayAlleleName (oneafter) && StringLen (oneafter->allelename) != 0))
- {
- oneafter_has_detail_change = TRUE;
- }
- if (vtwoafter != NULL)
- {
- twoafter = vtwoafter->data.ptrvalue;
- }
- else
- {
- twoafter = NULL;
- }
- }
- else
- {
- oneafter = NULL;
- twoafter = NULL;
- }
- print_typeword = FALSE;
- typeword_is_plural = FALSE;
- print_and = FALSE;
- print_comma = FALSE;
- print_semicolon = FALSE;
-
- if (thisclause->feature_label_data.is_typeword_first)
- {
- if (onebefore == NULL || onebefore_has_detail_change)
- {
- print_typeword = TRUE;
- if (oneafter != NULL && ! oneafter_has_detail_change)
- {
- typeword_is_plural = TRUE;
- }
- else if (StringStr (thisclause->feature_label_data.description, " through ") != NULL
- && StringCmp (thisclause->feature_label_data.typeword, "exon") == 0)
- {
- typeword_is_plural = TRUE;
- }
- }
- }
- else
- {
- if (oneafter == NULL || oneafter_has_detail_change)
- {
- print_typeword = TRUE;
- if (onebefore != NULL && ! onebefore_has_detail_change)
- {
- typeword_is_plural = TRUE;
- }
- }
- }
-
- /* when to print and before this section */
- if ( onebefore != NULL
- && ! onebefore_has_detail_change
- && (oneafter == NULL || oneafter_has_detail_change))
- {
- print_and = TRUE;
- }
- else if (oneafter == NULL && onebefore != NULL)
- {
- print_and = TRUE;
- }
- else if (onebefore != NULL
- && ! onebefore_has_interval_change
- && oneafter_has_interval_change)
- {
- print_and = TRUE;
- }
- else if ( LastIntervalChangeBeforeEnd ( onebefore,
- thisclause,
- clauselist->next))
- {
- print_and = TRUE;
- }
-
- if (suppress_final_and && oneafter == NULL)
- {
- print_and = FALSE;
- }
- if (suppress_final_and && oneafter != NULL && twoafter == NULL)
- {
- print_comma = TRUE;
- }
-
- /* when to print semicolon after this section */
- /* after every interval change except when exons change "interval" */
- /* exons changing interval are going from alt-spliced to not */
- /* or vice versa, in either case we don't want a semicolon or comma */
- if (oneafter != NULL && oneafter_has_interval_change
- && (StringCmp (thisclause->feature_label_data.typeword, "exon") != 0
- || StringCmp (oneafter->feature_label_data.typeword, "exon") != 0))
- {
- print_semicolon = TRUE;
- }
-
- /* when to print comma after this section */
- if (onebefore != NULL && oneafter != NULL
- && ! onebefore_has_detail_change
- && ! oneafter_has_detail_change )
- {
- print_comma = TRUE;
- }
- else if (oneafter != NULL && onebefore != NULL
- && ! onebefore_has_interval_change && ! oneafter_has_interval_change
- && onebefore_has_typeword_change && oneafter_has_typeword_change)
- {
- print_comma = TRUE;
- }
- else if (oneafter != NULL && twoafter != NULL
- && ! oneafter_has_detail_change
- && StringCmp (twoafter->feature_label_data.typeword,
- thisclause->feature_label_data.typeword) == 0
- && StringCmp (twoafter->interval,
- thisclause->interval) == 0)
- {
- print_comma = TRUE;
- }
- else if (oneafter != NULL && twoafter != NULL
- && oneafter_has_typeword_change
- && StringCmp (twoafter->feature_label_data.typeword,
- oneafter->feature_label_data.typeword) == 0
- && StringCmp (twoafter->interval,
- oneafter->interval) == 0
- && ! print_and)
- {
- print_comma = TRUE;
- }
- else if (((oneafter_has_interval_change || oneafter == NULL)
- && StringDoesHaveText (thisclause->interval))
- || (oneafter_has_interval_change && oneafter != NULL && ! print_semicolon))
- {
- print_comma = TRUE;
- }
- else if (oneafter != NULL && twoafter != NULL
- && !oneafter_has_interval_change
- && StringCmp (thisclause->interval, twoafter->interval) == 0
- && oneafter_has_typeword_change
- && StringCmp (thisclause->feature_label_data.typeword,
- twoafter->feature_label_data.typeword) != 0)
- {
- print_comma = TRUE;
- }
- else if (oneafter != NULL && onebefore != NULL && twoafter != NULL
- && ! oneafter_has_interval_change && ! onebefore_has_interval_change
- && StringCmp (thisclause->interval, twoafter->interval) == 0
- && oneafter_has_typeword_change)
- {
- print_comma = TRUE;
- }
- else if (oneafter != NULL && twoafter != NULL
- && oneafter_has_typeword_change
- && StringCmp (oneafter->feature_label_data.typeword,
- twoafter->feature_label_data.typeword) != 0
- && ! oneafter_has_interval_change
- && StringCmp (oneafter->interval, twoafter->interval) == 0)
- {
- /* spacer 1, foo RNA gene, and spacer2, complete sequence */
- /* ^ */
- print_comma = TRUE;
- }
- else if (oneafter != NULL && twoafter != NULL
- && ! oneafter_has_interval_change && StringCmp (thisclause->interval, twoafter->interval) == 0
- && ((DisplayAlleleName (oneafter) && StringLen (oneafter->allelename) > 0)
- || (DisplayAlleleName (thisclause) && StringLen (thisclause->allelename) > 0)))
- {
- print_comma = TRUE;
- }
- else if (oneafter != NULL && onebefore != NULL
- && ! oneafter_has_interval_change && ! onebefore_has_interval_change
- && ((DisplayAlleleName (oneafter) && StringLen (oneafter->allelename) > 0)
- || (DisplayAlleleName (thisclause) && StringLen (thisclause->allelename) > 0)))
- {
- print_comma = TRUE;
- }
-
- if (thisclause->featlist != NULL
- && thisclause->featlist->data.ptrvalue != NULL
- && StringDoesHaveText (thisclause->interval)
- && StringNCmp (thisclause->interval, "partial", 7) != 0
- && StringNCmp (thisclause->interval, "complete", 8) != 0)
- {
- main_feat = thisclause->featlist->data.ptrvalue;
- if (IsMobileElement (main_feat)
- || IsEndogenousVirusSourceFeature (main_feat) )
- {
- print_comma = FALSE;
- }
- }
-
- if (onebefore != NULL
- && ! onebefore_has_interval_change
- && (oneafter_has_interval_change || oneafter == NULL))
- {
- PluralizeClauseIntervals (thisclause);
- }
-
- if ( thisclause->make_plural )
- {
- if ((onebefore != NULL && ! onebefore_has_detail_change)
- || (oneafter != NULL && !oneafter_has_detail_change))
- {
- PluralizeConsolidatedClauseDescription (thisclause);
- }
- else
- {
- typeword_is_plural = TRUE;
- }
- }
-
- clause_len = StringLen (thisclause->feature_label_data.description) + 1;
-
- /* add one in case we need to add the semicolon to this clause (when
- * the interval has changed because this clause has no interval and
- * the next one does).
- */
- clause_len++;
-
- /* we need to place a comma between the description and the type word
- * when the description ends with "precursor" or when the type word
- * starts with "precursor"
- */
- if ( thisclause->feature_label_data.description != NULL
- && ! thisclause->feature_label_data.is_typeword_first
- && print_typeword
- && ! StringHasNoText (thisclause->feature_label_data.typeword)
- && ((StringNCmp (thisclause->feature_label_data.typeword, "precursor", 9) == 0
- && thisclause->feature_label_data.description [StringLen (thisclause->feature_label_data.description) - 1] != ')')
- || (clause_len > StringLen ("precursor")
- && StringCmp ( thisclause->feature_label_data.description
- + clause_len - StringLen ("precursor") - 2,
- "precursor") == 0)))
- {
- print_comma_between_description_and_typeword = TRUE;
- clause_len += 1;
- }
- else
- {
- print_comma_between_description_and_typeword = FALSE;
- }
-
- if (print_typeword)
- clause_len += StringLen (thisclause->feature_label_data.typeword) + 1;
- if (typeword_is_plural)
- clause_len += 1;
- if (print_and)
- clause_len += 4;
- if (print_comma)
- clause_len += 2;
- if (DisplayAlleleName (thisclause))
- {
- clause_len += StringLen (thisclause->allelename) + 10;
- if (StringLen (thisclause->allelename) > 0)
- {
- clause_len += StringLen (thisclause->allelename) + StringLen ("allele ");
- }
- }
-
- clause_string = (CharPtr) MemNew (clause_len);
- if (clause_string == NULL)
- return;
- clause_string[0] = 0;
- if (print_and)
- StringCat (clause_string, "and ");
- if (thisclause->feature_label_data.is_typeword_first && print_typeword
- && thisclause->feature_label_data.typeword != NULL
- && ! StringHasNoText (thisclause->feature_label_data.typeword))
- {
- StringCat (clause_string, thisclause->feature_label_data.typeword);
- if (typeword_is_plural)
- StringCat (clause_string, "s");
- if (thisclause->feature_label_data.description != NULL)
- StringCat (clause_string, " ");
- }
- if (thisclause->feature_label_data.description != NULL)
- {
- StringCat (clause_string, thisclause->feature_label_data.description);
- if (print_comma_between_description_and_typeword)
- {
- StringCat (clause_string, ",");
- }
- }
- if (! thisclause->feature_label_data.is_typeword_first && print_typeword
- && thisclause->feature_label_data.typeword != NULL
- && ! StringHasNoText (thisclause->feature_label_data.typeword))
- {
- if (thisclause->feature_label_data.description != NULL)
- StringCat (clause_string, " ");
- StringCat (clause_string, thisclause->feature_label_data.typeword);
- if (typeword_is_plural)
- StringCat (clause_string, "s");
- if (DisplayAlleleName (thisclause)
- && thisclause->allelename != NULL)
- {
- StringCat (clause_string, ", ");
- StringCat (clause_string, thisclause->allelename);
- StringCat (clause_string, " allele");
- }
- }
- if (StringLen (clause_string) > 0 )
- {
- if (print_comma)
- StringCat (clause_string, ",");
- ValNodeAddStr (strings, 0, clause_string);
- }
- else
- {
- MemFree (clause_string);
- clause_string = NULL;
- }
-
- if (oneafter == NULL || oneafter_has_interval_change)
- {
- if (print_semicolon) {
- if (thisclause->interval == NULL
- || StringHasNoText(thisclause->interval)) {
- if (clause_string != NULL) {
- StringCat (clause_string, ";");
- }
- } else if (thisclause->interval[StringLen (thisclause->interval)] != ';') {
- new_interval = MemNew (StringLen (thisclause->interval) + 2);
- if (new_interval == NULL) return;
- StringCpy (new_interval, thisclause->interval);
- if (allow_semicolons)
- {
- StringCat (new_interval, ";");
- }
- else
- {
- StringCat (new_interval, ",");
- }
- MemFree (thisclause->interval);
- thisclause->interval = new_interval;
- }
- }
- if (thisclause->interval != NULL
- && !StringHasNoText (thisclause->interval))
- {
- ValNodeAddStr (strings, 0, StringSave (thisclause->interval));
- }
- }
- twobefore = onebefore;
- onebefore = thisclause;
- thisclause = oneafter;
- clauselist = voneafter;
- }
-}
-
-static Uint1 GetMoleculeType
-(BioseqPtr bsp,
- Uint2 entityID)
-{
- SeqDescPtr sdp;
- MolInfoPtr mip;
- SeqMgrDescContext dcontext;
-
- if (bsp == NULL) return MOLECULE_TYPE_GENOMIC;
- sdp = SeqMgrGetNextDescriptor (bsp, NULL, Seq_descr_molinfo, &dcontext);
- if (sdp == NULL) return MOLECULE_TYPE_GENOMIC;
- mip = (MolInfoPtr) sdp->data.ptrvalue;
- if (mip == NULL) return MOLECULE_TYPE_GENOMIC;
- return mip->biomol;
-}
-
-static Boolean SpecialHandlingForSpecialTechniques (
- BioseqPtr bsp
-)
-{
- SeqDescPtr sdp;
- MolInfoPtr mip;
- ValNodePtr vnp;
-
- if (bsp == NULL) return MOLECULE_TYPE_GENOMIC;
- sdp = SeqMgrGetNextDescriptor (bsp, NULL, Seq_descr_molinfo, NULL);
- if (sdp == NULL)
- {
- for (sdp = bsp->descr;
- sdp != NULL && sdp->choice != Seq_descr_molinfo;
- sdp = sdp->next)
- {}
- }
- if (sdp == NULL) return FALSE;
- mip = (MolInfoPtr) sdp->data.ptrvalue;
- if (mip == NULL) return FALSE;
- if (mip->tech == MI_TECH_htgs_0 ||
- mip->tech == MI_TECH_htgs_1 ||
- mip->tech == MI_TECH_htgs_2 ||
- mip->tech == MI_TECH_est ||
- mip->tech == MI_TECH_sts ||
- mip->tech == MI_TECH_survey ||
- mip->tech == MI_TECH_wgs) {
- vnp = ValNodeExtract (&(bsp->descr), Seq_descr_title);
- if (vnp != NULL)
- vnp = ValNodeFreeData (vnp);
- return TRUE;
- }
-
- return FALSE;
-}
-
-static Boolean LIBCALLBACK ShouldRemoveExon (
- SeqFeatPtr sfp,
- FeatureClausePtr parent_fcp,
- FeatureClausePtr this_fcp,
- BioseqPtr bsp,
- Boolean isLonely,
- Boolean isRequested,
- Boolean isSegment,
- Boolean suppress_locus_tag
-)
-{
- Boolean partial3, partial5;
- SeqFeatPtr main_feat;
-
- if (isSegment || isLonely || isRequested) return FALSE;
- if (parent_fcp == NULL
- || parent_fcp->featlist == NULL
- || parent_fcp->featlist->data.ptrvalue == NULL)
- {
- return TRUE;
- }
-
- main_feat = parent_fcp->featlist->data.ptrvalue;
- if ( IsCDS (main_feat))
- {
- CheckSeqLocForPartial (main_feat->location, &partial5, &partial3);
- if (partial5 || partial3) return FALSE;
- }
- else if (IsmRNA (main_feat) || parent_fcp->has_mrna)
- {
- return FALSE;
- }
- return TRUE;
-}
-
-static Boolean LIBCALLBACK ShouldRemoveCDS (
- SeqFeatPtr sfp,
- FeatureClausePtr parent_fcp,
- FeatureClausePtr this_fcp,
- BioseqPtr bsp,
- Boolean isLonely,
- Boolean isRequested,
- Boolean isSegment,
- Boolean suppress_locus_tag)
-{
- CharPtr description;
- Boolean retval = FALSE;
-
- description = GetGeneProtDescription (this_fcp, bsp, suppress_locus_tag);
- if (StringHasNoText (description))
- {
- retval = TRUE;
- }
- if (description != NULL) MemFree (description);
- return retval;
-}
-
-static Boolean LIBCALLBACK ShouldRemoveNoncodingProductFeat (
- SeqFeatPtr sfp,
- FeatureClausePtr parent_fcp,
- FeatureClausePtr this_fcp,
- BioseqPtr bsp, Boolean isLonely,
- Boolean isRequested,
- Boolean isSegment,
- Boolean suppress_locus_tag
-)
-{
- if (isRequested) return FALSE;
- return TRUE;
-}
-
-static Boolean LIBCALLBACK ShouldRemovePromoter (
- SeqFeatPtr sfp,
- FeatureClausePtr parent_fcp,
- FeatureClausePtr this_fcp,
- BioseqPtr bsp, Boolean isLonely,
- Boolean isRequested,
- Boolean isSegment,
- Boolean suppress_locus_tag
-)
-{
- /* remove a promoter if it is in an mRNA or gene clause */
- if (isRequested)
- {
- return FALSE;
- }
- else if (parent_fcp != NULL
- && (parent_fcp->has_mrna
- || (parent_fcp->featlist != NULL
- && parent_fcp->featlist->choice == DEFLINE_FEATLIST
- && parent_fcp->featlist->data.ptrvalue != NULL
- && IsmRNA (parent_fcp->featlist->data.ptrvalue))))
- {
- return TRUE;
- }
- else if (isLonely)
- {
- return FALSE;
- }
- else
- {
- return TRUE;
- }
-}
-
-static Boolean LIBCALLBACK ShouldRemoveLTR (
- SeqFeatPtr sfp,
- FeatureClausePtr parent_fcp,
- FeatureClausePtr this_fcp,
- BioseqPtr bsp,
- Boolean isLonely,
- Boolean isRequested,
- Boolean isSegment,
- Boolean suppress_locus_tag
-)
-{
- if (isRequested)
- {
- return FALSE;
- }
- else if (parent_fcp != NULL)
- {
- return TRUE;
- }
- else if (isLonely)
- return FALSE;
- else
- return TRUE;
-}
-
-static Boolean LIBCALLBACK ShouldRemove3UTR (
- SeqFeatPtr sfp,
- FeatureClausePtr parent_fcp,
- FeatureClausePtr this_fcp,
- BioseqPtr bsp,
- Boolean isLonely,
- Boolean isRequested,
- Boolean isSegment,
- Boolean suppress_locus_tag
-)
-{
- if (isLonely || isRequested)
- return FALSE;
- else
- return TRUE;
-}
-
-static Boolean LIBCALLBACK ShouldRemove5UTR (
- SeqFeatPtr sfp,
- FeatureClausePtr parent_fcp,
- FeatureClausePtr this_fcp,
- BioseqPtr bsp,
- Boolean isLonely,
- Boolean isRequested,
- Boolean isSegment,
- Boolean suppress_locus_tag
-)
-{
- if (isLonely || isRequested)
- return FALSE;
- else
- return TRUE;
-}
-
-static Boolean LIBCALLBACK ShouldRemoveIntron (
- SeqFeatPtr sfp,
- FeatureClausePtr parent_fcp,
- FeatureClausePtr this_fcp,
- BioseqPtr bsp, Boolean isLonely,
- Boolean isRequested,
- Boolean isSegment,
- Boolean suppress_locus_tag
-)
-{
- if (isRequested)
- {
- return FALSE;
- }
- else if (parent_fcp != NULL
- && (parent_fcp->has_mrna
- || (parent_fcp->featlist != NULL
- && parent_fcp->featlist->choice == DEFLINE_FEATLIST
- && parent_fcp->featlist->data.ptrvalue != NULL
- && IsmRNA (parent_fcp->featlist->data.ptrvalue))))
- {
- return TRUE;
- }
- else if (isLonely)
- {
- return FALSE;
- }
- else
- {
- return TRUE;
- }
-}
-
-static Boolean LIBCALLBACK ShouldRemoveMobileElement
-( SeqFeatPtr sfp,
- FeatureClausePtr parent_fcp,
- FeatureClausePtr this_fcp,
- BioseqPtr bsp,
- Boolean isLonely,
- Boolean isRequested,
- Boolean isSegment,
- Boolean suppress_locus_tag)
-{
- return (!isLonely && !isRequested);
-}
-
-static Boolean LIBCALLBACK ShouldRemoveGeneric
-( SeqFeatPtr sfp,
- FeatureClausePtr parent_fcp,
- FeatureClausePtr this_fcp,
- BioseqPtr bsp,
- Boolean isLonely,
- Boolean isRequested,
- Boolean isSegment,
- Boolean suppress_locus_tag)
-{
- CharPtr productname;
- Boolean rval;
-
- rval = FALSE;
- if (IsMiscRNA (sfp) && ( productname = GetProductName (sfp, bsp, suppress_locus_tag)) != NULL)
- {
- if (StringStr (productname, "trans-spliced leader") != NULL)
- {
- rval = TRUE;
- }
- MemFree (productname);
- }
-
- return rval;
-}
-
-
-static Boolean IsBioseqPrecursorRNA (BioseqPtr bsp)
-{
- SeqDescrPtr sdp;
- SeqMgrDescContext context;
- MolInfoPtr mol;
-
- if (bsp == NULL) return FALSE;
-
- sdp = SeqMgrGetNextDescriptor (bsp, NULL, Seq_descr_molinfo, &context);
- if (sdp != NULL && sdp->data.ptrvalue != NULL)
- {
- mol = (MolInfoPtr) sdp->data.ptrvalue;
- if (mol->biomol == 2)
- {
- return TRUE;
- }
- }
- return FALSE;
-}
-
-static Boolean LIBCALLBACK ShouldRemovePrecursorRNA
-( SeqFeatPtr sfp,
- FeatureClausePtr parent_fcp,
- FeatureClausePtr this_fcp,
- BioseqPtr bsp,
- Boolean isLonely,
- Boolean isRequested,
- Boolean isSegment,
- Boolean suppress_locus_tag)
-{
- if (!isLonely && IsBioseqPrecursorRNA(bsp))
- {
- return TRUE;
- }
- else
- {
- return ShouldRemoveGeneric (sfp, parent_fcp, this_fcp, bsp, isLonely,
- isRequested, isSegment, suppress_locus_tag);
- }
-}
-
-
-typedef struct removableitemglobal {
- matchFunction itemmatch;
- ShouldRemoveFunction ShouldRemove;
- CharPtr group_name;
-} RemovableItemGlobalData, PNTR RemovableItemGlobalPtr;
-
-typedef struct removableitemlocal {
- ButtoN keep_request;
- Boolean keep;
-} RemovableItemLocalData, PNTR RemovableItemLocalPtr;
-
-static RemovableItemGlobalData remove_items[] = {
- { IsExon, ShouldRemoveExon, "Exons" },
- { IsIntron, ShouldRemoveIntron, "Introns" },
- { Is5UTR, ShouldRemove5UTR, "5' UTRs" },
- { Is3UTR, ShouldRemove3UTR, "3' UTRs" },
- { IsCDS, ShouldRemoveCDS, "CDSs" },
- { IsPromoter, ShouldRemovePromoter, "Promoters" },
- { IsLTR, ShouldRemoveLTR, "LTRs" },
- { IsPrecursorRNA, ShouldRemovePrecursorRNA, "Precursor RNAs" },
- { IsNoncodingProductFeat, ShouldRemoveNoncodingProductFeat, "Misc feats with comments:" },
- { IsRemovableMobileElement, ShouldRemoveMobileElement, "Optional Mobile Element" }
-};
-
-typedef enum {
- RemovableExon = 0,
- RemovableIntron,
- Removable5UTR,
- Removable3UTR,
- RemovableCDS,
- RemovablePromoter,
- RemovableLTR,
- RemovablePrecursorRNA,
- RemovableNoncodingProductFeat,
- RemovableMobileElement,
- NumRemovableItems
-} RemovableList;
-
-typedef enum {
- DEFLINE_USE_FEATURES = 1,
- DEFLINE_COMPLETE_SEQUENCE,
- DEFLINE_COMPLETE_GENOME
-} DefLineType;
-
-typedef struct deflinefeaturerequestlist {
- RemovableItemLocalData items[NumRemovableItems];
- Boolean suppress_alt_splice_phrase;
- Boolean remove_subfeatures;
- DefLineType feature_list_type;
- Int4 misc_feat_parse_rule;
- Boolean suppress_locus_tags;
- ValNodePtr suppressed_feature_list;
-} DeflineFeatureRequestList, PNTR DeflineFeatureRequestListPtr;
-
-static void InitFeatureRequests (
- DeflineFeatureRequestListPtr feature_requests
-)
-{
- Int4 i;
- for (i=0; i < NumRemovableItems; i++)
- {
- feature_requests->items[i].keep_request = NULL;
- feature_requests->items[i].keep = FALSE;
- }
- feature_requests->suppress_alt_splice_phrase = FALSE;
- feature_requests->remove_subfeatures = FALSE;
- feature_requests->feature_list_type = DEFLINE_USE_FEATURES;
- feature_requests->misc_feat_parse_rule = 2;
- feature_requests->suppress_locus_tags = FALSE;
- feature_requests->suppressed_feature_list = NULL;
-}
-
-static Boolean RemoveCondition (
- SeqFeatPtr sfp,
- FeatureClausePtr parent_fcp,
- FeatureClausePtr this_fcp,
- BioseqPtr bsp,
- Boolean isLonely,
- Boolean isSegment,
- DeflineFeatureRequestList *feature_requests
-)
-{
- Int4 i;
- if (sfp == NULL) return TRUE;
- for (i=0; i < NumRemovableItems; i++)
- {
- if (remove_items[i].itemmatch (sfp))
- return remove_items[i].ShouldRemove (sfp, parent_fcp, this_fcp, bsp,
- isLonely, feature_requests->items[i].keep,
- isSegment,
- feature_requests->suppress_locus_tags);
- }
- return ShouldRemoveGeneric(sfp, parent_fcp, this_fcp, bsp, isLonely, FALSE,
- isSegment, feature_requests->suppress_locus_tags);
-}
-
-static Boolean FindOtherGeneClause
-( ValNodePtr feature_list,
- ValNodePtr me,
- GeneRefPtr grp,
- Boolean suppress_locus_tag)
-{
- ValNodePtr vnp;
- FeatureClausePtr fcp;
-
- if (grp == NULL) return FALSE;
-
- for (vnp = feature_list; vnp != NULL; vnp = vnp->next)
- {
- if (vnp == me) continue;
- if (vnp->choice == DEFLINE_CLAUSEPLUS && vnp->data.ptrvalue != NULL)
- {
- fcp = vnp->data.ptrvalue;
- if (fcp->delete_me) continue;
- if ( fcp->grp == grp
- || (fcp->grp != NULL && DoGenesMatch (fcp->grp, grp, suppress_locus_tag)))
- {
- return TRUE;
- }
- if ( FindOtherGeneClause (fcp->featlist, me, grp, suppress_locus_tag))
- {
- return TRUE;
- }
- }
- }
- return FALSE;
-}
-
-static void RemoveGenesMentionedElsewhere
-( ValNodePtr PNTR feature_list,
- ValNodePtr search_list,
- Boolean delete_now,
- Boolean suppress_locus_tag)
-{
- ValNodePtr vnp;
- FeatureClausePtr fcp;
-
- for (vnp = *feature_list; vnp != NULL; vnp = vnp->next)
- {
- if (vnp->choice == DEFLINE_CLAUSEPLUS && vnp->data.ptrvalue != NULL)
- {
- fcp = vnp->data.ptrvalue;
- if (fcp->featlist == NULL)
- {
- continue;
- }
- if ( IsGene (fcp->featlist->data.ptrvalue)
- && fcp->featlist->next == NULL
- && FindOtherGeneClause ( search_list, vnp, fcp->grp, suppress_locus_tag))
- {
- fcp->delete_me = TRUE;
- }
- else
- {
- RemoveGenesMentionedElsewhere ( &(fcp->featlist), search_list, FALSE, suppress_locus_tag);
- }
- }
- }
- if (delete_now)
- {
- DeleteFeatureClauses (feature_list);
- }
-}
-
-static void MarkUnwantedFeatureClauseForRemoval (
- ValNodePtr clause,
- BioseqPtr bsp,
- Boolean isLonely,
- FeatureClausePtr parent_fcp,
- Boolean isSegment,
- DeflineFeatureRequestList PNTR feature_requests
-)
-{
- FeatureClausePtr fcp;
- ValNodePtr featlist;
- ValNodePtr firstfeat;
- Int4 clause_count;
- SeqFeatPtr sfp;
-
- if (clause == NULL
- || clause->choice != DEFLINE_CLAUSEPLUS
- || clause->data.ptrvalue == NULL)
- {
- return;
- }
-
- fcp = clause->data.ptrvalue;
- firstfeat = fcp->featlist;
- clause_count = 0;
- for (featlist = firstfeat;
- featlist != NULL && isLonely;
- featlist = featlist->next)
- {
- if (featlist->choice == DEFLINE_CLAUSEPLUS)
- {
- clause_count ++;
- if (clause_count > 1)
- {
- isLonely = FALSE;
- }
- }
- }
-
- featlist = firstfeat;
- while (featlist != NULL)
- {
- if (featlist->choice == DEFLINE_FEATLIST
- && featlist->data.ptrvalue != NULL)
- {
- sfp = (SeqFeatPtr) featlist->data.ptrvalue;
- if (RemoveCondition (featlist->data.ptrvalue, parent_fcp, fcp, bsp,
- isLonely, isSegment, feature_requests))
- {
- fcp->delete_me = TRUE;
- }
- else if (! IsGene (sfp) && ! IsmRNA (sfp))
- {
- isLonely = FALSE;
- }
- }
- else if (featlist->choice == DEFLINE_CLAUSEPLUS
- && featlist->data.ptrvalue != NULL)
- {
- MarkUnwantedFeatureClauseForRemoval (featlist, bsp, isLonely, fcp,
- isSegment,
- feature_requests);
- }
- featlist = featlist->next;
- }
-}
-
-static void RemoveUnwantedFeatures (
- ValNodePtr PNTR list,
- BioseqPtr bsp,
- Boolean isSegment,
- DeflineFeatureRequestList PNTR feature_requests
-)
-{
- ValNodePtr vnp;
- Boolean isLonely;
-
- if (list == NULL) return;
-
- isLonely = TRUE;
-
- for (vnp = *list; vnp != NULL; vnp = vnp->next)
- {
- if (vnp->next != NULL) isLonely = FALSE;
- if (vnp->choice == DEFLINE_CLAUSEPLUS)
- {
- MarkUnwantedFeatureClauseForRemoval (vnp, bsp, isLonely, NULL,
- isSegment, feature_requests);
- }
- }
- DeleteFeatureClauses (list);
-}
-
-static Boolean IsFeatureInSelectionList (SeqFeatPtr sfp, ValNodePtr feat_list)
-{
- ValNodePtr vnp;
-
- if (sfp == NULL || feat_list == NULL)
- {
- return FALSE;
- }
-
- for (vnp = feat_list; vnp != NULL && sfp->idx.subtype != vnp->choice; vnp = vnp->next)
- {
- }
- if (vnp == NULL)
- {
- return FALSE;
- }
- else
- {
- return TRUE;
- }
-}
-
-static void MarkSuppressedFeatureClauseForRemoval (
- ValNodePtr clause,
- ValNodePtr suppressed_feature_list
-)
-{
- FeatureClausePtr fcp;
- ValNodePtr featlist;
- ValNodePtr firstfeat;
- SeqFeatPtr sfp;
-
- if (clause == NULL
- || clause->choice != DEFLINE_CLAUSEPLUS
- || clause->data.ptrvalue == NULL)
- {
- return;
- }
-
- fcp = clause->data.ptrvalue;
- firstfeat = fcp->featlist;
-
- featlist = firstfeat;
- while (featlist != NULL)
- {
- if (featlist->choice == DEFLINE_FEATLIST
- && featlist->data.ptrvalue != NULL)
- {
- sfp = (SeqFeatPtr) featlist->data.ptrvalue;
- if (IsFeatureInSelectionList (sfp, suppressed_feature_list))
- {
- fcp->delete_me = TRUE;
- }
- }
- else if (featlist->choice == DEFLINE_CLAUSEPLUS
- && featlist->data.ptrvalue != NULL)
- {
- MarkSuppressedFeatureClauseForRemoval (featlist, suppressed_feature_list);
- }
- featlist = featlist->next;
- }
-}
-
-static void RemoveSuppressedFeatures (ValNodePtr PNTR list,
- ValNodePtr suppressed_feature_list)
-{
- ValNodePtr vnp;
-
- if (list == NULL || *list == NULL || suppressed_feature_list == NULL)
- {
- return;
- }
-
- for (vnp = *list; vnp != NULL; vnp = vnp->next)
- {
- if (vnp->choice == DEFLINE_CLAUSEPLUS)
- {
- MarkSuppressedFeatureClauseForRemoval (vnp, suppressed_feature_list);
- }
- }
- DeleteFeatureClauses (list);
-}
-
-static Boolean LIBCALLBACK IsMasterClause (
- SeqFeatPtr sfp
-)
-{
- if ( IsMobileElement (sfp)) return TRUE;
- return FALSE;
-}
-
-static void DeleteSubfeatures (
- ValNodePtr PNTR feature_list,
- Boolean delete_now
-)
-{
- ValNodePtr clause, featlist;
- FeatureClausePtr clause_fcp, fcp;
-
- if (feature_list == NULL) return;
- for (clause = *feature_list; clause != NULL; clause = clause->next)
- {
- if (clause->choice != DEFLINE_CLAUSEPLUS
- || (clause_fcp = clause->data.ptrvalue) == NULL
- || clause_fcp->featlist == NULL)
- {
- continue;
- }
- if (clause_fcp->featlist->choice == DEFLINE_FEATLIST
- && IsMasterClause (clause_fcp->featlist->data.ptrvalue))
- {
- for (featlist = clause_fcp->featlist->next;
- featlist != NULL;
- featlist = featlist->next)
- {
- if (featlist->choice == DEFLINE_CLAUSEPLUS
- && (fcp = featlist->data.ptrvalue) != NULL)
- {
- fcp->delete_me = TRUE;
- }
- }
- }
- else
- {
- DeleteSubfeatures ( &(clause_fcp->featlist), FALSE);
- }
- }
- if (delete_now)
- {
- DeleteFeatureClauses (feature_list);
- }
-}
-
-static void DeleteOperonAndGeneClusterSubfeatures (
- ValNodePtr PNTR feature_list,
- Boolean delete_now
-)
-{
- ValNodePtr clause, featlist;
- FeatureClausePtr clause_fcp, fcp;
-
- if (feature_list == NULL) return;
- for (clause = *feature_list; clause != NULL; clause = clause->next)
- {
- if (clause->choice != DEFLINE_CLAUSEPLUS
- || (clause_fcp = clause->data.ptrvalue) == NULL
- || clause_fcp->featlist == NULL)
- {
- continue;
- }
- if (clause_fcp->featlist->choice == DEFLINE_FEATLIST
- && (IsOperon (clause_fcp->featlist->data.ptrvalue)
- || IsGeneCluster (clause_fcp->featlist->data.ptrvalue)))
- {
- for (featlist = clause_fcp->featlist->next;
- featlist != NULL;
- featlist = featlist->next)
- {
- if (featlist->choice == DEFLINE_CLAUSEPLUS
- && (fcp = featlist->data.ptrvalue) != NULL)
- {
- fcp->delete_me = TRUE;
- }
- }
- }
- else
- {
- DeleteOperonAndGeneClusterSubfeatures ( &(clause_fcp->featlist), FALSE);
- }
- }
- if (delete_now)
- {
- DeleteFeatureClauses (feature_list);
- }
-}
-
-static void RemoveFeats (
- ValNodePtr list,
- matchFunction itemmatch
-)
-{
- ValNodePtr vnp;
- FeatureClausePtr fcp;
-
- if (list == NULL) return;
-
- for (vnp = list; vnp != NULL; vnp = vnp->next)
- {
- if (vnp->choice == DEFLINE_FEATLIST
- && itemmatch (vnp->data.ptrvalue))
- {
- vnp->choice = DEFLINE_REMOVEFEAT;
- }
- else if (vnp->choice == DEFLINE_CLAUSEPLUS
- && (fcp = vnp->data.ptrvalue) != NULL)
- {
- RemoveFeats (fcp->featlist, itemmatch);
- }
- }
-}
-
-/* A clause is "tall" if it has only one clause at any level */
-static Boolean IsClauseTall (
- FeatureClausePtr fcp
-)
-{
- ValNodePtr featlist;
- Int4 num_clauses;
- FeatureClausePtr subclause;
-
- num_clauses = 0;
- if (fcp == NULL) return FALSE;
- subclause = NULL;
- if (fcp->featlist == NULL) return FALSE;
- for (featlist = fcp->featlist;
- featlist != NULL;
- featlist = featlist->next)
- {
- if (featlist->choice == DEFLINE_CLAUSEPLUS)
- {
- subclause = featlist->data.ptrvalue;
- if (subclause == NULL || ! IsClauseTall (subclause))
- {
- return FALSE;
- }
- num_clauses ++;
- if (num_clauses > 1) return FALSE;
- }
- }
- if (subclause == NULL || ! subclause->feature_label_data.is_typeword_first)
- {
- return TRUE;
- }
- return FALSE;
-}
-
-static void SmashOneTallClause (
- FeatureClausePtr fcp
-)
-{
- FeatureClausePtr subclause;
- ValNodePtr featlist;
- ValNodePtr subclause_featlist;
- ValNodePtr subclause_firstclause;
- CharPtr new_description;
- Int4 new_description_len;
- SeqFeatPtr main_feat;
-
- if (fcp == NULL || fcp->featlist == NULL) return;
-
- /* move features up */
- featlist = fcp->featlist;
- if (featlist->choice == DEFLINE_FEATLIST)
- {
- main_feat = fcp->featlist->data.ptrvalue;
- }
- else
- {
- main_feat = NULL;
- }
-
- while (featlist != NULL && featlist->choice != DEFLINE_CLAUSEPLUS)
- {
- featlist = featlist->next;
- }
- if (featlist == NULL) return;
- subclause = featlist->data.ptrvalue;
- if (subclause == NULL) return;
-
- /* move subclause feats to top of list */
- if (subclause->featlist != NULL
- && subclause->featlist->choice == DEFLINE_FEATLIST)
- {
- subclause_featlist = subclause->featlist;
- while (subclause->featlist != NULL
- && subclause->featlist->next != NULL
- && subclause->featlist->next->choice == DEFLINE_FEATLIST)
- {
- subclause->featlist = subclause->featlist->next;
- }
- if (subclause->featlist != NULL)
- {
- subclause_firstclause = subclause->featlist->next;
- subclause->featlist->next = fcp->featlist;
- fcp->featlist = subclause->featlist;
- subclause->featlist = subclause_firstclause;
- }
- }
-
- /* create new description */
- new_description_len = StringLen (subclause->feature_label_data.description)
- + StringLen (fcp->feature_label_data.description)
- + StringLen (fcp->feature_label_data.typeword)
- + 4;
- new_description = (CharPtr) MemNew (new_description_len);
- if (new_description == NULL) return;
- new_description [0] = 0;
- if ( fcp->feature_label_data.is_typeword_first)
- {
- StringCat (new_description, fcp->feature_label_data.typeword);
- StringCat (new_description, " ");
- }
- StringCat (new_description, fcp->feature_label_data.description);
- if ( ! fcp->feature_label_data.is_typeword_first)
- {
- StringCat (new_description, fcp->feature_label_data.typeword);
- }
-
- if ( ! IsMobileElement (main_feat)
- && ! IsEndogenousVirusSourceFeature (main_feat))
- {
- StringCat (new_description, ",");
- }
- StringCat (new_description, " ");
- StringCat (new_description, subclause->feature_label_data.description);
-
- if (fcp->feature_label_data.description != NULL)
- {
- MemFree (fcp->feature_label_data.description);
- }
- fcp->feature_label_data.description = new_description;
-
- /* move interval up */
- if (fcp->interval != NULL)
- {
- MemFree (fcp->interval);
- }
- fcp->interval = subclause->interval;
- subclause->interval = NULL;
-
- /* move typeword up */
- fcp->feature_label_data.typeword = subclause->feature_label_data.typeword;
- fcp->feature_label_data.is_typeword_first =
- subclause->feature_label_data.is_typeword_first;
- subclause->feature_label_data.typeword = NULL;
- subclause->delete_me = TRUE;
-
-}
-
-static void SmashTallClauses (
- ValNodePtr PNTR clause_list,
- Boolean delete_now
-)
-{
- ValNodePtr clause;
- FeatureClausePtr fcp;
-
- if (clause_list == NULL) return;
- for (clause = *clause_list; clause != NULL; clause = clause->next)
- {
- if (clause->choice != DEFLINE_CLAUSEPLUS || clause->data.ptrvalue == NULL)
- {
- continue;
- }
- fcp = clause->data.ptrvalue;
- if ( IsClauseTall (fcp))
- {
- SmashOneTallClause (fcp);
- }
- else
- {
- SmashTallClauses (& (fcp->featlist), FALSE);
- }
- }
- if (delete_now)
- {
- DeleteFeatureClauses (clause_list);
- }
-}
-
-static ValNodePtr RemoveAllButLastCDS (
- ValNodePtr list,
- ValNodePtr last_cds
-)
-{
- ValNodePtr vnp;
- FeatureClausePtr fcp;
-
- /* now remove all CDSs except the last one */
- for (vnp = list; vnp != NULL; vnp = vnp->next)
- {
- if (vnp->choice == DEFLINE_FEATLIST
- && IsCDS (vnp->data.ptrvalue))
- {
- if (last_cds != NULL)
- {
- last_cds->choice = DEFLINE_REMOVEFEAT;
- }
- last_cds = vnp;
- }
- else if (vnp->choice == DEFLINE_CLAUSEPLUS
- && (fcp = vnp->data.ptrvalue) != NULL)
- {
- last_cds = RemoveAllButLastCDS (fcp->featlist, last_cds);
- }
- }
- return last_cds;
-}
-
-static Boolean OkToConsolidate (
- CharPtr last_desc,
- CharPtr new_desc,
- Boolean last_partial,
- Boolean new_partial,
- FeatureClausePtr last_fcp,
- FeatureClausePtr fcp
-)
-{
- if (StringCmp (last_desc, new_desc) != 0) return FALSE;
- if (new_partial != last_partial) return FALSE;
- if ( ( fcp->is_alt_spliced && ! last_fcp->is_alt_spliced)
- || (! fcp->is_alt_spliced && last_fcp->is_alt_spliced))
- {
- return FALSE;
- }
- if (fcp->featlist == NULL || last_fcp->featlist == NULL) return FALSE;
- if ( fcp->featlist->choice != DEFLINE_FEATLIST) return FALSE;
- if ( last_fcp->featlist->choice != DEFLINE_FEATLIST) return FALSE;
- if ( (IsCDS (fcp->featlist->data.ptrvalue)
- && ! IsCDS (last_fcp->featlist->data.ptrvalue)
- && ! IsGene (last_fcp->featlist->data.ptrvalue))
- || (! IsCDS (fcp->featlist->data.ptrvalue)
- && ! IsGene (fcp->featlist->data.ptrvalue)
- && IsCDS (last_fcp->featlist->data.ptrvalue)))
- {
- return FALSE;
- }
- if ((IsExon (fcp->featlist->data.ptrvalue) && !IsExon(last_fcp->featlist->data.ptrvalue))
- || (IsExon (last_fcp->featlist->data.ptrvalue) && !IsExon(fcp->featlist->data.ptrvalue))
- || (IsIntron (fcp->featlist->data.ptrvalue) && !IsIntron(last_fcp->featlist->data.ptrvalue))
- || (IsIntron (last_fcp->featlist->data.ptrvalue) && !IsIntron(fcp->featlist->data.ptrvalue)))
- {
- return FALSE;
- }
- return TRUE;
-}
-
-static void RemoveRedundantGeneFeatureFromConsolidatedClause (
- FeatureClausePtr fcp
-)
-{
- ValNodePtr featlist, prevfeat, tmpfeat;
- SeqFeatPtr feat1, feat2;
-
- prevfeat = NULL;
- featlist = fcp->featlist;
- while ( featlist != NULL
- && featlist->choice == DEFLINE_FEATLIST
- && featlist->next != NULL
- && featlist->next->choice == DEFLINE_FEATLIST)
- {
- feat1 = featlist->data.ptrvalue;
- feat2 = featlist->next->data.ptrvalue;
- if (feat1 == NULL || feat2 == NULL) return;
- if (IsGene (feat1) && ! IsGene (feat2))
- {
- if (prevfeat == NULL)
- {
- fcp->featlist = featlist->next;
- featlist->next = NULL;
- FreeListElement (featlist);
- featlist = fcp->featlist->next;
- }
- else
- {
- prevfeat->next = featlist->next;
- featlist->next = NULL;
- FreeListElement (featlist);
- featlist = prevfeat->next;
- }
- }
- else if ( !IsGene (feat1) && IsGene (feat2))
- {
- tmpfeat = featlist->next;
- featlist->next = tmpfeat->next;
- tmpfeat->next = NULL;
- FreeListElement (tmpfeat);
- }
- else
- {
- featlist = featlist->next;
- }
- }
-}
-
-static void PluralizeConsolidatedClauseDescription (
- FeatureClausePtr fcp
-)
-{
- CharPtr new_desc;
-
- /* prevent crash */
- if (fcp == NULL || fcp->feature_label_data.description == NULL) return;
-
- /* don't pluralize tRNA names */
- if (StringNCmp (fcp->feature_label_data.description, "tRNA-", 5) ==0) return;
-
- new_desc = MemNew (StringLen (fcp->feature_label_data.description) + 2);
- if (new_desc == NULL) return;
-
- StringCpy (new_desc, fcp->feature_label_data.description);
- StringCat (new_desc, "s");
- MemFree (fcp->feature_label_data.description);
- fcp->feature_label_data.description = new_desc;
-}
-
-static void ConsolidateClauses (
- ValNodePtr PNTR list,
- BioseqPtr bsp,
- Uint1 biomol,
- Boolean delete_now,
- Boolean suppress_locus_tag)
-{
- ValNodePtr vnp;
- FeatureClausePtr fcp;
- FeatureClausePtr last_cds_fcp;
- CharPtr last_desc, new_desc;
- Boolean last_partial, new_partial, partial3, partial5;
-
- if (list == NULL || *list == NULL) return;
- last_cds_fcp = NULL;
- last_desc = NULL;
- for (vnp = *list; vnp != NULL; vnp = vnp->next)
- {
- if (vnp->choice != DEFLINE_CLAUSEPLUS
- || (fcp = vnp->data.ptrvalue) == NULL
- || fcp->featlist == NULL
- || fcp->featlist->choice != DEFLINE_FEATLIST)
- {
- continue;
- }
-
- ConsolidateClauses (&(fcp->featlist), bsp, biomol, FALSE, suppress_locus_tag);
-
- if (last_cds_fcp == NULL)
- {
- last_cds_fcp = fcp;
- if (fcp->feature_label_data.description == NULL)
- {
- last_desc = GetGeneProtDescription (fcp, bsp, suppress_locus_tag);
- }
- else
- {
- last_desc = StringSave (fcp->feature_label_data.description);
- }
- CheckSeqLocForPartial (fcp->slp, &partial5, &partial3);
- if (partial5 || partial3)
- {
- last_partial = TRUE;
- }
- else
- {
- last_partial = FALSE;
- }
- }
- else
- {
- if (fcp->feature_label_data.description == NULL)
- {
- new_desc = GetGeneProtDescription (fcp, bsp, suppress_locus_tag);
- }
- else
- {
- new_desc = StringSave (fcp->feature_label_data.description);
- }
- CheckSeqLocForPartial (fcp->slp, &partial5, &partial3);
- if (partial5 || partial3)
- {
- new_partial = TRUE;
- }
- else
- {
- new_partial = FALSE;
- }
- if ( OkToConsolidate (last_desc, new_desc,
- last_partial, new_partial,
- last_cds_fcp, fcp))
- {
- /* two clauses have identical descriptions - combine them */
- MoveSubclauses (last_cds_fcp, fcp);
- RemoveRedundantGeneFeatureFromConsolidatedClause (last_cds_fcp);
- fcp->featlist = NULL;
- fcp->delete_me = TRUE;
- last_cds_fcp->slp = SeqLocMerge (bsp, last_cds_fcp->slp, fcp->slp,
- FALSE, TRUE, FALSE);
- /* if we have two clauses that are really identical instead of
- * just sharing a "prefix", make the description plural
- */
- if (StringCmp (last_cds_fcp->interval, fcp->interval) == 0)
- {
- last_cds_fcp->make_plural = TRUE;
-/* PluralizeConsolidatedClauseDescription (last_cds_fcp); */
- }
-
- /* Recalculate the interval */
- if (last_cds_fcp->interval != NULL)
- {
- MemFree (last_cds_fcp->interval);
- }
- last_cds_fcp->interval =
- GetGenericInterval (last_cds_fcp, biomol, bsp, suppress_locus_tag);
- MemFree (new_desc);
- }
- else
- {
- MemFree (last_desc);
- last_desc = new_desc;
- last_cds_fcp = fcp;
- last_partial = new_partial;
- }
- }
- }
- if (delete_now)
- {
- DeleteFeatureClauses (list);
- }
-}
-
-static void CountUnknownGenes (
- ValNodePtr PNTR clause_list,
- BioseqPtr bsp,
- Boolean suppress_locus_tag)
-{
- FeatureClausePtr fcp, new_fcp;
- ValNodePtr vnp, new_vnp;
- CharPtr gene_name;
- Int4 num_unknown_genes;
-
- num_unknown_genes = 0;
- vnp = *clause_list;
- new_vnp = NULL;
- new_fcp = NULL;
- while (vnp != NULL)
- {
- if (vnp->choice == DEFLINE_CLAUSEPLUS
- && (fcp = vnp->data.ptrvalue) != NULL
- && ! fcp->is_unknown)
- {
- CountUnknownGenes (&(fcp->featlist), bsp, suppress_locus_tag);
- gene_name = GetGeneProtDescription (fcp, bsp, suppress_locus_tag);
- if (StringCmp (gene_name, "unknown") == 0
- && fcp->featlist != NULL
- && fcp->featlist->choice == DEFLINE_FEATLIST)
- {
- if (new_fcp == NULL)
- {
- new_vnp = ValNodeNew (*clause_list);
- if (new_vnp == NULL) return;
- new_fcp = NewFeatureClause (fcp->featlist->data.ptrvalue,
- bsp, suppress_locus_tag);
- new_fcp->is_unknown = TRUE;
- new_vnp->choice = DEFLINE_CLAUSEPLUS;
- new_vnp->data.ptrvalue = new_fcp;
- }
- else
- {
- new_vnp = ValNodeNew (new_fcp->featlist);
- if (new_vnp == NULL) return;
- new_vnp->choice = DEFLINE_FEATLIST;
- new_vnp->data.ptrvalue = fcp->featlist->data.ptrvalue;
- }
- num_unknown_genes ++;
- fcp->delete_me = TRUE;
- }
- }
- vnp = vnp->next;
- }
-
- if (num_unknown_genes > 0)
- {
- DeleteFeatureClauses (clause_list);
- if (num_unknown_genes > 1)
- {
- new_fcp->feature_label_data.typeword = StringSave ("genes");
- }
- }
-}
-
-static void ReplaceDefinitionLine (
- SeqEntryPtr sep,
- CharPtr defline
-)
-{
- ValNodePtr ttl;
- if (sep == NULL || defline == NULL) return;
-
- ttl = SeqEntryGetSeqDescr (sep, Seq_descr_title, NULL);
- if (ttl == NULL)
- ttl = CreateNewDescriptor (sep, Seq_descr_title);
- if (ttl != NULL) {
- MemFree (ttl->data.ptrvalue);
- ttl->data.ptrvalue = defline;
- defline = NULL;
- }
- MemFree (defline);
-}
-
-FeatureClausePtr NewFeatureClause
-( SeqFeatPtr sfp,
- BioseqPtr bsp,
- Boolean suppress_locus_tag)
-{
- FeatureClausePtr fcp;
- Boolean partial5, partial3;
-
- fcp = (FeatureClausePtr) MemNew (sizeof (FeatureClauseData));
- if (fcp == NULL) return NULL;
-
- fcp->feature_label_data.typeword = NULL;
- fcp->feature_label_data.description = NULL;
- fcp->feature_label_data.productname = NULL;
- fcp->feature_label_data.pluralizable = FALSE;
- fcp->feature_label_data.is_typeword_first = FALSE;
- fcp->allelename = NULL;
- fcp->interval = NULL;
- fcp->featlist = NULL;
- fcp->delete_me = FALSE;
- fcp->clause_info_only = FALSE;
- fcp->make_plural = FALSE;
- fcp->is_unknown = FALSE;
- fcp->grp = NULL;
- if (sfp == NULL) return fcp;
- CheckSeqLocForPartial (sfp->location, &partial5, &partial3);
- fcp->slp = SeqLocMerge (bsp, sfp->location, NULL,
- FALSE, TRUE, FALSE);
- SetSeqLocPartial (fcp->slp, partial5, partial3);
-
- if (sfp->data.choice == SEQFEAT_GENE)
- {
- fcp->grp = sfp->data.value.ptrvalue;
- }
- else
- {
- fcp->grp = SeqMgrGetGeneXref (sfp);
- }
- if (( IsCDS (sfp) || IsExon (sfp) || IsNoncodingProductFeat (sfp))
- && StringStr (sfp->comment, "alternatively spliced") != NULL)
- {
- fcp->is_alt_spliced = TRUE;
- }
- else
- {
- fcp->is_alt_spliced = FALSE;
- }
- if (IsCDS (sfp))
- {
- fcp->feature_label_data.productname = GetProductName (sfp, bsp, suppress_locus_tag);
- }
- fcp->featlist = ValNodeNew (NULL);
- if (fcp->featlist == NULL)
- {
- MemFree (fcp);
- return NULL;
- }
-
- fcp->featlist->data.ptrvalue = sfp;
- fcp->featlist->choice = DEFLINE_FEATLIST;
-
- return fcp;
-}
-
-static ValNodePtr GetFeatureList (BioseqPtr bsp, Boolean suppress_locus_tag)
-{
- ValNodePtr head, vnp;
- SeqFeatPtr sfp;
- FeatureClausePtr fcp;
- SeqMgrFeatContext fcontext;
-
- if (bsp == NULL) return NULL;
-
- /* get list of all recognized features */
- head = NULL;
- sfp = SeqMgrGetNextFeature (bsp, NULL, 0, 0, &fcontext);
- while (sfp != NULL)
- {
- if (IsRecognizedFeature (sfp))
- {
- fcp = NewFeatureClause (sfp, bsp, suppress_locus_tag);
- if (fcp == NULL) return NULL;
- fcp->numivals = fcontext.numivals;
- fcp->ivals = fcontext.ivals;
- vnp = ValNodeNew (head);
- if (head == NULL) head = vnp;
- if (vnp == NULL) return NULL;
- vnp->data.ptrvalue = fcp;
- vnp->choice = DEFLINE_CLAUSEPLUS;
- }
- sfp = SeqMgrGetNextFeature (bsp, sfp, 0, 0, &fcontext);
- }
- return head;
-}
-
-static void ExtractSegmentClauses (
- ValNodePtr segment_features,
- ValNodePtr parent_features,
- ValNodePtr PNTR segment_clauses
-);
-
-static Boolean FeatureIsOnSegment (
- SeqFeatPtr sfp,
- ValNodePtr segment_features
-)
-{
- ValNodePtr vnp, featclause;
- FeatureClausePtr fcp;
-
- for (vnp = segment_features; vnp != NULL; vnp = vnp->next)
- {
- fcp = vnp->data.ptrvalue;
- if (fcp != NULL)
- {
- for (featclause = fcp->featlist;
- featclause != NULL;
- featclause = featclause->next)
- {
- if (featclause->data.ptrvalue == sfp) return TRUE;
- }
- }
- }
- return FALSE;
-}
-
-static Boolean FeatureClauseIsOnSegment (
- FeatureClausePtr fcp,
- ValNodePtr segment_features
-)
-{
- ValNodePtr vnp;
-
- if (fcp == NULL || fcp->featlist == NULL) return FALSE;
- for (vnp = fcp->featlist; vnp != NULL; vnp = vnp->next)
- {
- if (vnp->choice == DEFLINE_FEATLIST
- && FeatureIsOnSegment (vnp->data.ptrvalue, segment_features))
- {
- return TRUE;
- }
- else if (vnp->choice == DEFLINE_CLAUSEPLUS)
- {
- if (FeatureClauseIsOnSegment (vnp->data.ptrvalue, segment_features))
- {
- return TRUE;
- }
- }
- }
- return FALSE;
-}
-
-static FeatureClausePtr CopyMatchingClauses (
- FeatureClausePtr fcp,
- ValNodePtr segment_features
-)
-{
- FeatureClausePtr new_fcp, copy_clause;
- ValNodePtr featlist, new_feat;
- Boolean found_feat_on_segment;
- Boolean partial5, partial3;
-
- new_fcp = (FeatureClausePtr) MemNew (sizeof (FeatureClauseData));
- if (new_fcp == NULL) return NULL;
- new_fcp->feature_label_data.pluralizable =
- fcp->feature_label_data.pluralizable;
- new_fcp->feature_label_data.is_typeword_first =
- fcp->feature_label_data.is_typeword_first;
- new_fcp->feature_label_data.typeword =
- StringSave (fcp->feature_label_data.typeword);
- new_fcp->feature_label_data.description =
- StringSave (fcp->feature_label_data.description);
- new_fcp->feature_label_data.productname =
- StringSave (fcp->feature_label_data.productname);
- new_fcp->allelename = StringSave (fcp->allelename);
- new_fcp->interval = StringSave (fcp->interval);
- new_fcp->is_alt_spliced = fcp->is_alt_spliced;
- CheckSeqLocForPartial (fcp->slp, &partial5, &partial3);
- new_fcp->slp = (SeqLocPtr) AsnIoMemCopy (fcp->slp, (AsnReadFunc) SeqLocAsnRead,
- (AsnWriteFunc) SeqLocAsnWrite);
- SetSeqLocPartial (new_fcp->slp, partial5, partial3);
- new_fcp->grp = fcp->grp;
- new_fcp->has_mrna = fcp->has_mrna;
- new_fcp->delete_me = FALSE;
- new_fcp->clause_info_only = fcp->clause_info_only;
- new_fcp->featlist = NULL;
- found_feat_on_segment = FALSE;
- for (featlist = fcp->featlist; featlist != NULL; featlist = featlist->next)
- {
- new_feat = NULL;
- if (featlist->choice == DEFLINE_FEATLIST)
- {
- new_feat = ValNodeNew (new_fcp->featlist);
- if (new_feat == NULL) return NULL;
- new_feat->data.ptrvalue = featlist->data.ptrvalue;
- new_feat->choice = DEFLINE_FEATLIST;
-
- /* some portions of the clause are present for product and gene info */
- /* if they aren't actually on the segment */
- if ( segment_features == NULL
- || FeatureIsOnSegment (new_feat->data.ptrvalue, segment_features))
- {
- found_feat_on_segment = TRUE;
- }
- }
- else if (featlist->choice == DEFLINE_CLAUSEPLUS)
- {
- copy_clause = featlist->data.ptrvalue;
- if ( segment_features == NULL
- || FeatureClauseIsOnSegment ( copy_clause, segment_features))
- {
- new_feat = ValNodeNew (new_fcp->featlist);
- if (new_feat == NULL) return NULL;
- new_feat->data.ptrvalue = CopyMatchingClauses ( copy_clause,
- segment_features);
- new_feat->choice = DEFLINE_CLAUSEPLUS;
- }
- }
- if (new_feat != NULL && new_fcp->featlist == NULL)
- {
- new_fcp->featlist = new_feat;
- }
- }
- if (found_feat_on_segment)
- {
- new_fcp->clause_info_only = FALSE;
- }
- else
- {
- new_fcp->clause_info_only = TRUE;
- }
- return new_fcp;
-}
-
-static void CopyFeatureList (
- ValNodePtr match_features,
- ValNodePtr parent_features,
- ValNodePtr PNTR new_list
-)
-{
- ValNodePtr vnp, addvnp;
-
- for (vnp = parent_features;
- vnp != NULL;
- vnp = vnp->next)
- {
- if (vnp->choice == DEFLINE_FEATLIST
- && (match_features == NULL
- || FeatureIsOnSegment ( vnp->data.ptrvalue, match_features)))
- {
- addvnp = ValNodeNew (*new_list);
- if (addvnp == NULL) return;
- addvnp->data.ptrvalue = vnp->data.ptrvalue;
- addvnp->choice = DEFLINE_FEATLIST;
- if (*new_list == NULL) *new_list = addvnp;
- }
- else if (vnp->choice == DEFLINE_CLAUSEPLUS
- && (match_features == NULL
- || FeatureClauseIsOnSegment ( vnp->data.ptrvalue, match_features)))
- {
- addvnp = ValNodeNew (*new_list);
- if (addvnp == NULL) return;
- addvnp->data.ptrvalue = CopyMatchingClauses ( vnp->data.ptrvalue,
- match_features);
- addvnp->choice = DEFLINE_CLAUSEPLUS;
- if (*new_list == NULL) *new_list = addvnp;
- }
- }
-
-}
-
-static void ExtractSegmentClauses (
- ValNodePtr segment_features,
- ValNodePtr parent_features,
- ValNodePtr PNTR segment_clauses
-)
-{
- CopyFeatureList (segment_features, parent_features, segment_clauses);
-}
-
-typedef struct segmentdeflinedata {
- BioseqPtr parent_bsp;
- ValNodePtr parent_feature_list;
- Uint1 molecule_type;
- DeflineFeatureRequestList PNTR feature_requests;
- ModifierCombinationPtr m;
- ModifierItemLocalPtr modList;
- OrganismDescriptionModifiersPtr odmp;
- Int2 product_flag;
-} SegmentDefLineData, PNTR SegmentDefLinePtr;
-
-typedef struct segmentdeflinefeatureclausedata {
- BioseqPtr parent_bsp;
- ValNodePtr parent_feature_list;
- Uint1 molecule_type;
- DeflineFeatureRequestList PNTR feature_requests;
- Int2 product_flag;
- Boolean alternate_splice_flag;
- Boolean gene_cluster_opp_strand;
- ValNodePtr PNTR list;
-} SegmentDefLineFeatureClauseData, PNTR SegmentDefLineFeatureClausePtr;
-
-typedef struct deflinefeatclause {
- SeqEntryPtr sep;
- BioseqPtr bsp;
- CharPtr clauselist;
-} DefLineFeatClauseData, PNTR DefLineFeatClausePtr;
-
-static void DefLineFeatClauseListFree (ValNodePtr vnp)
-{
- DefLineFeatClausePtr deflist;
-
- if (vnp == NULL) return;
- DefLineFeatClauseListFree (vnp->next);
- vnp->next = NULL;
- deflist = vnp->data.ptrvalue;
- if (deflist != NULL)
- {
- MemFree (deflist->clauselist);
- MemFree (deflist);
- }
- ValNodeFree (vnp);
-}
-
-
-static Boolean IntervalIntersectsIvals
-(Int2 numivals,
- Int4Ptr ivals,
- SeqMgrSegmentContextPtr context)
-{
- Int2 idx;
- Int4 start, stop;
-
- if (numivals == 0 || ivals == NULL || context == NULL) return FALSE;
-
- for (idx = 0; idx < numivals; idx ++) {
- start = ivals [idx * 2];
- stop = ivals [idx * 2 + 1];
- if ( start <= context->cumOffset + context->to - context->from
- && stop >= context->cumOffset)
- {
- return TRUE;
- }
- }
- return FALSE;
-}
-
-
-/* if there are no features at all on this segment, select the genes that
- * traverse the segment.
- */
-static ValNodePtr GrabTraversingGenes
-(ValNodePtr parent_feature_list,
- SeqMgrSegmentContextPtr context,
- BioseqPtr parent_bsp,
- Boolean suppress_locus_tag)
-{
- FeatureClausePtr fcp, new_fcp;
- ValNodePtr clause;
- SeqFeatPtr sfp;
- ValNodePtr segment_feature_list;
- ValNodePtr vnp;
-
- segment_feature_list = NULL;
- for (clause = parent_feature_list;
- clause != NULL;
- clause = clause->next)
- {
- fcp = clause->data.ptrvalue;
-
- if (fcp != NULL && fcp->featlist != NULL
- && (sfp = fcp->featlist->data.ptrvalue) != NULL
- && sfp->idx.subtype == FEATDEF_GENE
- && fcp->ivals != NULL && fcp->numivals > 0)
- {
- if (IntervalIntersectsIvals (fcp->numivals, fcp->ivals, context)) {
- new_fcp = NewFeatureClause (fcp->featlist->data.ptrvalue, parent_bsp,
- suppress_locus_tag);
- if (new_fcp == NULL) return FALSE;
- vnp = ValNodeNew (segment_feature_list);
- if (vnp == NULL) return FALSE;
- vnp->data.ptrvalue = new_fcp;
- vnp->choice = DEFLINE_CLAUSEPLUS;
- if (segment_feature_list == NULL) segment_feature_list = vnp;
- }
- }
- }
- return segment_feature_list;
-}
-
-
-static CharPtr BuildFeatureClauses (
- BioseqPtr bsp,
- Uint1 molecule_type,
- SeqEntryPtr sep,
- ValNodePtr PNTR feature_list,
- Boolean isSegment,
- ValNodePtr PNTR seg_feature_list,
- Int2 product_flag,
- Boolean alternate_splice_flag,
- Boolean gene_cluster_opp_strand,
- DeflineFeatureRequestList PNTR feature_requests
-);
-
-static Boolean LIBCALLBACK GetFeatureClauseForSeg (
- SeqLocPtr slp,
- SeqMgrSegmentContextPtr context)
-{
- SegmentDefLineFeatureClausePtr sdlp;
- ValNodePtr clause, tmp_parent_list;
- FeatureClausePtr fcp, new_fcp;
- Int2 idx;
- Int4 start, stop;
- ValNodePtr segment_feature_list, vnp;
- SeqIdPtr sip;
- BioseqPtr bsp;
- Uint2 entityID;
- SeqLocPtr loc;
- DefLineFeatClausePtr deflist;
-
- if (slp == NULL || context == NULL) return FALSE;
- sdlp = (SegmentDefLineFeatureClausePtr) context->userdata;
-
- sip = SeqLocId (slp);
-
- if (sip == NULL) {
- loc = SeqLocFindNext (slp, NULL);
- if (loc != NULL) {
- sip = SeqLocId (loc);
- }
- }
- if (sip == NULL) return TRUE;
-
- bsp = BioseqFind (sip);
-
- if (bsp == NULL) return TRUE;
-
-
- segment_feature_list = NULL;
- for (clause = sdlp->parent_feature_list;
- clause != NULL;
- clause = clause->next)
- {
- fcp = clause->data.ptrvalue;
-
- if (fcp != NULL && fcp->ivals != NULL && fcp->numivals > 0)
- {
- idx = (fcp->numivals - 1) * 2;
- start = fcp->ivals [idx];
- stop = fcp->ivals [idx + 1];
- if ( stop <= context->cumOffset + context->to - context->from
- && stop >= context->cumOffset)
- {
- new_fcp = NewFeatureClause (fcp->featlist->data.ptrvalue,
- sdlp->parent_bsp,
- sdlp->feature_requests->suppress_locus_tags);
- if (new_fcp == NULL) return FALSE;
- vnp = ValNodeNew (segment_feature_list);
- if (vnp == NULL) return FALSE;
- vnp->data.ptrvalue = new_fcp;
- vnp->choice = DEFLINE_CLAUSEPLUS;
- if (segment_feature_list == NULL) segment_feature_list = vnp;
- }
- }
- }
-
- if (segment_feature_list == NULL) {
- segment_feature_list = GrabTraversingGenes (sdlp->parent_feature_list,
- context, sdlp->parent_bsp,
- sdlp->feature_requests->suppress_locus_tags);
- }
-
- entityID = ObjMgrGetEntityIDForPointer (bsp);
-
- tmp_parent_list = NULL;
- CopyFeatureList (NULL, sdlp->parent_feature_list, &tmp_parent_list);
-
- deflist = (DefLineFeatClausePtr) MemNew (sizeof (DefLineFeatClauseData));
- if (deflist == NULL) return TRUE;
- deflist->sep = SeqMgrGetSeqEntryForData (bsp);
- deflist->bsp = bsp;
- deflist->clauselist = BuildFeatureClauses (sdlp->parent_bsp,
- sdlp->molecule_type,
- SeqMgrGetSeqEntryForData (bsp),
- &tmp_parent_list,
- TRUE,
- &segment_feature_list,
- sdlp->product_flag,
- sdlp->alternate_splice_flag,
- sdlp->gene_cluster_opp_strand,
- sdlp->feature_requests);
- vnp = ValNodeNew (*(sdlp->list));
- if (vnp == NULL) return TRUE;
- if (*(sdlp->list) == NULL) *(sdlp->list) = vnp;
- vnp->data.ptrvalue = deflist;
-
- FreeListElement (tmp_parent_list);
- FreeListElement (segment_feature_list);
- DeleteMarkedObjects (entityID, 0, NULL);
- return TRUE;
-}
-
-static void ShowFeatureList (ValNodePtr feature_list, FILE *fp, CharPtr title)
-{
- Boolean show_file = FALSE;
- Char path[PATH_MAX];
- SeqFeatPtr sfp;
- FeatureClausePtr fcp;
- SeqMgrFeatContext context;
-
- if (fp == NULL)
- {
- TmpNam (path);
- fp = FileOpen (path, "wb");
- show_file = TRUE;
- }
- while (feature_list != NULL)
- {
- if (feature_list->choice == DEFLINE_CLAUSEPLUS)
- {
- fcp = (FeatureClausePtr) feature_list->data.ptrvalue;
- if (fcp == NULL)
- {
- fprintf (fp, "Empty clause\n");
- }
- else
- {
- fprintf (fp, "Clause\n");
- if (fcp->has_mrna)
- {
- fprintf (fp, "Has mRNA\n");
- }
- if (fcp->slp == NULL)
- {
- fprintf (fp, "Has empty location\n");
- }
- ShowFeatureList (fcp->featlist, fp, title);
- fprintf (fp, "End Clause\n");
- }
- }
- else if (feature_list->choice == DEFLINE_FEATLIST)
- {
- sfp = (feature_list->data.ptrvalue);
- sfp = SeqMgrGetDesiredFeature (sfp->idx.entityID, NULL, 0, 0, sfp, &context);
- fprintf (fp, "%d:%s\n", sfp->idx.subtype, context.label);
- }
-
- feature_list = feature_list->next;
- }
- if (show_file)
- {
- FileClose (fp);
- LaunchGeneralTextViewer (path, title);
- FileRemove (path);
- }
-}
-
-static Boolean HasAnyPromoters (BioseqPtr bsp)
-{
- SeqFeatPtr sfp;
- SeqMgrFeatContext fcontext;
-
- sfp = SeqMgrGetNextFeature (bsp, NULL, 0, FEATDEF_promoter, &fcontext);
- if (sfp == NULL) {
- return FALSE;
- } else {
- return TRUE;
- }
-}
-
-static void AddFakePromoterClause (ValNodePtr PNTR feature_list, BioseqPtr bsp, Boolean suppress_locus_tag)
-{
- FeatureClausePtr fcp;
- SeqFeatPtr sfp = NULL;
-
- /* create fake promoter */
- sfp = CreateNewFeature (SeqMgrGetSeqEntryForData (bsp), NULL,
- SEQFEAT_IMP, NULL);
-
- sfp->location = SeqLocIntNew (0, bsp->length - 1, Seq_strand_plus, SeqIdDup (bsp->id));
- sfp->data.choice = SEQFEAT_IMP;
- sfp->idx.subtype = FEATDEF_promoter;
- /* mark promoter for deletion */
- sfp->idx.deleteme = TRUE;
-
- fcp = NewFeatureClause (sfp, bsp, suppress_locus_tag);
- if (fcp == NULL) return;
- fcp->numivals = 1;
- fcp->ivals = (Int4Ptr) MemNew (sizeof (Int4) * 2);
- fcp->ivals[0] = 0;
- fcp->ivals[1] = bsp->length - 1;
- ValNodeAddPointer (feature_list, DEFLINE_CLAUSEPLUS, fcp);
-
-}
-
-static Boolean IsInGenProdSet (BioseqPtr bsp)
-{
- BioseqSetPtr bssp;
- if (bsp == NULL || bsp->idx.parentptr == NULL || bsp->idx.parenttype != OBJ_BIOSEQSET) {
- return FALSE;
- }
- bssp = (BioseqSetPtr) bsp->idx.parentptr;
- if (bssp->_class != BioseqseqSet_class_nuc_prot || bssp->idx.parentptr == NULL || bsp->idx.parenttype != OBJ_BIOSEQSET) {
- return FALSE;
- }
- bssp = bssp->idx.parentptr;
- if (bssp->_class == BioseqseqSet_class_gen_prod_set) {
- return TRUE;
- } else {
- return FALSE;
- }
-}
-
-/* NOTE: under some circumstances this function will create features that
- * are marked for deletion, so DeleteMarkedObjects should always be called
- * at some later point.
- */
-static CharPtr BuildFeatureClauses (
- BioseqPtr bsp,
- Uint1 molecule_type,
- SeqEntryPtr sep,
- ValNodePtr PNTR feature_list,
- Boolean isSegment,
- ValNodePtr PNTR seg_feature_list,
- Int2 product_flag,
- Boolean alternate_splice_flag,
- Boolean gene_cluster_opp_strand,
- DeflineFeatureRequestList PNTR feature_requests
-)
-{
- ValNodePtr strings = NULL;
- ValNodePtr clause;
- CharPtr str = NULL;
- Char ending_str [200];
- ValNodePtr tmp_feat_list;
- BioSourcePtr biop;
-
- if ((feature_requests->feature_list_type == DEFLINE_USE_FEATURES
- || (IsmRNASequence(bsp) && IsInGenProdSet(bsp)))
- && (! isSegment || (seg_feature_list != NULL && *seg_feature_list != NULL)))
- {
- /* remove features that indexer has chosen to suppress before they are grouped
- * with other features or used to determine loneliness etc.
- */
- RemoveSuppressedFeatures (feature_list, feature_requests->suppressed_feature_list);
-
- GroupmRNAs (feature_list, bsp, feature_requests->suppress_locus_tags);
-
- /* genes are added to other clauses */
- GroupGenes (feature_list, feature_requests->suppress_locus_tags);
-
- if (! feature_requests->suppress_alt_splice_phrase)
- {
- /* find alt-spliced CDSs */
- FindAltSplices (*feature_list, bsp, feature_requests->suppress_locus_tags);
- }
-
- GroupAltSplicedExons (feature_list, bsp, TRUE);
-
- if (!isSegment)
- {
- /* group CDSs that have the same name and are under the same gene together */
- GroupSegmentedCDSs (feature_list, bsp, TRUE, feature_requests->suppress_locus_tags);
- }
-
- /* per Susan's request, if promoters are requested and no promoters are found, add a promoter */
- if (feature_requests->items[RemovablePromoter].keep && !HasAnyPromoters (bsp)) {
- AddFakePromoterClause (feature_list, bsp, feature_requests->suppress_locus_tags);
- }
-
- /* now group clauses */
- GroupAllClauses ( feature_list, gene_cluster_opp_strand, bsp );
-
- ExpandAltSplicedExons (*feature_list, bsp, feature_requests->suppress_locus_tags);
-
- FindGeneProducts (*feature_list, bsp, feature_requests->suppress_locus_tags);
-
- if (seg_feature_list != NULL && *seg_feature_list != NULL)
- {
- tmp_feat_list = NULL;
- ExtractSegmentClauses ( *seg_feature_list, *feature_list, &tmp_feat_list);
- FreeListElement (*feature_list);
- DeleteMarkedObjects (bsp->idx.entityID, 0, NULL);
- *feature_list = tmp_feat_list;
- }
-
- /* remove exons and other unwanted features */
- RemoveUnwantedFeatures (feature_list, bsp, isSegment, feature_requests);
-
- RemoveGenesMentionedElsewhere (feature_list, *feature_list, TRUE,
- feature_requests->suppress_locus_tags);
-
- if (feature_requests->remove_subfeatures)
- {
- DeleteSubfeatures (feature_list, TRUE);
- }
-
- DeleteOperonAndGeneClusterSubfeatures (feature_list, TRUE);
-
- CountUnknownGenes (feature_list, bsp, feature_requests->suppress_locus_tags);
-
- if (feature_requests->misc_feat_parse_rule == 1)
- {
- RenameMiscFeats (*feature_list, molecule_type);
- }
- else
- {
- RemoveUnwantedMiscFeats (feature_list, TRUE);
- }
-
- ReplaceRNAClauses (feature_list, bsp, feature_requests->suppress_locus_tags);
-
- /* take any exons on the minus strand */
- /* and reverse their order within the clause */
- ReverseClauses (feature_list, IsExonOrIntron);
-
- RenameExonSequences ( feature_list, bsp, TRUE);
-
- LabelClauses (*feature_list, molecule_type, bsp,
- feature_requests->suppress_locus_tags);
-
- /* parse lists of tRNA and intergenic spacer clauses in misc_feat notes */
- /* need to do this after LabelClauses, since LabelClauses labels intergenic
- * spacers with more relaxed restrictions. The labels from LabelClauses
- * for intergenic spacers are the default values.
- */
- ReplaceIntergenicSpacerClauses (feature_list, bsp, feature_requests->suppress_locus_tags);
-
- ConsolidateClauses (feature_list, bsp, molecule_type, TRUE,
- feature_requests->suppress_locus_tags);
-
- /* this allows genes to be listed together even if they are from */
- /* separate sequences */
-/* SmashTallClauses (feature_list, TRUE); */
-
- clause = *feature_list;
- ListClauses (clause, &strings, TRUE, FALSE);
-
- AutoDef_AddEnding (clause, &strings, bsp,
- product_flag, alternate_splice_flag);
- str = MergeValNodeStrings (strings, FALSE);
- ValNodeFreeData (strings);
- }
- else if (feature_requests->feature_list_type == DEFLINE_COMPLETE_SEQUENCE)
- {
- str = StringSave (", complete sequence.");
- }
- else if (feature_requests->feature_list_type == DEFLINE_COMPLETE_GENOME)
- {
- ending_str [0] = 0;
- biop = GetBiopForBsp (bsp);
- if (biop != NULL)
- {
- switch (biop->genome) {
- case GENOME_macronuclear :
- sprintf (ending_str, "macronuclear");
- break;
- case GENOME_nucleomorph :
- sprintf (ending_str, "nucleomorph");
- break;
- case GENOME_mitochondrion :
- sprintf (ending_str, "mitochondrion");
- break;
- case GENOME_apicoplast :
- case GENOME_chloroplast :
- case GENOME_chromoplast :
- case GENOME_kinetoplast :
- case GENOME_plastid :
- case GENOME_cyanelle :
- case GENOME_leucoplast :
- case GENOME_proplastid :
- case GENOME_hydrogenosome :
- sprintf (ending_str, "%s", organelleByGenome [biop->genome]);
- break;
- }
- }
- StringCat (ending_str, ", complete genome.");
- str = StringSave (ending_str);
- }
- else
- {
- str = StringSave ("");
- }
-
- return str;
-}
-
-/* This function looks at the product names for the CDSs on the Bioseq,
- * and sets the flag for the "nuclear genes for X products" ending
- * based on the contents of the CDS products. */
-static Int2 GetProductFlagFromCDSProductNames (BioseqPtr bsp)
-{
- SeqMgrFeatContext context;
- SeqFeatPtr cds = NULL;
- Int2 product_flag;
- Int2 i;
- CharPtr found;
- Char ch_before, ch_after;
-
- product_flag = 0;
- for (cds = SeqMgrGetNextFeature (bsp, cds, SEQFEAT_CDREGION, 0, &context);
- cds != NULL && product_flag == 0;
- cds = cds->next)
- {
- for (i = 1; organelleByPopup[i] != NULL && product_flag == 0; i++)
- {
- found = StringStr (context.label, organelleByPopup[i]);
- if (found != NULL)
- {
- if (found == context.label) {
- ch_before = ' ';
- } else {
- ch_before = *(found - 1);
- }
- ch_after = *(found + StringLen (organelleByPopup[i]));
- if (ch_before == ' ' && (ch_after == 0 || ch_after == ' '))
- {
- product_flag = i;
- }
- }
- }
- }
-
- return product_flag;
-}
-
-static void BuildDefLineFeatClauseList (
- SeqEntryPtr sep,
- Uint2 entityID,
- DeflineFeatureRequestList PNTR feature_requests,
- Int2 product_flag,
- Boolean alternate_splice_flag,
- Boolean gene_cluster_opp_strand,
- ValNodePtr PNTR list
-)
-{
- BioseqSetPtr bssp;
- BioseqPtr bsp;
- ValNodePtr head;
- Uint1 molecule_type;
- SeqEntryPtr nsep;
- SegmentDefLineFeatureClauseData sdld;
- DefLineFeatClausePtr deflist;
- ValNodePtr vnp;
-
- if (sep == NULL || list == NULL) return;
-
- if ( IS_Bioseq_set (sep))
- {
- bssp = (BioseqSetPtr) sep->data.ptrvalue;
- if (bssp == NULL) return;
- if ( bssp->_class == 7 || IsPopPhyEtcSet (bssp->_class)
- || bssp->_class == BioseqseqSet_class_gen_prod_set
- || bssp->_class == BioseqseqSet_class_not_set)
- {
- for (sep = bssp->seq_set; sep != NULL; sep = sep->next)
- {
- BuildDefLineFeatClauseList (sep, entityID, feature_requests,
- product_flag, alternate_splice_flag,
- gene_cluster_opp_strand, list);
- }
- return;
- }
- }
-
- nsep = FindNucSeqEntry (sep);
- if (nsep != NULL)
- {
- bsp = (BioseqPtr) nsep->data.ptrvalue;
- if ( SpecialHandlingForSpecialTechniques (bsp))
- {
- return;
- }
- if (bsp != NULL && bsp->repr == Seq_repr_seg &&
- bsp->seq_ext != NULL && bsp->seq_ext_type == 1)
- {
- /* get default product flag if necessary */
- if (product_flag == -1 || product_flag == DEFAULT_ORGANELLE_CLAUSE) {
- product_flag = GetProductFlagFromCDSProductNames (bsp);
- }
-
- sdld.parent_bsp = bsp;
- sdld.molecule_type = GetMoleculeType (bsp, entityID);
- sdld.parent_feature_list = GetFeatureList (bsp,
- feature_requests->suppress_locus_tags);
-
- sdld.feature_requests = feature_requests;
- sdld.product_flag = product_flag;
- sdld.alternate_splice_flag = alternate_splice_flag;
- sdld.gene_cluster_opp_strand = gene_cluster_opp_strand;
- sdld.list = list;
- SeqMgrExploreSegments (bsp, (Pointer) &sdld, GetFeatureClauseForSeg);
- deflist = (DefLineFeatClausePtr) MemNew (sizeof (DefLineFeatClauseData));
- if (deflist == NULL) return;
- deflist->sep = SeqMgrGetSeqEntryForData (bsp),
- deflist->bsp = bsp;
-
- deflist->clauselist = BuildFeatureClauses (bsp,
- sdld.molecule_type,
- SeqMgrGetSeqEntryForData (bsp),
- &sdld.parent_feature_list,
- FALSE,
- NULL,
- product_flag,
- alternate_splice_flag,
- gene_cluster_opp_strand,
- feature_requests);
- vnp = ValNodeNew (*list);
- if (vnp == NULL) return;
- if (*list == NULL) *list = vnp;
- vnp->data.ptrvalue = deflist;
- FreeListElement (sdld.parent_feature_list);
- DeleteMarkedObjects (entityID, 0, NULL);
- return;
- }
- }
-
- if (nsep != NULL && nsep != sep)
- sep = nsep;
-
- /* get list of all recognized features */
- bsp = (BioseqPtr) sep->data.ptrvalue;
- if (bsp == NULL) return;
- if ( SpecialHandlingForSpecialTechniques (bsp))
- {
- return;
- }
- molecule_type = GetMoleculeType (bsp, entityID);
- head = GetFeatureList (bsp, feature_requests->suppress_locus_tags);
-
- /* get default product flag if necessary */
- if (product_flag == -1 || product_flag == DEFAULT_ORGANELLE_CLAUSE) {
- product_flag = GetProductFlagFromCDSProductNames (bsp);
- }
-
- deflist = (DefLineFeatClausePtr) MemNew (sizeof (DefLineFeatClauseData));
- if (deflist == NULL) return;
- deflist->sep = SeqMgrGetSeqEntryForData (bsp),
- deflist->bsp = bsp;
- deflist->clauselist = BuildFeatureClauses (bsp,
- molecule_type,
- SeqMgrGetSeqEntryForData (bsp),
- &head,
- FALSE,
- NULL,
- product_flag,
- alternate_splice_flag,
- gene_cluster_opp_strand,
- feature_requests);
- vnp = ValNodeNew (*list);
- if (vnp == NULL) return;
- if (*list == NULL) *list = vnp;
- vnp->data.ptrvalue = deflist;
- FreeListElement (head);
- DeleteMarkedObjects (entityID, 0, NULL);
-}
-
-
-static Boolean IdenticalExceptForPartialComplete (CharPtr str1, CharPtr str2)
-{
- CharPtr cp, word_in_first, word_in_second;
- Int4 first_len, second_len, compare_len;
-
- if (StringHasNoText (str1) && StringHasNoText (str2)) {
- return TRUE;
- } else if (StringHasNoText (str1) || StringHasNoText (str2)) {
- return FALSE;
- }
-
- word_in_first = StringISearch (str1, "partial");
- cp = StringISearch (str1, "complete");
- if (word_in_first == NULL || (cp != NULL && word_in_first > cp)) {
- word_in_first = cp;
- first_len = 8;
- } else {
- first_len = 7;
- }
-
- word_in_second = StringISearch (str2, "partial");
- cp = StringISearch (str2, "complete");
- if (word_in_second == NULL || (cp != NULL && word_in_second > cp)) {
- word_in_second = cp;
- second_len = 8;
- } else {
- second_len = 7;
- }
-
- if (word_in_first == NULL && word_in_second == NULL) {
- if (StringCmp (str1, str2) == 0) {
- return TRUE;
- } else {
- return FALSE;
- }
- } else if (word_in_first == NULL || word_in_second == NULL) {
- return FALSE;
- } else if ((compare_len = word_in_first - str1) != word_in_second - str2) {
- return FALSE;
- } else if (StringNCmp (str1, str2, compare_len) != 0) {
- return FALSE;
- } else {
- return IdenticalExceptForPartialComplete (word_in_first + first_len, word_in_second + second_len);
- }
-}
-
-
-static Boolean AreFeatureClausesUnique (ValNodePtr list)
-{
- ValNodePtr vnp1, vnp2;
- DefLineFeatClausePtr deflist1, deflist2;
-
- for (vnp1 = list; vnp1 != NULL && vnp1->next != NULL; vnp1 = vnp1->next)
- {
- deflist1 = vnp1->data.ptrvalue;
- if (deflist1 == NULL || deflist1->clauselist == NULL) return FALSE;
-
- for (vnp2 = vnp1->next; vnp2 != NULL; vnp2 = vnp2->next)
- {
- deflist2 = vnp2->data.ptrvalue;
- if (deflist2 == NULL || deflist2->clauselist == NULL
- || IdenticalExceptForPartialComplete (deflist1->clauselist, deflist2->clauselist))
- {
- return FALSE;
- }
- }
- }
- return TRUE;
-}
-
-static void BuildDefinitionLinesFromFeatureClauseLists (
- ValNodePtr list,
- ModifierItemLocalPtr modList,
- ModifierCombinationPtr m,
- OrganismDescriptionModifiers odmp
-);
typedef struct deflineformdata {
FEATURE_FORM_BLOCK
ModifierItemLocalPtr modList;
+ ButtoN PNTR modifier_btns;
DeflineFeatureRequestList feature_requests;
+ ButtoN feature_btns[NumRemovableItems];
GrouP sourceListGrp;
PopuP customGrp;
ButtoN use_labels;
@@ -10039,6 +72,7 @@ typedef struct deflineformdata {
ButtoN exclude_sp;
ButtoN exclude_cf;
ButtoN exclude_aff;
+ ButtoN exclude_nr;
ButtoN include_country_extra;
ButtoN allow_semicolon_in_modifier;
GrouP clone_isolate_HIV_rule_num;
@@ -10052,7 +86,9 @@ typedef struct deflineformdata {
GrouP featureOptsGrp;
GrouP optional_features_grp;
PopuP misc_feat_parse_rule;
+ GrouP promoter_type;
ButtoN alternate_splice_flag;
+ ButtoN use_ncrna_note;
ButtoN suppress_locus_tags;
ButtoN gene_cluster_opp_strand;
DialoG suppressed_feature_list;
@@ -10085,12 +121,13 @@ static void CleanupDefLineForm (
if (dlfp != NULL) {
if (dlfp->modList != NULL)
{
- for (i=0; i < NumDefLineModifiers; i++)
+ for (i=0; i < NumDefLineModifiers (); i++)
{
ValNodeFree (dlfp->modList[i].values_seen);
}
MemFree (dlfp->modList);
}
+ dlfp->modifier_btns = MemFree (dlfp->modifier_btns);
}
StdCleanupFormProc (g, data);
}
@@ -10134,60 +171,11 @@ static void ChangeFeaturePopup (PopuP p)
}
-/* This removes redundant titles on nuc-prot sets, which will not be
- * visible in the flat file if all sequences in the nuc-prot set have
- * their own title.
- */
-static void RemoveNucProtSetTitles (SeqEntryPtr sep)
-{
- BioseqSetPtr bssp;
- SeqEntryPtr this_sep;
- SeqDescrPtr sdp, prev = NULL, sdp_next;
-
- if (sep == NULL || ! IS_Bioseq_set (sep))
- {
- return;
- }
- bssp = (BioseqSetPtr) sep->data.ptrvalue;
- if (bssp == NULL) return;
- for (this_sep = bssp->seq_set; this_sep != NULL; this_sep = this_sep->next)
- {
- RemoveNucProtSetTitles (this_sep);
- }
-
- if (bssp->_class != BioseqseqSet_class_nuc_prot)
- {
- return;
- }
- for (sdp = bssp->descr; sdp != NULL; sdp = sdp_next)
- {
- sdp_next = sdp->next;
- if (sdp->choice == Seq_descr_title)
- {
- if (prev == NULL)
- {
- bssp->descr = sdp->next;
- }
- else
- {
- prev->next = sdp->next;
- }
- sdp->next = NULL;
- SeqDescrFree (sdp);
- }
- else
- {
- prev = sdp;
- }
- }
-}
-
-
static void DoAutoDefLine (ButtoN b)
{
DefLineFormPtr dlfp;
SeqEntryPtr sep;
- ModifierCombinationPtr m;
+ ValNodePtr modifier_indices = NULL;
Int2 feature_index;
OrganismDescriptionModifiers odmp;
Int2 product_flag, feature_list_type;
@@ -10207,6 +195,7 @@ static void DoAutoDefLine (ButtoN b)
odmp.exclude_sp = GetStatus (dlfp->exclude_sp);
odmp.exclude_cf = GetStatus (dlfp->exclude_cf);
odmp.exclude_aff = GetStatus (dlfp->exclude_aff);
+ odmp.exclude_nr = GetStatus (dlfp->exclude_nr);
odmp.include_country_extra = GetStatus (dlfp->include_country_extra);
odmp.use_modifiers = TRUE;
odmp.allow_semicolon_in_modifier = GetStatus (dlfp->allow_semicolon_in_modifier);
@@ -10220,28 +209,25 @@ static void DoAutoDefLine (ButtoN b)
odmp.clone_isolate_HIV_rule_num = GetValue (dlfp->clone_isolate_HIV_rule_num);
}
- /* create combo with the specified modifiers */
- m = NewModifierCombo (NULL);
- if (m == NULL) return;
if (GetValue (dlfp->customGrp) == 1)
{
/* take all features */
- for (feature_index = 0; feature_index < NumDefLineModifiers; feature_index++)
+ for (feature_index = 0; feature_index < NumDefLineModifiers (); feature_index++)
{
if (dlfp->modList[feature_index].any_present)
{
- AddQualToModifierCombo (m, dlfp->modList + feature_index, feature_index);
+ ValNodeAddInt (&modifier_indices, 0, feature_index);
}
}
}
else
{
/* take selected features */
- for (feature_index = 0; feature_index < NumDefLineModifiers; feature_index++)
+ for (feature_index = 0; feature_index < NumDefLineModifiers (); feature_index++)
{
- if (GetStatus (dlfp->modList[feature_index].button))
+ if (GetStatus (dlfp->modifier_btns[feature_index]))
{
- AddQualToModifierCombo (m, dlfp->modList + feature_index, feature_index);
+ ValNodeAddInt (&modifier_indices, 0, feature_index);
}
}
}
@@ -10265,13 +251,24 @@ static void DoAutoDefLine (ButtoN b)
for (i=0; i< NumRemovableItems; i++)
{
- dlfp->feature_requests.items[i].keep
- = GetStatus (dlfp->feature_requests.items[i].keep_request);
+ dlfp->feature_requests.keep_items[i]
+ = GetStatus (dlfp->feature_btns[i]);
+ }
+ if (GetValue (dlfp->promoter_type) == 1)
+ {
+ dlfp->feature_requests.add_fake_promoters = TRUE;
+ }
+ else
+ {
+ dlfp->feature_requests.add_fake_promoters = FALSE;
}
dlfp->feature_requests.suppress_alt_splice_phrase =
GetStatus (dlfp->suppress_alt_splice_phrase);
+ dlfp->feature_requests.use_ncrna_note =
+ GetStatus (dlfp->use_ncrna_note);
+
dlfp->feature_requests.remove_subfeatures =
GetStatus (dlfp->remove_subfeatures);
@@ -10307,23 +304,12 @@ static void DoAutoDefLine (ButtoN b)
}
if (sep == NULL) return;
- RemoveNucProtSetTitles (sep);
-
- SeqEntrySetScope (sep);
-
- BuildDefLineFeatClauseList (sep, dlfp->input_entityID,
- &dlfp->feature_requests,
- product_flag, alternate_splice_flag,
- gene_cluster_opp_strand,
- &defline_clauses);
+ AutoDefForSeqEntry (sep, dlfp->input_entityID, &odmp, dlfp->modList, modifier_indices,
+ &dlfp->feature_requests, product_flag, alternate_splice_flag, gene_cluster_opp_strand);
- dlfp->feature_requests.suppressed_feature_list = ValNodeFree (dlfp->feature_requests.suppressed_feature_list);
+ dlfp->feature_requests.suppressed_feature_list = ValNodeFree (dlfp->feature_requests.suppressed_feature_list);
+ modifier_indices = ValNodeFree (modifier_indices);
- BuildDefinitionLinesFromFeatureClauseLists (defline_clauses, dlfp->modList,
- m, odmp);
- DefLineFeatClauseListFree (defline_clauses);
- ClearProteinTitlesInNucProts (dlfp->input_entityID, NULL);
- InstantiateProteinTitles (dlfp->input_entityID, NULL);
ArrowCursor ();
Update ();
ObjMgrSetDirtyFlag (dlfp->input_entityID, TRUE);
@@ -10388,13 +374,11 @@ static void IsTricky (
}
static Boolean HasTrickyHIVRecords (
- BaseFormPtr bfp
+ SeqEntryPtr sep
)
{
- SeqEntryPtr sep;
Boolean has_tricky;
- sep = GetTopSeqEntryForEntityID (bfp->input_entityID);
if (sep == NULL) return FALSE;
has_tricky = FALSE;
@@ -10402,6 +386,48 @@ static Boolean HasTrickyHIVRecords (
return has_tricky;
}
+
+static void AddSpTaxnameToList (SeqDescrPtr sdp, Pointer userdata)
+{
+ BioSourcePtr biop;
+
+ if (sdp == NULL || sdp->choice != Seq_descr_source || userdata == NULL) return;
+
+ biop = (BioSourcePtr) sdp->data.ptrvalue;
+ if (biop == NULL || biop->org == NULL || !IsSpName (biop->org->taxname)) return;
+
+ ValNodeAddPointer ((ValNodePtr PNTR) userdata, 0, biop->org->taxname);
+}
+
+
+static Boolean ShouldExcludeSp (SeqEntryPtr sep)
+{
+ ValNodePtr name_list = NULL, vnp1, vnp2;
+ Boolean all_diff = TRUE;
+
+ if (sep == NULL) return TRUE;
+ VisitDescriptorsInSep (sep, &name_list, AddSpTaxnameToList);
+
+ name_list = ValNodeSort (name_list, SortVnpByString);
+
+ if (name_list != NULL && name_list->next != NULL)
+ {
+ for (vnp1 = name_list; vnp1 != NULL && vnp1->next != NULL && all_diff; vnp1 = vnp1->next)
+ {
+ for (vnp2 = vnp1->next; vnp2 != NULL && all_diff; vnp2 = vnp2->next)
+ {
+ if (StringCmp (vnp1->data.ptrvalue, vnp2->data.ptrvalue) == 0)
+ {
+ all_diff = FALSE;
+ }
+ }
+ }
+ }
+ name_list = ValNodeFree (name_list);
+ return all_diff;
+}
+
+
static GrouP CreateDefLineFormHIVRule (
GrouP h
)
@@ -10462,10 +488,10 @@ static void SetHIVRuleEnable (Handle a)
if (dlfp == NULL) return;
if (dlfp->clone_isolate_HIV_rule_num == NULL) return;
if (dlfp->modList == NULL) return;
- if ((dlfp->modList [DEFLINE_POS_Clone].button != NULL
- && GetStatus (dlfp->modList [DEFLINE_POS_Clone].button))
- || (dlfp->modList [DEFLINE_POS_Isolate].button != NULL
- && GetStatus (dlfp->modList [DEFLINE_POS_Isolate].button)))
+ if ((dlfp->modifier_btns [DEFLINE_POS_Clone] != NULL
+ && GetStatus (dlfp->modifier_btns [DEFLINE_POS_Clone]))
+ || (dlfp->modifier_btns [DEFLINE_POS_Isolate] != NULL
+ && GetStatus (dlfp->modifier_btns [DEFLINE_POS_Isolate])))
{
Disable (dlfp->clone_isolate_HIV_rule_num);
}
@@ -10478,7 +504,7 @@ static void SetHIVRuleEnable (Handle a)
static GrouP CreateDefLineFormSourceGroup (
GrouP h,
DefLineFormPtr dlfp,
- BaseFormPtr bfp
+ SeqEntryPtr sep
)
{
GrouP p, g, g1, r;
@@ -10491,7 +517,7 @@ static GrouP CreateDefLineFormSourceGroup (
SetGroupSpacing (p, 10, 10);
count = 0;
- for (item_index=0; item_index < NumDefLineModifiers; item_index++)
+ for (item_index=0; item_index < NumDefLineModifiers (); item_index++)
{
if (dlfp->modList[item_index].any_present)
{
@@ -10530,17 +556,17 @@ static GrouP CreateDefLineFormSourceGroup (
programFont, NULL);
SetGroupSpacing (dlfp->sourceListGrp, 10, 10);
- for (item_index=0; item_index < NumDefLineModifiers; item_index++)
+ for (item_index=0; item_index < NumDefLineModifiers (); item_index++)
{
if (dlfp->modList[item_index].any_present)
{
g1 = HiddenGroup (dlfp->sourceListGrp, num_label_columns, 0, NULL);
SetGroupSpacing (g1, 10, 10);
- dlfp->modList[item_index].button = CheckBox (g1,
+ dlfp->modifier_btns[item_index] = CheckBox (g1,
DefLineModifiers[item_index].name,
(BtnActnProc) SetHIVRuleEnable);
- SetObjectExtra (dlfp->modList[item_index].button, dlfp, NULL);
- SetStatus (dlfp->modList[item_index].button,
+ SetObjectExtra (dlfp->modifier_btns [item_index], dlfp, NULL);
+ SetStatus (dlfp->modifier_btns [item_index],
dlfp->modList[item_index].required);
if (num_label_columns > 1)
@@ -10571,7 +597,7 @@ static GrouP CreateDefLineFormSourceGroup (
}
else
{
- dlfp->modList[item_index].button = NULL;
+ dlfp->modifier_btns[item_index] = NULL;
dlfp->modList[item_index].required = FALSE;
}
}
@@ -10579,7 +605,7 @@ static GrouP CreateDefLineFormSourceGroup (
Enable (dlfp->sourceListGrp);
- has_tricky = HasTrickyHIVRecords (bfp);
+ has_tricky = HasTrickyHIVRecords (sep);
if (has_tricky)
{
dlfp->clone_isolate_HIV_rule_num = CreateDefLineFormHIVRule (p);
@@ -10590,24 +616,26 @@ static GrouP CreateDefLineFormSourceGroup (
{
dlfp->clone_isolate_HIV_rule_num = NULL;
}
- r = NormalGroup (p, 0, 2, "Other Options", programFont, NULL);
+ r = NormalGroup (p, 3, 0, "Other Options", programFont, NULL);
SetGroupSpacing (r, 10, 10);
dlfp->keep_paren = CheckBox (r, "Leave in parenthetical organism info", NULL);
SetStatus (dlfp->keep_paren, TRUE);
- dlfp->exclude_sp = CheckBox (r, "Do not apply modifier to 'sp.' organisms",
- NULL);
- SetStatus (dlfp->exclude_sp, TRUE);
dlfp->include_country_extra = CheckBox (r, "Include text after colon in country", NULL);
SetStatus (dlfp->include_country_extra, FALSE);
+ dlfp->allow_semicolon_in_modifier = CheckBox (r, "Include text after semicolon in modifiers", NULL);
+ SetStatus (dlfp->allow_semicolon_in_modifier, FALSE);
+ dlfp->exclude_sp = CheckBox (r, "Do not apply modifier to 'sp.' organisms",
+ NULL);
+ SetStatus (dlfp->exclude_sp, ShouldExcludeSp (sep));
dlfp->exclude_cf = CheckBox (r, "Do not apply modifier to 'cf.' organisms",
NULL);
SetStatus (dlfp->exclude_cf, FALSE);
- dlfp->allow_semicolon_in_modifier = CheckBox (r, "Include text after semicolon in modifiers", NULL);
- SetStatus (dlfp->allow_semicolon_in_modifier, FALSE);
dlfp->exclude_aff = CheckBox (r, "Do not apply modifier to 'aff.' organisms",
NULL);
SetStatus (dlfp->exclude_aff, FALSE);
+ dlfp->exclude_nr = CheckBox (r, "Do not apply modifier to 'nr.' organisms", NULL);
+ SetStatus (dlfp->exclude_nr, FALSE);
AlignObjects (ALIGN_CENTER, (HANDLE) g, (HANDLE) dlfp->use_labels,
(HANDLE) dlfp->sourceListGrp,
@@ -10666,8 +694,7 @@ static void SetMiscFeatRuleEnable (Handle a)
{
return;
}
- if (dlfp->feature_requests.items != NULL
- && GetStatus (dlfp->feature_requests.items[RemovableNoncodingProductFeat].keep_request))
+ if (GetStatus (dlfp->feature_btns[RemovableNoncodingProductFeat]))
{
Enable (dlfp->misc_feat_parse_rule);
}
@@ -10675,6 +702,14 @@ static void SetMiscFeatRuleEnable (Handle a)
{
Disable (dlfp->misc_feat_parse_rule);
}
+ if (GetStatus (dlfp->feature_btns[RemovablePromoter]))
+ {
+ Enable (dlfp->promoter_type);
+ }
+ else
+ {
+ Disable (dlfp->promoter_type);
+ }
}
static GrouP CreateDefLineFormFeatureOptionsGroup (
@@ -10682,7 +717,7 @@ static GrouP CreateDefLineFormFeatureOptionsGroup (
DefLineFormPtr dlfp
)
{
- GrouP p, g1, s1, s2;
+ GrouP p, g1, s1, s2, k, k2;
Int4 i;
SeqEntryPtr sep;
@@ -10697,34 +732,49 @@ static GrouP CreateDefLineFormFeatureOptionsGroup (
dlfp->organelle_popup = CreateDefLineFormOrganellePopup (s1);
dlfp->alternate_splice_flag = CheckBox (s1,
"Append 'alternatively spliced'", NULL);
+ dlfp->use_ncrna_note = CheckBox (s1, "Use ncRNA note if no class or product", NULL);
AlignObjects (ALIGN_CENTER, (HANDLE) dlfp->featurePopup,
(HANDLE) dlfp->organelle_popup,
+ (HANDLE) dlfp->use_ncrna_note,
(HANDLE) dlfp->alternate_splice_flag, NULL);
- dlfp->optional_features_grp = NormalGroup (g1, 0, 4,
+ dlfp->optional_features_grp = NormalGroup (g1, 3, 0,
"Optional Features", programFont, NULL);
SetGroupSpacing (dlfp->optional_features_grp, 10, 10);
for (i=0; i < NumRemovableItems; i++)
{
+ if (i == 0 || i == 4 || i == 7)
+ {
+ k = HiddenGroup (dlfp->optional_features_grp, 0, 4, NULL);
+ SetGroupSpacing (k, 10, 10);
+ }
if (i != RemovableCDS)
{
- dlfp->feature_requests.items[i].keep_request =
- CheckBox (dlfp->optional_features_grp, remove_items[i].group_name,
+ dlfp->feature_btns[i] =
+ CheckBox (k, GetRemovableItemName (i),
(BtnActnProc) SetMiscFeatRuleEnable);
- SetObjectExtra (dlfp->feature_requests.items[i].keep_request, dlfp, NULL);
- SetStatus (dlfp->feature_requests.items[i].keep_request, FALSE);
+ SetObjectExtra (dlfp->feature_btns[i], dlfp, NULL);
+ SetStatus (dlfp->feature_btns[i], FALSE);
if (i == RemovableNoncodingProductFeat) {
- s2 = HiddenGroup (dlfp->optional_features_grp, 2, 0, NULL);
+ s2 = HiddenGroup (k, 2, 0, NULL);
StaticPrompt (s2, " ", 8, popupMenuHeight, programFont, 'l');
dlfp->misc_feat_parse_rule = PopupList (s2, TRUE, NULL);
PopupItem (dlfp->misc_feat_parse_rule, "Use comment before first semicolon");
PopupItem (dlfp->misc_feat_parse_rule, "Look for Noncoding Products");
SetValue (dlfp->misc_feat_parse_rule, 2);
Disable (dlfp->misc_feat_parse_rule);
- }
- else if (i == RemovablePrecursorRNA) {
- /* put in blank space */
- StaticPrompt (dlfp->optional_features_grp, "", 0, popupMenuHeight, programFont, 'l');
+ } else if (i == RemovablePromoter) {
+ k2 = HiddenGroup (k, 2, 0, NULL);
+ SetGroupSpacing (k2, 10, 10);
+ StaticPrompt (k2, " ", 8, popupMenuHeight, programFont, 'l');
+ dlfp->promoter_type = HiddenGroup (k2, 0, 2, NULL);
+ RadioButton (dlfp->promoter_type, "All");
+ RadioButton (dlfp->promoter_type, "If present");
+ SetValue (dlfp->promoter_type, 1);
+ Disable (dlfp->promoter_type);
+ AlignObjects (ALIGN_CENTER, (HANDLE) dlfp->feature_btns[i],
+ (HANDLE) dlfp->promoter_type,
+ NULL);
}
}
}
@@ -10762,6 +812,7 @@ static void CreateDefLineForm (
WindoW w;
GrouP h, k, g1, c, feat_opts;
ButtoN b;
+ SeqEntryPtr sep;
dlfp = MemNew (sizeof (DefLineFormData));
if (dlfp == NULL) return;
@@ -10769,6 +820,10 @@ static void CreateDefLineForm (
dlfp->input_itemID = bfp->input_itemID;
dlfp->input_itemtype = bfp->input_itemtype;
+ dlfp->modifier_btns = (ButtoN PNTR) MemNew (sizeof (ButtoN) * NumDefLineModifiers());
+
+ sep = GetTopSeqEntryForEntityID (bfp->input_entityID);
+
w = FixedWindow (-50, -33, -10, -10, "Automatic Definition Line",
StdCloseWindowProc);
SetObjectExtra (w, dlfp, CleanupDefLineForm);
@@ -10783,7 +838,7 @@ static void CreateDefLineForm (
k = HiddenGroup (h, -1, 0, NULL);
SetGroupSpacing (k, 10, 10);
- g1 = CreateDefLineFormSourceGroup (k, dlfp, bfp);
+ g1 = CreateDefLineFormSourceGroup (k, dlfp, sep);
feat_opts = CreateDefLineFormFeatureOptionsGroup (k, dlfp);
AlignObjects (ALIGN_CENTER, (HANDLE) g1, (HANDLE) feat_opts, NULL);
@@ -10810,75 +865,20 @@ static void CreateDefLineForm (
Update ();
}
-static CharPtr GetKeywordPrefix (SeqEntryPtr sep)
-{
- ValNodePtr vnp;
- GBBlockPtr gbp;
-
- vnp = SeqEntryGetSeqDescr (sep, Seq_descr_genbank, NULL);
- if (vnp != NULL) {
- gbp = (GBBlockPtr) vnp->data.ptrvalue;
- if (gbp != NULL)
- {
- for (vnp = gbp->keywords; vnp != NULL; vnp = vnp->next)
- {
- if (StringICmp((CharPtr)vnp->data.ptrvalue, "TPA:inferential") == 0)
- {
- return "TPA_inf: ";
- }
- else if (StringICmp((CharPtr)vnp->data.ptrvalue, "TPA:experimental") == 0)
- {
- return "TPA_exp: ";
- }
- }
- }
- }
- return "";
-}
-static void BuildDefinitionLinesFromFeatureClauseLists (
- ValNodePtr list,
- ModifierItemLocalPtr modList,
- ModifierCombinationPtr m,
- OrganismDescriptionModifiers odmp
+/* The AddBestComboModifiersToModList function sets the modifiers
+ * selected by the FindBestCombo process as selected.
+ */
+static void AddBestModifiersToModList (
+ ValNodePtr modifier_indices,
+ ModifierItemLocalPtr modList
)
{
ValNodePtr vnp;
- DefLineFeatClausePtr defline_featclause;
- CharPtr org_desc, tmp_str, keyword_prefix;
- for (vnp = list; vnp != NULL; vnp = vnp->next)
+ for (vnp = modifier_indices; vnp != NULL; vnp = vnp->next)
{
- if (vnp->data.ptrvalue != NULL)
- {
- defline_featclause = vnp->data.ptrvalue;
-
- keyword_prefix = GetKeywordPrefix (defline_featclause->sep);
-
- org_desc = GetOrganismDescription (defline_featclause->bsp,
- modList, m, &odmp);
- tmp_str = (CharPtr) MemNew (StringLen (keyword_prefix)
- + StringLen (org_desc)
- + StringLen (defline_featclause->clauselist) + 2);
- if (tmp_str == NULL) return;
- tmp_str [0] = 0;
- if (keyword_prefix != NULL)
- {
- StringCat (tmp_str, keyword_prefix);
- }
- StringCat (tmp_str, org_desc);
- if (defline_featclause->clauselist != NULL
- && defline_featclause->clauselist [0] != ','
- && defline_featclause->clauselist [0] != '.'
- && defline_featclause->clauselist [0] != 0)
- {
- StringCat (tmp_str, " ");
- }
- StringCat (tmp_str, defline_featclause->clauselist);
- tmp_str [0] = toupper (tmp_str [0]);
- ReplaceDefinitionLine (defline_featclause->sep, tmp_str);
- MemFree (org_desc);
- }
+ modList[vnp->data.intvalue].required = TRUE;
}
}
@@ -10892,7 +892,7 @@ extern void AutoDefBaseFormCommon (
SeqEntryPtr sep;
DeflineFeatureRequestList feature_requests;
ModifierItemLocalPtr modList;
- ModifierCombinationPtr m;
+ ValNodePtr modifier_indices = NULL;
OrganismDescriptionModifiers odmp;
Int4 index;
ValNodePtr defline_clauses = NULL;
@@ -10903,63 +903,71 @@ extern void AutoDefBaseFormCommon (
InitFeatureRequests (&feature_requests);
- modList = MemNew (NumDefLineModifiers * sizeof (ModifierItemLocalData));
+ modList = MemNew (NumDefLineModifiers () * sizeof (ModifierItemLocalData));
if (modList == NULL) return;
SetRequiredModifiers (modList);
CountModifiers (modList, sep);
if (use_form)
{
- m = FindBestCombo (sep, modList);
- AddBestComboModifiersToModList ( m, modList);
+ modifier_indices = FindBestModifiers (sep, modList);
+ AddBestModifiersToModList ( modifier_indices, modList);
+ modifier_indices = ValNodeFree (modifier_indices);
CreateDefLineForm (bfp, modList, &feature_requests);
}
else
{
- RemoveNucProtSetTitles (sep);
- SeqEntrySetScope (sep);
WatchCursor ();
Update ();
odmp.use_labels = TRUE;
odmp.max_mods = -99;
odmp.keep_paren = TRUE;
- odmp.exclude_sp = TRUE;
+ odmp.exclude_sp = ShouldExcludeSp (sep);
odmp.exclude_cf = FALSE;
odmp.exclude_aff = FALSE;
+ odmp.exclude_nr = FALSE;
odmp.include_country_extra = FALSE;
odmp.clone_isolate_HIV_rule_num = clone_isolate_HIV_rule_want_both;
odmp.use_modifiers = use_modifiers;
odmp.allow_semicolon_in_modifier = FALSE;
- ClearProteinTitlesInNucProts (bfp->input_entityID, NULL);
+
+ RemoveNucProtSetTitles (sep);
+ SeqEntrySetScope (sep);
+
BuildDefLineFeatClauseList (sep, bfp->input_entityID, &feature_requests,
DEFAULT_ORGANELLE_CLAUSE, FALSE, FALSE,
&defline_clauses);
if ( AreFeatureClausesUnique (defline_clauses))
{
- m = CreateComboFromModList (modList);
+ modifier_indices = GetModifierIndicesFromModList (modList);
}
else
{
- m = FindBestCombo (sep, modList);
+ modifier_indices = FindBestModifiers (sep, modList);
}
BuildDefinitionLinesFromFeatureClauseLists (defline_clauses, modList,
- m, odmp);
+ modifier_indices, &odmp);
+
DefLineFeatClauseListFree (defline_clauses);
if (modList != NULL)
{
- for (index=0; index < NumDefLineModifiers; index++)
+ for (index=0; index < NumDefLineModifiers (); index++)
{
ValNodeFree (modList[index].values_seen);
}
MemFree (modList);
}
+ modifier_indices = ValNodeFree (modifier_indices);
+
+ ClearProteinTitlesInNucProts (bfp->input_entityID, NULL);
+ InstantiateProteinTitles (bfp->input_entityID, NULL);
+
ArrowCursor ();
Update ();
ObjMgrSetDirtyFlag (bfp->input_entityID, TRUE);
ObjMgrSendMsg (OM_MSG_UPDATE, bfp->input_entityID, 0, 0);
SeqEntrySetScope (NULL);
}
- FreeModifierCombo (m);
}
static void AutoDefCommon (IteM i, Boolean use_form, Boolean use_modifiers)
@@ -11008,17 +1016,40 @@ extern void AutoDefOptionsToolBtn (ButtoN b)
AutoDefBaseFormCommon (bfp, TRUE, TRUE);
}
+
+static void TrimQuotesAroundString (CharPtr str)
+{
+ Int4 len;
+ CharPtr src, dst;
+
+ if (StringHasNoText (str) || *str != '"') return;
+ len = StringLen (str);
+ if (str[len - 1] != '"') return;
+ src = str + 1;
+ dst = str;
+ while (*src != '"')
+ {
+ *dst = *src;
+ dst++;
+ src++;
+ }
+ *dst = 0;
+}
+
+
typedef struct tablelinedata {
Int4 num_parts;
ValNodePtr parts;
} TableLineData, PNTR TableLinePtr;
-static TableLinePtr MakeTableData (CharPtr line)
+static TableLinePtr MakeTableData (CharPtr line, ValNodePtr PNTR special_list)
{
TableLinePtr tlp;
CharPtr p_start, p_end;
Int4 plen;
Boolean found_end;
+ CharPtr val;
+ ValNodePtr vnp;
if (line == NULL) return NULL;
tlp = MemNew (sizeof (TableLineData));
@@ -11030,11 +1061,8 @@ static TableLinePtr MakeTableData (CharPtr line)
plen = StringCSpn (p_start, "\t\n");
if (plen == 0)
{
- if (tlp->num_parts > 0)
- {
- ValNodeAddStr (&tlp->parts, 0, StringSave (""));
- tlp->num_parts ++;
- }
+ ValNodeAddStr (&tlp->parts, 0, StringSave (""));
+ tlp->num_parts ++;
p_start++;
if (*p_start == 0) {
if (tlp->num_parts > 0)
@@ -11055,7 +1083,11 @@ static TableLinePtr MakeTableData (CharPtr line)
*p_end = 0;
}
TrimSpacesAroundString (p_start);
- ValNodeAddStr (&tlp->parts, 0, StringSave (p_start));
+ TrimQuotesAroundString (p_start);
+ val = StringSave (p_start);
+
+ vnp = ValNodeAddStr (&tlp->parts, 0, val);
+ SpecialCharFindWithContext ((CharPtr PNTR)&(vnp->data.ptrvalue), special_list, NULL, NULL);
tlp->num_parts ++;
if (!found_end)
{
@@ -11066,23 +1098,27 @@ static TableLinePtr MakeTableData (CharPtr line)
{
MemFree (tlp);
return NULL;
- }
+ }
return tlp;
}
static void CleanUpTableData (ValNodePtr vnp)
{
TableLinePtr tlp;
+ ValNodePtr vnp_next;
- if (vnp == NULL) return;
- CleanUpTableData (vnp->next);
- vnp->next = NULL;
- tlp = vnp->data.ptrvalue;
- if (tlp != NULL)
+ while (vnp != NULL)
{
- ValNodeFreeData (tlp->parts);
+ vnp_next = vnp->next;
+ vnp->next = NULL;
+ tlp = vnp->data.ptrvalue;
+ if (tlp != NULL)
+ {
+ ValNodeFreeData (tlp->parts);
+ }
+ vnp = ValNodeFree (vnp);
+ vnp = vnp_next;
}
- ValNodeFree (vnp);
}
static void FormatPopupWithTableDataColumns (PopuP p, ValNodePtr header_line)
@@ -11112,26 +1148,240 @@ static void FormatPopupWithTableDataColumns (PopuP p, ValNodePtr header_line)
}
-typedef struct orgmodlineformdata {
- Int4 column_number;
- CharPtr value_string;
- GrouP action_choice;
- PopuP match_choice;
- DialoG apply_choice_dlg;
- GrouP container;
-} OrgModLineFormData, PNTR OrgModLineFormPtr;
+enum orgmodmatchtype
+{
+ eMatchAccession = 1,
+ eMatchLocalID,
+ eMatchTaxName,
+ eMatchTMSMART,
+ eMatchBankIt,
+ eMatchGeneral,
+ eMatchNone
+};
+
+
+typedef struct orgmodtablecolumn {
+ Int4 match_choice;
+ ValNodePtr apply_choice;
+} OrgModTableColumnData, PNTR OrgModTableColumnPtr;
+
+
+static OrgModTableColumnPtr OrgModTableColumnFree (OrgModTableColumnPtr t)
+{
+ if (t != NULL) {
+ t->apply_choice = ValNodeFreeData (t->apply_choice);
+ t = MemFree (t);
+ }
+ return t;
+}
+
+
+static ValNodePtr OrgModTableColumnListFree (ValNodePtr vnp)
+{
+ ValNodePtr vnp_next;
+
+ while (vnp != NULL)
+ {
+ vnp_next = vnp->next;
+ vnp->next = NULL;
+ vnp->data.ptrvalue = OrgModTableColumnFree (vnp->data.ptrvalue);
+ vnp = ValNodeFree (vnp);
+ vnp = vnp_next;
+ }
+ return vnp;
+}
+
+
+typedef struct orgmodtablecolumndlg {
+ DIALOG_MESSAGE_BLOCK
+
+ GrouP action_choice;
+ PopuP match_choice;
+ DialoG apply_choice;
+
+ Nlm_ChangeNotifyProc change_notify;
+ Pointer change_userdata;
+} OrgModTableColumnDlgData, PNTR OrgModTableColumnDlgPtr;
+
+static Pointer OrgModTableColumnDialogToData (DialoG d)
+{
+ OrgModTableColumnPtr o;
+ OrgModTableColumnDlgPtr dlg;
+
+ dlg = (OrgModTableColumnDlgPtr) GetObjectExtra (d);
+ if (dlg == NULL) return NULL;
+
+ o = (OrgModTableColumnPtr) MemNew (sizeof (OrgModTableColumnData));
+
+ if (GetValue (dlg->action_choice) == 1)
+ {
+ o->match_choice = GetValue (dlg->match_choice);
+ o->apply_choice = NULL;
+ }
+ else
+ {
+ o->match_choice = 0;
+ o->apply_choice = DialogToPointer (dlg->apply_choice);
+ }
+ return o;
+}
+
+
+static void ChangeOrgModTableColumnMatchChoice (PopuP p)
+{
+ OrgModTableColumnDlgPtr dlg;
+
+ dlg = (OrgModTableColumnDlgPtr) GetObjectExtra (p);
+ if (dlg == NULL) return;
+ if (dlg->change_notify != NULL)
+ {
+ (dlg->change_notify) (dlg->change_userdata);
+ }
+}
+
+
+static void ChangeOrgModTableColumnActionChoice (GrouP g)
+{
+ OrgModTableColumnDlgPtr dlg;
+
+ dlg = (OrgModTableColumnDlgPtr) GetObjectExtra (g);
+ if (dlg == NULL) return;
+
+ if (GetValue (dlg->action_choice) == 1)
+ {
+ Enable (dlg->match_choice);
+ Disable (dlg->apply_choice);
+ }
+ else
+ {
+ Enable (dlg->apply_choice);
+ Disable (dlg->match_choice);
+ }
+ if (dlg->change_notify != NULL)
+ {
+ (dlg->change_notify) (dlg->change_userdata);
+ }
+}
+
+
+static void OrgModTableColumnDataToDialog (DialoG d, Pointer data)
+{
+ OrgModTableColumnPtr o;
+ OrgModTableColumnDlgPtr dlg;
+
+ dlg = (OrgModTableColumnDlgPtr) GetObjectExtra (d);
+ if (dlg == NULL) return;
+
+ o = (OrgModTableColumnPtr) data;
+
+ if (o == NULL)
+ {
+ SetValue (dlg->action_choice, 1);
+ SetValue (dlg->match_choice, eMatchNone);
+ PointerToDialog (dlg->apply_choice, NULL);
+ }
+ else
+ {
+ if (o->match_choice == 0)
+ {
+ SetValue (dlg->action_choice, 2);
+ PointerToDialog (dlg->apply_choice, o->apply_choice);
+ }
+ else
+ {
+ SetValue (dlg->action_choice, 1);
+ SetValue (dlg->match_choice, o->match_choice);
+ }
+ }
+ ChangeOrgModTableColumnActionChoice (dlg->action_choice);
+}
+
+
+static DialoG
+OrgModTableColumnDialog
+(GrouP h,
+ CharPtr value_string,
+ Int4 num_blank,
+ Nlm_ChangeNotifyProc change_notify,
+ Pointer change_userdata)
+{
+ OrgModTableColumnDlgPtr dlg;
+ GrouP p, g;
+ ValNodePtr qual_selection_list;
+ CharPtr real_title;
+ CharPtr title_fmt = "%s (%d are blank)";
+
+ dlg = (OrgModTableColumnDlgPtr) MemNew (sizeof (OrgModTableColumnDlgData));
+
+ if (num_blank > 0) {
+ real_title = (CharPtr) MemNew (sizeof (Char) * (StringLen (title_fmt) + StringLen (value_string) + 15));
+ sprintf (real_title, title_fmt, value_string, num_blank);
+ } else {
+ real_title = value_string;
+ }
+
+ p = NormalGroup (h, 3, 0, real_title, programFont, NULL);
+ SetObjectExtra (p, dlg, StdCleanupExtraProc);
+
+ if (real_title != value_string) {
+ real_title = MemFree (real_title);
+ }
+
+ dlg->dialog = (DialoG) p;
+ dlg->fromdialog = OrgModTableColumnDialogToData;
+ dlg->todialog = OrgModTableColumnDataToDialog;
+ dlg->change_notify = change_notify;
+ dlg->change_userdata = change_userdata;
+
+ dlg->action_choice = HiddenGroup (p, 0, 2, ChangeOrgModTableColumnActionChoice);
+ SetObjectExtra (dlg->action_choice, dlg, NULL);
+ SetGroupSpacing (dlg->action_choice, 10, 10);
+ RadioButton (dlg->action_choice, "Match to");
+ RadioButton (dlg->action_choice, "Apply to");
+ SetValue (dlg->action_choice, 1);
+
+ g = HiddenGroup (p, 0, 3, NULL);
+ /* list of matchable items */
+ dlg->match_choice = PopupList (g, TRUE, ChangeOrgModTableColumnMatchChoice);
+ SetObjectExtra (dlg->match_choice, dlg, NULL);
+ PopupItem (dlg->match_choice, "Accession");
+ PopupItem (dlg->match_choice, "Local ID");
+ PopupItem (dlg->match_choice, "Organism Taxonomy Name");
+ PopupItem (dlg->match_choice, "TMSMART ID");
+ PopupItem (dlg->match_choice, "BankIt ID");
+ PopupItem (dlg->match_choice, "General ID");
+ PopupItem (dlg->match_choice, "None");
+ SetValue (dlg->match_choice, eMatchNone);
+
+
+ /* list of organism modifiers */
+ qual_selection_list = GetSourceQualDescList (TRUE, TRUE, FALSE, FALSE);
+
+ ValNodeAddPointer (&qual_selection_list, 1, StringSave ("Tax Name"));
+
+ /* note - the ValNodeSelectionDialog will free the qual_selection_list when done */
+ dlg->apply_choice = ValNodeSelectionDialog (g, qual_selection_list, 8, SourceQualValNodeName,
+ ValNodeSimpleDataFree, SourceQualValNodeDataCopy,
+ SourceQualValNodeMatch, "qual choice",
+ change_notify, change_userdata, FALSE);
+
+ ChangeOrgModTableColumnActionChoice(dlg->action_choice);
+ return (DialoG) p;
+}
+
typedef struct orgmodloadformdata {
FEATURE_FORM_BLOCK
ValNodePtr line_list;
BioSourcePtr PNTR biop_list;
- OrgModLineFormPtr line_forms;
- Int4 num_line_forms;
+ DialoG PNTR columns;
+ Int4 num_columns;
Uint2 entityID;
ButtoN replace_with_blank_btn;
ButtoN accept_button;
ButtoN leave_dlg_up_btn;
+ DialoG taxname_options;
/* These members are for importing modifiers in the
* submission dialogs.
@@ -11142,49 +1392,46 @@ typedef struct orgmodloadformdata {
} OrgModLoadFormData, PNTR OrgModLoadFormPtr;
-enum orgmodmatchtype
-{
- eMatchAccession = 1,
- eMatchLocalID,
- eMatchTaxName,
- eMatchTMSMART,
- eMatchBankIt,
- eMatchGeneral,
- eMatchNone
-};
-
-static void SetFormModsAccept (Pointer userdata)
+static void SetFormModsEnable (Pointer userdata)
{
OrgModLoadFormPtr form_data;
+ OrgModTableColumnPtr o;
Boolean have_apply = FALSE;
- Boolean have_action;
+ Boolean have_action = FALSE;
+ Boolean have_apply_taxname = FALSE;
Int4 column_index;
- ValNodePtr vnp;
form_data = (OrgModLoadFormPtr) userdata;
if (form_data == NULL) return;
- have_apply = FALSE;
- have_action = FALSE;
for (column_index = 0;
- column_index < form_data->num_line_forms;
+ column_index < form_data->num_columns;
column_index ++)
{
- if ( GetValue (form_data->line_forms [ column_index].action_choice) == 2)
+ o = (OrgModTableColumnPtr) DialogToPointer (form_data->columns[column_index]);
+ if (o == NULL) continue;
+ if (o->match_choice > 0 && o->match_choice != eMatchNone)
{
- vnp = DialogToPointer (form_data->line_forms[column_index].apply_choice_dlg);
- if (vnp != NULL)
- {
- have_apply = TRUE;
- }
- vnp = ValNodeFreeData (vnp);
+ have_action = TRUE;
}
- else if (GetValue (form_data->line_forms [column_index].action_choice) == 1
- && GetValue (form_data->line_forms [column_index].match_choice) > 0
- && GetValue (form_data->line_forms [column_index].match_choice) < eMatchNone)
+ else if (o->apply_choice != NULL)
{
- have_action = TRUE;
+ have_apply = TRUE;
+ if (o->apply_choice->choice > 0 && StringCmp (o->apply_choice->data.ptrvalue, "Tax Name") == 0)
+ {
+ have_apply_taxname = TRUE;
+ }
}
+ o = OrgModTableColumnFree (o);
+ }
+
+ if (have_apply_taxname)
+ {
+ Enable (form_data->taxname_options);
+ }
+ else
+ {
+ Disable (form_data->taxname_options);
}
/* must have an action selected if there is more than one line */
@@ -11206,77 +1453,6 @@ static void SetFormModsAccept (Pointer userdata)
}
}
-static void SetFormModsAcceptButton (Handle a)
-{
- SetFormModsAccept (GetObjectExtra (a));
-}
-
-extern CharPtr GetModifierPopupPositionName (Int2 val)
-{
- if (val <= 1)
- {
- return NULL;
- }
- else if (val > NumDefLineModifiers + 1)
- {
- return "Organism";
- }
- else
- {
- return DefLineModifiers[val - 2].name;
- }
-}
-
-static void BuildOrgModLineForm (
- CharPtr value_string,
- Int4 column_number,
- GrouP parent_group,
- OrgModLineFormPtr omlfp,
- OrgModLoadFormPtr parent_form
-)
-{
- GrouP g;
- ValNodePtr qual_selection_list = NULL;
-
- omlfp->column_number = column_number;
- omlfp->value_string = value_string;
- omlfp->container = NormalGroup (parent_group, 3, 0, value_string,
- programFont, NULL);
- omlfp->action_choice = HiddenGroup (omlfp->container, 0, 3,
- (GrpActnProc) SetFormModsAcceptButton);
- SetObjectExtra (omlfp->action_choice, parent_form, NULL);
- SetGroupSpacing (omlfp->action_choice, 10 , 10);
- RadioButton (omlfp->action_choice, "Match to");
- RadioButton (omlfp->action_choice, "Apply to");
-
- /* list of matchable items */
- g = HiddenGroup (omlfp->container, 0, 2, NULL);
- omlfp->match_choice = PopupList (g, TRUE,
- (PupActnProc) SetFormModsAcceptButton);
- SetObjectExtra (omlfp->match_choice, parent_form, NULL);
- PopupItem (omlfp->match_choice, "Accession");
- PopupItem (omlfp->match_choice, "Local ID");
- PopupItem (omlfp->match_choice, "Organism Taxonomy Name");
- PopupItem (omlfp->match_choice, "TMSMART ID");
- PopupItem (omlfp->match_choice, "BankIt ID");
- PopupItem (omlfp->match_choice, "General ID");
- PopupItem (omlfp->match_choice, "None");
- SetValue (omlfp->match_choice, eMatchNone);
-
- /* list of organism modifiers */
- qual_selection_list = GetSourceQualDescList (TRUE, TRUE, FALSE, FALSE);
-
- ValNodeAddPointer (&qual_selection_list, 1, StringSave ("Tax Name"));
-
- /* note - the ValNodeSelectionDialog will free the qual_selection_list when done */
- omlfp->apply_choice_dlg = ValNodeSelectionDialog (g, qual_selection_list, 8, SourceQualValNodeName,
- ValNodeSimpleDataFree, SourceQualValNodeDataCopy,
- SourceQualValNodeMatch, "qual choice",
- SetFormModsAccept, parent_form, FALSE);
-
- SetValue (omlfp->action_choice, 1);
-}
-
static void CleanupOrgModLoadForm (
GraphiC g,
VoidPtr data
@@ -11286,7 +1462,7 @@ static void CleanupOrgModLoadForm (
form_data = (OrgModLoadFormPtr)data;
if (form_data == NULL) return;
- MemFree (form_data->line_forms);
+ form_data->columns = MemFree (form_data->columns);
CleanUpTableData (form_data->line_list);
StdCleanupFormProc (g, data);
}
@@ -11669,36 +1845,31 @@ static ValNodePtr TableToBioSourceListFree (ValNodePtr vnp)
}
-static TableToBioSourcePtr TableToBioSourceFromTableLine (OrgModLoadFormPtr f, TableLinePtr tlp)
+static TableToBioSourcePtr TableToBioSourceFromTableLine (OrgModTableColumnPtr PNTR o_list, Int4 num_columns, TableLinePtr tlp)
{
Int4 column_index;
ValNodePtr part;
TableToBioSourcePtr t;
- Int4 action_choice, match_choice;
ApplyColumnPtr a;
- if (f == NULL || tlp == NULL || tlp->parts == NULL) return NULL;
+ if (o_list == NULL || tlp == NULL || tlp->parts == NULL) return NULL;
t = (TableToBioSourcePtr) MemNew (sizeof (TableToBioSourceData));
for (column_index = 0, part = tlp->parts;
- column_index < f->num_line_forms;
+ column_index < num_columns;
column_index ++)
{
- action_choice = GetValue (f->line_forms[column_index].action_choice);
- if (action_choice == 1)
+ if (o_list[column_index] == NULL) continue;
+ if (o_list[column_index]->match_choice > 0
+ && o_list[column_index]->match_choice != eMatchNone
+ && part != NULL)
{
- if (part != NULL)
- {
- match_choice = GetValue (f->line_forms[column_index].match_choice);
- if (match_choice != eMatchNone) {
- ValNodeAddPointer (&(t->identifiers), match_choice, StringSave (part->data.ptrvalue));
- }
- }
+ ValNodeAddPointer (&(t->identifiers), o_list[column_index]->match_choice, StringSave (part->data.ptrvalue));
}
- else if (action_choice == 2)
+ else if (o_list[column_index]->apply_choice != NULL)
{
a = (ApplyColumnPtr) MemNew (sizeof (ApplyColumnData));
- a->apply_choice = DialogToPointer (f->line_forms[column_index].apply_choice_dlg);
+ a->apply_choice = SourceQualValNodeDataCopy (o_list[column_index]->apply_choice);
if (part == NULL)
{
a->apply_value = StringSave ("");
@@ -11707,6 +1878,7 @@ static TableToBioSourcePtr TableToBioSourceFromTableLine (OrgModLoadFormPtr f, T
{
a->apply_value = StringSave (part->data.ptrvalue);
}
+
ValNodeAddPointer (&(t->columns_to_apply), 0, a);
}
@@ -11723,13 +1895,28 @@ static ValNodePtr OrgModLoadFormToApplyList (OrgModLoadFormPtr f)
{
ValNodePtr line;
ValNodePtr apply_list = NULL;
+ ValNodePtr column_options = NULL;
+ Int4 column_index;
+ OrgModTableColumnPtr PNTR o_list;
if (f == NULL) return NULL;
+ o_list = (OrgModTableColumnPtr PNTR) MemNew (f->num_columns * sizeof (OrgModTableColumnPtr));
+ for (column_index = 0; column_index < f->num_columns; column_index++)
+ {
+ o_list[column_index] = (OrgModTableColumnPtr) DialogToPointer (f->columns[column_index]);
+ }
+
for (line = f->line_list; line != NULL; line = line->next)
{
- ValNodeAddPointer (&apply_list, 0, TableToBioSourceFromTableLine (f, line->data.ptrvalue));
+ ValNodeAddPointer (&apply_list, 0, TableToBioSourceFromTableLine (o_list, f->num_columns, line->data.ptrvalue));
}
+
+ for (column_index = 0; column_index < f->num_columns; column_index++)
+ {
+ o_list[column_index] = OrgModTableColumnFree (o_list[column_index]);
+ }
+ o_list = MemFree (o_list);
return apply_list;
}
@@ -11903,7 +2090,32 @@ static Boolean ListOrganismsWithMultipleRows (ValNodePtr apply_list)
{
if (vnp_biop2->data.ptrvalue == biop)
{
- fprintf (lip->fp, "Two rows (%d and %d) match the same organism.\n", row1_num, row2_num);
+ fprintf (lip->fp, "Two rows (%d and %d) match the same organism", row1_num, row2_num);
+ if (t->identifiers != NULL && t->identifiers->data.ptrvalue != NULL
+ && t2->identifiers != NULL && t2->identifiers->data.ptrvalue != NULL)
+ {
+ if (StringCmp (t->identifiers->data.ptrvalue, t2->identifiers->data.ptrvalue) == 0)
+ {
+ fprintf (lip->fp, " (both are %s).\n", t->identifiers->data.ptrvalue);
+ }
+ else
+ {
+ fprintf (lip->fp, " (%s and %s).\n", t->identifiers->data.ptrvalue, t2->identifiers->data.ptrvalue);
+ }
+ }
+ else if (t->identifiers != NULL && t->identifiers->data.ptrvalue != NULL)
+ {
+ fprintf (lip->fp, " (%s).\n", t->identifiers->data.ptrvalue);
+ }
+ else if (t2->identifiers != NULL && t2->identifiers->data.ptrvalue != NULL)
+ {
+ fprintf (lip->fp, " (%s).\n", t2->identifiers->data.ptrvalue);
+ }
+ else
+ {
+ fprintf (lip->fp, ".\n");
+ }
+
lip->data_in_log = TRUE;
}
}
@@ -12094,7 +2306,12 @@ static GetSamplePtr DetectExistingModifiersForTableToBioSourceList (ValNodePtr a
}
-static void ApplyOneTableToBioSource (TableToBioSourcePtr t, Boolean replace_with_blank, ExistingTextPtr etp)
+static void
+ApplyOneTableToBioSource
+(TableToBioSourcePtr t,
+ Boolean replace_with_blank,
+ ExistingTextPtr etp,
+ TaxnameOptionsPtr taxname_options)
{
ValNodePtr vnp_col, vnp_biop;
BioSourcePtr biop;
@@ -12122,7 +2339,8 @@ static void ApplyOneTableToBioSource (TableToBioSourcePtr t, Boolean replace_wit
&& (StringICmp (a->apply_choice->data.ptrvalue, "Tax Name") == 0
|| StringICmp (a->apply_choice->data.ptrvalue, "Organism") == 0))
{
- ApplyTaxNameToOrg (biop, a->apply_value, etp);
+ ApplyTaxNameToOrg (biop, a->apply_value, etp);
+ ApplyTaxnameOptionsToBioSource (biop, taxname_options);
}
else if (a->apply_choice->choice > 0 && StringICmp (a->apply_choice->data.ptrvalue, "Location") == 0)
{
@@ -12133,13 +2351,18 @@ static void ApplyOneTableToBioSource (TableToBioSourcePtr t, Boolean replace_wit
}
-static void ApplyTableToBioSourceList (ValNodePtr apply_list, Boolean replace_with_blank, ExistingTextPtr etp)
+static void
+ApplyTableToBioSourceList
+(ValNodePtr apply_list,
+ Boolean replace_with_blank,
+ ExistingTextPtr etp,
+ TaxnameOptionsPtr taxname_options)
{
ValNodePtr vnp;
for (vnp = apply_list; vnp != NULL; vnp = vnp->next)
{
- ApplyOneTableToBioSource (vnp->data.ptrvalue, replace_with_blank, etp);
+ ApplyOneTableToBioSource (vnp->data.ptrvalue, replace_with_blank, etp, taxname_options);
}
}
@@ -12152,6 +2375,7 @@ static void DoAcceptFormMods (ButtoN b)
ValNodePtr apply_list;
Boolean replace_with_blank;
ExistingTextPtr etp;
+ TaxnameOptionsPtr taxname_options;
form_data = GetObjectExtra (b);
if (form_data == NULL) return;
@@ -12164,7 +2388,7 @@ static void DoAcceptFormMods (ButtoN b)
FindOrganismsForTableToBioSourceList (apply_list, sep);
if (ListOrganismsWithMultipleRows (apply_list))
{
- Message (MSG_ERROR, "Multiple rows in the table apply to the same organism!");
+ Message (MSG_ERROR, "Multiple rows in the table apply to the same organism! Table cannot be imported.");
apply_list = TableToBioSourceListFree (apply_list);
return;
}
@@ -12185,7 +2409,9 @@ static void DoAcceptFormMods (ButtoN b)
apply_list = TableToBioSourceListFree (apply_list);
return;
}
- ApplyTableToBioSourceList (apply_list, replace_with_blank, etp);
+ taxname_options = DialogToPointer (form_data->taxname_options);
+ ApplyTableToBioSourceList (apply_list, replace_with_blank, etp, taxname_options);
+ taxname_options = MemFree (taxname_options);
etp = MemFree (etp);
apply_list = TableToBioSourceListFree (apply_list);
@@ -12198,6 +2424,7 @@ static void DoAcceptFormMods (ButtoN b)
}
}
+
static ValNodePtr ReadTableData (void)
{
Char path [PATH_MAX];
@@ -12208,6 +2435,7 @@ static ValNodePtr ReadTableData (void)
ValNodePtr vnp;
ReadBufferData rbd;
CharPtr line;
+ ValNodePtr special_list = NULL;
path [0] = '\0';
if (! GetInputFileName (path, sizeof (path), NULL, "TEXT")) return NULL;
@@ -12222,7 +2450,7 @@ static ValNodePtr ReadTableData (void)
line = AbstractReadFunction (&rbd);
while (line != NULL)
{
- tlp = MakeTableData (line);
+ tlp = MakeTableData (line, &special_list);
if (tlp != NULL)
{
vnp = ValNodeNew (line_list);
@@ -12239,8 +2467,13 @@ static ValNodePtr ReadTableData (void)
line = AbstractReadFunction (&rbd);
}
FileClose (rbd.fp);
+ if (special_list != NULL && !FixSpecialCharactersForStringsInList (special_list, "The table contains special characters\nand cannot be used until they are replaced.", FALSE))
+ {
+ line_list = ValNodeFreeData (line_list);
+ header_line = NULL;
+ }
/* throw out all lines before header line */
- if (header_line != line_list)
+ else if (header_line != line_list)
{
vnp = line_list;
while (vnp != NULL && vnp->next != header_line)
@@ -12251,10 +2484,44 @@ static ValNodePtr ReadTableData (void)
ValNodeFreeData (line_list);
line_list = NULL;
}
+ special_list = FreeContextList (special_list);
return header_line;
}
-extern void LoadOrganismModifierTable (IteM i)
+
+static Int4Ptr GetColumnBlankCounts (ValNodePtr header_line, Int4 num_columns)
+{
+ ValNodePtr line_vnp, part_vnp;
+ TableLinePtr tlp;
+ Int4 i;
+ Int4Ptr blank_list;
+
+ if (header_line == NULL || num_columns < 1) return NULL;
+
+ blank_list = (Int4Ptr) MemNew (sizeof (Int4) * num_columns);
+
+ for (line_vnp = header_line; line_vnp != NULL; line_vnp = line_vnp->next)
+ {
+ if (line_vnp->data.ptrvalue == NULL) continue;
+ tlp = (TableLinePtr) line_vnp->data.ptrvalue;
+ part_vnp = tlp->parts;
+ for (i = 0; i < num_columns; i++)
+ {
+ if (part_vnp == NULL || StringHasNoText (part_vnp->data.ptrvalue))
+ {
+ blank_list[i]++;
+ }
+ if (part_vnp != NULL)
+ {
+ part_vnp = part_vnp->next;
+ }
+ }
+ }
+ return blank_list;
+}
+
+
+static void LoadOrganismModifierTableEx (IteM i, Boolean IsTaxConsult)
{
BaseFormPtr bfp;
ValNodePtr header_line;
@@ -12265,6 +2532,8 @@ extern void LoadOrganismModifierTable (IteM i)
OrgModLoadFormPtr form_data;
Int4 index;
Int4 max_columns;
+ Int4Ptr blank_list = NULL;
+ OrgModTableColumnData o;
#ifdef WIN_MAC
bfp = currentFormDataPtr;
@@ -12286,9 +2555,9 @@ extern void LoadOrganismModifierTable (IteM i)
if (form_data == NULL) return;
form_data->entityID = bfp->input_entityID;
form_data->line_list = header_line;
- form_data->num_line_forms = max_columns;
- form_data->line_forms = MemNew (max_columns * sizeof (OrgModLineFormData));
- if (form_data->line_forms == NULL) return;
+
+ form_data->num_columns = max_columns;
+ form_data->columns = (DialoG PNTR) MemNew (max_columns * sizeof (DialoG));
/* now create a dialog to display values */
w = FixedWindow (-50, -33, -10, -10, "Table Conversion", StdCloseWindowProc);
@@ -12298,36 +2567,61 @@ extern void LoadOrganismModifierTable (IteM i)
h = HiddenGroup (w, -1, 0, NULL);
SetGroupSpacing (h, 10, 10);
g = HiddenGroup (h, 3, 0, NULL);
+
+ /* pre-analyze table for blanks, so we can display the information in the column dialogs */
+ blank_list = GetColumnBlankCounts (header_line, form_data->num_columns);
+
tlp = header_line->data.ptrvalue;
- vnp = tlp->parts;
- for (index = 0; index < max_columns; index++)
+ for (index = 0, vnp = tlp->parts; index < max_columns; index++)
{
- BuildOrgModLineForm (vnp->data.ptrvalue, index, g,
- form_data->line_forms + index, form_data);
- vnp = vnp->next;
+ form_data->columns[index] = OrgModTableColumnDialog (g, vnp == NULL ? NULL : vnp->data.ptrvalue,
+ blank_list == NULL ? 0 : blank_list[index],
+ SetFormModsEnable, form_data);
+ if (vnp != NULL) vnp = vnp->next;
}
+ blank_list = MemFree (blank_list);
+ if (max_columns > 1 && IsTaxConsult)
+ {
+ o.match_choice = eMatchAccession;
+ o.apply_choice = NULL;
+ PointerToDialog (form_data->columns[0], &o);
+ o.match_choice = 0;
+ ValNodeAddPointer (&o.apply_choice, 1, "Tax Name");
+ PointerToDialog (form_data->columns[1], &o);
+ o.apply_choice = ValNodeFree (o.apply_choice);
+ }
+
k = HiddenGroup (h, 1, 0, NULL);
form_data->replace_with_blank_btn = CheckBox (k, "Erase current value when blank found in table", NULL);
+ form_data->taxname_options = TaxnameOptionsDialog (h, NULL, NULL);
+ Disable (form_data->taxname_options);
+
c = HiddenGroup (h, 4, 0, NULL);
form_data->accept_button = DefaultButton (c, "Accept", DoAcceptFormMods);
SetObjectExtra (form_data->accept_button, form_data, NULL);
- Disable (form_data->accept_button);
PushButton (c, "Cancel", StdCancelButtonProc);
form_data->leave_dlg_up_btn = CheckBox (c, "Leave Dialog Up", NULL);
- AlignObjects (ALIGN_CENTER, (HANDLE) g, (HANDLE) k, (HANDLE) c, NULL);
+ SetFormModsEnable(form_data);
+
+ AlignObjects (ALIGN_CENTER, (HANDLE) g, (HANDLE) k, (HANDLE) form_data->taxname_options, (HANDLE) c, NULL);
RealizeWindow (w);
Show (w);
Update ();
}
-typedef struct orgmodlinedata
+extern void LoadOrganismModifierTable (IteM i)
+{
+ LoadOrganismModifierTableEx (i, FALSE);
+}
+
+extern void LoadTaxConsult (IteM i)
{
- Int4 column_number;
- Int4 apply_choice;
-} OrgModLineData, PNTR OrgModLinePtr;
+ LoadOrganismModifierTableEx (i, TRUE);
+}
+
extern Boolean ReplaceImportModifierName (CharPtr PNTR orig_name, Int4 col_num)
{
@@ -12568,7 +2862,7 @@ static void ExportOneOrganism (BioSourcePtr biop, Pointer userdata)
}
/* print modifiers for each available column */
- for (i= 0; i < NumDefLineModifiers; i++)
+ for (i= 0; i < NumDefLineModifiers (); i++)
{
if (eotp->modList[i].any_present)
{
@@ -12630,13 +2924,17 @@ static void ExportOrganisms (SeqEntryPtr sep, ExportOrgTablePtr eotp)
{
BioseqSetPtr bssp;
SeqEntryPtr nsep;
+ BioseqPtr bsp;
if (sep == NULL || eotp == NULL || sep->data.ptrvalue == NULL) return;
if (IS_Bioseq (sep))
{
- eotp->bsp = (BioseqPtr) sep->data.ptrvalue;
- VisitBioSourcesOnBsp (eotp->bsp, eotp, ExportOneOrganism);
+ bsp = (BioseqPtr) sep->data.ptrvalue;
+ if (bsp != NULL && !ISA_aa (bsp->mol)) {
+ eotp->bsp = bsp;
+ VisitBioSourcesOnBsp (eotp->bsp, eotp, ExportOneOrganism);
+ }
}
else if (IS_Bioseq_set (sep))
{
@@ -12876,7 +3174,7 @@ static Boolean SelectModifiersForExport (ExportOrgTablePtr eotp)
return FALSE;
}
- for (idx = 0; idx < NumDefLineModifiers; idx++)
+ for (idx = 0; idx < NumDefLineModifiers (); idx++)
{
if (eotp->modList[idx].any_present)
{
@@ -12989,7 +3287,7 @@ static Boolean SelectModifiersForExport (ExportOrgTablePtr eotp)
selected_mods = NULL;
}
- for (idx = 0; idx < NumDefLineModifiers; idx++)
+ for (idx = 0; idx < NumDefLineModifiers (); idx++)
{
if (eotp->modList[idx].any_present)
{
@@ -13037,7 +3335,7 @@ extern void ExportOrganismTable (IteM i)
sep = GetTopSeqEntryForEntityID (bfp->input_entityID);
if (sep == NULL) return;
- eotd.modList = MemNew (NumDefLineModifiers * sizeof (ModifierItemLocalData));
+ eotd.modList = MemNew (NumDefLineModifiers () * sizeof (ModifierItemLocalData));
if (eotd.modList == NULL) return;
CountModifiers (eotd.modList, sep);
@@ -13080,7 +3378,7 @@ extern void ExportOrganismTable (IteM i)
lead_str [0] = '\t';
}
- for (idx = 0; idx < NumDefLineModifiers; idx++)
+ for (idx = 0; idx < NumDefLineModifiers (); idx++)
{
if (eotd.modList[idx].any_present)
{
@@ -13095,7 +3393,7 @@ extern void ExportOrganismTable (IteM i)
}
}
}
- for (idx=0; idx < NumDefLineModifiers; idx++)
+ for (idx=0; idx < NumDefLineModifiers (); idx++)
{
ValNodeFree (eotd.modList[idx].values_seen);
}
@@ -14190,6 +4488,266 @@ extern void LoadFeatureQualifierTable (IteM i)
Update ();
}
+
+typedef struct qualloadformdata {
+ FEATURE_FORM_BLOCK
+ ValNodePtr table;
+ DialoG list_dlg;
+ DialoG PNTR column_list;
+ Int4 num_columns;
+ ButtoN accept_button;
+} QualLoadFormData, PNTR QualLoadFormPtr;
+
+static void CleanupQualLoadForm (
+ GraphiC g,
+ VoidPtr data
+)
+{
+ QualLoadFormPtr form_data;
+
+ form_data = (QualLoadFormPtr)data;
+ if (form_data == NULL) return;
+ form_data->table = FreeTabTable (form_data->table);
+ StdCleanupFormProc (g, data);
+}
+
+
+static void ChangeTabColumnChoice (Pointer data)
+{
+ QualLoadFormPtr form_data;
+ Int4 i;
+ Boolean have_match = FALSE, have_apply = FALSE;
+ TabColumnConfigPtr t;
+ ValNodePtr err_list = NULL;
+
+ if (data == NULL) return;
+
+ form_data = (QualLoadFormPtr) data;
+ /* must have one and only one match choice, must have at least one apply choice */
+
+ if (form_data->list_dlg == NULL) {
+ for (i = 0; i < form_data->num_columns; i++) {
+ t = (TabColumnConfigPtr) DialogToPointer (form_data->column_list[i]);
+ if (t != NULL) {
+ if (t->match_type > 0) {
+ if (have_match) {
+ Disable (form_data->accept_button);
+ return;
+ } else {
+ have_match = TRUE;
+ }
+ } else if (!IsFieldTypeEmpty(t->field)) {
+ have_apply = TRUE;
+ }
+ }
+ t = TabColumnConfigFree (t);
+ }
+ if (have_match && have_apply) {
+ Enable (form_data->accept_button);
+ } else {
+ Disable (form_data->accept_button);
+ }
+ } else {
+ err_list = TestDialog (form_data->list_dlg);
+ if (err_list == NULL) {
+ Enable (form_data->accept_button);
+ } else {
+ Disable (form_data->accept_button);
+ err_list = ValNodeFree (err_list);
+ }
+ }
+}
+
+
+static void DoAcceptQuals (ButtoN b)
+{
+ QualLoadFormPtr form_data;
+ ValNodePtr columns = NULL;
+ Int4 i;
+ TabColumnConfigPtr t;
+ ValNodePtr err_list = NULL, vnp;
+ SeqEntryPtr sep;
+ LogInfoPtr lip;
+ ValNodePtr obj_table = NULL, dup_dest_errs;
+
+ form_data = (QualLoadFormPtr) GetObjectExtra (b);
+ if (form_data == NULL) return;
+
+ if (form_data->list_dlg == NULL) {
+ for (i = 0; i < form_data->num_columns; i++) {
+ t = DialogToPointer (form_data->column_list[i]);
+ ValNodeAddPointer (&columns, 0, t);
+ }
+ } else {
+ columns = DialogToPointer (form_data->list_dlg);
+ }
+
+ lip = OpenLog ("Table Problems");
+
+ err_list = ValidateTabTableValues (form_data->table, columns);
+ for (vnp = err_list; vnp != NULL; vnp = vnp->next) {
+ fprintf (lip->fp, "%s\n", vnp->data.ptrvalue);
+ lip->data_in_log = TRUE;
+ }
+ err_list = ValNodeFreeData (err_list);
+
+ sep = GetTopSeqEntryForEntityID (form_data->input_entityID);
+
+ obj_table = GetObjectTableForTabTable (sep, form_data->table, columns, &err_list);
+
+ dup_dest_errs = CheckObjTableForRowsThatApplyToTheSameDestination (obj_table);
+ if (dup_dest_errs != NULL) {
+ for (vnp = dup_dest_errs; vnp != NULL; vnp = vnp->next) {
+ fprintf (lip->fp, "%s\n", vnp->data.ptrvalue);
+ lip->data_in_log = TRUE;
+ }
+ CloseLog (lip);
+ Message (MSG_ERROR, "For one or more columns, two or more rows in the table apply to the same object. Cannot continue.");
+ dup_dest_errs = ValNodeFreeData (dup_dest_errs);
+ err_list = ValNodeFreeData (err_list);
+ FreeLog (lip);
+ columns = TabColumnConfigListFree (columns);
+ obj_table = FreeObjectTableForTabTable (obj_table);
+ return;
+ }
+
+ ValNodeLink (&err_list, CheckObjTableForExistingText (sep, form_data->table, columns, obj_table));
+
+ for (vnp = err_list; vnp != NULL; vnp = vnp->next) {
+ fprintf (lip->fp, "%s\n", vnp->data.ptrvalue);
+ lip->data_in_log = TRUE;
+ }
+ err_list = ValNodeFreeData (err_list);
+
+ CloseLog (lip);
+ if (lip->data_in_log) {
+ if (ANS_CANCEL == Message (MSG_OKC, "Continue with errors?")) {
+ columns = TabColumnConfigListFree (columns);
+ FreeLog (lip);
+ return;
+ }
+ }
+ FreeLog (lip);
+
+ err_list = ApplyTableValuesToObjectTable (sep, form_data->table, columns, obj_table);
+
+ lip = OpenLog ("Table Problems");
+ for (vnp = err_list; vnp != NULL; vnp = vnp->next) {
+ fprintf (lip->fp, "%s\n", vnp->data.ptrvalue);
+ lip->data_in_log = TRUE;
+ }
+ err_list = ValNodeFreeData (err_list);
+ CloseLog (lip);
+ FreeLog (lip);
+ columns = TabColumnConfigListFree (columns);
+ obj_table = FreeObjectTableForTabTable (obj_table);
+ ObjMgrSetDirtyFlag (form_data->input_entityID, TRUE);
+ ObjMgrSendMsg (OM_MSG_UPDATE, form_data->input_entityID, 0, 0);
+ Remove (form_data->form);
+ Update();
+
+}
+
+extern void NewLoadFeatureQualifierTable (IteM i)
+{
+ BaseFormPtr bfp;
+ Char path [PATH_MAX];
+ FILE *fp;
+
+ ValNodePtr table, blank_list;
+ ValNodePtr col_vnp, blank_vnp;
+ Int4 index;
+ WindoW w;
+ GrouP h, g, c;
+ QualLoadFormPtr form_data;
+ CharPtr title;
+ Int4 col_for_list = 3;
+ Char buf[15];
+ ValNodePtr special_list;
+
+#ifdef WIN_MAC
+ bfp = currentFormDataPtr;
+#else
+ bfp = GetObjectExtra (i);
+#endif
+ if (bfp == NULL) return;
+
+ path [0] = '\0';
+ if (! GetInputFileName (path, sizeof (path), NULL, "TEXT")) return;
+
+ fp = FileOpen (path, "r");
+
+ table = ReadTabTableFromFile (fp);
+ FileClose (fp);
+ if (table == NULL) return;
+ special_list = ScanTabTableForSpecialCharacters (table);
+ if (special_list != NULL
+ && !FixSpecialCharactersForStringsInList (special_list,
+ "The table contains special characters\nand cannot be used until they are replaced.",
+ FALSE)) {
+ special_list = FreeContextList (special_list);
+ return;
+ }
+ special_list = FreeContextList (special_list);
+
+ form_data = MemNew (sizeof (QualLoadFormData));
+ if (form_data == NULL) return;
+ form_data->input_entityID = bfp->input_entityID;
+ form_data->table = table;
+ blank_list = CountTabTableBlanks (form_data->table);
+ form_data->num_columns = ValNodeLen (blank_list);
+ form_data->column_list = (DialoG PNTR) MemNew (sizeof (DialoG) * form_data->num_columns);
+
+ /* now create a dialog to display values */
+ w = FixedWindow (-50, -33, -10, -10, "Apply Qualifiers", StdCloseWindowProc);
+ SetObjectExtra (w, form_data, CleanupQualLoadForm);
+ form_data->form = (ForM) w;
+
+ h = HiddenGroup (w, -1, 0, NULL);
+ SetGroupSpacing (h, 10, 10);
+
+ if (GetSequinAppParam ("SETTINGS", "tablecolumns", NULL, buf, sizeof (buf))) {
+ col_for_list = atoi (buf);
+ }
+
+
+ if (form_data->num_columns >= col_for_list) {
+ form_data->list_dlg = TabColumnConfigListDialog (h, form_data->table->data.ptrvalue, blank_list, ChangeTabColumnChoice, form_data);
+ g = (GrouP) form_data->list_dlg;
+ } else {
+ g = HiddenGroup (h, 3, 0, NULL);
+ col_vnp = form_data->table->data.ptrvalue;
+ blank_vnp = blank_list;
+ for (index = 0; index < form_data->num_columns; index++) {
+ if (col_vnp == NULL || StringHasNoText (col_vnp->data.ptrvalue)) {
+ title = "First row value is blank";
+ } else {
+ title = col_vnp->data.ptrvalue;
+ }
+ form_data->column_list[index] = TabColumnConfigDialog (g, title, blank_vnp->data.intvalue, ChangeTabColumnChoice, form_data);
+ if (col_vnp != NULL) {
+ col_vnp = col_vnp->next;
+ }
+ blank_vnp = blank_vnp->next;
+ }
+ }
+ c = HiddenGroup (h, 4, 0, NULL);
+ form_data->accept_button = DefaultButton (c, "Accept", DoAcceptQuals);
+ SetObjectExtra (form_data->accept_button, form_data, NULL);
+ Disable (form_data->accept_button);
+ PushButton (c, "Cancel", StdCancelButtonProc);
+
+ AlignObjects (ALIGN_CENTER,
+ (HANDLE) g,
+ (HANDLE) c, NULL);
+
+ RealizeWindow (w);
+ Show (w);
+ Update ();
+ blank_list = ValNodeFree (blank_list);
+}
+
+
typedef struct prefixformdata {
FEATURE_FORM_BLOCK
@@ -14212,7 +4770,7 @@ static void CleanupPrefixForm (
if (pfp != NULL) {
if (pfp->modList != NULL)
{
- for (i=0; i < NumDefLineModifiers; i++)
+ for (i=0; i < NumDefLineModifiers (); i++)
{
ValNodeFree (pfp->modList[i].values_seen);
}
@@ -14236,7 +4794,7 @@ static Int4 GetDefLineModifierPopupIndex (
want_index = 0;
for (index = 0;
- index < NumDefLineModifiers && want_index < popup_index;
+ index < NumDefLineModifiers () && want_index < popup_index;
index++)
{
if (modList [index].any_present)
@@ -14244,7 +4802,7 @@ static Int4 GetDefLineModifierPopupIndex (
want_index ++;
}
}
- if (index >= NumDefLineModifiers || index == 0
+ if (index >= NumDefLineModifiers () || index == 0
|| want_index < popup_index)
{
return -1;
@@ -14304,13 +4862,13 @@ static void AddPrefixesToOneDefLine (
if (orp == NULL) return;
onp = orp->orgname;
if (onp == NULL) return;
- for (index = 0; index < NumDefLineModifiers; index ++)
+ for (index = 0; index < NumDefLineModifiers (); index ++)
{
if (pfp->popup_list [ index] != NULL
&& (popup_choice = GetValue (pfp->popup_list [ index])) > 0)
{
qual_index = GetDefLineModifierPopupIndex (popup_choice, pfp->modList);
- if (qual_index < 0 || qual_index >= NumDefLineModifiers) continue;
+ if (qual_index < 0 || qual_index >= NumDefLineModifiers ()) continue;
if (DefLineModifiers[qual_index].isOrgMod)
{
mod = onp->mod;
@@ -14326,11 +4884,11 @@ static void AddPrefixesToOneDefLine (
{
sprintf (modifier_text, "from ");
if (no_semicolon_len > sizeof (modifier_text) - 6) {
- prefix_len = sizeof (modifier_text) - 1;
+ prefix_len = sizeof (modifier_text) - 1;
no_semicolon_len = sizeof (modifier_text) - 6;
- } else {
- prefix_len = no_semicolon_len + 5;
- }
+ } else {
+ prefix_len = no_semicolon_len + 5;
+ }
StringNCpy (modifier_text + 5, mod->subname, no_semicolon_len);
modifier_text[prefix_len] = 0;
}
@@ -14341,10 +4899,10 @@ static void AddPrefixesToOneDefLine (
StringCat (modifier_text, " ");
if (no_semicolon_len > sizeof (modifier_text) - StringLen (modifier_text) - 1) {
no_semicolon_len = sizeof (modifier_text) - StringLen (modifier_text) - 1;
- prefix_len = sizeof (modifier_text) - 1;
- } else {
- prefix_len = no_semicolon_len + StringLen (modifier_text);
- }
+ prefix_len = sizeof (modifier_text) - 1;
+ } else {
+ prefix_len = no_semicolon_len + StringLen (modifier_text);
+ }
StringNCat (modifier_text, mod->subname, no_semicolon_len);
modifier_text[prefix_len] = 0;
@@ -14486,7 +5044,7 @@ extern void PrefixDefLines (IteM i)
sep = GetTopSeqEntryForEntityID (bfp->input_entityID);
if (sep == NULL) return;
- modList = MemNew (NumDefLineModifiers * sizeof (ModifierItemLocalData));
+ modList = MemNew (NumDefLineModifiers () * sizeof (ModifierItemLocalData));
if (modList == NULL) return;
CountModifiers (modList, sep);
@@ -14494,7 +5052,7 @@ extern void PrefixDefLines (IteM i)
if (pfp == NULL) return;
pfp->input_entityID = bfp->input_entityID;
pfp->modList = modList;
- pfp->popup_list = MemNew (sizeof (PopuP) * NumDefLineModifiers);
+ pfp->popup_list = MemNew (sizeof (PopuP) * NumDefLineModifiers ());
if (pfp->popup_list == NULL) return;
w = FixedWindow (-50, -33, -10, -10, "Definition Line Prefixes",
@@ -14505,12 +5063,12 @@ extern void PrefixDefLines (IteM i)
h = HiddenGroup (w, -1, 0, NULL);
SetGroupSpacing (h, 10, 10);
g = HiddenGroup (h, 4, 0, NULL);
- for (index = 0; index < NumDefLineModifiers; index++)
+ for (index = 0; index < NumDefLineModifiers (); index++)
{
pfp->popup_list [index] = NULL;
}
popup_index = 0;
- for (index = 0; index < NumDefLineModifiers; index++)
+ for (index = 0; index < NumDefLineModifiers (); index++)
{
if (modList [ index].any_present)
{
@@ -14519,7 +5077,7 @@ extern void PrefixDefLines (IteM i)
StaticPrompt (k, label, 0, popupMenuHeight, programFont, 'l');
pfp->popup_list[popup_index] = PopupList (k, TRUE, NULL);
listed_index = 0;
- for (item_index = 0; item_index < NumDefLineModifiers; item_index ++)
+ for (item_index = 0; item_index < NumDefLineModifiers (); item_index ++)
{
if (modList [item_index].any_present)
{
@@ -15840,53 +6398,6 @@ static SeqFeatPtr GetFeatureForFieldByMatchList (ValNodePtr field, ValNodePtr ma
}
-static SeqFeatPtr GetmRNAForFeature (SeqFeatPtr sfp)
-{
- SeqMgrFeatContext fcontext;
- BioseqPtr pbsp;
-
- if (sfp == NULL) return NULL;
- if (sfp->data.choice == SEQFEAT_PROT)
- {
- pbsp = BioseqFindFromSeqLoc (sfp->location);
- sfp = SeqMgrGetCDSgivenProduct (pbsp, NULL);
- if (sfp == NULL) return NULL;
- }
- return SeqMgrGetOverlappingmRNA (sfp->location, &fcontext);
-}
-
-
-static Int4Ptr GetColumnBlankCounts (ValNodePtr header_line, Int4 num_columns)
-{
- ValNodePtr line_vnp, part_vnp;
- TableLinePtr tlp;
- Int4 i;
- Int4Ptr blank_list;
-
- if (header_line == NULL || num_columns < 1) return NULL;
-
- blank_list = (Int4Ptr) MemNew (sizeof (Int4) * num_columns);
-
- for (line_vnp = header_line; line_vnp != NULL; line_vnp = line_vnp->next)
- {
- if (line_vnp->data.ptrvalue == NULL) continue;
- tlp = (TableLinePtr) line_vnp->data.ptrvalue;
- part_vnp = tlp->parts;
- for (i = 0; i < num_columns; i++)
- {
- if (part_vnp == NULL || StringHasNoText (part_vnp->data.ptrvalue))
- {
- blank_list[i]++;
- }
- if (part_vnp != NULL)
- {
- part_vnp = part_vnp->next;
- }
- }
- }
- return blank_list;
-}
-
static void
GetExistingValueCounts
(TableLinePtr tlp,
@@ -15941,40 +6452,6 @@ GetExistingValueCounts
}
-static Boolean AdjustmRNAProductToMatchProteinProduct (SeqFeatPtr sfp)
-{
- SeqFeatPtr mrna;
- ProtRefPtr prp;
- RnaRefPtr rrp;
-
- if (sfp == NULL || sfp->data.choice != SEQFEAT_PROT) return FALSE;
-
- prp = (ProtRefPtr) sfp->data.value.ptrvalue;
- mrna = GetmRNAForFeature (sfp);
-
- if (mrna == NULL) return FALSE;
-
- rrp = (RnaRefPtr) mrna->data.value.ptrvalue;
- if (rrp == NULL)
- {
- rrp = RnaRefNew();
- mrna->data.value.ptrvalue = rrp;
- }
-
- rrp->ext.value.ptrvalue = MemFree (rrp->ext.value.ptrvalue);
- if (prp == NULL || prp->name == NULL || StringHasNoText (prp->name->data.ptrvalue))
- {
- rrp->ext.choice = 0;
- }
- else
- {
- rrp->ext.choice = 1;
- rrp->ext.value.ptrvalue = StringSave (prp->name->data.ptrvalue);
- }
- return TRUE;
-}
-
-
static Int4
ApplyProteinIDTableLine
(TableLinePtr tlp,
@@ -15991,14 +6468,16 @@ ApplyProteinIDTableLine
if (tlp == NULL || f_list == NULL || match_list == NULL) return 0;
- for (index = 0, vnp = tlp->parts; index < num_columns && vnp != NULL; index++, vnp = vnp->next)
+ index = 0;
+ vnp = tlp->parts;
+ while (index < num_columns)
{
if (f_list[index]->field_choice != NULL)
{
sfp = GetFeatureForFieldByMatchList (f_list[index]->field_choice, match_list, &errors);
if (sfp != NULL)
{
- if (StringHasNoText (vnp->data.ptrvalue))
+ if (vnp == NULL || StringHasNoText (vnp->data.ptrvalue))
{
if (f_list[index]->erase_when_blank)
{
@@ -16026,6 +6505,11 @@ ApplyProteinIDTableLine
}
}
}
+ index++;
+ if (vnp != NULL)
+ {
+ vnp = vnp->next;
+ }
}
errors = ValNodeFreeData (errors);
return fields_affected;
@@ -16181,13 +6665,13 @@ static DialoG FeatureFieldColumnChoiceDialog
ButtoN b1, b2;
PrompT ppt;
CharPtr real_title;
- CharPtr title_fmt = "%s (%d are blank)";
+ CharPtr title_fmt = "(%d are blank)%s";
dlg = (FeatureFieldColumnChoiceDlgPtr) MemNew (sizeof (FeatureFieldColumnChoiceDlgData));
if (num_blank > 0) {
real_title = (CharPtr) MemNew (sizeof (Char) * (StringLen (title_fmt) + StringLen (title) + 15));
- sprintf (real_title, title_fmt, title, num_blank);
+ sprintf (real_title, title_fmt, num_blank, title);
} else {
real_title = title;
}
@@ -16605,3 +7089,594 @@ extern void LoadFeatureFieldTable (IteM i)
Update ();
}
+static Pointer GetRevSectionSequence (Uint1 data_choice, Pointer data, Pointer metadata)
+{
+ BioseqPtr bsp;
+ Char id_str[45];
+
+ if (data == NULL)
+ {
+ return NULL;
+ }
+ else
+ {
+ bsp = (BioseqPtr) data;
+ SeqIdWrite (SeqIdFindBest (bsp->id, SEQID_GENBANK), id_str, PRINTID_REPORT, 39);
+ return StringSave (id_str);
+ }
+}
+
+
+static Pointer GetRevSectionInterval (Uint1 data_choice, Pointer data, Pointer metadata)
+{
+ BioseqPtr bsp;
+ DeltaSeqPtr dsp;
+ Uint1 seg_num = 0;
+ Int4 pos = 0;
+ SeqLocPtr loc;
+ SeqLitPtr slip;
+ Char buf[50];
+
+ if ((bsp = (BioseqPtr)data) == NULL || bsp->repr != Seq_repr_delta || bsp->seq_ext == NULL)
+ {
+ return NULL;
+ }
+
+ for (dsp = (DeltaSeqPtr)(bsp->seq_ext); dsp != NULL; dsp = dsp->next) {
+ switch (dsp->choice)
+ {
+ case 1: /* SeqLocPtr */
+ if ((loc = (SeqLocPtr)dsp->data.ptrvalue) != NULL) {
+ if (loc->choice != SEQLOC_NULL) {
+ seg_num++;
+ pos += SeqLocLen (loc);
+ }
+ }
+ break;
+ case 2: /* SeqLitPtr */
+ slip = (SeqLitPtr)(dsp->data.ptrvalue);
+ if (slip != NULL) {
+ if (slip->seq_data != NULL) {
+ if (seg_num == data_choice) {
+ sprintf (buf, "%d-%d", pos + 1, pos + 1 + slip->length);
+ return StringSave (buf);
+ } else {
+ seg_num++;
+ }
+ pos += slip->length;
+ }
+ }
+ break;
+ }
+ }
+ return NULL;
+}
+
+
+static BulkEdFieldData revsection_fields[] = {
+ { "Sequence", NULL, NULL, GetRevSectionSequence, BulkDisplaySimpleText, BulkFreeSimpleText, NULL, BulkFormatSimpleText, NULL, NULL, BulkSimpleTextCopy },
+ { "Interval", NULL, NULL, GetRevSectionInterval, BulkDisplaySimpleText, BulkFreeSimpleText, NULL, BulkFormatSimpleText, NULL, NULL, BulkSimpleTextCopy },
+ { NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}};
+
+
+typedef struct deltaseqint {
+ BioseqPtr bsp;
+ Int4 start;
+ Int4 stop;
+ SeqLitPtr slip;
+} DeltaSeqIntData, PNTR DeltaSeqIntPtr;
+
+
+static DeltaSeqIntPtr DeltaSeqIntNew (BioseqPtr bsp, Int4 start, Int4 stop, SeqLitPtr slip)
+{
+ DeltaSeqIntPtr dsip;
+
+ dsip = (DeltaSeqIntPtr) MemNew (sizeof (DeltaSeqIntData));
+ dsip->bsp = bsp;
+ dsip->start = start;
+ dsip->stop = stop;
+ dsip->slip = slip;
+ return dsip;
+}
+
+
+static void ListDeltaSeqIntervalsCallback (BioseqPtr bsp, Pointer userdata)
+{
+ ValNodePtr PNTR interval_list;
+ DeltaSeqPtr dsp;
+ Uint1 seg_num = 0;
+ Int4 pos = 0;
+ SeqLocPtr loc;
+ SeqLitPtr slip;
+ Char id_str[45];
+ ClickableItemPtr cip;
+
+ if (bsp == NULL || bsp->repr != Seq_repr_delta || bsp->seq_ext == NULL || (interval_list = (ValNodePtr PNTR)userdata) == NULL) {
+ return;
+ }
+
+ SeqIdWrite (SeqIdFindBest (bsp->id, SEQID_GENBANK), id_str, PRINTID_REPORT, sizeof (id_str) - 1);
+
+ for (dsp = (DeltaSeqPtr)(bsp->seq_ext); dsp != NULL; dsp = dsp->next) {
+ switch (dsp->choice)
+ {
+ case 1: /* SeqLocPtr */
+ if ((loc = (SeqLocPtr)dsp->data.ptrvalue) != NULL) {
+ if (loc->choice != SEQLOC_NULL) {
+ seg_num++;
+ pos += SeqLocLen (loc);
+ }
+ }
+ break;
+ case 2: /* SeqLitPtr */
+ slip = (SeqLitPtr)(dsp->data.ptrvalue);
+ if (slip != NULL) {
+ if (slip->seq_data != NULL) {
+ cip = (ClickableItemPtr) MemNew (sizeof (ClickableItemData));
+ cip->description = (CharPtr) MemNew (sizeof (Char) * (StringLen (id_str) + 65));
+ sprintf (cip->description, "%s:%d-%d", id_str, pos + 1, pos + slip->length);
+ cip->clickable_item_type = seg_num;
+ ValNodeAddPointer (&cip->item_list, 0, DeltaSeqIntNew (bsp, pos, pos + slip->length - 1, slip));
+ ValNodeAddPointer (interval_list, 0, cip);
+ seg_num++;
+ }
+ pos += slip->length;
+ }
+ break;
+ }
+ }
+}
+
+
+static Int4 GetHighestInterval (ValNodePtr int_list)
+{
+ Int4 max = 0;
+ ClickableItemPtr cip;
+
+ while (int_list != NULL) {
+ cip = (ClickableItemPtr) int_list->data.ptrvalue;
+ if (cip != NULL && cip->clickable_item_type > max) {
+ max = cip->clickable_item_type;
+ }
+ int_list = int_list->next;
+ }
+ return max;
+}
+
+
+typedef struct revseqintform {
+ FORM_MESSAGE_BLOCK
+ DialoG clickable_list;
+ PopuP interval_choice;
+ ButtoN also_reverse_feats;
+ ValNodePtr delta_list;
+} RevSeqIntFormData, PNTR RevSeqIntFormPtr;
+
+static void CleanupRevSeqIntForm (GraphiC g, VoidPtr data)
+{
+ RevSeqIntFormPtr f;
+ ValNodePtr vnp;
+ ClickableItemPtr cip;
+
+ f = (RevSeqIntFormPtr) data;
+ if (f != NULL) {
+ for (vnp = f->delta_list; vnp != NULL; vnp = vnp->next) {
+ /* note - the rest of the ClickableItem will be freed by the clickableItemlist */
+ cip = (ClickableItemPtr) vnp->data.ptrvalue;
+ if (cip != NULL && cip->item_list != NULL) {
+ cip->item_list->data.ptrvalue = MemFree (cip->item_list->data.ptrvalue);
+ }
+ }
+ }
+ StdCleanupFormProc (g, data);
+}
+
+
+static void CheckIntervals (ButtoN b)
+{
+ RevSeqIntFormPtr f;
+ ValNodePtr vnp;
+ ClickableItemPtr cip;
+ Int4 val;
+
+ f = (RevSeqIntFormPtr) GetObjectExtra (b);
+ if (f == NULL) return;
+
+ val = GetValue (f->interval_choice);
+ for (vnp = f->delta_list; vnp != NULL; vnp = vnp->next) {
+ cip = (ClickableItemPtr) vnp->data.ptrvalue;
+ if (cip != NULL && cip->clickable_item_type == val - 1) {
+ cip->chosen = TRUE;
+ }
+ }
+ PointerToDialog (f->clickable_list, f->delta_list);
+}
+
+
+static Int4 RevCompCoordInInterval (Int4 coord, Int4 start, Int4 stop)
+{
+ Int4 offset;
+
+ if (coord < start || coord > stop) return coord;
+
+ offset = coord - start;
+ coord = stop - offset;
+ return coord;
+}
+
+
+static void RevCompIntFuzz (IntFuzzPtr ifp, Int4 start, Int4 stop)
+{
+ Int4 tmp, offset;
+
+ if (ifp == NULL) return;
+
+ switch (ifp->choice)
+ {
+ case 1: /* plus/minus - no changes */
+ case 3: /* percent - no changes */
+ break;
+ case 2: /* range */
+ tmp = RevCompCoordInInterval (ifp->a, start, stop);
+ ifp->a = RevCompCoordInInterval (ifp->b, start, stop);
+ ifp->b = tmp;
+ break;
+ case 4: /* lim */
+ switch (ifp->a)
+ {
+ case 1: /* greater than */
+ ifp->a = 2;
+ break;
+ case 2: /* less than */
+ ifp->a = 1;
+ break;
+ case 3: /* to right of residue */
+ ifp->a = 4;
+ break;
+ case 4: /* to left of residue */
+ ifp->a = 3;
+ break;
+ default:
+ break;
+ }
+ break;
+ }
+}
+
+static Uint1 RevStrand (Uint1 strand)
+{
+ if (strand == Seq_strand_minus) {
+ strand = Seq_strand_plus;
+ } else {
+ strand = Seq_strand_minus;
+ }
+ return strand;
+}
+
+
+static void RevCompSeqPntForFlippedInterval (SeqPntPtr spp, BioseqPtr bsp, Int4 start, Int4 stop)
+{
+
+ if (spp == NULL || bsp == NULL) return;
+ if (!SeqIdIn (spp->id, bsp->id)) return;
+ if (spp->point < start || spp->point > stop) return;
+
+ /* flip */
+ spp->point = RevCompCoordInInterval (spp->point, start, stop);
+ spp->strand = RevStrand (spp->strand);
+ RevCompIntFuzz (spp->fuzz, start, stop);
+}
+
+
+static void RevCompLocationForFlippedInterval (SeqLocPtr head, BioseqPtr bsp, Int4 start, Int4 stop)
+{
+ SeqLocPtr newhead = NULL, slp;
+ SeqIntPtr sip;
+ SeqPntPtr spp;
+ PackSeqPntPtr pspp, pspp2;
+ SeqBondPtr sbp;
+ SeqIdPtr oldids;
+ Int4 numpnt, i, tpos, tmp;
+ Boolean do_rev;
+ IntFuzzPtr ifp;
+
+ if ((head == NULL) || (bsp == NULL)) return;
+
+ oldids = bsp->id;
+ switch (head->choice)
+ {
+ case SEQLOC_BOND: /* bond -- 2 seqs */
+ sbp = (SeqBondPtr)(head->data.ptrvalue);
+ RevCompSeqPntForFlippedInterval (sbp->a, bsp, start, stop);
+ RevCompSeqPntForFlippedInterval (sbp->b, bsp, start, stop);
+ break;
+ case SEQLOC_FEAT: /* feat -- can't track yet */
+ case SEQLOC_NULL: /* NULL */
+ case SEQLOC_EMPTY: /* empty */
+ break;
+ case SEQLOC_WHOLE: /* whole */
+ /* nothing to reverse */
+ break;
+ case SEQLOC_EQUIV: /* does it stay equiv? */
+ case SEQLOC_MIX: /* mix -- more than one seq */
+ case SEQLOC_PACKED_INT: /* packed int */
+ for (slp = (SeqLocPtr)(head->data.ptrvalue); slp != NULL; slp = slp->next)
+ {
+ RevCompLocationForFlippedInterval (slp, bsp, start, stop);
+ }
+ break;
+ case SEQLOC_INT: /* int */
+ sip = (SeqIntPtr)(head->data.ptrvalue);
+ if (SeqIdIn(sip->id, oldids))
+ {
+ if (sip->from < start || sip->to > stop) {
+ /* not contained in interval */
+ break;
+ }
+ tmp = RevCompCoordInInterval (sip->from, start, stop);
+ sip->from = RevCompCoordInInterval (sip->to, start, stop);
+ sip->to = tmp;
+ sip->strand = RevStrand (sip->strand);
+ RevCompIntFuzz (sip->if_to, start, stop);
+ RevCompIntFuzz (sip->if_from, start, stop);
+ ifp = sip->if_to;
+ sip->if_to = sip->if_from;
+ sip->if_from = ifp;
+ }
+ break;
+ case SEQLOC_PNT: /* pnt */
+ spp = (SeqPntPtr)(head->data.ptrvalue);
+ RevCompSeqPntForFlippedInterval (spp, bsp, start, stop);
+ break;
+ case SEQLOC_PACKED_PNT: /* packed pnt */
+ pspp = (PackSeqPntPtr)(head->data.ptrvalue);
+ do_rev = FALSE;
+ if (SeqIdIn(pspp->id, oldids))
+ {
+ do_rev = TRUE;
+ numpnt = PackSeqPntNum(pspp);
+ /* can only reverse set if all are in interval */
+ for (i = 0; i < numpnt && do_rev; i++)
+ {
+ tpos = PackSeqPntGet(pspp, i);
+ if (tpos < start || tpos > stop) {
+ do_rev = FALSE;
+ }
+ }
+ if (do_rev) {
+ pspp2 = PackSeqPntNew();
+ pspp2->id = pspp->id;
+ pspp2->fuzz = pspp->fuzz;
+ pspp->fuzz = NULL;
+ RevCompIntFuzz (pspp2->fuzz, start, stop);
+ for (i = 0; i < numpnt && do_rev; i++)
+ {
+ tpos = PackSeqPntGet(pspp, i);
+ tpos = RevCompCoordInInterval (tpos, start, stop);
+ PackSeqPntPut (pspp2, tpos);
+ }
+ pspp2->strand = RevStrand (pspp->strand);
+ pspp = PackSeqPntFree (pspp);
+ head->data.ptrvalue = pspp2;
+ }
+ }
+ break;
+ default:
+ break;
+ }
+}
+
+
+static void RevCompOneFeatForBioseqInterval (SeqFeatPtr sfp, BioseqPtr bsp, Int4 start, Int4 stop)
+{
+ CodeBreakPtr cbp;
+ CdRegionPtr crp;
+ RnaRefPtr rrp;
+ tRNAPtr trp;
+
+ if (sfp == NULL || bsp == NULL) return;
+
+ RevCompLocationForFlippedInterval (sfp->location, bsp, start, stop);
+ switch (sfp->data.choice) {
+ case SEQFEAT_CDREGION :
+ crp = (CdRegionPtr) sfp->data.value.ptrvalue;
+ if (crp != NULL) {
+ for (cbp = crp->code_break; cbp != NULL; cbp = cbp->next) {
+ RevCompLocationForFlippedInterval (cbp->loc, bsp, start, stop);
+ }
+ }
+ break;
+ case SEQFEAT_RNA :
+ rrp = (RnaRefPtr) sfp->data.value.ptrvalue;
+ if (rrp != NULL && rrp->ext.choice == 2) {
+ trp = (tRNAPtr) rrp->ext.value.ptrvalue;
+ if (trp != NULL && trp->anticodon != NULL) {
+ RevCompLocationForFlippedInterval (trp->anticodon, bsp, start, stop);
+ }
+ }
+ break;
+ default :
+ break;
+ }
+}
+
+
+static void FlipSelectedSequenceIntervals (ButtoN b)
+{
+ RevSeqIntFormPtr f;
+ ValNodePtr vnp;
+ ClickableItemPtr cip;
+ Int4 num_disc;
+ DeltaSeqIntPtr dsip;
+ Boolean rev_feats;
+ SeqFeatPtr sfp;
+ SeqMgrFeatContext fcontext;
+
+ f = (RevSeqIntFormPtr) GetObjectExtra (b);
+ if (f == NULL) return;
+ num_disc = CountChosenDiscrepancies (f->delta_list, FALSE);
+ if (num_disc == 0) {
+ Message (MSG_ERROR, "No intervals selected");
+ return;
+ }
+
+ rev_feats = GetStatus (f->also_reverse_feats);
+
+ for (vnp = f->delta_list; vnp != NULL; vnp = vnp->next) {
+ cip = (ClickableItemPtr) vnp->data.ptrvalue;
+ if (cip != NULL && cip->chosen && cip->item_list != NULL) {
+ dsip = (DeltaSeqIntPtr) cip->item_list->data.ptrvalue;
+ if (dsip != NULL && dsip->slip != NULL) {
+ ReverseSeqData (dsip->slip->seq_data_type, dsip->slip->length, dsip->slip->seq_data);
+ ComplementSeqData (dsip->slip->seq_data_type, dsip->slip->length, dsip->slip->seq_data);
+ if (rev_feats) {
+ for (sfp = SeqMgrGetNextFeature (dsip->bsp, NULL, 0, 0, &fcontext);
+ sfp != NULL && fcontext.left <= dsip->stop;
+ sfp = SeqMgrGetNextFeature (dsip->bsp, sfp, 0, 0, &fcontext)) {
+ if (fcontext.left >= dsip->start && fcontext.right <= dsip->stop) {
+ RevCompOneFeatForBioseqInterval (sfp, dsip->bsp, dsip->start, dsip->stop);
+ }
+ }
+ }
+ }
+ }
+ }
+ Update ();
+ ObjMgrSetDirtyFlag (f->input_entityID, TRUE);
+ ObjMgrSendMsg (OM_MSG_UPDATE, f->input_entityID, 0, 0);
+ Remove (f->form);
+}
+
+NLM_EXTERN void FlipSequenceIntervals (IteM i)
+{
+ BaseFormPtr bfp;
+ RevSeqIntFormPtr f;
+ SeqEntryPtr sep;
+ WindoW w;
+ GrouP h, g, c;
+ ButtoN b;
+ ValNodePtr delta_list = NULL;
+ Int4 max, n;
+ Char buf[15];
+
+#ifdef WIN_MAC
+ bfp = currentFormDataPtr;
+#else
+ bfp = GetObjectExtra (i);
+#endif
+ if (bfp == NULL || bfp->input_entityID == 0) return;
+
+ sep = GetTopSeqEntryForEntityID (bfp->input_entityID);
+
+ VisitBioseqsInSep (sep, &delta_list, ListDeltaSeqIntervalsCallback);
+
+ if (delta_list == NULL)
+ {
+ Message (MSG_OK, "No sequence intervals");
+ return;
+ }
+
+
+ f = (RevSeqIntFormPtr) MemNew (sizeof (RevSeqIntFormData));
+ if (f == NULL)
+ {
+ return;
+ }
+ f->delta_list = delta_list;
+
+ f->input_entityID = bfp->input_entityID;
+ w = FixedWindow (-50, -33, -10, -10, "Reverse Sequence Intervals", StdCloseWindowProc);
+ SetObjectExtra (w, f, CleanupRevSeqIntForm);
+ f->form = (ForM) w;
+
+ h = HiddenGroup (w, -1, 0, NULL);
+ SetGroupSpacing (h, 10, 10);
+
+ f->clickable_list = CreateClickableListDialog (h, "Intervals", "",
+ NULL, NULL, NULL, NULL);
+ PointerToDialog (f->clickable_list, f->delta_list);
+
+ max = GetHighestInterval (f->delta_list);
+
+ g = HiddenGroup (h, 4, 0, NULL);
+ StaticPrompt (g, "Check Interval ", 0, popupMenuHeight, programFont, 'l');
+ f->interval_choice = PopupList (g, TRUE, NULL);
+ for (n = 0; n <= max; n++) {
+ sprintf (buf, "%d", n + 1);
+ PopupItem (f->interval_choice, buf);
+ }
+ SetValue (f->interval_choice, 1);
+ StaticPrompt (g, " for every sequence", 0, popupMenuHeight, programFont, 'l');
+ b = PushButton (g, "Check", CheckIntervals);
+ SetObjectExtra (b, f, NULL);
+
+ f->also_reverse_feats = CheckBox (h, "Also reverse features", NULL);
+
+ c = HiddenGroup (h, 4, 0, NULL);
+ SetGroupSpacing (c, 10, 10);
+
+ b = PushButton (c, "Flip Checked Intervals", FlipSelectedSequenceIntervals);
+ SetObjectExtra (b, f, NULL);
+
+ PushButton (c, "Dismiss", StdCancelButtonProc);
+
+ AlignObjects (ALIGN_CENTER, (HANDLE) f->clickable_list, (HANDLE) g, (HANDLE) f->also_reverse_feats, (HANDLE) c, NULL);
+
+ RealizeWindow (w);
+
+ Show (w);
+}
+
+
+#ifdef OS_MSWIN
+#include <undefwin.h>
+#include <windows.h>
+
+NLM_EXTERN Int4 RunSilent(const char *cmdline) {
+ int status = -1;
+
+ STARTUPINFO StartupInfo;
+ PROCESS_INFORMATION ProcessInfo;
+
+ DWORD dwCreateFlags;
+
+#ifndef COMP_METRO
+ /* code warrior headers do not have this, so comment out to allow compilation */
+ _flushall();
+#endif
+
+ /* Set startup info */
+ memset(&StartupInfo, 0, sizeof(StartupInfo));
+ StartupInfo.cb = sizeof(STARTUPINFO);
+ StartupInfo.dwFlags = STARTF_USESHOWWINDOW;
+ StartupInfo.wShowWindow = SW_HIDE;
+ dwCreateFlags = CREATE_NEW_CONSOLE;
+
+ /* Run program */
+ if (CreateProcess(NULL, (LPSTR)cmdline, NULL, NULL, FALSE,
+ dwCreateFlags, NULL, NULL, &StartupInfo, &ProcessInfo))
+ {
+ /* wait running process */
+ DWORD exitcode = -1;
+ WaitForSingleObject(ProcessInfo.hProcess, INFINITE);
+ GetExitCodeProcess(ProcessInfo.hProcess, &exitcode);
+ status = exitcode;
+ CloseHandle(ProcessInfo.hProcess);
+ CloseHandle(ProcessInfo.hThread);
+ }
+ else
+ {
+ DWORD dw = GetLastError();
+ /* check for common errors first */
+ if(dw == ERROR_FILE_NOT_FOUND)
+ Message(MSG_ERROR, "CreateProcess() failed: file not found.");
+ else
+ /* generic error message */
+ Message(MSG_ERROR, "CreateProcess() failed, error code %d.",
+ (int)dw);
+ }
+
+ return status;
+}
+#endif
+
diff --git a/sequin/sequin2.c b/sequin/sequin2.c
index ebec40d1..b2372c1d 100644
--- a/sequin/sequin2.c
+++ b/sequin/sequin2.c
@@ -29,7 +29,7 @@
*
* Version Creation Date: 1/22/95
*
-* $Revision: 6.636 $
+* $Revision: 6.647 $
*
* File Description:
*
@@ -70,6 +70,7 @@
#endif
#include <actutils.h>
#include <salpanel.h>
+#include <findrepl.h>
extern EnumFieldAssoc biosource_genome_simple_alist [];
extern EnumFieldAssoc biosource_origin_alist [];
@@ -86,7 +87,8 @@ static ENUM_ALIST(biomol_nucX_alist)
{"Other-Genetic", 9},
{"cRNA", 11},
{"Small nucleolar RNA", 12},
- {"Transcribed RNA", 13},
+ {"Transcribed RNA", 13},
+ {"Transfer-messenger RNA", MOLECULE_TYPE_TMRNA },
END_ENUM_ALIST
static ENUM_ALIST(biomol_nucGen_alist)
@@ -4231,6 +4233,45 @@ static Int4 FindLineForBadReadChar (FILE *fp, Char badchar)
}
+static void CleanTitles (SeqEntryPtr sep, ValNodePtr PNTR special_list)
+{
+ BioseqPtr bsp;
+ BioseqSetPtr bssp;
+ SeqDescrPtr sdp = NULL;
+
+ while (sep != NULL)
+ {
+ sdp = NULL;
+ if (sep->choice == 1)
+ {
+ bsp = sep->data.ptrvalue;
+ if (bsp != NULL)
+ {
+ sdp = bsp->descr;
+ }
+ }
+ else if (sep->choice == 2)
+ {
+ bssp = sep->data.ptrvalue;
+ if (bssp != NULL)
+ {
+ CleanTitles (bssp->seq_set, special_list);
+ sdp = bssp->descr;
+ }
+ }
+ while (sdp != NULL)
+ {
+ if (sdp->choice == Seq_descr_title)
+ {
+ SpecialCharFindWithContext ((CharPtr PNTR) &(sdp->data.ptrvalue), special_list, NULL, NULL);
+ }
+ sdp = sdp->next;
+ }
+ sep = sep->next;
+ }
+}
+
+
static SeqEntryPtr ImportOnlyProteinSequences
(FILE *fp,
SeqEntryPtr sep_list,
@@ -4245,6 +4286,7 @@ static SeqEntryPtr ImportOnlyProteinSequences
Boolean error_reading = FALSE;
Int4 pos, bad_start;
BioseqPtr bsp;
+ ValNodePtr special_list = NULL;
oldscope = SeqEntrySetScope (NULL);
@@ -4306,6 +4348,15 @@ static SeqEntryPtr ImportOnlyProteinSequences
Message (MSG_ERROR, "Unable to read file, starting at line %d!", bad_start);
new_list = SeqEntryFree (new_list);
}
+ else
+ {
+ CleanTitles (new_list, &special_list);
+ if (!FixSpecialCharactersForStringsInList (special_list, "Definition lines contain special characters.\nThe sequences cannot be imported unless the characters are replaced.", FALSE))
+ {
+ new_list = SeqEntryFree (new_list);
+ }
+ special_list = FreeContextList (special_list);
+ }
lastsep = sep_list;
while (lastsep != NULL && lastsep->next != NULL)
@@ -4351,6 +4402,7 @@ ImportSequencesFromFile
Boolean this_chars_stripped = FALSE;
Boolean isASN = FALSE, isOnlyFASTA = FALSE;
Int4 bad_start = 0, bad_line = 0;
+ ValNodePtr special_list = NULL;
if (chars_stripped != NULL)
{
@@ -4570,6 +4622,15 @@ ImportSequencesFromFile
}
new_sep_list = SeqEntryFree (new_sep_list);
}
+ else
+ {
+ CleanTitles (new_sep_list, &special_list);
+ if (!FixSpecialCharactersForStringsInList (special_list, "Definition lines contain special characters.\nThe sequences cannot be imported unless the characters are replaced.", FALSE))
+ {
+ new_sep_list = SeqEntryFree (new_sep_list);
+ }
+ special_list = FreeContextList (special_list);
+ }
last = sep_list;
while (last != NULL && last->next != NULL)
@@ -7113,8 +7174,6 @@ extern BioSourcePtr ExtractFromDeflineToBioSource (CharPtr defline, BioSourcePtr
}
-static void RemoveTaxRef (OrgRefPtr orp);
-
extern Boolean ProcessOneNucleotideTitle (Int2 seqPackage,
SeqEntryPtr nsep, SeqEntryPtr top);
@@ -8784,6 +8843,44 @@ PickCodingRegionLocationsForProteinNucleotidePairs
return !errors_found;
}
+
+static Int2 FindGeneticCodeForBioseq (BioseqPtr bsp, Int2 default_code)
+{
+ Int2 code = default_code;
+ BioSourcePtr biop;
+ SeqEntryPtr nsep;
+ BioseqSetPtr bssp;
+ SeqDescrPtr sdp = NULL;
+
+ if (bsp == NULL) return default_code;
+ nsep = GetBestTopParentForData (ObjMgrGetEntityIDForPointer (bsp), bsp);
+ if (nsep == NULL || nsep->data.ptrvalue == NULL) return default_code;
+ if (nsep->choice == 1)
+ {
+ bsp = nsep->data.ptrvalue;
+ sdp = bsp->descr;
+ }
+ else if (nsep->choice == 2)
+ {
+ bssp = nsep->data.ptrvalue;
+ sdp = bssp->descr;
+ }
+ while (sdp != NULL)
+ {
+ if (sdp->choice == Seq_descr_source && sdp->data.ptrvalue != NULL)
+ {
+ biop = (BioSourcePtr) sdp->data.ptrvalue;
+ if (biop->org != NULL && biop->org->orgname != NULL)
+ {
+ code = BioSourceToGeneticCode (biop);
+ }
+ }
+ sdp = sdp->next;
+ }
+ return code;
+}
+
+
/* This function takes a ValNode list of coding region SeqLocs,
* the list of nucleotide sequences, and the list of protein sequences
* and creates the nuc-prot sets.
@@ -8803,6 +8900,7 @@ AssignProteinsToSelectedNucleotides
BioseqPtr PNTR bsp_array;
Int4 prot_num;
ValNodePtr descr = NULL;
+ Int2 genCode;
if (assoc_list == NULL || nuc_list == NULL || prot_list == NULL)
{
@@ -8856,10 +8954,12 @@ AssignProteinsToSelectedNucleotides
{
nsep = GetBestTopParentForData (ObjMgrGetEntityIDForPointer (nbsp), nbsp);
}
+ genCode = FindGeneticCodeForBioseq (nbsp, code);
if (nsep != NULL && nsep->data.ptrvalue == nbsp) {
descr = ExtractBioSourceAndPubs (nsep);
}
- AssignOneProtein (prot_sep, sqfp, nsep, vnp_assoc->loc, nbsp, code, makeMRNA);
+ AssignOneProtein (prot_sep, sqfp, nsep, vnp_assoc->loc, nbsp,
+ genCode, makeMRNA);
if (descr != NULL) {
ReplaceBioSourceAndPubs (nsep, descr);
}
@@ -9051,14 +9151,13 @@ static void ReplaceDuplicateProteinIDs (SeqEntryPtr nuc_list, SeqEntryPtr prot_l
if (cp != NULL) {
*cp = 0;
}
+ tmp_str = StringSave (tmp_str);
iatep_prot->id_list [prot_seq_num_check] = MemFree (iatep_prot->id_list [prot_seq_num_check]);
iatep_prot->id_list [prot_seq_num_check] = BuildProteinIDUniqueInIDAndTitleEdit (tmp_str,
iatep_nuc,
iatep_prot);
- if (cp != NULL) {
- *cp = '|';
- }
+ tmp_str = MemFree (tmp_str);
}
}
}
@@ -11645,12 +11744,16 @@ static CharPtr SuggestCorrectBracketing (CharPtr str)
if (*next_next_next_token == '=')
{
step_back = GetModNameStartFromEqLoc (next_next_next_token, next_next_token);
- while (step_back > next_next_token + 1
- && isspace (*(step_back - 1)))
- {
- step_back --;
+ if (step_back == next_next_token) {
+ /* no name before second equals sign, put bracket after value */
+ } else {
+ while (step_back > next_next_token + 1
+ && isspace (*(step_back - 1)))
+ {
+ step_back --;
+ }
+ offset = step_back - new_str;
}
- offset = step_back - new_str;
}
}
tmp_new = InsertStringAtOffset (new_str, "]", offset);
@@ -26174,6 +26277,25 @@ extern void DownloadAndDisplay (Int4 uid)
}
}
+
+static Boolean IsAllDigits (CharPtr str)
+{
+ CharPtr cp;
+
+ if (StringHasNoText (str)) return FALSE;
+
+ cp = str;
+ while (*cp != 0 && isdigit (*cp)) {
+ cp++;
+ }
+ if (*cp == 0) {
+ return TRUE;
+ } else {
+ return FALSE;
+ }
+}
+
+
static void DownloadProc (ButtoN b)
{
@@ -26189,6 +26311,7 @@ static void DownloadProc (ButtoN b)
Int2 handled;
Boolean idTypes [NUM_SEQID];
Boolean isReplaced = FALSE;
+ Boolean isTrace = FALSE;
SeqEntryPtr sep;
Char str [32];
Int4 uid;
@@ -26244,15 +26367,23 @@ static void DownloadProc (ButtoN b)
}
SeqIdFree (sip);
*/
- uid = AccessionToGi (str);
- accn = str;
+ if (StringNICmp (str, "ti|", 3) == 0 && IsAllDigits (str + 3)) {
+ if (! StrToLong (str + 3, &uid)) {
+ uid = 0;
+ } else {
+ isTrace = TRUE;
+ }
+ } else {
+ uid = AccessionToGi (str);
+ accn = str;
+ }
} else {
if (! StrToLong (str, &uid)) {
uid = 0;
}
}
if (uid > 0) {
- sep = PubSeqSynchronousQuery (uid, 0, -1);
+ sep = PubSeqSynchronousQueryEx (uid, 0, -1, isTrace);
/* EntrezFini (); */
if (sep == NULL) {
ArrowCursor ();
@@ -26525,13 +26656,12 @@ static void CancelFetchProc (ButtoN b)
Select (startupForm);
}
+
static void FetchTextProc (TexT t)
{
Boolean alldigits;
- Char ch;
FetchFormPtr ffp;
- CharPtr ptr;
Char str [32];
ffp = (FetchFormPtr) GetObjectExtra (t);
@@ -26542,16 +26672,7 @@ static void FetchTextProc (TexT t)
} else {
SafeEnable (ffp->accept);
TrimSpacesAroundString (str);
- alldigits = TRUE;
- ptr = str;
- ch = *ptr;
- while (ch != '\0') {
- if (! IS_DIGIT (ch)) {
- alldigits = FALSE;
- }
- ptr++;
- ch = *ptr;
- }
+ alldigits = IsAllDigits (str);
if (alldigits) {
SafeSetValue (ffp->accntype, 2);
} else {
@@ -27834,36 +27955,6 @@ extern ValNodePtr BuildFeatureValNodeList (
return head;
}
-static void RemoveTaxRef (OrgRefPtr orp)
-{
- ValNodePtr vnp, next;
- ValNodePtr PNTR prev;
- DbtagPtr dbt;
-
- if (orp == NULL)
- {
- return;
- }
-
- vnp = orp->db;
- if (vnp == NULL) return;
- prev = (ValNodePtr PNTR) &(orp->db);
- while (vnp != NULL) {
- next = vnp->next;
- dbt = (DbtagPtr) vnp->data.ptrvalue;
- if (dbt != NULL && StringICmp ((CharPtr) dbt->db, "taxon") == 0) {
- *prev = vnp->next;
- vnp->next = NULL;
- DbtagFree (dbt);
- ValNodeFree (vnp);
- } else {
- prev = (ValNodePtr PNTR) &(vnp->next);
- }
- vnp = next;
- }
-
-}
-
extern void RemoveOldName (OrgRefPtr orp)
{
OrgModPtr prev = NULL, curr, next_mod;
@@ -28739,6 +28830,9 @@ static LisT MakeAlignmentSequenceListControl (GrouP g, SeqEntryPtr sep, Nlm_LstA
typedef struct removeseqfromaligndata {
FORM_MESSAGE_BLOCK
+ DialoG clickable_list_dlg;
+ DialoG constraint_dlg;
+ ValNodePtr seq_list;
LisT sequence_list_ctrl;
SeqEntryPtr sep;
Boolean remove_all_from_alignments;
@@ -28929,21 +29023,14 @@ static void RemoveBioseqProducts (ValNodePtr product_feature_list, RemoveSeqFrom
}
}
-static void RemoveEmptyNucProtSet (SeqEntryPtr sep)
+static void RemoveNucProtSet (SeqEntryPtr sep)
{
BioseqSetPtr bssp;
- BioseqPtr bsp;
if (sep == NULL || !IS_Bioseq_set (sep)) return;
bssp = (BioseqSetPtr) sep->data.ptrvalue;
if (bssp->_class != BioseqseqSet_class_nuc_prot) return;
- for (sep = bssp->seq_set; sep != NULL; sep = sep->next)
- {
- if (!IS_Bioseq (sep)) return;
- bsp = sep->data.ptrvalue;
- if (bsp != NULL && !bsp->idx.deleteme) return;
- }
bssp->idx.deleteme = TRUE;
}
@@ -29003,66 +29090,6 @@ static void RemoveAlnOrProductNoAll (ButtoN b)
rp->done = TRUE;
}
-static Boolean GetRemoveAlignments (RemoveSeqFromAlignPtr rp, CharPtr idstr)
-{
- RemoveAlnOrProductAnsData rd;
-
- GrouP g, h, c;
- ButtoN b;
- CharPtr prompt_fmt = "%s is part of an alignment - would you like to remove it from the alignment before deleting it?";
- CharPtr prompt_str = NULL;
-
- if (rp == NULL || idstr == NULL) return FALSE;
- if (rp->remove_all_from_alignments) return TRUE;
- if (rp->no_remove_all_from_alignments) return FALSE;
-
- prompt_str = (CharPtr) MemNew (sizeof (Char) * (StringLen (prompt_fmt) + StringLen (idstr)));
- if (prompt_str == NULL) return FALSE;
- sprintf (prompt_str, prompt_fmt, idstr);
- rd.w = ModalWindow(-20, -13, -10, -10, NULL);
- h = HiddenGroup(rd.w, -1, 0, NULL);
- SetGroupSpacing (h, 10, 10);
- rd.done = FALSE;
- g = HiddenGroup (h, 1, 0, NULL);
- StaticPrompt (g, prompt_str, 0, popupMenuHeight, programFont, 'l');
- c = HiddenGroup (h, 4, 0, NULL);
- b = PushButton(c, "Yes", RemoveAlnOrProductYes);
- SetObjectExtra (b, &rd, NULL);
- b = PushButton(c, "Remove All", RemoveAlnOrProductYesAll);
- SetObjectExtra (b, &rd, NULL);
- b = DefaultButton(c, "No", RemoveAlnOrProductNo);
- SetObjectExtra (b, &rd, NULL);
- b = DefaultButton(c, "Remove None", RemoveAlnOrProductNoAll);
- SetObjectExtra (b, &rd, NULL);
- AlignObjects (ALIGN_CENTER, (HANDLE) g, (HANDLE) c, NULL);
- prompt_str = MemFree (prompt_str);
-
- Show(rd.w);
- Select (rd.w);
- rd.done = FALSE;
- while (!rd.done)
- {
- ProcessExternalEvent ();
- Update ();
- }
- ProcessAnEvent ();
- if (rd.do_all)
- {
- if (rd.ans)
- {
- rp->remove_all_from_alignments = TRUE;
- rp->no_remove_all_from_alignments = FALSE;
- }
- else
- {
- rp->remove_all_from_alignments = FALSE;
- rp->no_remove_all_from_alignments = TRUE;
- }
- }
- return rd.ans;
-}
-
-
static Boolean GetRemoveProducts (RemoveSeqFromAlignPtr rp, CharPtr idstr)
{
RemoveAlnOrProductAnsData rd;
@@ -29135,10 +29162,22 @@ static void RemoveBioseq (BioseqPtr bsp, RemoveSeqFromAlignPtr rp)
if (IsBioseqInAnyAlignment (bsp, rp->input_entityID))
{
- if (GetRemoveAlignments (rp, str))
+ if (!rp->remove_all_from_alignments && !rp->no_remove_all_from_alignments)
{
+ if (ANS_YES == Message (MSG_YN, "This sequence is part of an alignment. Would you like to remove it from the alignment?"))
+ {
+ rp->remove_all_from_alignments = TRUE;
+ }
+ else
+ {
+ rp->no_remove_all_from_alignments = TRUE;
+ }
+ }
+
+ if (rp->remove_all_from_alignments) {
RemoveSequenceFromAlignments (rp->sep, bsp->id);
}
+
}
VisitFeaturesOnBsp (bsp, &product_feature_list, DoesBioseqHaveFeaturesWithProductsCallback);
if (product_feature_list != NULL)
@@ -29150,10 +29189,11 @@ static void RemoveBioseq (BioseqPtr bsp, RemoveSeqFromAlignPtr rp)
}
bsp->idx.deleteme = TRUE;
- /* remove nuc-prot set if we are deleting the nucleotide and its proteins */
- sep = GetBestTopParentForData (rp->input_entityID, bsp);
- RemoveEmptyNucProtSet (sep);
-
+ if (ISA_na (bsp->mol)) {
+ /* remove nuc-prot set if we are deleting the nucleotide */
+ sep = GetBestTopParentForData (rp->input_entityID, bsp);
+ RemoveNucProtSet (sep);
+ }
ValNodeFree (product_feature_list);
}
@@ -29163,9 +29203,10 @@ static void DoRemoveSequencesFromRecord (ButtoN b)
{
RemoveSeqFromAlignPtr rp;
WindoW w;
- ValNodePtr sip_list, vnp;
- SeqIdPtr sip;
+ ValNodePtr vnp, item_vnp;
BioseqPtr bsp;
+ ClickableItemPtr cip;
+ Boolean any_removed = FALSE;
if (b == NULL) return;
rp = (RemoveSeqFromAlignPtr) GetObjectExtra (b);
@@ -29174,17 +29215,26 @@ static void DoRemoveSequencesFromRecord (ButtoN b)
w = (WindoW) rp->form;
Hide (w);
- sip_list = GetSelectedSequenceList (rp->sequence_list_ctrl);
- for (vnp = sip_list; vnp != NULL; vnp = vnp->next)
- {
- sip = (SeqIdPtr) vnp->data.ptrvalue;
- bsp = BioseqFind (sip);
- if (bsp != NULL)
- {
- RemoveBioseq (bsp, rp);
- }
+ for (vnp = rp->seq_list; vnp != NULL; vnp = vnp->next) {
+ cip = (ClickableItemPtr) vnp->data.ptrvalue;
+ if (!cip->chosen) continue;
+ if (cip != NULL && cip->item_list != NULL) {
+ for (item_vnp = cip->item_list; item_vnp != NULL; item_vnp = item_vnp->next) {
+ if (item_vnp->choice == OBJ_BIOSEQ) {
+ bsp = item_vnp->data.ptrvalue;
+ if (bsp != NULL) {
+ RemoveBioseq (bsp, rp);
+ any_removed = TRUE;
+ }
+ }
+ }
+ }
+ }
+ if (!any_removed) {
+ Show (w);
+ Message (MSG_ERROR, "You have not selected any sequences for removal!\n(Mark the sequences you want to remove by checking the box next to the sequence or by using the Mark button next to the constraint.)");
+ return;
}
- ValNodeFree (sip_list);
DeleteMarkedObjects (rp->input_entityID, 0, NULL);
ObjMgrSetDirtyFlag (rp->input_entityID, TRUE);
@@ -29192,6 +29242,34 @@ static void DoRemoveSequencesFromRecord (ButtoN b)
Remove (rp->form);
}
+
+static void SelectSequenceIDsForRemoval (ButtoN b)
+{
+ RemoveSeqFromAlignPtr rp;
+ StringConstraintXPtr scp;
+
+ rp = (RemoveSeqFromAlignPtr) GetObjectExtra (b);
+ if (rp == NULL) return;
+
+ scp = DialogToPointer (rp->constraint_dlg);
+ ChooseCategoriesByStringConstraint (rp->seq_list, scp, TRUE);
+ PointerToDialog (rp->clickable_list_dlg, rp->seq_list);
+ scp = StringConstraintXFree (scp);
+}
+
+
+static void UnselectAllSequences (ButtoN b)
+{
+ RemoveSeqFromAlignPtr rp;
+
+ rp = (RemoveSeqFromAlignPtr) GetObjectExtra (b);
+ if (rp != NULL) {
+ ChooseCategories (rp->seq_list, FALSE);
+ PointerToDialog (rp->clickable_list_dlg, rp->seq_list);
+ }
+}
+
+
extern void RemoveSequencesFromRecord (IteM i)
{
BaseFormPtr bfp;
@@ -29199,6 +29277,9 @@ extern void RemoveSequencesFromRecord (IteM i)
RemoveSeqFromAlignPtr rp;
GrouP h, k, c;
ButtoN b;
+ SeqEntryPtr sep;
+ StringConstraintData scd;
+ PrompT ppt;
#ifdef WIN_MAC
bfp = currentFormDataPtr;
@@ -29233,16 +29314,43 @@ extern void RemoveSequencesFromRecord (IteM i)
SetObjectExtra (w, rp, StdCleanupFormProc);
h = HiddenGroup (w, -1, 0, NULL);
+
+ rp->clickable_list_dlg = CreateClickableListDialogEx (h, "Sequences to Remove", "",
+ "Use checkbox to mark sequences to remove",
+ "Single click to navigate to sequence in record",
+ ScrollToDiscrepancyItem, EditDiscrepancyItem, NULL,
+ GetDiscrepancyItemText,
+ stdCharWidth * 30,
+ stdCharWidth * 30 + 5,
+ TRUE, FALSE);
+
k = HiddenGroup (h, 2, 0, NULL);
+ rp->constraint_dlg = StringConstraintDialogX (k, "Mark sequences where sequence ID", TRUE);
+ scd.insensitive = TRUE;
+ scd.match_location = eStringConstraintInList;
+ scd.match_text = NULL;
+ scd.not_present = FALSE;
+ scd.whole_word = FALSE;
+ PointerToDialog (rp->constraint_dlg, &scd);
+ b = PushButton (k, "Mark", SelectSequenceIDsForRemoval);
+ SetObjectExtra (b, rp, NULL);
- rp->sequence_list_ctrl = MakeSequenceListControl (k, rp->sep, NULL, NULL, TRUE, TRUE);
+
+ sep = GetTopSeqEntryForEntityID (bfp->input_entityID);
+ VisitBioseqsInSep (sep, &(rp->seq_list), ListAllSequences);
+
+ PointerToDialog (rp->clickable_list_dlg, rp->seq_list);
+
+ ppt = StaticPrompt (h, "Warning - this will remove sequence from Sequin and SMART", 0, dialogTextHeight, programFont, 'c');
c = HiddenGroup (h, 4, 0, NULL);
b = DefaultButton (c, "Accept", DoRemoveSequencesFromRecord);
SetObjectExtra (b, rp, NULL);
+ b = PushButton (c, "Unmark All Sequences", UnselectAllSequences);
+ SetObjectExtra (b, rp, NULL);
b = PushButton (c, "Cancel", StdCancelButtonProc);
SetObjectExtra (b, rp, NULL);
- AlignObjects (ALIGN_CENTER, (HANDLE) k, (HANDLE) c, NULL);
+ AlignObjects (ALIGN_CENTER, (HANDLE) rp->clickable_list_dlg, (HANDLE) k, (HANDLE) ppt, (HANDLE) c, NULL);
RealizeWindow (w);
Show (w);
Update ();
diff --git a/sequin/sequin3.c b/sequin/sequin3.c
index 29a08245..e7157a87 100644
--- a/sequin/sequin3.c
+++ b/sequin/sequin3.c
@@ -29,7 +29,7 @@
*
* Version Creation Date: 1/22/95
*
-* $Revision: 6.825 $
+* $Revision: 6.861 $
*
* File Description:
*
@@ -74,7 +74,8 @@
#include <asn2gnbi.h>
#include <alignval.h>
#include <cdrgn.h>
-
+#include <macrodlg.h>
+#include <macroapi.h>
/* For converting primer names to primer seqs and vice versa */
static void PrimerSeqToPrimerNameCallback (BioSourcePtr biop, Pointer userdata)
@@ -153,6 +154,7 @@ typedef struct fndeldata {
Int4 gap_count;
Int4 bsp_length;
Boolean in_gap;
+ Boolean unk_gap;
ValNodePtr head;
ValNodePtr last;
} DelData, PNTR DelDataPtr;
@@ -163,6 +165,7 @@ static void AddNextBlock (
{
ByteStorePtr bs;
+ IntFuzzPtr ifp;
SeqLitPtr slitp;
CharPtr str;
ValNodePtr vnp;
@@ -173,6 +176,13 @@ static void AddNextBlock (
if (slitp != NULL) {
slitp->length = ddp->gap_count;
ddp->bsp_length += slitp->length;
+ if (ddp->unk_gap) {
+ ifp = IntFuzzNew ();
+ if (ifp != NULL) {
+ ifp->choice = 4;
+ slitp->fuzz = ifp;
+ }
+ }
vnp = ValNodeAddPointer (&(ddp->last), 2, (Pointer) slitp);
if (ddp->head == NULL) {
ddp->head = vnp;
@@ -222,10 +232,11 @@ static void LIBCALLBACK FarToNearCallback (
str = ddp->curr;
while (ch != '\0') {
- if (ch != '-') {
+ if (ch != '-' && ch != '+') {
if (ddp->in_gap) {
AddNextBlock (ddp);
ddp->in_gap = FALSE;
+ ddp->unk_gap = FALSE;
ddp->gap_count = 0;
ddp->curr = ddp->buffer;
ddp->seqlen = 0;
@@ -246,6 +257,7 @@ static void LIBCALLBACK FarToNearCallback (
if (! ddp->in_gap) {
AddNextBlock (ddp);
ddp->in_gap = TRUE;
+ ddp->unk_gap = (Boolean) (ch == '-');
ddp->gap_count = 0;
ddp->curr = ddp->buffer;
ddp->seqlen = 0;
@@ -272,7 +284,7 @@ static void FarToNearProc (BioseqPtr bsp, Pointer userdata)
if (dd.buffer == NULL) return;
dd.curr = dd.buffer;
dd.seqlen = 0;
- SeqPortStream (bsp, EXPAND_GAPS_TO_DASHES, (Pointer) &dd, FarToNearCallback);
+ SeqPortStream (bsp, EXPAND_GAPS_TO_DASHES | KNOWN_GAP_AS_PLUS, (Pointer) &dd, FarToNearCallback);
AddNextBlock (&dd);
MemFree (dd.buffer);
olddelta = bsp->seq_ext;
@@ -1107,7 +1119,8 @@ static void AddEnvironmentalSampleQual (BioSourcePtr biop, Pointer userdata)
if (biop == NULL || biop->org == NULL || biop->org->orgname == NULL) return;
- if (StringISearch (biop->org->orgname->lineage, "environmental sample") == NULL)
+ if (StringISearch (biop->org->orgname->lineage, "environmental sample") == NULL
+ && StringCmp (biop->org->orgname->div, "ENV") != 0)
{
return;
}
@@ -1340,6 +1353,45 @@ static void ReassignFeatIDs (IteM i)
Update ();
}
+static void UniqifyFeatIDs (IteM i)
+
+{
+ MsgAnswer ans;
+ BaseFormPtr bfp;
+ BioseqSetPtr bssp;
+ Int4 count;
+ Int4 offset = 0;
+ SeqEntryPtr sep;
+
+#ifdef WIN_MAC
+ bfp = currentFormDataPtr;
+#else
+ bfp = GetObjectExtra (i);
+#endif
+ if (bfp == NULL) return;
+ sep = GetTopSeqEntryForEntityID (bfp->input_entityID);
+ if (sep == NULL) return;
+
+ if (! IS_Bioseq_set (sep)) return;
+ bssp = (BioseqSetPtr) sep->data.ptrvalue;
+ if (bssp == NULL || bssp->_class != BioseqseqSet_class_genbank) return;
+
+ ans = Message (MSG_OKC, "Are you sure you want to make merged feature identifiers unique?");
+ if (ans == ANS_CANCEL) return;
+
+ for (sep = bssp->seq_set; sep != NULL; sep = sep->next) {
+ count = FindHighestFeatureID (sep);
+ OffsetFeatureIDs (sep, offset);
+ OffsetFeatureIDXrefs (sep, offset);
+ offset += count;
+ }
+
+ ObjMgrSetDirtyFlag (bfp->input_entityID, TRUE);
+ ObjMgrSendMsg (OM_MSG_UPDATE, bfp->input_entityID, 0, 0);
+ ObjMgrDeSelect (0, 0, 0, 0, NULL);
+ Update ();
+}
+
static void ClearFeatIDsAndLinks (IteM i)
{
@@ -1687,6 +1739,25 @@ static void ForceTaxonFixup (IteM i)
ForceTaxonFixupBtn (i, NULL);
}
+static void JustTaxonFixup (IteM i)
+
+{
+ BaseFormPtr bfp;
+ SeqEntryPtr sep;
+
+#ifdef WIN_MAC
+ bfp = currentFormDataPtr;
+#else
+ bfp = GetObjectExtra (i);
+#endif
+ if (bfp == NULL) return;
+ sep = GetTopSeqEntryForEntityID (bfp->input_entityID);
+ if (sep == NULL) return;
+ Taxon3ReplaceOrgInSeqEntry (sep, FALSE);
+ ObjMgrSetDirtyFlag (bfp->input_entityID, TRUE);
+ ObjMgrSendMsg (OM_MSG_UPDATE, bfp->input_entityID, 0, 0);
+}
+
static void DupFeatRemovalWarning (SeqFeatPtr sfp)
{
@@ -4665,7 +4736,7 @@ ConvertRawBioseqToDelta
sep = GetTopSeqEntryForEntityID (bsp->idx.entityID);
- VisitFeaturesInSep (sep, bsp, AdjustCDSLocationsForUnknownGapsCallback);
+ VisitFeaturesInSep (sep, (Pointer) Sequin_GlobalAlign2Seq, AdjustCDSLocationsForUnknownGapsCallback);
}
@@ -4909,7 +4980,7 @@ static void DoConvertRawToDeltaWithGapLocations (ButtoN b)
if (GetStatus (dcp->adjust_CDS_locations))
{
- VisitFeaturesInSep (sep, NULL, AdjustCDSLocationsForUnknownGapsCallback);
+ VisitFeaturesInSep (sep, (Pointer)Sequin_GlobalAlign2Seq, AdjustCDSLocationsForUnknownGapsCallback);
DeleteMarkedObjects (dcp->input_entityID, 0, NULL);
}
@@ -7617,7 +7688,7 @@ static void DoConvertPubDescStringConstraint (ButtoN b)
Remove (cpdp->form);
}
-static void CreateConvertPubDescStringConstraintDialog (IteM i)
+static void CreateConvertPubDescStringConstraintDialogX (IteM i)
{
BaseFormPtr bfp;
ConvertPubDescPtr cpdp;
@@ -8032,6 +8103,27 @@ static void UpdateECnumbers (IteM i)
ObjMgrSendMsg (OM_MSG_UPDATE, bfp->input_entityID, 0, 0);
}
+
+static void ParseGoTermsFromUserFieldsItem (IteM i)
+
+{
+ BaseFormPtr bfp;
+ SeqEntryPtr sep;
+
+#ifdef WIN_MAC
+ bfp = currentFormDataPtr;
+#else
+ bfp = GetObjectExtra (i);
+#endif
+ if (bfp == NULL) return;
+ sep = GetTopSeqEntryForEntityID (bfp->input_entityID);
+ if (sep == NULL) return;
+ ParseGoTermsFromFields (sep);
+ ObjMgrSetDirtyFlag (bfp->input_entityID, TRUE);
+ ObjMgrSendMsg (OM_MSG_UPDATE, bfp->input_entityID, 0, 0);
+}
+
+
/*---------------------------------------------------------------------*/
/* */
/* HasInternalStops () -- Checks to see if a given protein has */
@@ -10010,24 +10102,11 @@ static void FreeMolInfoBlockData (MolInfoBlockPtr mibp)
}
-typedef struct sequenceconstraint
-{
- Boolean nucs_ok;
- Boolean prots_ok;
-
- Int4 other_constraint_type;
- StringConstraintPtr string_constraint;
- ChoiceConstraintPtr source_constraint;
- ValNodePtr feature_list;
-
-} SequenceConstraintData, PNTR SequenceConstraintPtr;
-
-
-static SequenceConstraintPtr SequenceConstraintFree (SequenceConstraintPtr scp)
+extern SequenceConstraintXPtr SequenceConstraintXFree (SequenceConstraintXPtr scp)
{
if (scp != NULL)
{
- scp->string_constraint = StringConstraintFree (scp->string_constraint);
+ scp->string_constraint = StringConstraintXFree (scp->string_constraint);
scp->source_constraint = ChoiceConstraintFree (scp->source_constraint);
scp->feature_list = ValNodeFree (scp->feature_list);
scp = MemFree (scp);
@@ -10046,7 +10125,7 @@ typedef struct sequenceconstraintdlg
DialoG feature_string_constraint;
DialoG id_string_constraint;
-} SequenceConstraintDlgData, PNTR SequenceConstraintDlgPtr;
+} SequenceConstraintXDlgData, PNTR SequenceConstraintXDlgPtr;
enum sequenceconstraintothertype
@@ -10058,12 +10137,12 @@ enum sequenceconstraintothertype
};
-static void ChangeSequenceConstraintType (GrouP g)
+static void ChangeSequenceConstraintXType (GrouP g)
{
- SequenceConstraintDlgPtr scdp;
+ SequenceConstraintXDlgPtr scdp;
Int4 other_constraint_type;
- scdp = (SequenceConstraintDlgPtr) GetObjectExtra (g);
+ scdp = (SequenceConstraintXDlgPtr) GetObjectExtra (g);
if (scdp == NULL)
{
return;
@@ -10086,11 +10165,11 @@ static void ChangeSequenceConstraintType (GrouP g)
}
}
-static void ResetSequenceConstraintDialog (DialoG d)
+static void ResetSequenceConstraintXDialog (DialoG d)
{
- SequenceConstraintDlgPtr scdp;
+ SequenceConstraintXDlgPtr scdp;
- scdp = (SequenceConstraintDlgPtr) GetObjectExtra (d);
+ scdp = (SequenceConstraintXDlgPtr) GetObjectExtra (d);
if (scdp == NULL)
{
return;
@@ -10098,25 +10177,25 @@ static void ResetSequenceConstraintDialog (DialoG d)
SetValue (scdp->seq_type_constraint, 1);
SetValue (scdp->other_constraint_type, SEQ_CONSTRAINT_ANY + 1);
- ChangeSequenceConstraintType (scdp->other_constraint_type);
+ ChangeSequenceConstraintXType (scdp->other_constraint_type);
}
-static void SequenceConstraintToDialog (DialoG d, Pointer data)
+static void SequenceConstraintXToDialog (DialoG d, Pointer data)
{
- SequenceConstraintPtr scp;
- SequenceConstraintDlgPtr scdp;
+ SequenceConstraintXPtr scp;
+ SequenceConstraintXDlgPtr scdp;
- scdp = (SequenceConstraintDlgPtr) GetObjectExtra (d);
+ scdp = (SequenceConstraintXDlgPtr) GetObjectExtra (d);
if (scdp == NULL)
{
return;
}
- scp = (SequenceConstraintPtr) data;
+ scp = (SequenceConstraintXPtr) data;
if (scp == NULL)
{
- ResetSequenceConstraintDialog (d);
+ ResetSequenceConstraintXDialog (d);
}
else
{
@@ -10146,23 +10225,23 @@ static void SequenceConstraintToDialog (DialoG d, Pointer data)
PointerToDialog (scdp->id_string_constraint, scp->string_constraint);
break;
}
- ChangeSequenceConstraintType (scdp->other_constraint_type);
+ ChangeSequenceConstraintXType (scdp->other_constraint_type);
}
}
-static Pointer DialogToSequenceConstraint (DialoG d)
+static Pointer DialogToSequenceConstraintX (DialoG d)
{
- SequenceConstraintPtr scp;
- SequenceConstraintDlgPtr scdp;
+ SequenceConstraintXPtr scp;
+ SequenceConstraintXDlgPtr scdp;
- scdp = (SequenceConstraintDlgPtr) GetObjectExtra (d);
+ scdp = (SequenceConstraintXDlgPtr) GetObjectExtra (d);
if (scdp == NULL)
{
return NULL;
}
- scp = (SequenceConstraintPtr) MemNew (sizeof (SequenceConstraintData));
+ scp = (SequenceConstraintXPtr) MemNew (sizeof (SequenceConstraintXData));
if (scp != NULL)
{
switch (GetValue (scdp->seq_type_constraint))
@@ -10198,16 +10277,16 @@ static Pointer DialogToSequenceConstraint (DialoG d)
}
-static void SequenceConstraintMessage (DialoG d, Int2 mssg)
+static void SequenceConstraintXMessage (DialoG d, Int2 mssg)
{
- SequenceConstraintDlgPtr scdp;
+ SequenceConstraintXDlgPtr scdp;
- scdp = (SequenceConstraintDlgPtr) GetObjectExtra (d);
+ scdp = (SequenceConstraintXDlgPtr) GetObjectExtra (d);
if (scdp != NULL) {
switch (mssg) {
case VIB_MSG_INIT :
- ResetSequenceConstraintDialog (d);
+ ResetSequenceConstraintXDialog (d);
break;
case VIB_MSG_ENTER :
Select (scdp->other_constraint_type);
@@ -10218,19 +10297,19 @@ static void SequenceConstraintMessage (DialoG d, Int2 mssg)
}
}
-static ValNodePtr TestSequenceConstraintDialog (DialoG d)
+static ValNodePtr TestSequenceConstraintXDialog (DialoG d)
{
return NULL;
}
-static DialoG SequenceConstraintDialog (GrouP g)
+extern DialoG SequenceConstraintXDialog (GrouP g)
{
- SequenceConstraintDlgPtr dlg;
+ SequenceConstraintXDlgPtr dlg;
GrouP p, k;
- dlg = (SequenceConstraintDlgPtr) MemNew (sizeof (SequenceConstraintDlgData));
+ dlg = (SequenceConstraintXDlgPtr) MemNew (sizeof (SequenceConstraintXDlgData));
if (dlg == NULL) return NULL;
p = HiddenGroup (g, -1, 0, NULL);
@@ -10238,10 +10317,10 @@ static DialoG SequenceConstraintDialog (GrouP g)
SetGroupSpacing (p, 10, 10);
dlg->dialog = (DialoG) p;
- dlg->todialog = SequenceConstraintToDialog;
- dlg->fromdialog = DialogToSequenceConstraint;
- dlg->dialogmessage = SequenceConstraintMessage;
- dlg->testdialog = TestSequenceConstraintDialog;
+ dlg->todialog = SequenceConstraintXToDialog;
+ dlg->fromdialog = DialogToSequenceConstraintX;
+ dlg->dialogmessage = SequenceConstraintXMessage;
+ dlg->testdialog = TestSequenceConstraintXDialog;
dlg->seq_type_constraint = HiddenGroup (p, 4, 0, NULL);
RadioButton (dlg->seq_type_constraint, "All Sequences");
@@ -10249,21 +10328,21 @@ static DialoG SequenceConstraintDialog (GrouP g)
RadioButton (dlg->seq_type_constraint, "Proteins");
SetValue (dlg->seq_type_constraint, 2);
- dlg->other_constraint_type = HiddenGroup (p, 2, 0, ChangeSequenceConstraintType);
+ dlg->other_constraint_type = HiddenGroup (p, 2, 0, ChangeSequenceConstraintXType);
RadioButton (dlg->other_constraint_type, "Any sequence");
StaticPrompt (dlg->other_constraint_type, "", 0, dialogTextHeight, systemFont, 'l');
RadioButton (dlg->other_constraint_type, "Where sequence source");
- dlg->source_constraint = SourceConstraintDialog (dlg->other_constraint_type, FALSE);
+ dlg->source_constraint = SourceConstraintDialogX (dlg->other_constraint_type, FALSE);
RadioButton (dlg->other_constraint_type, "Where feature text");
k = HiddenGroup (dlg->other_constraint_type, 2, 0, NULL);
SetGroupSpacing (k, 10, 10);
dlg->feature_list = FeatureSelectionDialog (k, TRUE, NULL, NULL);
- dlg->feature_string_constraint = StringConstraintDialog (k, NULL, FALSE);
+ dlg->feature_string_constraint = StringConstraintDialogX (k, NULL, FALSE);
RadioButton (dlg->other_constraint_type, "Where sequence ID");
- dlg->id_string_constraint = StringConstraintDialog (dlg->other_constraint_type, NULL, FALSE);
+ dlg->id_string_constraint = StringConstraintDialogX (dlg->other_constraint_type, NULL, FALSE);
SetValue (dlg->other_constraint_type, CHOICE_CONSTRAINT_ANY);
SetObjectExtra (dlg->other_constraint_type, dlg, NULL);
@@ -10280,7 +10359,7 @@ static DialoG SequenceConstraintDialog (GrouP g)
}
-extern Boolean DoesIDListMeetStringConstraint (SeqIdPtr sip, StringConstraintPtr string_constraint)
+extern Boolean DoesIDListMeetStringConstraint (SeqIdPtr sip, StringConstraintXPtr string_constraint)
{
Char id [41];
CharPtr cp, cp_dst;
@@ -10303,7 +10382,7 @@ extern Boolean DoesIDListMeetStringConstraint (SeqIdPtr sip, StringConstraintPtr
sip->next = NULL;
id [0] = '\0';
SeqIdWrite (sip, id, PRINTID_FASTA_LONG, sizeof (id) - 1);
- match = DoesStringMatchConstraint (id, string_constraint);
+ match = DoesStringMatchConstraintX (id, string_constraint);
if (!match)
{
changed = FALSE;
@@ -10330,7 +10409,7 @@ extern Boolean DoesIDListMeetStringConstraint (SeqIdPtr sip, StringConstraintPtr
}
if (changed)
{
- match = DoesStringMatchConstraint (id, string_constraint);
+ match = DoesStringMatchConstraintX (id, string_constraint);
}
/* if search text doesn't have ., try ID without version */
@@ -10340,7 +10419,7 @@ extern Boolean DoesIDListMeetStringConstraint (SeqIdPtr sip, StringConstraintPtr
if (cp != NULL)
{
*cp = 0;
- match = DoesStringMatchConstraint (id, string_constraint);
+ match = DoesStringMatchConstraintX (id, string_constraint);
}
}
}
@@ -10370,7 +10449,7 @@ extern Boolean DoesIDListMeetStringConstraint (SeqIdPtr sip, StringConstraintPtr
}
-static Boolean DoesSequenceMatchSequenceConstraint (BioseqPtr bsp, SequenceConstraintPtr scp)
+extern Boolean DoesSequenceMatchSequenceConstraintX (BioseqPtr bsp, SequenceConstraintXPtr scp)
{
SeqDescrPtr sdp;
SeqMgrDescContext dcontext;
@@ -10392,7 +10471,7 @@ static Boolean DoesSequenceMatchSequenceConstraint (BioseqPtr bsp, SequenceConst
}
break;
case SEQ_CONSTRAINT_FEATURE_TEXT:
- return DoBioseqFeaturesMatchSequenceConstraint (bsp, scp->feature_list, scp->string_constraint);
+ return DoBioseqFeaturesMatchSequenceConstraintX (bsp, scp->feature_list, scp->string_constraint);
break;
case SEQ_CONSTRAINT_ID:
return DoesIDListMeetStringConstraint(bsp->id, scp->string_constraint);
@@ -10407,7 +10486,7 @@ typedef struct molinfoedit {
MolInfoBlock from;
MolInfoBlock to;
DialoG sequence_constraint;
- SequenceConstraintPtr scp;
+ SequenceConstraintXPtr scp;
Boolean allow_existing;
} MolInfoEdit, PNTR MolInfoEditPtr;
@@ -10487,7 +10566,7 @@ static void EditMolInfoCallback (SeqEntryPtr sep, Pointer mydata, Int4 index, In
if (IS_Bioseq (sep)) {
bsp = (BioseqPtr) sep->data.ptrvalue;
- if (DoesSequenceMatchSequenceConstraint (bsp, miep->scp)) {
+ if (DoesSequenceMatchSequenceConstraintX (bsp, miep->scp)) {
if ((Uint1)GetValNodePopup (miep->from.molPopup,
miep->from.mol_values) == bsp->mol
|| GetValue (miep->from.molPopup) == 1)
@@ -10593,7 +10672,7 @@ static void DoProcessEditMolInfo (ButtoN b)
SeqEntryExplore (miep->sep, (Pointer) miep, EditMolInfoCallback);
FreeMolInfoBlockData (&(miep->from));
FreeMolInfoBlockData (&(miep->to));
- miep->scp = SequenceConstraintFree (miep->scp);
+ miep->scp = SequenceConstraintXFree (miep->scp);
ArrowCursor ();
Update ();
ObjMgrSetDirtyFlag (miep->input_entityID, TRUE);
@@ -10639,7 +10718,7 @@ static void EditMolInfoFields (IteM i)
StaticPrompt (h, "To", 0, 0, programFont, 'c');
CreateMolInfoBlock (&miep->to, h, TRUE);
- miep->sequence_constraint = SequenceConstraintDialog (w);
+ miep->sequence_constraint = SequenceConstraintXDialog (w);
c = HiddenGroup (w, 2, 0, NULL);
b = DefaultButton (c, "Accept", DoProcessEditMolInfo);
@@ -10717,14 +10796,14 @@ static void RibosomalRNAToGenomicDNAToolBtn (ButtoN b)
RibosomalRNAToGenomicDNA (bfp);
}
-static Boolean MolInfoOkForSeqEntry (SeqEntryPtr sep, SequenceConstraintPtr scp)
+static Boolean MolInfoOkForSeqEntry (SeqEntryPtr sep, SequenceConstraintXPtr scp)
{
BioseqSetPtr bssp;
SeqEntryPtr seq_set;
if (IS_Bioseq (sep))
{
- return DoesSequenceMatchSequenceConstraint(sep->data.ptrvalue, scp);
+ return DoesSequenceMatchSequenceConstraintX(sep->data.ptrvalue, scp);
}
else if (IS_Bioseq_set (sep))
{
@@ -10843,7 +10922,7 @@ static void DoApplyMolInfo (SeqEntryPtr sep, MolInfoEditPtr miep)
if (IS_Bioseq (sep)) {
bsp = (BioseqPtr) sep->data.ptrvalue;
- if (DoesSequenceMatchSequenceConstraint(bsp, miep->scp)) {
+ if (DoesSequenceMatchSequenceConstraintX(bsp, miep->scp)) {
DoApplyMolInfoToBioseq (bsp, miep);
} else return;
} else if (IS_Bioseq_set (sep)) {
@@ -10902,7 +10981,7 @@ static Boolean WillEditMolInfo (MolInfoEditPtr miep)
}
typedef struct molinfocheck {
- SequenceConstraintPtr scp;
+ SequenceConstraintXPtr scp;
Int4 num_with;
Int4 num_without;
} MolInfoCheckData, PNTR MolInfoCheckPtr;
@@ -11077,7 +11156,7 @@ static void DoProcessApplyMolInfo (ButtoN b)
DoApplyMolInfo (miep->sep, miep);
FreeMolInfoBlockData (&miep->to);
- miep->scp = SequenceConstraintFree (miep->scp);
+ miep->scp = SequenceConstraintXFree (miep->scp);
ArrowCursor ();
Update ();
ObjMgrSetDirtyFlag (miep->input_entityID, TRUE);
@@ -11119,7 +11198,7 @@ static void ApplyMolInfo (IteM i)
h = HiddenGroup (g, 0, 2, NULL);
CreateMolInfoBlock (&miep->to, h, TRUE);
- miep->sequence_constraint = SequenceConstraintDialog (w);
+ miep->sequence_constraint = SequenceConstraintXDialog (w);
c = HiddenGroup (w, 2, 0, NULL);
b = DefaultButton (c, "Accept", DoProcessApplyMolInfo);
@@ -12055,7 +12134,9 @@ static void CaptureFFLineEx (
MemSet (subcip, 0, sizeof (ClickableItemData));
subcip->clickable_item_type = blocktype;
subcip->description = StringSave (ptr);
- ValNodeAddPointer (&(subcip->item_list), item_list->choice, item_list->data.ptrvalue);
+ if (item_list != NULL) {
+ ValNodeAddPointer (&(subcip->item_list), item_list->choice, item_list->data.ptrvalue);
+ }
ValNodeAddPointer (&(cip->subcategories), 0, subcip);
/* iterate to add the rest of the lines of the qual */
while (ch != 0 && tmp != NULL && (qual_name = StartsWithQualOrFeat (tmp + 1)) == NULL) {
@@ -12070,7 +12151,9 @@ static void CaptureFFLineEx (
MemSet (subcip, 0, sizeof (ClickableItemData));
subcip->clickable_item_type = blocktype;
subcip->description = StringSave (ptr);
- ValNodeAddPointer (&(subcip->item_list), item_list->choice, item_list->data.ptrvalue);
+ if (item_list != NULL) {
+ ValNodeAddPointer (&(subcip->item_list), item_list->choice, item_list->data.ptrvalue);
+ }
ValNodeAddPointer (&(cip->subcategories), 0, subcip);
}
}
@@ -12160,6 +12243,7 @@ extern ValNodePtr GetSUCCommonList (SeqEntryPtr sep, Boolean reverse, Boolean by
ErrSev level;
Boolean okay;
SeqEntryPtr oldscope;
+ Uint2 entityID;
if (sep == NULL) return NULL;
@@ -12191,6 +12275,8 @@ extern ValNodePtr GetSUCCommonList (SeqEntryPtr sep, Boolean reverse, Boolean by
oldscope = SeqEntrySetScope (sep);
okay = SeqEntryToGnbk (sep, NULL, GENBANK_FMT, SEQUIN_MODE, NORMAL_STYLE,
SHOW_CONTIG_FEATURES, 0, 0, &xtra, NULL);
+ entityID = SeqMgrGetEntityIDForSeqEntry (sep);
+ SeqMgrIndexFeatures (entityID, NULL);
SeqEntrySetScope (oldscope);
ErrSetMessageLevel (level);
if (okay) {
@@ -15723,6 +15809,7 @@ static void UnsetPartialForTruncatedProteins (SeqFeatPtr sfp, Pointer userdata)
change_name = (BoolPtr) userdata;
CheckSeqLocForPartial (sfp->location, &partial5, &partial3);
SetSeqLocPartial (sfp->location, partial5, FALSE);
+ sfp->partial = partial5;
if (*change_name) {
prp = sfp->data.value.ptrvalue;
if (prp != NULL && prp->name != NULL
@@ -15754,6 +15841,7 @@ static void UnsetCDSPartialForTruncatedProteins (SeqFeatPtr sfp, Pointer userdat
if (product_bsp == prot_bsp) {
CheckSeqLocForPartial (sfp->location, &partial5, &partial3);
SetSeqLocPartial (sfp->location, partial5, FALSE);
+ sfp->partial = partial5;
cds_len = (prot_bsp->length + 1) * 3 ;
crp = (CdRegionPtr) sfp->data.value.ptrvalue;
@@ -15903,6 +15991,7 @@ static void TruncProtsCallback (BioseqPtr bsp, Pointer userdata)
SetSeqLocPartial (slp, partial5, partial3);
SeqLocFree (gene->location);
gene->location = slp;
+ gene->partial = partial5 || partial3;
}
else
{
@@ -18801,271 +18890,6 @@ static void ReverseNameOrderInAuthor (AuthorPtr pAuthor)
}
-typedef struct replaceitempair {
- CharPtr FindString;
- CharPtr ReplaceString;
-} ReplaceItemPair, PNTR ReplaceItemPairPtr;
-
-
-ReplaceItemPair AbbreviationList[] = {
- { "arabidopsis thaliana", "Arabidopsis thaliana" },
- { "adp", "ADP" },
- { "adp-", "ADP-" },
- { "atp", "ATP" },
- { "atp-", "ATP-" },
- { "bac", "BAC" },
- { "caenorhabditis elegans", "Caenorhabditis elegans" },
- { "cdna", "cDNA" },
- { "cdnas", "cDNAs" },
- { "coa", "CoA" },
- { "coi", "COI" },
- { "coii", "COII" },
- { "danio rerio", "Danio rerio" },
- { "dna", "DNA" },
- { "dna-", "DNA-" },
- { "drosophila melanogaster", "Drosophila melanogaster" },
- { "dsrna", "dsRNA" },
- { "escherichia coli", "Escherichia coli" },
- { "hiv", "HIV" },
- { "hiv-1", "HIV-1" },
- { "hiv-2", "HIV-2" },
- { "hnrna", "hnRNA" },
- { "homo sapiens", "Homo sapiens" },
- { "mhc", "MHC" },
- { "mrna", "mRNA" },
- { "mtdna", "mtDNA" },
- { "mus musculus", "Mus musculus" },
- { "nadh", "NADH" },
- { "nov.", "nov." },
- { "nov..", "nov.." },
- { "pcr", "PCR" },
- { "pcr-", "PCR-" },
- { "rattus norvegicus", "Rattus norvegicus" },
- { "rapd", "RAPD" },
- { "rdna", "rDNA" },
- { "rna", "RNA" },
- { "rna-", "RNA-" },
- { "rrna", "rRNA" },
- { "rt-pcr", "RT-PCR" },
- { "saccharomyces cerevisiae", "Saccharomyces cerevisiae" },
- { "scrna", "scRNA" },
- { "siv-1", "SIV-1" },
- { "snp", "SNP" },
- { "snps", "SNPs" },
- { "snrna", "snRNA" },
- { "sp.", "sp." },
- { "sp..", "sp.." },
- { "ssp.", "ssp." },
- { "ssp..", "ssp.." },
- { "ssrna", "ssRNA" },
- { "subsp.", "subsp." },
- { "subsp..", "subsp.." },
- { "trna", "tRNA" },
- { "trna-", "tRNA-" },
- { "var.", "var." },
- { "var..", "var.." },
- { "usa", "USA" },
- { "U.S.A.", "USA" },
- { "U.S.A", "USA" },
- { "United States of America", "USA" },
- {"(hiv)", "(HIV)" },
- {"(hiv1)", "(HIV1)" },
- {"(hiv-1)", "(HIV-1)" }
-};
-
-ReplaceItemPair SpecialAbbreviationList[] = {
- { "sp.", "sp." },
- { "nov.", "nov." },
- { "ssp.", "ssp." },
- { "var.", "var." },
- { "subsp.", "subsp." }
-};
-
-static void FixAbbreviationsInElement (CharPtr PNTR pEl)
-{
- int i;
- CharPtr NewPtr;
- Boolean whole_word;
-
- if (pEl == NULL) return;
- if (*pEl == NULL) return;
-
- for (i = 0; i < sizeof (AbbreviationList) / sizeof (ReplaceItemPair); i++)
- {
- if (AbbreviationList[i].FindString[StringLen (AbbreviationList[i].FindString) - 1] == '-')
- {
- whole_word = FALSE;
- }
- else
- {
- whole_word = TRUE;
- }
- FindReplaceString (pEl, AbbreviationList[i].FindString,
- AbbreviationList[i].ReplaceString, FALSE, whole_word);
- }
- for (i = 0; i < sizeof (SpecialAbbreviationList) / sizeof (ReplaceItemPair); i++)
- {
- FindReplaceString (pEl, SpecialAbbreviationList[i].FindString,
- SpecialAbbreviationList[i].ReplaceString, FALSE, TRUE);
- if (StringLen (*pEl) >= StringLen (SpecialAbbreviationList[i].ReplaceString)
- && StringCmp ((*pEl) + StringLen (*pEl) - StringLen (SpecialAbbreviationList[i].ReplaceString), SpecialAbbreviationList[i].ReplaceString) == 0)
- {
- NewPtr = MemNew (StringLen (*pEl) + 2);
- if (NewPtr == NULL) return;
- StringCpy (NewPtr, *pEl);
- StringCat (NewPtr, ".");
- MemFree (*pEl);
- *pEl = NewPtr;
- }
- }
-}
-
-ReplaceItemPair ShortWordList[] = {
- { "A", "a" },
- { "About", "about" },
- { "And", "and" },
- { "At", "at" },
- { "But", "but" },
- { "By", "by" },
- { "For", "for" },
- { "In", "in" },
- { "Is", "is" },
- { "Of", "of" },
- { "On", "on" },
- { "Or", "or" },
- { "The", "the" },
- { "To", "to" },
- { "With", "with" }
-};
-
-static void FixShortWordsInElement (CharPtr PNTR pEl)
-{
- Int2 i;
-
- if (pEl == NULL) return;
- if (*pEl == NULL) return;
-
- for (i = 0; i < sizeof (ShortWordList) / sizeof (ReplaceItemPair); i++)
- {
- FindReplaceString (pEl, ShortWordList[i].FindString,
- ShortWordList[i].ReplaceString, FALSE, TRUE);
- }
- if (isalpha ((Int4)((*pEl)[0])))
- {
- (*pEl)[0] = toupper ((*pEl)[0]);
- }
-}
-
-static void
-FixCapitalizationInElement
-(CharPtr PNTR pEl,
- Boolean bAbbrev,
- Boolean bShortWords,
- Boolean bApostrophes)
-{
- CharPtr pCh;
- Boolean bSendToLower;
-
- if(pEl == NULL) return;
- if(*pEl == NULL) return;
-
- bSendToLower = FALSE;
- for(pCh = *pEl; *pCh != 0; pCh++)
- {
- if(isalpha((Int4)(*pCh)))
- {
- if(bSendToLower)
- {
- *pCh = tolower(*pCh);
- }
- else
- {
- *pCh = toupper(*pCh);
- bSendToLower = TRUE;
- }
- }
- else if (bApostrophes || *pCh != '\'')
- {
- bSendToLower = FALSE;
- }
- }
- if (bShortWords)
- FixShortWordsInElement (pEl);
- if (bAbbrev)
- FixAbbreviationsInElement (pEl);
-}
-
-
-static void FixOrgNamesInString (CharPtr str, ValNodePtr org_names)
-{
- ValNodePtr vnp;
- CharPtr cp, taxname;
- Int4 taxname_len;
-
- if (StringHasNoText (str) || org_names == NULL) return;
- for (vnp = org_names; vnp != NULL; vnp = vnp->next)
- {
- taxname = (CharPtr) org_names->data.ptrvalue;
- taxname_len = StringLen (taxname);
- cp = StringISearch (str, taxname);
- while (cp != NULL)
- {
- StringNCpy (cp, taxname, taxname_len);
- cp = StringISearch (cp + taxname_len, taxname);
- }
- }
-}
-
-
-extern void ResetCapitalization (Boolean first_is_upper, CharPtr pString)
-{
- CharPtr pCh;
- Boolean was_digit = FALSE;
-
- pCh = pString;
- if (pCh == NULL) return;
- if (*pCh == '\0') return;
-
- if (first_is_upper)
- {
- /* Set first character to upper */
- *pCh = toupper (*pCh);
- }
- else
- {
- /* set first character to lower */
- *pCh = tolower (*pCh);
- }
-
- if (isdigit ((Int4)(*pCh)))
- {
- was_digit = TRUE;
- }
- pCh++;
- /* Set rest of characters to lower */
- while (*pCh != '\0')
- {
- if (was_digit
- && (*pCh == 'S' || *pCh == 's')
- && (isspace ((Int4)(*(pCh + 1))) || *(pCh + 1) == 0))
- {
- *pCh = toupper (*pCh);
- was_digit = FALSE;
- }
- else if (isdigit ((Int4)(*pCh)))
- {
- was_digit = TRUE;
- }
- else
- {
- was_digit = FALSE;
- *pCh = tolower (*pCh);
- }
- pCh++;
- }
-}
-
-
extern void
FixCapitalizationInTitle
(CharPtr PNTR pTitle,
@@ -19142,7 +18966,7 @@ static void TruncateAuthorMiddleInitials (AuthorPtr pAuthor)
}
}
-static void ChangeAuthorLastNameToConsortium (AuthorPtr pAuthor, StringConstraintPtr author_scp)
+static void ChangeAuthorLastNameToConsortium (AuthorPtr pAuthor, StringConstraintXPtr author_scp)
{
NameStdPtr pNameStandard;
CharPtr consortium;
@@ -19160,7 +18984,7 @@ static void ChangeAuthorLastNameToConsortium (AuthorPtr pAuthor, StringConstrain
len = StringLen (pNameStandard->names[0]);
if (len > 0)
{
- if (DoesStringMatchConstraint (pNameStandard->names[0], author_scp))
+ if (DoesStringMatchConstraintX (pNameStandard->names[0], author_scp))
{
consortium = (CharPtr) MemNew ((len + 1) * sizeof (Char));
if (consortium != NULL)
@@ -19190,7 +19014,7 @@ static void ChangeAuthorLastNameToConsortium (AuthorPtr pAuthor, StringConstrain
typedef struct fixpubdesc
{
Int4 iType;
- StringConstraintPtr author_scp;
+ StringConstraintXPtr author_scp;
ValNodePtr org_names;
} FixPubdescData, PNTR FixPubdescPtr;
@@ -19336,7 +19160,7 @@ extern void GetOrgNamesInRecordCallback (BioSourcePtr biop, Pointer userdata)
/* This function is used to apply fixes to citations */
-static void FixPubs (Uint2 entityID, Int4 iType, StringConstraintPtr author_scp)
+static void FixPubs (Uint2 entityID, Int4 iType, StringConstraintXPtr author_scp)
{
SeqEntryPtr sep;
SelStructPtr sel;
@@ -19477,7 +19301,7 @@ static void ChangeAllAuthorNameToConsortium (IteM i)
static void ChangeAuthorNameWithConsortiumToConsortium (IteM i)
{
BaseFormPtr bfp;
- StringConstraintPtr scp;
+ StringConstraintXPtr scp;
#ifdef WIN_MAC
bfp = currentFormDataPtr;
@@ -19487,7 +19311,7 @@ static void ChangeAuthorNameWithConsortiumToConsortium (IteM i)
if (bfp == NULL) return;
- scp = (StringConstraintPtr) MemNew (sizeof (StringConstraintData));
+ scp = (StringConstraintXPtr) MemNew (sizeof (StringConstraintData));
if (scp == NULL)
{
return;
@@ -19500,7 +19324,7 @@ static void ChangeAuthorNameWithConsortiumToConsortium (IteM i)
scp->not_present = FALSE;
FixPubs (bfp->input_entityID, FIX_PUB_SWAP_NAME_CONSORTIUM, scp);
- scp = StringConstraintFree (scp);
+ scp = StringConstraintXFree (scp);
}
typedef struct authornamestringconstraintform
@@ -19512,7 +19336,7 @@ typedef struct authornamestringconstraintform
static void DoChangeAuthorNameToConsortiumWithConstraint (ButtoN b)
{
AuthorNameStringConstraintFormPtr frm;
- StringConstraintPtr scp;
+ StringConstraintXPtr scp;
frm = (AuthorNameStringConstraintFormPtr) GetObjectExtra (b);
if (frm == NULL)
@@ -19520,14 +19344,14 @@ static void DoChangeAuthorNameToConsortiumWithConstraint (ButtoN b)
return;
}
- scp = (StringConstraintPtr) DialogToPointer (frm->author_name_constraint_dlg);
+ scp = (StringConstraintXPtr) DialogToPointer (frm->author_name_constraint_dlg);
Hide (frm->form);
WatchCursor ();
Update ();
FixPubs (frm->input_entityID, FIX_PUB_SWAP_NAME_CONSORTIUM, scp);
- scp = StringConstraintFree (scp);
+ scp = StringConstraintXFree (scp);
Remove ((WindoW)frm->form);
ArrowCursor ();
Update ();
@@ -19563,7 +19387,7 @@ static void ChangeAuthorNameToConsortiumWithConstraint (IteM i)
h = HiddenGroup (w, -1, 0, NULL);
SetGroupSpacing (h, 10, 10);
- frm->author_name_constraint_dlg = StringConstraintDialog (h, "Where author last name", TRUE);
+ frm->author_name_constraint_dlg = StringConstraintDialogX (h, "Where author last name", TRUE);
c = HiddenGroup (h, 2, 0, NULL);
SetGroupSpacing (h, 10, 10);
@@ -19873,6 +19697,35 @@ static void RenormalizeNucProtSetsMenuItem (IteM i)
}
+static void AddAllDbxrefsBioseqCallback (BioseqPtr bsp, Pointer data)
+{
+ AddAllDbxrefsToBioseq (bsp);
+}
+
+
+static void AddAllDbxrefsMenuItem (IteM i)
+{
+ BaseFormPtr bfp;
+ SeqEntryPtr sep;
+
+ /* Get the current data */
+
+#ifdef WIN_MAC
+ bfp = currentFormDataPtr;
+#else
+ bfp = GetObjectExtra (i);
+#endif
+
+ if (bfp == NULL)
+ return;
+
+ sep = GetTopSeqEntryForEntityID (bfp->input_entityID);
+
+ VisitBioseqsInSep (sep, NULL, AddAllDbxrefsBioseqCallback);
+ ObjMgrSetDirtyFlag (bfp->input_entityID, TRUE);
+ ObjMgrSendMsg (OM_MSG_UPDATE, bfp->input_entityID, 0, 0);
+}
+
extern void LookupAllPubs (IteM i);
extern void ResolveExistingLocalIDs (IteM i);
extern void PromoteAlignsToBestIDProc (IteM i);
@@ -19945,7 +19798,7 @@ static void ShowDiscrepancyReport (IteM i)
if (bfp == NULL) return;
- CreateDiscrepancyReportWindow (bfp);
+ CreateDiscrepancyReportWindow (/* bfp */);
}
static void TestTax3 (IteM i, Int4 taxid, CharPtr name)
@@ -20224,7 +20077,7 @@ static void MakeSpecialOrganismMenu (MenU m, BaseFormPtr bfp)
MenU x;
s = SubMenu (m, "Organism/ G");
- i = CommandItem (s, "Parse Text", ParseTaxnameToSourceQual);
+ i = CommandItem (s, "Parse Text After Bionomial", ParseTaxnameToSourceQual);
SetObjectExtra (i, bfp, NULL);
SeparatorItem (s);
i = CommandItem (s, "Parse ATCC Strain to Xref", AtccStrainToXref);
@@ -20249,6 +20102,8 @@ static void MakeSpecialOrganismMenu (MenU m, BaseFormPtr bfp)
SetObjectExtra (i, bfp, NULL);
i = CommandItem (s, "Lat-lon Tool", LatLonTool);
SetObjectExtra (i, bfp, NULL);
+ i = CommandItem (s, "Lat-Lon Country Conflict Tool", LatLonCountryTool);
+ SetObjectExtra (i, bfp, NULL);
i = CommandItem (s, "Fix Specific-Host Values", FixSpecificHostValues);
SetObjectExtra (i, bfp, NULL);
@@ -20288,6 +20143,8 @@ static void MakeSpecialOrganismMenu (MenU m, BaseFormPtr bfp)
x = SubMenu(s, "Parse Organism Modifiers");
i = CommandItem (x, "Load From File", LoadOrganismModifierTable);
SetObjectExtra (i, bfp, NULL);
+ i = CommandItem (x, "Load Tax Consult File", LoadTaxConsult);
+ SetObjectExtra (i, bfp, NULL);
i = CommandItem (x, "Export To File", ExportOrganismTable);
SetObjectExtra (i, bfp, NULL);
i = CommandItem (x, "Export Last Lineage Table", ExportLastLineage);
@@ -20371,6 +20228,9 @@ static void MakeSpecialProjectsMenu (MenU m, BaseFormPtr bfp)
SetObjectExtra (i, bfp, NULL);
i = CommandItem (s, "Apply BARCODE Dbxrefs", ApplyBarcodeDbxrefs);
SetObjectExtra (i, bfp, NULL);
+ SeparatorItem (s);
+ i = CommandItem (s, "Add Note to Coding Regions in Source Features", ApplyTagToCodingRegionsInSourceFeatures);
+ SetObjectExtra (i, bfp, NULL);
}
}
@@ -20680,7 +20540,7 @@ static void MakeSpecialConvertMenu (MenU m, BaseFormPtr bfp)
z = SubMenu (y, "Publication");
i = CommandItem (z, "All", ConvertPubDescToFeat);
SetObjectExtra (i, bfp, NULL);
- i = CommandItem (z, "By Constraint", CreateConvertPubDescStringConstraintDialog);
+ i = CommandItem (z, "By Constraint", CreateConvertPubDescStringConstraintDialogX);
SetObjectExtra (i, bfp, NULL);
y = SubMenu (x, "Convert Full Length Feature to Descriptor");
@@ -20718,6 +20578,8 @@ static void MakeSpecialConvertMenu (MenU m, BaseFormPtr bfp)
x = SubMenu (s, "Convert IDs, Accessions, or GenBank.names");
i = CommandItem (x, "LocalIDs to GeneralIDs", ConvertLocalToGeneral);
SetObjectExtra (i, bfp, NULL);
+ i = CommandItem (x, "Convert GeneralIDs to LocalIDs", ConvertGeneralIdToLocalID);
+ SetObjectExtra (i, bfp, NULL);
y = SubMenu (x, "Accession to LocalIDs");
i = CommandItem (y, "For All Sequences", ConvertToLocalProcAll);
SetObjectExtra (i, bfp, NULL);
@@ -20756,7 +20618,7 @@ static void MakeSpecialEditMenu (MenU m, BaseFormPtr bfp)
SetObjectExtra (i, bfp, NULL);
i = CommandItem (x, "Exception", FeatureExceptionEditor);
SetObjectExtra (i, bfp, NULL);
- i = CommandItem (x, "Partial", FeaturePartialEditor);
+ i = CommandItem (x, "Location", FeaturePartialEditor);
SetObjectExtra (i, bfp, NULL);
i = CommandItem (x, "Strand", FeatureStrandEditor);
SetObjectExtra (i, bfp, NULL);
@@ -20770,6 +20632,10 @@ static void MakeSpecialEditMenu (MenU m, BaseFormPtr bfp)
SetObjectExtra (i, bfp, NULL);
i = CommandItem (x, "Reverse Location Interval Order", ReverseFeatureIntervals);
SetObjectExtra (i, bfp, NULL);
+ i = CommandItem (x, "Resolve Intersecting Feature Locations", ResolveFeatureOverlaps);
+ SetObjectExtra (i, bfp, NULL);
+ i = CommandItem (x, "Update Features", UpdateFeatures);
+ SetObjectExtra (i, bfp, NULL);
SeparatorItem (s);
x = SubMenu (s, "Bulk Edit");
@@ -20786,8 +20652,12 @@ static void MakeSpecialEditMenu (MenU m, BaseFormPtr bfp)
SetObjectExtra (i, bfp, NULL);
SeparatorItem (s);
- i = CommandItem (s, "Extend Partial Features", ExtendPartialFeatures);
+ x = SubMenu (s, "Extend Partial Features");
+ i = CommandItem (x, "All", ExtendPartialFeatures);
SetObjectExtra (i, bfp, NULL);
+ i = CommandItem (x, "With Constraint", ExtendPartialFeaturesWithConstraint);
+ SetObjectExtra (i, bfp, NULL);
+
i = CommandItem (s, "Extend Gene", ExtendGeneReg);
SetObjectExtra (i, bfp, NULL);
SeparatorItem (s);
@@ -20912,6 +20782,9 @@ static void MakeSpecialGapSequencesMenu (MenU m, BaseFormPtr bfp)
SetObjectExtra (i, bfp, NULL);
i = CommandItem (s, "Remove Unnecessary Gap Features", RemoveUnnecessaryGapFeatures);
SetObjectExtra (i, bfp, NULL);
+ SeparatorItem (s);
+ i = CommandItem (s, "Flip Intervals Between Gaps", FlipSequenceIntervals);
+ SetObjectExtra (i, bfp, NULL);
}
static void MakeSpecialSelectMenu (MenU m, BaseFormPtr bfp)
@@ -20947,6 +20820,8 @@ static void MakeSpecialLinkMenu (MenU m, BaseFormPtr bfp)
SetObjectExtra (i, bfp, NULL);
i = CommandItem (x, "Reassign", ReassignFeatIDs);
SetObjectExtra (i, bfp, NULL);
+ i = CommandItem (x, "Unique in Merged Set", UniqifyFeatIDs);
+ SetObjectExtra (i, bfp, NULL);
i = CommandItem (x, "Clear IDs and Links", ClearFeatIDsAndLinks);
SetObjectExtra (i, bfp, NULL);
SeparatorItem (s);
@@ -20967,7 +20842,6 @@ static void MakeSpecialLinkMenu (MenU m, BaseFormPtr bfp)
SetObjectExtra (i, bfp, NULL);
}
-
extern void SetupSpecialMenu (MenU m, BaseFormPtr bfp)
{
@@ -21095,6 +20969,11 @@ extern void SetupSpecialMenu (MenU m, BaseFormPtr bfp)
i = CommandItem (s, "Load Feature Fields from File", LoadFeatureFieldTable);
SetObjectExtra (i, bfp, NULL);
+#if 1
+ i = CommandItem (s, "New Load Feature Fields from File", NewLoadFeatureQualifierTable);
+ SetObjectExtra (i, bfp, NULL);
+#endif
+
MakeSpecialRemoveMenu (m, bfp);
@@ -21216,6 +21095,8 @@ extern void SetupSpecialMenu (MenU m, BaseFormPtr bfp)
SetObjectExtra (i, bfp, NULL);
i = CommandItem (s, "Add Cit-sub for update", AddCitSubForUpdate);
SetObjectExtra (i, bfp, NULL);
+ i = CommandItem (s, "Fix USA and States", AbbreviateCitSubAffilStates);
+ SetObjectExtra (i, bfp, NULL);
MakeSpecialGapSequencesMenu (m, bfp);
@@ -21376,11 +21257,18 @@ extern void SetupSpecialMenu (MenU m, BaseFormPtr bfp)
i = CommandItem (s, "Force Locus Fixup", ForceLocusFixup);
SetObjectExtra (i, bfp, NULL);
SeparatorItem (s);
+ /*
+ i = CommandItem (s, "Just Taxonomy Fixup", JustTaxonFixup);
+ SetObjectExtra (i, bfp, NULL);
+ SeparatorItem (s);
+ */
i = CommandItem (s, "Correct CDS Genetic Codes", CorrectCDSGenCodes);
SetObjectExtra (i, bfp, NULL);
SeparatorItem (s);
i = CommandItem (s, "Update Replace EC_numbers", UpdateECnumbers);
SetObjectExtra (i, bfp, NULL);
+ i = CommandItem (s, "Parse GO Terms from User Fields", ParseGoTermsFromUserFieldsItem);
+ SetObjectExtra (i, bfp, NULL);
SeparatorItem (s);
i = CommandItem (s, "NC_Cleanup", DoNCCleanup);
SetObjectExtra (i, bfp, NULL);
@@ -21461,11 +21349,20 @@ extern void SetupSpecialMenu (MenU m, BaseFormPtr bfp)
SetObjectExtra (i, bfp, NULL);
#endif
+#if 0
SeparatorItem (m);
- i = CommandItem (m, "Discrepancy Report", ShowDiscrepancyReport);
+ i = CommandItem (m, "Add All Dbxrefs", AddAllDbxrefsMenuItem);
SetObjectExtra (i, bfp, NULL);
+#endif
}
+ SeparatorItem (m);
+ i = CommandItem (m, "Discrepancy Report", ShowDiscrepancyReport);
+ SetObjectExtra (i, bfp, NULL);
+ SeparatorItem (m);
+ i = CommandItem (m, "Macro Editor", LaunchMacroEditor);
+ SetObjectExtra (i, bfp, NULL);
+
/*#ifdef INTERNAL_NCBI_SEQUIN*/
/*#ifdef NEW_TAXON_SERVICE*/
/*
diff --git a/sequin/sequin4.c b/sequin/sequin4.c
index 087c2b7a..5cbdd2ba 100644
--- a/sequin/sequin4.c
+++ b/sequin/sequin4.c
@@ -29,7 +29,7 @@
*
* Version Creation Date: 6/28/96
*
-* $Revision: 6.399 $
+* $Revision: 6.411 $
*
* File Description:
*
@@ -79,25 +79,18 @@
#include <seqpanel.h>
#include <salpanel.h>
#include <findrepl.h>
+#include <macrodlg.h>
+#include <macroapi.h>
static Int2 LIBCALLBACK CreateSegSet (Pointer data);
static Int2 LIBCALLBACK ConvertToDeltaSequence (Pointer data);
static Int2 LIBCALLBACK FeatToDeltaSeq (Pointer data);
static Int2 LIBCALLBACK CopyMasterSourceToSegments (Pointer data);
-#define REGISTER_CREATESEGSET ObjMgrProcLoadEx (OMPROC_FILTER,"Create Segmented Set", "CreateSegSet", 0,0,0,0,NULL,CreateSegSet, PROC_PRIORITY_DEFAULT, "Indexer")
-#define REGISTER_UPDATESEGSET ObjMgrProcLoadEx (OMPROC_FILTER,"Update Segmented Set","UpdateSegSet",0,0,0,0,NULL,UpdateSegSet,PROC_PRIORITY_DEFAULT, "Indexer")
-
-#define REGISTER_NEWUPDATESEGSET ObjMgrProcLoadEx (OMPROC_FILTER,"New Update Segmented Set","NewUpdateSegSet",0,0,0,0,NULL,NewUpdateSegSet,PROC_PRIORITY_DEFAULT, "Indexer")
-
-#define REGISTER_ADJUSTMULTISEGSEQ ObjMgrProcLoadEx (OMPROC_FILTER,"Adjust SegSeq Length","AdjustSegLength",0,0,0,0,NULL,AdjustSegSeqLength,PROC_PRIORITY_DEFAULT, "Indexer")
-
#define REGISTER_REMOVESET ObjMgrProcLoadEx (OMPROC_FILTER,"Remove Set","RemoveSet",0,0,0,0,NULL,RemoveSet,PROC_PRIORITY_DEFAULT, "Indexer")
#define REGISTER_REMOVESETSINSET ObjMgrProcLoadEx (OMPROC_FILTER,"Remove Sets in Selected Set","RemoveSetsInSelectedSet",0,0,0,0,NULL,RemoveSetsInSelectedSet,PROC_PRIORITY_DEFAULT, "Indexer")
-#define REGISTER_UNDOSEGSET ObjMgrProcLoadEx (OMPROC_FILTER,"Undo Segmented Set","UndoSegSet",0,0,0,0,NULL,UndoSegSet,PROC_PRIORITY_DEFAULT, "Indexer")
-
#define REGISTER_REPACKAGE_PARTS ObjMgrProcLoadEx (OMPROC_FILTER,"Repackage Segmented Parts","RepackageParts",0,0,0,0,NULL,PackagePartsInPartsSet,PROC_PRIORITY_DEFAULT, "Indexer")
#define REGISTER_NORMALIZE_NUCPROT ObjMgrProcLoadEx (OMPROC_FILTER,"Normalize Nuc-Prot","NormalizeNucProts",0,0,0,0,NULL,NormalizeNucProts,PROC_PRIORITY_DEFAULT, "Indexer")
@@ -118,18 +111,6 @@ static Int2 LIBCALLBACK CopyMasterSourceToSegments (Pointer data);
#define REGISTER_DELETE_BY_TEXT ObjMgrProcLoadEx (OMPROC_FILTER, "Delete By Text","DeleteByText",0,0,0,0,NULL,CreateDeleteByTextWindow,PROC_PRIORITY_DEFAULT, "Indexer")
-#define REGISTER_SEGREGATE_BY_TEXT ObjMgrProcLoadEx (OMPROC_FILTER, "Segregate By Text","SegregateByText",0,0,0,0,NULL,CreateSegregateByTextWindow,PROC_PRIORITY_DEFAULT, "Indexer")
-
-#define REGISTER_SEGREGATE_BY_FIELD ObjMgrProcLoadEx (OMPROC_FILTER, "Segregate By Options","NewSegregateByOptions",0,0,0,0,NULL,SegregateSetsByField,PROC_PRIORITY_DEFAULT, "Indexer")
-
-#define REGISTER_SEGREGATE_BY_FEATURE ObjMgrProcLoadEx (OMPROC_FILTER, "Segregate By Feature","SegregateByFeature",0,0,0,0,NULL,CreateSegregateByFeatureWindow,PROC_PRIORITY_DEFAULT, "Indexer")
-
-#define REGISTER_SEGREGATE_BY_DESCRIPTOR ObjMgrProcLoadEx (OMPROC_FILTER, "Segregate By Descriptor","SegregateByDescriptor",0,0,0,0,NULL,CreateSegregateByDescriptorWindow,PROC_PRIORITY_DEFAULT, "Indexer")
-
-#define REGISTER_SEGREGATE_BY_MOLECULE_TYPE ObjMgrProcLoadEx (OMPROC_FILTER, "Segregate By Molecule Type","SegregateByMoleculeType",0,0,0,0,NULL,CreateSegregateByMoleculeTypeWindow,PROC_PRIORITY_DEFAULT, "Indexer")
-
-#define REGISTER_SEGREGATE_BY_ID ObjMgrProcLoadEx (OMPROC_FILTER, "Segregate By ID","SegregateByID",0,0,0,0,NULL,CreateSegregateByIdWindow,PROC_PRIORITY_DEFAULT, "Indexer")
-
#define REGISTER_REORDER_BY_ID ObjMgrProcLoadEx (OMPROC_FILTER, "Reorder by ID","ReorderByID",0,0,0,0,NULL,ReorderSetByAccession,PROC_PRIORITY_DEFAULT, "Indexer")
#define REGISTER_CONVERTSEQALIGN ObjMgrProcLoadEx (OMPROC_FILTER,"Convert SeqAlign","ConvertSeqAlign",0,0,0,0,NULL,ConvertToTrueMultipleAlignment,PROC_PRIORITY_DEFAULT, "Alignment")
@@ -176,6 +157,7 @@ static Int2 LIBCALLBACK CopyMasterSourceToSegments (Pointer data);
#define REGISTER_BIOSEQ_REVCOMP_NOTFEAT ObjMgrProcLoadEx (OMPROC_FILTER, "Bioseq only RevComp", "BioseqOnlyRevComp", OBJ_BIOSEQ, 0, OBJ_BIOSEQ, 0, NULL, RevCompFunc, PROC_PRIORITY_DEFAULT, "Utilities")
#define REGISTER_BIOSEQ_REVERSE ObjMgrProcLoadEx (OMPROC_FILTER, "Bioseq Reverse", "BioseqReverse", OBJ_BIOSEQ, 0, OBJ_BIOSEQ, 0, NULL, RevFunc, PROC_PRIORITY_DEFAULT, "Utilities")
#define REGISTER_BIOSEQ_COMPLEMENT ObjMgrProcLoadEx (OMPROC_FILTER, "Bioseq Complement", "BioseqComplement", OBJ_BIOSEQ, 0, OBJ_BIOSEQ, 0, NULL, CompFunc, PROC_PRIORITY_DEFAULT, "Utilities")
+#define REGISTER_BIOSEQ_REVCOMP_BYID ObjMgrProcLoadEx (OMPROC_FILTER, "Bioseq and Features RevComp By ID", "RevCompByID", OBJ_BIOSEQ, 0, OBJ_BIOSEQ, 0, NULL, BioseqRevCompByID, PROC_PRIORITY_DEFAULT, "Utilities")
#define REGISTER_BIOSEQ_SEG_REPORT ObjMgrProcLoadEx (OMPROC_FILTER, "Bioseq Seg Report", "BioseqSegReport", OBJ_BIOSEQ, 0, OBJ_BIOSEQ, 0, NULL, ReportDeltaSegments, PROC_PRIORITY_DEFAULT, "Misc")
@@ -250,6 +232,28 @@ extern Int2 LIBCALLBACK StruCommUserGenFunc (Pointer data);
#define REGISTER_CORRECTRNASTRAND ObjMgrProcLoadEx (OMPROC_FILTER, "Correct RNA Strand","CorrectRNAStrand",0,0,0,0,NULL,CorrectRNAStrandedness,PROC_PRIORITY_DEFAULT, "Analysis")
#endif
+/* commands for Desktop Segregate menu */
+#define REGISTER_SEGREGATE_BY_TEXT ObjMgrProcLoadEx (OMPROC_FILTER, "Segregate By Text","SegregateByText",0,0,0,0,NULL,CreateSegregateByTextWindow,PROC_PRIORITY_DEFAULT, "Segregate")
+
+#define REGISTER_SEGREGATE_BY_FIELD ObjMgrProcLoadEx (OMPROC_FILTER, "Segregate By Options","NewSegregate",0,0,0,0,NULL,SegregateSetsByField,PROC_PRIORITY_DEFAULT, "Segregate")
+
+#define REGISTER_SEGREGATE_BY_FEATURE ObjMgrProcLoadEx (OMPROC_FILTER, "Segregate By Feature","SegregateByFeature",0,0,0,0,NULL,CreateSegregateByFeatureWindow,PROC_PRIORITY_DEFAULT, "Segregate")
+
+#define REGISTER_SEGREGATE_BY_DESCRIPTOR ObjMgrProcLoadEx (OMPROC_FILTER, "Segregate By Descriptor","SegregateByDescriptor",0,0,0,0,NULL,CreateSegregateByDescriptorWindow,PROC_PRIORITY_DEFAULT, "Segregate")
+
+#define REGISTER_SEGREGATE_BY_MOLECULE_TYPE ObjMgrProcLoadEx (OMPROC_FILTER, "Segregate By Molecule Type","SegregateByMoleculeType",0,0,0,0,NULL,CreateSegregateByMoleculeTypeWindow,PROC_PRIORITY_DEFAULT, "Segregate")
+
+#define REGISTER_SEGREGATE_BY_ID ObjMgrProcLoadEx (OMPROC_FILTER, "Segregate By ID","SegregateByID",0,0,0,0,NULL,CreateSegregateByIdWindow,PROC_PRIORITY_DEFAULT, "Segregate")
+
+/* commands for Desktop SegmentedSets menu */
+#define REGISTER_CREATESEGSET ObjMgrProcLoadEx (OMPROC_FILTER,"Create Segmented Set", "CreateSegSet", 0,0,0,0,NULL,CreateSegSet, PROC_PRIORITY_DEFAULT, "SegmentedSets")
+#define REGISTER_UPDATESEGSET ObjMgrProcLoadEx (OMPROC_FILTER,"Update Segmented Set","UpdateSegSet",0,0,0,0,NULL,UpdateSegSet,PROC_PRIORITY_DEFAULT, "SegmentedSets")
+#define REGISTER_NEWUPDATESEGSET ObjMgrProcLoadEx (OMPROC_FILTER,"New Update Segmented Set","NewUpdateSegSet",0,0,0,0,NULL,NewUpdateSegSet,PROC_PRIORITY_DEFAULT, "SegmentedSets")
+#define REGISTER_ADJUSTMULTISEGSEQ ObjMgrProcLoadEx (OMPROC_FILTER,"Adjust SegSeq Length","AdjustSegLength",0,0,0,0,NULL,AdjustSegSeqLength,PROC_PRIORITY_DEFAULT, "SegmentedSets")
+#define REGISTER_UNDOSEGSET ObjMgrProcLoadEx (OMPROC_FILTER,"Undo Segmented Set","UndoSegSet",0,0,0,0,NULL,UndoSegSet,PROC_PRIORITY_DEFAULT, "SegmentedSets")
+#define REGISTER_SEGSETREMOVESETSINSET ObjMgrProcLoadEx (OMPROC_FILTER,"Remove Sets in Selected Set (Like Undo SegSet)","RemoveSetsInSelectedSet",0,0,0,0,NULL,RemoveSetsInSelectedSet,PROC_PRIORITY_DEFAULT, "SegmentedSets")
+
+
typedef struct {
CharPtr oldStr;
SeqIdPtr newSip;
@@ -1736,7 +1740,7 @@ static void SplitSegmentedFeatsOnOneSet (BioseqSetPtr set)
crp->frame = new_frame;
new_sfp->product = SeqLocFree (new_sfp->product);
- SeqEdTranslateOneCDS (new_sfp, last_bsp, sfp->idx.entityID);
+ SeqEdTranslateOneCDS (new_sfp, last_bsp, sfp->idx.entityID, Sequin_GlobalAlign2Seq);
SplitSegmentedProduct (BioseqFindFromSeqLoc (sfp->product),
BioseqFindFromSeqLoc (new_sfp->product),
@@ -1766,7 +1770,7 @@ static void SplitSegmentedFeatsOnOneSet (BioseqSetPtr set)
sfp->partial = TRUE;
if (sfp->data.choice == SEQFEAT_CDREGION && sfp->product != NULL)
{
- SeqEdTranslateOneCDS (sfp, last_bsp, sfp->idx.entityID);
+ SeqEdTranslateOneCDS (sfp, last_bsp, sfp->idx.entityID, Sequin_GlobalAlign2Seq);
ResynchCDSPartials (sfp, NULL);
}
@@ -5814,7 +5818,7 @@ SetExplodedProtein
}
/* retranslate coding region */
- SeqEdTranslateOneCDS (sfp, nucbsp, nucbsp->idx.entityID);
+ SeqEdTranslateOneCDS (sfp, nucbsp, nucbsp->idx.entityID, Sequin_GlobalAlign2Seq);
}
static Boolean ExplodeGroup (SeqEntryPtr sep, SeqFeatPtr sfp)
@@ -7588,61 +7592,6 @@ static void LIBCALLBACK LookForOrfs (
}
}
-static Boolean get_src (GatherContextPtr gcp)
-{
- ValNodePtr vnp, new;
- ValNodePtr PNTR vnpp;
-
- vnpp = gcp->userdata;
- switch (gcp->thistype)
- {
- case OBJ_SEQDESC:
- vnp = (ValNodePtr) (gcp->thisitem);
- if (vnp->choice == Seq_descr_source) {
- if (vnp->data.ptrvalue != NULL) {
- new = SeqDescrNew(NULL);
- new = MemCopy(new, vnp, sizeof(ValNode));
- new->next = NULL;
- *vnpp = new;
- return FALSE; /*only top level BioSource will be returned*/
- }
- }
- break;
- default:
- break;
- }
- return TRUE;
-}
-
-static Int2 GetGcodeFromBioseq(BioseqPtr bsp)
-{
- GatherScope gs;
- BioSourcePtr biop;
- Int2 code = -1;
- Uint2 entityID;
- ValNodePtr vnp = NULL;
-
- entityID = ObjMgrGetEntityIDForPointer(bsp);
- MemSet ((Pointer) (&gs), 0, sizeof (GatherScope));
- gs.get_feats_location = TRUE;
- MemSet ((Pointer) (gs.ignore), (int)(TRUE), (size_t) (OBJ_MAX * sizeof(Boolean)));
- gs.ignore[OBJ_SEQDESC] = FALSE;
-
- GatherEntity(entityID, &vnp, get_src, &gs);
- if (vnp == NULL) {
- ErrPostStr(SEV_WARNING, 0, 0, "BioSource not found");
- return code;
- }
- if (vnp) {
- biop = vnp->data.ptrvalue;
- code = BioSourceToGeneticCode(biop);
- if (code == 0) {
- code = 1; /* try standard genetic code if it's not found */
- }
- }
- return code;
-}
-
static ValNodePtr ListOrfs (
BioseqPtr bsp,
Boolean altstart,
@@ -8870,20 +8819,67 @@ static Int2 LIBCALLBACK MapToNucFunc (Pointer data)
}
}
+
+NLM_EXTERN void RevCompOneFeatForBioseq (SeqFeatPtr sfp, BioseqPtr bsp)
+{
+ SeqIdPtr sip;
+ SeqLocPtr slp;
+ CodeBreakPtr cbp;
+ CdRegionPtr crp;
+ RnaRefPtr rrp;
+ tRNAPtr trp;
+ Boolean split;
+
+ if (sfp == NULL || bsp == NULL) return;
+
+ sip = SeqLocId (sfp->location);
+ if (sip != NULL) {
+ if (SeqIdIn (sip, bsp->id)) {
+ slp = SeqLocCopyRegion (sip, sfp->location, bsp, 0,
+ bsp->length - 1, Seq_strand_minus, &split);
+ sfp->location = SeqLocFree (sfp->location);
+ sfp->location = slp;
+ switch (sfp->data.choice) {
+ case SEQFEAT_CDREGION :
+ crp = (CdRegionPtr) sfp->data.value.ptrvalue;
+ if (crp != NULL) {
+ for (cbp = crp->code_break; cbp != NULL; cbp = cbp->next) {
+ sip = SeqLocId (cbp->loc);
+ slp = SeqLocCopyRegion (sip, cbp->loc, bsp, 0,
+ bsp->length - 1, Seq_strand_minus, &split);
+ cbp->loc = SeqLocFree (cbp->loc);
+ cbp->loc = slp;
+ }
+ }
+ break;
+ case SEQFEAT_RNA :
+ rrp = (RnaRefPtr) sfp->data.value.ptrvalue;
+ if (rrp != NULL && rrp->ext.choice == 2) {
+ trp = (tRNAPtr) rrp->ext.value.ptrvalue;
+ if (trp != NULL && trp->anticodon != NULL) {
+ sip = SeqLocId (trp->anticodon);
+ slp = SeqLocCopyRegion (sip, trp->anticodon, bsp, 0,
+ bsp->length - 1, Seq_strand_minus, &split);
+ trp->anticodon = SeqLocFree (trp->anticodon);
+ trp->anticodon = slp;
+ }
+ }
+ break;
+ default :
+ break;
+ }
+ }
+ }
+}
+
+
static void RevCompFeats (SeqEntryPtr sep, Pointer mydata, Int4 index, Int2 indent)
{
BioseqPtr bsp;
BioseqSetPtr bssp;
- CodeBreakPtr cbp;
- CdRegionPtr crp;
- RnaRefPtr rrp;
SeqAnnotPtr sap;
SeqFeatPtr sfp;
- SeqIdPtr sip;
- SeqLocPtr slp;
- Boolean split;
- tRNAPtr trp;
if (mydata == NULL) return;
if (sep == NULL || sep->data.ptrvalue == NULL) return;
@@ -8901,44 +8897,7 @@ static void RevCompFeats (SeqEntryPtr sep, Pointer mydata, Int4 index, Int2 inde
if (sap->type == 1) {
sfp = (SeqFeatPtr) sap->data;
while (sfp != NULL) {
- sip = SeqLocId (sfp->location);
- if (sip != NULL) {
- if (SeqIdIn (sip, bsp->id)) {
- slp = SeqLocCopyRegion (sip, sfp->location, bsp, 0,
- bsp->length - 1, Seq_strand_minus, &split);
- sfp->location = SeqLocFree (sfp->location);
- sfp->location = slp;
- switch (sfp->data.choice) {
- case SEQFEAT_CDREGION :
- crp = (CdRegionPtr) sfp->data.value.ptrvalue;
- if (crp != NULL) {
- for (cbp = crp->code_break; cbp != NULL; cbp = cbp->next) {
- sip = SeqLocId (cbp->loc);
- slp = SeqLocCopyRegion (sip, cbp->loc, bsp, 0,
- bsp->length - 1, Seq_strand_minus, &split);
- cbp->loc = SeqLocFree (cbp->loc);
- cbp->loc = slp;
- }
- }
- break;
- case SEQFEAT_RNA :
- rrp = (RnaRefPtr) sfp->data.value.ptrvalue;
- if (rrp != NULL && rrp->ext.choice == 2) {
- trp = (tRNAPtr) rrp->ext.value.ptrvalue;
- if (trp != NULL && trp->anticodon != NULL) {
- sip = SeqLocId (trp->anticodon);
- slp = SeqLocCopyRegion (sip, trp->anticodon, bsp, 0,
- bsp->length - 1, Seq_strand_minus, &split);
- trp->anticodon = SeqLocFree (trp->anticodon);
- trp->anticodon = slp;
- }
- }
- break;
- default :
- break;
- }
- }
- }
+ RevCompOneFeatForBioseq (sfp, bsp);
sfp = sfp->next;
}
}
@@ -9018,30 +8977,22 @@ extern void ReverseBioseqInAlignment (SeqAlignPtr salp, Pointer userdata)
}
-static void ProcessMultipleBioseqFunctions (OMProcControlPtr ompcp, BioseqFunc func,
- Boolean revCompFeats, Boolean check_for_aln)
+static void RevCompBioseqList (ValNodePtr bsp_list, Uint2 entityID, BioseqFunc func,
+ Boolean revCompFeats, Boolean check_for_aln)
{
- BioseqPtr bsp;
- ValNodePtr head;
- SelStructPtr sel;
SeqEntryPtr sep;
+ BioseqPtr bsp;
ValNodePtr vnp, seq_in_aln = NULL, aln_bsp = NULL;
Char id_str[255];
CharPtr msg;
MsgAnswer ans;
- if (ompcp == NULL || ompcp->input_entityID == 0 || func == NULL) return;
- head = NULL;
- for (sel = ObjMgrGetSelected (); sel != NULL; sel = sel->next) {
- GatherItem (sel->entityID, sel->itemID, sel->itemtype,
- (Pointer) &head, AddBspToVnp);
- }
- if (head == NULL) return;
+ if (bsp_list == NULL) return;
- if (check_for_aln) {
+ if (func != NULL && check_for_aln) {
/* check for alignments, warn about reversals, allow cancel */
- for (vnp = head; vnp != NULL; vnp = vnp->next) {
+ for (vnp = bsp_list; vnp != NULL; vnp = vnp->next) {
bsp = (BioseqPtr) vnp->data.ptrvalue;
if (bsp != NULL && IsBioseqInAnyAlignment (bsp, bsp->idx.entityID)) {
SeqIdWrite (SeqIdFindBest (bsp->id, SEQID_GENBANK), id_str, PRINTID_REPORT, sizeof (id_str) - 1);
@@ -9072,13 +9023,15 @@ static void ProcessMultipleBioseqFunctions (OMProcControlPtr ompcp, BioseqFunc f
}
}
- sep = GetTopSeqEntryForEntityID (ompcp->input_entityID);
+ sep = GetTopSeqEntryForEntityID (entityID);
- for (vnp = head; vnp != NULL; vnp = vnp->next) {
+ for (vnp = bsp_list; vnp != NULL; vnp = vnp->next) {
bsp = (BioseqPtr) vnp->data.ptrvalue;
- func (bsp);
- if (check_for_aln) {
- VisitAlignmentsInSep (sep, (Pointer) bsp, ReverseBioseqInAlignment);
+ if (func != NULL) {
+ func (bsp);
+ if (check_for_aln) {
+ VisitAlignmentsInSep (sep, (Pointer) bsp, ReverseBioseqInAlignment);
+ }
}
if (revCompFeats) {
if (bsp->repr == Seq_repr_raw || bsp->repr == Seq_repr_const) {
@@ -9089,18 +9042,168 @@ static void ProcessMultipleBioseqFunctions (OMProcControlPtr ompcp, BioseqFunc f
}
}
}
- ValNodeFree (head);
/* flip alignments if all sequences in alignment were flipped */
if (aln_bsp != NULL) {
- VisitAnnotsInSep (GetTopSeqEntryForEntityID (ompcp->input_entityID), aln_bsp, FlipEntireAlignmentIfAllSequencesFlipped);
+ VisitAnnotsInSep (GetTopSeqEntryForEntityID (entityID), aln_bsp, FlipEntireAlignmentIfAllSequencesFlipped);
aln_bsp = ValNodeFree (aln_bsp);
}
- ObjMgrSetDirtyFlag (ompcp->input_entityID, TRUE);
- ObjMgrSendMsg (OM_MSG_UPDATE, ompcp->input_entityID, 0, 0);
+ ObjMgrSetDirtyFlag (entityID, TRUE);
+ ObjMgrSendMsg (OM_MSG_UPDATE, entityID, 0, 0);
+}
+
+static void ProcessMultipleBioseqFunctions (OMProcControlPtr ompcp, BioseqFunc func,
+ Boolean revCompFeats, Boolean check_for_aln)
+
+{
+ ValNodePtr head;
+ SelStructPtr sel;
+
+ if (ompcp == NULL || ompcp->input_entityID == 0 || func == NULL) return;
+ head = NULL;
+ for (sel = ObjMgrGetSelected (); sel != NULL; sel = sel->next) {
+ GatherItem (sel->entityID, sel->itemID, sel->itemtype,
+ (Pointer) &head, AddBspToVnp);
+ }
+ if (head == NULL) return;
+
+ RevCompBioseqList (head, ompcp->input_entityID, func, revCompFeats, check_for_aln);
+ head = ValNodeFree (head);
+}
+
+
+typedef struct collectbioseqwithconstraint
+{
+ SequenceConstraintXPtr scp;
+ ValNodePtr bsp_list;
+} CollectBioseqWithConstraintData, PNTR CollectBioseqWithConstraintPtr;
+
+static void CollectBioseqsWithConstraintCallback (BioseqPtr bsp, Pointer userdata)
+{
+ CollectBioseqWithConstraintPtr p;
+
+ if (bsp == NULL || userdata == NULL) return;
+
+ p = (CollectBioseqWithConstraintPtr) userdata;
+ if (DoesSequenceMatchSequenceConstraintX (bsp, p->scp))
+ {
+ ValNodeAddPointer (&p->bsp_list, OBJ_BIOSEQ, bsp);
+ }
+}
+
+static ValNodePtr CollectBioseqsWithConstraint (SeqEntryPtr sep, SequenceConstraintXPtr scp)
+{
+ CollectBioseqWithConstraintData p;
+
+ p.scp = scp;
+ p.bsp_list = NULL;
+
+ VisitBioseqsInSep (sep, &p, CollectBioseqsWithConstraintCallback);
+ return p.bsp_list;
+}
+
+
+typedef struct revcompbyidfrm {
+ FORM_MESSAGE_BLOCK
+ DialoG sequence_constraint;
+ ButtoN revcomp_seq;
+ ButtoN reverse_feats;
+ ButtoN accept;
+} RevCompByIdFrmData, PNTR RevCompByIdFrmPtr;
+
+
+static void ChangeRevComp (ButtoN b)
+{
+ RevCompByIdFrmPtr f;
+
+ f = (RevCompByIdFrmPtr) GetObjectExtra (b);
+ if (f == NULL) return;
+
+ if (!GetStatus (f->revcomp_seq) && !GetStatus (f->reverse_feats))
+ {
+ Disable (f->accept);
+ }
+ else
+ {
+ Enable (f->accept);
+ }
+}
+
+
+static void DoRevComp (ButtoN b)
+{
+ RevCompByIdFrmPtr f;
+ SequenceConstraintXPtr scp;
+ ValNodePtr bsp_list;
+ SeqEntryPtr sep;
+
+ f = (RevCompByIdFrmPtr) GetObjectExtra (b);
+ if (f == NULL) return;
+
+ sep = GetTopSeqEntryForEntityID (f->input_entityID);
+ scp = DialogToPointer (f->sequence_constraint);
+ bsp_list = CollectBioseqsWithConstraint (sep, scp);
+ scp = SequenceConstraintXFree (scp);
+
+ if (bsp_list == NULL)
+ {
+ Message (MSG_ERROR, "No sequences match constraint!");
+ }
+ else
+ {
+ RevCompBioseqList (bsp_list, f->input_entityID,
+ GetStatus (f->revcomp_seq) ? BioseqRevComp : NULL,
+ GetStatus (f->reverse_feats), GetStatus (f->revcomp_seq));
+ Remove (f->form);
+ }
+ bsp_list = ValNodeFree (bsp_list);
+}
+
+static Int2 LIBCALLBACK BioseqRevCompByID (Pointer data)
+
+{
+ OMProcControlPtr ompcp;
+ GrouP c;
+ GrouP h;
+ RevCompByIdFrmPtr f;
+ WindoW w;
+
+ ompcp = (OMProcControlPtr) data;
+ if (ompcp == NULL) return OM_MSG_RET_ERROR;
+
+ f = (RevCompByIdFrmPtr) MemNew (sizeof (RevCompByIdFrmData));
+ if (f == NULL) return OM_MSG_RET_ERROR;
+ w = FixedWindow (-50, -33, -10, -10, "Reverse Complement", StdCloseWindowProc);
+ SetObjectExtra (w, f, StdCleanupFormProc);
+ f->form = (ForM) w;
+ f->formmessage = NULL;
+
+ f->input_entityID = ompcp->input_entityID;
+
+ h = HiddenGroup (w, -1, 0, NULL);
+ f->revcomp_seq = CheckBox (h, "Reverse complement sequence", ChangeRevComp);
+ SetStatus (f->revcomp_seq, TRUE);
+ f->reverse_feats = CheckBox (h, "Reverse features", ChangeRevComp);
+ SetStatus (f->reverse_feats, TRUE);
+
+ f->sequence_constraint = SequenceConstraintXDialog (h);
+
+ c = HiddenGroup (h, 2, 0, NULL);
+ f->accept = DefaultButton (c, "Accept", DoRevComp);
+ SetObjectExtra (f->accept, f, NULL);
+ PushButton (c, "Cancel", StdCancelButtonProc);
+ AlignObjects (ALIGN_CENTER, (HANDLE) f->sequence_constraint,
+ (HANDLE) f->revcomp_seq,
+ (HANDLE) f->reverse_feats,
+ (HANDLE) c, NULL);
+ RealizeWindow (w);
+ Show (w);
+ Update ();
+ return OM_MSG_RET_DONE;
}
+
extern void ReverseComplementBioseqAndFeats (BioseqPtr bsp, Uint2 entityID)
{
SeqEntryPtr sep;
@@ -10738,6 +10841,7 @@ extern void SetupSequinFilters (void)
REGISTER_BIOSEQ_REVERSE;
REGISTER_BIOSEQ_REVCOMP_WITHFEAT;
REGISTER_BIOSEQ_REVCOMP_NOTFEAT;
+ REGISTER_BIOSEQ_REVCOMP_BYID;
#if defined(OS_UNIX) || defined(OS_MSWIN)
if (indexerVersion) {
@@ -10776,9 +10880,10 @@ extern void SetupSequinFilters (void)
REGISTER_INTERVAL_COMBINE_AND_FUSE;
REGISTER_INTERVAL_COMBINE;
REGISTER_REPACKAGE_PARTS;
- REGISTER_UNDOSEGSET;
REGISTER_REMOVESET;
REGISTER_REMOVESETSINSET;
+ REGISTER_UNDOSEGSET;
+ REGISTER_SEGSETREMOVESETSINSET;
REGISTER_ADJUSTMULTISEGSEQ;
REGISTER_UPDATESEGSET;
REGISTER_NEWUPDATESEGSET;
@@ -10796,8 +10901,8 @@ extern void SetupSequinFilters (void)
REGISTER_SEGREGATE_BY_MOLECULE_TYPE;
REGISTER_SEGREGATE_BY_FEATURE;
REGISTER_SEGREGATE_BY_DESCRIPTOR;
- REGISTER_SEGREGATE_BY_FIELD;
REGISTER_SEGREGATE_BY_TEXT;
+ REGISTER_SEGREGATE_BY_FIELD;
REGISTER_FIND_NON_ACGT;
REGISTER_BSP_INDEX;
REGISTER_POPSET_WITHIN_GENBANK;
@@ -10821,57 +10926,6 @@ extern void SetupSequinFilters (void)
}
-extern CharPtr MergeValNodeStrings (ValNodePtr list, Boolean useReturn)
-
-{
- size_t len;
- CharPtr ptr;
- CharPtr str;
- CharPtr tmp;
- ValNodePtr vnp;
-
-
- ptr = NULL;
- if (list != NULL) {
- vnp = list;
- len = 0;
- while (vnp != NULL) {
- if (vnp->data.ptrvalue != NULL) {
- len += StringLen ((CharPtr) vnp->data.ptrvalue) + 1;
- }
- vnp = vnp->next;
- }
- if (len > 0) {
- ptr = MemNew (sizeof (Char) * (len + 2));
- if (ptr != NULL) {
- vnp = list;
- tmp = NULL;
- while (vnp != NULL) {
- str = (CharPtr) vnp->data.ptrvalue;
- if (str != NULL) {
- if (tmp == NULL) {
- tmp = ptr;
- } else if (useReturn) {
- tmp = StringMove (tmp, "\n");
- } else if (IsJapanese () && (tmp - ptr > 2) &&
- IsMBLetter (tmp - 2) && IsMBLetter (str)) {
- /* no space required between two Japanese letters. */
- tmp = tmp;
- } else if (str [0] != ',' && str [0] != ';' && str [0] != ':') {
- tmp = StringMove (tmp, " ");
- } else {
- tmp = StringMove (tmp, " ");
- }
- tmp = StringMove (tmp, str);
- }
- vnp = vnp->next;
- }
- }
- }
- }
- return ptr;
-}
-
/* resolve existing colliding ids section */
@@ -11869,33 +11923,14 @@ extern void ConsolidateOrganismNotes (IteM i)
}
-static void CountryLookupProc (BioSourcePtr biop, Pointer userdata)
-{
- CharPtr PNTR list;
- SubSourcePtr ssp;
- CharPtr new_country;
+typedef struct countryfixup {
+ CharPtr PNTR country_list;
+ ValNodePtr warning_list;
+ Boolean capitalize_after_colon;
+} CountryFixupData, PNTR CountryFixupPtr;
- if (biop == NULL || (list = (CharPtr PNTR)userdata) == NULL)
- {
- return;
- }
- for (ssp = biop->subtype; ssp != NULL; ssp = ssp->next)
- {
- if (ssp->subtype == SUBSRC_country && !StringHasNoText (ssp->name))
- {
- new_country = GetCountryFix (ssp->name, list);
- if (new_country != NULL)
- {
- ssp->name = MemFree (ssp->name);
- ssp->name = new_country;
- }
- }
- }
-}
-
-
-static void CapitalizeFirstLetterOfEveryWord (CharPtr pString)
+extern void CapitalizeFirstLetterOfEveryWord (CharPtr pString)
{
CharPtr pCh;
@@ -11929,39 +11964,110 @@ static void CapitalizeFirstLetterOfEveryWord (CharPtr pString)
}
-static void CountryCapitalizationFixup (BioSourcePtr biop, Pointer userdata)
+static void CountryFixupItem (Uint1 choice, Pointer data, CountryFixupPtr c)
{
- SubSourcePtr ssp;
- CharPtr cp;
+ BioSourcePtr biop;
+ SubSourcePtr ssp;
+ CharPtr new_country;
+ CharPtr cp;
- if (biop == NULL)
- {
- return;
- }
+ if (data == NULL || c == NULL) return;
+
+ biop = GetBioSourceFromObject (choice, data);
+ if (biop == NULL) return;
for (ssp = biop->subtype; ssp != NULL; ssp = ssp->next)
{
- if (ssp->subtype != SUBSRC_country || ssp->name == NULL) continue;
- cp = StringChr (ssp->name, ':');
- if (cp != NULL)
- {
- /* skip colon */
- cp++;
- /* skip over space after colon */
- cp += StringSpn (cp, " \t");
-
- /* reset capitalization */
- CapitalizeFirstLetterOfEveryWord (cp);
- }
- }
+ if (ssp->subtype == SUBSRC_country && !StringHasNoText (ssp->name))
+ {
+ new_country = GetCountryFix (ssp->name, c->country_list);
+ if (new_country == NULL) {
+ ValNodeAddPointer (&c->warning_list, choice, data);
+ } else {
+ if (c->capitalize_after_colon) {
+ cp = StringChr (new_country, ':');
+ if (cp != NULL)
+ {
+ /* skip colon */
+ cp++;
+ /* skip over space after colon */
+ cp += StringSpn (cp, " \t");
+
+ /* reset capitalization */
+ CapitalizeFirstLetterOfEveryWord (cp);
+ }
+ }
+ ssp->name = MemFree (ssp->name);
+ ssp->name = new_country;
+ }
+ }
+ }
+}
+
+static void CountryFixupDesc (SeqDescrPtr sdp, Pointer userdata)
+{
+ if (sdp != NULL && userdata != NULL && sdp->choice == Seq_descr_source) {
+ CountryFixupItem (OBJ_SEQDESC, sdp, (CountryFixupPtr) userdata);
+ }
}
+
+static void CountryFixupFeat (SeqFeatPtr sfp, Pointer userdata)
+{
+ if (sfp != NULL && userdata != NULL && sfp->data.choice == SEQFEAT_BIOSRC) {
+ CountryFixupItem (OBJ_SEQFEAT, sfp, (CountryFixupPtr) userdata);
+ }
+}
+
+
+static Pointer GetCountry (Uint1 data_choice, Pointer data, Pointer metadata)
+{
+ ValNode vn;
+
+ vn.choice = SourceQualChoice_textqual;
+ vn.data.intvalue = Source_qual_country;
+ vn.next = NULL;
+ return GetSourceQualFromBioSource (GetBioSourceFromObject (data_choice, data), &vn, NULL);
+}
+
+
+static Pointer GetAccession (Uint1 data_choice, Pointer data, Pointer metadata)
+{
+ ValNode vn;
+
+ vn.choice = data_choice;
+ vn.data.ptrvalue = data;
+ vn.next = NULL;
+ return GetParentLabelForDiscrepancyItem (&vn);
+}
+
+static void BulkSetCountry (Pointer target, Pointer data)
+{
+ ValNode vn;
+ SeqDescrPtr sdp = (SeqDescrPtr) target;
+
+ if (sdp == NULL || sdp->choice != Seq_descr_source) return;
+
+ vn.choice = SourceQualChoice_textqual;
+ vn.data.intvalue = Source_qual_country;
+ vn.next = NULL;
+
+ SetSourceQualInBioSource (sdp->data.ptrvalue, &vn, NULL, (CharPtr) data, ExistingTextOption_replace_old);
+}
+
+
+static BulkEdFieldData country_fields[] = {
+ { "Country", BulkSetCountry, BulkSetSimpleTextString, GetCountry, BulkDisplaySimpleText, BulkFreeSimpleText, BulkSimpleTextDialog, BulkFormatSimpleText, NULL, NULL, BulkSimpleTextCopy },
+ { "Accession", NULL, NULL, GetAccession, BulkDisplaySimpleText, BulkFreeSimpleText, NULL, BulkFormatSimpleText, NULL, NULL, BulkSimpleTextCopy },
+ { NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}};
+
+
static void CountryLookup (IteM i, Boolean with_cap_fix)
{
BaseFormPtr bfp;
SeqEntryPtr sep;
- CharPtr PNTR list;
+ CountryFixupData c;
#ifdef WIN_MAC
@@ -11973,13 +12079,16 @@ static void CountryLookup (IteM i, Boolean with_cap_fix)
sep = GetTopSeqEntryForEntityID (bfp->input_entityID);
if (sep == NULL) return;
- list = GetValidCountryList ();
- if (list == NULL) return;
- VisitBioSourcesInSep (sep, list, CountryLookupProc);
- if (with_cap_fix)
- {
- VisitBioSourcesInSep (sep, NULL, CountryCapitalizationFixup);
+ c.country_list = GetValidCountryList ();
+ if (c.country_list == NULL) return;
+ c.capitalize_after_colon = with_cap_fix;
+ c.warning_list = NULL;
+ VisitDescriptorsInSep (sep, &c, CountryFixupDesc);
+ VisitFeaturesInSep (sep, &c, CountryFixupFeat);
+ if (c.warning_list != NULL) {
+ BulkEditorObjectList (bfp->input_entityID, "Country Modifiers That Could Not Be Autocorrected", c.warning_list, country_fields);
}
+
ObjMgrSetDirtyFlag (bfp->input_entityID, TRUE);
ObjMgrSendMsg (OM_MSG_UPDATE, bfp->input_entityID, 0, 0);
}
diff --git a/sequin/sequin5.c b/sequin/sequin5.c
index 334466c7..9d98eb65 100644
--- a/sequin/sequin5.c
+++ b/sequin/sequin5.c
@@ -29,7 +29,7 @@
*
* Version Creation Date: 8/26/97
*
-* $Revision: 6.581 $
+* $Revision: 6.637 $
*
* File Description:
*
@@ -72,10 +72,12 @@
#include <salutil.h>
#include <asn2gnbp.h> /* added for parse to flatfile */
-#include <seqpanel.h> /* added to include SeqEdTranslateOneCDS */
+#include <sqnutils.h> /* added to include SeqEdTranslateOneCDS */
+#include <seqpanel.h>
#include <salpanel.h>
#include <tax3api.h> /* added for specific-host corrections */
#include <findrepl.h>
+#include <valid.h> /* added for latloncountry conflict checking */
static void CommonLaunchBioseqViewer (SeqEntryPtr sep, CharPtr path, Boolean directToEditor)
@@ -2270,6 +2272,11 @@ static Boolean ConvertImpToRNA
case FEATDEF_snoRNA :
rrp->type = 7;
break;
+ case FEATDEF_ncRNA :
+ rrp->type = 255;
+ rrp->ext.choice = 1;
+ rrp->ext.value.ptrvalue = StringSave ("ncRNA");
+ break;
case FEATDEF_otherRNA :
rrp->type = 255;
break;
@@ -2382,10 +2389,11 @@ static Boolean ConvertRNAToMiscFeat
Uint2 featdef_to,
Pointer extradata)
{
- GBQualPtr gbqual;
+ GBQualPtr gbqual, q_p, q_n;
ImpFeatPtr ifp;
- CharPtr rnaname;
+ CharPtr rnaname, newnote;
RnaRefPtr rrp;
+ Int4 note_len = 0;
if (sfp == NULL || sfp->data.choice != SEQFEAT_RNA)
{
@@ -2400,10 +2408,11 @@ static Boolean ConvertRNAToMiscFeat
rnaname = NULL;
rrp = (RnaRefPtr) sfp->data.value.ptrvalue;
- if (rrp != NULL) {
+ if (rrp != NULL && rrp->type != 255 && rrp->ext.choice == 1) {
if (rrp->ext.choice == 1) {
rnaname = (CharPtr) rrp->ext.value.ptrvalue;
rrp->ext.value.ptrvalue = NULL;
+ note_len = StringLen (rnaname) + 2;
}
}
@@ -2413,15 +2422,50 @@ static Boolean ConvertRNAToMiscFeat
sfp->data.value.ptrvalue = (Pointer) ifp;
ifp->key = StringSave ("misc_feature");
- if (! StringHasNoText (rnaname)) {
- gbqual = GBQualNew ();
- if (gbqual != NULL) {
- gbqual->qual = StringSave ("product");
- gbqual->val = rnaname;
- gbqual->next = sfp->qual;
- sfp->qual = gbqual;
+ for (gbqual = sfp->qual; gbqual != NULL; gbqual = gbqual->next) {
+ if (StringCmp (gbqual->qual, "product") == 0) {
+ note_len += StringLen (gbqual->val) + 2;
+ }
+ }
+
+ if (note_len > 0) {
+ if (!StringHasNoText (sfp->comment)) {
+ note_len += StringLen (sfp->comment) + 2;
+ }
+ newnote = (CharPtr) MemNew (sizeof (Char) * (note_len + 1));
+ if (!StringHasNoText (sfp->comment)) {
+ StringCpy (newnote, sfp->comment);
+ StringCat (newnote, "; ");
}
+ if (rnaname != NULL) {
+ StringCat (newnote, rnaname);
+ StringCat (newnote, "; ");
+ rnaname = MemFree (rnaname);
+ }
+ gbqual = sfp->qual;
+ q_p = NULL;
+ while (gbqual != NULL) {
+ q_n = gbqual->next;
+ if (StringCmp (gbqual->qual, "product") == 0) {
+ StringCat (newnote, gbqual->val);
+ if (q_p == NULL) {
+ sfp->qual = q_n;
+ } else {
+ q_p->next = q_n;
+ }
+ gbqual->next = NULL;
+ gbqual = GBQualFree (gbqual);
+ } else {
+ q_p = gbqual;
+ }
+ gbqual = q_n;
+ }
+ /* trim trailing semicolon */
+ newnote[note_len - 2] = 0;
+ sfp->comment = MemFree (sfp->comment);
+ sfp->comment = newnote;
}
+
return TRUE;
}
@@ -2493,6 +2537,151 @@ static Boolean ConvertProtToRegion
return TRUE;
}
+static Boolean ConvertRNAToNcRNA
+(SeqFeatPtr sfp)
+{
+ RnaRefPtr rrp;
+ GBQualPtr gbq;
+ tRNAPtr trp;
+
+ if (sfp == NULL || sfp->data.choice != SEQFEAT_RNA) return FALSE;
+
+ rrp = (RnaRefPtr) sfp->data.value.ptrvalue;
+ if (NULL == rrp) {
+ rrp = RnaRefNew ();
+ sfp->data.value.ptrvalue = rrp;
+ }
+
+ if (rrp->ext.choice == 2) {
+ trp = (tRNAPtr) rrp->ext.value.ptrvalue;
+ if (trp != NULL) {
+ trp->anticodon = SeqLocFree (trp->anticodon);
+ trp = MemFree (trp);
+ rrp->ext.value.ptrvalue = trp;
+ }
+ rrp->ext.choice = 0;
+ }
+
+ /* might be converting from other ncRNA, tmRNA, or misc_RNA */
+ if (rrp->ext.choice == 1) {
+ if (StringCmp (rrp->ext.value.ptrvalue, "ncRNA") == 0) {
+ /* already ncRNA */
+ } else if (StringCmp (rrp->ext.value.ptrvalue, "tmRNA") == 0) {
+ rrp->ext.value.ptrvalue = MemFree (rrp->ext.value.ptrvalue);
+ rrp->ext.value.ptrvalue = StringSave ("ncRNA");
+ } else if (StringCmp (rrp->ext.value.ptrvalue, "misc_RNA") == 0) {
+ rrp->ext.value.ptrvalue = MemFree (rrp->ext.value.ptrvalue);
+ rrp->ext.value.ptrvalue = StringSave ("ncRNA");
+ } else {
+ /* not one of the specified types, copy to product gbqual */
+ gbq = GBQualNew ();
+ gbq->qual = StringSave ("product");
+ gbq->val = rrp->ext.value.ptrvalue;
+ gbq->next = sfp->qual;
+ sfp->qual = gbq;
+ rrp->ext.value.ptrvalue = StringSave ("ncRNA");
+ }
+ } else {
+ rrp->ext.choice = 1;
+ rrp->ext.value.ptrvalue = StringSave ("ncRNA");
+ }
+
+ if (rrp->type == 5) {
+ gbq = GBQualNew ();
+ gbq->qual = StringSave ("ncRNA_class");
+ gbq->val = StringSave ("snRNA");
+ gbq->next = sfp->qual;
+ sfp->qual = gbq;
+ } else if (rrp->type == 6) {
+ gbq = GBQualNew ();
+ gbq->qual = StringSave ("ncRNA_class");
+ gbq->val = StringSave ("scRNA");
+ gbq->next = sfp->qual;
+ sfp->qual = gbq;
+ } else if (rrp->type == 7) {
+ gbq = GBQualNew ();
+ gbq->qual = StringSave ("ncRNA_class");
+ gbq->val = StringSave ("snoRNA");
+ gbq->next = sfp->qual;
+ sfp->qual = gbq;
+ }
+
+ rrp->type = 255;
+ return TRUE;
+}
+
+
+static void ConvertFromncRNAtoMiscRNA (SeqFeatPtr sfp)
+{
+ RnaRefPtr rrp;
+ GBQualPtr gbq, gbq_prev = NULL;
+ CharPtr tmp;
+
+ if (sfp == NULL || sfp->data.choice != SEQFEAT_RNA) return;
+ rrp = (RnaRefPtr) sfp->data.value.ptrvalue;
+ if (rrp == NULL || rrp->ext.choice != 1 || StringCmp (rrp->ext.value.ptrvalue, "ncRNA") != 0) {
+ return;
+ }
+ rrp->ext.value.ptrvalue = MemFree (rrp->ext.value.ptrvalue);
+ rrp->ext.choice = 0;
+ /* find new value for product */
+ gbq = sfp->qual;
+ while (gbq != NULL && StringCmp (gbq->qual, "product") != 0) {
+ gbq_prev = gbq;
+ gbq = gbq->next;
+ }
+
+ if (gbq != NULL) {
+ rrp->ext.choice = 1;
+ rrp->ext.value.ptrvalue = StringSave (gbq->val);
+ if (gbq_prev == NULL) {
+ sfp->qual = gbq->next;
+ } else {
+ gbq_prev->next = gbq->next;
+ }
+ gbq->next = NULL;
+ gbq = GBQualFree (gbq);
+ } else if (!StringHasNoText (sfp->comment)) {
+ rrp->ext.choice = 1;
+ rrp->ext.value.ptrvalue = StringSave (sfp->comment);
+ sfp->comment = MemFree (sfp->comment);
+ }
+
+ /* move ncRNA_class elsewhere */
+ gbq = sfp->qual;
+ gbq_prev = NULL;
+ while (gbq != NULL && StringCmp (gbq->qual, "ncRNA_class") != 0) {
+ gbq_prev = gbq;
+ gbq = gbq->next;
+ }
+
+ if (gbq != NULL) {
+ if (StringCmp (gbq->val, "other") != 0) {
+ if (rrp->ext.choice == 0) {
+ rrp->ext.choice = 1;
+ rrp->ext.value.ptrvalue = StringSave (gbq->val);
+ } else {
+ if (StringHasNoText (sfp->comment)) {
+ sfp->comment = MemFree (sfp->comment);
+ sfp->comment = StringSave (gbq->val);
+ } else {
+ tmp = (CharPtr) MemNew (sizeof (Char) * (StringLen (sfp->comment) + StringLen (gbq->val) + 3));
+ sprintf (tmp, "%s; %s", sfp->comment, gbq->val);
+ sfp->comment = MemFree (sfp->comment);
+ sfp->comment = tmp;
+ }
+ }
+ }
+ if (gbq_prev == NULL) {
+ sfp->qual = gbq->next;
+ } else {
+ gbq_prev->next = gbq->next;
+ }
+ gbq->next = NULL;
+ gbq = GBQualFree (gbq);
+ }
+}
+
static Boolean ConvertRNAToRNA
(SeqFeatPtr sfp,
@@ -2500,11 +2689,17 @@ static Boolean ConvertRNAToRNA
Pointer extradata)
{
RnaRefPtr rrp;
+ Boolean from_misc = FALSE, to_misc = FALSE;
+ GBQualPtr gbq, gbq_p = NULL;
rrp = (RnaRefPtr) sfp->data.value.ptrvalue;
if (NULL == rrp)
return FALSE;
+ if (rrp->type == 255) {
+ from_misc = TRUE;
+ }
+
switch (featdef_to) {
case FEATDEF_preRNA :
rrp->type = 1;
@@ -2520,19 +2715,49 @@ static Boolean ConvertRNAToRNA
break;
case FEATDEF_snRNA :
rrp->type = 5;
+ to_misc = TRUE;
break;
case FEATDEF_scRNA :
rrp->type = 6;
+ to_misc = TRUE;
break;
case FEATDEF_snoRNA :
rrp->type = 7;
+ to_misc = TRUE;
+ break;
+ case FEATDEF_ncRNA :
+ return ConvertRNAToNcRNA (sfp);
break;
case FEATDEF_otherRNA :
rrp->type = 255;
+ ConvertFromncRNAtoMiscRNA (sfp);
break;
default:
break;
}
+ if (from_misc && !to_misc && rrp->ext.choice == 1 && StringCmp (rrp->ext.value.ptrvalue, "misc_RNA") == 0) {
+ /* move product qual to string */
+ gbq = sfp->qual;
+ while (gbq != NULL && StringCmp (gbq->qual, "product") != 0) {
+ gbq_p = gbq;
+ gbq = gbq->next;
+ }
+ if (gbq == NULL) {
+ rrp->ext.value.ptrvalue = MemFree (rrp->ext.value.ptrvalue);
+ rrp->ext.choice = 0;
+ } else {
+ rrp->ext.value.ptrvalue = MemFree (rrp->ext.value.ptrvalue);
+ rrp->ext.value.ptrvalue = gbq->val;
+ gbq->val = NULL;
+ if (gbq_p == NULL) {
+ sfp->qual = gbq->next;
+ } else {
+ gbq_p->next = gbq->next;
+ }
+ gbq->next = NULL;
+ gbq = GBQualFree (gbq);
+ }
+ }
return TRUE;
}
@@ -3754,7 +3979,7 @@ static Boolean IntValNodeMatch (ValNodePtr vnp1, ValNodePtr vnp2)
}
}
-static void LocationConstraintClearText (LocationConstraintPtr lcp)
+static void LocationConstraintXClearText (LocationConstraintXPtr lcp)
{
if (lcp != NULL)
{
@@ -3763,20 +3988,20 @@ static void LocationConstraintClearText (LocationConstraintPtr lcp)
}
}
-static LocationConstraintPtr LocationConstraintFree (LocationConstraintPtr lcp)
+static LocationConstraintXPtr LocationConstraintXFree (LocationConstraintXPtr lcp)
{
lcp = MemFree (lcp);
return lcp;
}
-static LocationConstraintPtr LocationConstraintCopy (LocationConstraintPtr lcp)
+static LocationConstraintXPtr LocationConstraintXCopy (LocationConstraintXPtr lcp)
{
- LocationConstraintPtr lcp_new;
+ LocationConstraintXPtr lcp_new;
if (lcp == NULL)
{
return NULL;
}
- lcp_new = (LocationConstraintPtr) MemNew (sizeof (LocationConstraintData));
+ lcp_new = (LocationConstraintXPtr) MemNew (sizeof (LocationConstraintXData));
if (lcp_new != NULL)
{
lcp_new->left = lcp->left;
@@ -3789,7 +4014,7 @@ static LocationConstraintPtr LocationConstraintCopy (LocationConstraintPtr lcp)
return lcp_new;
}
-extern StringConstraintPtr StringConstraintFree (StringConstraintPtr scp)
+extern StringConstraintXPtr StringConstraintXFree (StringConstraintXPtr scp)
{
if (scp == NULL) return NULL;
scp->match_text = MemFree (scp->match_text);
@@ -3797,7 +4022,7 @@ extern StringConstraintPtr StringConstraintFree (StringConstraintPtr scp)
return scp;
}
-static void StringConstraintClearText (StringConstraintPtr scp)
+static void StringConstraintClearText (StringConstraintXPtr scp)
{
if (scp != NULL)
{
@@ -3805,15 +4030,15 @@ static void StringConstraintClearText (StringConstraintPtr scp)
}
}
-static StringConstraintPtr StringConstraintCopy (StringConstraintPtr scp)
+static StringConstraintXPtr StringConstraintCopy (StringConstraintXPtr scp)
{
- StringConstraintPtr scp_new;
+ StringConstraintXPtr scp_new;
if (scp == NULL)
{
return NULL;
}
- scp_new = (StringConstraintPtr) MemNew (sizeof (StringConstraintData));
+ scp_new = (StringConstraintXPtr) MemNew (sizeof (StringConstraintData));
if (scp_new != NULL)
{
scp_new->match_text = StringSave (scp->match_text);
@@ -3845,7 +4070,7 @@ extern ChoiceConstraintPtr ChoiceConstraintFree (ChoiceConstraintPtr scp)
if (scp == NULL) return NULL;
scp->qual_choice = ValNodeFuncFree (scp->qual_choice, scp->free_vn_proc);
scp->qual_choice_match = ValNodeFuncFree (scp->qual_choice, scp->free_vn_proc);
- scp->string_constraint = StringConstraintFree (scp->string_constraint);
+ scp->string_constraint = StringConstraintXFree (scp->string_constraint);
scp->pseudo_constraint = MemFree (scp->pseudo_constraint);
scp = MemFree (scp);
return scp;
@@ -3900,7 +4125,7 @@ extern void FilterSetClearText (FilterSetPtr fsp)
{
StringConstraintClearText (fsp->scp);
ChoiceConstraintClearText (fsp->ccp);
- LocationConstraintClearText (fsp->lcp);
+ LocationConstraintXClearText (fsp->lcp);
StringConstraintClearText (fsp->id_list);
}
}
@@ -3924,11 +4149,11 @@ extern FilterSetPtr FilterSetFree (FilterSetPtr fsp)
{
if (fsp != NULL)
{
- fsp->scp = StringConstraintFree (fsp->scp);
+ fsp->scp = StringConstraintXFree (fsp->scp);
fsp->ccp = ChoiceConstraintFree (fsp->ccp);
- fsp->lcp = LocationConstraintFree (fsp->lcp);
+ fsp->lcp = LocationConstraintXFree (fsp->lcp);
fsp->cgp = ChoiceConstraintFree (fsp->cgp);
- fsp->id_list = StringConstraintFree (fsp->id_list);
+ fsp->id_list = StringConstraintXFree (fsp->id_list);
fsp = MemFree (fsp);
}
return fsp;
@@ -3947,7 +4172,7 @@ static FilterSetPtr FilterSetCopy (FilterSetPtr fsp)
{
fsp_new->scp = StringConstraintCopy (fsp->scp);
fsp_new->ccp = ChoiceConstraintCopy (fsp->ccp);
- fsp_new->lcp = LocationConstraintCopy (fsp->lcp);
+ fsp_new->lcp = LocationConstraintXCopy (fsp->lcp);
fsp_new->cgp = ChoiceConstraintCopy (fsp->cgp);
fsp_new->id_list = StringConstraintCopy (fsp->id_list);
}
@@ -4019,20 +4244,21 @@ static SetSamplePtr SetSampleCopy (SetSamplePtr ssp)
#define PARSE_FIELD_BIOSRC_STRING 2
#define PARSE_FIELD_SOURCE_QUAL 3
#define PARSE_FIELD_GENE_FIELD 4
-#define PARSE_FIELD_MRNA_FIELD 5
+#define PARSE_FIELD_RNA_FIELD 5
#define PARSE_FIELD_CDS_COMMENT 6
#define PARSE_FIELD_PROTEIN_FIELD 7
#define PARSE_FIELD_IMPORT_QUAL 8
#define PARSE_FIELD_FEATURE_NOTE 9
#define PARSE_FIELD_COMMENT_DESC 10
+#define PARSE_FIELD_DBXREF 11
-#define MAX_PARSE_FIELD_TYPE 10
-#define SEARCH_FIELD_PUBLICATION 11
+#define MAX_PARSE_FIELD_TYPE 11
+#define SEARCH_FIELD_PUBLICATION 12
#define PARSE_FIELD_FIRST_FEATURE 4
#define PARSE_FIELD_LAST_FEATURE 9
-extern Boolean DoesLocationMatchConstraint (SeqLocPtr slp, LocationConstraintPtr lcp);
+extern Boolean DoesLocationMatchConstraint (SeqLocPtr slp, LocationConstraintXPtr lcp);
typedef struct acceptpolicy
{
@@ -4822,7 +5048,7 @@ static Boolean OrgModSpecialMatch (OrgModPtr mod, FilterSetPtr fsp)
return TRUE;
}
- if (DoesStringMatchConstraint (mod->subname, fsp->ccp->string_constraint))
+ if (DoesStringMatchConstraintX (mod->subname, fsp->ccp->string_constraint))
{
if (fsp->ccp->string_constraint->not_present)
{
@@ -4869,7 +5095,7 @@ static Boolean SubSrcSpecialMatch (SubSourcePtr ssp, FilterSetPtr fsp)
{
return TRUE;
}
- if (DoesStringMatchConstraint (ssp->name, fsp->ccp->string_constraint))
+ if (DoesStringMatchConstraintX (ssp->name, fsp->ccp->string_constraint))
{
if (fsp->ccp->string_constraint->not_present)
{
@@ -4893,13 +5119,63 @@ static Boolean SubSrcSpecialMatch (SubSourcePtr ssp, FilterSetPtr fsp)
}
}
+
+static CharPtr GetSubfield (CharPtr str, Uint1 subfield)
+{
+ CharPtr cp, cp2;
+ Int4 num_colons = 0;
+ CharPtr new_val = NULL;
+
+ if (StringHasNoText (str)) {
+ return NULL;
+ }
+
+ cp = StringChr (str, ':');
+ while (cp != NULL) {
+ num_colons ++;
+ cp = StringChr (cp + 1, ':');
+ }
+
+ if (subfield == 0) {
+ new_val = StringSave (str);
+ } else if (subfield == 1) {
+ if (num_colons == 0) {
+ return NULL;
+ } else {
+ cp = StringChr (str, ':');
+ new_val = (CharPtr) MemNew (sizeof (Char) * (cp - str + 1));
+ StringNCpy (new_val, str, cp - str);
+ new_val[cp - str] = 0;
+ }
+ } else if (subfield == 2) {
+ if (num_colons == 0 || num_colons == 1) {
+ return NULL;
+ } else {
+ cp = StringChr (str, ':');
+ cp2 = StringChr (cp + 1, ':');
+ new_val = (CharPtr) MemNew (sizeof (Char) * (cp2 - cp));
+ StringNCpy (new_val, cp + 1, cp2 - cp - 1);
+ new_val[cp2 - cp - 1] = 0;
+ }
+ } else {
+ if (num_colons == 0) {
+ new_val = StringSave (str);
+ } else {
+ cp = StringRChr (str, ':');
+ new_val = StringSave (cp + 1);
+ }
+ }
+ return new_val;
+}
+
+
static CharPtr
GetSourceQualQualValueFromBiop
(BioSourcePtr biop,
SourceQualDescPtr sqdp,
FilterSetPtr fsp)
{
- CharPtr str = NULL, tmp_str;
+ CharPtr str = NULL, field, tmp_str;
OrgModPtr mod;
SubSourcePtr ssp;
@@ -4919,15 +5195,21 @@ GetSourceQualQualValueFromBiop
&& !StringHasNoText (mod->subname)
&& OrgModSpecialMatch (mod, fsp))
{
- if (str == NULL) {
- str = StringSave (mod->subname);
+ field = GetSubfield (mod->subname, sqdp->subfield);
+ if (!StringHasNoText (field)) {
+ if (str == NULL) {
+ str = field;
+ } else {
+ tmp_str = (CharPtr) MemNew ((StringLen (str) + StringLen (field) + 3) * sizeof (Char));
+ StringCpy (tmp_str, str);
+ StringCat (tmp_str, "; ");
+ StringCat (tmp_str, field);
+ field = MemFree (field);
+ str = MemFree (str);
+ str = tmp_str;
+ }
} else {
- tmp_str = (CharPtr) MemNew ((StringLen (str) + StringLen (mod->subname) + 3) * sizeof (Char));
- StringCpy (tmp_str, str);
- StringCat (tmp_str, "; ");
- StringCat (tmp_str, mod->subname);
- str = MemFree (str);
- str = tmp_str;
+ field = MemFree (field);
}
}
mod = mod->next;
@@ -4943,16 +5225,22 @@ GetSourceQualQualValueFromBiop
&& !StringHasNoText (ssp->name)
&& SubSrcSpecialMatch (ssp, fsp))
{
+ field = GetSubfield (ssp->name, sqdp->subfield);
+ if (!StringHasNoText (field)) {
if (str == NULL) {
- str = StringSave (ssp->name);
+ str = field;
} else {
- tmp_str = (CharPtr) MemNew ((StringLen (str) + StringLen (ssp->name) + 3) * sizeof (Char));
+ tmp_str = (CharPtr) MemNew ((StringLen (str) + StringLen (field) + 3) * sizeof (Char));
StringCpy (tmp_str, str);
StringCat (tmp_str, "; ");
- StringCat (tmp_str, ssp->name);
+ StringCat (tmp_str, field);
+ field = MemFree (field);
str = MemFree (str);
str = tmp_str;
}
+ } else {
+ field = MemFree (field);
+ }
}
ssp = ssp->next;
}
@@ -5391,8 +5679,9 @@ static void ApplyStringToSource (BioSourcePtr biop, Pointer userdata)
{
biop->org = OrgRefNew();
}
- if (avp->field_list->choice == 3
- || avp->field_list->choice == 4)
+ if (biop->org->orgname == NULL
+ && (avp->field_list->choice == 3
+ || avp->field_list->choice == 4))
{
biop->org->orgname = OrgNameNew ();
}
@@ -5487,6 +5776,164 @@ static void RemoveStringFromSourceDescriptor (SeqDescrPtr sdp, Pointer userdata,
static void RemoveSourceQualFromBioSource (BioSourcePtr biop, Pointer userdata, FilterSetPtr fsp);
+static CharPtr RemoveSubfield (CharPtr orig, Uint1 subfield)
+{
+ CharPtr cp, cp2;
+ Int4 num_colons = 0;
+ CharPtr new_val;
+
+ cp = StringChr (orig, ':');
+ while (cp != NULL) {
+ num_colons ++;
+ cp = StringChr (cp + 1, ':');
+ }
+ new_val = orig;
+
+ if (subfield == 0) {
+ new_val = MemFree (new_val);
+ } else if (subfield == 1) {
+ if (num_colons == 0) {
+ /* no INST, just specID, nothing to remove */
+ } else if (num_colons == 1) {
+ cp = StringChr (orig, ':');
+ new_val = StringSave (cp + 1);
+ orig = MemFree (orig);
+ } else {
+ cp = StringChr (orig, ':');
+ new_val = StringSave (cp);
+ orig = MemFree (orig);
+ }
+ } else if (subfield == 2) {
+ if (num_colons == 0 || num_colons == 1) {
+ /* no COLL, nothing to remove */
+ } else {
+ cp = StringChr (orig, ':');
+ cp2 = StringChr (cp + 1, ':');
+ new_val = (CharPtr) MemNew (sizeof (Char) * (cp - orig + StringLen (cp2) + 1));
+ StringNCpy (new_val, orig, cp - orig);
+ StringCat (new_val, cp2);
+ orig = MemFree (orig);
+ if (StringCmp (new_val, ":") == 0) {
+ new_val = MemFree (new_val);
+ }
+ }
+ } else {
+ /* specid */
+ if (num_colons == 0) {
+ new_val = MemFree (new_val);
+ } else {
+ cp = StringRChr (new_val, ':');
+ *(cp + 1) = 0;
+ }
+ }
+ return new_val;
+}
+
+
+static CharPtr ApplyToSubfield (CharPtr orig, ApplyValuePtr avp, Uint1 subfield)
+{
+ CharPtr cp, cp2;
+ Int4 num_colons = 0, len;
+ CharPtr new_field, new_val;
+
+ cp = StringChr (orig, ':');
+ while (cp != NULL) {
+ num_colons ++;
+ cp = StringChr (cp + 1, ':');
+ }
+
+ new_val = orig;
+ if (subfield == 0) {
+ /* whole field */
+ new_val = HandleApplyValue (orig, avp);
+ } else if (subfield == 1) {
+ /* INST */
+ if (num_colons == 0) {
+ /* all we have is the specID, we are adding INST */
+ new_field = HandleApplyValue (NULL, avp);
+ if (!StringHasNoText (new_field)) {
+ new_val = (CharPtr) MemNew (sizeof (Char) * (StringLen (new_field) + StringLen (orig) + 2));
+ sprintf (new_val, "%s:%s", new_field, orig == NULL ? "" : orig);
+ orig = MemFree (orig);
+ } else {
+ new_val = orig;
+ }
+ new_field = MemFree (new_field);
+ } else {
+ cp = StringChr (orig, ':');
+ len = cp - orig + 1;
+ new_field = (CharPtr) MemNew (sizeof (Char) * len);
+ StringNCpy (new_field, orig, len - 1);
+ new_field[len - 1] = 0;
+ new_field = HandleApplyValue (new_field, avp);
+ new_val = (CharPtr) MemNew (sizeof (Char) * (StringLen (new_field) + StringLen (cp) + 1));
+ sprintf (new_val, "%s%s", new_field == NULL ? "" : new_field, cp);
+ orig = MemFree (orig);
+ new_field = MemFree (new_field);
+ }
+ } else if (subfield == 2) {
+ /* COLL */
+ if (num_colons == 0) {
+ /* add blank INST, then COLL, then existing specID */
+ new_field = HandleApplyValue (NULL, avp);
+ if (!StringHasNoText (new_field)) {
+ new_val = (CharPtr) MemNew (sizeof (Char) * (3 + StringLen (new_field) + StringLen (orig)));
+ sprintf (new_val, ":%s:%s", new_field, orig == NULL ? "" : orig);
+ orig = MemFree (orig);
+ } else {
+ new_val = orig;
+ }
+ new_field = MemFree (new_field);
+ } else if (num_colons == 1) {
+ /* have INST and specID */
+ new_field = HandleApplyValue (NULL, avp);
+ if (!StringHasNoText (new_field)) {
+ new_val = (CharPtr) MemNew (sizeof (Char) * (3 + StringLen (new_field) + StringLen (orig)));
+ cp = StringChr (orig, ':');
+ len = cp - orig;
+ StringNCpy (new_val, orig, len);
+ StringCat (new_val, ":");
+ StringCat (new_val, new_field);
+ StringCat (new_val, cp);
+ orig = MemFree (orig);
+ } else {
+ new_val = orig;
+ }
+ new_field = MemFree (new_field);
+ } else {
+ cp = StringChr (orig, ':');
+ cp2 = StringChr (cp + 1, ':');
+ len = cp2 - cp;
+ new_field = (CharPtr) MemNew (sizeof (Char) * len);
+ StringNCpy (new_field, cp + 1, len - 1);
+ new_field[len - 1] = 0;
+ new_field = HandleApplyValue (new_field, avp);
+ new_val = (CharPtr) MemNew (sizeof (Char) * (cp - orig + 1 + StringLen (new_field) + StringLen (cp2) + 1));
+ StringNCpy (new_val, orig, cp - orig + 1);
+ StringCat (new_val, new_field);
+ StringCat (new_val, cp2);
+ orig = MemFree (orig);
+ new_field = MemFree (new_field);
+ }
+ } else {
+ /* specid */
+ if (num_colons == 0) {
+ new_val = HandleApplyValue (orig, avp);
+ } else {
+ cp = StringRChr (orig, ':');
+ new_field = StringSave (cp + 1);
+ new_field = HandleApplyValue (new_field, avp);
+ new_val = (CharPtr) MemNew (sizeof (Char) + (cp - orig + 1 + StringLen (new_field) + 1));
+ StringNCpy (new_val, orig, cp - orig + 1);
+ StringCat (new_val, new_field);
+ orig = MemFree (orig);
+ new_field = MemFree (new_field);
+ }
+ }
+ return new_val;
+}
+
+
static void ApplySourceQualBioSourceCallback (BioSourcePtr biop, Pointer userdata, FilterSetPtr fsp)
{
ApplyValuePtr avp;
@@ -5546,7 +5993,7 @@ static void ApplySourceQualBioSourceCallback (BioSourcePtr biop, Pointer userdat
{
if (!is_nontext)
{
- mod->subname = HandleApplyValue (mod->subname, avp);
+ mod->subname = ApplyToSubfield (mod->subname, avp, sqdp->subfield);
}
found = TRUE;
}
@@ -5563,7 +6010,7 @@ static void ApplySourceQualBioSourceCallback (BioSourcePtr biop, Pointer userdat
}
else
{
- mod->subname = StringSave (avp->new_text);
+ mod->subname = ApplyToSubfield (mod->subname, avp, sqdp->subfield);
}
if (last_mod == NULL)
{
@@ -5585,7 +6032,7 @@ static void ApplySourceQualBioSourceCallback (BioSourcePtr biop, Pointer userdat
{
if (! is_nontext)
{
- ssp->name = HandleApplyValue (ssp->name, avp);
+ ssp->name = ApplyToSubfield (ssp->name, avp, sqdp->subfield);
}
found = TRUE;
}
@@ -5602,7 +6049,7 @@ static void ApplySourceQualBioSourceCallback (BioSourcePtr biop, Pointer userdat
}
else
{
- ssp->name = StringSave (avp->new_text);
+ ssp->name = ApplyToSubfield (ssp->name, avp, sqdp->subfield);
}
if (last_ssp == NULL)
{
@@ -5634,7 +6081,7 @@ static void ApplySourceQualDescriptorCallback (SeqDescrPtr sdp, Pointer userdata
ApplySourceQualBioSourceCallback (sdp->data.ptrvalue, userdata, fsp);
}
-static void RemoveOrgModFromBioSource (BioSourcePtr biop, Uint1 subtype, FilterSetPtr fsp)
+static void RemoveOrgModFromBioSource (BioSourcePtr biop, Uint1 subtype, Uint1 subfield, FilterSetPtr fsp)
{
OrgModPtr mod = NULL, prev_mod = NULL, next_mod;
@@ -5647,16 +6094,21 @@ static void RemoveOrgModFromBioSource (BioSourcePtr biop, Uint1 subtype, FilterS
if (mod->subtype == subtype
&& OrgModSpecialMatch (mod, fsp))
{
- if (prev_mod == NULL)
- {
- biop->org->orgname->mod = mod->next;
- }
- else
- {
- prev_mod->next = mod->next;
+ mod->subname = RemoveSubfield (mod->subname, subfield);
+ if (StringHasNoText (mod->subname)) {
+ if (prev_mod == NULL)
+ {
+ biop->org->orgname->mod = mod->next;
+ }
+ else
+ {
+ prev_mod->next = mod->next;
+ }
+ mod->next = NULL;
+ OrgModFree (mod);
+ } else {
+ prev_mod = mod;
}
- mod->next = NULL;
- OrgModFree (mod);
}
else
{
@@ -5667,7 +6119,7 @@ static void RemoveOrgModFromBioSource (BioSourcePtr biop, Uint1 subtype, FilterS
}
}
-static void RemoveSubSourceFromBioSource (BioSourcePtr biop, Uint2 subtype, FilterSetPtr fsp)
+static void RemoveSubSourceFromBioSource (BioSourcePtr biop, Uint2 subtype, Uint1 subfield, FilterSetPtr fsp)
{
SubSourcePtr ssp = NULL, prev_ssp = NULL, next_ssp;
@@ -5680,16 +6132,21 @@ static void RemoveSubSourceFromBioSource (BioSourcePtr biop, Uint2 subtype, Filt
if (ssp->subtype == subtype
&& SubSrcSpecialMatch (ssp, fsp))
{
- if (prev_ssp == NULL)
- {
- biop->subtype = ssp->next;
- }
- else
- {
- prev_ssp->next = ssp->next;
+ ssp->name = RemoveSubfield (ssp->name, subfield);
+ if (StringHasNoText (ssp->name)) {
+ if (prev_ssp == NULL)
+ {
+ biop->subtype = ssp->next;
+ }
+ else
+ {
+ prev_ssp->next = ssp->next;
+ }
+ ssp->next = NULL;
+ SubSourceFree (ssp);
+ } else {
+ prev_ssp = ssp;
}
- ssp->next = NULL;
- SubSourceFree (ssp);
}
else
{
@@ -5720,18 +6177,18 @@ static void RemoveSourceQualFromBioSource (BioSourcePtr biop, Pointer userdata,
sqdp = (SourceQualDescPtr) avp->field_list->data.ptrvalue;
if (sqdp->isOrgMod)
{
- RemoveOrgModFromBioSource (biop, sqdp->subtype, fsp);
+ RemoveOrgModFromBioSource (biop, sqdp->subtype, sqdp->subfield, fsp);
}
else
{
- RemoveSubSourceFromBioSource (biop, sqdp->subtype, fsp);
+ RemoveSubSourceFromBioSource (biop, sqdp->subtype, sqdp->subfield, fsp);
}
}
else if (avp->field_list->choice == 1
&& StringCmp (avp->field_list->data.ptrvalue, "All Notes") == 0)
{
- RemoveOrgModFromBioSource (biop, 255, fsp);
- RemoveSubSourceFromBioSource (biop, 255, fsp);
+ RemoveOrgModFromBioSource (biop, 255, 0, fsp);
+ RemoveSubSourceFromBioSource (biop, 255, 0, fsp);
}
}
@@ -6273,12 +6730,13 @@ static void SetDbxrefFromString (SeqFeatPtr sfp, ApplyValuePtr avp, FilterSetPtr
}
+static void SetRNAProduct (SeqFeatPtr sfp, ApplyValuePtr avp);
+
static void SetGBQualString (SeqFeatPtr sfp, Pointer userdata, FilterSetPtr fsp)
{
GBQualPtr gbqual, gbqual_last = NULL;
ApplyValuePtr avp;
Boolean found = FALSE;
- RnaRefPtr rrp;
GeneRefPtr grp;
if (sfp == NULL || userdata == NULL)
@@ -6306,19 +6764,7 @@ static void SetGBQualString (SeqFeatPtr sfp, Pointer userdata, FilterSetPtr fsp)
else if (StringICmp (EditQualifierList[avp->field_list->data.intvalue - 1].name, "product") == 0
&& sfp->data.choice == SEQFEAT_RNA)
{
- rrp = (RnaRefPtr) sfp->data.value.ptrvalue;
- if (rrp != NULL)
- {
- if (rrp->ext.choice == 0)
- {
- rrp->ext.choice = 1;
- rrp->ext.value.ptrvalue = NULL;
- }
- if (rrp->ext.choice == 1)
- {
- rrp->ext.value.ptrvalue = HandleApplyValue (rrp->ext.value.ptrvalue, avp);
- }
- }
+ SetRNAProduct (sfp, avp);
return;
}
else if (StringICmp (EditQualifierList [avp->field_list->data.intvalue - 1].name, "map") == 0
@@ -6541,29 +6987,29 @@ static void RemoveGBQualByNameConstraint (SeqFeatPtr sfp, Pointer userdata, Filt
GBQualPtr gbqual, gbqual_last = NULL, gbqual_next;
RnaRefPtr rrp;
GeneRefPtr grp;
- StringConstraintPtr scp;
+ StringConstraintXPtr scp;
if (sfp == NULL || userdata == NULL)
{
return;
}
- scp = (StringConstraintPtr) userdata;
+ scp = (StringConstraintXPtr) userdata;
if (scp == NULL)
{
return;
}
- if (DoesStringMatchConstraint ("note", scp))
+ if (DoesStringMatchConstraintX ("note", scp))
{
sfp->comment = MemFree (sfp->comment);
}
- if (DoesStringMatchConstraint ("exception", scp))
+ if (DoesStringMatchConstraintX ("exception", scp))
{
sfp->except_text = MemFree (sfp->except_text);
}
- if (DoesStringMatchConstraint ("product", scp) && sfp->data.choice == SEQFEAT_RNA)
+ if (DoesStringMatchConstraintX ("product", scp) && sfp->data.choice == SEQFEAT_RNA)
{
rrp = (RnaRefPtr) sfp->data.value.ptrvalue;
if (rrp != NULL && rrp->ext.choice == 1)
@@ -6573,7 +7019,7 @@ static void RemoveGBQualByNameConstraint (SeqFeatPtr sfp, Pointer userdata, Filt
}
}
- if (DoesStringMatchConstraint ("map", scp) && sfp->data.choice == SEQFEAT_GENE)
+ if (DoesStringMatchConstraintX ("map", scp) && sfp->data.choice == SEQFEAT_GENE)
{
grp = (GeneRefPtr) sfp->data.value.ptrvalue;
if (grp != NULL)
@@ -6582,22 +7028,22 @@ static void RemoveGBQualByNameConstraint (SeqFeatPtr sfp, Pointer userdata, Filt
}
}
- if (DoesStringMatchConstraint ("db_xref", scp))
+ if (DoesStringMatchConstraintX ("db_xref", scp))
{
sfp->dbxref = RemoveDbxrefList (sfp->dbxref);
}
- if (DoesStringMatchConstraint ("go_process", scp))
+ if (DoesStringMatchConstraintX ("go_process", scp))
{
RemoveGoTerm (sfp, "process");
}
- if (DoesStringMatchConstraint ("go_function", scp))
+ if (DoesStringMatchConstraintX ("go_function", scp))
{
RemoveGoTerm (sfp, "function");
}
- if (DoesStringMatchConstraint ("go_component", scp))
+ if (DoesStringMatchConstraintX ("go_component", scp))
{
RemoveGoTerm (sfp, "component");
}
@@ -6606,7 +7052,7 @@ static void RemoveGBQualByNameConstraint (SeqFeatPtr sfp, Pointer userdata, Filt
while (gbqual != NULL)
{
gbqual_next = gbqual->next;
- if (DoesStringMatchConstraint (gbqual->qual, scp))
+ if (DoesStringMatchConstraintX (gbqual->qual, scp))
{
if (gbqual_last == NULL)
{
@@ -6699,7 +7145,7 @@ static void StripFieldNameFromText(CharPtr text,
}
-static CharPtr ReplaceStringForParse(CharPtr src_text, TextPortionPtr text_portion)
+static CharPtr ReplaceStringForParse(CharPtr src_text, TextPortionXPtr text_portion)
{
CharPtr found_loc;
Int4 found_len;
@@ -6711,7 +7157,7 @@ static CharPtr ReplaceStringForParse(CharPtr src_text, TextPortionPtr text_porti
/* for parse, replace the source text with the portion we want */
found_loc = NULL;
found_len = 0;
- FindTextPortionInString (src_text, text_portion, &found_loc, &found_len);
+ FindTextPortionXInString (src_text, text_portion, &found_loc, &found_len);
if (found_loc != NULL)
{
dst_txt = (CharPtr)MemNew (found_len + 1);
@@ -8072,6 +8518,8 @@ static void RemoveProteinFieldString (SeqFeatPtr sfp, ValNodePtr protein_field)
}
}
+extern ValNodePtr ApplyValueToValNodeStringListAsText (ValNodePtr list, Int2 choice, ApplyValuePtr avp);
+
static void SetProteinFieldString (SeqFeatPtr sfp, Pointer userdata, FilterSetPtr fsp)
{
ProtRefPtr prp;
@@ -8144,14 +8592,7 @@ static void SetProteinFieldString (SeqFeatPtr sfp, Pointer userdata, FilterSetPt
prp->desc = HandleApplyValue (prp->desc, avp);
break;
case PROTEINFIELD_EC_NUM:
- if (prp->ec == NULL || !StringHasNoText(avp->text_to_replace))
- {
- prp->ec = ApplyValueToValNodeStringList (prp->ec, 0, avp);
- }
- else
- {
- prp->ec->data.ptrvalue = HandleApplyValue (prp->ec->data.ptrvalue, avp);
- }
+ prp->ec = ApplyValueToValNodeStringListAsText (prp->ec, 0, avp);
break;
case PROTEINFIELD_ACTIVITY:
if (prp->activity == NULL || !StringHasNoText(avp->text_to_replace))
@@ -8419,7 +8860,7 @@ static Boolean DoesConstraintDisqualifyFeature (SeqFeatPtr sfp, ChoiceConstraint
else if (ccp->constraint_type == CHOICE_CONSTRAINT_STRING)
{
str = GetCDSGeneProtField (sfp, ccp->qual_choice, NULL);
- does_match = DoesStringMatchConstraint (str, ccp->string_constraint);
+ does_match = DoesStringMatchConstraintX (str, ccp->string_constraint);
MemFree (str);
if (ccp->string_constraint != NULL && ccp->string_constraint->not_present)
{
@@ -8576,16 +9017,16 @@ SetCDSGeneProtField
return TRUE;
}
-#define RNAFIELD_NAME 1
+#define RNAFIELD_PRODUCT 1
#define RNAFIELD_COMMENT 2
-#define RNAFIELD_PRODUCT 3
-#define RNAFIELD_CODONS_RECOGNIZED 4
+#define RNAFIELD_CODONS_RECOGNIZED 3
+#define RNAFIELD_NCRNA_CLASS 4
#define RNAFIELD_ANTICODON 5
#define RNAFIELD_TRANSCRIPT_ID 6
static CharPtr rna_field_list [] =
{
- "Name", "Comment", "Product GBQual", "Codons Recognized", "Anticodon", "Transcript ID"
+ "Product", "Comment", "Codons Recognized", "ncRNA class", "Anticodon", "Transcript ID"
};
static Int4 num_rna_fields = sizeof (rna_field_list) / sizeof (CharPtr);
@@ -8681,7 +9122,7 @@ RNAFieldSelectionDialog
DialoG dlg;
Int4 i;
- for (i = 0; i < 3; i++)
+ for (i = 0; i < 4; i++)
{
ValNodeAddInt (&choice_list, 0, i + 1);
}
@@ -8700,7 +9141,7 @@ RNAFieldSelectionDialog
}
static CharPtr rna_subtype_list [] = { "misc_RNA", "preRna", "mRNA", "tRNA",
- "rRNA", "snRNA", "scRNA", "snoRNA"};
+ "rRNA", "ncRNA", "tmRNA"};
static Int2 num_rna_subtypes = sizeof (rna_subtype_list) / sizeof (CharPtr);
static CharPtr GetRNASubtypeName (ValNodePtr vnp)
@@ -8729,9 +9170,8 @@ static DialoG RNASubtypeSelectionDialog
ValNodeAddInt (&choice_list, 2, FEATDEF_mRNA);
ValNodeAddInt (&choice_list, 3, FEATDEF_tRNA);
ValNodeAddInt (&choice_list, 4, FEATDEF_rRNA);
- ValNodeAddInt (&choice_list, 5, FEATDEF_snRNA);
- ValNodeAddInt (&choice_list, 6, FEATDEF_scRNA);
- ValNodeAddInt (&choice_list, 7, FEATDEF_snoRNA);
+ ValNodeAddInt (&choice_list, 5, FEATDEF_ncRNA);
+ ValNodeAddInt (&choice_list, 6, FEATDEF_tmRNA);
dlg = ValNodeSelectionDialog (h, choice_list, TALL_SELECTION_LIST,
GetRNASubtypeName, NULL,
@@ -8742,28 +9182,55 @@ static DialoG RNASubtypeSelectionDialog
}
-static CharPtr GetRNANameString (SeqFeatPtr sfp)
+static CharPtr GetRNAProductString (SeqFeatPtr sfp)
{
RnaRefPtr rrp;
SeqMgrFeatContext context;
CharPtr str = NULL;
+ GBQualPtr gbqual;
if (sfp == NULL || sfp->data.choice != SEQFEAT_RNA || sfp->data.value.ptrvalue == NULL)
{
return NULL;
}
+
rrp = sfp->data.value.ptrvalue;
- if (rrp->ext.choice == 1 && !StringHasNoText (rrp->ext.value.ptrvalue))
+ if (rrp->ext.choice == 0
+ || (rrp->ext.choice == 1 && StringHasNoText (rrp->ext.value.ptrvalue))
+ || (rrp->ext.choice == 1
+ && (StringCmp (rrp->ext.value.ptrvalue, "ncRNA") == 0
+ || StringCmp (rrp->ext.value.ptrvalue, "tmRNA") == 0
+ || StringCmp (rrp->ext.value.ptrvalue, "misc_RNA") == 0)))
{
- str = StringSave (rrp->ext.value.ptrvalue);
+ gbqual = sfp->qual;
+ while (gbqual != NULL && str == NULL) {
+ if (StringICmp (gbqual->qual, "product") == 0
+ && !StringHasNoText (gbqual->val))
+ {
+ str = StringSave (gbqual->val);
+ }
+ gbqual = gbqual->next;
+ }
}
- else if (rrp->ext.choice == 2 && rrp->ext.value.ptrvalue != NULL)
+
+ if (str == NULL)
{
- if (SeqMgrGetDesiredFeature (sfp->idx.entityID, NULL, 0, 0, sfp, &context) != NULL
- && !StringHasNoText (context.label))
+ if (rrp->ext.choice == 1 && !StringHasNoText (rrp->ext.value.ptrvalue)
+ && StringCmp (rrp->ext.value.ptrvalue, "ncRNA") != 0
+ && StringCmp (rrp->ext.value.ptrvalue, "tmRNA") != 0
+ && StringCmp (rrp->ext.value.ptrvalue, "misc_RNA") != 0)
{
- str = (CharPtr) MemNew (sizeof (Char) + (StringLen (context.label) + 6));
- sprintf (str, "tRNA-%s", context.label);
+ str = StringSave (rrp->ext.value.ptrvalue);
+ }
+ else if (rrp->ext.choice == 2 && rrp->ext.value.ptrvalue != NULL)
+ {
+ if (SeqMgrGetDesiredFeature (sfp->idx.entityID, NULL, 0, 0, sfp, &context) != NULL
+ && !StringHasNoText (context.label)
+ && StringCmp (context.label, "tRNA") != 0)
+ {
+ str = (CharPtr) MemNew (sizeof (Char) + (StringLen (context.label) + 6));
+ sprintf (str, "tRNA-%s", context.label);
+ }
}
}
return str;
@@ -8773,12 +9240,12 @@ extern CharPtr GetRNAFieldString (SeqFeatPtr sfp, ValNodePtr vnp, FilterSetPtr f
{
RnaRefPtr rrp;
CharPtr str = NULL;
- GBQualPtr gbqual;
ValNode vn;
GeneRefPtr grp;
SeqFeatPtr gene;
SeqMgrFeatContext context;
Int4 field_choice;
+ GBQualPtr qual;
if (sfp == NULL || sfp->data.choice != SEQFEAT_RNA || vnp == NULL)
{
@@ -8792,8 +9259,8 @@ extern CharPtr GetRNAFieldString (SeqFeatPtr sfp, ValNodePtr vnp, FilterSetPtr f
field_choice = vnp->data.intvalue;
switch (vnp->data.intvalue)
{
- case RNAFIELD_NAME :
- str = GetRNANameString (sfp);
+ case RNAFIELD_PRODUCT :
+ str = GetRNAProductString (sfp);
break;
case RNAFIELD_COMMENT :
if (!StringHasNoText (sfp->comment))
@@ -8801,15 +9268,14 @@ extern CharPtr GetRNAFieldString (SeqFeatPtr sfp, ValNodePtr vnp, FilterSetPtr f
str = StringSave (sfp->comment);
}
break;
- case RNAFIELD_PRODUCT :
- gbqual = sfp->qual;
- while (gbqual != NULL && str == NULL) {
- if (StringICmp (gbqual->qual, "product") == 0
- && !StringHasNoText (gbqual->val))
+ case RNAFIELD_NCRNA_CLASS :
+ for (qual = sfp->qual; qual != NULL && str == NULL; qual = qual->next)
+ {
+ if (StringCmp (qual->qual, "ncRNA_class") == 0
+ && !StringHasNoText (qual->val))
{
- str = StringSave (gbqual->val);
+ str = StringSave (qual->val);
}
- gbqual = gbqual->next;
}
break;
default:
@@ -8874,20 +9340,29 @@ static void SettRNAName (SeqFeatPtr sfp, ApplyValuePtr avp)
GBQualPtr gbqual, gbqual_last = NULL;
if (sfp == NULL || sfp->data.value.ptrvalue == NULL
- || sfp->data.choice != SEQFEAT_RNA
+ || sfp->idx.subtype != FEATDEF_tRNA
|| avp == NULL)
{
return;
}
rrp = sfp->data.value.ptrvalue;
+ if (rrp->ext.choice == 0)
+ {
+ trp = MemNew (sizeof (tRNA));
+ trp->aatype = 0;
+ MemSet (trp->codon, 255, sizeof (trp->codon));
+ trp->anticodon = NULL;
+ rrp->ext.value.ptrvalue = trp;
+ rrp->ext.choice = 2;
+ }
if (rrp->ext.choice != 2)
{
return;
}
trp = (tRNAPtr) rrp->ext.value.ptrvalue;
- name_string = GetRNANameString (sfp);
+ name_string = GetRNAProductString (sfp);
name_string = HandleApplyValue (name_string, avp);
if (!IsParseabletRNAName(name_string))
{
@@ -8930,19 +9405,87 @@ static void SettRNAName (SeqFeatPtr sfp, ApplyValuePtr avp)
{
new_aa = ParseTRnaString (name_string, &justTrnaText, codon, TRUE);
trp->aa = new_aa;
+ trp->aatype = 2;
name_string = MemFree (name_string);
}
}
+static void SetRNAProduct (SeqFeatPtr sfp, ApplyValuePtr avp)
+{
+ RnaRefPtr rrp;
+ GBQualPtr gbq, prev_gbq = NULL;
+
+ if (sfp == NULL || sfp->data.choice != SEQFEAT_RNA || sfp->data.value.ptrvalue == NULL || avp == NULL)
+ {
+ return;
+ }
+
+ rrp = (RnaRefPtr) sfp->data.value.ptrvalue;
+
+ gbq = sfp->qual;
+ while (gbq != NULL && StringCmp (gbq->qual, "product") != 0)
+ {
+ prev_gbq = gbq;
+ gbq = gbq->next;
+ }
+ if (gbq != NULL)
+ {
+ gbq->val = HandleApplyValue (gbq->val, avp);
+ if (StringHasNoText (gbq->val))
+ {
+ if (prev_gbq == NULL)
+ {
+ sfp->qual = gbq->next;
+ }
+ else
+ {
+ prev_gbq->next = gbq->next;
+ }
+ gbq->next = NULL;
+ gbq = GBQualFree (gbq);
+ }
+ }
+ else if (sfp->idx.subtype == FEATDEF_tRNA || rrp->ext.choice == 2)
+ {
+ SettRNAName (sfp, avp);
+ }
+ else if (rrp->ext.choice == 1
+ && (StringCmp (rrp->ext.value.ptrvalue, "ncRNA") == 0
+ || StringCmp (rrp->ext.value.ptrvalue, "tmRNA") == 0
+ || StringCmp (rrp->ext.value.ptrvalue, "misc_RNA") == 0))
+ {
+ gbq = GBQualNew();
+ gbq->qual = StringSave ("product");
+ gbq->val = HandleApplyValue (gbq->val, avp);
+ gbq->next = sfp->qual;
+ sfp->qual = gbq;
+ }
+ else if (rrp->ext.choice == 1 || rrp->ext.choice == 0)
+ {
+ rrp->ext.value.ptrvalue = HandleApplyValue (rrp->ext.value.ptrvalue, avp);
+ if (StringHasNoText (rrp->ext.value.ptrvalue))
+ {
+ rrp->ext.value.ptrvalue = MemFree (rrp->ext.value.ptrvalue);
+ rrp->ext.choice = 0;
+ }
+ else
+ {
+ rrp->ext.choice = 1;
+ }
+ }
+}
+
+
static void SetRNAFieldString (SeqFeatPtr sfp, Pointer userdata, FilterSetPtr fsp)
{
RnaRefPtr rrp;
ApplyValuePtr avp;
- GBQualPtr gbqual, gbqual_last = NULL;
SeqFeatPtr gene;
GeneRefPtr grp;
SeqMgrFeatContext context;
+ GBQualPtr qual;
+ Boolean found = FALSE;
if (sfp == NULL || sfp->data.choice != SEQFEAT_RNA || userdata == NULL)
{
@@ -8959,63 +9502,28 @@ static void SetRNAFieldString (SeqFeatPtr sfp, Pointer userdata, FilterSetPtr fs
switch (avp->field_list->data.intvalue)
{
- case RNAFIELD_NAME :
- if (rrp != NULL)
- {
- if (rrp->ext.choice == 0)
- {
- rrp->ext.choice = 1;
- rrp->ext.value.ptrvalue = NULL;
- }
- if (rrp->ext.choice == 1)
- {
- rrp->ext.value.ptrvalue = HandleApplyValue (rrp->ext.value.ptrvalue, avp);
- }
- else if (rrp->ext.choice == 2)
- {
- SettRNAName (sfp, avp);
- }
- }
+ case RNAFIELD_PRODUCT :
+ SetRNAProduct (sfp, avp);
break;
case RNAFIELD_COMMENT :
sfp->comment = HandleApplyValue (sfp->comment, avp);
break;
- case RNAFIELD_PRODUCT :
- gbqual = sfp->qual;
- while (gbqual != NULL && StringICmp (gbqual->qual, "product") != 0)
+ case RNAFIELD_NCRNA_CLASS :
+ for (qual = sfp->qual; qual != NULL; qual = qual->next)
{
- gbqual_last = gbqual;
- gbqual = gbqual->next;
- }
- if (gbqual == NULL)
- {
- if (StringHasNoText (avp->text_to_replace))
+ if (StringCmp (qual->qual, "ncRNA_class") == 0)
{
- gbqual = GBQualNew ();
- if (gbqual == NULL)
- {
- return;
- }
- gbqual->qual = StringSave ("product");
- gbqual->val = StringSave (avp->new_text);
- if (gbqual_last == NULL)
- {
- sfp->qual = gbqual;
- }
- else
- {
- gbqual->next = gbqual_last->next;
- gbqual_last->next = gbqual;
- }
- }
- else
- {
- /* don't create new product for edit/replace */
+ qual->val = HandleApplyValue (qual->val, avp);
+ found = TRUE;
}
}
- else
- {
- gbqual->val = HandleApplyValue (gbqual->val, avp);
+ if (!found)
+ {
+ qual = GBQualNew ();
+ qual->qual = StringSave ("ncRNA_class");
+ qual->val = StringSave (avp->new_text);
+ qual->next = sfp->qual;
+ sfp->qual = qual;
}
break;
default:
@@ -9038,16 +9546,76 @@ static void SetRNAFieldString (SeqFeatPtr sfp, Pointer userdata, FilterSetPtr fs
}
}
+
+static void RemoveRNAProduct (SeqFeatPtr sfp)
+{
+ RnaRefPtr rrp;
+ GBQualPtr gbq, prev_gbq = NULL;
+ tRNAPtr trp;
+
+ if (sfp == NULL || sfp->data.choice != SEQFEAT_RNA || sfp->data.value.ptrvalue == NULL)
+ {
+ return;
+ }
+
+ rrp = (RnaRefPtr) sfp->data.value.ptrvalue;
+
+ gbq = sfp->qual;
+ while (gbq != NULL && StringCmp (gbq->qual, "product") != 0)
+ {
+ prev_gbq = gbq;
+ gbq = gbq->next;
+ }
+ if (gbq != NULL)
+ {
+ if (prev_gbq == NULL)
+ {
+ sfp->qual = gbq->next;
+ }
+ else
+ {
+ prev_gbq->next = gbq->next;
+ }
+ gbq->next = NULL;
+ gbq = GBQualFree (gbq);
+ }
+ else if (rrp->ext.choice == 1
+ && (StringCmp (rrp->ext.value.ptrvalue, "ncRNA") == 0
+ || StringCmp (rrp->ext.value.ptrvalue, "tmRNA") == 0
+ || StringCmp (rrp->ext.value.ptrvalue, "misc_RNA") == 0))
+ {
+ /* do nothing - already have no product */
+ }
+ else if (rrp->ext.choice == 0)
+ {
+ /* do nothing - already have no product */
+ }
+ else if (rrp->ext.choice == 1)
+ {
+ rrp->ext.value.ptrvalue = MemFree (rrp->ext.value.ptrvalue);
+ rrp->ext.choice = 0;
+ }
+ else if (rrp->ext.choice == 2)
+ {
+ trp = (tRNAPtr) rrp->ext.value.ptrvalue;
+ if (trp != NULL)
+ {
+ trp->aatype = 0;
+ }
+ }
+}
+
+
static void RemoveRNAField (SeqFeatPtr sfp, Pointer userdata, FilterSetPtr fsp)
{
RnaRefPtr rrp;
- GBQualPtr gbqual, prev_qual = NULL, next_qual;
tRNAPtr trp;
ApplyValuePtr avp;
SeqFeatPtr gene;
GeneRefPtr grp;
ValNode vn;
SeqMgrFeatContext context;
+ GBQualPtr qual, qual_prev = NULL, qual_next;
if (sfp == NULL || sfp->data.choice != SEQFEAT_RNA || userdata == NULL)
{
@@ -9064,51 +9632,37 @@ static void RemoveRNAField (SeqFeatPtr sfp, Pointer userdata, FilterSetPtr fsp)
switch (avp->field_list->data.intvalue)
{
- case RNAFIELD_NAME :
- if (rrp != NULL && rrp->ext.value.ptrvalue != NULL)
- {
- if (rrp->ext.choice == 1)
- {
- rrp->ext.value.ptrvalue = MemFree (rrp->ext.value.ptrvalue);
- }
- else if (rrp->ext.choice == 2)
- {
- trp = (tRNAPtr) rrp->ext.value.ptrvalue;
- if (trp != NULL)
- {
- trp->aatype = 0;
- }
- }
- }
+ case RNAFIELD_PRODUCT :
+ RemoveRNAProduct (sfp);
break;
case RNAFIELD_COMMENT :
sfp->comment = MemFree (sfp->comment);
break;
- case RNAFIELD_PRODUCT :
- gbqual = sfp->qual;
- while (gbqual != NULL)
+ case RNAFIELD_NCRNA_CLASS :
+ qual = sfp->qual;
+ while (qual != NULL)
{
- next_qual = gbqual->next;
- if (StringICmp (gbqual->qual, "product") == 0)
+ qual_next = qual->next;
+ if (StringCmp (qual->qual, "ncRNA_class") == 0)
{
- if (prev_qual == NULL)
+ if (qual_prev == NULL)
{
- sfp->qual = sfp->qual->next;
+ sfp->qual = qual_next;
}
else
{
- prev_qual->next = gbqual->next;
+ qual_prev->next = qual_next;
}
- gbqual->next = NULL;
- GBQualFree (gbqual);
+ qual->next = NULL;
+ qual = GBQualFree (qual);
}
else
{
- prev_qual = gbqual;
+ qual_prev = qual;
}
- gbqual = next_qual;
+ qual = qual_next;
}
- break;
+ break;
case RNAFIELD_ANTICODON :
if (rrp->ext.choice == 2) {
trp = (tRNAPtr) rrp->ext.value.ptrvalue;
@@ -9487,6 +10041,143 @@ static void ApplySourceStringDescriptorCallback (SeqDescrPtr sdp, Pointer userda
}
+static CharPtr GetDbxrefFromBioSource (BioSourcePtr biop, ValNodePtr vnp)
+{
+ ValNodePtr dbx;
+ DbtagPtr dbtag;
+ Char buf[20];
+
+ if (biop == NULL || vnp == NULL || vnp->data.ptrvalue == NULL || biop->org == NULL)
+ {
+ return NULL;
+ }
+
+ dbx = biop->org->db;
+ while (dbx != NULL)
+ {
+ dbtag = (DbtagPtr) dbx->data.ptrvalue;
+ if (dbtag != NULL && dbtag->tag != NULL
+ && StringCmp (dbtag->db, vnp->data.ptrvalue) == 0)
+ {
+ if (dbtag->tag->str == NULL)
+ {
+ sprintf (buf, "%d", dbtag->tag->id);
+ return StringSave (buf);
+ }
+ else
+ {
+ return StringSave (dbtag->tag->str);
+ }
+ }
+ dbx = dbx->next;
+ }
+ return NULL;
+}
+
+static CharPtr
+GetBioSourceFeatureDbxrefString
+(SeqFeatPtr sfp,
+ ValNodePtr vnp,
+ FilterSetPtr fsp)
+{
+ if (sfp == NULL || sfp->data.choice != SEQFEAT_BIOSRC || vnp == NULL)
+ {
+ return NULL;
+ }
+
+ return GetDbxrefFromBioSource (sfp->data.value.ptrvalue, vnp);
+}
+
+static CharPtr
+GetBioSourceDescriptorDbxrefString
+(SeqDescrPtr sdp,
+ ValNodePtr vnp,
+ FilterSetPtr fsp)
+{
+ if (sdp == NULL || sdp->choice != Seq_descr_source || vnp == NULL)
+ {
+ return NULL;
+ }
+ return GetDbxrefFromBioSource (sdp->data.ptrvalue, vnp);
+}
+
+
+static void ApplyBioSourceDbxrefBioSourceCallback (BioSourcePtr biop, Pointer userdata)
+{
+ ApplyValuePtr avp;
+ ValNodePtr dbx;
+ DbtagPtr dbtag;
+ Boolean found = FALSE;
+ Char buf[20];
+
+ if (biop == NULL || userdata == NULL)
+ {
+ return;
+ }
+
+ avp = (ApplyValuePtr) userdata;
+ if (avp->field_list != NULL && !StringHasNoText (avp->new_text))
+ {
+ if (biop->org == NULL)
+ {
+ biop->org = OrgRefNew();
+ }
+ dbx = biop->org->db;
+ while (dbx != NULL && !found)
+ {
+ dbtag = (DbtagPtr) dbx->data.ptrvalue;
+ if (dbtag != NULL && dbtag->tag != NULL
+ && StringCmp (dbtag->db, avp->field_list->data.ptrvalue) == 0)
+ {
+ found = TRUE;
+ }
+ if (!found)
+ {
+ dbx = dbx->next;
+ }
+ }
+ if (!found)
+ {
+ dbtag = DbtagNew();
+ dbtag->db = StringSave (avp->field_list->data.ptrvalue);
+ ValNodeAddPointer (&(biop->org->db), 0, dbtag);
+ }
+ if (dbtag->tag == NULL)
+ {
+ dbtag->tag = ObjectIdNew();
+ }
+ /* if it was a number before, make it a string now */
+ if (dbtag->tag->id > 0 && dbtag->tag->str == NULL)
+ {
+ sprintf (buf, "%s", dbtag->tag->id);
+ dbtag->tag->id = 0;
+ dbtag->tag->str = StringSave (buf);
+ }
+ dbtag->tag->str = HandleApplyValue (dbtag->tag->str, avp);
+ }
+
+}
+
+static void ApplyBioSourceDbxrefFeatureCallback (SeqFeatPtr sfp, Pointer userdata, FilterSetPtr fsp)
+{
+ if (sfp == NULL || sfp->data.choice != SEQFEAT_BIOSRC || userdata == NULL)
+ {
+ return;
+ }
+ ApplyBioSourceDbxrefBioSourceCallback (sfp->data.value.ptrvalue, userdata);
+}
+
+static void ApplyBioSourceDbxrefDescriptorCallback (SeqDescrPtr sdp, Pointer userdata, FilterSetPtr fsp)
+{
+ if (sdp == NULL || sdp->choice != Seq_descr_source || userdata == NULL)
+ {
+ return;
+ }
+ ApplyBioSourceDbxrefBioSourceCallback (sdp->data.ptrvalue, userdata);
+}
+
+
+
#define TEXT_PORTION_START_AFTER 1
#define TEXT_PORTION_START_WITH 2
#define TEXT_PORTION_END_AFTER 1
@@ -9500,40 +10191,86 @@ typedef struct textportiondialog
TexT start_text;
GrouP end_choice;
TexT end_text;
+ ButtoN rem_before;
+ ButtoN also_rem_before;
+ ButtoN rem_after;
+ ButtoN also_rem_after;
ButtoN insensitive;
ButtoN whole_word;
+ Boolean inside;
+
Nlm_ChangeNotifyProc change_notify;
Pointer change_userdata;
-} TextPortionDialogData, PNTR TextPortionDialogPtr;
+} TextPortionXDialogData, PNTR TextPortionXDialogPtr;
-static void ResetTextPortionDialog (TextPortionDialogPtr tp)
+
+static void OutsideEnableDisable (TextPortionXDialogPtr tp)
+{
+ if (tp == NULL || tp->inside)
+ {
+ return;
+ }
+ if (GetStatus (tp->rem_before))
+ {
+ Enable (tp->start_text);
+ Enable (tp->also_rem_before);
+ }
+ else
+ {
+ Disable (tp->start_text);
+ Disable (tp->also_rem_before);
+ }
+ if (GetStatus (tp->rem_after))
+ {
+ Enable (tp->end_text);
+ Enable (tp->also_rem_after);
+ }
+ else
+ {
+ Disable (tp->end_text);
+ Disable (tp->also_rem_after);
+ }
+}
+
+static void ResetTextPortionXDialog (TextPortionXDialogPtr tp)
{
if (tp == NULL)
{
return;
}
- SetValue (tp->start_choice, TEXT_PORTION_START_AFTER);
+ if (tp->inside)
+ {
+ SetValue (tp->start_choice, TEXT_PORTION_START_AFTER);
+ SetValue (tp->end_choice, TEXT_PORTION_END_AFTER);
+ }
+ else
+ {
+ SetStatus (tp->rem_before, FALSE);
+ SetStatus (tp->also_rem_before, FALSE);
+ SetStatus (tp->rem_after, FALSE);
+ SetStatus (tp->also_rem_after, FALSE);
+ }
SetTitle (tp->start_text, "");
- SetValue (tp->end_choice, TEXT_PORTION_END_AFTER);
SetTitle (tp->end_text, "");
SetStatus (tp->insensitive, FALSE);
SetStatus (tp->whole_word, FALSE);
+ OutsideEnableDisable (tp);
}
-static void TextPortionToDialog (DialoG d, Pointer data)
+static void TextPortionXToDialog (DialoG d, Pointer data)
{
- TextPortionDialogPtr tdlg;
- TextPortionPtr tdata;
+ TextPortionXDialogPtr tdlg;
+ TextPortionXPtr tdata;
Int4 start_choice, end_choice;
- tdlg = (TextPortionDialogPtr) GetObjectExtra (d);
+ tdlg = (TextPortionXDialogPtr) GetObjectExtra (d);
if (tdlg == NULL)
{
return;
}
- tdata = (TextPortionPtr) data;
- ResetTextPortionDialog (tdlg);
+ tdata = (TextPortionXPtr) data;
+ ResetTextPortionXDialog (tdlg);
if (tdata != NULL)
{
start_choice = tdata->end_choice;
@@ -9546,8 +10283,32 @@ static void TextPortionToDialog (DialoG d, Pointer data)
{
end_choice = TEXT_PORTION_END_AFTER;
}
- SetValue (tdlg->start_choice, start_choice);
- SetValue (tdlg->end_choice, end_choice);
+ if (tdlg->inside)
+ {
+ SetValue (tdlg->start_choice, start_choice);
+ SetValue (tdlg->end_choice, end_choice);
+ }
+ else
+ {
+ SetStatus (tdlg->rem_before, StringHasNoText (tdata->start_text));
+ SetStatus (tdlg->rem_after, StringHasNoText (tdata->end_text));
+ if (start_choice == TEXT_PORTION_START_AFTER)
+ {
+ SetStatus (tdlg->also_rem_before, TRUE);
+ }
+ else
+ {
+ SetStatus (tdlg->also_rem_before, FALSE);
+ }
+ if (end_choice == TEXT_PORTION_END_AFTER)
+ {
+ SetStatus (tdlg->also_rem_after, TRUE);
+ }
+ else
+ {
+ SetStatus (tdlg->also_rem_after, FALSE);
+ }
+ }
if (tdata->start_text != NULL)
{
SetTitle (tdlg->start_text, tdata->start_text);
@@ -9559,42 +10320,84 @@ static void TextPortionToDialog (DialoG d, Pointer data)
SetStatus (tdlg->insensitive, tdata->insensitive);
SetStatus (tdlg->whole_word, tdata->whole_word);
}
+ OutsideEnableDisable (tdlg);
}
-static Pointer DialogToTextPortion (DialoG d)
+static Pointer DialogToTextPortionX (DialoG d)
{
- TextPortionDialogPtr tdlg;
- TextPortionPtr tdata;
+ TextPortionXDialogPtr tdlg;
+ TextPortionXPtr tdata;
- tdlg = (TextPortionDialogPtr) GetObjectExtra (d);
+ tdlg = (TextPortionXDialogPtr) GetObjectExtra (d);
if (tdlg == NULL)
{
return NULL;
}
- tdata = (TextPortionPtr) MemNew (sizeof (TextPortionData));
+ tdata = (TextPortionXPtr) MemNew (sizeof (TextPortionXData));
if (tdata != NULL)
{
- tdata->start_choice = GetValue (tdlg->start_choice);
- tdata->end_choice = GetValue (tdlg->end_choice);
- tdata->start_text = JustSaveStringFromText (tdlg->start_text);
- tdata->end_text = JustSaveStringFromText (tdlg->end_text);
+ if (tdlg->inside)
+ {
+ tdata->start_choice = GetValue (tdlg->start_choice);
+ tdata->end_choice = GetValue (tdlg->end_choice);
+ tdata->start_text = JustSaveStringFromText (tdlg->start_text);
+ tdata->end_text = JustSaveStringFromText (tdlg->end_text);
+ }
+ else
+ {
+ if (GetStatus (tdlg->rem_before))
+ {
+ tdata->start_text = JustSaveStringFromText (tdlg->start_text);
+ }
+ else
+ {
+ tdata->start_text = NULL;
+ }
+ if (GetStatus (tdlg->rem_after))
+ {
+ tdata->end_text = JustSaveStringFromText (tdlg->end_text);
+ }
+ else
+ {
+ tdata->end_text = NULL;
+ }
+
+ if (GetStatus (tdlg->also_rem_before))
+ {
+ tdata->start_choice = TEXT_PORTION_START_AFTER;
+ }
+ else
+ {
+ tdata->start_choice = TEXT_PORTION_START_WITH;
+ }
+ if (GetStatus (tdlg->also_rem_after))
+ {
+ tdata->end_choice = TEXT_PORTION_END_AFTER;
+ }
+ else
+ {
+ tdata->end_choice = TEXT_PORTION_END_WITH;
+ }
+
+ }
+
tdata->insensitive = GetStatus (tdlg->insensitive);
tdata->whole_word = GetStatus (tdlg->whole_word);
}
return tdata;
}
-static void TextPortionMessage (DialoG d, Int2 mssg)
+static void TextPortionXMessage (DialoG d, Int2 mssg)
{
- TextPortionDialogPtr tp;
+ TextPortionXDialogPtr tp;
- tp = (TextPortionDialogPtr) GetObjectExtra (d);
+ tp = (TextPortionXDialogPtr) GetObjectExtra (d);
if (tp != NULL) {
switch (mssg) {
case VIB_MSG_INIT :
- ResetTextPortionDialog (tp);
+ ResetTextPortionXDialog (tp);
break;
case VIB_MSG_ENTER :
Select (tp->start_text);
@@ -9605,17 +10408,17 @@ static void TextPortionMessage (DialoG d, Int2 mssg)
}
}
-static ValNodePtr TestTextPortionDialog (DialoG d)
+static ValNodePtr TestTextPortionXDialog (DialoG d)
{
return NULL;
}
-static void ChangeTextPortionGroup (GrouP g)
+static void ChangeTextPortionXGroup (GrouP g)
{
- TextPortionDialogPtr tp;
+ TextPortionXDialogPtr tp;
- tp = (TextPortionDialogPtr) GetObjectExtra (g);
+ tp = (TextPortionXDialogPtr) GetObjectExtra (g);
if (tp == NULL) return;
if (tp->change_notify != NULL)
@@ -9624,11 +10427,11 @@ static void ChangeTextPortionGroup (GrouP g)
}
}
-static void ChangeTextPortionText (TexT t)
+static void ChangeTextPortionXText (TexT t)
{
- TextPortionDialogPtr tp;
+ TextPortionXDialogPtr tp;
- tp = (TextPortionDialogPtr) GetObjectExtra (t);
+ tp = (TextPortionXDialogPtr) GetObjectExtra (t);
if (tp == NULL) return;
if (tp->change_notify != NULL)
@@ -9638,12 +10441,13 @@ static void ChangeTextPortionText (TexT t)
}
-static void ChangeTextPortionBtn (ButtoN b)
+static void ChangeTextPortionXBtn (ButtoN b)
{
- TextPortionDialogPtr tp;
+ TextPortionXDialogPtr tp;
- tp = (TextPortionDialogPtr) GetObjectExtra (b);
+ tp = (TextPortionXDialogPtr) GetObjectExtra (b);
if (tp == NULL) return;
+ OutsideEnableDisable (tp);
if (tp->change_notify != NULL)
{
@@ -9653,12 +10457,12 @@ static void ChangeTextPortionBtn (ButtoN b)
-extern DialoG TextPortionDialogEx (GrouP h, Boolean inside, Nlm_ChangeNotifyProc change_notify, Pointer change_userdata)
+extern DialoG TextPortionXDialogEx (GrouP h, Boolean inside, Nlm_ChangeNotifyProc change_notify, Pointer change_userdata)
{
- TextPortionDialogPtr tp;
+ TextPortionXDialogPtr tp;
GrouP p, g1, g2;
- tp = (TextPortionDialogPtr) MemNew (sizeof (TextPortionDialogData));
+ tp = (TextPortionXDialogPtr) MemNew (sizeof (TextPortionXDialogData));
if (tp == NULL)
{
return NULL;
@@ -9668,13 +10472,14 @@ extern DialoG TextPortionDialogEx (GrouP h, Boolean inside, Nlm_ChangeNotifyProc
SetObjectExtra (p, tp, StdCleanupExtraProc);
tp->dialog = (DialoG) p;
- tp->todialog = TextPortionToDialog;
- tp->fromdialog = DialogToTextPortion;
- tp->dialogmessage = TextPortionMessage;
- tp->testdialog = TestTextPortionDialog;
+ tp->todialog = TextPortionXToDialog;
+ tp->fromdialog = DialogToTextPortionX;
+ tp->dialogmessage = TextPortionXMessage;
+ tp->testdialog = TestTextPortionXDialog;
tp->change_notify = change_notify;
tp->change_userdata = change_userdata;
+ tp->inside = inside;
g1 = HiddenGroup (p, 3, 0, NULL);
SetGroupSpacing (g1, 10, 10);
@@ -9682,67 +10487,58 @@ extern DialoG TextPortionDialogEx (GrouP h, Boolean inside, Nlm_ChangeNotifyProc
if (inside)
{
StaticPrompt (g1, "Between", 0, popupMenuHeight, programFont, 'r');
- tp->start_choice = HiddenGroup (g1, 2, 0, ChangeTextPortionGroup);
+ tp->start_choice = HiddenGroup (g1, 2, 0, ChangeTextPortionXGroup);
RadioButton (tp->start_choice, "just after");
RadioButton (tp->start_choice, "starting at");
SetValue (tp->start_choice, TEXT_PORTION_START_AFTER);
SetObjectExtra (tp->start_choice, tp, NULL);
- tp->start_text = DialogText (g1, "", 10, ChangeTextPortionText);
+ tp->start_text = DialogText (g1, "", 10, ChangeTextPortionXText);
SetObjectExtra (tp->start_text, tp, NULL);
StaticPrompt (g1, "And", 0, popupMenuHeight, programFont, 'r');
- tp->end_choice = HiddenGroup (g1, 2, 0, ChangeTextPortionGroup);
+ tp->end_choice = HiddenGroup (g1, 2, 0, ChangeTextPortionXGroup);
RadioButton (tp->end_choice, "up to");
RadioButton (tp->end_choice, "including");
SetValue (tp->end_choice, TEXT_PORTION_END_AFTER);
SetObjectExtra (tp->start_choice, tp, NULL);
- tp->end_text = DialogText (g1, "", 10, ChangeTextPortionText);
+ tp->end_text = DialogText (g1, "", 10, ChangeTextPortionXText);
SetObjectExtra (tp->start_text, tp, NULL);
}
else
{
-
- StaticPrompt (g1, "On left:", 0, popupMenuHeight, programFont, 'r');
- tp->start_choice = HiddenGroup (g1, 2, 0, ChangeTextPortionGroup);
- RadioButton (tp->start_choice, "including");
- RadioButton (tp->start_choice, "up to");
- SetValue (tp->start_choice, TEXT_PORTION_END_AFTER);
- SetObjectExtra (tp->start_choice, tp, NULL);
-
- tp->start_text = DialogText (g1, "", 10, ChangeTextPortionText);
+ tp->rem_before = CheckBox (g1, "Before", ChangeTextPortionXBtn);
+ SetObjectExtra (tp->rem_before, tp, NULL);
+ tp->start_text = DialogText (g1, "", 10, ChangeTextPortionXText);
SetObjectExtra (tp->start_text, tp, NULL);
+ tp->also_rem_before = CheckBox (g1, "Also Remove Entered Text", ChangeTextPortionXBtn);
- StaticPrompt (g1, "On right:", 0, popupMenuHeight, programFont, 'r');
- tp->end_choice = HiddenGroup (g1, 2, 0, ChangeTextPortionGroup);
- RadioButton (tp->end_choice, "starting at");
- RadioButton (tp->end_choice, "just after");
- SetValue (tp->end_choice, TEXT_PORTION_START_AFTER);
- SetObjectExtra (tp->end_choice, tp, NULL);
-
- tp->end_text = DialogText (g1, "", 10, ChangeTextPortionText);
+ tp->rem_after = CheckBox (g1, "After", ChangeTextPortionXBtn);
+ SetObjectExtra (tp->rem_after, tp, NULL);
+ tp->end_text = DialogText (g1, "", 10, ChangeTextPortionXText);
SetObjectExtra (tp->end_text, tp, NULL);
+ tp->also_rem_after = CheckBox (g1, "Also Remove Entered Text", ChangeTextPortionXBtn);
}
g2 = HiddenGroup (p, 2, 0, NULL);
- tp->insensitive = CheckBox (g2, "Case insensitive", ChangeTextPortionBtn);
+ tp->insensitive = CheckBox (g2, "Case insensitive", ChangeTextPortionXBtn);
SetObjectExtra (tp->insensitive, tp, NULL);
- tp->whole_word = CheckBox (g2, "Whole word", ChangeTextPortionBtn);
+ tp->whole_word = CheckBox (g2, "Whole word", ChangeTextPortionXBtn);
SetObjectExtra (tp->whole_word, tp, NULL);
AlignObjects (ALIGN_CENTER, (HANDLE) g1, (HANDLE) g2, NULL);
- ResetTextPortionDialog (tp);
+ ResetTextPortionXDialog (tp);
return (DialoG) p;
}
-extern DialoG TextPortionDialog (GrouP h)
+extern DialoG TextPortionXDialog (GrouP h)
{
- return TextPortionDialogEx (h, TRUE, NULL, NULL);
+ return TextPortionXDialogEx (h, TRUE, NULL, NULL);
}
-extern TextPortionPtr TextPortionFree (TextPortionPtr tp)
+extern TextPortionXPtr TextPortionXFree (TextPortionXPtr tp)
{
if (tp == NULL) return NULL;
tp->start_text = MemFree (tp->start_text);
@@ -9785,9 +10581,9 @@ static Boolean IsWholeWordMatch (CharPtr start, CharPtr found, Int4 match_len)
}
extern void
-FindTextPortionInString
+FindTextPortionXInString
(CharPtr str,
- TextPortionPtr tp,
+ TextPortionXPtr tp,
CharPtr PNTR ploc,
Int4Ptr plen)
{
@@ -9985,9 +10781,9 @@ typedef struct stringconstraintdialog
TexT match_text;
ButtoN insensitive;
ButtoN whole_word;
-} StringConstraintDialogData, PNTR StringConstraintDialogPtr;
+} StringConstraintDialogXData, PNTR StringConstraintDialogXPtr;
-static void ResetStringConstraintDialog (StringConstraintDialogPtr scdp)
+static void ResetStringConstraintDialogX (StringConstraintDialogXPtr scdp)
{
if (scdp == NULL) return;
@@ -9998,7 +10794,7 @@ static void ResetStringConstraintDialog (StringConstraintDialogPtr scdp)
}
-static Int4 GetPopupPosForStringConstraint (StringConstraintPtr scp)
+static Int4 GetPopupPosForStringConstraint (StringConstraintXPtr scp)
{
Int4 rval = 1;
@@ -10050,11 +10846,11 @@ static Int4 GetPopupPosForStringConstraint (StringConstraintPtr scp)
static void StringConstraintToDialog (DialoG d, Pointer data)
{
- StringConstraintDialogPtr scdp;
- StringConstraintPtr scp;
+ StringConstraintDialogXPtr scdp;
+ StringConstraintXPtr scp;
- scdp = (StringConstraintDialogPtr) GetObjectExtra (d);
- scp = (StringConstraintPtr) data;
+ scdp = (StringConstraintDialogXPtr) GetObjectExtra (d);
+ scp = (StringConstraintXPtr) data;
if (scdp == NULL)
{
return;
@@ -10062,7 +10858,7 @@ static void StringConstraintToDialog (DialoG d, Pointer data)
if (scp == NULL)
{
- ResetStringConstraintDialog (scdp);
+ ResetStringConstraintDialogX (scdp);
}
else
{
@@ -10085,16 +10881,16 @@ static void StringConstraintToDialog (DialoG d, Pointer data)
static Pointer DialogToStringConstraint (DialoG d)
{
- StringConstraintDialogPtr scdp;
- StringConstraintPtr scp;
+ StringConstraintDialogXPtr scdp;
+ StringConstraintXPtr scp;
Int4 match_choice;
- scdp = (StringConstraintDialogPtr) GetObjectExtra (d);
+ scdp = (StringConstraintDialogXPtr) GetObjectExtra (d);
if (scdp == NULL)
{
return NULL;
}
- scp = (StringConstraintPtr) MemNew (sizeof (StringConstraintData));
+ scp = (StringConstraintXPtr) MemNew (sizeof (StringConstraintData));
if (scp != NULL)
{
scp->match_text = SaveStringFromText (scdp->match_text);
@@ -10155,13 +10951,13 @@ static Pointer DialogToStringConstraint (DialoG d)
static void StringConstraintMessage (DialoG d, Int2 mssg)
{
- StringConstraintDialogPtr scdp;
+ StringConstraintDialogXPtr scdp;
- scdp = (StringConstraintDialogPtr) GetObjectExtra (d);
+ scdp = (StringConstraintDialogXPtr) GetObjectExtra (d);
if (scdp != NULL) {
switch (mssg) {
case VIB_MSG_INIT :
- ResetStringConstraintDialog (scdp);
+ ResetStringConstraintDialogX (scdp);
break;
case VIB_MSG_ENTER :
Select (scdp->match_text);
@@ -10172,20 +10968,20 @@ static void StringConstraintMessage (DialoG d, Int2 mssg)
}
}
-static ValNodePtr TestStringConstraintDialog (DialoG d)
+static ValNodePtr TestStringConstraintDialogX (DialoG d)
{
return NULL;
}
-extern DialoG StringConstraintDialog (GrouP h, CharPtr label, Boolean clear_btn)
+extern DialoG StringConstraintDialogX (GrouP h, CharPtr label, Boolean clear_btn)
{
- StringConstraintDialogPtr scdp;
+ StringConstraintDialogXPtr scdp;
GrouP p, g, k;
ButtoN b = NULL;
- scdp = (StringConstraintDialogPtr) MemNew (sizeof (StringConstraintDialogData));
+ scdp = (StringConstraintDialogXPtr) MemNew (sizeof (StringConstraintDialogXData));
if (scdp == NULL)
{
return NULL;
@@ -10198,7 +10994,7 @@ extern DialoG StringConstraintDialog (GrouP h, CharPtr label, Boolean clear_btn)
scdp->todialog = StringConstraintToDialog;
scdp->fromdialog = DialogToStringConstraint;
scdp->dialogmessage = StringConstraintMessage;
- scdp->testdialog = TestStringConstraintDialog;
+ scdp->testdialog = TestStringConstraintDialogX;
g = HiddenGroup (p, 3, 0, NULL);
SetGroupSpacing (g, 10, 10);
@@ -10622,7 +11418,7 @@ ConstraintChoiceDialog
RadioButton (scdp->constraint_type, "When");
q = HiddenGroup (scdp->constraint_type, 2, 0, NULL);
scdp->string_qual_choice = func_string (q, TRUE, NULL, NULL);
- scdp->string_constraint = StringConstraintDialog (q, NULL, FALSE);
+ scdp->string_constraint = StringConstraintDialogX (q, NULL, FALSE);
RadioButton (scdp->constraint_type, "When");
q = HiddenGroup (scdp->constraint_type, 3, 0, NULL);
@@ -10663,7 +11459,7 @@ ConstraintChoiceDialog
return (DialoG) p;
}
-extern DialoG SourceConstraintDialog (GrouP h, Boolean clear_btn)
+extern DialoG SourceConstraintDialogX (GrouP h, Boolean clear_btn)
{
return ConstraintChoiceDialog (h, SourceQualTypeConstraintSelectionDialog,
SourceStringConstraintSelectionDialog,
@@ -10695,7 +11491,7 @@ extern DialoG CDSGeneProtConstraintDialog (GrouP h, Boolean clear_btn)
clear_btn, TRUE);
}
-typedef struct locationconstraintdialog
+typedef struct LocationConstraintXdialog
{
DIALOG_MESSAGE_BLOCK
PopuP interval_end_choice;
@@ -10708,15 +11504,15 @@ typedef struct locationconstraintdialog
PopuP strand;
PopuP sequence_type;
Boolean show_interval_controls;
-} LocationConstraintDialogData, PNTR LocationConstraintDialogPtr;
+} LocationConstraintXDialogData, PNTR LocationConstraintXDialogPtr;
static void ShowLocationChoiceControls (PopuP p)
{
- LocationConstraintDialogPtr lcdp;
+ LocationConstraintXDialogPtr lcdp;
Int4 match_choice;
- lcdp = (LocationConstraintDialogPtr) GetObjectExtra (p);
+ lcdp = (LocationConstraintXDialogPtr) GetObjectExtra (p);
if (lcdp == NULL || lcdp->interval_end_choice == NULL) return;
if (GetValue (lcdp->interval_end_choice) == LOCATION_CONSTRAINT_WHOLE_INTERVAL)
@@ -10767,7 +11563,7 @@ static void ShowLocationChoiceControls (PopuP p)
}
}
-static void ResetLocationConstraintDialog (LocationConstraintDialogPtr lcdp)
+static void ResetLocationConstraintXDialog (LocationConstraintXDialogPtr lcdp)
{
if (lcdp == NULL) return;
@@ -10781,25 +11577,25 @@ static void ResetLocationConstraintDialog (LocationConstraintDialogPtr lcdp)
ShowLocationChoiceControls (lcdp->interval_end_choice);
}
-static void LocationConstraintToDialog (DialoG d, Pointer data)
+static void LocationConstraintXToDialog (DialoG d, Pointer data)
{
- LocationConstraintDialogPtr lcdp;
- LocationConstraintPtr lcp;
+ LocationConstraintXDialogPtr lcdp;
+ LocationConstraintXPtr lcp;
Int4 interval_end_choice;
Int4 match_choice;
Char tmp [15];
Int4 strand;
Int4 sequence_type;
- lcdp = (LocationConstraintDialogPtr) GetObjectExtra (d);
+ lcdp = (LocationConstraintXDialogPtr) GetObjectExtra (d);
if (lcdp == NULL)
{
return;
}
- lcp = (LocationConstraintPtr) data;
+ lcp = (LocationConstraintXPtr) data;
- ResetLocationConstraintDialog (lcdp);
+ ResetLocationConstraintXDialog (lcdp);
if (lcp != NULL)
{
interval_end_choice = lcp->interval_end_choice;
@@ -10875,19 +11671,19 @@ static void LocationConstraintToDialog (DialoG d, Pointer data)
ShowLocationChoiceControls (lcdp->interval_match_choice);
}
-static Pointer DialogToLocationConstraint (DialoG d)
+static Pointer DialogToLocationConstraintX (DialoG d)
{
- LocationConstraintDialogPtr lcdp;
- LocationConstraintPtr lcp;
+ LocationConstraintXDialogPtr lcdp;
+ LocationConstraintXPtr lcp;
CharPtr tmp;
- lcdp = (LocationConstraintDialogPtr) GetObjectExtra (d);
+ lcdp = (LocationConstraintXDialogPtr) GetObjectExtra (d);
if (lcdp == NULL)
{
return NULL;
}
- lcp = (LocationConstraintPtr) MemNew (sizeof (LocationConstraintData));
+ lcp = (LocationConstraintXPtr) MemNew (sizeof (LocationConstraintXData));
if (lcp != NULL)
{
if (lcdp->show_interval_controls)
@@ -10957,16 +11753,16 @@ static Pointer DialogToLocationConstraint (DialoG d)
return lcp;
}
-static void LocationConstraintMessage (DialoG d, Int2 mssg)
+static void LocationConstraintXMessage (DialoG d, Int2 mssg)
{
- LocationConstraintDialogPtr lcdp;
+ LocationConstraintXDialogPtr lcdp;
- lcdp = (LocationConstraintDialogPtr) GetObjectExtra (d);
+ lcdp = (LocationConstraintXDialogPtr) GetObjectExtra (d);
if (lcdp != NULL) {
switch (mssg) {
case VIB_MSG_INIT :
- ResetLocationConstraintDialog (lcdp);
+ ResetLocationConstraintXDialog (lcdp);
break;
case VIB_MSG_ENTER :
if (lcdp->show_interval_controls)
@@ -10984,7 +11780,7 @@ static void LocationConstraintMessage (DialoG d, Int2 mssg)
}
}
-static ValNodePtr TestLocationConstraintDialog (DialoG d)
+static ValNodePtr TestLocationConstraintXDialog (DialoG d)
{
return NULL;
@@ -10992,17 +11788,17 @@ static ValNodePtr TestLocationConstraintDialog (DialoG d)
extern DialoG
-LocationConstraintDialog
+LocationConstraintXDialog
(GrouP h,
Boolean show_interval_controls,
Boolean clear_btn)
{
- LocationConstraintDialogPtr lcdp;
+ LocationConstraintXDialogPtr lcdp;
GrouP p, g, k, val_grp, strand_grp, g2, g3, g4;
ButtoN b = NULL;
- lcdp = (LocationConstraintDialogPtr) MemNew (sizeof (LocationConstraintDialogData));
+ lcdp = (LocationConstraintXDialogPtr) MemNew (sizeof (LocationConstraintXDialogData));
if (lcdp == NULL)
{
return NULL;
@@ -11012,10 +11808,10 @@ LocationConstraintDialog
SetObjectExtra (p, lcdp, StdCleanupExtraProc);
lcdp->dialog = (DialoG) p;
- lcdp->todialog = LocationConstraintToDialog;
- lcdp->fromdialog = DialogToLocationConstraint;
- lcdp->dialogmessage = LocationConstraintMessage;
- lcdp->testdialog = TestLocationConstraintDialog;
+ lcdp->todialog = LocationConstraintXToDialog;
+ lcdp->fromdialog = DialogToLocationConstraintX;
+ lcdp->dialogmessage = LocationConstraintXMessage;
+ lcdp->testdialog = TestLocationConstraintXDialog;
lcdp->show_interval_controls = show_interval_controls;
@@ -11097,7 +11893,7 @@ LocationConstraintDialog
return (DialoG) p;
}
-static Boolean DoesStrandMatchConstraint (SeqLocPtr slp, LocationConstraintPtr lcp)
+static Boolean DoesStrandMatchConstraint (SeqLocPtr slp, LocationConstraintXPtr lcp)
{
Uint2 strand;
Boolean rval = FALSE;
@@ -11139,7 +11935,7 @@ static Boolean DoesStrandMatchConstraint (SeqLocPtr slp, LocationConstraintPtr l
return rval;
}
-static Boolean DoesSequenceTypeMatchContraint (SeqLocPtr slp, LocationConstraintPtr lcp)
+static Boolean DoesSequenceTypeMatchContraint (SeqLocPtr slp, LocationConstraintXPtr lcp)
{
Boolean rval = FALSE;
BioseqPtr bsp;
@@ -11170,7 +11966,7 @@ static Boolean DoesSequenceTypeMatchContraint (SeqLocPtr slp, LocationConstraint
return rval;
}
-extern Boolean DoesLocationMatchConstraint (SeqLocPtr slp, LocationConstraintPtr lcp)
+extern Boolean DoesLocationMatchConstraint (SeqLocPtr slp, LocationConstraintXPtr lcp)
{
Boolean rval = FALSE;
@@ -11543,17 +12339,17 @@ FilterGroup
num_pages = 0;
if (has_source_constraint)
{
- ffp->source_constraint = SourceConstraintDialog (k, FALSE);
+ ffp->source_constraint = SourceConstraintDialogX (k, FALSE);
ffp->pages [num_pages++] = ffp->source_constraint;
}
if (has_string_constraint)
{
- ffp->string_constraint = StringConstraintDialog (k, string_constraint_label, FALSE);
+ ffp->string_constraint = StringConstraintDialogX (k, string_constraint_label, FALSE);
ffp->pages [num_pages++] = ffp->string_constraint;
}
if (has_location_constraint)
{
- ffp->location_constraint = LocationConstraintDialog (k, FALSE, FALSE);
+ ffp->location_constraint = LocationConstraintXDialog (k, FALSE, FALSE);
ffp->pages [num_pages++] = ffp->location_constraint;
}
if (has_cds_gene_prot_constraint)
@@ -11563,7 +12359,7 @@ FilterGroup
}
if (has_id_list_constraint)
{
- ffp->id_list_constraint = StringConstraintDialog (k, "Where sequence ID", FALSE);
+ ffp->id_list_constraint = StringConstraintDialogX (k, "Where sequence ID", FALSE);
ffp->pages[num_pages++] = ffp->id_list_constraint;
}
for (i = 1; i < num_pages; i++)
@@ -11583,15 +12379,15 @@ FilterGroup
{
if (has_source_constraint)
{
- ffp->source_constraint = SourceConstraintDialog (g, TRUE);
+ ffp->source_constraint = SourceConstraintDialogX (g, TRUE);
}
else if (has_string_constraint)
{
- ffp->string_constraint = StringConstraintDialog (g, string_constraint_label, TRUE);
+ ffp->string_constraint = StringConstraintDialogX (g, string_constraint_label, TRUE);
}
else if (has_location_constraint)
{
- ffp->location_constraint = LocationConstraintDialog (g, FALSE, TRUE);
+ ffp->location_constraint = LocationConstraintXDialog (g, FALSE, TRUE);
}
else if (has_cds_gene_prot_constraint)
{
@@ -11599,7 +12395,7 @@ FilterGroup
}
else if (has_id_list_constraint)
{
- ffp->id_list_constraint = StringConstraintDialog (g, "Where sequence ID", TRUE);
+ ffp->id_list_constraint = StringConstraintDialogX (g, "Where sequence ID", TRUE);
}
}
return (DialoG) g;
@@ -11608,7 +12404,7 @@ FilterGroup
/* Operations on constrained features and descriptors */
typedef struct objecthasstring
{
- StringConstraintPtr scp;
+ StringConstraintXPtr scp;
Boolean found;
} ObjectHasStringData, PNTR ObjectHasStringPtr;
@@ -11628,7 +12424,7 @@ typedef struct constraintop
Uint1 descriptorChoice;
} ConstraintOpData, PNTR ConstraintOpPtr;
-extern Boolean DoesStringMatchConstraint (CharPtr pchSource, StringConstraintPtr scp)
+extern Boolean DoesStringMatchConstraintX (CharPtr pchSource, StringConstraintXPtr scp)
{
CharPtr pFound;
Boolean rval = FALSE;
@@ -11783,6 +12579,10 @@ extern Boolean DoesStringMatchConstraint (CharPtr pchSource, StringConstraintPtr
}
}
}
+ if (!rval) {
+ /* look for spans */
+ rval = IsStringInSpanInList (pchSource, scp->match_text);
+ }
break;
}
return rval;
@@ -11798,7 +12598,7 @@ static void LIBCALLBACK AsnWriteConstraintCallBack (AsnExpOptStructPtr pAEOS)
if (ISA_STRINGTYPE (AsnFindBaseIsa (pAEOS->atp)))
{
pchSource = (CharPtr) pAEOS->dvp->ptrvalue;
- ohsp->found |= DoesStringMatchConstraint (pchSource, ohsp->scp);
+ ohsp->found |= DoesStringMatchConstraintX (pchSource, ohsp->scp);
}
}
@@ -11829,14 +12629,14 @@ DoesObjectMatchStringConstraint
}
sfp = SeqMgrGetDesiredFeature (sfp->idx.entityID, NULL, sfp->idx.itemID, 0, sfp, &fcontext);
- ohsp->found = DoesStringMatchConstraint (fcontext.label, ohsp->scp);
+ ohsp->found = DoesStringMatchConstraintX (fcontext.label, ohsp->scp);
if (!ohsp->found && sfp != NULL && sfp->idx.subtype == FEATDEF_tRNA)
{
search_txt = (CharPtr) MemNew ((StringLen (fcontext.label) + 6) * sizeof (Char));
if (search_txt != NULL)
{
sprintf (search_txt, "tRNA-%s", fcontext.label);
- ohsp->found = DoesStringMatchConstraint (search_txt, ohsp->scp);
+ ohsp->found = DoesStringMatchConstraintX (search_txt, ohsp->scp);
search_txt = MemFree (search_txt);
}
}
@@ -11844,7 +12644,7 @@ DoesObjectMatchStringConstraint
return ohsp->found;
}
-static Boolean DoesDbtagMatchStringConstraint (DbtagPtr db_tag, StringConstraintPtr scp)
+static Boolean DoesDbtagMatchStringConstraint (DbtagPtr db_tag, StringConstraintXPtr scp)
{
Boolean rval = FALSE;
Char tmp_str [15];
@@ -11857,20 +12657,20 @@ static Boolean DoesDbtagMatchStringConstraint (DbtagPtr db_tag, StringConstraint
{
rval = TRUE;
}
- else if (DoesStringMatchConstraint (db_tag->db, scp))
+ else if (DoesStringMatchConstraintX (db_tag->db, scp))
{
rval = TRUE;
}
else if (db_tag->tag != NULL)
{
- if (DoesStringMatchConstraint (db_tag->tag->str, scp))
+ if (DoesStringMatchConstraintX (db_tag->tag->str, scp))
{
rval = TRUE;
}
else if (db_tag->tag->str == NULL)
{
sprintf (tmp_str, "%d", db_tag->tag->id);
- if (DoesStringMatchConstraint (tmp_str, scp))
+ if (DoesStringMatchConstraintX (tmp_str, scp))
{
rval = TRUE;
}
@@ -12118,21 +12918,21 @@ DoesOneSourceMatchConstraint
{
if (biop->org != NULL)
{
- does_match = DoesStringMatchConstraint (biop->org->taxname, scp->string_constraint);
+ does_match = DoesStringMatchConstraintX (biop->org->taxname, scp->string_constraint);
if (biop->org->orgname != NULL)
{
mod = biop->org->orgname->mod;
}
while (! does_match && mod != NULL)
{
- does_match = DoesStringMatchConstraint (mod->subname, scp->string_constraint);
+ does_match = DoesStringMatchConstraintX (mod->subname, scp->string_constraint);
mod = mod->next;
}
}
ssp = biop->subtype;
while (!does_match && ssp != NULL)
{
- does_match = DoesStringMatchConstraint (ssp->name, scp->string_constraint);
+ does_match = DoesStringMatchConstraintX (ssp->name, scp->string_constraint);
ssp = ssp->next;
}
}
@@ -12140,21 +12940,21 @@ DoesOneSourceMatchConstraint
{
if (biop->org != NULL)
{
- does_match = DoesStringMatchConstraint (biop->org->taxname, scp->string_constraint);
+ does_match = DoesStringMatchConstraintX (biop->org->taxname, scp->string_constraint);
}
}
else if (scp->qual_choice->choice > 0 && StringICmp (scp->qual_choice->data.ptrvalue, "Lineage") == 0)
{
if (biop->org != NULL && biop->org->orgname != NULL)
{
- does_match = DoesStringMatchConstraint (biop->org->orgname->lineage,
+ does_match = DoesStringMatchConstraintX (biop->org->orgname->lineage,
scp->string_constraint);
}
}
else if (scp->qual_choice->choice > 0 && StringICmp (scp->qual_choice->data.ptrvalue, "Location") == 0)
{
location = GetLocationFromSource (biop, NULL);
- does_match = DoesStringMatchConstraint (location, scp->string_constraint);
+ does_match = DoesStringMatchConstraintX (location, scp->string_constraint);
location = MemFree (location);
}
else
@@ -12170,7 +12970,7 @@ DoesOneSourceMatchConstraint
{
if (mod->subtype == sqdp->subtype)
{
- does_match = DoesStringMatchConstraint (mod->subname, scp->string_constraint);
+ does_match = DoesStringMatchConstraintX (mod->subname, scp->string_constraint);
}
mod = mod->next;
}
@@ -12182,7 +12982,7 @@ DoesOneSourceMatchConstraint
{
if (ssp->subtype == sqdp->subtype)
{
- does_match = DoesStringMatchConstraint (ssp->name, scp->string_constraint);
+ does_match = DoesStringMatchConstraintX (ssp->name, scp->string_constraint);
}
ssp = ssp->next;
}
@@ -12223,7 +13023,7 @@ static void SeqEntryConstrainedFeaturesCallback (SeqFeatPtr sfp, Pointer userdat
if (cop->fsp->scp->not_present)
{
if (DoesObjectMatchStringConstraint (cop->omtp, cop->aip, (Pointer) sfp, &(cop->ohsd))
- || DoesStringMatchConstraint (fcontext.label, cop->fsp->scp))
+ || DoesStringMatchConstraintX (fcontext.label, cop->fsp->scp))
{
feature_matches = FALSE;
}
@@ -12231,7 +13031,7 @@ static void SeqEntryConstrainedFeaturesCallback (SeqFeatPtr sfp, Pointer userdat
else
{
if (! DoesObjectMatchStringConstraint (cop->omtp, cop->aip, (Pointer) sfp, &(cop->ohsd))
- && ! DoesStringMatchConstraint (fcontext.label, cop->fsp->scp))
+ && ! DoesStringMatchConstraintX (fcontext.label, cop->fsp->scp))
{
feature_matches = FALSE;
}
@@ -12267,6 +13067,13 @@ static void BioseqConstrainedFeaturesCallback (BioseqPtr bsp, Pointer userdata)
if (omdp == NULL || omdp->datatype != OBJ_BIOSEQ) return;
bspextra = (BioseqExtraPtr) omdp->extradata;
+ if (bspextra == NULL) {
+ SeqMgrIndexFeatures (bsp->idx.entityID, NULL);
+ omdp = SeqMgrGetOmdpForBioseq (bsp);
+ if (omdp == NULL || omdp->datatype != OBJ_BIOSEQ) return;
+
+ bspextra = (BioseqExtraPtr) omdp->extradata;
+ }
if (bspextra == NULL) return;
for (index = 0; index < bspextra->numfeats; index++)
@@ -12997,70 +13804,186 @@ extern ValNodePtr ApplyValueToValNodeStringList (ValNodePtr list, Int2 choice, A
return list;
}
+
+
+static void MakeSemicolonStringsIntoSeparateItems (ValNodePtr PNTR list)
+{
+ ValNodePtr prev = NULL, vnp_next, vnp, vnp_new;
+ CharPtr cp;
+
+ if (list == NULL || *list == NULL) return;
+
+ vnp = *list;
+ while (vnp != NULL)
+ {
+ vnp_next = vnp->next;
+ if (StringHasNoText (vnp->data.ptrvalue))
+ {
+ if (prev == NULL)
+ {
+ *list = vnp_next;
+ }
+ else
+ {
+ prev->next = vnp_next;
+ }
+ vnp->next = NULL;
+ vnp = ValNodeFreeData (vnp);
+ }
+ else if ((cp = StringChr (vnp->data.ptrvalue, ';')) != NULL)
+ {
+ vnp_new = ValNodeNew (NULL);
+ vnp_new->choice = vnp->choice;
+ vnp_new->data.ptrvalue = StringSave (cp + 1);
+ vnp_new->next = vnp_next;
+ *cp = 0;
+ vnp->next = vnp_new;
+ vnp_next = vnp_new;
+ prev = vnp;
+ }
+ else
+ {
+ prev = vnp;
+ }
+ vnp = vnp_next;
+ }
+}
+
+
+extern ValNodePtr ApplyValueToValNodeStringListAsText (ValNodePtr list, Int2 choice, ApplyValuePtr avp)
+{
+ ValNodePtr vnp;
+
+ if (avp == NULL)
+ {
+ return NULL;
+ }
+
+ if (!StringHasNoText (avp->text_to_replace))
+ {
+ for (vnp = list; vnp != NULL; vnp = vnp->next)
+ {
+ vnp->data.ptrvalue = HandleApplyValue (vnp->data.ptrvalue, avp);
+ }
+ }
+ else
+ {
+ if (avp->etp == NULL
+ || avp->etp->existing_text_choice == eExistingTextChoiceReplaceOld)
+ {
+ list = ValNodeFree (list);
+ ValNodeAddPointer (&list, choice, StringSave (avp->new_text));
+ }
+ else if (avp->etp->existing_text_choice == eExistingTextChoiceAppendSemi)
+ {
+ ValNodeAddPointer (&list, choice, StringSave (avp->new_text));
+ }
+ else if (avp->etp->existing_text_choice == eExistingTextChoicePrefixSemi)
+ {
+ vnp = ValNodeNew(NULL);
+ vnp->choice = (Uint1) choice;
+ vnp->data.ptrvalue = StringSave (avp->new_text);
+ vnp->next = list;
+ list = vnp;
+ }
+ else if (avp->etp->existing_text_choice == eExistingTextChoiceLeaveOld)
+ {
+ if (list == NULL)
+ {
+ ValNodeAddPointer (&list, choice, StringSave (avp->new_text));
+ }
+ } else {
+ for (vnp = list; vnp != NULL; vnp = vnp->next)
+ {
+ vnp->data.ptrvalue = HandleApplyValue (vnp->data.ptrvalue, avp);
+ }
+ }
+ }
+
+ if (avp->etp == NULL || avp->etp->existing_text_choice != eExistingTextChoiceLeaveOld)
+ {
+ MakeSemicolonStringsIntoSeparateItems (&list);
+ }
+ return list;
+}
+
+
typedef struct parsefielddialog
{
DIALOG_MESSAGE_BLOCK
- PopuP parse_field_type;
+ DialoG parse_field_type;
DialoG biosrc_string_choice;
DialoG source_qual_choice;
DialoG gene_field;
- DialoG mrna_field;
+ DialoG rna_subtype;
+ DialoG rna_field;
DialoG protein_field;
DialoG import_feature;
DialoG import_qual;
DialoG feature;
+ GrouP dbxref_grp;
+ TexT dbxref_db;
GrouP feat_or_desc;
Nlm_ChangeNotifyProc change_notify;
Pointer change_userdata;
Boolean is_search_field;
} ParseFieldDialogData, PNTR ParseFieldDialogPtr;
-static void ChangeParseFieldType (PopuP p)
+static void ChangeParseFieldType (Pointer data)
{
ParseFieldDialogPtr dlg;
- Int4 parse_field_type;
+ ValNodePtr vnp;
- dlg = (ParseFieldDialogPtr) GetObjectExtra (p);
+ dlg = (ParseFieldDialogPtr) data;
if (dlg == NULL)
{
return;
}
- parse_field_type = GetValue (dlg->parse_field_type);
+ vnp = DialogToPointer (dlg->parse_field_type);
Hide (dlg->biosrc_string_choice);
Hide (dlg->feat_or_desc);
Hide (dlg->source_qual_choice);
Hide (dlg->gene_field);
- Hide (dlg->mrna_field);
+ Hide (dlg->rna_subtype);
+ Hide (dlg->rna_field);
Hide (dlg->protein_field);
Hide (dlg->import_feature);
Hide (dlg->import_qual);
Hide (dlg->feature);
- switch (parse_field_type)
+ Hide (dlg->dbxref_grp);
+ if (vnp != NULL)
{
- case PARSE_FIELD_BIOSRC_STRING:
- Show (dlg->biosrc_string_choice);
- Show (dlg->feat_or_desc);
- break;
- case PARSE_FIELD_SOURCE_QUAL:
- Show (dlg->source_qual_choice);
- Show (dlg->feat_or_desc);
- break;
- case PARSE_FIELD_GENE_FIELD:
- Show (dlg->gene_field);
- break;
- case PARSE_FIELD_MRNA_FIELD:
- Show (dlg->mrna_field);
- break;
- case PARSE_FIELD_PROTEIN_FIELD:
- Show (dlg->protein_field);
- break;
- case PARSE_FIELD_IMPORT_QUAL:
- Show (dlg->import_feature);
- Show (dlg->import_qual);
- break;
- case PARSE_FIELD_FEATURE_NOTE:
- Show (dlg->feature);
- break;
+ switch (vnp->choice)
+ {
+ case PARSE_FIELD_BIOSRC_STRING:
+ Show (dlg->biosrc_string_choice);
+ Show (dlg->feat_or_desc);
+ break;
+ case PARSE_FIELD_SOURCE_QUAL:
+ Show (dlg->source_qual_choice);
+ Show (dlg->feat_or_desc);
+ break;
+ case PARSE_FIELD_GENE_FIELD:
+ Show (dlg->gene_field);
+ break;
+ case PARSE_FIELD_RNA_FIELD:
+ Show (dlg->rna_subtype);
+ Show (dlg->rna_field);
+ break;
+ case PARSE_FIELD_PROTEIN_FIELD:
+ Show (dlg->protein_field);
+ break;
+ case PARSE_FIELD_IMPORT_QUAL:
+ Show (dlg->import_feature);
+ Show (dlg->import_qual);
+ break;
+ case PARSE_FIELD_FEATURE_NOTE:
+ Show (dlg->feature);
+ break;
+ case PARSE_FIELD_DBXREF:
+ Show (dlg->dbxref_grp);
+ break;
+ }
}
if (dlg->change_notify != NULL)
{
@@ -13070,12 +13993,17 @@ static void ChangeParseFieldType (PopuP p)
static void ResetParseFieldDialog (ParseFieldDialogPtr dlg)
{
+ ValNode vn;
+
if (dlg == NULL)
{
return;
}
- SetValue (dlg->parse_field_type, PARSE_FIELD_DEFLINE);
- ChangeParseFieldType (dlg->parse_field_type);
+ vn.choice = PARSE_FIELD_DEFLINE;
+ vn.data.ptrvalue = NULL;
+ vn.next = NULL;
+ PointerToDialog (dlg->parse_field_type, &vn);
+ ChangeParseFieldType (dlg);
}
static void ParseFieldToDialog (DialoG d, Pointer data)
@@ -13083,6 +14011,7 @@ static void ParseFieldToDialog (DialoG d, Pointer data)
ParseFieldDialogPtr dlg;
ParseFieldPtr parse_field;
Int4 parse_field_type;
+ ValNode vn;
dlg = (ParseFieldDialogPtr) GetObjectExtra (d);
if (dlg == NULL)
@@ -13100,7 +14029,10 @@ static void ParseFieldToDialog (DialoG d, Pointer data)
{
parse_field_type = PARSE_FIELD_DEFLINE;
}
- SetValue (dlg->parse_field_type, parse_field_type);
+ vn.choice = parse_field_type;
+ vn.data.ptrvalue = NULL;
+ vn.next = NULL;
+ PointerToDialog (dlg->parse_field_type, &vn);
switch (parse_field_type)
{
case PARSE_FIELD_BIOSRC_STRING:
@@ -13124,12 +14056,55 @@ static void ParseFieldToDialog (DialoG d, Pointer data)
break;
case PARSE_FIELD_SOURCE_QUAL:
PointerToDialog (dlg->source_qual_choice, parse_field->feature_field);
+ if (parse_field->do_desc && parse_field->do_feat)
+ {
+ SetValue (dlg->feat_or_desc, 1);
+ }
+ else if (parse_field->do_desc)
+ {
+ SetValue (dlg->feat_or_desc, 2);
+ }
+ else if (parse_field->do_feat)
+ {
+ SetValue (dlg->feat_or_desc, 3);
+ }
+ else
+ {
+ SetValue (dlg->feat_or_desc, 1);
+ }
+ break;
+ case PARSE_FIELD_DBXREF:
+ if (parse_field->feature_field == NULL || parse_field->feature_field->data.ptrvalue == NULL)
+ {
+ SetTitle (dlg->dbxref_db, "");
+ }
+ else
+ {
+ SetTitle (dlg->dbxref_db, parse_field->feature_field->data.ptrvalue);
+ }
+ if (parse_field->do_desc && parse_field->do_feat)
+ {
+ SetValue (dlg->feat_or_desc, 1);
+ }
+ else if (parse_field->do_desc)
+ {
+ SetValue (dlg->feat_or_desc, 2);
+ }
+ else if (parse_field->do_feat)
+ {
+ SetValue (dlg->feat_or_desc, 3);
+ }
+ else
+ {
+ SetValue (dlg->feat_or_desc, 1);
+ }
break;
case PARSE_FIELD_GENE_FIELD:
PointerToDialog (dlg->gene_field, parse_field->feature_field);
break;
- case PARSE_FIELD_MRNA_FIELD:
- PointerToDialog (dlg->mrna_field, parse_field->feature_field);
+ case PARSE_FIELD_RNA_FIELD:
+ PointerToDialog (dlg->rna_subtype, parse_field->feature_subtype);
+ PointerToDialog (dlg->rna_field, parse_field->feature_field);
break;
case PARSE_FIELD_PROTEIN_FIELD:
PointerToDialog (dlg->protein_field, parse_field->feature_field);
@@ -13146,7 +14121,7 @@ static void ParseFieldToDialog (DialoG d, Pointer data)
break;
}
}
- ChangeParseFieldType (dlg->parse_field_type);
+ ChangeParseFieldType (dlg);
}
static Pointer DialogToParseField (DialoG d)
@@ -13154,16 +14129,23 @@ static Pointer DialogToParseField (DialoG d)
ParseFieldDialogPtr dlg;
ParseFieldPtr parse_field;
Int4 val;
+ ValNodePtr vnp;
dlg = (ParseFieldDialogPtr) GetObjectExtra (d);
if (dlg == NULL)
{
return NULL;
}
+ vnp = DialogToPointer (dlg->parse_field_type);
+ if (vnp == NULL)
+ {
+ return NULL;
+ }
+
parse_field = (ParseFieldPtr) MemNew (sizeof (ParseFieldData));
if (parse_field != NULL)
{
- parse_field->parse_field_type = GetValue (dlg->parse_field_type);
+ parse_field->parse_field_type = vnp->choice;
parse_field->feature_field = NULL;
switch (parse_field->parse_field_type)
{
@@ -13207,11 +14189,35 @@ static Pointer DialogToParseField (DialoG d)
break;
}
break;
+ case PARSE_FIELD_DBXREF:
+ if (!TextHasNoText (dlg->dbxref_db))
+ {
+ ValNodeAddPointer (&(parse_field->feature_field), 0, SaveStringFromText (dlg->dbxref_db));
+ }
+ val = GetValue (dlg->feat_or_desc);
+ switch (val)
+ {
+ case 2:
+ parse_field->do_desc = TRUE;
+ parse_field->do_feat = FALSE;
+ break;
+ case 3:
+ parse_field->do_desc = FALSE;
+ parse_field->do_feat = TRUE;
+ break;
+ case 1:
+ default:
+ parse_field->do_desc = TRUE;
+ parse_field->do_feat = TRUE;
+ break;
+ }
+ break;
case PARSE_FIELD_GENE_FIELD:
parse_field->feature_field = DialogToPointer (dlg->gene_field);
break;
- case PARSE_FIELD_MRNA_FIELD:
- parse_field->feature_field = DialogToPointer (dlg->mrna_field);
+ case PARSE_FIELD_RNA_FIELD:
+ parse_field->feature_subtype = DialogToPointer (dlg->rna_subtype);
+ parse_field->feature_field = DialogToPointer (dlg->rna_field);
break;
case PARSE_FIELD_PROTEIN_FIELD:
parse_field->feature_field = DialogToPointer (dlg->protein_field);
@@ -13228,6 +14234,7 @@ static Pointer DialogToParseField (DialoG d)
break;
}
}
+ vnp = ValNodeFreeData (vnp);
return parse_field;
}
@@ -13263,100 +14270,163 @@ static ValNodePtr TestParseFieldDialog (DialoG d)
if (dlg != NULL)
{
- parse_field_type = GetValue (dlg->parse_field_type);
- switch (parse_field_type)
+ vnp = DialogToPointer (dlg->parse_field_type);
+ if (vnp == NULL)
{
- case PARSE_FIELD_DEFLINE:
- case PARSE_FIELD_CDS_COMMENT:
- case PARSE_FIELD_COMMENT_DESC:
- /* don't need any extra information */
- break;
- case PARSE_FIELD_BIOSRC_STRING:
- vnp = DialogToPointer (dlg->biosrc_string_choice);
- if (vnp == NULL)
- {
- head = AddStringToValNodeChain (head, "biosrc string type", 1);
- }
- ValNodeFree (vnp);
- break;
- case PARSE_FIELD_SOURCE_QUAL:
- vnp = DialogToPointer (dlg->source_qual_choice);
- if (vnp == NULL)
- {
- head = AddStringToValNodeChain (head, "source qual type", 1);
- }
- ValNodeFree (vnp);
- break;
- case PARSE_FIELD_GENE_FIELD:
- vnp = DialogToPointer (dlg->gene_field);
- if (vnp == NULL || vnp->data.intvalue == FEATUREFIELD_NONE)
- {
- head = AddStringToValNodeChain (head, "gene field", 1);
- }
- ValNodeFree (vnp);
- break;
- case PARSE_FIELD_MRNA_FIELD:
- vnp = DialogToPointer (dlg->mrna_field);
- if (vnp == NULL || vnp->data.intvalue == FEATUREFIELD_NONE)
- {
- head = AddStringToValNodeChain (head, "mRNA field", 1);
- }
- ValNodeFree (vnp);
- break;
- case PARSE_FIELD_PROTEIN_FIELD:
- vnp = DialogToPointer (dlg->protein_field);
- if (vnp == NULL || vnp->data.intvalue == FEATUREFIELD_NONE)
- {
- head = AddStringToValNodeChain (head, "protein field", 1);
- }
- ValNodeFree (vnp);
- break;
- case PARSE_FIELD_IMPORT_QUAL:
- vnp = DialogToPointer (dlg->import_qual);
- if (vnp == NULL)
- {
- ValNodeAddPointer (&head, 1, "import qualifier");
- }
- ValNodeFree (vnp);
- vnp = DialogToPointer (dlg->import_feature);
- if (vnp == NULL)
- {
- ValNodeAddPointer (&head, 1, "import feature");
- }
- ValNodeFree (vnp);
- break;
- case PARSE_FIELD_FEATURE_NOTE:
- vnp = DialogToPointer (dlg->feature);
- if (vnp == NULL)
- {
- ValNodeAddPointer (&head, 1, "feature");
+ head = AddStringToValNodeChain (head, "destination type", 1);
+ }
+ else
+ {
+ parse_field_type = vnp->choice;
+ vnp = ValNodeFreeData (vnp);
+ switch (parse_field_type)
+ {
+ case PARSE_FIELD_DEFLINE:
+ case PARSE_FIELD_CDS_COMMENT:
+ case PARSE_FIELD_COMMENT_DESC:
+ /* don't need any extra information */
+ break;
+ case PARSE_FIELD_BIOSRC_STRING:
+ vnp = DialogToPointer (dlg->biosrc_string_choice);
+ if (vnp == NULL)
+ {
+ head = AddStringToValNodeChain (head, "biosrc string type", 1);
+ }
ValNodeFree (vnp);
- }
- break;
- case SEARCH_FIELD_PUBLICATION:
- if (!dlg->is_search_field)
- {
+ break;
+ case PARSE_FIELD_SOURCE_QUAL:
+ vnp = DialogToPointer (dlg->source_qual_choice);
+ if (vnp == NULL)
+ {
+ head = AddStringToValNodeChain (head, "source qual type", 1);
+ }
+ ValNodeFree (vnp);
+ break;
+ case PARSE_FIELD_GENE_FIELD:
+ vnp = DialogToPointer (dlg->gene_field);
+ if (vnp == NULL || vnp->data.intvalue == FEATUREFIELD_NONE)
+ {
+ head = AddStringToValNodeChain (head, "gene field", 1);
+ }
+ ValNodeFree (vnp);
+ break;
+ case PARSE_FIELD_RNA_FIELD:
+ vnp = DialogToPointer (dlg->rna_subtype);
+ if (vnp == NULL)
+ {
+ head = AddStringToValNodeChain (head, "RNA subtype", 1);
+ }
+ ValNodeFree (vnp);
+ vnp = DialogToPointer (dlg->rna_field);
+ if (vnp == NULL || vnp->data.intvalue == FEATUREFIELD_NONE)
+ {
+ head = AddStringToValNodeChain (head, "RNA field", 1);
+ }
+ ValNodeFree (vnp);
+ break;
+ case PARSE_FIELD_PROTEIN_FIELD:
+ vnp = DialogToPointer (dlg->protein_field);
+ if (vnp == NULL || vnp->data.intvalue == FEATUREFIELD_NONE)
+ {
+ head = AddStringToValNodeChain (head, "protein field", 1);
+ }
+ ValNodeFree (vnp);
+ break;
+ case PARSE_FIELD_IMPORT_QUAL:
+ vnp = DialogToPointer (dlg->import_qual);
+ if (vnp == NULL)
+ {
+ ValNodeAddPointer (&head, 1, "import qualifier");
+ }
+ ValNodeFree (vnp);
+ vnp = DialogToPointer (dlg->import_feature);
+ if (vnp == NULL)
+ {
+ ValNodeAddPointer (&head, 1, "import feature");
+ }
+ ValNodeFree (vnp);
+ break;
+ case PARSE_FIELD_FEATURE_NOTE:
+ vnp = DialogToPointer (dlg->feature);
+ if (vnp == NULL)
+ {
+ ValNodeAddPointer (&head, 1, "feature");
+ ValNodeFree (vnp);
+ }
+ break;
+ case PARSE_FIELD_DBXREF:
+ if (TextHasNoText (dlg->dbxref_db))
+ {
+ ValNodeAddPointer (&head, 1, "specify database");
+ }
+ break;
+ case SEARCH_FIELD_PUBLICATION:
+ if (!dlg->is_search_field)
+ {
+ head = AddStringToValNodeChain (head, "field type", 1);
+ }
+ break;
+ default:
head = AddStringToValNodeChain (head, "field type", 1);
- }
- break;
- default:
- head = AddStringToValNodeChain (head, "field type", 1);
- break;
+ break;
+ }
}
}
return head;
}
+
+static ValNodePtr GetParseFieldDestList (Boolean include_pub, Boolean include_dbxref)
+{
+ ValNodePtr list = NULL;
+
+ ValNodeAddPointer (&list, PARSE_FIELD_DEFLINE, StringSave ("Definition Line"));
+ ValNodeAddPointer (&list, PARSE_FIELD_BIOSRC_STRING, StringSave ("Biosource"));
+ ValNodeAddPointer (&list, PARSE_FIELD_SOURCE_QUAL, StringSave ("Source Qualifier"));
+ ValNodeAddPointer (&list, PARSE_FIELD_GENE_FIELD, StringSave ("Gene Field"));
+ ValNodeAddPointer (&list, PARSE_FIELD_RNA_FIELD, StringSave ("RNA Field"));
+ ValNodeAddPointer (&list, PARSE_FIELD_CDS_COMMENT, StringSave ("CDS Comment"));
+ ValNodeAddPointer (&list, PARSE_FIELD_PROTEIN_FIELD, StringSave ("Protein Field"));
+ ValNodeAddPointer (&list, PARSE_FIELD_IMPORT_QUAL, StringSave ("Import Feature"));
+ ValNodeAddPointer (&list, PARSE_FIELD_FEATURE_NOTE, StringSave ("Feature Note"));
+ ValNodeAddPointer (&list, PARSE_FIELD_COMMENT_DESC, StringSave ("Comment Descriptor"));
+ if (include_dbxref)
+ {
+ ValNodeAddPointer (&list, PARSE_FIELD_DBXREF, StringSave ("Dbxref"));
+ }
+ if (include_pub)
+ {
+ ValNodeAddPointer (&list, SEARCH_FIELD_PUBLICATION, StringSave ("Publication"));
+ }
+ return list;
+}
+
+
+static void ChangeParseFieldDestText (TexT t)
+{
+ ParseFieldDialogPtr dlg;
+
+ dlg = (ParseFieldDialogPtr) GetObjectExtra (t);
+ if (dlg != NULL && dlg->change_notify != NULL)
+ {
+ (dlg->change_notify) (dlg->change_userdata);
+ }
+}
+
+
extern DialoG ParseFieldDestDialogEx
(GrouP h,
Nlm_ChangeNotifyProc change_notify,
Pointer change_userdata,
- Boolean is_search_field)
+ Boolean is_search_field,
+ Boolean include_dbxref)
{
ParseFieldDialogPtr dlg;
GrouP p, m, g;
GrouP subgrp;
+ ValNodePtr choice_list;
+ ValNode vn;
dlg = (ParseFieldDialogPtr) MemNew (sizeof (ParseFieldDialogData));
if (dlg == NULL)
@@ -13377,22 +14447,12 @@ extern DialoG ParseFieldDestDialogEx
dlg->is_search_field = is_search_field;
m = HiddenGroup (p, 2, 0, NULL);
- dlg->parse_field_type = PopupList (m, TRUE, ChangeParseFieldType);
- PopupItem (dlg->parse_field_type, "Definition Line");
- PopupItem (dlg->parse_field_type, "Biosource");
- PopupItem (dlg->parse_field_type, "Source Qualifier");
- PopupItem (dlg->parse_field_type, "Gene Field");
- PopupItem (dlg->parse_field_type, "mRNA Field");
- PopupItem (dlg->parse_field_type, "CDS Comment");
- PopupItem (dlg->parse_field_type, "Protein Field");
- PopupItem (dlg->parse_field_type, "Import Feature");
- PopupItem (dlg->parse_field_type, "Feature Note");
- PopupItem (dlg->parse_field_type, "Comment Descriptor");
- if (dlg->is_search_field) {
- PopupItem (dlg->parse_field_type, "Publication");
- }
- SetValue (dlg->parse_field_type, PARSE_FIELD_DEFLINE);
- SetObjectExtra (dlg->parse_field_type, dlg, NULL);
+
+ choice_list = GetParseFieldDestList (is_search_field, include_dbxref);
+ dlg->parse_field_type = ValNodeSelectionDialog (m, choice_list, TALL_SELECTION_LIST, ValNodeStringName,
+ ValNodeSimpleDataFree, ValNodeStringCopy,
+ ValNodeChoiceMatch, "parse destination",
+ ChangeParseFieldType, dlg, FALSE);
subgrp = HiddenGroup (m, 0, 0, NULL);
dlg->biosrc_string_choice = BioSourceStringDialog (subgrp, FALSE, change_notify, change_userdata);
@@ -13401,8 +14461,13 @@ extern DialoG ParseFieldDestDialogEx
Hide (dlg->source_qual_choice);
dlg->gene_field = GeneFieldSelectionDialog (subgrp, FALSE, change_notify, change_userdata);
Hide (dlg->gene_field);
- dlg->mrna_field = MRNAFieldSelectionDialog (subgrp, FALSE, change_notify, change_userdata);
- Hide (dlg->mrna_field);
+ g = HiddenGroup (subgrp, 2, 0, NULL);
+ dlg->rna_subtype = RNASubtypeSelectionDialog (g, FALSE, NULL, change_notify, change_userdata);
+ Hide (dlg->rna_subtype);
+ dlg->rna_field = RNAFieldSelectionDialog (g, FALSE,
+ change_notify,
+ change_userdata);
+ Hide (dlg->rna_field);
dlg->protein_field = ProteinFieldSelectionDialog (subgrp, FALSE, change_notify, change_userdata);
Hide (dlg->protein_field);
g = HiddenGroup (subgrp, 2, 0, NULL);
@@ -13412,6 +14477,23 @@ extern DialoG ParseFieldDestDialogEx
Hide (dlg->import_qual);
dlg->feature = FeatureSelectionDialog (subgrp, TRUE, change_notify, change_userdata);
Hide (dlg->feature);
+ if (include_dbxref)
+ {
+ dlg->dbxref_grp = HiddenGroup (subgrp, 2, 0, NULL);
+ StaticPrompt (dlg->dbxref_grp, "Database:", 0, 0, programFont, 'r');
+ dlg->dbxref_db = DialogText (dlg->dbxref_grp, "", 5, ChangeParseFieldDestText);
+ SetObjectExtra (dlg->dbxref_db, dlg, NULL);
+ Hide (dlg->dbxref_grp);
+ }
+ else
+ {
+ dlg->dbxref_db = NULL;
+ }
+
+ vn.choice = PARSE_FIELD_DEFLINE;
+ vn.data.ptrvalue = NULL;
+ vn.next = NULL;
+ PointerToDialog (dlg->parse_field_type, &vn);
dlg->feat_or_desc = HiddenGroup (p, 3, 0, NULL);
RadioButton (dlg->feat_or_desc, "Descriptors and Features");
@@ -13430,7 +14512,7 @@ extern DialoG ParseFieldDestDialog
Nlm_ChangeNotifyProc change_notify,
Pointer change_userdata)
{
- return ParseFieldDestDialogEx (h, change_notify, change_userdata, FALSE);
+ return ParseFieldDestDialogEx (h, change_notify, change_userdata, FALSE, FALSE);
}
/* Search Field dialog is identical to ParseFieldDestDialog except that it allows
* an additional option, Publication.
@@ -13440,38 +14522,46 @@ extern DialoG SearchFieldDialog
Nlm_ChangeNotifyProc change_notify,
Pointer change_userdata)
{
- return ParseFieldDestDialogEx (h, change_notify, change_userdata, TRUE);
+ return ParseFieldDestDialogEx (h, change_notify, change_userdata, TRUE, FALSE);
}
-#define PARSE_FIELD_SRC_DEFLINE 1
-#define PARSE_FIELD_SRC_GENBANK_FLATFILE 2
-#define PARSE_FIELD_SRC_LOCAL_ID 3
-#define PARSE_FIELD_SRC_TAXNAME 4
-#define PARSE_FIELD_SRC_COMMENT 5
-#define PARSE_FIELD_BANKIT_COMMENT 6
-#define PARSE_FIELD_STRUCTURED_COMMENT 7
-#define PARSE_FIELD_SRC_TAXNAME_AFTER_NOMIAL 8
-#define MAX_PARSE_FIELD 8
+typedef enum
+{
+ eParseFieldSrcDefLine = 1,
+ eParseFieldSrcGenBankFlatFile,
+ eParseFieldSrcLocalID,
+ eParseFieldSrcTaxName,
+ eParseFieldSrcSourceQual,
+ eParseFieldSrcComment,
+ eParseFieldSrcBankitComment,
+ eParseFieldSrcStructuredComment,
+ eParseFieldSrcTaxNameAfterNomial,
+ eParseFieldSrcFileID
+} EParseFieldSrc;
+
+const Int4 MAX_PARSE_FIELD = eParseFieldSrcFileID;
static CharPtr parse_src_field_list [] =
{
- "Definition Line", "GenBank Flatfile", "Local ID", "Organism Name", "Comment", "Bankit Comment",
- "Structured Comment", "Taxname after Binomial/Trinomial"
+ "Definition Line", "GenBank Flatfile", "Local ID", "Organism Name", "Source Qualifier", "Comment", "Bankit Comment",
+ "Structured Comment", "Taxname after Binomial/Trinomial", "File ID"
};
static int num_parse_src_fields = sizeof (parse_src_field_list) / sizeof (CharPtr);
typedef struct parsefieldsrc
{
- Int4 parse_field;
- CharPtr comment_field;
+ Int4 parse_field;
+ SourceQualDescPtr sqdp;
+ CharPtr comment_field;
} ParseFieldSrcData, PNTR ParseFieldSrcPtr;
static ParseFieldSrcPtr ParseFieldSrcFree (ParseFieldSrcPtr pfsp)
{
if (pfsp != NULL) {
pfsp->comment_field = MemFree (pfsp->comment_field);
+ pfsp->sqdp = MemFree (pfsp->sqdp);
pfsp = MemFree (pfsp);
}
return pfsp;
@@ -13483,6 +14573,7 @@ typedef struct parsefieldsrcdlg
DialoG parse_field;
PopuP comment_field;
ValNodePtr comment_field_list;
+ DialoG src_qual;
Nlm_ChangeNotifyProc change_notify;
Pointer change_userdata;
} ParseFieldSrcDlgData, PNTR ParseFieldSrcDlgPtr;
@@ -13535,11 +14626,16 @@ static void ParseFieldChange (Pointer userdata)
if (dlg == NULL) return;
vnp = DialogToPointer (dlg->parse_field);
- if (vnp == NULL || vnp->data.intvalue != PARSE_FIELD_STRUCTURED_COMMENT) {
+ if (vnp == NULL || vnp->data.intvalue != eParseFieldSrcStructuredComment) {
Hide (dlg->comment_field);
} else {
Show (dlg->comment_field);
}
+ if (vnp == NULL || vnp->data.intvalue != eParseFieldSrcSourceQual) {
+ Hide (dlg->src_qual);
+ } else {
+ Show (dlg->src_qual);
+ }
if (dlg->change_notify != NULL) {
(dlg->change_notify)(dlg->change_userdata);
@@ -13583,6 +14679,8 @@ static void DataToParseFieldSrcDialog(DialoG d, Pointer data)
vn.choice = 0;
PointerToDialog (dlg->parse_field, &vn);
SetValue (dlg->comment_field, FindCommentFieldPosition (pfsp->comment_field, dlg->comment_field_list));
+ vn.data.ptrvalue = pfsp->sqdp;
+ PointerToDialog (dlg->src_qual, &vn);
}
}
ParseFieldChange (dlg);
@@ -13607,7 +14705,8 @@ static Pointer ParseFieldSrcDialogToData(DialoG d)
vnp = ValNodeFree (vnp);
}
pfsp->comment_field = NULL;
- if (pfsp->parse_field == PARSE_FIELD_STRUCTURED_COMMENT) {
+ pfsp->sqdp = NULL;
+ if (pfsp->parse_field == eParseFieldSrcStructuredComment) {
field_pos = GetValue (dlg->comment_field);
if (field_pos > 0) {
vnp = dlg->comment_field_list;
@@ -13620,7 +14719,15 @@ static Pointer ParseFieldSrcDialogToData(DialoG d)
pfsp->comment_field = StringSave (vnp->data.ptrvalue);
}
}
+ } else if (pfsp->parse_field == eParseFieldSrcSourceQual) {
+ vnp = DialogToPointer (dlg->src_qual);
+ if (vnp != NULL) {
+ pfsp->sqdp = vnp->data.ptrvalue;
+ vnp->data.ptrvalue = NULL;
+ vnp = ValNodeFreeData (vnp);
+ }
}
+
return pfsp;
}
@@ -13665,6 +14772,36 @@ static void AddCommentFieldName (SeqDescrPtr sdp, Pointer userdata)
}
}
+
+static ValNodePtr TestParseFieldSource (DialoG d)
+
+{
+ ParseFieldSrcDlgPtr dlg;
+ ValNodePtr head = NULL, vnp, vnp2;
+
+ dlg = (ParseFieldSrcDlgPtr) GetObjectExtra (d);
+
+ vnp = DialogToPointer (dlg->parse_field);
+ if (vnp == NULL)
+ {
+ head = AddStringToValNodeChain (head, "field choice", 1);
+ }
+ else if (vnp->data.intvalue == eParseFieldSrcSourceQual)
+ {
+ vnp2 = DialogToPointer (dlg->src_qual);
+ if (vnp2 == NULL)
+ {
+ head = AddStringToValNodeChain (head, "source qual", 1);
+ }
+ vnp2 = ValNodeFree (vnp2);
+ }
+
+ vnp = ValNodeFree (vnp);
+
+ return head;
+}
+
+
extern DialoG ParseFieldSourceDialog
(GrouP h,
SeqEntryPtr sep,
@@ -13672,7 +14809,7 @@ extern DialoG ParseFieldSourceDialog
Pointer change_userdata)
{
ParseFieldSrcDlgPtr dlg;
- GrouP p;
+ GrouP p, k;
ValNodePtr vnp;
dlg = (ParseFieldSrcDlgPtr) MemNew (sizeof (ParseFieldSrcDlgData));
@@ -13689,7 +14826,7 @@ extern DialoG ParseFieldSourceDialog
dlg->todialog = DataToParseFieldSrcDialog;
dlg->fromdialog = ParseFieldSrcDialogToData;
dlg->dialogmessage = ParseFieldSourceDialogMessage;
- dlg->testdialog = NULL;
+ dlg->testdialog = TestParseFieldSource;
dlg->change_notify = change_notify;
dlg->change_userdata = change_userdata;
@@ -13697,7 +14834,11 @@ extern DialoG ParseFieldSourceDialog
num_parse_src_fields, parse_src_field_list,
ParseFieldChange, dlg);
- dlg->comment_field = PopupList (p, TRUE, NULL);
+ k = HiddenGroup (p, 0, 0, NULL);
+ dlg->comment_field = PopupList (k, TRUE, NULL);
+ dlg->src_qual = SourceQualTypeSelectionDialogEx (k, FALSE, change_notify,
+ change_userdata, 6, FALSE, FALSE);
+ AlignObjects (ALIGN_CENTER, (HANDLE) dlg->comment_field, (HANDLE) dlg->src_qual, NULL);
/* Add to comment_field list all user fields found in SeqEntry sep */
VisitDescriptorsInSep (sep, &(dlg->comment_field_list), AddCommentFieldName);
@@ -14782,7 +15923,7 @@ extern DialoG FeatureFieldChoiceDialog
typedef struct parseaction
{
- TextPortionPtr tp;
+ TextPortionXPtr tp;
FilterSetPtr fsp;
Int4 src_field;
CharPtr comment_field;
@@ -14822,238 +15963,6 @@ static void ResetParseActionVisitData (ParseActionPtr pap)
}
}
-static void DoParseAction (CharPtr src_str, ParseActionOpPtr paop)
-{
- CharPtr found_loc = NULL;
- Int4 found_len = 0;
-
- if (StringHasNoText (src_str) || paop == NULL
- || paop->parse_action_data == NULL
- || paop->parse_action == NULL)
- {
- return;
- }
-
- FindTextPortionInString (src_str, paop->parse_action_data->tp, &found_loc, &found_len);
-
- if (found_loc != NULL)
- {
- (paop->parse_action) (paop->parse_action_data, paop->parse_userdata, found_loc, found_len);
- paop->parse_complete = TRUE;
- }
-
-}
-
-static void ParseActionDeflineText (SeqDescrPtr sdp, Pointer userdata)
-{
- ParseActionOpPtr paop;
- CharPtr tmp_string;
- Int4 last_pos;
-
- paop = (ParseActionOpPtr) userdata;
- if (paop == NULL || paop->parse_action_data == NULL || paop->parse_action == NULL
- || sdp == NULL || sdp->choice != Seq_descr_title)
- {
- return;
- }
-
- tmp_string = StringSave (sdp->data.ptrvalue);
- if (tmp_string != NULL)
- {
- last_pos = StringLen (tmp_string) - 1;
- if (tmp_string [last_pos] == '.')
- {
- tmp_string [last_pos] = 0;
- }
- }
- DoParseAction (tmp_string, paop);
- tmp_string = MemFree (tmp_string);
-}
-
-static void ParseActionTaxnameText (BioSourcePtr biop, Pointer userdata)
-{
- ParseActionOpPtr paop;
-
- paop = (ParseActionOpPtr) userdata;
- if (paop == NULL || paop->parse_action_data == NULL || paop->parse_action == NULL
- || biop == NULL || biop->org == NULL)
- {
- return;
- }
-
- if (paop->parse_action_data->fsp != NULL
- && ! DoesOneSourceMatchConstraint (biop, paop->parse_action_data->fsp->ccp))
- {
- return;
- }
-
- DoParseAction (biop->org->taxname, paop);
-}
-
-static void ParseActionLocalIDText (BioseqPtr bsp, Pointer userdata)
-{
- ParseActionOpPtr paop;
- SeqIdPtr sip;
- ObjectIdPtr oip;
- Char tmp_str [128];
-
- paop = (ParseActionOpPtr) userdata;
- if (paop == NULL || paop->parse_action_data == NULL || paop->parse_action == NULL
- || bsp == NULL || ISA_aa (bsp->mol))
- {
- return;
- }
-
- for (sip = bsp->id; sip != NULL; sip = sip->next)
- {
- if (sip->choice == SEQID_LOCAL && sip->data.ptrvalue != NULL)
- {
- oip = (ObjectIdPtr) sip->data.ptrvalue;
- if (oip->str == NULL)
- {
- sprintf (tmp_str, "%d", oip->id);
- DoParseAction (tmp_str, paop);
- }
- else
- {
- DoParseAction (oip->str, paop);
- }
- }
- }
-}
-
-static void ParseActionBankitComment (SeqDescrPtr sdp, Pointer userdata)
-{
- ParseActionOpPtr paop;
- UserObjectPtr uop;
- ObjectIdPtr oip;
- UserFieldPtr ufp;
-
- if (sdp == NULL || userdata == NULL || sdp->data.ptrvalue == NULL)
- {
- return;
- }
-
- paop = (ParseActionOpPtr) userdata;
- if (paop == NULL || paop->parse_action_data == NULL || paop->parse_action == NULL)
- {
- return;
- }
-
- if (sdp->choice == Seq_descr_user && sdp->extended != 0)
- {
- /* Bankit Comments */
- uop = (UserObjectPtr) sdp->data.ptrvalue;
- oip = uop->type;
- if (oip != NULL && StringCmp (oip->str, "Submission") == 0)
- {
- for (ufp = uop->data; ufp != NULL; ufp = ufp->next)
- {
- oip = ufp->label;
- if (oip != NULL && StringCmp (oip->str, "AdditionalComment") == 0)
- {
- DoParseAction (ufp->data.ptrvalue, paop);
- }
- }
- }
- }
-}
-
-static void ParseActionCommentDescriptor (SeqDescrPtr sdp, Pointer userdata)
-{
- ParseActionOpPtr paop;
- UserObjectPtr uop;
- ObjectIdPtr oip;
- UserFieldPtr ufp;
-
- if (sdp == NULL || userdata == NULL || sdp->data.ptrvalue == NULL)
- {
- return;
- }
-
- paop = (ParseActionOpPtr) userdata;
- if (paop == NULL || paop->parse_action_data == NULL || paop->parse_action == NULL)
- {
- return;
- }
-
- if (sdp->choice == Seq_descr_comment)
- {
- DoParseAction (sdp->data.ptrvalue, paop);
- }
- else if (sdp->choice == Seq_descr_user && sdp->extended != 0)
- {
- /* Bankit Comments */
- uop = (UserObjectPtr) sdp->data.ptrvalue;
- oip = uop->type;
- if (oip != NULL && StringCmp (oip->str, "Submission") == 0)
- {
- for (ufp = uop->data; ufp != NULL; ufp = ufp->next)
- {
- oip = ufp->label;
- if (oip != NULL && StringCmp (oip->str, "AdditionalComment") == 0)
- {
- DoParseAction (ufp->data.ptrvalue, paop);
- }
- }
- }
- }
-}
-
-static void ParseActionCommentFeature (SeqFeatPtr sfp, Pointer userdata)
-{
- ParseActionOpPtr paop;
-
- if (sfp == NULL || sfp->data.choice != SEQFEAT_COMMENT || userdata == NULL)
- {
- return;
- }
- paop = (ParseActionOpPtr) userdata;
- DoParseAction (sfp->comment, paop);
-}
-
-
-static void ParseActionStructuredComment(SeqDescrPtr sdp, Pointer userdata)
-{
- ParseActionOpPtr paop;
- UserObjectPtr uop;
- ObjectIdPtr oip;
- UserFieldPtr ufp;
-
- if (sdp == NULL || userdata == NULL || sdp->data.ptrvalue == NULL)
- {
- return;
- }
-
- paop = (ParseActionOpPtr) userdata;
- if (paop == NULL || paop->parse_action_data == NULL || paop->parse_action == NULL)
- {
- return;
- }
-
- if (sdp->choice == Seq_descr_comment)
- {
- DoParseAction (sdp->data.ptrvalue, paop);
- }
- else if (sdp->choice == Seq_descr_user && sdp->extended != 0)
- {
- /* Bankit Comments */
- uop = (UserObjectPtr) sdp->data.ptrvalue;
- oip = uop->type;
- if (oip != NULL && StringCmp (oip->str, "Submission") == 0)
- {
- for (ufp = uop->data; ufp != NULL; ufp = ufp->next)
- {
- oip = ufp->label;
- if (oip != NULL && StringCmp (oip->str, "AdditionalComment") == 0)
- {
- DoParseAction (ufp->data.ptrvalue, paop);
- }
- }
- }
- }
-}
-
static void SetSourceAndTitle (ParseActionPtr pap, SeqDescrPtr sdp, SeqAnnotPtr sap)
{
SeqFeatPtr sfp;
@@ -15104,19 +16013,6 @@ static void SetSourceAndTitle (ParseActionPtr pap, SeqDescrPtr sdp, SeqAnnotPtr
}
}
-static void ParseFromSource (BioSourcePtr biop, ParseActionPtr pap, ParseActionOpPtr paop)
-{
- if (biop == NULL || pap == NULL || paop == NULL)
- {
- return;
- }
-
- if (pap->src_field == PARSE_FIELD_SRC_TAXNAME)
- {
- ParseActionTaxnameText (biop, paop);
- }
-}
-
typedef struct parsesourceinfo
{
BioseqPtr bsp;
@@ -15189,11 +16085,12 @@ static ValNodePtr ParseSourceListFree (ValNodePtr vnp)
typedef struct parsesource
{
Int4 src_field;
+ SourceQualDescPtr sqdp;
CharPtr comment_field;
FilterSetPtr fsp;
ParseFieldPtr dst_field_data;
ValNodePtr source_list; /* ptrvalue points to ParseSourceInfo struct */
- TextPortionPtr tp;
+ TextPortionXPtr tp;
} ParseSourceData, PNTR ParseSourcePtr;
@@ -15201,7 +16098,7 @@ static void
GetDeflineSourcesForBioseq
(BioseqPtr bsp,
FilterSetPtr fsp,
- TextPortionPtr tp,
+ TextPortionXPtr tp,
ValNodePtr PNTR source_list)
{
SeqDescrPtr sdp;
@@ -15220,9 +16117,9 @@ GetDeflineSourcesForBioseq
{
if (fsp == NULL
|| fsp->ccp == NULL
- || DoesStringMatchConstraint (sdp->data.ptrvalue, fsp->ccp->string_constraint))
+ || DoesStringMatchConstraintX (sdp->data.ptrvalue, fsp->ccp->string_constraint))
{
- FindTextPortionInString (sdp->data.ptrvalue, tp, &found_loc, &found_len);
+ FindTextPortionXInString (sdp->data.ptrvalue, tp, &found_loc, &found_len);
if (found_loc != NULL)
{
parse_src_txt = (CharPtr) MemNew (sizeof (Char) + (found_len + 1));
@@ -15250,19 +16147,74 @@ GetDeflineSourcesForBioseq
}
}
+
+static CharPtr GetIDSrc (SeqIdPtr sip, Uint1 id_type, CharPtr tag, FilterSetPtr fsp)
+{
+ DbtagPtr dbt = NULL;
+ ObjectIdPtr oip = NULL;
+ Char id_str[128];
+ CharPtr str_src = NULL;
+
+ if (sip == NULL || sip->choice != id_type) return NULL;
+
+ if (id_type == SEQID_GENERAL)
+ {
+ dbt = (DbtagPtr) sip->data.ptrvalue;
+ if (dbt == NULL || (tag != NULL && StringCmp (dbt->db, tag) != 0)) return NULL;
+ oip = dbt->tag;
+ }
+ else if (id_type == SEQID_LOCAL)
+ {
+ oip = sip->data.ptrvalue;
+ }
+
+ id_str[0] = 0;
+ if (fsp != NULL && fsp->ccp != NULL)
+ {
+ SeqIdWrite (sip, id_str, PRINTID_REPORT, sizeof (id_str));
+ if (!DoesStringMatchConstraintX (id_str, fsp->ccp->string_constraint))
+ {
+ return NULL;
+ }
+ }
+
+ if (oip == NULL)
+ {
+ if (id_str[0] == 0)
+ {
+ SeqIdWrite (sip, id_str, PRINTID_REPORT, sizeof (id_str));
+ }
+ str_src = StringSave (id_str);
+ }
+ else
+ {
+ if (oip->str == NULL)
+ {
+ sprintf (id_str, "%d", oip->id);
+ str_src = StringSave (id_str);
+ }
+ else
+ {
+ str_src = StringSave (oip->str);
+ }
+ }
+ return str_src;
+}
+
+
static void
-GetLocalIDSourcesForBioseq
+GetIDSourcesForBioseq
(BioseqPtr bsp,
FilterSetPtr fsp,
- TextPortionPtr tp,
+ TextPortionXPtr tp,
+ Uint1 id_type,
+ CharPtr tag,
ValNodePtr PNTR source_list)
{
SeqIdPtr sip;
ParseSourceInfoPtr psip;
- Char id_str [128];
CharPtr src_str, found_loc = NULL, parse_src_txt;
Int4 found_len;
- ObjectIdPtr oip;
if (bsp == NULL || source_list == NULL)
{
@@ -15272,53 +16224,59 @@ GetLocalIDSourcesForBioseq
sip = bsp->id;
while (sip != NULL)
{
- if (sip->choice == SEQID_LOCAL)
- {
- SeqIdWrite (sip, id_str, PRINTID_REPORT, sizeof (id_str));
- if (fsp == NULL
- || fsp->ccp == NULL
- || DoesStringMatchConstraint (id_str, fsp->ccp->string_constraint))
+ if ((src_str = GetIDSrc (sip, id_type, tag, fsp)) != NULL)
+ {
+ FindTextPortionXInString (src_str, tp, &found_loc, &found_len);
+ if (found_loc != NULL)
{
- oip = (ObjectIdPtr) sip->data.ptrvalue;
- if (oip->str == NULL)
+ parse_src_txt = (CharPtr) MemNew (sizeof (Char) + (found_len + 1));
+ StringNCpy (parse_src_txt, found_loc, found_len);
+ parse_src_txt [found_len] = 0;
+ psip = (ParseSourceInfoPtr) MemNew (sizeof (ParseSourceInfoData));
+ if (psip != NULL)
{
- sprintf (id_str, "%d", oip->id);
- src_str = id_str;
+ psip->bsp = bsp;
+ psip->sdp = NULL;
+ psip->sfp = NULL;
+ psip->sip = sip;
+ psip->dest_list = NULL;
+ psip->parse_src_txt = parse_src_txt;
+ ValNodeAddPointer (source_list, 0, psip);
}
else
{
- src_str = oip->str;
- }
- FindTextPortionInString (src_str, tp, &found_loc, &found_len);
- if (found_loc != NULL)
- {
- parse_src_txt = (CharPtr) MemNew (sizeof (Char) + (found_len + 1));
- StringNCpy (parse_src_txt, found_loc, found_len);
- parse_src_txt [found_len] = 0;
- psip = (ParseSourceInfoPtr) MemNew (sizeof (ParseSourceInfoData));
- if (psip != NULL)
- {
- psip->bsp = bsp;
- psip->sdp = NULL;
- psip->sfp = NULL;
- psip->sip = sip;
- psip->dest_list = NULL;
- psip->parse_src_txt = parse_src_txt;
- ValNodeAddPointer (source_list, 0, psip);
- }
- else
- {
- parse_src_txt = MemFree (parse_src_txt);
- }
+ parse_src_txt = MemFree (parse_src_txt);
}
}
+ src_str = MemFree (src_str);
}
sip = sip->next;
}
}
-const CharPtr nomial_keywords[] = {
+static void
+GetLocalIDSourcesForBioseq
+(BioseqPtr bsp,
+ FilterSetPtr fsp,
+ TextPortionXPtr tp,
+ ValNodePtr PNTR source_list)
+{
+ GetIDSourcesForBioseq (bsp, fsp, tp, SEQID_LOCAL, NULL, source_list);
+}
+
+
+static void GetNcbiFileSourceForBioseq
+(BioseqPtr bsp,
+ FilterSetPtr fsp,
+ TextPortionXPtr tp,
+ ValNodePtr PNTR source_list)
+{
+ GetIDSourcesForBioseq (bsp, fsp, tp, SEQID_GENERAL, "NCBIFILE", source_list);
+}
+
+
+const CharPtr nomial_keywordsx[] = {
"f. sp. ",
"var.",
"pv.",
@@ -15326,7 +16284,7 @@ const CharPtr nomial_keywords[] = {
"serovar",
"subsp." };
-const Int4 num_nomial_keywords = sizeof(nomial_keywords) / sizeof (CharPtr);
+const Int4 num_nomial_keywordsx = sizeof(nomial_keywordsx) / sizeof (CharPtr);
static CharPtr GetTextAfterNomial (CharPtr taxname)
@@ -15357,20 +16315,27 @@ static CharPtr GetTextAfterNomial (CharPtr taxname)
while (found_keyword) {
found_keyword = FALSE;
/* if the next word is a nomial keyword, skip that plus the first word that follows it. */
- for (i = 0; i < num_nomial_keywords; i++) {
- if (StringNCmp (ptr, nomial_keywords[i], StringLen(nomial_keywords[i])) == 0)
+ for (i = 0; i < num_nomial_keywordsx && *nomial_end != 0; i++) {
+ if (StringNCmp (ptr, nomial_keywordsx[i], StringLen(nomial_keywordsx[i])) == 0)
{
- ptr += StringLen(nomial_keywords[i]);
+ ptr += StringLen(nomial_keywordsx[i]);
while (*ptr == ' ' )
{
ptr++;
}
nomial_end = StringChr (ptr, ' ');
- ptr = nomial_end;
- while (*ptr == ' ') {
- ptr++;
+ if (nomial_end == NULL)
+ {
+ nomial_end = ptr + StringLen (ptr);
+ }
+ else
+ {
+ ptr = nomial_end;
+ while (*ptr == ' ') {
+ ptr++;
+ }
+ found_keyword = TRUE;
}
- found_keyword = TRUE;
}
}
}
@@ -15381,7 +16346,7 @@ static void
GetTaxNameSourcesForBioseqEx
(BioseqPtr bsp,
FilterSetPtr fsp,
- TextPortionPtr tp,
+ TextPortionXPtr tp,
ValNodePtr PNTR source_list,
Boolean skip_nomial)
{
@@ -15411,9 +16376,9 @@ GetTaxNameSourcesForBioseqEx
{
if (skip_nomial) {
nomial = GetTextAfterNomial(biop->org->taxname);
- FindTextPortionInString (nomial, tp, &found_loc, &found_len);
+ FindTextPortionXInString (nomial, tp, &found_loc, &found_len);
} else {
- FindTextPortionInString (biop->org->taxname, tp, &found_loc, &found_len);
+ FindTextPortionXInString (biop->org->taxname, tp, &found_loc, &found_len);
}
if (found_loc != NULL)
{
@@ -15450,7 +16415,7 @@ GetTaxNameSourcesForBioseqEx
|| fsp->ccp == NULL
|| DoesOneSourceMatchConstraint (sfp->data.value.ptrvalue, fsp->ccp)))
{
- FindTextPortionInString (biop->org->taxname, tp, &found_loc, &found_len);
+ FindTextPortionXInString (biop->org->taxname, tp, &found_loc, &found_len);
if (found_loc != NULL)
{
parse_src_txt = (CharPtr) MemNew (sizeof (Char) + (found_len + 1));
@@ -15483,7 +16448,7 @@ static void
GetTaxNameSourcesForBioseq
(BioseqPtr bsp,
FilterSetPtr fsp,
- TextPortionPtr tp,
+ TextPortionXPtr tp,
ValNodePtr PNTR source_list)
{
GetTaxNameSourcesForBioseqEx (bsp, fsp, tp, source_list, FALSE);
@@ -15494,18 +16459,126 @@ static void
GetTaxNameAfterNomialSourcesForBioseq
(BioseqPtr bsp,
FilterSetPtr fsp,
- TextPortionPtr tp,
+ TextPortionXPtr tp,
ValNodePtr PNTR source_list)
{
GetTaxNameSourcesForBioseqEx (bsp, fsp, tp, source_list, TRUE);
}
+static CharPtr
+GetSourceQualSourceTextForBioSource
+(BioSourcePtr biop,
+ SourceQualDescPtr sqdp,
+ FilterSetPtr fsp,
+ TextPortionXPtr tp)
+{
+ CharPtr str;
+ CharPtr found_loc = NULL, parse_src_txt = NULL;
+ Int4 found_len;
+
+ if (biop == NULL || biop->org == NULL || sqdp == NULL
+ || (fsp != NULL
+ && fsp->ccp != NULL
+ && !DoesOneSourceMatchConstraint (biop, fsp->ccp)))
+ {
+ return NULL;
+ }
+
+ str = GetSourceQualQualValueFromBiop (biop, sqdp, fsp);
+ if (!StringHasNoText (str))
+ {
+ FindTextPortionXInString (str, tp, &found_loc, &found_len);
+ if (found_loc != NULL)
+ {
+ parse_src_txt = (CharPtr) MemNew (sizeof (Char) + (found_len + 1));
+ StringNCpy (parse_src_txt, found_loc, found_len);
+ parse_src_txt [found_len] = 0;
+ }
+ }
+ str = MemFree (str);
+ return parse_src_txt;
+}
+
+
+static void
+GetSourceQualSourcesForBioseq
+(BioseqPtr bsp,
+ SourceQualDescPtr sqdp,
+ FilterSetPtr fsp,
+ TextPortionXPtr tp,
+ ValNodePtr PNTR source_list)
+{
+ SeqDescrPtr sdp;
+ SeqFeatPtr sfp;
+ SeqMgrFeatContext fcontext;
+ SeqMgrDescContext dcontext;
+ ParseSourceInfoPtr psip;
+ CharPtr parse_src_txt;
+ BioSourcePtr biop;
+
+ if (bsp == NULL || source_list == NULL)
+ {
+ return;
+ }
+
+ sdp = SeqMgrGetNextDescriptor (bsp, NULL, Seq_descr_source, &dcontext);
+ while (sdp != NULL)
+ {
+ if ((biop = sdp->data.ptrvalue) != NULL
+ && (parse_src_txt = GetSourceQualSourceTextForBioSource (biop, sqdp, fsp, tp)) != NULL)
+ {
+ psip = (ParseSourceInfoPtr) MemNew (sizeof (ParseSourceInfoData));
+ if (psip != NULL)
+ {
+ psip->bsp = bsp;
+ psip->sdp = sdp;
+ psip->sfp = NULL;
+ psip->sip = NULL;
+ psip->dest_list = NULL;
+ psip->parse_src_txt = parse_src_txt;
+ ValNodeAddPointer (source_list, 0, psip);
+ }
+ else
+ {
+ parse_src_txt = MemFree (parse_src_txt);
+ }
+ }
+ sdp = SeqMgrGetNextDescriptor (bsp, sdp, Seq_descr_source, &dcontext);
+ }
+
+ sfp = SeqMgrGetNextFeature (bsp, NULL, SEQFEAT_BIOSRC, 0, &fcontext);
+ while (sfp != NULL)
+ {
+ if ((biop = sfp->data.value.ptrvalue) != NULL
+ && (parse_src_txt = GetSourceQualSourceTextForBioSource (biop, sqdp, fsp, tp)) != NULL)
+ {
+ psip = (ParseSourceInfoPtr) MemNew (sizeof (ParseSourceInfoData));
+ if (psip != NULL)
+ {
+ psip->bsp = bsp;
+ psip->sdp = NULL;
+ psip->sfp = sfp;
+ psip->sip = NULL;
+ psip->dest_list = NULL;
+ psip->parse_src_txt = parse_src_txt;
+ ValNodeAddPointer (source_list, 0, psip);
+ }
+ else
+ {
+ parse_src_txt = MemFree (parse_src_txt);
+ }
+ }
+ sfp = SeqMgrGetNextFeature (bsp, sfp, SEQFEAT_BIOSRC, 0, &fcontext);
+ }
+}
+
+
static void
GetBankitCommentSourcesForBioseq
(BioseqPtr bsp,
FilterSetPtr fsp,
- TextPortionPtr tp,
+ TextPortionXPtr tp,
ValNodePtr PNTR source_list)
{
SeqDescrPtr sdp;
@@ -15541,9 +16614,9 @@ GetBankitCommentSourcesForBioseq
{
if (fsp == NULL
|| fsp->ccp == NULL
- || DoesStringMatchConstraint (ufp->data.ptrvalue, fsp->ccp->string_constraint))
+ || DoesStringMatchConstraintX (ufp->data.ptrvalue, fsp->ccp->string_constraint))
{
- FindTextPortionInString (ufp->data.ptrvalue, tp, &found_loc, &found_len);
+ FindTextPortionXInString (ufp->data.ptrvalue, tp, &found_loc, &found_len);
if (found_loc != NULL)
{
parse_src_txt = (CharPtr) MemNew (sizeof (Char) + (found_len + 1));
@@ -15580,7 +16653,7 @@ static void
GetCommentSourcesForBioseq
(BioseqPtr bsp,
FilterSetPtr fsp,
- TextPortionPtr tp,
+ TextPortionXPtr tp,
ValNodePtr PNTR source_list)
{
SeqDescrPtr sdp;
@@ -15601,9 +16674,9 @@ GetCommentSourcesForBioseq
{
if (fsp == NULL
|| fsp->ccp == NULL
- || DoesStringMatchConstraint (sdp->data.ptrvalue, fsp->ccp->string_constraint))
+ || DoesStringMatchConstraintX (sdp->data.ptrvalue, fsp->ccp->string_constraint))
{
- FindTextPortionInString (sdp->data.ptrvalue, tp, &found_loc, &found_len);
+ FindTextPortionXInString (sdp->data.ptrvalue, tp, &found_loc, &found_len);
if (found_loc != NULL)
{
parse_src_txt = (CharPtr) MemNew (sizeof (Char) + (found_len + 1));
@@ -15635,9 +16708,9 @@ GetCommentSourcesForBioseq
{
if (fsp == NULL
|| fsp->ccp == NULL
- || DoesStringMatchConstraint (sfp->data.value.ptrvalue, fsp->ccp->string_constraint))
+ || DoesStringMatchConstraintX (sfp->data.value.ptrvalue, fsp->ccp->string_constraint))
{
- FindTextPortionInString (sdp->data.ptrvalue, tp, &found_loc, &found_len);
+ FindTextPortionXInString (sdp->data.ptrvalue, tp, &found_loc, &found_len);
if (found_loc != NULL)
{
parse_src_txt = (CharPtr) MemNew (sizeof (Char) + (found_len + 1));
@@ -15670,7 +16743,7 @@ static void
GetStructuredCommentSourcesForBioseq
(BioseqPtr bsp,
FilterSetPtr fsp,
- TextPortionPtr tp,
+ TextPortionXPtr tp,
CharPtr comment_field,
ValNodePtr PNTR source_list)
{
@@ -15703,9 +16776,9 @@ GetStructuredCommentSourcesForBioseq
if (oip != NULL && StringCmp (oip->str, comment_field) == 0
&& (fsp == NULL
|| fsp->ccp == NULL
- || DoesStringMatchConstraint (sdp->data.ptrvalue, fsp->ccp->string_constraint)))
+ || DoesStringMatchConstraintX (sdp->data.ptrvalue, fsp->ccp->string_constraint)))
{
- FindTextPortionInString (ufp->data.ptrvalue, tp, &found_loc, &found_len);
+ FindTextPortionXInString (ufp->data.ptrvalue, tp, &found_loc, &found_len);
if (found_loc != NULL)
{
parse_src_txt = (CharPtr) MemNew (sizeof (Char) + (found_len + 1));
@@ -15748,60 +16821,77 @@ static void FindParseSourceBioseqCallback (BioseqPtr bsp, Pointer userdata)
psp = (ParseSourcePtr) userdata;
switch (psp->src_field)
{
- case PARSE_FIELD_SRC_DEFLINE:
+ case eParseFieldSrcDefLine:
if (!ISA_aa (bsp->mol))
{
GetDeflineSourcesForBioseq (bsp, psp->fsp, psp->tp, &(psp->source_list));
}
break;
- case PARSE_FIELD_SRC_LOCAL_ID:
+ case eParseFieldSrcLocalID:
if (! ISA_aa (bsp->mol) && bsp->repr != Seq_repr_seg)
{
GetLocalIDSourcesForBioseq (bsp, psp->fsp, psp->tp, &(psp->source_list));
}
break;
- case PARSE_FIELD_SRC_TAXNAME:
- GetTaxNameSourcesForBioseq (bsp, psp->fsp, psp->tp, &(psp->source_list));
+ case eParseFieldSrcFileID:
+ GetNcbiFileSourceForBioseq (bsp, psp->fsp, psp->tp, &(psp->source_list));
break;
- case PARSE_FIELD_SRC_COMMENT:
+ case eParseFieldSrcTaxName:
+ if (! ISA_aa (bsp->mol))
+ {
+ GetTaxNameSourcesForBioseq (bsp, psp->fsp, psp->tp, &(psp->source_list));
+ }
+ break;
+ case eParseFieldSrcSourceQual:
+ if (! ISA_aa (bsp->mol))
+ {
+ GetSourceQualSourcesForBioseq (bsp, psp->sqdp, psp->fsp, psp->tp, &(psp->source_list));
+ }
+ break;
+ case eParseFieldSrcComment:
GetCommentSourcesForBioseq (bsp, psp->fsp, psp->tp, &(psp->source_list));
break;
- case PARSE_FIELD_STRUCTURED_COMMENT:
+ case eParseFieldSrcStructuredComment:
GetStructuredCommentSourcesForBioseq(bsp, psp->fsp, psp->tp, psp->comment_field, &(psp->source_list));
break;
- case PARSE_FIELD_BANKIT_COMMENT:
+ case eParseFieldSrcBankitComment:
if (!ISA_aa (bsp->mol))
{
GetBankitCommentSourcesForBioseq (bsp, psp->fsp, psp->tp, &(psp->source_list));
}
break;
- case PARSE_FIELD_SRC_TAXNAME_AFTER_NOMIAL:
- GetTaxNameAfterNomialSourcesForBioseq (bsp, psp->fsp, psp->tp, &(psp->source_list));
+ case eParseFieldSrcTaxNameAfterNomial:
+ if (! ISA_aa (bsp->mol))
+ {
+ GetTaxNameAfterNomialSourcesForBioseq (bsp, psp->fsp, psp->tp, &(psp->source_list));
+ }
break;
}
}
-static void StripFromParsedField (ParseSourceInfoPtr psip, TextPortionPtr tp, Int4 parse_field_type, CharPtr comment_field)
+static void StripFromParsedField (ParseSourceInfoPtr psip, TextPortionXPtr tp, Int4 parse_field_type, SourceQualDescPtr sqdp, CharPtr comment_field)
{
- CharPtr str_found;
+ CharPtr str_found, tmp;
BioSourcePtr biop = NULL;
UserObjectPtr uop;
ObjectIdPtr oip;
UserFieldPtr ufp;
+ ApplyValueData avd;
+ ValNode vn;
if (psip == NULL || tp == NULL) {
return;
}
switch (parse_field_type) {
- case PARSE_FIELD_SRC_DEFLINE:
- case PARSE_FIELD_SRC_COMMENT:
+ case eParseFieldSrcDefLine:
+ case eParseFieldSrcComment:
if (psip->sdp != NULL) {
str_found = ReplaceStringForParse(psip->sdp->data.ptrvalue, tp);
str_found = MemFree (str_found);
}
break;
- case PARSE_FIELD_SRC_TAXNAME:
+ case eParseFieldSrcTaxName:
if (psip->sdp != NULL) {
biop = psip->sdp->data.ptrvalue;
} else if (psip->sfp != NULL) {
@@ -15812,7 +16902,30 @@ static void StripFromParsedField (ParseSourceInfoPtr psip, TextPortionPtr tp, In
str_found = MemFree (str_found);
}
break;
- case PARSE_FIELD_SRC_TAXNAME_AFTER_NOMIAL:
+ case eParseFieldSrcSourceQual:
+ if (psip->sdp != NULL) {
+ biop = psip->sdp->data.ptrvalue;
+ } else if (psip->sfp != NULL) {
+ biop = psip->sfp->data.value.ptrvalue;
+ }
+ if (biop != NULL) {
+ tmp = GetSourceQualQualValueFromBiop (biop, sqdp, NULL);
+ str_found = ReplaceStringForParse (tmp, tp);
+ str_found = MemFree (str_found);
+ avd.etp = NULL;
+ vn.choice = 0;
+ vn.data.ptrvalue = sqdp;
+ vn.next = NULL;
+ avd.field_list = &vn;
+ avd.new_text = tmp;
+ avd.text_to_replace = NULL;
+ avd.where_to_replace = EditApplyFindLocation_anywhere;
+
+ ApplySourceQualBioSourceCallback (biop, &avd, NULL);
+ tmp = MemFree (tmp);
+ }
+ break;
+ case eParseFieldSrcTaxNameAfterNomial:
if (psip->sdp != NULL) {
biop = psip->sdp->data.ptrvalue;
} else if (psip->sfp != NULL) {
@@ -15824,7 +16937,7 @@ static void StripFromParsedField (ParseSourceInfoPtr psip, TextPortionPtr tp, In
str_found = MemFree (str_found);
}
break;
- case PARSE_FIELD_STRUCTURED_COMMENT:
+ case eParseFieldSrcStructuredComment:
if (psip->sdp != NULL
&& psip->sdp->extended != 0
&& psip->sdp->data.ptrvalue != NULL) {
@@ -15844,7 +16957,7 @@ static void StripFromParsedField (ParseSourceInfoPtr psip, TextPortionPtr tp, In
}
}
break;
- case PARSE_FIELD_BANKIT_COMMENT:
+ case eParseFieldSrcBankitComment:
if (psip->sdp != NULL
&& psip->sdp->extended != 0
&& psip->sdp->data.ptrvalue != NULL) {
@@ -15943,6 +17056,7 @@ GetFeatureDestinationsForBioseq
SeqFeatPtr sfp;
SeqMgrFeatContext fcontext;
SeqAnnotPtr sap;
+ ProtRefPtr prp;
if (bsp == NULL || dest_list == NULL)
{
@@ -15950,11 +17064,21 @@ GetFeatureDestinationsForBioseq
}
sfp = SeqMgrGetNextFeature (bsp, NULL, seqFeatChoice, featDefChoice, &fcontext);
- while (sfp != NULL)
- {
+ if (sfp == NULL
+ && (featDefChoice == FEATDEF_PROT
+ || (seqFeatChoice == SEQFEAT_PROT && featDefChoice == 0))) {
+ sfp = CreateNewFeatureOnBioseq (bsp, SEQFEAT_PROT, NULL);
+ prp = ProtRefNew ();
+ sfp->data.value.ptrvalue = prp;
+ SeqMgrIndexFeatures (bsp->idx.entityID, NULL);
ValNodeAddPointer (dest_list, 1, sfp);
- sfp = SeqMgrGetNextFeature (bsp, sfp, seqFeatChoice, featDefChoice, &fcontext);
- }
+ } else {
+ while (sfp != NULL)
+ {
+ ValNodeAddPointer (dest_list, 1, sfp);
+ sfp = SeqMgrGetNextFeature (bsp, sfp, seqFeatChoice, featDefChoice, &fcontext);
+ }
+ }
sap = bsp->annot;
while (sap != NULL)
@@ -16047,19 +17171,35 @@ FindDestinationsForParseSourceInfo
switch (dst_field_data->parse_field_type)
{
case PARSE_FIELD_SOURCE_QUAL:
- GetBioSourceDestinationsForBioseq (psip->bsp, dst_field_data->do_feat, dst_field_data->do_desc, &(psip->dest_list));
+ case PARSE_FIELD_BIOSRC_STRING :
+ case PARSE_FIELD_DBXREF :
+ if ((dst_field_data->do_desc && psip->sdp != NULL && psip->sdp->choice == Seq_descr_source)
+ || (dst_field_data->do_feat && psip->sfp != NULL && psip->sfp->data.choice == SEQFEAT_BIOSRC))
+ {
+ if (dst_field_data->do_desc && psip->sdp != NULL)
+ {
+ ValNodeAddPointer (&(psip->dest_list), 2, psip->sdp);
+ }
+ if (dst_field_data->do_feat && psip->sfp != NULL)
+ {
+ ValNodeAddPointer (&(psip->dest_list), 1, psip->sfp);
+ }
+ }
+ else
+ {
+ GetBioSourceDestinationsForBioseq (psip->bsp, dst_field_data->do_feat, dst_field_data->do_desc, &(psip->dest_list));
+ }
break;
case PARSE_FIELD_DEFLINE :
GetDeflineDestinationsForBioseq (psip->bsp, &(psip->dest_list));
break;
- case PARSE_FIELD_BIOSRC_STRING :
- GetBioSourceDestinationsForBioseq (psip->bsp, dst_field_data->do_feat, dst_field_data->do_desc, &(psip->dest_list));
- break;
case PARSE_FIELD_GENE_FIELD :
GetFeatureDestinationsForBioseq (psip->bsp, SEQFEAT_GENE, 0, &(psip->dest_list));
break;
- case PARSE_FIELD_MRNA_FIELD :
- GetFeatureDestinationsForBioseq (psip->bsp, SEQFEAT_RNA, FEATDEF_mRNA, &(psip->dest_list));
+ case PARSE_FIELD_RNA_FIELD :
+ GetFeatureDestinationsForBioseq (psip->bsp, SEQFEAT_RNA,
+ dst_field_data->feature_subtype == NULL ? 0 : dst_field_data->feature_subtype->data.intvalue,
+ &(psip->dest_list));
break;
case PARSE_FIELD_CDS_COMMENT:
GetFeatureDestinationsForBioseq (psip->bsp, SEQFEAT_CDREGION, FEATDEF_CDS, &(psip->dest_list));
@@ -16348,8 +17488,8 @@ CheckParseActionPairListForExistingText
gsp->copy_vn_proc = IntValNodeCopy;
gsp->requested_field = IntValNodeCopy (psp->dst_field_data->feature_field);
break;
- case PARSE_FIELD_MRNA_FIELD:
- gsp->fieldstring_func = GetmRNAFieldString;
+ case PARSE_FIELD_RNA_FIELD:
+ gsp->fieldstring_func = GetRNAFieldString;
gsp->copy_vn_proc = IntValNodeCopy;
gsp->requested_field = IntValNodeCopy (psp->dst_field_data->feature_field);
break;
@@ -16379,6 +17519,13 @@ CheckParseActionPairListForExistingText
gsp->copy_vn_proc = ValNodeStringCopy;
gsp->requested_field = ValNodeStringCopy (psp->dst_field_data->feature_field);
break;
+ case PARSE_FIELD_DBXREF:
+ gsp->fieldstring_func = GetBioSourceFeatureDbxrefString;
+ gsp->descrstring_func = GetBioSourceDescriptorDbxrefString;
+ gsp->free_vn_proc = ValNodeSimpleDataFree;
+ gsp->copy_vn_proc = ValNodeStringCopy;
+ gsp->requested_field = ValNodeStringCopy (psp->dst_field_data->feature_field);
+ break;
}
for (vnp = psp->source_list; vnp != NULL; vnp = vnp->next)
@@ -16427,8 +17574,8 @@ ParseToOneFeature
case PARSE_FIELD_GENE_FIELD :
set_string_func = SetGeneFieldString;
break;
- case PARSE_FIELD_MRNA_FIELD :
- set_string_func = SetmRNAFieldString;
+ case PARSE_FIELD_RNA_FIELD :
+ set_string_func = SetRNAFieldString;
break;
case PARSE_FIELD_CDS_COMMENT:
set_string_func = SetCDSComment;
@@ -16464,7 +17611,7 @@ ParseToOneFeature
if (prot_bsp == NULL)
{
bsp = BioseqFindFromSeqLoc (sfp->location);
- SeqEdTranslateOneCDS (sfp, bsp, sfp->idx.entityID);
+ SeqEdTranslateOneCDS (sfp, bsp, sfp->idx.entityID, Sequin_GlobalAlign2Seq);
SeqMgrIndexFeatures (sfp->idx.entityID, NULL);
prot_bsp = BioseqFindFromSeqLoc (sfp->product);
}
@@ -16634,7 +17781,7 @@ ParsePairListItem
(ParseSourceInfoPtr psip,
Int4 src_field,
ParseFieldPtr dst_field_data,
- TextPortionPtr tp,
+ TextPortionXPtr tp,
ExistingTextPtr etp)
{
ApplyValueData avd;
@@ -16680,13 +17827,18 @@ ParsePairListItem
#endif
break;
case PARSE_FIELD_GENE_FIELD :
- case PARSE_FIELD_MRNA_FIELD :
+ case PARSE_FIELD_RNA_FIELD :
case PARSE_FIELD_CDS_COMMENT:
case PARSE_FIELD_PROTEIN_FIELD:
case PARSE_FIELD_IMPORT_QUAL :
case PARSE_FIELD_FEATURE_NOTE :
avd.field_list = dst_field_data->feature_field;
break;
+ case PARSE_FIELD_DBXREF :
+ avd.field_list = dst_field_data->feature_field;
+ feature_action = ApplyBioSourceDbxrefFeatureCallback;
+ descriptor_action = ApplyBioSourceDbxrefDescriptorCallback;
+ break;
}
for (dest_vnp = psip->dest_list; dest_vnp != NULL; dest_vnp = dest_vnp->next)
@@ -16701,7 +17853,7 @@ ParsePairListItem
}
else if (dest_vnp->choice == 1
&& (dst_field_data->parse_field_type == PARSE_FIELD_GENE_FIELD
- || dst_field_data->parse_field_type == PARSE_FIELD_MRNA_FIELD
+ || dst_field_data->parse_field_type == PARSE_FIELD_RNA_FIELD
|| dst_field_data->parse_field_type == PARSE_FIELD_CDS_COMMENT
|| dst_field_data->parse_field_type == PARSE_FIELD_PROTEIN_FIELD
|| dst_field_data->parse_field_type == PARSE_FIELD_IMPORT_QUAL
@@ -16718,10 +17870,11 @@ static Boolean
FindParseActionPairList
(SeqEntryPtr sep,
Int4 src_field,
+ SourceQualDescPtr sqdp,
CharPtr comment_field,
ParseFieldPtr dst_field_data,
FilterSetPtr fsp,
- TextPortionPtr tp,
+ TextPortionXPtr tp,
Boolean remove_from_parsed,
ChangeCasePtr ccp)
{
@@ -16738,6 +17891,7 @@ FindParseActionPairList
psd.source_list = NULL;
psd.src_field = src_field;
psd.comment_field = comment_field;
+ psd.sqdp = sqdp;
psd.dst_field_data = dst_field_data;
psd.fsp = fsp;
psd.tp = tp;
@@ -16803,7 +17957,7 @@ FindParseActionPairList
{
if (vnp->data.ptrvalue == NULL) continue;
psip = (ParseSourceInfoPtr) vnp->data.ptrvalue;
- StripFromParsedField (psip, tp, src_field, comment_field);
+ StripFromParsedField (psip, tp, src_field, sqdp, comment_field);
}
rval = TRUE;
@@ -16814,233 +17968,14 @@ FindParseActionPairList
/* free orgname list if we created it */
orgnames = ValNodeFree (orgnames);
+ comment_field = MemFree (comment_field);
+ sqdp = MemFree (sqdp);
+
psd.source_list = ParseSourceListFree (psd.source_list);
source_list_for_removal = ParseSourceListFree (source_list_for_removal);
return rval;
}
-static void
-VisitSeqEntriesForParseAction
-(SeqEntryPtr sep,
- ParseActionPtr pap,
- ParseActnProc parse_action,
- Pointer parse_data,
- Boolean ok_to_parse)
-{
- SeqDescrPtr sdp, sdp_tmp;
- SeqAnnotPtr sap, sap_tmp;
- SeqFeatPtr sfp;
- ParseActionOpData paod;
- BioseqSetPtr bssp = NULL;
-
- SeqEntryPtr old_title_sep;
- SeqEntryPtr old_biop_sep;
-
- if (sep == NULL || pap == NULL || parse_action == NULL)
- {
- return;
- }
-
- paod.parse_action_data = pap;
- paod.parse_action = parse_action;
- paod.parse_userdata = parse_data;
- paod.parse_complete = FALSE;
-
- pap->sep = sep;
- if (IS_Bioseq (pap->sep))
- {
- pap->bsp = (BioseqPtr) pap->sep->data.ptrvalue;
- sdp = pap->bsp->descr;
- sap = pap->bsp->annot;
- }
- else if (IS_Bioseq_set (sep))
- {
- bssp = (BioseqSetPtr) sep->data.ptrvalue;
- pap->bssp = bssp;
- sdp = pap->bssp->descr;
- sap = pap->bssp->annot;
- }
-
- old_title_sep = pap->title_sep;
- old_biop_sep = pap->biop_sep;
-
- if (pap->fsp != NULL
- && pap->fsp->ccp != NULL
- && pap->fsp->ccp->constraint_type != CHOICE_CONSTRAINT_ANY)
- {
- ok_to_parse = FALSE;
- /* try to find BioSource descriptor to match source constraint */
- sdp_tmp = sdp;
- while (sdp_tmp != NULL && ! ok_to_parse)
- {
- if (sdp_tmp->choice == Seq_descr_source)
- {
- if (DoesOneSourceMatchConstraint (sdp_tmp->data.ptrvalue, pap->fsp->ccp))
- {
- ok_to_parse = TRUE;
- }
- }
- sdp_tmp = sdp_tmp->next;
- }
- /* try to find BioSource feature to match source constraint */
- sap_tmp = sap;
- while (sap_tmp != NULL && ! ok_to_parse)
- {
- if (sap_tmp->type == 1)
- {
- sfp = (SeqFeatPtr) sap_tmp->data;
- while (sfp != NULL && !ok_to_parse)
- {
- if (sfp->data.choice == SEQFEAT_BIOSRC)
- {
- if (DoesOneSourceMatchConstraint (sfp->data.value.ptrvalue, pap->fsp->ccp))
- {
- ok_to_parse = TRUE;
- }
- }
- sfp = sfp->next;
- }
- }
- sap_tmp = sap_tmp->next;
- }
- }
- else
- {
- ok_to_parse = TRUE;
- }
- if (ok_to_parse)
- {
- SetSourceAndTitle (pap, sdp, sap);
- if (pap->biop_sep != old_biop_sep)
- {
- sdp_tmp = sdp;
- while (sdp_tmp != NULL)
- {
- if (sdp_tmp->choice == Seq_descr_source)
- {
- ParseFromSource (sdp_tmp->data.ptrvalue, pap, &paod);
- }
- sdp_tmp = sdp_tmp->next;
- }
- sap_tmp = sap;
- while (sap_tmp != NULL)
- {
- if (sap_tmp->type == 1)
- {
- sfp = sap_tmp->data;
- while (sfp != NULL)
- {
- if (sfp->data.choice == SEQFEAT_BIOSRC)
- {
- ParseFromSource (sfp->data.value.ptrvalue, pap, &paod);
- }
- sfp = sfp->next;
- }
- }
- sap_tmp = sap_tmp->next;
- }
- }
- if (pap->title_sep != old_title_sep
- && pap->src_field == PARSE_FIELD_SRC_DEFLINE)
- {
- sdp_tmp = sdp;
- while (sdp_tmp != NULL)
- {
- if (sdp_tmp->choice == Seq_descr_title)
- {
- ParseActionDeflineText (sdp_tmp, &paod);
- }
- sdp_tmp = sdp_tmp->next;
- }
- }
-
- if (pap->src_field == PARSE_FIELD_SRC_LOCAL_ID && IS_Bioseq (sep))
- {
- if (pap->biop_sep == NULL)
- {
- pap->biop_sep = sep;
- }
- if (pap->title_sep == NULL)
- {
- pap->title_sep = sep;
- }
- ParseActionLocalIDText (sep->data.ptrvalue, &paod);
- }
- if (pap->src_field == PARSE_FIELD_SRC_COMMENT)
- {
- sdp_tmp = sdp;
- while (sdp_tmp != NULL)
- {
- ParseActionCommentDescriptor (sdp_tmp, &paod);
- sdp_tmp = sdp_tmp->next;
- }
-
- sap_tmp = sap;
- while (sap_tmp != NULL)
- {
- if (sap_tmp->type == 1)
- {
- sfp = sap_tmp->data;
- while (sfp != NULL)
- {
- ParseActionCommentFeature (sfp, &paod);
- sfp = sfp->next;
- }
- }
- sap_tmp = sap_tmp->next;
- }
- }
- if (pap->src_field == PARSE_FIELD_BANKIT_COMMENT)
- {
- sdp_tmp = sdp;
- while (sdp_tmp != NULL)
- {
- ParseActionBankitComment (sdp_tmp, &paod);
- sdp_tmp = sdp_tmp->next;
- }
- }
- }
-
- if (bssp != NULL && !paod.parse_complete)
- {
- VisitSeqEntriesForParseAction (bssp->seq_set, pap, parse_action, parse_data, ok_to_parse);
- }
-
- pap->title_sep = old_title_sep;
- pap->biop_sep = old_biop_sep;
-
- VisitSeqEntriesForParseAction (sep->next, pap, parse_action, parse_data, ok_to_parse);
-}
-
-typedef struct parseactionlog
-{
- FILE *fp;
- Boolean data_in_log;
-} ParseActionLogData, PNTR ParseActionLogPtr;
-
-static void ParseActionSample (ParseActionPtr pap, Pointer userdata, CharPtr found_text, Int4 found_len)
-{
- CharPtr log_text;
- ParseActionLogPtr palp;
-
- palp = (ParseActionLogPtr) userdata;
- if (palp == NULL || found_len == 0 || found_text == NULL || palp->fp == NULL)
- {
- return;
- }
-
- log_text = (CharPtr) MemNew ((found_len + 1) * sizeof (Char));
- if (log_text != NULL)
- {
- StringNCpy (log_text, found_text, found_len);
- log_text[found_len] = 0;
- fprintf (palp->fp, "%s\n", log_text);
- palp->data_in_log = TRUE;
- MemFree (log_text);
- }
-}
-
-
typedef ValNodePtr (*AdjustConvertFeatureListFunc) PROTO ((ValNodePtr, Pointer, BaseFormPtr, BoolPtr cancel));
typedef Pointer (*CollectConvertFeatureOptionsFunc) PROTO ((ValNodePtr, BaseFormPtr, BoolPtr cancel));
typedef Pointer (*FreeConvertFeatureOptionsFunc) PROTO ((Pointer));
@@ -17152,7 +18087,7 @@ static ConvertFeatureProcsData ConvertFeaturesTable[] = {
"Creates a misc_feature with the gene description and locus prepended to the original comment, separated by semicolons." },
{ SEQFEAT_RNA, FEATDEF_ANY, SEQFEAT_IMP, FEATDEF_misc_feature,
NULL, NULL, NULL, ConvertRNAToMiscFeat, NULL,
- "Creates a misc_feature with the RNA product name as a /product qualifier." } ,
+ "Creates a misc_feature and adds the RNA product name to the comment." } ,
{ SEQFEAT_SITE, FEATDEF_ANY, SEQFEAT_IMP, FEATDEF_misc_feature,
NULL, NULL, NULL, ConvertSiteToMiscFeat, NULL,
"Creates a misc_feature with the site type name as a /note qualifier." } ,
@@ -17294,6 +18229,7 @@ static void FeatureRemoveChangeNotify (Pointer userdata)
ValNodePtr err_list, vnp_from, vnp_to;
Int4 table_line;
RecT r;
+ Boolean need_original = FALSE;
mrfp = (FeatureSelRemConvFormPtr) userdata;
if (mrfp == NULL) return;
@@ -17333,6 +18269,7 @@ static void FeatureRemoveChangeNotify (Pointer userdata)
}
else
{
+ /* set help text */
table_line = GetConvertFeatureTableLine (FindFeatFromFeatDefType (vnp_from->choice),
vnp_from->choice,
FindFeatFromFeatDefType (vnp_to->choice),
@@ -17349,11 +18286,23 @@ static void FeatureRemoveChangeNotify (Pointer userdata)
{
AppendText (mrfp->help_text, ConvertFeaturesTable[table_line].help_text, NULL, NULL, systemFont);
}
+
+ /* if converting from CDS to site, bond, or region, "leave original" must be checked */
+ if ((vnp_from->choice == FEATDEF_CDS
+ || vnp_from->choice == FEATDEF_ANY)
+ && (vnp_to->choice == FEATDEF_SITE
+ || vnp_to->choice == FEATDEF_BOND
+ || vnp_to->choice == FEATDEF_REGION))
+ {
+ need_original = TRUE;
+ AppendText (mrfp->help_text, "If converting from CDS to site or bond, or region, you must check Leave Original Feature.", NULL, NULL, systemFont);
+ }
}
vnp_from = ValNodeFreeData (vnp_from);
vnp_to = ValNodeFreeData (vnp_to);
ObjectRect (mrfp->help_text, &r);
InvalRect (&r);
+
}
else
{
@@ -17364,7 +18313,7 @@ static void FeatureRemoveChangeNotify (Pointer userdata)
}
}
- if (err_list == NULL)
+ if (err_list == NULL && (!need_original || GetStatus (mrfp->leave_original_feature_btn)))
{
EnableAcceptCancelDialogAccept (mrfp->accept_cancel);
}
@@ -17375,6 +18324,17 @@ static void FeatureRemoveChangeNotify (Pointer userdata)
ValNodeFree (err_list);
}
+
+static void FeatureRemoveChangeButton (ButtoN b)
+{
+ FeatureSelRemConvFormPtr mrfp;
+
+ mrfp = (FeatureSelRemConvFormPtr) GetObjectExtra (b);
+ if (mrfp == NULL) return;
+ FeatureRemoveChangeNotify (mrfp);
+}
+
+
static void FeatureRemoveOrConvertCenterAction (PopuP p)
{
FeatureSelRemConvFormPtr mrfp;
@@ -18847,6 +19807,7 @@ static Boolean FeatureRemoveOrConvertAction (Pointer userdata)
RemoveFeatureData rfd;
OrigFeatPtr ofp;
SeqFeatPtr sfp;
+ Boolean rval = TRUE;
if (userdata == NULL) return FALSE;
@@ -18895,7 +19856,7 @@ static Boolean FeatureRemoveOrConvertAction (Pointer userdata)
switch (window_action)
{
case FEATURE_CONVERT:
- NewConvertFeaturesByList (sep, fsp, feat_def_choice, mrfp);
+ rval = NewConvertFeaturesByList (sep, fsp, feat_def_choice, mrfp);
break;
case FEATURE_REMOVE:
rfd.bsplist = NULL;
@@ -18950,7 +19911,7 @@ static Boolean FeatureRemoveOrConvertAction (Pointer userdata)
ObjMgrSetDirtyFlag (mrfp->input_entityID, TRUE);
ObjMgrSendMsg (OM_MSG_UPDATE, mrfp->input_entityID, 0, 0);
Update ();
- return TRUE;
+ return rval;
}
static void FeatureRemoveOrConvert (IteM i, Int4 first_action)
@@ -19022,7 +19983,8 @@ static void FeatureRemoveOrConvert (IteM i, Int4 first_action)
SelectFont (systemFont);
mrfp->help_text = DocumentPanel (g, stdCharWidth * 12, LineHeight () * (TALL_SELECTION_LIST + 1));
- mrfp->leave_original_feature_btn = CheckBox (mrfp->convert_grp, "Leave Original Feature", NULL);
+ mrfp->leave_original_feature_btn = CheckBox (mrfp->convert_grp, "Leave Original Feature", FeatureRemoveChangeButton);
+ SetObjectExtra (mrfp->leave_original_feature_btn, mrfp, NULL);
SetStatus (mrfp->leave_original_feature_btn, FALSE);
AlignObjects (ALIGN_CENTER, (HANDLE) k, (HANDLE) mrfp->leave_original_feature_btn, NULL);
@@ -19334,12 +20296,13 @@ extern ParseFieldPtr ParseFieldFree (ParseFieldPtr pfp)
switch (pfp->parse_field_type) {
case PARSE_FIELD_SOURCE_QUAL :
case PARSE_FIELD_FEATURE_NOTE:
- pfp->feature_field = ValNodeFreeData (pfp->feature_field);
+ case PARSE_FIELD_DBXREF:
+ pfp->feature_field = ValNodeFreeData (pfp->feature_field);
break;
case PARSE_FIELD_DEFLINE:
case PARSE_FIELD_BIOSRC_STRING:
case PARSE_FIELD_GENE_FIELD:
- case PARSE_FIELD_MRNA_FIELD:
+ case PARSE_FIELD_RNA_FIELD:
case PARSE_FIELD_CDS_COMMENT:
case PARSE_FIELD_COMMENT_DESC:
case PARSE_FIELD_IMPORT_QUAL:
@@ -19350,7 +20313,14 @@ extern ParseFieldPtr ParseFieldFree (ParseFieldPtr pfp)
pfp->feature_field = ValNodeFree (pfp->feature_field);
}
- pfp->feature_subtype = ValNodeFreeData (pfp->feature_subtype);
+ if (pfp->parse_field_type == PARSE_FIELD_RNA_FIELD)
+ {
+ pfp->feature_subtype = ValNodeFree (pfp->feature_subtype);
+ }
+ else
+ {
+ pfp->feature_subtype = ValNodeFreeData (pfp->feature_subtype);
+ }
pfp = MemFree (pfp);
}
return pfp;
@@ -19435,6 +20405,16 @@ GetSampleForSeqEntry
SEQFEAT_BIOSRC, 0,
Seq_descr_source);
break;
+ case PARSE_FIELD_DBXREF:
+ gsp = CheckForExistingTextInSeqEntry (sep,
+ dst_field_data->feature_field,
+ GetBioSourceFeatureDbxrefString,
+ GetBioSourceDescriptorDbxrefString,
+ ValNodeSimpleDataFree, ValNodeStringCopy,
+ fsp,
+ SEQFEAT_BIOSRC, 0,
+ Seq_descr_source);
+ break;
case PARSE_FIELD_GENE_FIELD:
gsp = CheckForExistingTextInSeqEntry (sep,
dst_field_data->feature_field,
@@ -19444,14 +20424,15 @@ GetSampleForSeqEntry
fsp,
SEQFEAT_GENE, 0, 0);
break;
- case PARSE_FIELD_MRNA_FIELD:
+ case PARSE_FIELD_RNA_FIELD:
gsp = CheckForExistingTextInSeqEntry (sep,
dst_field_data->feature_field,
- GetmRNAFieldString,
+ GetRNAFieldString,
NULL,
NULL, IntValNodeCopy,
fsp,
- SEQFEAT_RNA, FEATDEF_mRNA, 0);
+ SEQFEAT_RNA,
+ dst_field_data->feature_subtype == NULL ? 0 : dst_field_data->feature_subtype->data.intvalue, 0);
break;
case PARSE_FIELD_CDS_COMMENT:
gsp = CheckForExistingTextInSeqEntry (sep,
@@ -19553,63 +20534,6 @@ GetSampleForSeqEntry
return gsp;
}
-static void GetParseToExistingTextCallback (ParseActionPtr pap, Pointer userdata, CharPtr found_text, Int4 found_len)
-{
- ParseFormPtr mp;
- GetSamplePtr gsp = NULL;
- SeqEntryPtr sep;
- ValNodePtr sum_vnp;
-
- mp = (ParseFormPtr) userdata;
- if (mp == NULL || mp->dst_field_data == NULL)
- {
- return;
- }
-
- if (mp->dst_field_data->parse_field_type == PARSE_FIELD_SOURCE_QUAL
- || mp->dst_field_data->parse_field_type == PARSE_FIELD_BIOSRC_STRING)
- {
- sep = pap->biop_sep;
- }
- else if (mp->dst_field_data->parse_field_type == PARSE_FIELD_DEFLINE)
- {
- sep = pap->title_sep;
- }
- else
- {
- sep = pap->sep;
- }
-
- gsp = GetSampleForSeqEntry (sep, mp->input_entityID, mp->dst_field_data, NULL);
-
- if (gsp == NULL)
- {
- return;
- }
- if (mp->gsp == NULL)
- {
- mp->gsp = gsp;
- }
- else
- {
- mp->gsp->num_found += gsp->num_found;
- if (StringCmp (mp->gsp->sample_text, gsp->sample_text) != 0)
- {
- mp->gsp->all_same = FALSE;
- }
-
- sum_vnp = AddValNodeLists (mp->gsp->feat_dest_list, gsp->feat_dest_list);
- mp->gsp->feat_dest_list = ValNodeFree (mp->gsp->feat_dest_list);
- mp->gsp->feat_dest_list = sum_vnp;
-
- sum_vnp = AddValNodeLists (mp->gsp->descr_dest_list, gsp->descr_dest_list);
- mp->gsp->descr_dest_list = ValNodeFree (mp->gsp->descr_dest_list);
- mp->gsp->descr_dest_list = sum_vnp;
-
- gsp = GetSampleFree (gsp);
- }
-}
-
static void
ParseToFeaturesOnBioseq
(BioseqPtr bsp,
@@ -19640,7 +20564,7 @@ ParseToFeaturesOnBioseq
prot_bsp = BioseqFindFromSeqLoc (sfp->product);
if (prot_bsp == NULL)
{
- SeqEdTranslateOneCDS (sfp, bsp, sfp->idx.entityID);
+ SeqEdTranslateOneCDS (sfp, bsp, sfp->idx.entityID, Sequin_GlobalAlign2Seq);
SeqMgrIndexFeatures (sfp->idx.entityID, NULL);
prot_bsp = BioseqFindFromSeqLoc (sfp->product);
}
@@ -19720,8 +20644,8 @@ ParseToFeatures
case PARSE_FIELD_GENE_FIELD :
set_string_func = SetGeneFieldString;
break;
- case PARSE_FIELD_MRNA_FIELD :
- set_string_func = SetmRNAFieldString;
+ case PARSE_FIELD_RNA_FIELD :
+ set_string_func = SetRNAFieldString;
break;
case PARSE_FIELD_CDS_COMMENT:
set_string_func = SetCDSComment;
@@ -19843,15 +20767,22 @@ static void ParseToDest (ParseActionPtr pap, Pointer userdata, CharPtr found_tex
ApplySourceStringFeatureCallback,
ApplySourceStringDescriptorCallback,
0, 0, 0, &avd);
+ case PARSE_FIELD_DBXREF :
+ avd.field_list = mp->dst_field_data->feature_field;
+ OperateOnSeqEntryConstrainedObjects (pap->biop_sep, NULL,
+ ApplyBioSourceDbxrefFeatureCallback,
+ ApplyBioSourceDbxrefDescriptorCallback,
+ 0, 0, 0, &avd);
+ break;
case PARSE_FIELD_GENE_FIELD :
avd.field_list = mp->dst_field_data->feature_field;
ParseToFeatures (pap->sep, &avd, mp->dst_field_data->parse_field_type,
FEATDEF_GENE);
break;
- case PARSE_FIELD_MRNA_FIELD :
+ case PARSE_FIELD_RNA_FIELD :
avd.field_list = mp->dst_field_data->feature_field;
ParseToFeatures (pap->sep, &avd, mp->dst_field_data->parse_field_type,
- FEATDEF_mRNA);
+ mp->dst_field_data->feature_subtype == NULL ? 0 : mp->dst_field_data->feature_subtype->data.intvalue);
break;
case PARSE_FIELD_CDS_COMMENT:
avd.field_list = NULL;
@@ -19936,6 +20867,15 @@ GetDestSample
NULL,
SEQFEAT_BIOSRC, 0, Seq_descr_source);
break;
+ case PARSE_FIELD_DBXREF:
+ gsp = CheckForExistingTextInSeqEntry (sep, dst_field_data->feature_field,
+ GetBioSourceFeatureDbxrefString,
+ GetBioSourceDescriptorDbxrefString,
+ ValNodeSimpleDataFree,
+ ValNodeStringCopy,
+ NULL,
+ SEQFEAT_BIOSRC, 0, Seq_descr_source);
+ break;
case PARSE_FIELD_GENE_FIELD:
gsp = CheckForExistingTextInSeqEntry (sep, dst_field_data->feature_field,
GetGeneFieldString,
@@ -19943,12 +20883,12 @@ GetDestSample
NULL, IntValNodeCopy,
NULL, SEQFEAT_GENE, 0, 0);
break;
- case PARSE_FIELD_MRNA_FIELD:
+ case PARSE_FIELD_RNA_FIELD:
gsp = CheckForExistingTextInSeqEntry (sep, dst_field_data->feature_field,
- GetmRNAFieldString,
+ GetRNAFieldString,
NULL,
NULL, IntValNodeCopy,
- NULL, SEQFEAT_RNA, FEATDEF_mRNA, 0);
+ NULL, SEQFEAT_RNA, dst_field_data->feature_subtype == NULL ? 0 : dst_field_data->feature_subtype->data.intvalue, 0);
break;
case PARSE_FIELD_CDS_COMMENT:
gsp = CheckForExistingTextInSeqEntry (sep, NULL,
@@ -20012,79 +20952,6 @@ GetDestSample
return gsp;
}
-static Boolean ParseFileToDest (ParseFormPtr mp, FilterSetPtr fsp, TextPortionPtr tp, SeqEntryPtr sep)
-{
- ParseActionData pad;
- FILE *fp;
- Char path [PATH_MAX];
- ReadBufferData rbd;
- CharPtr line;
- CharPtr found_loc = NULL;
- Int4 found_len = 0;
- GetSamplePtr gsp;
-
- if (mp == NULL || tp == NULL || sep == NULL)
- {
- return FALSE;
- }
- ResetParseActionVisitData (&pad);
- pad.fsp = fsp;
- pad.tp = tp;
-
- gsp = GetDestSample (sep, mp->dst_field_data);
- mp->etp = GetExistingTextHandlerInfo (gsp == NULL ? 0 : gsp->num_found, FALSE);
- gsp = GetSampleFree (gsp);
- if (mp->etp != NULL && mp->etp->existing_text_choice == eExistingTextChoiceCancel)
- {
- mp->etp = MemFree (mp->etp);
- return FALSE;
- }
-
-
- if (! GetInputFileName (path, sizeof (path), "", "TEXT"))
- {
- mp->etp = MemFree (mp->etp);
- return FALSE;
- }
-
- fp = FileOpen (path, "r");
- if (fp == NULL)
- {
- Message (MSG_ERROR, "Unable to open %s", path);
- mp->etp = MemFree (mp->etp);
- return FALSE;
- }
-
- ResetParseActionVisitData (&pad);
- pad.sep = sep;
- pad.title_sep = sep;
- pad.biop_sep = sep;
-
- rbd.fp = fp;
- rbd.current_data = NULL;
- line = AbstractReadFunction (&rbd);
- while (line != NULL)
- {
- found_loc = NULL;
- found_len = 0;
- FindTextPortionInString (line, tp, &found_loc, &found_len);
-
- if (found_loc != NULL)
- {
- ParseToDest (&pad, mp, found_loc, found_len);
- }
- line = AbstractReadFunction (&rbd);
- }
-
- FileClose (fp);
- mp->etp = MemFree (mp->etp);
-
- ObjMgrSetDirtyFlag (mp->input_entityID, TRUE);
- ObjMgrSendMsg (OM_MSG_UPDATE, mp->input_entityID, 0, 0);
- ArrowCursor ();
- Update ();
- return TRUE;
-}
static GetSamplePtr GetFlatFileParseProteinFieldSamples (Uint2 entityID, SeqEntryPtr sep, GetSamplePtr gsp, ParseFieldPtr dst_field_data)
{
@@ -20167,7 +21034,7 @@ ParseFlatfileForSample
string = asn2gnbk_format (ajp, (Int4) index);
if (string != NULL && *string != '\0') {
CompressSpaces (string);
- FindTextPortionInString (string, pap->tp, &found_loc, &found_len);
+ FindTextPortionXInString (string, pap->tp, &found_loc, &found_len);
if (found_loc != NULL)
{
@@ -20260,7 +21127,7 @@ ParseFlatfileToDest
string = asn2gnbk_format (ajp, (Int4) index);
if (string != NULL && *string != '\0') {
CompressSpaces (string);
- FindTextPortionInString (string, pap->tp, &found_loc, &found_len);
+ FindTextPortionXInString (string, pap->tp, &found_loc, &found_len);
if (found_loc != NULL)
{
@@ -20299,11 +21166,10 @@ static Boolean ParseTextAction (Pointer data)
{
ParseFormPtr mp;
SeqEntryPtr sep;
- Char path [PATH_MAX];
- ParseActionLogData pald;
ParseActionData pad;
Boolean rval = FALSE;
- ParseFieldSrcPtr pfsp;
+ ParseFieldSrcPtr pfsp;
+ SourceQualDescPtr sqdp;
Boolean remove_from_parsed = FALSE;
mp = (ParseFormPtr) data;
@@ -20320,9 +21186,10 @@ static Boolean ParseTextAction (Pointer data)
pfsp = DialogToPointer (mp->source_field);
if (pfsp == NULL
- || pfsp->parse_field < PARSE_FIELD_SRC_DEFLINE
+ || pfsp->parse_field < eParseFieldSrcDefLine
|| pfsp->parse_field > MAX_PARSE_FIELD
- || (pfsp->parse_field == PARSE_FIELD_STRUCTURED_COMMENT && StringHasNoText (pfsp->comment_field)))
+ || (pfsp->parse_field == eParseFieldSrcStructuredComment && StringHasNoText (pfsp->comment_field))
+ || (pfsp->parse_field == eParseFieldSrcSourceQual && pfsp->sqdp == NULL))
{
pfsp = ParseFieldSrcFree (pfsp);
return FALSE;
@@ -20330,6 +21197,8 @@ static Boolean ParseTextAction (Pointer data)
pad.src_field = pfsp->parse_field;
pad.comment_field = pfsp->comment_field;
pfsp->comment_field = NULL;
+ sqdp = pfsp->sqdp;
+ pfsp->sqdp = NULL;
pfsp = ParseFieldSrcFree (pfsp);
pad.tp = DialogToPointer (mp->text_portion);
@@ -20340,7 +21209,7 @@ static Boolean ParseTextAction (Pointer data)
mp->change_case = DialogToPointer (mp->change_case_dlg);
- if (pad.src_field == PARSE_FIELD_SRC_GENBANK_FLATFILE)
+ if (pad.src_field == eParseFieldSrcGenBankFlatFile)
{
WatchCursor ();
ResetParseActionVisitData (&pad);
@@ -20369,12 +21238,13 @@ static Boolean ParseTextAction (Pointer data)
case PARSE_FIELD_DEFLINE:
case PARSE_FIELD_BIOSRC_STRING:
case PARSE_FIELD_GENE_FIELD:
- case PARSE_FIELD_MRNA_FIELD:
+ case PARSE_FIELD_RNA_FIELD:
case PARSE_FIELD_CDS_COMMENT:
case PARSE_FIELD_PROTEIN_FIELD:
case PARSE_FIELD_IMPORT_QUAL:
case PARSE_FIELD_FEATURE_NOTE:
case PARSE_FIELD_COMMENT_DESC:
+ case PARSE_FIELD_DBXREF:
WatchCursor ();
Update ();
@@ -20382,29 +21252,19 @@ static Boolean ParseTextAction (Pointer data)
remove_from_parsed = GetStatus(mp->remove_from_parsed);
}
- rval = FindParseActionPairList (sep, pad.src_field, pad.comment_field, mp->dst_field_data, pad.fsp, pad.tp, remove_from_parsed, mp->change_case);
+ rval = FindParseActionPairList (sep, pad.src_field, sqdp, pad.comment_field, mp->dst_field_data, pad.fsp, pad.tp, remove_from_parsed, mp->change_case);
ObjMgrSetDirtyFlag (mp->input_entityID, TRUE);
ObjMgrSendMsg (OM_MSG_UPDATE, mp->input_entityID, 0, 0);
ArrowCursor ();
Update ();
break;
default:
- pald.data_in_log = FALSE;
- TmpNam (path);
- pald.fp = FileOpen (path, "wb");
- if (pald.fp != NULL)
- {
- VisitSeqEntriesForParseAction (sep, &pad, ParseActionSample, &pald, FALSE);
- FileClose (pald.fp);
- LaunchGeneralTextViewer (path, "Found Text");
- FileRemove (path);
- rval = TRUE;
- }
+ Message (MSG_ERROR, "Unknown destination");
break;
}
}
- pad.tp = TextPortionFree (pad.tp);
+ pad.tp = TextPortionXFree (pad.tp);
pad.comment_field = MemFree (pad.comment_field);
FilterSetFree (pad.fsp);
return rval;
@@ -20428,7 +21288,7 @@ static void ParseFormClear (Pointer data)
static void ParseFormClearText (Pointer data)
{
ParseFormPtr mp;
- TextPortionPtr tp;
+ TextPortionXPtr tp;
mp = (ParseFormPtr) data;
if (mp == NULL)
@@ -20476,8 +21336,9 @@ static void ParseChangeNotify (Pointer userdata)
/* only allow remove_from_parsed if not parsing from flatfile or local ID */
pfsp = DialogToPointer (mp->source_field);
if (pfsp != NULL
- && (pfsp->parse_field == PARSE_FIELD_SRC_GENBANK_FLATFILE
- || pfsp->parse_field == PARSE_FIELD_SRC_LOCAL_ID)) {
+ && (pfsp->parse_field == eParseFieldSrcGenBankFlatFile
+ || pfsp->parse_field == eParseFieldSrcLocalID
+ || pfsp->parse_field == eParseFieldSrcFileID)) {
Disable (mp->remove_from_parsed);
} else {
Enable (mp->remove_from_parsed);
@@ -20512,7 +21373,7 @@ static void ParseText (Uint2 input_entityID, Int4 from_field, Int4 to_field)
g1 = HiddenGroup (h, 2, 0, NULL);
StaticPrompt (g1, "Select text", 0, dialogTextHeight, systemFont, 'l');
- mp->text_portion = TextPortionDialog (g1);
+ mp->text_portion = TextPortionXDialog (g1);
g2 = HiddenGroup (h, 2, 0, NULL);
StaticPrompt (g2, "From", 0, dialogTextHeight, systemFont, 'l');
@@ -20520,7 +21381,7 @@ static void ParseText (Uint2 input_entityID, Int4 from_field, Int4 to_field)
g3 = HiddenGroup (h, 2, 0, NULL);
StaticPrompt (g3, "And place in", 0, dialogTextHeight, systemFont, 'l');
- mp->destination_field = ParseFieldDestDialog (g3, ParseChangeNotify, mp);
+ mp->destination_field = ParseFieldDestDialogEx (g3, ParseChangeNotify, mp, FALSE, TRUE);
mp->change_case_dlg = ChangeCaseDialog (h);
@@ -20540,6 +21401,7 @@ static void ParseText (Uint2 input_entityID, Int4 from_field, Int4 to_field)
{
pfsd.parse_field = from_field;
pfsd.comment_field = NULL;
+ pfsd.sqdp = NULL;
PointerToDialog (mp->source_field, &pfsd);
}
if (to_field > 0)
@@ -20567,17 +21429,17 @@ static void ParseTextItem (IteM i, Int4 from_field, Int4 to_field)
extern void ParseDefLineToSourceQual (IteM i)
{
- ParseTextItem (i, PARSE_FIELD_SRC_DEFLINE, PARSE_FIELD_SOURCE_QUAL);
+ ParseTextItem (i, eParseFieldSrcDefLine, PARSE_FIELD_SOURCE_QUAL);
}
extern void ParseTaxnameToSourceQual (IteM i)
{
- ParseTextItem (i, PARSE_FIELD_SRC_TAXNAME_AFTER_NOMIAL, PARSE_FIELD_SOURCE_QUAL);
+ ParseTextItem (i, eParseFieldSrcTaxNameAfterNomial, PARSE_FIELD_SOURCE_QUAL);
}
extern void ParseFlatfileToSourceQual (IteM i)
{
- ParseTextItem (i, PARSE_FIELD_SRC_GENBANK_FLATFILE, PARSE_FIELD_SOURCE_QUAL);
+ ParseTextItem (i, eParseFieldSrcGenBankFlatFile, PARSE_FIELD_SOURCE_QUAL);
}
static void ParseTextToolBtn (ButtoN b, Int4 from_field, Int4 to_field)
@@ -20592,7 +21454,7 @@ static void ParseTextToolBtn (ButtoN b, Int4 from_field, Int4 to_field)
extern void ParseLocalIDToSourceQual (ButtoN b)
{
- ParseTextToolBtn (b, PARSE_FIELD_SRC_LOCAL_ID, PARSE_FIELD_SOURCE_QUAL);
+ ParseTextToolBtn (b, eParseFieldSrcLocalID, PARSE_FIELD_SOURCE_QUAL);
}
@@ -21010,24 +21872,23 @@ static GrouP FeatureEditorCitationGroup (GrouP h, FeatEdPtr mp)
static GrouP FeatureEditorPartialGroup (GrouP h, FeatEdPtr mp)
{
- GrouP g, k1, k2;
+ GrouP g, g1, g2,k1, k2;
+ PrompT p1, p2;
if (mp == NULL)
{
return NULL;
}
- g = HiddenGroup (h, -1, 0, NULL);
+ g = HiddenGroup (h, 2, 0, NULL);
SetGroupSpacing (g, 10, 10);
+ StaticPrompt (g, "", 0, dialogTextHeight, systemFont, 'l');
+ StaticPrompt (g, "", 0, dialogTextHeight, systemFont, 'l');
- mp->convert_choice = PopupList (g, TRUE, NULL);
- PopupItem (mp->convert_choice, "Do not convert location");
- PopupItem (mp->convert_choice, "Convert location to join");
- PopupItem (mp->convert_choice, "Convert location to order");
- PopupItem (mp->convert_choice, "Convert location to single interval");
- SetValue (mp->convert_choice, 1);
-
- k1 = HiddenGroup (g, 2, 0, NULL);
+ p1 = StaticPrompt (g, "Partials:", 0, dialogTextHeight, systemFont, 'l');
+ g1 = NormalGroup (g, 1, 0, "", programFont, NULL);
+ k1 = HiddenGroup (g1, 2, 0, NULL);
+
SetGroupSpacing (k1, 10, 10);
StaticPrompt (k1, "5' partial:", 0, dialogTextHeight, systemFont, 'l');
mp->partial5_choice = PopupList (k1, TRUE, NULL);
@@ -21041,9 +21902,11 @@ static GrouP FeatureEditorPartialGroup (GrouP h, FeatEdPtr mp)
PopupItem (mp->partial5_choice, "Do not change");
SetValue (mp->partial5_choice, 8);
- mp->extend5_btn = CheckBox (g, "Extend to 5' end of sequence if setting 5' partial", NULL);
-
- k2 = HiddenGroup (g, 2, 0, NULL);
+ mp->extend5_btn = CheckBox (g1, "Extend to 5' end of sequence if setting 5' partial", NULL);
+
+ StaticPrompt (g1, "", 0, dialogTextHeight, systemFont, 'l');
+
+ k2 = HiddenGroup (g1, 2, 0, NULL);
SetGroupSpacing (k2, 10, 10);
StaticPrompt (k2, "3' partial:", 0, dialogTextHeight, systemFont, 'l');
mp->partial3_choice = PopupList (k2, TRUE, NULL);
@@ -21056,14 +21919,16 @@ static GrouP FeatureEditorPartialGroup (GrouP h, FeatEdPtr mp)
PopupItem (mp->partial3_choice, "Do not change");
SetValue (mp->partial3_choice, 7);
- mp->extend3_btn = CheckBox (g, "Extend to 3' end of sequence if setting 3' partial", NULL);
-
- AlignObjects (ALIGN_CENTER, (HANDLE) mp->convert_choice,
- (HANDLE) k1,
- (HANDLE) mp->extend5_btn,
- (HANDLE) k2,
- (HANDLE) mp->extend3_btn,
- NULL);
+ mp->extend3_btn = CheckBox (g1, "Extend to 3' end of sequence if setting 3' partial", NULL);
+
+ p2 = StaticPrompt (g, "Join/Order/Merge:", 0, dialogTextHeight, systemFont, 'l');
+ g2 = NormalGroup (g, 1, 0, "", programFont, NULL);
+ mp->convert_choice = PopupList (g2, TRUE, NULL);
+ PopupItem (mp->convert_choice, "Do not convert location");
+ PopupItem (mp->convert_choice, "Convert location to join");
+ PopupItem (mp->convert_choice, "Convert location to order");
+ PopupItem (mp->convert_choice, "Convert location to single interval");
+ SetValue (mp->convert_choice, 1);
return g;
}
@@ -21196,7 +22061,7 @@ static GrouP FeatureEditorActionGroup (GrouP h, FeatEdPtr mp, Int4 first_action)
SetObjectExtra (mp->action_choice_grp, mp, NULL);
RadioButton (mp->action_choice_grp, "Evidence");
RadioButton (mp->action_choice_grp, "Exceptions");
- RadioButton (mp->action_choice_grp, "Partials");
+ RadioButton (mp->action_choice_grp, "Location");
RadioButton (mp->action_choice_grp, "Strands");
RadioButton (mp->action_choice_grp, "Citations");
RadioButton (mp->action_choice_grp, "Experiment");
@@ -22418,10 +23283,264 @@ static ValNodePtr AlreadyInCDSList (ValNodePtr cds_list, SeqFeatPtr sfp)
return NULL;
}
+typedef struct buildcdset2
+{
+ ValNodePtr cds_list;
+ ValNodePtr mrna_list;
+ ValNodePtr gene_list;
+} BuildCDSet2Data, PNTR BuildCDSet2Ptr;
+
+static void BuildCDSet2Callback (SeqFeatPtr sfp, Pointer userdata)
+{
+ BuildCDSet2Ptr b;
+
+ if (sfp == NULL || sfp->idx.deleteme || userdata == NULL) return;
+ b = (BuildCDSet2Ptr) userdata;
+ if (sfp->data.choice == SEQFEAT_CDREGION)
+ {
+ ValNodeAddPointer (&(b->cds_list), OBJ_SEQFEAT, sfp);
+ }
+ else if (sfp->data.choice == SEQFEAT_GENE)
+ {
+ ValNodeAddPointer (&(b->gene_list), OBJ_SEQFEAT, sfp);
+ }
+ else if (sfp->idx.subtype == FEATDEF_mRNA)
+ {
+ ValNodeAddPointer (&(b->mrna_list), OBJ_SEQFEAT, sfp);
+ }
+ else if (SeqMgrGetGeneXref (sfp) != NULL)
+ {
+ ValNodeAddPointer (&(b->gene_list), OBJ_SEQFEAT, sfp);
+ }
+}
+
+
+static void UnmarkFeatureList (ValNodePtr list)
+{
+ SeqFeatPtr sfp;
+
+ while (list != NULL)
+ {
+ sfp = list->data.ptrvalue;
+ if (sfp != NULL)
+ {
+ sfp->idx.deleteme = FALSE;
+ }
+ list = list->next;
+ }
+}
+
+
+static SeqFeatPtr GetGeneForCDSetFeature (SeqFeatPtr sfp)
+{
+ GeneRefPtr grp;
+ SeqFeatPtr gene = NULL;
+ SeqMgrFeatContext fcontext;
+
+ grp = SeqMgrGetGeneXref (sfp);
+ if (grp == NULL)
+ {
+ gene = SeqMgrGetOverlappingGene (sfp->location, &fcontext);
+ }
+ else if (!SeqMgrGeneIsSuppressed (grp))
+ {
+ if (!StringHasNoText (grp->locus_tag))
+ {
+ gene = SeqMgrGetGeneByLocusTag (BioseqFindFromSeqLoc (sfp->location), grp->locus_tag, &fcontext);
+ }
+ }
+ return gene;
+}
+
+
+static CDSetPtr BuildCDSetFromCodingRegion (SeqFeatPtr cds, BoolPtr indexing_needed)
+{
+ SeqMgrFeatContext fcontext;
+ SeqFeatPtr gene = NULL, mrna, prot;
+ BioseqPtr protbsp;
+ CDSetPtr cdsp;
+ ProtRefPtr prp;
+
+ if (cds == NULL || cds->data.choice != SEQFEAT_CDREGION) return NULL;
+
+ cdsp = (CDSetPtr) MemNew (sizeof (CDSetData));
+ ValNodeAddPointer (&(cdsp->cds_list), 0, cds);
+
+ gene = GetGeneForCDSetFeature (cds);
+ if (gene != NULL)
+ {
+ ValNodeAddPointer (&(cdsp->gene_list), 0, gene);
+ /* mark gene, so that we'll know it isn't lonely */
+ gene->idx.deleteme = TRUE;
+ }
+
+ mrna = SeqMgrGetOverlappingmRNA (cds->location, &fcontext);
+ if (mrna != NULL)
+ {
+ ValNodeAddPointer (&(cdsp->mrna_list), 0, mrna);
+ /* mark mrna, so that we'll know it's already in a set */
+ mrna->idx.deleteme = TRUE;
+ }
+
+ if (cds->product != NULL)
+ {
+ protbsp = BioseqFindFromSeqLoc (cds->product);
+ if (protbsp != NULL)
+ {
+ prot = SeqMgrGetNextFeature (protbsp, NULL, SEQFEAT_PROT, FEATDEF_PROT, &fcontext);
+ /* if there is no full-length protein feature, make one */
+ if (prot == NULL)
+ {
+ prp = ProtRefNew ();
+ prot = CreateNewFeatureOnBioseq (protbsp, SEQFEAT_PROT, NULL);
+ if (prot != NULL)
+ {
+ prot->data.value.ptrvalue = prp;
+ if (indexing_needed != NULL)
+ {
+ *indexing_needed = TRUE;
+ }
+ }
+ }
+ if (prot != NULL)
+ {
+ ValNodeAddPointer (&(cdsp->prot_list), 0, prot);
+ }
+
+ /* also add in mat_peptides from protein feature */
+ prot = SeqMgrGetNextFeature (protbsp, NULL, SEQFEAT_PROT, FEATDEF_mat_peptide_aa, &fcontext);
+ while (prot != NULL)
+ {
+ ValNodeAddPointer (&(cdsp->prot_list), 0, prot);
+ prot = SeqMgrGetNextFeature (protbsp, prot, SEQFEAT_PROT, FEATDEF_mat_peptide_aa, &fcontext);
+ }
+ }
+ }
+ return cdsp;
+}
+
+
+static CDSetPtr BuildCDSetFrommRNA (SeqFeatPtr mrna)
+{
+ SeqFeatPtr gene;
+ CDSetPtr cdsp;
+
+ if (mrna == NULL || mrna->idx.deleteme || mrna->idx.subtype != FEATDEF_mRNA) return NULL;
+
+ cdsp = (CDSetPtr) MemNew (sizeof (CDSetData));
+ ValNodeAddPointer (&(cdsp->mrna_list), 0, mrna);
+
+ gene = GetGeneForCDSetFeature (mrna);
+ if (gene != NULL)
+ {
+ ValNodeAddPointer (&(cdsp->gene_list), 0, gene);
+ /* mark gene, so that we'll know it isn't lonely */
+ gene->idx.deleteme = TRUE;
+ }
+
+ return cdsp;
+}
+
+
+static Boolean DoesCDSetMatchConstraint (CDSetPtr cdsp, ChoiceConstraintPtr ccp);
+
+static ValNodePtr BuildCDSet2List (Uint2 entityID, ChoiceConstraintPtr ccp)
+{
+ SeqEntryPtr sep;
+ BuildCDSet2Data b;
+ CDSetPtr cdsp;
+ ValNodePtr vnp, vnp_next, vnp_prev;
+ ValNodePtr cdset_list = NULL;
+ SeqFeatPtr cds, gene, mrna;
+ Boolean need_indexing = FALSE;
+
+ sep = GetTopSeqEntryForEntityID (entityID);
+
+ b.cds_list = NULL;
+ b.gene_list = NULL;
+ b.mrna_list = NULL;
+
+ VisitFeaturesInSep (sep, &b, BuildCDSet2Callback);
+
+ /* build cdsets that have coding regions */
+ for (vnp = b.cds_list; vnp != NULL; vnp = vnp->next)
+ {
+ cds = (SeqFeatPtr) vnp->data.ptrvalue;
+ if (cds == NULL) continue;
+ cdsp = BuildCDSetFromCodingRegion (cds, &need_indexing);
+ if (cdsp != NULL)
+ {
+ ValNodeAddPointer (&cdset_list, 0, cdsp);
+ }
+ }
+ if (need_indexing)
+ {
+ /* indexing because we have created full-length protein features */
+ SeqMgrIndexFeatures (entityID, NULL);
+ }
+
+ /* build cdsets for mrna features that don't have coding regions */
+ for (vnp = b.mrna_list; vnp != NULL; vnp = vnp->next)
+ {
+ mrna = (SeqFeatPtr) vnp->data.ptrvalue;
+ if (mrna == NULL || mrna->idx.deleteme) continue;
+ cdsp = BuildCDSetFrommRNA (mrna);
+ if (cdsp != NULL)
+ {
+ ValNodeAddPointer (&cdset_list, 0, cdsp);
+ }
+ }
+
+ /* build cdsets for lonely genes / features with gene xrefs that are not coding regions or mrnas */
+ for (vnp = b.gene_list; vnp != NULL; vnp = vnp->next)
+ {
+ gene = (SeqFeatPtr) vnp->data.ptrvalue;
+ if (gene == NULL || gene->idx.deleteme) continue;
+ cdsp = (CDSetPtr) MemNew (sizeof (CDSetData));
+ ValNodeAddPointer (&(cdsp->gene_list), 0, gene);
+ ValNodeAddPointer (&cdset_list, 0, cdsp);
+ }
+
+ /* now unmark features */
+ UnmarkFeatureList (b.cds_list);
+ UnmarkFeatureList (b.mrna_list);
+ UnmarkFeatureList (b.gene_list);
+
+ b.cds_list = ValNodeFree (b.cds_list);
+ b.mrna_list = ValNodeFree (b.mrna_list);
+ b.gene_list = ValNodeFree (b.gene_list);
+
+ /* now remove sets that don't match our choice constraint */
+ vnp_prev = NULL;
+ for (vnp = cdset_list; vnp != NULL; vnp = vnp_next)
+ {
+ vnp_next = vnp->next;
+ if (!DoesCDSetMatchConstraint (vnp->data.ptrvalue, ccp))
+ {
+ if (vnp_prev == NULL)
+ {
+ cdset_list = vnp->next;
+ }
+ else
+ {
+ vnp_prev->next = vnp->next;
+ }
+ vnp->next = NULL;
+ FreeCDSetList (vnp);
+ }
+ else
+ {
+ vnp_prev = vnp;
+ }
+ }
+
+ return cdset_list;
+}
+
typedef struct buildcdset
{
ValNodePtr cdset_list;
- ValNodePtr lonely_gene_list;
+ ValNodePtr lonely_gene_list;
} BuildCDSetData, PNTR BuildCDSetPtr;
static void BuildCDSSetCallback (SeqFeatPtr sfp, Pointer userdata)
@@ -22484,11 +23603,11 @@ static void BuildCDSSetCallback (SeqFeatPtr sfp, Pointer userdata)
{
cds = sfp;
mrna = SeqMgrGetOverlappingmRNA (sfp->location, &fcontext);
- if (mrna != NULL)
- {
+ if (mrna != NULL)
+ {
mrna_gene = SeqMgrGetOverlappingGene (mrna->location, &fcontext);
- if (mrna_gene == gene)
- {
+ if (mrna_gene == gene)
+ {
vnp = AlreadyInCDSList (bp->cdset_list, mrna);
if (vnp != NULL && vnp->data.ptrvalue != NULL)
{
@@ -22497,8 +23616,8 @@ static void BuildCDSSetCallback (SeqFeatPtr sfp, Pointer userdata)
if (AlreadyInList (cdsp->gene_list, gene))
{
gene = NULL;
- }
- }
+ }
+ }
}
}
}
@@ -22543,7 +23662,9 @@ static void BuildCDSSetCallback (SeqFeatPtr sfp, Pointer userdata)
if (prot != NULL)
{
prot->data.value.ptrvalue = prp;
- SeqMgrIndexFeatures (protbsp->idx.entityID, NULL);
+ if (SeqMgrFeaturesAreIndexed (protbsp->idx.entityID) == 0) {
+ SeqMgrIndexFeatures (protbsp->idx.entityID, NULL);
+ }
}
}
if (prot != NULL && ! AlreadyInList (cdsp->prot_list, prot))
@@ -22850,7 +23971,7 @@ static Boolean DoesCDSetMatchConstraint (CDSetPtr cdsp, ChoiceConstraintPtr ccp)
{
field_vn.data.intvalue = field_choice;
str = GetCDSetField (cdsp, &field_vn);
- does_match = DoesStringMatchConstraint (str, ccp->string_constraint);
+ does_match = DoesStringMatchConstraintX (str, ccp->string_constraint);
MemFree (str);
}
if (ccp->string_constraint != NULL && ccp->string_constraint->not_present)
@@ -22864,7 +23985,7 @@ static Boolean DoesCDSetMatchConstraint (CDSetPtr cdsp, ChoiceConstraintPtr ccp)
for (sfp_vnp = cdsp->prot_list; sfp_vnp != NULL && !does_match; sfp_vnp = sfp_vnp->next)
{
str = GetCDSGeneProtField (sfp_vnp->data.ptrvalue, ccp->qual_choice, NULL);
- does_match = DoesStringMatchConstraint (str, ccp->string_constraint);
+ does_match = DoesStringMatchConstraintX (str, ccp->string_constraint);
if (ccp->string_constraint != NULL && ccp->string_constraint->not_present)
{
does_match = ! does_match;
@@ -22875,7 +23996,7 @@ static Boolean DoesCDSetMatchConstraint (CDSetPtr cdsp, ChoiceConstraintPtr ccp)
else
{
str = GetCDSetField (cdsp, ccp->qual_choice);
- does_match = DoesStringMatchConstraint (str, ccp->string_constraint);
+ does_match = DoesStringMatchConstraintX (str, ccp->string_constraint);
MemFree (str);
if (ccp->string_constraint != NULL && ccp->string_constraint->not_present)
{
@@ -22915,7 +24036,7 @@ static ValNodePtr BuildCDSetList (Uint2 entityID, ChoiceConstraintPtr ccp)
bd.lonely_gene_list = NULL;
VisitFeaturesInSep (sep, &bd, BuildCDSSetCallback);
-
+
for (vnp = bd.lonely_gene_list; vnp != NULL; vnp = vnp->next)
{
/* only create sets for lonely genes if they have not been added to other sets */
@@ -23701,6 +24822,10 @@ ApplyEditConvertRemoveCombo
SetObjectExtra (w, mp, NULL);
mp->form = (ForM) w;
mp->input_entityID = bfp->input_entityID;
+
+#ifndef WIN_MAC
+ CreateStandardEditMenu (w);
+#endif
n = HiddenGroup (w, -1, 0, NULL);
SetGroupSpacing (n, 10, 10);
@@ -23835,264 +24960,6 @@ static Boolean CheckFeaturesForPresample (Uint2 entityID)
}
-#if 0
-typedef struct EditApplydlg
-{
- DIALOG_MESSAGE_BLOCK
- TexT find_txt;
- TexT repl_txt;
- TexT apply_txt;
- Int4 action_choice;
- GrouP location_choice;
- Nlm_ChangeNotifyProc change_notify;
- Pointer change_userdata;
-} EditApplyDlgData, PNTR EditApplyDlgPtr;
-
-static void ResetEditApplyDlg (EditApplyDlgPtr dlg)
-{
- if (dlg != NULL)
- {
- if (dlg->find_txt != NULL)
- {
- SetTitle (dlg->find_txt, "");
- }
- if (dlg->repl_txt != NULL)
- {
- SetTitle (dlg->repl_txt, "");
- }
- if (dlg->apply_txt != NULL)
- {
- SetTitle (dlg->apply_txt, "");
- }
- if (dlg->location_choice != NULL) {
- SetValue (dlg->location_choice, EditApplyFindLocation_anywhere);
- }
- }
-}
-
-static void EditApplyDialogChangeText (TexT t)
-{
- EditApplyDlgPtr dlg;
-
- dlg = (EditApplyDlgPtr) GetObjectExtra (t);
- if (dlg != NULL && dlg->change_notify != NULL)
- {
- (dlg->change_notify)(dlg->change_userdata);
- }
-}
-
-static void EditApplyToDialog (DialoG d, Pointer userdata)
-{
- EditApplyDlgPtr dlg;
- EditApplyPtr data;
-
- dlg = (EditApplyDlgPtr) GetObjectExtra (d);
- if (dlg == NULL)
- {
- return;
- }
-
- ResetEditApplyDlg (dlg);
- data = (EditApplyPtr) userdata;
- if (data != NULL)
- {
- if (dlg->find_txt != NULL && !StringHasNoText (data->find_txt))
- {
- SetTitle (dlg->find_txt, data->find_txt);
- }
- if (dlg->repl_txt != NULL && !StringHasNoText (data->repl_txt))
- {
- SetTitle (dlg->repl_txt, data->repl_txt);
- }
- if (dlg->apply_txt != NULL && !StringHasNoText (data->apply_txt))
- {
- SetTitle (dlg->apply_txt, data->apply_txt);
- }
- if (dlg->location_choice != NULL) {
- SetValue (dlg->location_choice, data->find_location);
- }
- }
-}
-
-static Pointer DialogToEditApply (DialoG d)
-{
- EditApplyDlgPtr dlg;
- EditApplyPtr data;
-
- dlg = (EditApplyDlgPtr) GetObjectExtra (d);
- if (dlg == NULL)
- {
- return NULL;
- }
-
- data = (EditApplyPtr) MemNew (sizeof (EditApplyData));
- if (data != NULL)
- {
- if (dlg->find_txt != NULL)
- {
- data->find_txt = JustSaveStringFromText (dlg->find_txt);
- }
- if (dlg->repl_txt != NULL)
- {
- data->repl_txt = JustSaveStringFromText (dlg->repl_txt);
- }
- if (dlg->apply_txt != NULL)
- {
- data->apply_txt = JustSaveStringFromText (dlg->apply_txt);
- }
- if (dlg->location_choice != NULL) {
- data->find_location = GetValue (dlg->location_choice);
- } else {
- data->find_location = EditApplyFindLocation_anywhere;
- }
- }
- return data;
-}
-
-static void EditApplyMessage (DialoG d, Int2 mssg)
-
-{
- EditApplyDlgPtr dlg;
-
- dlg = (EditApplyDlgPtr) GetObjectExtra (d);
- if (dlg != NULL) {
- switch (mssg)
- {
- case VIB_MSG_INIT :
- /* reset list */
- ResetEditApplyDlg (dlg);
- break;
- case VIB_MSG_ENTER :
- if (dlg->find_txt != NULL)
- {
- Select (dlg->find_txt);
- }
- else if (dlg->apply_txt != NULL)
- {
- Select (dlg->apply_txt);
- }
- break;
- case AECR_VIB_MSG_SET_DEFAULT :
- ResetEditApplyDlg (dlg);
- break;
- case AECR_VIB_MSG_CLEAR_TEXT :
- ResetEditApplyDlg (dlg);
- break;
- default :
- break;
- }
- }
-}
-
-static ValNodePtr TestEditApply (DialoG d)
-{
- EditApplyDlgPtr dlg;
- ValNodePtr total_err_list = NULL;
-
- dlg = (EditApplyDlgPtr) GetObjectExtra (d);
- if (dlg == NULL)
- {
- return FALSE;
- }
-
- if (dlg->action_choice == AECR_APPLY)
- {
- if (TextHasNoText (dlg->apply_txt))
- {
- ValNodeAddPointer (&total_err_list, 0, "apply text");
- }
- }
- else if (dlg->action_choice == AECR_EDIT)
- {
- if (TextHasNoText (dlg->find_txt))
- {
- ValNodeAddPointer (&total_err_list, 0, "find text");
- }
- }
- return total_err_list;
-}
-
-static void EditApplyDialogCopy (ButtoN b)
-{
- EditApplyDlgPtr dlg;
- CharPtr str = NULL;
-
- dlg = (EditApplyDlgPtr) GetObjectExtra (b);
- if (dlg == NULL)
- {
- return;
- }
- str = JustSaveStringFromText (dlg->find_txt);
- SetTitle (dlg->repl_txt, str);
- str = MemFree (str);
-}
-
-static DialoG EditApplyDialog
-(GrouP h,
- Int4 action_choice,
- CharPtr apply_label,
- Nlm_ChangeNotifyProc change_notify,
- Pointer change_userdata)
-{
- EditApplyDlgPtr dlg;
- GrouP p, p1;
- ButtoN b;
-
- dlg = (EditApplyDlgPtr) MemNew (sizeof (EditApplyDlgData));
- if (dlg == NULL)
- {
- return NULL;
- }
-
- p = HiddenGroup (h, -1, 0, NULL);
- SetObjectExtra (p, dlg, StdCleanupExtraProc);
- SetGroupSpacing (p, 10, 10);
-
- dlg->dialog = (DialoG) p;
- dlg->todialog = EditApplyToDialog;
- dlg->fromdialog = DialogToEditApply;
- dlg->dialogmessage = EditApplyMessage;
- dlg->testdialog = TestEditApply;
- dlg->action_choice = action_choice;
- dlg->change_notify = change_notify;
- dlg->change_userdata = change_userdata;
-
- p1 = HiddenGroup (p, 3, 0, NULL);
- SetGroupSpacing (p1, 10, 10);
-
- if (action_choice == AECR_APPLY)
- {
- StaticPrompt (p1, apply_label, 0, dialogTextHeight, systemFont, 'r');
- dlg->apply_txt = DialogText (p1, "", 20, EditApplyDialogChangeText);
- SetObjectExtra (dlg->apply_txt, dlg, NULL);
- dlg->location_choice = NULL;
- }
- else if (action_choice == AECR_EDIT)
- {
- StaticPrompt (p1, "Find", 0, dialogTextHeight, systemFont, 'r');
- dlg->find_txt = DialogText (p1, "", 18, EditApplyDialogChangeText);
- SetObjectExtra (dlg->find_txt, dlg, NULL);
- b = PushButton (p1, "Copy", EditApplyDialogCopy);
- SetObjectExtra (b, dlg, NULL);
- Hide (b);
- StaticPrompt (p1, "Replace", 0, dialogTextHeight, systemFont, 'r');
- dlg->repl_txt = DialogText (p1, "", 18, EditApplyDialogChangeText);
- SetObjectExtra (dlg->repl_txt, dlg, NULL);
- b = PushButton (p1, "Copy", EditApplyDialogCopy);
- SetObjectExtra (b, dlg, NULL);
-
- dlg->location_choice = HiddenGroup (p, 3, 0, NULL);
- RadioButton (dlg->location_choice, "Anywhere in field");
- RadioButton (dlg->location_choice, "At the beginning of the field");
- RadioButton (dlg->location_choice, "At the end of the field");
- SetValue (dlg->location_choice, EditApplyFindLocation_anywhere);
- }
- AlignObjects (ALIGN_CENTER, (HANDLE) p1, (HANDLE) dlg->location_choice, NULL);
-
- return (DialoG) p;
-}
-#endif
-
typedef struct conversionconflict
{
ConvertFieldPtr cfp;
@@ -24289,7 +25156,7 @@ AddEditApplyDataToApplyValue
Boolean leave_on_original; \
Boolean strip_name_from_text; \
EditApplyPtr edit_apply; \
- TextPortionPtr text_portion; \
+ TextPortionXPtr text_portion; \
Boolean remove_parsed; \
FreeValNodeProc free_field_vn_proc; \
FreeValNodeProc free_subtype_vn_proc;
@@ -24307,7 +25174,7 @@ static void AECRDataBlockFreeContents (SimpleAECRPtr sp)
sp->field_list_to = ValNodeFuncFree (sp->field_list_to, sp->free_field_vn_proc);
sp->subtype_list = ValNodeFuncFree (sp->subtype_list, sp->free_subtype_vn_proc);
sp->edit_apply = EditApplyFree (sp->edit_apply);
- sp->text_portion = TextPortionFree(sp->text_portion);
+ sp->text_portion = TextPortionXFree(sp->text_portion);
}
}
@@ -24577,6 +25444,19 @@ static ValNodePtr TestSimpleAECR (DialoG d)
return total_err_list;
}
+static void SimpleAECRButtonChange (ButtoN b)
+{
+ SimpleAECRDlgPtr dlg;
+
+ dlg = (SimpleAECRDlgPtr) GetObjectExtra (b);
+ if (dlg == NULL) return;
+
+ if (dlg->change_notify != NULL)
+ {
+ (dlg->change_notify) (dlg->change_userdata);
+ }
+}
+
static DialoG SimpleAECRDialogEx
(GrouP h,
Int4 action_choice,
@@ -24651,11 +25531,13 @@ static DialoG SimpleAECRDialogEx
change_userdata);
if (action_choice == AECR_CONVERT && is_text)
{
- dlg->leave_on_original = CheckBox (p, "Leave on original", NULL);
+ dlg->leave_on_original = CheckBox (p, "Leave on original", SimpleAECRButtonChange);
+ SetObjectExtra (dlg->leave_on_original, dlg, NULL);
}
if (strip_name)
{
- dlg->strip_name_from_text = CheckBox (p, "Strip name from text", NULL);
+ dlg->strip_name_from_text = CheckBox (p, "Strip name from text", SimpleAECRButtonChange);
+ SetObjectExtra (dlg->strip_name_from_text, dlg, NULL);
}
}
else
@@ -24708,9 +25590,10 @@ static DialoG SimpleAECRDialogEx
{
dlg->edit_apply = NULL;
if (is_text) {
- dlg->text_portion = TextPortionDialog(p);
+ dlg->text_portion = TextPortionXDialog(p);
}
- dlg->remove_parsed = CheckBox (p, "Remove from parsed field", NULL);
+ dlg->remove_parsed = CheckBox (p, "Remove from parsed field", SimpleAECRButtonChange);
+ SetObjectExtra (dlg->remove_parsed, dlg, NULL);
}
else
{
@@ -24989,7 +25872,7 @@ static DialoG CDSGeneProtAECRDialog
else if (action_choice == AECR_PARSE)
{
dlg->edit_apply = NULL;
- dlg->text_portion = TextPortionDialog(p);
+ dlg->text_portion = TextPortionXDialog(p);
dlg->remove_parsed = CheckBox (p, "Remove from parsed field", NULL);
}
else
@@ -25608,6 +26491,10 @@ static ValNodePtr CollectCDSetList (Uint2 entityID, FilterSetPtr fsp)
ValNodePtr cdset_list;
/* need to create a list of sets */
+#if 1
+ cdset_list = BuildCDSet2List (entityID, fsp == NULL || fsp->cgp == NULL ? NULL : fsp->cgp);
+
+#else
if (fsp == NULL || fsp->cgp == NULL)
{
/* if we are applying to mat_peptides AND the constraint involved mat_peptides,
@@ -25619,6 +26506,7 @@ static ValNodePtr CollectCDSetList (Uint2 entityID, FilterSetPtr fsp)
{
cdset_list = BuildCDSetList (entityID, fsp->cgp);
}
+#endif
return cdset_list;
}
@@ -25863,6 +26751,7 @@ typedef struct sourcequalaecrdata
SimpleAECRPtr origin;
SimpleAECRPtr strings;
+ TaxnameOptionsPtr taxname_options;
} SourceQualAECRData, PNTR SourceQualAECRPtr;
static SourceQualAECRPtr SourceQualAECRFree (SourceQualAECRPtr sp)
@@ -25870,6 +26759,7 @@ static SourceQualAECRPtr SourceQualAECRFree (SourceQualAECRPtr sp)
if (sp != NULL)
{
sp->source_qual = SimpleAECRFree (sp->source_qual);
+ sp->taxname_options = MemFree (sp->taxname_options);
sp = MemFree (sp);
}
return sp;
@@ -25884,6 +26774,8 @@ typedef struct sourcequalaecrdlg
DialoG location;
DialoG origin;
DialoG strings;
+
+ DialoG taxname_options;
Int4 action_choice;
Nlm_ChangeNotifyProc change_notify;
@@ -25891,10 +26783,55 @@ typedef struct sourcequalaecrdlg
} SourceQualAECRDlgData, PNTR SourceQualAECRDlgPtr;
+
+static Boolean AreTaxNameOptionsRelevant (Int4 action_choice, SimpleAECRPtr sp)
+{
+ Boolean relevant = FALSE;
+ if (sp == NULL) return FALSE;
+
+ switch (action_choice)
+ {
+ case AECR_APPLY:
+ case AECR_EDIT:
+ case AECR_REMOVE:
+ if (sp->field_list != NULL && sp->field_list->choice == 1)
+ {
+ relevant = TRUE;
+ }
+ break;
+ case AECR_SWAP:
+ if ((sp->field_list != NULL && sp->field_list->choice == 1)
+ || (sp->field_list_to != NULL && sp->field_list_to->choice == 1))
+ {
+ relevant = TRUE;
+ }
+ break;
+ case AECR_CONVERT:
+ if ((sp->field_list != NULL && sp->field_list->choice == 1 && !sp->leave_on_original)
+ || (sp->field_list_to != NULL && sp->field_list_to->choice == 1))
+ {
+ relevant = TRUE;
+ }
+ break;
+ case AECR_PARSE:
+ if ((sp->field_list != NULL && sp->field_list->choice == 1 && sp->remove_parsed)
+ || (sp->field_list_to != NULL && sp->field_list_to->choice == 1))
+ {
+ relevant = TRUE;
+ }
+ break;
+ default:
+ relevant = FALSE;
+ break;
+ }
+ return relevant;
+}
+
static void ChangeQualKind (GrouP g)
{
SourceQualAECRDlgPtr dlg;
Int4 qual_kind;
+ SimpleAECRPtr sp;
dlg = (SourceQualAECRDlgPtr) GetObjectExtra (g);
if (dlg == NULL)
@@ -25906,6 +26843,7 @@ static void ChangeQualKind (GrouP g)
Hide (dlg->location);
Hide (dlg->origin);
Hide (dlg->strings);
+ Hide (dlg->taxname_options);
qual_kind = GetValue (dlg->qual_kind);
switch (qual_kind)
{
@@ -25920,6 +26858,17 @@ static void ChangeQualKind (GrouP g)
break;
case QUALKIND_STRINGS :
Show (dlg->strings);
+ Show (dlg->taxname_options);
+ sp = DialogToPointer (dlg->strings);
+ if (AreTaxNameOptionsRelevant (dlg->action_choice, sp))
+ {
+ Enable (dlg->taxname_options);
+ }
+ else
+ {
+ Disable (dlg->taxname_options);
+ }
+ sp = SimpleAECRFree (sp);
break;
}
if (dlg->change_notify != NULL)
@@ -25940,6 +26889,7 @@ static void ResetSourceQualAECRDlg (SourceQualAECRDlgPtr dlg)
PointerToDialog (dlg->origin, NULL);
PointerToDialog (dlg->strings, NULL);
ChangeQualKind (dlg->qual_kind);
+ PointerToDialog (dlg->taxname_options, NULL);
}
static void ClearTextSourceQualAECRDlg (SourceQualAECRDlgPtr dlg)
@@ -25985,6 +26935,7 @@ static void SourceQualAECRToDialog (DialoG d, Pointer userdata)
&& (dlg->action_choice == AECR_EDIT || dlg->action_choice == AECR_SWAP))
{
SetValue (dlg->qual_kind, QUALKIND_STRINGS);
+ PointerToDialog (dlg->taxname_options, data->taxname_options);
}
else if (data->qual_kind > QUALKIND_ORIGIN)
{
@@ -26011,6 +26962,7 @@ static Pointer DialogToSourceQualAECR (DialoG d)
data = (SourceQualAECRPtr) MemNew (sizeof (SourceQualAECRData));
if (data != NULL)
{
+ data->taxname_options = NULL;
data->qual_kind = GetValue (dlg->qual_kind);
switch (data->qual_kind)
{
@@ -26025,6 +26977,10 @@ static Pointer DialogToSourceQualAECR (DialoG d)
break;
case QUALKIND_STRINGS :
data->strings = DialogToPointer (dlg->strings);
+ if (AreTaxNameOptionsRelevant (dlg->action_choice, data->strings))
+ {
+ data->taxname_options = DialogToPointer (dlg->taxname_options);
+ }
break;
}
@@ -26054,6 +27010,7 @@ static void SourceQualAECRMessage (DialoG d, Int2 mssg)
SendMessageToDialog (dlg->location, AECR_VIB_MSG_SET_DEFAULT);
SendMessageToDialog (dlg->origin, AECR_VIB_MSG_SET_DEFAULT);
SendMessageToDialog (dlg->strings, AECR_VIB_MSG_SET_DEFAULT);
+ PointerToDialog (dlg->taxname_options, NULL);
ChangeQualKind (dlg->qual_kind);
break;
case AECR_VIB_MSG_CLEAR_TEXT :
@@ -26480,6 +27437,35 @@ static DialoG ConvertSourceLocationDialog
return (DialoG) p;
}
+
+static void ChangeTaxonomyStrings (Pointer data)
+{
+ SourceQualAECRDlgPtr dlg;
+ SimpleAECRPtr sp;
+
+ dlg = (SourceQualAECRDlgPtr) data;
+ if (dlg == NULL) return;
+
+ if (GetValue (dlg->qual_kind) == QUALKIND_STRINGS)
+ {
+ sp = DialogToPointer (dlg->strings);
+ if (AreTaxNameOptionsRelevant (dlg->action_choice, sp))
+ {
+ Enable (dlg->taxname_options);
+ }
+ else
+ {
+ Disable (dlg->taxname_options);
+ }
+ sp = SimpleAECRFree (sp);
+ }
+ if (dlg->change_notify != NULL)
+ {
+ (dlg->change_notify)(dlg->change_userdata);
+ }
+
+}
+
static DialoG SourceQualAECRDialog
(GrouP h,
Int4 action_choice,
@@ -26563,7 +27549,7 @@ static DialoG SourceQualAECRDialog
}
/* Taxonomy Strings dialog */
- dlg->strings = SimpleAECRDialog (g1, action_choice, change_notify, change_userdata,
+ dlg->strings = SimpleAECRDialog (g1, action_choice, ChangeTaxonomyStrings, dlg,
ValNodeSimpleDataFree, NULL,
SourceStringSelectionDialog, NULL, NULL,
"Taxonomy", NULL, TRUE, entityID);
@@ -26602,6 +27588,10 @@ static DialoG SourceQualAECRDialog
SourceOriginSelectionDialog, NULL, NULL,
"Origin", NULL, FALSE, entityID);
}
+
+ dlg->taxname_options = TaxnameOptionsDialog (p, change_notify, change_userdata);
+
+ Disable (dlg->taxname_options);
AlignObjects (ALIGN_CENTER, (HANDLE) dlg->source_qual,
(HANDLE) dlg->location,
@@ -26611,47 +27601,35 @@ static DialoG SourceQualAECRDialog
AlignObjects (ALIGN_CENTER, (HANDLE) dlg->qual_kind,
(HANDLE) g1,
+ (HANDLE) dlg->taxname_options,
NULL);
ChangeQualKind (dlg->qual_kind);
return (DialoG) p;
}
-typedef struct multiqual
-{
- Boolean multi_found;
- SourceQualDescPtr sqdp;
- FilterSetPtr fsp;
-} MultiQualData, PNTR MultiQualPtr;
-static void CheckForMultipleQuals (BioSourcePtr biop, Pointer userdata)
+static Boolean BioSourceHasMultipleQuals (BioSourcePtr biop, SourceQualDescPtr sqdp, FilterSetPtr fsp)
{
- MultiQualPtr mqp;
- Boolean found_one = FALSE;
OrgModPtr mod;
- SubSourcePtr ssp;
-
- if (biop == NULL || userdata == NULL)
- {
- return;
- }
-
- mqp = (MultiQualPtr) userdata;
- if (mqp->sqdp == NULL || mqp->multi_found) return;
+ SubSourcePtr ssp;
+ Boolean found_one = FALSE;
+
+ if (biop == NULL || sqdp == NULL) return FALSE;
- if (mqp->sqdp->isOrgMod)
+ if (sqdp->isOrgMod)
{
if (biop->org != NULL && biop->org->orgname != NULL)
{
mod = biop->org->orgname->mod;
- while (mod != NULL && !mqp->multi_found)
+ while (mod != NULL)
{
- if (mod->subtype == mqp->sqdp->subtype
+ if (mod->subtype == sqdp->subtype
&& !StringHasNoText (mod->subname)
- && OrgModSpecialMatch (mod, mqp->fsp))
+ && OrgModSpecialMatch (mod, fsp))
{
if (found_one) {
- mqp->multi_found = TRUE;
+ return TRUE;
} else {
found_one = TRUE;
}
@@ -26663,14 +27641,14 @@ static void CheckForMultipleQuals (BioSourcePtr biop, Pointer userdata)
else
{
ssp = biop->subtype;
- while (ssp != NULL && !mqp->multi_found)
+ while (ssp != NULL)
{
- if (ssp->subtype == mqp->sqdp->subtype
+ if (ssp->subtype == sqdp->subtype
&& !StringHasNoText (ssp->name)
- && SubSrcSpecialMatch (ssp, mqp->fsp))
+ && SubSrcSpecialMatch (ssp, fsp))
{
if (found_one) {
- mqp->multi_found = TRUE;
+ return TRUE;
} else {
found_one = TRUE;
}
@@ -26678,6 +27656,279 @@ static void CheckForMultipleQuals (BioSourcePtr biop, Pointer userdata)
ssp = ssp->next;
}
}
+ return FALSE;
+}
+
+static Boolean CheckBioSrcListForMultipleQuals (ValNodePtr biosrc_list, SourceQualDescPtr sqdp, FilterSetPtr fsp)
+{
+ ValNodePtr vnp;
+ SeqFeatPtr sfp;
+ SeqDescrPtr sdp;
+ Boolean has_multiple = FALSE;
+
+ if (sqdp == NULL) return FALSE;
+
+ for (vnp = biosrc_list; vnp != NULL && !has_multiple; vnp = vnp->next)
+ {
+ if (vnp->data.ptrvalue == NULL) continue;
+ if (vnp->choice == OBJ_SEQFEAT)
+ {
+ sfp = (SeqFeatPtr) vnp->data.ptrvalue;
+ if (sfp->data.choice == SEQFEAT_BIOSRC)
+ {
+ has_multiple = BioSourceHasMultipleQuals ((BioSourcePtr)sfp->data.value.ptrvalue, sqdp, fsp);
+ }
+ }
+ else if (vnp->choice == OBJ_SEQDESC)
+ {
+ sdp = (SeqDescrPtr) vnp->data.ptrvalue;
+ if (sdp->choice == Seq_descr_source)
+ {
+ has_multiple = BioSourceHasMultipleQuals ((BioSourcePtr)sdp->data.ptrvalue, sqdp, fsp);
+ }
+ }
+ }
+ return has_multiple;
+}
+
+
+typedef struct taxnameoptionsdlg
+{
+ DIALOG_MESSAGE_BLOCK
+ ButtoN remove_taxref;
+ ButtoN remove_common;
+ ButtoN remove_old_name;
+ Nlm_ChangeNotifyProc change_notify;
+ Pointer change_userdata;
+} TaxnameOptionsDlgData, PNTR TaxnameOptionsDlgPtr;
+
+static void TaxnameOptionsToDialog (DialoG d, Pointer data)
+{
+ TaxnameOptionsDlgPtr dlg;
+ TaxnameOptionsPtr top;
+
+ dlg = (TaxnameOptionsDlgPtr) GetObjectExtra (d);
+ if (dlg == NULL) return;
+
+ top = (TaxnameOptionsPtr) data;
+ if (top == NULL)
+ {
+ SetStatus (dlg->remove_taxref, TRUE);
+ SetStatus (dlg->remove_common, TRUE);
+ SetStatus (dlg->remove_old_name, TRUE);
+ }
+ else
+ {
+ SetStatus (dlg->remove_taxref, top->remove_taxref);
+ SetStatus (dlg->remove_common, top->remove_common);
+ SetStatus (dlg->remove_old_name, top->remove_old_name);
+ }
+ if (dlg->change_notify != NULL)
+ {
+ (dlg->change_notify) (dlg->change_userdata);
+ }
+}
+
+static Pointer TaxnameOptionsFromDialog (DialoG d)
+{
+ TaxnameOptionsDlgPtr dlg;
+ TaxnameOptionsPtr top;
+
+ dlg = (TaxnameOptionsDlgPtr) GetObjectExtra (d);
+ if (dlg == NULL) return NULL;
+
+ top = (TaxnameOptionsPtr) MemNew (sizeof (TaxnameOptionsData));
+ top->remove_taxref = GetStatus (dlg->remove_taxref);
+ top->remove_common = GetStatus (dlg->remove_common);
+ top->remove_old_name = GetStatus (dlg->remove_old_name);
+ return top;
+}
+
+
+static void ChangeTaxnameOptions (ButtoN b)
+{
+ TaxnameOptionsDlgPtr dlg;
+
+ dlg = (TaxnameOptionsDlgPtr) GetObjectExtra (b);
+ if (dlg != NULL && dlg->change_notify != NULL)
+ {
+ (dlg->change_notify) (dlg->change_userdata);
+ }
+}
+
+
+extern DialoG TaxnameOptionsDialog (GrouP h, Nlm_ChangeNotifyProc change_notify, Pointer change_userdata)
+{
+ TaxnameOptionsDlgPtr dlg;
+ GrouP p;
+
+ dlg = (TaxnameOptionsDlgPtr) MemNew (sizeof (TaxnameOptionsDlgData));
+ if (dlg == NULL)
+ {
+ return NULL;
+ }
+
+ p = HiddenGroup (h, 3, 0, NULL);
+ SetObjectExtra (p, dlg, StdCleanupExtraProc);
+ SetGroupSpacing (p, 10, 10);
+
+ dlg->dialog = (DialoG) p;
+ dlg->todialog = TaxnameOptionsToDialog;
+ dlg->fromdialog = TaxnameOptionsFromDialog;
+ dlg->change_notify = change_notify;
+ dlg->change_userdata = change_userdata;
+
+ dlg->remove_taxref = CheckBox (p, "Remove taxonomy xref", ChangeTaxnameOptions);
+ SetObjectExtra (dlg->remove_taxref, dlg, NULL);
+ SetStatus (dlg->remove_taxref, TRUE);
+ dlg->remove_common = CheckBox (p, "Remove GenBank common name", ChangeTaxnameOptions);
+ SetObjectExtra (dlg->remove_common, dlg, NULL);
+ SetStatus (dlg->remove_common, TRUE);
+ dlg->remove_old_name = CheckBox (p, "Remove old_name qualifier", ChangeTaxnameOptions);
+ SetObjectExtra (dlg->remove_old_name, dlg, NULL);
+ SetStatus (dlg->remove_old_name, TRUE);
+ return (DialoG) p;
+}
+
+extern void ApplyTaxnameOptionsToBioSource (BioSourcePtr biop, TaxnameOptionsPtr top)
+{
+ if (biop == NULL || top == NULL) return;
+
+ if (top->remove_taxref)
+ {
+ RemoveTaxRef (biop->org);
+ }
+ if (top->remove_old_name)
+ {
+ RemoveOldName (biop->org);
+ }
+ if (top->remove_common)
+ {
+ if (biop->org != NULL)
+ {
+ biop->org->common = MemFree (biop->org->common);
+ }
+ }
+}
+
+static void HandleTaxnameOptionsFeature (SeqFeatPtr sfp, TaxnameOptionsPtr top)
+{
+ if (sfp == NULL || sfp->data.choice != SEQFEAT_BIOSRC || top == NULL)
+ {
+ return;
+ }
+ ApplyTaxnameOptionsToBioSource (sfp->data.value.ptrvalue, top);
+}
+
+static void HandleTaxnameOptionsDescriptorCallback (SeqDescrPtr sdp, TaxnameOptionsPtr top)
+{
+ if (sdp == NULL || sdp->choice != Seq_descr_source || top == NULL)
+ {
+ return;
+ }
+ ApplyTaxnameOptionsToBioSource (sdp->data.ptrvalue, top);
+}
+
+
+static void HandleTaxnameOptionsForBioSourceList (ValNodePtr biosrc_list, TaxnameOptionsPtr top)
+{
+ ValNodePtr vnp;
+
+ if (top == NULL) return;
+ for (vnp = biosrc_list; vnp != NULL; vnp = vnp->next)
+ {
+ if (vnp->choice == OBJ_SEQFEAT)
+ {
+ HandleTaxnameOptionsFeature (vnp->data.ptrvalue, top);
+ }
+ else if (vnp->choice == OBJ_SEQDESC)
+ {
+ HandleTaxnameOptionsDescriptorCallback (vnp->data.ptrvalue, top);
+ }
+ }
+}
+
+static void CollectBioSourceFeatureFieldCallback (SeqFeatPtr sfp, Pointer userdata, FilterSetPtr fsp)
+{
+ if (sfp == NULL || userdata == NULL)
+ {
+ return;
+ }
+ ValNodeAddPointer ((ValNodePtr PNTR) userdata, OBJ_SEQFEAT, sfp);
+}
+
+static void CollectBioSourceDescriptorFieldCallback (SeqDescrPtr sdp, Pointer userdata, FilterSetPtr fsp)
+{
+ if (sdp == NULL || userdata == NULL)
+ {
+ return;
+ }
+
+ ValNodeAddPointer ((ValNodePtr PNTR) userdata, OBJ_SEQDESC, sdp);
+}
+
+
+static void RemoveSourceQualEditNonMatches (ValNodePtr PNTR biosrc_list, ApplyValuePtr avp)
+{
+ ValNodePtr vnp_prev = NULL, vnp_next, vnp_this;
+ CharPtr val1, val2;
+ Boolean do_remove;
+
+ if (biosrc_list == NULL || avp == NULL || StringHasNoText (avp->text_to_replace))
+ {
+ return;
+ }
+
+ vnp_this = *biosrc_list;
+ while (vnp_this != NULL)
+ {
+ vnp_next = vnp_this->next;
+ do_remove = FALSE;
+ if (vnp_this->choice == OBJ_SEQFEAT)
+ {
+ val1 = GetSourceQualFeatureString (vnp_this->data.ptrvalue, avp->field_list, NULL);
+ }
+ else if (vnp_this->choice == OBJ_SEQDESC)
+ {
+ val1 = GetSourceQualDescrString (vnp_this->data.ptrvalue, avp->field_list, NULL);
+ }
+ else
+ {
+ val1 = NULL;
+ }
+ if (val1 == NULL)
+ {
+ do_remove = TRUE;
+ }
+ else
+ {
+ val2 = HandleApplyValue (StringSave (val1), avp);
+ if (StringCmp (val1, val2) == 0)
+ {
+ do_remove = TRUE;
+ }
+ val1 = MemFree (val1);
+ val2 = MemFree (val2);
+ }
+ if (do_remove)
+ {
+ if (vnp_prev == NULL)
+ {
+ *biosrc_list = vnp_this->next;
+ }
+ else
+ {
+ vnp_prev->next = vnp_this->next;
+ }
+ vnp_this->next = NULL;
+ vnp_this = ValNodeFree (vnp_this);
+ }
+ else
+ {
+ vnp_prev = vnp_this;
+ }
+ vnp_this = vnp_next;
+ }
}
@@ -26694,7 +27945,8 @@ SourceQualQualApplyEditConvertRemoveAction
GetFeatureFieldString fieldstring_func,
GetDescriptorFieldString descrstring_func,
Boolean non_text,
- NameFromValNodeProc name_field_func)
+ NameFromValNodeProc name_field_func,
+ TaxnameOptionsPtr top)
{
SeqEntryPtr sep;
@@ -26704,9 +27956,10 @@ SourceQualQualApplyEditConvertRemoveAction
GetSamplePtr gsp;
Boolean rval = TRUE;
ValNodePtr vnp;
- MultiQualData mqd;
CharPtr field_name = NULL;
MsgAnswer ans;
+ ValNodePtr biosrc_list = NULL;
+ SourceQualDescPtr multi_sqdp = NULL;
sep = GetTopSeqEntryForEntityID (ap->input_entityID);
if (sp == NULL
@@ -26727,21 +27980,25 @@ SourceQualQualApplyEditConvertRemoveAction
avd.where_to_replace = EditApplyFindLocation_anywhere;
fsp = (FilterSetPtr) DialogToPointer (ap->constraints);
+
+ /* collect list of BioSources that will be acted upon */
+ OperateOnSeqEntryConstrainedObjects (sep, fsp,
+ CollectBioSourceFeatureFieldCallback,
+ CollectBioSourceDescriptorFieldCallback,
+ SEQFEAT_BIOSRC, 0, Seq_descr_source,
+ &biosrc_list);
if (action_choice == AECR_CONVERT || action_choice == AECR_SWAP || action_choice == AECR_PARSE)
{
/* check for multiple sources */
- mqd.fsp = fsp;
- mqd.multi_found = FALSE;
- mqd.sqdp = sp->field_list->data.ptrvalue;
- VisitBioSourcesInSep (sep, &mqd, CheckForMultipleQuals);
- if (!mqd.multi_found && action_choice == AECR_SWAP) {
- mqd.sqdp = sp->field_list_to->data.ptrvalue;
- VisitBioSourcesInSep (sep, &mqd, CheckForMultipleQuals);
- }
- if (mqd.multi_found) {
+ if ((sp->field_list->choice == 0
+ && (multi_sqdp = sp->field_list->data.ptrvalue) != NULL
+ && CheckBioSrcListForMultipleQuals(biosrc_list, multi_sqdp, fsp))
+ || (action_choice == AECR_SWAP && sp->field_list_to->choice == 0
+ && (multi_sqdp = sp->field_list_to->data.ptrvalue) != NULL
+ && CheckBioSrcListForMultipleQuals(biosrc_list, multi_sqdp, fsp))) {
if (name_field_func != NULL) {
- if (action_choice == AECR_SWAP && mqd.sqdp == sp->field_list_to->data.ptrvalue) {
+ if (action_choice == AECR_SWAP && multi_sqdp == sp->field_list_to->data.ptrvalue) {
field_name = name_field_func(sp->field_list_to);
} else {
field_name = name_field_func(sp->field_list);
@@ -26864,6 +28121,13 @@ SourceQualQualApplyEditConvertRemoveAction
if (rval)
{
AddEditApplyDataToApplyValue (action_choice, sp->edit_apply, &avd);
+
+ if (action_choice == AECR_EDIT)
+ {
+ /* remove items that don't contain text that will be replaced */
+ RemoveSourceQualEditNonMatches (&biosrc_list, &avd);
+ }
+
if (action_choice == AECR_EDIT || action_choice == AECR_APPLY)
{
@@ -26889,13 +28153,18 @@ SourceQualQualApplyEditConvertRemoveAction
}
avd.etp = MemFree (avd.etp);
}
+
FilterSetFree (fsp);
if (rval)
{
+ /* Handle taxname options */
+ HandleTaxnameOptionsForBioSourceList (biosrc_list, top);
+
ObjMgrSetDirtyFlag (ap->input_entityID, TRUE);
ObjMgrSendMsg (OM_MSG_UPDATE, ap->input_entityID, 0, 0);
}
+ biosrc_list = ValNodeFree (biosrc_list);
ArrowCursor ();
Update ();
@@ -26942,7 +28211,8 @@ static Boolean SourceQualApplyEditConvertRemoveAction (Pointer userdata)
GetSourceQualFeatureString,
GetSourceQualDescrString,
FALSE,
- SourceQualValNodeName);
+ SourceQualValNodeName,
+ NULL);
break;
case QUALKIND_STRINGS :
rval = SourceQualQualApplyEditConvertRemoveAction (ap, sp->strings,
@@ -26955,7 +28225,8 @@ static Boolean SourceQualApplyEditConvertRemoveAction (Pointer userdata)
GetStringFromSourceFeature,
GetStringFromSourceDescriptor,
FALSE,
- NULL);
+ NULL,
+ sp->taxname_options);
break;
case QUALKIND_LOCATION :
rval = SourceQualQualApplyEditConvertRemoveAction (ap, sp->location,
@@ -26968,7 +28239,8 @@ static Boolean SourceQualApplyEditConvertRemoveAction (Pointer userdata)
GetLocationFromSourceFeature,
GetLocationFromSourceDescriptor,
TRUE,
- ValNodeStringName);
+ ValNodeStringName,
+ NULL);
break;
case QUALKIND_ORIGIN :
rval = SourceQualQualApplyEditConvertRemoveAction (ap, sp->origin,
@@ -26981,7 +28253,8 @@ static Boolean SourceQualApplyEditConvertRemoveAction (Pointer userdata)
GetOriginFromSourceFeature,
GetOriginFromSourceDescriptor,
TRUE,
- ValNodeStringName);
+ ValNodeStringName,
+ NULL);
break;
}
sp = SourceQualAECRFree (sp);
@@ -27080,18 +28353,15 @@ extern void RemoveSourceQual (IteM i)
SourceQualApplyEditConvertRemove (i, AECR_REMOVE, FALSE);
}
-static CharPtr rna_sample_field_list [] = { "Name",
- "Comment",
- "Product GBQual" };
+static CharPtr rna_sample_field_list [] = { "Product",
+ "Comment" };
static Int2 num_rna_sample_fields = sizeof (rna_sample_field_list) / sizeof (CharPtr);
-
static CharPtr GetRNASampleFieldString (SeqFeatPtr sfp, ValNodePtr vnp, FilterSetPtr fsp)
{
RnaRefPtr rrp;
CharPtr str = NULL;
- GBQualPtr gbqual;
Int2 rna_subtype, rna_field_type;
GeneRefPtr grp;
SeqFeatPtr gene;
@@ -27109,19 +28379,52 @@ static CharPtr GetRNASampleFieldString (SeqFeatPtr sfp, ValNodePtr vnp, FilterSe
{
rna_subtype = (vnp->data.intvalue - 1) / (num_rna_sample_fields + num_gene_fields);
rna_field_type = (vnp->data.intvalue - 1) % (num_rna_sample_fields + num_gene_fields);
- if (rna_subtype == 0)
- {
- rna_subtype = 255;
- }
- if (rna_subtype != rrp->type)
+ switch (rna_subtype)
{
- vnp = vnp->next;
- continue;
+ case 0:
+ if (rrp->type != 255
+ || (rrp->ext.choice == 1
+ && (StringCmp (rrp->ext.value.ptrvalue, "ncRNA") == 0
+ || StringCmp (rrp->ext.value.ptrvalue, "tmRNA") == 0)))
+ {
+ vnp = vnp->next;
+ continue;
+ }
+ break;
+ case 1:
+ case 2:
+ case 3:
+ case 4:
+ if (rna_subtype != rrp->type)
+ {
+ vnp = vnp->next;
+ continue;
+ }
+ break;
+ case 5:
+ if (rrp->type != 255
+ || rrp->ext.choice != 1
+ || StringCmp (rrp->ext.value.ptrvalue, "ncRNA") != 0)
+ {
+ vnp = vnp->next;
+ continue;
+ }
+ break;
+ case 6:
+ if (rrp->type != 255
+ || rrp->ext.choice != 1
+ || StringCmp (rrp->ext.value.ptrvalue, "tmRNA") != 0)
+ {
+ vnp = vnp->next;
+ continue;
+ }
+ break;
}
+
switch (rna_field_type)
{
case 0 :
- str = GetRNANameString (sfp);
+ str = GetRNAProductString (sfp);
break;
case 1 :
if (!StringHasNoText (sfp->comment))
@@ -27129,17 +28432,6 @@ static CharPtr GetRNASampleFieldString (SeqFeatPtr sfp, ValNodePtr vnp, FilterSe
str = StringSave (sfp->comment);
}
break;
- case 2 :
- gbqual = sfp->qual;
- while (gbqual != NULL && str == NULL) {
- if (StringICmp (gbqual->qual, "product") == 0
- && !StringHasNoText (gbqual->val))
- {
- str = StringSave (gbqual->val);
- }
- gbqual = gbqual->next;
- }
- break;
default :
vn.next = NULL;
vn.choice = 0;
@@ -27240,21 +28532,26 @@ static DialoG GetRNAQualSample (GrouP h, Uint2 entityID)
return d;
}
-typedef struct applyrnaqual
+typedef struct aecrrnaqual
{
ValNodePtr field_list;
- ValNodePtr subtype_list;
+ ValNodePtr field_list_to;
+ RnaTypePtr rna_type;
EditApplyPtr edit_apply;
ValNodePtr codons;
SeqLocPtr anticodon;
-} ApplyRNAQualData, PNTR ApplyRNAQualPtr;
+ TextPortionXPtr text_portion;
+ Boolean leave_on_original;
+ Boolean remove_parsed;
+} AECRRNAQualData, PNTR AECRRNAQualPtr;
-static ApplyRNAQualPtr ApplyRNAQualFree (ApplyRNAQualPtr ap)
+static AECRRNAQualPtr AECRRNAQualFree (AECRRNAQualPtr ap)
{
if (ap != NULL)
{
ap->field_list = ValNodeFree (ap->field_list);
- ap->subtype_list = ValNodeFree (ap->subtype_list);
+ ap->field_list_to = ValNodeFree (ap->field_list_to);
+ ap->rna_type = RnaTypeFree (ap->rna_type);
ap->edit_apply = EditApplyFree (ap->edit_apply);
ap->codons = ValNodeFreeData (ap->codons);
ap = MemFree (ap);
@@ -27262,13 +28559,19 @@ static ApplyRNAQualPtr ApplyRNAQualFree (ApplyRNAQualPtr ap)
return ap;
}
-typedef struct applyrnaqualdlg
+typedef struct aecrrnaqualdlg
{
DIALOG_MESSAGE_BLOCK
DialoG field_list;
- DialoG subtype_list;
+ DialoG field_list_to;
+ DialoG rna_type;
DialoG edit_apply;
DialoG codons;
+ DialoG ncrna_class;
+ DialoG text_portion;
+ ButtoN leave_on_original;
+ ButtoN remove_parsed;
+
Nlm_ChangeNotifyProc change_notify;
Pointer change_userdata;
Uint2 entityID;
@@ -27276,108 +28579,136 @@ typedef struct applyrnaqualdlg
/* The following is used to create the anticodon location dialog */
FeatureForm ff;
DialoG anticodon;
-} ApplyRNAQualDlgData, PNTR ApplyRNAQualDlgPtr;
+} AECRRNAQualDlgData, PNTR AECRRNAQualDlgPtr;
-static void ClearTextApplyRNAQualDlg (ApplyRNAQualDlgPtr dlg)
+static void ClearTextAECRRNAQualDlg (AECRRNAQualDlgPtr dlg)
{
if (dlg != NULL)
{
PointerToDialog (dlg->edit_apply, NULL);
PointerToDialog (dlg->codons, NULL);
+ PointerToDialog (dlg->ncrna_class, NULL);
}
}
-static void ResetApplyRNAQualDlg (ApplyRNAQualDlgPtr dlg)
+static void ResetAECRRNAQualDlg (AECRRNAQualDlgPtr dlg)
{
if (dlg != NULL)
{
PointerToDialog (dlg->field_list, NULL);
+ PointerToDialog (dlg->field_list_to, NULL);
SendMessageToDialog (dlg->field_list, NUM_VIB_MSG + 1);
- PointerToDialog (dlg->subtype_list, NULL);
- ClearTextApplyRNAQualDlg (dlg);
+ PointerToDialog (dlg->rna_type, NULL);
+ PointerToDialog (dlg->text_portion, NULL);
+ SafeSetStatus (dlg->leave_on_original, FALSE);
+ SafeSetStatus (dlg->remove_parsed, FALSE);
+ ClearTextAECRRNAQualDlg (dlg);
}
}
-static void ApplyRNAQualToDialog (DialoG d, Pointer userdata)
+static void AECRRNAQualToDialog (DialoG d, Pointer userdata)
{
- ApplyRNAQualDlgPtr dlg;
- ApplyRNAQualPtr data;
+ AECRRNAQualDlgPtr dlg;
+ AECRRNAQualPtr data;
- dlg = (ApplyRNAQualDlgPtr) GetObjectExtra (d);
+ dlg = (AECRRNAQualDlgPtr) GetObjectExtra (d);
if (dlg == NULL)
{
return;
}
- ResetApplyRNAQualDlg (dlg);
- data = (ApplyRNAQualPtr) userdata;
+ ResetAECRRNAQualDlg (dlg);
+ data = (AECRRNAQualPtr) userdata;
if (data != NULL)
{
PointerToDialog (dlg->field_list, data->field_list);
- PointerToDialog (dlg->subtype_list, data->subtype_list);
+ PointerToDialog (dlg->field_list_to, data->field_list_to);
+ PointerToDialog (dlg->rna_type, data->rna_type);
PointerToDialog (dlg->edit_apply, data->edit_apply);
PointerToDialog (dlg->codons, data->codons);
+ if (data->field_list != NULL && data->field_list->data.intvalue == RNAFIELD_NCRNA_CLASS) {
+ if (data->edit_apply == NULL) {
+ PointerToDialog (dlg->ncrna_class, NULL);
+ } else {
+ PointerToDialog (dlg->ncrna_class, data->edit_apply->apply_txt);
+ }
+ }
PointerToDialog (dlg->anticodon, data->anticodon);
+ PointerToDialog (dlg->text_portion, data->text_portion);
+ SafeSetStatus (dlg->leave_on_original, data->leave_on_original);
+ SafeSetStatus (dlg->remove_parsed, data->remove_parsed);
}
}
-static Pointer DialogToApplyRNAQual (DialoG d)
+static Pointer DialogToAECRRNAQual (DialoG d)
{
- ApplyRNAQualDlgPtr dlg;
- ApplyRNAQualPtr data;
+ AECRRNAQualDlgPtr dlg;
+ AECRRNAQualPtr data;
- dlg = (ApplyRNAQualDlgPtr) GetObjectExtra (d);
+ dlg = (AECRRNAQualDlgPtr) GetObjectExtra (d);
if (dlg == NULL)
{
return NULL;
}
- data = (ApplyRNAQualPtr) MemNew (sizeof (ApplyRNAQualData));
+ data = (AECRRNAQualPtr) MemNew (sizeof (AECRRNAQualData));
if (data != NULL)
{
data->field_list = DialogToPointer (dlg->field_list);
- data->subtype_list = DialogToPointer (dlg->subtype_list);
- data->edit_apply = DialogToPointer (dlg->edit_apply);
+ data->field_list_to = DialogToPointer (dlg->field_list_to);
+ data->rna_type = DialogToPointer (dlg->rna_type);
+ if (data->field_list != NULL && data->field_list->data.intvalue == RNAFIELD_NCRNA_CLASS
+ && dlg->ncrna_class != NULL) {
+ data->edit_apply = EditApplyNew ();
+ data->edit_apply->apply_txt = DialogToPointer (dlg->ncrna_class);
+ } else {
+ data->edit_apply = DialogToPointer (dlg->edit_apply);
+ }
data->codons = DialogToPointer (dlg->codons);
data->anticodon = DialogToPointer (dlg->anticodon);
+ data->text_portion = DialogToPointer (dlg->text_portion);
+ data->leave_on_original = (dlg->leave_on_original == NULL) ? FALSE : GetStatus (dlg->leave_on_original);
+ data->remove_parsed = (dlg->remove_parsed == NULL) ? FALSE : GetStatus (dlg->remove_parsed);
}
return data;
}
+static ValNodePtr GetRNAFeatureList (SeqEntryPtr sep, FilterSetPtr fsp, RnaTypePtr rtp);
+static GetSamplePtr GetRnaExistingTextForList (ValNodePtr rna_list, ValNodePtr requested_field);
+
static CharPtr
RNAQualAutopopulate
-(ValNodePtr subtype_list,
+(RnaTypePtr rna_type,
ValNodePtr field_list,
Uint2 entityID)
{
+ SeqEntryPtr sep;
GetSamplePtr gsp;
+ ValNodePtr rna_list;
CharPtr rval = NULL;
- ValNodePtr vnp;
- for (vnp = subtype_list; vnp != NULL && rval == NULL; vnp = vnp->next)
+ sep = GetTopSeqEntryForEntityID (entityID);
+ rna_list = GetRNAFeatureList (sep, NULL, rna_type);
+ gsp = GetRnaExistingTextForList (rna_list, field_list);
+ if (gsp != NULL && !StringHasNoText (gsp->sample_text))
{
- gsp = CheckForExistingText (entityID,
- field_list,
- GetRNAFieldString,
- NULL, NULL, IntValNodeCopy,
- NULL, SEQFEAT_RNA, vnp->data.intvalue, 0);
- if (gsp != NULL && !StringHasNoText (gsp->sample_text))
- {
- rval = gsp->sample_text;
- gsp->sample_text = NULL;
- }
- GetSampleFree (gsp);
+ rval = gsp->sample_text;
+ gsp->sample_text = NULL;
}
+ GetSampleFree (gsp);
+ rna_list = ValNodeFree (rna_list);
return rval;
}
static void RNAQualChangeNotify (Pointer userdata)
{
- ApplyRNAQualDlgPtr dlg;
- ValNodePtr field_list = NULL, subtype_list = NULL;
+ AECRRNAQualDlgPtr dlg;
+ ValNodePtr field_list = NULL;
+ RnaTypePtr rna_type;
EditApplyPtr eap;
+ CharPtr ncrna_class;
- dlg = (ApplyRNAQualDlgPtr) userdata;
+ dlg = (AECRRNAQualDlgPtr) userdata;
if (dlg == NULL)
{
return;
@@ -27389,33 +28720,52 @@ static void RNAQualChangeNotify (Pointer userdata)
Hide (dlg->edit_apply);
Hide (dlg->anticodon);
Hide (dlg->codons);
+ Hide (dlg->ncrna_class);
}
else if (field_list->data.intvalue == RNAFIELD_CODONS_RECOGNIZED)
{
Show (dlg->codons);
Hide (dlg->edit_apply);
Hide (dlg->anticodon);
+ Hide (dlg->ncrna_class);
}
else if (field_list->data.intvalue == RNAFIELD_ANTICODON)
{
Show (dlg->anticodon);
Hide (dlg->edit_apply);
Hide (dlg->codons);
+ Hide (dlg->ncrna_class);
+ }
+ else if (field_list->data.intvalue == RNAFIELD_NCRNA_CLASS && dlg->ncrna_class != NULL)
+ {
+ Show (dlg->ncrna_class);
+ Hide (dlg->codons);
+ Hide (dlg->edit_apply);
+ Hide (dlg->anticodon);
+ /* autopopulate */
+ rna_type = DialogToPointer (dlg->rna_type);
+ ncrna_class = RNAQualAutopopulate (rna_type, field_list, dlg->entityID);
+ PointerToDialog (dlg->ncrna_class, ncrna_class);
+ ncrna_class = MemFree (ncrna_class);
}
else
{
Show (dlg->edit_apply);
Hide (dlg->codons);
Hide (dlg->anticodon);
+ Hide (dlg->ncrna_class);
/* autopopulate text fields */
- subtype_list = DialogToPointer (dlg->subtype_list);
- eap = DialogToPointer (dlg->edit_apply);
- eap->apply_txt = MemFree (eap->apply_txt);
- eap->apply_txt = RNAQualAutopopulate (subtype_list, field_list, dlg->entityID);
- PointerToDialog (dlg->edit_apply, eap);
- EditApplyFree (eap);
- subtype_list = ValNodeFree (subtype_list);
+ if (dlg->edit_apply != NULL)
+ {
+ rna_type = DialogToPointer (dlg->rna_type);
+ eap = DialogToPointer (dlg->edit_apply);
+ eap->apply_txt = MemFree (eap->apply_txt);
+ eap->apply_txt = RNAQualAutopopulate (rna_type, field_list, dlg->entityID);
+ PointerToDialog (dlg->edit_apply, eap);
+ EditApplyFree (eap);
+ rna_type = RnaTypeFree (rna_type);
+ }
}
field_list = ValNodeFree (field_list);
@@ -27426,36 +28776,29 @@ static void RNAQualChangeNotify (Pointer userdata)
}
}
-static void ApplyRNAQualMessage (DialoG d, Int2 mssg)
+static void AECRRNAQualMessage (DialoG d, Int2 mssg)
{
- ApplyRNAQualDlgPtr dlg;
+ AECRRNAQualDlgPtr dlg;
- dlg = (ApplyRNAQualDlgPtr) GetObjectExtra (d);
+ dlg = (AECRRNAQualDlgPtr) GetObjectExtra (d);
if (dlg != NULL) {
switch (mssg)
{
case VIB_MSG_INIT :
/* reset list */
- ResetApplyRNAQualDlg (dlg);
+ ResetAECRRNAQualDlg (dlg);
break;
case VIB_MSG_ENTER :
- if (dlg->subtype_list != NULL)
- {
- Select (dlg->subtype_list);
- }
- else
- {
- Select (dlg->field_list);
- }
+ Select (dlg->rna_type);
break;
case AECR_VIB_MSG_SET_DEFAULT :
SendMessageToDialog (dlg->field_list, AECR_VIB_MSG_SET_DEFAULT);
- SendMessageToDialog (dlg->subtype_list, AECR_VIB_MSG_SET_DEFAULT);
- ClearTextApplyRNAQualDlg (dlg);
+ SendMessageToDialog (dlg->rna_type, AECR_VIB_MSG_SET_DEFAULT);
+ ClearTextAECRRNAQualDlg (dlg);
break;
case AECR_VIB_MSG_CLEAR_TEXT :
- ClearTextApplyRNAQualDlg (dlg);
+ ClearTextAECRRNAQualDlg (dlg);
break;
case AECR_VIB_MSG_AUTOPOPULATE:
RNAQualChangeNotify (dlg);
@@ -27466,45 +28809,61 @@ static void ApplyRNAQualMessage (DialoG d, Int2 mssg)
}
}
-static ValNodePtr TestApplyRNAQual (DialoG d)
+static ValNodePtr TestAECRRNAQual (DialoG d)
{
- ApplyRNAQualDlgPtr dlg;
- ValNodePtr err_list = NULL;
+ AECRRNAQualDlgPtr dlg;
ValNodePtr total_err_list = NULL;
ValNodePtr field_list;
- dlg = (ApplyRNAQualDlgPtr) GetObjectExtra (d);
+ dlg = (AECRRNAQualDlgPtr) GetObjectExtra (d);
if (dlg == NULL)
{
return NULL;
}
- total_err_list = TestDialog (dlg->subtype_list);
+ total_err_list = TestDialog (dlg->rna_type);
- err_list = TestDialog (dlg->field_list);
- total_err_list = ValNodeAppend (total_err_list, err_list);
+ ValNodeLink (&total_err_list, TestDialog (dlg->field_list));
field_list = DialogToPointer (dlg->field_list);
- if (field_list != NULL && field_list->data.intvalue != RNAFIELD_CODONS_RECOGNIZED)
- {
- err_list = TestDialog (dlg->edit_apply);
- total_err_list = ValNodeAppend (total_err_list, err_list);
+ if (field_list != NULL) {
+ if (field_list->data.intvalue == RNAFIELD_NCRNA_CLASS && dlg->ncrna_class != NULL) {
+ ValNodeLink (&total_err_list, TestDialog (dlg->ncrna_class));
+ } else if (field_list->data.intvalue != RNAFIELD_CODONS_RECOGNIZED) {
+ ValNodeLink (&total_err_list, TestDialog (dlg->edit_apply));
+ }
}
return total_err_list;
}
-static DialoG ApplyRNAQualDialog
+
+static void AECRRNAQualButtonChange (ButtoN b)
+{
+ AECRRNAQualDlgPtr dlg;
+
+ dlg = (AECRRNAQualDlgPtr) GetObjectExtra (b);
+ if (dlg == NULL) return;
+
+ if (dlg->change_notify != NULL)
+ {
+ (dlg->change_notify) (dlg->change_userdata);
+ }
+}
+
+
+static DialoG RNAQualListDialog
(GrouP h,
+ Int4 action_choice,
Nlm_ChangeNotifyProc change_notify,
Pointer change_userdata,
Uint2 entityID)
{
- ApplyRNAQualDlgPtr dlg;
- GrouP p, g1, g2;
+ AECRRNAQualDlgPtr dlg;
+ GrouP p, g1, g2 = NULL;
SeqEntryPtr sep;
- dlg = (ApplyRNAQualDlgPtr) MemNew (sizeof (ApplyRNAQualDlgData));
+ dlg = (AECRRNAQualDlgPtr) MemNew (sizeof (AECRRNAQualDlgData));
if (dlg == NULL)
{
return NULL;
@@ -27515,43 +28874,104 @@ static DialoG ApplyRNAQualDialog
SetGroupSpacing (p, 10, 10);
dlg->dialog = (DialoG) p;
- dlg->todialog = ApplyRNAQualToDialog;
- dlg->fromdialog = DialogToApplyRNAQual;
- dlg->dialogmessage = ApplyRNAQualMessage;
- dlg->testdialog = TestApplyRNAQual;
+ dlg->todialog = AECRRNAQualToDialog;
+ dlg->fromdialog = DialogToAECRRNAQual;
+ dlg->dialogmessage = AECRRNAQualMessage;
+ dlg->testdialog = TestAECRRNAQual;
dlg->change_notify = change_notify;
dlg->change_userdata = change_userdata;
dlg->entityID = entityID;
+
+
+ if (action_choice == AECR_CONVERT || action_choice == AECR_SWAP || action_choice == AECR_PARSE)
+ {
+ g1 = HiddenGroup (p, 3, 0, NULL);
+ StaticPrompt (g1, "", 0, dialogTextHeight, systemFont, 'l');
+ StaticPrompt (g1, "From", 0, dialogTextHeight, systemFont, 'l');
+ StaticPrompt (g1, "To", 0, dialogTextHeight, systemFont, 'l');
+ dlg->rna_type = RnaTypeDialog (g1, TRUE, RNAQualChangeNotify, dlg);
+
+ dlg->field_list = RNAFieldSelectionDialog (g1, FALSE,
+ change_notify,
+ change_userdata);
+ dlg->field_list_to = RNAFieldSelectionDialog (g1, FALSE,
+ change_notify,
+ change_userdata);
+ if (action_choice == AECR_CONVERT)
+ {
+ dlg->leave_on_original = CheckBox (p, "Leave on original", AECRRNAQualButtonChange);
+ SetObjectExtra (dlg->leave_on_original, dlg, NULL);
+ }
+ }
+ else
+ {
+ g1 = HiddenGroup (p, 2, 0, NULL);
+ StaticPrompt (g1, "", 0, dialogTextHeight, systemFont, 'l');
+ StaticPrompt (g1, "RNA Field", 0, dialogTextHeight, systemFont, 'l');
+ dlg->rna_type = RnaTypeDialog (g1, TRUE, RNAQualChangeNotify, dlg);
+ if (action_choice == AECR_REMOVE)
+ {
+ dlg->field_list = RNARemoveFieldSelectionDialog (g1, TRUE,
+ RNAQualChangeNotify, dlg);
+ }
+ else
+ {
+ dlg->field_list = RNAFieldSelectionDialog (g1, FALSE,
+ RNAQualChangeNotify,
+ dlg);
+ }
+ }
+
+ if (action_choice == AECR_APPLY)
+ {
+ g2 = HiddenGroup (p, 0, 0, NULL);
+ dlg->edit_apply = EditApplyDialog (g2, eEditApplyChoice_Apply, "New Text", NULL,
+ change_notify, change_userdata);
- g1 = HiddenGroup (p, 2, 0, NULL);
- StaticPrompt (g1, "RNA Type", 0, dialogTextHeight, systemFont, 'l');
- StaticPrompt (g1, "RNA Field", 0, dialogTextHeight, systemFont, 'l');
- dlg->subtype_list = RNASubtypeSelectionDialog (g1, TRUE, NULL,
- RNAQualChangeNotify,
- dlg);
- dlg->field_list = RNAAddFieldSelectionDialog (g1, FALSE,
- RNAQualChangeNotify,
- dlg);
-
- g2 = HiddenGroup (p, 0, 0, NULL);
- dlg->edit_apply = EditApplyDialog (g2, eEditApplyChoice_Apply, "New Text", NULL,
- change_notify, change_userdata);
-
- dlg->codons = CreateVisibleStringDialog (g2, 3, -1, 4);
+ dlg->codons = CreateVisibleStringDialog (g2, 3, -1, 4);
+
+ dlg->ncrna_class = CreatencRNAClassDialog (g2, FALSE, change_notify, change_userdata);
- sep = GetTopSeqEntryForEntityID (entityID);
+ sep = GetTopSeqEntryForEntityID (entityID);
- dlg->anticodon = NULL;
-/*
- dlg->anticodon = CreateIntervalEditorDialogEx (g2, NULL, 2, 2, sep, TRUE, FALSE,
- TRUE, TRUE, FALSE,
- &(dlg->ff),
- NULL); */
+ dlg->anticodon = NULL;
+ /*
+ dlg->anticodon = CreateIntervalEditorDialogEx (g2, NULL, 2, 2, sep, TRUE, FALSE,
+ TRUE, TRUE, FALSE,
+ &(dlg->ff),
+ NULL); */
- AlignObjects (ALIGN_CENTER, (HANDLE) dlg->edit_apply,
- (HANDLE) dlg->codons,
- (HANDLE) dlg->anticodon,
- NULL);
+ AlignObjects (ALIGN_CENTER, (HANDLE) dlg->edit_apply,
+ (HANDLE) dlg->codons,
+ (HANDLE) dlg->ncrna_class,
+ (HANDLE) dlg->anticodon,
+ NULL);
+ }
+ else if (action_choice == AECR_EDIT)
+ {
+ g2 = HiddenGroup (p, 1, 0, NULL);
+ dlg->edit_apply = EditApplyDialog (g2, eEditApplyChoice_Edit,
+ "New Text", NULL,
+ change_notify, change_userdata);
+ dlg->text_portion = NULL;
+ dlg->remove_parsed = NULL;
+ }
+ else if (action_choice == AECR_PARSE)
+ {
+ g2 = HiddenGroup (p, -1, 0, NULL);
+ dlg->edit_apply = NULL;
+ dlg->text_portion = TextPortionXDialog(p);
+ dlg->remove_parsed = CheckBox (p, "Remove from parsed field", SimpleAECRButtonChange);
+ SetObjectExtra (dlg->remove_parsed, dlg, NULL);
+ AlignObjects (ALIGN_CENTER, (HANDLE) dlg->edit_apply, (HANDLE) dlg->remove_parsed, NULL);
+ }
+ else
+ {
+ dlg->edit_apply = NULL;
+ dlg->text_portion = NULL;
+ dlg->remove_parsed = NULL;
+ }
+
AlignObjects (ALIGN_CENTER, (HANDLE) g1, (HANDLE) g2, NULL);
@@ -27560,50 +28980,6 @@ static DialoG ApplyRNAQualDialog
return (DialoG) p;
}
-static DialoG RNAQualListDialog
-(GrouP h,
- Int4 action_choice,
- Nlm_ChangeNotifyProc change_notify,
- Pointer change_userdata,
- Uint2 entityID)
-{
- DialoG d = NULL;
-
- switch (action_choice)
- {
- case AECR_REMOVE:
- d = SimpleAECRDialog (h, action_choice, change_notify, change_userdata,
- NULL, NULL,
- RNARemoveFieldSelectionDialog,
- RNASubtypeSelectionDialog,
- NULL,
- "RNA Field", "RNA type", FALSE, entityID);
- break;
- case AECR_CONVERT:
- case AECR_SWAP:
- case AECR_PARSE:
- d = SimpleAECRDialog (h, action_choice, change_notify, change_userdata,
- NULL, NULL,
- RNAFieldSelectionDialog,
- RNASubtypeSelectionDialog,
- NULL,
- "RNA Field", "RNA type", TRUE, entityID);
- break;
- break;
- case AECR_EDIT:
- d = SimpleAECRDialog (h, action_choice, change_notify, change_userdata,
- NULL, NULL,
- RNAFieldSelectionDialog,
- RNASubtypeSelectionDialog,
- RNAQualAutopopulate,
- "RNA Field", "RNA type", TRUE, entityID);
- break;
- case AECR_APPLY:
- d = ApplyRNAQualDialog (h, change_notify, change_userdata, entityID);
- break;
- }
- return d;
-}
static void ApplyRNACodonsCallback (SeqFeatPtr sfp, Pointer userdata, FilterSetPtr fsp)
{
@@ -27658,46 +29034,108 @@ static void ApplyRNAAnticodonCallback (SeqFeatPtr sfp, Pointer userdata, FilterS
}
}
-static Boolean AcceptRNAApply (ApplyEditConvertRemovePtr ap)
-{
- ApplyRNAQualPtr rp;
- FilterSetPtr fsp;
- ApplyValueData avd;
- Boolean rval = TRUE;
- SeqEntryPtr sep;
- ValNodePtr vnp;
- GetSamplePtr gsp, gsp_new, gsp_sum;
-
- if (ap == NULL)
+
+static void CollectRNAFeaturesCallback (SeqFeatPtr sfp, Pointer userdata, FilterSetPtr fsp)
+{
+ if (sfp != NULL && sfp->data.choice == SEQFEAT_RNA && userdata != NULL)
{
- return FALSE;
+ ValNodeAddPointer ((ValNodePtr PNTR) userdata, OBJ_SEQFEAT, sfp);
}
- rp = DialogToPointer (ap->aecr_pages[AECR_APPLY - 1]);
-
- sep = GetTopSeqEntryForEntityID (ap->input_entityID);
- if (rp->subtype_list == NULL || rp->field_list == NULL)
+}
+
+
+static ValNodePtr GetRNAFeatureList (SeqEntryPtr sep, FilterSetPtr fsp, RnaTypePtr rtp)
+{
+ ValNodePtr rna_list = NULL, vnp_rna;
+ ValNodePtr not_match;
+ SeqFeatPtr sfp;
+ Boolean matches;
+
+ if (sep == NULL) return NULL;
+
+ OperateOnSeqEntryConstrainedObjects (sep, fsp, CollectRNAFeaturesCallback,
+ NULL, SEQFEAT_RNA, 0, 0, &rna_list);
+
+ if (rtp != NULL)
+ {
+ for (vnp_rna = rna_list; vnp_rna != NULL; vnp_rna = vnp_rna->next)
+ {
+ matches = FALSE;
+ sfp = vnp_rna->data.ptrvalue;
+ if (!MatchesRnaType (sfp, rtp))
+ {
+ vnp_rna->choice = 0;
+ }
+ }
+
+ not_match = ValNodeExtractList (&rna_list, 0);
+ not_match = ValNodeFree (not_match);
+ }
+ return rna_list;
+}
+
+
+static GetSamplePtr GetRnaExistingTextForList (ValNodePtr rna_list, ValNodePtr requested_field)
+{
+ GetSamplePtr gsp;
+ ValNodePtr vnp;
+ SeqFeatPtr sfp;
+
+ if (rna_list == NULL || requested_field == NULL) return NULL;
+
+ gsp = GetSampleNew ();
+ gsp->sample_text = NULL;
+ gsp->fieldstring_func = GetRNAFieldString;
+ gsp->descrstring_func = NULL;
+ gsp->free_vn_proc = NULL;
+ gsp->copy_vn_proc = IntValNodeCopy;
+ gsp->requested_field = (gsp->copy_vn_proc) (requested_field);
+ gsp->num_found = 0;
+ gsp->all_same = TRUE;
+
+ for (vnp = rna_list; vnp != NULL; vnp = vnp->next)
+ {
+ sfp = vnp->data.ptrvalue;
+ GetSampleFeatureCallback (sfp, gsp, NULL);
+ }
+ return gsp;
+}
+
+
+static Boolean ApplyToRNAList (ValNodePtr rna_list, AECRRNAQualPtr rp, FilterSetPtr fsp)
+{
+ ValNodePtr vnp_rna;
+ SeqFeatPtr sfp;
+ ApplyValueData avd;
+ Boolean rval = TRUE;
+ GetSamplePtr gsp;
+
+ if (rna_list == NULL || rp == NULL || rp->field_list == NULL)
{
- rp = ApplyRNAQualFree (rp);
return FALSE;
}
-
- fsp = (FilterSetPtr) DialogToPointer (ap->constraints);
-
+
if (rp->field_list->data.intvalue == RNAFIELD_CODONS_RECOGNIZED)
{
- for (vnp = rp->subtype_list; vnp != NULL; vnp = vnp->next)
+ for (vnp_rna = rna_list; vnp_rna != NULL; vnp_rna = vnp_rna->next)
{
- OperateOnSeqEntryConstrainedObjects (sep, fsp, ApplyRNACodonsCallback,
- NULL, SEQFEAT_RNA, FEATDEF_tRNA, 0, rp->codons);
+ sfp = vnp_rna->data.ptrvalue;
+ if (sfp->idx.subtype == FEATDEF_tRNA)
+ {
+ ApplyRNACodonsCallback (sfp, rp->codons, fsp);
+ }
}
}
else if (rp->field_list->data.intvalue == RNAFIELD_ANTICODON)
{
- for (vnp = rp->subtype_list; vnp != NULL; vnp = vnp->next)
+ for (vnp_rna = rna_list; vnp_rna != NULL; vnp_rna = vnp_rna->next)
{
- OperateOnSeqEntryConstrainedObjects (sep, fsp, ApplyRNAAnticodonCallback,
- NULL, SEQFEAT_RNA, FEATDEF_tRNA, 0, rp->anticodon);
+ sfp = vnp_rna->data.ptrvalue;
+ if (sfp->idx.subtype == FEATDEF_tRNA)
+ {
+ ApplyRNAAnticodonCallback (sfp, rp->anticodon, fsp);
+ }
}
}
else
@@ -27706,21 +29144,9 @@ static Boolean AcceptRNAApply (ApplyEditConvertRemovePtr ap)
avd.where_to_replace = EditApplyFindLocation_anywhere;
/* get handling for existing text */
- gsp_sum = NULL;
- for (vnp = rp->subtype_list; vnp != NULL; vnp = vnp->next)
- {
- gsp = CheckForExistingText (ap->input_entityID,
- avd.field_list,
- GetRNAFieldString,
- NULL, NULL, IntValNodeCopy,
- fsp, SEQFEAT_RNA, vnp->data.intvalue, 0);
- gsp_new = GetSampleAdd (gsp_sum, gsp);
- gsp = GetSampleFree (gsp);
- gsp_sum = GetSampleFree (gsp_sum);
- gsp_sum = gsp_new;
- }
- avd.etp = GetExistingTextHandlerInfo (gsp_sum == NULL ? 0 : gsp_sum->num_found, FALSE);
- gsp_sum = GetSampleFree (gsp_sum);
+ gsp = GetRnaExistingTextForList (rna_list, rp->field_list);
+ avd.etp = GetExistingTextHandlerInfo (gsp == NULL ? 0 : gsp->num_found, FALSE);
+ gsp = GetSampleFree (gsp);
if (avd.etp != NULL
&& avd.etp->existing_text_choice == eExistingTextChoiceCancel)
@@ -27732,162 +29158,171 @@ static Boolean AcceptRNAApply (ApplyEditConvertRemovePtr ap)
{
AddEditApplyDataToApplyValue (AECR_APPLY, rp->edit_apply, &avd);
- for (vnp = rp->subtype_list; vnp != NULL; vnp = vnp->next)
+ for (vnp_rna = rna_list; vnp_rna != NULL; vnp_rna = vnp_rna->next)
{
- OperateOnSeqEntryConstrainedObjects (sep, fsp, SetRNAFieldString,
- NULL, SEQFEAT_RNA, vnp->data.intvalue, 0, &avd);
+ sfp = vnp_rna->data.ptrvalue;
+ SetRNAFieldString (sfp, &avd, fsp);
}
avd.text_to_replace = MemFree (avd.text_to_replace);
avd.new_text = MemFree (avd.new_text);
}
avd.etp = MemFree (avd.etp);
}
-
- FilterSetFree (fsp);
-
return rval;
}
+
static Boolean
-AcceptRNAQualEditRemoveConvert
-(ApplyEditConvertRemovePtr ap,
- Int4 action_choice,
- SimpleAECRPtr rp)
+RNAQualConvertSwapParseList
+(ValNodePtr rna_list,
+ AECRRNAQualPtr rp,
+ Int4 action_choice,
+ FilterSetPtr fsp)
{
- SeqEntryPtr sep;
- FilterSetPtr fsp;
- ConvertFieldData cfd;
- GetSamplePtr gsp, gsp_new, gsp_sum;
- ValNodePtr vnp;
- ApplyValueData avd;
- Boolean rval = TRUE;
+ ConvertFieldData cfd;
+ ConversionConflictData ccd;
+ ValNodePtr vnp_rna;
+ ApplyValueData avd;
+ Boolean rval = TRUE;
+ SeqFeatPtr sfp;
- if (ap == NULL
+ if (rna_list == NULL
+ || rp == NULL
|| action_choice < AECR_EDIT
|| action_choice > NUM_AECR
- || rp == NULL
- || rp->subtype_list == NULL || rp->field_list == NULL
- || ((action_choice == AECR_CONVERT || action_choice == AECR_SWAP || action_choice == AECR_PARSE)
- && rp->field_list_to == NULL))
+ || rp->field_list == NULL
+ || rp->field_list_to == NULL)
{
return FALSE;
}
- sep = GetTopSeqEntryForEntityID (ap->input_entityID);
-
- fsp = (FilterSetPtr) DialogToPointer (ap->constraints);
-
avd.where_to_replace = EditApplyFindLocation_anywhere;
- if (action_choice == AECR_CONVERT || action_choice == AECR_SWAP || action_choice == AECR_PARSE)
- {
- cfd.src_field_list = rp->field_list;
- cfd.dst_field_list = rp->field_list_to;
- cfd.etp = NULL;
- cfd.get_str_func = GetRNAFieldString;
- cfd.set_str_func = SetRNAFieldString;
- cfd.remove_str_func = RemoveRNAField;
- cfd.get_d_str_func = NULL;
- cfd.set_d_str_func = NULL;
- cfd.remove_d_str_func = NULL;
- cfd.fsp = fsp;
- cfd.strip_name_from_text = rp->strip_name_from_text;
- cfd.name_field_func = NULL;
- cfd.text_portion = rp->text_portion;
- cfd.remove_parsed = rp->remove_parsed;
+ cfd.src_field_list = rp->field_list;
+ cfd.dst_field_list = rp->field_list_to;
+ cfd.etp = NULL;
+ cfd.get_str_func = GetRNAFieldString;
+ cfd.set_str_func = SetRNAFieldString;
+ cfd.remove_str_func = RemoveRNAField;
+ cfd.get_d_str_func = NULL;
+ cfd.set_d_str_func = NULL;
+ cfd.remove_d_str_func = NULL;
+ cfd.fsp = fsp;
+ cfd.strip_name_from_text = FALSE;
+ cfd.name_field_func = NULL;
+ cfd.text_portion = rp->text_portion;
+ cfd.remove_parsed = rp->remove_parsed;
- if (action_choice == AECR_CONVERT)
- {
- if (rp->leave_on_original)
- {
- cfd.convert_type = CONVERT_TYPE_COPY;
- }
- else
- {
- cfd.convert_type = CONVERT_TYPE_MOVE;
- }
- }
- else if (action_choice == AECR_SWAP)
+ if (action_choice == AECR_CONVERT)
+ {
+ if (rp->leave_on_original)
{
- cfd.convert_type = CONVERT_TYPE_SWAP;
+ cfd.convert_type = CONVERT_TYPE_COPY;
}
- else if (action_choice == AECR_PARSE)
+ else
{
- cfd.convert_type = CONVERT_TYPE_PARSE;
+ cfd.convert_type = CONVERT_TYPE_MOVE;
}
-
- if (cfd.convert_type == CONVERT_TYPE_MOVE || cfd.convert_type == CONVERT_TYPE_COPY || cfd.convert_type == CONVERT_TYPE_PARSE)
+ }
+ else if (action_choice == AECR_SWAP)
+ {
+ cfd.convert_type = CONVERT_TYPE_SWAP;
+ }
+ else if (action_choice == AECR_PARSE)
+ {
+ cfd.convert_type = CONVERT_TYPE_PARSE;
+ }
+
+ if (cfd.convert_type == CONVERT_TYPE_MOVE || cfd.convert_type == CONVERT_TYPE_COPY || cfd.convert_type == CONVERT_TYPE_PARSE)
+ {
+ /* get existing text sample */
+ ccd.cfp = &cfd;
+ ccd.gsp = GetSampleNew();
+
+ for (vnp_rna = rna_list; vnp_rna != NULL; vnp_rna = vnp_rna->next)
{
- /* get existing text sample */
- gsp_sum = NULL;
- for (vnp = rp->subtype_list; vnp != NULL; vnp = vnp->next)
- {
- gsp = CheckForConversionExistingTextInSeqEntry (sep, &cfd, fsp,
- SEQFEAT_RNA,
- vnp->data.intvalue,
- 0);
- gsp_new = GetSampleAdd (gsp_sum, gsp);
- gsp = GetSampleFree (gsp);
- gsp_sum = GetSampleFree (gsp_sum);
- gsp_sum = gsp_new;
- }
- cfd.etp = GetExistingTextHandlerInfo (gsp_sum == NULL ? 0 : gsp_sum->num_found, FALSE);
- gsp_sum = GetSampleFree (gsp_sum);
- if (cfd.etp != NULL && cfd.etp->existing_text_choice == eExistingTextChoiceCancel)
- {
- rval = FALSE;
- }
+ sfp = vnp_rna->data.ptrvalue;
+ GetConversionConflictsFeatureCallback (sfp, &ccd, fsp);
}
- else
- {
- cfd.etp = NULL;
- }
-
- if (rval)
+ cfd.etp = GetExistingTextHandlerInfo (ccd.gsp == NULL ? 0 : ccd.gsp->num_found, FALSE);
+ ccd.gsp = GetSampleFree (ccd.gsp);
+ if (cfd.etp != NULL && cfd.etp->existing_text_choice == eExistingTextChoiceCancel)
{
- for (vnp = rp->subtype_list; vnp != NULL; vnp = vnp->next)
- {
- OperateOnSeqEntryConstrainedObjects (sep, fsp,
- ConvertFeatureFieldCallback, NULL,
- SEQFEAT_RNA, vnp->data.intvalue,
- 0, &cfd);
- }
+ rval = FALSE;
}
}
else
{
- avd.field_list = rp->field_list;
- avd.etp = NULL;
- AddEditApplyDataToApplyValue (action_choice, rp->edit_apply, &avd);
-
- for (vnp = rp->subtype_list; vnp != NULL; vnp = vnp->next)
+ cfd.etp = NULL;
+ }
+
+ if (rval)
+ {
+ for (vnp_rna = rna_list; vnp_rna != NULL; vnp_rna = vnp_rna->next)
{
- if (action_choice == AECR_EDIT)
- {
- OperateOnSeqEntryConstrainedObjects (sep, fsp, SetRNAFieldString,
- NULL, SEQFEAT_RNA, vnp->data.intvalue, 0, &avd);
- }
- else if (action_choice == AECR_REMOVE)
- {
- OperateOnSeqEntryConstrainedObjects (sep, fsp, RemoveRNAField,
- NULL, SEQFEAT_RNA, vnp->data.intvalue, 0, &avd);
- }
+ sfp = vnp_rna->data.ptrvalue;
+ ConvertFeatureFieldCallback (sfp, &cfd, fsp);
}
- avd.text_to_replace = MemFree (avd.text_to_replace);
- avd.new_text = MemFree (avd.new_text);
}
- FilterSetFree (fsp);
return rval;
+}
+
+static Boolean RNAQualEditRemoveList
+(ValNodePtr rna_list,
+ AECRRNAQualPtr rp,
+ Int4 action_choice,
+ FilterSetPtr fsp)
+{
+ SeqFeatPtr sfp;
+ ValNodePtr vnp_rna;
+ ApplyValueData avd;
+ Boolean rval = TRUE;
+
+ if (rna_list == NULL
+ || rp == NULL
+ || (action_choice != AECR_EDIT && action_choice != AECR_REMOVE)
+ || rp->field_list == NULL)
+ {
+ return FALSE;
+ }
+
+ avd.where_to_replace = EditApplyFindLocation_anywhere;
+ avd.field_list = rp->field_list;
+ avd.etp = NULL;
+ AddEditApplyDataToApplyValue (action_choice, rp->edit_apply, &avd);
+
+ for (vnp_rna = rna_list; vnp_rna != NULL; vnp_rna = vnp_rna->next)
+ {
+ sfp = vnp_rna->data.ptrvalue;
+ if (action_choice == AECR_EDIT)
+ {
+ SetRNAFieldString (sfp, &avd, fsp);
+ }
+ else if (action_choice == AECR_REMOVE)
+ {
+ RemoveRNAField (sfp, &avd, fsp);
+ }
+ }
+
+ avd.text_to_replace = MemFree (avd.text_to_replace);
+ avd.new_text = MemFree (avd.new_text);
+ return TRUE;
}
+
+
+
static Boolean AcceptRNAQualApplyEditRemoveConvert (Pointer userdata)
{
ApplyEditConvertRemovePtr ap;
- SimpleAECRPtr rp = NULL;
+ AECRRNAQualPtr rp;
Int4 action_choice;
Boolean rval = TRUE;
+ FilterSetPtr fsp;
+ ValNodePtr rna_list;
+ SeqEntryPtr sep;
ap = (ApplyEditConvertRemovePtr) userdata;
if (ap == NULL)
@@ -27906,16 +29341,26 @@ static Boolean AcceptRNAQualApplyEditRemoveConvert (Pointer userdata)
{
action_choice = GetValue (ap->action_popup);
}
+
+ rp = (AECRRNAQualPtr) DialogToPointer (ap->aecr_pages[action_choice - 1]);
+ if (rp == NULL) return FALSE;
+
+ fsp = (FilterSetPtr) DialogToPointer (ap->constraints);
+ sep = GetTopSeqEntryForEntityID (ap->input_entityID);
+ rna_list = GetRNAFeatureList (sep, fsp, rp->rna_type);
if (action_choice == AECR_APPLY)
{
- rval = AcceptRNAApply (ap);
+ rval = ApplyToRNAList (rna_list, rp, fsp);
+ }
+ else if (action_choice == AECR_CONVERT || action_choice == AECR_SWAP
+ || action_choice == AECR_PARSE)
+ {
+ rval = RNAQualConvertSwapParseList (rna_list, rp, action_choice, fsp);
}
else if (action_choice > AECR_APPLY && action_choice <= NUM_AECR)
{
- rp = (SimpleAECRPtr) DialogToPointer (ap->aecr_pages[action_choice - 1]);
- rval = AcceptRNAQualEditRemoveConvert (ap, action_choice, rp);
- rp = SimpleAECRFree (rp);
+ rval = RNAQualEditRemoveList (rna_list, rp, action_choice, fsp);
}
if (rval)
@@ -28002,7 +29447,7 @@ typedef struct removegbqual
{
ValNodePtr field_list;
ValNodePtr subtype_list;
- StringConstraintPtr scp;
+ StringConstraintXPtr scp;
Boolean use_field_list;
} RemoveGBQualData, PNTR RemoveGBQualPtr;
@@ -28012,7 +29457,7 @@ static RemoveGBQualPtr RemoveGBQualFree (RemoveGBQualPtr ap)
{
ap->field_list = ValNodeFree (ap->field_list);
ap->subtype_list = ValNodeFree (ap->subtype_list);
- ap->scp = StringConstraintFree (ap->scp);
+ ap->scp = StringConstraintXFree (ap->scp);
ap = MemFree (ap);
}
return ap;
@@ -28248,7 +29693,7 @@ static DialoG GBQualRemoveDialog
dlg->field_list = GBQualSelectionDialog (dlg->list_or_txt_grp, FALSE,
change_notify,
change_userdata);
- dlg->qual_name_constraint = StringConstraintDialog (dlg->list_or_txt_grp, "Where qualifier name contains", FALSE);
+ dlg->qual_name_constraint = StringConstraintDialogX (dlg->list_or_txt_grp, "Where qualifier name contains", FALSE);
SetValue (dlg->list_or_txt_grp, 1);
Disable (dlg->qual_name_constraint);
@@ -28713,6 +30158,162 @@ extern void RemoveGBQual (IteM i)
}
+static CharPtr alltargetsTabs [] = {
+ "BioSource", "GenBank Qualifiers", "RNA Qualifiers", "CDS-Gene-Prot-mRNA", NULL
+};
+
+typedef enum
+{
+ eAllTargetsAllActions_BioSource = 0,
+ eAllTargetsAllActions_GBQual,
+ eAllTargetsAllActions_RNAQual,
+ eAllTargetsAllActions_CDSGeneProtmRNA,
+ eNumAllTargetsAllActions
+} EAllTargetsAllActions;
+
+typedef struct allactionsalltargetsdlg
+{
+ DIALOG_MESSAGE_BLOCK
+ DialoG tbs; /* folder tab for switching between target types */
+ Int2 currentPage;
+ GrouP target_pages [eNumAllTargetsAllActions];
+ DialoG aecr_pages [NUM_AECR * eNumAllTargetsAllActions];
+ PopuP action_popup;
+
+ DialoG accept_cancel;
+ DialoG constraints;
+ ButtoN clear_constraints_on_action_change;
+ Nlm_ChangeAECRActionProc change_action;
+ Int4 prev_page;
+ Boolean crippled;
+ Int4 crippled_action;
+ Uint2 entityID;
+ Nlm_ChangeNotifyProc change_notify;
+ Pointer change_userdata;
+} AllActionsAllTargetsDlgData, PNTR AllActionsAllTargetsDlgPtr;
+
+
+static void ChangeAllActionsAllTargetsTarget (VoidPtr data, Int2 newval, Int2 oldval)
+{
+ AllActionsAllTargetsDlgPtr dlg;
+
+ dlg = (AllActionsAllTargetsDlgPtr) data;
+ if (dlg != NULL) {
+ dlg->currentPage = newval;
+ SafeHide (dlg->target_pages [oldval]);
+ SafeShow (dlg->target_pages [newval]);
+ Update ();
+ if (dlg->change_notify != NULL) {
+ (dlg->change_notify) (dlg->change_userdata);
+ }
+ }
+}
+
+static void ChangeAllActionsAllTargetsAction (PopuP p)
+{
+ AllActionsAllTargetsDlgPtr dlg;
+ Int4 i;
+
+ dlg = (AllActionsAllTargetsDlgPtr) GetObjectExtra (p);
+ if (dlg == NULL) return;
+
+ for (i = 0; i < NUM_AECR; i++)
+ {
+ Hide (dlg->aecr_pages[(dlg->currentPage * NUM_AECR) + i]);
+ }
+ i = GetValue (dlg->action_popup);
+ if (i > 0 && i <= NUM_AECR)
+ {
+ Show (dlg->aecr_pages[(dlg->currentPage * NUM_AECR) + i - 1]);
+ SendMessageToDialog (dlg->aecr_pages[(dlg->currentPage * NUM_AECR) + i - 1], VIB_MSG_ENTER);
+ }
+
+}
+
+static DialoG AllActionsAllTargetsDialog (GrouP h, Uint2 entityID, Nlm_ChangeNotifyProc change_notify, Pointer change_userdata)
+{
+ AllActionsAllTargetsDlgPtr dlg;
+ GrouP p, g;
+ Int4 i;
+
+ dlg = (AllActionsAllTargetsDlgPtr) MemNew (sizeof (AllActionsAllTargetsDlgData));
+
+ p = HiddenGroup (h, -1, 0, NULL);
+ SetObjectExtra (p, dlg, StdCleanupExtraProc);
+ SetGroupSpacing (p, 10, 10);
+
+ dlg->dialog = (DialoG) p;
+ dlg->todialog = NULL;
+ dlg->fromdialog = NULL;
+ dlg->dialogmessage = NULL;
+ dlg->testdialog = NULL;
+ dlg->change_notify = change_notify;
+ dlg->change_userdata = change_userdata;
+ dlg->entityID = entityID;
+
+ dlg->action_popup = PopupList (p, TRUE, ChangeAllActionsAllTargetsAction);
+ SetObjectExtra (dlg->action_popup, dlg, NULL);
+ PopupItem (dlg->action_popup, "Apply");
+ PopupItem (dlg->action_popup, "Edit");
+ PopupItem (dlg->action_popup, "Convert");
+ PopupItem (dlg->action_popup, "Swap");
+ PopupItem (dlg->action_popup, "Parse");
+ PopupItem (dlg->action_popup, "Remove");
+ SetValue (dlg->action_popup, 1);
+
+
+ dlg->tbs = CreateFolderTabs (p, alltargetsTabs, eAllTargetsAllActions_BioSource,
+ 0, 0, SYSTEM_FOLDER_TAB,
+ ChangeAllActionsAllTargetsTarget, (Pointer) dlg);
+
+ g = HiddenGroup (p, 0, 0, NULL);
+ dlg->target_pages[eAllTargetsAllActions_BioSource] = HiddenGroup (g, 0, 0, NULL);
+ for (i = 0; i < NUM_AECR; i++)
+ {
+ dlg->aecr_pages[(eAllTargetsAllActions_BioSource * NUM_AECR) + i]
+ = SourceQualAECRDialog (dlg->target_pages[eAllTargetsAllActions_BioSource],
+ i + 1, change_notify, change_userdata, entityID);
+ Hide (dlg->aecr_pages[(eAllTargetsAllActions_BioSource * NUM_AECR) + i]);
+ }
+
+ dlg->target_pages[eAllTargetsAllActions_GBQual] = HiddenGroup (g, 0, 0, NULL);
+ for (i = 0; i < NUM_AECR; i++)
+ {
+ dlg->aecr_pages[(eAllTargetsAllActions_GBQual * NUM_AECR) + i]
+ = GBQualListDialog (dlg->target_pages[eAllTargetsAllActions_GBQual],
+ i + 1, change_notify, change_userdata, entityID);
+ Hide (dlg->aecr_pages[(eAllTargetsAllActions_GBQual * NUM_AECR) + i]);
+ }
+
+ dlg->target_pages[eAllTargetsAllActions_RNAQual] = HiddenGroup (g, 0, 0, NULL);
+ for (i = 0; i < NUM_AECR; i++)
+ {
+ dlg->aecr_pages[(eAllTargetsAllActions_RNAQual * NUM_AECR) + i]
+ = RNAQualListDialog (dlg->target_pages[eAllTargetsAllActions_RNAQual],
+ i + 1, change_notify, change_userdata, entityID);
+ Hide (dlg->aecr_pages[(eAllTargetsAllActions_RNAQual * NUM_AECR) + i]);
+ }
+
+ dlg->target_pages[eAllTargetsAllActions_CDSGeneProtmRNA] = HiddenGroup (g, 0, 0, NULL);
+ for (i = 0; i < NUM_AECR; i++)
+ {
+ dlg->aecr_pages[(eAllTargetsAllActions_CDSGeneProtmRNA * NUM_AECR) + i]
+ = CDSGeneProtAECRDialog (dlg->target_pages[eAllTargetsAllActions_CDSGeneProtmRNA],
+ i + 1, change_notify, change_userdata, entityID);
+ Hide (dlg->aecr_pages[(eAllTargetsAllActions_CDSGeneProtmRNA * NUM_AECR) + i]);
+ }
+
+ AlignObjects (ALIGN_CENTER, (HANDLE) dlg->tbs, (HANDLE) g, NULL);
+
+ return (DialoG) p;
+}
+
+
+extern void AllActionsAllTargets (IteM i)
+{
+
+}
+
typedef struct locustagtooldlocustag
{
FORM_MESSAGE_BLOCK
@@ -29053,7 +30654,7 @@ typedef struct combinecds
Int2 action_choice;
Boolean cover_sequence;
- StringConstraintPtr string_constraint;
+ StringConstraintXPtr string_constraint;
LogInfoPtr lip;
/* for string constraint */
@@ -29097,7 +30698,7 @@ static void GetCombinedCDSLocationCallback (SeqFeatPtr sfp, Pointer userdata)
&& !DoesObjectMatchStringConstraint (ccp->omtp, ccp->aip, sfp, &(ccp->ohsd)))
{
sfp = SeqMgrGetDesiredFeature (ccp->input_entityID, NULL, 0, 0, sfp, &fcontext);
- if (sfp == NULL || !DoesStringMatchConstraint (fcontext.label, ccp->ohsd.scp))
+ if (sfp == NULL || !DoesStringMatchConstraintX (fcontext.label, ccp->ohsd.scp))
{
return;
}
@@ -29340,7 +30941,7 @@ static void DoCombineCDS (ButtoN b)
CloseLog (ccp->lip);
FreeLog (ccp->lip);
- ccp->string_constraint = StringConstraintFree (ccp->string_constraint);
+ ccp->string_constraint = StringConstraintXFree (ccp->string_constraint);
Remove (ccp->form);
DeleteMarkedObjects (ccp->input_entityID, 0, NULL);
ObjMgrSetDirtyFlag (ccp->input_entityID, TRUE);
@@ -29428,7 +31029,7 @@ extern void CombineMultipleCDS (IteM i)
SetValue (ccp->prod_name_choice_grp, 1);
Disable (ccp->prod_name_txt);
- ccp->string_constraint_dlg = StringConstraintDialog (ccp->new_cds_grp, "Where CDS field", TRUE);
+ ccp->string_constraint_dlg = StringConstraintDialogX (ccp->new_cds_grp, "Where CDS field", TRUE);
Disable (ccp->new_cds_grp);
AlignObjects (ALIGN_CENTER, (HANDLE) ccp->cover_sequence_btn,
@@ -29715,7 +31316,7 @@ static void CombineClickableLists (ValNodePtr PNTR list1, ValNodePtr list2)
if (cip2 != NULL) {
cip1 = FindExistingCategory (cip2->description, *list1);
if (cip1 == NULL) {
- ValNodeAddPointer (list1, 0, cip1);
+ ValNodeAddPointer (list1, 0, cip2);
vnp->data.ptrvalue = NULL;
} else {
CombineClickableItemLists (&(cip1->item_list), cip2->item_list);
@@ -29883,6 +31484,15 @@ GetUniqueValueListForSeqEntry
SEQFEAT_BIOSRC, 0,
Seq_descr_source);
break;
+ case PARSE_FIELD_DBXREF:
+ unique_values = CheckForUniqueValuesInSeqEntry (sep, dst_field_data->feature_field,
+ GetBioSourceFeatureDbxrefString,
+ GetBioSourceDescriptorDbxrefString,
+ ValNodeSimpleDataFree,
+ ValNodeStringCopy,
+ fsp,
+ SEQFEAT_BIOSRC, 0, Seq_descr_source);
+ break;
case PARSE_FIELD_GENE_FIELD:
unique_values = CheckForUniqueValuesInSeqEntry (sep,
dst_field_data->feature_field,
@@ -29892,14 +31502,16 @@ GetUniqueValueListForSeqEntry
fsp,
SEQFEAT_GENE, 0, 0);
break;
- case PARSE_FIELD_MRNA_FIELD:
+ case PARSE_FIELD_RNA_FIELD:
unique_values = CheckForUniqueValuesInSeqEntry (sep,
dst_field_data->feature_field,
- GetmRNAFieldString,
+ GetRNAFieldString,
NULL,
NULL, IntValNodeCopy,
fsp,
- SEQFEAT_RNA, FEATDEF_mRNA, 0);
+ SEQFEAT_RNA,
+ dst_field_data->feature_subtype == NULL ? 0 : dst_field_data->feature_subtype->data.intvalue,
+ 0);
break;
case PARSE_FIELD_CDS_COMMENT:
unique_values = CheckForUniqueValuesInSeqEntry (sep,
@@ -30497,7 +32109,7 @@ static void AddNewUniqueDescriptors (SeqDescrPtr PNTR new_set, SeqDescrPtr paren
sdp_next = sdp->next;
sdp->next = NULL;
for (sdp_tmp = *new_set, found_match = FALSE;
- sdp != NULL && !found_match;
+ sdp_tmp != NULL && !found_match;
sdp_tmp = sdp_tmp->next) {
sdp_tmp_next = sdp_tmp->next;
sdp_tmp->next = NULL;
@@ -30536,6 +32148,62 @@ static void AddNewUniqueDescriptorsToSeqEntry (SeqEntryPtr sep, SeqDescrPtr pare
}
}
+static void AddNewUniqueAnnotations (SeqAnnotPtr PNTR new_set, SeqAnnotPtr parent_set)
+{
+ SeqAnnotPtr sap, sap_next, sap_tmp, sap_tmp_next, sap_copy, last_sap;
+ Boolean found_match;
+
+ if (new_set == NULL || parent_set == NULL) return;
+
+ sap = parent_set;
+ while (sap != NULL) {
+ sap_next = sap->next;
+ sap->next = NULL;
+ last_sap = NULL;
+ for (sap_tmp = *new_set, found_match = FALSE;
+ sap_tmp != NULL && !found_match;
+ sap_tmp = sap_tmp->next) {
+ sap_tmp_next = sap_tmp->next;
+ sap_tmp->next = NULL;
+ if (AsnIoMemComp (sap, sap_tmp, (AsnWriteFunc) SeqAnnotAsnWrite)) {
+ found_match = TRUE;
+ }
+ sap_tmp->next = sap_tmp->next;
+ last_sap = sap_tmp;
+ }
+ if (!found_match) {
+ sap_copy = (SeqAnnotPtr) AsnIoMemCopy ((Pointer) sap, (AsnReadFunc) SeqAnnotAsnRead, (AsnWriteFunc) SeqAnnotAsnWrite);
+ if (last_sap == NULL) {
+ *new_set = sap_copy;
+ } else {
+ last_sap->next = sap_copy;
+ }
+ }
+ sap->next = sap_next;
+ sap = sap->next;
+ }
+}
+
+
+static void AddNewUniqueAnnotationsToSeqEntry (SeqEntryPtr sep, SeqAnnotPtr parent_set)
+{
+ BioseqPtr bsp;
+ BioseqSetPtr bssp;
+
+ if (IS_Bioseq(sep)) {
+ bsp = (BioseqPtr) sep->data.ptrvalue;
+ if (bsp != NULL) {
+ AddNewUniqueAnnotations (&(bsp->annot), parent_set);
+ }
+ } else if (IS_Bioseq_set (sep)) {
+ bssp = (BioseqSetPtr) sep->data.ptrvalue;
+ if (bssp != NULL) {
+ AddNewUniqueAnnotations (&(bssp->annot), parent_set);
+ }
+ }
+}
+
+
static void AddCategorySeqEntriesToSet (BioseqSetPtr newset, ClickableItemPtr category)
{
ValNodePtr vnp_item;
@@ -30597,6 +32265,9 @@ static void AddCategorySeqEntriesToSet (BioseqSetPtr newset, ClickableItemPtr ca
/* add descriptors from the orig_parent to the new parent */
AddNewUniqueDescriptors (&(newset->descr), orig_parent->descr);
+ /* add annotations from the orig_parent to the new parent */
+ AddNewUniqueAnnotations (&(newset->annot), orig_parent->annot);
+
/* add to new parent */
sep->next = NULL;
if (last_sep == NULL) {
@@ -30772,13 +32443,21 @@ static BioseqSetPtr MakeGroupsForUniqueValues
return parent_set;
}
-#define NUM_SEG_PAGES 6
+typedef enum {
+ eSegPageId = 1,
+ eSegPageText,
+ eSegPageField,
+ eSegPageMolInfo,
+ eSegPageFeatureType,
+ eSegPageDescriptorType,
+ eNumSegPages
+} ESegPage;
typedef struct segbyfield {
FORM_MESSAGE_BLOCK
GrouP seg_choice_grp;
- GrouP pages[NUM_SEG_PAGES];
+ GrouP pages[eNumSegPages];
/* for segregating by field */
DialoG field_dlg;
DialoG group_list_dlg;
@@ -30799,7 +32478,6 @@ typedef struct segbyfield {
/* for segregating by ID */
DialoG id_constraint;
- TexT id_txt;
ButtoN accept;
ButtoN leave_dlg_up;
@@ -30891,7 +32569,7 @@ static void SegregateByField_Callback (ButtoN b)
}
}
- if (GetValue (sfp->seg_choice_grp) == 6) {
+ if (GetValue (sfp->seg_choice_grp) == eSegPageId) {
/* put all selected sequences into one group */
cip = (ClickableItemPtr) MemNew (sizeof (ClickableItemData));
cip->chosen = TRUE;
@@ -30998,7 +32676,7 @@ static void SegTextChange (TexT t)
}
-static void ListAllSequences (BioseqPtr bsp, Pointer userdata)
+extern void ListAllSequences (BioseqPtr bsp, Pointer userdata)
{
ClickableItemPtr cip;
Char id_str[100];
@@ -31006,7 +32684,7 @@ static void ListAllSequences (BioseqPtr bsp, Pointer userdata)
if (bsp != NULL && userdata != NULL && ! ISA_aa (bsp->mol))
{
cip = (ClickableItemPtr) MemNew (sizeof (ClickableItemData));
- SeqIdWrite (SeqIdFindBest (bsp->id, 0), id_str, PRINTID_REPORT, sizeof (id_str) - 1);
+ SeqIdWrite (SeqIdFindBest (bsp->id, SEQID_GENBANK), id_str, PRINTID_REPORT, sizeof (id_str) - 1);
cip->description = StringSave (id_str);
ValNodeAddPointer (&(cip->item_list), OBJ_BIOSEQ, bsp);
@@ -31196,7 +32874,7 @@ static void ChangeSegChoice (GrouP g)
seg_choice = GetValue (sfp->seg_choice_grp);
- for (i = 0; i < NUM_SEG_PAGES; i++) {
+ for (i = 0; i < eNumSegPages; i++) {
if (i == seg_choice - 1) {
Show (sfp->pages[i]);
} else {
@@ -31204,29 +32882,38 @@ static void ChangeSegChoice (GrouP g)
}
}
switch (seg_choice) {
- case 1:
+ case eSegPageField:
ChangeSegField (sfp);
break;
- case 2:
+ case eSegPageMolInfo:
ChangeMol(sfp->mol_class_btn);
break;
- case 3:
+ case eSegPageFeatureType:
SegFeatureChangeNotify (sfp);
break;
- case 4:
+ case eSegPageDescriptorType:
SegDescriptorChangeNotify (sfp);
break;
- case 5:
+ case eSegPageText:
SegTextChangeNotify (sfp);
break;
- case 6:
+ case eSegPageId:
ChooseSegId (sfp);
break;
}
+ if (seg_choice == eSegPageId) {
+ SetClickableListDialogTitles (sfp->group_list_dlg, "Sequences for New Set", "",
+ "Use checkbox to mark sequences for new set",
+ "Single click to navigate to sequence in record");
+ } else {
+ SetClickableListDialogTitles (sfp->group_list_dlg, "New Sets", "Sequences in Highlighted Set",
+ "Use checkbox to mark sets to create",
+ "");
+ }
}
-static void ChooseCategories (ValNodePtr value_list, Boolean do_choose)
+extern void ChooseCategories (ValNodePtr value_list, Boolean do_choose)
{
ClickableItemPtr cip;
@@ -31241,7 +32928,7 @@ static void ChooseCategories (ValNodePtr value_list, Boolean do_choose)
}
-static void ChooseCategoriesByStringConstraint (ValNodePtr value_list, StringConstraintPtr scp, Boolean do_choose)
+extern void ChooseCategoriesByStringConstraint (ValNodePtr value_list, StringConstraintXPtr scp, Boolean do_choose)
{
ClickableItemPtr cip;
@@ -31289,7 +32976,7 @@ static void UnselectSegCategories (ButtoN b)
static void SelectSequenceIDsForSegregate (ButtoN b)
{
SegByFieldPtr sfp;
- StringConstraintPtr scp;
+ StringConstraintXPtr scp;
sfp = (SegByFieldPtr) GetObjectExtra (b);
if (sfp == NULL) return;
@@ -31297,65 +32984,10 @@ static void SelectSequenceIDsForSegregate (ButtoN b)
scp = DialogToPointer (sfp->id_constraint);
ChooseCategoriesByStringConstraint (sfp->value_lists, scp, TRUE);
PointerToDialog (sfp->group_list_dlg, sfp->value_lists);
- scp = StringConstraintFree (scp);
+ scp = StringConstraintXFree (scp);
}
-static void ChooseCategoriesBySeqIdList (ValNodePtr list, ValNodePtr sip_list, Boolean do_choose)
-{
- ValNodePtr vnp, vnp_id;
- ClickableItemPtr cip;
- BioseqPtr bsp;
- Boolean match;
-
- for (vnp = list; vnp != NULL; vnp = vnp->next)
- {
- cip = (ClickableItemPtr) vnp->data.ptrvalue;
- if (cip != NULL)
- {
- match = FALSE;
- if (cip->item_list != NULL && cip->item_list->choice == OBJ_BIOSEQ
- && cip->item_list->data.ptrvalue != NULL)
- {
- bsp = (BioseqPtr) cip->item_list->data.ptrvalue;
- for (vnp_id = sip_list; vnp_id != NULL && !match; vnp_id = vnp_id->next)
- {
- if (SeqIdIn (vnp_id->data.ptrvalue, bsp->id))
- {
- match = TRUE;
- }
- }
- }
- if (match)
- {
- cip->chosen = do_choose;
- }
- else
- {
- ChooseCategoriesBySeqIdList (cip->subcategories, sip_list, do_choose);
- }
- }
- }
-}
-
-
-static void SelectSequenceIDRangeForSegregate (ButtoN b)
-{
- SegByFieldPtr sfp;
- ValNodePtr sip_list;
- CharPtr id_str;
-
- sfp = (SegByFieldPtr) GetObjectExtra (b);
- if (sfp == NULL) return;
-
- id_str = SaveStringFromText (sfp->id_txt);
- sip_list = ParseAccessionNumberListFromString (id_str, SeqMgrGetSeqEntryForData (sfp->target_set));
-
- ChooseCategoriesBySeqIdList (sfp->value_lists, sip_list, TRUE);
- PointerToDialog (sfp->group_list_dlg, sfp->value_lists);
- sip_list = FreeSeqIdList (sip_list);
-}
-
static void CleanupSegregateByFieldForm (GraphiC g, VoidPtr data)
{
@@ -31374,12 +33006,13 @@ extern Int2 LIBCALLBACK SegregateSetsByField (Pointer data)
{
GrouP c;
SegByFieldPtr cfp;
- GrouP h, k, page_grp, g1, g2;
+ GrouP h, k, page_grp, g1, g2, g3;
OMProcControlPtr ompcp;
PrompT p, p2;
StdEditorProcsPtr sepp;
WindoW w;
ButtoN b;
+ StringConstraintData scd;
/* Check parameters and get a pointer to the current data */
@@ -31423,77 +33056,87 @@ extern Int2 LIBCALLBACK SegregateSetsByField (Pointer data)
h = HiddenGroup (w, -1, 0, NULL);
SetGroupSpacing (h, 10, 10);
- cfp->group_list_dlg = CreateClickableListDialog (h, "Groups", "Sequences",
- ScrollToDiscrepancyItem, EditDiscrepancyItem, NULL,
- GetDiscrepancyItemText);
-
- cfp->seg_choice_grp = HiddenGroup (h, NUM_SEG_PAGES, 0, ChangeSegChoice);
+ cfp->group_list_dlg = CreateClickableListDialogEx (h, "New Sets", "Sequences for New Set",
+ "Use checkbox to mark sets to create",
+ "",
+ ScrollToDiscrepancyItem, EditDiscrepancyItem, NULL,
+ GetDiscrepancyItemText,
+ stdCharWidth * 30,
+ stdCharWidth * 30 + 5,
+ TRUE, FALSE);
+
+ g3 = NormalGroup (h, 2, 0, "", programFont, NULL);
+ SetGroupSpacing (g3, 10, 10);
+ StaticPrompt (g3, "Segregate Based on", 0, dialogTextHeight, programFont, 'c');
+ cfp->seg_choice_grp = HiddenGroup (g3, eNumSegPages, 0, ChangeSegChoice);
SetObjectExtra (cfp->seg_choice_grp, cfp, NULL);
SetGroupSpacing (cfp->seg_choice_grp, 10, 10);
+ RadioButton (cfp->seg_choice_grp, "ID");
+ RadioButton (cfp->seg_choice_grp, "Text");
RadioButton (cfp->seg_choice_grp, "Field");
RadioButton (cfp->seg_choice_grp, "MolInfo");
RadioButton (cfp->seg_choice_grp, "Feature Type");
RadioButton (cfp->seg_choice_grp, "Descriptor Type");
- RadioButton (cfp->seg_choice_grp, "Text");
- RadioButton (cfp->seg_choice_grp, "ID");
page_grp = HiddenGroup (h, 0, 0, NULL);
/* identical fields */
- cfp->pages[0] = HiddenGroup (page_grp, 2, 0, NULL);
- SetGroupSpacing (cfp->pages[0], 10, 10);
- p = StaticPrompt (cfp->pages[0], "Segregate sequences with identical", 0, dialogTextHeight,
+ cfp->pages[eSegPageField - 1] = HiddenGroup (page_grp, 2, 0, NULL);
+ SetGroupSpacing (cfp->pages[eSegPageField - 1], 10, 10);
+ p = StaticPrompt (cfp->pages[eSegPageField - 1], "Segregate sequences with identical", 0, dialogTextHeight,
programFont, 'c');
- cfp->field_dlg = ParseFieldDestDialog (cfp->pages[0], ChangeSegField, cfp);
+ cfp->field_dlg = ParseFieldDestDialog (cfp->pages[eSegPageField - 1], ChangeSegField, cfp);
/* molinfo */
- cfp->pages[1] = HiddenGroup (page_grp, 0, 2, NULL);
- SetGroupSpacing (cfp->pages[1], 10, 10);
- cfp->mol_class_btn = CheckBox (cfp->pages[1], "Molecule Class", ChangeMol);
+ cfp->pages[eSegPageMolInfo - 1] = HiddenGroup (page_grp, 0, 2, NULL);
+ SetGroupSpacing (cfp->pages[eSegPageMolInfo - 1], 10, 10);
+ cfp->mol_class_btn = CheckBox (cfp->pages[eSegPageMolInfo - 1], "Molecule Class", ChangeMol);
SetObjectExtra (cfp->mol_class_btn, cfp, NULL);
SetStatus (cfp->mol_class_btn, TRUE);
- cfp->mol_type_btn = CheckBox (cfp->pages[1], "Molecule Type", ChangeMol);
+ cfp->mol_type_btn = CheckBox (cfp->pages[eSegPageMolInfo - 1], "Molecule Type", ChangeMol);
SetObjectExtra (cfp->mol_type_btn, cfp, NULL);
SetStatus (cfp->mol_type_btn, TRUE);
/* features */
- cfp->pages[2] = HiddenGroup (page_grp, 2, 0, NULL);
- SetGroupSpacing (cfp->pages[2], 10, 10);
- StaticPrompt (cfp->pages[2], "Segregate by Feature", 0, dialogTextHeight,
+ cfp->pages[eSegPageFeatureType - 1] = HiddenGroup (page_grp, 2, 0, NULL);
+ SetGroupSpacing (cfp->pages[eSegPageFeatureType - 1], 10, 10);
+ StaticPrompt (cfp->pages[eSegPageFeatureType - 1], "Segregate by Feature", 0, dialogTextHeight,
programFont, 'c');
- cfp->feature_select = FeatureSelectionDialogEx (cfp->pages[2], FALSE, NULL,
+ cfp->feature_select = FeatureSelectionDialogEx (cfp->pages[eSegPageFeatureType - 1], FALSE, NULL,
SegFeatureChangeNotify,
cfp);
/* descriptors */
- cfp->pages[3] = HiddenGroup (page_grp, 2, 0, NULL);
- SetGroupSpacing (cfp->pages[3], 10, 10);
- StaticPrompt (cfp->pages[3], "Segregate by Descriptor", 0, dialogTextHeight,
+ cfp->pages[eSegPageDescriptorType - 1] = HiddenGroup (page_grp, 2, 0, NULL);
+ SetGroupSpacing (cfp->pages[eSegPageDescriptorType - 1], 10, 10);
+ StaticPrompt (cfp->pages[eSegPageDescriptorType - 1], "Segregate by Descriptor", 0, dialogTextHeight,
programFont, 'c');
- cfp->descriptor_select = DescriptorSelectionDialog (cfp->pages[3], FALSE,
+ cfp->descriptor_select = DescriptorSelectionDialog (cfp->pages[eSegPageDescriptorType - 1], FALSE,
SegDescriptorChangeNotify, cfp);
/* text */
- cfp->pages[4] = HiddenGroup (page_grp, 4, 0, NULL);
- SetGroupSpacing (cfp->pages[4], 10, 10);
- StaticPrompt (cfp->pages[4], "Create group with sequences where", 0, dialogTextHeight, programFont, 'l');
- cfp->search_text = DialogText (cfp->pages[4], "", 10, SegTextChange);
+ cfp->pages[eSegPageText - 1] = HiddenGroup (page_grp, 4, 0, NULL);
+ SetGroupSpacing (cfp->pages[eSegPageText - 1], 10, 10);
+ StaticPrompt (cfp->pages[eSegPageText - 1], "Create set with sequences where", 0, dialogTextHeight, programFont, 'l');
+ cfp->search_text = DialogText (cfp->pages[eSegPageText - 1], "", 10, SegTextChange);
SetObjectExtra (cfp->search_text, cfp, NULL);
- StaticPrompt (cfp->pages[4], "appears in", 0, dialogTextHeight, programFont, 'l');
- cfp->search_field = SearchFieldDialog (cfp->pages[4], SegTextChangeNotify, cfp);
+ StaticPrompt (cfp->pages[eSegPageText - 1], "appears in", 0, dialogTextHeight, programFont, 'l');
+ cfp->search_field = SearchFieldDialog (cfp->pages[eSegPageText - 1], SegTextChangeNotify, cfp);
/* id */
- cfp->pages[5] = HiddenGroup (page_grp, -1, 0, NULL);
- SetGroupSpacing (cfp->pages[5], 10, 10);
- p2 = StaticPrompt (cfp->pages[5], "Create group with selected sequences", 0, dialogTextHeight, programFont, 'l');
- g1 = HiddenGroup (cfp->pages[5], 3, 0, NULL);
- StaticPrompt (g1, "Select IDs in list", 0, dialogTextHeight, programFont, 'l');
- cfp->id_txt = DialogText (g1, "", 10, NULL);
- b = PushButton (g1, "Select", SelectSequenceIDRangeForSegregate);
- SetObjectExtra (b, cfp, NULL);
- g2 = HiddenGroup (cfp->pages[5], 2, 0, NULL);
- cfp->id_constraint = StringConstraintDialog (g2, "Select sequences where sequence ID", TRUE);
- b = PushButton (g2, "Select", SelectSequenceIDsForSegregate);
+ cfp->pages[eSegPageId - 1] = HiddenGroup (page_grp, -1, 0, NULL);
+ SetGroupSpacing (cfp->pages[eSegPageId - 1], 10, 10);
+ p2 = StaticPrompt (cfp->pages[eSegPageId - 1], "Create set with marked sequences", 0, dialogTextHeight, programFont, 'l');
+ g1 = HiddenGroup (cfp->pages[eSegPageId - 1], 3, 0, NULL);
+ g2 = HiddenGroup (cfp->pages[eSegPageId - 1], 2, 0, NULL);
+ cfp->id_constraint = StringConstraintDialogX (g2, "Mark sequences where sequence ID", TRUE);
+ scd.insensitive = TRUE;
+ scd.match_location = eStringConstraintInList;
+ scd.match_text = NULL;
+ scd.not_present = FALSE;
+ scd.whole_word = FALSE;
+ PointerToDialog (cfp->id_constraint, &scd);
+ b = PushButton (g2, "Mark", SelectSequenceIDsForSegregate);
SetObjectExtra (b, cfp, NULL);
AlignObjects (ALIGN_CENTER, (HANDLE) p2, (HANDLE) g1, (HANDLE) g2, NULL);
@@ -31506,13 +33149,12 @@ extern Int2 LIBCALLBACK SegregateSetsByField (Pointer data)
NULL);
SetValue (cfp->seg_choice_grp, 1);
- Hide (cfp->pages[1]);
/* add select all/unselect all buttons */
k = HiddenGroup (h, 2, 0, NULL);
- b = PushButton (k, "Select All", SelectSegCategories);
+ b = PushButton (k, "Mark All", SelectSegCategories);
SetObjectExtra (b, cfp, NULL);
- b = PushButton (k, "Unselect All", UnselectSegCategories);
+ b = PushButton (k, "Unmark All", UnselectSegCategories);
SetObjectExtra (b, cfp, NULL);
@@ -31527,7 +33169,7 @@ extern Int2 LIBCALLBACK SegregateSetsByField (Pointer data)
/* Line things up nicely */
- AlignObjects (ALIGN_CENTER, (HANDLE) cfp->seg_choice_grp,
+ AlignObjects (ALIGN_CENTER, (HANDLE) g3,
(HANDLE) cfp->group_list_dlg,
(HANDLE) page_grp,
(HANDLE) k,
@@ -31652,7 +33294,11 @@ static void FixCaseByFieldCallback (ButtoN b)
Update();
/* if we will be fixing capitalization, get org names to use in fixes */
- VisitBioSourcesInSep (sep, &(fcp->orgnames), GetOrgNamesInRecordCallback);
+ if (dst_field_data->parse_field_type != PARSE_FIELD_BIOSRC_STRING
+ || dst_field_data->feature_field == NULL
+ || dst_field_data->feature_field->data.intvalue != PARSE_FIELD_BIOSRC_TAXNAME) {
+ VisitBioSourcesInSep (sep, &(fcp->orgnames), GetOrgNamesInRecordCallback);
+ }
switch (dst_field_data->parse_field_type)
{
@@ -31699,6 +33345,19 @@ static void FixCaseByFieldCallback (ButtoN b)
SEQFEAT_BIOSRC, 0,
Seq_descr_source, fcp);
break;
+ case PARSE_FIELD_DBXREF:
+ fcp->fieldstring_func = GetBioSourceFeatureDbxrefString;
+ fcp->descrstring_func = GetBioSourceDescriptorDbxrefString;
+ fcp->feature_apply_action = ApplyBioSourceDbxrefFeatureCallback;
+ fcp->descriptor_apply_action = ApplyBioSourceDbxrefDescriptorCallback;
+ fcp->free_vn_proc = ValNodeSimpleDataFree;
+ fcp->copy_vn_proc = ValNodeStringCopy;
+ fcp->requested_field = dst_field_data->feature_field;
+ OperateOnSeqEntryConstrainedObjects (sep, fsp, FixCaseFeatureCallback,
+ FixCaseDescriptorCallback,
+ SEQFEAT_BIOSRC, 0,
+ Seq_descr_source, fcp);
+ break;
case PARSE_FIELD_GENE_FIELD:
fcp->fieldstring_func = GetGeneFieldString;
fcp->descrstring_func = NULL;
@@ -31712,17 +33371,18 @@ static void FixCaseByFieldCallback (ButtoN b)
SEQFEAT_GENE, 0,
0, fcp);
break;
- case PARSE_FIELD_MRNA_FIELD:
- fcp->fieldstring_func = GetmRNAFieldString;
+ case PARSE_FIELD_RNA_FIELD:
+ fcp->fieldstring_func = GetRNAFieldString;
fcp->descrstring_func = NULL;
- fcp->feature_apply_action = SetmRNAFieldString;
+ fcp->feature_apply_action = SetRNAFieldString;
fcp->descriptor_apply_action = NULL;
fcp->free_vn_proc = NULL;
fcp->copy_vn_proc = IntValNodeCopy;
fcp->requested_field = dst_field_data->feature_field;
OperateOnSeqEntryConstrainedObjects (sep, fsp, FixCaseFeatureCallback,
NULL,
- SEQFEAT_RNA, FEATDEF_mRNA,
+ SEQFEAT_RNA,
+ dst_field_data->feature_subtype == NULL ? 0 : dst_field_data->feature_subtype->data.intvalue,
0, fcp);
break;
case PARSE_FIELD_CDS_COMMENT:
@@ -31847,7 +33507,7 @@ extern void FixCaseByField (IteM i)
h = HiddenGroup (w, -1, 0, NULL);
SetGroupSpacing (h, 10, 10);
- cfp->field_dlg = ParseFieldDestDialog (h, NULL, NULL);
+ cfp->field_dlg = ParseFieldDestDialogEx (h, NULL, NULL, FALSE, TRUE);
cfp->case_dlg = ChangeCaseDialog (h);
ccd.change = eChangeCaseAllLower;
@@ -31877,31 +33537,6 @@ extern void FixCaseByField (IteM i)
Update ();
}
-typedef void (*BulkSetFieldFunc) PROTO ((Pointer, Pointer));
-typedef Pointer (*BulkSetFieldStringFunc) PROTO ((Pointer, ApplyValuePtr));
-typedef Pointer (*BulkGetFieldFunc) PROTO ((Pointer));
-typedef CharPtr (*BulkDisplayFieldFunc) PROTO ((Pointer));
-typedef void (*BulkFreeFieldFunc) PROTO ((Pointer));
-typedef DialoG (*BulkCreateDlgFunc) PROTO ((GrouP, CharPtr, SeqEntryPtr));
-typedef Int4 (*BulkFormatColumnFunc) PROTO ((ColPtr, CharPtr));
-typedef void (*BulkDrawColumnFunc) PROTO ((Pointer, RectPtr));
-typedef Pointer (*BulkReleaseCellFunc) PROTO ((Pointer));
-typedef Pointer (*BulkCopyFieldFunc) PROTO ((Pointer));
-
-typedef struct bulkedfield {
- CharPtr name;
- BulkSetFieldFunc set_func;
- BulkSetFieldStringFunc set_str_func;
- BulkGetFieldFunc get_func;
- BulkDisplayFieldFunc display_func;
- BulkFreeFieldFunc free_func;
- BulkCreateDlgFunc create_dlg_func;
- BulkFormatColumnFunc format_col_func;
- BulkDrawColumnFunc draw_col_func;
- BulkReleaseCellFunc release_cell_func;
- BulkCopyFieldFunc copy_func;
-} BulkEdFieldData, PNTR BulkEdFieldPtr;
-
static void FormatBoxColumn (ColPtr col)
{
if (col == NULL) return;
@@ -32271,7 +33906,7 @@ static Boolean AllBulkEditorRowsSelected (BulkEditorRowPtr berp)
}
-static void SelectBulkEditorRowsByStringConstraint (BulkEditorRowPtr berp, BulkEdFieldPtr field_list, Int4 col, StringConstraintPtr scp, Boolean val)
+static void SelectBulkEditorRowsByStringConstraint (BulkEditorRowPtr berp, BulkEdFieldPtr field_list, Int4 col, StringConstraintXPtr scp, Boolean val)
{
ValNodePtr vnp;
CharPtr str = NULL;
@@ -32285,7 +33920,7 @@ static void SelectBulkEditorRowsByStringConstraint (BulkEditorRowPtr berp, BulkE
if (vnp != NULL) {
str = field_list[col].display_func(vnp->data.ptrvalue);
}
- match = DoesStringMatchConstraint (str, scp);
+ match = DoesStringMatchConstraintX (str, scp);
str = MemFree (str);
if (scp != NULL && scp->not_present) {
match = !match;
@@ -32579,19 +34214,19 @@ static void ApplyValueToOneBulkEditorRow (BulkEditorRowPtr berp, Int2 col, BulkE
}
-static void PopulateSingleBulkEditRowFromData (BulkEditorRowPtr berp, Uint1 data_choice, Pointer data, BulkEdFieldPtr field_list)
+static void PopulateSingleBulkEditRowFromData (BulkEditorRowPtr berp, Uint1 data_choice, Pointer data, BulkEdFieldPtr field_list, Pointer metadata)
{
Int4 col;
/* add values for all columns */
for (col = 0; field_list[col].name != NULL; col++) {
- ValNodeAddPointer (&(berp->values_list), 0, (field_list[col].get_func (data)));
+ ValNodeAddPointer (&(berp->values_list), 0, (field_list[col].get_func (data_choice, data, metadata)));
}
/* add feature */
ValNodeAddPointer (&(berp->object_list), data_choice, data);
}
-static BulkEditorRowPtr MakeBulkEditorRowsFromObjectList (ValNodePtr object_list, BulkEdFieldPtr field_list, Int4 sort_column)
+static BulkEditorRowPtr MakeBulkEditorRowsFromObjectList (ValNodePtr object_list, BulkEdFieldPtr field_list, Int4 sort_column, Pointer metadata)
{
ValNodePtr vnp;
BulkEditorRowPtr bulk_ed_rows = NULL, sorted_rows = NULL;
@@ -32607,7 +34242,7 @@ static BulkEditorRowPtr MakeBulkEditorRowsFromObjectList (ValNodePtr object_list
for (vnp = object_list, row_num = 0; vnp != NULL; vnp = vnp->next, row_num++)
{
- PopulateSingleBulkEditRowFromData (bulk_ed_rows + row_num, vnp->choice, vnp->data.ptrvalue, field_list);
+ PopulateSingleBulkEditRowFromData (bulk_ed_rows + row_num, vnp->choice, vnp->data.ptrvalue, field_list, metadata);
}
if (sort_column >= 0)
@@ -32863,14 +34498,14 @@ typedef struct twofieldbulkedit
Boolean strip_name;
Boolean leave_on_original;
Boolean remove_parsed;
- TextPortionPtr text_portion;
+ TextPortionXPtr text_portion;
} TwoFieldBulkEditData, PNTR TwoFieldBulkEditPtr;
static TwoFieldBulkEditPtr TwoFieldBulkEditFree (TwoFieldBulkEditPtr tfp)
{
if (tfp != NULL) {
- tfp->text_portion = TextPortionFree (tfp->text_portion);
+ tfp->text_portion = TextPortionXFree (tfp->text_portion);
tfp = MemFree (tfp);
}
return tfp;
@@ -32995,7 +34630,7 @@ static DialoG TwoFieldBulkEditDialog
if (action_choice == eBulkParseField)
{
- dlg->text_portion = TextPortionDialog(p);
+ dlg->text_portion = TextPortionXDialog(p);
}
g2 = HiddenGroup (p, 3, 0, NULL);
@@ -33102,6 +34737,7 @@ typedef struct bulkeditordlg {
Boolean collapse_by_default;
ClickableCallback single_click_func;
ClickableCallback double_click_func;
+ Pointer metadata;
} BulkEditorDlgData, PNTR BulkEditorDlgPtr;
@@ -33881,7 +35517,7 @@ AddSampleDataForBulkEditorSelectedFeatures
Int4 col,
Int4 col_src,
GetSamplePtr gsp,
- TextPortionPtr text_portion)
+ TextPortionXPtr text_portion)
{
CharPtr str, str_src, str_parse;
ValNodePtr vnp, vnp_src;
@@ -33941,7 +35577,7 @@ GetSampleDataForBulkEditorSelectedFeatures
BulkEdFieldPtr field_list,
Int4 col,
Int4 col_src,
- TextPortionPtr text_portion)
+ TextPortionXPtr text_portion)
{
GetSamplePtr gsp;
@@ -34079,7 +35715,7 @@ static void BulkEditorStringConstraintCheck (ButtoN b)
BulkEditorDlgPtr dlg;
RecT r;
Int4 field_num;
- StringConstraintPtr scp;
+ StringConstraintXPtr scp;
Boolean val;
dlg = (BulkEditorDlgPtr) GetObjectExtra (b);
@@ -34096,7 +35732,7 @@ static void BulkEditorStringConstraintCheck (ButtoN b)
SelectBulkEditorRowsByStringConstraint (dlg->row_list, dlg->field_list, field_num, scp, val);
- scp = StringConstraintFree (scp);
+ scp = StringConstraintXFree (scp);
UpdateCheckStatus (dlg);
ObjectRect (dlg->doc, &r);
@@ -34115,7 +35751,7 @@ static void ObjectListToBulkEditorDialog (DialoG d, Pointer data)
object_list = (ValNodePtr) data;
dlg->row_list = FreeBulkEditorRows(dlg->row_list, dlg->field_list);
- dlg->row_list = MakeBulkEditorRowsFromObjectList (object_list, dlg->field_list, dlg->last_sorted_col);
+ dlg->row_list = MakeBulkEditorRowsFromObjectList (object_list, dlg->field_list, dlg->last_sorted_col, dlg->metadata);
if (dlg->collapse_by_default) {
CollapseAllBulkEditRows (dlg->row_list);
} else {
@@ -34141,14 +35777,15 @@ static Pointer GetSelectedObjectsFromBulkEditorDialog (DialoG d)
static DialoG
-CreateBulkEditorDialog
+CreateBulkEditorDialogEx
(GrouP h,
BulkEdFieldPtr field_list,
ValNodePtr feat_list,
SeqEntryPtr sep,
Boolean collapse_by_default,
ClickableCallback single_click_func,
- ClickableCallback double_click_func)
+ ClickableCallback double_click_func,
+ Pointer metadata)
{
GrouP p;
BulkEditorDlgPtr dlg;
@@ -34171,11 +35808,12 @@ CreateBulkEditorDialog
dlg->single_click_func = single_click_func;
dlg->double_click_func = double_click_func;
dlg->field_list = field_list;
+ dlg->metadata = metadata;
dlg->last_viewed_row = 0;
dlg->last_viewed_col = 0;
dlg->last_sorted_col = 0;
- dlg->row_list = MakeBulkEditorRowsFromObjectList(feat_list, dlg->field_list, dlg->last_sorted_col);
+ dlg->row_list = MakeBulkEditorRowsFromObjectList(feat_list, dlg->field_list, dlg->last_sorted_col, dlg->metadata);
if (dlg->collapse_by_default) {
CollapseAllBulkEditRows (dlg->row_list);
} else {
@@ -34238,7 +35876,7 @@ CreateBulkEditorDialog
RadioButton (dlg->sel_unsel_grp, "Uncheck features where");
SetValue (dlg->sel_unsel_grp, 1);
dlg->check_constraint_field = MakeBulkEditorFieldListPopup (g2, dlg->field_list, FALSE);
- dlg->check_constraint = StringConstraintDialog (g2, NULL, FALSE);
+ dlg->check_constraint = StringConstraintDialogX (g2, NULL, FALSE);
b = PushButton (g2, "Apply", BulkEditorStringConstraintCheck);
SetObjectExtra (b, dlg, NULL);
@@ -34256,7 +35894,7 @@ CreateBulkEditorDialog
PopupItem (dlg->bulk_action, "Swap");
PopupItem (dlg->bulk_action, "Remove");
PopupItem (dlg->bulk_action, "Change Case");
- SetValue (dlg->bulk_action, 1);
+ SetValue (dlg->bulk_action, 2);
page_grp = HiddenGroup (a, 0, 0, NULL);
page_num = 0;
dlg->action_pages[page_num] = HiddenGroup (page_grp, 2, 0, NULL);
@@ -34310,7 +35948,23 @@ CreateBulkEditorDialog
return (DialoG) p;
}
-static Pointer BulkGetLocation (Pointer data)
+
+NLM_EXTERN DialoG
+CreateBulkEditorDialog
+(GrouP h,
+ BulkEdFieldPtr field_list,
+ ValNodePtr feat_list,
+ SeqEntryPtr sep,
+ Boolean collapse_by_default,
+ ClickableCallback single_click_func,
+ ClickableCallback double_click_func)
+{
+ return CreateBulkEditorDialogEx (h, field_list, feat_list, sep, collapse_by_default,
+ single_click_func, double_click_func, NULL);
+}
+
+
+static Pointer BulkGetLocation (Uint1 data_choice, Pointer data, Pointer metadata)
{
SeqLocPtr slp;
SeqFeatPtr sfp = (SeqFeatPtr) data;
@@ -34378,7 +36032,7 @@ static Pointer BulkCopyLocation (Pointer data)
return new_loc;
}
-static Int4 BulkFormatSimpleText (ColPtr col, CharPtr name)
+NLM_EXTERN Int4 BulkFormatSimpleText (ColPtr col, CharPtr name)
{
if (col == NULL) return 0;
@@ -34395,14 +36049,14 @@ static Int4 BulkFormatSimpleText (ColPtr col, CharPtr name)
return col->pixWidth;
}
-static void BulkFreeSimpleText (Pointer data)
+NLM_EXTERN void BulkFreeSimpleText (Pointer data)
{
CharPtr str = (CharPtr) data;
str = MemFree (str);
}
-static CharPtr BulkDisplaySimpleText (Pointer data)
+NLM_EXTERN CharPtr BulkDisplaySimpleText (Pointer data)
{
CharPtr str = (CharPtr) data;
if (StringHasNoText (str)) {
@@ -34470,7 +36124,7 @@ static DialoG BulkSimpleTextDialogEx (GrouP g, CharPtr name, SeqEntryPtr sep, Bo
return (DialoG) p;
}
-static DialoG BulkSimpleTextDialog (GrouP g, CharPtr name, SeqEntryPtr sep)
+NLM_EXTERN DialoG BulkSimpleTextDialog (GrouP g, CharPtr name, SeqEntryPtr sep)
{
return BulkSimpleTextDialogEx (g, name, sep, FALSE);
}
@@ -34480,7 +36134,7 @@ static DialoG BulkSimpleTextScrollDialog (GrouP g, CharPtr name, SeqEntryPtr sep
return BulkSimpleTextDialogEx (g, name, sep, TRUE);
}
-static Pointer BulkSimpleTextCopy (Pointer data)
+NLM_EXTERN Pointer BulkSimpleTextCopy (Pointer data)
{
CharPtr orig = (CharPtr) data;
CharPtr new_str = StringSave (orig);
@@ -34569,7 +36223,7 @@ static void BulkSetComment (Pointer target, Pointer data)
}
}
-static Pointer BulkGetComment (Pointer data)
+static Pointer BulkGetComment (Uint1 data_choice, Pointer data, Pointer metadata)
{
SeqFeatPtr sfp = (SeqFeatPtr) data;
if (sfp == NULL || StringHasNoText (sfp->comment)) {
@@ -34635,7 +36289,7 @@ static void BulkCDSSetProtein (Pointer target, Pointer data)
}
-static Pointer BulkCDSGetProtein (Pointer data)
+static Pointer BulkCDSGetProtein (Uint1 data_choice, Pointer data, Pointer metadata)
{
SeqFeatXrefPtr xref;
ProtRefPtr prp = NULL;
@@ -34822,7 +36476,7 @@ static void BulkCDSSetProteinDesc (Pointer target, Pointer data)
}
-static Pointer BulkCDSGetProteinDesc (Pointer data)
+static Pointer BulkCDSGetProteinDesc (Uint1 data_choice, Pointer data, Pointer metadata)
{
SeqFeatXrefPtr xref;
ProtRefPtr prp = NULL;
@@ -34881,7 +36535,7 @@ static void BulkGeneSetLocus (Pointer target, Pointer data)
}
}
-static Pointer BulkGeneGetLocus (Pointer data)
+static Pointer BulkGeneGetLocus (Uint1 data_choice, Pointer data, Pointer metadata)
{
GeneRefPtr grp;
SeqFeatPtr sfp = (SeqFeatPtr) data;
@@ -34916,7 +36570,7 @@ static void BulkGeneSetLocusTag (Pointer target, Pointer data)
}
}
-static Pointer BulkGeneGetLocusTag (Pointer data)
+static Pointer BulkGeneGetLocusTag (Uint1 data_choice, Pointer data, Pointer metadata)
{
GeneRefPtr grp;
SeqFeatPtr sfp = (SeqFeatPtr) data;
@@ -34951,7 +36605,7 @@ static void BulkGeneSetDescription (Pointer target, Pointer data)
}
}
-static Pointer BulkGeneGetDescription (Pointer data)
+static Pointer BulkGeneGetDescription (Uint1 data_choice, Pointer data, Pointer metadata)
{
GeneRefPtr grp;
SeqFeatPtr sfp = (SeqFeatPtr) data;
@@ -34997,7 +36651,7 @@ static void BulkRNASetProduct (Pointer target, Pointer data)
}
}
-static Pointer BulkRNAGetProduct (Pointer data)
+static Pointer BulkRNAGetProduct (Uint1 data_choice, Pointer data, Pointer metadata)
{
RnaRefPtr rrp;
CharPtr rna_product = NULL;
@@ -35033,7 +36687,7 @@ static Boolean IsBulkEditableRNA (SeqFeatPtr sfp)
/* template for setting simple text strings */
-static Pointer BulkSetSimpleTextString (Pointer curr_val, ApplyValuePtr avp)
+NLM_EXTERN Pointer BulkSetSimpleTextString (Pointer curr_val, ApplyValuePtr avp)
{
CharPtr curr_val_str;
@@ -35103,15 +36757,15 @@ static void BulkSrcSetTaxNameDesc (Pointer target, Pointer data)
}
-static Pointer BulkSrcGetTaxNameDesc (Pointer data)
+NLM_EXTERN BioSourcePtr GetBioSourceFromObject (Uint1 choice, Pointer data);
+
+static Pointer BulkSrcGetTaxNameDesc (Uint1 data_choice, Pointer data, Pointer metadata)
{
CharPtr taxname = NULL;
- SeqDescrPtr sdp = (SeqDescrPtr) data;
- BioSourcePtr biop;
+ BioSourcePtr biop = NULL;
- if (sdp == NULL || sdp->choice != Seq_descr_source || sdp->data.ptrvalue == NULL) return NULL;
-
- biop = (BioSourcePtr) sdp->data.ptrvalue;
+ biop = GetBioSourceFromObject (data_choice, data);
+ if (biop == NULL) return NULL;
if (biop->org != NULL) {
taxname = StringSave (biop->org->taxname);
@@ -35140,7 +36794,7 @@ static void BulkSrcSetTaxNameFeat (Pointer target, Pointer data)
}
-static Pointer BulkSrcGetTaxNameFeat (Pointer data)
+static Pointer BulkSrcGetTaxNameFeat (Uint1 data_choice, Pointer data, Pointer metadata)
{
CharPtr taxname = NULL;
SeqFeatPtr sfp = (SeqFeatPtr) data;
@@ -35414,6 +37068,67 @@ extern void BulkEditorDescrList (Uint2 entityID, ValNodePtr descr_list)
}
+NLM_EXTERN void BulkEditorObjectList (Uint2 entityID, CharPtr title, ValNodePtr feat_list, BulkEdFieldPtr field_list)
+{
+ GrouP c;
+ ButtoN b;
+ BulkEditorPtr bep;
+ GrouP h;
+ WindoW w;
+ SeqEntryPtr sep;
+ Uint1 subtype = 0;
+
+ if (feat_list == NULL) {
+ Message (MSG_ERROR, "No features found!");
+ return;
+ }
+ /* Create a new window, and a struct */
+ /* to pass around the data in. */
+
+ sep = GetTopSeqEntryForEntityID (entityID);
+
+ bep = (BulkEditorPtr) MemNew (sizeof (BulkEditorData));
+ if (bep == NULL)
+ return;
+
+ bep->field_list = field_list;
+
+ w = FixedWindow (-50, -33, -10, -10, title,
+ StdCloseWindowProc);
+ SetObjectExtra (w, bep, StdCleanupFormProc);
+ bep->form = (ForM) w;
+ bep->input_entityID = entityID;
+
+ h = HiddenGroup (w, -1, 0, NULL);
+ SetGroupSpacing (h, 10, 10);
+
+ /* want: Document with columns for pseudo (when appropriate), location, fields */
+ /* when user clicks on field, should be able to edit contents */
+
+ bep->bulk_ed = CreateBulkEditorDialog (h, bep->field_list, feat_list, sep, TRUE, NULL, NULL);
+
+ /* Add Accept and Cancel buttons */
+
+ c = HiddenGroup (h, 3, 0, NULL);
+ b = PushButton (c, "Accept", AcceptBulkEditor);
+ SetObjectExtra (b, bep, NULL);
+ PushButton (c, "Cancel", StdCancelButtonProc);
+
+ /* Line things up nicely */
+
+ AlignObjects (ALIGN_CENTER, (HANDLE) bep->bulk_ed,
+ (HANDLE) c, NULL);
+
+
+ /* Display the window now */
+
+ RealizeWindow (w);
+ Show (w);
+ Select (w);
+ Update ();
+}
+
+
static void BulkEditor (IteM i, Uint1 featchoice, Uint1 featdef)
{
BaseFormPtr bfp;
@@ -35473,7 +37188,7 @@ extern void BulkEditRNA (IteM i)
}
-static Pointer GetBarcodeTestBarcodeID (Pointer data)
+static Pointer GetBarcodeTestBarcodeID (Uint1 data_choice, Pointer data, Pointer metadata)
{
BarcodeTestResultsPtr res = (BarcodeTestResultsPtr) data;
if (res == NULL || res->bsp == NULL) {
@@ -35484,7 +37199,7 @@ static Pointer GetBarcodeTestBarcodeID (Pointer data)
}
-static Pointer GetBarcodeTestGenbankID (Pointer data)
+static Pointer GetBarcodeTestGenbankID (Uint1 data_choice, Pointer data, Pointer metadata)
{
BarcodeTestResultsPtr res = (BarcodeTestResultsPtr) data;
if (res == NULL || res->bsp == NULL) {
@@ -35495,7 +37210,7 @@ static Pointer GetBarcodeTestGenbankID (Pointer data)
}
-static Pointer GetBarcodeTestLengthResult (Pointer data)
+static Pointer GetBarcodeTestLengthResult (Uint1 data_choice, Pointer data, Pointer metadata)
{
BarcodeTestResultsPtr res = (BarcodeTestResultsPtr) data;
if (res == NULL || !res->failed_tests[eBarcodeTest_Length]) {
@@ -35506,7 +37221,7 @@ static Pointer GetBarcodeTestLengthResult (Pointer data)
}
-static Pointer GetBarcodeTestPrimersResult (Pointer data)
+static Pointer GetBarcodeTestPrimersResult (Uint1 data_choice, Pointer data, Pointer metadata)
{
BarcodeTestResultsPtr res = (BarcodeTestResultsPtr) data;
if (res == NULL || !res->failed_tests[eBarcodeTest_Primers]) {
@@ -35517,7 +37232,7 @@ static Pointer GetBarcodeTestPrimersResult (Pointer data)
}
-static Pointer GetBarcodeTestCountryResult (Pointer data)
+static Pointer GetBarcodeTestCountryResult (Uint1 data_choice, Pointer data, Pointer metadata)
{
BarcodeTestResultsPtr res = (BarcodeTestResultsPtr) data;
if (res == NULL || !res->failed_tests[eBarcodeTest_Country]) {
@@ -35528,7 +37243,7 @@ static Pointer GetBarcodeTestCountryResult (Pointer data)
}
-static Pointer GetBarcodeTestSpecimenVoucherResult (Pointer data)
+static Pointer GetBarcodeTestSpecimenVoucherResult (Uint1 data_choice, Pointer data, Pointer metadata)
{
BarcodeTestResultsPtr res = (BarcodeTestResultsPtr) data;
if (res == NULL || !res->failed_tests[eBarcodeTest_SpecimenVoucher]) {
@@ -35539,7 +37254,7 @@ static Pointer GetBarcodeTestSpecimenVoucherResult (Pointer data)
}
-static Pointer GetBarcodeTestPercentNsResult (Pointer data)
+static Pointer GetBarcodeTestPercentNsResult (Uint1 data_choice, Pointer data, Pointer metadata)
{
BarcodeTestResultsPtr res = (BarcodeTestResultsPtr) data;
Char txt[5];
@@ -35664,17 +37379,13 @@ extern SubSourcePtr FindBadLatLon (BioSourcePtr biop)
}
-static Pointer GetCurrentLatLon (Pointer data)
+static Pointer GetCurrentLatLon (Uint1 data_choice, Pointer data, Pointer metadata)
{
- SeqDescrPtr sdp = (SeqDescrPtr) data;
SubSourcePtr bad_ssp;
BioSourcePtr biop;
- if (sdp == NULL || sdp->data.ptrvalue == NULL )
- {
- return NULL;
- }
- biop = (BioSourcePtr) sdp->data.ptrvalue;
+ biop = GetBioSourceFromObject (data_choice, data);
+ if (biop == NULL) return NULL;
bad_ssp = FindBadLatLon (biop);
if (bad_ssp == NULL)
@@ -35688,18 +37399,14 @@ static Pointer GetCurrentLatLon (Pointer data)
}
-static Pointer GetCorrectedLatLon (Pointer data)
+static Pointer GetCorrectedLatLon (Uint1 data_choice, Pointer data, Pointer metadata)
{
- SeqDescrPtr sdp = (SeqDescrPtr) data;
SubSourcePtr bad_ssp;
CharPtr fix;
BioSourcePtr biop;
- if (sdp == NULL || sdp->data.ptrvalue == NULL )
- {
- return NULL;
- }
- biop = (BioSourcePtr) sdp->data.ptrvalue;
+ biop = GetBioSourceFromObject (data_choice, data);
+ if (biop == NULL) return NULL;
bad_ssp = FindBadLatLon (biop);
if (bad_ssp == NULL)
@@ -35732,7 +37439,137 @@ extern DialoG LatLonTestResultsDisplay (GrouP h)
}
-static Pointer GetCurrentSpecificHost (Pointer data)
+static CharPtr GetSubSource (Uint1 data_choice, Pointer data, Uint1 subtype)
+{
+ SubSourcePtr ssp;
+ BioSourcePtr biop;
+
+ biop = GetBioSourceFromObject (data_choice, data);
+ if (biop == NULL) return NULL;
+
+ for (ssp = biop->subtype; ssp != NULL && ssp->subtype != subtype; ssp = ssp->next)
+ {}
+
+ if (ssp == NULL)
+ {
+ return NULL;
+ }
+ else
+ {
+ return StringSave (ssp->name);
+ }
+}
+
+
+static Pointer GetCountry (Uint1 data_choice, Pointer data, Pointer metadata)
+{
+ return GetSubSource (data_choice, data, SUBSRC_country);
+}
+
+static Pointer GetLatLon (Uint1 data_choice, Pointer data, Pointer metadata)
+{
+ return GetSubSource (data_choice, data, SUBSRC_lat_lon);
+}
+
+
+extern Pointer GetLatLonCountryCorrection (Uint1 data_choice, Pointer data, Pointer metadata)
+{
+ SubSourcePtr ssp;
+ BioSourcePtr biop;
+ CharPtr country = NULL, cp;
+ FloatHi lat, lon;
+ Boolean found_lat_lon = FALSE;
+ CharPtr msg = NULL;
+ CharPtr guess_fmt = "Lat_lon does not map to '%s', but may be in '%s'";
+ CharPtr guess;
+
+ biop = GetBioSourceFromObject (data_choice, data);
+ if (biop == NULL) return NULL;
+
+ for (ssp = biop->subtype; ssp != NULL && (country == NULL || !found_lat_lon); ssp = ssp->next)
+ {
+ if (ssp->subtype == SUBSRC_country && !StringHasNoText (ssp->name))
+ {
+ country = StringSave (ssp->name);
+ }
+ else if (ssp->subtype == SUBSRC_lat_lon)
+ {
+ if (ParseLatLon (ssp->name, &lat, &lon))
+ {
+ found_lat_lon = TRUE;
+ }
+ }
+ }
+
+ cp = StringChr (country, ':');
+ if (cp != NULL)
+ {
+ *cp = 0;
+ }
+
+ if (country == NULL && !found_lat_lon)
+ {
+ msg = StringSave ("Country and lat-lon not specified");
+ }
+ else if (country == NULL)
+ {
+ msg = StringSave ("Country not specified");
+ }
+ else if (!found_lat_lon)
+ {
+ msg = StringSave ("Lat-lon not specified.");
+ }
+ else if (!IsCountryInLatLonList (country))
+ {
+ msg = StringSave ("Country not in lat-lon list");
+ }
+ else if (TestLatLonForCountry (country, lat, lon))
+ {
+ msg = StringSave ("No conflict");
+ }
+ else if (TestLatLonForCountry (country, -lat, lon))
+ {
+ if (lat < 0.0) {
+ msg = StringSave ("Latitude should be set to N (northern hemisphere)");
+ } else {
+ msg = StringSave ("Latitude should be set to S (southern hemisphere)");
+ }
+ } else if (TestLatLonForCountry (country, lat, -lon)) {
+ if (lon < 0.0) {
+ msg = StringSave ("Longitude should be set to E (eastern hemisphere)");
+ } else {
+ msg = StringSave ("Longitude should be set to W (western hemisphere)");
+ }
+ } else if (TestLatLonForCountry (country, lon, lat)) {
+ msg = StringSave ("Latitude and longitude values appear to be exchanged");
+ } else {
+ guess = GuessCountryForLatLon (lat, lon);
+ if (guess == NULL)
+ {
+ msg = StringSave ("Lat-lon does not map to country");
+ }
+ else
+ {
+ msg = (CharPtr) MemNew (sizeof (Char) * (StringLen (guess_fmt) + StringLen (country) + StringLen (guess)));
+ sprintf (msg, guess_fmt, country, guess);
+ }
+ }
+ return msg;
+}
+
+static BulkEdFieldData latloncountry_fields[] = {
+ { "Lat-lon", NULL, NULL, GetLatLon, BulkDisplaySimpleText, BulkFreeSimpleText, NULL, BulkFormatSimpleText, NULL, NULL, BulkSimpleTextCopy },
+ { "Country", NULL, NULL, GetCountry, BulkDisplaySimpleText, BulkFreeSimpleText, NULL, BulkFormatSimpleText, NULL, NULL, BulkSimpleTextCopy },
+ { "Suggested Correction", NULL, NULL, GetLatLonCountryCorrection, BulkDisplaySimpleText, BulkFreeSimpleText, NULL, BulkFormatSimpleText, NULL, NULL, BulkSimpleTextCopy },
+ { NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}};
+
+extern DialoG LatLonCountryResultsDisplay (GrouP h)
+{
+ return CreateBulkEditorDialog (h, latloncountry_fields, NULL, NULL, FALSE, ScrollToDiscrepancyItem, EditDiscrepancyItem);
+}
+
+
+static Pointer GetCurrentSpecificHost (Uint1 data_choice, Pointer data, Pointer metadata)
{
SpecificHostFixPtr s = (SpecificHostFixPtr) data;
@@ -35747,7 +37584,7 @@ static Pointer GetCurrentSpecificHost (Pointer data)
}
-static Pointer GetCorrectedSpecificHost (Pointer data)
+static Pointer GetCorrectedSpecificHost (Uint1 data_choice, Pointer data, Pointer metadata)
{
SpecificHostFixPtr s = (SpecificHostFixPtr) data;
CharPtr new_spec_host;
@@ -35800,3 +37637,5 @@ extern DialoG SpecificHostResultsDisplay (GrouP h)
{
return CreateBulkEditorDialog (h, specifichost_fields, NULL, NULL, FALSE, ScrollToSpecificHostFix, EditSpecificHostFix);
}
+
+
diff --git a/sequin/sequin6.c b/sequin/sequin6.c
index c4f32188..f096cb14 100644
--- a/sequin/sequin6.c
+++ b/sequin/sequin6.c
@@ -29,7 +29,7 @@
*
* Version Creation Date: 11/12/97
*
-* $Revision: 6.310 $
+* $Revision: 6.326 $
*
* File Description:
*
@@ -56,6 +56,8 @@
#include <salpanel.h>
#include <seqpanel.h>
#include <biosrc.h>
+#include <vsm.h>
+#include <actutils.h>
#define NUMBER_OF_SUFFIXES 7
@@ -487,6 +489,7 @@ CreateFieldSubfieldDlg
FieldSubfieldDlgPtr dlg;
GrouP p, g, g2;
Int4 i;
+ ValNode vn;
dlg = (FieldSubfieldDlgPtr) MemNew (sizeof (FieldSubfieldDlgData));
if (dlg == NULL)
@@ -541,6 +544,12 @@ CreateFieldSubfieldDlg
NULL, FALSE,
dlg->change_notify,
dlg->change_userdata);
+ /* Set default BioSource field to scientific name */
+ vn.choice = ORGREF_SCI_NAME_FIELD;
+ vn.next = NULL;
+ vn.data.ptrvalue = NULL;
+ PointerToDialog (dlg->subfield_dlg[eFieldTypeBioSource], &vn);
+
dlg->subfield_dlg[eFieldTypeOrgModSubSource] = SourceQualTypeSelectionDialog (g, FALSE,
dlg->change_notify,
dlg->change_userdata);
@@ -589,7 +598,7 @@ typedef struct convertformdata {
Int2 subtype;
DialoG textportion_dlg;
- TextPortionPtr textportion;
+ TextPortionXPtr textportion;
Boolean remove_inside;
CharPtr foundstr;
@@ -3443,7 +3452,7 @@ static void SearchAndExciseTextInside (CharPtr PNTR strptr, ConvertFormPtr cfp)
string = *strptr;
if (string == NULL) return;
- FindTextPortionInString (string, cfp->textportion, &lft, &strLen);
+ FindTextPortionXInString (string, cfp->textportion, &lft, &strLen);
if (lft == NULL) return;
rgt = lft + strLen;
next_delete = lft;
@@ -3482,7 +3491,7 @@ static void SearchAndExciseTextOutside (CharPtr sourceStr, ConvertFormPtr cfp)
return;
}
- FindTextPortionInString (sourceStr, cfp->textportion, &leftEnd, &strLen);
+ FindTextPortionXInString (sourceStr, cfp->textportion, &leftEnd, &strLen);
if (leftEnd != NULL)
{
@@ -3843,7 +3852,7 @@ static void DoRemoveText (ConvertFormPtr cfp)
/* get information about text to remove */
- cfp->textportion = (TextPortionPtr) DialogToPointer (cfp->textportion_dlg);
+ cfp->textportion = (TextPortionXPtr) DialogToPointer (cfp->textportion_dlg);
if (GetValue (cfp->repeat_remove_grp) == 2) {
cfp->repeat_remove = TRUE;
@@ -3865,7 +3874,7 @@ static void DoRemoveText (ConvertFormPtr cfp)
/* Clean up and exit */
- cfp->textportion = TextPortionFree (cfp->textportion);
+ cfp->textportion = TextPortionXFree (cfp->textportion);
if (cfp->isDirty) {
DeleteMarkedObjects (cfp->input_entityID, 0, NULL);
@@ -3948,7 +3957,7 @@ static void SetRemoveTextAcceptButton (Pointer data)
ConvertFormPtr cfp;
FieldSubfieldPtr f;
Boolean ok_to_accept = FALSE;
- TextPortionPtr tp;
+ TextPortionXPtr tp;
cfp = (ConvertFormPtr) data;
if (cfp == NULL) return;
@@ -3965,11 +3974,11 @@ static void SetRemoveTextAcceptButton (Pointer data)
}
f = FieldSubfieldFree (f);
if (ok_to_accept) {
- tp = (TextPortionPtr) DialogToPointer (cfp->textportion_dlg);
+ tp = (TextPortionXPtr) DialogToPointer (cfp->textportion_dlg);
if (tp == NULL || (StringHasNoText (tp->start_text) && StringHasNoText (tp->end_text))) {
ok_to_accept = FALSE;
}
- tp = TextPortionFree (tp);
+ tp = TextPortionXFree (tp);
}
if (ok_to_accept) {
SafeEnable (cfp->accept);
@@ -3980,6 +3989,20 @@ static void SetRemoveTextAcceptButton (Pointer data)
}
+static void ClearRemoveOutsideText (ButtoN b)
+{
+ ConvertFormPtr cfp;
+
+ cfp = (ConvertFormPtr) GetObjectExtra (b);
+ if (cfp == NULL) return;
+
+ PointerToDialog (cfp->target_dlg, NULL);
+ PointerToDialog (cfp->textportion_dlg, NULL);
+
+ SetRemoveTextAcceptButton (cfp);
+}
+
+
/*---------------------------------------------------------------------*/
/* */
/* RemoveTextOutsideString () */
@@ -3997,6 +4020,7 @@ extern void RemoveTextOutsideString (IteM i)
StdEditorProcsPtr sepp;
WindoW w;
PrompT p, p2;
+ ButtoN b;
/* Get current sequence */
@@ -4050,7 +4074,7 @@ extern void RemoveTextOutsideString (IteM i)
p = StaticPrompt (mainGroup, "Remove Text", 0, 0, programFont, 'l');
- cfp->textportion_dlg = TextPortionDialogEx (mainGroup, FALSE, SetRemoveTextAcceptButton, cfp);
+ cfp->textportion_dlg = TextPortionXDialogEx (mainGroup, FALSE, SetRemoveTextAcceptButton, cfp);
/* The "If not found" group */
@@ -4070,6 +4094,9 @@ extern void RemoveTextOutsideString (IteM i)
allowed[eFieldTypePublication] = FALSE;
cfp->target_dlg = CreateFieldSubfieldDlg (mainGroup, allowed, ChangeTargetFields, cfp);
+ /* clear button */
+ b = PushButton (mainGroup, "Clear", ClearRemoveOutsideText);
+ SetObjectExtra (b, cfp, NULL);
/* Accept and Cancel buttons */
@@ -4088,6 +4115,7 @@ extern void RemoveTextOutsideString (IteM i)
(HANDLE) cfp->ifNotFoundGroup,
(HANDLE) p2,
(HANDLE) cfp->target_dlg,
+ (HANDLE) b,
(HANDLE) buttonGroup,
NULL);
@@ -4142,7 +4170,7 @@ extern void RemoveTextInsideString (IteM i)
SetGroupSpacing (h, 10, 10);
ppt = StaticPrompt (h, "Remove Text", 0, popupMenuHeight, programFont, 'c');
- cfp->textportion_dlg = TextPortionDialogEx (h, TRUE, SetRemoveTextAcceptButton, cfp);
+ cfp->textportion_dlg = TextPortionXDialogEx (h, TRUE, SetRemoveTextAcceptButton, cfp);
cfp->repeat_remove_grp = HiddenGroup (h, 2, 0, NULL);
RadioButton (cfp->repeat_remove_grp, "Remove first instance in each string");
@@ -4716,954 +4744,6 @@ static SeqFeatPtr ApplyGene (CharPtr str, ApplyFormPtr afp, SeqEntryPtr gene_sep
return gene_sfp;
}
-static SeqLocPtr RemoveGapsFromSegmentedLocation (SeqLocPtr slp, BioseqPtr bsp)
-{
- SeqLocPtr loc_slp, slp_new, slp_tmp, loc_list = NULL, loc_last = NULL;
- SeqIdPtr sip;
- Uint1 strand;
- Int4 seq_offset, start_pos, end_pos, piece_len;
-
- if (slp == NULL || bsp == NULL || bsp->repr != Seq_repr_seg)
- {
- return slp;
- }
-
- loc_slp = SeqLocFindNext (slp, NULL);
-
- while (loc_slp != NULL)
- {
- strand = SeqLocStrand (loc_slp);
- start_pos = SeqLocStart (loc_slp);
- end_pos = SeqLocStop (loc_slp);
-
- /* create list of locations */
- slp_tmp = bsp->seq_ext;
- seq_offset = 0;
- while (slp_tmp != NULL)
- {
- piece_len = SeqLocLen (slp_tmp);
-
- if (seq_offset < end_pos
- && seq_offset + piece_len >= start_pos)
- {
- sip = SeqLocId (slp_tmp);
-
- slp_new = SeqLocIntNew (MAX (0, start_pos - seq_offset),
- MIN (piece_len, end_pos - seq_offset),
- strand, sip);
-
- if (slp_new != NULL)
- {
- if (loc_last == NULL)
- {
- loc_list = slp_new;
- }
- else
- {
- loc_last->next = slp_new;
- }
- loc_last = slp_new;
- }
- }
- seq_offset += piece_len;
- slp_tmp = slp_tmp->next;
- }
- loc_slp = SeqLocFindNext (slp, loc_slp);
- }
-
- if (loc_list == NULL)
- {
- /* failed to convert - do not change */
- }
- else if (loc_list->next == NULL)
- {
- /* only found one piece */
- slp = SeqLocFree (slp);
- slp = loc_list;
- }
- else
- {
- /* make mixed location */
- slp_new = ValNodeNew (NULL);
- if (slp_new != NULL)
- {
- slp_new->choice = SEQLOC_MIX;
- slp_new->data.ptrvalue = loc_list;
- slp = SeqLocFree (slp);
- slp = slp_new;
- }
- }
- return slp;
-}
-
-static Boolean PointInInterval (Int4 interval_start, Int4 interval_length, Int4 point)
-{
- if (point >= interval_start && point < interval_start + interval_length)
- {
- return TRUE;
- }
- else
- {
- return FALSE;
- }
-}
-
-static Boolean GapInLocation (Int4 seq_offset, Int4 length, SeqLocPtr loc)
-{
- SeqLocPtr slp;
- Int4 start, stop;
- Boolean gap_in_location = FALSE;
-
- slp = SeqLocFindNext (loc, NULL);
-
- while (slp != NULL && ! gap_in_location)
- {
- start = SeqLocStart (slp);
- stop = SeqLocStop (slp);
-
- if (PointInInterval (seq_offset, length, start)
- || PointInInterval (seq_offset, length, stop)
- || PointInInterval (start, stop - start + 1, seq_offset)
- || PointInInterval (start, stop - start + 1, seq_offset + length))
- {
- gap_in_location = TRUE;
- }
-
- slp = SeqLocFindNext (loc, slp);
- }
- return gap_in_location;
-}
-
-static void
-LocationContainsGaps
-(SeqLocPtr slp,
- BioseqPtr bsp,
- Boolean unknown_gaps,
- Boolean known_gaps,
- BoolPtr terminal_gaps,
- BoolPtr internal_gaps,
- BoolPtr entirely_in_gap)
-{
- DeltaSeqPtr dsp;
- Int4 seq_offset = 0;
- Int4 dsp_len;
- Boolean has_terminal_gaps = FALSE;
- Boolean has_internal_gaps = FALSE;
- Boolean is_entirely_in_gap = FALSE;
- Boolean all_sublocs_in_gap = TRUE, this_subloc_in_gap = FALSE, this_subloc_start_gap = FALSE, this_subloc_stop_gap = FALSE;
- Boolean right_sublocs_in_gap = FALSE;
- SeqLocPtr tmp_slp;
- Int4 start, stop;
-
- if (slp == NULL || bsp == NULL
- || bsp->repr != Seq_repr_delta
- || bsp->seq_ext_type != 4
- || bsp->seq_ext == NULL)
- {
- return;
- }
-
- for (tmp_slp = SeqLocFindNext (slp, NULL);
- tmp_slp != NULL;
- tmp_slp = SeqLocFindNext (slp, tmp_slp))
- {
- seq_offset = 0;
- start = SeqLocStart (tmp_slp);
- stop = SeqLocStop (tmp_slp);
- this_subloc_in_gap = FALSE;
- this_subloc_start_gap = FALSE;
- this_subloc_stop_gap = FALSE;
- for (dsp = (DeltaSeqPtr) bsp->seq_ext;
- dsp != NULL && seq_offset <= stop && !this_subloc_in_gap;
- dsp = dsp->next)
- {
- dsp_len = GetDeltaSeqLen(dsp);
- if (IsDeltaSeqGap (dsp) && !DoesDeltaSeqHaveGapTypeOrLinkage(dsp)
- && ((unknown_gaps && IsDeltaSeqUnknownGap (dsp))
- || (known_gaps && IsDeltaSeqKnownGap (dsp)))
- && GapInLocation (seq_offset, dsp_len, tmp_slp))
- {
- if (PointInInterval (seq_offset, dsp_len, start)
- && PointInInterval (seq_offset, dsp_len, stop))
- {
- this_subloc_in_gap = TRUE;
- }
- else if (PointInInterval (seq_offset, dsp_len, start))
- {
- this_subloc_start_gap = TRUE;
- }
- else if (PointInInterval (seq_offset, dsp_len, stop))
- {
- this_subloc_stop_gap = TRUE;
- }
- else
- {
- has_internal_gaps = TRUE;
- }
- }
- seq_offset += dsp_len;
- }
-
- if (this_subloc_in_gap)
- {
- /* all sublocs up to this point have been in the gap, so still part of left gap */
- if (all_sublocs_in_gap)
- {
- has_terminal_gaps = TRUE;
- }
- /* could be part of chain of sublocs on the right in gap */
- right_sublocs_in_gap = TRUE;
- }
- else
- {
- if (right_sublocs_in_gap && !all_sublocs_in_gap)
- {
- /* a chain of prior gapped sublocs has ended that did not start at the left end */
- has_internal_gaps = TRUE;
- }
-
- if (this_subloc_start_gap)
- {
- if (all_sublocs_in_gap)
- {
- has_terminal_gaps = TRUE;
- }
- else
- {
- /* gap on left, not part of chain of sublocs on left in gap */
- has_internal_gaps = TRUE;
- }
- }
-
- if (this_subloc_stop_gap)
- {
- /* could be start of chain of sublocs on the right in gap */
- right_sublocs_in_gap = TRUE;
- }
- else
- {
- right_sublocs_in_gap = FALSE;
- }
- /* at least this subloc is not completely contained in a gap */
- all_sublocs_in_gap = FALSE;
- }
- }
-
- if (right_sublocs_in_gap)
- {
- has_terminal_gaps = TRUE;
- }
-
- if (all_sublocs_in_gap)
- {
- has_terminal_gaps = FALSE;
- has_internal_gaps = FALSE;
- }
-
- if (terminal_gaps != NULL)
- {
- *terminal_gaps = has_terminal_gaps;
- }
-
- if (internal_gaps != NULL)
- {
- *internal_gaps = has_internal_gaps;
- }
-
- if (entirely_in_gap != NULL)
- {
- *entirely_in_gap = all_sublocs_in_gap;
- }
-}
-
-
-static SeqLocPtr
-RemoveGapsFromDeltaLocation
-(SeqLocPtr slp,
- BioseqPtr bsp,
- Boolean unknown_gaps,
- Boolean known_gaps,
- Boolean trim_ends,
- Boolean split_internal,
- Boolean set_partial_ends,
- BoolPtr split)
-{
- DeltaSeqPtr dsp;
- Int4 seq_offset = 0;
- Int4 dsp_len;
- SeqLocPtr loc_list = NULL, prev_loc = NULL;
- SeqIdPtr sip, before_sip, after_sip;
- Boolean changed, partial5, partial3;
- SeqLocPtr before = NULL, after = NULL;
- Int4 start, stop;
- Boolean delete_for_this_gap;
- Uint1 strand;
-
- if (slp == NULL || bsp == NULL
- || bsp->repr != Seq_repr_delta
- || bsp->seq_ext_type != 4
- || bsp->seq_ext == NULL)
- {
- return slp;
- }
-
- sip = SeqLocId (slp);
- if (sip == NULL)
- {
- return slp;
- }
-
- CheckSeqLocForPartial (slp, &partial5, &partial3);
-
- seq_offset = 0;
- before = SeqLocCopy (slp);
- loc_list = before;
-
- for (dsp = (DeltaSeqPtr) bsp->seq_ext;
- dsp != NULL;
- dsp = dsp->next)
- {
- dsp_len = GetDeltaSeqLen(dsp);
- if (IsDeltaSeqGap (dsp) && !DoesDeltaSeqHaveGapTypeOrLinkage(dsp)
- && ((unknown_gaps && IsDeltaSeqUnknownGap (dsp))
- || (known_gaps && IsDeltaSeqKnownGap (dsp)))
- && GapInLocation (seq_offset, dsp_len, before))
- {
- delete_for_this_gap = TRUE;
- start = SeqLocStart (before);
- stop = SeqLocStop (before);
- if (PointInInterval (seq_offset, dsp_len, start)
- && PointInInterval (seq_offset, dsp_len, stop))
- {
- loc_list = SeqLocFree (loc_list);
- before = NULL;
- after = NULL;
- break;
- }
- else if (!PointInInterval (seq_offset, dsp_len, start)
- && !PointInInterval (seq_offset, dsp_len, stop))
- {
- if (!split_internal)
- {
- delete_for_this_gap = FALSE;
- }
- else
- {
- if (split != NULL)
- {
- *split = TRUE;
- }
- }
- }
- else if (!trim_ends)
- {
- delete_for_this_gap = FALSE;
- }
-
- if (delete_for_this_gap)
- {
- /* get strand - determines direction of partials */
- strand = SeqLocStrand (before);
-
- /* we make a copy of the original location */
- after = SeqLocCopy (before);
-
- /* note - we need to use duplicates of the SeqID returned by
- * SeqLocId, just in case the first location in a mixed location
- * is deleted, which would free the result from SeqLocId
- */
- after_sip = SeqIdDup (SeqLocId (after));
- before_sip = SeqIdDup (SeqLocId (before));
- /* in the "after" location, we free everything before the
- * end of the gap.
- */
- after = SeqLocDeleteEx (after, after_sip,
- 0, seq_offset + dsp_len - 1,
- FALSE, &changed, &partial5, &partial3);
-
- /* in the "before" location, we free everything after the
- * beginning of the gap.
- */
- before = SeqLocDeleteEx (before, before_sip,
- seq_offset, bsp->length,
- FALSE, &changed, &partial5, &partial3);
-
- /* handle partialness for ends */
- CheckSeqLocForPartial (after, &partial5, &partial3);
- if (strand == Seq_strand_minus)
- {
- if (before == NULL)
- {
- /* truncated at 3' end */
- SetSeqLocPartial (after, partial5, set_partial_ends);
- }
- else
- {
- SetSeqLocPartial (after, partial5, TRUE);
- }
-
- }
- else
- {
- if (before == NULL)
- {
- /* truncated at 5' end*/
- SetSeqLocPartial (after, set_partial_ends, partial3);
- }
- else
- {
- SetSeqLocPartial (after, TRUE, partial3);
- }
- }
-
- CheckSeqLocForPartial (before, &partial5, &partial3);
- if (strand == Seq_strand_minus)
- {
- if (after == NULL)
- {
- /* truncated at 5' end*/
- SetSeqLocPartial (before, set_partial_ends, partial3);
- } else {
- SetSeqLocPartial (before, TRUE, partial3);
- }
- }
- else
- {
- if (after == NULL)
- {
- /* truncated */
- SetSeqLocPartial (before, partial5, set_partial_ends);
- } else {
- SetSeqLocPartial (before, partial5, TRUE);
- }
- }
-
- /* we're done with these IDs now */
- after_sip = SeqIdFree (after_sip);
- before_sip = SeqIdFree (before_sip);
-
- if (before == NULL)
- {
- if (prev_loc == NULL)
- {
- loc_list = after;
- }
- else
- {
- prev_loc->next = after;
- }
- }
- else
- {
- before->next = after;
- prev_loc = before;
- }
- before = after;
- }
- }
- seq_offset += dsp_len;
- }
-
- slp = SeqLocFree (slp);
- return loc_list;
-}
-
-static SeqLocPtr
-RemoveGapsFromLocation
-(SeqLocPtr slp,
- Boolean unknown_gaps,
- Boolean known_gaps,
- Boolean trim_ends,
- Boolean split_internal,
- Boolean set_partial_ends,
- BoolPtr split)
-{
- BioseqPtr bsp;
- SeqIdPtr sip;
-
- if (slp == NULL)
- {
- return slp;
- }
-
- sip = SeqLocId (slp);
- if (sip == NULL)
- {
- return slp;
- }
-
- bsp = BioseqFind (sip);
- if (bsp == NULL)
- {
- return slp;
- }
- else if (bsp->repr == Seq_repr_seg)
- {
- if (!split_internal) {
- return slp;
- } else {
- return RemoveGapsFromSegmentedLocation (slp, bsp);
- }
- }
- else if (bsp->repr == Seq_repr_delta
- && bsp->seq_ext_type == 4
- && bsp->seq_ext != NULL)
- {
- return RemoveGapsFromDeltaLocation (slp, bsp, unknown_gaps, known_gaps, trim_ends, split_internal, set_partial_ends, split);
- }
- else
- {
- return slp;
- }
-}
-
-static void AdjustFrame (SeqFeatPtr sfp, BioseqPtr oldprot)
-{
- ByteStorePtr bs;
- CdRegionPtr crp;
- CharPtr oldprot_str, newprot_str;
- Uint1 orig_frame, best_frame = 0;
-
- if (sfp == NULL || sfp->data.choice != SEQFEAT_CDREGION
- || sfp->data.value.ptrvalue == NULL
- || oldprot == NULL)
- {
- return;
- }
-
- crp = (CdRegionPtr) sfp->data.value.ptrvalue;
-
- oldprot_str = GetSequenceByBsp (oldprot);
-
- orig_frame = crp->frame;
- for (crp->frame = 1; crp->frame <= 3 && best_frame == 0; crp->frame++)
- {
- newprot_str = NULL;
- bs = ProteinFromCdRegionEx (sfp, TRUE, FALSE);
- if (bs != NULL)
- {
- newprot_str = BSMerge (bs, NULL);
- bs = BSFree (bs);
- }
-
- if (StringHasNoText (newprot_str))
- {
- newprot_str = MemFree (newprot_str);
- continue;
- }
- if (StringSearch (oldprot_str, newprot_str) != NULL
- || StringSearch (oldprot_str, newprot_str + 1) != NULL)
- {
- best_frame = crp->frame;
- }
- else
- {
- newprot_str [StringLen (newprot_str) - 1] = 0;
- if (StringSearch (oldprot_str, newprot_str) != NULL
- || StringSearch (oldprot_str, newprot_str + 1) != NULL)
- {
- best_frame = crp->frame;
- }
- }
- newprot_str = MemFree (newprot_str);
- }
- oldprot_str = MemFree (oldprot_str);
- if (best_frame > 0)
- {
- crp->frame = best_frame;
- }
- else
- {
- crp->frame = orig_frame;
- }
-
-}
-
-static BioseqPtr
-AddProteinSequenceCopy
-(BioseqPtr protbsp,
- BioseqPtr featbsp,
- SeqFeatPtr new_sfp,
- Uint2 entityID)
-{
- Char str [128];
- SeqIdPtr new_id;
- BioseqPtr new_protbsp;
- SeqEntryPtr prot_sep, parent_sep;
-
- if (protbsp == NULL || featbsp == NULL || new_sfp == NULL)
- {
- return NULL;
- }
-
- parent_sep = GetBestTopParentForData (entityID, featbsp);
- if (parent_sep == NULL
- || !IS_Bioseq_set (parent_sep)
- || parent_sep->data.ptrvalue == NULL)
- {
- return NULL;
- }
-
- SeqIdWrite (protbsp->id, str, PRINTID_REPORT, sizeof (str) - 1);
- new_id = MakeUniqueSeqID (str);
- new_protbsp = BioseqCopyEx (new_id, protbsp, 0, protbsp->length - 1,
- Seq_strand_plus, TRUE);
- ValNodeLink (&(new_protbsp->descr),
- AsnIoMemCopy ((Pointer) protbsp->descr,
- (AsnReadFunc) SeqDescrAsnRead,
- (AsnWriteFunc) SeqDescrAsnWrite));
-
- prot_sep = SeqEntryNew ();
- if (prot_sep != NULL)
- {
- prot_sep->choice = 1;
- prot_sep->data.ptrvalue = new_protbsp;
- SeqMgrSeqEntry (SM_BIOSEQ, (Pointer) new_protbsp, prot_sep);
- AddSeqEntryToSeqEntry (parent_sep, prot_sep, TRUE);
- }
-
- SeqMgrAddToBioseqIndex (new_protbsp);
- new_sfp->product = SeqLocWholeNew (new_protbsp);
- SeqMgrIndexFeatures (entityID, NULL);
- return new_protbsp;
-}
-
-static void SetProductSequencePartials (BioseqPtr protbsp, Boolean partial5, Boolean partial3)
-{
- SeqFeatPtr prot_sfp;
- SeqMgrFeatContext context;
- SeqMgrDescContext dcontext;
- SeqDescrPtr sdp;
- MolInfoPtr mip;
-
- if (protbsp == NULL)
- {
- return;
- }
-
- /* set partials on product */
- prot_sfp = SeqMgrGetNextFeature (protbsp, NULL,
- SEQFEAT_PROT, FEATDEF_PROT, &context);
- if (prot_sfp != NULL)
- {
- SetSeqLocPartial (prot_sfp->location, partial5, partial3);
- prot_sfp->partial = partial5 || partial3;
- }
-
- sdp = SeqMgrGetNextDescriptor (protbsp, NULL, Seq_descr_molinfo, &dcontext);
- if (sdp != NULL)
- {
- mip = (MolInfoPtr) sdp->data.ptrvalue;
- if (partial5 && partial3) {
- mip->completeness = 5;
- } else if (partial5) {
- mip->completeness = 3;
- } else if (partial3) {
- mip->completeness = 4;
- } else if (prot_sfp != NULL && prot_sfp->partial) {
- mip->completeness = 2;
- } else {
- mip->completeness = 0;
- }
- }
-}
-
-static SeqLocPtr MakeMixedLocFromLocList (SeqLocPtr loc_list)
-{
- SeqLocPtr slp_mix, tmp_slp, prev_slp = NULL, next_slp;
-
- /* make location mixed */
- slp_mix = ValNodeNew(NULL);
- slp_mix->choice = SEQLOC_MIX;
- slp_mix->data.ptrvalue = loc_list;
- tmp_slp = loc_list;
- while (tmp_slp != NULL) {
- next_slp = tmp_slp->next;
- if (tmp_slp->choice == SEQLOC_MIX) {
- if (tmp_slp->data.ptrvalue == NULL) {
- /* empty mixed loc, just remove it */
- if (prev_slp == NULL) {
- slp_mix->data.ptrvalue = tmp_slp->next;
- } else {
- prev_slp->next = tmp_slp->next;
- }
- tmp_slp->next = NULL;
- tmp_slp = SeqLocFree (tmp_slp);
- } else {
- /* take sublocations and promote them */
- if (prev_slp == NULL) {
- slp_mix->data.ptrvalue = tmp_slp->data.ptrvalue;
- } else {
- prev_slp->next = tmp_slp->data.ptrvalue;
- }
- prev_slp = tmp_slp->data.ptrvalue;
- while (prev_slp->next != NULL) {
- prev_slp = prev_slp->next;
- }
- prev_slp->next = next_slp;
- tmp_slp->next = NULL;
- tmp_slp->data.ptrvalue = NULL;
- tmp_slp = SeqLocFree (tmp_slp);
- }
- } else {
- prev_slp = tmp_slp;
- }
- tmp_slp = next_slp;
- }
- return slp_mix;
-}
-
-
-static void AddCDSGapComment (SeqFeatPtr sfp);
-
-
-typedef struct adjustfeatforgap {
- ValNodePtr feature_list;
- Boolean unknown_gaps;
- Boolean known_gaps;
- Boolean make_partial;
- Boolean partial_for_pseudo;
- Boolean trim_ends;
- Boolean split_internal;
-
- ValNodePtr features_in_gap;
-} AdjustFeatForGapData, PNTR AdjustFeatForGapPtr;
-
-
-static AdjustFeatForGapPtr AdjustFeatForGapFree (AdjustFeatForGapPtr agp)
-{
- if (agp != NULL) {
- agp->feature_list = ValNodeFree (agp->feature_list);
- agp->features_in_gap = ValNodeFree (agp->features_in_gap);
- agp = MemFree (agp);
- }
- return agp;
-}
-
-
-static Boolean FeatureOkForFeatureList (SeqFeatPtr sfp, ValNodePtr feature_list)
-{
- ValNodePtr vnp;
- Boolean rval = FALSE;
-
- if (sfp == NULL) return FALSE;
- if (feature_list == NULL) return TRUE;
- for (vnp = feature_list; vnp != NULL && !rval; vnp = vnp->next) {
- if (vnp->choice == 255 || vnp->choice == sfp->idx.subtype) {
- rval = TRUE;
- }
- }
- return rval;
-}
-
-extern SeqFeatPtr GetGeneForFeature (SeqFeatPtr sfp)
-{
- GeneRefPtr grp;
- SeqFeatPtr overlap_gene;
- Boolean is_suppressed;
- SeqMgrFeatContext fcontext;
-
- grp = SeqMgrGetGeneXref (sfp);
- is_suppressed = SeqMgrGeneIsSuppressed (grp);
- if (is_suppressed) return NULL;
-
- if (grp != NULL) {
- overlap_gene = SeqMgrGetGeneByLocusTag (BioseqFindFromSeqLoc(sfp->location), grp->locus_tag, &fcontext);
- } else {
- overlap_gene = SeqMgrGetOverlappingGene(sfp->location, &fcontext);
- }
- return overlap_gene;
-}
-
-static void AdjustFeatureForGapsCallback (SeqFeatPtr sfp, Pointer data)
-{
- AdjustFeatForGapPtr afgp;
- BioseqPtr protbsp = NULL, new_protbsp;
- SeqFeatPtr new_sfp, tmp, gene, mrna;
- Boolean partial5, partial3;
- Uint2 entityID;
- SeqLocPtr slp_new;
- Boolean split;
- Boolean split_internal;
- ValNodePtr tmp_list;
- BioseqPtr gapped_bioseq;
- SeqMgrFeatContext fcontext;
- Boolean set_partial_ends;
-
- if (sfp == NULL || data == NULL) return;
-
- afgp = (AdjustFeatForGapPtr) data;
-
- if (!FeatureOkForFeatureList(sfp, afgp->feature_list)) return;
-
- gapped_bioseq = BioseqFind (SeqLocId (sfp->location));
-
- CheckSeqLocForPartial (sfp->location, &partial5, &partial3);
- slp_new = (SeqLocPtr) AsnIoMemCopy (sfp->location,
- (AsnReadFunc) SeqLocAsnRead,
- (AsnWriteFunc) SeqLocAsnWrite);
- split = FALSE;
- set_partial_ends = afgp->make_partial;
- if (set_partial_ends && ! afgp->partial_for_pseudo) {
- if (sfp->pseudo) {
- set_partial_ends = FALSE;
- } else {
- gene = GetGeneForFeature (sfp);
- if (gene != NULL && gene->pseudo) {
- set_partial_ends = FALSE;
- }
- }
- }
-
- /* handle overlapping features if coding region */
- if (sfp->data.choice == SEQFEAT_CDREGION)
- {
- split_internal = afgp->split_internal;
- afgp->split_internal = FALSE;
- tmp_list = afgp->feature_list;
- afgp->feature_list = NULL;
- gene = GetGeneForFeature (sfp);
- AdjustFeatureForGapsCallback (gene, afgp);
- mrna = SeqMgrGetOverlappingmRNA (sfp->location, &fcontext);
- afgp->split_internal = split_internal;
- AdjustFeatureForGapsCallback (mrna, afgp);
- afgp->feature_list = tmp_list;
- }
-
- slp_new = RemoveGapsFromLocation (slp_new, afgp->unknown_gaps, afgp->known_gaps, afgp->trim_ends, afgp->split_internal, set_partial_ends, &split);
- if (slp_new == NULL) {
- ValNodeAddPointer (&(afgp->features_in_gap), OBJ_SEQFEAT, sfp);
- return;
- } else if (SeqLocCompare (slp_new, sfp->location) == SLC_A_EQ_B) {
- slp_new = SeqLocFree (slp_new);
- return;
- }
-
- if (split) {
- AddCDSGapComment(sfp);
- }
-
- sfp->location = SeqLocFree (sfp->location);
- sfp->location = slp_new;
-
- if (gapped_bioseq != NULL && gapped_bioseq->repr == Seq_repr_delta)
- {
- entityID = gapped_bioseq->idx.entityID;
-
- while (sfp->location->next != NULL)
- {
- /* create a copy of the feature for each interval between gaps */
- tmp = sfp->next;
- sfp->next = NULL;
- new_sfp = (SeqFeatPtr) AsnIoMemCopy (sfp,
- (AsnReadFunc) SeqFeatAsnRead,
- (AsnWriteFunc) SeqFeatAsnWrite);
- sfp->next = new_sfp;
- new_sfp->next = tmp;
-
- new_sfp->location = sfp->location->next;
- new_sfp->comment = StringSave (sfp->comment);
-
- sfp->location->next = NULL;
-
- /* fix partials */
- CheckSeqLocForPartial (sfp->location, &partial5, &partial3);
- sfp->partial = partial5 || partial3;
-
- if (sfp->data.choice == SEQFEAT_CDREGION) {
- protbsp = BioseqFindFromSeqLoc (sfp->product);
- if (protbsp != NULL)
- {
- new_protbsp = AddProteinSequenceCopy (protbsp, gapped_bioseq, new_sfp, entityID);
- }
-
- /* adjust frame */
- AdjustFrame (sfp, protbsp);
-
- /* retranslate coding region */
- SeqEdTranslateOneCDS (sfp, gapped_bioseq, entityID);
-
- /* set partials on product */
- if (protbsp == NULL)
- {
- protbsp = BioseqFindFromSeqLoc (sfp->product);
- }
- SetProductSequencePartials (protbsp, partial5, partial3);
- protbsp = new_protbsp;
- }
- partial5 = TRUE;
- sfp = new_sfp;
- }
- /* fix partials for last feature */
- CheckSeqLocForPartial (sfp->location, &partial5, &partial3);
- sfp->partial = partial5 || partial3;
-
- if (sfp->data.choice == SEQFEAT_CDREGION)
- {
- /* adjust frame */
- protbsp = BioseqFindFromSeqLoc (sfp->product);
- AdjustFrame (sfp, protbsp);
-
- /* retranslate coding region */
- SeqEdTranslateOneCDS (sfp, gapped_bioseq, entityID);
- /* set partials on product */
- SetProductSequencePartials (protbsp, partial5, partial3);
- }
- }
- else
- {
- /* make location mixed */
- sfp->location = MakeMixedLocFromLocList (sfp->location);
- }
-}
-
-
-static void MarkFeaturesInGapsForDeletion (AdjustFeatForGapPtr afgp)
-{
- ValNodePtr vnp;
- SeqFeatPtr sfp;
- BioseqPtr product_bsp;
-
- if (afgp == NULL || afgp->features_in_gap == NULL)
- {
- return;
- }
-
- for (vnp = afgp->features_in_gap; vnp != NULL; vnp = vnp->next)
- {
- sfp = (SeqFeatPtr) vnp->data.ptrvalue;
- sfp->idx.deleteme = TRUE;
- if (sfp->data.choice == SEQFEAT_CDREGION && sfp->product != NULL)
- {
- product_bsp = BioseqFindFromSeqLoc (sfp->product);
- if (product_bsp != NULL)
- {
- product_bsp->idx.deleteme = TRUE;
- }
- }
- }
- afgp->features_in_gap = ValNodeFree (afgp->features_in_gap);
-}
-
-extern void AdjustCDSLocationsForUnknownGapsCallback (SeqFeatPtr sfp, Pointer data)
-{
- AdjustFeatForGapData agd;
-
- agd.feature_list = NULL;
-
- agd.unknown_gaps = TRUE;
- agd.known_gaps = FALSE;
- agd.make_partial = TRUE;
- agd.partial_for_pseudo = FALSE;
- agd.split_internal = TRUE;
- agd.trim_ends = TRUE;
-
- agd.features_in_gap = NULL;
-
- AdjustFeatureForGapsCallback (sfp, &agd);
- MarkFeaturesInGapsForDeletion (&agd);
-}
-
typedef struct adjustfeatforgapdialog {
DIALOG_MESSAGE_BLOCK
@@ -6082,12 +5162,12 @@ extern void AdjustFeaturesForGaps (IteM i)
h = HiddenGroup (w, -1, 0, NULL);
SetGroupSpacing (h, 10, 10);
- dlg->clickable_list = CreateClickableListDialogEx (h, "", "Features",
+ dlg->clickable_list = CreateClickableListDialogEx (h, "", "Features", NULL, NULL,
ScrollToDiscrepancyItem, EditDiscrepancyItem, NULL,
GetDiscrepancyItemText,
stdCharWidth * 15,
stdCharWidth * 30,
- TRUE);
+ TRUE, TRUE);
dlg->dlg = AdjustFeaturesForGapDialog (h, bfp->input_entityID, AdjustFeaturesForGapsChangeNotify, dlg);
@@ -6337,34 +5417,6 @@ RemoveGapLocationsFromSeqLoc
return loc_list;
}
-const char *cds_gap_comment = "coding region disrupted by sequencing gap";
-
-static void AddCDSGapComment (SeqFeatPtr sfp)
-{
- CharPtr new_comment = NULL;
-
- if (sfp == NULL || StringSearch (sfp->comment, cds_gap_comment) != NULL)
- {
- return;
- }
-
- if (StringHasNoText (sfp->comment))
- {
- sfp->comment = MemFree (sfp->comment);
- sfp->comment = StringSave (cds_gap_comment);
- }
- else
- {
- new_comment = (CharPtr) MemNew ((StringLen (sfp->comment)
- + StringLen (cds_gap_comment)
- + 4) * sizeof (Char));
- StringCpy (new_comment, sfp->comment);
- StringCat (new_comment, "; ");
- StringCat (new_comment, cds_gap_comment);
- sfp->comment = MemFree (sfp->comment);
- sfp->comment = new_comment;
- }
-}
static void AdjustCodingRegionLocationsForGapLocations (BioseqPtr bsp, ValNodePtr gap_list)
{
@@ -6432,7 +5484,7 @@ static void AdjustCodingRegionLocationsForGapLocations (BioseqPtr bsp, ValNodePt
AdjustFrame (sfp, protbsp);
/* retranslate coding region */
- SeqEdTranslateOneCDS (sfp, bsp, entityID);
+ SeqEdTranslateOneCDS (sfp, bsp, entityID, Sequin_GlobalAlign2Seq);
/* set partials on product */
if (protbsp == NULL)
@@ -6458,7 +5510,7 @@ static void AdjustCodingRegionLocationsForGapLocations (BioseqPtr bsp, ValNodePt
AdjustFrame (sfp, protbsp);
/* retranslate coding region */
- SeqEdTranslateOneCDS (sfp, bsp, entityID);
+ SeqEdTranslateOneCDS (sfp, bsp, entityID, Sequin_GlobalAlign2Seq);
/* set partials on product */
if (protbsp == NULL)
{
@@ -6711,7 +5763,7 @@ AdjustOneCodingRegionWithTerminalGapsOnBioseq
AdjustFrame (sfp, protbsp);
/* retranslate coding region */
- SeqEdTranslateOneCDS (sfp, bsp, sfp->idx.entityID);
+ SeqEdTranslateOneCDS (sfp, bsp, sfp->idx.entityID, Sequin_GlobalAlign2Seq);
/* set partials on product */
SetProductSequencePartials (protbsp, partial5, partial3);
@@ -6776,7 +5828,7 @@ typedef struct cdstomiscfeatform
Boolean convert_all;
FilterSetPtr fsp;
- StringConstraintPtr scp;
+ StringConstraintXPtr scp;
BioseqPtr bsp;
} CDSToMiscFeatFormData, PNTR CDSToMiscFeatFormPtr;
@@ -6904,7 +5956,7 @@ extern void ConvertCodingRegionsWithInternalKnownGapToMiscFeat (IteM i)
RadioButton (cmffp->all_or_percent_grp, "Convert all coding regions with gaps (both terminal and internal)");
SetValue (cmffp->all_or_percent_grp, 1);
- cmffp->string_constraint_dlg = StringConstraintDialog (h, "Where feature text", FALSE);
+ cmffp->string_constraint_dlg = StringConstraintDialogX (h, "Where feature text", FALSE);
c = HiddenGroup (h, 2, 0, NULL);
SetGroupSpacing (c, 10, 10);
@@ -7338,7 +6390,6 @@ static void RealApplyBioFeatToAll (Uint2 entityID,
{
ImpFeatPtr ifp;
- RnaRefPtr rrp;
SeqFeatPtr sfp = NULL;
SeqFeatPtr gene_sfp;
Boolean put_comment_on_gene = FALSE;
@@ -7373,25 +6424,21 @@ static void RealApplyBioFeatToAll (Uint2 entityID,
/* Add an rRNA feature */
else if (afp->type == ADD_RRNA) {
- if (suppressDups && entityID > 0 &&
- AlreadyHasFeatOrDesc (sep, SEQFEAT_RNA, 0, afp->feature_details_data->rnaSubType)) return;
- rrp = RnaRefNew ();
- if (rrp != NULL) {
- rrp->type = afp->feature_details_data->rnaSubType;
- if (! StringHasNoText (afp->feature_details_data->rnaName)) {
- rrp->ext.choice = 1;
- rrp->ext.value.ptrvalue = StringSave (afp->feature_details_data->rnaName);
- }
- sfp = CreateNewFeature (nsep, NULL, SEQFEAT_RNA, NULL);
- if (sfp != NULL) {
- sfp->data.value.ptrvalue = (Pointer) rrp;
- SetApplyFeatureLocation (sfp, afp);
-
- if (! StringHasNoText (afp->feature_details_data->featcomment)) {
- sfp->comment = StringSave (afp->feature_details_data->featcomment);
- }
- }
+ if (suppressDups && entityID > 0
+ && AlreadyHasRNA (sep, afp->feature_details_data->rnaType)) {
+ return;
+ }
+
+ sfp = CreateNewFeature (nsep, NULL, SEQFEAT_RNA, NULL);
+ ApplyRnaTypeToSeqFeat (sfp, afp->feature_details_data->rnaType);
+ if (! StringHasNoText (afp->feature_details_data->rnaName)) {
+ ApplyProductToRNA (sfp, afp->feature_details_data->rnaName);
}
+
+ SetApplyFeatureLocation (sfp, afp);
+ AddToComment (sfp, afp->feature_details_data->featcomment);
+ ConvertToOldRNAFormat (sfp);
+
if (! StringHasNoText (afp->feature_details_data->geneName)) {
if (entityID > 0
&& suppressDups
@@ -7635,6 +6682,7 @@ Int2 ApplyAnnotationToAll (Int2 type, SeqEntryPtr sep,
{
ApplyFormData afd;
+ RnaTypeData rtd;
MemSet ((Pointer) (&afd), 0, sizeof (ApplyFormData));
afd.type = type;
@@ -7651,7 +6699,11 @@ Int2 ApplyAnnotationToAll (Int2 type, SeqEntryPtr sep,
}
if (ADD_RRNA == type)
- afd.feature_details_data->rnaSubType = 4;
+ {
+ rtd.ncrna_class = NULL;
+ rtd.rna_featdef = FEATDEF_rRNA;
+ afd.feature_details_data->rnaType = &rtd;
+ }
if (geneName != NULL && ! TextHasNoText (geneName))
afd.feature_details_data->geneName = SaveStringFromText (geneName);
@@ -11449,7 +10501,7 @@ static void NewDescriptorMenuProc (IteM i)
extern void SetupNewDescriptorsMenu (MenU m, BaseFormPtr bfp)
{
- Boolean allowgenbank;
+ Boolean allowgenbank, allow_structured_comment = FALSE;
IteM i;
NewObjectPtr nop;
ObjMgrPtr omp;
@@ -11468,6 +10520,10 @@ extern void SetupNewDescriptorsMenu (MenU m, BaseFormPtr bfp)
allowgenbank = TRUE;
}
/*#endif*/
+ if (indexerVersion) {
+ allow_structured_comment = TRUE;
+ }
+
while ((omtp = ObjMgrTypeFindNext (omp, omtp)) != NULL) {
ompp = ObjMgrProcFindNext (omp, OMPROC_EDIT, omtp->datatype, 0, NULL);
if (ompp != NULL) {
@@ -11477,7 +10533,11 @@ extern void SetupNewDescriptorsMenu (MenU m, BaseFormPtr bfp)
while ((ompp = ObjMgrProcFindNext (omp, OMPROC_EDIT,
omtp->datatype, 0, ompp)) != NULL) {
if (ompp->subinputtype != Seq_descr_pub) {
- if (allowgenbank || ompp->subinputtype != Seq_descr_genbank) {
+ if (!allowgenbank && ompp->subinputtype == Seq_descr_genbank) {
+ /* skip */
+ } else if (!allow_structured_comment && ompp->subinputtype == Seq_descr_user && StringCmp (ompp->proclabel, "Structured Comment") == 0) {
+ /* skip */
+ } else {
i = CommandItem (m, ompp->proclabel, NewDescriptorMenuProc);
nop = (NewObjectPtr) MemNew (sizeof (NewObjectData));
if (nop != NULL) {
@@ -11664,23 +10724,9 @@ extern void SetupNewFeaturesMenu (MenU m, BaseFormPtr bfp)
if (key != FEATDEF_BAD) {
ompp = NULL;
while ((ompp = ObjMgrProcFindNext (omp, OMPROC_EDIT,
- omtp->datatype, 0, ompp)) != NULL) {
- subtype = ompp->subinputtype;
- if (subtype == fdp->featdef_key &&
- subtype != FEATDEF_PUB &&
- subtype != FEATDEF_IMP &&
- subtype != FEATDEF_Imp_CDS &&
- subtype != FEATDEF_misc_RNA &&
- subtype != FEATDEF_precursor_RNA &&
- subtype != FEATDEF_mat_peptide &&
- subtype != FEATDEF_sig_peptide &&
- subtype != FEATDEF_transit_peptide &&
- subtype != FEATDEF_source &&
- subtype != FEATDEF_virion &&
- subtype != FEATDEF_mutation &&
- subtype != FEATDEF_allele &&
- subtype != FEATDEF_site_ref &&
- subtype != FEATDEF_gap) {
+ omtp->datatype, 0, ompp)) != NULL) {
+ subtype = ompp->subinputtype;
+ if (subtype == fdp->featdef_key && OkToListFeatDefInRemainingFeatures (subtype)) {
i = CommandItem (sub, ompp->proclabel, NewFeatureMenuProc);
nop = (NewObjectPtr) MemNew (sizeof (NewObjectData));
if (nop != NULL) {
@@ -13025,95 +12071,6 @@ extern ValNodePtr FreeSeqIdList (ValNodePtr id_list)
}
-static Boolean IsAllDigits (CharPtr str)
-{
- CharPtr cp;
-
- if (StringHasNoText (str)) return FALSE;
-
- cp = str;
- while (*cp != 0 && isdigit (*cp)) {
- cp++;
- }
- if (*cp == 0) {
- return TRUE;
- } else {
- return FALSE;
- }
-}
-
-
-extern SeqIdPtr CreateSeqIdFromText (CharPtr id_str, SeqEntryPtr sep)
-{
- BioseqPtr bsp = NULL;
- CharPtr tmpstr;
- SeqIdPtr sip = NULL;
- SeqEntryPtr scope;
-
- if (StringStr (id_str, "|") == NULL) {
- tmpstr = (CharPtr) MemNew (sizeof (Char) * (StringLen (id_str) + 10));
- sprintf (tmpstr, "lcl|%s", id_str);
- sip = SeqIdParse (tmpstr);
- if (sip != NULL) {
- scope = SeqEntrySetScope (sep);
- bsp = BioseqFind (sip);
- SeqEntrySetScope (scope);
- if (bsp == NULL) {
- sip = SeqIdFree (sip);
- }
- }
- if (bsp == NULL) {
- sprintf (tmpstr, "gb|%s", id_str);
- sip = SeqIdParse (tmpstr);
- if (sip != NULL) {
- scope = SeqEntrySetScope (sep);
- bsp = BioseqFind (sip);
- SeqEntrySetScope (scope);
- if (bsp == NULL) {
- sip = SeqIdFree (sip);
- }
- }
- }
- if (bsp == NULL) {
- sprintf (tmpstr, "gnl|%s", id_str);
- sip = SeqIdParse (tmpstr);
- if (sip != NULL) {
- scope = SeqEntrySetScope (sep);
- bsp = BioseqFind (sip);
- SeqEntrySetScope (scope);
- if (bsp == NULL) {
- sip = SeqIdFree (sip);
- }
- }
- }
- if (bsp == NULL && IsAllDigits (id_str)) {
- sprintf (tmpstr, "gi|%s", id_str);
- sip = SeqIdParse (tmpstr);
- if (sip != NULL) {
- scope = SeqEntrySetScope (sep);
- bsp = BioseqFind (sip);
- SeqEntrySetScope (scope);
- if (bsp == NULL) {
- sip = SeqIdFree (sip);
- }
- }
- }
- MemFree (tmpstr);
- } else {
- sip = SeqIdParse (id_str);
- if (sip != NULL) {
- scope = SeqEntrySetScope (sep);
- bsp = BioseqFind (sip);
- SeqEntrySetScope (scope);
- if (bsp == NULL) {
- sip = SeqIdFree (sip);
- }
- }
- }
- return sip;
-}
-
-
static ValNodePtr SplitByCommasAndSpaces (CharPtr list)
{
CharPtr cp;
@@ -13646,3 +12603,450 @@ extern void tRNAScanUpdate (IteM i)
ObjMgrSendMsg (OM_MSG_UPDATE, bfp->input_entityID, 0, 0);
}
+typedef struct resolvefeatureoverlaps {
+ Uint1 trim_type;
+ Uint1 intersect_type;
+ LogInfoPtr lip;
+} ResolveFeatureOverlapsData, PNTR ResolveFeatureOverlapsPtr;
+
+static Boolean TrimLocationForIntersectingFeatures (SeqLocPtr PNTR p_slp, ValNodePtr feat_list)
+{
+ SeqLocPtr slp;
+ SeqFeatPtr sfp;
+ ValNodePtr vnp;
+ Int4 orig_left, new_left, feat_left;
+ Int4 orig_right, new_right, feat_right;
+ Int4 tmp;
+ SeqIdPtr sip;
+ Boolean changed = FALSE, end_changed;
+
+ if (p_slp == NULL || *p_slp == NULL || feat_list == NULL) return FALSE;
+
+ slp = *p_slp;
+ orig_left = SeqLocStart (slp);
+ orig_right = SeqLocStop (slp);
+ if (orig_left > orig_right)
+ {
+ tmp = orig_left;
+ orig_left = orig_right;
+ orig_right = tmp;
+ }
+
+ new_left = orig_left;
+ new_right = orig_right;
+
+ for (vnp = feat_list; vnp != NULL; vnp = vnp->next)
+ {
+ sfp = (SeqFeatPtr) vnp->data.ptrvalue;
+ feat_left = SeqLocStart (sfp->location);
+ feat_right = SeqLocStop (sfp->location);
+ if (feat_left > feat_right)
+ {
+ tmp = feat_left;
+ feat_left = feat_right;
+ feat_right = tmp;
+ }
+ if (feat_left <= orig_left && feat_right >= orig_left && feat_right < orig_right)
+ {
+ /* trim on left */
+ if (new_left < feat_right + 1)
+ {
+ new_left = feat_right + 1;
+ }
+ }
+ else if (feat_left <= orig_right && feat_right >= orig_right && feat_left > orig_left)
+ {
+ /* trim on right */
+ if (new_right > feat_left - 1)
+ {
+ new_right = feat_left - 1;
+ }
+ }
+ }
+
+ if (new_left >= new_right)
+ {
+ *p_slp = SeqLocFree (*p_slp);
+ }
+ else
+ {
+ if (new_left > orig_left)
+ {
+ sip = SeqLocId (slp);
+ end_changed = FALSE;
+ *p_slp = SeqLocDelete (*p_slp, sip, orig_left, new_left - 1, FALSE, &end_changed);
+ changed |= end_changed;
+ }
+ if (new_right < orig_right)
+ {
+ sip = SeqLocId (slp);
+ end_changed = FALSE;
+ *p_slp = SeqLocDelete (*p_slp, sip, new_right + 1, orig_right, FALSE, &end_changed);
+ changed |= end_changed;
+ }
+ }
+ return changed;
+}
+
+
+static void ResolveFeatureOverlapsBioseqCallback (BioseqPtr bsp, Pointer data)
+{
+ ResolveFeatureOverlapsPtr r;
+ SeqFeatPtr sfp;
+ SeqMgrFeatContext fcontext;
+ ValNodePtr overlap_list;
+ CharPtr feat_desc;
+ ValNode vn;
+
+ r = (ResolveFeatureOverlapsPtr) data;
+ if (bsp == NULL || r == NULL) return;
+
+ vn.next = NULL;
+ vn.choice = OBJ_SEQFEAT;
+
+ for (sfp = SeqMgrGetNextFeature (bsp, NULL, 0, r->trim_type, &fcontext);
+ sfp != NULL;
+ sfp = SeqMgrGetNextFeature (bsp, sfp, 0, r->trim_type, &fcontext))
+ {
+ vn.data.ptrvalue = sfp;
+ feat_desc = GetDiscrepancyItemText (&vn);
+ overlap_list = ListFeaturesOverlappingLocation (bsp, sfp->location, 0, r->intersect_type);
+ if (TrimLocationForIntersectingFeatures (&(sfp->location), overlap_list))
+ {
+ if (sfp->location == NULL)
+ {
+ fprintf (r->lip->fp, "Feature completely overlapped and removed:\n%s\n", feat_desc);
+ sfp->idx.deleteme = TRUE;
+ r->lip->data_in_log = TRUE;
+ }
+ else
+ {
+ fprintf (r->lip->fp, "Trimmed Feature: %sNew location:", feat_desc);
+ LogTrimmedLocation (r->lip, sfp->location);
+ fprintf (r->lip->fp, "\n");
+ }
+ }
+ feat_desc = MemFree (feat_desc);
+ overlap_list = ValNodeFree (overlap_list);
+ }
+}
+
+
+typedef struct resolvefeatureoverlapsform {
+ FORM_MESSAGE_BLOCK
+ DialoG trim_type;
+ DialoG intersect_type;
+ DialoG accept_cancel;
+
+} ResolveFeatureOverlapsFormData, PNTR ResolveFeatureOverlapsFormPtr;
+
+
+static void SetResolveFeatureOverlapsFormAccept (Pointer data)
+{
+ ResolveFeatureOverlapsFormPtr dlg;
+ ValNodePtr vnp1, vnp2;
+
+ dlg = (ResolveFeatureOverlapsFormPtr) data;
+ if (dlg == NULL) return;
+
+ vnp1 = DialogToPointer (dlg->trim_type);
+ vnp2 = DialogToPointer (dlg->intersect_type);
+ if (vnp1 == NULL || vnp2 == NULL)
+ {
+ DisableAcceptCancelDialogAccept (dlg->accept_cancel);
+ }
+ else
+ {
+ EnableAcceptCancelDialogAccept (dlg->accept_cancel);
+ }
+ vnp1 = ValNodeFree (vnp1);
+ vnp2 = ValNodeFree (vnp2);
+}
+
+
+static Boolean ResolveFeatureOverlapAction (Pointer data)
+{
+ ResolveFeatureOverlapsFormPtr dlg;
+ ValNodePtr vnp1, vnp2;
+ ResolveFeatureOverlapsData r;
+ SeqEntryPtr sep;
+
+ dlg = (ResolveFeatureOverlapsFormPtr) data;
+ if (dlg == NULL) return FALSE;
+
+ vnp1 = DialogToPointer (dlg->trim_type);
+ vnp2 = DialogToPointer (dlg->intersect_type);
+
+ WatchCursor();
+ Update();
+ r.trim_type = vnp1->choice;
+ r.intersect_type = vnp2->choice;
+ r.lip = OpenLog ("Trimmed Features");
+
+ sep = GetTopSeqEntryForEntityID (dlg->input_entityID);
+ VisitBioseqsInSep (sep, &r, ResolveFeatureOverlapsBioseqCallback);
+
+ CloseLog (r.lip);
+ FreeLog (r.lip);
+
+ DeleteMarkedObjects (dlg->input_entityID, 0, NULL);
+ ObjMgrSetDirtyFlag (dlg->input_entityID, TRUE);
+ ObjMgrSendMsg (OM_MSG_UPDATE, dlg->input_entityID, 0, 0);
+
+ ArrowCursor ();
+ Update ();
+ return TRUE;
+}
+
+
+extern void ResolveFeatureOverlaps (IteM i)
+{
+ BaseFormPtr bfp;
+ GrouP h, g;
+ SeqEntryPtr sep;
+ WindoW w;
+ ResolveFeatureOverlapsFormPtr dlg;
+
+#ifdef WIN_MAC
+ bfp = currentFormDataPtr;
+#else
+ bfp = GetObjectExtra (i);
+#endif
+ if (bfp == NULL)
+ return;
+
+ sep = GetTopSeqEntryForEntityID (bfp->input_entityID);
+ if (sep == NULL)
+ return;
+
+ dlg = (ResolveFeatureOverlapsFormPtr) MemNew (sizeof (ResolveFeatureOverlapsFormData));
+ w = FixedWindow (-50, -33, -10, -10, "Resolve Feature Overlaps",
+ StdCloseWindowProc);
+ SetObjectExtra (w, dlg, StdCleanupFormProc);
+ dlg->form = (ForM) w;
+
+ dlg->input_entityID = bfp->input_entityID;
+ dlg->input_itemID = bfp->input_itemID;
+ dlg->input_itemtype = bfp->input_itemtype;
+
+ h = HiddenGroup (w, -1, 0, NULL);
+ SetGroupSpacing (h, 10, 10);
+
+ g = HiddenGroup (h, 2, 0, NULL);
+ StaticPrompt (g, "Trim features of type", 0, popupMenuHeight, programFont, 'c');
+ dlg->trim_type = FeatureSelectionDialogEx (g, FALSE, sep, SetResolveFeatureOverlapsFormAccept, dlg);
+
+ StaticPrompt (g, "Where they overlap features of type", 0, popupMenuHeight, programFont, 'c');
+ dlg->intersect_type = FeatureSelectionDialogEx (g, FALSE, sep, SetResolveFeatureOverlapsFormAccept, dlg);
+
+ /* Accept and Cancel buttons */
+
+ dlg->accept_cancel = AcceptCancelDialog (h, ResolveFeatureOverlapAction, NULL,
+ NULL, NULL, (Pointer) dlg, w);
+
+ /* Line things up and display the window */
+
+ AlignObjects (ALIGN_CENTER,
+ (HANDLE) g,
+ (HANDLE) dlg->accept_cancel,
+ NULL);
+
+ RealizeWindow (w);
+ Show (w);
+ Select (w);
+ Update ();
+}
+
+
+static Boolean IsExternalGeneralID (SeqIdPtr sip)
+{
+ DbtagPtr dbtag;
+
+ if (sip == NULL || sip->data.ptrvalue == NULL || sip->choice != SEQID_GENERAL) return FALSE;
+ dbtag = (DbtagPtr) sip->data.ptrvalue;
+ if (StringCmp (dbtag->db, "NCBIFILE") != 0
+ && StringCmp (dbtag->db, "TMSMART") != 0)
+ {
+ return TRUE;
+ }
+ else
+ {
+ return FALSE;
+ }
+}
+
+
+static void ListBioseqsWithExternalGeneralID (BioseqPtr bsp, Pointer userdata)
+{
+ SeqIdPtr sip;
+
+ if (bsp != NULL && userdata != NULL)
+ {
+ for (sip = bsp->id; sip != NULL && !IsExternalGeneralID (sip); sip = sip->next)
+ {
+ }
+ if (sip != NULL)
+ {
+ ValNodeAddPointer ((ValNodePtr PNTR) userdata, OBJ_BIOSEQ, bsp);
+ }
+ }
+}
+
+
+static SeqIdPtr LocalIdFromGeneralId (SeqIdPtr sip)
+{
+ DbtagPtr dbtag;
+ ObjectIdPtr oip;
+ SeqIdPtr sip_new;
+ Char label[15];
+
+ if (!IsExternalGeneralID (sip)) return NULL;
+
+ dbtag = (DbtagPtr) sip->data.ptrvalue;
+ if (dbtag->tag == NULL) return NULL;
+
+ sip_new = ValNodeNew (NULL);
+ sip_new->choice = SEQID_LOCAL;
+ oip = ObjectIdNew ();
+ if (dbtag->tag->id > 0)
+ {
+ sprintf (label, "%d", dbtag->tag->id);
+ oip->str = StringSave (label);
+ }
+ else
+ {
+ oip->str = StringSave (dbtag->tag->str);
+ }
+ sip_new->data.ptrvalue = oip;
+ return sip_new;
+}
+
+extern void ConvertGeneralIdToLocalID (IteM i)
+{
+ BaseFormPtr bfp;
+ SeqEntryPtr sep;
+ ValNodePtr bsp_list = NULL, vnp;
+ BioseqPtr bsp;
+ SeqIdPtr sip_new, sip_next, sip_prev, sip_list, sip;
+
+#ifdef WIN_MAC
+ bfp = currentFormDataPtr;
+#else
+ bfp = GetObjectExtra (i);
+#endif
+ if (bfp == NULL)
+ return;
+
+ sep = GetTopSeqEntryForEntityID (bfp->input_entityID);
+ if (sep == NULL)
+ return;
+
+ VisitBioseqsInSep (sep, &bsp_list, ListBioseqsWithExternalGeneralID);
+
+ for (vnp = bsp_list; vnp != NULL; vnp = vnp->next)
+ {
+ bsp = (BioseqPtr) vnp->data.ptrvalue;
+ if (bsp == NULL) continue;
+ sip = bsp->id;
+ sip_prev = NULL;
+ while (sip != NULL)
+ {
+ sip_next = sip->next;
+ if (IsExternalGeneralID (sip) && (sip_new = LocalIdFromGeneralId (bsp->id)) != NULL)
+ {
+ sip_new->next = sip->next;
+ sip->next = NULL;
+ if (sip_prev == NULL)
+ {
+ bsp->id = sip_new;
+ }
+ else
+ {
+ sip_prev->next = sip_new;
+ }
+ sip_list = bsp->id;
+ /* now use just old ID for replace */
+ bsp->id = sip;
+ BioseqReplaceID (bsp, sip_new);
+ /* put list back */
+ bsp->id = SeqIdFree (bsp->id);
+ bsp->id = sip_list;
+ SeqMgrReplaceInBioseqIndex (bsp);
+ }
+ else
+ {
+ sip_prev = sip;
+ }
+ sip = sip_next;
+ }
+ }
+ ObjMgrSetDirtyFlag (bfp->input_entityID, TRUE);
+ ObjMgrSendMsg (OM_MSG_UPDATE, bfp->input_entityID, 0, 0);
+}
+
+
+static Boolean IsUSA (CharPtr country)
+{
+ if (StringICmp (country, "USA") == 0
+ || StringICmp (country, "United States of America") == 0
+ || StringICmp (country, "U.S.A.") == 0
+ || StringICmp (country, "U S A") == 0) {
+ return TRUE;
+ } else {
+ return FALSE;
+ }
+}
+
+
+static void AbbreviateCitSubAffilStatesCallback (PubdescPtr pdp, Pointer data)
+{
+ ValNodePtr vnp;
+ CitSubPtr csp;
+ CharPtr abbrev;
+
+ if (pdp == NULL) return;
+ for (vnp = pdp->pub; vnp != NULL; vnp = vnp->next) {
+ if (vnp->choice == PUB_Sub) {
+ csp = (CitSubPtr) vnp->data.ptrvalue;
+ if (csp != NULL && csp->authors != NULL
+ && csp->authors->affil != NULL
+ && IsUSA(csp->authors->affil->country)) {
+ if (StringCmp (csp->authors->affil->country, "USA") != 0) {
+ csp->authors->affil->country = MemFree (csp->authors->affil->country);
+ csp->authors->affil->country = StringSave ("USA");
+ }
+ abbrev = GetStateAbbreviation (csp->authors->affil->sub);
+ if (abbrev != NULL) {
+ csp->authors->affil->sub = MemFree (csp->authors->affil->sub);
+ csp->authors->affil->sub = StringSave (abbrev);
+ }
+ }
+ }
+ }
+
+}
+
+
+extern void AbbreviateCitSubAffilStates (IteM i)
+{
+ BaseFormPtr bfp;
+ SeqEntryPtr sep;
+
+#ifdef WIN_MAC
+ bfp = currentFormDataPtr;
+#else
+ bfp = GetObjectExtra (i);
+#endif
+ if (bfp == NULL)
+ return;
+
+ sep = GetTopSeqEntryForEntityID (bfp->input_entityID);
+ if (sep == NULL)
+ return;
+
+ VisitPubdescsInSep (sep, NULL, AbbreviateCitSubAffilStatesCallback);
+
+ ObjMgrSetDirtyFlag (bfp->input_entityID, TRUE);
+ ObjMgrSendMsg (OM_MSG_UPDATE, bfp->input_entityID, 0, 0);
+}
+
diff --git a/sequin/sequin7.c b/sequin/sequin7.c
index 42d87622..6ed3de23 100644
--- a/sequin/sequin7.c
+++ b/sequin/sequin7.c
@@ -29,7 +29,7 @@
*
* Version Creation Date: 1/3/98
*
-* $Revision: 6.309 $
+* $Revision: 6.325 $
*
* File Description:
*
@@ -78,6 +78,7 @@ static char *time_of_compilation = "now";
#include <algo/blast/api/blast_seqalign.h>
#include <algo/blast/api/blast_api.h>
#include <salstruc.h>
+#include <valid.h> /* added for latloncountry conflict checking */
#define CONVERT_TO_JOIN 1
#define CONVERT_TO_ORDER 2
@@ -6421,6 +6422,7 @@ static void TrimFromSequenceEnd (EditSeqPtr esp,
CharPtr currSeqStr;
Int2 length;
Int4 pos;
+ Int4 trim_length;
/* Get the current sequence string */
@@ -6430,59 +6432,76 @@ static void TrimFromSequenceEnd (EditSeqPtr esp,
/* the beginning of the string... */
if (esp->endval == EDIT_FIVE_PRIME)
+ {
+ /* Find end point */
+
+ if (esp->trimByBool == TRIM_BY_SEQUENCE)
+ {
+ length = StringLen (esp->seqstr);
+ if (StringNICmp (esp->seqstr, currSeqStr, length) != 0)
+ return;
+ pos = length - 1;
+ trim_length = length;
+ }
+ else if (esp->trimByBool == TRIM_BY_COUNT)
{
- /* Find end point */
-
- if (esp->trimByBool == TRIM_BY_SEQUENCE)
- {
- length = StringLen (esp->seqstr);
- if (StringNICmp (esp->seqstr, currSeqStr, length) != 0)
+ pos = esp->trimCount - 1;
+ trim_length = esp->trimCount;
+ }
+ else
return;
- pos = length - 1;
- }
- else if (esp->trimByBool == TRIM_BY_COUNT)
- pos = esp->trimCount - 1;
- else
- return;
- /* Trim from beginning of string to end point */
-
- esp->frameshift = length;
- BioseqDelete (bsp->id, 0, pos, TRUE, FALSE);
- esp->extendedthis = bsp;
- FixAndRetranslateCDSs (bsp, sep, esp, TRUE);
- }
+ /* Trim from beginning of string to end point */
+
+ esp->frameshift = trim_length;
+ BioseqDelete (bsp->id, 0, pos, TRUE, FALSE);
+ esp->extendedthis = bsp;
+ FixAndRetranslateCDSs (bsp, sep, esp, TRUE);
+
+ /* trim quality scores */
+ TrimQualityScores (bsp, trim_length, TRUE);
+ }
/* .. or the 3' end (i.e., the */
/* end of the string. */
else if (esp->endval == EDIT_THREE_PRIME)
+ {
+ /* Find trim point */
+
+ if (esp->trimByBool == TRIM_BY_SEQUENCE)
+ {
+ length = StringLen (esp->seqstr);
+ pos = bsp->length - length;
+ if (StringICmp (esp->seqstr, &currSeqStr[pos]) != 0)
+ return;
+ trim_length = length;
+ }
+ else if (esp->trimByBool == TRIM_BY_COUNT)
{
- /* Find trim point */
-
- if (esp->trimByBool == TRIM_BY_SEQUENCE)
- {
- length = StringLen (esp->seqstr);
- pos = bsp->length - length;
- if (StringICmp (esp->seqstr, &currSeqStr[pos]) != 0)
+ pos = bsp->length - esp->trimCount;
+ trim_length = esp->trimCount;
+ }
+ else
return;
- }
- else if (esp->trimByBool == TRIM_BY_COUNT)
- pos = bsp->length - esp->trimCount;
- else
- return;
-
- /* Trim from there to end of string */
- BioseqDelete (bsp->id, pos, bsp->length - 1, TRUE, FALSE);
- esp->extendedthis = bsp;
- FixAndRetranslateCDSs (bsp, sep, esp, FALSE);
- }
+ /* Trim from there to end of string */
+
+ BioseqDelete (bsp->id, pos, bsp->length - 1, TRUE, FALSE);
+ esp->extendedthis = bsp;
+ FixAndRetranslateCDSs (bsp, sep, esp, FALSE);
+
+ /* trim quality scores */
+ TrimQualityScores (bsp, trim_length, FALSE);
+ }
}
-static void AddToSequenceEnd (EditSeqPtr esp,
- SeqEntryPtr sep,
- BioseqPtr bsp)
+static void
+AddToSequenceEnd
+(EditSeqPtr esp,
+ SeqEntryPtr sep,
+ BioseqPtr bsp,
+ LogInfoPtr lip)
{
ValNodePtr head;
Int4 len;
@@ -6542,10 +6561,16 @@ static void AddToSequenceEnd (EditSeqPtr esp,
FixAndRetranslateCDSs (bsp, sep, esp, TRUE);
}
ValNodeFree (head);
+ if (lip != NULL) {
+ RemoveQualityScores (bsp, lip->fp, &(lip->data_in_log));
+ }
}
MemFree (str);
} else {
insertchar (esp->seqstr, pos, bsp->id, bsp->mol, FALSE);
+ if (lip != NULL) {
+ RemoveQualityScores (bsp, lip->fp, &(lip->data_in_log));
+ }
}
}
@@ -6562,6 +6587,7 @@ static void DoEditSeqEndsProc (ButtoN b)
BioseqPtr bsp;
SeqEntryPtr sep;
Boolean add_cit_subs = FALSE;
+ LogInfoPtr lip;
esp = (EditSeqPtr) GetObjectExtra (b);
if (esp == NULL) {
@@ -6606,6 +6632,7 @@ static void DoEditSeqEndsProc (ButtoN b)
add_cit_subs = GetStatus (esp->addCitSub);
+ lip = OpenLog ("Quality Scores Affected");
for (vnp = sip_list; vnp != NULL; vnp = vnp->next)
{
sip = (SeqIdPtr) vnp->data.ptrvalue;
@@ -6614,7 +6641,7 @@ static void DoEditSeqEndsProc (ButtoN b)
if (bsp != NULL && sep != NULL && EditSeqEntryHasGene (bsp, sep, esp))
{
if (esp->addOrTrimBool == 1)
- AddToSequenceEnd (esp, sep, bsp);
+ AddToSequenceEnd (esp, sep, bsp, lip);
else
TrimFromSequenceEnd (esp, sep, bsp);
if (add_cit_subs)
@@ -6623,6 +6650,8 @@ static void DoEditSeqEndsProc (ButtoN b)
}
}
}
+ CloseLog (lip);
+ lip = FreeLog (lip);
MemFree (esp->seqstr);
MemFree (esp->genestr);
@@ -7059,7 +7088,7 @@ static void FixFeatureIntervalCallback (SeqFeatPtr sfp, Pointer userdata)
if (sfp->idx.subtype == FEATDEF_CDS)
{
bsp = BioseqFindFromSeqLoc (sfp->location);
- SeqEdTranslateOneCDS (sfp, bsp, ffp->entityID);
+ SeqEdTranslateOneCDS (sfp, bsp, ffp->entityID, Sequin_GlobalAlign2Seq);
}
}
@@ -7395,7 +7424,7 @@ extern void ConvertInnerCDSsToProteinFeatures (IteM i)
typedef struct objstringdata
{
- StringConstraintPtr scp;
+ StringConstraintXPtr scp;
Boolean found;
} ObjStringData, PNTR ObjStringPtr;
@@ -7409,14 +7438,14 @@ static void LIBCALLBACK AsnWriteStringConstraintCallBack (AsnExpOptStructPtr pAE
if (ISA_STRINGTYPE (AsnFindBaseIsa (pAEOS->atp)))
{
pchSource = (CharPtr) pAEOS->dvp->ptrvalue;
- if (DoesStringMatchConstraint (pchSource, osp->scp))
+ if (DoesStringMatchConstraintX (pchSource, osp->scp))
{
osp->found = TRUE;
}
}
}
-static Boolean DoesBioseqMatchStringConstraint (BioseqPtr bsp, StringConstraintPtr scp)
+static Boolean DoesBioseqMatchStringConstraint (BioseqPtr bsp, StringConstraintXPtr scp)
{
ObjMgrPtr omp;
@@ -7450,7 +7479,7 @@ static Boolean DoesBioseqMatchStringConstraint (BioseqPtr bsp, StringConstraintP
}
-extern Boolean DoBioseqFeaturesMatchSequenceConstraint (BioseqPtr bsp, ValNodePtr feat_list, StringConstraintPtr scp)
+extern Boolean DoBioseqFeaturesMatchSequenceConstraintX (BioseqPtr bsp, ValNodePtr feat_list, StringConstraintXPtr scp)
{
AsnExpOptPtr aeop;
AsnIoPtr aip;
@@ -7697,7 +7726,7 @@ static void DoApplyKeywords (ButtoN b)
scfp->pfp = (ParseFieldPtr) DialogToPointer (scfp->string_src_dlg);
scfp->fsp = FilterSetNew ();
- scfp->fsp->scp = (StringConstraintPtr) DialogToPointer (scfp->string_constraint_dlg);
+ scfp->fsp->scp = (StringConstraintXPtr) DialogToPointer (scfp->string_constraint_dlg);
scfp->keyword = SaveStringFromText (scfp->keyword_txt);
sep = GetTopSeqEntryForEntityID (scfp->input_entityID);
@@ -7748,9 +7777,9 @@ extern void ApplyKeywordWithStringConstraint (IteM i)
scfp->keyword_txt = DialogText (g, "", 30, NULL);
ppt = StaticPrompt (h, "Where", 0, 0, programFont, 'l');
- scfp->string_src_dlg = ParseFieldDestDialog (h, NULL, NULL);
+ scfp->string_src_dlg = ParseFieldDestDialogEx (h, NULL, NULL, FALSE, TRUE);
- scfp->string_constraint_dlg = StringConstraintDialog (h, NULL, FALSE);
+ scfp->string_constraint_dlg = StringConstraintDialogX (h, NULL, FALSE);
c = HiddenGroup (h, 2, 0, NULL);
b = PushButton (c, "Accept", DoApplyKeywords);
@@ -7782,7 +7811,7 @@ static void DoRemoveKeywords (ButtoN b)
scfp->pfp = (ParseFieldPtr) DialogToPointer (scfp->string_src_dlg);
scfp->fsp = FilterSetNew ();
- scfp->fsp->scp = (StringConstraintPtr) DialogToPointer (scfp->string_constraint_dlg);
+ scfp->fsp->scp = (StringConstraintXPtr) DialogToPointer (scfp->string_constraint_dlg);
scfp->keyword = SaveStringFromText (scfp->keyword_txt);
sep = GetTopSeqEntryForEntityID (scfp->input_entityID);
@@ -7833,9 +7862,9 @@ extern void RemoveKeywordWithStringConstraint (IteM i)
scfp->keyword_txt = DialogText (g, "", 30, NULL);
ppt = StaticPrompt (h, "Where", 0, 0, programFont, 'l');
- scfp->string_src_dlg = ParseFieldDestDialog (h, NULL, NULL);
+ scfp->string_src_dlg = ParseFieldDestDialogEx (h, NULL, NULL, FALSE, TRUE);
- scfp->string_constraint_dlg = StringConstraintDialog (h, NULL, FALSE);
+ scfp->string_constraint_dlg = StringConstraintDialogX (h, NULL, FALSE);
c = HiddenGroup (h, 2, 0, NULL);
b = PushButton (c, "Accept", DoRemoveKeywords);
@@ -11764,6 +11793,43 @@ static void RearrangeVecScreenList (GrouP g)
}
+static void ReportVecScreenDiscrepancies (LogInfoPtr lip, ValNodePtr item_list)
+{
+ ClickableItemPtr cip;
+ if (item_list == NULL || lip == NULL || lip->fp == NULL) return;
+
+ while (item_list != NULL)
+ {
+ cip = (ClickableItemPtr) item_list->data.ptrvalue;
+ if (cip != NULL)
+ {
+ if (!StringHasNoText (cip->description))
+ {
+ fprintf (lip->fp, "%s\n", cip->description);
+ lip->data_in_log = TRUE;
+ }
+ ReportVecScreenDiscrepancies (lip, cip->subcategories);
+ }
+ item_list = item_list->next;
+ }
+}
+
+
+static void MakeVecScreenReport (ButtoN b)
+{
+ VecScreenToolPtr vstp;
+ LogInfoPtr lip;
+
+ vstp = (VecScreenToolPtr) GetObjectExtra (b);
+ if (vstp == NULL) return;
+
+ lip = OpenLog ("VecScreen Report");
+ ReportVecScreenDiscrepancies (lip, vstp->item_list);
+ CloseLog (lip);
+ lip = FreeLog (lip);
+}
+
+
extern void VecScreenTool (IteM i)
{
BaseFormPtr bfp;
@@ -11855,7 +11921,9 @@ extern void VecScreenTool (IteM i)
c = HiddenGroup (h, 4, 0, NULL);
SetGroupSpacing (c, 10, 10);
-
+
+ b = PushButton (c, "Make Report", MakeVecScreenReport);
+ SetObjectExtra (b, drfp, NULL);
b = PushButton (c, "Trim Selected Regions", TrimSelectedBtn);
SetObjectExtra (b, drfp, NULL);
PushButton (c, "Dismiss", StdCancelButtonProc);
@@ -12114,20 +12182,27 @@ static ValNodePtr BarcodeResultsVNFreeFunc (ValNodePtr vnp)
/* Barcode Tool */
-typedef struct barcodetool {
- FORM_MESSAGE_BLOCK
- DialoG clickable_list;
- BaseFormPtr bfp;
- PrompT pass_fail_summary;
- ButtoN undo;
- ButtoN undo_all;
- ButtoN redo;
+struct barcodetool;
+
+typedef void (*RefreshBarcodeDataFunc) PROTO ((Pointer));
+
+#define BARCODE_TOOL_BLOCK \
+ FORM_MESSAGE_BLOCK \
+ DialoG clickable_list; \
+ BaseFormPtr bfp; \
+ PrompT pass_fail_summary; \
+ ButtoN undo; \
+ ButtoN undo_all; \
+ ButtoN redo; \
+ ValNodePtr item_list; \
+ SeqEntryPtr top_sep; \
+ LogInfoPtr lip; \
+ BarcodeTestConfigPtr cfg; \
+ BarcodeUndoListPtr undo_list; \
+ RefreshBarcodeDataFunc refresh_func;
- ValNodePtr item_list;
- SeqEntryPtr top_sep;
- LogInfoPtr lip;
- BarcodeTestConfigPtr cfg;
- BarcodeUndoListPtr undo_list;
+typedef struct barcodetool {
+BARCODE_TOOL_BLOCK
} BarcodeToolData, PNTR BarcodeToolPtr;
static void CleanupBarcodeTool (GraphiC g, VoidPtr data)
@@ -12220,12 +12295,14 @@ static Int2 LIBCALLBACK BarcodeToolMsgFunc (OMMsgStructPtr ommsp)
}
-static void RefreshBarcodeList (BarcodeToolPtr vstp)
+static void RefreshBarcodeList (Pointer data)
{
+ BarcodeToolPtr vstp;
ValNodePtr pass_fail_list = NULL, vnp;
Int4 num_fail = 0, num_pass = 0;
Char msg[30];
+ vstp = (BarcodeToolPtr) data;
if (vstp == NULL) return;
PointerToDialog (vstp->clickable_list, NULL);
@@ -12437,7 +12514,10 @@ extern void BarcodeRefreshButton (ButtoN b)
vstp = (BarcodeToolPtr) GetObjectExtra (b);
if (vstp == NULL) return;
- RefreshBarcodeList (vstp);
+ if (vstp->refresh_func != NULL)
+ {
+ (vstp->refresh_func) (vstp);
+ }
RedrawBarcodeTool (vstp);
}
@@ -12465,7 +12545,7 @@ extern void BarcodeReportButton (ButtoN b)
}
lip = OpenLog ("BARCODE Discrepancies");
- WriteBarcodeDiscrepancies (lip->fp, vstp->item_list);
+ WriteBarcodeDiscrepancies (lip->fp, object_list);
lip->data_in_log = TRUE;
CloseLog (lip);
lip = FreeLog (lip);
@@ -12979,6 +13059,25 @@ static void BarcodeTestApplyTagTable (ButtoN b)
}
+static void BarcodeComprehensiveReportButton (ButtoN b)
+{
+ BarcodeToolPtr drfp;
+ LogInfoPtr lip;
+ ValNodePtr object_list;
+
+ drfp = (BarcodeToolPtr) GetObjectExtra (b);
+ if (drfp == NULL) return;
+
+ lip = OpenLog ("BARCODE Discrepancies");
+ object_list = GetBarcodePassFail (drfp->top_sep, drfp->cfg);
+ WriteBarcodeTestComprehensive (lip->fp, object_list);
+ lip->data_in_log = TRUE;
+ CloseLog (lip);
+ lip = FreeLog (lip);
+ object_list = BarcodeTestResultsListFree (object_list);
+}
+
+
extern void BarcodeTestTool (IteM i)
{
BaseFormPtr bfp;
@@ -13012,6 +13111,7 @@ extern void BarcodeTestTool (IteM i)
SetObjectExtra (w, drfp, CleanupBarcodeTool);
drfp->form = (ForM) w;
drfp->formmessage = BarcodeToolMessage;
+ drfp->refresh_func = RefreshBarcodeList;
/* register to receive update messages */
drfp->userkey = OMGetNextUserKey ();
@@ -13040,12 +13140,14 @@ extern void BarcodeTestTool (IteM i)
drfp->pass_fail_summary = StaticPrompt (h, "0 Pass, 0 Fail", 20 * stdCharWidth, dialogTextHeight, programFont, 'l');
RefreshBarcodeList(drfp);
- c3 = HiddenGroup (h, 7, 0, NULL);
+ c3 = HiddenGroup (h, 8, 0, NULL);
SetGroupSpacing (c3, 10, 10);
b = PushButton (c3, "Compliance Report", BarcodeTestComplianceReport);
SetObjectExtra (b, drfp, NULL);
b = PushButton (c3, "Failure Report", BarcodeReportButton);
SetObjectExtra (b, drfp, NULL);
+ b = PushButton (c3, "Comprehensive Report", BarcodeComprehensiveReportButton);
+ SetObjectExtra (b, drfp, NULL);
b = PushButton (c3, "Replace Tags", BarcodeTestImportTagTable);
SetObjectExtra (b, drfp, NULL);
@@ -13984,8 +14086,9 @@ static void FindBadLatLonSourceFeat (SeqFeatPtr sfp, Pointer userdata)
-static void RefreshLatLonTool (BarcodeToolPtr vstp)
+static void RefreshLatLonTool (Pointer data)
{
+ BarcodeToolPtr vstp = (BarcodeToolPtr) data;
if (vstp == NULL) return;
PointerToDialog (vstp->clickable_list, NULL);
@@ -14186,18 +14289,6 @@ static void LatLonReport (ButtoN b)
}
-extern void LatLonRefreshButton (ButtoN b)
-{
- BarcodeToolPtr vstp;
-
- vstp = (BarcodeToolPtr) GetObjectExtra (b);
- if (vstp == NULL) return;
-
- RefreshLatLonTool (vstp);
- RedrawBarcodeTool (vstp);
-}
-
-
static void MoveIncorrectlyFormattedLatLonToNote (ButtoN b)
{
BarcodeToolPtr vstp;
@@ -14319,7 +14410,8 @@ extern void LatLonTool (IteM i)
SetObjectExtra (w, drfp, CleanupLatLonTool);
drfp->form = (ForM) w;
drfp->formmessage = BarcodeToolMessage;
-
+
+ drfp->refresh_func = RefreshLatLonTool;
/* register to receive update messages */
drfp->userkey = OMGetNextUserKey ();
drfp->procid = 0;
@@ -14353,7 +14445,7 @@ extern void LatLonTool (IteM i)
SetObjectExtra (b, drfp, NULL);
b = PushButton (c, "Make Report", LatLonReport);
SetObjectExtra (b, drfp, NULL);
- b = PushButton (c, "Refresh List", LatLonRefreshButton);
+ b = PushButton (c, "Refresh List", BarcodeRefreshButton);
SetObjectExtra (b, drfp, NULL);
b = PushButton (c, "Move to Note", MoveIncorrectlyFormattedLatLonToNote);
SetObjectExtra (b, drfp, NULL);
@@ -14369,12 +14461,450 @@ extern void LatLonTool (IteM i)
}
+static void FindLatLonCountryConflicts (SeqDescrPtr sdp, Pointer data)
+{
+ BioSourcePtr biop;
+ SubSourcePtr ssp;
+ CharPtr orig_country = NULL, country = NULL, cp;
+ Boolean found_lat_lon = FALSE;
+ FloatHi lat, lon;
+
+ if (sdp == NULL || sdp->choice != Seq_descr_source || sdp->data.ptrvalue == NULL || data == NULL) return;
+ biop = (BioSourcePtr) sdp->data.ptrvalue;
+
+ for (ssp = biop->subtype; ssp != NULL && (country == NULL || !found_lat_lon); ssp = ssp->next)
+ {
+ if (ssp->subtype == SUBSRC_country && !StringHasNoText (ssp->name))
+ {
+ orig_country = ssp->name;
+ country = StringSave (orig_country);
+ }
+ else if (ssp->subtype == SUBSRC_lat_lon)
+ {
+ if (ParseLatLon (ssp->name, &lat, &lon))
+ {
+ found_lat_lon = TRUE;
+ }
+ }
+ }
+
+ cp = StringChr (country, ':');
+ if (cp != NULL)
+ {
+ *cp = 0;
+ }
+
+ if (found_lat_lon && IsCountryInLatLonList (country))
+ {
+ if (!TestLatLonForCountry (country, lat, lon)
+ && !TestLatLonForCountry (orig_country, lat, lon)
+ && !StringContainsBodyOfWater (orig_country))
+ {
+ ValNodeAddPointer ((ValNodePtr PNTR) data, OBJ_SEQDESC, sdp);
+ }
+ }
+ country = MemFree (country);
+}
+
+
+static void RefreshLatLonCountryTool (Pointer data)
+{
+ BarcodeToolPtr vstp = (BarcodeToolPtr) data;
+ if (vstp == NULL) return;
+
+ PointerToDialog (vstp->clickable_list, NULL);
+ vstp->item_list = ValNodeFree (vstp->item_list);
+
+ VisitDescriptorsInSep (vstp->top_sep, &(vstp->item_list), FindLatLonCountryConflicts);
+
+ PointerToDialog (vstp->clickable_list, vstp->item_list);
+
+}
+
+
+static void LatLonCountryReport (ButtoN b)
+{
+ BarcodeToolPtr drfp;
+ ValNodePtr vnp;
+ LogInfoPtr lip;
+ SeqDescrPtr sdp;
+ BioSourcePtr biop;
+ SubSourcePtr ssp;
+ CharPtr fix, country = NULL, lat_lon = NULL;
+
+ drfp = (BarcodeToolPtr) GetObjectExtra (b);
+ if (drfp == NULL) return;
+
+ lip = OpenLog ("Incorrectly Formatted Lat-lon Values");
+
+ for (vnp = drfp->item_list; vnp != NULL; vnp = vnp->next)
+ {
+ if (vnp->choice != OBJ_SEQDESC) continue;
+ sdp = vnp->data.ptrvalue;
+ if (sdp != NULL && sdp->choice == Seq_descr_source && sdp->data.ptrvalue != NULL)
+ {
+ biop = (BioSourcePtr) sdp->data.ptrvalue;
+ country = NULL;
+ lat_lon = NULL;
+ for (ssp = biop->subtype; ssp != NULL && (country == NULL || lat_lon == NULL); ssp = ssp->next)
+ {
+ if (ssp->subtype == SUBSRC_country && country == NULL)
+ {
+ country = ssp->name;
+ }
+ else if (ssp->subtype == SUBSRC_lat_lon && lat_lon == NULL)
+ {
+ lat_lon = ssp->name;
+ }
+ }
+ if (country == NULL) country = "missing";
+ if (lat_lon == NULL) lat_lon = "missing";
+ fix = GetLatLonCountryCorrection (OBJ_SEQDESC, sdp, NULL);
+
+ fprintf (lip->fp, "Country: %s\tLat-lon: %s\tCorrection: %s\n",
+ country, lat_lon, fix == NULL ? "No suggestion" : fix);
+ fix = MemFree (fix);
+ lip->data_in_log = TRUE;
+ }
+ }
+
+ CloseLog (lip);
+ lip = FreeLog (lip);
+
+}
+
+
+static CharPtr SkipNumberInString (CharPtr str)
+{
+ CharPtr cp;
+
+ cp = str;
+ while (isdigit (*cp))
+ {
+ cp++;
+ }
+ if (*cp == '.')
+ {
+ cp++;
+ }
+ while (isdigit (*cp))
+ {
+ cp++;
+ }
+ return cp;
+}
+
+static Boolean GetLatLonTokens (CharPtr str, CharPtr PNTR lat, CharPtr PNTR ns, CharPtr PNTR lon, CharPtr PNTR ew)
+{
+ CharPtr cp;
+
+ if (StringHasNoText (str) || lat == NULL || ns == NULL || lon == NULL || ew == NULL) return FALSE;
+
+ cp = str;
+ while (isspace (*cp))
+ {
+ cp++;
+ }
+ if (!isdigit (*cp)) return FALSE;
+ *lat = cp;
+ cp = SkipNumberInString (cp);
+
+ while (isspace (*cp))
+ {
+ cp++;
+ }
+
+ if (*cp != 'N' && *cp != 'S') return FALSE;
+ *ns = cp;
+ cp++;
+
+ while (isspace (*cp))
+ {
+ cp++;
+ }
+
+ if (!isdigit (*cp)) return FALSE;
+ *lon = cp;
+ cp = SkipNumberInString (cp);
+
+ while (isspace (*cp))
+ {
+ cp++;
+ }
+
+ if (*cp != 'E' && *cp != 'W') return FALSE;
+ *ew = cp;
+
+ return TRUE;
+}
+
+static CharPtr MakeLatLonValue (CharPtr lat, Char ns, CharPtr lon, Char ew)
+{
+ CharPtr newval, cp;
+ Int4 latlen, lonlen, len;
+
+ if (StringHasNoText (lat) || StringHasNoText (lon))
+ {
+ return NULL;
+ }
+ cp = SkipNumberInString (lat);
+ latlen = cp - lat;
+ cp = SkipNumberInString (lon);
+ lonlen = cp - lon;
+
+ len = latlen + lonlen + 6;
+
+ newval = (CharPtr) MemNew (sizeof (Char) * len);
+
+ cp = newval;
+ StringNCpy (newval, lat, latlen);
+ cp += latlen;
+ *(cp++) = ' ';
+ *(cp++) = ns;
+ *(cp++) = ' ';
+ StringNCpy (cp, lon, lonlen);
+ cp += lonlen;
+ *(cp++) = ' ';
+ *(cp++) = ew;
+ *(cp++) = 0;
+
+ return newval;
+}
+
+
+static void LatLonCountryAutocorrectList (FILE *fp, ValNodePtr object_list)
+{
+ ValNodePtr vnp;
+ SeqDescrPtr sdp;
+ BioSourcePtr biop;
+ SubSourcePtr country_ssp, lat_lon_ssp, ssp;
+ FloatHi lat, lon;
+ CharPtr country, cp;
+ CharPtr fix;
+
+ CharPtr pLat, pNs, pLon, pEw;
+
+ if (fp == NULL || object_list == NULL) return;
+
+ for (vnp = object_list; vnp != NULL; vnp = vnp->next)
+ {
+ if (vnp->choice != OBJ_SEQDESC) continue;
+ sdp = vnp->data.ptrvalue;
+ if (sdp != NULL && sdp->choice == Seq_descr_source)
+ {
+ biop = (BioSourcePtr) sdp->data.ptrvalue;
+ country_ssp = NULL;
+ lat_lon_ssp = NULL;
+ for (ssp = biop->subtype; ssp != NULL && (country_ssp == NULL || lat_lon_ssp == NULL); ssp = ssp->next)
+ {
+ if (StringHasNoText (ssp->name)) continue;
+ if (ssp->subtype == SUBSRC_country && country_ssp == NULL)
+ {
+ country_ssp = ssp;
+ }
+ else if (ssp->subtype == SUBSRC_lat_lon && lat_lon_ssp == NULL && ParseLatLon (ssp->name, &lat, &lon))
+ {
+ lat_lon_ssp = ssp;
+ }
+ }
+ if (country_ssp == NULL)
+ {
+ country = NULL;
+ } else {
+ country = StringSave (country_ssp->name);
+ cp = StringChr (country, ':');
+ if (cp != NULL) *cp = 0;
+ }
+ if (country != NULL && lat_lon_ssp != NULL
+ && IsCountryInLatLonList (country)
+ && !TestLatLonForCountry (country, lat, lon)
+ && GetLatLonTokens (lat_lon_ssp->name, &pLat, &pNs, &pLon, &pEw))
+ {
+ fix = NULL;
+ if (TestLatLonForCountry (country, -lat, lon))
+ {
+ fix = MakeLatLonValue (pLat, *pNs == 'N' ? 'S' : 'N',
+ pLon, *pEw);
+ }
+ else if (TestLatLonForCountry (country, lat, -lon))
+ {
+ fix = MakeLatLonValue (pLat, *pNs,
+ pLon, *pEw == 'E' ? 'W' : 'E');
+ } else if (TestLatLonForCountry (country, lon, lat)) {
+ fix = MakeLatLonValue (pLon, *pEw == 'E' ? 'N' : 'S',
+ pLat, *pNs == 'N' ? 'E' : 'W');
+ }
+
+ if (fix != NULL)
+ {
+ fprintf (fp, "Corrected %s to %s\n", lat_lon_ssp->name, fix);
+ lat_lon_ssp->name = MemFree (lat_lon_ssp->name);
+ lat_lon_ssp->name = fix;
+ }
+ else
+ {
+ fprintf (fp, "Unable to correct %s\n", lat_lon_ssp->name);
+ }
+ }
+ country = MemFree (country);
+ }
+ }
+}
+
+
+static void LatLonCountryAutocorrect (ButtoN b)
+{
+ BarcodeToolPtr drfp;
+ ValNodePtr object_list;
+ LogInfoPtr lip;
+
+ drfp = (BarcodeToolPtr) GetObjectExtra (b);
+ if (drfp == NULL) return;
+ object_list = DialogToPointer (drfp->clickable_list);
+
+ if (object_list == NULL)
+ {
+ if (ANS_YES == Message (MSG_YN, "You have not selected any BioSources - correct all?"))
+ {
+ object_list = drfp->item_list;
+ }
+ else
+ {
+ return;
+ }
+ }
+
+ lip = OpenLog ("Lat-lon Values Corrected");
+
+ LatLonCountryAutocorrectList (lip->fp, object_list);
+
+ if (object_list != drfp->item_list)
+ {
+ object_list = ValNodeFree (object_list);
+ }
+
+ RefreshLatLonCountryTool (drfp);
+ RedrawBarcodeTool (drfp);
+
+ ObjMgrSetDirtyFlag (drfp->input_entityID, TRUE);
+ ObjMgrSendMsg (OM_MSG_UPDATE, drfp->input_entityID, 0, 0);
+ Update();
+
+ lip->data_in_log = TRUE;
+ CloseLog (lip);
+ lip = FreeLog (lip);
+}
+
+
+
+extern void LatLonCountryTool (IteM i)
+{
+ BaseFormPtr bfp;
+ SeqEntryPtr sep;
+ ValNodePtr biosources = NULL;
+ BarcodeToolPtr drfp;
+ WindoW w;
+ GrouP h, c;
+ ButtoN b;
+ OMUserDataPtr omudp;
+ PrompT ppt;
+
+#ifdef WIN_MAC
+ bfp = currentFormDataPtr;
+#else
+ bfp = GetObjectExtra (i);
+#endif
+ if (bfp == NULL || bfp->input_entityID == 0) return;
+
+ sep = GetTopSeqEntryForEntityID (bfp->input_entityID);
+
+ VisitDescriptorsInSep (sep, &biosources, FindLatLonCountryConflicts);
+
+ if (biosources == NULL)
+ {
+ Message (MSG_OK, "No conflicts found.");
+ return;
+ }
+
+ biosources = ValNodeFree (biosources);
+
+ drfp = (BarcodeToolPtr) MemNew (sizeof (BarcodeToolData));
+ if (drfp == NULL)
+ {
+ return;
+ }
+
+ drfp->bfp = bfp;
+ drfp->input_entityID = bfp->input_entityID;
+ drfp->top_sep = GetTopSeqEntryForEntityID (drfp->input_entityID);
+ w = FixedWindow (-50, -33, -10, -10, "Lat-Lon Country Conflict Tool", StdCloseWindowProc);
+ SetObjectExtra (w, drfp, CleanupLatLonTool);
+ drfp->form = (ForM) w;
+ drfp->formmessage = BarcodeToolMessage;
+
+ drfp->refresh_func = RefreshLatLonCountryTool;
+
+ /* register to receive update messages */
+ drfp->userkey = OMGetNextUserKey ();
+ drfp->procid = 0;
+ drfp->proctype = OMPROC_EDIT;
+ omudp = ObjMgrAddUserData (drfp->input_entityID, drfp->procid, drfp->proctype, drfp->userkey);
+ if (omudp != NULL) {
+ omudp->userdata.ptrvalue = (Pointer) drfp;
+ omudp->messagefunc = BarcodeToolMsgFunc;
+ }
+
+
+#ifndef WIN_MAC
+ CreateStdValidatorFormMenus (w);
+#endif
+
+ drfp->item_list = NULL;
+ drfp->cfg = NULL;
+ drfp->undo_list = NULL;
+
+ h = HiddenGroup (w, -1, 0, NULL);
+ SetGroupSpacing (h, 10, 10);
+
+ drfp->clickable_list = LatLonCountryResultsDisplay (h);
+
+ RefreshLatLonCountryTool (drfp);
+
+ ppt = StaticPrompt (h, "Note - only hemisphere transpositions and lat-lon transpositions can be corrected",
+ 0, stdLineHeight, programFont, 'c');
+
+ c = HiddenGroup (h, 5, 0, NULL);
+ SetGroupSpacing (c, 10, 10);
+
+ b = PushButton (c, "Autocorrect Values", LatLonCountryAutocorrect);
+ SetObjectExtra (b, drfp, NULL);
+ b = PushButton (c, "Make Report", LatLonCountryReport);
+ SetObjectExtra (b, drfp, NULL);
+ b = PushButton (c, "Refresh List", BarcodeRefreshButton);
+ SetObjectExtra (b, drfp, NULL);
+
+ PushButton (c, "Dismiss", StdCancelButtonProc);
+
+ AlignObjects (ALIGN_CENTER, (HANDLE) drfp->clickable_list, (HANDLE) ppt, (HANDLE) c, NULL);
+
+ RealizeWindow (w);
+
+ Show (w);
+
+}
+
+
+typedef struct specifichosttool {
+ BARCODE_TOOL_BLOCK
+ ButtoN check_single_word;
+} SpecificHostToolData, PNTR SpecificHostToolPtr;
+
static void CleanupSpecificHostTool (GraphiC g, VoidPtr data)
{
- BarcodeToolPtr drfp;
+ SpecificHostToolPtr drfp;
- drfp = (BarcodeToolPtr) data;
+ drfp = (SpecificHostToolPtr) data;
if (drfp != NULL) {
drfp->item_list = SpecificHostFixListFree (drfp->item_list);
ObjMgrFreeUserData (drfp->input_entityID, drfp->procid, drfp->proctype, drfp->userkey);
@@ -14383,14 +14913,15 @@ static void CleanupSpecificHostTool (GraphiC g, VoidPtr data)
}
-static void RefreshSpecificHostTool (BarcodeToolPtr vstp)
+static void RefreshSpecificHostTool (Pointer data)
{
+ SpecificHostToolPtr vstp = (SpecificHostToolPtr) data;
if (vstp == NULL) return;
PointerToDialog (vstp->clickable_list, NULL);
vstp->item_list = SpecificHostFixListFree (vstp->item_list);
- vstp->item_list = Taxon3GetSpecificHostFixesInSeqEntry (vstp->top_sep);
+ vstp->item_list = Taxon3GetSpecificHostFixesInSeqEntry (vstp->top_sep, GetStatus (vstp->check_single_word));
PointerToDialog (vstp->clickable_list, vstp->item_list);
@@ -14399,12 +14930,12 @@ static void RefreshSpecificHostTool (BarcodeToolPtr vstp)
static void SpecificHostAutocorrect (ButtoN b)
{
- BarcodeToolPtr drfp;
- ValNodePtr object_list, vnp;
- LogInfoPtr lip;
- SpecificHostFixPtr s;
+ SpecificHostToolPtr drfp;
+ ValNodePtr object_list, vnp;
+ LogInfoPtr lip;
+ SpecificHostFixPtr s;
- drfp = (BarcodeToolPtr) GetObjectExtra (b);
+ drfp = (SpecificHostToolPtr) GetObjectExtra (b);
if (drfp == NULL) return;
object_list = DialogToPointer (drfp->clickable_list);
@@ -14442,7 +14973,7 @@ static void SpecificHostAutocorrect (ButtoN b)
}
RefreshSpecificHostTool (drfp);
- RedrawBarcodeTool (drfp);
+ RedrawBarcodeTool ((BarcodeToolPtr)drfp);
ObjMgrSetDirtyFlag (drfp->input_entityID, TRUE);
ObjMgrSendMsg (OM_MSG_UPDATE, drfp->input_entityID, 0, 0);
@@ -14457,13 +14988,13 @@ static void SpecificHostAutocorrect (ButtoN b)
static void SpecificHostReport (ButtoN b)
{
- BarcodeToolPtr drfp;
- ValNodePtr vnp;
- LogInfoPtr lip;
- SpecificHostFixPtr s;
- CharPtr fix;
+ SpecificHostToolPtr drfp;
+ ValNodePtr vnp;
+ LogInfoPtr lip;
+ SpecificHostFixPtr s;
+ CharPtr fix;
- drfp = (BarcodeToolPtr) GetObjectExtra (b);
+ drfp = (SpecificHostToolPtr) GetObjectExtra (b);
if (drfp == NULL) return;
lip = OpenLog ("Incorrect Specific-Host Values");
@@ -14498,29 +15029,16 @@ static void SpecificHostReport (ButtoN b)
}
-extern void SpecificHostRefreshButton (ButtoN b)
-{
- BarcodeToolPtr vstp;
-
- vstp = (BarcodeToolPtr) GetObjectExtra (b);
- if (vstp == NULL) return;
-
- RefreshSpecificHostTool (vstp);
- RedrawBarcodeTool (vstp);
-}
-
-
-
extern void FixSpecificHostValues (IteM i)
{
- BaseFormPtr bfp;
- SeqEntryPtr sep;
- BarcodeToolPtr drfp;
- WindoW w;
- GrouP h, c;
- ButtoN b;
- OMUserDataPtr omudp;
- ValNodePtr fix_list = NULL;
+ BaseFormPtr bfp;
+ SeqEntryPtr sep;
+ SpecificHostToolPtr drfp;
+ WindoW w;
+ GrouP h, c;
+ ButtoN b;
+ OMUserDataPtr omudp;
+ ValNodePtr fix_list = NULL;
#ifdef WIN_MAC
bfp = currentFormDataPtr;
@@ -14531,7 +15049,7 @@ extern void FixSpecificHostValues (IteM i)
sep = GetTopSeqEntryForEntityID (bfp->input_entityID);
- fix_list = Taxon3GetSpecificHostFixesInSeqEntry (sep);
+ fix_list = Taxon3GetSpecificHostFixesInSeqEntry (sep, TRUE);
if (fix_list == NULL)
{
@@ -14541,7 +15059,7 @@ extern void FixSpecificHostValues (IteM i)
fix_list = SpecificHostFixListFree (fix_list);
- drfp = (BarcodeToolPtr) MemNew (sizeof (BarcodeToolData));
+ drfp = (SpecificHostToolPtr) MemNew (sizeof (SpecificHostToolData));
if (drfp == NULL)
{
return;
@@ -14554,6 +15072,8 @@ extern void FixSpecificHostValues (IteM i)
SetObjectExtra (w, drfp, CleanupSpecificHostTool);
drfp->form = (ForM) w;
drfp->formmessage = BarcodeToolMessage;
+
+ drfp->refresh_func = RefreshSpecificHostTool;
/* register to receive update messages */
drfp->userkey = OMGetNextUserKey ();
@@ -14578,6 +15098,8 @@ extern void FixSpecificHostValues (IteM i)
SetGroupSpacing (h, 10, 10);
drfp->clickable_list = SpecificHostResultsDisplay (h);
+ drfp->check_single_word = CheckBox (h, "Also check single-word specific host values", BarcodeRefreshButton);
+ SetObjectExtra (drfp->check_single_word, drfp, NULL);
RefreshSpecificHostTool (drfp);
@@ -14588,12 +15110,12 @@ extern void FixSpecificHostValues (IteM i)
SetObjectExtra (b, drfp, NULL);
b = PushButton (c, "Make Report", SpecificHostReport);
SetObjectExtra (b, drfp, NULL);
- b = PushButton (c, "Refresh List", SpecificHostRefreshButton);
+ b = PushButton (c, "Refresh List", BarcodeRefreshButton);
SetObjectExtra (b, drfp, NULL);
PushButton (c, "Dismiss", StdCancelButtonProc);
- AlignObjects (ALIGN_CENTER, (HANDLE) drfp->clickable_list, (HANDLE) c, NULL);
+ AlignObjects (ALIGN_CENTER, (HANDLE) drfp->clickable_list, (HANDLE) drfp->check_single_word, (HANDLE) c, NULL);
RealizeWindow (w);
@@ -14690,3 +15212,4 @@ extern void ListFailedTaxonomyLookups (IteM i)
ReportFailedTaxonomyLookups, RefreshFailedTaxonomyLookups);
}
+
diff --git a/sequin/sequin8.c b/sequin/sequin8.c
index f833c0c5..702135ec 100644
--- a/sequin/sequin8.c
+++ b/sequin/sequin8.c
@@ -29,7 +29,7 @@
*
* Version Creation Date: 2/3/98
*
-* $Revision: 6.438 $
+* $Revision: 6.458 $
*
* File Description:
*
@@ -64,6 +64,9 @@
#include <algo/blast/api/twoseq_api.h>
#include <algo/blast/api/blast_seqalign.h>
+#include <macrodlg.h>
+#include <macroapi.h>
+
#define DEFLINE_MAX_LEN 380
#define TEXT_MAX_LEN 64
#define DEFLINE_MAX_GENENAME_LEN 64
@@ -397,86 +400,7 @@ extern void ExtendSeqLocToPosition (SeqLocPtr slp, Boolean end5, Int4 pos)
}
}
-extern Int4 ExtendSeqLocToEnd (SeqLocPtr slp, BioseqPtr bsp, Boolean end5)
-{
- Uint1 strand;
- SeqLocPtr slp_to_change, slp_index;
- Int4 extent_to_change;
- Int4 start, stop;
- SeqIdPtr sip;
- Int4 start_diff = 0;
-
- if (slp == NULL || bsp == NULL) return 0;
-
- slp_to_change = NULL;
- strand = SeqLocStrand (slp);
- switch (slp->choice)
- {
- case SEQLOC_INT:
- slp_to_change = slp;
- break;
- case SEQLOC_MIX:
- case SEQLOC_PACKED_INT:
- sip = SeqLocId (slp);
- if (sip == NULL) return 0; /* can only process if all on one bioseq */
- slp_to_change = NULL;
- if ((strand == Seq_strand_minus && end5)
- || (strand != Seq_strand_minus && !end5))
- {
- extent_to_change = 0;
- for (slp_index = (SeqLocPtr)slp->data.ptrvalue; slp_index != NULL; slp_index = slp_index->next)
- {
- stop = GetOffsetInBioseq (slp_index, bsp, SEQLOC_STOP);
- if (stop > extent_to_change)
- {
- slp_to_change = slp_index;
- extent_to_change = stop;
- }
- }
- }
- else
- {
- extent_to_change = bsp->length;
- for (slp_index = (SeqLocPtr)slp->data.ptrvalue; slp_index != NULL; slp_index = slp_index->next)
- {
- start = GetOffsetInBioseq (slp_index, bsp, SEQLOC_START);
- if (start < extent_to_change)
- {
- slp_to_change = slp_index;
- extent_to_change = start;
- }
- }
- }
- break;
- }
-
- if (slp_to_change != NULL)
- {
- if ((strand == Seq_strand_minus && end5)
- || (strand != Seq_strand_minus && !end5))
- {
- start = GetOffsetInBioseq (slp_to_change, bsp, SEQLOC_START);
- stop = bsp->length - 1;
- }
- else
- {
- start = 0;
- stop = GetOffsetInBioseq (slp_to_change, bsp, SEQLOC_STOP);
- }
- if (end5) {
- if (strand == Seq_strand_minus) {
- start_diff = bsp->length - 1 - GetOffsetInBioseq(slp_to_change, bsp, SEQLOC_START);
- } else {
- start_diff = GetOffsetInBioseq(slp_to_change, bsp, SEQLOC_START);
- }
- }
-
- expand_seq_loc (start, stop, strand, slp_to_change);
- }
- return start_diff;
-}
-
-static void ExtendOnePartialFeature (SeqFeatPtr sfp, Pointer userdata)
+static void ExtendOnePartialFeatureEx (SeqFeatPtr sfp, Boolean extend5, Boolean extend3)
{
BioseqPtr bsp;
Boolean partial3, partial5;
@@ -487,7 +411,7 @@ static void ExtendOnePartialFeature (SeqFeatPtr sfp, Pointer userdata)
bsp = BioseqFindFromSeqLoc (sfp->location);
if (bsp == NULL) return;
CheckSeqLocForPartial (sfp->location, &partial5, &partial3);
- if (partial5)
+ if (partial5 && extend5)
{
start_diff = ExtendSeqLocToEnd (sfp->location, bsp, TRUE);
if (start_diff > 0 && sfp->data.choice == SEQFEAT_CDREGION) {
@@ -500,12 +424,17 @@ static void ExtendOnePartialFeature (SeqFeatPtr sfp, Pointer userdata)
}
}
}
- if (partial3)
+ if (partial3 && extend3)
{
ExtendSeqLocToEnd (sfp->location, bsp, FALSE);
}
}
+static void ExtendOnePartialFeature (SeqFeatPtr sfp, Pointer userdata)
+{
+ ExtendOnePartialFeatureEx (sfp, TRUE, TRUE);
+}
+
extern void ExtendPartialFeatures (IteM i)
{
BaseFormPtr bfp;
@@ -553,6 +482,143 @@ extern void ExtendPartialFeatures (IteM i)
ObjMgrSendMsg (OM_MSG_UPDATE, bfp->input_entityID, 0, 0);
}
+
+typedef struct extendpartialfeaturesform {
+ FORM_MESSAGE_BLOCK
+ DialoG feature_type;
+ ButtoN extend5;
+ ButtoN extend3;
+ DialoG string_constraint;
+ ButtoN leave_dlg_up;
+} ExtendPartialFeaturesFormData, PNTR ExtendPartialFeaturesFormPtr;
+
+static void DoExtendPartialFeatures (ButtoN b)
+{
+ ExtendPartialFeaturesFormPtr f;
+ SeqEntryPtr sep;
+ AECRActionPtr action;
+ ApplyActionPtr fake_apply;
+ FeatureFieldPtr feature_field;
+ ValNodePtr vnp;
+ StringConstraintPtr scp;
+ ValNodePtr object_list;
+ Boolean extend5, extend3;
+
+ f = (ExtendPartialFeaturesFormPtr) GetObjectExtra (b);
+ if (f == NULL) return;
+
+ sep = GetTopSeqEntryForEntityID (f->input_entityID);
+ if (sep == NULL) return;
+
+ /* note - this is a small amount of hackery, designed to put off adding "extend partial features" as a macro language action.
+ * if this is ever added, this code should be moved to macroapi.c.
+ */
+ feature_field = FeatureFieldNew ();
+ vnp = DialogToPointer (f->feature_type);
+ if (vnp == NULL) {
+ feature_field->type = Feature_type_any;
+ } else {
+ feature_field->type = vnp->choice;
+ vnp = ValNodeFree (vnp);
+ }
+ fake_apply = ApplyActionNew ();
+ ValNodeAddPointer (&(fake_apply->field), FieldType_feature_field, feature_field);
+ action = AECRActionNew ();
+ ValNodeAddPointer (&(action->action), ActionChoice_apply, fake_apply);
+
+ scp = DialogToPointer (f->string_constraint);
+ if (scp != NULL) {
+ ValNodeAddPointer (&(action->constraint), ConstraintChoice_string, scp);
+ }
+ object_list = GetObjectListForAECRAction (sep, action);
+ action = AECRActionFree (action);
+
+ extend5 = GetStatus (f->extend5);
+ extend3 = GetStatus (f->extend3);
+ for (vnp = object_list; vnp != NULL; vnp = vnp->next) {
+ if (vnp->choice == OBJ_SEQFEAT && vnp->data.ptrvalue != NULL) {
+ ExtendOnePartialFeatureEx (vnp->data.ptrvalue, extend5, extend3);
+ }
+ }
+ object_list = ValNodeFree (object_list);
+ ArrowCursor ();
+ Update ();
+ ObjMgrSetDirtyFlag (f->input_entityID, TRUE);
+ ObjMgrSendMsg (OM_MSG_UPDATE, f->input_entityID, 0, 0);
+ if (!GetStatus (f->leave_dlg_up)) {
+ Remove (f->form);
+ }
+}
+
+
+extern void ExtendPartialFeaturesWithConstraint (IteM i)
+{
+ BaseFormPtr bfp;
+ ExtendPartialFeaturesFormPtr f;
+ ValNodePtr feature_list = NULL;
+ ValNode vn;
+ WindoW w;
+ GrouP h, g, c;
+ PrompT p1, p2;
+ ButtoN b;
+
+#ifdef WIN_MAC
+ bfp = currentFormDataPtr;
+#else
+ bfp = GetObjectExtra (i);
+#endif
+ if (bfp == NULL) return;
+
+ f = (ExtendPartialFeaturesFormPtr) MemNew (sizeof (ExtendPartialFeaturesFormData));
+ if (f == NULL) return;
+
+ w = FixedWindow (-50, -33, -10, -10, "Extend Partial Features", StdCloseWindowProc);
+ SetObjectExtra (w, f, StdCleanupExtraProc);
+ f->form = (ForM) w;
+ f->input_entityID = bfp->input_entityID;
+
+ h = HiddenGroup (w, -1, 0, NULL);
+ SetGroupSpacing (h, 10, 10);
+
+ p1 = StaticPrompt (h, "Feature Type to Extend", 0, dialogTextHeight, programFont, 'c');
+ ValNodeAddPointer (&feature_list, Feature_type_any, StringSave ("Any"));
+ AddAllFeaturesToChoiceList (&feature_list);
+
+ f->feature_type = ValNodeSelectionDialog (h, feature_list, TALL_SELECTION_LIST, ValNodeStringName,
+ ValNodeSimpleDataFree, ValNodeStringCopy,
+ ValNodeChoiceMatch, "feature type",
+ NULL, NULL, FALSE);
+ vn.choice = Feature_type_any;
+ vn.data.ptrvalue = NULL;
+ vn.next = NULL;
+ PointerToDialog (f->feature_type, &vn);
+
+ g = HiddenGroup (h, 2, 0, NULL);
+ f->extend5 = CheckBox (g, "Extend partial 5'", NULL);
+ SetStatus (f->extend5, TRUE);
+ f->extend3 = CheckBox (g, "Extend partial 3'", NULL);
+ SetStatus (f->extend3, TRUE);
+
+ p2 = StaticPrompt (h, "Optional Constraint", 0, dialogTextHeight, programFont, 'c');
+ f->string_constraint = StringConstraintDialog (h, "Where feature text", FALSE, NULL, NULL);
+
+ c = HiddenGroup (h, 3, 0, NULL);
+ b = PushButton (c, "Accept", DoExtendPartialFeatures);
+ SetObjectExtra (b, f, NULL);
+ PushButton (c, "Cancel", StdCancelButtonProc);
+ f->leave_dlg_up = CheckBox (c, "Leave Dialog Up", NULL);
+
+ AlignObjects (ALIGN_CENTER, (HANDLE) p1,
+ (HANDLE) f->feature_type,
+ (HANDLE) g,
+ (HANDLE) p2,
+ (HANDLE) f->string_constraint,
+ (HANDLE) c,
+ NULL);
+ Show (w);
+}
+
+
static Boolean HasValidStartCodon (SeqFeatPtr cds)
{
ByteStorePtr bs;
@@ -4491,6 +4557,7 @@ extern Int2 LIBCALLBACK RefGeneUserGenFunc (Pointer data);
typedef struct refgeneuserdialog {
DIALOG_MESSAGE_BLOCK
GrouP status;
+ ButtoN generated;
TexT curator;
TexT source;
Int2 indexer;
@@ -4503,13 +4570,6 @@ typedef struct refgeneuserform {
SeqEntryPtr sep;
} RefgeneUserForm, PNTR RefgeneUserFormPtr;
-static ENUM_ALIST(changeflags_alist)
- {" ", 0},
- {"Sequence", 1},
- {"Annotation", 2},
- {"Both", 3},
-END_ENUM_ALIST
-
static ENUM_ALIST(refgene_alist)
{" ", 0},
{"Assembly", REFGENE_ASSEMBLY},
@@ -4521,15 +4581,15 @@ static ENUM_ALIST(refgene_alist)
END_ENUM_ALIST
static Uint2 refgene_types [] = {
- TAGLIST_TEXT, TAGLIST_TEXT, TAGLIST_TEXT, TAGLIST_POPUP, TAGLIST_POPUP
+ TAGLIST_TEXT, TAGLIST_TEXT, TAGLIST_TEXT, TAGLIST_TEXT, TAGLIST_TEXT, TAGLIST_POPUP
};
static Uint2 refgene_widths [] = {
- 9, 7, 15, 0, 0
+ 9, 7, 7, 7, 8, 0
};
static EnumFieldAssocPtr refgene_popups [] = {
- NULL, NULL, NULL, changeflags_alist, refgene_alist
+ NULL, NULL, NULL, NULL, NULL, refgene_alist
};
static CharPtr refgene_labels [] = {
@@ -4537,19 +4597,18 @@ static CharPtr refgene_labels [] = {
};
static CharPtr refgene_fields [] = {
- "Accession", "GI", "Comment", "Change", "Type", NULL
+ "Accession", "GI", "Start", "Stop", "Comment", "Type", NULL
};
static void AccessionUserFieldPtrToVisStringDialog (DialoG d, Pointer data)
{
CharPtr accession;
- Boolean annotChange;
CharPtr comment;
UserFieldPtr curr;
UserFieldPtr entry;
Int2 field;
- Int2 flags;
+ Char fm [16];
Int4 from;
Int4 gi;
ValNodePtr head;
@@ -4557,10 +4616,10 @@ static void AccessionUserFieldPtrToVisStringDialog (DialoG d, Pointer data)
Int2 j;
CharPtr name;
ObjectIdPtr oip;
- Boolean seqChange;
CharPtr str;
TagListPtr tlp;
Int4 to;
+ Char tu [16];
UserFieldPtr ufp;
ValNodePtr vnp;
@@ -4587,8 +4646,6 @@ static void AccessionUserFieldPtrToVisStringDialog (DialoG d, Pointer data)
gi = 0;
from = 0;
to = 0;
- annotChange = FALSE;
- seqChange = FALSE;
ufp = (UserFieldPtr) entry->data.ptrvalue;
while (ufp != NULL) {
oip = ufp->label;
@@ -4601,10 +4658,6 @@ static void AccessionUserFieldPtrToVisStringDialog (DialoG d, Pointer data)
from = ufp->data.intvalue;
} else if (StringICmp (oip->str, "to") == 0 && ufp->choice == 2) {
to = ufp->data.intvalue;
- } else if (StringICmp (oip->str, "sequenceChange") == 0 && ufp->choice == 4) {
- seqChange = ufp->data.boolvalue;
- } else if (StringICmp (oip->str, "annotationChange") == 0 && ufp->choice == 4) {
- annotChange = ufp->data.boolvalue;
} else if (StringICmp (oip->str, "comment") == 0 && ufp->choice == 1) {
comment = (CharPtr) ufp->data.ptrvalue;
} else if (StringICmp (oip->str, "name") == 0 && ufp->choice == 1) {
@@ -4617,18 +4670,14 @@ static void AccessionUserFieldPtrToVisStringDialog (DialoG d, Pointer data)
if (comment == NULL) {
comment = "";
}
- flags = 0;
- if (seqChange) {
- flags++;
- }
- if (annotChange) {
- flags += 2;
- }
- if (gi != 0) {
- sprintf (str, "%s\t%ld\t%s\t%d\t%d\n", accession, (long) gi, comment, (int) flags, (int) field);
- } else {
- sprintf (str, "%s\t\t%s\t%d\t%d\n", accession, comment, (int) flags, (int) field);
+ fm [0] = '\0';
+ tu [0] = '\0';
+ if (from > 0 && to > 0) {
+ sprintf (fm, "%ld", (long) from);
+ sprintf (tu, "%ld", (long) to);
}
+ sprintf (str, "%s\t%ld\t%s\t%s\t%s\t%d\n", accession,
+ (long) gi, fm, tu, comment, (int) field);
vnp = ValNodeNew (head);
if (head == NULL) {
head = vnp;
@@ -4637,7 +4686,7 @@ static void AccessionUserFieldPtrToVisStringDialog (DialoG d, Pointer data)
vnp->data.ptrvalue = StringSave (str);
}
} else if (name != NULL) {
- sprintf (str, "\t\t%s\t0\t%d\n", name, (int) field);
+ sprintf (str, "\t\t\t\t%s\t%d\n", name, (int) field);
vnp = ValNodeNew (head);
if (head == NULL) {
head = vnp;
@@ -4673,6 +4722,7 @@ static void UserObjectPtrToRefGeneDialog (DialoG d, Pointer data)
{
UserFieldPtr curr;
+ Boolean gen;
ObjectIdPtr oip;
RefgeneUserDialogPtr rdp;
Int2 status = 0;
@@ -4717,6 +4767,16 @@ static void UserObjectPtrToRefGeneDialog (DialoG d, Pointer data)
}
for (curr = uop->data; curr != NULL; curr = curr->next) {
oip = curr->label;
+ if (oip != NULL && StringICmp (oip->str, "Generated") == 0) {
+ break;
+ }
+ }
+ if (curr != NULL && curr->choice == 4) {
+ gen = curr->data.boolvalue;
+ SetStatus (rdp->generated, gen);
+ }
+ for (curr = uop->data; curr != NULL; curr = curr->next) {
+ oip = curr->label;
if (oip != NULL && StringICmp (oip->str, "Collaborator") == 0) {
break;
}
@@ -4787,21 +4847,19 @@ static void AddIndexerToRefGeneTrackUserObject (UserObjectPtr uop, Int2 indexer)
static Pointer RefGeneDialogToUserObjectPtr (DialoG d)
{
- Boolean annotChange;
Char ch;
Char curator [256];
Int2 i;
- Uint2 j;
+ Uint2 j;
size_t len;
- Int4 num [5];
+ Int4 num [6];
Boolean okay;
RefgeneUserDialogPtr rdp;
- Boolean seqChange;
Char source [64];
Int2 status;
CharPtr str;
TagListPtr tlp;
- CharPtr txt [5];
+ CharPtr txt [6];
UserObjectPtr uop;
long int val;
ValNodePtr vnp;
@@ -4836,6 +4894,10 @@ static Pointer RefGeneDialogToUserObjectPtr (DialoG d)
AddSourceToRefGeneTrackUserObject (uop, source);
}
+ if (GetStatus (rdp->generated)) {
+ AddGeneratedToRefGeneTrackUserObject (uop, TRUE);
+ }
+
GetTitle (rdp->curator, curator, sizeof (curator));
if (! StringHasNoText (curator)) {
AddCuratorToRefGeneTrackUserObject (uop, curator);
@@ -4858,43 +4920,33 @@ static Pointer RefGeneDialogToUserObjectPtr (DialoG d)
}
}
if (okay) {
- for (j = 0; j < 5; j++) {
+ for (j = 0; j < 6; j++) {
txt [j] = ExtractTagListColumn ((CharPtr) vnp->data.ptrvalue, j);
num [j] = 0;
}
- for (j = 1; j < 5; j++) {
- if (j != 2) {
- num [j] = 0;
- if (txt [j] != NULL && sscanf (txt [j], "%ld", &val) == 1) {
- num [j] = val;
- }
+ for (j = 1; j < 4; j++) {
+ num [j] = 0;
+ if (txt [j] != NULL && sscanf (txt [j], "%ld", &val) == 1) {
+ num [j] = val;
}
}
- annotChange = FALSE;
- seqChange = FALSE;
- if (num [3] >= 2) {
- annotChange = TRUE;
- (num [3]) -= 2;
- }
- if (num [3] > 0) {
- seqChange = TRUE;
+ if (txt [5] != NULL && sscanf (txt [5], "%ld", &val) == 1) {
+ num [5] = val;
}
- i = num [4];
+ i = num [5];
if (i >= REFGENE_ASSEMBLY && i <= REFGENE_UNKNOWN) {
if (! StringHasNoText (txt [0])) {
AddAccessionToRefGeneTrackUserObject (uop, refgene_labels [i],
- txt [0], num [1],
- seqChange, annotChange,
- txt [2]);
- } else if (! StringHasNoText (txt [2])) {
+ txt [0], num [1], num [2],
+ num [3], txt [4]);
+ } else if (! StringHasNoText (txt [4])) {
/* comment by itself goes into name */
AddAccessionToRefGeneTrackUserObject (uop, refgene_labels [i],
- NULL, num [1],
- seqChange, annotChange,
- txt [2]);
+ NULL, num [1], num [2],
+ num [3], txt [4]);
}
}
- for (j = 0; j < 5; j++) {
+ for (j = 0; j < 6; j++) {
txt [j] = MemFree (txt [j]);
}
}
@@ -4942,7 +4994,8 @@ static DialoG CreateRefGeneDialog (GrouP g)
rdp->pipebtn = RadioButton (rdp->status, "Pipeline");
Disable (rdp->pipebtn);
- y = HiddenGroup (p, 4, 0, NULL);
+ y = HiddenGroup (p, 6, 0, NULL);
+ rdp->generated = CheckBox (y, "Generated", NULL);
StaticPrompt (y, "Curator", 0, dialogTextHeight, programFont, 'l');
rdp->curator = DialogText (y, "", 14, NULL);
StaticPrompt (y, "Genomic Source", 0, dialogTextHeight, programFont, 'l');
@@ -4950,22 +5003,22 @@ static DialoG CreateRefGeneDialog (GrouP g)
rdp->indexer = 0;
- q = HiddenGroup (p, -6, 0, NULL);
+ q = HiddenGroup (p, -7, 0, NULL);
lastppt = NULL;
ppt = NULL;
- for (i = 0; i < 5; i++) {
+ for (i = 0; i < 6; i++) {
lastppt = ppt;
ppt = StaticPrompt (q, refgene_fields [i], refgene_widths [i] * stdCharWidth, 0, systemFont, 'c');
}
- rdp->fields = CreateTagListDialog (p, 6, 5, STD_TAG_SPACING,
+ rdp->fields = CreateTagListDialog (p, 6, 6, STD_TAG_SPACING,
refgene_types, refgene_widths, refgene_popups,
AccessionUserFieldPtrToVisStringDialog,
VisStringDialogToUserFieldPtr);
tlp = (TagListPtr) GetObjectExtra (rdp->fields);
if (tlp != NULL) {
- AlignObjects (ALIGN_JUSTIFY, (HANDLE) tlp->control [3], (HANDLE) lastppt, NULL);
- AlignObjects (ALIGN_JUSTIFY, (HANDLE) tlp->control [4], (HANDLE) ppt, NULL);
+ AlignObjects (ALIGN_JUSTIFY, (HANDLE) tlp->control [4], (HANDLE) lastppt, NULL);
+ AlignObjects (ALIGN_JUSTIFY, (HANDLE) tlp->control [5], (HANDLE) ppt, NULL);
}
AlignObjects (ALIGN_CENTER, (HANDLE) x, (HANDLE) y, (HANDLE) q, (HANDLE) rdp->fields, NULL);
@@ -5186,6 +5239,45 @@ static void UserObjectPtrToStruCommDialog (DialoG d, Pointer data)
ValNodeFreeData (head);
}
+static void FixSpecialCharactersInStructuredCommentUserObject (UserObjectPtr uop, BoolPtr changed)
+{
+ UserFieldPtr curr;
+ CharPtr field;
+ ValNodePtr find_list = NULL;
+ ObjectIdPtr oip;
+ CharPtr str;
+
+
+ if (changed != NULL) {
+ *changed = FALSE;
+ }
+ if (uop == NULL || uop->type == NULL || StringICmp (uop->type->str, "StructuredComment") != 0) {
+ return;
+ }
+
+ for (curr = uop->data; curr != NULL; curr = curr->next) {
+ if (curr->choice != 1) continue;
+ oip = curr->label;
+ if (oip == NULL) continue;
+ field = oip->str;
+ if (StringHasNoText (field)) continue;
+ str = (CharPtr) curr->data.ptrvalue;
+ if (StringHasNoText (str)) continue;
+
+ SpecialCharFindWithContext ((CharPtr PNTR) (&(oip->str)), &find_list, NULL, NULL);
+ SpecialCharFindWithContext ((CharPtr PNTR) (&(curr->data.ptrvalue)), &find_list, NULL, NULL);
+ }
+ FixSpecialCharactersForStringsInList (find_list, "Special characters are not permitted.", TRUE);
+ if (find_list != NULL)
+ {
+ if (changed != NULL) {
+ *changed = TRUE;
+ }
+ find_list = FreeContextList (find_list);
+ }
+}
+
+
static Pointer StruCommDialogToUserObjectPtr (DialoG d)
{
@@ -5196,6 +5288,7 @@ static Pointer StruCommDialogToUserObjectPtr (DialoG d)
StruCommUserDialogPtr sdp;
CharPtr str;
ValNodePtr vnp;
+ Boolean fixed_special = FALSE;
sdp = (StruCommUserDialogPtr) GetObjectExtra (d);
if (sdp == NULL) return NULL;
@@ -5220,6 +5313,11 @@ static Pointer StruCommDialogToUserObjectPtr (DialoG d)
ValNodeFreeData (head);
+ FixSpecialCharactersInStructuredCommentUserObject (uop, &fixed_special);
+ if (fixed_special) {
+ PointerToDialog (d, uop);
+ }
+
return uop;
}
@@ -6597,7 +6695,7 @@ static Boolean IsHUPIDAccession (BioseqPtr bsp)
}
}
- if (ompp != NULL && StringCmp (ompp->procname, "SmartBioseqFetch") == 0)
+ if (ompp != NULL && StringCmp (ompp->procname, "HUPBioseqFetch") == 0)
{
rval = TRUE;
}
@@ -9111,24 +9209,6 @@ static void FixDeltaFeatures (BioseqPtr bsp, Int4 offset, Int4 len_diff)
}
-extern Int4 GetDeltaSeqLen (DeltaSeqPtr dsp)
-{
- Int4 len = 0;
- SeqLitPtr slp;
-
- if (dsp == NULL || dsp->data.ptrvalue == NULL) {
- /* do nothing, empty */
- } else if (dsp->choice == 1) {
- len = SeqLocLen ((SeqLocPtr)(dsp->data.ptrvalue));
- } else if (dsp->choice == 2) {
- slp = (SeqLitPtr) dsp->data.ptrvalue;
- len = slp->length;
- }
- return len;
-}
-
-
-
static void ConvertGapFeaturesToUnknownCallback (BioseqPtr bsp, Pointer userdata)
{
ConvertGapToUnknownPtr cgtup;
@@ -10155,7 +10235,7 @@ static Boolean EditDiscrepancyConfig (DiscrepancyConfigPtr dcp)
SetGroupSpacing (g, 10, 10);
for (i = 0; i < MAX_DISC_TYPE; i++)
{
- test_options[i] = CheckBox (g, GetDiscrepancyTestConfName (i), NULL);
+ test_options[i] = CheckBox (g, GetDiscrepancyTestConfName ((DiscrepancyType) i), NULL);
SetStatus (test_options[i], dcp->conf_list[i]);
}
@@ -10198,55 +10278,6 @@ static Boolean EditDiscrepancyConfig (DiscrepancyConfigPtr dcp)
return rval;
}
-/* This gets a list of the open views */
-static ValNodePtr GetBaseFormList ()
-
-{
- Uint4 j;
- Uint4 num;
- ObjMgrPtr omp;
- ObjMgrDataPtr omdp;
- ObjMgrDataPtr PNTR omdpp;
- OMUserDataPtr omudp;
- BaseFormPtr bfp;
- ValNodePtr base_form_list = NULL;
-
- omp = ObjMgrGet ();
- if (omp == NULL) return NULL;
- num = omp->currobj;
- for (j = 0, omdpp = omp->datalist; j < num && omdpp != NULL; j++, omdpp++) {
- omdp = *omdpp;
- if (omdp->parentptr == NULL) {
- for (omudp = omdp->userdata; omudp != NULL; omudp = omudp->next) {
- if (omudp->proctype == OMPROC_VIEW) {
- bfp = (BaseFormPtr) omudp->userdata.ptrvalue;
- ValNodeAddPointer (&base_form_list, 0, bfp);
- }
- }
- }
- }
- return base_form_list;
-}
-
-
-static ValNodePtr GetViewedSeqEntryList (void)
-{
- ValNodePtr sep_list = NULL, base_form_list, vnp;
- BaseFormPtr bfp;
- SeqEntryPtr sep;
-
- base_form_list = GetBaseFormList();
- for (vnp = base_form_list; vnp != NULL; vnp = vnp->next) {
- bfp = (BaseFormPtr) vnp->data.ptrvalue;
- if (bfp != NULL && bfp->input_entityID != 0) {
- sep = GetTopSeqEntryForEntityID (bfp->input_entityID);
- ValNodeAddPointer (&sep_list, 0, sep);
- }
- }
- base_form_list = ValNodeFree (base_form_list);
- return sep_list;
-}
-
static void VisitFeaturesInViewedBioseqs (Pointer userdata, VisitFeaturesFunc callback)
{
ValNodePtr base_form_list, vnp;
@@ -10573,6 +10604,44 @@ extern void ScrollToDiscrepancyItem (ValNodePtr vnp, Pointer userdata)
}
}
+static Uint2 GetEntityIDFromItem (ValNodePtr vnp);
+static void ApplyTagToCodingRegionsInEntityID (Uint2 entityID);
+
+static void ApplyTagToCodingRegionsCallback (ValNodePtr item_list, Pointer userdata)
+{
+ ValNodePtr vnp;
+ ValNodePtr entityIDList = NULL;
+ Uint2 entityID;
+ SeqEntryPtr sep;
+ ValNodePtr cds_list;
+ Boolean found_any = FALSE;
+
+ for (vnp = item_list; vnp != NULL; vnp = vnp->next)
+ {
+ entityID = GetEntityIDFromItem(vnp);
+ if (!EntityIDAlreadyInList(entityID, entityIDList))
+ {
+ ValNodeAddInt (&entityIDList, 0, entityID);
+ }
+ }
+ for (vnp = entityIDList; vnp != NULL; vnp = vnp->next)
+ {
+ sep = GetTopSeqEntryForEntityID (vnp->data.intvalue);
+ cds_list = ListCodingRegionsContainedInSourceFeatures (sep);
+ if (cds_list != NULL)
+ {
+ found_any = TRUE;
+ cds_list = ValNodeFree (cds_list);
+ ApplyTagToCodingRegionsInEntityID (vnp->data.intvalue);
+ }
+ }
+ if (!found_any)
+ {
+ Message (MSG_ERROR, "No coding regions found in source features! Try editing the definition lines.");
+ }
+ entityIDList = ValNodeFree (entityIDList);
+}
+
static void AddBulkEditing (ValNodePtr clickable_list)
{
ClickableItemPtr cip;
@@ -10582,7 +10651,9 @@ static void AddBulkEditing (ValNodePtr clickable_list)
cip = (ClickableItemPtr) clickable_list->data.ptrvalue;
if (cip->callback_func == NULL && cip->item_list != NULL) {
if (cip->clickable_item_type == DISC_CDS_OVERLAP_TRNA) {
- cip->callback_func = EditCDStRNAOverlapCallback;
+ cip->callback_func = EditCDStRNAOverlapCallback;
+ } else if (cip->clickable_item_type == DISC_INCONSISTENT_BIOSRC_DEFLINE) {
+ cip->callback_func = ApplyTagToCodingRegionsCallback;
} else {
subtype = GetSubtypeForBulkEdit (cip->item_list);
/* Note - using FEATDEF_rRNA to represent all editable RNA features */
@@ -10776,7 +10847,7 @@ extern void CreateStdValidatorFormMenus (WindoW w);
#endif
-extern void CreateDiscrepancyReportWindow ()
+extern void CreateDiscrepancyReportWindow (void)
{
DiscrepancyReportFormPtr drfp;
GrouP h;
@@ -10963,12 +11034,12 @@ extern void NewSUC (ValNodePtr suc_list, Uint2 entityID, Boolean reverse, Boolea
h = HiddenGroup (w, -1, 0, NULL);
SetGroupSpacing (h, 10, 10);
- sfp->clickable_list_dlg = CreateClickableListDialogEx (h, "Text", "Affected Items",
+ sfp->clickable_list_dlg = CreateClickableListDialogEx (h, "Text", "Affected Items", NULL, NULL,
ScrollToDiscrepancyItem, EditDiscrepancyItem, NULL,
GetDiscrepancyItemText,
stdCharWidth * 55,
stdCharWidth * 55,
- FALSE);
+ FALSE, TRUE);
if (byblock) {
suc_list = CategorizeSUCBlocks (suc_list);
SetClickableItemExpanded (suc_list, FALSE);
@@ -11489,7 +11560,7 @@ static RNA_ITS_ItemPtr TagListStringToRNAITSItem (CharPtr line)
rip->rna_type = eRNA_ITS_INVALID;
} else {
StrToLong (txt, &tmp);
- rip->rna_type = tmp;
+ rip->rna_type = (ERNA_ITS_type) tmp;
}
txt = MemFree (txt);
@@ -11799,6 +11870,9 @@ static Int4 GetAlnRowForBsp (BioseqPtr bsp, SeqAlignPtr salp)
static Int4 ChooseEndpoint (Int4 bsp_len, Int4 pos, Boolean is_left, SeqAlignPtr salp, Int4 aln_row)
{
Int4 tmp;
+ Int4 aln_len;
+
+ aln_len = SeqAlignLength (salp);
if (pos < 0) {
if (is_left) {
pos = 0;
@@ -11813,10 +11887,10 @@ static Int4 ChooseEndpoint (Int4 bsp_len, Int4 pos, Boolean is_left, SeqAlignPtr
pos = bsp_len - 1;
}
}
- } else {
+ } else if (salp != NULL) {
tmp = AlnMgr2MapSeqAlignToBioseq (salp, pos, aln_row);
if (is_left) {
- while (tmp < 0 && pos < bsp_len) {
+ while (tmp < 0 && pos < aln_len) {
pos++;
tmp = AlnMgr2MapSeqAlignToBioseq (salp, pos, aln_row);
}
@@ -12938,7 +13012,6 @@ static void ReleaseCDS (DoC d, PoinT pt)
Int2 item;
RecT rct;
Int2 row;
- Int4 cds_num = 1;
ValNodePtr vnp, vnp_m, linked_mrnas;
Boolean found;
Boolean was_selected = FALSE;
@@ -13337,21 +13410,28 @@ static void TrimCDSFortRNAOverlap (ValNodePtr item_list)
static Int4 GetOverlapLen (SeqLocPtr slp1, SeqLocPtr slp2)
{
- Int4 stop1, start2, len = 0;
- Uint1 strand;
+ Int4 start1, stop1, start2, stop2, tmp, a, b, len = 0;
if (slp1 == NULL || slp2 == NULL) return 0;
- strand = SeqLocStrand (slp1);
- if (strand == Seq_strand_minus) {
- stop1 = SeqLocStart (slp1);
- start2 = SeqLocStop (slp2);
- len = start2 - stop1 + 1;
- } else {
- stop1 = SeqLocStop (slp1);
- start2 = SeqLocStart (slp2);
- len = stop1 - start2 + 1;
+ start1 = SeqLocStart (slp1);
+ stop1 = SeqLocStop (slp1);
+ if (start1 > stop1) {
+ tmp = start1;
+ start1 = stop1;
+ stop1 = tmp;
}
+ start2 = SeqLocStart (slp2);
+ stop2 = SeqLocStop (slp2);
+ if (start2 > stop2) {
+ tmp = start2;
+ start2 = stop2;
+ stop2 = tmp;
+ }
+
+ a = MAX(start1, start2);
+ b = MIN (stop1, stop2);
+ len = b - a + 1;
return len;
}
@@ -13456,7 +13536,6 @@ static ValNodePtr CDStRNAOverlapListFromItemList (ValNodePtr item_list)
{
ValNodePtr new_item_list = NULL, vnp, vnp_trna;
ValNodePtr good_list = NULL, bad_list = NULL;
- ValNodePtr clickable_list = NULL;
SeqFeatPtr sfp, trna;
CDStRNAOverlapPtr p = NULL;
Int4 len;
@@ -13552,7 +13631,7 @@ static void FixCDStRNAOverlaps (ValNodePtr overlap_list)
gene->location = TruncateLocation (gene->location, SeqLocLen (gene->location) - p->overlap_len);
}
- AddTranslExcept (p->cds, "TAA stop codon is completed by the addition of 3' A residues to the mRNA", FALSE);
+ AddTranslExcept (p->cds, "TAA stop codon is completed by the addition of 3' A residues to the mRNA", FALSE, FALSE);
}
}
@@ -13825,3 +13904,191 @@ static void EditCDStRNAOverlap (ValNodePtr item_list)
Update ();
}
+
+extern GetSamplePtr
+GetSampleForItemList
+(ValNodePtr item_list,
+ ValNodePtr requested_field,
+ GetFeatureFieldString fieldstring_func,
+ GetDescriptorFieldString descrstring_func)
+{
+ ValNodePtr vnp;
+ GetSamplePtr gsp;
+ SeqFeatPtr sfp;
+ SeqDescrPtr sdp;
+ CharPtr str = NULL;
+
+ if (item_list == NULL || requested_field == NULL) return NULL;
+
+ gsp = GetSampleNew();
+
+ for (vnp = item_list; vnp != NULL; vnp = vnp->next)
+ {
+ if (vnp->choice == OBJ_SEQFEAT && fieldstring_func != NULL)
+ {
+ sfp = (SeqFeatPtr) vnp->data.ptrvalue;
+ str = fieldstring_func (sfp, requested_field, NULL);
+ }
+ else if (vnp->choice == OBJ_SEQDESC && descrstring_func != NULL)
+ {
+ sdp = (SeqDescrPtr) vnp->data.ptrvalue;
+ str = descrstring_func (sdp, requested_field, NULL);
+ }
+ if (!StringHasNoText (str))
+ {
+ gsp->num_found ++;
+ if (gsp->sample_text == NULL)
+ {
+ gsp->sample_text = str;
+ }
+ else
+ {
+ if (StringCmp (str, gsp->sample_text) != 0)
+ {
+ gsp->all_same = FALSE;
+ }
+ }
+ }
+ str = MemFree (str);
+ }
+
+ if (gsp->num_found == 0)
+ {
+ gsp = GetSampleFree (gsp);
+ }
+ return gsp;
+}
+
+
+typedef struct applytagtocdsinsrcfeat {
+ FORM_MESSAGE_BLOCK
+ TexT note_text;
+ ValNodePtr cds_list;
+} ApplyTagToCDSInSrcFeatData, PNTR ApplyTagToCDSInSrcFeatPtr;
+
+
+static void CleanupApplyTagToCDSInSrcFeatForm (GraphiC g, VoidPtr data)
+
+{
+ ApplyTagToCDSInSrcFeatPtr dlg;
+
+ dlg = (ApplyTagToCDSInSrcFeatPtr) data;
+ if (dlg != NULL) {
+ dlg->cds_list = ValNodeFree (dlg->cds_list);
+ }
+ StdCleanupFormProc (g, data);
+}
+
+
+static void DoApplyTagToCodingRegionsInSourceFeatures (ButtoN b)
+{
+ ApplyTagToCDSInSrcFeatPtr dlg;
+ ValNodePtr vnp;
+ GetSamplePtr gsp;
+ ValNode vn;
+ SeqFeatPtr sfp;
+ ApplyValueData avd;
+
+ dlg = (ApplyTagToCDSInSrcFeatPtr) GetObjectExtra (b);
+ if (dlg == NULL) return;
+
+ if (TextHasNoText (dlg->note_text)) {
+ Message (MSG_ERROR, "No text supplied for note!");
+ return;
+ }
+ vn.choice = 0;
+ vn.next = NULL;
+ vn.data.intvalue = 2;
+ gsp = GetSampleForItemList (dlg->cds_list, &vn, GetCDSFieldString, NULL);
+ avd.etp = GetExistingTextHandlerInfo (gsp == NULL ? 0 : gsp->num_found, FALSE);
+ gsp = GetSampleFree (gsp);
+ if (avd.etp != NULL && avd.etp->existing_text_choice == eExistingTextChoiceCancel)
+ {
+ avd.etp = MemFree (avd.etp);
+ return;
+ }
+ avd.new_text = SaveStringFromText (dlg->note_text);
+ avd.field_list = NULL;
+ avd.text_to_replace = NULL;
+ avd.where_to_replace = EditApplyFindLocation_anywhere;
+
+ WatchCursor();
+ Update();
+ for (vnp = dlg->cds_list; vnp != NULL; vnp = vnp->next)
+ {
+ sfp = (SeqFeatPtr) vnp->data.ptrvalue;
+ if (sfp != NULL)
+ {
+ sfp->comment = HandleApplyValue (sfp->comment, &avd);
+ }
+ }
+ avd.etp = MemFree (avd.etp);
+ ObjMgrSetDirtyFlag (dlg->input_entityID, TRUE);
+ ObjMgrSendMsg (OM_MSG_UPDATE, dlg->input_entityID, 0, 0);
+ ArrowCursor();
+ Remove (dlg->form);
+ Update ();
+}
+
+
+static void ApplyTagToCodingRegionsInEntityID (Uint2 entityID)
+{
+ ApplyTagToCDSInSrcFeatPtr dlg;
+ ValNodePtr cds_list;
+ WindoW w;
+ GrouP h, g, c;
+ ButtoN b;
+ SeqEntryPtr sep;
+
+ sep = GetTopSeqEntryForEntityID (entityID);
+
+ cds_list = ListCodingRegionsContainedInSourceFeatures (sep);
+
+ if (cds_list == NULL) {
+ Message (MSG_ERROR, "No coding regions found in source features!");
+ return;
+ }
+
+ /* create window to display and correct overlaps */
+ dlg = (ApplyTagToCDSInSrcFeatPtr) MemNew (sizeof (ApplyTagToCDSInSrcFeatData));
+ dlg->input_entityID = entityID;
+ dlg->cds_list = cds_list;
+
+ w = FixedWindow (-50, -33, -10, -10, "Apply Note to Coding Regions in Source Features", StdCloseWindowProc);
+ SetObjectExtra (w, dlg, CleanupApplyTagToCDSInSrcFeatForm);
+ dlg->form = (ForM) w;
+
+ h = HiddenGroup (w, -1, 0, NULL);
+ SetGroupSpacing (h, 10, 10);
+
+ g = HiddenGroup (h, 2, 0, NULL);
+ StaticPrompt (g, "Note Text:", 0, dialogTextHeight, programFont, 'r');
+ dlg->note_text = DialogText (g, "prophage-encoded protein", 0, NULL);
+ c = HiddenGroup (h, 4, 0, NULL);
+ SetGroupSpacing (c, 10, 10);
+
+ b = PushButton (c, "Accept", DoApplyTagToCodingRegionsInSourceFeatures);
+ SetObjectExtra (b, dlg, NULL);
+ b = PushButton (c, "Dismiss", StdCancelButtonProc);
+
+ AlignObjects (ALIGN_CENTER, (HANDLE) g, (HANDLE) c, NULL);
+ RealizeWindow (w);
+ Show (w);
+ Update ();
+}
+
+
+extern void ApplyTagToCodingRegionsInSourceFeatures (IteM i)
+{
+ BaseFormPtr bfp;
+
+#ifdef WIN_MAC
+ bfp = currentFormDataPtr;
+#else
+ bfp = GetObjectExtra (i);
+#endif
+ if (bfp == NULL) return;
+
+ ApplyTagToCodingRegionsInEntityID (bfp->input_entityID);
+}
+
diff --git a/sequin/sequin9.c b/sequin/sequin9.c
index 74123814..fb8b1f28 100644
--- a/sequin/sequin9.c
+++ b/sequin/sequin9.c
@@ -29,7 +29,7 @@
*
* Version Creation Date: 4/20/99
*
-* $Revision: 6.462 $
+* $Revision: 6.469 $
*
* File Description:
*
@@ -2991,7 +2991,7 @@ ReplaceQualityScores
}
-static void RemoveQualityScores
+extern void RemoveQualityScores
(BioseqPtr bsp,
FILE *log_fp,
BoolPtr data_in_log)
@@ -3026,6 +3026,243 @@ static void RemoveQualityScores
DeleteMarkedObjects (0, OBJ_BIOSEQ, (Pointer) bsp);
}
+
+#define SEQGRAPH_FloatHi 1
+#define SEQGRAPH_Int4 2
+#define SEQGRAPH_BS 3
+
+/* remove compression from SeqGraph */
+static Boolean ExpandSeqGraph (SeqGraphPtr sgp)
+{
+ Int4 oldpos = 0, newpos = 0, i;
+ Pointer new_values;
+ Int4 new_numval;
+ Int2 cur_byte;
+
+ if (sgp == NULL || sgp->compr == 0 || sgp->compr == 1) {
+ return TRUE;
+ } else if (sgp->compr < 0) {
+ return FALSE;
+ }
+
+ new_numval = sgp->numval * sgp->compr;
+
+ /* allocate space for new values */
+ switch (sgp->flags[2]) {
+ case SEQGRAPH_FloatHi:
+ new_values = MemNew (sizeof (FloatHi) * new_numval);
+ break;
+ case SEQGRAPH_Int4:
+ new_values = MemNew (sizeof (Int4) * new_numval);
+ break;
+ case SEQGRAPH_BS:
+ new_values = (Pointer) BSNew (new_numval);
+ BSSeek ((ByteStorePtr)new_values, 0, SEEK_SET);
+ BSSeek ((ByteStorePtr) sgp->values, 0, SEEK_SET);
+ break;
+ }
+
+ /* copy and expand */
+ while (oldpos < sgp->numval) {
+ if (sgp->flags[2] == SEQGRAPH_BS) {
+ cur_byte = BSGetByte ((ByteStorePtr) sgp->values);
+ }
+ for (i = 0; i < sgp->compr; i++) {
+ switch (sgp->flags[2]) {
+ case SEQGRAPH_FloatHi:
+ ((FloatHiPtr)new_values)[newpos++] = ((FloatHiPtr)sgp->values)[oldpos];
+ break;
+ case SEQGRAPH_Int4:
+ ((Int4Ptr)new_values)[newpos++] = ((Int4Ptr)sgp->values)[oldpos];
+ break;
+ case SEQGRAPH_BS:
+ BSPutByte ((ByteStorePtr) new_values, cur_byte);
+ break;
+ }
+ }
+ oldpos++;
+ }
+
+ /* free old values and replace with new */
+ if (sgp->flags[2] == SEQGRAPH_BS) {
+ sgp->values = BSFree ((ByteStorePtr) sgp->values);
+ } else {
+ sgp->values = MemFree (sgp->values);
+ }
+ sgp->values = new_values;
+ sgp->numval = new_numval;
+ sgp->compr = 0;
+
+ return TRUE;
+}
+
+static Boolean TruncateSeqGraphValues (SeqGraphPtr sgp, Int4 len, Boolean onleft)
+{
+ Int4 oldpos, newpos = 0;
+ Pointer new_values;
+ Int4 new_numval;
+ Int2 cur_byte;
+ Int4 imin, imax;
+ FloatHi fmin, fmax;
+
+ if (sgp == NULL) return TRUE;
+ if (!ExpandSeqGraph (sgp)) return FALSE;
+
+ new_numval = sgp->numval - len;
+
+ /* allocate space for new values */
+ switch (sgp->flags[2]) {
+ case SEQGRAPH_FloatHi:
+ new_values = MemNew (sizeof (FloatHi) * new_numval);
+ fmin = ((FloatHiPtr)sgp->values)[0];
+ fmax = fmin;
+ break;
+ case SEQGRAPH_Int4:
+ new_values = MemNew (sizeof (Int4) * new_numval);
+ imin = ((Int4Ptr)sgp->values)[0];
+ imax = imin;
+ break;
+ case SEQGRAPH_BS:
+ new_values = (Pointer) BSNew (new_numval);
+ BSSeek ((ByteStorePtr)new_values, 0, SEEK_SET);
+ if (onleft) {
+ BSSeek ((ByteStorePtr) sgp->values, len, SEEK_SET);
+ } else {
+ BSSeek ((ByteStorePtr) sgp->values, 0, SEEK_SET);
+ }
+ imin = BSGetByte ((ByteStorePtr) sgp->values);
+ imax = imin;
+ /* put pointer back */
+ if (onleft) {
+ BSSeek ((ByteStorePtr) sgp->values, len, SEEK_SET);
+ } else {
+ BSSeek ((ByteStorePtr) sgp->values, 0, SEEK_SET);
+ }
+ break;
+ }
+
+ /* copy */
+ if (onleft) {
+ oldpos = len;
+ } else {
+ oldpos = 0;
+ }
+ while (oldpos < sgp->numval && newpos < new_numval) {
+ switch (sgp->flags[2]) {
+ case SEQGRAPH_FloatHi:
+ ((FloatHiPtr)new_values)[newpos] = ((FloatHiPtr)sgp->values)[oldpos];
+ if (((FloatHiPtr)new_values)[newpos] > fmax) {
+ fmax = ((FloatHiPtr)new_values)[newpos];
+ }
+ if (((FloatHiPtr)new_values)[newpos] < fmin) {
+ fmin = ((FloatHiPtr)new_values)[newpos];
+ }
+ break;
+ case SEQGRAPH_Int4:
+ ((Int4Ptr)new_values)[newpos] = ((Int4Ptr)sgp->values)[oldpos];
+ if (((Int4Ptr)new_values)[newpos] > imax) {
+ imax = ((Int4Ptr)new_values)[newpos];
+ }
+ if (((Int4Ptr)new_values)[newpos] < imin) {
+ imin = ((Int4Ptr)new_values)[newpos];
+ }
+ break;
+ case SEQGRAPH_BS:
+ cur_byte = BSGetByte ((ByteStorePtr) sgp->values);
+ BSPutByte ((ByteStorePtr) new_values, cur_byte);
+ if (cur_byte > imax) {
+ imax = cur_byte;
+ }
+ if (cur_byte < imin) {
+ imin = cur_byte;
+ }
+ break;
+ }
+ oldpos++;
+ newpos++;
+ }
+
+ /* free old values and replace with new */
+ if (sgp->flags[2] == SEQGRAPH_BS) {
+ sgp->values = BSFree ((ByteStorePtr) sgp->values);
+ } else {
+ sgp->values = MemFree (sgp->values);
+ }
+ sgp->values = new_values;
+ sgp->numval = new_numval;
+
+ /* replace mins and maxes */
+ if (sgp->flags[2] == SEQGRAPH_FloatHi) {
+ sgp->max.realvalue = fmax;
+ sgp->min.realvalue = fmin;
+ } else {
+ sgp->max.intvalue = imax;
+ sgp->min.intvalue = imin;
+ }
+ return TRUE;
+}
+
+
+
+/* assume Bioseq has already been trimmed - length of old Bioseq was trim5 + bsp->length + trim3 */
+static Boolean
+TrimQualityScoresForSequenceUpdate
+(BioseqPtr bsp,
+ Int4 trim5,
+ Int4 trim3,
+ FILE *log_fp,
+ BoolPtr data_in_log)
+{
+ ValNodePtr score_list = NULL, vnp;
+ SeqGraphPtr sgp;
+ SeqIntPtr sip;
+ Int4 left, right;
+ Boolean rval = FALSE;
+ Char acc_str [256];
+
+ if (bsp == NULL) return FALSE;
+
+ VisitGraphsOnBsp (bsp, &score_list, ListPhrapGraphsCallback);
+ if (score_list == NULL) return FALSE;
+
+ for (vnp = score_list; vnp != NULL; vnp = vnp->next) {
+ sgp = vnp->data.ptrvalue;
+ if (sgp != NULL && sgp->loc != NULL && sgp->loc->choice == SEQLOC_INT) {
+ sip = (SeqIntPtr) sgp->loc->data.ptrvalue;
+ /* trim on right */
+ if (sip->from > trim5 + bsp->length) {
+ sgp->idx.deleteme = TRUE;
+ rval = TRUE;
+ } else if (sip->to > trim5 + bsp->length - 1) {
+ right = sip->to - trim5 - bsp->length + 1;
+ sip->to = trim5 + bsp->length - 1;
+ TruncateSeqGraphValues (sgp, right, FALSE);
+ rval = TRUE;
+ }
+
+ sip->from -= trim5;
+ sip->to -= trim5;
+ if (sip->to < 0) {
+ sgp->idx.deleteme = TRUE;
+ rval = TRUE;
+ } else if (sip->from < 0) {
+ left = 0 - sip->from;
+ sip->from = 0;
+ TruncateSeqGraphValues (sgp, left, TRUE);
+ rval = TRUE;
+ }
+ }
+ }
+
+ if (rval && log_fp != NULL && data_in_log != NULL) {
+ SeqIdWrite (bsp->id, acc_str, PRINTID_REPORT, sizeof (acc_str));
+ fprintf (log_fp, "Quality scores trimmed for %s\n", acc_str);
+ *data_in_log = TRUE;
+ }
+ return rval;
+}
+
+
static Boolean AdjustAlignment (
UpsDataPtr udp,
Int2 choice
@@ -5170,15 +5407,16 @@ static CharPtr FixProteinString
CharPtr newprot;
CharPtr ptr;
Char ch;
- Int4 start, stop, new_stop;
+ Int4 start, stop, new_stop, prot_len;
Boolean changed;
+ CdRegionPtr crp;
if (sfp == NULL || truncated == NULL
|| contains_start == NULL
|| contains_stop == NULL) {
return NULL;
}
-
+
bs = ProteinFromCdRegionEx (sfp, TRUE, FALSE);
if (bs == NULL) return NULL;
newprot = BSMerge (bs, NULL);
@@ -5207,7 +5445,18 @@ static CharPtr FixProteinString
if (nucBsp == NULL) return newprot;
start = GetOffsetInBioseq (sfp->location, nucBsp, SEQLOC_START);
stop = GetOffsetInBioseq (sfp->location, nucBsp, SEQLOC_STOP);
- new_stop = FindNewCDSStop (sfp->location, nucBsp, (1 + ptr - newprot) * 3);
+ prot_len = (1 + ptr - newprot) * 3;
+ if (sfp->data.choice == SEQFEAT_CDREGION) {
+ crp = (CdRegionPtr) sfp->data.value.ptrvalue;
+ if (crp != NULL) {
+ if (crp->frame == 2) {
+ prot_len += 1;
+ } else if (crp->frame == 3) {
+ prot_len += 2;
+ }
+ }
+ }
+ new_stop = FindNewCDSStop (sfp->location, nucBsp, prot_len);
if (strand == Seq_strand_minus) {
sfp->location = SeqLocDelete (sfp->location, SeqLocId (sfp->location),
stop, new_stop - 1, FALSE, &changed);
@@ -5775,22 +6024,6 @@ AdjustCDSForUpdate
}
-extern SeqLocPtr SeqLocWholeNew (BioseqPtr bsp)
-{
- ValNodePtr vnp;
-
- if (bsp == NULL) return NULL;
-
- vnp = ValNodeNew (NULL);
-
- if (vnp == NULL) return NULL;
-
- vnp->choice = SEQLOC_WHOLE;
- vnp->data.ptrvalue = (Pointer) SeqIdDup (SeqIdFindBest (bsp->id, 0));
- return (SeqLocPtr)vnp;
-}
-
-
static void WarnNoProteinUpdate (BioseqPtr bsp)
{
Char acc_str [256];
@@ -10560,8 +10793,10 @@ typedef struct addtranslexceptdata {
TexT cds_comment;
ButtoN strict_checking_btn;
+ ButtoN extend_btn;
CharPtr cds_comment_txt;
Boolean strict_checking;
+ Boolean extend;
} AddTranslExceptData, PNTR AddTranslExceptPtr;
@@ -10589,7 +10824,92 @@ static SeqLocPtr SeqLocForTermination (SeqLocPtr slp, Int4 except_len)
}
-extern void AddTranslExcept (SeqFeatPtr sfp, CharPtr cds_comment, Boolean use_strict)
+static Boolean DoesCodingRegionEndWithStopCodon (SeqFeatPtr sfp)
+{
+ ByteStorePtr bs;
+ CharPtr prot_str;
+ Boolean rval = FALSE;
+
+ bs = ProteinFromCdRegionEx (sfp, TRUE, FALSE);
+ prot_str = BSMerge (bs, NULL);
+ bs = BSFree (bs);
+ if (prot_str != NULL && prot_str[StringLen (prot_str) - 1] == '*') {
+ rval = TRUE;
+ }
+ prot_str = MemFree (prot_str);
+ return rval;
+}
+
+
+static Int4 AddTerminalExceptionLen (SeqFeatPtr sfp)
+{
+ BioseqPtr bsp;
+ Uint1 strand;
+ Int4 stop, len, except_len = 0, gene_stop;
+ Char buf[4];
+ Int4 rval = 0;
+ SeqFeatPtr gene;
+
+ if (sfp == NULL || sfp->location == NULL) return FALSE;
+
+ bsp = BioseqFindFromSeqLoc (sfp->location);
+ if (bsp == NULL) return 0;
+ strand = SeqLocStrand (sfp->location);
+ if (strand == Seq_strand_minus) {
+ stop = SeqLocStart (sfp->location);
+ len = MIN (stop, 3);
+ if (len > 0) {
+ SeqPortStreamInt (bsp, stop - len, stop - 1,
+ Seq_strand_minus,STREAM_EXPAND_GAPS | STREAM_CORRECT_INVAL,
+ buf, NULL);
+ }
+ } else {
+ stop = SeqLocStop (sfp->location);
+ len = MIN (bsp->length - stop - 1, 3);
+ if (len > 0) {
+ SeqPortStreamInt (bsp, stop + 1, stop + len,
+ Seq_strand_plus,STREAM_EXPAND_GAPS | STREAM_CORRECT_INVAL,
+ buf, NULL);
+ }
+ }
+ if (len > 0) {
+ if (buf[0] == 'T') {
+ except_len++;
+ if (buf[1] == 'A') {
+ except_len++;
+ if (buf[2] == 'A') {
+ /* has real stop codon */
+ except_len++;
+ }
+ }
+ }
+ if (except_len < 3 && except_len > 0) {
+ gene = GetGeneForFeature (sfp);
+ if (strand == Seq_strand_minus) {
+ if (gene != NULL) {
+ gene_stop = SeqLocStart (gene->location);
+ if (gene_stop > stop - except_len) {
+ ExtendSeqLocToPosition (gene->location, FALSE, stop - except_len);
+ }
+ }
+ ExtendSeqLocToPosition (sfp->location, FALSE, stop - except_len);
+ } else {
+ if (gene != NULL) {
+ gene_stop = SeqLocStop (gene->location);
+ if (gene_stop < stop + except_len) {
+ ExtendSeqLocToPosition (gene->location, FALSE, stop + except_len);
+ }
+ }
+ ExtendSeqLocToPosition (sfp->location, FALSE, stop + except_len);
+ }
+ rval = except_len;
+ }
+ }
+ return rval;
+}
+
+
+extern void AddTranslExcept (SeqFeatPtr sfp, CharPtr cds_comment, Boolean use_strict, Boolean extend)
{
CdRegionPtr crp;
@@ -10621,6 +10941,11 @@ extern void AddTranslExcept (SeqFeatPtr sfp, CharPtr cds_comment, Boolean use_st
} else {
except_len = dna_len % 3;
}
+ if (except_len == 0 && extend && !DoesCodingRegionEndWithStopCodon(sfp)) {
+ except_len = AddTerminalExceptionLen (sfp);
+ dna_len = SeqLocLen (sfp->location);
+ }
+
if (except_len == 0) return;
/* don't add code break if one already exists */
@@ -10739,6 +11064,7 @@ static void AddTranslExceptCallback (SeqFeatPtr sfp, Pointer userdata)
{
AddTranslExceptPtr ap;
Boolean use_strict = FALSE;
+ Boolean extend = FALSE;
CharPtr cds_comment = NULL;
ap = (AddTranslExceptPtr) userdata;
@@ -10746,9 +11072,10 @@ static void AddTranslExceptCallback (SeqFeatPtr sfp, Pointer userdata)
{
cds_comment = ap->cds_comment_txt;
use_strict = ap->strict_checking;
+ extend = ap->extend;
}
- AddTranslExcept (sfp, cds_comment, use_strict);
+ AddTranslExcept (sfp, cds_comment, use_strict, extend);
}
@@ -10786,6 +11113,7 @@ static void DoAddTranslExceptWithComment (ButtoN b)
oldscope = SeqEntrySetScope (sep);
ap->cds_comment_txt = SaveStringFromText (ap->cds_comment);
ap->strict_checking = GetStatus (ap->strict_checking_btn);
+ ap->extend = GetStatus (ap->extend_btn);
if (StringHasNoText (ap->cds_comment_txt))
{
ap->cds_comment_txt = MemFree (ap->cds_comment_txt);
@@ -10839,12 +11167,15 @@ extern void AddTranslExceptWithComment (IteM i)
clear_btn = PushButton (h, "Clear Comment", ClearComment);
SetObjectExtra (clear_btn, ap, NULL);
ap->strict_checking_btn = CheckBox (h, "Overhang must be T or TA", NULL);
+ ap->extend_btn = CheckBox (h, "Extend for T/TA overhang", NULL);
c = HiddenGroup (h, 4, 0, NULL);
b = DefaultButton (c, "Accept", DoAddTranslExceptWithComment);
SetObjectExtra (b, ap, NULL);
PushButton (c, "Cancel", StdCancelButtonProc);
- AlignObjects (ALIGN_CENTER, (HANDLE) g, (HANDLE) clear_btn, (HANDLE) ap->strict_checking_btn, (HANDLE) c, NULL);
+ AlignObjects (ALIGN_CENTER, (HANDLE) g, (HANDLE) clear_btn,
+ (HANDLE) ap->strict_checking_btn,
+ (HANDLE) ap->extend_btn, (HANDLE) c, NULL);
RealizeWindow (w);
Show (w);
Update ();
@@ -12814,6 +13145,32 @@ ReportBadUpdateType
}
}
+static Boolean OkToTrimQualityScores (UpdatePairPtr upp, UpdateAlignmentLengthsPtr ualp)
+{
+ CharPtr buf1, buf2;
+ Boolean rval = FALSE;
+
+ if (upp == NULL || upp->orig_bsp == NULL || upp->update_bsp == NULL
+ || upp->update_bsp->length > upp->orig_bsp->length
+ || ualp == NULL || ualp->new5 > 0 || ualp->new3 > 0 || ualp->newa != ualp->olda || ualp->newa != upp->update_bsp->length) {
+ return FALSE;
+ }
+ buf1 = (CharPtr) MemNew (sizeof (Char) * (ualp->newa + 1));
+ MemSet (buf1, 0, sizeof (Char) * (ualp->newa + 1));
+ buf2= (CharPtr) MemNew (sizeof (Char) * (ualp->newa + 1));
+ MemSet (buf2, 0, sizeof (Char) * (ualp->newa + 1));
+
+ if (SeqPortStreamInt (upp->orig_bsp, ualp->old5, ualp->old5 + ualp->olda - 1, Seq_strand_plus, STREAM_EXPAND_GAPS, buf1, NULL) == upp->update_bsp->length
+ && SeqPortStreamInt (upp->update_bsp, 0, upp->update_bsp->length - 1, Seq_strand_plus, STREAM_EXPAND_GAPS, buf2, NULL) == upp->update_bsp->length
+ && StringCmp (buf1, buf2) == 0) {
+ rval = TRUE;
+ }
+ buf1 = MemFree (buf1);
+ buf2 = MemFree (buf2);
+ return rval;
+}
+
+
static Boolean
UpdateOrExtendOneSequenceEx
(UpdatePairPtr upp,
@@ -12836,6 +13193,7 @@ UpdateOrExtendOneSequenceEx
Uint2 update_entityID;
Char id_txt [128];
Boolean deleted_features = FALSE;
+ Boolean trim_quality_scores = FALSE;
if (upp == NULL || upp->orig_bsp == NULL || upp->update_bsp == NULL
|| uop == NULL || uop->submitter_opts == NULL)
@@ -12905,6 +13263,7 @@ UpdateOrExtendOneSequenceEx
switch (uop->submitter_opts->sequence_update_type)
{
case eSequenceUpdateReplace:
+ trim_quality_scores = OkToTrimQualityScores (upp, ualp);
ReplaceOneSequence (upp->salp, upp->orig_bsp, upp->update_bsp);
sequence_update_successful = TRUE;
rval = sequence_update_successful;
@@ -12996,7 +13355,9 @@ UpdateOrExtendOneSequenceEx
FixProtRefPtrs (prot_feat_list);
}
- if (uop->indexer_opts != NULL && uop->indexer_opts->update_quality_scores
+ if (trim_quality_scores && (uop->indexer_opts == NULL || !uop->indexer_opts->update_quality_scores)) {
+ TrimQualityScoresForSequenceUpdate (upp->orig_bsp, ualp->old5, ualp->old3, log_fp, data_in_log);
+ } else if (uop->indexer_opts != NULL && uop->indexer_opts->update_quality_scores
&& uop->submitter_opts->sequence_update_type == eSequenceUpdateReplace)
{
ReplaceQualityScores (upp->orig_bsp, upp->update_bsp,
@@ -17212,7 +17573,7 @@ static Boolean BioseqListHasFeatures (ValNodePtr bioseq_list)
}
-static Boolean EntityIDAlreadyInList (Uint2 entityID, ValNodePtr entityIDList)
+extern Boolean EntityIDAlreadyInList (Uint2 entityID, ValNodePtr entityIDList)
{
while (entityIDList != NULL) {
if ((Uint2)(entityIDList->data.intvalue) == entityID) {
@@ -17621,12 +17982,11 @@ static void LoadUpdateSequenceMapFileBtn (ButtoN b)
}
}
-extern SeqEntryPtr RestoreFromFile (CharPtr path);
static void UndoUpdates (ButtoN b)
{
UpdateMultiSequenceFormPtr usfp;
- SeqEntryPtr oldsep, currsep;
+ Uint2 new_entityID;
usfp = (UpdateMultiSequenceFormPtr) GetObjectExtra (b);
if (usfp == NULL)
@@ -17636,14 +17996,12 @@ static void UndoUpdates (ButtoN b)
WatchCursor ();
Update ();
- SeqEntrySetScope (NULL);
- oldsep = RestoreFromFile (usfp->undo_file);
- currsep = GetTopSeqEntryForEntityID (usfp->input_entityID);
- ReplaceSeqEntryWithSeqEntry (currsep, oldsep, TRUE);
- SeqEntrySetScope (NULL);
- usfp->input_entityID = ObjMgrGetEntityIDForChoice (currsep);
- ObjMgrSetDirtyFlag (usfp->input_entityID, TRUE);
- ObjMgrSendMsg (OM_MSG_UPDATE, usfp->input_entityID, 0, 0);
+ new_entityID = RestoreEntityIDFromFile (usfp->undo_file, usfp->input_entityID);
+ if (new_entityID != 0) {
+ usfp->input_entityID = new_entityID;
+ ObjMgrSetDirtyFlag (usfp->input_entityID, TRUE);
+ ObjMgrSendMsg (OM_MSG_UPDATE, usfp->input_entityID, 0, 0);
+ }
usfp->num_successful = 0;
usfp->num_failed = 0;
diff --git a/tools/blast.c b/tools/blast.c
index 25ec1ebf..da5d5212 100644
--- a/tools/blast.c
+++ b/tools/blast.c
@@ -1,7 +1,7 @@
-static char const rcsid[] = "$Id: blast.c,v 6.450 2007/05/07 13:30:54 kans Exp $";
+static char const rcsid[] = "$Id: blast.c,v 6.451 2008/01/25 21:15:22 bealer Exp $";
-/* $Id: blast.c,v 6.450 2007/05/07 13:30:54 kans Exp $
+/* $Id: blast.c,v 6.451 2008/01/25 21:15:22 bealer Exp $
* ===========================================================================
*
* PUBLIC DOMAIN NOTICE
@@ -50,9 +50,13 @@ Detailed Contents:
further manipulation.
******************************************************************************
- * $Revision: 6.450 $
+ * $Revision: 6.451 $
*
* $Log: blast.c,v $
+ * Revision 6.451 2008/01/25 21:15:22 bealer
+ * - Fix synchronization issue with blastpgp -a4 -j4 when composition based
+ * statistics is used for databases with multiple volumes.
+ *
* Revision 6.450 2007/05/07 13:30:54 kans
* added casts for Seq-data.gap (SeqDataPtr, SeqGapPtr, ByteStorePtr)
*
@@ -6523,9 +6527,25 @@ BLASTPerformSearchWithReadDb (BlastSearchBlkPtr search, Int4 sequence_number)
{
Int4 subject_length;
Uint1Ptr subject_seq=NULL;
-
+
+ /* This mutex should not be necessary - readdb seems to have
+ * synchronization issues when dealing with multiple volumes
+ * from multiple threads. This mutex fixes the symptom. */
+
+ static int init_mutex = 0;
+ static TNlmMutex wrap_readdb_mutex = 0;
+
+ if (! init_mutex) {
+ init_mutex++;
+ NlmMutexInit(& wrap_readdb_mutex);
+ }
+
+ NlmMutexLock(wrap_readdb_mutex);
+
subject_length = readdb_get_sequence(search->rdfp, sequence_number, &subject_seq);
-
+
+ NlmMutexUnlock(wrap_readdb_mutex);
+
search->dblen_eff_real += MAX(subject_length-search->length_adjustment, 1);
search->subject_id = sequence_number;
diff --git a/tools/blfmtutl.c b/tools/blfmtutl.c
index dc166a4c..34ad3868 100644
--- a/tools/blfmtutl.c
+++ b/tools/blfmtutl.c
@@ -1,4 +1,4 @@
-static char const rcsid[] = "$Id: blfmtutl.c,v 1.31 2007/08/23 19:45:47 coulouri Exp $";
+static char const rcsid[] = "$Id: blfmtutl.c,v 1.35 2008/02/29 20:07:33 coulouri Exp $";
/* ===========================================================================
*
@@ -36,6 +36,18 @@ Contents: Utilities for BLAST formatting
/*
* $Revision:
* $Log: blfmtutl.c,v $
+* Revision 1.35 2008/02/29 20:07:33 coulouri
+* bump date
+*
+* Revision 1.34 2008/02/15 21:35:46 coulouri
+* bump date
+*
+* Revision 1.33 2008/01/28 16:34:13 coulouri
+* bump date
+*
+* Revision 1.32 2008/01/25 16:19:22 coulouri
+* bump date
+*
* Revision 1.31 2007/08/23 19:45:47 coulouri
* bump date
*
@@ -144,8 +156,8 @@ Contents: Utilities for BLAST formatting
#include <jzcoll.h>
/* the version of BLAST. */
-#define BLAST_ENGINE_VERSION "2.2.17"
-#define BLAST_RELEASE_DATE "Aug-26-2007"
+#define BLAST_ENGINE_VERSION "2.2.18"
+#define BLAST_RELEASE_DATE "Mar-02-2008"
#define BUFFER_LENGTH 255
diff --git a/tools/kappa.c b/tools/kappa.c
index 5bee6c18..3ce847b2 100644
--- a/tools/kappa.c
+++ b/tools/kappa.c
@@ -1,6 +1,6 @@
-static char const rcsid[] = "$Id: kappa.c,v 6.87 2006/06/29 17:43:39 papadopo Exp $";
+static char const rcsid[] = "$Id: kappa.c,v 6.90 2008/02/08 21:51:38 camacho Exp $";
-/* $Id: kappa.c,v 6.87 2006/06/29 17:43:39 papadopo Exp $
+/* $Id: kappa.c,v 6.90 2008/02/08 21:51:38 camacho Exp $
* ==========================================================================
*
* PUBLIC DOMAIN NOTICE
@@ -50,7 +50,7 @@ functions in this file have a 'Kappa_' prefix. Please adhere to this
convention to avoid a name clash with functions in blast_kappa.c (the
name clash can matter in debuggers and search engines.)
- $Revision: 6.87 $
+ $Revision: 6.90 $
Revision 6.75 2005/11/07 15:28:56 coulouri
From Mike Gertz:
@@ -1223,6 +1223,48 @@ Kappa_MatchingSequenceRelease(BlastCompo_MatchingSequence * self)
self->local_data = NULL;
}
+#define MINUMUM_FRACTION_NEAR_IDENTICAL 0.98
+
+/**
+ * Test whether the aligned parts of two sequences that
+ * have a high-scoring gapless alignment are nearly identical
+ *
+ * @param seqData subject sequence
+ * @param queryData query sequence
+ * @param queryOffset offset for align if there are multiple queries
+ * @param align information about the alignment
+ * @param rangeOffset offset for subject sequence (used for tblastn)
+ *
+ * @return TRUE if the aligned portions are nearly identical
+ */
+static Boolean testNearIdentical(const BlastCompo_SequenceData *seqData,
+ const BlastCompo_SequenceData *queryData,
+ const int queryOffset,
+ const BlastCompo_Alignment *align,
+ const int rangeOffset)
+{
+ int numIdentical = 0;
+ double fractionIdentical;
+ int qPos, sPos; /*positions in query and subject;*/
+ int qEnd; /*end of query*/
+
+ qPos = align->queryStart - queryOffset;
+ qEnd = align->queryEnd - queryOffset;
+ sPos = align->matchStart - rangeOffset;
+ while (qPos < qEnd) {
+ if (queryData->data[qPos] == seqData->data[sPos])
+ numIdentical++;
+ sPos++;
+ qPos++;
+ }
+ fractionIdentical = ((double) numIdentical/
+ (double) (align->queryEnd - align->queryStart));
+ if (fractionIdentical >= MINUMUM_FRACTION_NEAR_IDENTICAL)
+ return(TRUE);
+ else
+ return(FALSE);
+}
+
/** Character to use for masked residues */
#define BLASTP_MASK_RESIDUE eXchar
@@ -1237,11 +1279,21 @@ Kappa_MatchingSequenceRelease(BlastCompo_MatchingSequence * self)
* @param range the range, in amino acid coordinates, of data
* to get; includes the translation frame [in]
* @param seqData the resulting data [out]
+ * @param queryData the query sequence [in]
+ * @param queryOffset offset for align if there are multiple queries
+ * @param align information about the alignment between query and subject
+ * @param shouldTestIdentical did alignment pass a preliminary test in
+ * redo_alignment.c that indicates the sequence
+ * pieces may be near identical
*/
static void
Kappa_SequenceGetTranslatedRange(const BlastCompo_MatchingSequence * self,
const BlastCompo_SequenceRange * range,
- BlastCompo_SequenceData * seqData )
+ BlastCompo_SequenceData * seqData,
+ const BlastCompo_SequenceData * queryData,
+ const int queryOffset,
+ const BlastCompo_Alignment *align,
+ const Boolean shouldTestIdentical)
{
Int4 i;
Int4 nucleotide_start; /* position of the first nucleotide to be
@@ -1303,7 +1355,10 @@ Kappa_SequenceGetTranslatedRange(const BlastCompo_MatchingSequence * self,
seg_slp = BlastBioseqFilter(bsp_temp, BLASTP_MASK_INSTRUCTIONS);
if (seg_slp) {
HackSeqLocId(seg_slp, local_data->bsp_db->id);
- BlastMaskTheResidues(seqData->data, seqData->length,
+ if ((!shouldTestIdentical) ||
+ (shouldTestIdentical &&
+ (!testNearIdentical(seqData, queryData, queryOffset, align, range->begin))))
+ BlastMaskTheResidues(seqData->data, seqData->length,
BLASTP_MASK_RESIDUE, seg_slp, FALSE, 0);
seg_slp = SeqLocSetFree(seg_slp);
}
@@ -1323,6 +1378,12 @@ Kappa_SequenceGetTranslatedRange(const BlastCompo_MatchingSequence * self,
* @param range the range, in amino acid coordinates, of data
* to get [in]
* @param seqData the sequence data obtained [out]
+ * @param queryData the query sequence [in]
+ * @param queryOffset offset for align if there are multiple queries
+ * @param align information about the alignment between query and subject
+ * @param shouldTestIdentical did alignment pass a preliminary test in
+ * redo_alignment.c that indicates the sequence
+ * pieces may be near identical
*
* @returns always 0 (posts a fatal error on failure rather than
* returning an error code.)
@@ -1331,12 +1392,18 @@ static int
Kappa_SequenceGetRange(
const BlastCompo_MatchingSequence * self,
const BlastCompo_SequenceRange * range,
- BlastCompo_SequenceData * seqData )
+ BlastCompo_SequenceData * seqData,
+ const BlastCompo_SequenceData * queryData,
+ const int queryOffset,
+ const BlastCompo_Alignment *align,
+ const Boolean shouldTestIdentical)
{
Kappa_SequenceLocalData * local_data = self->local_data;
if(local_data->prog_number == blast_type_tblastn) {
/* The sequence must be translated. */
- Kappa_SequenceGetTranslatedRange(self, range, seqData);
+ Kappa_SequenceGetTranslatedRange(self, range, seqData, queryData,
+ queryOffset,
+ align, shouldTestIdentical);
} else {
/* The sequence does not need to be translated. */
/* Obtain the entire sequence (necessary for SEG filtering.) */
@@ -1405,8 +1472,11 @@ Kappa_SequenceGetRange(
seg_slp =
BlastBioseqFilter(local_data->bsp_db, BLASTP_MASK_INSTRUCTIONS);
if (seg_slp) {
- BlastMaskTheResidues(seqData->data, seqData->length,
- BLASTP_MASK_RESIDUE, seg_slp, FALSE, 0);
+ if ((!shouldTestIdentical) ||
+ (shouldTestIdentical &&
+ (!testNearIdentical(seqData, queryData, queryOffset, align, 0))))
+ BlastMaskTheResidues(seqData->data, seqData->length,
+ BLASTP_MASK_RESIDUE, seg_slp, FALSE, 0);
seg_slp = SeqLocSetFree(seg_slp);
}
}
@@ -2082,7 +2152,7 @@ static const Blast_RedoAlignCallbacks
redo_align_callbacks = {
Kappa_CalcLambda, Kappa_SequenceGetRange, Kappa_RedoOneAlignment,
Kappa_NewAlignmentUsingXdrop, Kappa_FreeEditBlock
-};
+ };
/** Get a set of alignment parameters, for use by Blast_RedoOneMatch or
@@ -2336,6 +2406,7 @@ RedoAlignmentCore(BlastSearchBlkPtr search,
ErrPostEx(SEV_FATAL, E_NoMemory, 0, "Failed to allocate memory");
}
significantMatches = Nlm_Calloc(numQueries, sizeof(BlastCompo_Heap));
+ ASSERT(options->ethresh != 0.0);
for (query_index = 0; query_index < numQueries; query_index++) {
status =
BlastCompo_HeapInitialize(&significantMatches[query_index],
diff --git a/tools/ncbisam.c b/tools/ncbisam.c
index c4c38c79..b79f368b 100644
--- a/tools/ncbisam.c
+++ b/tools/ncbisam.c
@@ -1,6 +1,6 @@
-static char const rcsid[] = "$Id: ncbisam.c,v 6.33 2006/06/21 13:55:06 camacho Exp $";
+static char const rcsid[] = "$Id: ncbisam.c,v 6.34 2007/11/06 19:20:06 coulouri Exp $";
-/* $Id: ncbisam.c,v 6.33 2006/06/21 13:55:06 camacho Exp $
+/* $Id: ncbisam.c,v 6.34 2007/11/06 19:20:06 coulouri Exp $
* ===========================================================================
*
* PUBLIC DOMAIN NOTICE
@@ -31,12 +31,15 @@ static char const rcsid[] = "$Id: ncbisam.c,v 6.33 2006/06/21 13:55:06 camacho E
*
* Initial Version Creation Date: 02/24/1997
*
-* $Revision: 6.33 $
+* $Revision: 6.34 $
*
* File Description:
* Main file for ISAM library
*
* $Log: ncbisam.c,v $
+* Revision 6.34 2007/11/06 19:20:06 coulouri
+* fix memory allocation; resolves blast-rt#15351152
+*
* Revision 6.33 2006/06/21 13:55:06 camacho
* Fixed from Ilya Dondoshansky in s_ISAMBufferReadLine
* Change FILEREAD_BUFFER_SIZE from 1MB to 64k
@@ -2219,7 +2222,7 @@ ISAMErrorCode SISAMFindAllData(ISAMObjectPtr object,
if (Diff == -1) {
if(count >= allocated) {
allocated += ID_DATA_CHUNK;
- ids = Realloc(ids, allocated);
+ ids = Realloc(ids, allocated * sizeof(Int4));
}
ids[count] = ISAMGetDataNumber(Ptr);
count++;
diff --git a/tools/pseed3.c b/tools/pseed3.c
index 946a49b4..e5d6c155 100644
--- a/tools/pseed3.c
+++ b/tools/pseed3.c
@@ -1,6 +1,6 @@
-static char const rcsid[] = "$Id: pseed3.c,v 6.51 2007/03/13 20:40:56 madden Exp $";
+static char const rcsid[] = "$Id: pseed3.c,v 6.53 2008/01/10 16:30:51 bollin Exp $";
-/* $Id: pseed3.c,v 6.51 2007/03/13 20:40:56 madden Exp $ */
+/* $Id: pseed3.c,v 6.53 2008/01/10 16:30:51 bollin Exp $ */
/**************************************************************************
* *
* COPYRIGHT NOTICE *
@@ -35,9 +35,15 @@ Maintainer: Alejandro Schaffer
Contents: high-level routines for PHI-BLAST and pseed3
-$Revision: 6.51 $
+$Revision: 6.53 $
$Log: pseed3.c,v $
+Revision 6.53 2008/01/10 16:30:51 bollin
+Moved variable declaration to top of code block
+
+Revision 6.52 2008/01/09 19:04:04 merezhuk
+add extra hitArraySz parameter and provide error message if number of hits exceed it.
+
Revision 6.51 2007/03/13 20:40:56 madden
- In seedEngineCore, the searchSpEff parameter should be a
Nlm_FloatHi, not an Nlm_FloatLo
@@ -298,7 +304,7 @@ Char * LIBCALL get_a_pat(
Uint1Ptr unfilter_seq, Uint1Ptr seq, Int4 len, Boolean is_dna,
patternSearchItems *patternSearch, seedSearchItems * seedSearch,
Boolean showDiagnostics, ValNodePtr * error_return,
- ValNodePtr PNTR info_vnp)
+ ValNodePtr PNTR info_vnp, Int4 hitArraySz)
{
Char line[BUF_SIZE]; /*line of pattern description read in*/
@@ -313,6 +319,7 @@ Char * LIBCALL get_a_pat(
sequence*/
Int4 linePlace; /*index for characters on a line*/
Char buffer[512];
+ BlastErrorMsgPtr error_msg;
if ((program_flag == PAT_SEED_FLAG) || (program_flag == PAT_MATCH_FLAG)) {
while (get_pat(fp, seedSearch->pat_space, seedSearch->name_space)) {
@@ -341,6 +348,18 @@ Char * LIBCALL get_a_pat(
if (twiceNumHits >0) {
/* copy start and stop positions. */
+ if( twiceNumHits >= hitArraySz ){
+ sprintf(buffer,"\nERROR: number of hits %d is larger then hitsArray size: %d ",
+ (int)twiceNumHits,(int)hitArraySz);
+ //ErrPostEx(SEV_FATAL, 1, 0, buffer);
+ // provide BlastError error_return
+ error_msg = MemNew(sizeof(BlastErrorMsg));
+ error_msg->msg = Nlm_StringSave( buffer );
+ error_msg->level = 3; /* FATAL */
+ ValNodeAddPointer(error_return, 0, error_msg);
+
+ return NULL;
+ }
for (hitIndex=0; hitIndex<twiceNumHits; hitIndex++)
fullHitArray[hitIndex] = hitArray[hitIndex];
@@ -454,6 +473,7 @@ ValNodePtr LIBCALL seedEngineCore(BlastSearchBlkPtr search,
GapAlignBlkPtr gap_align; /*local holder for gap_align*/
Char buffer[512];
+ Int4 hitArraySz=0;
/* --------------- The end of parameters definition --------------- */
@@ -469,8 +489,9 @@ ValNodePtr LIBCALL seedEngineCore(BlastSearchBlkPtr search,
patternSearch, &(search->error_return), info_vnp);
return NULL;
}
- occurArray = (Int4 *) ckalloc(sizeof(Int4)*search->sbp->query_length*2);
- hitArray = (Int4 *) MemNew(sizeof(Int4)*search->sbp->query_length*2);
+ hitArraySz = search->sbp->query_length*2; /* this is original default */
+ occurArray = (Int4 *) ckalloc(sizeof(Int4)*hitArraySz);
+ hitArray = (Int4 *) MemNew(sizeof(Int4)*hitArraySz);
dbLength = 0;
readdb_get_totals(search->rdfp, &dbLength, &num_seq);
@@ -480,7 +501,7 @@ ValNodePtr LIBCALL seedEngineCore(BlastSearchBlkPtr search,
pattern match cannot start*/
- while (pattern = get_a_pat(patfp, &pname, occurArray, hitArray, &numPatOccur, &effectiveOccurrences, program_flag, unfilter_query, query, search->sbp->query_length, is_dna, patternSearch, seedSearch, showDiagnostics, &(search->error_return), info_vnp)) {
+ while (pattern = get_a_pat(patfp, &pname, occurArray, hitArray, &numPatOccur, &effectiveOccurrences, program_flag, unfilter_query, query, search->sbp->query_length, is_dna, patternSearch, seedSearch, showDiagnostics, &(search->error_return), info_vnp, hitArraySz)) {
if (patternSearch->patternProbability > PAT_PROB_THRESH &&
(patternSearch->patternProbability * (FloatHi) dbLength > EXPECT_MATCH_THRESH)) {
sprintf(buffer, "Pattern %s is too likely to occur in the database to be informative\n", pname);
diff --git a/tools/readdb.c b/tools/readdb.c
index aadc809f..c511197d 100644
--- a/tools/readdb.c
+++ b/tools/readdb.c
@@ -1,6 +1,6 @@
-static char const rcsid[] = "$Id: readdb.c,v 6.529 2007/08/17 15:56:10 papadopo Exp $";
+static char const rcsid[] = "$Id: readdb.c,v 6.535 2008/02/26 18:34:20 kans Exp $";
-/* $Id: readdb.c,v 6.529 2007/08/17 15:56:10 papadopo Exp $ */
+/* $Id: readdb.c,v 6.535 2008/02/26 18:34:20 kans Exp $ */
/*
* ===========================================================================
*
@@ -50,7 +50,7 @@ Detailed Contents:
*
* Version Creation Date: 3/22/95
*
-* $Revision: 6.529 $
+* $Revision: 6.535 $
*
* File Description:
* Functions to rapidly read databases from files produced by formatdb.
@@ -65,6 +65,24 @@ Detailed Contents:
*
* RCS Modification History:
* $Log: readdb.c,v $
+* Revision 6.535 2008/02/26 18:34:20 kans
+* use SeqDescrAddPointer instead of ValNodeAddPointer/Str
+*
+* Revision 6.534 2007/12/04 19:43:50 madden
+* Index accession.version for swissprot
+*
+* Revision 6.533 2007/11/27 18:51:54 madden
+* More efficient retrievals on string isam indices
+*
+* Revision 6.532 2007/11/15 21:10:49 madden
+* New version of SeqIdE2Index ifdef by REDUCED_E2INDEX_SET
+*
+* Revision 6.531 2007/11/06 20:09:39 coulouri
+* when printing taxonomy info, skip irrelevant sequences if a gi target was specified; fixes blast-rt#15347680
+*
+* Revision 6.530 2007/09/27 17:20:54 madden
+* Add readdb_get_full_filename
+*
* Revision 6.529 2007/08/17 15:56:10 papadopo
* 1. Make increment of reference count in readdb_attach atomic
* 2. Never initialize the reference count to a fixed value when
@@ -5369,7 +5387,7 @@ ValNodePtr readdb_get_asn1_defline(ReadDBFILEPtr rdfp, Int4 sequence_number)
/* Finaly descriptor is created as ... */
vnp = NULL;
- vnp = ValNodeAddPointer(&vnp, Seq_descr_user, uop);
+ vnp = SeqDescrAddPointer(&vnp, Seq_descr_user, uop);
return vnp;
}
@@ -5431,7 +5449,7 @@ ValNodePtr readdb_encode_subset_asn1_defline(ReadDBFILEPtr rdfp,
/* Finaly descriptor is created as ... */
vnp = NULL;
- vnp = ValNodeAddPointer(&vnp, Seq_descr_user, uop);
+ vnp = SeqDescrAddPointer(&vnp, Seq_descr_user, uop);
return vnp;
}
@@ -5506,7 +5524,7 @@ ValNodePtr readdb_get_taxonomy_names(ReadDBFILEPtr rdfp, Int4 sequence_number)
/* Finaly descriptor is created as ... */
vnp = NULL;
if (uop->data != NULL)
- vnp = ValNodeAddPointer(&vnp, Seq_descr_user, uop);
+ vnp = SeqDescrAddPointer(&vnp, Seq_descr_user, uop);
else {
UserObjectFree(uop);
}
@@ -5653,7 +5671,7 @@ readdb_get_bioseq_ex(ReadDBFILEPtr rdfp, Int4 sequence_number,
bsp->repr = Seq_repr_raw;
if (new_defline != NULL) {
- bsp->descr = ValNodeAddStr(NULL, Seq_descr_title, new_defline);
+ bsp->descr = SeqDescrAddPointer(NULL, Seq_descr_title, new_defline);
}
if(rdfp->formatdb_ver > FORMATDB_VER_TEXT) {
@@ -6842,6 +6860,30 @@ readdb_get_filename (ReadDBFILEPtr rdfp)
}
/*
+Obtains the title of the database. Note that the return CharPtr is not
+owned by the caller. It should be copied if the user wishes to modify it.
+*/
+CharPtr LIBCALL
+readdb_get_full_filename (ReadDBFILEPtr rdfp)
+
+{
+ char* retval = NULL;
+
+ if (rdfp == NULL)
+ return NULL;
+
+ if (!rdfp->aliasfilename)
+ retval = StringSave(rdfp->filename);
+ else {
+ char* path = Nlm_FilePathFind(rdfp->filename);
+ char buffer[PATH_MAX];
+ sprintf(buffer, "%s/%s", path, rdfp->aliasfilename);
+ retval = StringSave(buffer);
+ }
+ return retval;
+}
+
+/*
Obtains the title of the database. Note that the return CharPtr is not
owned by the caller. It should be copied if the user wishes to modify it.
*/
@@ -7117,7 +7159,7 @@ static Int2 LIBCALLBACK ReadDBBioseqFetchFunc(Pointer data)
source->org = OrgRefNew();
source->org->orgname = OrgNameNew();
source->org->orgname->gcode = rdfsp->db_genetic_code;
- ValNodeAddPointer(&(bsp->descr), Seq_descr_source, source);
+ SeqDescrAddPointer(&(bsp->descr), Seq_descr_source, source);
}
sep = SeqEntryNew();
@@ -8352,6 +8394,7 @@ ValNodePtr FDBDestroyMembershipsTable(ValNodePtr tbl)
}
+/* #define REDUCED_E2INDEX_SET 1 */
#ifdef REDUCED_E2INDEX_SET
/*****************************************************************************
*
@@ -8367,7 +8410,6 @@ static Boolean SeqIdE2Index (SeqIdPtr anp, FILE *fd, Int4 seq_num,
TextSeqIdPtr tsip = NULL;
ObjectIdPtr oid;
PDBSeqIdPtr psip;
- Boolean do_gb = FALSE;
Uint1 tmptype;
CharPtr tmp, ptr=NULL;
Char buf[81];
@@ -8379,6 +8421,9 @@ static Boolean SeqIdE2Index (SeqIdPtr anp, FILE *fd, Int4 seq_num,
if (anp == NULL)
return FALSE;
+ if (anp->choice == SEQID_GI)
+ return TRUE; /* Do not index GI as string. */
+
switch (anp->choice) {
case SEQID_LOCAL: /* local */
@@ -8395,7 +8440,6 @@ static Boolean SeqIdE2Index (SeqIdPtr anp, FILE *fd, Int4 seq_num,
return TRUE; /* not indexed */
case SEQID_EMBL: /* embl */
case SEQID_DDBJ: /* ddbj */
- do_gb = TRUE; /* also index embl, ddbj as genbank */
case SEQID_GENBANK: /* genbank */
case SEQID_TPG: /* Third Party Annot/Seq Genbank */
case SEQID_TPE: /* Third Party Annot/Seq EMBL */
@@ -8405,9 +8449,13 @@ static Boolean SeqIdE2Index (SeqIdPtr anp, FILE *fd, Int4 seq_num,
tsip = (TextSeqIdPtr)(anp->data.ptrvalue);
if ((tsip->version > 0) && (tsip->release == NULL))
version = tsip->version;
- break;
- case SEQID_PIR: /* pir */
+ break;
case SEQID_SWISSPROT: /* swissprot */
+ tsip = (TextSeqIdPtr)(anp->data.ptrvalue);
+ if (tsip->version > 0)
+ version = tsip->version;
+ break;
+ case SEQID_PIR: /* pir */
case SEQID_PRF: /* prf */
tsip = (TextSeqIdPtr)(anp->data.ptrvalue);
break;
@@ -8426,17 +8474,24 @@ static Boolean SeqIdE2Index (SeqIdPtr anp, FILE *fd, Int4 seq_num,
break;
}
- if(tsip == NULL && !sparse) {
+ if(tsip == NULL) {
SeqIdWrite(anp, buf, PRINTID_FASTA_SHORT, 80);
- StringLower(buf);
- fprintf(fd, "%s%c%d\n", buf, ISAM_DATA_CHAR, seq_num);
- }
+
+ length = StringLen(buf);
+ for(i = 0; i < length; i++)
+ buf[i] = TO_LOWER(buf[i]);
- if (ptr != NULL) { /* write a single string */
- StringMove(buf, ptr);
- StringLower(buf);
fprintf(fd, "%s%c%ld\n", buf, ISAM_DATA_CHAR, (long) seq_num);
+
+ }
+ if (tsip == NULL && ptr != NULL) { /* write a single string for non TextSeqIDPtr cases. */
+ StringMove(buf, ptr);
+ length = StringLen(buf);
+ for(i = 0; i < length; i++)
+ buf[i] = TO_LOWER(buf[i]);
+ fprintf(fd, "%s%c%ld\n", buf, ISAM_DATA_CHAR, (long) seq_num);
+
chain = TO_LOWER(chain);
if (chain != 0) { /* PDB only. */
@@ -8448,65 +8503,25 @@ static Boolean SeqIdE2Index (SeqIdPtr anp, FILE *fd, Int4 seq_num,
}
if (tsip != NULL) { /* separately index accession and locus */
- if ((tsip->accession != NULL) && (tsip->name != NULL) && !sparse) {
-
- /* Here is we indexing accession as part of SeqId */
- tmp = tsip->name;
- tsip->name = NULL;
- SeqIdWrite(anp, buf, PRINTID_FASTA_SHORT, 80);
- StringLower(buf);
- fprintf(fd, "%s%c%d\n", buf, ISAM_DATA_CHAR, seq_num);
- tsip->name = tmp;
-
- /* If accession and locus are different we also print locus */
- if(StringICmp(tsip->accession, tsip->name)) {
-
- tmp = tsip->accession;
- tsip->accession = NULL;
- SeqIdWrite(anp, buf, PRINTID_FASTA_SHORT, 80);
- StringLower(buf);
- fprintf(fd, "%s%c%d\n", buf, ISAM_DATA_CHAR, seq_num);
- tsip->accession = tmp;
- }
-
- if (version) { /* Index accession without verison. */
- tsip->version = 0;
- tmp = tsip->name;
- tsip->name = NULL;
- SeqIdWrite(anp, buf, PRINTID_FASTA_SHORT, 80);
- StringLower(buf);
- fprintf(fd, "%s%c%d\n", buf, ISAM_DATA_CHAR, seq_num);
- tsip->name = tmp;
- tsip->version = version;
- }
- }
-
/* now index as separate strings */
+ if (tsip->name != NULL) {
+ StringMove(buf, tsip->name);
+ length = StringLen(buf);
+ for(i = 0; i < length; i++)
+ buf[i] = TO_LOWER(buf[i]);
+ fprintf(fd, "%s%c%ld\n", buf, ISAM_DATA_CHAR, (long) seq_num);
+ }
if (tsip->accession != NULL) {
StringMove(buf, tsip->accession);
- StringLower(buf);
- fprintf(fd, "%s%c%d\n", buf, ISAM_DATA_CHAR, seq_num);
- if (version && !sparse) {
- fprintf(fd, "%s%.d%c%d\n", buf, version,
- ISAM_DATA_CHAR, seq_num);
- }
- }
-
- if(tsip->name != NULL &&
- StringICmp(tsip->accession, tsip->name) && !sparse) {
- StringMove(buf, tsip->name);
- StringLower(buf);
- fprintf(fd, "%s%c%d\n", buf, ISAM_DATA_CHAR, seq_num);
- }
+ length = StringLen(buf);
+ for(i = 0; i < length; i++)
+ buf[i] = TO_LOWER(buf[i]);
+ fprintf(fd, "%s%c%ld\n", buf, ISAM_DATA_CHAR, (long) seq_num);
+ if (version)
+ fprintf(fd, "%s.%d%c%ld\n", buf, version, ISAM_DATA_CHAR, (long) seq_num);
+ }
}
- if (do_gb && !sparse) { /* index embl and ddbj as genbank */
- tmptype = anp->choice;
- anp->choice = SEQID_GENBANK;
- SeqIdE2Index(anp, fd, seq_num, sparse);
- anp->choice = tmptype;
- }
-
retval = TRUE;
return retval;
}
@@ -8563,9 +8578,13 @@ static Boolean SeqIdE2Index (SeqIdPtr anp, FILE *fd, Int4 seq_num,
tsip = (TextSeqIdPtr)(anp->data.ptrvalue);
if ((tsip->version > 0) && (tsip->release == NULL))
version = tsip->version;
- break;
- case SEQID_PIR: /* pir */
+ break;
case SEQID_SWISSPROT: /* swissprot */
+ tsip = (TextSeqIdPtr)(anp->data.ptrvalue);
+ if (tsip->version > 0)
+ version = tsip->version;
+ break;
+ case SEQID_PIR: /* pir */
case SEQID_PRF: /* prf */
tsip = (TextSeqIdPtr)(anp->data.ptrvalue);
break;
@@ -11546,7 +11565,7 @@ FCMDAccListPtr LIBCALL GetAccList(CharPtr file, Int4Ptr TotalItems)
j= 0;
while (j < 128 && i < FileLen) {
- TmpBuff[j] = file[i];
+ TmpBuff[j] = TO_LOWER(file[i]);
j++; i++;
if(isspace((int)file[i]) ||
file[i] == ',' || /* Comma is valid delimiter */
@@ -11580,6 +11599,44 @@ FCMDAccListPtr LIBCALL GetAccList(CharPtr file, Int4Ptr TotalItems)
gi = 0;
if(k == j)
gi = atol(TmpBuff);
+
+ if (gi == 0) {
+ if (StringChr(TmpBuff, '|') != NULL) {
+ SeqIdPtr sip = SeqIdParse(TmpBuff);
+ SeqIdPtr sip_var = sip;
+ SeqIdPtr best_acc = SeqIdFindBestAccession(sip);
+ if (best_acc)
+ {
+ switch (best_acc->choice)
+ { /* Only TextSeqIdPtrs */
+ case SEQID_GENBANK:
+ case SEQID_EMBL:
+ case SEQID_DDBJ:
+ case SEQID_PIR:
+ case SEQID_SWISSPROT:
+ case SEQID_PRF:
+ case SEQID_OTHER:
+ case SEQID_TPG:
+ case SEQID_TPE:
+ case SEQID_TPD:
+ case SEQID_GPIPE:
+ SeqIdWrite(best_acc, TmpBuff, PRINTID_TEXTID_ACC_VER, 128);
+ break;
+ default:
+ break;
+ }
+ }
+ while (sip_var)
+ {
+ if (sip_var->choice == SEQID_GI)
+ {
+ gi = sip_var->data.intvalue;
+ break;
+ }
+ sip_var = sip_var->next;
+ }
+ }
+ }
/* If this is valid Accession check and tranfer it to gi */
@@ -11647,6 +11704,11 @@ static Boolean Fastacmd_PrintTaxonomyInfo(ReadDBFILEPtr rdfp, Int4 oid,
/* Print the taxonomy report for each sequence associated with this oid */
for (bdp_tmp = bdp; bdp_tmp; bdp_tmp = bdp_tmp->next) {
+ /* skip irrelevant sequences if a gi target was specified */
+ SeqIdPtr gi = SeqIdFindBest(bdp_tmp->seqid, SEQID_GI);
+ if ( gi && (rdfp->gi_target != 0) && (gi->data.intvalue != rdfp->gi_target) )
+ continue;
+
MemSet(buf, 0, sizeof(buf));
SeqIdWrite(bdp_tmp->seqid, buf, PRINTID_FASTA_LONG, sizeof(buf)-1);
diff --git a/tools/readdb.h b/tools/readdb.h
index d2f863cb..c8cbb724 100644
--- a/tools/readdb.h
+++ b/tools/readdb.h
@@ -41,7 +41,7 @@ Contents: defines and prototypes used by readdb.c and formatdb.c.
*
* Version Creation Date: 3/21/95
*
-* $Revision: 6.178 $
+* $Revision: 6.179 $
*
* File Description:
* Functions to rapidly read databases from files produced by formatdb.
@@ -56,6 +56,9 @@ Contents: defines and prototypes used by readdb.c and formatdb.c.
*
* RCS Modification History:
* $Log: readdb.h,v $
+* Revision 6.179 2007/09/27 17:20:54 madden
+* Add readdb_get_full_filename
+*
* Revision 6.178 2007/08/21 20:06:07 kans
* added prototype for FDBCleanUp
*
@@ -1444,6 +1447,9 @@ NOTE: the CharPtr returned is not owned by the caller!
*/
CharPtr LIBCALL readdb_get_filename PROTO((ReadDBFILEPtr rdfp));
+/* For use by the seq-src to get the alias file name with full path. */
+CharPtr LIBCALL readdb_get_full_filename PROTO((ReadDBFILEPtr rdfp));
+
/*
Get the date the database was formatted.
NOTE: the CharPtr returned is not owned by the caller!
diff --git a/tools/salptool.c b/tools/salptool.c
index 6ba87728..1d794a24 100644
--- a/tools/salptool.c
+++ b/tools/salptool.c
@@ -1,4 +1,4 @@
-static char const rcsid[] = "$Id: salptool.c,v 6.54 2006/10/23 15:10:58 bollin Exp $";
+static char const rcsid[] = "$Id: salptool.c,v 6.55 2007/08/31 18:46:04 bollin Exp $";
#include <sequtil.h> /* SeqIdDupList */
#include <salpedit.h>
@@ -1926,7 +1926,8 @@ static SeqPortPtr SeqPortFromAlignmentInterval (Int4 seqstart, Int4 seqstop, Uin
SeqLocPtr slp;
SeqPortPtr spp;
- if (bsp == NULL) return NULL;
+ if (bsp == NULL || seqstart >= bsp->length - 1) return NULL;
+ seqstop = MIN (bsp->length -1, seqstop);
sinp = SeqIntNew();
if (sinp == NULL) return NULL;
sinp->from = seqstart;
diff --git a/tools/seed.h b/tools/seed.h
index 48605eaa..69afb311 100644
--- a/tools/seed.h
+++ b/tools/seed.h
@@ -1,4 +1,4 @@
-/* $Id: seed.h,v 6.21 2007/03/13 20:41:20 madden Exp $
+/* $Id: seed.h,v 6.22 2008/01/09 19:04:04 merezhuk Exp $
* ===========================================================================
*
* PUBLIC DOMAIN NOTICE
@@ -31,9 +31,12 @@ Author: Alejandro Schaffer
Contents: header file for PHI-BLAST and pseed3.
-$Revision: 6.21 $
+$Revision: 6.22 $
$Log: seed.h,v $
+Revision 6.22 2008/01/09 19:04:04 merezhuk
+add extra hitArraySz parameter and provide error message if number of hits exceed it.
+
Revision 6.21 2007/03/13 20:41:20 madden
- In the prototype for seedEngineCore, the searchSpEff parameter
should be a Nlm_FloatHi, not an Nlm_FloatLo
@@ -309,7 +312,7 @@ Char* LIBCALL get_a_pat PROTO((FILE *fp, Char **name, Int4Ptr hitArray, Int4Ptr
Uint1Ptr unfilter_seq, Uint1Ptr seq, Int4 len, Boolean is_dna,
patternSearchItems *patternSearch, seedSearchItems * seedSearch,
Boolean showDiagnostics, ValNodePtr * error_return,
- ValNodePtr PNTR info_vnp));
+ ValNodePtr PNTR info_vnp, Int4 hitArraySz));
void LIBCALL quicksort_hits PROTO((Int4 no_of_seq, seedResultItems *seedResults));
diff --git a/tools/tfuns.c b/tools/tfuns.c
index 731c2c6d..98ee51b2 100644
--- a/tools/tfuns.c
+++ b/tools/tfuns.c
@@ -1,4 +1,4 @@
-static char const rcsid[] = "$Id: tfuns.c,v 6.13 2006/11/07 20:01:24 bollin Exp $";
+static char const rcsid[] = "$Id: tfuns.c,v 6.14 2007/10/10 16:10:17 bollin Exp $";
#include <stdio.h>
#include <ncbi.h>
@@ -1253,7 +1253,7 @@ static Boolean get_src (GatherContextPtr gcp)
return TRUE;
}
-static Int2 GetGcodeFromBioseq(BioseqPtr bsp)
+NLM_EXTERN Int2 GetGcodeFromBioseq(BioseqPtr bsp)
{
GatherScope gs;
BioSourcePtr biop;
diff --git a/tools/tfuns.h b/tools/tfuns.h
index 9a26ce96..3840e2aa 100644
--- a/tools/tfuns.h
+++ b/tools/tfuns.h
@@ -65,3 +65,7 @@ void DelFeatFromList PROTO((SeqFeatPtr PNTR gbqp, SeqFeatPtr curq, SeqFeatPtr pr
ValNodePtr GetOrfList PROTO((BioseqPtr bsp, Int2 limit));
ValNodePtr GetAltList PROTO((ValNodePtr list));
+
+NLM_EXTERN Int2 GetGcodeFromBioseq(BioseqPtr bsp);
+
+
diff --git a/tools/toasn3.c b/tools/toasn3.c
index 572dd3d8..7e0380ca 100644
--- a/tools/toasn3.c
+++ b/tools/toasn3.c
@@ -1,4 +1,4 @@
-static char const rcsid[] = "$Id: toasn3.c,v 6.95 2007/05/07 13:30:54 kans Exp $";
+static char const rcsid[] = "$Id: toasn3.c,v 6.99 2007/10/10 16:10:17 bollin Exp $";
/*****************************************************************************
*
@@ -860,51 +860,6 @@ ValNodePtr GetMultBiosource(SeqEntryPtr sep)
* RemoveEmptyTitleAndPubGenAsOnlyPub removes pub { pub { gen { } } empty pubs
*****************************************************************************/
-/* from utilpub.c */
-static Boolean empty_citgen(CitGenPtr cit)
-{
- if (cit == NULL)
- return TRUE;
- if (cit->cit)
- return FALSE;
- if (cit->authors)
- return FALSE;
- if (cit->muid > 0)
- return FALSE;
- if (cit->journal)
- return FALSE;
- if (cit->volume)
- return FALSE;
- if (cit->issue)
- return FALSE;
- if (cit->pages)
- return FALSE;
- if (cit->date)
- return FALSE;
- if (cit->serial_number > 0)
- return FALSE;
- if (cit->title)
- return FALSE;
- if (cit->pmid > 0)
- return FALSE;
- return TRUE;
-}
-
-static Boolean PubIsEffectivelyEmpty (PubdescPtr pdp)
-
-{
- ValNodePtr vnp;
-
- if (pdp == NULL) return FALSE;
- vnp = pdp->pub;
- if (vnp != NULL && vnp->next == NULL && vnp->choice == PUB_Gen) {
- if (empty_citgen ((CitGenPtr) vnp->data.ptrvalue)) {
- return TRUE;
- }
- }
- return FALSE;
-}
-
static void RemoveEmptyTitleAndPubGenAsOnlyPub (SeqEntryPtr sep)
{
@@ -2714,32 +2669,6 @@ static BioSourcePtr GetTopBioSourceFromSep (SeqEntryPtr sep)
return biop;
}
-static Boolean get_src (GatherContextPtr gcp)
-{
- ValNodePtr vnp, new;
- ValNodePtr PNTR vnpp;
-
- vnpp = gcp->userdata;
- switch (gcp->thistype)
- {
- case OBJ_SEQDESC:
- vnp = (ValNodePtr) (gcp->thisitem);
- if (vnp->choice == Seq_descr_source) {
- if (vnp->data.ptrvalue != NULL) {
- new = SeqDescrNew(NULL);
- new = MemCopy(new, vnp, sizeof(ValNode));
- new->next = NULL;
- *vnpp = new;
- return FALSE; /*only top level BioSource will be returned*/
- }
- }
- break;
- default:
- break;
- }
- return TRUE;
-}
-
static void FixPIDDbtag(ValNodePtr PNTR vnpp)
{
ValNodePtr vnp;
@@ -3512,37 +3441,11 @@ void EntryChangeGBSource (SeqEntryPtr sep)
BioSourcePtr biosp;
CharPtr source=NULL, s, div = NULL;
ValNodePtr v;
- /*
- GatherScope gs;
- Uint2 entityID;
- Uint1 focus;
- ValNodePtr vnp = NULL;
- */
Int2 len=0;
if (sep == NULL)
return;
- /*
- entityID = ObjMgrGetEntityIDForChoice(sep);
- MemSet ((Pointer) (&gs), 0, sizeof (GatherScope));
- focus = FocusSeqEntry(sep, &gs);
- MemSet ((Pointer) (gs.ignore), (int)(TRUE), (size_t) (OBJ_MAX * sizeof(Boolean)));
- gs.ignore[OBJ_SEQDESC] = FALSE;
-
- GatherSeqEntry (sep, &vnp, get_src, &gs);
-
- if(gs.target != NULL)
- SeqLocFree(gs.target);
-
- if (vnp == NULL) {
- ErrPostStr(SEV_WARNING, ERR_SOURCE_NotFound, "BioSource not found");
- return;
- }
- biosp = (BioSourcePtr) vnp->data.ptrvalue;
- vnp=MemFree(vnp);
- */
-
biosp = GetTopBioSourceFromSep (sep);
if (biosp != NULL) {
orp = biosp->org;
@@ -5235,66 +5138,6 @@ void StripTitleFromProtsInNucProts (SeqEntryPtr sep)
SeqEntryExplore (sep, NULL, StripTitleFromProteinProducts);
}
-static void CleanOrgModList (OrgModPtr PNTR ompp)
-
-{
- OrgModPtr next;
- OrgModPtr omp;
- OrgModPtr PNTR prev;
-
- if (ompp == NULL) return;
- prev = ompp;
- omp = *ompp;
- while (omp != NULL) {
- next = omp->next;
- CleanVisString (&(omp->subname));
- CleanVisString (&(omp->attrib));
- if (TASNStringHasNoText (omp->subname)) {
- *prev = omp->next;
- omp->next = NULL;
- OrgModFree (omp);
- } else {
- prev = &(omp->next);
- }
- omp = next;
- }
-}
-
-static void CleanSubSourceList (SubSourcePtr PNTR sspp)
-
-{
- SubSourcePtr next;
- SubSourcePtr PNTR prev;
- SubSourcePtr ssp;
-
- if (sspp == NULL) return;
- prev = sspp;
- ssp = *sspp;
- while (ssp != NULL) {
- next = ssp->next;
- if (ssp->subtype != SUBSRC_germline &&
- ssp->subtype != SUBSRC_rearranged &&
- ssp->subtype != SUBSRC_transgenic &&
- ssp->subtype != SUBSRC_environmental_sample &&
- ssp->subtype != SUBSRC_metagenomic) {
- CleanVisString (&(ssp->name));
- }
- CleanVisString (&(ssp->attrib));
- if (TASNStringHasNoText (ssp->name) &&
- ssp->subtype != SUBSRC_germline &&
- ssp->subtype != SUBSRC_rearranged &&
- ssp->subtype != SUBSRC_transgenic &&
- ssp->subtype != SUBSRC_environmental_sample &&
- ssp->subtype != SUBSRC_metagenomic) {
- *prev = ssp->next;
- ssp->next = NULL;
- SubSourceFree (ssp);
- } else {
- prev = &(ssp->next);
- }
- ssp = next;
- }
-}
static void CleanFeatStrings (SeqFeatPtr sfp)
@@ -5398,7 +5241,7 @@ static void CleanFeatStrings (SeqFeatPtr sfp)
case SEQFEAT_BIOSRC :
biop = (BioSourcePtr) sfp->data.value.ptrvalue;
orp = biop->org;
- CleanSubSourceList (&(biop->subtype));
+ CleanSubSourceList (&(biop->subtype), biop->genome);
break;
default :
break;
@@ -5552,7 +5395,7 @@ static void CleanDescStrings (ValNodePtr sdp)
case Seq_descr_source :
biop = (BioSourcePtr) sdp->data.ptrvalue;
orp = biop->org;
- CleanSubSourceList (&(biop->subtype));
+ CleanSubSourceList (&(biop->subtype), biop->genome);
break;
case Seq_descr_molinfo :
break;
diff --git a/tools/toporg.c b/tools/toporg.c
index 10e25d98..345ca083 100644
--- a/tools/toporg.c
+++ b/tools/toporg.c
@@ -1,4 +1,4 @@
-static char const rcsid[] = "$Id: toporg.c,v 6.99 2007/01/05 17:45:21 bollin Exp $";
+static char const rcsid[] = "$Id: toporg.c,v 6.101 2007/10/25 18:43:45 bollin Exp $";
#include <stdio.h>
#include <ncbi.h>
@@ -1046,14 +1046,8 @@ BioSourcePtr BioSourceCommon(BioSourcePtr host, BioSourcePtr guest)
static Boolean EmptyBioSource(BioSourcePtr bio)
{
- OrgRefPtr org;
-
- if (bio->genome == 0 && bio->origin == 0 && bio->org == NULL)
- return TRUE;
- if ((org = bio->org) != NULL) {
- if (org->taxname == NULL && org->common == NULL && org->db == NULL)
- return TRUE;
- }
+ if (bio == NULL || bio->org == NULL) return TRUE;
+ if (bio->org->taxname == NULL && bio->org->common == NULL && bio->org->db == NULL) return TRUE;
return FALSE;
}
@@ -3286,63 +3280,14 @@ extern void ConvertFullLenPubFeatToDesc (SeqEntryPtr sep)
DeleteMarkedObjects (0, OBJ_SEQENTRY, (Pointer) sep);
}
-static Boolean ConvertSourceFeatDescProc (GatherObjectPtr gop)
+static Boolean GatherConvertSourceFeatDescProc (GatherObjectPtr gop)
{
- BioSourcePtr biop;
- BioseqPtr bsp;
- SubSourcePtr lastssp;
- SeqDescPtr sdp;
- SeqEntryPtr sep;
SeqFeatPtr sfp;
- SeqIdPtr sip;
- SubSourcePtr ssp;
- ValNode vn;
if (gop->itemtype != OBJ_SEQFEAT) return TRUE;
sfp = (SeqFeatPtr) gop->dataptr;
- /* look for biosource features */
- if (sfp == NULL || sfp->data.choice != SEQFEAT_BIOSRC) return TRUE;
- /* get bioseq by feature location */
- sip = SeqLocId (sfp->location);
- bsp = BioseqFind (sip);
- if (bsp == NULL) return TRUE;
- sip = SeqIdFindBest(bsp->id, 0);
- if (sip == NULL) return TRUE;
- vn.choice = SEQLOC_WHOLE;
- vn.extended = 0;
- vn.data.ptrvalue = (Pointer) sip;
- vn.next = NULL;
- /* is feature full length? */
- if (SeqLocCompare (sfp->location, &vn) != SLC_A_EQ_B) return TRUE;
- sep = SeqMgrGetSeqEntryForData (bsp);
- if (sep == NULL) return TRUE;
- sdp = CreateNewDescriptor (sep, Seq_descr_source);
- if (sdp == NULL) return TRUE;
- /* move biosource from feature to descriptor */
- sdp->data.ptrvalue = sfp->data.value.ptrvalue;
- sfp->data.value.ptrvalue = NULL;
- /* flag old feature for removal */
- sfp->idx.deleteme = TRUE;
- /* move comment to subsource note */
- if (sfp->comment == NULL) return TRUE;
- biop = (BioSourcePtr) sdp->data.ptrvalue;
- if (biop == NULL) return TRUE;
- ssp = SubSourceNew ();
- if (ssp == NULL) return TRUE;
- ssp->subtype = SUBSRC_other;
- ssp->name = sfp->comment;
- sfp->comment = NULL;
- /* link in at end, since BasicSeqEntry will have sorted this list */
- if (biop->subtype == NULL) {
- biop->subtype = ssp;
- } else {
- lastssp = biop->subtype;
- while (lastssp->next != NULL) {
- lastssp = lastssp->next;
- }
- lastssp->next = ssp;
- }
+ ConvertSourceFeatDescProc (sfp, NULL);
return TRUE;
}
@@ -3382,7 +3327,7 @@ extern void ConvertFullLenSourceFeatToDesc (SeqEntryPtr sep)
objMgrFilter [OBJ_SEQFEAT] = TRUE;
GatherObjectsInEntity (0, OBJ_SEQENTRY, (Pointer) sep,
- ConvertSourceFeatDescProc, NULL, objMgrFilter);
+ GatherConvertSourceFeatDescProc, NULL, objMgrFilter);
SeqEntrySetScope (oldscope);
DeleteMarkedObjects (0, OBJ_SEQENTRY, (Pointer) sep);
diff --git a/util/creaders/alnread.c b/util/creaders/alnread.c
index 59d2f8ee..7be86914 100644
--- a/util/creaders/alnread.c
+++ b/util/creaders/alnread.c
@@ -1,5 +1,5 @@
/*
- * $Id: alnread.c,v 1.31 2007/01/10 18:20:14 ucko Exp $
+ * $Id: alnread.c,v 1.32 2007/12/29 18:25:42 kazimird Exp $
*
* ===========================================================================
*
@@ -345,15 +345,15 @@ s_ReportDefinitionLines
eip->category = eAlnErr_BadData;
if (list->string == NULL) {
- eip->message = malloc (strlen (err_null_format)
- + kMaxPrintedIntLen + 1);
+ eip->message = (char*)malloc (strlen (err_null_format)
+ + kMaxPrintedIntLen + 1);
if (eip->message != NULL) {
sprintf (eip->message, err_null_format, list->num_appearances);
}
} else {
- eip->message = malloc (strlen (err_format)
- + strlen (list->string)
- + kMaxPrintedIntLen + 1);
+ eip->message = (char*)malloc (strlen (err_format)
+ + strlen (list->string)
+ + kMaxPrintedIntLen + 1);
if (eip->message != NULL) {
sprintf (eip->message, err_format, list->string,
list->num_appearances);
@@ -432,7 +432,7 @@ s_ReportBlockLengthError
eip->category = eAlnErr_BadFormat;
eip->id = strdup (id);
eip->line_num = line_num;
- eip->message = malloc (strlen (err_format) + 2 * kMaxPrintedIntLen + 1);
+ eip->message = (char *)malloc (strlen (err_format) + 2 * kMaxPrintedIntLen + 1);
if (eip->message != NULL) {
sprintf (eip->message, err_format, expected_num, actual_num);
}
@@ -518,7 +518,7 @@ s_ReportBadSequenceLength
}
eip->category = eAlnErr_BadFormat;
eip->id = strdup (id);
- eip->message = malloc (strlen (format_str) + 50);
+ eip->message = (char *)malloc (strlen (format_str) + 50);
if (eip->message != NULL) {
sprintf (eip->message, format_str, expected_length, actual_length);
}
@@ -614,7 +614,7 @@ s_ReportRepeatedOrganismName
if (id != NULL ) {
eip->id = strdup (id);
}
- eip->message = malloc (strlen (err_format) + strlen (org_name)
+ eip->message = (char *)malloc (strlen (err_format) + strlen (org_name)
+ kMaxPrintedIntLen + 1);
if (eip->message != NULL) {
sprintf (eip->message, err_format, org_name, second_line_num);
@@ -2411,7 +2411,7 @@ static char * s_ReplaceNexusTypeChar (char *str, char c)
{
free (str);
}
- str = malloc (2 * sizeof (char));
+ str = (char *)malloc (2 * sizeof (char));
if (str != NULL)
{
str [0] = c;
@@ -2837,7 +2837,7 @@ static char * s_CreateOrderedOrgName (TCommentLocPtr org_clp)
return NULL;
}
- ordered_org_name = malloc (org_clp->end - org_clp->start + 2);
+ ordered_org_name = (char *)malloc (org_clp->end - org_clp->start + 2);
if (ordered_org_name == NULL) {
return NULL;
}
@@ -5349,7 +5349,7 @@ static char * s_GetIdFromString (char * str)
if (len == 0) {
return NULL;
}
- id = malloc (len + 1);
+ id = (char *)malloc (len + 1);
if (id == NULL) {
return NULL;
}
@@ -6025,136 +6025,3 @@ ReadAlignmentFile
return ReadAlignmentFileEx (readfunc, fileuserdata, errfunc, erroruserdata,
sequence_info, eFalse);
}
-
-
-/*
- * ===========================================================================
- * $Log: alnread.c,v $
- * Revision 1.31 2007/01/10 18:20:14 ucko
- * Drop s_AddPatternRepeat (obsolete as of R1.30, as s_ReadAlignFileRaw
- * now contains an internal version reworked to be more efficient).
- *
- * Revision 1.30 2006/12/27 13:38:46 bollin
- * Fixed bug in alignment reader and improved performance for large alignments.
- *
- * Revision 1.29 2006/09/14 13:32:29 bollin
- * do not free alphabet in sequence info struct
- *
- * Revision 1.28 2006/09/13 18:34:59 bollin
- * added flag to indicate whether alignment formatting clues were found
- *
- * Revision 1.27 2005/12/12 13:35:30 bollin
- * changed alignment reader code to handle PHYLIP IDs when there are no spaces
- * between the IDs and the sequence. Note - if there are spaces in the sequence
- * this will not work - the first part of the sequence will be assumed to be part
- * of the sequence ID.
- *
- * Revision 1.26 2005/10/21 15:19:13 bollin
- * added a function to allow the missing, match, and gap characters to be
- * specified in a NEXUS comment for an alignment file
- *
- * Revision 1.25 2005/10/12 20:12:28 bollin
- * when reading an interleaved block alignment, generate errors if duplicate IDs
- * are found.
- *
- * Revision 1.24 2005/06/20 14:59:17 bollin
- * when creating an ordered organism name, stop when the next organism comment
- * is found
- *
- * Revision 1.23 2005/06/06 15:31:34 lavr
- * Explicit (unsigned char) casts in ctype routines
- *
- * Revision 1.22 2005/06/03 17:03:57 lavr
- * Explicit (unsigned char) casts in ctype routines
- *
- * Revision 1.21 2005/05/12 17:41:01 bollin
- * changed cast for ctype classification macros
- *
- * Revision 1.19 2005/05/06 14:24:01 bollin
- * when adding a definition line that follows an organism comment, make sure
- * that the new definition line has the same list position as the organism
- * name
- *
- * Revision 1.18 2005/05/04 18:54:42 bollin
- * removed Linux warnings
- *
- * Revision 1.17 2005/01/13 14:56:42 bollin
- * be sure to skip over segment brackets when reading segments for alignment of
- * segmented sets
- *
- * Revision 1.16 2005/01/10 19:31:09 bollin
- * limit how hard we will try to read a badly formatted alignment
- *
- * Revision 1.15 2004/12/21 15:13:44 bollin
- * handle blocks of organism definition lines in NEXUS files that do not
- * separate the definition lines from the sequence data
- *
- * Revision 1.14 2004/12/02 17:12:18 bollin
- * allow reading of an interleaved alignment with only one block
- *
- * Revision 1.13 2004/12/01 14:14:35 bollin
- * improved detection of consensus lines in Clustal files
- *
- * Revision 1.12 2004/09/17 12:21:48 bollin
- * allow all-gap segments in segmented alignments
- *
- * Revision 1.11 2004/08/11 15:23:07 vakatov
- * Compilation warning fix (unused static func)
- *
- * Revision 1.10 2004/05/20 19:40:24 bollin
- * Made chnages to allow reading of alignments of segmented sets.
- * Also added warnings for when organism lines may be present but improperly
- * formatted.
- *
- * Revision 1.9 2004/03/16 21:05:15 bollin
- * Added some improvements to the portion of the alignment reader that deals
- * with contiguous alignments that do not have a '>' at the beginning of each
- * ID.
- *
- * Revision 1.8 2004/03/16 16:25:38 bollin
- * Added function to recognize a file as ASN.1 and reject immediately
- *
- * Revision 1.7 2004/03/09 21:27:39 bollin
- * in s_InsertNewOffsets, if the list ends while searching for the next pattern, exit immediately (prevents NULL pointer access)
- *
- * Revision 1.6 2004/03/04 19:15:07 bollin
- * file reading now skips over multi-line bracketed comments
- *
- * Revision 1.5 2004/03/04 16:29:32 bollin
- * added skip of taxa comment for PAUP format alignment files
- *
- * Revision 1.4 2004/02/10 16:15:13 bollin
- * now checks for unused lines when finding interleaved blocks, will reject and try other methods if unused lines found after first block found.
- *
- * Revision 1.3 2004/02/05 16:29:32 bollin
- * smarter function for skipping NEXUS comment lines
- *
- * Revision 1.2 2004/02/04 19:49:11 bollin
- * fixed infinite loop condition in s_AugmentOffsetList, properly skip over first non-space column when looking for interleaved block patterns in s_ReadAlignFileRaw
- *
- * Revision 1.1 2004/02/03 16:47:02 ucko
- * Add Colleen Bollin's Toolkit-independent alignment reader.
- *
- * Revision 1.38 2004/01/30 22:46:08 bollin
- * renamed defined variable, fixed typo in comment
- *
- * Revision 1.37 2004/01/30 21:48:14 bollin
- * changes for compatibility with Windows
- *
- * Revision 1.36 2004/01/30 21:33:41 bollin
- * replaced strncasecmp and strncase function calls
- *
- * Revision 1.35 2004/01/29 19:16:27 bollin
- * use EBool for boolean values
- *
- * Revision 1.34 2004/01/29 17:58:11 bollin
- * aligned assignment blocks in New functions
- *
- * Revision 1.33 2004/01/29 17:43:40 bollin
- * added directory specification to alnread.h include line
- *
- * Revision 1.32 2004/01/29 17:41:29 bollin
- * added comment block, id tags, log
- *
- * ===========================================================================
- */
diff --git a/vibrant/document.c b/vibrant/document.c
index 8247f359..9c461b3e 100644
--- a/vibrant/document.c
+++ b/vibrant/document.c
@@ -29,7 +29,7 @@
*
* Version Creation Date: 4/12/93
*
-* $Revision: 6.20 $
+* $Revision: 6.21 $
*
* File Description: Converts fielded text into final report in a document
*
@@ -41,6 +41,10 @@
* 01-25-94 DGG + JK Fixed MapDocPoint bug
*
* $Log: document.c,v $
+* Revision 6.21 2008/02/13 18:52:08 bollin
+* Added MapDocPointEx, which allows you to prefer the first matching column to
+* the last matching column.
+*
* Revision 6.20 2006/09/27 18:30:00 kans
* support for Int4 scroll bars for switching between text and doc views in Sequin (CB)
*
@@ -3433,7 +3437,7 @@ void GetColParams (DoC d, Int2 item, Int2 col, Int2Ptr pixPos,
*
*****************************************************************************/
-extern void MapDocPoint (DoC d, PoinT pt, Int2Ptr item, Int2Ptr row, Int2Ptr col, RectPtr rct)
+extern void MapDocPointEx (DoC d, PoinT pt, Int2Ptr item, Int2Ptr row, Int2Ptr col, RectPtr rct, Boolean prefer_first_match_col)
{
Int2 cl;
@@ -3441,7 +3445,7 @@ extern void MapDocPoint (DoC d, PoinT pt, Int2Ptr item, Int2Ptr row, Int2Ptr col
DocData ddata;
Int2 firstItem;
Int2 firstLine;
- Boolean goOn;
+ Boolean goOn, found;
Int2 i;
Int2 itemNum;
ItemPtr itemPtr;
@@ -3501,7 +3505,8 @@ extern void MapDocPoint (DoC d, PoinT pt, Int2Ptr item, Int2Ptr row, Int2Ptr col
rw = firstLine + ((pt.y - q.top - leadHeight) / lineHeight) + 1;
}
if (numCols > 0 && colFmt != NULL) {
- for (i = 0; i < numCols; i++) {
+ found = FALSE;
+ for (i = 0; i < numCols && !found; i++) {
if (pt.x >= colFmt [i].position &&
pt.x < colFmt [i].position + colFmt [i].pixWidth) {
cl = i + 1;
@@ -3511,6 +3516,9 @@ extern void MapDocPoint (DoC d, PoinT pt, Int2Ptr item, Int2Ptr row, Int2Ptr col
rc.right = rc.left + colFmt [i].pixWidth;
rc.bottom = rc.top + lineHeight;
}
+ if (prefer_first_match_col) {
+ found = TRUE;
+ }
}
}
}
@@ -3542,6 +3550,11 @@ extern void MapDocPoint (DoC d, PoinT pt, Int2Ptr item, Int2Ptr row, Int2Ptr col
}
}
+extern void MapDocPoint (DoC d, PoinT pt, Int2Ptr item, Int2Ptr row, Int2Ptr col, RectPtr rct)
+{
+ MapDocPointEx (d, pt, item, row, col, rct, FALSE);
+}
+
/*****************************************************************************
*
* GetDocText (d, item, row, col)
diff --git a/vibrant/document.h b/vibrant/document.h
index 66370f57..fe793301 100644
--- a/vibrant/document.h
+++ b/vibrant/document.h
@@ -29,7 +29,7 @@
*
* Version Creation Date: 4/12/93
*
-* $Revision: 6.3 $
+* $Revision: 6.4 $
*
* File Description: Converts fielded text into final report in a document
*
@@ -40,6 +40,10 @@
*
*
* $Log: document.h,v $
+* Revision 6.4 2008/02/13 18:52:08 bollin
+* Added MapDocPointEx, which allows you to prefer the first matching column to
+* the last matching column.
+*
* Revision 6.3 2006/09/27 18:30:00 kans
* support for Int4 scroll bars for switching between text and doc views in Sequin (CB)
*
@@ -165,6 +169,9 @@ extern VoidPtr Nlm_GetDocData PROTO((Nlm_DoC d));
extern Nlm_CharPtr Nlm_GetDocText PROTO((Nlm_DoC d, Nlm_Int2 item, Nlm_Int2 row, Nlm_Int2 col));
extern void Nlm_MapDocPoint PROTO((Nlm_DoC d, Nlm_PoinT pt, Nlm_Int2Ptr item, Nlm_Int2Ptr row,
Nlm_Int2Ptr col, Nlm_RectPtr rct));
+extern void Nlm_MapDocPointEx PROTO((Nlm_DoC d, Nlm_PoinT pt, Nlm_Int2Ptr item, Nlm_Int2Ptr row,
+ Nlm_Int2Ptr col, Nlm_RectPtr rct, Nlm_Boolean prefer_first_match_col));
+
extern void Nlm_PrintDocument PROTO((Nlm_DoC d));
extern void Nlm_SaveDocument PROTO((Nlm_DoC d, FILE *f));
extern void Nlm_SaveDocumentItem PROTO((Nlm_DoC d, FILE *f, Nlm_Int2 item));
@@ -276,6 +283,7 @@ extern void Nlm_DisplayFancy PROTO((Nlm_DoC d, Nlm_CharPtr file, Nlm_ParPtr par
#define SetDocData Nlm_SetDocData
#define GetDocData Nlm_GetDocData
#define GetDocText Nlm_GetDocText
+#define MapDocPointEx Nlm_MapDocPointEx
#define MapDocPoint Nlm_MapDocPoint
#define PrintDocument Nlm_PrintDocument
#define SaveDocument Nlm_SaveDocument
diff --git a/vibrant/image.c b/vibrant/image.c
index aea47c22..324c862a 100644
--- a/vibrant/image.c
+++ b/vibrant/image.c
@@ -27,7 +27,7 @@
*
* Author: Alex Smirnov, Denis Vakatov
*
-* $Revision: 6.8 $
+* $Revision: 6.9 $
*
* File Description:
* Image(pixmap) processing.
@@ -36,80 +36,7 @@
*
* Modifications:
* --------------------------------------------------------------------------
-* $Log: image.c,v $
-* Revision 6.8 2004/04/01 13:43:08 lavr
-* Spell "occurred", "occurrence", and "occurring"
*
-* Revision 6.7 2003/11/17 17:03:29 kans
-* changed C++ style comments to C comments
-*
-* Revision 6.6 2002/03/28 13:35:48 kans
-* only include MoreCarbonAccessors.h if not OS_UNIX_DARWIN
-*
-* Revision 6.5 2001/04/05 03:24:12 juran
-* Carbon fixes.
-*
-* Revision 6.4 1999/11/22 14:46:45 thiessen
-* moved _OPENGL code blocks to only vibrant and ncbicn3d libraries
-*
-* Revision 6.3 1999/06/22 15:14:50 lewisg
-* fix image library so that works on linux with > 8 bits
-*
-* Revision 6.2 1998/01/05 20:00:13 vakatov
-* [WIN_X11] Nlm_AllocateImage() -- better diagnostics for mismatching visual
-*
-* Revision 6.1 1997/11/26 21:29:54 vakatov
-* Fixed errors and warnings issued by C and C++ (GNU and Sun) compilers
-*
-* Revision 6.0 1997/08/25 18:55:46 madden
-* Revision changed to 6.0
-*
-* Revision 5.7 1997/06/12 20:52:03 vakatov
-* Lock/UnlockPixMapImage -- check for the NULL image
-*
-* Revision 5.6 1997/06/09 18:55:35 vakatov
-* [WIN_X] Nlm_ImageShow(): by default, use standard RGB colormap for
-* the image drawing. +code cleaning.
-*
-* Revision 5.5 1997/05/28 21:15:29 vakatov
-* Nlm_LoadImageGIF(): "pack" the image colors;; fixed Uint1-overflow bug
-*
-* Revision 5.4 1996/11/22 19:46:07 vakatov
-* Implemented function Nlm_LoadImageGIF();
-* added Nlm_ImageGetColorOffset() and Nlm_ImageGetColorMax();
-* slightly modified Nlm_ImageGetBlack()
-*
- * Revision 5.3 1996/07/23 21:57:32 vakatov
- * Do not reinstall colormap if this is identical to the previous one --
- * it eliminates a redundant screen blinking when redrawing the 3D-Viewer
- * [WIN_MOTIF] Use 32th(instead of 0th) color for background
- *
- * Revision 5.2 1996/06/17 21:57:17 kans
- * use 255 instead of 254 for Nlm_ImageShow on Mac
- *
- * Revision 5.1 1996/06/14 14:30:42 vakatov
- * [WIN_MOTIF] Nlm_AllocateImage() function -- removed redundant color saving
- * [WIN_MOTIF] Nlm_ImageGetBlack() now always return zero
- *
- * Revision 5.0 1996/05/28 13:45:08 ostell
- * Set to revision 5.0
- *
- * Revision 1.8 1996/05/07 18:31:23 vakatov
- * [WIN_MSWIN] Nlm_AllocateImage() now adjusts the image width
- * (performs sizeof(LONG) alignment),thus avoiding the image picture distortion
- *
- * Revision 1.7 1996/04/23 23:26:24 kans
- * added Mac-specific code to Nlm_SaveImageGIF
- *
- * Revision 1.6 1996/04/23 15:44:48 vakatov
- * Nlm_SaveImageGIF()/X11 accelerated
- *
- * Revision 1.5 1996/04/17 21:40:34 vakatov
- * Implemented "Nlm_SaveImageGIF()" function for MS-Windows and
- * X11 platforms -- "I can save to GIF-file whatever I can see on
- * my monitor".
- * VC log inserted.
- *
* ==========================================================================
*/
@@ -358,6 +285,7 @@ Nlm_Boolean Nlm_AllocateImage ( Nlm_Image image, Nlm_Uint2Ptr width,
}
#endif
#ifdef WIN_MAC
+#ifndef WIN_MAC_QUARTZ
if ( im->pixelMap == NULL ) {
im->pixelMap = (PixMap*)MemNew(sizeof(PixMap));
}
@@ -413,6 +341,7 @@ Nlm_Boolean Nlm_AllocateImage ( Nlm_Image image, Nlm_Uint2Ptr width,
}
if ( cTable != NULL ) DisposeCTable(cTable);
#endif
+#endif
for ( i=saveColors; i<256; i++ )
im->red[i] = im->green[i] = im->blue[i] = 0;
@@ -779,6 +708,7 @@ void Nlm_DeleteImage(Nlm_Image image)
}
#endif
#ifdef WIN_MAC
+#ifndef WIN_MAC_QUARTZ
if ( im->pixelMap )
{
if ( im->pixelMap->pmTable )
@@ -786,6 +716,7 @@ void Nlm_DeleteImage(Nlm_Image image)
MemFree( im->pixelMap );
}
#endif
+#endif
MemFree( im );
}
@@ -1107,6 +1038,7 @@ Nlm_Boolean Nlm_ImageShow(Nlm_Image image, Nlm_PoinT p)
#endif
#ifdef WIN_MAC
+#ifndef WIN_MAC_QUARTZ
if ( Nlm_LockPixMapImage(image) == NULL ) return FALSE;
if ( im->imageColorVer != im->imageColorVerOld ){
if ( im->curWin != NULL ){
@@ -1143,6 +1075,7 @@ Nlm_Boolean Nlm_ImageShow(Nlm_Image image, Nlm_PoinT p)
BackColor(blackColor);
Nlm_UnlockPixMapImage(image);
#endif
+#endif
return TRUE;
}
@@ -1162,4 +1095,3 @@ Nlm_Uint1 Nlm_ImageGetColorMax(Nlm_Image image)
{
return (Nlm_Uint1)(((Nlm_PImagePtr)image)->totalColors - 1);
}
-
diff --git a/vibrant/ncbidraw.c b/vibrant/ncbidraw.c
index 8f1f550f..ee63a180 100644
--- a/vibrant/ncbidraw.c
+++ b/vibrant/ncbidraw.c
@@ -29,285 +29,14 @@
*
* Version Creation Date: 1/1/91
*
-* $Revision: 6.43 $
+* $Revision: 6.44 $
*
* File Description:
* Vibrant drawing functions.
*
* Modifications:
* --------------------------------------------------------------------------
-* $Log: ncbidraw.c,v $
-* Revision 6.43 2007/05/02 20:55:57 kans
-* Nlm_LoadFontData conditional arguments were incorrect WIN_GIF
*
-* Revision 6.42 2007/05/02 14:55:58 kans
-* preparation for supporting Quartz on Mac
-*
-* Revision 6.41 2006/11/24 20:07:20 kans
-* if Xcode (not MWERKS) have local defines of GetPortAndCall, InvalRect, InvalRgn, ValidRect, ValidRgn
-*
-* Revision 6.40 2006/09/14 19:18:28 ivanov
-* Rollback last changes. All missed defines added to corelib/ncbiwin.h.
-*
-* Revision 6.39 2006/09/14 18:05:45 ivanov
-* Fixed compilation errors on MS Windows
-*
-* Revision 6.38 2006/09/14 14:45:38 kans
-* changes for 64-bit Windows (GC) plus a few CodeWarrior complaints (JK)
-*
-* Revision 6.37 2004/04/14 19:15:50 sinyakov
-* WIN_MSWIN: support X-Windows-like -bg color command line option
-*
-* Revision 6.36 2003/11/17 17:03:30 kans
-* changed C++ style comments to C comments
-*
-* Revision 6.35 2003/03/19 21:13:22 kans
-* protect UNIX version of ScrollRect
-*
-* Revision 6.34 2002/06/13 16:15:12 kans
-* fix includes for OS_UNIX_DARWIN with WIN_MAC (EN) - still bug in vibutils.c file dialog
-*
-* Revision 6.33 2002/03/28 13:35:48 kans
-* only include MoreCarbonAccessors.h if not OS_UNIX_DARWIN
-*
-* Revision 6.32 2002/03/06 20:15:14 northup
-* under X11 cache colors from XAllocColor using a hash table. (EN)
-*
-* Revision 6.31 2002/02/04 19:04:51 kans
-* pass fsp.size to LoadFontData for systemFont on Mac - now label width calculated correctly
-*
-* Revision 6.30 2002/02/04 18:49:15 kans
-* fsp.size = GetDefFontSize () for systemFont on Mac - Mac OS X uses Lucida Grande 13
-*
-* Revision 6.29 2001/08/29 21:14:10 juran
-* Move Carbon forward-compatibility to MoreCarbonAccessors.h.
-* Call InvalRgn instead of InvalWindowRegion.
-*
-* Revision 6.28 2001/04/05 19:45:50 juran
-* Carbon fixes.
-*
-* Revision 6.27 2000/02/07 20:17:35 lewisg
-* minor bug fixes, use gui font for win32
-*
-* Revision 6.26 2000/01/24 16:11:13 lewisg
-* speed up seqid comparison in color manager, make fast windows version of SetColor()
-*
-* Revision 6.25 2000/01/13 23:37:13 beloslyu
-* changes because of port to HP-UX 11.0
-*
-* Revision 6.24 1999/12/21 18:04:23 kans
-* removed MPW/THINKC conditional code, starting upgrade to Carbon compatibility - Churchill
-*
-* Revision 6.23 1999/10/20 23:08:10 vakatov
-* + Nlm_SetCurrentGIF() -- to set Nlm_currentGIF directly.
-* + Nlm_DestroyGIF() -- to destroy Nlm_currentGIF.
-* Nlm_CreateGIF() and Nlm_SaveGIF() -- do not destroy Nlm_currentGIF.
-*
-* Revision 6.22 1999/10/04 18:44:02 vakatov
-* [WIN_GIF] Nlm_SelectFont() -- fixed the way the font gets chosen
-*
-* Revision 6.21 1999/03/17 15:10:47 vakatov
-* + Nlm_XLoadStandardFont() to find a "last-resort" font
-*
-* Revision 6.20 1998/08/12 14:52:26 vakatov
-* [MSWIN] Nlm_DrawLine(): draw at least one point(fix to R6.8)
-*
-* Revision 6.19 1998/07/27 16:49:23 vakatov
-* [WIN_X] AddNewFont(): try "-*-" in addition to "--" in font name spec.
-*
-* Revision 6.18 1998/07/24 21:43:14 vakatov
-* [WIN_MSWIN] It looks like the metafile driver does not support
-* extended userstyle pens, so use plain pens when writing to metafile
-*
-* Revision 6.17 1998/07/14 16:44:24 vakatov
-* Added VibrantIsGUI() and <internal> Nlm_VibrantSetGUI()
-*
-* Revision 6.16 1998/07/01 22:07:16 vakatov
-* s_AdjustRoundRect(): one-pixel fix
-*
-* Revision 6.15 1998/07/01 18:27:41 vakatov
-* Use "const" qualifier somewhere
-*
-* Revision 6.14 1998/06/26 20:00:17 vakatov
-* Added s_AdjustRoundRect() to adjust the rounding sizes in Nlm_*RoundRect()
-*
-* Revision 6.13 1998/06/25 18:36:29 vakatov
-* [WIN_MSWIN] Minor 1-pixel adjustments to synchronize graphic primitives
-*
-* Revision 6.12 1998/06/12 16:40:12 kans
-* fixed warnings detected by unix compiler
-*
-* Revision 6.11 1998/06/01 17:20:11 vakatov
-* Added code to draw/fill 90-degree arc/pie (quadrants)
-*
-* Revision 6.10 1998/04/27 15:58:46 vakatov
-* Implemented the drawing of rounded rectangles and ovals for GIF and X11
-*
-* Revision 6.9 1998/02/06 16:10:18 vakatov
-* [WIN_X] SetUpDrawingTools(): fixed mem.leak(default font info)
-*
-* Revision 6.8 1998/02/05 20:07:08 vakatov
-* [X11,MSWIN] Made DrawLine() always draw the last and the first point
-* (to be in-sync with GIF and MAC)
-*
-* Revision 6.7 1997/12/12 21:08:20 kans
-* a number of symbols changed in the latest CodeWarrior release, now using headers from Apple
-*
-* Revision 6.6 1997/11/26 21:29:59 vakatov
-* Fixed errors and warnings issued by C and C++ (GNU and Sun) compilers
-*
-* Revision 6.5 1997/11/04 23:32:49 vakatov
-* [WIN_X] #ULTRA_SPARC_X_SERVER_BUG -- workaround to set foreground color
-* when the stippling is in effect -- see Nlm_XSetForeground() for details.
-*
-* Revision 6.4 1997/09/16 20:34:15 vakatov
-* Added Nlm_FitStringWidth(); for now, it is implemented as native
-* for [WIN_X] and generic for all other platforms.
-* [WIN_X] Fixed bug in Nlm_AddNewFont() which disabled the font
-* matching algorithm
-*
-* Revision 6.3 1997/09/11 00:00:38 vakatov
-* [WIN_X] Nlm_EraseRect(): use XGetGCValues() to retrieve curr. fill style
-*
-* Revision 6.2 1997/09/10 18:23:35 vakatov
-* [WIN_X] Nlm_EraseRect(): temp. switch fill style to FillSolid
-*
-* Revision 6.1 1997/09/09 23:53:36 vakatov
-* [WIN_GIF] Nlm_Solid() -- reset the drawing pattern to solid
-*
-* Revision 5.22 1997/08/19 19:28:01 vakatov
-* [WIN_GIF] Implemented Nlm_SelectPattern()-related features
-*
-* Revision 5.21 1997/07/23 19:42:17 vakatov
-* Added Nlm_PaintStringEx function(text + position)
-*
-* Revision 5.20 1997/07/18 15:18:39 vakatov
-* [!WIN_GIF] +Dummy Nlm_CreateGIF() and Nlm_SaveGIF(); /return FALSE/
-*
-* Revision 5.19 1997/07/10 21:49:21 vakatov
-* [WIN_X] Now able to manage windows having different depths(and
-* different visuals and GC).
-*
-* Revision 5.18 1997/06/18 19:46:27 vakatov
-* [WIN_GIF] Do not use WIN_MAC/MSWIN/MOTIF-specific fields of the
-* Nlm_FontRec struct.
-*
-* Revision 5.17 1997/06/09 18:54:33 vakatov
-* [WIN_X] Nlm_XAllocColor() moved to "vibwndws.c"; Nlm_SetupColor()
-* removed at all; use Nlm_VibrantDefaultColormap() and Nlm_XAllocColor()
-* instead of 0 and XAllocColor() in most cases in order to use
-* standard colormap rather than the default one.
-* [ALL] Renamed("Local__" - prefixed) static coordination transformation funcs
-* whose name conflicts with the global ones; +other code cleaning...
-*
-* Revision 5.16 1997/06/04 16:12:05 vakatov
-* [WIN_MSWIN] PaintStringWin() has been removed again(see also R5.14)
-*
-* Revision 5.15 1997/06/04 00:05:12 kans
-* support for Japanese by Tomo Koike of DDBJ
-*
-* Revision 5.14 1997/05/08 14:05:27 vakatov
-* [WIN_MSWIN] PaintStringWin() is obsolete; replaced by MoveTo + PaintString
-*
- * Revision 5.13 1997/05/06 20:03:44 vakatov
- * [WIN_GIF] Nlm_CreateGIF(): Boolean --> Nlm_Boolean (by J.Kuzio)
- *
- * Revision 5.12 1997/05/06 18:39:52 vakatov
- * [WIN32] Nlm_SetPenDash() -- added #WIN_MSWIN cpp condition
- *
- * Revision 5.11 1997/04/22 17:32:28 vakatov
- * [WIN_X] Nlm_DrawLine() -- correction of R5.6 for p1.[xy] > p2.[xy]
- *
- * Revision 5.10 1997/04/04 22:46:42 vakatov
- * [WIN_MSWIN] Added static HFONT2Font() function; since now,
- * "Nlm_systemFont" and "Nlm_programFont" are to be printed using
- * the matching logical fonts obtained with HFONT2Font().
- *
- * Revision 5.9 1997/01/29 16:41:22 kans
- * using StringNCpy_0
- *
- * Revision 5.8 1996/12/11 22:29:19 vakatov
- * [WIN_MSWIN] Nlm_ResetDrawingTools(): reset prevPenHDC to ensure
- * proper brush pattern setting in some exotic cases
- *
- * Revision 5.7 1996/12/04 21:17:19 vakatov
- * [WIN_X] Nlm_InvertRect(): use GXinvert both on b/w and color displays
- *
- * Revision 5.6 1996/12/04 16:12:08 vakatov
- * [WIN_X] Made Nlm_DrawLine() always draw the last point; Nlm_MoveTo() now
- * implemented via a call to Nlm_DrawLine().
- *
- * Revision 5.5 1996/11/21 22:26:22 vakatov
- * [WIN_X] Made Nlm_LineTo() and Nlm_DrawLine() draw last point
- *
- * Revision 5.4 1996/11/21 18:50:59 vakatov
- * [WIN_MOTIF] Rectangle and Polygon drawing sync. to other platforms
- *
- * Revision 5.3 1996/10/28 19:33:04 vakatov
- * [WIN_MOTIF] Use Nlm_VibrantDefaultColormap() instead of the display
- * default colormap everywhere in the color handling code.
- *
- * Revision 5.2 1996/10/01 18:17:37 vakatov
- * [WIN_X] Added auxiliary static routine Nlm_XAllocColor() in order to
- * provide a uniform way of the color allocating; on the color
- * allocation error, it now returns "Black" pixel rather than "White".
- *
- * Revision 5.1 1996/09/30 19:54:08 vakatov
- * [WIN_X, WIN_NT] Added Nlm_SetPenDash() to allow advanced line dashing
- * [WIN_MSWIN] Nlm_PaintRect() -- synchronize it with Nlm_FrameRect(),
- * Nlm_FrameOval(), etc. (left + 1, bottom + 1)
- *
- * Revision 5.0 1996/05/28 13:45:08 ostell
- * Set to revision 5.0
- *
- * Revision 4.13 1996/05/10 21:12:33 vakatov
- * Added UpdateColorTable() function to allow the user to read his color
- * preferencies from an external config.-file in format:
- * <index> <red> <green> <blue> [<name>];
- * <name> is optional and it is only used in the WIN_MOTIF-based
- * applications to get hardware-independent named colors, if possible.
- *
- * Revision 4.12 1996/04/15 19:31:56 tatiana
- * add Boolean transparent to Nlm_CreateGIF()
- *
- * Revision 4.11 1996/02/01 22:42:01 smirnov
- * AS: problem with symbols in clipboard is fixed
- *
- * Revision 4.10 1996/02/01 18:42:53 smirnov
- * AS: fix bug: draw a small rectangle
- *
- * Revision 4.9 1996/01/31 18:47:32 smirnov
- * fix copy&paste bug
- *
- * Revision 4.8 1995/12/22 19:42:33 smirnov
- * AS: Fixed bug in GIF version of DrawText()
- *
- * Revision 4.7 1995/11/27 15:47:55 kans
- * fixed FrameArc (VL + JK)
- *
- * Revision 4.6 1995/11/27 15:13:41 kans
- * corrections to font height, etc. functions (VL)
- *
- * Revision 4.4 1995/11/14 13:42:05 kans
- * fixes to AddNewFont (VL)
- *
- * Revision 4.3 1995/11/07 15:47:22 smirnov
- * add GIF generator (Alex Smirnov)
- *
- * Revision 4.2 1995/09/12 17:59:35 ostell
- * fixes for MS windows text to metafile
- *
- * Revision 4.1 1995/09/12 00:39:10 ostell
- * changes for text to appear in windows metafiles
- *
- * Revision 4.0 1995/07/26 13:51:04 ostell
- * force revision to 4.0
- *
- * Revision 2.41 1995/07/14 17:48:26 kans
- * new CopyPixmap (AS)
- *
- * Revision 2.40 1995/06/07 21:23:38 kans
- * RecreateBrushes problem fixed (AS)
* ==========================================================================
*/
@@ -372,11 +101,41 @@ Nlm_Boolean Nlm_nowPrinting = FALSE;
#endif
#ifdef WIN_MAC
-RGBColor Nlm_RGBforeColor;
-RGBColor Nlm_RGBbackColor;
#ifdef WIN_MAC_QUARTZ
+CFMutableArrayRef Nlm_QContextStack = 0;
+static void Nlm_PushQContext( CGContextRef ctx )
+{
+ if (!Nlm_QContextStack)
+ Nlm_QContextStack = CFArrayCreateMutable (NULL, 0, NULL);
+ CFArrayAppendValue (Nlm_QContextStack, ctx);
+}
+static CGContextRef Nlm_PeekQContext (void)
+{
+ if (!Nlm_QContextStack)
+ return NULL;
+
+ CFIndex count = CFArrayGetCount (Nlm_QContextStack);
+ return count ? (CGContextRef)CFArrayGetValueAtIndex (Nlm_QContextStack, count - 1) : NULL;
+}
+static CGContextRef Nlm_PopQContext (void)
+{
+ if (!Nlm_QContextStack)
+ return NULL;
+
+ void *ret = Nlm_PeekQContext();
+ CFIndex count = CFArrayGetCount (Nlm_QContextStack);
+ if (count)
+ CFArrayRemoveValueAtIndex (Nlm_QContextStack, count - 1);
+ return ret;
+}
+
+WindowRef Nlm_QWindow = 0;
+Nlm_QuartzColor Nlm_QuartzForeColor;
+Nlm_QuartzColor Nlm_QuartzBackColor;
Nlm_Boolean Nlm_hasColorQD = TRUE;
#else
+RGBColor Nlm_RGBforeColor;
+RGBColor Nlm_RGBbackColor;
Nlm_Boolean Nlm_hasColorQD = FALSE;
#endif
#endif
@@ -554,54 +313,76 @@ static Nlm_Uint1 dkGrayPat[]= {0x77, 0xDD, 0x77, 0xDD, 0x77, 0xDD, 0x77, 0xDD};
static Nlm_Uint1 blackPat []= {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF};
#endif /* WIN_X | WIN_GIF */
+#ifdef WIN_MAC
#ifdef WIN_MAC_QUARTZ
-CGContextRef Nlm_QContext = 0;
-#endif
+extern void Nlm_SetPort (CGContextRef ctx)
+{
+ if (Nlm_PeekQContext()) {
+ CGContextSynchronize(Nlm_PeekQContext());
+ CGContextRelease(Nlm_PeekQContext());
+ Nlm_PopQContext();
+ }
+
+ if (ctx)
+ {
+ Nlm_PushQContext(ctx);
+ CGContextRetain(Nlm_PeekQContext());
+ }
+// QUARTZ_FIXME: some of this might be useful, somehow
+// if (grafptr != 0) {
+// CGAffineTransform textTransform;
+//
+// GetPortBounds(grafptr, &pBounds);
+// pHeight = pBounds.bottom - pBounds.top;
+// QDBeginCGContext(grafptr, &Nlm_PeekQContext());
+// CGContextTranslateCTM(Nlm_PeekQContext(), 0, pHeight);
+// CGContextScaleCTM(Nlm_PeekQContext(), 1.0f, -1.0f);
+//
+// textTransform = CGAffineTransformMakeScale(1.0f, -1.0f);
+// CGContextSetTextMatrix(Nlm_PeekQContext(), textTransform);
+// } else {
+// Nlm_PeekQContext() = 0;
+// }
+}
-#ifdef WIN_MAC
-extern void Nlm_SetPort (GrafPtr grafptr)
+void Nlm_PushPort (CGContextRef ctx)
{
-#ifdef WIN_MAC_QUARTZ
- CGrafPtr oldPort;
- Rect pBounds;
- int pHeight;
+ Nlm_PushQContext (ctx);
+}
- GetPort(&oldPort);
- if (Nlm_QContext != 0 ) {
- CGContextSynchronize(Nlm_QContext);
- QDEndCGContext(oldPort, &Nlm_QContext);
- Nlm_QContext = 0;
- }
+CGContextRef Nlm_PopPort (void)
+{
+ return Nlm_PopQContext ();
+}
- SetPort (grafptr);
- if (grafptr != 0) {
- CGAffineTransform textTransform;
-
- GetPortBounds(grafptr, &pBounds);
- pHeight = pBounds.bottom - pBounds.top;
- QDBeginCGContext(grafptr, &Nlm_QContext);
- CGContextTranslateCTM(Nlm_QContext, 0, pHeight);
- CGContextScaleCTM(Nlm_QContext, 1.0f, -1.0f);
-
- textTransform = CGAffineTransformMakeScale(1.0f, -1.0f);
- CGContextSetTextMatrix(Nlm_QContext, textTransform);
- } else {
- Nlm_QContext = 0;
- }
#else
+extern void Nlm_SetPort (GrafPtr grafptr)
+{
SetPort (grafptr);
-#endif
}
+#endif
extern void Nlm_SetPortWindowPort(Nlm_WindowTool wptr)
{
#ifdef WIN_MAC_QUARTZ
- Nlm_SetPort(GetWindowPort(wptr));
+ Nlm_QWindow = wptr;
#else
SetPortWindowPort(wptr);
#endif
}
+#ifdef WIN_MAC_QUARTZ
+WindowRef Nlm_GetQuartzCurrentWindow (void)
+{
+ return Nlm_QWindow;
+}
+
+void Nlm_SetGraphicNeedsDisplay (Nlm_GraphiC graphic)
+{
+ HIViewSetNeedsDisplay (HIViewGetRoot (Nlm_ParentWindowPtr (graphic)), 1);
+}
+#endif
+
#endif
#ifdef WIN_MSWIN
@@ -796,7 +577,7 @@ extern void Nlm_SetPenDash(Nlm_Uint1 offset, Nlm_Uint1 dash, Nlm_Uint1 gap)
float dashes[2];
dashes[0] = (float) dash;
dashes[1] = (float) gap;
- CGContextSetLineDash(Nlm_QContext, (float) offset, dashes, 2);
+ CGContextSetLineDash(Nlm_PeekQContext(), (float) offset, dashes, 2);
}
#else
Nlm_Dashed();
@@ -990,15 +771,25 @@ extern COLORREF Nlm_crBackColor;
extern HBRUSH Nlm_hbrWindowBackground;
#endif
+#ifdef WIN_MAC_QUARTZ
+static void Nlm_SelectQuartzColor (Nlm_QuartzColor c)
+{
+ CGContextSetRGBFillColor (Nlm_PeekQContext(), c.r, c.g, c.b, 1.0);
+ CGContextSetRGBStrokeColor(Nlm_PeekQContext(), c.r, c.g, c.b, 1.0);
+}
+#endif
extern void Nlm_ResetDrawingTools (void)
{
#ifdef WIN_MAC
#ifdef WIN_MAC_QUARTZ
- CGContextSetLineWidth(Nlm_QContext, 1.0);
- CGContextSetLineDash(Nlm_QContext, 0, NULL, 0);
- CGContextSetAlpha(Nlm_QContext, 1.0);
- Nlm_SelectColor(Nlm_RGBforeColor.red, Nlm_RGBforeColor.green, Nlm_RGBforeColor.blue);
+ if (Nlm_PeekQContext())
+ {
+ CGContextSetLineWidth(Nlm_PeekQContext(), 1.0);
+ CGContextSetLineDash(Nlm_PeekQContext(), 0, NULL, 0);
+ CGContextSetAlpha(Nlm_PeekQContext(), 1.0);
+ Nlm_SelectQuartzColor(Nlm_QuartzForeColor);
+ }
#else
PenNormal ();
PenMode (patCopy);
@@ -1139,7 +930,7 @@ static void Local__RecTToRectTool(Nlm_RectPtr src, Nlm_RectTool PNTR dst)
extern void Nlm_CopyMode (void)
{
-#ifdef WIN_MAC
+#if defined(WIN_MAC) && !defined(WIN_MAC_QUARTZ)
PenMode (patCopy);
TextMode (srcOr);
#endif
@@ -1160,9 +951,8 @@ extern void Nlm_CopyMode (void)
}
extern void Nlm_MergeMode (void)
-
{
-#ifdef WIN_MAC
+#if defined(WIN_MAC) && !defined(WIN_MAC_QUARTZ)
PenMode (patOr);
TextMode (srcOr);
#endif
@@ -1187,9 +977,8 @@ extern void Nlm_MergeMode (void)
}
extern void Nlm_InvertMode (void)
-
{
-#ifdef WIN_MAC
+#if defined(WIN_MAC) && !defined(WIN_MAC_QUARTZ)
PenMode (patXor);
TextMode (srcXor);
#endif
@@ -1214,10 +1003,8 @@ extern void Nlm_InvertMode (void)
}
extern void Nlm_EraseMode (void)
-
-
{
-#ifdef WIN_MAC
+#if defined(WIN_MAC) && !defined(WIN_MAC_QUARTZ)
PenMode (patBic);
TextMode (srcBic);
#endif
@@ -1447,8 +1234,10 @@ extern void Nlm_SelectColor (Nlm_Uint1 red, Nlm_Uint1 green, Nlm_Uint1 blue)
{
#ifdef WIN_MAC
#ifdef WIN_MAC_QUARTZ
- CGContextSetRGBFillColor (Nlm_QContext, red/255.0, green/255.0, blue/255.0, 1.0);
- CGContextSetRGBStrokeColor(Nlm_QContext, red/255.0, green/255.0, blue/255.0, 1.0);
+ Nlm_QuartzForeColor.r = red/255.0;
+ Nlm_QuartzForeColor.g = green/255.0;
+ Nlm_QuartzForeColor.b = blue/255.0;
+ Nlm_SelectQuartzColor (Nlm_QuartzForeColor);
#else
RGBColor color;
Nlm_Uint2 bl;
@@ -1581,11 +1370,16 @@ extern Nlm_Uint4 Nlm_GetColorRGB (Nlm_Uint1 red, Nlm_Uint1 green,
extern Nlm_Uint4 Nlm_GetColor (void)
{
#ifdef WIN_MAC
- Nlm_Uint1 colors [4];
- RGBColor foreColor;
+ Nlm_Uint1 colors [4] = { 0 };
Nlm_Int4 fgColor;
+#ifdef WIN_MAC_QUARTZ
+ colors[0] = 0;
+ colors[1] = Nlm_QuartzForeColor.r * 255.0;
+ colors[2] = Nlm_QuartzForeColor.g * 255.0;
+ colors[3] = Nlm_QuartzForeColor.b * 255.0;
+#else
+ RGBColor foreColor;
- fgColor = 0;
if (Nlm_hasColorQD) {
GetForeColor (&foreColor);
colors [0] = 0;
@@ -1593,15 +1387,18 @@ extern Nlm_Uint4 Nlm_GetColor (void)
colors [2] = (Nlm_Uint1) (foreColor.green >> 8);
colors [3] = (Nlm_Uint1) (foreColor.blue >> 8);
fgColor = *((Nlm_Int4Ptr) colors);
-#if !OPAQUE_TOOLBOX_STRUCTS
- } else {
+ }
+#endif
+ fgColor = (colors[0] << 24) | (colors[1] << 16) | (colors[2] << 8) | colors[3];
+#if !defined( WIN_MAC_QUARTZ ) && !defined( OPAQUE_TOOLBOX_STRUCTS )
+ if (!Nlm_hasColorQD) {
GrafPtr port;
GetPort (&port);
if (port != NULL) {
fgColor = port->fgColor;
}
-#endif
}
+#endif
return (Nlm_Uint4) fgColor;
#endif
#ifdef WIN_MSWIN
@@ -1667,12 +1464,12 @@ extern void Nlm_SetColor (Nlm_Uint4 color)
foreColor.green = gn << 8 | gn;
foreColor.blue = bl << 8 | bl;
RGBForeColor (&foreColor);
-#endif
} else {
GetPort (&port);
if (port != NULL) {
ForeColor ((Nlm_Int4) color);
}
+#endif
}
#endif
#ifdef WIN_MSWIN
@@ -1695,6 +1492,13 @@ extern void Nlm_InvertColors (void)
{
#ifdef WIN_MAC
+#ifdef WIN_MAC_QUARTZ
+ Nlm_QuartzColor temp = Nlm_QuartzForeColor;
+ Nlm_QuartzForeColor = Nlm_QuartzBackColor;
+ Nlm_QuartzBackColor = temp;
+
+ Nlm_SelectQuartzColor (Nlm_QuartzForeColor);
+#else
RGBColor backColor;
RGBColor foreColor;
@@ -1714,10 +1518,10 @@ extern void Nlm_InvertColors (void)
bkColor = port->bkColor;
ForeColor (bkColor);
BackColor (fgColor);
- }
#endif
}
#endif
+#endif
#ifdef WIN_MSWIN
Nlm_Int4 bkColor;
Nlm_Int4 fgColor;
@@ -1837,8 +1641,8 @@ extern void Nlm_DecodeColor (Nlm_Uint4 color, Nlm_Uint1Ptr red,
extern void Nlm_Dark (void)
{
#ifdef WIN_MAC_QUARTZ
- CGContextSetGrayFillColor (Nlm_QContext, .25, 1.0);
- CGContextSetGrayStrokeColor(Nlm_QContext, .25, 1.0);
+ CGContextSetGrayFillColor (Nlm_PeekQContext(), .25, 1.0);
+ CGContextSetGrayStrokeColor(Nlm_PeekQContext(), .25, 1.0);
#elif defined(WIN_MAC)
PenPat ((ConstPatternParam) dkGrayPat);
#endif
@@ -1856,8 +1660,8 @@ extern void Nlm_Dark (void)
extern void Nlm_Medium (void)
{
#ifdef WIN_MAC_QUARTZ
- CGContextSetGrayFillColor (Nlm_QContext, .5, 1.0);
- CGContextSetGrayStrokeColor(Nlm_QContext, .5, 1.0);
+ CGContextSetGrayFillColor (Nlm_PeekQContext(), .5, 1.0);
+ CGContextSetGrayStrokeColor(Nlm_PeekQContext(), .5, 1.0);
#elif defined(WIN_MAC)
PenPat ((ConstPatternParam) grayPat);
#endif
@@ -1875,8 +1679,8 @@ extern void Nlm_Medium (void)
extern void Nlm_Light (void)
{
#ifdef WIN_MAC_QUARTZ
- CGContextSetGrayFillColor (Nlm_QContext, .75, 1.0);
- CGContextSetGrayStrokeColor(Nlm_QContext, .75, 1.0);
+ CGContextSetGrayFillColor (Nlm_PeekQContext(), .75, 1.0);
+ CGContextSetGrayStrokeColor(Nlm_PeekQContext(), .75, 1.0);
#elif defined(WIN_MAC)
PenPat ((ConstPatternParam) ltGrayPat);
#endif
@@ -1893,13 +1697,14 @@ extern void Nlm_Light (void)
extern void Nlm_Empty (void)
{
-#ifdef WIN_MAC_QUARTZ
- CGContextSetGrayFillColor (Nlm_QContext, 1.0, 1.0);
- CGContextSetGrayStrokeColor(Nlm_QContext, 1.0, 1.0);
-#endif
#ifdef WIN_MAC
+#ifdef WIN_MAC_QUARTZ
+ CGContextSetGrayFillColor (Nlm_PeekQContext(), 1.0, 1.0);
+ CGContextSetGrayStrokeColor(Nlm_PeekQContext(), 1.0, 1.0);
+#else
PenPat ((ConstPatternParam) whitePat);
#endif
+#endif
#ifdef WIN_MSWIN
Nlm_SelectPattern (PS_SOLID, 1, whitePat, ATT_PATTERN);
#endif
@@ -1943,7 +1748,7 @@ extern void Nlm_SetPenPattern (Nlm_VoidPtr pattern)
ptr++;
}
#ifdef WIN_MAC_QUARTZ
- CGContextSetLineDash(Nlm_QContext, 0, pat, 8);
+ CGContextSetLineDash(Nlm_PeekQContext(), 0, pat, 8);
#else
PenPat ((ConstPatternParam) pat);
#endif
@@ -1979,9 +1784,9 @@ extern void Nlm_SetPenPattern (Nlm_VoidPtr pattern)
extern void Nlm_Solid (void)
{ /* Reset *both* line stile and drawing pattern to SOLID */
#ifdef WIN_MAC_QUARTZ
- CGContextSetGrayFillColor (Nlm_QContext, 0.0, 1.0);
- CGContextSetGrayStrokeColor(Nlm_QContext, 0.0, 1.0);
- CGContextSetLineDash(Nlm_QContext, 0, NULL, 0);
+ CGContextSetGrayFillColor (Nlm_PeekQContext(), 0.0, 1.0);
+ CGContextSetGrayStrokeColor(Nlm_PeekQContext(), 0.0, 1.0);
+ CGContextSetLineDash(Nlm_PeekQContext(), 0, NULL, 0);
#elif defined(WIN_MAC)
PenPat ((ConstPatternParam) blackPat);
#endif
@@ -2006,7 +1811,7 @@ extern void Nlm_Dotted (void)
{
#ifdef WIN_MAC_QUARTZ
float dashes[] = { 1.0, 1.0 };
- CGContextSetLineDash(Nlm_QContext, 0, dashes, 2);
+ CGContextSetLineDash(Nlm_PeekQContext(), 0, dashes, 2);
#elif defined(WIN_MAC)
PenPat ((ConstPatternParam) dotPat);
#endif
@@ -2029,7 +1834,7 @@ extern void Nlm_Dashed (void)
{
#ifdef WIN_MAC_QUARTZ
float dashes[] = { 3.0, 1.0 };
- CGContextSetLineDash(Nlm_QContext, 0, dashes, 2);
+ CGContextSetLineDash(Nlm_PeekQContext(), 0, dashes, 2);
#elif defined(WIN_MAC)
PenPat ((ConstPatternParam) dashPat);
#endif
@@ -2051,8 +1856,8 @@ extern void Nlm_Dashed (void)
extern void Nlm_WidePen (Nlm_Int2 width)
{
#ifdef WIN_MAC_QUARTZ
- CGContextSetLineDash(Nlm_QContext, 0, NULL, 0);
- CGContextSetLineWidth(Nlm_QContext, (float) width);
+ CGContextSetLineDash(Nlm_PeekQContext(), 0, NULL, 0);
+ CGContextSetLineWidth(Nlm_PeekQContext(), (float) width);
#elif defined(WIN_MAC)
PenPat ((ConstPatternParam) blackPat);
PenSize (width, width);
@@ -3069,7 +2874,7 @@ extern void Nlm_SelectFont (Nlm_FonT f)
}
#ifdef WIN_MAC
#ifdef WIN_MAC_ATSUI
-/* CGContextSelectFont(Nlm_QContext,fdata.fontspec.name, fdata.size, kCGEncodingMacRoman); */
+ Nlm_fontInUse = f;
#else
TextFont (fdata.number);
TextSize (fdata.size);
@@ -3120,8 +2925,12 @@ extern Nlm_Int2 Nlm_CharWidth (Nlm_Char ch)
{
#ifdef WIN_MAC
+#ifdef WIN_MAC_QUARTZ
+ return Nlm_TextWidth (&ch, 1);
+#else
return (CharWidth (ch));
#endif
+#endif
#ifdef WIN_MSWIN
Nlm_Char str [4];
@@ -3163,7 +2972,7 @@ extern Nlm_Int2 Nlm_TextWidth(const Nlm_Char* text, size_t len)
/* convert the string to Unicode */
cfString = CFStringCreateWithCString(kCFAllocatorDefault, text, kCFStringEncodingMacRoman);
if (cfString == NULL)
- return;
+ return 0;
cfsLen = CFStringGetLength(cfString);
unicodeString = CFStringGetCharactersPtr(cfString);
if (unicodeString == NULL) {
@@ -3222,16 +3031,49 @@ extern Nlm_Int2 Nlm_TextWidth(const Nlm_Char* text, size_t len)
return 0;
}
+#if defined(WIN_MAC) && defined(WIN_MAC_ATSUI)
+static ATSFontMetrics Nlm_CurrentATSUFontMetrics(void)
+{
+ Nlm_FontTool curStyle = Nlm_FontToATSUStyle (Nlm_fontInUse);
+ ATSUFontID fontID = 0;
+ ByteCount ignoredCount;
+
+ ATSUGetAttribute (curStyle, kATSUFontTag, sizeof (fontID), &fontID, &ignoredCount);
+
+ ATSFontRef font = FMGetATSFontRefFromFont (fontID);
+
+ ATSFontMetrics metrics;
+ memset (&metrics, 0, sizeof (metrics));
+ ATSFontGetHorizontalMetrics (font, kATSOptionFlagsDefault, &metrics);
+
+ return metrics;
+}
+
+static Fixed Nlm_CurrentATSUFontSize(void)
+{
+ Nlm_FontTool curStyle = Nlm_FontToATSUStyle (Nlm_fontInUse);
+ Fixed size = 0;
+ ByteCount ignoredCount;
+
+ ATSUGetAttribute (curStyle, kATSUSizeTag, sizeof (size), &size, &ignoredCount);
+
+ return size;
+}
+#endif
extern Nlm_Int2 Nlm_Ascent (void)
{
#ifdef WIN_MAC
+#ifdef WIN_MAC_ATSUI
+ return ceilf (Nlm_CurrentATSUFontMetrics().ascent * Nlm_CurrentATSUFontSize() / 65536.0);
+#else
FontInfo fontinfo;
GetFontInfo (&fontinfo);
return (fontinfo.ascent);
#endif
+#endif
#ifdef WIN_MSWIN
Nlm_Int2 rsult;
@@ -3259,11 +3101,15 @@ extern Nlm_Int2 Nlm_Descent (void)
{
#ifdef WIN_MAC
+#ifdef WIN_MAC_ATSUI
+ return ceilf (-Nlm_CurrentATSUFontMetrics().descent * Nlm_CurrentATSUFontSize() / 65536.0);
+#else
FontInfo fontinfo;
GetFontInfo (&fontinfo);
return (fontinfo.descent);
#endif
+#endif
#ifdef WIN_MSWIN
Nlm_Int2 rsult;
@@ -3291,11 +3137,15 @@ extern Nlm_Int2 Nlm_Leading (void)
{
#ifdef WIN_MAC
+#ifdef WIN_MAC_ATSUI
+ return ceilf (Nlm_CurrentATSUFontMetrics().leading * Nlm_CurrentATSUFontSize() / 65536.0);
+#else
FontInfo fontinfo;
GetFontInfo (&fontinfo);
return (fontinfo.leading);
#endif
+#endif
#ifdef WIN_MSWIN
Nlm_Int2 rsult;
@@ -3317,11 +3167,15 @@ extern Nlm_Int2 Nlm_FontHeight (void)
{
#ifdef WIN_MAC
+#ifdef WIN_MAC_ATSUI
+ return Nlm_Ascent() + Nlm_Descent();
+#else
FontInfo fontinfo;
GetFontInfo (&fontinfo);
return (fontinfo.ascent + fontinfo.descent);
#endif
+#endif
#ifdef WIN_MSWIN
Nlm_Int2 rsult;
@@ -3350,11 +3204,15 @@ extern Nlm_Int2 Nlm_LineHeight (void)
{
#ifdef WIN_MAC
+#ifdef WIN_MAC_ATSUI
+ return Nlm_Ascent() + Nlm_Descent() + Nlm_Leading();
+#else
FontInfo fontinfo;
GetFontInfo (&fontinfo);
return (fontinfo.ascent + fontinfo.descent + fontinfo.leading);
#endif
+#endif
#ifdef WIN_MSWIN
Nlm_Int2 rsult;
@@ -3383,11 +3241,15 @@ extern Nlm_Int2 Nlm_MaxCharWidth (void)
{
#ifdef WIN_MAC
+#ifdef WIN_MAC_ATSUI
+ return ceilf (Nlm_CurrentATSUFontMetrics().maxAdvanceWidth * Nlm_CurrentATSUFontSize() / 65536.0);
+#else
FontInfo fontinfo;
GetFontInfo (&fontinfo);
return (fontinfo.widMax);
#endif
+#endif
#ifdef WIN_MSWIN
Nlm_Int2 rsult;
@@ -3502,7 +3364,7 @@ extern void Nlm_GetPen (Nlm_PointPtr pt)
CGPoint cgp;
if (pt != NULL) {
- cgp = CGContextGetPathCurrentPoint(Nlm_QContext);
+ cgp = CGContextGetPathCurrentPoint(Nlm_PeekQContext());
}
pt->x = cgp.x;
pt->y = cgp.y;
@@ -3533,6 +3395,17 @@ extern void Nlm_GetPen (Nlm_PointPtr pt)
#endif
}
+void Nlm_SetPenWidth(Nlm_Int2 width)
+{
+#ifdef WIN_MAC
+#ifdef WIN_MAC_QUARTZ
+ CGContextSetLineWidth (Nlm_PeekQContext(), width);
+#else
+ PenSize (width, width);
+#endif
+#endif
+}
+
extern void Nlm_PaintChar (Nlm_Char ch)
{
@@ -3540,7 +3413,7 @@ extern void Nlm_PaintChar (Nlm_Char ch)
#ifdef WIN_MAC_QUARTZ
Nlm_PoinT pt;
Nlm_GetPen (& pt);
- CGContextShowTextAtPoint(Nlm_QContext, pt.x, pt.y, & ch, 1);
+ CGContextShowTextAtPoint(Nlm_PeekQContext(), pt.x, pt.y, & ch, 1);
#else
DrawChar (ch);
#endif
@@ -3645,7 +3518,7 @@ extern void Nlm_PaintString (Nlm_CharPtr text)
/* draw where? */
Nlm_GetPen (&pt);
- /* CGContextShowTextAtPoint(Nlm_QContext, pt.x, pt.y, text, Nlm_StringLen (text)); */
+ /* CGContextShowTextAtPoint(Nlm_PeekQContext(), pt.x, pt.y, text, Nlm_StringLen (text)); */
err = ATSUDrawText(layout, kATSUFromTextBeginning, kATSUToTextEnd,
Long2Fix(pt.x), Long2Fix(pt.y));
@@ -3720,7 +3593,7 @@ void CDECL Nlm_PaintText (char *format, ...)
va_end(args);
Nlm_GetPen (&pt);
#ifdef WIN_MAC_QUARTZ
- CGContextShowTextAtPoint(Nlm_QContext, pt.x, pt.y, str, Nlm_StringLen (str));
+ CGContextShowTextAtPoint(Nlm_PeekQContext(), pt.x, pt.y, str, Nlm_StringLen (str));
#else
if (Nlm_StringLen (str) > 0) {
Nlm_CtoPstr (str);
@@ -3823,7 +3696,7 @@ extern void Nlm_DrawText (Nlm_RectPtr r, Nlm_CharPtr text,
if (r != NULL) {
Nlm_EraseRect (r);
if (text != NULL && len > 0) {
- cfString = CFStringCreateWithBytes(kCFAllocatorDefault, text, len, kCFStringEncodingMacRoman, false);
+ cfString = CFStringCreateWithBytes(kCFAllocatorDefault, (UInt8 *)text, len, kCFStringEncodingMacRoman, false);
if (cfString == NULL)
return;
cfsLen = CFStringGetLength(cfString);
@@ -3848,29 +3721,30 @@ extern void Nlm_DrawText (Nlm_RectPtr r, Nlm_CharPtr text,
aStyle = Nlm_FontToATSUStyle(Nlm_fontInUse);
#ifdef WIN_MAC_QUARTZ
- boxOptions.optionTags |= kTXNUseCGContextRefMask;
- boxOptions.options = Nlm_QContext;
- CGContextSaveGState(Nlm_QContext);
- /* need to undo the coordinate transforms, otherwise the text comes out upside down. */
- CGContextScaleCTM(Nlm_QContext, 1.0f, -1.0f);
- {
- Rect pBounds;
- int pHeight;
- GrafPtr grafptr;
-
- GetPort(&grafptr);
- GetPortBounds(grafptr, &pBounds);
- pHeight = pBounds.bottom - pBounds.top;
- CGContextTranslateCTM(Nlm_QContext, 0, -pHeight);
- }
+// QUARTZ_FIXME: is this stuff necessary?
+// boxOptions.optionTags |= kTXNUseCGContextRefMask;
+// boxOptions.options = Nlm_PeekQContext();
+// CGContextSaveGState(Nlm_PeekQContext());
+// /* need to undo the coordinate transforms, otherwise the text comes out upside down. */
+// CGContextScaleCTM(Nlm_PeekQContext(), 1.0f, -1.0f);
+// {
+// Rect pBounds;
+// int pHeight;
+// GrafPtr grafptr;
+//
+// GetPort(&grafptr);
+// GetPortBounds(grafptr, &pBounds);
+// pHeight = pBounds.bottom - pBounds.top;
+// CGContextTranslateCTM(Nlm_PeekQContext(), 0, -pHeight);
+// }
#endif
err = TXNDrawCFStringTextBox(cfString, &rtool, aStyle, &boxOptions);
CFRelease(cfString);
-#ifdef WIN_MAC_QUARTZ
- CGContextRestoreGState(Nlm_QContext);
-#endif
+//#ifdef WIN_MAC_QUARTZ
+// CGContextRestoreGState(Nlm_PeekQContext());
+//#endif
}
}
@@ -4100,7 +3974,7 @@ extern void Nlm_MoveTo (Nlm_Int2 x, Nlm_Int2 y)
{
#ifdef WIN_MAC
#ifdef WIN_MAC_QUARTZ
- CGContextMoveToPoint(Nlm_QContext, x, y);
+ CGContextMoveToPoint(Nlm_PeekQContext(), x, y);
#else
MoveTo (x, y);
#endif
@@ -4126,9 +4000,9 @@ extern void Nlm_LineTo (Nlm_Int2 x, Nlm_Int2 y)
{
#ifdef WIN_MAC
#ifdef WIN_MAC_QUARTZ
- CGContextAddLineToPoint(Nlm_QContext, x, y);
- CGContextStrokePath(Nlm_QContext);
- CGContextMoveToPoint(Nlm_QContext, x, y);
+ CGContextAddLineToPoint(Nlm_PeekQContext(), x, y);
+ CGContextStrokePath(Nlm_PeekQContext());
+ CGContextMoveToPoint(Nlm_PeekQContext(), x, y);
#else
LineTo (x, y);
#endif
@@ -4162,9 +4036,9 @@ extern void Nlm_DrawLine (Nlm_PoinT pt1, Nlm_PoinT pt2)
{
#ifdef WIN_MAC
#ifdef WIN_MAC_QUARTZ
- CGContextMoveToPoint(Nlm_QContext, pt1.x, pt1.y);
- CGContextAddLineToPoint(Nlm_QContext, pt2.x, pt2.y);
- CGContextStrokePath(Nlm_QContext);
+ CGContextMoveToPoint(Nlm_PeekQContext(), pt1.x, pt1.y);
+ CGContextAddLineToPoint(Nlm_PeekQContext(), pt2.x, pt2.y);
+ CGContextStrokePath(Nlm_PeekQContext());
#else
MoveTo (pt1.x, pt1.y);
LineTo (pt2.x, pt2.y);
@@ -4275,8 +4149,12 @@ extern Nlm_Boolean Nlm_PtInRgn (Nlm_PoinT pt, Nlm_RegioN rgn)
Nlm_RgnTool ntool;
Nlm_Boolean rsult;
#ifdef WIN_MAC
+#ifdef WIN_MAC_QUARTZ
+ CGPoint ptool;
+#else
Nlm_PointTool ptool;
#endif
+#endif
#ifdef WIN_GIF
Nlm_RecT r;
#endif
@@ -4285,9 +4163,14 @@ extern Nlm_Boolean Nlm_PtInRgn (Nlm_PoinT pt, Nlm_RegioN rgn)
if (rgn != NULL) {
ntool = (Nlm_RgnTool) rgn;
#ifdef WIN_MAC
+#ifdef WIN_MAC_QUARTZ
+ ptool = Nlm_PoinTToCGPoint (pt);
+ rsult = HIShapeContainsPoint (ntool, &ptool);
+#else
Local__PoinTToPointTool (pt, &ptool);
rsult = PtInRgn (ptool, ntool);
#endif
+#endif
#ifdef WIN_MSWIN
rsult = (Nlm_Boolean) PtInRegion (ntool, pt.x, pt.y);
#endif
@@ -4367,7 +4250,15 @@ static void Nlm_LoadNormalized (Nlm_RectPtr dst, Nlm_RectPtr src)
extern Nlm_Boolean Nlm_SectRect(Nlm_RectPtr src1, Nlm_RectPtr src2,
Nlm_RectPtr dst)
{
-#if defined(WIN_MSWIN) || defined(WIN_MAC)
+#ifdef WIN_MAC_QUARTZ
+ CGRect r1 = Nlm_RecTToCGRect (*src1);
+ CGRect r2 = Nlm_RecTToCGRect (*src2);
+ CGRect d = CGRectIntersection (r1, r2);
+ *dst = Nlm_CGRectToRecT (d);
+ return !CGRectIsNull (d);
+#else
+
+#if defined(WIN_MSWIN) || (defined(WIN_MAC) && !defined(WIN_MAC_QUARTZ))
Nlm_Boolean rsult;
Nlm_RectTool rtool1;
Nlm_RectTool rtool2;
@@ -4380,7 +4271,7 @@ extern Nlm_Boolean Nlm_SectRect(Nlm_RectPtr src1, Nlm_RectPtr src2,
if (!src1 || !src2 || !dst)
return FALSE;
-#if defined(WIN_MSWIN) || defined(WIN_MAC)
+#if defined(WIN_MSWIN) || (defined(WIN_MAC) && !defined(WIN_MAC_QUARTZ))
Local__RecTToRectTool(src1, &rtool1);
Local__RecTToRectTool(src2, &rtool2);
#ifdef WIN_MSWIN
@@ -4405,13 +4296,22 @@ extern Nlm_Boolean Nlm_SectRect(Nlm_RectPtr src1, Nlm_RectPtr src2,
}
return TRUE;
#endif
+#endif
}
extern Nlm_Boolean Nlm_UnionRect(Nlm_RectPtr src1, Nlm_RectPtr src2,
Nlm_RectPtr dst)
{
-#if defined(WIN_MSWIN) || defined(WIN_MAC)
+#ifdef WIN_MAC_QUARTZ
+ CGRect r1 = Nlm_RecTToCGRect (*src1);
+ CGRect r2 = Nlm_RecTToCGRect (*src2);
+ CGRect d = CGRectUnion (r1, r2);
+ *dst = Nlm_CGRectToRecT (d);
+ return CGRectIsEmpty (d);
+#else
+
+#if defined(WIN_MSWIN) || (defined(WIN_MAC) && !defined(WIN_MAC_QUARTZ))
Nlm_Boolean rsult;
Nlm_RectTool rtool1;
Nlm_RectTool rtool2;
@@ -4424,7 +4324,7 @@ extern Nlm_Boolean Nlm_UnionRect(Nlm_RectPtr src1, Nlm_RectPtr src2,
if (!src1 || !src2 || !dst)
return FALSE;
-#if defined(WIN_MSWIN) || defined(WIN_MAC)
+#if defined(WIN_MSWIN) || (defined(WIN_MAC) && !defined(WIN_MAC_QUARTZ))
Local__RecTToRectTool(src1, &rtool1);
Local__RecTToRectTool(src2, &rtool2);
#ifdef WIN_MSWIN
@@ -4445,6 +4345,7 @@ extern Nlm_Boolean Nlm_UnionRect(Nlm_RectPtr src1, Nlm_RectPtr src2,
dst->bottom = MAX(rect1.bottom, rect2.bottom);
return TRUE;
#endif
+#endif
}
@@ -4482,6 +4383,9 @@ extern Nlm_Boolean Nlm_RectInRgn (Nlm_RectPtr r, Nlm_RegioN rgn)
Nlm_RgnTool ntool;
Nlm_Boolean rsult;
Nlm_RectTool rtool;
+#ifdef WIN_MAC_QUARTZ
+ CGRect rect;
+#endif
#ifdef WIN_GIF
Nlm_RecT rect;
#endif
@@ -4491,8 +4395,13 @@ extern Nlm_Boolean Nlm_RectInRgn (Nlm_RectPtr r, Nlm_RegioN rgn)
Local__RecTToRectTool (r, &rtool);
ntool = (Nlm_RgnTool) rgn;
#ifdef WIN_MAC
+#ifdef WIN_MAC_QUARTZ
+ rect = Nlm_RecTToCGRect (*r);
+ rsult = HIShapeIntersectsRect (ntool, &rect);
+#else
rsult = RectInRgn (&rtool, ntool);
#endif
+#endif
#ifdef WIN_MSWIN
rsult = (Nlm_Boolean) RectInRegion (ntool, &rtool);
#endif
@@ -4519,11 +4428,11 @@ extern void Nlm_EraseRect (Nlm_RectPtr r)
#ifdef WIN_MAC
#ifdef WIN_MAC_QUARTZ
CGRect cgr;
- cgr = Nlm_RecTToCGRect(r);
- CGContextSaveGState(Nlm_QContext);
+ cgr = Nlm_RecTToCGRect(*r);
+ CGContextSaveGState(Nlm_PeekQContext());
Nlm_White();
- CGContextFillRect(Nlm_QContext, cgr);
- CGContextRestoreGState(Nlm_QContext);
+ CGContextFillRect(Nlm_PeekQContext(), cgr);
+ CGContextRestoreGState(Nlm_PeekQContext());
#else
EraseRect (&rtool);
#endif
@@ -4563,8 +4472,8 @@ extern void Nlm_FrameRect (Nlm_RectPtr r)
#ifdef WIN_MAC
#ifdef WIN_MAC_QUARTZ
CGRect rtool;
- rtool = Nlm_RecTToCGRect(r);
- CGContextStrokeRect(Nlm_QContext, rtool);
+ rtool = Nlm_RecTToCGRect(*r);
+ CGContextStrokeRect(Nlm_PeekQContext(), rtool);
#else
Nlm_RectTool rtool;
@@ -4644,8 +4553,8 @@ extern void Nlm_PaintRect(Nlm_RectPtr r)
#ifdef WIN_MAC_QUARTZ
CGRect cgr;
- cgr = Nlm_RecTToCGRect(r);
- CGContextFillRect(Nlm_QContext, cgr);
+ cgr = Nlm_RecTToCGRect(*r);
+ CGContextFillRect(Nlm_PeekQContext(), cgr);
#elif defined(WIN_MAC)
if (rtool.right == rtool.left) {
rtool.right = rtool.left + 1;
@@ -4727,8 +4636,13 @@ extern void Nlm_ScrollRect (Nlm_RectPtr r, Nlm_Int2 dx, Nlm_Int2 dy)
if (r != NULL) {
Local__RecTToRectTool (r, &rtool);
+#ifdef WIN_MAC_QUARTZ
+// QUARTZ_FIXME: might want to do a little more than this
+ HIViewSetNeedsDisplay (HIViewGetRoot (Nlm_QWindow), 1);
+#else
ScrollRect (&rtool, dx, dy, (Nlm_RgnTool) Nlm_scrollRgn);
InvalRgn ((Nlm_RgnTool) Nlm_scrollRgn);
+#endif
}
#endif
#ifdef WIN_MSWIN
@@ -4870,13 +4784,13 @@ extern void Nlm_EraseOval (Nlm_RectPtr r)
#if defined(WIN_MAC_QUARTZ)
{
CGRect cgr;
- cgr = Nlm_RecTToCGRect(r);
- Nlm_addOvalToPath(Nlm_QContext, cgr);
+ cgr = Nlm_RecTToCGRect(*r);
+ Nlm_addOvalToPath(Nlm_PeekQContext(), cgr);
}
- CGContextSaveGState(Nlm_QContext);
+ CGContextSaveGState(Nlm_PeekQContext());
Nlm_White();
- CGContextFillPath(Nlm_QContext);
- CGContextRestoreGState(Nlm_QContext);
+ CGContextFillPath(Nlm_PeekQContext());
+ CGContextRestoreGState(Nlm_PeekQContext());
#else
EraseOval(&rtool);
#endif
@@ -4925,10 +4839,10 @@ extern void Nlm_FrameOval(Nlm_RectPtr r)
#if defined(WIN_MAC_QUARTZ)
{
CGRect cgr;
- cgr = Nlm_RecTToCGRect(r);
- Nlm_addOvalToPath(Nlm_QContext, cgr);
+ cgr = Nlm_RecTToCGRect(*r);
+ Nlm_addOvalToPath(Nlm_PeekQContext(), cgr);
}
- CGContextStrokePath(Nlm_QContext);
+ CGContextStrokePath(Nlm_PeekQContext());
#else
FrameOval(&rtool);
#endif
@@ -4966,10 +4880,10 @@ extern void Nlm_PaintOval(Nlm_RectPtr r)
#if defined(WIN_MAC_QUARTZ)
{
CGRect cgr;
- cgr = Nlm_RecTToCGRect(r);
- Nlm_addOvalToPath(Nlm_QContext, cgr);
+ cgr = Nlm_RecTToCGRect(*r);
+ Nlm_addOvalToPath(Nlm_PeekQContext(), cgr);
}
- CGContextFillPath(Nlm_QContext);
+ CGContextFillPath(Nlm_PeekQContext());
#else
PaintOval(&rtool);
@@ -5007,7 +4921,12 @@ extern void Nlm_InvertOval(Nlm_RectPtr r)
Local__RecTToRectTool(r, &rtool);
#if defined(WIN_MAC)
+#ifdef WIN_MAC_QUARTZ
+/* QUART_FIXME: can't invert, what to do? */
+ Nlm_PaintOval (r);
+#else
InvertOval (&rtool);
+#endif
#elif defined(WIN_MSWIN)
if ( Nlm_currentHDC ) {
@@ -5090,13 +5009,13 @@ extern void Nlm_EraseRoundRect(Nlm_RectPtr r, Nlm_Int2 ovlWid, Nlm_Int2 ovlHgt)
#if defined(WIN_MAC_QUARTZ)
{
CGRect cgr;
- cgr = Nlm_RecTToCGRect(r);
- addRoundedRectToPath(Nlm_QContext, cgr, ovlWid, ovlHgt);
+ cgr = Nlm_RecTToCGRect(*r);
+ addRoundedRectToPath(Nlm_PeekQContext(), cgr, ovlWid, ovlHgt);
}
- CGContextSaveGState(Nlm_QContext);
+ CGContextSaveGState(Nlm_PeekQContext());
Nlm_White();
- CGContextFillPath(Nlm_QContext);
- CGContextRestoreGState(Nlm_QContext);
+ CGContextFillPath(Nlm_PeekQContext());
+ CGContextRestoreGState(Nlm_PeekQContext());
#else
EraseRoundRect(&rtool, ovlWid, ovlHgt);
#endif
@@ -5149,10 +5068,10 @@ extern void Nlm_FrameRoundRect(Nlm_RectPtr r, Nlm_Int2 ovlWid, Nlm_Int2 ovlHgt)
#if defined(WIN_MAC_QUARTZ)
{
CGRect cgr;
- cgr = Nlm_RecTToCGRect(r);
- addRoundedRectToPath(Nlm_QContext, cgr, ovlWid, ovlHgt);
+ cgr = Nlm_RecTToCGRect(*r);
+ addRoundedRectToPath(Nlm_PeekQContext(), cgr, ovlWid, ovlHgt);
}
- CGContextStrokePath(Nlm_QContext);
+ CGContextStrokePath(Nlm_PeekQContext());
#else
FrameRoundRect(&rtool, ovlWid, ovlHgt);
#endif
@@ -5195,10 +5114,10 @@ extern void Nlm_PaintRoundRect(Nlm_RectPtr r, Nlm_Int2 ovlWid, Nlm_Int2 ovlHgt)
#if defined(WIN_MAC_QUARTZ)
{
CGRect cgr;
- cgr = Nlm_RecTToCGRect(r);
- addRoundedRectToPath(Nlm_QContext, cgr, ovlWid, ovlHgt);
+ cgr = Nlm_RecTToCGRect(*r);
+ addRoundedRectToPath(Nlm_PeekQContext(), cgr, ovlWid, ovlHgt);
}
- CGContextFillPath(Nlm_QContext);
+ CGContextFillPath(Nlm_PeekQContext());
#else
PaintRoundRect(&rtool, ovlWid, ovlHgt);
#endif
@@ -5239,7 +5158,12 @@ extern void Nlm_InvertRoundRect(Nlm_RectPtr r,
s_AdjustRoundRect(r, &ovlWid, &ovlHgt);
#if defined(WIN_MAC)
+#ifdef WIN_MAC_QUARTZ
+/* QUARTZ_FIXME: can't invert, what to do? */
+ Nlm_PaintRoundRect (r, ovlWid, ovlHgt);
+#else
InvertRoundRect (&rtool, ovlWid, ovlHgt);
+#endif
#elif defined(WIN_MSWIN)
if ( Nlm_currentHDC ) {
@@ -5370,16 +5294,16 @@ extern void Nlm_EraseArc(Nlm_RectPtr r, Nlm_PoinT start, Nlm_PoinT end)
CGPoint startPt;
CGPoint endPt;
- cgr = Nlm_RecTToCGRect(r);
+ cgr = Nlm_RecTToCGRect(*r);
startPt = Nlm_PoinTToCGPoint(start);
endPt = Nlm_PoinTToCGPoint(end);
Nlm_MoveTo((r->right + r->left)/2, (r->top + r->bottom)/2);
- pathForArc (Nlm_QContext, cgr, startPt, endPt);
+ pathForArc (Nlm_PeekQContext(), cgr, startPt, endPt);
- CGContextSaveGState(Nlm_QContext);
+ CGContextSaveGState(Nlm_PeekQContext());
Nlm_White();
- CGContextFillPath(Nlm_QContext);
- CGContextRestoreGState(Nlm_QContext);
+ CGContextFillPath(Nlm_PeekQContext());
+ CGContextRestoreGState(Nlm_PeekQContext());
#else
Nlm_Int2 angle1;
Nlm_Int2 angle2;
@@ -5455,11 +5379,11 @@ extern void Nlm_FrameArc(Nlm_RectPtr r, Nlm_PoinT start, Nlm_PoinT end)
CGPoint startPt;
CGPoint endPt;
- cgr = Nlm_RecTToCGRect(r);
+ cgr = Nlm_RecTToCGRect(*r);
startPt = Nlm_PoinTToCGPoint(start);
endPt = Nlm_PoinTToCGPoint(end);
- pathForArc (Nlm_QContext, cgr, startPt, endPt);
- CGContextStrokePath(Nlm_QContext);
+ pathForArc (Nlm_PeekQContext(), cgr, startPt, endPt);
+ CGContextStrokePath(Nlm_PeekQContext());
#else
Nlm_Int2 angle1;
Nlm_Int2 angle2;
@@ -5526,12 +5450,12 @@ extern void Nlm_PaintArc(Nlm_RectPtr r, Nlm_PoinT start, Nlm_PoinT end)
CGPoint startPt;
CGPoint endPt;
- cgr = Nlm_RecTToCGRect(r);
+ cgr = Nlm_RecTToCGRect(*r);
startPt = Nlm_PoinTToCGPoint(start);
endPt = Nlm_PoinTToCGPoint(end);
Nlm_MoveTo((r->right + r->left)/2, (r->top + r->bottom)/2);
- pathForArc (Nlm_QContext, cgr, startPt, endPt);
- CGContextFillPath(Nlm_QContext);
+ pathForArc (Nlm_PeekQContext(), cgr, startPt, endPt);
+ CGContextFillPath(Nlm_PeekQContext());
#else
Nlm_Int2 angle1;
Nlm_Int2 angle2;
@@ -5599,6 +5523,10 @@ extern void Nlm_InvertArc(Nlm_RectPtr r, Nlm_PoinT start, Nlm_PoinT end)
Local__RecTToRectTool(r, &rtool);
#if defined(WIN_MAC)
+#ifdef WIN_MAC_QUARTZ
+/* QUARTZ_FIXME: can't invert, what to do? */
+ Nlm_PaintArc (r, start, end);
+#else
{{
Nlm_Int2 angle1;
Nlm_Int2 angle2;
@@ -5619,6 +5547,7 @@ extern void Nlm_InvertArc(Nlm_RectPtr r, Nlm_PoinT start, Nlm_PoinT end)
InvertArc(&rtool, angle1, arcAngle);
}}
+#endif
#elif defined(WIN_MSWIN)
if ( Nlm_currentHDC ) {
@@ -5768,13 +5697,13 @@ static void Nlm_CreatePoly (Nlm_Int2 num, Nlm_PointPtr pts)
if (pts != NULL && num > 0) {
firstPt = pts [0];
- CGContextMoveToPoint(Nlm_QContext, (float) firstPt.x, (float) firstPt.y);
+ CGContextMoveToPoint(Nlm_PeekQContext(), (float) firstPt.x, (float) firstPt.y);
for (i = 1; i < num; i++) {
pt = pts [i];
- CGContextAddLineToPoint(Nlm_QContext, (float) pt.x, (float) pt.y);
+ CGContextAddLineToPoint(Nlm_PeekQContext(), (float) pt.x, (float) pt.y);
}
if (! Nlm_EqualPt (pt, firstPt)) {
- CGContextClosePath(Nlm_QContext);
+ CGContextClosePath(Nlm_PeekQContext());
}
}
}
@@ -5902,10 +5831,10 @@ extern void Nlm_ErasePoly (Nlm_Int2 num, Nlm_PointPtr pts)
#ifdef WIN_MAC
#ifdef WIN_MAC_QUARTZ
Nlm_CreatePoly (num, pts);
- CGContextSaveGState(Nlm_QContext);
+ CGContextSaveGState(Nlm_PeekQContext());
Nlm_White();
- CGContextEOFillPath(Nlm_QContext);
- CGContextRestoreGState(Nlm_QContext);
+ CGContextEOFillPath(Nlm_PeekQContext());
+ CGContextRestoreGState(Nlm_PeekQContext());
#else
PolyHandle ply;
@@ -5932,7 +5861,7 @@ extern void Nlm_FramePoly(Nlm_Int2 num, Nlm_PointPtr pts)
#ifdef WIN_MAC
#ifdef WIN_MAC_QUARTZ
Nlm_CreatePoly (num, pts);
- CGContextStrokePath(Nlm_QContext);
+ CGContextStrokePath(Nlm_PeekQContext());
#else
PolyHandle ply;
@@ -5993,7 +5922,7 @@ extern void Nlm_PaintPoly (Nlm_Int2 num, Nlm_PointPtr pts)
#ifdef WIN_MAC
#ifdef WIN_MAC_QUARTZ
Nlm_CreatePoly (num, pts);
- CGContextEOFillPath(Nlm_QContext);
+ CGContextEOFillPath(Nlm_PeekQContext());
#else
PolyHandle ply;
@@ -6093,8 +6022,12 @@ extern Nlm_RegioN Nlm_CreateRgn (void)
Nlm_RgnTool ntool;
#ifdef WIN_MAC
+#ifdef WIN_MAC_QUARTZ
+ ntool = HIShapeCreateMutable();
+#else
ntool = NewRgn ();
#endif
+#endif
#ifdef WIN_MSWIN
ntool = CreateRectRgn (0, 0, 0, 0);
#endif
@@ -6115,8 +6048,12 @@ extern Nlm_RegioN Nlm_DestroyRgn (Nlm_RegioN rgn)
if (rgn != NULL) {
ntool = (Nlm_RgnTool) rgn;
#ifdef WIN_MAC
+#ifdef WIN_MAC_QUARTZ
+ CFRelease (ntool);
+#else
DisposeRgn (ntool);
#endif
+#endif
#ifdef WIN_MSWIN
DeleteObject (ntool);
#endif
@@ -6141,8 +6078,12 @@ extern void Nlm_ClearRgn (Nlm_RegioN rgn)
if (rgn != NULL) {
ntool = (Nlm_RgnTool) rgn;
#ifdef WIN_MAC
+#ifdef WIN_MAC_QUARTZ
+ HIShapeSetEmpty (ntool);
+#else
SetEmptyRgn (ntool);
#endif
+#endif
#ifdef WIN_MSWIN
temp = CreateRectRgn (0, 0, 0, 0);
CombineRgn (ntool, temp, temp, RGN_COPY);
@@ -6171,8 +6112,17 @@ extern void Nlm_LoadRectRgn (Nlm_RegioN rgn, Nlm_Int2 lf,
if (rgn != NULL) {
ntool = (Nlm_RgnTool) rgn;
#ifdef WIN_MAC
+#ifdef WIN_MAC_QUARTZ
+ HIShapeSetEmpty (ntool);
+
+ CGRect r = CGRectMake (lf, tp, rt - lf, bt - tp);
+ HIShapeRef tempShape = HIShapeCreateWithRect (&r);
+ HIShapeUnion (tempShape, ntool, ntool);
+ CFRelease (tempShape);
+#else
SetRectRgn (ntool, lf, tp, rt, bt);
#endif
+#endif
#ifdef WIN_MSWIN
SetRectRgn (ntool, lf, tp, rt, bt);
#endif
@@ -6199,8 +6149,12 @@ extern void Nlm_OffsetRgn (Nlm_RegioN rgn, Nlm_Int2 dx, Nlm_Int2 dy)
if (rgn != NULL) {
ntool = (Nlm_RgnTool) rgn;
#ifdef WIN_MAC
+#ifdef WIN_MAC_QUARTZ
+ HIShapeOffset (ntool, dx, dy);
+#else
OffsetRgn (ntool, dx, dy);
#endif
+#endif
#ifdef WIN_MSWIN
OffsetRgn (ntool, dx, dy);
#endif
@@ -6235,8 +6189,12 @@ extern void Nlm_SectRgn (Nlm_RegioN src1, Nlm_RegioN src2, Nlm_RegioN dst)
ntool2 = (Nlm_RgnTool) src2;
ntool3 = (Nlm_RgnTool) dst;
#ifdef WIN_MAC
+#ifdef WIN_MAC_QUARTZ
+ HIShapeIntersect (ntool1, ntool2, ntool3);
+#else
SectRgn (ntool1, ntool2, ntool3);
#endif
+#endif
#ifdef WIN_MSWIN
CombineRgn (ntool3, ntool1, ntool2, RGN_AND);
#endif
@@ -6275,8 +6233,12 @@ extern void Nlm_UnionRgn (Nlm_RegioN src1, Nlm_RegioN src2, Nlm_RegioN dst)
ntool2 = (Nlm_RgnTool) src2;
ntool3 = (Nlm_RgnTool) dst;
#ifdef WIN_MAC
+#ifdef WIN_MAC_QUARTZ
+ HIShapeUnion( ntool1, ntool2, ntool3);
+#else
UnionRgn (ntool1, ntool2, ntool3);
#endif
+#endif
#ifdef WIN_MSWIN
CombineRgn (ntool3, ntool1, ntool2, RGN_OR);
#endif
@@ -6310,8 +6272,12 @@ extern void Nlm_DiffRgn (Nlm_RegioN src1, Nlm_RegioN src2, Nlm_RegioN dst)
ntool2 = (Nlm_RgnTool) src2;
ntool3 = (Nlm_RgnTool) dst;
#ifdef WIN_MAC
+#ifdef WIN_MAC_QUARTZ
+ HIShapeDifference (ntool1, ntool2, ntool3);
+#else
DiffRgn (ntool1, ntool2, ntool3);
#endif
+#endif
#ifdef WIN_MSWIN
CombineRgn (ntool3, ntool1, ntool2, RGN_DIFF);
#endif
@@ -6327,6 +6293,24 @@ extern void Nlm_DiffRgn (Nlm_RegioN src1, Nlm_RegioN src2, Nlm_RegioN dst)
extern void Nlm_XorRgn (Nlm_RegioN src1, Nlm_RegioN src2, Nlm_RegioN dst)
{
+#ifdef WIN_MAC_QUARTZ
+/* this is actually a general solution, but less efficient
+ Quartz has no choice but to use it since HIShape does not support
+ the xor operation natively
+
+ xor is equivalent to the union minus the intersection, so we do that */
+
+ Nlm_RegioN sum = Nlm_CreateRgn();
+ Nlm_RegioN intersection = Nlm_CreateRgn();
+
+ Nlm_UnionRgn (src1, src2, sum);
+ Nlm_SectRgn (src1, src2, intersection);
+ Nlm_DiffRgn (sum, intersection, dst);
+
+ Nlm_DestroyRgn (sum);
+ Nlm_DestroyRgn (intersection);
+#else
+
Nlm_RgnTool ntool1;
Nlm_RgnTool ntool2;
Nlm_RgnTool ntool3;
@@ -6351,6 +6335,7 @@ extern void Nlm_XorRgn (Nlm_RegioN src1, Nlm_RegioN src2, Nlm_RegioN dst)
XDestroyRegion (temp);
#endif
}
+#endif
}
extern Nlm_Boolean Nlm_EqualRgn (Nlm_RegioN rgn1, Nlm_RegioN rgn2)
@@ -6365,8 +6350,13 @@ extern Nlm_Boolean Nlm_EqualRgn (Nlm_RegioN rgn1, Nlm_RegioN rgn2)
ntool1 = (Nlm_RgnTool) rgn1;
ntool2 = (Nlm_RgnTool) rgn2;
#ifdef WIN_MAC
+#ifdef WIN_MAC_QUARTZ
+ /* HIShapeRefs are CFTypeRefs so we can use CFEqual */
+ rsult = CFEqual (ntool1, ntool2);
+#else
rsult = EqualRgn (ntool1, ntool2);
#endif
+#endif
#ifdef WIN_MSWIN
rsult = (Nlm_Boolean) EqualRgn (ntool1, ntool2);
#endif
@@ -6390,8 +6380,12 @@ extern Nlm_Boolean Nlm_EmptyRgn (Nlm_RegioN rgn)
if (rgn != NULL) {
ntool = (Nlm_RgnTool) rgn;
#ifdef WIN_MAC
+#ifdef WIN_MAC_QUARTZ
+ rsult = HIShapeIsEmpty (ntool);
+#else
rsult = EmptyRgn (ntool);
#endif
+#endif
#ifdef WIN_MSWIN
rsult = (Nlm_Boolean) (GetRgnBox (ntool, &rtool) == NULLREGION);
#endif
@@ -6410,7 +6404,15 @@ extern void Nlm_EraseRgn (Nlm_RegioN rgn)
if (rgn != NULL) {
ntool = (Nlm_RgnTool) rgn;
+#ifdef WIN_MAC_QUARTZ
+ HIShapeReplacePathInCGContext (ntool, Nlm_PeekQContext());
+
+ Nlm_SelectQuartzColor (Nlm_QuartzBackColor);
+ CGContextFillPath (Nlm_PeekQContext());
+ Nlm_SelectQuartzColor (Nlm_QuartzForeColor);
+#else
EraseRgn (ntool);
+#endif
}
#endif
#ifdef WIN_MSWIN
@@ -6433,7 +6435,12 @@ extern void Nlm_FrameRgn (Nlm_RegioN rgn)
if (rgn != NULL) {
ntool = (Nlm_RgnTool) rgn;
+#ifdef WIN_MAC_QUARTZ
+ HIShapeReplacePathInCGContext (ntool, Nlm_PeekQContext());
+ CGContextStrokePath (Nlm_PeekQContext());
+#else
FrameRgn (ntool);
+#endif
}
#endif
#ifdef WIN_MSWIN
@@ -6456,7 +6463,12 @@ extern void Nlm_PaintRgn (Nlm_RegioN rgn)
if (rgn != NULL) {
ntool = (Nlm_RgnTool) rgn;
+#ifdef WIN_MAC_QUARTZ
+ HIShapeReplacePathInCGContext (ntool, Nlm_PeekQContext());
+ CGContextFillPath (Nlm_PeekQContext());
+#else
PaintRgn (ntool);
+#endif
}
#endif
#ifdef WIN_MSWIN
@@ -6484,7 +6496,11 @@ extern void Nlm_InvertRgn (Nlm_RegioN rgn)
if (rgn != NULL) {
ntool = (Nlm_RgnTool) rgn;
+#ifdef WIN_MAC_QUARTZ
+// QUARTZ_FIXME: this operation does not make sense in quartz, what to do?
+#else
InvertRgn (ntool);
+#endif
}
#endif
#ifdef WIN_MSWIN
@@ -6507,7 +6523,16 @@ extern void Nlm_ClipRect (Nlm_RectPtr r)
if (r != NULL) {
Local__RecTToRectTool (r, &rtool);
+#ifdef WIN_MAC_QUARTZ
+ if (Nlm_PeekQContext())
+ {
+ CGRect cgr = Nlm_RecTToCGRect (*r);
+
+ CGContextClipToRect (Nlm_PeekQContext(), cgr);
+ }
+#else
ClipRect (&rtool);
+#endif
}
#endif
#ifdef WIN_MSWIN
@@ -6546,7 +6571,12 @@ extern void Nlm_ClipRgn (Nlm_RegioN rgn)
if (rgn != NULL) {
ntool = (Nlm_RgnTool) rgn;
+#ifdef WIN_MAC_QUARTZ
+ HIShapeReplacePathInCGContext (ntool, Nlm_PeekQContext());
+ CGContextClip (Nlm_PeekQContext());
+#else
SetClip (ntool);
+#endif
}
#endif
#ifdef WIN_MSWIN
@@ -6584,6 +6614,9 @@ extern void Nlm_ResetClip (void)
{
#ifdef WIN_MAC
+#ifdef WIN_MAC_QUARTZ
+// QUARTZ_FIXME: CGContext clips can only contract, not expand, needs to be handled by popping the context, but callers don't know about that... maybe have the global context always be inherently pushed, and this can pop and immediately re-push?
+#else
Nlm_RecT r;
Nlm_RectTool rtool;
@@ -6591,6 +6624,7 @@ extern void Nlm_ResetClip (void)
Local__RecTToRectTool (&r, &rtool);
ClipRect (&rtool);
#endif
+#endif
#ifdef WIN_MSWIN
if (Nlm_currentHDC != NULL) {
SelectClipRgn (Nlm_currentHDC, NULL);
@@ -6611,6 +6645,9 @@ extern void Nlm_ValidRect (Nlm_RectPtr r)
{
#ifdef WIN_MAC
+#ifdef WIN_MAC_QUARTZ
+// QUARTZ_FIXME: do we care? just let it redraw
+#else
Nlm_RectTool rtool;
if (r != NULL) {
@@ -6618,6 +6655,7 @@ extern void Nlm_ValidRect (Nlm_RectPtr r)
ValidRect (&rtool);
}
#endif
+#endif
#ifdef WIN_MSWIN
Nlm_RectTool rtool;
@@ -6634,6 +6672,11 @@ extern void Nlm_InvalRect (Nlm_RectPtr r)
{
#ifdef WIN_MAC
+#ifdef WIN_MAC_QUARTZ
+// QUARTZ_FIXME: this could stand to be a little more fine-grained
+ HIViewRef view = HIViewGetRoot (Nlm_QWindow);
+ HIViewSetNeedsDisplay (view, 1);
+#else
Nlm_RectTool rtool;
if (r != NULL) {
@@ -6641,6 +6684,7 @@ extern void Nlm_InvalRect (Nlm_RectPtr r)
InvalRect (&rtool);
}
#endif
+#endif
#ifdef WIN_MSWIN
Nlm_RectTool rtool;
@@ -6666,7 +6710,11 @@ extern void Nlm_ValidRgn (Nlm_RegioN rgn)
{
#ifdef WIN_MAC
if (rgn != NULL) {
+#ifdef WIN_MAC_QUARTZ
+// QUARTZ_FIXME: do we care? just let it redraw
+#else
ValidRgn ((Nlm_RgnTool) rgn);
+#endif
}
#endif
#ifdef WIN_MSWIN
@@ -6683,7 +6731,13 @@ extern void Nlm_InvalRgn (Nlm_RegioN rgn)
{
#ifdef WIN_MAC
if (rgn != NULL) {
+#ifdef WIN_MAC_QUARTZ
+// QUARTZ_FIXME: this could stand to be a little more fine-grained
+ HIViewRef view = HIViewGetRoot (Nlm_QWindow);
+ HIViewSetNeedsDisplay (view, 1);
+#else
InvalRgn ((Nlm_RgnTool) rgn);
+#endif
}
#endif
#ifdef WIN_MSWIN
@@ -6727,6 +6781,36 @@ extern void Nlm_CopyBits (Nlm_RectPtr r, Nlm_VoidPtr source)
{
#ifdef WIN_MAC
+#ifdef WIN_MAC_QUARTZ
+ CGRect rect = Nlm_RecTToCGRect (*r);
+
+ int width = r->left - r->right;
+ int height = r->bottom - r->top;
+ int bytesPerRow = (width - 1) / 8 + 1;
+
+ CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceGray();
+ CGDataProviderRef dataProvider = CGDataProviderCreateWithData (NULL, source, bytesPerRow * height, NULL);
+
+ CGImageRef image = CGImageCreate (
+ width,
+ height,
+ 1, /* bits per component */
+ 1, /* bits per pixel */
+ bytesPerRow,
+ colorSpace,
+ 0, /* bitmap info */
+ dataProvider,
+ NULL,
+ 1, /* should interpolate */
+ kCGRenderingIntentDefault);
+
+ CGContextDrawImage (Nlm_PeekQContext(), rect, image);
+
+ CFRelease (image);
+ CFRelease (dataProvider);
+ CFRelease (colorSpace);
+
+#else
const BitMap *dstBitsPtr;
Nlm_Int2 mode;
PenState pnState;
@@ -6769,6 +6853,7 @@ extern void Nlm_CopyBits (Nlm_RectPtr r, Nlm_VoidPtr source)
CopyBits (&srcBits, dstBitsPtr, &srcRect, &rect, mode, NULL);
}
#endif
+#endif
#ifdef WIN_MSWIN
Nlm_Int2 cols;
HBITMAP hBitmap;
@@ -6997,6 +7082,41 @@ extern void Nlm_CopyPixmap ( Nlm_RectPtr r, Nlm_Int1Ptr source,
MemFree(bInfoPtr);
#endif
#ifdef WIN_MAC
+#ifdef WIN_MAC_QUARTZ
+ CGRect rect = Nlm_RecTToCGRect (*r);
+
+ width = r->left - r->right;
+ height = r->bottom - r->top;
+
+ CGColorSpaceRef baseSpace = CGColorSpaceCreateDeviceRGB ();
+
+ /* we're going to pass the color table directly; it's an array of
+ structs containing r, g, b, and the function wants an array
+ of unsigned char containing r, g, b, so they all line up */
+ CGColorSpaceRef colorSpace = CGColorSpaceCreateIndexed (baseSpace, totalColors - 1, (const unsigned char *)colorTable);
+
+ CGDataProviderRef dataProvider = CGDataProviderCreateWithData (NULL, source, width * height, NULL);
+
+ CGImageRef image = CGImageCreate (
+ width,
+ height,
+ 8, /* bits per component */
+ 8, /* bits per pixel */
+ width * height,
+ colorSpace,
+ 0, /* bitmap info */
+ dataProvider,
+ NULL,
+ 1, /* should interpolate */
+ kCGRenderingIntentDefault);
+
+ CGContextDrawImage (Nlm_PeekQContext(), rect, image);
+
+ CFRelease (image);
+ CFRelease (dataProvider);
+ CFRelease (colorSpace);
+ CFRelease (baseSpace);
+#else
pixelMap = (PixMap*)MemNew(sizeof(PixMap));
pixelMap->hRes = 72;
pixelMap->vRes = 72;
@@ -7049,6 +7169,7 @@ extern void Nlm_CopyPixmap ( Nlm_RectPtr r, Nlm_Int1Ptr source,
}
MemFree(pixelMap);
#endif
+#endif
#ifdef WIN_MOTIF
{{
@@ -7103,6 +7224,19 @@ extern void Nlm_SetUpDrawingTools (void)
char tmpFontName[256];
+#ifdef WIN_MAC_QUARTZ
+ CGRect r = CGRectMake (-32768, -32768, 65535, 65535);
+ HIShapeRef rectShape = HIShapeCreateWithRect (&r);
+ Nlm_scrollRgn = HIShapeCreateMutableCopy (rectShape);
+ Nlm_updateRgn = HIShapeCreateMutableCopy (rectShape);
+ CFRelease (rectShape);
+
+ /* can't use QuickDraw functions to get the system font,
+ no replacemet available, so just hardcode it */
+ memset ( &fsp, 0, sizeof(Nlm_FontSpec));
+ Nlm_StrCpy (fsp.name, "Lucida Grande");
+ fsp.size = 13;
+#else
Nlm_scrollRgn = (Nlm_RegioN) (NewRgn ());
Nlm_updateRgn = (Nlm_RegioN) (NewRgn ());
@@ -7112,9 +7246,6 @@ extern void Nlm_SetUpDrawingTools (void)
Local__RectToolToRecT (&bounds, &Nlm_updateRect);
/* HUnlock ((Handle) Nlm_updateRgn); */
- Nlm_fontList = NULL;
- Nlm_fontInUse = NULL;
- Nlm_systemFont = (Nlm_FonT) Nlm_HandNew (sizeof (Nlm_FontRec));
/* esl: LoadFontData changed to work with new FontData format */
/* alexs get font name */
memset ( &fsp, 0, sizeof(Nlm_FontSpec));
@@ -7123,6 +7254,12 @@ extern void Nlm_SetUpDrawingTools (void)
Nlm_StringNCpy_0 (fsp.name, tmpFontName, FONT_NAME_SIZE - 1);
fsp.name[FONT_NAME_SIZE - 1] = 0;
fsp.size = GetDefFontSize ();
+#endif
+
+ Nlm_fontList = NULL;
+ Nlm_fontInUse = NULL;
+ Nlm_systemFont = (Nlm_FonT) Nlm_HandNew (sizeof (Nlm_FontRec));
+
#ifdef WIN_MAC_ATSUI
Nlm_LoadFontData (Nlm_systemFont, NULL, -1, &fsp, Nlm_NewATSUStyle(&fsp), NULL);
#else
@@ -7153,12 +7290,21 @@ extern void Nlm_SetUpDrawingTools (void)
Nlm_hasColorQD = (gval && (1 << gestaltHasColor));
}
if (Nlm_hasColorQD) {
+#ifdef WIN_MAC_QUARTZ
+ Nlm_QuartzForeColor.r = 0;
+ Nlm_QuartzForeColor.g = 0;
+ Nlm_QuartzForeColor.b = 0;
+ Nlm_QuartzBackColor.r = 1.0;
+ Nlm_QuartzBackColor.g = 1.0;
+ Nlm_QuartzBackColor.b = 1.0;
+#else
Nlm_RGBforeColor.red = 0;
Nlm_RGBforeColor.green = 0;
Nlm_RGBforeColor.blue = 0;
Nlm_RGBbackColor.red = 65535;
Nlm_RGBbackColor.green = 65535;
Nlm_RGBbackColor.blue = 65535;
+#endif
}
#endif
#ifdef WIN_MSWIN
@@ -7378,7 +7524,9 @@ extern void Nlm_CleanUpDrawingTools (void)
Nlm_FonT f;
Nlm_FontData fdata;
+#ifndef WIN_MAC_QUARTZ
Nlm_ResetDrawingTools ();
+#endif
#ifdef WIN_MOTIF
Nlm_GetFontData (Nlm_systemFont, &fdata);
if (fdata.handle != NULL) {
diff --git a/vibrant/ncbidraw.h b/vibrant/ncbidraw.h
index 2aa41edc..f809bc49 100644
--- a/vibrant/ncbidraw.h
+++ b/vibrant/ncbidraw.h
@@ -29,63 +29,14 @@
*
* Version Creation Date: 1/1/91
*
-* $Revision: 6.9 $
+* $Revision: 6.10 $
*
* File Description:
* Vibrant drawing procedure definitions
*
* Modifications:
* --------------------------------------------------------------------------
-* $Log: ncbidraw.h,v $
-* Revision 6.9 2000/07/08 20:44:13 vakatov
-* Get all "#include" out of the 'extern "C" { }' scope; other cleanup...
*
-* Revision 6.8 2000/01/24 16:11:13 lewisg
-* speed up seqid comparison in color manager, make fast windows version of SetColor()
-*
-* Revision 6.7 1999/10/20 23:10:04 vakatov
-* + Nlm_SetCurrentGIF(), + Nlm_DestroyGIF() proto.
-* Get rid of the (now obsolete) PROTO macro; added more comments.
-*
-* Revision 6.6 1999/10/04 17:16:32 kans
-* include ncbidraw.h instead of vibrant.h, a couple Nlm_ prefixes
-*
-* Revision 6.5 1998/07/14 16:44:26 vakatov
-* Added VibrantIsGUI() and <internal> Nlm_VibrantSetGUI()
-*
-* Revision 6.4 1998/07/01 18:27:42 vakatov
-* Use "const" qualifier somewhere
-*
-* Revision 6.3 1998/06/10 22:05:26 lewisg
-* added PROTO() around *Quadrant()
-*
-* Revision 6.2 1998/06/01 17:20:13 vakatov
-* Added code to draw/fill 90-degree arc/pie (quadrants)
-*
-* Revision 6.1 1997/09/16 20:24:53 vakatov
-* Added Nlm_FitStringWidth()
-*
-* Revision 5.8 1997/07/23 19:42:22 vakatov
-* Added Nlm_PaintStringEx function(text + position)
-*
-* Revision 5.7 1997/07/18 15:18:45 vakatov
-* [!WIN_GIF] +Dummy Nlm_CreateGIF() and Nlm_SaveGIF(); /return FALSE/
-*
-* Revision 5.6 1997/06/18 22:10:10 vakatov
-* [WIN_GIF] Moved Create/SaveGIF() decl. from "ncbigif.h" to "ncbidraw.h"
-*
-* Revision 5.2 1997/06/04 00:05:20 kans
-* support for Japanese by Tomo Koike of DDBJ
-*
-* Revision 5.1 1996/09/30 19:56:00 vakatov
-* + Nlm_SetPenDash PROTO and synopsis
-*
-* Revision 4.1 1996/05/10 21:14:21 vakatov
-* Added UpdateColorTable() function to allow the user to read his color
-* preferencies from an external config.-file
-*
-* Revision 2.12 1995/07/14 17:48:26 kans
-* new CopyPixmap (AS)
* ==========================================================================
*/
@@ -309,6 +260,7 @@ size_t Nlm_FitStringWidth(const Nlm_Char PNTR str, Nlm_Int4 max_width);
void Nlm_SetPen(Nlm_PoinT pt);
void Nlm_GetPen(Nlm_PointPtr pt);
+void Nlm_SetPenWidth(Nlm_Int2 width);
void Nlm_PaintChar(Nlm_Char ch);
void Nlm_PaintString(Nlm_CharPtr text);
diff --git a/vibrant/ncbiport.h b/vibrant/ncbiport.h
index 69b70984..ff0b08cf 100644
--- a/vibrant/ncbiport.h
+++ b/vibrant/ncbiport.h
@@ -29,7 +29,7 @@
*
* Version Creation Date: 1/1/91
*
-* $Revision: 6.1 $
+* $Revision: 6.2 $
*
* File Description:
* Vibrant drawing port specification definitions
@@ -39,32 +39,6 @@
* Date Name Description of modification
* ------- ---------- -----------------------------------------------------
*
-*
-* $Log: ncbiport.h,v $
-* Revision 6.1 2007/05/01 22:01:30 kans
-* changes in preparation for supporing Quartz on Macintosh
-*
-* Revision 6.0 1997/08/25 18:56:09 madden
-* Revision changed to 6.0
-*
-* Revision 5.2 1997/07/10 21:49:27 vakatov
-* [WIN_X] Now able to manage windows having different depths(and
-* different visuals and GC).
-*
-* Revision 5.1 1997/06/18 19:46:32 vakatov
-* [WIN_GIF] Do not use WIN_MAC/MSWIN/MOTIF-specific fields of the
-* Nlm_FontRec struct.
-*
-* Revision 5.0 1996/05/28 13:45:08 ostell
-* Set to revision 5.0
-*
- * Revision 4.0 1995/07/26 13:51:04 ostell
- * force revision to 4.0
- *
- * Revision 2.6 1995/05/17 15:15:14 kans
- * added Log line
- *
-*
* ==========================================================================
*/
@@ -85,15 +59,27 @@
extern "C" {
#endif
+/* Quartz requires ATSUI, so ensure that the dependency is filled */
+#if defined(WIN_MAC_QUARTZ) && !defined(WIN_MAC_ATSUI)
+#define WIN_MAC_ATSUI
+#endif
+
#ifdef WIN_MAC
#define Nlm_PointTool Point
#define Nlm_RectTool Rect
+
+#ifdef WIN_MAC_QUARTZ
+#define Nlm_RgnTool HIMutableShapeRef
+#else
#define Nlm_RgnTool RgnHandle
+#endif
+
#ifdef WIN_MAC_ATSUI
#define Nlm_FontTool ATSUStyle
#else
#define Nlm_FontTool Nlm_Handle
#endif
+
#endif
#ifdef WIN_MSWIN
@@ -135,11 +121,21 @@ typedef struct Nlm_fontrec {
extern Nlm_Boolean Nlm_nowPrinting;
#ifdef WIN_MAC
-extern RGBColor Nlm_RGBforeColor;
-extern RGBColor Nlm_RGBbackColor;
-extern Nlm_Boolean Nlm_hasColorQD;
+#ifdef WIN_MAC_QUARTZ
+
+typedef struct {
+ float r, g, b;
+} Nlm_QuartzColor;
+extern Nlm_QuartzColor Nlm_QuartzForeColor;
+extern Nlm_QuartzColor Nlm_QuartzBackColor;
+extern Nlm_Boolean Nlm_hasColorQD;
+#else
+extern RGBColor Nlm_RGBforeColor;
+extern RGBColor Nlm_RGBbackColor;
+extern Nlm_Boolean Nlm_hasColorQD;
#endif
-
+#endif
+
#ifdef WIN_MSWIN
extern HWND Nlm_currentHWnd;
extern HDC Nlm_currentHDC;
@@ -159,8 +155,19 @@ extern Nlm_Boolean Nlm_hasColor;
#endif
#ifdef WIN_MAC
+#ifdef WIN_MAC_QUARTZ
+void Nlm_SetPort PROTO((CGContextRef ctx));
+void Nlm_PushPort PROTO((CGContextRef ctx));
+CGContextRef Nlm_PopPort PROTO((void));
+CGContextRef Nlm_GetQuartzWindowPort PROTO((WindowRef wptr));
+WindowRef Nlm_GetQuartzCurrentWindow PROTO((void));
+void Nlm_SetGraphicNeedsDisplay PROTO((Nlm_GraphiC graphic));
+#else
void Nlm_SetPort PROTO((GrafPtr grafptr));
+#endif
void Nlm_SetPortWindowPort PROTO((WindowPtr wptr));
+
+
#endif
#ifdef WIN_MSWIN
diff --git a/vibrant/vibbutns.c b/vibrant/vibbutns.c
index f84d188b..bb934cf9 100644
--- a/vibrant/vibbutns.c
+++ b/vibrant/vibbutns.c
@@ -29,7 +29,7 @@
*
* Version Creation Date: 7/1/91
*
-* $Revision: 6.12 $
+* $Revision: 6.13 $
*
* File Description:
* Vibrant button functions
@@ -39,108 +39,6 @@
* Date Name Description of modification
* ------- ---------- -----------------------------------------------------
*
-*
-* $Log: vibbutns.c,v $
-* Revision 6.12 2007/05/01 22:01:30 kans
-* changes in preparation for supporing Quartz on Macintosh
-*
-* Revision 6.11 2006/09/14 19:18:28 ivanov
-* Rollback last changes. All missed defines added to corelib/ncbiwin.h.
-*
-* Revision 6.10 2006/09/14 18:05:45 ivanov
-* Fixed compilation errors on MS Windows
-*
-* Revision 6.9 2006/09/14 14:45:38 kans
-* changes for 64-bit Windows (GC) plus a few CodeWarrior complaints (JK)
-*
-* Revision 6.8 2004/01/20 23:34:38 sinyakov
-* [WIN_MSWIN]: fixed to display '&' character in button text
-*
-* Revision 6.7 2002/03/07 19:18:21 kans
-* check box wid += 4 for Aqua
-*
-* Revision 6.6 2002/02/05 14:02:28 kans
-* adjust push button margins in Mac OS X Aqua
-*
-* Revision 6.5 2002/01/09 23:22:02 juran
-* Make buttons wider in Aqua.
-*
-* Revision 6.4 2000/02/07 20:17:35 lewisg
-* minor bug fixes, use gui font for win32
-*
-* Revision 6.3 1999/10/19 12:48:19 thiessen
-* minor hack to Nlm_RemoveDefaultButton to allow Cn3D to run under RH linux 6 with Lesstif library
-*
-* Revision 6.2 1997/12/12 21:08:28 kans
-* a number of symbols changed in the latest CodeWarrior release, now using headers from Apple
-*
-* Revision 6.1 1997/11/26 21:30:11 vakatov
-* Fixed errors and warnings issued by C and C++ (GNU and Sun) compilers
-*
-* Revision 6.0 1997/08/25 18:56:47 madden
-* Revision changed to 6.0
-*
-* Revision 5.6 1997/08/18 14:47:30 vakatov
-* [WIN_MOTIF] Minor fix: Push/DefaultButton position adjustment
-*
-* Revision 5.5 1997/04/25 16:14:38 vakatov
-* [WIN_MOTIF,WIN_MSWIN] Catch and render(DoSendFocus) navigation key events
-*
- * Revision 5.4 1997/01/29 16:41:22 kans
- * using StringNCpy_0
- *
- * Revision 5.3 1996/07/03 18:55:16 vakatov
- * [WIN-MOTIF] Let the MOTIF calculate the button's initial size automatically
- * (i.e. according to the MOTIF internal rules) rather than try to calculate
- * the button size using a vague guess on the used font size and the title length
- *
- * Revision 5.2 1996/06/11 16:06:10 vakatov
- * [WIN_MOTIF] PushButton location/sizing adjustment
- *
- * Revision 5.1 1996/06/07 21:53:28 vakatov
- * [WIN_MOTIF] Default-/Push- buttons size alignment; DefaultButton is not
- * mandatory the first button in the group
- *
- * Revision 5.0 1996/05/28 13:45:08 ostell
- * Set to revision 5.0
- *
- * Revision 4.8 1996/05/20 21:33:39 vakatov
- * [WIN_MOTIF] All "Widget" / "NULL" comparisons and assignments replaced
- * by the "Widget" / "(Widget)0" these
- *
- * Revision 4.7 1996/05/06 19:20:51 vakatov
- * [WIN_MOTIF] Nlm_SetButtonPosition() -- additional adjustment
- *
- * Revision 4.6 1996/05/06 19:06:07 kans
- * ifdef motif and prototype needed for newest functions
- *
- * Revision 4.5 1996/05/06 18:27:20 vakatov
- * Nlm_RemoveDefaultButton() corrected (set default button to NULL);
- * Nlm_SetButtonDefault() added to allow change button's "defaultBtn" flag;
- * [WIN_MOTIF] Nlm_PendingDefButton() trick-function added to avoid a strange
- * PushButton/DefaultButton size interference
- *
- * Revision 4.4 1996/04/30 21:50:03 vakatov
- * Since now push-buttons belonging to a group containing default button
- * have of the same size as if they were belonging to a group without a
- * default button (WIN_MOTIF feature only)
- *
- * Revision 4.3 1996/03/02 22:36:38 kans
- * reduction of X traffic (DV)
- *
- * Revision 4.2 1996/02/13 17:24:07 kans
- * accelerated set position prior to realization (Denis Vakatov)
- *
- * Revision 4.1 1995/12/25 16:03:50 kans
- * removed offset parameter for Motif push buttons
- *
- * Revision 4.0 1995/07/26 13:51:04 ostell
- * force revision to 4.0
- *
- * Revision 2.13 1995/05/17 15:15:14 kans
- * added Log line
- *
-*
* ==========================================================================
*/
@@ -513,9 +411,9 @@ static void Nlm_DrawDefault (Nlm_GraphiC b)
Nlm_GetRect (b, &r);
Nlm_InsetRect (&r, -4, -4);
if (Nlm_RectInRgn (&r, Nlm_updateRgn)) {
- PenSize (3, 3);
+ Nlm_SetPenWidth (3);
Nlm_FrameRoundRect (&r, 16, 16);
- PenNormal ();
+ Nlm_SetPenWidth (1);
c = Nlm_GetButtonHandle ((Nlm_ButtoN) b);
Draw1Control (c);
}
diff --git a/vibrant/vibincld.h b/vibrant/vibincld.h
index 7849cece..141b1194 100644
--- a/vibrant/vibincld.h
+++ b/vibrant/vibincld.h
@@ -29,7 +29,7 @@
*
* Version Creation Date: 7/1/91
*
-* $Revision: 6.7 $
+* $Revision: 6.8 $
*
* File Description:
* Vibrant inclusion of underlying windowing system toolbox functions,
@@ -41,86 +41,6 @@
* Date Name Description of modification
* ------- ---------- -----------------------------------------------------
*
-*
-* $Log: vibincld.h,v $
-* Revision 6.7 2007/05/01 22:01:30 kans
-* changes in preparation for supporing Quartz on Macintosh
-*
-* Revision 6.6 2006/11/24 20:06:31 kans
-* include Carbon/Carbon.h if not MWERKS - attempting to simplify Xcode search paths
-*
-* Revision 6.5 2002/06/13 16:15:13 kans
-* fix includes for OS_UNIX_DARWIN with WIN_MAC (EN) - still bug in vibutils.c file dialog
-*
-* Revision 6.4 2000/07/08 20:44:14 vakatov
-* Get all "#include" out of the 'extern "C" { }' scope; other cleanup...
-*
-* Revision 6.3 1999/06/22 15:14:54 lewisg
-* fix image library so that works on linux with > 8 bits
-*
-* Revision 6.2 1999/04/06 14:23:25 lewisg
-* add opengl replacement for viewer3d
-*
-* Revision 6.1 1998/07/14 16:44:27 vakatov
-* Added VibrantIsGUI() and <internal> Nlm_VibrantSetGUI()
-*
-* Revision 6.0 1997/08/25 18:57:08 madden
-* Revision changed to 6.0
-*
-* Revision 5.9 1997/07/23 19:36:12 vakatov
-* [WIN_MSWIN] +Nlm_GetPicWinHDC proto
-*
-* Revision 5.8 1997/07/10 21:49:30 vakatov
-* [WIN_X] Now able to manage windows having different depths(and
-* different visuals and GC).
-*
-* Revision 5.7 1997/06/09 18:07:39 vakatov
-* Removed "Nlm_fontList" declaration(it's now static in "ncbidraw.c")
-* [WIN_MOTIF] Added Nlm_XAllocColor() prototype
-*
-* Revision 5.6 1997/04/25 16:09:33 vakatov
-* [WIN_MOTIF,WIN_MSWIN] Added functions to catch, convert(to Mac keycodes)
-* and process navigation and special keys
-*
- * Revision 5.5 1997/04/17 16:17:50 kans
- * InitForms and FreeForms added
- *
- * Revision 5.4 1997/02/13 21:34:37 vakatov
- * [WIN_MOTIF] #define NLM_MOTIF_CASCADEB_BUG -- workaround the Motif bug
- *
- * Revision 5.3 1997/01/28 22:03:51 kans
- * changed <GestaltEqu.h> to <Gestalt.h> for CodeWarrior
- *
- * Revision 5.2 1996/10/28 19:31:19 vakatov
- * [WIN_MOTIF] Added prototypes for functions Nlm_VibrantDefaultColormap()
- * and Nlm_XrmGetResource()
- *
- * Revision 5.1 1996/08/27 20:52:53 vakatov
- * Added Nlm_HorizScrollBar4() and Nlm_VertScrollBar4() prototypes -- to
- * create Int4-range scrollbars
- *
- * Revision 5.0 1996/05/28 13:45:08 ostell
- * Set to revision 5.0
- *
- * Revision 4.2 1996/03/12 22:34:37 epstein
- * add shellapi for Drag-And-Drop support
- *
- * Revision 4.1 1996/02/13 17:24:07 kans
- * accelerated set position prior to realization (Denis Vakatov)
- *
- * Revision 4.0 1995/07/26 13:51:04 ostell
- * force revision to 4.0
- *
- * Revision 2.21 1995/07/17 22:02:19 kans
- * Motif clipboard cut and paste supported (AS)
- *
- * Revision 2.20 1995/05/31 18:00:58 kans
- * added <Palettes.h>
- *
- * Revision 2.19 1995/05/17 15:15:14 kans
- * added Log line
- *
-*
* ==========================================================================
*/
@@ -144,9 +64,15 @@ extern "C" {
#define Nlm_HandleTool Handle
#define Nlm_PointTool Point
#define Nlm_RectTool Rect
+
+#ifdef WIN_MAC_QUARTZ
+#define Nlm_RgnTool HIMutableShapeRef
+#else
#define Nlm_RgnTool RgnHandle
#endif
+#endif
+
#ifdef WIN_MSWIN
#define Nlm_HandleTool HANDLE
#define Nlm_PointTool POINT
@@ -288,13 +214,21 @@ typedef struct Nlm_boxrec {
-#if defined(WIN_MAC) || defined(WIN_MAC_QUARTZ)
+#if defined(WIN_MAC)
+#if defined(WIN_MAC_QUARTZ)
+#define Nlm_WindowTool WindowPtr
+#define Nlm_PortTool CGContextRef
+#define Nlm_ShellTool Nlm_Handle
+#define Nlm_MainTool Nlm_Handle
+#define Nlm_ColorMTool PaletteHandle
+#else
#define Nlm_WindowTool WindowPtr
#define Nlm_PortTool GrafPtr
#define Nlm_ShellTool Nlm_Handle
#define Nlm_MainTool Nlm_Handle
#define Nlm_ColorMTool PaletteHandle
#endif
+#endif
#ifdef WIN_MSWIN
#define Nlm_WindowTool HWND
@@ -527,8 +461,10 @@ void Nlm_GlobalToLocal PROTO((Nlm_PointPtr pt));
void Nlm_VibrantSetGUI PROTO((void));
#if defined(WIN_MAC) && defined(WIN_MAC_QUARTZ)
-CGRect Nlm_RecTToCGRect(Nlm_RectPtr r);
+CGRect Nlm_RecTToCGRect(Nlm_RecT r);
Nlm_RecT Nlm_CGRectToRecT(CGRect cgr);
+CGRect Nlm_RectQDToCG(Rect r);
+Rect Nlm_RectCGToQD(CGRect r);
CGPoint Nlm_PoinTToCGPoint(Nlm_PoinT np);
Nlm_PoinT Nlm_CGPointToPoinT(CGPoint qp);
#endif
diff --git a/vibrant/vibmenus.c b/vibrant/vibmenus.c
index e190d6a6..0026a1bf 100644
--- a/vibrant/vibmenus.c
+++ b/vibrant/vibmenus.c
@@ -29,250 +29,14 @@
*
* Version Creation Date: 7/1/91
*
-* $Revision: 6.25 $
+* $Revision: 6.26 $
*
* File Description:
* Vibrant menu functions
*
* Modifications:
* --------------------------------------------------------------------------
-* $Log: vibmenus.c,v $
-* Revision 6.25 2007/03/13 13:33:13 bollin
-* Initialize variables before they are used.
*
-* Revision 6.24 2006/09/14 19:18:29 ivanov
-* Rollback last changes. All missed defines added to corelib/ncbiwin.h.
-*
-* Revision 6.23 2006/09/14 18:05:45 ivanov
-* Fixed compilation errors on MS Windows
-*
-* Revision 6.22 2006/09/14 14:45:38 kans
-* changes for 64-bit Windows (GC) plus a few CodeWarrior complaints (JK)
-*
-* Revision 6.21 2005/11/30 20:19:27 rsmith
-* Update Mac API to fix hier-menus.
-*
-* Revision 6.20 2005/07/18 15:15:18 kans
-* fixed minor xcode compiler warnings
-*
-* Revision 6.19 2004/04/01 13:43:09 lavr
-* Spell "occurred", "occurrence", and "occurring"
-*
-* Revision 6.18 2004/01/20 23:35:38 sinyakov
-* [WIN_MSWIN] implemented menu accelerators
-*
-* Revision 6.17 2003/11/17 17:03:30 kans
-* changed C++ style comments to C comments
-*
-* Revision 6.16 2003/03/27 19:35:43 kans
-* Nlm_PrepareTitle removes non-Mac accelerator from Mac menu item
-*
-* Revision 6.15 2002/03/28 13:30:27 kans
-* check for OS_UNIX_DARWIN before including MoreCarbonAccessors.h, Profiler.h (EN)
-*
-* Revision 6.14 2002/01/09 15:23:53 kans
-* added HasAquaMenuLayout
-*
-* Revision 6.13 2001/05/17 22:04:26 kans
-* separator item in mswin creates a fake status item link, so GetChildPosition is correct, and thus later submenus have the correct position for enabling and disabling
-*
-* Revision 6.12 2001/04/03 22:10:19 juran
-* Carbon fixes.
-*
-* Revision 6.11 2001/01/24 18:43:00 kans
-* remove artifact bar caused by popup label on Solaris (TF)
-*
-* Revision 6.10 2000/02/07 20:17:35 lewisg
-* minor bug fixes, use gui font for win32
-*
-* Revision 6.9 1999/12/30 16:47:09 kans
-* Carbon changes (Churchill)
-*
-* Revision 6.8 1999/04/22 15:18:57 vakatov
-* Call XtUnrealizeWidget() before XtDestroyWidget() to make sure no
-* "post-mortem" callbacks(registered by XtAddEventHandler()) get
-* triggered for the destroyed widget. Reason: the widget may not be
-* immediately destroyed if XtDestroyWidget() was called in a nested
-* event dispatch loop.
-*
-* Revision 6.7 1999/03/09 17:55:48 vakatov
-* [WIN_MOTIF] Fixed for the ">63 items menu overflow" in
-* Nlm_AppendChoice() and Nlm_AppendOnePopListChoice()
-*
-* Revision 6.6 1999/02/08 15:46:55 vakatov
-* [WIN_MOTIF] Nlm_SetPopListValue() catch(and just ignore) attempts to
-* se a value larger than 63
-*
-* Revision 6.5 1997/12/12 21:08:35 kans
-* a number of symbols changed in the latest CodeWarrior release, now using headers from Apple
-*
-* Revision 6.4 1997/11/26 21:30:26 vakatov
-* Fixed errors and warnings issued by C and C++ (GNU and Sun) compilers
-*
-* Revision 6.3 1997/10/08 18:43:58 vakatov
-* [WIN_MOTIF] Nlm_ResetMenu() -- remove separator items too
-*
-* Revision 6.2 1997/10/01 17:08:04 vakatov
-* [WIN_MSWIN, WIN_MOTIF] RemoveSubMenu() -- set parent's "submenu" to NULL
-*
-* Revision 6.1 1997/09/30 16:39:04 vakatov
-* [WIN_MOTIF] ResetMenu() -- check for NULL(ch.group) item;; destroy
-* items in RemoveChoiceGroup()
-*
-* Revision 5.28 1997/07/10 21:49:32 vakatov
-* [WIN_X] Now able to manage windows having different depths(and
-* different visuals and GC).
-*
-* Revision 5.27 1997/06/04 18:25:22 vakatov
-* [WIN_MOTIF] Added accelerators to PopupList items
-*
-* Revision 5.26 1997/05/12 19:01:57 vakatov
-* Disable and gray out the PopupList's cascade button properly;
-* [WIN_MOTIF] disable accelerators and mnemonics in the PopupList menu
-* when the menu is disabled
-*
-* Revision 5.25 1997/04/25 19:52:22 kans
-* mac submenus call prepare title
-*
- * Revision 5.24 1997/04/25 16:13:27 vakatov
- * [WIN_MOTIF,WIN_MSWIN] Catch and render(DoSendFocus) navigation key events
- * occurred in PopupList
- *
- * Revision 5.23 1997/04/18 22:17:49 vakatov
- * New way of specifying mnemonics/accelerators in the item(or menu) title:
- * use 1st sybbol after '/' for WIN_MAC; 2nd -- for WIN_MOTIF & WIN_MSWIN
- * mnemonic; 3rd -- for WIN_MOTIF accelerator.
- * [WIN_MOTIF] Added mnemonics for PopupList items.
- *
- * Revision 5.22 1997/04/10 21:35:38 vakatov
- * [WIN_MOTIF] Implemented the mnemonic and accelerator key functionality
- * for menus and popup lists.
- * [WIN_MSWIN] Impl. mnemonic keys for submenu cascade items. +typecasting.
- *
- * Revision 5.21 1997/02/13 22:32:59 vakatov
- * [WIN_MOTIF] In addition to R5.17 -- (1) do not destroy CascadeButtons
- * at all; (2) do these workarounds only if the preprocessor
- * variable NLM_MOTIF_CASCADEB_BUG is set (see in <vibincld.h>)
- *
- * Revision 5.20 1997/01/28 19:07:39 vakatov
- * [WIN_MOTIF] Nlm_ResetMenu() -- got rid of an unallocated memory read
- *
- * Revision 5.19 1997/01/27 20:13:41 vakatov
- * [WIN_MOTIF] Nlm_RemovePopupList(): remove colormap-change event handler --
- * to ignore events coming from the dangling shell(see "vibwndws.c" R5.38)
- *
- * Revision 5.18 1997/01/14 22:02:07 vakatov
- * Fixed inaccurate string copying -- <mostly potential> 1-byte exceeding of
- * the string size by StringNCat; missing terminating '\0' by StringNCpy.
- * Removed some unused variables; set preprocessor conditions more
- * thoroughly to exclude some functions from the compilation on some platforms.
- *
- * Revision 5.17 1997/01/03 21:45:37 vakatov
- * [WIN_MOTIF] Unmanage(rather than destroy completely) menubar and its
- * cascade buttons to workaround the MOTIF/X11 "double memory freeing" quirk
- * (a "pure" simplest non-Vibrant MOTIF/X11 code also goes to the same bug).
- *
- * Revision 5.16 1996/11/18 20:52:41 vakatov
- * [WIN_MSWIN] Allowed enabling/disabling of submenus and removing
- * of(top-level, menubar-attached only!) pulldown menus
- *
- * Revision 5.15 1996/11/08 16:54:07 vakatov
- * [WIN_MAC] RemoveMenuItemButNotSub(): now we can remove the submenu(J.Kans);
- * The problems were caused by a bug in "vibutils":Nlm_RemoveLink(), now
- * fixed(in Revision 5.7)
- *
- * Revision 5.14 1996/10/28 19:34:30 vakatov
- * [WIN_MOTIF] Use Nlm_VibrantDefaultColormap() instead of the display
- * default colormap everywhere in the color handling code.
- * Made a lot of type castings to get rid of all compiler warnings.
- *
- * Revision 5.13 1996/10/10 20:22:17 vakatov
- * [WIN_MOTIF] Rewrote Nlm_ResetPopList() function to avoid unexpected
- * displaying of popup-list on reset; also got rid of the unnecessary
- * destroying and further re-creating of underlying widgets and data
- *
- * Revision 5.12 1996/10/04 23:38:19 kans
- * added Nlm_RemoveMenuItemButNotSub to prevent double removal of submenus
- * in windows. this is tricky code, since submenus must really be installed
- * in the desktop menu bar, but attached to a menu item with the label. this
- * change fixes a crash when a window containing a window submenu was removed,
- * but there may be uncollected garbage.
- *
- * Revision 5.11 1996/09/04 18:05:54 vakatov
- * [WIN_MOTIF] PopupList & its Items:: prohibited automatic(Motif-initiated)
- * size change; PopupList cascade button oversize:: increased from 48 to 52
- * pixels
- *
- * Revision 5.10 1996/07/26 18:12:28 kans
- * Colormap is Motif only
- *
- * Revision 5.9 1996/07/26 18:05:44 vakatov
- * [WIN_MOTIF] Explicitly set colormaps for all pulldown menus;
- * changed the colormap switching method for the option menus
- * (to fit the LINUX/MOO-TIFF "features")
- *
- * Revision 5.8 1996/07/23 21:20:14 vakatov
- * [WIN_MOTIF] Do not delay the pop-up(/down) menus realization as it
- * results in problems on SUN_OS and SGI4
- *
- * Revision 5.7 1996/07/09 20:29:10 vakatov
- * [WIN_MOTIF] [OS_UNIX_SUN] (see Revision 4.7 log) -- the same quirk is
- * for the XmPulldownMenu -- fixed
- *
- * Revision 5.6 1996/07/03 20:23:04 kans
- * don't extend margins everywhere - popups got enlarged improperly
- *
- * Revision 5.5 1996/07/03 19:42:37 kans
- * set margin height and width now that resize is automatic
- *
- * Revision 5.4 1996/07/03 16:57:13 vakatov
- * Menu items are allowed to change their size to fit a new title
- *
- * Revision 5.3 1996/06/20 18:19:14 kans
- * submenu before pulldown menu prevented notJustSubMenu from being set
- *
- * Revision 5.2 1996/06/20 17:03:52 kans
- * [WIN_MAC] if desktop menu bar created by submenu only, won't look for
- * command key accelerator (MenuKey call with no menus corrupted system)
- *
- * Revision 5.1 1996/06/14 14:31:24 vakatov
- * [WIN_MOTIF] Added focus on/off event handler(new function MenuShellFocusCB)
- * to the OptionList's(ad hoc) menu shell -- to keep fixed colormap there
- *
- * Revision 4.9 1996/04/25 16:42:05 kans
- * removed Nlm_WindowMenuBarKey, which caused a crash
- *
- * Revision 4.8 1996/04/25 14:13:50 kans
- * removed Nlm_PopListKey, which caused a crash if no menus in program
- *
- * Revision 4.7 1996/03/27 19:29:51 vakatov
- * OS_UNIX_SUN quirk causing incorrect delayed realization of
- * XmOptionMenu, is fixed
- *
- * Revision 4.6 1996/03/05 19:59:08 epstein
- * fix call to XtSetSensitive()
- *
- * Revision 4.5 1996/03/02 22:36:38 kans
- * reduction of X traffic (DV)
- *
- * Revision 4.4 1996/02/13 17:24:07 kans
- * accelerated set position prior to realization (Denis Vakatov)
- *
- * Revision 4.3 1996/01/10 18:25:01 smirnov
- * AS: add Enable / Disable function for X11 popup.
- *
- * Revision 4.2 1995/12/25 16:03:50 kans
- * popup menu height now always Nlm_popupMenuHeight
- *
- * Revision 4.1 1995/11/27 15:13:41 kans
- * ResetMenu implementation for Windows and Motif (VL)
- *
- * Revision 4.0 1995/07/26 13:51:04 ostell
- * force revision to 4.0
- *
- * Revision 2.29 1995/07/19 20:42:23 kans
- * window rectangle takes Motif menu bar height into account
- *
* ==========================================================================
*/
@@ -1746,13 +1510,13 @@ static void Nlm_DrawWindowMenuBar (Nlm_GraphiC mb)
Rect bounds;
wptr = Nlm_ParentWindowPtr (mb);
- GetPortBounds(GetWindowPort(wptr), &bounds);
+ GetWindowPortBounds(wptr, &bounds);
Nlm_RectToolToRecT (&bounds, &r);
r.top = 19;
r.bottom = 21;
if (Nlm_RectInRgn (&r, Nlm_updateRgn)) {
- MoveTo (0, 20);
- LineTo (r.right, 20);
+ Nlm_MoveTo (0, 20);
+ Nlm_LineTo (r.right, 20);
}
m = (Nlm_MenU) Nlm_GetChild (mb);
while (m != NULL) {
@@ -1857,8 +1621,12 @@ static void Nlm_ShowWindowMenuBar (Nlm_GraphiC mb, Nlm_Boolean setFlag, Nlm_Bool
tempPort = Nlm_SavePortIfNeeded (mb, savePort);
Nlm_SetVisible (mb, TRUE);
#ifdef WIN_MAC
+#ifdef WIN_MAC_QUARTZ
+ Nlm_SetGraphicNeedsDisplay (mb);
+#else
Nlm_DoDraw (mb);
#endif
+#endif
#ifdef WIN_MSWIN
wptr = Nlm_ParentWindowPtr (mb);
DrawMenuBar (wptr);
@@ -1992,9 +1760,11 @@ static void Nlm_HidePulldown (Nlm_GraphiC m, Nlm_Boolean setFlag, Nlm_Boolean sa
tempPort = Nlm_SavePortIfNeeded (m, savePort);
Nlm_SetVisible (m, FALSE);
+#ifndef WIN_MAC_QUARTZ
Nlm_GetRect (m, &r);
Nlm_EraseRect (&r);
Nlm_ValidRect (&r);
+#endif
Nlm_RestorePort (tempPort);
#endif
}
diff --git a/vibrant/vibprocs.h b/vibrant/vibprocs.h
index 616b745d..f019069c 100644
--- a/vibrant/vibprocs.h
+++ b/vibrant/vibprocs.h
@@ -29,200 +29,13 @@
*
* Version Creation Date: 7/1/91
*
-* $Revision: 6.32 $
+* $Revision: 6.33 $
*
* File Description:
* Vibrant procedure definitions
*
* Modifications:
* --------------------------------------------------------------------------
-* $Log: vibprocs.h,v $
-* Revision 6.32 2007/05/01 22:01:30 kans
-* changes in preparation for supporing Quartz on Macintosh
-*
-* Revision 6.31 2006/09/27 18:30:00 kans
-* support for Int4 scroll bars for switching between text and doc views in Sequin (CB)
-*
-* Revision 6.30 2005/09/23 20:30:10 kans
-* added NLM_BACK for backspace key, which is separate from delete, even though the label may be the same on a keyboard
-*
-* Revision 6.29 2005/01/24 15:01:25 kans
-* prototype UsePrimaryMonitor
-*
-* Revision 6.28 2004/04/01 13:43:09 lavr
-* Spell "occurred", "occurrence", and "occurring"
-*
-* Revision 6.27 2004/02/23 16:36:51 sinyakov
-* Use Int4 instead of Int2 for cursor position and text selection in text boxes
-*
-* Revision 6.26 2004/02/12 20:05:26 bazhin
-* Added callback function "Nlm_SetKeepCrNlTextFieldCallback(Nlm_TexT t)",
-* which allows to copy-paste texts from multiple columns to single string.
-*
-* Revision 6.25 2004/02/05 16:25:06 kans
-* revert to Nlm_GetTextVScrollBar and Nlm_GetTextHScrollBar being static, implement setOffset and getOffset for scroll text, since Windows scroll text has its own scroll bar
-*
-* Revision 6.24 2004/02/04 15:21:02 kans
-* make GetTextVScrollBar and GetTextHScrollBar extern, to add search function to general text viewer
-*
-* Revision 6.23 2004/01/05 17:08:09 kans
-* added functions to control use of dual screens
-*
-* Revision 6.22 2003/10/29 19:19:34 kans
-* added prototype for Nlm_SetTextColor
-*
-* Revision 6.21 2002/04/30 18:25:12 bazhin
-* Added function "Nlm_SetWindowConfigureCallback(WindoW w)", which
-* allows to catch events, when window just moved without resizing.
-* Fixed some "gcc -Wall -ansi" warnings.
-*
-* Revision 6.20 2002/01/09 15:23:54 kans
-* added HasAquaMenuLayout
-*
-* Revision 6.19 2001/09/10 17:34:33 bazhin
-* Added function Nlm_SetTextCursorBlinkRate(Nlm_TexT t, Nlm_Int2 msec).
-*
-* Revision 6.18 2000/08/01 15:57:32 kans
-* separate lines for Nlm_HANDLE on all platforms, even if two are currently the same, and no space between # and define in case some compilers complain
-*
-* Revision 6.17 2000/08/01 15:23:29 vakatov
-* Addition to R6.13: error if neither of "WIN_***" is #defined
-*
-* Revision 6.16 2000/07/31 13:28:46 lewisg
-* Nlm_GetExecPath
-*
-* Revision 6.15 2000/07/28 21:25:11 lewisg
-* *** empty log message ***
-*
-* Revision 6.14 2000/07/28 21:05:54 lewisg
-* more c++ fixes
-*
-* Revision 6.13 2000/07/28 15:36:34 kans
-* for OS_UNIX, give error message if WIN_MOTIF not defined
-*
-* Revision 6.12 2000/07/25 21:19:00 lewisg
-* eliminate redundant windows pathname code
-*
-* Revision 6.11 2000/07/25 19:18:36 lewisg
-* get pathname for executable on windows
-*
-* Revision 6.10 2000/07/14 20:30:40 kans
-* added Nlm_MSWin_OpenApplication (for launching Cn3D with a data file)
-*
-* Revision 6.9 1999/04/06 14:23:26 lewisg
-* add opengl replacement for viewer3d
-*
-* Revision 6.8 1999/02/19 20:48:36 vakatov
-* [WIN_MSWIN] Added Nlm_MSWin_OpenDocument(also can be used to
-* auto-launch IE or Netscape if passed an URL)
-*
-* Revision 6.7 1999/01/07 22:32:36 kans
-* added Mac-specific Nlm_SendURLAppleEvent
-*
-* Revision 6.6 1998/07/07 23:03:34 vakatov
-* Added Nlm_Execv() to spawn applications with cmd-line parameters;
-* now implemented for [OS_MSWIN, OS_UNIX].
-*
-* Revision 6.5 1998/03/22 03:00:59 kans
-* changed names to RegisterServiceProc and RegisterResultProc
-*
-* Revision 6.4 1998/03/22 02:33:17 kans
-* added request proc, result proc, message handlers to support, and send open doc event, launch app now work with file names or signatures
-*
-* Revision 6.3 1998/03/17 21:07:59 kans
-* added Nlm_SendOpenDocAppleEventEx, and private Nlm_LaunchAppEx
-*
-* Revision 6.2 1997/11/12 20:56:09 kans
-* added SetMouseMoveCallback and SetMouseMoveRegion, implemented first on Mac
-*
-* Revision 6.1 1997/10/18 23:30:21 kans
-* implemented Nlm_GetTextCursorPos (DV)
-*
-* Revision 6.0 1997/08/25 18:57:29 madden
-* Revision changed to 6.0
-*
-* Revision 5.18 1997/08/04 14:15:11 vakatov
-* Added Nlm_SetTextCursorPos() function
-*
-* Revision 5.17 1997/08/01 16:47:28 vakatov
-* [WIN_MOTIF,WIN_MSWIN] Added IconifyWindow() and IconicWindow()
-*
-* Revision 5.16 1997/07/21 21:52:37 vakatov
-* [WIN_MOTIF] Added Nlm_[Un]RegisterIO() functions to wait for I/O
-* events and call(via X) user-defined callback(s)
-*
-* Revision 5.15 1997/07/18 17:01:13 vakatov
-* [WIN_MOTIF] Removed "arg[cv]"; use "Nlm_GetArg[cv]()" instead
-*
-* Revision 5.14 1997/07/16 19:47:00 vakatov
-* +Nlm_StrngPrintable() proto
-*
-* Revision 5.13 1997/06/23 21:18:46 vakatov
-* Added Nlm_SetTextEditable() function to allow/prohibit text editing
-*
-* Revision 5.12 1997/05/27 21:50:55 vakatov
-* Added Nlm_PopupParentWindow() to popup window w/o switching input focus
-*
-* Revision 5.11 1997/04/28 21:42:46 vakatov
-* Added AUTO_FOCUS, FOCUS_NAVIG and DEFAULT_SLATE_POLICY defs & comments
-*
- * Revision 5.10 1997/04/25 16:08:45 vakatov
- * Changed old and added new navigation and special key names.
- * Added Nlm_SetSlatePolicy() and definitions for now available slate
- * navigation key handling policies.
- * Added Nlm_Scroll() -- for one-line/one-page scrolling of scrollbars.
- *
- * Revision 5.9 1997/03/19 15:57:07 vakatov
- * Added: Nlm_Boolean Nlm_QuittingProgram PROTO((void));
- *
- * Revision 5.8 1996/12/12 23:11:10 kans
- * added Nlm_ClipPrintingRect (DV)
- *
- * Revision 5.7 1996/09/26 00:29:23 kans
- * added SetWindowTimer
- *
- * Revision 5.6 1996/09/09 00:15:01 kans
- * AutonomousPanel4 uses ScrollBar4 to have > 32K positions
- *
- * Revision 5.5 1996/08/27 20:56:26 vakatov
- * Added prototypes of function for creating and handling Int2- and
- * Int4-range scrollbars homogeneously
- *
- * Revision 5.4 1996/07/25 18:49:02 vakatov
- * Added prototype of Nlm_GetBarMax()
- *
- * Revision 5.3 1996/06/19 20:30:42 vakatov
- * Added prototype for function Nlm_GetListItem()
- *
- * Revision 5.2 1996/06/14 14:26:46 vakatov
- * Nlm_SetColorCell() -- to immediately change the color appearence
- * [WIN_MOTIF] Nlm_RestrictMotifColorsTo() -- to avoid Motif/3D-Viewer
- * color overlapping
- *
- * Revision 5.1 1996/05/31 20:11:14 vakatov
- * Added Nlm_ExtendedList() function to set the list selection policy
- * to EXTENDED_SELECTION -- as it was for Nlm_MultiList() since Revision 4.4.
- *
- * Revision 4.5 1996/04/24 21:25:17 vakatov
- * Nlm_WaitForCondition(cond) modified; now it waits until the next X-event
- * rather than sleeping 100, 200, ..., 900 msec.
- * Nlm_WaitForXEvent() function added for this reason.
- *
- * Revision 4.4 1996/03/27 23:09:15 vakatov
- * Function Nlm_SetCursorShape() added to let programmer
- * easily store/restore current cursor shape
- *
- * Revision 4.3 1996/03/11 20:39:19 epstein
- * add support for Drag & Drop
- *
- * Revision 4.2 1995/11/08 23:30:31 kans
- * removed edit block fields, which belong in the application
- *
- * Revision 4.1 1995/10/06 16:44:39 epstein
- * add Nlm_WaitForCondition macro
- *
- * Revision 2.56 1995/05/31 18:00:58 kans
- * added SetColorMap
*
* ==========================================================================
*/
@@ -1237,6 +1050,7 @@ Nlm_VoidPtr Nlm_GetObject PROTO((Nlm_GraphiC a));
extern void Nlm_SendOpenDocAppleEvent PROTO((Nlm_CharPtr datafile, Nlm_CharPtr sig));
extern void Nlm_SendOpenDocAppleEventEx PROTO((Nlm_CharPtr datafile, Nlm_CharPtr sig, Nlm_CharPtr prog, Nlm_Boolean wantReply));
extern void Nlm_SendURLAppleEvent (Nlm_CharPtr urlString, Nlm_CharPtr sig, Nlm_CharPtr prog);
+extern void Nlm_SendAppleScriptString (Nlm_CharPtr script);
#endif
#ifdef WIN_MSWIN
diff --git a/vibrant/vibslate.c b/vibrant/vibslate.c
index b463dc5b..23d35932 100644
--- a/vibrant/vibslate.c
+++ b/vibrant/vibslate.c
@@ -29,218 +29,14 @@
*
* Version Creation Date: 7/1/91
*
-* $Revision: 6.44 $
+* $Revision: 6.45 $
*
* File Description:
* Vibrant slate (universal drawing environment) functions
*
* Modifications:
* --------------------------------------------------------------------------
-* $Log: vibslate.c,v $
-* Revision 6.44 2006/09/14 14:45:38 kans
-* changes for 64-bit Windows (GC) plus a few CodeWarrior complaints (JK)
*
-* Revision 6.43 2004/04/14 19:15:51 sinyakov
-* WIN_MSWIN: support X-Windows-like -bg color command line option
-*
-* Revision 6.42 2002/11/06 21:32:25 ucko
-* Nlm_LoadSlateData: initialize sptr->cMap to 0 rather than NULL, as it
-* is an integer rather than a pointer.
-*
-* Revision 6.41 2001/05/25 20:04:39 vakatov
-* Nested comment typo fixed
-*
-* Revision 6.40 2001/05/15 15:57:25 juran
-* Include glu.h instead of GL/glu.h on the Mac.
-*
-* Revision 6.39 2000/08/17 16:13:21 thiessen
-* fix X/OpenGL initialization bug
-*
-* Revision 6.38 2000/07/28 21:05:55 lewisg
-* more c++ fixes
-*
-* Revision 6.37 2000/03/13 15:58:18 thiessen
-* warn user about buggy 8-bit OpenGL
-*
-* Revision 6.36 2000/03/09 17:55:18 thiessen
-* changes to palette handling for 8-bit OpenGL
-*
-* Revision 6.35 2000/03/06 18:35:23 thiessen
-* fixes for 8-bit color
-*
-* Revision 6.34 2000/02/07 20:17:36 lewisg
-* minor bug fixes, use gui font for win32
-*
-* Revision 6.33 2000/02/03 22:29:15 lewisg
-* make windows version of vibrant use standard color
-*
-* Revision 6.32 2000/01/12 15:13:01 thiessen
-* fixed minor OpenGL memory leak
-*
-* Revision 6.31 2000/01/11 02:55:15 thiessen
-* working off-screen OpenGL rendering on Win32
-*
-* Revision 6.30 2000/01/07 19:37:06 thiessen
-* fix minor OpenGL problems
-*
-* Revision 6.29 2000/01/07 16:28:36 thiessen
-* fixed broken header conflicts
-*
-* Revision 6.28 2000/01/07 01:17:33 kans
-* needed to include ncbi.h first
-*
-* Revision 6.27 2000/01/07 00:22:46 thiessen
-* fixes for LessTif and OpenGL X visual selection
-*
-* Revision 6.26 2000/01/06 17:23:36 thiessen
-* various OpenGL improvements
-*
-* Revision 6.25 1999/12/07 19:18:58 thiessen
-* fixed font color problem in OpenGL on SGI
-*
-* Revision 6.24 1999/12/06 14:44:00 thiessen
-* made OpenGL font selection work in X/Motif
-*
-* Revision 6.23 1999/11/23 19:24:16 thiessen
-* better solution to OpenGL render rect setting on Mac
-*
-* Revision 6.22 1999/11/19 18:07:24 thiessen
-* added label capability for OpenGL version on Mac and Motif
-*
-* Revision 6.21 1999/11/03 15:38:04 thiessen
-* minor fix for Mac/OpenGL
-*
-* Revision 6.20 1999/10/27 20:18:11 thiessen
-* rearrangement of OpenGL color depth priorities
-*
-* Revision 6.19 1999/10/26 13:11:05 thiessen
-* added resize callback to Motif 3DSlate
-*
-* Revision 6.18 1999/10/25 19:40:46 thiessen
-* (temporary) fix so that Mac/OpenGL version correctly lets user resize window
-*
-* Revision 6.17 1999/10/05 17:35:23 thiessen
-* minor fix to glX initialization
-*
-* Revision 6.16 1999/10/04 14:27:17 thiessen
-* hacked partial compatibility with Mesa OpenGL implementation - does *not* work when rendering inside vibrant window in Motif
-*
-* Revision 6.15 1999/09/27 18:28:30 thiessen
-* Made 24-bit and doublebuffered OpenGL modes work on Mac; also should select
-* mode like X
-*
-* Revision 6.14 1999/09/27 16:28:41 thiessen
-* hacked in ability to use higher-than-8-bit color mode in OpenGL in a separate (non-vibrant) X-window
-*
-* Revision 6.13 1999/09/22 20:09:04 thiessen
-* port of OpenGL code to Macintosh
-*
-* Revision 6.12 1999/09/21 13:45:30 thiessen
-* port of Lewis's OpenGL code to X/Motif
-*
-* Revision 6.11 1999/09/20 20:12:56 lewisg
-* change typedefs for a colorcell, add triangle generator, fix incorrect return values
-*
-* Revision 6.10 1999/07/06 14:51:42 kans
-* resize scroll bar was one pixel too small
-*
-* Revision 6.9 1999/04/22 15:18:59 vakatov
-* Call XtUnrealizeWidget() before XtDestroyWidget() to make sure no
-* "post-mortem" callbacks(registered by XtAddEventHandler()) get
-* triggered for the destroyed widget. Reason: the widget may not be
-* immediately destroyed if XtDestroyWidget() was called in a nested
-* event dispatch loop.
-*
-* Revision 6.8 1999/04/06 14:23:26 lewisg
-* add opengl replacement for viewer3d
-*
-* Revision 6.7 1998/12/14 18:39:10 kans
-* okayToDrawContents extern, used to inhibit slate drawing
-*
-* Revision 6.6 1998/06/25 21:42:38 vakatov
-* Fixed(slightly) the slate scroll bar positioning
-* [WIN_MSWIN] Adjusted slate dimensions
-*
-* Revision 6.5 1997/12/18 16:51:43 vakatov
-* [WIN_X11] setup "Nlm_updateRect" in Nlm_SlateDrawCallback()
-*
-* Revision 6.4 1997/11/26 21:30:39 vakatov
-* Fixed errors and warnings issued by C and C++ (GNU and Sun) compilers
-*
-* Revision 6.3 1997/10/01 21:51:48 vakatov
-* Trying to catch strayed Expose or MapNotify(for SetVisible(...)) event
-*
-* Revision 6.2 1997/09/08 18:49:47 vakatov
-* Nlm_SlateDrawCallback() -- before processing slate's Expose events process
-* StructureNotifyMask-masked events for both the slate and its parent window
-*
-* Revision 6.1 1997/08/27 14:22:26 vakatov
-* Nlm_SlateDrawCallback() -- check for the window mapping event before
-* the call of Nlm_DrawSlate() /see also "vibwndws.c" R5.70/
-*
-* Revision 6.0 1997/08/25 18:57:39 madden
-* Revision changed to 6.0
-*
-* Revision 5.10 1997/07/10 21:49:39 vakatov
-* [WIN_X] Now able to manage windows having different depths(and
-* different visuals and GC).
-*
-* Revision 5.9 1997/06/06 21:01:35 vakatov
-* [WIN_MOTIF] Refuse input focus if AUTO_FOCUS slate policy is not set
-*
-* Revision 5.8 1997/04/28 21:50:35 vakatov
-* Implemented AUTO_FOCUS and FOCUS_NAVIG slate policies(see comments
-* in "vibprocs.h" R5.11 for details)
-*
- * Revision 5.7 1997/04/25 21:22:00 vakatov
- * Made slate do not intercept input when the slate is not visible
- *
- * Revision 5.6 1997/04/25 16:12:13 vakatov
- * [WIN_MOTIF, WIN_MSWIN] Added slate navigation key handlers for the
- * slate input and gainFocus()
- * [WIN_MOTIF] DisCapture slate if it losed input focus
- * [WIN_MOTIF] Two slate input callbacks merged into one
- * Disabled automatic navig. key handling when the slate has captured
- * input focus and has user-defined keyProc != NULL
- * Extensive code cleaning and type casting
- *
- * Revision 5.5 1996/09/09 12:19:40 kans
- * NewSlate was getting the wrong horizontal scroll bar callback
- *
- * Revision 5.4 1996/09/09 00:15:01 kans
- * AutonomousPanel4 uses ScrollBar4 to have > 32K positions
- *
- * Revision 5.3 1996/08/27 21:03:48 vakatov
- * Nlm_RegisterRow() : Nlm_SetValue() replaced by Nlm_CorrectBarValue() in
- * order to avoid undesirable recursion in the scrollbar action callback
- *
- * Revision 5.2 1996/07/25 14:52:01 epstein
- * add alignment variable for possibly improved portability
- *
- * Revision 5.1 1996/05/30 20:07:36 vakatov
- * [WIN_MSWIN] <Shift> and <Ctrl> key status checking moved to MainProc()
- *
- * Revision 4.6 1996/04/25 17:50:55 vakatov
- * SlateProc()/WIN_MSWIN: <Shift> and <Ctrl> key state error fixed
- *
- * Revision 4.5 1996/03/02 22:36:38 kans
- * reduction of X traffic (DV)
- *
- * Revision 4.4 1996/02/16 23:16:02 kans
- * set slate position always calls InvalSlate on all platforms
- *
- * Revision 4.3 1996/02/13 17:24:07 kans
- * accelerated set position prior to realization (Denis Vakatov)
- *
- * Revision 4.2 1995/09/06 20:30:24 kans
- * fixed bug due to GetWindowRect vs. GetClientRect (AS + GS)
- *
- * Revision 4.1 1995/08/14 21:38:37 kans
- * removal of remaining C str... functions
- *
- * Revision 2.37 1995/06/28 21:48:57 kans
- * added Add and Del SubwindowShell (Alex)
- *
* ==========================================================================
*/
@@ -1256,8 +1052,12 @@ static void Nlm_ShowSlate (Nlm_GraphiC s, Nlm_Boolean setFlag, Nlm_Boolean saveP
}
h = Nlm_GetSlateHandle ((Nlm_SlatE) s);
#ifdef WIN_MAC
+#ifdef WIN_MAC_QUARTZ
+ Nlm_SetGraphicNeedsDisplay (s);
+#else
Nlm_DoDraw (s);
#endif
+#endif
#ifdef WIN_MSWIN
ShowWindow (h, SW_SHOW);
UpdateWindow (h);
@@ -1325,7 +1125,10 @@ static void Nlm_HideSlate (Nlm_GraphiC s, Nlm_Boolean setFlag, Nlm_Boolean saveP
h = Nlm_GetSlateHandle ((Nlm_SlatE) s);
#ifdef WIN_MAC
if (Nlm_AllParentsButWindowVisible (s)) {
- Nlm_GetRect (s, &r);
+#ifdef WIN_MAC_QUARTZ
+ Nlm_SetGraphicNeedsDisplay (s);
+#else
+ Nlm_GetRect (s, &r);
if (vsb != NULL) {
r.right += Nlm_vScrollBarWidth;
}
@@ -1335,6 +1138,7 @@ static void Nlm_HideSlate (Nlm_GraphiC s, Nlm_Boolean setFlag, Nlm_Boolean saveP
Nlm_InsetRect (&r, -1, -1);
Nlm_EraseRect (&r);
Nlm_ValidRect (&r);
+#endif
}
#endif
#ifdef WIN_MSWIN
@@ -2109,7 +1913,7 @@ static void Nlm_PaintOrFormatChar (Nlm_GraphiC d, Nlm_Char ch, Nlm_Boolean saveP
if (Nlm_GetVisible (d) && Nlm_AllParentsButWindowVisible (d)) {
tempPort = Nlm_SavePortIfNeeded (d, savePort);
Nlm_DoSelect (d, FALSE);
-#ifdef WIN_MAC
+#if defined(WIN_MAC) && !defined(WIN_MAC_QUARTZ)
GetPenState (&state);
PenNormal ();
#endif
@@ -2152,7 +1956,7 @@ static void Nlm_PaintOrFormatChar (Nlm_GraphiC d, Nlm_Char ch, Nlm_Boolean saveP
}
break;
}
-#ifdef WIN_MAC
+#if defined(WIN_MAC) && !defined(WIN_MAC_QUARTZ)
SetPenState (&state);
#endif
Nlm_SelectFont (Nlm_systemFont);
diff --git a/vibrant/vibtexts.c b/vibrant/vibtexts.c
index 8e2a5a7d..15ae861f 100644
--- a/vibrant/vibtexts.c
+++ b/vibrant/vibtexts.c
@@ -29,237 +29,13 @@
*
* Version Creation Date: 7/1/91
*
-* $Revision: 6.34 $
+* $Revision: 6.36 $
*
* File Description:
* Vibrant edit text functions
*
* Modifications:
* --------------------------------------------------------------------------
-* $Log: vibtexts.c,v $
-* Revision 6.34 2007/05/02 14:55:58 kans
-* preparation for supporting Quartz on Mac
-*
-* Revision 6.33 2006/09/27 18:30:00 kans
-* support for Int4 scroll bars for switching between text and doc views in Sequin (CB)
-*
-* Revision 6.32 2006/09/14 19:18:29 ivanov
-* Rollback last changes. All missed defines added to corelib/ncbiwin.h.
-*
-* Revision 6.31 2006/09/14 18:05:45 ivanov
-* Fixed compilation errors on MS Windows
-*
-* Revision 6.30 2006/09/14 14:45:39 kans
-* changes for 64-bit Windows (GC) plus a few CodeWarrior complaints (JK)
-*
-* Revision 6.29 2005/07/18 15:15:18 kans
-* fixed minor xcode compiler warnings
-*
-* Revision 6.28 2004/07/19 13:36:43 bollin
-* replaced obsolete XmFontListCreate function to get rid of run-time warnings
-*
-* Revision 6.27 2004/06/24 15:34:48 bollin
-* added lines from Yoon Choi to make ctrl-A select all text in TextMode in
-* Sequin
-*
-* Revision 6.26 2004/03/17 16:09:14 sinyakov
-* WIN_MSWIN: fixed text box activation and text selection logic,
-* do not reset currentText when text window loses focus (to match Motif version),
-* removed scroll text size limit,
-* in Nlm_SelectAText(): scroll selection into view for scroll text,
-* in Nlm_TextGainFocus(), when focus changes to a single-line edit box,
-* do not highlight all text, instead just set the cursor pos to beginning,
-* in MyCls_OnChar(), multiline edit boxes accept tabs
-* as input characters and not as focus change commands.
-*
-* Revision 6.25 2004/02/23 16:36:52 sinyakov
-* Use Int4 instead of Int2 for cursor position and text selection in text boxes
-*
-* Revision 6.24 2004/02/17 16:01:15 bollin
-* implemented Nlm_SetScrollTextOffset for Motif
-*
-* Revision 6.23 2004/02/12 20:29:09 kans
-* put ifdef WIN_MOTIF wrapper around Nlm_KeepCrNlTextFieldCallback
-*
-* Revision 6.22 2004/02/12 20:05:10 bazhin
-* Added callback function "Nlm_SetKeepCrNlTextFieldCallback(Nlm_TexT t)",
-* which allows to copy-paste texts from multiple columns to single string.
-*
-* Revision 6.21 2004/02/09 17:46:27 bollin
-* added fix from Yoon Choi for copy-paste from Windows clipboard into Unix application
-*
-* Revision 6.20 2004/02/06 19:27:33 bollin
-* Use PostMessage to communicate with scrolling function on TextViewer window
-*
-* Revision 6.19 2004/02/05 16:25:05 kans
-* revert to Nlm_GetTextVScrollBar and Nlm_GetTextHScrollBar being static, implement setOffset and getOffset for scroll text, since Windows scroll text has its own scroll bar
-*
-* Revision 6.18 2004/02/04 15:21:03 kans
-* make GetTextVScrollBar and GetTextHScrollBar extern, to add search function to general text viewer
-*
-* Revision 6.17 2003/11/17 17:03:30 kans
-* changed C++ style comments to C comments
-*
-* Revision 6.16 2003/11/03 21:51:34 sinyakov
-* WIN_MSWIN: bugfix: strlen(title) moved out of loop condition
-*
-* Revision 6.15 2003/10/29 19:10:08 bazhin
-* Added function Nlm_SetTextColor(Nlm_TexT t, Nlm_Uint4 r, Nlm_Uint4 g,
-* Nlm_Uint4 b).
-*
-* Revision 6.14 2003/07/30 13:51:42 johnson
-* MSWIN: multi-line text boxes now respond to 'enter' key
-*
-* Revision 6.13 2003/03/28 21:27:18 rsmith
-* on Mac OS took out ClearCurrentScrap after Cut/Copy. It only erased whatever was copied.
-*
-* Revision 6.12 2003/01/07 15:08:11 shomrat
-* Change condition in for loop in Nlm_SetScrollText
-*
-* Revision 6.11 2002/12/04 22:35:11 johnson
-* WIN_MSWIN: replace UNIX '\n' with DOS "\r\n" in Nlm_SetScrollText
-*
-* Revision 6.10 2001/09/10 17:58:28 bazhin
-* Removed odd lines from SetTextCursorBlinkRate() function.
-*
-* Revision 6.9 2001/09/10 17:34:10 bazhin
-* Added function Nlm_SetTextCursorBlinkRate(Nlm_TexT t, Nlm_Int2 msec).
-*
-* Revision 6.8 2001/05/14 20:29:04 juran
-* Redesign Mac clipboard support.
-*
-* Revision 6.7 2000/05/02 22:02:15 vakatov
-* Nlm_TextCallback(): get rid of an extra condition
-*
-* Revision 6.6 2000/03/31 19:20:03 thiessen
-* fix recursion bug
-*
-* Revision 6.5 2000/02/07 20:17:36 lewisg
-* minor bug fixes, use gui font for win32
-*
-* Revision 6.4 1998/07/02 18:24:35 vakatov
-* Cleaned the code & made it pass through the C++ compilation
-*
-* Revision 6.3 1997/12/19 18:01:45 vakatov
-* [X11,MSWIN] When pasting into a single-line text field, replace all
-* non-printable characters by spaces
-*
-* Revision 6.2 1997/11/26 21:30:42 vakatov
-* Fixed errors and warnings issued by C and C++ (GNU and Sun) compilers
-*
-* Revision 6.1 1997/10/18 23:30:16 kans
-* implemented Nlm_GetTextCursorPos (DV)
-*
-* Revision 6.0 1997/08/25 18:57:44 madden
-* Revision changed to 6.0
-*
-* Revision 5.22 1997/08/07 16:46:39 vakatov
-* [WIN_MOTIF] Nlm_PasswordCallback() -- process <DEL> at the first text pos
-*
-* Revision 5.21 1997/08/07 13:38:32 kans
-* password text does action callback on delete (Mac)
-*
-* Revision 5.20 1997/08/05 16:42:26 kans
-* allowTextCallback not declared in Mac, so ifdefs changed in Nlm_SetTextCursorPos
-*
-* Revision 5.19 1997/08/04 14:15:14 vakatov
-* Added Nlm_SetTextCursorPos() function
-*
-* Revision 5.18 1997/07/21 18:49:09 vakatov
-* [WIN_MAC] SetPasswordText() -- moved "r" and "GetRect()"(sorry, missed
-* that!) back to the if(Visible... scope
-*
-* Revision 5.17 1997/07/21 18:39:42 kans
-* SetPasswordText r in Mac version at top scope
-*
-* Revision 5.16 1997/07/21 18:24:36 vakatov
-* SetPasswordText() -- show all symbols as '*'
-*
-* Revision 5.15 1997/07/17 15:31:47 vakatov
-* [WIN_MSWIN] Emulate non-editable text(crack WM_CHAR event in TextProc
-* as the WinSDK's Edit_SetReadOnly lead to invalidation bug for ScrollText)
-*
-* Revision 5.14 1997/07/16 13:47:20 kans
-* non-editable scroll text now scrolls on Mac
-*
-* Revision 5.12 1997/07/13 23:03:05 kans
-* ScrollText height is in stdLineHeight units
-*
-* Revision 5.11 1997/07/08 13:42:06 kans
-* ttool to rtool fix in Nlm_DrawScrollText/DCLAP
-*
-* Revision 5.10 1997/06/24 21:30:37 kans
-* implemented SetTextEditable on Mac
-*
-* Revision 5.9 1997/06/24 19:10:00 vakatov
-* Nlm_ScrollText() -- calculate the text box limits using the systemFont
-* (not the current font!) dimensions
-*
-* Revision 5.8 1997/06/23 21:21:05 vakatov
-* Added Nlm_SetTextEditable() function to allow/prohibit text editing
-* [WIN_MOTIF] Made text widgets to fit the specified number of lines
-*
-* Revision 5.7 1997/04/25 16:14:06 vakatov
-* [WIN_MOTIF,WIN_MSWIN] Catch and render(DoSendFocus) navigation key events
-* Extensive code cleaning and type casting
-*
- * Revision 5.6 1997/02/12 17:47:28 vakatov
- * [WIN_MOTIF] Do not reset selection when activating a window containing
- * a text or when the text is empty
- *
- * Revision 5.5 1997/01/29 17:53:59 kans
- * minor changes due to StringNCpy_0 change
- *
- * Revision 5.4 1997/01/29 16:41:22 kans
- * using StringNCpy_0
- *
- * Revision 5.3 1996/07/23 21:07:10 epstein
- * Vakatov/Epstein avoid trying to clear an area on an unrealized window
- *
- * Revision 5.2 1996/06/18 15:44:56 vakatov
- * Do not assign last (maxsize-1) symbol of output buffer
- * in Nlm_GetScrollText() and Nlm_GetDialogText() to '\0'.
- *
- * Revision 5.1 1996/06/17 19:28:17 vakatov
- * [WIN_MOTIF] Positioning of scrolled text postponed until its realization
- *
- * Revision 4.9 1996/05/08 20:42:52 vakatov
- * [WIN_MOTIF] Nlm_PasswordCallback() function -- rewritten to avoid stack
- * corruption on the case of too long(>30 symbols) user input and
- * to make the password text field more convenient to edit;
- * [ALL] Nlm_GetPasswordLength() function added (other than
- * Nlm_TextLength()); a lot of other tiny changes and corrections
- *
- * Revision 4.8 1996/05/08 13:43:47 vakatov
- * [WIN_MOTIF] Modified Nlm_SetPasswordText() to reset the password
- *
- * Revision 4.7 1996/05/03 17:02:08 kans
- * added a cast to SelectText call
- *
- * Revision 4.6 1996/03/02 22:36:38 kans
- * reduction of X traffic (DV)
- *
- * Revision 4.5 1996/02/13 17:24:07 kans
- * accelerated set position prior to realization (Denis Vakatov)
- *
- * Revision 4.4 1995/11/27 16:04:00 kans
- * ScrollText now handles killfocus and setfocus messages (VL)
- *
- * Revision 4.3 1995/11/27 15:13:41 kans
- * allow select and deselect callbacks for DialogText and ScrollText (VL)
- *
- * Revision 4.2 1995/11/08 23:30:31 kans
- * removed edit block fields, which belong in the application
- *
- * Revision 4.1 1995/10/10 15:51:53 kans
- * fully implemented scroll text resizing
- *
- * Revision 2.52 1995/07/14 17:48:26 kans
- * forces dialog, hidden text to use systemFont (AS)
- *
- * Revision 2.51 1995/05/20 18:27:38 kans
- * corrected accidental prevention of passing returns to other objects
- *
*
* ==========================================================================
*/
@@ -271,7 +47,7 @@
#ifdef WIN_MAC
#ifdef WIN_MAC_QUARTZ
#define Nlm_TextTool TXNObject
-extern CGRect Nlm_RecTToCGRect(Nlm_RectPtr r);
+extern CGRect Nlm_RecTToCGRect(Nlm_RecT r);
#else
#define Nlm_TextTool TEHandle
#endif
@@ -1772,8 +1548,10 @@ static void Nlm_TextSelectProc (Nlm_GraphiC t, Nlm_Boolean savePort)
#ifdef WIN_MAC
Nlm_Int2 end;
Nlm_TextTool h;
- TEPtr hp;
Nlm_WindoW tempPort;
+#ifndef WIN_MAC_QUARTZ
+ TEPtr hp;
+#endif
if (t != NULL) {
tempPort = Nlm_SavePortIfNeeded (t, savePort);
@@ -2051,10 +1829,12 @@ static void Nlm_GetDialogText (Nlm_GraphiC t, Nlm_Int2 item,
Nlm_TextTool h;
#ifdef WIN_MAC
Nlm_Char **chars;
- TEPtr hp;
Nlm_Int2 i;
Nlm_Int2 length;
Nlm_Char *ptr;
+#ifndef WIN_MAC_QUARTZ
+ TEPtr hp;
+#endif
#endif
#ifdef WIN_MOTIF
Nlm_CharPtr ptr;
@@ -2111,10 +1891,12 @@ static void Nlm_GetScrollText (Nlm_GraphiC t, Nlm_Int2 item,
Nlm_TextTool h;
#ifdef WIN_MAC
Nlm_Char **chars;
- TEPtr hp;
Nlm_Int2 i;
Nlm_Int2 length;
Nlm_Char *ptr;
+#ifndef WIN_MAC_QUARTZ
+ TEPtr hp;
+#endif
#endif
#ifdef WIN_MOTIF
Nlm_CharPtr ptr;
@@ -2500,7 +2282,7 @@ static LRESULT CALLBACK EXPORT TextProc (HWND hwnd, UINT message,
break; /* no suitable data found in the clipboard */
for (str = text; *str; str++)
- if ( !isprint(*str) ) {
+ if ( !isprint((unsigned char)*str) ) {
*str = ' ';
call_win_proc = FALSE;
}
@@ -2634,7 +2416,9 @@ static void Nlm_SetTextPosition (Nlm_GraphiC t, Nlm_RectPtr r,
Nlm_WindoW tempPort;
Nlm_RecT tr;
#ifdef WIN_MAC
+#ifndef WIN_MAC_QUARTZ
TEPtr hp;
+#endif
Nlm_RectTool rtool;
#endif
@@ -2700,7 +2484,9 @@ static void Nlm_SetHiddenTextPosition (Nlm_GraphiC t, Nlm_RectPtr r,
Nlm_WindoW tempPort;
Nlm_RecT tr;
#ifdef WIN_MAC
+#ifndef WIN_MAC_QUARTZ
TEPtr hp;
+#endif
Nlm_RectTool rtool;
#endif
@@ -2723,11 +2509,17 @@ static void Nlm_SetHiddenTextPosition (Nlm_GraphiC t, Nlm_RectPtr r,
tr = *r;
#ifdef WIN_MAC
Nlm_RecTToRectTool (&tr, &rtool);
+#ifdef WIN_MAC_QUARTZ
+ CGRect viewCG = Nlm_RectQDToCG (rtool);
+ CGRect destCG = Nlm_RectQDToCG (rtool);
+ TXNSetHIRectBounds (h, &viewCG, &destCG, 1);
+#else
HLock ((Handle) h);
hp = (TEPtr) *((Handle) h);
hp->destRect = rtool;
hp->viewRect = rtool;
HUnlock ((Handle) h);
+#endif
Nlm_SetRect (t, r);
Nlm_InvalText (t);
#endif
@@ -2972,9 +2764,13 @@ static void Nlm_SetScrollTextPosition (Nlm_GraphiC t, Nlm_RectPtr r,
Nlm_Int2 deltax;
Nlm_Int2 deltay;
Nlm_RectTool dtool;
+#ifndef WIN_MAC_QUARTZ
TEPtr hp;
+#endif
Nlm_RectTool rtool;
Nlm_BaR sb;
+ Rect textViewRect;
+ Rect textDestRect;
#endif
Nlm_Boolean is_realized;
@@ -3021,19 +2817,34 @@ static void Nlm_SetScrollTextPosition (Nlm_GraphiC t, Nlm_RectPtr r,
Nlm_ResetVisLines ((Nlm_TexT) t);
Nlm_InsetRect (&tr, 4, 2);
tr.bottom = tr.top + Nlm_GetVisLines ((Nlm_TexT) t) * Nlm_GetFontHeight ((Nlm_TexT) t);
+#ifdef WIN_MAC_QUARTZ
+ TXNGetViewRect (h, &textViewRect);
+ CGRect cgr;
+ TXNGetHIRect (h, kTXNDestinationRectKey, &cgr);
+ textDestRect = Nlm_RectCGToQD (cgr);
+#else
HLock ((Handle) h);
hp = (TEPtr) *((Handle) h);
- deltax = hp->destRect.left - hp->viewRect.left;
- deltay = hp->destRect.top - hp->viewRect.top;
+ textViewRect = hp->viewRect;
+ textDestRect = hp->destRect;
+#endif
+ deltax = textDestRect.left - textViewRect.left;
+ deltay = textDestRect.top - textViewRect.top;
Nlm_RecTToRectTool (&tr, &rtool);
Nlm_OffsetRect (&tr, deltax, deltay);
Nlm_RecTToRectTool (&tr, &dtool);
if (! wrap) {
dtool.right += HSCROLL_POSITIONS * Nlm_stdCharWidth;
}
+#ifdef WIN_MAC_QUARTZ
+ CGRect viewCG = Nlm_RectQDToCG (textViewRect);
+ CGRect destCG = Nlm_RectQDToCG (textDestRect);
+ TXNSetHIRectBounds (h, &viewCG, &destCG, 1);
+#else
hp->destRect = dtool;
hp->viewRect = rtool;
HUnlock ((Handle) h);
+#endif
Nlm_InvalScrollText (t);
}
@@ -3365,7 +3176,7 @@ static void Nlm_NewDialogText (Nlm_TexT t, Nlm_CharPtr dfault, Nlm_TxtActnProc a
Nlm_InsetRect (&r, 2, 2);
Nlm_RecTToRectTool (&r, &rtool);
#ifdef WIN_MAC_QUARTZ
- cgr = Nlm_RecTToCGRect(&r);
+ cgr = Nlm_RecTToCGRect(r);
TXNCreateObject( &cgr, kTXNSingleLineOnlyMask, &h);
TXNAttachObjectToWindowRef(h, wptr);
#else
@@ -3483,7 +3294,7 @@ static void Nlm_NewPasswordText (Nlm_TexT t, Nlm_CharPtr dfault, Nlm_TxtActnProc
Nlm_InsetRect (&r, 2, 2);
Nlm_RecTToRectTool (&r, &rtool);
#ifdef WIN_MAC_QUARTZ
- cgr = Nlm_RecTToCGRect(&r);
+ cgr = Nlm_RecTToCGRect(r);
TXNCreateObject( &cgr, kTXNSingleLineOnlyMask, &h);
TXNAttachObjectToWindowRef(h, wptr);
#else
@@ -3594,7 +3405,7 @@ static void Nlm_NewHiddenText (Nlm_TexT t, Nlm_CharPtr dfault,
#ifdef WIN_MAC
Nlm_RecTToRectTool (&r, &rtool);
#ifdef WIN_MAC_QUARTZ
- cgr = Nlm_RecTToCGRect(&r);
+ cgr = Nlm_RecTToCGRect(r);
TXNCreateObject( &cgr, kTXNSingleLineOnlyMask, &h);
TXNAttachObjectToWindowRef(h, wptr);
#else
@@ -3718,7 +3529,7 @@ static void Nlm_NewSpecialText (Nlm_TexT t, Nlm_CharPtr dfault,
Nlm_InsetRect (&r, 2, 2);
Nlm_RecTToRectTool (&r, &rtool);
#ifdef WIN_MAC_QUARTZ
- cgr = Nlm_RecTToCGRect(&r);
+ cgr = Nlm_RecTToCGRect(r);
TXNCreateObject( &cgr, kTXNSingleLineOnlyMask, &h);
TXNAttachObjectToWindowRef(h, wptr);
#else
@@ -3869,7 +3680,7 @@ static void Nlm_NewScrollText (Nlm_TexT t, Nlm_Int2 height,
}
Nlm_RecTToRectTool (&r, &dtool);
#ifdef WIN_MAC_QUARTZ
- cgr = Nlm_RecTToCGRect(&r);
+ cgr = Nlm_RecTToCGRect(r);
TXNCreateObject( &cgr, 0, &h);
TXNAttachObjectToWindowRef(h, wptr);
#else
diff --git a/vibrant/vibutils.c b/vibrant/vibutils.c
index dd81d148..60a779ef 100644
--- a/vibrant/vibutils.c
+++ b/vibrant/vibutils.c
@@ -29,428 +29,13 @@
*
* Version Creation Date: 7/1/91
*
-* $Revision: 6.73 $
+* $Revision: 6.75 $
*
* File Description:
* Vibrant miscellaneous functions
*
* Modifications:
* --------------------------------------------------------------------------
-* $Log: vibutils.c,v $
-* Revision 6.73 2007/05/01 22:01:30 kans
-* changes in preparation for supporing Quartz on Macintosh
-*
-* Revision 6.72 2006/12/18 17:28:01 kans
-* include FullPath only if OS_UNIX_DARWIN not defined, i.e., CodeWarrior build for Mac OS 9
-*
-* Revision 6.71 2006/11/24 20:06:31 kans
-* include Carbon/Carbon.h if not MWERKS - attempting to simplify Xcode search paths
-*
-* Revision 6.70 2006/11/06 17:06:37 bollin
-* Turn off tooltips for Open File Dialog for Windows version - this prevents
-* a crash that was occurring when selecting files for opening or saving that
-* were located in the Desktop for Windows 2000.
-*
-* Revision 6.69 2005/11/08 19:38:55 bollin
-* don't translate the keypress for a backspace key into the NLM_BACK character -
-* windows will also send a WM_CHAR message with the NLM_BACK character in it.
-* Nlm_KeydownToChar should only be used for keypresses that don't issue WM_CHAR
-* messages, otherwise the keyproc function will be called twice for a single
-* keypress
-*
-* Revision 6.68 2005/09/23 20:30:10 kans
-* added NLM_BACK for backspace key, which is separate from delete, even though the label may be the same on a keyboard
-*
-* Revision 6.67 2005/09/14 18:34:22 kans
-* protect against VibMessageHook memory buffer allocation failure
-*
-* Revision 6.66 2005/07/18 15:15:18 kans
-* fixed minor xcode compiler warnings
-*
-* Revision 6.65 2005/04/29 15:12:05 kans
-* removed unused variable in WIN version of Nlm_GetOutputFileName
-*
-* Revision 6.64 2005/04/19 14:52:23 rsmith
-* handle unix style paths in Nlm_SendOpenDocAppleEventEx
-*
-* Revision 6.63 2004/05/28 20:10:32 sinyakov
-* WIN_MSWIN: by Yoon Choi:
-* Modified Nlm_GetOutputFileName to use Nlm_FileLengthEx instead
-* of Nlm-FileOpen/Nlm_FileClose to determine whether file exists or
-* not. The old way popped up an info box when it did not find an
-* existing file.
-*
-* Revision 6.62 2004/05/04 16:34:23 shomrat
-* Remove file name restrictions for MSWIN
-*
-* Revision 6.61 2004/03/30 17:22:36 rsmith
-* Mac/Darwin (OSX) handle special case when converting an FSSpec to a path name when the file does not exist.
-*
-* Revision 6.60 2004/03/29 21:02:57 rsmith
-* use better system functions to convert FSSpec to a path on Darwin
-*
-* Revision 6.59 2004/02/24 16:51:13 sinyakov
-* [WIN_MSWIN] Nlm_GetInput/OutputFileName now use current working
-* directory as default (as Motif version does)
-*
-* Revision 6.58 2004/02/03 23:36:21 sinyakov
-* Nlm_CheckThisLevel(): call Nlm_GetNext() before calling Nlm_DoGainFocus()
-*
-* Revision 6.57 2003/11/17 17:03:30 kans
-* changed C++ style comments to C comments
-*
-* Revision 6.56 2003/11/07 16:06:58 rsmith
-* Changed Mac printing system calls from deprecated ones to modern ones primarily to ease building with precompiled headers.
-*
-* Revision 6.55 2003/05/05 12:38:07 rsmith
-* casts to make call to RegQueryValueEx safer in Nlm_GetExecPath. Needed by Codewarrior when compiling to Win32.
-*
-* Revision 6.54 2003/03/06 21:55:14 rsmith
-* for OS_UNIX_DARWIN update Nlm_LaunchAppEx and Nlm_SendURLAppleEvent to use new LaunchServices calls.
-*
-* Revision 6.53 2003/02/24 14:25:22 kans
-* undef PM_USE_SESSION_APIS if already defined, before redefining it
-*
-* Revision 6.52 2003/02/10 22:16:41 kans
-* MyNavTextFilterProc allows fdType of 0 for Darwin as well as TEXT
-*
-* Revision 6.51 2003/02/09 18:13:35 kans
-* Nlm_NavServGetInputFileName uses MyNavFilterProc for darwin even if TEXT requested, since not all desired files will have type set
-*
-* Revision 6.50 2003/01/24 20:55:43 rsmith
-* ConvertFilename now extern not static, renamed Nlm_* and only defined in vibutils.c
-*
-* Revision 6.49 2002/11/14 21:27:05 johnson
-* VibMonCreate no longer assigns focus to new window (on WIN_MOTIF)
-*
-* Revision 6.48 2002/10/28 02:47:56 kans
-* call PMPageSetupDialog for Carbon printing
-*
-* Revision 6.47 2002/06/25 18:51:42 kans
-* ConvertFilename puts null byte at str [fullPathLen]
-*
-* Revision 6.46 2002/06/17 16:12:05 kans
-* fix for full path on Darwin (EN)
-*
-* Revision 6.45 2002/06/13 16:15:13 kans
-* fix includes for OS_UNIX_DARWIN with WIN_MAC (EN) - still bug in vibutils.c file dialog
-*
-* Revision 6.44 2002/02/01 18:59:33 kans
-* ConvertFilename calls GetFullPath instead of FSMakePath
-*
-* Revision 6.43 2002/02/01 16:18:34 kans
-* if Carbon, call FSMakePath for input/output file name paths
-*
-* Revision 6.42 2002/01/31 19:01:44 kans
-* MyNavEventProc was deferencing NULL, crashed on Mac OS X (UNIX based), but not used anyway
-*
-* Revision 6.41 2001/11/01 14:25:53 kans
-* use times function for UNIX ComputerTime
-*
-* Revision 6.40 2001/05/17 17:52:34 juran
-* Implement Nlm_ClipPrintingRect() for Carbon.
-* General cleanup -- heed all warnings.
-*
-* Revision 6.39 2001/05/16 23:44:31 juran
-* Segregate Nlm_PrintingRect() into four functions, implement for Carbon.
-*
-* Revision 6.38 2001/05/14 20:36:46 juran
-* Refactor Mac scrap-thwapping code.
-*
-* Revision 6.37 2001/04/05 20:00:43 juran
-* Major Carbon changes.
-Most notably, we attempt to use the new Carbon Printing Manager under
-Carbon, though this has not been tested.
-Pre-Carbon printing should work fine, though this has not been tested
-either.
-*
-* Revision 6.36 2000/07/31 13:28:46 lewisg
-* Nlm_GetExecPath
-*
-* Revision 6.34 2000/07/25 19:18:36 lewisg
-* get pathname for executable on windows
-*
-* Revision 6.33 2000/07/14 22:28:59 lewisg
-* fix typo
-*
-* Revision 6.32 2000/07/14 20:30:41 kans
-* added Nlm_MSWin_OpenApplication (for launching Cn3D with a data file)
-*
-* Revision 6.31 2000/06/29 17:29:11 vakatov
-* [MSWIN] Fixed printf format mismatches
-*
-* Revision 6.30 2000/02/23 16:21:55 kans
-* switched to Churchill fix for nav services file dialogs
-*
-* Revision 6.29 2000/02/22 16:47:59 kans
-* get input/output file name dialog accidentally failed for powerpc without nav services
-*
-* Revision 6.28 2000/01/07 00:22:47 thiessen
-* fixes for LessTif and OpenGL X visual selection
-*
-* Revision 6.27 1999/12/30 16:58:52 kans
-* Carbon changes - printing still not resolved (Churchill)
-*
-* Revision 6.26 1999/12/21 18:48:44 kans
-* rearranged mac get input/output filename functions, soon to expect nav services and to retire SFGetFile and SFPutFile as not Carbon compliant
-*
-* Revision 6.25 1999/08/23 19:36:39 vakatov
-* Nlm_VibMessageHook(): the error posting window should not disappear
-* momentarily on FATAL ERROR -- as we want user to see error message(s)
-*
-* Revision 6.24 1999/08/19 19:05:43 vakatov
-* Nlm_VibMessageHook(): always show the "caption" as a title
-*
-* Revision 6.23 1999/07/04 00:21:13 kans
-* Mac Navigation.h changes
-*
-* Revision 6.22 1999/03/21 18:44:05 kans
-* needed ampsersand before creatorType in MemSet
-*
-* Revision 6.19 1999/02/03 23:26:18 vakatov
-* Nlm_ProcessKeydown() to return "TRUE" when moving the input focus
-*
-* Revision 6.15 1999/01/13 20:49:37 vakatov
-* Nlm_Execv(): precations for the MT applications
-*
-* Revision 6.14 1999/01/13 18:03:24 kans
-* Nlm_Execv calls fork1 if SOLARIS_THREADS_AVAIL
-*
-* Revision 6.13 1999/01/11 18:59:05 kans
-* hidden Mac function Nlm_GetFileTypeAndCreator - did not solve MIME detection problem
-*
-* Revision 6.12 1999/01/07 22:32:38 kans
-* added Mac-specific Nlm_SendURLAppleEvent
-*
-* Revision 6.11 1999/01/06 20:13:00 kans
-* MyNavTextFilterProc for TEXT files
-*
-* Revision 6.10 1999/01/06 02:51:59 kans
-* support for Mac Navigation Services file selection dialogs
-*
-* Revision 6.9 1998/09/15 15:28:15 vakatov
-* [WIN_MSWIN] GetOpen/SaveFileName(): removed OFN_NOCHANGEDIR flag
-*
-* Revision 6.8 1998/07/07 23:03:36 vakatov
-* Added Nlm_Execv() to spawn applications with cmd-line parameters;
-* now implemented for [OS_MSWIN, OS_UNIX].
-*
-* Revision 6.7 1998/03/27 14:01:57 kans
-* StrngPrintable on Mac now converts 015 from text object to newline for StringPrintable, then back to 015 to put in text
-*
-* Revision 6.6 1998/03/25 18:10:17 kans
-* VibMessageHook adds newline if post, on Mac it must be octal 15
-*
-* Revision 6.5 1998/03/22 03:01:04 kans
-* changed names to RegisterServiceProc and RegisterResultProc
-*
-* Revision 6.4 1998/03/22 02:33:22 kans
-* added request proc, result proc, message handlers to support, and send open doc event, launch app now work with file names or signatures
-*
-* Revision 6.3 1998/03/17 21:08:03 kans
-* added Nlm_SendOpenDocAppleEventEx, and private Nlm_LaunchAppEx
-*
-* Revision 6.2 1997/12/12 21:08:48 kans
-* a number of symbols changed in the latest CodeWarrior release, now using headers from Apple
-*
-* Revision 6.1 1997/11/26 21:30:47 vakatov
-* Fixed errors and warnings issued by C and C++ (GNU and Sun) compilers
-*
-* Revision 6.0 1997/08/25 18:57:53 madden
-* Revision changed to 6.0
-*
-* Revision 5.31 1997/08/25 16:43:04 vakatov
-* [WIN_MSWIN] Nlm_StartPrinting() -- initialize unused DOCINFO fields
-* with 0(using sizeof(DOCINFO), thus avoid the use of preprocessor #ifdef
-*
-* Revision 5.30 1997/08/21 15:17:40 vakatov
-* [WIN_MSWIN] Nlm_SetupPrinterDeviceContext() -- fixed Int2 overflow in
-* the display/printer scaling for 16-bit(Win16 and Win-95) SDK libraries
-*
-* Revision 5.29 1997/07/24 17:08:09 vakatov
-* [WIN_MOTIF] Explicitly set visual, colormap and depth for FileDialog
-* rather than for its parent top-level shell
-*
-* Revision 5.28 1997/07/21 21:52:41 vakatov
-* [WIN_MOTIF] Added Nlm_[Un]RegisterIO() functions to wait for I/O
-* events and call(via X) user-defined callback(s)
-*
-* Revision 5.27 1997/07/16 20:09:52 vakatov
-* Added Nlm_StrngPrintable(); use that in Nlm_VibMessageHook() to
-* provide proper End-Of-Lines in the ScrolledText object
-*
-* Revision 5.26 1997/07/16 18:00:48 kans
-* VibMessageHook newline on Mac is 015
-*
-* Revision 5.25 1997/07/16 14:10:59 vakatov
-* [WIN_MAC] Nlm_VibMessageHook(KEY_NONE): do not use '\r' before '\n'
-*
-* Revision 5.24 1997/07/15 17:13:48 vakatov
-* Nlm_VibMessageHook(KEY_NONE): accumulate incoming messages in the
-* text object until the message box is(explicitly) closed by the user
-*
-* Revision 5.23 1997/07/15 12:24:07 kans
-* vibmessagehook len value increased
-*
-* Revision 5.22 1997/07/10 21:49:44 vakatov
-* [WIN_X] Now able to manage windows having different depths(and
-* different visuals and GC).
-*
-* Revision 5.21 1997/06/23 22:14:18 vakatov
-* VibMessageHook() -- [key == KEY_NONE] use scrolled text instead of
-* static prompt to provide printout of the whole message
-*
-* Revision 5.20 1997/05/27 21:55:32 vakatov
-* Use Nlm_PopupParentWindow() to avoid flicking on the message box pop-up
-*
-* Revision 5.19 1997/05/27 18:12:29 kans
-* use post message window if key_none, regardless of severity
-*
-* Revision 5.18 1997/05/19 21:48:11 vakatov
-* Do not deliver input focus to the [KEY_NONE,SEV_INFO] message box
-*
-* Revision 5.17 1997/04/28 14:05:39 vakatov
-* [WIN_MOTIF] Replaced XK_Page_Up/Down(undef for SunOS X4) by XK_Prior/Next
-*
- * Revision 5.16 1997/04/25 16:10:42 vakatov
- * [WIN_MOTIF,WIN_MSWIN] Added functions to catch, convert(to Mac keycodes)
- * and render navigation and special key events
- *
- * Revision 5.15 1997/04/10 20:23:54 kans
- * monitor only selects window to front on creation, not change value, to
- * allow user to work on other windows without constant focus change
- *
- * Revision 5.14 1997/04/04 22:37:11 vakatov
- * [WIN_MSWIN] In SetupPrinterDeviceContext(), set the window and viewport
- * extents with a more accurate way.
- *
- * Revision 5.13 1997/01/29 17:53:59 kans
- * minor changes due to StringNCpy_0 change
- *
- * Revision 5.12 1997/01/29 16:41:22 kans
- * using StringNCpy_0
- *
- * Revision 5.11 1997/01/16 21:59:20 vakatov
- * [WIN_MSWIN] StartPicture() -- set picture origin coords(SetWindowOrgEx)
- *
- * Revision 5.10 1997/01/03 16:11:44 vakatov
- * Fixed inaccurate string copying -- <mostly potential> 1-byte exceeding of
- * the string size by StringNCat; missing terminating '\0' by StringNCpy.
- *
- * Revision 5.9 1996/12/12 23:11:10 kans
- * added Nlm_ClipPrintingRect (DV)
- *
- * Revision 5.8 1996/12/04 19:54:20 vakatov
- * [WIN_MSWIN] Nlm_CopyDefaultName(): fixed the cases resulting in "."
- *
- * Revision 5.7 1996/11/08 16:43:10 vakatov
- * Nlm_RemoveLink(): do not forget to re-assign "lastChild" when removing
- * the tailing link in the children list(...crash!).
- * Got rid of all compiler warnings.
- *
- * Revision 5.6 1996/10/28 21:21:51 vakatov
- * Nlm_CreateFileDialogShell(): colormap set to Nlm_VibrantDefaultColormap()
- *
- * Revision 5.5 1996/10/09 19:53:18 vakatov
- * [WIN_MOTIF] Nlm_SelectMonitor() : explicit call to XMapRaised() led to
- * a side effect causing X-error; -- now replaced by the call to Nlm_Select()
- *
- * Revision 5.4 1996/09/09 20:46:44 vakatov
- * [WIN_MSWIN] GetOpen/SaveFileName(): added OFN_NOCHANGEDIR flag
- *
- * Revision 5.3 1996/08/30 18:44:09 kans
- * protect against NULL HandFree in SetTitle
- *
- * Revision 5.2 1996/07/05 16:27:45 kans
- * monitor now checks hasCancelBtn param in making cancel button
- *
- * Revision 5.1 1996/06/24 19:24:28 vakatov
- * [WIN_MOTIF] Nlm_VibMessageHook() -- Set default buttons for the
- * pop-up messages
- *
- * Revision 5.0 1996/05/28 13:45:08 ostell
- * Set to revision 5.0
- *
- * Revision 4.17 1996/05/20 21:30:57 vakatov
- * [WIN_MOTIF] All "Widget" / "NULL" comparisons and assignments replaced
- * by the "Widget" / "(Widget)0" these
- *
- * Revision 4.16 1996/05/03 21:03:43 kans
- * removed erroneous textscrapfull = FALSE lines
- *
- * Revision 4.15 1996/05/03 17:58:29 vakatov
- * [WIN_MSWIN only] Check for the MS-Window version when operating with
- * the _DOCINFOA structure
- *
- * Revision 4.14 1996/04/24 21:22:39 vakatov
- * New function Nlm_WaitForXEvent( void ) added (for WIN_MOTIF only!)
- *
- * Revision 4.13 1996/03/02 22:36:38 kans
- * reduction of X traffic (DV)
- *
- * Revision 4.12 1996/02/21 19:46:19 kans
- * GetDriveType endif was in the wrong place
- *
- * Revision 4.11 1996/02/14 16:54:17 kans
- * hidden Nlm_GetDriveType function for entrezcf.c
- *
- * Revision 4.10 1996/02/13 19:49:04 kans
- * set realized calls get/set graphic data, because of gdata cache
- *
- * Revision 4.9 1996/02/13 17:24:07 kans
- * accelerated set position prior to realization (Denis Vakatov)
- *
- * Revision 4.8 1995/12/06 19:45:20 kans
- * removed ArrowCursor from Mac version of VibMessageHook
- *
- * Revision 4.7 1995/11/21 17:37:26 smirnov
- * Alex: Win95 printing problem
- *
- * Revision 4.6 1995/11/14 13:42:05 kans
- * fixes to FntGetFontStyle (VL)
- *
- * Revision 4.5 1995/11/08 23:30:31 kans
- * removed edit block fields, which belong in the application
- *
- * Revision 4.4 1995/10/06 16:46:51 epstein
- * break-out 'patient' modal-window loop into a new macro Nlm_WaitForCondition, and add function Nlm_FineGranularitySleep
- *
- * Revision 4.3 1995/09/12 17:59:35 ostell
- * fixes for MS windows text to metafile
- *
- * Revision 4.2 1995/08/29 18:19:09 kans
- * changes to clipboard functions under Motif (AS)
- *
- * Revision 4.1 1995/08/14 21:38:37 kans
- * removal of remaining C str... functions
- *
- * Revision 4.0 1995/07/26 13:51:04 ostell
- * force revision to 4.0
- *
- * Revision 2.80 1995/07/19 16:21:33 kans
- * fixed IRIX4 XmClipboardStartCopy complaint
- *
- * Revision 2.79 1995/07/17 22:02:19 kans
- * Motif clipboard cut and paste supported (AS)
- *
- * Revision 2.78 1995/07/05 14:23:19 kans
- * move #include <sys/select.h> to ncbilcl.r6k
- *
- * Revision 2.77 1995/06/08 15:46:15 kans
- * added special event loop to monitor functions for X responsiveness
- *
- * Revision 2.76 1995/06/07 20:14:13 kans
- * better performance of monitor, message loops
- *
- * Revision 2.75 1995/06/05 21:32:25 kans
- * added cancel button to progress monitor
- *
- * Revision 2.74 1995/05/31 18:00:58 kans
- * added SetColorMap (AS)
- *
- * Revision 2.73 1995/05/17 15:15:14 kans
- * added Log line
- *
*
* ==========================================================================
*/
@@ -3517,14 +3102,14 @@ extern void Nlm_RecTToRectTool (Nlm_RectPtr src, Nlm_RectTool PNTR dst)
}
#ifdef WIN_MAC_QUARTZ
-extern CGRect Nlm_RecTToCGRect(Nlm_RectPtr r)
+extern CGRect Nlm_RecTToCGRect(Nlm_RecT r)
{
CGRect cgr;
- cgr.origin.x = r->left + 0.5f;
- cgr.origin.y = r->top + 0.5;
- cgr.size.width = r->right - r->left - 1.0f;
- cgr.size.height = r->bottom - r->top - 1.0f;
+ cgr.origin.x = r.left;
+ cgr.origin.y = r.top;
+ cgr.size.width = r.right - r.left;
+ cgr.size.height = r.bottom - r.top;
return cgr;
}
@@ -3532,13 +3117,28 @@ extern CGRect Nlm_RecTToCGRect(Nlm_RectPtr r)
extern Nlm_RecT Nlm_CGRectToRecT(CGRect cgr)
{
Nlm_RecT r;
- r.left = cgr.origin.x - 0.5f;
- r.top = cgr.origin.y - 0.5f;
- r.right = cgr.size.width + cgr.origin.x + 1.0f;
- r.bottom = cgr.size.height + cgr.origin.y + 1.0f;
+ r.left = cgr.origin.x;
+ r.top = cgr.origin.y;
+ r.right = cgr.size.width + cgr.origin.x;
+ r.bottom = cgr.size.height + cgr.origin.y;
return r;
}
+CGRect Nlm_RectQDToCG(Rect r)
+{
+ Nlm_RecT rt;
+ Nlm_RectToolToRecT (&r, &rt);
+ return Nlm_RecTToCGRect (rt);
+}
+
+Rect Nlm_RectCGToQD(CGRect r)
+{
+ Nlm_RecT rt = Nlm_CGRectToRecT (r);
+ Rect rq;
+ Nlm_RecTToRectTool (&rt, &rq);
+ return rq;
+}
+
extern CGPoint Nlm_PoinTToCGPoint(Nlm_PoinT np)
{
CGPoint qp;
@@ -3565,7 +3165,13 @@ extern void Nlm_LocalToGlobal (Nlm_PointPtr pt)
if (pt != NULL) {
Nlm_PoinTToPointTool (*pt, &ptool);
+#ifdef WIN_MAC_QUARTZ
+/* This function is deprecated on 10.4+ but there is no replacement
+ available until 10.5, so we have to use it anyway */
+ QDLocalToGlobalPoint (GetWindowPort(Nlm_GetQuartzCurrentWindow()), &ptool);
+#else
LocalToGlobal (&ptool);
+#endif
Nlm_PointToolToPoinT (ptool, pt);
}
#endif
@@ -3590,7 +3196,13 @@ extern void Nlm_GlobalToLocal (Nlm_PointPtr pt)
if (pt != NULL) {
Nlm_PoinTToPointTool (*pt, &ptool);
+#ifdef WIN_MAC_QUARTZ
+/* This function is deprecated on 10.4+ but there is no replacement
+ available until 10.5, so we have to use it anyway */
+ QDGlobalToLocalPoint (GetWindowPort(Nlm_GetQuartzCurrentWindow()), &ptool);
+#else
GlobalToLocal (&ptool);
+#endif
Nlm_PointToolToPoinT (ptool, pt);
}
#endif
@@ -3700,6 +3312,10 @@ extern HDC Nlm_GetPicWinHDC ( void )
#endif
+#ifdef WIN_MAC_QUARTZ
+static CFMutableDataRef Nlm_PictureData = 0;
+#endif
+
extern Nlm_WindoW Nlm_StartPicture (Nlm_RectPtr r)
{
Nlm_WindoW w;
@@ -3712,9 +3328,20 @@ extern Nlm_WindoW Nlm_StartPicture (Nlm_RectPtr r)
return w;
#ifdef WIN_MAC
+#ifdef WIN_MAC_QUARTZ
+ CGRect cgr = CGRectMake (r->left, r->top, r->right - r->left, r->bottom - r->top);
+ Nlm_PictureData = CFDataCreateMutable (NULL, 0);
+
+ CGDataConsumerRef consumer = CGDataConsumerCreateWithCFData (Nlm_PictureData);
+ CGContextRef ctx = CGPDFContextCreate (consumer, &cgr, NULL);
+ CGContextBeginPage (ctx, &cgr);
+ Nlm_PushPort (ctx);
+ CGDataConsumerRelease (consumer);
+#else
Nlm_RecTToRectTool (r, &rtool);
picHdl = OpenPicture (&rtool);
#endif
+#endif
#ifdef WIN_MSWIN
picRect = *r;
picHWND = Nlm_currentHWnd;
@@ -3739,6 +3366,17 @@ extern void Nlm_EndPicture (Nlm_WindoW w)
{
#ifdef WIN_MAC
+#ifdef WIN_MAC_QUARTZ
+ CGContextRef ctx = Nlm_PopPort();
+ CGContextEndPage (ctx);
+ CGContextRelease (ctx);
+
+ PasteboardRef pasteboard = 0;
+ PasteboardCreate (kPasteboardClipboard, &pasteboard);
+ PasteboardPutItemFlavor (pasteboard, (PasteboardItemID)1, CFSTR("com.adobe.pdf"), Nlm_PictureData, 0);
+ CFRelease (pasteboard);
+ CFRelease (Nlm_PictureData);
+#else
long len;
PicPtr picPtr;
@@ -3768,6 +3406,7 @@ extern void Nlm_EndPicture (Nlm_WindoW w)
}
picHdl = NULL;
#endif
+#endif
#ifdef WIN_MSWIN
GLOBALHANDLE hGMem = NULL;
HMETAFILE hmf = NULL;
@@ -3842,6 +3481,21 @@ extern void Nlm_StringToClipboard (Nlm_CharPtr str)
{
#ifdef WIN_MAC
+#ifdef WIN_MAC_QUARTZ
+ PasteboardRef pasteboard = 0;
+ PasteboardCreate (kPasteboardClipboard, &pasteboard);
+ PasteboardClear (pasteboard);
+
+ CFDataRef asciidata = CFDataCreate (NULL, (UInt8 *)str, (CFIndex)strlen (str));
+ CFStringRef cfstr = CFStringCreateFromExternalRepresentation (NULL, asciidata, kCFStringEncodingMacRoman);
+ CFDataRef data = CFStringCreateExternalRepresentation (NULL, cfstr, kCFStringEncodingUnicode, '?');
+ PasteboardPutItemFlavor (pasteboard, (PasteboardItemID)1, CFSTR("public.utf16-plain-text"), data, 0);
+
+ CFRelease (data);
+ CFRelease (cfstr);
+ CFRelease (asciidata);
+ CFRelease (pasteboard);
+#else
long len;
OSErr err;
@@ -3865,6 +3519,7 @@ extern void Nlm_StringToClipboard (Nlm_CharPtr str)
err = TEFromScrap ();
}
#endif
+#endif
#ifdef WIN_MSWIN
HGLOBAL hMem;
DWORD len;
@@ -3931,17 +3586,78 @@ extern void Nlm_StringToClipboard (Nlm_CharPtr str)
#endif
}
+#ifdef WIN_MAC_QUARTZ
+static CFDataRef Nlm_CopyClipboardTextData (void)
+{
+ PasteboardRef pasteboard = 0;
+ PasteboardCreate (kPasteboardClipboard, &pasteboard);
+ PasteboardSynchronize (pasteboard);
+
+ ItemCount itemCount = 0;
+ PasteboardGetItemCount (pasteboard, &itemCount);
+
+ CFDataRef flavorData = 0;
+
+ UInt32 index;
+ for (index = 1; index <= itemCount && !flavorData; index++)
+ {
+ PasteboardItemID itemID = 0;
+ CFArrayRef flavorTypeArray = 0;
+ CFIndex flavorCount = 0;
+
+ PasteboardGetItemIdentifier (pasteboard, index, &itemID);
+ PasteboardCopyItemFlavors (pasteboard, itemID, &flavorTypeArray);
+ flavorCount = CFArrayGetCount (flavorTypeArray);
+ CFIndex i;
+ for (i = 0; i < flavorCount; i++)
+ {
+ CFStringRef flavorType = (CFStringRef)CFArrayGetValueAtIndex (flavorTypeArray, i);
+ if (UTTypeConformsTo (flavorType, CFSTR("public.utf16-plain-text")))
+ {
+ PasteboardCopyItemFlavorData (pasteboard, itemID, flavorType, &flavorData);
+ break;
+ }
+ }
+ }
+
+ if (flavorData)
+ {
+ CFStringRef cfstr = CFStringCreateFromExternalRepresentation (NULL, flavorData, kCFStringEncodingUnicode);
+ CFDataRef data = CFStringCreateExternalRepresentation (NULL, cfstr, kCFStringEncodingMacRoman, '?');
+ CFRelease (flavorData);
+ CFRelease (cfstr);
+ return data;
+ }
+
+ return NULL;
+}
+#endif
+
extern Nlm_Boolean Nlm_ClipboardHasString (void)
{
#ifdef WIN_MAC
+#ifdef WIN_MAC_QUARTZ
+ CFDataRef data = Nlm_CopyClipboardTextData();
+ if (data)
+ CFRelease (data);
+ return data != 0;
+#else
long len;
OSErr err;
+# if TARGET_API_MAC_CARBON
+ OSStatus status;
+ ScrapRef scrap;
+ ScrapFlavorFlags flags = 0;
+ status = GetCurrentScrap(&scrap);
+
err = TEFromScrap();
len = TEGetScrapLength();
return (Nlm_Boolean) (len > 0);
#endif
+#endif
+#endif
#ifdef WIN_MSWIN
return (Nlm_Boolean) (IsClipboardFormatAvailable (CF_TEXT));
@@ -3980,6 +3696,18 @@ extern Nlm_CharPtr Nlm_ClipboardToString (void)
{
#ifdef WIN_MAC
+#ifdef WIN_MAC_QUARTZ
+ Nlm_CharPtr str = 0;
+
+ CFDataRef data = Nlm_CopyClipboardTextData();
+ if (data)
+ {
+ str = Nlm_MemNew (CFDataGetLength (data));
+ CFDataGetBytes (data, CFRangeMake (0, CFDataGetLength (data)), (UInt8 *)str);
+ CFRelease (data);
+ }
+ return str;
+#else
long len;
Nlm_CharPtr str;
Handle hdl;
@@ -4002,6 +3730,7 @@ extern Nlm_CharPtr Nlm_ClipboardToString (void)
}
return str;
#endif
+#endif
#ifdef WIN_MSWIN
HANDLE hClip;
LPSTR pStr;
@@ -5890,7 +5619,7 @@ extern void Nlm_SendOpenDocAppleEventEx (Nlm_CharPtr datafile, Nlm_CharPtr sig,
AppleEvent theReply;
OSType theSignature;
AEDescList theList;
- FSSpec fss;
+ CFURLRef cfurl;
Nlm_Char temp [256];
ProcessSerialNumber psn;
Nlm_Boolean okay = FALSE;
@@ -5920,20 +5649,11 @@ extern void Nlm_SendOpenDocAppleEventEx (Nlm_CharPtr datafile, Nlm_CharPtr sig,
if (theErr == noErr) {
theErr = AECreateList(NULL, 0, FALSE, &theList);
if (theErr == noErr) {
- /*make fss from path */
- if (datafile[0] == '/') {
- FSRef fsref;
- theErr = FSPathMakeRef((unsigned char *) datafile, &fsref, NULL);
- if (theErr == noErr) {
- theErr = FSGetCatalogInfo(&fsref, kFSCatInfoNone, NULL, NULL, &fss, NULL);
- }
- } else {
- Nlm_StringNCpy_0(temp, datafile, sizeof(temp) - 1);
- Nlm_CtoPstr ((Nlm_CharPtr) temp);
- theErr = FSMakeFSSpec (0, 0, (ConstStr255Param) temp, &fss);
- }
- if (theErr == noErr) {
- theErr = AECreateDesc(typeFSS, (Ptr)&fss, sizeof(fss), &docDesc);
+ cfurl = CFURLCreateFromFileSystemRepresentation (NULL, (const UInt8 *)datafile, strlen (datafile), 0);
+ if (cfurl) {
+ CFDataRef cfdata = CFURLCreateData (NULL, cfurl, kCFStringEncodingUTF8, 1);
+ theErr = AECreateDesc(typeFileURL, CFDataGetBytePtr (cfdata), CFDataGetLength (cfdata), &docDesc);
+ CFRelease (cfdata);
if (theErr == noErr) {
theErr = AEPutDesc(&theList, 0, &docDesc);
if (theErr == noErr) {
@@ -5968,8 +5688,8 @@ extern void Nlm_SendURLAppleEvent (Nlm_CharPtr urlString, Nlm_CharPtr sig, Nlm_C
{
#ifdef OS_UNIX_DARWIN
- OSStatus err;
- CFURLRef urlRef;
+ OSStatus err;
+ CFURLRef urlRef;
/* on OS X ignore the sig and prog and open the url with the default browser */
urlRef = CFURLCreateWithBytes (NULL, (const UInt8 *) urlString, Nlm_StrLen( urlString), kCFStringEncodingMacRoman, NULL);
@@ -6026,29 +5746,122 @@ extern void Nlm_SendURLAppleEvent (Nlm_CharPtr urlString, Nlm_CharPtr sig, Nlm_C
#endif
}
+
+/* Modified from http://developer.apple.com/qa/qa2001/qa1026.html */
+
+#if TARGET_API_MAC_CARBON
+#ifdef __APPLE_CC__
+#include <Carbon/Carbon.h>
+#else
+#include <Carbon.h>
+#endif
+#else
+#include <Types.h>
+#include <OSA.h>
+#include <AppleScript.h>
+#endif
+#include <string.h>
+ /* LowRunAppleScript compiles and runs an AppleScript
+ provided as text in the buffer pointed to by text. textLength
+ bytes will be compiled from this buffer and run as an AppleScript
+ using all of the default environment and execution settings. If
+ resultData is not NULL, then the result returned by the execution
+ command will be returned as typeChar in this descriptor record
+ (or typeNull if there is no result information). If the function
+ returns errOSAScriptError, then resultData will be set to a
+ descriptive error message describing the error (if one is
+ available). */
+
+static OSStatus LowRunAppleScript (
+ const void* text,
+ long textLength,
+ AEDesc *resultData
+)
+
+{
+ ComponentInstance theComponent;
+ AEDesc scriptTextDesc;
+ OSStatus err;
+ OSAID scriptID, resultID;
+
+ /* set up locals to a known state */
+ theComponent = NULL;
+ AECreateDesc (typeNull, NULL, 0, &scriptTextDesc);
+ scriptID = kOSANullScript;
+ resultID = kOSANullScript;
+
+ /* open the scripting component */
+ theComponent = OpenDefaultComponent (kOSAComponentType, typeAppleScript);
+ if (theComponent == NULL) {
+ err = paramErr;
+ goto bail;
+ }
+
+ /* put the script text into an aedesc */
+ err = AECreateDesc (typeChar, text, textLength, &scriptTextDesc);
+ if (err != noErr) goto bail;
+
+ /* compile the script */
+ err = OSACompile (theComponent, &scriptTextDesc, kOSAModeNull, &scriptID);
+ if (err != noErr) goto bail;
+
+ /* run the script */
+ err = OSAExecute (theComponent, scriptID, kOSANullScript, kOSAModeNull, &resultID);
+
+ /* collect the results - if any */
+ if (resultData != NULL) {
+ AECreateDesc (typeNull, NULL, 0, resultData);
+ if (err == errOSAScriptError) {
+ OSAScriptError (theComponent, kOSAErrorMessage, typeChar, resultData);
+ } else if (err == noErr && resultID != kOSANullScript) {
+ OSADisplay (theComponent, resultID, typeChar, kOSAModeNull, resultData);
+ }
+ }
+bail:
+ AEDisposeDesc (&scriptTextDesc);
+ if (scriptID != kOSANullScript) OSADispose (theComponent, scriptID);
+ if (resultID != kOSANullScript) OSADispose (theComponent, resultID);
+ if (theComponent != NULL) CloseComponent (theComponent);
+ return err;
+}
+
+
+extern void Nlm_SendAppleScriptString (Nlm_CharPtr script)
+
+{
+ if (Nlm_StringHasNoText (script)) return;
+ LowRunAppleScript ((const char*) script, Nlm_StringLen (script), NULL);
+}
+
+
extern void Nlm_GetFileTypeAndCreator (Nlm_CharPtr filename, Nlm_CharPtr type, Nlm_CharPtr creator);
extern void Nlm_GetFileTypeAndCreator (Nlm_CharPtr filename, Nlm_CharPtr type, Nlm_CharPtr creator)
{
- OSType fCreator;
- Nlm_Int2 fError;
- FInfo fInfo;
- OSType fType;
- Nlm_Char temp [256];
-
- if (type != NULL) {
- *type = '\0';
- }
- if (creator != NULL) {
- *creator = '\0';
- }
- Nlm_StringNCpy_0 (temp, filename, sizeof(temp));
- Nlm_CtoPstr ((Nlm_CharPtr) temp);
- fError = HGetFInfo ( 0, 0, (StringPtr) temp, &fInfo);
- if (fError == 0) {
- fType = fInfo.fdType;
- fCreator = fInfo.fdCreator;
- StringNCpy_0 (type, (Nlm_CharPtr) (&fType), 5);
- StringNCpy_0 (creator, (Nlm_CharPtr) (&fCreator), 5);
+ OSStatus err;
+
+ FSRef fsref;
+ err = FSPathMakeRef ((const UInt8 *)filename, &fsref, NULL);
+ if (err)
+ return;
+
+ FSCatalogInfo catinfo;
+ err = FSGetCatalogInfo (&fsref, kFSCatInfoGettableInfo, &catinfo, NULL, NULL, NULL);
+
+ if (err == noErr && (catinfo.nodeFlags & kFSNodeIsDirectoryMask) == 0)
+ {
+ FileInfo finfo;
+ memcpy(&finfo, &catinfo.finderInfo, sizeof(finfo));
+
+ if (type)
+ {
+ *(Nlm_Int4 *)type = htonl (finfo.fileType);
+ type[4] = 0;
+ }
+ if (creator)
+ {
+ *(Nlm_Int4 *)creator = htonl (finfo.fileCreator);
+ creator[4] = 0;
+ }
}
}
#endif
@@ -6261,33 +6074,39 @@ static void Nlm_FntDlgRedrawSample (void)
/* alexs (01-16-95): add platform-dependent for MAC */
#ifdef WIN_MAC
-static MenuHandle menuHforFontList = 0;
-
-static Nlm_Int2 Nlm_FntDlgGetSysFontList (Nlm_Boolean monoSpace )
-{
- int curItemNum;
- short famId;
- char fontName[256];
-
- menuHforFontList = NewMenu ( 100, (StringPtr) "" );
- AppendResMenu ( menuHforFontList, 'FONT' );
- if ( monoSpace ){
- for (curItemNum = (Nlm_Int2)CountMenuItems(menuHforFontList);
- curItemNum > 0; curItemNum-- ){
- GetMenuItemText ( menuHforFontList, curItemNum, (StringPtr) fontName );
- GetFNum((StringPtr) fontName, &famId);
- TextSize (12);
- TextFace (0);
- TextFont (famId);
- if ( (CharWidth('i') != CharWidth('M')) ||
- (CharWidth('i') != CharWidth(' '))){
- DeleteMenuItem (menuHforFontList,curItemNum);
- }
+MenuHandle menuHforFontList;
+static Nlm_Int2 Nlm_FntDlgGetSysFontList (Nlm_Boolean monoSpace)
+{
+ CreateNewMenu (100, 0, &menuHforFontList);
+ CreateStandardFontMenu (menuHforFontList, 0, 0, 0, NULL);
+
+ if (monoSpace)
+ {
+ int item;
+ for (item = CountMenuItems (menuHforFontList); item > 0; item--)
+ {
+ CFStringRef cfname = NULL;
+ CopyMenuItemTextAsCFString (menuHforFontList, item, &cfname);
+
+ int size = CFStringGetMaximumSizeForEncoding (CFStringGetLength (cfname), kCFStringEncodingUTF8);
+ char *name = malloc (size + 1);
+ CFStringGetCString (cfname, name, size + 1, kCFStringEncodingUTF8);
+
+ Nlm_FonT font = Nlm_GetFont (name, 12, 0, 0, 0, "");
+
+ int i = Nlm_CharWidth ('i');
+ int M = Nlm_CharWidth ('M');
+ int s = Nlm_CharWidth (' ');
+ if( i != M || i != s )
+ DeleteMenuItem (menuHforFontList, item);
+
+ free (name);
+ CFRelease (cfname);
}
- Nlm_SelectFont (Nlm_systemFont);
}
- return (Nlm_Int2)CountMenuItems(menuHforFontList);
+
+ return CountMenuItems (menuHforFontList);
}
static void Nlm_FntDlgGetSysFontName (Nlm_Int2 n, Nlm_CharPtr buf,
diff --git a/vibrant/vibwndws.c b/vibrant/vibwndws.c
index ea9a1105..0aa59f96 100644
--- a/vibrant/vibwndws.c
+++ b/vibrant/vibwndws.c
@@ -29,676 +29,16 @@
*
* Version Creation Date: 7/1/91
*
-* $Revision: 6.79 $
+* $Revision: 6.80 $
*
* File Description:
* Vibrant main, event loop, and window functions
*
* Modifications:
* --------------------------------------------------------------------------
-* $Log: vibwndws.c,v $
-* Revision 6.79 2007/06/18 12:21:29 ivanov
-* Fixed EOLs
*
-* Revision 6.78 2007/06/15 20:27:27 kans
-* CreateNewWindow does not set window title, so revert to old function for now
-*
-* Revision 6.77 2007/05/09 16:42:10 kans
-* use CreateNewWindow instead of NewWindow or NewCWindow (RS)
-*
-* Revision 6.76 2007/05/02 17:24:03 kans
-* preparation for supporting Quartz on Mac
-*
-* Revision 6.75 2006/12/13 17:27:24 kans
-* Nlm_VibMainPrelude and Nlm_VibMainFinale called by separate vibmain.c file containing main or WinMain
-*
-* Revision 6.74 2006/11/24 20:06:31 kans
-* include Carbon/Carbon.h if not MWERKS - attempting to simplify Xcode search paths
-*
-* Revision 6.73 2006/09/14 19:18:29 ivanov
-* Rollback last changes. All missed defines added to corelib/ncbiwin.h.
-*
-* Revision 6.72 2006/09/14 18:05:45 ivanov
-* Fixed compilation errors on MS Windows
-*
-* Revision 6.71 2006/09/14 14:45:39 kans
-* changes for 64-bit Windows (GC) plus a few CodeWarrior complaints (JK)
-*
-* Revision 6.70 2005/11/16 19:50:37 kans
-* Nlm_showGetArgTag always TRUE, do not get shift key for old Vibrant about box
-*
-* Revision 6.69 2005/07/18 15:15:18 kans
-* fixed minor xcode compiler warnings
-*
-* Revision 6.68 2005/01/24 15:02:40 kans
-* remove unnecessary and uninitialized StringMove (tmp...) in GetArgs_ST
-*
-* Revision 6.67 2005/01/13 18:47:01 kans
-* Nlm_showGetArgTag set by Nlm_GetReady, used by GetArg_ST
-*
-* Revision 6.66 2004/07/19 13:37:24 bollin
-* adjusted FixVisibilityIssues function to handle nesting of groups
-*
-* Revision 6.65 2004/07/16 18:47:29 bollin
-* added FixVisibilityIssues function to handle LessTif problems with not correctly hiding
-* widgets before the parent widget is managed.
-* Also replaced obsolete XmFontListCreate function to get rid of run-time warning.
-*
-* Revision 6.64 2004/06/02 15:53:17 bollin
-* fixed Nlm_ProcessKeyPress for MOTIF to handle arrow keys
-*
-* Revision 6.63 2004/06/02 14:54:33 bollin
-* fixed Nlm_ProcessKeyPress to also handle arrow keys
-*
-* Revision 6.62 2004/04/14 19:14:06 sinyakov
-* WIN_MSWIN: support X-Windows-like -bg color command line option
-*
-* Choi: Added support for either the left or right monitor being the primary
-* monitor in a dual monitor setup. Added function Nlm_UsePrimaryMonitor.
-*
-* Choi: modified Nlm_SetupWindows to use the virtual screen
-* size to support dual monitor setups. this effectively limits our target
-* platform to WINVER >= 0x0500 (Windows2000 or later) which all indexers
-* have. modified Nlm_HasDualScreen to use system metrics call for
-* windows2000 or later platforms.
-*
-* Revision 6.61 2004/02/03 23:34:58 sinyakov
-* Nlm_WindowGainFocus(): call Nlm_GetNext() before calling Nlm_DoGainFocus()
-*
-* Revision 6.60 2004/01/20 23:35:38 sinyakov
-* [WIN_MSWIN] implemented menu accelerators
-*
-* Revision 6.59 2004/01/05 18:42:40 kans
-* record screen mode at time of window creation
-*
-* Revision 6.58 2004/01/05 17:08:09 kans
-* added functions to control use of dual screens
-*
-* Revision 6.57 2003/12/03 17:45:21 kans
-* For OS_MAC, always include Profiler.h
-*
-* Revision 6.56 2003/11/17 17:03:30 kans
-* changed C++ style comments to C comments
-*
-* Revision 6.55 2003/11/03 21:57:48 sinyakov
-* WIN_MSWIN: added ability to put a message into message processing loop
-* to call a callback function within the main GUI thread
-* callback function address is passed in WPARAM,
-* callback function parameter is passed in LPARAM
-* this functionality is used by Win32 implementation of smartnet.c module
-*
-* Revision 6.54 2003/04/09 18:16:53 kans
-* motif version of Nlm_ProcessKeyPress sets ctrlKey and shftKey, clears cmmdKey and optKey, leaves dblClick alone
-*
-* Revision 6.53 2003/01/27 17:43:03 kans
-* do not set silent if xx_argc > 1
-*
-* Revision 6.52 2003/01/24 20:55:42 rsmith
-* ConvertFilename now extern not static, renamed Nlm_* and only defined in vibutils.c
-*
-* Revision 6.51 2002/11/06 21:32:50 ucko
-* Accept "--help" as a synonym for the less intuitive "-"
-*
-* Revision 6.50 2002/07/09 15:20:19 lavr
-* Call CONNECT_Init(0) in initialization sequence
-*
-* Revision 6.49 2002/06/13 16:15:13 kans
-* fix includes for OS_UNIX_DARWIN with WIN_MAC (EN) - still bug in vibutils.c file dialog
-*
-* Revision 6.48 2002/05/07 16:50:14 bazhin
-* Changes in Nlm_SetWindowConfigureCallback().
-*
-* Revision 6.47 2002/04/30 18:25:12 bazhin
-* Added function "Nlm_SetWindowConfigureCallback(WindoW w)", which
-* allows to catch events, when window just moved without resizing.
-* Fixed some "gcc -Wall -ansi" warnings.
-*
-* Revision 6.46 2002/03/28 13:30:28 kans
-* check for OS_UNIX_DARWIN before including MoreCarbonAccessors.h, Profiler.h (EN)
-*
-* Revision 6.45 2002/03/18 16:55:19 kans
-* ProfilerInit stackDepth parameter to 50
-*
-* Revision 6.44 2002/03/18 16:33:53 kans
-* ProfilerInit numFunctions parameter to 1000
-*
-* Revision 6.43 2001/11/26 21:25:04 juran
-* Define type AERefCon as SInt32 for AE handler prototypes.
-* It may need to be UInt32 for pre-3.4 Universal Interfaces under Carbon, or something.
-*
-* Revision 6.42 2001/08/29 17:35:38 juran
-* Universal Interfaces 3.4 changes:
-* AE handler refCon is an SInt32.
-* convertClipboardFlag doesn't exist under Carbon.
-*
-* Revision 6.41 2001/05/14 20:50:09 juran
-* Remove Mac clipboard code -- the scrap is updated whenever it's used.
-*
-* Revision 6.40 2001/04/18 18:39:29 juran
-* AE handlers take a UInt32 refCon.
-*
-* Revision 6.39 2001/04/05 20:32:34 juran
-* Major Carbon changes, including the new Scrap Manager (not tested).
-*
-* Revision 6.38 2000/06/15 20:51:45 vakatov
-* Use "const" in Args code
-*
-* Revision 6.37 2000/03/31 16:14:13 thiessen
-* fix modal window lockout bug
-*
-* Revision 6.36 2000/02/03 22:29:16 lewisg
-* make windows version of vibrant use standard color
-*
-* Revision 6.35 2000/01/13 23:37:14 beloslyu
-* changes because of port to HP-UX 11.0
-*
-* Revision 6.34 2000/01/07 00:22:47 thiessen
-* fixes for LessTif and OpenGL X visual selection
-*
-* Revision 6.33 1999/12/30 16:47:10 kans
-* Carbon changes (Churchill)
-*
-* Revision 6.32 1999/12/21 18:04:24 kans
-* removed MPW/THINKC conditional code, starting upgrade to Carbon compatibility - Churchill
-*
-* Revision 6.31 1999/12/07 19:18:58 thiessen
-* fixed font color problem in OpenGL on SGI
-*
-* Revision 6.30 1999/10/27 20:17:32 thiessen
-* when _OPENGL is defined, make Motif choose a better-than-8-bit color depth, if possible
-*
-* Revision 6.29 1999/07/21 17:57:42 vakatov
-* GetArgs_ST(): fixed array boundary read
-*
-* Revision 6.28 1999/07/08 14:49:26 kans
-* MultiLinePrompt copies string to avoid modifying read-only string passed in from GetArgs when Mac virtual memory is on
-*
-* Revision 6.27 1999/06/22 15:14:53 lewisg
-* fix image library so that works on linux with > 8 bits
-*
-* Revision 6.26 1999/04/22 15:19:01 vakatov
-* Call XtUnrealizeWidget() before XtDestroyWidget() to make sure no
-* "post-mortem" callbacks(registered by XtAddEventHandler()) get
-* triggered for the destroyed widget. Reason: the widget may not be
-* immediately destroyed if XtDestroyWidget() was called in a nested
-* event dispatch loop.
-*
-* Revision 6.25 1999/04/06 14:23:27 lewisg
-* add opengl replacement for viewer3d
-*
-* Revision 6.24 1999/03/17 15:10:50 vakatov
-* + Nlm_XLoadStandardFont() to find a "last-resort" font
-*
-* Revision 6.23 1999/02/11 21:34:37 kans
-* check __profile__ symbol to turn on Mac profiling
-*
-* Revision 6.22 1999/02/10 22:22:14 kans
-* added commented-out CodeWarrior Profiler setup instructions
-*
-* Revision 6.21 1999/01/29 18:42:57 kans
-* appearancelib and navigationlib ifdef OS_MAC and PROC_PPC
-*
-* Revision 6.20 1999/01/21 23:58:32 kans
-* Mac navigation services code ifdefed out because is available function does not appear to work properly
-*
-* Revision 6.19 1999/01/06 02:52:00 kans
-* support for Mac Navigation Services file selection dialogs
-*
-* Revision 6.18 1998/12/14 18:39:11 kans
-* okayToDrawContents extern, used to inhibit slate drawing
-*
-* Revision 6.17 1998/12/10 21:28:50 kans
-* okayToDrawContents accessed only in WIN_MAC section
-*
-* Revision 6.16 1998/12/10 17:45:09 kans
-* okayToDrawContents to suppress drawing after return from Main
-*
-* Revision 6.15 1998/12/01 17:41:58 vakatov
-* Use just "0" instead of "(caddr_t)NULL" -- (a compilation fix)
-*
-* Revision 6.14 1998/07/14 16:44:29 vakatov
-* Added VibrantIsGUI() and <internal> Nlm_VibrantSetGUI()
-*
-* Revision 6.13 1998/03/22 03:01:11 kans
-* changed names to RegisterServiceProc and RegisterResultProc
-*
-* Revision 6.12 1998/03/22 02:33:30 kans
-* added request proc, result proc, message handlers to support, and send open doc event, launch app now work with file names or signatures
-*
-* Revision 6.11 1998/03/09 21:03:47 vakatov
-* FetchArg(), float|int: fixed for assignment of default value
-*
-* Revision 6.10 1998/01/08 21:33:32 kans
-* OS_AXP_VMS includes <Xm/StdCmap.h>
-*
-* Revision 6.9 1997/11/27 05:52:16 vakatov
-* [WIN_X] "defaultXerror_handler()" -- fixed non-portable(internal X11) code
-*
-* Revision 6.7 1997/11/21 19:31:23 vakatov
-* [WIN_X] "defaultXerror_handler()" -- issue a std X error msg, don't crash
-*
-* Revision 6.6 1997/11/12 20:56:14 kans
-* added SetMouseMoveCallback and SetMouseMoveRegion, implemented first on Mac
-*
-* Revision 6.5 1997/10/30 19:30:47 kans
-* added Nlm_DisplayEnvironmentVariables for Solaris
-*
-* Revision 6.4 1997/10/01 21:51:52 vakatov
-* Trying to catch strayed Expose or MapNotify(for SetVisible(...)) event
-*
-* Revision 6.3 1997/09/29 20:00:51 vakatov
-* [WIN_X11] Do not parse "-d" cmd.-line, use "-dpy" instead(or "-display")
-*
-* Revision 6.2 1997/09/22 23:51:23 vakatov
-* [WIN_MSWIN] ParseSetupArguments(): remove leading quote from cmd-line args
-*
-* Revision 6.1 1997/09/17 21:09:05 vakatov
-* [WIN_X] Parse command-line "-d" / "-display" options to choose X-display
-*
-* Revision 6.0 1997/08/25 18:58:01 madden
-* Revision changed to 6.0
-*
-* Revision 5.71 1997/08/14 18:54:45 vakatov
-* [WIN_MOTIF] Let X11 parse the command-line args at first; leave the
-* rest(not fetched by X11) for NCBI-wise arg. processing
-*
-* Revision 5.70 1997/08/08 14:43:08 vakatov
-* [WIN_X] Nlm_XCheckUpdateEvent() -- check for mapping and expose events
-*
-* Revision 5.69 1997/08/01 16:47:32 vakatov
-* [WIN_MOTIF,WIN_MSWIN] Added IconifyWindow() and IconicWindow()
-*
-* Revision 5.68 1997/07/23 16:39:02 vakatov
-* [WIN_MSWIN] ParseSetupArguments() -- fixed a quote("') handling bug
-*
-* Revision 5.67 1997/07/22 19:12:17 vakatov
-* Separated Main() from GetArg[svc]() functions; [WIN_MSWIN] converged
-* console and GUI libraries; [for WIN32-DLL] encapsulated global variables
-*
-* Revision 5.66 1997/07/18 17:01:17 vakatov
-* [WIN_MOTIF] Removed "arg[cv]"; use "Nlm_GetArg[cv]()" instead
-*
-* Revision 5.65 1997/07/14 19:31:04 vakatov
-* [WIN_X] Nlm_NewWindow() -- use common Vibrant colormap(and visual, and
-* depth) if failed to create Nlm_BusyColormap()
-*
-* Revision 5.64 1997/07/14 16:25:02 vakatov
-* Nlm_RemoveDyingWindows() -- look for Nlm_currentXWindow starting from
-* the shell level(was -- from the BullBoard level)
-*
-* Revision 5.63 1997/07/10 21:49:50 vakatov
-* [WIN_X] Now able to manage windows having different depths(and
-* different visuals and GC).
-*
-* Revision 5.62 1997/07/02 18:46:07 vakatov
-* [WIN_X11] If non-default colormap is used for a window -- make the
-* window to use the relevant visual(PseudoColor or GrayScale)
-*
-* Revision 5.61 1997/06/24 18:20:41 vakatov
-* Keep Nlm_dialogTextHeight value in-sync with the "vibtexts.c" R5.8 fixes
-*
-* Revision 5.60 1997/06/23 22:10:52 vakatov
-* [WIN_MOTIF,WIN_MSWIN] GetArgs_ST() -- parse command line arguments
-* close to the console version
-*
-* Revision 5.59 1997/06/19 20:34:58 vakatov
-* [WIN_MSWIN] Do not set the window class cursor to IDC_ARROW -- to avoid
-* confusing with the alternative cursors set by Vibrant application
-*
-* Revision 5.58 1997/06/18 20:00:27 kans
-* removed extra parenthesis
-*
-* Revision 5.57 1997/06/18 19:05:54 kans
-* protect against NULL curarg->to or curarg->from
-*
-* Revision 5.56 1997/06/09 21:54:49 vakatov
-* [WIN_X] #include <X11/Xatom.h> to fit old versions of X11
-*
-* Revision 5.55 1997/06/09 18:53:39 vakatov
-* [WIN_X] Use(create if necessary) standard RGB_DEFAULT_MAP colormap as
-* the Vibrant default colormap, if possible. Nlm_XAllocColor() moved from
-* "ncbidraw.c" and made external.
-*
-* Revision 5.54 1997/05/27 21:51:00 vakatov
-* Added Nlm_PopupParentWindow() to popup window w/o switching input focus
- *
- * Revision 5.53 1997/05/23 17:32:53 kans
- * added GetArgv, GetArgc for Mac
- *
- * Revision 5.52 1997/05/16 21:00:12 vakatov
- * [WIN_X11] WindowStructFocusCallback() -- replaced XtFree() by XFree()
- *
- * Revision 5.51 1997/05/16 16:44:47 vakatov
- * [WIN_MSWIN,WIN32] Addition to R5.49 -- do not abort() the failed
- * application; just popup an error message and then rely on the default
- * exception handler
- *
- * Revision 5.50 1997/05/15 15:14:17 vakatov
- * [WIN_MSWIN] Tune the StaticPrompt, etc. background color to match the
- * parent window background color
- *
- * Revision 5.49 1997/05/08 15:45:05 vakatov
- * [WIN_MSWIN,WIN32] Abort() application in the case of unhandled
- * exception -- to prevent endless loop with the diagnostic dialog box
- *
- * Revision 5.48 1997/05/06 19:00:16 epstein
- * don't modify window title if environment variable is 0; this is a workaround for subtool
- *
- * Revision 5.47 1997/04/29 14:45:13 epstein
- * corrections to tagged window titles
- *
- * Revision 5.46 1997/04/28 19:36:49 epstein
- * when VIBRANT_USE_APPLICATION_NAME environment variable is set, prepend program name unto each window
- *
- * Revision 5.45 1997/04/25 16:11:28 vakatov
- * [WIN_MOTIF] Register navigation key translation actions
- * [WIN_MOTIF, WIN_MSWIN] Catch and render(DoSendFocus) navigation key events
- *
- * Revision 5.44 1997/04/17 16:17:50 kans
- * InitForms and FreeForms called
- *
- * Revision 5.43 1997/03/19 16:00:18 vakatov
- * Added QuittingProgram() -- useful to timely break internal event loops
- *
- * Revision 5.42 1997/02/28 20:10:03 vakatov
- * Nlm_CleanUpWindows(): call to Nlm_RemoveDyingWindows() at first!
- *
- * Revision 5.41 1997/02/28 19:09:58 vakatov
- * [NLM_RISKY] Nlm_Add/DelSubwindowShell(): set "allShells" properly in
- * order to avoid discrepancy with later use of Nlm_GetWindowData()
- *
- * Revision 5.40 1997/02/21 19:24:16 vakatov
- * Do not apply fallback resources when running on a B&W screen
- *
- * Revision 5.39 1997/02/13 22:26:30 vakatov
- * Nlm_CleanUpWindows(), Nlm_RemoveDyingWindows() -- remove the window
- * menubar *after*(not *before*) removal of other window children
- * [WIN_MOTIF] Nlm_RemoveDyingWindows() -- let the removed shell be
- * dangling(see R5.38) only if NLM_MOTIF_CASCADEB_BUG is set
- *
- * Revision 5.38 1997/01/14 22:09:10 vakatov
- * Workaround for the MOTIF/X11 bug(see also "vibmenus.c", Rev. 5.17) --
- * do not completely destroy the shells having menubars -- let them
- * dangling. It still looks better than a program crash...
- * Fixed inaccurate string copying -- <mostly potential> 1-byte exceeding of
- * the string size by StringNCat; missing terminating '\0' by StringNCpy.
- * Removed some unused variables; set preprocessor conditions more
- * thoroughly to exclude some functions from the compilation on some platforms.
- *
- * Revision 5.37 1997/01/02 16:03:19 vakatov
- * [WIN_MOTIF] Revert input focus to "PointerRoot" rather than to "None"
- *
- * Revision 5.36 1996/12/30 17:42:38 vakatov
- * [WIN_MOTIF] Fixed Nlm_ProcessKeyPress() -- do not put uninitialized(stack-
- * located) input arguments to the XLookupString(); use NULL instead.
- *
- * Revision 5.35 1996/12/30 15:12:35 vakatov
- * Made all argument conversions be performed in the <new> FetchArg() routine.
- * Nlm_GetArgs() function rearranged: added command-line arguments parsing
- * for MS-Windows and let one avoid posting of the arg-query dialog if all
- * arguments can be resolved by default or using the program command line.
- *
- * Revision 5.34 1996/12/13 17:27:38 kans
- * added GetArgv and GetArgc for WIN_MOTIF only
- *
- * Revision 5.33 1996/12/03 18:30:05 vakatov
- * [WIN_MSWIN] Added (static) function win2client() to calculate client
- * rectangle on the base of the known top-level window rectangle. Added
- * (static) function OnSizeMove() to re-implement(and fix) the MyCls_OnSize()
- * and MyCls_OnMove() window callbacks.
- *
- * Revision 5.32 1996/11/22 19:15:13 vakatov
- * [WIN_MSWIN] Nlm_SetColorCell(): invalidate rather than animate
- *
- * Revision 5.31 1996/11/12 21:59:46 vakatov
- * [WIN_MOTIF] Nlm_ResizeWindow(): count the menubar height when SetRect()
- *
- * Revision 5.30 1996/11/07 15:25:52 vakatov
- * [WIN_MOTIF] IsXParentOf(): test for "children" != NULL
- *
- * Revision 5.29 1996/11/05 23:32:35 vakatov
- * [WIN_MSWIN] Fit window into the screen borders on the window creation
- * or resizing; changed the style definition(but not appearance) of
- * ShadowWindow; +extensive type casting
- *
- * Revision 5.28 1996/10/30 16:06:42 vakatov
- * Nlm_XrmGetResource1(): replaced XrmGetDatabase() by XtDatabase() to
- * suit X11R4 function set.
- *
- * Revision 5.27 1996/10/29 22:09:29 vakatov
- * [WIN_MOTIF] Nlm_VibrantDefaultColormap(): Replaced X resource value
- * converters(which are absent in X releases < X11R5) by the hand-written
- * code; and made the "privateColormap" resorce value "false" by default.
- *
- * Revision 5.26 1996/10/28 21:24:24 vakatov
- * [WIN_MOTIF][_DEBUG] Removed extra debug print
- *
- * Revision 5.25 1996/10/28 19:32:14 vakatov
- * [WIN_MOTIF]
- * Nlm_BusyColorMap(): added special case to create new colormap where
- * only specified number of colorcells "inherited" from the default
- * will be allocated.
- * Added Nlm_XrmGetResource2(), Nlm_XrmGetResource1() and
- * Nlm_XrmGetResource() functions and modified Nlm_SetupWindows()
- * to handle user-specified X-resources.
- * Added Nlm_VibrantDefaultColormap() to initialize the application
- * colormap according to the newly introduced Vibrant/X11 recources
- * "nPrivateColormap" and "nInheritColors".
- * Made a lot of type castings to get rid of all compiler warnings.
- *
- * Revision 5.24 1996/10/21 21:38:16 vakatov
- * [WIN_MOTIF] Renamed WindowResizeCallback() to WindowStructFocusCallback()
- * and made it call DoActivate/DoDeactivate when accepting/loosing
- * input focus -- to sync. with [WIN_MSWIN] behaviour. Removed explicit
- * (not quite correct) calls to DoActivate/DoDeactivate.
- *
- * Revision 5.23 1996/10/21 15:21:11 vakatov
- * [WIN_MOTIF] WindowResizeCallback() <on the mapping event>: protected
- * from setting input focus to yet(or already) unmapped window
- *
- * Revision 5.22 1996/10/01 16:11:27 kans
- * wasn't setting ctrlKey on Mac
- *
- * Revision 5.21 1996/09/26 00:40:05 kans
- * on remove window, immediately null out window timer
- *
- * Revision 5.20 1996/09/26 00:29:23 kans
- * added SetWindowTimer
- *
- * Revision 5.19 1996/08/29 20:46:46 vakatov
- * [WIN_MSWIN] Synchronized Nlm_Get- and Nlm_SetWindowPosition
- *
- * Revision 5.18 1996/08/27 16:34:24 vakatov
- * [WIN_MOTIF] Nlm_SelectWindow() : fixed a case when it did not set input
- * focus to the selected window sometimes.
- *
- * Revision 5.17 1996/08/19 21:24:00 vakatov
- * [WIN_MOTIF] Set default ToggleButton's foreground to "blue" --
- * "dark blue" is absent sometimes, somewhere.
- *
- * Revision 5.16 1996/07/26 17:56:57 vakatov
- * [WIN_MOTIF] Nlm_NewWindow() : had to specify the MainWindow's colormap
- * explicitly to make LINUX/MOO-TIFF/X11 properly accept the colormap
- *
- * Revision 5.15 1996/07/23 21:36:05 vakatov
- * [WIN_MOTIF] Nlm_BusyColorMap() : do not redefine 0th color
- * [WIN_MOTIF] Nlm_HideWindow() : do not change input focus is it
- * does not belong to the window being hided
- *
- * Revision 5.14 1996/07/19 19:44:51 vakatov
- * [WIN_MOTIF] Nlm_RemoveDyingWindows() : set Nlm_currentXWindow to NULL
- * if it points to either the dying window or one of its children;
- * added new function IsXParentOf() determining whether the given window
- * is the parent of another one.
- *
- * Revision 5.13 1996/07/18 16:49:03 vakatov
- * [WIN_MOTIF] Nlm_SelectWindow() : Removed extra call of XSetInputFocus()
- *
- * Revision 5.12 1996/07/17 16:24:05 vakatov
- * [WIN_MOTIF] Nlm_Hide()/WM/Nlm_Select() case -- the input focus quirk fixed
- *
- * Revision 5.11 1996/06/24 17:00:21 vakatov
- * [WIN_MOTIF] Nlm_Select() now seems to work properly for all cases
- *
- * Revision 5.10 1996/06/24 16:05:08 vakatov
- * [WIN_MOTIF] Fixed bug in Nlm_Select()
- *
- * Revision 5.9 1996/06/19 21:15:28 vakatov
- * [WIN_MOTIF] Made Nlm_Select() to select(pop-up) the specified window
- * in most cases; there is still a problem when Nlm_Select is called just AFTER
- * (not before) hiding of another Vibrant window which has current input focus --
- * some WMs are "too smart" and in some special conditions takes control over
- * the "focus inheritance" after the dying window.
- *
- * Revision 5.8 1996/06/18 21:57:42 vakatov
- * [WIN_MOTIF] Made ModalWindow to be really modal
- *
- * Revision 5.7 1996/06/17 21:57:17 kans
- * InvalObject in Nlm_SetColorCell on Mac
- *
- * Revision 5.6 1996/06/17 17:00:47 vakatov
- * [WIN_MSWIN] The shell window's border/caption/menu-bar dimensions are to
- * be taken into account inside the Nlm_ResizeWindow() function
- *
- * Revision 5.5 1996/06/14 14:32:24 vakatov
- * [WIN_MOTIF] Added cMap_fixed field to WindowData structure to indicate
- * fixed(having reserved cells for Motif colors) colormap attached to
- * the window.
- * SetColorMap() function partially rewritten to treate the fixed colormap
- * under WIN_MOTIF and to reserve colorcells for animation under WIN_MSWIN.
- * Added Nlm_SetColorCell() -- to immediately change the color appearence.
- * [WIN_MOTIF] Added Nlm_RestrictMotifColorsTo() -- to avoid Motif/3D-Viewer
- * color overlapping; it is now called inside "Nlm_NewWindow()" before
- * initializing Motif resources
- *
- * Revision 5.3 1996/06/03 19:12:32 vakatov
- * [WIN_MOTIF] Added hard-coding fallbacks to provide default set of
- * basic colors in Vibrant-based applications
- *
- * Revision 5.2 1996/05/30 20:06:07 vakatov
- * [WIN_MSWIN] <Shift> and <Ctrl> key status checking added to MainProc()
- *
- * Revision 5.1 1996/05/30 14:02:46 vakatov
- * [WIN_MOTIF] Corrected fallback resources to provide proper setting of the
- * background color under CDE
- *
- * Revision 4.29 1996/05/21 13:58:06 epstein
- * fix type for XtFree() calls
- *
- * Revision 4.28 1996/05/21 12:32:16 kans
- * prototypes for add, del subwindow shell
- *
- * Revision 4.27 1996/05/20 21:38:13 vakatov
- * [WIN_MOTIF] All "Widget" / "NULL" comparisons and assignments replaced
- * by the "Widget" / "(Widget)0" these
- *
- * Revision 4.26 1996/05/13 16:00:50 vakatov
- * WindowResizeCallback() modified to take into account the shell window
- * repositioning -- it is usually made by window manager when framing the
- * shell window with the WM-specific window border and title bar.
- *
- * Revision 4.24 1996/05/06 18:28:03 vakatov
- * Nlm_SetWindowDefaultButton() modified; some extra stuff removed
- *
- * Revision 4.23 1996/05/03 21:03:43 kans
- * removed erroneous textscrapfull = FALSE lines
- *
- * Revision 4.22 1996/05/03 20:27:25 kans
- * put back scrap fixes
- *
- * Revision 4.21 1996/05/03 20:05:22 vakatov
- * [WIN_MOTIF/_DEBUG] Added event handler to allow the Vibrant windows
- * to interact with the standard X-utility "editres";
- * this utility provides runtime read/write access to all widget attributes
- *
- * Revision 4.20 1996/05/02 20:59:16 kans
- * sets textScrapFull flag properly on startup, resume
- *
- * Revision 4.19 1996/04/30 19:52:19 vakatov
- * GetPosition() now returns actual position for a top-level window having menu bar
- *
- * Revision 4.18 1996/04/30 14:27:29 kans
- * copies text clipboard into text scrap on startup (Mac)
- *
- * Revision 4.17 1996/04/25 17:06:48 vakatov
- * Nlm_ShowDocument(): extraw = extrah = 0; for WIN_MSWIN
- *
- * Revision 4.16 1996/04/12 19:26:14 vakatov
- * "WindowResizeCallback()" corrected to provide regular extraction of
- * new window position (for the case of the window resizing --
- * rather than just moving)
- *
- * Revision 4.15 1996/03/27 23:10:13 vakatov
- * Function Nlm_SetCursorShape() added to let programmer
- * easily store/restore current cursor shape
- *
- * Revision 4.14 1996/03/19 23:19:36 kans
- * used proper gestalt selector, test, before registering apple events
- *
- * Revision 4.13 1996/03/13 21:40:00 epstein
- * export command-line arguments
- *
- * Revision 4.12 1996/03/12 20:06:10 epstein
- * fix drag-and-drop for Windows
- *
- * Revision 4.11 1996/03/11 23:25:23 kans
- * apple event open file handler added (modified from RasMol code)
- *
- * Revision 4.10 1996/03/11 20:37:56 epstein
- * add support for Drag & Drop
- *
- * Revision 4.9 1996/03/08 16:10:43 vakatov
- * Made Nlm_Update() for Motif/X11 to act more like that for
- * MS-Windows and Mac. However, it still avoid automatic (without a
- * Nlm_Update() call) recursive synchronization...
- *
- * Revision 4.8 1996/03/07 15:55:35 kans
- * invalidate whole content of resized window in mswin version (DV)
- *
- * Revision 4.7 1996/03/02 22:36:38 kans
- * reduction of X traffic (DV)
- *
- * Revision 4.6 1996/02/13 17:24:07 kans
- * accelerated set position prior to realization (Denis Vakatov)
- *
- * Revision 4.5 1996/01/19 00:55:46 kans
- * UseWindow sets theWindow, returned (on the Mac) by ActiveWindow
- *
- * Revision 4.4 1995/11/29 15:45:23 smirnov
- * Position of window (MOTIF only)
- *
- * Revision 4.3 1995/11/28 19:02:36 smirnov
- * GetWindowRect()/GetClientRect problem (AS) (MS-Windows only)
- *
- * Revision 4.2 1995/11/08 23:30:31 kans
- * removed edit block fields, which belong in the application
- *
- * Revision 4.1 1995/09/06 20:30:24 kans
- * fixed bug due to GetWindowRect vs. GetClientRect (AS + GS)
- *
- * Revision 2.88 1995/07/24 20:03:03 kans
- * removed duplicate ClearEditProcs, reference X11 colormap as integer
- *
- * Revision 2.87 1995/07/19 20:42:23 kans
- * window rectangle takes Motif menu bar height into account
- *
- * Revision 2.86 1995/06/28 21:48:57 kans
- * added Add and Del SubwindowShell (Alex)
- *
- * Revision 2.85 1995/06/13 16:30:38 kans
- * Motif version of GetArgs can parse remaining arguments in lieu of dialog
- *
- * Revision 2.83 1995/05/31 21:24:29 kans
- * XFreeColormap fix (AS)
- *
- * Revision 2.82 1995/05/31 18:00:58 kans
- * added SetColorMap and related code (AS)
- *
- * 08-24-94 Schuler Change try and except to __try and _except for
- * compatibility with Visual C 2.0
- *
- * ==========================================================================
- */
+* ==========================================================================
+*/
#include <vibtypes.h>
#include <vibprocs.h>
@@ -738,6 +78,23 @@
extern void Nlm_ConvertFilename ( FSSpec *fss, Nlm_CharPtr filename );
#endif
+/* remove this define to remove Quartz/Cocoa cursor handling
+ cursor calls will become no-ops if removed */
+/*
+#define WIN_MAC_QUARTZ_COCOA_CURSORS
+*/
+
+#ifdef WIN_MAC_QUARTZ
+#ifdef WIN_MAC_QUARTZ_COCOA_CURSORS
+/* needed to be able to access a bit of Cocoa */
+#include <CoreFoundation/CoreFoundation.h>
+char NSApplicationLoad(void);
+void *NSClassFromString(CFStringRef aClassName);
+void *NSSelectorFromString(CFStringRef aSelectorName);
+void *objc_msgSend(void *self, void *_cmd, ...);
+#endif
+#endif
+
#ifdef WIN_MAC
#ifndef Nlm_WindowTool
#define Nlm_WindowTool WindowPtr
@@ -854,6 +211,9 @@ Nlm_Boolean Nlm_usesMacNavServices = FALSE;
#ifdef WIN_MAC
EventRecord Nlm_currentEvent;
+#ifdef WIN_MAC_QUARTZ
+static void Nlm_DrawWindow (Nlm_GraphiC w, Nlm_Boolean drawGrowIcon);
+#endif
#ifdef __CONDITIONALMACROS__
/* Global RoutineDescriptors - from RasMol */
AEEventHandlerUPP HandleAEIgnorePtr;
@@ -1623,6 +983,9 @@ extern void Nlm_SetColorMap (Nlm_WindoW w, Nlm_Uint2 totalColors,
#endif
#ifdef WIN_MAC
+// QUARTZ_FIXME: there's no replacement for this in CG, does anything
+// need to be done?
+#ifndef WIN_MAC_QUARTZ
if ( wdata.cMap != NULL ){
if ( wdata.cMapStatus ){
SetPalette( wdata.handle, NULL, FALSE);
@@ -1646,6 +1009,7 @@ extern void Nlm_SetColorMap (Nlm_WindoW w, Nlm_Uint2 totalColors,
}
}
#endif
+#endif
#ifdef WIN_MOTIF
do { /* TRY */
@@ -2286,6 +1650,8 @@ static Nlm_WindoW Nlm_MakeWindowLink (Nlm_RectPtr r, Nlm_Int2 recordSize,
extern void Nlm_SetUpdateRegion (WindowPtr wptr)
{
+// QUARTZ_FIXME: what does this do? does it need to do anything?
+#ifndef WIN_MAC_QUARTZ
Rect bounds;
if (wptr != NULL) {
@@ -2295,6 +1661,7 @@ extern void Nlm_SetUpdateRegion (WindowPtr wptr)
Nlm_RectToolToRecT (&bounds, &Nlm_updateRect);
/* HUnlock ((Handle) Nlm_updateRgn); */
}
+#endif
}
#endif
@@ -2660,7 +2027,79 @@ static void win2client(Nlm_WindoW w,
}
#endif
+#ifdef WIN_MAC_QUARTZ
+// QUARTZ_FIXME: this stuff is probably not needed
+//static void Nlm_WindowSetProperty (WindowRef wptr, PropertyTag tag, void *ptr)
+//{
+// SetWindowProperty (wptr, 'NCBI', tag, sizeof(ptr), &ptr);
+//}
+//
+//static void *Nlm_WindowGetProperty (WindowRef wptr, PropertyTag tag)
+//{
+// void *ret = 0;
+// GetWindowProperty (wptr, 'NCBI', tag, sizeof(ret), 0, &ret);
+// return ret;
+//}
+//
+//static void Nlm_EnsureQuartzPort (CGContextRef *ctxPtr, HIViewRef imageView)
+//{
+// /* note: the context must actually be a bitmap context, this
+// is guaranteed since this function is the only one that
+// gets to make it anyway */
+// HIRect bounds;
+// HIViewGetBounds (imageView, &bounds);
+// int good = *ctxPtr != 0;
+// if (good)
+// {
+//
+// if (bounds.size.width != CGBitmapContextGetWidth (*ctxPtr))
+// good = 0;
+// if (bounds.size.height != CGBitmapContextGetHeight (*ctxPtr))
+// good = 0;
+// }
+// if (!good)
+// {
+// CGContextRelease (*ctxPtr);
+//
+// CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB ();
+// *ctxPtr = CGBitmapContextCreate (0, bounds.size.width, bounds.size.height, 32, 0, colorSpace, kCGImageAlphaNoneSkipLast);
+// CGColorSpaceRelease (colorSpace);
+// }
+//}
+//
+//CGContextRef Nlm_GetQuartzWindowPort (WindowRef wptr)
+//{
+// HIViewRef imageView = Nlm_WindowGetProperty (wptr, 'imgv');
+// CGContextRef ref = Nlm_WindowGetProperty (wptr, 'cntx');
+// CGContextRef old = ref;
+// Nlm_EnsureQuartzPort (&ref, imageView);
+// if (ref != old)
+// Nlm_WindowSetProperty (wptr, 'cntx', ref);
+// return ref;
+//}
+
+static OSStatus Nlm_RootHIViewRedrawHandler (EventHandlerCallRef handler, EventRef event, void *userData)
+{
+ Nlm_WindoW w = userData;
+
+ CGContextRef ctx;
+ GetEventParameter (event,
+ kEventParamCGContextRef,
+ typeCGContextRef,
+ NULL,
+ sizeof (CGContextRef),
+ NULL,
+ &ctx);
+ Nlm_SetPort (ctx);
+ Nlm_SetPortWindowPort (Nlm_ParentWindowPtr ((Nlm_GraphiC)w));
+ Nlm_DrawWindow ((Nlm_GraphiC)w, 0);
+ Nlm_SetPortWindowPort (NULL);
+ Nlm_SetPort (NULL);
+
+ return noErr;
+}
+#endif
#define DOCUMENT_STYLE 1
#define FIXED_STYLE 2
@@ -2700,7 +2139,7 @@ static void Nlm_NewWindow (Nlm_WindoW w, Nlm_Int2 type, Nlm_Int2 procID,
CCTabPtr colorPtr;
Nlm_RectTool rtool;
WindowClass winClass = 0;
- WindowAttributes winAttrs = 0; /* kWindowStandardHandlerAttribute; */
+ WindowAttributes winAttrs = kWindowCompositingAttribute; /* kWindowStandardHandlerAttribute; */
OSStatus osErr;
#endif
#ifdef WIN_MOTIF
@@ -2785,8 +2224,10 @@ static void Nlm_NewWindow (Nlm_WindoW w, Nlm_Int2 type, Nlm_Int2 procID,
}
behindNone = (Nlm_WindowTool) (-1);
+#ifndef WIN_MAC_QUARTZ
TextFont (0);
TextSize (0);
+#endif
Nlm_RecTToRectTool (&r, &rtool);
if (close == NULL) {
goAway = FALSE;
@@ -2810,6 +2251,53 @@ static void Nlm_NewWindow (Nlm_WindoW w, Nlm_Int2 type, Nlm_Int2 procID,
return;
}
#endif
+#ifdef WIN_MAC_QUARTZ
+ HIViewRef root = HIViewGetRoot (wptr);
+ HIViewRef content;
+ HIViewFindByID (root, kHIViewWindowContentID, &content);
+
+ EventTypeSpec updateEventSpec[] = { kEventClassControl, kEventControlDraw };
+ InstallEventHandler (GetControlEventTarget (content),
+ Nlm_RootHIViewRedrawHandler,
+ GetEventTypeCount (updateEventSpec),
+ updateEventSpec,
+ w,
+ NULL);
+
+// QUARTZ_FIXME: unneeded unless we really do need the triple buffer
+// HIViewRef imageView;
+// HIImageViewCreate (0, &imageView);
+//
+// HIViewAddSubview (root, imageView);
+// HIRect bounds;
+// HIViewGetBounds (root, &bounds);
+// HIViewSetFrame (imageView, &bounds);
+//
+// HILayoutInfo layout;
+// layout.version = kHILayoutInfoVersionZero;
+//
+// HIViewGetLayoutInfo (imageView, &layout);
+// layout.binding.top.toView = root;
+// layout.binding.top.kind = kHILayoutBindTop;
+// layout.binding.bottom.toView = root;
+// layout.binding.bottom.kind = kHILayoutBindBottom;
+// layout.binding.left.toView = root;
+// layout.binding.left.kind = kHILayoutBindLeft;
+// layout.binding.right.toView = root;
+// layout.binding.right.kind = kHILayoutBindRight;
+// HIViewSetLayoutInfo (imageView, &layout);
+// HIViewApplyLayout (imageView);
+// HIViewSetVisible (imageView, 1);
+//
+// char *path = "/Users/mikeash/bob_eggleton_adeepnessinthesky.jpg";
+// CFURLRef url = CFURLCreateFromFileSystemRepresentation (NULL, (const UInt8 *)path, strlen (path), 0);
+// CGDataProviderRef provider = CGDataProviderCreateWithURL (url);
+// CGImageRef img = CGImageCreateWithJPEGDataProvider (provider, NULL, 1, kCGRenderingIntentDefault);
+// HIImageViewSetImage (imageView, img);
+
+// Nlm_WindowSetProperty (wptr, 'imgv', imageView);
+
+#else
Nlm_SetPortWindowPort(wptr);
Nlm_currentWindowTool = wptr;
prt = (Nlm_PortTool) wptr;
@@ -2833,6 +2321,7 @@ static void Nlm_NewWindow (Nlm_WindoW w, Nlm_Int2 type, Nlm_Int2 procID,
GetBackColor (&Nlm_RGBbackColor);
}
#endif
+#endif
#ifdef WIN_MSWIN
if (close == NULL)
@@ -3303,9 +2792,11 @@ static void Nlm_ResizeWindow (Nlm_GraphiC w, Nlm_Int2 dragHeight,
#ifdef WIN_MAC
menuHeight = 21;
+#ifndef WIN_MAC_QUARTZ
TextFont (0);
TextSize (0);
#endif
+#endif
#ifdef WIN_MOTIF
if (Nlm_GetWindowMenuBar( (Nlm_WindoW)w ) != NULL)
menuHeight = Nlm_internalMenuBarHeight;
@@ -3821,9 +3312,11 @@ extern void Nlm_UseWindow (Nlm_WindoW w)
wptr = Nlm_ParentWindowPtr ((Nlm_GraphiC) w);
if (wptr && !Nlm_IsWindowDying( w )) {
#ifdef WIN_MAC
+#ifndef WIN_MAC_QUARTZ
Nlm_SetPortWindowPort(wptr);
Nlm_SetUpdateRegion (wptr);
Nlm_ResetDrawingTools();
+#endif
Nlm_theWindow = w;
#endif
#ifdef WIN_MSWIN
@@ -3926,10 +3419,12 @@ static void Nlm_SelectWindow(Nlm_GraphiC w, Nlm_Boolean savePort)
#ifdef WIN_MAC
SelectWindow (wptr);
+#ifndef WIN_MAC_QUARTZ
Nlm_SetPortWindowPort(wptr);
Nlm_SetUpdateRegion(wptr);
Nlm_ResetDrawingTools();
#endif
+#endif
#ifdef WIN_MSWIN
BringWindowToTop (wptr);
/* M.I */
@@ -4026,6 +3521,9 @@ extern void Nlm_EraseWindow (Nlm_WindoW w)
if (w != NULL) {
wptr = Nlm_ParentWindowPtr ((Nlm_GraphiC) w);
+#ifdef WIN_MAC_QUARTZ
+ HIViewSetNeedsDisplay (HIViewGetRoot (wptr), 1);
+#else
GetPort(&temp);
Nlm_SetPortWindowPort(wptr);
Nlm_ResetDrawingTools();
@@ -4036,6 +3534,7 @@ extern void Nlm_EraseWindow (Nlm_WindoW w)
Nlm_SetPort(temp);
Nlm_currentWindowTool = GetWindowFromPort(temp);
Nlm_Update();
+#endif
}
#endif
#ifdef WIN_MSWIN
@@ -4116,7 +3615,9 @@ static Nlm_Boolean Nlm_GrowClick (Nlm_GraphiC w, Nlm_PoinT pt)
if (windowLoc == inGrow) {
Nlm_LoadRect (&r, -32768, -32768, 32767, 32767);
Nlm_RecTToRectTool (&r, &rtool);
+#ifndef WIN_MAC_QUARTZ
ClipRect (&rtool);
+#endif
Nlm_GetWindowData ((Nlm_WindoW) w, &wdata);
Nlm_RecTToRectTool (&(wdata.growArea), &rtool);
newSize = GrowWindow (wptr, ptool, &rtool);
@@ -4127,7 +3628,9 @@ static Nlm_Boolean Nlm_GrowClick (Nlm_GraphiC w, Nlm_PoinT pt)
*/
GetPortBounds(GetWindowPort(wptr), &bounds);
if (! newSize) {
+#ifndef WIN_MAC_QUARTZ
ClipRect (&bounds);
+#endif
return rsult;
}
if (wd < 50) {
@@ -4143,7 +3646,9 @@ static Nlm_Boolean Nlm_GrowClick (Nlm_GraphiC w, Nlm_PoinT pt)
Nlm_UpdateScrollBar (w);
wptr = Nlm_GetWindowPtr ((Nlm_WindoW) w);
Nlm_RectToolToRecT (&bounds, &r);
+#ifndef WIN_MAC_QUARTZ
ClipRect (&bounds);
+#endif
Nlm_LocalToGlobal ((Nlm_PointPtr) &(r.left));
Nlm_LocalToGlobal ((Nlm_PointPtr) &(r.right));
Nlm_SetRect (w, &r);
@@ -4166,14 +3671,18 @@ static void Nlm_DrawGrowIcon (Nlm_GraphiC w, Nlm_Boolean drawgrow, Nlm_Boolean d
Nlm_WindowTool wptr;
Rect bounds;
+#ifndef WIN_MAC_QUARTZ
GetPort (&temp);
GetPenState (&state);
+#endif
wptr = Nlm_ParentWindowPtr (w);
GetPortBounds(GetWindowPort(wptr), &bounds);
Nlm_RectToolToRecT (&bounds, &r);
if (drawbar && Nlm_GetWindowMenuBar ((Nlm_WindoW) w) != NULL) {
Nlm_RecTToRectTool (&r, &rtool);
+#ifndef WIN_MAC_QUARTZ
ClipRect (&rtool);
+#endif
Nlm_MoveTo (r.right - 16, 20);
Nlm_LineTo (r.right, 20);
r.top = r.top + 21;
@@ -4182,7 +3691,9 @@ static void Nlm_DrawGrowIcon (Nlm_GraphiC w, Nlm_Boolean drawgrow, Nlm_Boolean d
Nlm_RecTToRectTool (&r, &rtool);
rtool.left = rtool.right - 15;
rtool.top = rtool.bottom - 15;
+#ifndef WIN_MAC_QUARTZ
ClipRect (&rtool);
+#endif
DrawGrowIcon (wptr);
}
Nlm_RecTToRectTool (&r, &rtool);
@@ -4197,11 +3708,13 @@ static void Nlm_DrawGrowIcon (Nlm_GraphiC w, Nlm_Boolean drawgrow, Nlm_Boolean d
*/
#endif
Nlm_RecTToRectTool (&r, &rtool);
+#ifndef WIN_MAC_QUARTZ
ClipRect (&rtool);
Nlm_SetPort(temp);
Nlm_currentWindowTool = GetWindowFromPort(temp);
Nlm_SetUpdateRegion (GetWindowFromPort(temp));
SetPenState (&state);
+#endif
}
static Nlm_Boolean Nlm_ZoomClick (Nlm_GraphiC w, Nlm_PoinT pt)
@@ -4255,7 +3768,9 @@ static Nlm_Boolean Nlm_ZoomClick (Nlm_GraphiC w, Nlm_PoinT pt)
Nlm_UpdateScrollBar (w);
wptr = Nlm_GetWindowPtr ((Nlm_WindoW) w);
Nlm_RectToolToRecT (&bounds, &r);
+#ifndef WIN_MAC_QUARTZ
ClipRect (&bounds);
+#endif
Nlm_LocalToGlobal ((Nlm_PointPtr) &(r.left));
Nlm_LocalToGlobal ((Nlm_PointPtr) &(r.right));
Nlm_SetRect (w, &r);
@@ -4312,6 +3827,7 @@ static Nlm_Boolean Nlm_ContentClick (Nlm_GraphiC w, Nlm_PoinT pt)
Nlm_RevPtr top;
Nlm_localMouse = Nlm_globalMouse;
+ Nlm_SetPortWindowPort (Nlm_ParentWindowPtr (w));
Nlm_GlobalToLocal (&Nlm_localMouse);
g = Nlm_GetChild (w);
notInside = TRUE;
@@ -4381,12 +3897,16 @@ static Nlm_Boolean Nlm_CommonClick (Nlm_GraphiC w, Nlm_PoinT pt,
rsult = FALSE;
if (chosenWindow == (Nlm_WindoW) w) {
wptr = Nlm_ParentWindowPtr (w);
+#ifndef WIN_MAC_QUARTZ
GetPort (&temp);
GetPenState (&state);
+#endif
+#ifndef WIN_MAC_QUARTZ
Nlm_SetPortWindowPort(wptr);
Nlm_currentWindowTool = wptr;
Nlm_SetUpdateRegion (wptr);
Nlm_ResetDrawingTools ();
+#endif
if ((close && Nlm_CloseClick (w, pt)) ||
(drag && Nlm_DragClick (w, pt)) ||
(grow && Nlm_GrowClick (w, pt)) ||
@@ -4395,10 +3915,12 @@ static Nlm_Boolean Nlm_CommonClick (Nlm_GraphiC w, Nlm_PoinT pt,
} else {
rsult = Nlm_ContentClick (w, pt);
}
+#ifndef WIN_MAC_QUARTZ
Nlm_SetPort(temp);
Nlm_currentWindowTool = GetWindowFromPort(temp);
Nlm_SetUpdateRegion (GetWindowFromPort(temp));
SetPenState (&state);
+#endif
} else if (chosenWindow != NULL) {
Nlm_DoSelect ((Nlm_GraphiC) chosenWindow, TRUE);
}
@@ -4447,17 +3969,21 @@ static Nlm_Boolean Nlm_ModalClick (Nlm_GraphiC w, Nlm_PoinT pt)
cls = wdata.close;
if (cls != NULL) {
wptr = Nlm_ParentWindowPtr (w);
+#ifndef WIN_MAC_QUARTZ
GetPort (&temp);
GetPenState (&state);
+#endif
Nlm_SetPortWindowPort(wptr);
Nlm_currentWindowTool = wptr;
Nlm_SetUpdateRegion (wptr);
Nlm_ResetDrawingTools ();
cls ((Nlm_WindoW) w);
+#ifndef WIN_MAC_QUARTZ
Nlm_SetPort(temp);
Nlm_currentWindowTool = GetWindowFromPort(temp);
Nlm_SetUpdateRegion (GetWindowFromPort(temp));
SetPenState (&state);
+#endif
}
}
} else {
@@ -4484,17 +4010,21 @@ static Nlm_Boolean Nlm_MovableModalClick (Nlm_GraphiC w, Nlm_PoinT pt)
cls = wdata.close;
if (cls != NULL) {
wptr = Nlm_ParentWindowPtr (w);
+#ifndef WIN_MAC_QUARTZ
GetPort (&temp);
GetPenState (&state);
+#endif
Nlm_SetPortWindowPort(wptr);
Nlm_currentWindowTool = wptr;
Nlm_SetUpdateRegion (wptr);
Nlm_ResetDrawingTools ();
cls ((Nlm_WindoW) w);
+#ifndef WIN_MAC_QUARTZ
Nlm_SetPort(temp);
Nlm_currentWindowTool = GetWindowFromPort(temp);
Nlm_SetUpdateRegion(GetWindowFromPort(temp));
SetPenState (&state);
+#endif
}
}
} else {
@@ -4589,8 +4119,10 @@ static void Nlm_FloatingSelect (Nlm_GraphiC w, Nlm_Boolean savePort)
Nlm_WindowTool wptr;
wptr = Nlm_ParentWindowPtr (w);
+#ifndef WIN_MAC_QUARTZ
GetPort (&temp);
GetPenState (&state);
+#endif
Nlm_SetPortWindowPort(wptr);
Nlm_currentWindowTool = wptr;
Nlm_SetUpdateRegion (wptr);
@@ -4601,10 +4133,12 @@ static void Nlm_FloatingSelect (Nlm_GraphiC w, Nlm_Boolean savePort)
} else {
Nlm_ContentClick (w, Nlm_globalMouse);
}
+#ifndef WIN_MAC_QUARTZ
Nlm_SetPort(temp);
Nlm_currentWindowTool = GetWindowFromPort(temp);
Nlm_SetUpdateRegion (GetWindowFromPort(temp));
SetPenState (&state);
+#endif
Nlm_localMouse = Nlm_globalMouse;
Nlm_GlobalToLocal (&Nlm_localMouse);
#endif
@@ -4623,15 +4157,19 @@ static void Nlm_DesktopSelect (Nlm_GraphiC w, Nlm_Boolean savePort)
PenState state;
Nlm_PortTool temp;
+#ifndef WIN_MAC_QUARTZ
GetPort (&temp);
GetPenState (&state);
PenNormal ();
+#endif
Nlm_DesktopClick (w, Nlm_globalMouse);
+#ifndef WIN_MAC_QUARTZ
Nlm_SetPort(temp);
Nlm_currentWindowTool = GetWindowFromPort(temp);
Nlm_SetUpdateRegion (GetWindowFromPort(temp));
SetPenState (&state);
#endif
+#endif
}
#ifdef WIN_MAC
@@ -4662,12 +4200,14 @@ static Nlm_Boolean Nlm_NormalKey (Nlm_GraphiC w, Nlm_Char ch)
Nlm_WindowTool wptr;
wptr = Nlm_ParentWindowPtr (w);
+#ifndef WIN_MAC_QUARTZ
GetPort (&temp);
GetPenState (&state);
Nlm_SetPortWindowPort(wptr);
Nlm_currentWindowTool = wptr;
Nlm_SetUpdateRegion (wptr);
Nlm_ResetDrawingTools ();
+#endif
Nlm_localMouse = Nlm_globalMouse;
Nlm_GlobalToLocal (&Nlm_localMouse);
if (Nlm_currentKey != '\0') {
@@ -4691,10 +4231,12 @@ static Nlm_Boolean Nlm_NormalKey (Nlm_GraphiC w, Nlm_Char ch)
Nlm_DesktopKey ((Nlm_GraphiC) Nlm_desktopWindow, ch);
}
}
+#ifndef WIN_MAC_QUARTZ
Nlm_SetPort(temp);
Nlm_currentWindowTool = GetWindowFromPort(temp);
Nlm_SetUpdateRegion(GetWindowFromPort(temp));
SetPenState (&state);
+#endif
return TRUE;
}
@@ -4711,8 +4253,10 @@ static Nlm_Boolean Nlm_FloatingKey (Nlm_GraphiC w, Nlm_Char ch)
Nlm_WindowTool wptr;
wptr = Nlm_ParentWindowPtr (w);
+#ifndef WIN_MAC_QUARTZ
GetPort (&temp);
GetPenState (&state);
+#endif
Nlm_SetPortWindowPort(wptr);
Nlm_currentWindowTool = wptr;
Nlm_SetUpdateRegion (wptr);
@@ -4741,10 +4285,12 @@ static Nlm_Boolean Nlm_FloatingKey (Nlm_GraphiC w, Nlm_Char ch)
Nlm_DoKey ((Nlm_GraphiC) nw, ch);
}
}
+#ifndef WIN_MAC_QUARTZ
Nlm_SetPort(temp);
Nlm_currentWindowTool = GetWindowFromPort(temp);
Nlm_SetUpdateRegion(GetWindowFromPort(temp));
SetPenState (&state);
+#endif
return TRUE;
}
@@ -4771,6 +4317,7 @@ static void Nlm_DrawWindow (Nlm_GraphiC w, Nlm_Boolean drawGrowIcon)
Nlm_WindowTool wptr;
Rect bounds;
+#ifndef WIN_MAC_QUARTZ
wptr = Nlm_ParentWindowPtr (w);
GetPort (&temp);
GetPenState (&state);
@@ -4787,6 +4334,7 @@ static void Nlm_DrawWindow (Nlm_GraphiC w, Nlm_Boolean drawGrowIcon)
Nlm_RectToolToRecT (&bounds, &r);
Nlm_EraseRect (&r);
+#endif
if (okayToDrawContents) {
if (drawGrowIcon) {
Nlm_DrawGrowIcon (w, FALSE, TRUE);
@@ -4806,13 +4354,17 @@ static void Nlm_DrawWindow (Nlm_GraphiC w, Nlm_Boolean drawGrowIcon)
}
}
+#ifndef WIN_MAC_QUARTZ
EndUpdate (wptr);
+#endif
Nlm_ResetDrawingTools ();
+#ifndef WIN_MAC_QUARTZ
Nlm_ResetClip ();
Nlm_SetPort(temp);
Nlm_currentWindowTool = GetWindowFromPort(temp);
Nlm_SetUpdateRegion(GetWindowFromPort(temp));
SetPenState (&state);
+#endif
}
static void Nlm_DocumentDraw (Nlm_GraphiC w)
@@ -5356,14 +4908,65 @@ static void Nlm_SetCursor (Cursor cursor)
}
#endif
+#ifdef WIN_MAC_QUARTZ
+#ifdef WIN_MAC_QUARTZ_COCOA_CURSORS
+/* these support functions make life a bit easier and centralize the
+ ugly Cocoa access */
+
+/* objc_msgSend is actually a trampoline which is effectively has no real prototype
+ but actually just takes on the prototype of the target method;
+ in order to shut the compiler up about methods which return char and generate
+ the correct machine code at the call site, we define this global function pointer
+ which points to the same function but with a different prototype */
+static char (*objc_msgSend_charRetFptr)(void *, void *, ...) = (void *)objc_msgSend;
+
+/* handy shortcut macros for invoking NSCursor methods */
+#define COCOA_SELECTOR(name) NSSelectorFromString(CFSTR(name))
+
+/* NSCursor does not define all of the methods we use when running
+ on 10.2, so we check to ensure it responds before calling anything.
+ If it does not respond, we'll return 0 (nil) and the following
+ set operation will be a no-op. */
+#define COCOA_NSCURSOR_CLASS_RESPONDS(name) objc_msgSend_charRetFptr(Nlm_NSCursorClass(), COCOA_SELECTOR("respondsToSelector:"), COCOA_SELECTOR(name))
+
+#define COCOA_NAMED_CURSOR(name) (COCOA_NSCURSOR_CLASS_RESPONDS(name "Cursor") \
+ ? objc_msgSend(Nlm_NSCursorClass(), COCOA_SELECTOR(name "Cursor")) \
+ : 0)
+
+static void *Nlm_NSCursorClass (void)
+{
+ static int didLoadApplication = 0;
+ if (!didLoadApplication)
+ {
+ didLoadApplication = 1;
+ NSApplicationLoad();
+ }
+
+ return NSClassFromString(CFSTR("NSCursor"));
+}
+
+static void Nlm_SetCursor (void *cursor)
+{
+ objc_msgSend(cursor, NSSelectorFromString(CFSTR("set")));
+}
+
+#endif
+#endif
+
extern void Nlm_ArrowCursor (void)
{
#ifdef WIN_MAC
+#ifdef WIN_MAC_QUARTZ
+#ifdef WIN_MAC_QUARTZ_COCOA_CURSORS
+ Nlm_SetCursor(COCOA_NAMED_CURSOR("arrow"));
+#endif
+#else
Cursor cursor;
GetQDGlobalsArrow(&cursor);
SetCursor (&cursor);
#endif
+#endif
#ifdef WIN_MSWIN
Nlm_currentCursor = LoadCursor (NULL, IDC_ARROW);
SetCursor (Nlm_currentCursor);
@@ -5377,8 +4980,14 @@ extern void Nlm_CrossCursor (void)
{
#ifdef WIN_MAC
+#ifdef WIN_MAC_QUARTZ
+#ifdef WIN_MAC_QUARTZ_COCOA_CURSORS
+ Nlm_SetCursor(COCOA_NAMED_CURSOR("crosshair"));
+#endif
+#else
SetCursor (&cross);
#endif
+#endif
#ifdef WIN_MSWIN
Nlm_currentCursor = LoadCursor (NULL, IDC_CROSS);
SetCursor (Nlm_currentCursor);
@@ -5392,8 +5001,14 @@ extern void Nlm_IBeamCursor (void)
{
#ifdef WIN_MAC
+#ifdef WIN_MAC_QUARTZ
+#ifdef WIN_MAC_QUARTZ_COCOA_CURSORS
+ Nlm_SetCursor(COCOA_NAMED_CURSOR("IBeam"));
+#endif
+#else
SetCursor (&iBeam);
#endif
+#endif
#ifdef WIN_MSWIN
Nlm_currentCursor = LoadCursor (NULL, IDC_IBEAM);
SetCursor (Nlm_currentCursor);
@@ -5407,8 +5022,14 @@ extern void Nlm_PlusCursor (void)
{
#ifdef WIN_MAC
+#ifdef WIN_MAC_QUARTZ
+#ifdef WIN_MAC_QUARTZ_COCOA_CURSORS
+ Nlm_SetCursor(COCOA_NAMED_CURSOR("crosshair"));
+#endif
+#else
SetCursor (&plus);
#endif
+#endif
#ifdef WIN_MSWIN
Nlm_currentCursor = LoadCursor (NULL, IDC_CROSS);
SetCursor (Nlm_currentCursor);
@@ -5422,8 +5043,14 @@ extern void Nlm_WatchCursor (void)
{
#ifdef WIN_MAC
+#ifdef WIN_MAC_QUARTZ
+#ifdef WIN_MAC_QUARTZ_COCOA_CURSORS
+// QUARTZ_FIXME: do we even need or want a watch cursor?
+#endif
+#else
SetCursor (&watch);
#endif
+#endif
#ifdef WIN_MSWIN
Nlm_currentCursor = LoadCursor (NULL, IDC_WAIT);
SetCursor (Nlm_currentCursor);
@@ -5585,7 +5212,7 @@ static pascal OSErr HandleAEOpenDoc (const AppleEvent *event, AppleEvent *reply,
char tempfile [PATH_MAX];
AEDesc docDesc;
AEDescList theList;
- FSSpec rsultfss;
+ CFURLRef cfurl;
OSErr theErr;
stat = AEGetParamDesc (event, keyDirectObject, typeAEList, &list);
@@ -5616,10 +5243,11 @@ static pascal OSErr HandleAEOpenDoc (const AppleEvent *event, AppleEvent *reply,
theErr = AECreateList(NULL, 0, FALSE, &theList);
if (theErr == noErr) {
- Nlm_CtoPstr ((Nlm_CharPtr) tempfile);
- theErr = FSMakeFSSpec (0, 0, (ConstStr255Param) tempfile, &rsultfss);
- if (theErr == noErr) {
- theErr = AECreateDesc(typeFSS, (Ptr)&rsultfss, sizeof(fss), &docDesc);
+ cfurl = CFURLCreateFromFileSystemRepresentation (NULL, (const UInt8 *)tempfile, strlen (tempfile), 0);
+ if (cfurl) {
+ CFDataRef cfdata = CFURLCreateData (NULL, cfurl, kCFStringEncodingUTF8, 1);
+ theErr = AECreateDesc(typeFileURL, CFDataGetBytePtr (cfdata), CFDataGetLength (cfdata), &docDesc);
+ CFRelease (cfdata);
if (theErr == noErr) {
theErr = AEPutDesc(&theList, 0, &docDesc);
if (theErr == noErr) {
@@ -5723,7 +5351,10 @@ static void Nlm_HandleEvent (void)
}
break;
case updateEvt:
+#ifndef WIN_MAC_QUARTZ
+/* this gets handled by the HIView infrastructure behind our backs in Quartz */
Nlm_DoDraw ((Nlm_GraphiC) Nlm_theWindow);
+#endif
break;
case osEvt:
mess = (Nlm_currentEvent.message & osEvtMessageMask) >> 24;
@@ -5786,6 +5417,7 @@ extern Nlm_Boolean Nlm_RegisterWindows (void)
return TRUE;
}
+#ifndef WIN_MAC_QUARTZ
static void Nlm_ReturnCursor (Cursor *cursor, Nlm_Int2 cursorID)
{
@@ -5802,6 +5434,7 @@ static void Nlm_ReturnCursor (Cursor *cursor, Nlm_Int2 cursorID)
GetQDGlobalsArrow(cursor);
}
}
+#endif
static Nlm_Boolean Nlm_SetupWindows (void)
@@ -5809,17 +5442,27 @@ static Nlm_Boolean Nlm_SetupWindows (void)
Nlm_PoinT pt;
Nlm_RecT r;
long gval;
+#ifdef WIN_MAC_QUARTZ
+ CGDirectDisplayID display;
+ CGDisplayCount displayCount;
+#else
BitMap myScreenBits;
Nlm_ReturnCursor (&cross, 2);
Nlm_ReturnCursor (&iBeam, 1);
Nlm_ReturnCursor (&plus, 3);
Nlm_ReturnCursor (&watch, 4);
+#endif
Nlm_WatchCursor ();
Nlm_ClearKeys ();
Nlm_LoadPt (&pt, 0, 0);
+#ifdef WIN_MAC_QUARTZ
+ CGGetActiveDisplayList (1, &display, &displayCount);
+ screenBitBounds = Nlm_CGRectToRecT (CGDisplayBounds (display));
+#else
GetQDGlobalsScreenBits(&myScreenBits);
Nlm_RectToolToRecT (&(myScreenBits.bounds), &screenBitBounds);
+#endif
r = screenBitBounds;
Nlm_screenRect = screenBitBounds;
Nlm_desktopWindow = (Nlm_WindoW) Nlm_HandNew (sizeof (Nlm_WindowRec));
@@ -6824,7 +6467,7 @@ extern void Nlm_DisplayEnvironmentVariables (void)
extern int Nlm_VibMainPrelude (int argc, char *argv[])
{
long gval;
- OSErr err;
+ OSStatus err;
Nlm_SetupArguments (argc, argv);
# else /* ! OS_UNIX_DARWIN */
@@ -6867,7 +6510,12 @@ extern void Nlm_VibMainPrelude ()
TEInit ();
InitDialogs (0);
#endif
+#ifdef WIN_MAC_QUARTZ
+ err = TXNInitTextension (NULL, 0, 0);
+ if(err) abort();
+#else
InitCursor ();
+#endif
err = Gestalt (gestaltAppleEventsAttr, &gval);
if (err == noErr && ((short) gval & (1 << gestaltAppleEventsPresent)) != 0) {
@@ -7219,8 +6867,10 @@ extern void Nlm_RemoveDyingWindows (void)
w = dyingWindow;
wptr = Nlm_ParentWindowPtr ((Nlm_GraphiC) w);
#ifdef WIN_MAC
+#ifndef WIN_MAC_QUARTZ
GetPort (&tempPort);
GetPenState (&state);
+#endif
Nlm_SetPortWindowPort(wptr);
Nlm_currentWindowTool = wptr;
Nlm_SetUpdateRegion (wptr);
@@ -7254,7 +6904,7 @@ extern void Nlm_RemoveDyingWindows (void)
Nlm_SetWindowMenuBar (w, NULL);
}
-#ifndef WIN_MOTIF
+#if !defined(WIN_MOTIF) && !defined(WIN_MAC_QUARTZ)
Nlm_ResetDrawingTools ();
#endif
@@ -7263,6 +6913,7 @@ extern void Nlm_RemoveDyingWindows (void)
wdata.cleanup (w, wdata.data);
}
#ifdef WIN_MAC
+#ifndef WIN_MAC_QUARTZ
if ( wdata.cMap != NULL ){
DisposePalette ( wdata.cMap );
wdata.cMap = NULL;
@@ -7271,6 +6922,7 @@ extern void Nlm_RemoveDyingWindows (void)
Nlm_currentWindowTool = GetWindowFromPort(tempPort);
Nlm_SetUpdateRegion (GetWindowFromPort(tempPort));
SetPenState (&state);
+#endif
/* 2001-03-22: Joshua Juran
Carbon does not support application-supplied storage for windows. */
DisposeWindow(wptr);
@@ -7584,8 +7236,8 @@ static void Nlm_ProcessIdle (void)
Nlm_ProcessTimerEvent ();
GetMouse (&ptool);
- LocalToGlobal (&ptool);
Nlm_PointToolToPoinT (ptool, &Nlm_globalMouse);
+ Nlm_LocalToGlobal (&Nlm_globalMouse);
frontWindow = Nlm_FindWindowRec (FrontWindow ());
Nlm_DoIdle ((Nlm_GraphiC) frontWindow, Nlm_globalMouse);
Nlm_ClearKeys ();