Skip to content

Commit

Permalink
An urgent fix to FACS data handling.
Browse files Browse the repository at this point in the history
  • Loading branch information
stela2502 committed Mar 10, 2016
1 parent 8c7eeee commit 09968e1
Show file tree
Hide file tree
Showing 6 changed files with 105 additions and 1 deletion.
47 changes: 47 additions & 0 deletions SCExV/lib/HTpcrA/Controller/GEOfiles.pm
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
package HTpcrA::Controller::GEOfiles;
use Moose;
use namespace::autoclean;

BEGIN { extends 'Catalyst::Controller'; }

=head1 NAME
HTpcrA::Controller::GEOfiles - Catalyst Controller
=head1 DESCRIPTION
Catalyst Controller.
=head1 METHODS
=cut


=head2 index
=cut

sub index :Path :Args(0) {
my ( $self, $c ) = @_;

$c->response->body('Matched HTpcrA::Controller::GEOfiles in GEOfiles.');
}



=encoding utf8
=head1 AUTHOR
Stefan Lang
=head1 LICENSE
This library is free software. You can redistribute it and/or modify
it under the same terms as Perl itself.
=cut

__PACKAGE__->meta->make_immutable;

1;
3 changes: 2 additions & 1 deletion SCExV/lib/HTpcrA/EnableFiles.pm
Original file line number Diff line number Diff line change
Expand Up @@ -229,11 +229,12 @@ sub __fix_file_problems {
## 1,000 == 1000 !!!!!!!
while (<IN>) {
foreach my $problem ( $_ =~ m/(["']-?\d+,\d+,?\d*["'])/g ) {
##Carp::confess( join(":::", $_ =~ m/(["']-?\d+,\d+,?\d*["'])/g) );
$rep = $problem;
$rep =~ s/["',]//g;
$_ =~ s/$problem/$rep/;
$_ =~ s/["']//g;
}
$_ =~ s/["']//g;
print OUT $_;
}
}
Expand Down
31 changes: 31 additions & 0 deletions SCExV/lib/HTpcrA/Model/GEO_files.pm
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
package HTpcrA::Model::GEO_files;
use Moose;
use namespace::autoclean;

extends 'Catalyst::Model';

=head1 NAME
HTpcrA::Model::GEO_files - Catalyst Model
=head1 DESCRIPTION
Catalyst Model.
=encoding utf8
=head1 AUTHOR
Stefan Lang
=head1 LICENSE
This library is free software. You can redistribute it and/or modify
it under the same terms as Perl itself.
=cut

__PACKAGE__->meta->make_immutable;

1;
1 change: 1 addition & 0 deletions SCExV/root/R_lib/Tool_Pipe.R
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ read.PCR.heatmap <- function (fname,use_pass_fail=T){
}

read.FACS <- function(fname,use_pass_fail=T) {
browser()
ftab <- matrix(ncol=0, nrow=1)
try( ftab <- read.PCR ( fname, use_pass_fail ), silent=T )
if ( ncol(ftab) == 0 ){
Expand Down
16 changes: 16 additions & 0 deletions SCExV/root/R_lib/Tool_grouping.R
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,14 @@ group_1D_worker <- function (ma, gene, ranges ) {
userGroups
}

#' @name checkGrouping
#' @aliases checkGrouping,FluidigmSet-method
#' @rdname checkGrouping-methods
#' @docType methods
#' @description
#' @param userGroups a data.frame with three column the first being the sample name and the third the group ID
#' @param data the fluidigm data object to check against
#' @export
checkGrouping <- function ( userGroups, data=NULL ){
userGroups$groupID <- as.vector( as.numeric( userGroups$groupID ))
if ( !is.null(data) ){
Expand Down Expand Up @@ -78,6 +86,14 @@ checkGrouping <- function ( userGroups, data=NULL ){
if ( min(userGroups$groupID) > 1 ){
userGroups$groupID <- userGroups$groupID - ( min(userGroups$groupID) -1 )
}
for ( i in 1:max(userGroups$groupID) ) {
if ( length( grep (i,userGroups$groupID) ) == 0 ){
m <- which( userGroups$groupID > i)
if ( length(m) >0 ) {
userGroups$groupID[m] <- userGroups$groupID[m] -1
}
}
}
userGroups
}

Expand Down
8 changes: 8 additions & 0 deletions SCExV/t/model_GEO_files.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
use strict;
use warnings;
use Test::More;


BEGIN { use_ok 'HTpcrA::Model::GEO_files' }

done_testing();

0 comments on commit 09968e1

Please sign in to comment.