read.targets() in the Agi4x44PreProcess package
1
0
Entering edit mode
Massimo Pinto ▴ 390
@massimo-pinto-3396
Last seen 10.2 years ago
Greetings all, please consider my targets file FileName Treatment GErep Biorep Culture Array t0Cn1 41741_1_1_1.txt Cn 1 1 t0 41741 t0Cn3 41742_1_1_3.txt Cn 1 3 t0 41742 .... how can I make read.targets() use my first targets column to define the row names, and make them available (as t0Cn1, toCn3 instead of 41741_1_1_1, 41742_1_1_3) for all plotting functions that are supplied in the Agi4x44PreProcess package? It would help extract sense from all of those plots. As an alternative, I may re-define the filenames, but it kind of make sense to retain their original names. Plus, it would be a declararion of defeat. Inspired by the help file for read.targets(), I am trying to borrow the argument row.names from the function read.data() > targets=read.targets(infile="Targets_T0.txt", row.names=1) to no avail, as I may be forcing read.targets() to work like read.data, while the two functions may not know each other. row.namesa vector of row names. This can be a vector giving the actual row names, or a single number giving the column of the table which contains the row names, or character string giving the name of the table column containing the row names. If there is a header and the first row contains one fewer field than the number of columns, the first column in the input is used for the row names. Otherwise if row.names is missing, the rows are numbered. Using row.names = NULL forces row numbering. Missing or NULL row.names generate row names that are considered to be ‘automatic’ (and not preserved by as.matrix<file: library="" frameworks="" r.framework="" resources="" library="" bas="" e="" html="" matrix.html=""> ). thank you Massimo -- Massimo Pinto Post Doctoral Research Fellow Enrico Fermi Centre and Italian Public Health Research Institute (ISS), Rome http://claimid.com/massimopinto [[alternative HTML version deleted]]
Agi4x44PreProcess Agi4x44PreProcess • 1.3k views
ADD COMMENT
0
Entering edit mode
@pedro-lopez-romero-3331
Last seen 10.2 years ago
Hi Massimo, just try > targets=cbind(targets,targets$FileName) > targets[,1]=rownames(targets) > colnames(targets)[4]='FileName2' > targets p.- On Thu, May 7, 2009 at 9:31 AM, Massimo Pinto <pintarello@gmail.com> wrote: > Greetings all, > please consider my targets file > > FileName Treatment GErep Biorep Culture Array > t0Cn1 41741_1_1_1.txt Cn 1 1 t0 41741 > t0Cn3 41742_1_1_3.txt Cn 1 3 t0 41742 > .... > > how can I make read.targets() use my first targets column to define the row > names, and make them available (as t0Cn1, toCn3 instead > of 41741_1_1_1, 41742_1_1_3) for all plotting functions that are supplied > in > the Agi4x44PreProcess package? It would help extract sense from all of > those > plots. > As an alternative, I may re-define the filenames, but it kind of make sense > to retain their original names. Plus, it would be a declararion of defeat. > > Inspired by the help file for read.targets(), I am trying to borrow the > argument row.names from the function read.data() > > > targets=read.targets(infile="Targets_T0.txt", row.names=1) > to no avail, as I may be forcing read.targets() to work like read.data, > while the two functions may not know each other. > > row.namesa vector of row names. This can be a vector giving the actual row > names, or a single number giving the column of the table which contains the > row names, or character string giving the name of the table column > containing the row names. > If there is a header and the first row contains one fewer field than the > number of columns, the first column in the input is used for the row names. > Otherwise if row.names is missing, the rows are numbered. > Using row.names = NULL forces row numbering. Missing or NULL row.names > generate > row names that are considered to be ‘automatic’ (and not preserved by > > as.matrix<file: library="" frameworks="" r.framework="" resources="" library="" b="" ase="" html="" matrix.html=""> > ). > > thank you > Massimo > > -- > Massimo Pinto > Post Doctoral Research Fellow > Enrico Fermi Centre and Italian Public Health Research Institute (ISS), > Rome > http://claimid.com/massimopinto > > [[alternative HTML version deleted]] > > > _______________________________________________ > Bioconductor mailing list > Bioconductor@stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: > http://news.gmane.org/gmane.science.biology.informatics.conductor > [[alternative HTML version deleted]]
ADD COMMENT
0
Entering edit mode
thank you...getting worse though. X FileName Treatment FileName2 Biorep Culture Array targets$FileName 41741_1_1_1 41741_1_1_1 41741_1_1_1.txt Cn 1 1 t0 41741 41741_1_1_1.txt 41742_1_1_3 41742_1_1_3 41742_1_1_3.txt Cn 1 3 t0 41742 41742_1_1_3.txt 41744_1_4_4 41744_1_4_4 41744_1_4_4.txt Cn 1 4 t0 41744 41744_1_4_4.txt Anyways I should be able to tweek it with your hints, now! Fingers crossed. Cheers Massimo On Thu, May 7, 2009 at 3:58 PM, Pedro Lopez-Romero <plromero1.bioc@gmail.com> wrote: > Hi Massimo, > > just try > > > targets=cbind(targets,targets$FileName) > > targets[,1]=rownames(targets) > > colnames(targets)[4]='FileName2' > > targets > > p.- > > On Thu, May 7, 2009 at 9:31 AM, Massimo Pinto <pintarello@gmail.com>wrote: > >> Greetings all, >> please consider my targets file >> >> FileName Treatment GErep Biorep Culture Array >> t0Cn1 41741_1_1_1.txt Cn 1 1 t0 41741 >> t0Cn3 41742_1_1_3.txt Cn 1 3 t0 41742 >> .... >> >> how can I make read.targets() use my first targets column to define the >> row >> names, and make them available (as t0Cn1, toCn3 instead >> of 41741_1_1_1, 41742_1_1_3) for all plotting functions that are supplied >> in >> the Agi4x44PreProcess package? It would help extract sense from all of >> those >> plots. >> As an alternative, I may re-define the filenames, but it kind of make >> sense >> to retain their original names. Plus, it would be a declararion of defeat. >> >> Inspired by the help file for read.targets(), I am trying to borrow the >> argument row.names from the function read.data() >> >> > targets=read.targets(infile="Targets_T0.txt", row.names=1) >> to no avail, as I may be forcing read.targets() to work like read.data, >> while the two functions may not know each other. >> >> row.namesa vector of row names. This can be a vector giving the actual row >> names, or a single number giving the column of the table which contains >> the >> row names, or character string giving the name of the table column >> containing the row names. >> If there is a header and the first row contains one fewer field than the >> number of columns, the first column in the input is used for the row >> names. >> Otherwise if row.names is missing, the rows are numbered. >> Using row.names = NULL forces row numbering. Missing or NULL row.names >> generate >> row names that are considered to be ‘automatic’ (and not preserved by >> >> as.matrix<file: library="" frameworks="" r.framework="" resources="" library="" base="" html="" matrix.html=""> >> ). >> >> thank you >> Massimo >> >> -- >> Massimo Pinto >> Post Doctoral Research Fellow >> Enrico Fermi Centre and Italian Public Health Research Institute (ISS), >> Rome >> http://claimid.com/massimopinto >> >> [[alternative HTML version deleted]] >> >> >> _______________________________________________ >> Bioconductor mailing list >> Bioconductor@stat.math.ethz.ch >> https://stat.ethz.ch/mailman/listinfo/bioconductor >> Search the archives: >> http://news.gmane.org/gmane.science.biology.informatics.conductor >> > > -- Massimo Pinto Post Doctoral Research Fellow Enrico Fermi Centre and Italian Public Health Research Institute (ISS), Rome http://claimid.com/massimopinto [[alternative HTML version deleted]]
ADD REPLY
0
Entering edit mode
It ended up being a simple problem of data.frame manipulation. The following works it out:rownames(targets) <- targets[,1] Cheers, Massimo On Thu, May 7, 2009 at 4:17 PM, Massimo Pinto <pintarello@gmail.com> wrote: > thank you...getting worse though. > X FileName Treatment FileName2 Biorep Culture > Array targets$FileName > 41741_1_1_1 41741_1_1_1 41741_1_1_1.txt Cn 1 1 t0 > 41741 41741_1_1_1.txt > 41742_1_1_3 41742_1_1_3 41742_1_1_3.txt Cn 1 3 t0 > 41742 41742_1_1_3.txt > 41744_1_4_4 41744_1_4_4 41744_1_4_4.txt Cn 1 4 t0 > 41744 41744_1_4_4.txt > > Anyways I should be able to tweek it with your hints, now! Fingers crossed. > Cheers > Massimo > > On Thu, May 7, 2009 at 3:58 PM, Pedro Lopez-Romero < > plromero1.bioc@gmail.com> wrote: > >> Hi Massimo, >> >> just try >> >> > targets=cbind(targets,targets$FileName) >> > targets[,1]=rownames(targets) >> > colnames(targets)[4]='FileName2' >> > targets >> >> p.- >> >> On Thu, May 7, 2009 at 9:31 AM, Massimo Pinto <pintarello@gmail.com>wrote: >> >>> Greetings all, >>> please consider my targets file >>> >>> FileName Treatment GErep Biorep Culture Array >>> t0Cn1 41741_1_1_1.txt Cn 1 1 t0 41741 >>> t0Cn3 41742_1_1_3.txt Cn 1 3 t0 41742 >>> .... >>> >>> how can I make read.targets() use my first targets column to define the >>> row >>> names, and make them available (as t0Cn1, toCn3 instead >>> of 41741_1_1_1, 41742_1_1_3) for all plotting functions that are supplied >>> in >>> the Agi4x44PreProcess package? It would help extract sense from all of >>> those >>> plots. >>> As an alternative, I may re-define the filenames, but it kind of make >>> sense >>> to retain their original names. Plus, it would be a declararion of >>> defeat. >>> >>> Inspired by the help file for read.targets(), I am trying to borrow the >>> argument row.names from the function read.data() >>> >>> > targets=read.targets(infile="Targets_T0.txt", row.names=1) >>> to no avail, as I may be forcing read.targets() to work like read.data, >>> while the two functions may not know each other. >>> >>> row.namesa vector of row names. This can be a vector giving the actual >>> row >>> names, or a single number giving the column of the table which contains >>> the >>> row names, or character string giving the name of the table column >>> containing the row names. >>> If there is a header and the first row contains one fewer field than the >>> number of columns, the first column in the input is used for the row >>> names. >>> Otherwise if row.names is missing, the rows are numbered. >>> Using row.names = NULL forces row numbering. Missing or NULL row.names >>> generate >>> row names that are considered to be ‘automatic’ (and not preserved by >>> >>> as.matrix<file: library="" frameworks="" r.framework="" resources="" library="" base="" html="" matrix.html=""> >>> ). >>> >>> thank you >>> Massimo >>> >>> -- >>> Massimo Pinto >>> Post Doctoral Research Fellow >>> Enrico Fermi Centre and Italian Public Health Research Institute (ISS), >>> Rome >>> http://claimid.com/massimopinto >>> >>> [[alternative HTML version deleted]] >>> >>> >>> _______________________________________________ >>> Bioconductor mailing list >>> Bioconductor@stat.math.ethz.ch >>> https://stat.ethz.ch/mailman/listinfo/bioconductor >>> Search the archives: >>> http://news.gmane.org/gmane.science.biology.informatics.conductor >>> >> >> > > > -- > Massimo Pinto > Post Doctoral Research Fellow > Enrico Fermi Centre and Italian Public Health Research Institute (ISS), > Rome > http://claimid.com/massimopinto > -- Massimo Pinto Post Doctoral Research Fellow Enrico Fermi Centre and Italian Public Health Research Institute (ISS), Rome http://claimid.com/massimopinto [[alternative HTML version deleted]]
ADD REPLY

Login before adding your answer.

Traffic: 624 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6