Entering edit mode
5.3 years ago
bioguy24
▴
230
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
grep
can accept multiple search patterns in the regex:I would not use
-V
as most tools expect standard rather than natural sort order. Ca you show the content of thisgetRefGene.txt
and expected output?input file (getRefegene.txt)
The expected output I believe would be a column 3 with only chr1-22 x y and m. Thank you :).