Sponsored Content
Top Forums Shell Programming and Scripting Gene position format to BED format Post 302392853 by awknerd on Friday 5th of February 2010 09:05:56 PM
Old 02-05-2010
Gene position format to BED format

.....

Last edited by awknerd; 02-05-2010 at 11:15 PM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

change the empty function from the old format to the new format

I have about 300 files which has the function getDBBackend(). How to write a program to change the empty function from the old format to the new format? Old empty function format are either: function getDBBackend() { // Not available } // getDBBackend or: function... (0 Replies)
Discussion started by: powah
0 Replies

2. Shell Programming and Scripting

convert mmddyy date format to ccyyddd format??

hi, for reading a cobol indexed file i need to convert "mmddyy" date format to "ccyyddd" format. i checked the datecalc and other scripts but couldnt modify them to cater to my need:(... The datecalc gives an output which i believe is the total days till that date, but i want to convert it... (2 Replies)
Discussion started by: Bhups
2 Replies

3. UNIX for Advanced & Expert Users

Convert UTF8 Format file to ANSI format

:) Hi i am trying to convert a file which is in UTF8 format to ANSI format i tried to use the function ICONV but it is throwing error Function i used it as $ iconv -f UTF8 -t ANSI filename Error iam getting is NOT Supported UTF8 to ANSI please some help me out on this.........Let me... (1 Reply)
Discussion started by: rajreddy
1 Replies

4. UNIX for Dummies Questions & Answers

Convert UTF8 Format file to ANSI format

:confused: Hi i am trying to convert a file which is in UTF8 format to ANSI format i tried to use the function ICONV but it is throwing error Function i used it as $ iconv -f UTF8 -t ANSI filename Error iam getting is NOT Supported UTF8 to ANSI please some help me out on... (9 Replies)
Discussion started by: rajreddy
9 Replies

5. UNIX for Dummies Questions & Answers

To convert multi format file to a readable ascii format

Hi I have a file which has ascii , binary, binary decimal coded,decimal & hexadecimal data with lot of special characters (like öƒ.ƒ.„İİ¡Š·œƒ.„İİ¡Š· ) in it. I want to standardize the file into ASCII format & later use that as source . Can any one suggest a way a logic to convert such... (5 Replies)
Discussion started by: gaur.deepti
5 Replies

6. Shell Programming and Scripting

changing month in Mmm format to mm FORMAT

i have an variable mydate=2008Nov07 i want o/p as in variable mymonth=11 (i.e nov comes on 11 number month) i want some command to do this for any month without using any loop. plz help me (1 Reply)
Discussion started by: RahulJoshi
1 Replies

7. Shell Programming and Scripting

Retaining the Unix CSV format in Excel format while exporting

Hi All, I have created a Unix Shell script whch creates a *.csv file and export it to Excel. The problem i am facing is that Users wants one of the AMOUNT field in comma separted values. Example : if the Amount has the value as 3000000 User wants to be in 3,000,000 format. This Amount format... (2 Replies)
Discussion started by: rawat_me01
2 Replies

8. Shell Programming and Scripting

Converting windows format file to unix format using script

Hi, I am having couple of files which i used to copy from windows to Linux, so now in case of text files (CTRL^M) appears at end of line. I know i can convert this windows format file to unix format file by running dos2unix. My requirement here is that i want to do it automatically using a... (5 Replies)
Discussion started by: sarbjit
5 Replies

9. Shell Programming and Scripting

perl module to convert xlsx format to xls format

Hi Folks, I have written a perl script that reads data from excel sheet(.xls) using Spreadsheet::ParseExcel module. But the problem is this module doesn't work for excel sheets with extension .xlsx. I have gone through Spreadsheet::XLSX module with which we can read from .xlsx file directly.... (1 Reply)
Discussion started by: giridhar276
1 Replies

10. Shell Programming and Scripting

Need script for transferring bulk files from one format to text format

"Help Me" Need script for transferring bulk files from one format to text format in a unix server. Please suggest (2 Replies)
Discussion started by: Kranthi Kumar
2 Replies
Bio::ASN1::EntrezGene(3pm)				User Contributed Perl Documentation				Bio::ASN1::EntrezGene(3pm)

NAME
Bio::ASN1::EntrezGene - Regular expression-based Perl Parser for NCBI Entrez Gene. SYNOPSIS
use Bio::ASN1::EntrezGene; my $parser = Bio::ASN1::EntrezGene->new('file' => "Homo_sapiens"); while(my $result = $parser->next_seq) { # extract data from $result, or Dumpvalue->new->dumpValue($result); } # a new way to get the $result data hash for a particular gene id: use Bio::ASN1::EntrezGene::Indexer; my $inx = Bio::ASN1::EntrezGene::Indexer->new(-filename => 'entrezgene.idx'); my $seq = $inx->fetch_hash(10); # returns $result for Entrez Gene record # with geneid 10 # note that the index file 'entrezgene.idx' can be created as follows my $inx = Bio::ASN1::EntrezGene::Indexer->new( -filename => 'entrezgene.idx', -write_flag => 'WRITE'); $inx->make_index('Homo_sapiens', 'Mus_musculus'); # files come from NCBI download # for more detail please refer to Bio::ASN1::EntrezGene::Indexer perldoc PREREQUISITE
None. INSTALLATION
Bio::ASN1::EntrezGene package can be installed & tested as follows: perl Makefile.PL make make test make install DESCRIPTION
Bio::ASN1::EntrezGene is a regular expression-based Perl Parser for NCBI Entrez Gene genome databases (<http://www.ncbi.nih.gov/entrez/query.fcgi?db=gene>). It parses an ASN.1-formatted Entrez Gene record and returns a data structure that contains all data items from the gene record. The parser will report error & line number if input data does not conform to the NCBI Entrez Gene genome annotation file format. Note that it is possible to provide reading of all NCBI's ASN.1-formatted files through simple variations of the Entrez Gene parser (I need more investigation to be sure, but at least the sequence parser is a very simple variation on Entrez Gene parser and works well). It took the parser version 1.0 11 minutes to parse the human genome Entrez Gene file on one 2.4 GHz Intel Xeon processor. The addition of validation and error reporting in 1.03 and handling of new Entrez Gene format slowed the parser down about 40%. Since V1.07, this package also included an indexer that runs pretty fast (it takes 21 seconds for the indexer to index the human genome on the same processor). Therefore the combination of the modules would allow user to retrieve and parse arbitrary records. SEE ALSO
The parse_entrez_gene_example.pl script included in this package (please see the Bio-ASN1-EntrezGene-x.xx/examples directory) is a very important and near-complete demo on using this module to extract all data items from Entrez Gene records. Do check it out because in fact, this script took me about 3-4 times more time to make for my project than the parser V1.0 itself. Note that the example script was edited to leave out stuff specific to my internal project. For details on various parsers I generated for Entrez Gene, example scripts that uses/benchmarks the modules, please see <http://sourceforge.net/projects/egparser/>. Those other parsers etc. are included in V1.05 download. AUTHOR
Dr. Mingyi Liu <mingyi.liu@gpc-biotech.com> COPYRIGHT
The Bio::ASN1::EntrezGene module and its related modules and scripts are copyright (c) 2005 Mingyi Liu, GPC Biotech AG and Altana Research Institute. All rights reserved. I created these modules when working on a collaboration project between these two companies. Therefore a special thanks for the two companies to allow the release of the code into public domain. You may use and distribute them under the terms of the Perl itself or GPL (<http://www.gnu.org/copyleft/gpl.html>). CITATION
Liu, M and Grigoriev, A(2005) "Fast Parsers for Entrez Gene" Bioinformatics. In press OPERATION SYSTEMS SUPPORTED
Any OS that Perl runs on. METHODS
new Parameters: maxerrstr => 20 (optional) - maximum number of characters after offending element, used by error reporting, default is 20 file or -file => $filename (optional) - name of the file to be parsed. call next_seq to parse! fh or -fh => $filehandle (optional) - handle of the file to be parsed. Example: my $parser = Bio::ASN1::EntrezGene->new(); Function: Instantiate a parser object Returns: Object reference Notes: Setting file or fh will reset line numbers etc. that are used for error reporting purposes, and seeking on file handle would mess up linenumbers! maxerrstr Parameters: $maxerrstr (optional) - maximum number of characters after offending element, used by error reporting, default is 20 Example: $parser->maxerrstr(20); Function: get/set maxerrstr. Returns: maxerrstr. Notes: parse Parameters: $string that contains Entrez Gene record, $trimopt (optional) that specifies how the data structure returned should be trimmed. 2 is recommended and default $noreset (optional) that species that line number should not be reset DEPRECATED as external function!!! Do not call this function directly! Call next_seq() instead Example: my $value = $parser->parse($text); # DEPRECATED as # external function!!! Do not call this function # directly! Call next_seq() instead Function: Takes in a string representing Entrez Gene record, parses the record and returns a data structure. Returns: A data structure containing all data items from the Entrez Gene record. Notes: DEPRECATED as external function!!! Do not call this function directly! Call next_seq() instead $string should not contain 'EntrezGene ::=' at beginning! input_file Parameters: $filename for file that contains Entrez Gene record(s) Example: $parser->input_file($filename); Function: Takes in name of a file containing Entrez Gene records. opens the file and stores file handle Returns: none. Notes: Attempts to open file larger than 2 GB even on Perl that does not support 2 GB file (accomplished by calling "cat" and piping output. On OS that does not have "cat" error message will be displayed) next_seq Parameters: $trimopt (optional) that specifies how the data structure returned should be trimmed. option 2 is recommended and default Example: my $value = $parser->next_seq(); Function: Use the file handle generated by input_file, parses the next the record and returns a data structure. Returns: A data structure containing all data items from the Entrez Gene record. Notes: Must pass in a filename through new() or input_file() first! For details on how to use the $trimopt data trimming option please see comment for the trimdata method. An option of 2 is recommended and default The acceptable values for $trimopt include: 1 - trim as much as possibile 2 (or 0, undef) - trim to an easy-to-use structure 3 - no trimming (in version 1.06, prior to version 1.06, 0 or undef means no trimming) trimdata Parameters: $hashref or $arrayref $trimflag (optional, see Notes) Example: trimdata($datahash); # using the default flag Function: recursively process all attributes of a hash/array hybrid and get rid of any arrayref that points to one-element arrays (trims data structure) depending on the optional flag. Returns: none - trimming happenes in-place Notes: This function is useful to compact a data structure produced by Bio::ASN1::EntrezGene::parse. The acceptable values for $trimopt include: 1 - trim as much as possibile 2 (or 0, undef) - trim to an easy-to-use structure 3 - no trimming (in version 1.06, prior to version 1.06, 0 or undef means no trimming) fh Parameters: $filehandle (optional) Example: trimdata($datahash); # using the default flag Function: getter/setter for file handle Returns: file handle for current file being parsed. Notes: Use with care! Line number report would not be corresponding to file's line number if seek operation is performed on the file handle! rawdata Parameters: none Example: my $data = $parser->rawdata(); Function: Get the entrez gene data file that was just parsed Returns: a string containing the ASN1-formatted Entrez Gene record Notes: Must first parse a record then call this function! Could be useful in interpreting line number value in error report (if user did a seek on file handle right before parsing call) perl v5.14.2 2012-01-12 Bio::ASN1::EntrezGene(3pm)
All times are GMT -4. The time now is 09:45 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy