Answers.Body: <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>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-12-16T03:08:00.717Z
Answers.Text: 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?
Answers.UserDisplayName: sophia
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-12-18T04:33:18.547Z
Answers.Text: 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!
Answers.UserDisplayName: sophia
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-12-15T13:05:29.603Z
Answers.LastActivityDate: 2018-12-15T15:09:52.840Z
Answers.LastEditDate: 2018-12-15T15:09:52.840Z
Answers.UserDisplayName: haci
Body: <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>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-12-15T09:36:43.213Z
Comments.Text: 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.
Comments.UserDisplayName: benn
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-12-16T03:06:39.687Z
Comments.Text: 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?
Comments.UserDisplayName: sophia
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-12-16T11:29:50.087Z
Comments.Text: 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.
Comments.UserDisplayName: haci
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-12-16T11:44:09.303Z
Comments.Text: 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.
Comments.UserDisplayName: sophia
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-12-18T04:32:31.433Z
Comments.Text: 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!
Comments.UserDisplayName: sophia
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-12-20T08:46:37.587Z
Comments.Text: @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.
Comments.UserDisplayName: benn
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-12-20T12:01:13.923Z
Comments.Text: 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.
Comments.UserDisplayName: terdon
Tags: <scrnaseq><fasta><gtf>
Title: scRNA-seq, 10x cellranger pipelines
ThreadText: # 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**: @username_0,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 @username_1, 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!  
  
  ---
  
  