Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

clean_Yang.sh 485 B

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
  1. #!/bin/sh
  2. set -e
  3. if [ -z "$2" ]; then exit 1; fi
  4. SOURCE="$(pwd)/$1"
  5. SINK="$(pwd)/$2"
  6. cd "$SOURCE"
  7. mkdir -p "$SINK"
  8. # Rename the first cell to `"gene"` and normalize inputs
  9. cat counts_raw.csv | sed 's/^""/"gene"/' | xsv input >"$SINK/counts_raw.csv"
  10. for f in genes_*.csv; do
  11. # Insert a (single-column) header and normalize inputs
  12. echo '"gene"' | cat - $f | xsv input >"$SINK/$f"
  13. done
  14. xsv select id_df,time metadata.csv | sed 's/^id_df,time/sample,group/' >"$SINK/samples.csv"
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...