<p>Your problem is caused by using the transcriptome fasta file rather than the genome fasta file. You've already given it transcriptome information with <code>genome_genes.filtered.gtf</code>, it needs the genomic sequence to go along with that.</p>

<p>As an aside, your GTF filtering command is unlikely to be useful unless you have a Gencode or Ensembl GTF for human. Have a look at the <code>gene_biotype</code>s in your file and decide for yourself what (if anything) needs to be filtered. For example, I made a cellranger reference last night for dm3 (the old fruit fly genome) with:</p>

<pre><code>cellranger mkgtf annotation.gtf genes.gtf \
    --attribute=gene_biotype:protein_coding \
    --attribute=gene_biotype:ncRNA \
    --attribute=gene_biotype:snRNA \
    --attribute=gene_biotype:snoRNA \
    --attribute=gene_biotype:pre_miRNA
</code></pre>

<p>That should be customized for relevance. It's quite possible that your GTF doesn't even have <code>gene_biotype</code> attributes, that's specific to Ensembl I think.</p>

CC BY-SA 4.0
2018-05-17T08:36:24.113Z
Indeed, I am not working with Humans on this project (I tried to include a "model-organisms" tag to emphasise this). I included this from the `cellranger` documentation while troubleshooting the issue. To clarify, the reference "genome" is a FASTA with chromosomes named? I have a recent annotation (GTF) for _A. thaliana_ but the reference (FASTA) is by transcripts in this database. An older full-genome reference is available but I'd rather use a recently updated on is possible.
Tom Kelly ケリー・トム
CC BY-SA 4.0
2018-05-17T09:08:49.223Z
Yes, the reference genome is the fasta file containing chromosomal entries. You can get appropriate GTF files from [Ensembl](http://plants.ensembl.org/Arabidopsis_thaliana/Info/Index), a transcriptome fasta file is of no use to you.
Devon Ryan
CC BY-SA 4.0
2018-05-17T06:52:57.880Z
2018-05-17T06:52:57.880Z
Devon Ryan
<p>I'm analysing single-cell RNA-Seq data using the 10X Genomics <a href="https://support.10xgenomics.com/single-cell-gene-expression/software/pipelines/latest/what-is-cell-ranger" rel="nofollow noreferrer"><code>cellranger</code></a> platform. While they provide reference data for Mouse and Humans, other species require a reference "transcriptome" to be generated with the cellranger <a href="https://support.10xgenomics.com/single-cell-gene-expression/software/pipelines/latest/advanced/references" rel="nofollow noreferrer"><code>mkref</code></a> tool. However, I've found it to be very temperamental giving errors such as:</p>

<pre><code>gffread genome_GFF3_genes.gff -T -o genome_genes.gtf

cellranger mkgtf genome_genes.gtf genome_genes.filtered.gtf \
                   --attribute=gene_biotype:protein_coding \
                   --attribute=gene_biotype:lincRNA \
                   --attribute=gene_biotype:antisense \
                   --attribute=gene_biotype:IG_LV_gene \
                   --attribute=gene_biotype:IG_V_gene \
                   --attribute=gene_biotype:IG_V_pseudogene \
                   --attribute=gene_biotype:IG_D_gene \
                   --attribute=gene_biotype:IG_J_gene \
                   --attribute=gene_biotype:IG_J_pseudogene \
                   --attribute=gene_biotype:IG_C_gene \
                   --attribute=gene_biotype:IG_C_pseudogene \
                   --attribute=gene_biotype:TR_V_gene \
                   --attribute=gene_biotype:TR_V_pseudogene \
                   --attribute=gene_biotype:TR_D_gene \
                   --attribute=gene_biotype:TR_J_gene \
                   --attribute=gene_biotype:TR_J_pseudogene \
                   --attribute=gene_biotype:TR_C_gene

cellranger mkref --genome="reference-name" \
                 --fasta="transcriptome.fasta" \
                 --genes="genome_genes.filtered.gtf"
</code></pre>

<blockquote>
  <p>Fatal INPUT FILE error, no valid exon lines in the GTF file: reference_name/genes/genes.gtf
  Solution: check the formatting of the GTF file. Most likely cause is the difference in chromosome naming between GTF and FASTA file.</p>
  
  <p>subprocess.CalledProcessError: Command '['STAR', '--runMode', 'genomeGenerate', '--genomeDir', 'reference_name/star', '--runThreadN', '1', '--genomeFastaFiles', 'reference_name/fasta/genome.fa', '--sjdbGTFfile', 'reference_name/genes/genes.gtf', '--limitGenomeGenerateRAM', '17179869184', '--genomeSAsparseD', '1', '--genomeSAindexNbases', '12', '--genomeChrBinNbits', '10']' returned non-zero exit status 104</p>
  
  <p>subprocess.CalledProcessError: Command '['STAR', '--runMode', 'genomeGenerate', '--genomeDir', 'reference_name/star', '--runThreadN', '1', '--genomeFastaFiles', 'reference_name/fasta/genome.fa', '--sjdbGTFfile', 'reference_name/genes/genes.gtf', '--limitGenomeGenerateRAM', '17179869184', '--genomeSAsparseD', '1', '--genomeSAindexNbases', '12', '--genomeChrBinNbits', '10']' returned non-zero exit status -11</p>
</blockquote>

<p>What input data is required for the <code>cellranger</code> to construct a reference? What format do the fasta and gtf files need be in? Is it possible to use a "transcriptome" rather than a "genome" as a reference here? For example, I have a transcriptome reference with fasta names <code>&gt;name</code> for each transcript rather than each chromosome.</p>

<scrnaseq><reference-genome><transcriptome><star><cellranger>
What process and input data is required for a cellranger reference transcriptome?
# What process and input data is required for a cellranger reference transcriptome?

(Asked by: username_0 on 2018-05-17)

I'm analysing single-cell RNA-Seq data using the 10X Genomics cellranger platform. While they provide reference data for Mouse and Humans, other species require a reference "transcriptome" to be generated with the cellranger mkref tool. However, I've found it to be very temperamental giving errors such as:
gffread genome_GFF3_genes.gff -T -o genome_genes.gtf

cellranger mkgtf genome_genes.gtf genome_genes.filtered.gtf \
                   --attribute=gene_biotype:protein_coding \
                   --attribute=gene_biotype:lincRNA \
                   --attribute=gene_biotype:antisense \
                   --attribute=gene_biotype:IG_LV_gene \
                   --attribute=gene_biotype:IG_V_gene \
                   --attribute=gene_biotype:IG_V_pseudogene \
                   --attribute=gene_biotype:IG_D_gene \
                   --attribute=gene_biotype:IG_J_gene \
                   --attribute=gene_biotype:IG_J_pseudogene \
                   --attribute=gene_biotype:IG_C_gene \
                   --attribute=gene_biotype:IG_C_pseudogene \
                   --attribute=gene_biotype:TR_V_gene \
                   --attribute=gene_biotype:TR_V_pseudogene \
                   --attribute=gene_biotype:TR_D_gene \
                   --attribute=gene_biotype:TR_J_gene \
                   --attribute=gene_biotype:TR_J_pseudogene \
                   --attribute=gene_biotype:TR_C_gene

cellranger mkref --genome="reference-name" \
                 --fasta="transcriptome.fasta" \
                 --genes="genome_genes.filtered.gtf"


Fatal INPUT FILE error, no valid exon lines in the GTF file: reference_name/genes/genes.gtf
  Solution: check the formatting of the GTF file. Most likely cause is the difference in chromosome naming between GTF and FASTA file.
subprocess.CalledProcessError: Command '['STAR', '--runMode', 'genomeGenerate', '--genomeDir', 'reference_name/star', '--runThreadN', '1', '--genomeFastaFiles', 'reference_name/fasta/genome.fa', '--sjdbGTFfile', 'reference_name/genes/genes.gtf', '--limitGenomeGenerateRAM', '17179869184', '--genomeSAsparseD', '1', '--genomeSAindexNbases', '12', '--genomeChrBinNbits', '10']' returned non-zero exit status 104
subprocess.CalledProcessError: Command '['STAR', '--runMode', 'genomeGenerate', '--genomeDir', 'reference_name/star', '--runThreadN', '1', '--genomeFastaFiles', 'reference_name/fasta/genome.fa', '--sjdbGTFfile', 'reference_name/genes/genes.gtf', '--limitGenomeGenerateRAM', '17179869184', '--genomeSAsparseD', '1', '--genomeSAindexNbases', '12', '--genomeChrBinNbits', '10']' returned non-zero exit status -11

What input data is required for the cellranger to construct a reference? What format do the fasta and gtf files need be in? Is it possible to use a "transcriptome" rather than a "genome" as a reference here? For example, I have a transcriptome reference with fasta names >name for each transcript rather than each chromosome.

**Tags:** scrnaseq, reference-genome, transcriptome, star, cellranger

---

## 1 answers

### Answer by username_1 on 2018-05-17. Score: 4

Your problem is caused by using the transcriptome fasta file rather than the genome fasta file. You've already given it transcriptome information with genome_genes.filtered.gtf, it needs the genomic sequence to go along with that.
As an aside, your GTF filtering command is unlikely to be useful unless you have a Gencode or Ensembl GTF for human. Have a look at the gene_biotypes in your file and decide for yourself what (if anything) needs to be filtered. For example, I made a cellranger reference last night for dm3 (the old fruit fly genome) with:
cellranger mkgtf annotation.gtf genes.gtf \
    --attribute=gene_biotype:protein_coding \
    --attribute=gene_biotype:ncRNA \
    --attribute=gene_biotype:snRNA \
    --attribute=gene_biotype:snoRNA \
    --attribute=gene_biotype:pre_miRNA

That should be customized for relevance. It's quite possible that your GTF doesn't even have gene_biotype attributes, that's specific to Ensembl I think.

> **Comments:**
> **username_0**: Indeed, I am not working with Humans on this project (I tried to include a "model-organisms" tag to emphasise this). I included this from the `cellranger` documentation while troubleshooting the issue. To clarify, the reference "genome" is a FASTA with chromosomes named? I have a recent annotation (GTF) for _A. thaliana_ but the reference (FASTA) is by transcripts in this database. An older full-genome reference is available but I'd rather use a recently updated on is possible.  
> **username_1**: Yes, the reference genome is the fasta file containing chromosomal entries. You can get appropriate GTF files from [Ensembl](http://plants.ensembl.org/Arabidopsis_thaliana/Info/Index), a transcriptome fasta file is of no use to you.  

---

