<p>As was suggested by @benn, you will need to add the TdTomato sequence to the end of your fasta formatted genome file. If your TdTomato sequence is in fasta format already, <code>cat</code> will do the trick. If not, just go the end of the file, start a new line and add a header line starting with ">" then immediately the name of your gene, no whitespcaes in between, something like ">TdTomato". Then add your sequence in a new line.</p>

<p>The format of the GTF file is explained in the image you posted, the trick is to use the exact same name (in column 1) that is used in the genome file you will create at the previous step (no ">" though). Again, this line, in which the different fields (columns) will be separated by tabs, will be added to the end of your GTF file.</p>

CC BY-SA 4.0
2018-12-16T03:08:00.717Z
Thank you for your detailed answer,  and I have add  fasta and gtf file to  genome.fa and genes.gtf files, but cellranger did't work ,and I update my problem and related pictures,can you heip me find the reason?
sophia
CC BY-SA 4.0
2018-12-18T04:33:18.547Z
thank you all for your reply and help, the reason for the bug is when I copy gtf code from windows to linux, the tab changes,and gtf was not tab-separeted.Thank you again!
sophia
CC BY-SA 4.0
2018-12-15T13:05:29.603Z
2018-12-15T15:09:52.840Z
2018-12-15T15:09:52.840Z
haci
<p>I'm starting to do sc-rnaseq using 10x cellranger pipelines, and i add TdTomato sequence to mouse reference genome and add an entry in the gtf. My code is But when I makref, it remindered that: 
Writing genes GTF file into reference folder...
Invalid number of columns in GTF line 
Can anyone tell me the reason?</p>

CC BY-SA 4.0
2018-12-15T09:36:43.213Z
Do you have a `fasta` and `gtf` file for your custom gene? It sounds like you can just add them below your `genome.fa` and `genes.gtf` files respectively with `cat` command.
benn
CC BY-SA 4.0
2018-12-16T03:06:39.687Z
I have add  fasta and gtf file to  genome.fa and genes.gtf files, but cellranger did"t work ,and I update my problem and related pictures,can you heip me find the reason?
sophia
CC BY-SA 4.0
2018-12-16T11:29:50.087Z
The error messages you shared within your question and within what you have pasted is different. The first error is about **line 1794438**, which is `20 . exon 1 1431 . - . gene_id "TdTomato"; transcript_id "TdTomato"; gene_name "TdTomato"`. As you can see, the first field of that line is not the same as your gene name that was used in the fasta file, but is "20". I guess it is also a good idea two double check the spacing between different fields in your GTF, which is causing the problem and should be tab-separeted.
haci
CC BY-SA 4.0
2018-12-16T11:44:09.303Z
yes,thank you.  I should check the spacing between different fields in  GTF.but the first field of 1794438 line is 20,( 20 . exon 1 1431 . - . gene_id "TdTomato"; transcript_id "TdTomato"; )why you say is "20", I did't find.
sophia
CC BY-SA 4.0
2018-12-18T04:32:31.433Z
thank you all for your reply and help, the reason for the bug is when I copy gtf code from windows to linux, the tab changes,and gtf was not tab-separeted.Thank you again!
sophia
CC BY-SA 4.0
2018-12-20T08:46:37.587Z
@sophia,I see you replaced your initial question and made it into a new one, Please leave the original question intact, and start a new question for your other problem.
benn
CC BY-SA 4.0
2018-12-20T12:01:13.923Z
Please don't edit the question so that it asks something different! That invalidates the existing answers. If you need help with the step, post a new question. And please _never_ post screenshots of text like that! We need to be able to copy your data and code so showing us an image is essentially useless.
terdon
<scrnaseq><fasta><gtf>
scRNA-seq, 10x cellranger pipelines
# scRNA-seq, 10x cellranger pipelines

(Asked by: username_0 on 2018-12-15)

I'm starting to do sc-rnaseq using 10x cellranger pipelines, and i add TdTomato sequence to mouse reference genome and add an entry in the gtf. My code is But when I makref, it remindered that:
Writing genes GTF file into reference folder...
Invalid number of columns in GTF line
Can anyone tell me the reason?

**Tags:** scrnaseq, fasta, gtf
> **Comments:**
> **username_1**: Do you have a `fasta` and `gtf` file for your custom gene? It sounds like you can just add them below your `genome.fa` and `genes.gtf` files respectively with `cat` command.  
> **username_0**: I have add  fasta and gtf file to  genome.fa and genes.gtf files, but cellranger did"t work ,and I update my problem and related pictures,can you heip me find the reason?  
> **username_2**: The error messages you shared within your question and within what you have pasted is different. The first error is about **line 1794438**, which is `20 . exon 1 1431 . - . gene_id "TdTomato"; transcript_id "TdTomato"; gene_name "TdTomato"`. As you can see, the first field of that line is not the same as your gene name that was used in the fasta file, but is "20". I guess it is also a good idea two double check the spacing between different fields in your GTF, which is causing the problem and should be tab-separeted.  
> **username_0**: yes,thank you.  I should check the spacing between different fields in  GTF.but the first field of 1794438 line is 20,( 20 . exon 1 1431 . - . gene_id "TdTomato"; transcript_id "TdTomato"; )why you say is "20", I did't find.  
> **username_0**: thank you all for your reply and help, the reason for the bug is when I copy gtf code from windows to linux, the tab changes,and gtf was not tab-separeted.Thank you again!  
> **username_1**: @sophia,I see you replaced your initial question and made it into a new one, Please leave the original question intact, and start a new question for your other problem.  
> **username_3**: Please don't edit the question so that it asks something different! That invalidates the existing answers. If you need help with the step, post a new question. And please _never_ post screenshots of text like that! We need to be able to copy your data and code so showing us an image is essentially useless.  

---

## 1 answers

### Answer by username_2 on 2018-12-15. Score: 2

As was suggested by @benn, you will need to add the TdTomato sequence to the end of your fasta formatted genome file. If your TdTomato sequence is in fasta format already, `cat` will do the trick. If not, just go the end of the file, start a new line and add a header line starting with ">" then immediately the name of your gene, no whitespcaes in between, something like ">TdTomato". Then add your sequence in a new line.

The format of the GTF file is explained in the image you posted, the trick is to use the exact same name (in column 1) that is used in the genome file you will create at the previous step (no ">" though). Again, this line, in which the different fields (columns) will be separated by tabs, will be added to the end of your GTF file.

> **Comments:**
> **username_0**: Thank you for your detailed answer,  and I have add  fasta and gtf file to  genome.fa and genes.gtf files, but cellranger did't work ,and I update my problem and related pictures,can you heip me find the reason?  
> **username_0**: thank you all for your reply and help, the reason for the bug is when I copy gtf code from windows to linux, the tab changes,and gtf was not tab-separeted.Thank you again!  

---

