Skip to content

Commit

Permalink
Change sed command to fit Debian 9
Browse files Browse the repository at this point in the history
  • Loading branch information
leexgh committed Aug 22, 2024
1 parent c8684e2 commit c116f77
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions scripts/import_mongo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,7 @@ do

echo "Transforming $mutation_assessor_tsv_file"
# Rename the columns
if [ -f "${DIR}/../data/common_input/${mutation_assessor_tsv_file}" ]; then
echo "File exists: ${DIR}/../data/common_input/${mutation_assessor_tsv_file}"
else
echo "File not found: ${DIR}/../data/common_input/${mutation_assessor_tsv_file}"
exit 1
fi
sed 's/uniprotId\tSV\thgvspShort\tF_score\tF_impact\tMSA\tMAV/uniprotId\tsv\thgvspShort\tf_score\tf_impact\tmsa\tmav/' ${DIR}/../data/common_input/$mutation_assessor_tsv_file
sed -i 's/uniprotId\tSV\thgvspShort\tF_score\tF_impact\tMSA\tMAV/uniprotId\tsv\thgvspShort\tf_score\tf_impact\tmsa\tmav/' ${DIR}/../data/common_input/$mutation_assessor_tsv_file
# Add a new column "_id" (uniprotId,hgvspShort)
awk -F'\t' 'BEGIN{OFS="\t"} NR==1{print "_id",$0; next} {print $1","$3,$0}' ${DIR}/$mutation_assessor_tsv_file > ${DIR}/../data/common_input/processed_$mutation_assessor_tsv_file

Expand Down

0 comments on commit c116f77

Please sign in to comment.