Salento
Veteran member
- Messages
- 5,639
- Reaction score
- 2,850
- Points
- 113
- Ethnic group
- Italian
- Y-DNA haplogroup
- T1a2 - SK1480
- mtDNA haplogroup
- H12a
One way of extracting a sample IBD and chrs matches (similar to Post #15 zip download.
Open the ibd and the ch_all files and copy exactly the sample name.
With grep:
open a command prompt:
grep -w "sample_name" "AncIBDfile.tsv" > ibd_sample.tsv
and/or:
grep -w "sample_name" "ch_all_Anc_Ita.tsv" > ch_sample.tsv
(keep the quotes in the command).
It should extract all lines containing sample_name.
To append the Header:
do copy and paste, or create a new text file, add the ibd header below, and save it as: ibd_header.txt
... and the ch_all Header below and save it as: ch_all_header.txt
cat ibd_header.txt ibd_sample.tsv >> ibd-sample.tsv
and:
cat ch_all_header.txt ch_sample.tsv >> ch-sample.tsv
We could also merge the sample ibd and ch files:
cat ibd-sample.tsv ch-sample.tsv >> ibd-ch-sample.tsv
Open the ibd and the ch_all files and copy exactly the sample name.
With grep:
open a command prompt:
grep -w "sample_name" "AncIBDfile.tsv" > ibd_sample.tsv
and/or:
grep -w "sample_name" "ch_all_Anc_Ita.tsv" > ch_sample.tsv
(keep the quotes in the command).
It should extract all lines containing sample_name.
To append the Header:
do copy and paste, or create a new text file, add the ibd header below, and save it as: ibd_header.txt
Code:
iid1 iid2 max_IBD sum_IBD>8.0 n_IBD>8.0 sum_IBD>12.0 n_IBD>12.0 sum_IBD>16.0 n_IBD>16.0 sum_IBD>20.0 n_IBD>20.0
... and the ch_all Header below and save it as: ch_all_header.txt
Code:
Start End StartM EndM length lengthM ch iid1 iid2
cat ibd_header.txt ibd_sample.tsv >> ibd-sample.tsv
and:
cat ch_all_header.txt ch_sample.tsv >> ch-sample.tsv
We could also merge the sample ibd and ch files:
cat ibd-sample.tsv ch-sample.tsv >> ibd-ch-sample.tsv
Last edited: