I'm trying to do STAR alignment on 10x data (I tried cellranger but I need a more customizable tool), but I'm a bit confused about the different fastq files and which ones to merge together. 
All my samples consists of .gz folders which have multiple files, but they come in triplets such as  *_S1_L001_I1_001.fastq, *_S1_L001_R1_001.fastq and *_S1_L001_R2_001.fastq. Now I understand that R1 and R2 probably refer to the Illumina pair-end reads, but what is I1?

More concretely, which files should be given as arguments to `--readFilesIn` and in which order? In the manual and some examples I found that R1 and R2 both have to be supplied together, e.g. `--readFilesIn *_R1.fastq *_R2.fastq`. If I want to align all the reads, do I loop over this command, taking all R1 and R2 files, but ignore the I1 files?
Yes, just ignore the I1 file. I1 is the sample index. (read this [10x single cell BAM files - Dave Tang's blog](https://davetang.org/muse/2018/06/06/10x-single-cell-bam-files/))

And the order should be like:

> Importantly, in the --readFilesIn option, the 1st file has to be cDNA read, and the 2nd file has to be the barcode (cell+UMI) read. 
>
> [STAR/STARsolo.md at master · alexdobin/STAR](https://github.com/alexdobin/STAR/blob/master/docs/STARsolo.md) 