Created
August 13, 2013 13:27
-
-
Save sashaphanes/6221050 to your computer and use it in GitHub Desktop.
extract specific gene expression data from the ABA RNA-Seq BrainSpan Matrix
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ perl extract.data.pl GENESYMBL 2 |perl -ne '{chomp; $row++; @cols = split (/\t/, $_); $colNo = 0; foreach $data (@cols) {$colNo++; $h{$colNo}{$row} = $data; } if (eof) { foreach $colNo (sort {$a<=>$b} keys %h) { $newRow =""; foreach $row (sort {$a<=>$b} keys %{$h{$colNo}} ) {$data = $h{$colNo}{$row}; $newRow .="$data\t"; } $newRow =~ s/\t$//; print "$newRow\n"; } } }' |sed 's/"//g' >gene.data/GENESYMBL.txt; paste sample.info.txt gene.data/GENESYMBL.txt >gene.data/GENESYMBL.data; rm gene.data/GENESYMBL.txt; cut -f4 gene.data/GENESYMBL.data >gene.data/GENESYMBL.val; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment