Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Splitting a file in a directory! Post 302581805 by PerlNutt on Wednesday 14th of December 2011 05:31:35 AM
Old 12-14-2011
Genomes is pretty much a text file that contains genes. There's an unknown number of genes in the text file, and they're all separated by ">" I want to separate all the genes so I have, say, 1000 small text files, each called a unique number. I tried using a basic split function but it doesn't appear to be working so any help anyone can give would be greatly appreciated!
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

[Splitting file] Extracting group of segments from one file to others

Hi there, I need to split one huge file into separate files if the condition is fulfilled according to that the position between 97 and 98 matches with “IT” at the segment MAS. There is no delimiter file is fix-width with varous line length. Could you please help me how I do split the file... (1 Reply)
Discussion started by: ozgurgul
1 Replies

2. UNIX for Dummies Questions & Answers

Splitting files into a specific directory

Hello, I am trying to do the following; bzcat data.in.bz2 | split -l 1000000 -d this work great, except that once the files have been split, they are not in the directory I want them to be in. So I then have to move them, at times this can get hairy. Is there anyway to specify where the... (4 Replies)
Discussion started by: amcrisan
4 Replies

3. Shell Programming and Scripting

File splitting, naming file according to internal field

Hi All, I have a rather stange set of requirements that I'm hoping someone here could help me with. We receive a file that is actually a concatenation of 4 files (don't believe this would change, but ideally the solution would handle n files). The super-file looks like:... (7 Replies)
Discussion started by: Leedor
7 Replies

4. Shell Programming and Scripting

Splitting a file in to multiple files and passing each individual file to a command

I have an input file with contents like: MainFile.dat: 12247689|7896|77698080 16768900|hh78|78959390 12247689|7896|77698080 16768900|hh78|78959390 12247689|7896|77698080 16768900|hh78|78959390 12247689|7896|77698080 16768900|hh78|78959390 12247689|7896|77698080 16768900|hh78|78959390 ... (4 Replies)
Discussion started by: rkrish
4 Replies

5. Shell Programming and Scripting

Splitting Files with awk into other directory

I am trying to split into different files using awk: cat files | gawk '$1 ~ /---/ || $1 ~ /^deleting$/ || $1 ~ /^sorting$/ || $1 ~ /==/ {print}'| gawk '$1 ~ /---/ || $1 ~ /^deleting$/ || $1 ~ /^sorting$/ || $1 ~ /==/ {print}' |gawk '//{x="F"++i;}{print > x;}' What I am trying to do is make F*... (3 Replies)
Discussion started by: newbie2010
3 Replies

6. UNIX for Dummies Questions & Answers

Extracting data from one file, based on another file (splitting)

Dear All, I have two files but want to extract data from one based on another... can you please help me file 1 David Tom Ellen and file 2 David|0010|testnamez|resultsz David|0004|testnamex|resultsx Tom|0010|testnamez|resultsz Tom|0004|testnamex|resultsx Ellen|0010|testnamez|resultsz... (12 Replies)
Discussion started by: A-V
12 Replies

7. Shell Programming and Scripting

Splitting XML file on basis of line number into multiple file

Hi All, I have more than half million lines of XML file , wanted to split in four files in a such a way that top 7 lines should be present in each file on top and bottom line of should be present in each file at bottom. from the 8th line actual record starts and each record contains 15 lines... (14 Replies)
Discussion started by: ajju
14 Replies

8. Shell Programming and Scripting

Execution of loop :Splitting a single file into multiple .dat file

hdr=$(cut -c1 $path$file|head -1)#extract header”H” trl=$(cut -c|path$file|tail -1)#extract trailer “T” SplitFile=$(cut -c 50-250 $path 1$newfile |sed'$/ *$//' head -1')# to trim white space and extract table name If; then # start loop if it is a header While read I #read file Do... (4 Replies)
Discussion started by: SwagatikaP1
4 Replies

9. Shell Programming and Scripting

Splitting a text file into smaller files with awk, how to create a different name for each new file

Hello, I have some large text files that look like, putrescine Mrv1583 01041713302D 6 5 0 0 0 0 999 V2000 2.0928 -0.2063 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0 5.6650 0.2063 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0 3.5217 ... (3 Replies)
Discussion started by: LMHmedchem
3 Replies

10. UNIX for Beginners Questions & Answers

Splitting the file based on two fields - Fixed length file

Hi , I am having a scenario where I need to split the file based on two field values. The file is a fixed length file. ex: AA0998703000000000000190510095350019500010005101980301 K 0998703000000000000190510095351019500020005101480 ... (4 Replies)
Discussion started by: saj
4 Replies
Bio::Tools::Run::Genewise(3pm)				User Contributed Perl Documentation			    Bio::Tools::Run::Genewise(3pm)

