Sponsored Content
Top Forums Shell Programming and Scripting Separating list of input files (*.file) with a comma in bash script Post 302526422 by itkamaraj on Tuesday 31st of May 2011 12:50:34 PM
Old 05-31-2011
sorry, i forget the do word

for i in *.fastq; do my_variable=`echo $my_variable$i`; done
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Simple script for separating files

Hi all, I was wondering if someone could help me writing a simple script on separating files into separate folders. I have 92 files called various things and I want to separate these folders like so: Create a folder called "1" and put files 1-23 in it Create a folder called "2" and put... (5 Replies)
Discussion started by: hertingm
5 Replies

2. Shell Programming and Scripting

separating comma delimited words

Hi, I have file with text ________________________________ GROUP:firstname1.lastname1,first_name2.last_name2,first_name3.last_name3 HEAD:firstname.lastname ________________________________ I need help to pick the names separately ie.. Need out put as var1 =firstname1.lastname1... (4 Replies)
Discussion started by: rider29
4 Replies

3. Shell Programming and Scripting

Separating delimited file by pattern with exclusion list

I have a file with the contents below jan_t=jan;feb_t=feb;mar_t=mar;year=2010 jan_t=null;feb_t=feb;mar_t=mar;year=2010 jan_t=jan;feb_t=feb;mar_t=mar;year=2010 I want to extract out all the fields values ending with "_t" , however, i want to exclude feb_t and mar_t from the results In... (6 Replies)
Discussion started by: alienated
6 Replies

4. Shell Programming and Scripting

Keeping Null's as it is and separating them by Comma

Hi, I am having source (Oracle) as given below. SourceOBJECT_NAMESUBOBJECT_NAMEOBJECT_IDDATA_OBJECT_IDOBJECT_TYPECREATEDLAST_DDL_TIMESTAMPSTATUSTGSTEST 336559336559TABLE4/15/2009 10:374/15/2009 10:372009-04-15:10:37:57VALIDNNNUNIX 336559336559TABLE4/15/2009 10:374/15/2009... (3 Replies)
Discussion started by: arunvasu2
3 Replies

5. UNIX for Dummies Questions & Answers

Bash script to delete file input on command line

1) I wrote a script and gave the desired permissions using "chmod 755 scriptname". Now if i edit the script file, why do i need to set the permission again? Didn't i set the permission attribute.. or if i edit the file, does the inode number of file changes? 2) I am running my unix on a server... (1 Reply)
Discussion started by: animesharma
1 Replies

6. Shell Programming and Scripting

Input file to bash script

Hi, I have this script Script.sh: #!/bin/sh sed 's,\,,g' input.dat > output .dat But i want to run it witb different files. So i want the input file as an input argument to the script, how could i do that. Running it like this: > Script.sh input.dat (2 Replies)
Discussion started by: Johanni
2 Replies

7. Shell Programming and Scripting

How to generate a csv files by separating the values from the input file based on position?

Hi All, I need help for doing the following. I have a input file like: aaaaaaaaaabbbbbbbbbbbbbbbbbbbb cccbbbbbaaaaaadddddaaaabbbbbbb now I am trying to generate a output csv file where i will have for e.g. 0-3 chars of each line as the first column in the csv, 4-10 chars of the line as... (3 Replies)
Discussion started by: babom
3 Replies

8. Shell Programming and Scripting

Script to delete files with an input for directories and an input for path/file

Hello, I'm trying to figure out how best to approach this script, and I have very little experience, so I could use all the help I can get. :wall: I regularly need to delete files from many directories. A file with the same name may exist any number of times in different subdirectories.... (3 Replies)
Discussion started by: *ShadowCat*
3 Replies

9. UNIX for Advanced & Expert Users

Help with ksh script to list, then cp files from a user input date range

Hi, I'm quite new to ksh scripting, can someone help me with this. Requirements: I need to create a script that list the files from a user input date range. e. g. format of file: *c1*log.2012-12-22-14-00* *c1*log.2012-12-22-14-00* *c1*log.2012-12-22-14-00*... (1 Reply)
Discussion started by: chococrunch6
1 Replies

10. Shell Programming and Scripting

Help in input file's in bash script

hello guys i have bash script to open my routers with username and password i made script but i have problem this script can/t read password from file #!/bin/bash router_file="ips" passwd="password.txt" for router in cat ;$router_file do for pass in cat ;$passwd; do res=$(curl -m 1 ... (7 Replies)
Discussion started by: manhoud
7 Replies
Bio::SeqIO::fastq(3pm)					User Contributed Perl Documentation				    Bio::SeqIO::fastq(3pm)

