Perl: the Markov chain saw PerlMonks

### comment on

 Need Help??
Hello Monks Greetings

My name is Bharat yadav and I am a researcher in Punjab Agricultural University - Ludhiana.

I am facing a problem regarding perl.

I know this will consume your time... but your favour and expertise helps me a lot

I am trying to make a perl script which let me know the location of the coordinates of 384 well array.

We do have 2 types of plates one is 384 well plate and second 96 well.

The dimensions of 384 well plate having 24 columns (1,2,3...24) and 16 rows (A,B,C...P)

Where as 96 well plate has 12 columns (1,2,3..12) and 8 rows (A,B,C..H)

these 384 well plates contains 4 different types of samples which were transferred into four 96 well plate.

The big problem is the four samples in 384 well plates which are alternatively arranged in the plate

Suppose we have four samples like B1, B2, B3 and B4

so

B1_XX01 is placed in A1

B1_XX02 is placed in C1

and so on upto O1..

the remaining samples of B1 is now filled in next to

next column i.e.

B1_XX09 is placed in A3

B1_XX10 is placed in C3

and so on up to 96 samples were filled

Similarly Sample B2_SS01 is placed in A2

B2_SS02 is placed in C2

and so on upto O2..

the remaining samples of B2 is now filled in next to

next column i.e.

B2_SS09 is placed in A5

B2_SS10 is placed in C5

and so on up to 96 samples were filled

B3_AA01 is placed in B1

B3_AA02 is placed in D1

and so on upto O1..

the remaining samples of B3 is now filled in next to

next column i.e.

B3_AA09 is placed in B3

B3_AA10 is placed in D3

and so on up to 96 samples were filled

Similarly Sample B4_ZZ01 is placed in B2

B4_ZZ02 is placed in D2

and so on upto O2..

the remaining samples of B4 is now filled in next to

next column i.e.

B4_ZZ09 is placed in B5

B4_ZZ10 is placed in D5

and so on up to 96 samples were filled

Now each plate has a single type of sample in 96 well plate and plates were named as Plate1, Plate2, Plate3 and Plate4

The query been asked from any of these four plates and need to check form which well of this query has been come form 384 well plate. we need its coordinates location

The main input for this program is a tab delimited text file which has 16X24 names like B*_**01, etc.

I just want a program which reads all entries form input file and split in the distributed fashion as mentioned above, and the program stores all the entries of four samples in four plates (either temporary), ie plate-1 has all 12X8 B1 Samples, plate-2 has all 12X8 B2 Samples plate-3 has all 12X8 B3 Samples ,plate-4 has all 12X8 B4 Samples.

There is a module exist which can help regarding this problem named LIMS::MT_Plate. and according to this the distribution that I mentioned above is default quadrant offset. Here I am unable to distribute my 384 samples to 4 plates of 96 samples

I am kindly requesting to help me

program should be run like

perl well_identifier.pl testdata Plate3 b5

here well_identifier.pl is name of program

testdata is tab delimited text file

Plate3 is the Plate no 3 which contains All B3 samples

b5 is the query

and "BAC_384_data_input_file" is our input file containing 384 entries of all four samples

So with this query I want to figure the location of the entry containing in 10 C of Plate-3 in the 384 well plate. the answer of this query printed on the terminal as 19 E of 384 well plate

Hope that you are now able to understand problem... If dont then please ask me the confusion...

Here is my code

```if(@ARGV < 3) {
print "USAGE:: well_identifier.pl <Input file (BAC's 384 tab delim
+ited text file)> <Plate Number (Plate1/Plate2,Plate3 or Plate4)> <Que
+ry (i.e. b2> \n**************Use this program to extract Well locatio
+n of 96 well plate from 384 well plate***********\n";
exit;
}
use Data::Dumper;
use LIMS::MT_Plate;
use Microarray;

my \$inputfile = \$ARGV[0];
my \$queryplate = \$ARGV[1];
my \$plateno = \$ARGV[2];
my \$query = \$ARGV[3];

open(IN,\$inputfile) || die "cant open file";
@data=<IN>;
close(IN);

foreach \$line(@data)
{
chomp(\$line);
#print"\$line";
#print "till now...its working \n";
\$oPlate1 = mt_plate->new('Plate1',96);
\$oPlate2 = mt_plate->new('Plate2',96);
\$oPlate3 = mt_plate->new('Plate3',96);
\$oPlate4 = mt_plate->new('Plate4',96);

\$oPlate1->fill_wells(\@samples1);
\$oPlate2->fill_wells(\@samples2);
\$oPlate3->fill_wells(\@samples3);
\$oPlate4->fill_wells(\@samples4);

\$oPlate5 = mt_plate->new('Plate5',384);
\$oPlate5->import_mt_plate_file('mt_plate_file',\$inputfile);

#\$oPlate5->join_plates(\$oPlate1,\$oPlate2,\$oPlate3,\$oPlate4);

#\$sample_name = \$oPlate5->get_sample_name('b2');
#\$sample_name = \$oPlate5->get_sample_name(\$query);
print "The sample \$query placed in \$queryplate is the location \$sample
+_name of Master Plate\n";

}

I am unable to distribute the 4 sample quadrant offset as described above

Thanks in anticipation

Warm regards from

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

• Are you posting in the right place? Check out Where do I post X? to know for sure.
• Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
• Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
• Want more info? How to link or How to display code and escape characters are good places to start.

Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (2)
As of 2023-09-23 21:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
Voting Booth?

No recent polls found

Notices?