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?
1 Answer
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.
-
$\begingroup$ 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? $\endgroup$– sophiaCommented Dec 16, 2018 at 3:08
-
$\begingroup$ 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! $\endgroup$– sophiaCommented Dec 18, 2018 at 4:33
fasta
andgtf
file for your custom gene? It sounds like you can just add them below yourgenome.fa
andgenes.gtf
files respectively withcat
command. $\endgroup$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. $\endgroup$