jtamames / SqueezeMeta

A complete pipeline for metagenomic analysis
GNU General Public License v3.0
357 stars 78 forks source link

Remove outliers when plotting nMDS #655

Closed pstrud closed 1 year ago

pstrud commented 1 year ago

Hi there,

I am trying to plot my metagenomic data in an nMDS based upon function/KEGGS as per 2.5.2. in the pipeline. My data appears to have two outliers at 2000,3000 and -2000, 3000 on the plot. These are making it impossible to see patterns for the majority of the points which are centered around 0,0. I have saved my plot as a pdf and I can see 13 of the 15 samples are centered around 0,0 (by removing points one by one in illustrator).

I have identified the samples responsible and can filter these from my metadata but cannot seem to filter them from the squeezemeta object. function_nMDS.pdf

Can you please advise if there is a way to subset based on 'samples'?

Thanks,

Paige

fpusan commented 1 year ago

Somehow I missed this. Yes, there is a subsetSamples function in SQMtools, assuming you are using v1.6.0 or newer. Otherwise you can just subset the KEGG table using basic R.