<commit_before>#!/usr/local/bin/perl 

=head1 NAME - vc2flat.pl

 provides flat file formats from Virtual Contigs in EnsEMBL databases

=head1 SYNOPSIS - 

    vc2flat chr1:10000-110000
  
    vc2flat -format fasta chr1:10000-11000

    vc2flat chr1

    vc2flat ctg1234

    vc2flat -format gff chr1

=head1 OPTIONS

    -verbose   print to STDERR on each clone to dump

    -module    Module name to load (Defaults to Bio::EnsEMBL::DBSQL::Obj)
    
    -host      host name for database (gets put as host= in locator)
			      
    -dbname    For RDBs, what name to connect to (dbname= in locator)

    -dbuser    For RDBs, what username to connect as (dbuser= in locator)

    -dbpass    For RDBs, what password to use (dbpass= in locator)

    -nodna     dont write dna part of embl file (for testing)

    -format    [gff/ace/pep/fasta] dump in gff/ace/peptide/fasta format, not EMBL

    -pepformat What format output to dump to. NB gene2flat is a better
               script now for dumping translations.

    -usefile   read in on stdin a list of vc parameters, one per line

    -outfile   write output into file instead of to STDOUT

    -help      displays this documentation with PERLDOC

    -genetype  type of gene to get out of the database

=cut

use strict;

use Bio::EnsEMBL::DBLoader;
use Bio::EnsEMBL::EMBL_Dump;
use Bio::SeqIO;
use Bio::EnsEMBL::Utils::GTF_handler;

use Getopt::Long;

# global defaults
my $module    = 'Bio::EnsEMBL::DBSQL::Obj';
my $dbtype    = 'rdb';
my $format    = 'embl';
my $nodna     = 0;
my $help;
my $noacc     = 0;
my $aceseq;
my $usefile  = 0;
my $pepformat = 'Fasta';
my $test=0;
my $part=0;
my $verbose=0;
my $outfile;
my $checkdna;
# test
my $species='';
my $freeze=0;
my $nogene=0;
my $nosecure=0;
my $genetype = undef;

# defaults for msql (rdb) access
my $host     = 'ensrv4.sanger.ac.uk';
my $dbname    = 'ensembl_freeze17_michele';
my $dbuser    = 'ensro';
my $dbpass = undef;

# defaults for acedb (humace)
my $host2     = 'humsrv1';
my $port      = '410000';

my $focuscontig;
my $focusposition;
my $ori;
my $left;
my $right;

my $static = 0;
<commit_msg>Changed defaults to new adaptor and new db<commit_after>#!/usr/local/bin/perl 

=head1 NAME - vc2flat.pl

 provides flat file formats from Virtual Contigs in EnsEMBL databases

=head1 SYNOPSIS - 

    vc2flat chr1:10000-110000
  
    vc2flat -format fasta chr1:10000-11000

    vc2flat chr1

    vc2flat ctg1234

    vc2flat -format gff chr1

=head1 OPTIONS

    -verbose   print to STDERR on each clone to dump

    -module    Module name to load (Defaults to Bio::EnsEMBL::DBSQL::Obj)
    
    -host      host name for database (gets put as host= in locator)
			      
    -dbname    For RDBs, what name to connect to (dbname= in locator)

    -dbuser    For RDBs, what username to connect as (dbuser= in locator)

    -dbpass    For RDBs, what password to use (dbpass= in locator)

    -nodna     dont write dna part of embl file (for testing)

    -format    [gff/ace/pep/fasta] dump in gff/ace/peptide/fasta format, not EMBL

    -pepformat What format output to dump to. NB gene2flat is a better
               script now for dumping translations.

    -usefile   read in on stdin a list of vc parameters, one per line

    -outfile   write output into file instead of to STDOUT

    -help      displays this documentation with PERLDOC

    -genetype  type of gene to get out of the database

=cut

use strict;

use Bio::EnsEMBL::DBLoader;
use Bio::EnsEMBL::EMBL_Dump;
use Bio::SeqIO;
use Bio::EnsEMBL::Utils::GTF_handler;

use Getopt::Long;

# global defaults
my $module    = 'Bio::EnsEMBL::DBSQL::DBAdaptor';
my $dbtype    = 'rdb';
my $format    = 'embl';
my $nodna     = 0;
my $help;
my $noacc     = 0;
my $aceseq;
my $usefile  = 0;
my $pepformat = 'Fasta';
my $test=0;
my $part=0;
my $verbose=0;
my $outfile;
my $checkdna;
# test
my $species='';
my $freeze=0;
my $nogene=0;
my $nosecure=0;
my $genetype = undef;

# defaults for msql (rdb) access
my $host     = 'ensrv3';
my $dbname    = 'ensembl100';
my $dbuser    = 'ensro';
my $dbpass = undef;

# defaults for acedb (humace)
my $host2     = 'humsrv1';
my $port      = '410000';

my $focuscontig;
my $focusposition;
my $ori;
my $left;
my $right;

my $static = 0;

{'fraction_non_alphanumeric': 0.10165094339622642, 'fraction_numerical': 0.028537735849056604, 'mean_word_length': 2.9672591206735266, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3782430', 'n_tokens_mistral': 1709, 'n_tokens_neox': 1561, 'n_words': 541}