I am trying to make a reference using cellranger but I want to change the gtf file. I want to remove the entries for a specific gene and add another entry for it. The entry that I want to add is in chromosome 4. Will it be a problem if I add the new entry at the end of the gtf file and not near the other chromosome 4 entries? Is there a way to add it close to the other chromosome 4 entries?
Thank you for the reply. I have used sed to remove most of the entries that I do not want. I used the code from cellranger to create the new entry that I want to add: To do this I used the part that is shown on cellranger mkref and just changed the GFP to my gene name and the position to the one for my gene.
Then I wanted to add it to my gtf file like shown below which adds it to the end of the gtf file:
I guess I will try to see what is the line number of the last entry I remove and then i will add the new gtf entry there.
This is the page (https://support.10xgenomics.com/single-cell-gene-expression/software/pipelines/latest/using/tutorial_mr#marker) where I got the code from. I am following the instructions to add a marker gene but I don't want to add an extra gene like GFP. I just want to change one of the entries in the human genome.
Looks like I commented before you had a chance to finish your comment - I've cleaned up our conversation.
I've often seen tools error out when they find GTF entries out of order (or I'm misremembering, but erring on the side of caution is always better than the alternative). You can either add the line in the middle or even better, sort the file once you have the final GTF.
Thank you. I ended up using the method you said above with sed.