Skip to content

Commit

Permalink
Separate RS from multiple lines
Browse files Browse the repository at this point in the history
  • Loading branch information
tcezard committed Apr 15, 2024
1 parent 10ed173 commit ea48d6f
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ do
OUTPUT=tmp_${SC_NAME}_${ASSEMBLY}_${TYPE}.txt
if [[ ${INPUT} == *.vcf.gz ]]
then
zcat "${INPUT}" | grep -v '^#' | awk -v annotation="${ASSEMBLY}-${SC_NAME}-${TYPE}" '{print $3" "annotation}' > ${OUTPUT}
# There are sometime multiple rs (separated by ;) in one line that needs to be split across multiple lines
zcat "${INPUT}" | grep -v '^#' | awk -v annotation="${ASSEMBLY}-${SC_NAME}-${TYPE}" '{gsub(";","\n",$3); print $3" "annotation}' > ${OUTPUT}
elif [[ ${INPUT} == *_unmapped_ids.txt.gz ]]
then
SC_NAME=$(basename $(dirname ${INPUT}));
Expand Down

0 comments on commit ea48d6f

Please sign in to comment.