Reordering of barcodes?

My first post on this forum : )

I have a pipeline running well, but the final qzv has the barcodes on the x-axis ordered alphabetically, but I have tried to order them differently using the manifest.csv file, but it is not working.

Here is my import step:

qiime tools import
–type ‘SampleData[SequencesWithQuality]’
–input-path $manifestsDir/3.valles.ITS.pandaseq.order1.manifest.csv
–output-path $artifactsDir/valles.ITS.pandaseq.order1.qza
–source-format SingleEndFastqManifestPhred33

However, I have noticed that the created .qza created has inserted my indexing after the barcode, as in the following:


… so it seems to continue sorting on the barcode, and not my indexing.

Thanks for your help, m a r t i n

Hi @MartinLubell! Welcome to the forum!

Can you please provide a little more information for us to help you:

  • What version of QIIME 2 are you running?
  • What is the exact command you are running? Please copy-and-paste the command here. You mentioned “the final qzv has the barcodes on the x-axis ordered alphabetically”, but we don’t know which one of the many visualizations in QIIME 2 you are referring to here.
  • What is the expected outcome? It sounds like you are trying to control chart sort order via importing, but please let us know if that isn’t correct. It is worth noting, sorting is generally controlled either within the output viz itself, or, possibly as a parameter when running the visualizer command, too.

Thanks! :t_rex:

VThanks Matthew!

I am running version 12.
I must be missing something simple, or doing something wrong.
The code I am running is:

qiime taxa barplot
–i-table $artifactsDir/valles.ITS.featureTableFreq.pandaseq.order1.dada2.qza
–i-taxonomy $artifactsDir/valles.ITS.featureDataTaxo.pandaseq.order1.dada2.unite.qza
–m-metadata-file $metadata
–o-visualization $artifactsDir/valles.ITS.taxonomy.visual.order1.unite.qzv

As you last paragraph suggests, I am trying to “control chart order via importing”, so now, I have to learn what parameter to use when running the visualizer. Note that when I am using q2studio or the, changing the sorting doesn’t change the order to what I expect.

Thanks for your help, m a r t i n

Perfect, thanks for the info @MartinLubell!

The easiest way to manually order the taxa bar plots is to add an new Metadata Column to your metadata file, and specify your sort order there. For example, say I have samples s1, s2, s3, and s4, but wanted to view them in the following order: s3, s1, s4, s2, I could make a sample metadata file that looks like this:

#SampleID    CustomSort ... other metadata columns ...
s1           2
s2           4
s3           1
s4           3

Then, use this metadata file when running taxa barplot. In the viz, add a sort rule based on that metadata column. This approach has the advantage of being reusable across visualizations and methods.

A real-world example using the Moving Pictures Tutorial.

Original Barplots

Reordering the first few samples. Original sort: L1S8, L1S57, L1S76, L1S105. New sort: L1S57, L1S8, L1S105, L1S76.

I didn't put in CustomSort values for any of the other samples, so I did a secondary order by the original sample id.

Hope that helps, and keep us posted with any questions! :t_rex:


This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.