NAME
Bio::Tools::Run::Genewise - Object for predicting genes in a given sequence given a protein SYNOPSIS
# Build a Genewise alignment factory my $factory = Bio::Tools::Run::Genewise->new(); # Pass the factory 2 Bio:SeqI objects (in the order of query peptide # and target_genomic). # @genes is an array of Bio::SeqFeature::Gene::GeneStructure objects my @genes = $factory->run($protein_seq, $genomic_seq); # Alternatively pass the factory a profile HMM filename and a # Bio:SeqI object (in the order of query HMM and target_genomic). # Set hmmer switch first to tell genewise to expect an HMM $factory->hmmer(1); my @genes = $factory->run($hmmfile, $genomic_seq); DESCRIPTION
Genewise is a gene prediction program developed by Ewan Birney http://www.sanger.ac.uk/software/wise2. Available Params: NB: These should be passed without the '-' or they will be ignored, except switches such as 'hmmer' (which have no corresponding value) which should be set on the factory object using the AUTOLOADed methods of the same name. Model [-codon,-gene,-cfreq,-splice,-subs,-indel,-intron,-null] Alg [-kbyte,-alg] HMM [-hmmer] Output [-gff,-gener,-alb,-pal,-block,-divide] Standard [-help,-version,-silent,-quiet,-errorlog] FEEDBACK
Mailing Lists User feedback is an integral part of the evolution of this and other Bioperl modules. Send your comments and suggestions preferably to one of the Bioperl mailing lists. Your participation is much appreciated. bioperl-l@bioperl.org - General discussion http://bioperl.org/wiki/Mailing_lists - About the mailing lists Support Please direct usage questions or support issues to the mailing list: bioperl-l@bioperl.org rather than to the module maintainer directly. Many experienced and reponsive experts will be able look at the problem and quickly address it. Please include a thorough description of the problem with code and data examples if at all possible. Reporting Bugs Report bugs to the Bioperl bug tracking system to help us keep track the bugs and their resolution. Bug reports can be submitted via the web: http://redmine.open-bio.org/projects/bioperl/ AUTHOR - FUGU Student Intern Email: fugui@worf.fugu-sg.org CONTRIBUTORS
Jason Stajich jason-AT-bioperl_DOT_org Keith James kdj@sanger.ac.uk APPENDIX
The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _ program_name Title : program_name Usage : $factory>program_name() Function: holds the program name Returns: string Args : None program_dir Title : program_dir Usage : $factory->program_dir(@params) Function: returns the program directory, obtained from ENV variable. Returns: string Args : version Title : version Usage : exit if $prog->version() < 1.8 Function: Determine the version number of the program Example : Returns : float or undef Args : none predict_genes Title : predict_genes Usage : DEPRECATED. Use $factory->run($seq1,$seq2) Function: Predict genes Returns : A Bio::Seqfeature::Gene:GeneStructure object Args : Name of a file containing a set of 2 fasta sequences in the order of peptide and genomic sequences or else 2 Bio::Seq objects. Throws an exception if argument is not either a string (eg a filename) or 2 Bio::Seq objects. If arguments are strings, throws exception if file corresponding to string name can not be found. run Title : run Usage : 2 sequence objects $genes = $factory->run($seq1, $seq2); Function: run Returns : A Bio::Seqfeature::Gene:GeneStructure object Args : Names of a files each containing a fasta sequence in the order of either (peptide sequence, genomic sequence) or (profile HMM, genomic sequence). Alternatively any of the fasta sequence filenames may be substituted with a Bio::Seq object. Throws an exception if argument is not either a string (eg a filename) or Bio::Seq objects. If arguments are strings, throws exception if file corresponding to string name can not be found. Also throws an exception if a profile HMM is expected (the -hmmer genewise switch has been set). _run Title : _run Usage : Internal function, not to be called directly Function: Makes actual system call to a genewise program Example : Returns : L<Bio::SeqFeature::Gene::GeneStructure> Args : Name of a files containing 2 sequences in the order of peptide and genomic _setparams Title : _setparams Usage : Internal function, not to be called directly Function: creates a string of params to be used in the command string Example : Returns : string of params Args : _query_pep_seq Title : _query_pep_seq Usage : Internal function, not to be called directly Function: get/set for the query sequence Example : Returns : Args : _subject_dna_seq Title : _subject_dna_seq Usage : Internal function, not to be called directly Function: get/set for the subject sequence Example : Returns : Args : perl v5.12.3 2011-06-18 Bio::Tools::Run::Genewise(3pm)
All times are GMT -4. The time now is 05:12 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy