Home > Blockchain >  Correlation plots and bar plots to visualize four datasets in R
Correlation plots and bar plots to visualize four datasets in R

Time:09-08

I've got some scores post-ssGSEA score calculation into four data frames in r.

The data frame looks something like this:

dput(t_ssgsea_OPC[1:250,])
structure(list(Classical = c(0.170108215263314, 0.114886799846454, 
-0.0433822339467479, -0.00469865728946475, 0.0649332185725774, 
0.14494101932079, -0.0697339784742576, 0.0359031072696755, 0.0819241415759157, 
0.0525898107765367, -0.0262673435094129, 0.0724413011648729, 
0.0718410799260193, 0.138459042427962, 0.00187758578776051, 0.130860138328614, 
-0.00785700946621979, 0.166659665183798, 0.087469974019861, 0.00520666449411215, 
0.201875139081764, 0.111511986991518, 0.0428037028330825, 0.128484855912955, 
0.102517646173737, 0.17374405712813, 0.0467320038561245, 0.101829532068939, 
0.0169200463785532, 0.0314213433768912, 0.0726153604878737, 0.0655398959750482, 
0.0867384392370428, 0.075270246605527, 0.0518719980793567, 0.0365716404690516, 
0.00280753055236057, -0.0157243902602108, 0.068984414108104, 
0.0753309735936252, 0.0903913968763743, 0.130803115860715, -0.0583472965583361, 
0.0539338964482673, 0.18614176661641, 0.133337013542707, 0.128860869354087, 
0.00775021556301978, 0.0304375283861853, 0.0969154004723449, 
0.0440432423740038, 0.0514721815243848, 0.0188966504319069, 0.036400473498582, 
0.0931621088430633, 0.015973047913934, -0.112102773753931, 0.0375358691820309, 
0.0231623967158227, 0.00755839130481299, 0.175834227617682, 0.0925580083835334, 
0.016002934841623, 0.0104403889965576, 0.0403876828743889, -0.0021844561523563, 
0.089968294556224, 0.194821493705845, 0.271722181399955, 0.242446921673979, 
0.271987744818148, 0.223712220445663, 0.165586378057774, 0.1506590202983, 
0.120070944363789, 0.138277526693716, 0.115614037961324, 0.219553705715035, 
0.0646435840473846, 0.230397164175171, 0.322515887939351, 0.121495138586337, 
0.172209193465948, 0.154182894472923, 0.19989504000811, 0.0790344346851463, 
0.175625084560608, 0.206889847407807, 0.186958681197263, 0.156031526919684, 
0.122031501428248, 0.153609872042977, 0.297346629419192, 0.164053571631092, 
0.192244440134053, 0.195902858928807, 0.179595267404347, 0.11211377616966, 
0.184788915169867, 0.0821951021116468, 0.180223839306179, 0.253495752930854, 
0.290838954126641, 0.172029403084694, 0.189854483081178, 0.195970861242059, 
0.22170407594156, 0.157542420355736, 0.134975790464065, 0.182203500982056, 
0.236512558837931, 0.279070975964878, 0.0105343270778819, 0.171712785163651, 
0.033041312397751, 0.0543366324842044, 0.237871632960337, 0.256974218884252, 
0.226096450518517, 0.230603952174467, 0.159715265306095, 0.276230271451198, 
0.16097955164585, 0.0629037063218569, -0.0255082270494387, -0.0133134171875939, 
-0.0151039283052214, 0.0929342262293266, -0.000391737499040656, 
0.0615469706198229, 0.0239669330740987, -0.0823377712759636, 
0.0306809776573544, -0.0170723237273725, -0.0135188641247092, 
0.180934419292323, 0.0996270560496638, 0.109578581025841, 0.156722788372773, 
0.159068255892857, 0.154488256501679, 0.155903781337109, 0.193468852236488, 
0.200348581020177, 0.21217910334353, 0.319325811127752, 0.20177743905096, 
0.170655447666776, 0.0999485706183248, 0.127187479444505, 0.177126697854001, 
0.193243721262921, 0.200019628440622, 0.20198554126234, 0.202672833283325, 
0.165776676135196, 0.0763096056058857, 0.141841750940009, 0.351090497243205, 
0.30899463207728, 0.20511218068267, 0.240248925768822, 0.120457550024317, 
0.162201360453361, 0.171916879401889, 0.2016729344159, 0.238339102679282, 
0.260207174800308, 0.159927931297486, 0.216011049487436, 0.114659740280665, 
0.0946548061162709, 0.25277084784608, 0.238156248977357, 0.200048848498764, 
0.194883046623097, 0.173245615226933, 0.284223934682648, 0.275725159308318, 
0.163559676669077, 0.23157219746255, 0.109431859720995, 0.189683345471309, 
0.147307832997833, 0.234947361796831, 0.217851157098403, 0.22578754816832, 
0.193435385764211, 0.224375370295804, 0.187126811222878, 0.172216357501303, 
0.140803707950244, 0.219481079894059, 0.0869106516449241, 0.158698278354478, 
0.223498590748069, 0.148358759890619, 0.151268025844013, 0.161317860580822, 
0.185723753906694, 0.158109422671561, 0.0543976537186566, 0.181063571933233, 
0.296750929409692, 0.172328232554529, 0.218437944745669, 0.134515674608021, 
0.141146410308931, -0.0333742886569763, 0.183210977262298, 0.169414872319876, 
0.211501466563105, 0.208340152967405, 0.0258860980724383, 0.157364049126767, 
0.127703640778876, 0.200570244740657, 0.169767046883023, 0.150619291507377, 
0.218646498595603, 0.253361663635755, 0.178937637264517, 0.186068525437185, 
0.145327046056724, 0.251512555011897, 0.0583804366623804, 0.12344696371731, 
0.0721399619080496, 0.176345182648115, 0.15186957730983, 0.158100412966323, 
0.1185557837982, 0.339361558844283, 0.20902067065633, 0.159491502378595, 
0.0889898892768523, 0.156793439106545, 0.179256604812283, 0.161566444994228, 
0.213826039738047, 0.239496053074193, 0.135298061071218, 0.147928881014446, 
0.182897236780945, 0.226410326097284, 0.297462219843412, 0.0357032257285191, 
0.142875007647642, 0.227668861294624, 0.25647057987551), Mesenchymal = c(-0.100520529444498, 
-0.126027050168263, -0.0824805118287187, -0.0876562784281423, 
-0.0853710491480246, -0.00175990404128468, -0.11078678372627, 
-0.101195087959792, -0.113836650907859, -0.0423691501383203, 
-0.0904841999136126, -0.10535734403058, -0.106823771486252, -0.101845473119697, 
-0.12203435645632, -0.0592053575864742, -0.0703882406732863, 
-0.0753395262090268, -0.0823726925932973, -0.0815666931137101, 
-0.0945031136337147, -0.101788705844223, -0.0886107732910419, 
-0.0752683818115818, -0.0836193040522463, -0.0704051808063166, 
-0.077403835999581, -0.0556543764501422, -0.127637874550226, 
-0.0976113639729266, -0.0897552122677692, -0.141171016455946, 
-0.0563378821825402, -0.125127673131862, -0.0663806764723173, 
-0.0915318847133618, -0.0586762727654335, -0.116288361783692, 
-0.0561197802940899, -0.0373258741157777, -0.0672379940545006, 
-0.0874642292541036, -0.125467217495605, -0.13229942661178, -0.0973186876281702, 
-0.11921950947769, -0.082361488998287, -0.123987437938251, -0.0670483825516142, 
-0.0385506552592678, 0.054960368837218, -0.0811921655362806, 
-0.0770667333690225, -0.115939628897573, -0.0704338617937058, 
-0.0880959326143346, -0.0767084277489571, -0.101128971992487, 
-0.0119305488798109, -0.080400252665919, -0.119841573169361, 
-0.0485425072512167, -0.0306951157560808, -0.0845775388973587, 
-0.0655688471997504, -0.0622696675079958, -0.049870687453398, 
-0.101740363962406, -0.0755780408985891, -0.113457744528412, 
0.010294591502692, -0.109081454781224, -0.0949550253200878, -0.157234914196126, 
-0.106158543793203, -0.148407965745504, -0.155036790142858, -0.106054150017695, 
-0.176944965279421, -0.0764078972387434, -0.0879141230373302, 
-0.120070143922938, -0.104717798266651, -0.0942788183282509, 
-0.155760216407429, -0.17965593264972, -0.122545825437599, -0.151041074599186, 
-0.146127162001115, -0.171861696690735, -0.130125171445662, -0.132628287674963, 
-0.036660152890459, -0.158046620910114, -0.140310946436542, -0.130151908606086, 
-0.154790117323475, -0.0967994655711587, -0.142463810759164, 
-0.140198948190558, -0.109899690116532, -0.143714386531328, -0.116502031637587, 
-0.106194288279334, -0.167020684650722, -0.210421607016491, -0.129389096161299, 
-0.110963409419575, -0.131694228114674, -0.133607159343662, -0.101276928651445, 
-0.116934179884394, -0.142742962725529, -0.174631158326358, -0.0618512693389243, 
-0.131242756759616, -0.123774481467307, -0.154231530233154, -0.100794782218089, 
-0.116629315266173, -0.0886232380774938, -0.116349035778232, 
-0.128445584566617, -0.114024775376044, -0.0145343473698586, 
-0.0844815298626013, -0.063865060528527, -0.0278529799764223, 
-0.0291436086009978, -0.0711921471510667, -0.0296052651710338, 
-0.0482492776387729, -0.0475042571928516, -0.0716181955777786, 
-0.0256343519377975, -0.217859833615386, -0.115709151733898, 
-0.0794592024199129, -0.142711123161397, -0.0983552179194559, 
-0.0789225208036652, -0.12586048207666, -0.0419061832136688, 
-0.150165125319493, -0.114085469021222, -0.1504727351273, -0.140874051111572, 
-0.156053572578519, -0.17448214964338, -0.158317474305029, -0.113659654794043, 
-0.167031400833738, -0.121858778777908, -0.112863654370292, -0.150158620970386, 
-0.142235189402355, -0.162711803613139, -0.115173034999141, -0.13744881372667, 
-0.134520422876689, -0.12928475509978, -0.115037341687442, -0.105199575597355, 
-0.192438631116173, -0.182960632163196, -0.167292268415427, -0.115020935134465, 
-0.0712817737506709, -0.142951517037356, -0.184929667963104, 
-0.126141631393645, -0.0615603311030935, -0.169785488099693, 
-0.1501498813339, -0.108137111203226, -0.0856310585011608, -0.0880305106737272, 
-0.0996540185934002, -0.110032787852215, -0.0981977254166775, 
-0.104808755890162, -0.0593785868385864, -0.146294177141711, 
-0.171716049428099, -0.0747600474676803, -0.1065616446046, -0.135978948385033, 
-0.147443978290059, -0.123949795853784, -0.179979010180489, -0.183172147878263, 
-0.103598035742409, -0.162368557980741, -0.109752926381465, -0.148200852788952, 
-0.129153999690378, -0.0908731346557054, -0.154111936722824, 
-0.110738544022044, -0.145947750464638, -0.158337623124326, -0.107409956994688, 
-0.111038529644808, -0.130653718829609, -0.118488434177193, -0.0866965345963807, 
-0.159133236415046, -0.110251043493403, -0.137264508632884, -0.119917229531832, 
-0.120925997801717, -0.0723411357957789, -0.167196946122626, 
-0.0934435799158454, -0.100138400069294, -0.121779815791553, 
-0.109525404209932, -0.177956163844905, -0.118133486969052, -0.171118943603267, 
-0.0874288521926405, -0.156100927527836, -0.146638268494009, 
-0.106159088391984, -0.216767679809222, -0.103685415204376, -0.170821767676935, 
-0.0334711492188675, -0.118406723140307, -0.084678840268033, 
-0.169534942479255, -0.139857044363571, -0.158630691386509, -0.116526896246653, 
-0.0954918047822503, -0.109948462281268, -0.13151955181105, -0.167041883759882, 
-0.102506852969462, -0.17348328403229, -0.129499499792742, -0.150964439546209, 
-0.12720772016056, -0.133801990151519, -0.100457271656243, -0.20254092734242, 
-0.138619700425443, -0.117710304482053, -0.119276270947859, -0.109503839121322
), Neural = c(0.571875454886453, 0.476540926870016, 0.457913886706319, 
0.402887825401554, 0.403772488569446, 0.371601317669534, 0.330971736653814, 
0.503802508803768, 0.504390842275399, 0.500161410584797, 0.36562178058289, 
0.397645021734818, 0.505677795317289, 0.526775842756336, 0.443910694012104, 
0.450833735979681, 0.504077418118721, 0.523855579339897, 0.57290491826145, 
0.571942832384972, 0.433916995188222, 0.526976007859707, 0.449461717844224, 
0.279102858487839, 0.340313813788199, 0.535070958518648, 0.616775159848178, 
0.396324619168715, 0.452881675195395, 0.445872606927089, 0.52515867908853, 
0.499049325338784, 0.516818641244652, 0.52794989242449, 0.473307000475404, 
0.392534178972157, 0.458020623607579, 0.306365730695471, 0.50001747506601, 
0.422339266326863, 0.470802013875011, 0.459008909086174, 0.445287507267978, 
0.362213496998423, 0.587956657401389, 0.36453045329606, 0.469400406849545, 
0.534603565462627, 0.547964921360259, 0.390848282262092, 0.342172276601996, 
0.534075505457322, 0.596507302451988, 0.486576863846832, 0.39265342596699, 
0.372850878012655, 0.558564113723498, 0.370646915231848, 0.313016823011358, 
0.448140856164195, 0.654650160373857, 0.318760780530977, 0.377998279482448, 
0.330720117114148, 0.446165499376133, 0.448060236595004, 0.454716932824206, 
0.460682820785363, 0.677657959968748, 0.472418234862515, 0.575449202670987, 
0.670281567032294, 0.476731354451474, 0.571731174789983, 0.448009251337464, 
0.498988527080681, 0.634414878609723, 0.54365442994776, 0.594945618383765, 
0.420783478216934, 0.538426574933776, 0.539888414448404, 0.590716502015463, 
0.606477857573121, 0.654680964469455, 0.61595354564614, 0.519054093278546, 
0.566637168787357, 0.731069942985765, 0.449915856665088, 0.333065938578496, 
0.535240464546325, 0.474060300461278, 0.595419827777464, 0.60471857849148, 
0.774988399339682, 0.470945122013844, 0.481250543751994, 0.649560239031417, 
0.522625623149351, 0.597584469354824, 0.486852955623685, 0.57876475362535, 
0.56675066966845, 0.660673322885706, 0.637858906064381, 0.636779071524747, 
0.616303077933335, 0.503625458540522, 0.588019162961597, 0.462276025027043, 
0.675514107864142, 0.673292460477802, 0.480246412930949, 0.238741628428695, 
0.641378935889376, 0.568335768458287, 0.670170078030347, 0.452879402618213, 
0.391560214010779, 0.580950578852449, 0.497235220865464, 0.44397823620426, 
0.443474557383324, 0.442219533117943, 0.311462994017736, 0.516645527007544, 
0.382820198185924, 0.353830121426194, 0.295349337372493, 0.343666480724729, 
0.378549205210908, 0.35017538291971, 0.463914778310926, 0.478798789838347, 
0.50583233589548, 0.467953087418781, 0.352542352000101, 0.50138302648928, 
0.655026343536234, 0.630796070652085, 0.436876748399614, 0.70067979235527, 
0.43412381907536, 0.548603656363761, 0.542539874702239, 0.597522420803456, 
0.646794668920374, 0.635246668915334, 0.613330681261117, 0.496823808886347, 
0.639383782179777, 0.597895724158496, 0.652179501956114, 0.500842159373418, 
0.659966811096857, 0.496760148746826, 0.553013030547991, 0.595130228898715, 
0.510384926579483, 0.637780231249785, 0.476160862820955, 0.51957347896716, 
0.454615430863783, 0.625421960245594, 0.470564539324224, 0.521822474491061, 
0.721220636233938, 0.536703893376042, 0.650502823680351, 0.517105940778748, 
0.579219736441676, 0.677501645353857, 0.622115300414848, 0.612773977002543, 
0.636227610309118, 0.743360151390953, 0.539177413511793, 0.53360935796044, 
0.619686844088886, 0.453251191852333, 0.570669544174091, 0.667126015611499, 
0.546860441422312, 0.504553398535063, 0.683826053244672, 0.568555711427065, 
0.661679160307647, 0.554138317195889, 0.538693544958448, 0.531773606088959, 
0.528310080027905, 0.45806234423797, 0.444113638226186, 0.734594806854462, 
0.585842121344967, 0.339862927635701, 0.448889910461089, 0.480760676294076, 
0.68067217947293, 0.713222216803834, 0.405099529519515, 0.656989436626682, 
0.59827646086302, 0.586954967472839, 0.477628611043101, 0.509474614654852, 
0.54338220722253, 0.608434369233717, 0.580117490322031, 0.550022704791725, 
0.442782561127073, 0.662578675844797, 0.548691632983587, 0.712867942576753, 
0.684417978916292, 0.650791136227092, 0.60445597914178, 0.572434195309878, 
0.620417077880223, 0.559936923746815, 0.516533094206896, 0.591815568985902, 
0.576215087261435, 0.512684195897707, 0.621692010173804, 0.467539590741599, 
0.595179252876266, 0.798842887674763, 0.668237508753225, 0.596832466037931, 
0.60157195161978, 0.548052842587326, 0.629798202645995, 0.618368686095015, 
0.641628032671351, 0.575002127820301, 0.69283098717912, 0.487601403492033, 
0.713593285531338, 0.662721835676858, 0.670024795615379, 0.64552132513596, 
0.553935151659894, 0.57829935660479, 0.57865381888888, 0.691834569317796, 
0.545200415126486, 0.561401896908651, 0.534648555994457), Proneural = c(0.627827200883444, 
0.602485957531256, 0.616258723870889, 0.312311640090077, 0.630095252986698, 
0.513259004765009, 0.655906818100678, 0.61752110873032, 0.60171526236358, 
0.588484062579726, 0.576976207138337, 0.681894689768149, 0.688167701266183, 
0.653917264334694, 0.645525042922426, 0.652348365693826, 0.508152171336798, 
0.595748738089535, 0.61033174524352, 0.528663697795604, 0.557040487494749, 
0.82260161413069, 0.644310724743019, 0.57599255993316, 0.613925019053377, 
0.509283450754992, 0.738659012874386, 0.62461668519153, 0.62622681931945, 
0.497693662684356, 0.615341516468493, 0.590985123365195, 0.640460661834092, 
0.635378586963892, 0.506440290346917, 0.502520486378487, 0.641780534516954, 
0.631908975572173, 0.583231870531048, 0.587352937522751, 0.533670870677996, 
0.564976646145855, 0.54535494583293, 0.631989116129519, 0.617768240266936, 
0.485232049532894, 0.531486375796775, 0.629813075677756, 0.612033158094618, 
0.511063569248217, 0.450932923500561, 0.58362575312739, 0.60334609336078, 
0.730759930872036, 0.589665937172626, 0.507704525303065, 0.59587226481063, 
0.537220890453111, 0.468780362231659, 0.581211624531221, 0.72420998372324, 
0.547155882884475, 0.603844685271615, 0.435183490697765, 0.54968878068674, 
0.60289593795188, 0.68743439521069, 0.736139445184719, 0.712835110089163, 
0.762475610841122, 0.538807719640983, 0.78007450134308, 0.682032310758124, 
0.715209174221807, 0.644576974686569, 0.704908011607578, 0.899693330528579, 
0.768578878902771, 0.813953236391713, 0.833591345045347, 0.566794776795846, 
0.658792453673228, 0.649555655622499, 0.761512229050096, 0.72092678379262, 
0.847869107565332, 0.848103280595712, 0.690549567225256, 0.727893752680295, 
0.730579108858081, 0.756062436800943, 0.703690104450965, 0.498713709308927, 
0.829110784996359, 0.770189268255797, 0.829534637650272, 0.74667931225076, 
0.627142683775664, 0.722855849631926, 0.635622054175885, 0.762756407645003, 
0.827314510373705, 0.646437185456232, 0.721985955498873, 0.677842299670502, 
0.715325688765905, 0.682125111354004, 0.731959195303619, 0.714991094114147, 
0.6273077320895, 0.761953930199035, 0.741373614276704, 0.697067172377637, 
0.728691309413626, 0.518084014333083, 0.76371336619154, 0.662717726766061, 
0.770312260207455, 0.778822752201745, 0.656440615798351, 0.746899461741798, 
0.743761448801413, 0.796233405323583, 0.621373203533962, 0.394177317373252, 
0.293802423788157, 0.568685629851915, 0.372198101992932, 0.345599412506918, 
0.325559217444904, 0.428156791850057, 0.453946040097541, 0.43676454293909, 
0.496415312475059, 0.512414773890187, 0.726364625891636, 0.716475427909453, 
0.601342005021192, 0.691263599428954, 0.675222622697236, 0.646056230355803, 
0.717390505761228, 0.721413841251468, 0.777368774709093, 0.843357447445143, 
0.809146947250675, 0.820760249831131, 0.795162146151255, 0.607899254034433, 
0.673801782337846, 0.729863903789134, 0.772724603941694, 0.728526414028016, 
0.794558136194938, 0.771530821065283, 0.787322667308189, 0.683280717454631, 
0.861054819143375, 0.767348214335678, 0.666482783018952, 0.897005149948036, 
0.794570673554573, 0.76494678964672, 0.770619253637309, 0.902782015421086, 
0.729067041582264, 0.690983089242878, 0.715987297389015, 0.864821959934217, 
0.868241642642054, 0.746062421351262, 0.711987980021912, 0.80739230198093, 
0.673021087979475, 0.748150359558454, 0.845200287824992, 0.820399330148696, 
0.703734689864823, 0.603016473905953, 0.739853900958107, 0.651990709878038, 
0.683160402948682, 0.755611784708112, 0.728446803149491, 0.788487066786421, 
0.694107797623537, 0.818362453242549, 0.818775686677771, 0.602954898273716, 
0.701232894444353, 0.669322915562211, 0.857825294500283, 0.770072693757359, 
0.747438111464953, 0.74446290368622, 0.721860288904132, 0.722651236739819, 
0.715662089676559, 0.608878968089307, 0.690221287017089, 0.79985614247991, 
0.708672561303252, 0.718168636462487, 0.770382012856925, 0.791740143548023, 
0.787516730230829, 0.752895071787544, 0.786046094658062, 0.60727428673566, 
0.621445363233637, 0.778009590088717, 0.719543630280348, 0.800009064569762, 
0.774456675663112, 0.726088373887591, 0.708493202165903, 0.802663452918459, 
0.75168941466983, 0.647434081559721, 0.763908013821404, 0.72587327509707, 
0.723645247612897, 0.685324145269469, 0.735013755590755, 0.675812526606145, 
0.766421238180757, 0.761251272028805, 0.763811051310351, 0.802956206840659, 
0.706722945767517, 0.752448248683617, 0.692756548585269, 0.819293725847224, 
0.803462709632802, 0.675533108813936, 0.832894831385475, 0.773955567814242, 
0.812526126649809, 0.820829858325414, 0.817775275743069, 0.809540678204156, 
0.683159964252659, 0.827072415382377, 0.760694833027703, 0.769887584220578, 
0.820915581278878, 0.760331843262076, 0.598855608013507, 0.81470601135973, 
0.611765528293833)), row.names = c("BT1160.P1.A02", "BT1160.P1.A06", 
"BT1160.P1.A08", "BT1160.P1.B10", "BT1160.P1.B11", "BT1160.P1.B12", 
"BT1160.P1.C04", "BT1160.P1.C07", "BT1160.P1.C09", "BT1160.P1.D01", 
"BT1160.P1.D08", "BT1160.P1.D09", "BT1160.P1.E11", "BT1160.P1.E12", 
"BT1160.P1.F04", "BT1160.P1.G02", "BT1160.P1.H06", "BT1160.P2.A03", 
"BT1160.P2.A12", "BT1160.P2.B01", "BT1160.P2.B04", "BT1160.P2.B05", 
"BT1160.P2.B09", "BT1160.P2.D07", "BT1160.P2.D11", "BT1160.P2.E01", 
"BT1160.P2.E03", "BT1160.P2.E07", "BT1160.P2.E09", "BT1160.P2.F01", 
"BT1160.P2.F03", "BT1160.P2.F05", "BT1160.P2.G02", "BT1160.P2.G09", 
"BT1160.P2.H04", "BT1160.P3.A10", "BT1160.P3.A11", "BT1160.P3.B01", 
"BT1160.P3.B06", "BT1160.P3.B12", "BT1160.P3.C06", "BT1160.P3.C07", 
"BT1160.P3.D06", "BT1160.P3.E04", "BT1160.P3.F06", "BT1160.P3.G05", 
"BT1160.P3.H05", "BT1160.P3.H06", "BT1160.P3.H07", "BT1160.P3.H10", 
"BT1160.P4.A07", "BT1160.P4.A09", "BT1160.P4.B01", "BT1160.P4.C05", 
"BT1160.P4.D04", "BT1160.P4.D08", "BT1160.P4.E01", "BT1160.P4.E02", 
"BT1160.P4.E08", "BT1160.P4.E10", "BT1160.P4.F04", "BT1160.P4.F06", 
"BT1160.P4.F09", "BT1160.P4.H03", "BT1160.P4.H08", "BT1160.P4.H09", 
"BT1160.P4.H10", "BT749.P10.A04", "BT749.P10.A05", "BT749.P10.A06", 
"BT749.P10.A07", "BT749.P10.A08", "BT749.P10.A09", "BT749.P10.A11", 
"BT749.P10.A12", "BT749.P10.B01", "BT749.P10.B02", "BT749.P10.B05", 
"BT749.P10.B06", "BT749.P10.B07", "BT749.P10.B09", "BT749.P10.B11", 
"BT749.P10.B12", "BT749.P10.C02", "BT749.P10.C03", "BT749.P10.C04", 
"BT749.P10.C05", "BT749.P10.C06", "BT749.P10.C07", "BT749.P10.C08", 
"BT749.P10.C10", "BT749.P10.C12", "BT749.P10.D01", "BT749.P10.D06", 
"BT749.P10.D07", "BT749.P10.D08", "BT749.P10.D09", "BT749.P10.D11", 
"BT749.P10.E01", "BT749.P10.E02", "BT749.P10.E03", "BT749.P10.E08", 
"BT749.P10.E10", "BT749.P10.E11", "BT749.P10.E12", "BT749.P10.F02", 
"BT749.P10.F04", "BT749.P10.F06", "BT749.P10.F08", "BT749.P10.F11", 
"BT749.P10.G02", "BT749.P10.G03", "BT749.P10.G07", "BT749.P10.G09", 
"BT749.P10.G11", "BT749.P10.H01", "BT749.P10.H02", "BT749.P10.H03", 
"BT749.P10.H04", "BT749.P10.H07", "BT749.P10.H09", "BT749.P10.H10", 
"BT749.P10.H11", "BT749.P10.H12", "BT749.P11.A03", "BT749.P11.A04", 
"BT749.P11.A07", "BT749.P11.A09", "BT749.P11.B11", "BT749.P11.C07", 
"BT749.P11.E04", "BT749.P11.E06", "BT749.P11.F05", "BT749.P11.F08", 
"BT749.P11.H06", "BT749.P7.A01", "BT749.P7.A05", "BT749.P7.A07", 
"BT749.P7.A08", "BT749.P7.A11", "BT749.P7.A12", "BT749.P7.C01", 
"BT749.P7.C03", "BT749.P7.C08", "BT749.P7.C11", "BT749.P7.D01", 
"BT749.P7.D04", "BT749.P7.D05", "BT749.P7.D06", "BT749.P7.D07", 
"BT749.P7.D08", "BT749.P7.D11", "BT749.P7.E03", "BT749.P7.E04", 
"BT749.P7.E06", "BT749.P7.E09", "BT749.P7.E10", "BT749.P7.E12", 
"BT749.P7.F02", "BT749.P7.F03", "BT749.P7.F04", "BT749.P7.F07", 
"BT749.P7.F08", "BT749.P7.F11", "BT749.P7.G02", "BT749.P7.G04", 
"BT749.P7.G05", "BT749.P7.G08", "BT749.P7.G11", "BT749.P7.G12", 
"BT749.P7.H02", "BT749.P7.H03", "BT749.P7.H06", "BT749.P7.H07", 
"BT749.P7.H08", "BT749.P7.H09", "BT749.P7.H11", "BT749.P7.H12", 
"BT749.P8.A01", "BT749.P8.A02", "BT749.P8.A03", "BT749.P8.A04", 
"BT749.P8.A06", "BT749.P8.A08", "BT749.P8.A10", "BT749.P8.A12", 
"BT749.P8.B04", "BT749.P8.B05", "BT749.P8.B06", "BT749.P8.B07", 
"BT749.P8.B08", "BT749.P8.B11", "BT749.P8.C04", "BT749.P8.C05", 
"BT749.P8.C06", "BT749.P8.C10", "BT749.P8.C12", "BT749.P8.D01", 
"BT749.P8.D03", "BT749.P8.D07", "BT749.P8.E02", "BT749.P8.E03", 
"BT749.P8.E05", "BT749.P8.E07", "BT749.P8.E08", "BT749.P8.E09", 
"BT749.P8.E10", "BT749.P8.E11", "BT749.P8.E12", "BT749.P8.F02", 
"BT749.P8.F05", "BT749.P8.F08", "BT749.P8.F09", "BT749.P8.F10", 
"BT749.P8.F11", "BT749.P8.G04", "BT749.P8.G05", "BT749.P8.G07", 
"BT749.P8.G08", "BT749.P8.G09", "BT749.P8.G10", "BT749.P8.G11", 
"BT749.P8.H01", "BT749.P8.H02", "BT749.P8.H04", "BT749.P8.H05", 
"BT749.P8.H07", "BT749.P8.H11", "BT749.P9.A01", "BT749.P9.A03", 
"BT749.P9.A08", "BT749.P9.A10", "BT749.P9.B02", "BT749.P9.B03", 
"BT749.P9.B04", "BT749.P9.B05", "BT749.P9.B07", "BT749.P9.B11", 
"BT749.P9.B12", "BT749.P9.C02", "BT749.P9.C03", "BT749.P9.C04", 
"BT749.P9.C05", "BT749.P9.C06", "BT749.P9.C09", "BT749.P9.D01", 
"BT749.P9.D05", "BT749.P9.D07", "BT749.P9.D08", "BT749.P9.D09"
), class = "data.frame")

I wish to visualize the data, but there are four such data frames and I wish to visualize them together, for that reason I thought four correlation plots will look good along with column plots, one for each of the four columns in four data frames resulting in sixteen columns.

I'm unable to come up with a good technique to visualize the data, any help will be helpful.

Also while trying the correlation plot:

ssgsea_cormat <- melt(t_ssgsea_OPC)
No id variables; using all as measure variables
Warning message:
In melt(t_ssgsea_OPC) :
  The melt generic in data.table has been passed a data.frame and will attempt to redirect to the relevant reshape2 method; please note that reshape2 is deprecated, and this redirection is now deprecated as well. To continue using melt methods from reshape2 while both libraries are attached, e.g. melt.list, you can prepend the namespace like reshape2::melt(t_ssgsea_OPC). In the next version, this warning will become an error.

I have no idea why this warning message is coming up, and the melted dataset doesn't have the row names and has just two columns. Any suggestions to help here will be welcomed too.

CodePudding user response:

An option to visualize your data would be a heatmap. A lot of options are given in the heatmap.2 function, you can find out more enter image description here

And admitting you have 16 columns (here just the same dataframe repeated 4 times):

t_ssgsea_OPC_16cols = cbind(t_ssgsea_OPC, rep(t_ssgsea_OPC[,1:4],3))

heatmap.2(as.matrix(t_ssgsea_OPC_16cols),
          scale="column",
          Rowv=F, Colv=F, dendrogram="none", 
          breaks=seq(-1,1,0.01), col=redblue(200), trace="none",
          margins=c(9,8), srtCol = 30)

enter image description here

  • Related