Trying to prepare a Rod file for use with GATK depth of coverage. I downloaded a standard hg1g refseq file and I need to remove non-standars contigs other then chr1-22 chrx and y and chrM and sort in karotypic order. Is the below the best way to do so? Thank you :).
cat getRefGene.txt | grep -v chrUn* | grep -v *random | grep -v chrM | grep -v *hap* | sort -k1,1 -V -s > output.txt