NAME
Bio::SeqIO::fastq - fastq sequence input/output stream SYNOPSIS
################## pertains to FASTQ parsing only ################## # grabs the FASTQ parser, specifies the Illumina variant my $in = Bio::SeqIO->new(-format => 'fastq-illumina', -file => 'mydata.fq'); # simple 'fastq' format defaults to 'sanger' variant my $out = Bio::SeqIO->new(-format => 'fastq', -file => '>mydata.fq'); # $seq is a Bio::Seq::Quality object while (my $seq = $in->next_seq) { $out->write_seq($seq); # convert Illumina 1.3 to Sanger format } # for 4x faster parsing, one can do something like this for raw data use Bio::Seq::Quality; # $data is a hash reference containing all arguments to be passed to # the Bio::Seq::Quality constructor while (my $data = $in->next_dataset) { # process $data, such as trim, etc my $seq = Bio::Seq::Quality->new(%$data); # for now, write_seq only accepts Bio::Seq::Quality, but may be modified # to allow raw hash references for speed $out->write_seq($data); } DESCRIPTION
This object can transform Bio::Seq and Bio::Seq::Quality objects to and from FASTQ flat file databases. FASTQ is a file format used frequently at the Sanger Centre and in next-gen sequencing to bundle a FASTA sequence and its quality data. A typical FASTQ entry takes the form: @HCDPQ1D0501 GATTTGGGGTTCAAAGCAGTATCGATCAAATAGTAAATCCATTTGTTCAACTCACAGTTT..... +HCDPQ1D0501 !''*((((***+))%%%++)(%%%%).1***-+*''))**55CCF>>>>>>CCCCCCC65..... where: @ = descriptor, followed by one or more sequence lines + = optional descriptor (if present, must match first one), followed by one or more qual lines When writing FASTQ output the redundant descriptor following the '+' is by default left off to save disk space. If needed, one can set the quality_header() flag in order for this to be printed. FASTQ and Bio::Seq::Quality mapping FASTQ files have sequence and quality data on single line or multiple lines, and the quality values are single-byte encoded. Data are mapped very simply to Bio::Seq::Quality instances: Data Bio::Seq::Quality method ------------------------------------------------------------------------ first non-whitespace chars in descriptor id^ descriptor line desc^ sequence lines seq quality qual* FASTQ variant namespace ^ first nonwhitespace chars are id(), everything else after (to end of line) is in desc() * Converted to PHRED quality scores where applicable ('solexa') FASTQ variants This parser supports all variants of FASTQ, including Illumina v 1.0 and 1.3: variant note ----------------------------------------------------------- sanger original solexa Solexa, Inc.(2004), aka Illumina 1.0 illumina Illumina 1.3 The variant can be specified by passing by either passing the additional -variant parameter to the constructor: my $in = Bio::SeqIO->new(-format => 'fastq', -variant => 'solexa', -file => 'mysol.fq'); or by passing the format and variant together (Bio::SeqIO will now handle this and convert it accordingly to the proper argument): my $in = Bio::SeqIO->new(-format => 'fastq-solexa', -file => 'mysol.fq'); Variants can be converted back and forth from one another; however, due to the difference in scaling for solexa quality reads, converting from 'illumina' or 'sanger' FASTQ to solexa is not recommended. 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: https://redmine.open-bio.org/projects/bioperl/ AUTHORS - Chris Fields (taken over from Tony Cox) Email: cjfields at bioperl dot org APPENDIX
The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _ Bio::SeqIO interface methods next_seq Title : next_seq Usage : $seq = $stream->next_seq() Function : returns the next sequence in the stream Returns : Bio::Seq::Quality object Args : NONE Status : Stable write_seq Title : write_seq Usage : $stream->write_seq(@seq) Function : writes the $seq object into the stream Returns : 1 for success and 0 for error Args : Bio::Seq::Quality Note : This now conforms to SeqIO spec (module output is same format as next_seq) Status : Stable variant Title : variant Usage : $format = $obj->variant(); Function: Get and set method for the quality sequence variant. This is important for indicating the encoding/decoding to be used for quality data. Current values accepted are: 'sanger' (orginal FASTQ) ASCII encoding from 33-126, PHRED quality score from 0 to 93 'solexa' (aka illumina1.0) ASCII encoding from 59-104, SOLEXA quality score from -5 to 40 'illumina' (aka illumina1.3) ASCII encoding from 64-104, PHRED quality score from 0 to 40 (Derived from the MAQ website): For 'solexa', scores are converted to PHRED qual scores using: $Q = 10 * log(1 + 10 ** (ord($sq) - 64) / 10.0)) / log(10) Returns : string Args : new value, string Plugin-specific methods next_dataset Title : next_dataset Usage : $obj->next_dataset Function : returns a hash reference containing the parsed data Returns : hash reference Args : none Status : Stable write_fastq Title : write_fastq Usage : $stream->write_fastq(@seq) Function: writes the $seq object into the stream Returns : 1 for success and 0 for error Args : Bio::Seq::Quality object Status : Deprecated (delegates to write_seq) write_fasta Title : write_fasta Usage : $stream->write_fasta(@seq) Function: writes the $seq object into the stream Returns : 1 for success and 0 for error Args : Bio::Seq object Note : This method does not currently delegate to Bio::SeqIO::fasta (maybe it should?). Not sure whether we should keep this as a convenience method. Status : Unstable write_qual Title : write_qual Usage : $stream->write_qual(@seq) Function: writes the $seq object into the stream Returns : 1 for success and 0 for error Args : Bio::Seq::Quality object Note : This method does not currently delegate to Bio::SeqIO::qual (maybe it should?). Not sure whether we should keep this as a convenience method. Status : Unstable validate Title : validate Usage : $obj->validate(0) Function : flag for format/qual range validation - default is 1, validate Returns : Bool (0/1) Args : Bool (0/1) Status : Stable (may be moved to interface) quality_header Title : quality_header Usage : $obj->quality_header Function : flag for printing quality header - default is 0, no header Returns : Bool (0/1) Args : Bool (0/1) Status : Unstable (name may change dep. on feedback) perl v5.14.2 2012-03-02 Bio::SeqIO::fastq(3pm)
All times are GMT -4. The time now is 08:57 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy