Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Macro tool and transforming large data sets

creily
8 - Asteroid

Hello,

I have a large matrix (as depicted below), and I would like to search each Cell-ID column for a specific gene value. If that value is met, I accept the whole column data and then move on to the next one. I.e. if [gene1732]  > 0.5 then return [Cell-ID1] else null endif.

Is there a way to return the whole columns data based on a single gene value? I am attempting to use a Dynamic Select tool that has been modified to accept 2 inputs. My workflow first identifies the [Cell-ID]s that meet the criteria, but I am stuck as to why I am getting an error for the modified Dynamic Select macro... Here are the two errors I am getting:

 

Error: 20181205-DynamicSelectName (23): Record #1: Tool #1: Parse Error at char(18): Unknown variable "TAAACCGAGAAGGACA"

 

Error: 20181205-DynamicSelectName (23): The output connection "Output4" was not valid

 

Gene    Cell-ID1   Cell-ID2   Cell-ID3 ....Cell-ID34,766

1            -.00045   0.1702.    -.005

2

3

...

21,668

 

After sorting

Gene    Cell-ID751   Cell-ID1422   Cell-I1912 ....Cell-ID12,242

1

2

3

...

21,668

 

Attached is the workflow, and a modified one that is smaller so I can upload

5 REPLIES 5
CharlieS
17 - Castor
17 - Castor

Sorry I took so long to to reply to the original thread. There are a couple of changes that need to be made to the workflow:

1. The Filter logic needs to be updated. 

2. The Summarize tool needs some quotes added to the concatenation process.

3. The data input to the batch macro should occur before the Transpose tool.

4. The batch macro input group by settings should be set to "None".

 

I've attached an example that make these changes and functions properly on a sample input. 

 

20190114-SelectbyValue.png

 

 

 

 

 

 

 

 

 

 

 

creily
8 - Asteroid

Thanks Charlie, let me implement these and see how it goes. BRB

creily
8 - Asteroid

I am still getting a couple of errors when I run this on my dataset. I have Alteryx version .3 if that makes a difference? The one difference between my workflow and the sample you gave (which runs with no errors) is that the main database (not the concat string) that is input into the Dynamic Select is Data Type "V_WString", and yours is just "String".

 

Error: 20181205-DynamicSelectName (23): Record #1: Tool #1: Parse Error at char(18): Unmatched Quote

 

Error: 20181205-DynamicSelectName (23): The output connection "Output4" was not valid

creily
8 - Asteroid

Follow up to the metadata for the value matrix. 

 

Metadata from my matrix of cells and genes:

Record       Name        Type

1                 Gene         V_WString

2                 Gene[ID]    Double

5000           Gene[ID]    Double

 

Metadata from your matrix sample of cells and genes. Seems to be a mix of string and double for different cell-IDs in your matrix:

Record       Name        Type

1                 Gene         String

2                 Gene[ID]    String

3                 Gene[ID]    Double

4                 Gene[ID]    String

creily
8 - Asteroid

Update, there was a ID10T error. I thought I had the right " in the summarize tool, there was a ' instead. Ran fine. Thanks!!!

Labels