10-12-2011
Merging sideways
Hi birei,
currently your script merges the files in a vertical fashion:
chromo pos ref alleles.SampleA refAllele.SampleA refCount.SampleA refFreq.SampleA altAllele.SampleA altCount.SampleA altFreq.SampleA alleles.SampleB refAllele.SampleB refCount.SampleB refFreq.SampleB altAllele.SampleB altCount.SampleB altFreq.SampleB alleles.SampleC refAllele.SampleC refCount.SampleC refFreq.SampleC altAllele.SampleC altCount.SampleC altFreq.SampleC alleles.SampleD refAllele.SampleD refCount.SampleD refFreq.SampleD altAllele.SampleD altCount.SampleD altFreq.SampleD file 1
file 1
.
.
.
file 2
file 2 file 2 and so on....
I was wondering is there an easy way where the fields from file 2 are listed next to that of file 1?
If there is an easy fix to this that would be super wonderful. Thanks.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi ,
I want to read the data from 9 tables in oracle DB into 9 different files in the same connection instance (session). I am able to get data from one table to one file with below code :
X=`sqlplus -s user/pwd@DB <<eof
select col1 from table1;
EXIT;
eof`
echo $X>myfile
Can anyone... (2 Replies)
Discussion started by: net
2 Replies
2. Programming
I'm pretty new to the database world and I've run into a mental block of sorts. I've been unable to find the answer anywhere. Here's my problem: I have several tables and everything is as normalized as possible (as I've been lead to understand normalization.) Normalization has lead to some... (1 Reply)
Discussion started by: flakblas
1 Replies
3. Shell Programming and Scripting
I've hunted and hunted but nothing seems to apply to what I need. Any help will be much appreciated!
My input file looks like (Unix):
marker,allele1,allele2
RS1002244,1,1
RS1002244,1,3
RS1002244,3,3
RS1003719,2,2
RS1003719,2,4
RS1003719,4,4
Most markers are listed 3 times but a few... (2 Replies)
Discussion started by: Peggy White
2 Replies
4. Shell Programming and Scripting
Hi..
File 1:
1 aa rep
1 dd rep
1 kk rep
2 bb sad
2 ss sad
3 ee dam
File 2
1 apple fruit
2 mango tree
3 lilly flower
output:
1 aaple fruit aa,dd,kk rep (7 Replies)
Discussion started by: empyrean
7 Replies
5. Web Development
Say I have two tables like below..
status
HId sName dName StartTime EndTime
1 E E 9:10 10:10
2 E F 9:15 10:15
3 G H 9:17 10:00
logic
Id devName capacity free Line
1 E 123 34 1
2 E 345 ... (3 Replies)
Discussion started by: ilan
3 Replies
6. Shell Programming and Scripting
Hi all,
I have a complex (beyond my biological expertise) problem at hand.
I need to merge multiple files into 1 big matrix. Please help me with some code.
Inp1
Ang_0 chr1 98 T A
Ang_0 chr1 352 G A
Ang_0 chr1 425 C T
Ang_0 chr2 ... (1 Reply)
Discussion started by: newbie83
1 Replies
7. Shell Programming and Scripting
multiple files to load into different tables,
I have a script show below, but this script loads data from txt file into a table,
but i have multiple input files(xyzload.txt,xyz1load.txt,xyz2load.txt......) in the unix folder ,
can we load these files in diff tables (table 1, table2... (0 Replies)
Discussion started by: nani1984
0 Replies
8. Shell Programming and Scripting
multiple files to load into different tables,
I have a script show below, but this script loads data from txt file into a table,
but i have multiple input files(xyzload.txt,xyz1load.txt,xyz2load.txt......) in the unix folder ,
can we load these files in diff tables (table 1, table2... (1 Reply)
Discussion started by: nani1984
1 Replies
9. UNIX for Dummies Questions & Answers
Hi,
Please excuse me , i have searched unix forum, i am unable to find what i expect ,
my query is , i have 2 files of same structure and having 1 similar field/column , i need to merge 2 tables/files based on the one matched field/column (that is field 1),
file 1:... (5 Replies)
Discussion started by: karthikram
5 Replies
10. UNIX for Beginners Questions & Answers
Hello All,
just wanted to export multiple tables from oracle sql using unix shell script to csv file and the below code is exporting only the first table.
Can you please suggest why? or any better idea?
export FILE="/abc/autom/file/geo_JOB.csv"
Export= `sqlplus -s dev01/password@dEV3... (16 Replies)
Discussion started by: Hope
16 Replies
LEARN ABOUT DEBIAN
bio::popgen::genotype
Bio::PopGen::Genotype(3pm) User Contributed Perl Documentation Bio::PopGen::Genotype(3pm)
NAME
Bio::PopGen::Genotype - An implementation of GenotypeI which is just an allele container
SYNOPSIS
use Bio::PopGen::Genotype;
my $genotype = Bio::PopGen::Genotype->new(-marker_name => $name,
-individual_id => $indid,
-alleles => @alleles);
DESCRIPTION
This object will contain alleles for a given marker for a given individual.
The class variable BlankAlleles (accessible through $Bio::PopGen::Genotype::BlankAlleles = 'somepattern') can be set to a regexp pattern
for identifying blank alleles which should no be counted (they are effectively missing data). By default it set to match white space, '-',
'N' or 'n', and '?' as blank alleles which are skipped.
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 the
Bioperl mailing list. 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 of the bugs and their resolution. Bug reports can be submitted via the
web:
https://redmine.open-bio.org/projects/bioperl/
AUTHOR - Jason Stajich
Email jason-at-bioperl.org
CONTRIBUTORS
Matthew Hahn, matthew.hahn-at-duke.edu
APPENDIX
The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _
new
Title : new
Usage : my $obj = Bio::PopGen::Genotype->new();
Function: Builds a new Bio::PopGen::Genotype object
Returns : an instance of Bio::PopGen::Genotype
Args : -marker_name => string representing name of the marker
-individual_id => string representing individual id (optional)
-alleles => arrayref with each item in the array being an allele
marker_name
Title : marker_name
Usage : my $name = $genotype->marker_name();
Function: Get the marker name for a genotype result
Returns : string
Args : [optional] marker name value to store
individual_id
Title : individual_id
Usage : my $indid = $genotype->individual_id();
Function: Gets the individual id associated with a genotype
This is effectively a back reference since we will typically
associate a genotype with an individual with an
individual HAS-A genotype relationship.
Returns : unique id string for an individual
Args : none
get_Alleles
Title : get_Alleles
Usage : my @alleles = $genotype->get_Alleles();
Function: Get the alleles for a given marker and individual
Returns : array of alleles (strings in this implementation)
Args : $showblank - boolean flag to indicate return ALL alleles not
skipping the coded EMPTY alleles
Note : Uses the class variable $BlankAlleles to test if alleles
should be skipped or not.
add_Allele
Title : add_Allele
Usage : $genotype->add_Allele(@alleles);
Function: Add alleles to the genotype, at this point there is no
verification to insure that haploid individuals only have 1
allele or that diploids only have 2 - we assume that is
done by the user creating these objects
Returns : count of the number of alleles in genotype
Args : Array of alleles to store
reset_Alleles
Title : reset_Alleles
Usage : $genotype->reset_Alleles;
Function: Resets the stored alleles so the list is empty
Returns : None
Args : None
perl v5.14.2 2012-03-02 Bio::PopGen::Genotype(3pm)