+ date=2019-10-01 + data_source=data_sources + organism='Homo sapiens' ++ dirname ../prep/study_metadata_layout.sh + sdir=../prep + study=ERP020994 + org=human + dsource=sra + preds_file=../prep/Human.SRA_curated_predict.meta.w_rids.rtypes.tsv + perl -e '$study="ERP020994"; $study=~/(..)$/; $lo=$1; `mkdir -p $lo/$study`; print "$lo/$study\n";' ++ cat ERP020994.dir cat: ERP020994.dir: No such file or directory + dir+++ cat ../prep/samples.tsv.header /dev/fd/../++ fgrep + cut_cols=1-3 + [[ human == \m\o\u\s\e ]] + [[ human == \h\u\m\a\n ]] + gzip + cut -f 1-41 94/ERP020994/samples.tsv.ERP020994 cut: 94/ERP020994/samples.tsv.ERP020994: No such file or directory + gzip + cut -f 1-3,42-150 94/ERP020994/samples.tsv.ERP020994 cut: 94/ERP020994/samples.tsv.ERP020994: No such file or directory + [[ human == \g\t\e\x ]] + [[ human == \t\c\g\a ]] + proj_header='rail_id external_id study project organism file_source metadata_source date_processed' + dsource_path=data_sources/sra + extra_proj_cols='Homo sapiens data_sources/sra data_sources/sra 2019-10-01' + gzip + cat /dev/fd/63 /dev/fd/62 ++ echo 'rail_id external_id study project organism file_source metadata_source date_processed' ++ tail -n+2 94/ERP020994/samples.tsv.ERP020994 ++ cut -f 1-3 ++ perl -ne 'chomp; $f=$_; ($rid,$run,$study)=split(/\t/,$f); prin+ cat /dev/fd/63 /dev/fd/62 ++ echo 'rail_id external_id study project organistail: cannot open ‘94/ERP020994/samples.tsv.ERP020994’ for reading: No such file or directory + [[ -n ../prep/Human.SRA_curated_predict.meta.w_rids.rtypes.tsv ]] + gzip + cat /dev/fd/63 /dev/fd/62 ++ head -1 ../prep/Human.SRA_curated_predict.meta.w_rids.rtypes.tsv ++ fgrep ' ERP020994 ' ../prep/Human.SRA_curated_predict.meta.w_rids.rtypes.tsv ++ perl -e '$s="ERP020994"; $s=~/(..)$/; $lo=$1; print "$lo\n";' + lo=94 + gzip + cat /dev/fd/63 /dev/fd/62 ++ head -1 ../prep/seqtk.w_study.tsv.cut ++ fgrep ' ERP020994 ' ../prep/seqtk.w_study.tsv.cut + rm 94/ERP020994/samples.tsv.ERP020994 rm: cannot remove ‘94/ERP020994/samples.tsv.ERP020994’: No such file or directory + rm ERP020994.dir rm: cannot remove ‘ERP020994.dir’: No such file or directory ion denied ++ perl -e '$s="ERP020994"; $s=~/(..)$/; $lo=$1; print "$lo\n";' + lo=94 + gzip + cat /dev/fd/63 /dev/fd/62 ++ head -1 ../prep/seqtk.w_study.tsv.cut ++ fgrep ' ERP020994 ' ../prep/seqtrm: cannot remove + rm /samples.tsv.ERP020994 rm: cannot remove ‘/samples.tsv.ERP020994’: No such file or directory + rm ERP020994.dir rm: cannot remove ‘ERP020994.dir’: No such file or directory